Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2012-10-06 16:32:52 +0400
committerLukas Reschke <lukas@statuscode.ch>2012-10-06 16:32:52 +0400
commitf96bf9eb814f292063456d362d179440aa3a08ac (patch)
tree9b01ab6df09f7ee87a20843833f50e3d1cbace1a /apps
parentb76a335dc98825a703f7c1134ac052a1c9fac9a8 (diff)
Remove the webodf sources
This is a backport of 683a0c1 /cc @DeepDiver1975
Diffstat (limited to 'apps')
-rwxr-xr-xapps/files_odfviewer/src/update.sh8
-rw-r--r--apps/files_odfviewer/src/webodf/.gitignore17
-rw-r--r--apps/files_odfviewer/src/webodf/.gitmodules9
-rw-r--r--apps/files_odfviewer/src/webodf/CMakeLists.txt160
-rw-r--r--apps/files_odfviewer/src/webodf/JSCoverage.patch13
-rw-r--r--apps/files_odfviewer/src/webodf/packwebodf.js93
-rw-r--r--apps/files_odfviewer/src/webodf/programs/CMakeLists.txt30
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/AndroidManifest.xml42
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/CMakeLists.txt41
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/assets/www/config.xml25
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/assets/www/icon.pngbin3793 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/assets/www/index.html46
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/assets/www/phonegap-1.4.1.js4586
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/assets/www/scripts.js4123
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/libs/phonegap-1.4.1.jarbin155233 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/res/drawable-hdpi/ic_launcher.pngbin4147 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/res/drawable-ldpi/ic_launcher.pngbin1723 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/res/drawable-mdpi/ic_launcher.pngbin2574 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/res/drawable/icon.pngbin3535 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/res/layout/listitem.xml7
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/res/layout/main.xml12
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/res/layout/selector.xml17
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/res/values/strings.xml7
-rwxr-xr-xapps/files_odfviewer/src/webodf/programs/android/res/xml/phonegap.xml5
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/res/xml/plugins.xml19
-rw-r--r--apps/files_odfviewer/src/webodf/programs/android/src/org/webodf/WebODFActivity.java33
-rwxr-xr-xapps/files_odfviewer/src/webodf/programs/android/updateWebODF.sh3
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/CMakeLists.txt0
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-manifest-schema-v1.0-os.rng111
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-manifest-schema-v1.1.rng111
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-schema-v1.0-os.rng17666
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-schema-v1.1.rng17891
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-strict-schema-v1.0-os.rng61
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-strict-schema-v1.1.rng61
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-v1.2-cos01-dsig-schema.rng84
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-v1.2-cos01-manifest-schema.rng224
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-v1.2-cos01-schema.rng18127
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/application-vnd.oasis.opendocument.presentation.pngbin6617 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/application-vnd.oasis.opendocument.spreadsheet.pngbin7002 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/application-vnd.oasis.opendocument.text.pngbin6723 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/docnosis.js779
-rw-r--r--apps/files_odfviewer/src/webodf/programs/docnosis/index.html27
-rw-r--r--apps/files_odfviewer/src/webodf/programs/firefoxextension/CMakeLists.txt35
-rw-r--r--apps/files_odfviewer/src/webodf/programs/firefoxextension/bootstrap.js36
-rw-r--r--apps/files_odfviewer/src/webodf/programs/firefoxextension/chrome.manifest13
-rw-r--r--apps/files_odfviewer/src/webodf/programs/firefoxextension/components/odfContentHandler.js196
-rw-r--r--apps/files_odfviewer/src/webodf/programs/firefoxextension/content/odf.html89
-rw-r--r--apps/files_odfviewer/src/webodf/programs/firefoxextension/install.rdf.in34
-rw-r--r--apps/files_odfviewer/src/webodf/programs/firefoxextension/packextension.js77
-rw-r--r--apps/files_odfviewer/src/webodf/programs/firefoxextension/skin/default/icon.pngbin44606 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/Default-Landscape~ipad.pngbin52135 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/Default-Portrait~ipad.pngbin51794 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF.xcodeproj/project.pbxproj512
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/AppDelegate.h52
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/AppDelegate.m202
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/MainViewController.h17
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/MainViewController.m47
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/MainViewController.xib118
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NSData+Base64.h33
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NSData+Base64.m299
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NativeZip.h13
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NativeZip.m79
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/WebViewCache.h15
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/WebViewCache.m72
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/crypt.h132
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/ioapi.c177
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/ioapi.h75
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/mztools.c28
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/mztools.h31
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/unzip.c1597
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/unzip.h354
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/zip.h15
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/PhoneGap.plist57
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/en.lproj/Localizable.strings25
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/icons/icon-72.pngbin8844 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/icons/icon.pngbin6106 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/icons/icon@2x.pngbin19269 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default-Landscape~ipad.pngbin52135 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default-Portrait~ipad.pngbin51794 -> 0 bytes
-rwxr-xr-xapps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default.pngbin46308 -> 0 bytes
-rwxr-xr-xapps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default@2x.pngbin50982 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/WebODF-Info.plist122
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/WebODF-Prefix.pch7
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/en.lproj/InfoPlist.strings2
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/WebODF/main.m32
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/www/index.html52
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/www/nativezip.js84
-rw-r--r--apps/files_odfviewer/src/webodf/programs/ios/www/phonegap-1.4.1.js4123
-rw-r--r--apps/files_odfviewer/src/webodf/programs/nativeQtClient/CMakeLists.txt39
-rw-r--r--apps/files_odfviewer/src/webodf/programs/nativeQtClient/README1
-rw-r--r--apps/files_odfviewer/src/webodf/programs/nativeQtClient/application.qrc18
-rw-r--r--apps/files_odfviewer/src/webodf/programs/nativeQtClient/main.cpp10
-rw-r--r--apps/files_odfviewer/src/webodf/programs/nativeQtClient/mainwindow.cpp173
-rw-r--r--apps/files_odfviewer/src/webodf/programs/nativeQtClient/mainwindow.h46
-rw-r--r--apps/files_odfviewer/src/webodf/programs/nativeQtClient/mainwindow.ui46
-rw-r--r--apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfpage.cpp1
-rw-r--r--apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfpage.h15
-rw-r--r--apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfview.cpp83
-rw-r--r--apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfview.h29
-rw-r--r--apps/files_odfviewer/src/webodf/programs/nativeQtClient/scripts.js93
-rw-r--r--apps/files_odfviewer/src/webodf/programs/playbook/CMakeLists.txt0
-rw-r--r--apps/files_odfviewer/src/webodf/programs/playbook/build_sign.bat23
-rw-r--r--apps/files_odfviewer/src/webodf/programs/playbook/config.xml26
-rw-r--r--apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/js/common/custom_filereader_dispatcher.js17
-rw-r--r--apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/js/common/custom_filereader_ns.js8
-rw-r--r--apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/library.xml22
-rw-r--r--apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/src/AIR/CustomFileReader/src/blackberry/custom/filereader/CustomFileReader.as34
-rw-r--r--apps/files_odfviewer/src/webodf/programs/playbook/icon.pngbin19269 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/playbook/index.html28
-rw-r--r--apps/files_odfviewer/src/webodf/programs/playbook/scripts.js146
-rw-r--r--apps/files_odfviewer/src/webodf/programs/qtjsruntime/CMakeLists.txt4
-rw-r--r--apps/files_odfviewer/src/webodf/programs/qtjsruntime/nam.h48
-rw-r--r--apps/files_odfviewer/src/webodf/programs/qtjsruntime/nativeio.cpp106
-rw-r--r--apps/files_odfviewer/src/webodf/programs/qtjsruntime/nativeio.h41
-rw-r--r--apps/files_odfviewer/src/webodf/programs/qtjsruntime/pagerunner.cpp191
-rw-r--r--apps/files_odfviewer/src/webodf/programs/qtjsruntime/pagerunner.h68
-rw-r--r--apps/files_odfviewer/src/webodf/programs/qtjsruntime/qtjsruntime.cpp20
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/CMakeLists.txt7
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/ZoomIn.pngbin670 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/ZoomOut.pngbin607 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/app/app.js40
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/app/controller/Files.js82
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/app/model/FileSystem.js265
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/app/store/FileStore.js30
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/app/views/FileDetail.js122
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/app/views/FilesList.js47
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/app/views/OdfView.js170
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/app/views/Viewport.js54
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/go-next.pngbin1473 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/go-previous.pngbin1536 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/index.html22
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/scripts.js130
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/sencha-touch.css1
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/sencha-touch.js15
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/welcome.odtbin62780 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/zoom-fit-best.pngbin932 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/zoom-fit-height.pngbin947 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/programs/touchui/zoom-fit-width.pngbin934 -> 0 bytes
-rwxr-xr-xapps/files_odfviewer/src/webodf/simplerevisionserver/webdavserver.py77
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/APPNOTE.txt3218
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/CMakeLists.txt201
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/README43
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/compare.html34
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/compare.js45
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/deflateinmozilla.txt69
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/embedodf.html2
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/filelist.js66
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/filelister.html42
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/filelister.js200
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/flashput/Makefile2
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/flashput/PUT.as18
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/flashput/PUT.swfbin18031 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/flashput/Request.as83
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/flashput/test.html96
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/gui.js263
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/httpserver.js213
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/index.html17
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/core/Async.js65
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/core/Base64.js362
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/core/ByteArray.js68
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/core/ByteArrayWriter.js101
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/core/Cursor.js213
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/core/JSLint.js6403
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/core/PointWalker.js197
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/core/RawDeflate.js1833
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/core/RawInflate.js790
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/core/UnitTester.js255
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/core/Zip.js600
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/core/dummyxmlmodel.js_21
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/export.js39
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/gui/Caret.js65
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/gui/PresenterUI.js246
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/gui/SelectionMover.js217
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/gui/XMLEdit.js330
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/manifest.js34
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/odf/FontLoader.js135
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/odf/Formatting.js153
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/odf/OdfCanvas.js912
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/odf/OdfContainer.js672
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/odf/Style2CSS.js632
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/odf/StyleInfo.js424
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/packages.js48
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/runtime.js1117
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/xmldom/LSSerializer.js197
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/xmldom/LSSerializerFilter.js40
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/xmldom/OperationalTransformDOM.js115
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/xmldom/OperationalTransformInterface.js97
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/xmldom/RelaxNG.js691
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/xmldom/RelaxNG2.js416
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/xmldom/RelaxNGParser.js452
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/lib/xmldom/XPath.js383
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/misctests/carettest.html135
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/misctests/selection.html27
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/misctests/testselection.html61
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/misctests/testzip.js181
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/misctests/writetest.zipbin153 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/notes137
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/odf.html44
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/odfedit.html27
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/odfedit.js314
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngToCPP.js463
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test01.rng36
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test01.xml8
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test02.rng80
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test02.xml12
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test03.rng16
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test03.xml6
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test04.rng18
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test04.xml5
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test05.rng42
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test05.xml9
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test06.rng11
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test06.xml4
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test07.rng52
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test07.xml14
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test08.rng52
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test08.xml14
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test09.rng30
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test09.xml14
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test10.rng50
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test10.xml13
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test11.rng75
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test11.xml12
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test12.rng97
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test12.xml15
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test13.rng71
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test13.xml17
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test14.rng45
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test14.xml12
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test15.rng47
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test15.xml18
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test16.rng46
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test16.xml18
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test17.rng51
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test17.xml17
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test18.rng25
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test18.xml6
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test19.rng43
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test19.xml11
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test20.rng32
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test20.xml11
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test21.rng47
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test21.xml11
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test22.rng32
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test22.xml11
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test23.rng33
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/relaxngtests/test23.xml4
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/roundtripodf.js71
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/roundtripzip.js64
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/styleNameRef272
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/styleNameRefs57
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/testrelaxng.js91
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/core/Base64Tests.js105
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/core/CursorTests.js238
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/core/PointWalkerTests.js135
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/core/RuntimeTests.js119
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/core/ZipTests.js141
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/core/hi-compressed.zipbin172 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/core/hi-uncompressed.zipbin176 -> 0 bytes
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/gui/CaretTests.js82
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/gui/SelectionMoverTests.js109
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/gui/XMLEditTests.js156
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/manifest.js16
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/resources/js-test-style.css12
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/tests.html22
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/tests.js94
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/xmldom/OperationalTransformDOMTests.js79
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tests/xmldom/XPathTests.js112
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tools/clippingTestImage.html39
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tools/externs.js348
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tools/extjsexterns.js171
-rwxr-xr-xapps/files_odfviewer/src/webodf/webodf/tools/fixLicenses.py81
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tools/refcheck/bootstrap.xsl193
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tools/refcheck/odfkeys.xml455
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/tools/runjslint.js98
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/webodf.css200
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/xmledit/gui.js119
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/xmledit/index.html16
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/xmledit/requirements.dtd12
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/xmledit/requirements.xml22
-rw-r--r--apps/files_odfviewer/src/webodf/webodf/xmledit/test.xml22
281 files changed, 5 insertions, 105051 deletions
diff --git a/apps/files_odfviewer/src/update.sh b/apps/files_odfviewer/src/update.sh
index dad9bf35fb5..4b97b75d491 100755
--- a/apps/files_odfviewer/src/update.sh
+++ b/apps/files_odfviewer/src/update.sh
@@ -1,9 +1,11 @@
-cd webodf
-git pull
-cd ..
+rm -rf webodf
+git clone https://git.gitorious.org/odfkit/webodf.git
rm -Rf build
mkdir build
cd build
cmake ../webodf
make webodf.js webodf-debug.js
cp webodf/webodf*.js ../../js/
+cd ..
+rm -rf webodf
+rm -rf build \ No newline at end of file
diff --git a/apps/files_odfviewer/src/webodf/.gitignore b/apps/files_odfviewer/src/webodf/.gitignore
deleted file mode 100644
index 5f9afa1071c..00000000000
--- a/apps/files_odfviewer/src/webodf/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-#android/bin
-#android/gen
-nativeQtClient/nativeQtClient.pro.user
-programs/firefoxextension/content/webodf.js
-programs/firefoxextension/content/webodf.css
-programs/firefoxextension/install.rdf
-programs/ios/WebODF.xcodeproj/project.xcworkspace
-programs/ios/WebODF.xcodeproj/xcuserdata
-programs/ios/www/ZoomIn.png
-programs/ios/www/ZoomOut.png
-programs/ios/www/app/
-programs/ios/www/sencha-touch.css
-programs/ios/www/sencha-touch.js
-programs/ios/www/webodf.css
-programs/ios/www/webodf.js
-.DS_Store
-programs/ios/build/
diff --git a/apps/files_odfviewer/src/webodf/.gitmodules b/apps/files_odfviewer/src/webodf/.gitmodules
deleted file mode 100644
index 0d440b2a360..00000000000
--- a/apps/files_odfviewer/src/webodf/.gitmodules
+++ /dev/null
@@ -1,9 +0,0 @@
-[submodule "webodf/extjs"]
- path = webodf/extjs
- url = git://github.com/probonogeek/extjs.git
-[submodule "simplerevisionserver/pywebdav"]
- path = simplerevisionserver/pywebdav
- url = ssh://vandenoever@heap.kogmbh.net/srv/git/pywebdav
-[submodule "extjs"]
- path = extjs
- url = git://github.com/probonogeek/extjs.git
diff --git a/apps/files_odfviewer/src/webodf/CMakeLists.txt b/apps/files_odfviewer/src/webodf/CMakeLists.txt
deleted file mode 100644
index dfac345df1d..00000000000
--- a/apps/files_odfviewer/src/webodf/CMakeLists.txt
+++ /dev/null
@@ -1,160 +0,0 @@
-# WebODF is mostly a JavaScript project. CMake needs to know about the C++ parts
-project (WebODF C CXX)
-# version 2.8.2 is needed to have support for zip files in external projects
-cmake_minimum_required(VERSION 2.8.2)
-
-# At this point, the version number that is used throughout is defined
-set(WEBODF_VERSION 0.3.0)
-
-# This makefile 'compiles' WebODF using various tools, instruments the code and
-# builds and packages programs that use WebODF.
-
-# Find installed dependencies
-find_package(Qt4 4.7.0 COMPONENTS QtCore QtGui QtXml QtNetwork QtWebKit)
-if (NOT QT4_FOUND)
- message(WARNING "Qt4 with modules QtCore QtGui QtXml QtNetwork QtWebKit was not found. qtjsruntime will no be built.")
-endif (NOT QT4_FOUND)
-
-# java runtime is needed for Closure Compiler
-find_package(Java COMPONENTS Runtime)
-
-if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
- message(FATAL_ERROR "Compiling in the source directortory is not supported. Use for example 'mkdir build; cd build; cmake ..'.")
-endif (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
-
-# Tools must be obtained to work with:
-include (ExternalProject)
-
-if(Java_JAVA_EXECUTABLE)
- # Closure Compiler
- ExternalProject_Add(
- ClosureCompiler
- URL "http://closure-compiler.googlecode.com/files/compiler-20120305.tar.gz"
- URL_MD5 513344df6f18bfa00b17f034cabf897d
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ""
- INSTALL_COMMAND ""
- )
- set(CLOSURE_JAR ${CMAKE_BINARY_DIR}/ClosureCompiler-prefix/src/ClosureCompiler/compiler.jar)
-endif(Java_JAVA_EXECUTABLE)
-
-# Rhino
-if(Java_JAVA_EXECUTABLE)
- ExternalProject_Add(
- Rhino
- URL "http://ftp.mozilla.org/pub/js/rhino1_7R3.zip"
- URL_MD5 99d94103662a8d0b571e247a77432ac5
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ""
- INSTALL_COMMAND ""
- )
- set(RHINO ${CMAKE_BINARY_DIR}/Rhino-prefix/src/Rhino/js.jar)
-endif(Java_JAVA_EXECUTABLE)
-
-# JSDoc
-ExternalProject_Add(
- JsDoc
- URL "http://jsdoc-toolkit.googlecode.com/files/jsdoc_toolkit-2.4.0.zip"
- URL_MD5 a8f78f5ecd24b54501147b2af341a231
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ""
- INSTALL_COMMAND ""
-)
-set(JSDOCDIR ${CMAKE_BINARY_DIR}/JsDoc-prefix/src/JsDoc/jsdoc-toolkit)
-
-# Node.JS
-ExternalProject_Add(
- NodeJS
- URL "http://nodejs.org/dist/v0.6.15/node-v0.6.15.tar.gz"
- URL_MD5 852cfb1ed8125a4cdba456446d869d19
- CONFIGURE_COMMAND "./configure"
- BUILD_IN_SOURCE 1
- INSTALL_COMMAND ""
-)
-set(NODE ${CMAKE_BINARY_DIR}/NodeJS-prefix/src/NodeJS/out/Release/node)
-
-# JSCoverage
-ExternalProject_Add(
- JSCoverage
- URL "http://siliconforks.com/jscoverage/download/jscoverage-0.5.1.tar.bz2"
- URL_MD5 a70d79a6759367fbcc0bcc18d6866ff3
- PATCH_COMMAND patch -p0 < ${CMAKE_CURRENT_SOURCE_DIR}/JSCoverage.patch
- CONFIGURE_COMMAND "./configure"
- BUILD_IN_SOURCE 1
- INSTALL_COMMAND ""
-)
-set(JSCOVERAGE ${CMAKE_BINARY_DIR}/JSCoverage-prefix/src/JSCoverage/jscoverage)
-
-# Android
-if (NOT ANDROID_SDK_DIR)
- find_path(ANDROID_SDK_DIR platform-tools/aapt)
-endif(NOT ANDROID_SDK_DIR)
-if (NOT ANT)
- find_file(ANT NAMES ant ant.exe /usr/bin /usr/local/bin)
-endif(NOT ANT)
-
-
-
-set(LIBJSFILES lib/packages.js lib/runtime.js lib/core/Base64.js
- lib/core/RawDeflate.js lib/core/ByteArray.js
- lib/core/ByteArrayWriter.js lib/core/RawInflate.js
- lib/core/Cursor.js lib/core/UnitTester.js
- lib/core/PointWalker.js lib/core/Async.js
- lib/core/Zip.js
-
- lib/xmldom/LSSerializerFilter.js lib/xmldom/LSSerializer.js
- lib/xmldom/RelaxNGParser.js lib/xmldom/RelaxNG.js
- lib/xmldom/RelaxNG2.js lib/xmldom/OperationalTransformInterface.js
- lib/xmldom/OperationalTransformDOM.js
- lib/xmldom/XPath.js
-
- lib/odf/StyleInfo.js lib/odf/Style2CSS.js
- lib/odf/FontLoader.js lib/odf/OdfContainer.js
- lib/odf/Formatting.js lib/odf/OdfCanvas.js
-
- lib/gui/PresenterUI.js lib/gui/Caret.js
- lib/gui/SelectionMover.js lib/gui/XMLEdit.js
-
- lib/manifest.js
-)
-
-set(HTML5UIFILES
- app/app.js app/controller/Files.js app/model/FileSystem.js
- app/views/FileDetail.js app/views/FilesList.js app/views/OdfView.js
- app/views/Viewport.js sencha-touch.css sencha-touch.js
- app/store/FileStore.js
- ZoomOut.png ZoomIn.png go-previous.png go-next.png
- zoom-fit-width.png zoom-fit-best.png zoom-fit-height.png
-)
-
-add_subdirectory(webodf)
-add_subdirectory(programs)
-
-# package webodf
-set(WEBODFZIP webodf-${WEBODF_VERSION}.zip)
-set(WEBODFZIP_FILES
- ${CMAKE_BINARY_DIR}/webodf/webodf-debug.js
- ${CMAKE_BINARY_DIR}/webodf/webodf.js
- ${CMAKE_SOURCE_DIR}/webodf/webodf.css
-)
-add_custom_command(
- OUTPUT ${WEBODFZIP}
- # zip using javascript code running in node.js
- COMMAND ${NODE} ARGS webodf/lib/runtime.js packwebodf.js
- ${CMAKE_BINARY_DIR}/${WEBODFZIP}
-#input files
- ${WEBODFZIP_FILES}
-#output files
- webodf-debug.js
- webodf.js
- webodf.css
- DEPENDS NodeJS
- packwebodf.js
- ${WEBODFZIP_FILES}
- webodf-debug.js
- webodf.js
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-)
-add_custom_target(zip ALL DEPENDS ${WEBODFZIP})
-
-# vim:expandtab
diff --git a/apps/files_odfviewer/src/webodf/JSCoverage.patch b/apps/files_odfviewer/src/webodf/JSCoverage.patch
deleted file mode 100644
index b769f40b9dc..00000000000
--- a/apps/files_odfviewer/src/webodf/JSCoverage.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- ./util.c_ 2011-04-20 11:22:46.558521731 +0200
-+++ ./util.c 2011-04-20 11:23:23.999880771 +0200
-@@ -478,6 +478,10 @@
- p->next = head;
- head = p;
- }
-+ else if (S_ISDIR(buf.st_mode)) {
-+ head = recursive_dir_list(root, entry_wrt_root, head);
-+ free(entry_wrt_root);
-+ }
- else {
- fatal("refusing to follow symbolic link: %s", entry);
- }
diff --git a/apps/files_odfviewer/src/webodf/packwebodf.js b/apps/files_odfviewer/src/webodf/packwebodf.js
deleted file mode 100644
index 3a0d76c6922..00000000000
--- a/apps/files_odfviewer/src/webodf/packwebodf.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, core: true*/
-runtime.loadClass("core.Zip");
-runtime.loadClass("core.Base64");
-
-function addFiles(zip, pos, inputfiles, zipfiles, callback) {
- "use strict";
- if (inputfiles.length !== zipfiles.length) {
- return callback(
- "Arrays inputfiles and zipfiles should have the same length.");
- }
- if (pos >= inputfiles.length) {
- zip.write(function (err) {
- return callback(err);
- });
- return;
- }
- var inputfile = inputfiles[pos],
- zipmemberpath = zipfiles[pos];
- runtime.readFile(inputfile, "binary", function (err, data) {
- var base64;
- if (err) {
- return callback(err);
- }
- zip.save(zipmemberpath, data, false, new Date());
- addFiles(zip, pos + 1, inputfiles, zipfiles, callback);
- });
-}
-
-function usage() {
- "use strict";
- runtime.log("Usage:");
-}
-
-/**
- * This script takes 1+2n arguments
- * First argument is the name of the target zip file.
- * The next n arguments are the input files. The last n arguments are the
- * names of the files in the zip file.
- */
-if (arguments.length % 2 !== 0) {
- runtime.log("Wrong number of arguments.");
- usage();
- runtime.exit(1);
-}
-var args = arguments,
- n = (args.length - 2) / 2,
- zipfilename = args[1],
- inputmembers = [],
- zipmembers = [],
- i,
- zip = new core.Zip(zipfilename, null);
-for (i = 0; i < n; i += 1) {
- inputmembers[i] = args[2 + i];
- zipmembers[i] = args[2 + n + i];
-}
-addFiles(zip, 0, inputmembers, zipmembers, function (err) {
- "use strict";
- if (err) {
- runtime.log(err);
- }
-});
diff --git a/apps/files_odfviewer/src/webodf/programs/CMakeLists.txt b/apps/files_odfviewer/src/webodf/programs/CMakeLists.txt
deleted file mode 100644
index 4621a25d67f..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/CMakeLists.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-macro(COPY_FILES _varname _srcdir _tgtdir)
- foreach(_file ${ARGN})
- GET_FILENAME_COMPONENT(_subdir ${_file} PATH)
- FILE(MAKE_DIRECTORY ${_tgtdir}/${_subdir})
- add_custom_command(
- OUTPUT ${_tgtdir}/${_file}
- COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different
- ${_srcdir}/${_file}
- ${_tgtdir}/${_file}
- DEPENDS
- ${_srcdir}/${_file}
- )
- set(${_varname} ${${_varname}} ${_tgtdir}/${_file})
- endforeach(_file)
-endmacro(COPY_FILES _directory _files)
-
-if(QT4_FOUND)
- add_subdirectory(qtjsruntime)
- add_subdirectory(nativeQtClient)
- add_subdirectory(docnosis)
-endif(QT4_FOUND)
-
-if(ANDROID_SDK_DIR AND ANT)
- add_subdirectory(android)
-endif(ANDROID_SDK_DIR AND ANT)
-
-add_subdirectory(firefoxextension)
-
-add_subdirectory(touchui)
-add_subdirectory(playbook)
diff --git a/apps/files_odfviewer/src/webodf/programs/android/AndroidManifest.xml b/apps/files_odfviewer/src/webodf/programs/android/AndroidManifest.xml
deleted file mode 100644
index 491bbb80a21..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="org.webodf" android:versionCode="1" android:versionName="1.0">
- <supports-screens android:largeScreens="true"
- android:normalScreens="true" android:smallScreens="true"
- android:resizeable="true" android:anyDensity="true" />
- <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="4" />
- <application android:icon="@drawable/icon"
- android:label="@string/app_name">
- <activity android:label="@string/app_name" android:name=".WebODFActivity"
- android:configChanges="orientation|keyboardHidden">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- <intent-filter>
- <action android:name="android.intent.action.VIEW" />
- <category android:name="android.intent.category.DEFAULT" />
- <category android:name="android.intent.category.BROWSABLE" />
- <data android:mimeType="application/vnd.oasis.opendocument.text" />
- </intent-filter>
- <intent-filter>
- <action android:name="android.intent.action.VIEW" />
- <category android:name="android.intent.category.DEFAULT" />
- <category android:name="android.intent.category.BROWSABLE" />
- <data android:mimeType="application/vnd.oasis.opendocument.presentation" />
- </intent-filter>
- <intent-filter>
- <action android:name="android.intent.action.VIEW" />
- <category android:name="android.intent.category.DEFAULT" />
- <category android:name="android.intent.category.BROWSABLE" />
- <data android:mimeType="application/vnd.oasis.opendocument.spreadsheet" />
- </intent-filter>
- </activity>
- <activity android:name="com.phonegap.DroidGap" android:label="@string/app_name"
- android:configChanges="orientation|keyboardHidden">
- <intent-filter>
- </intent-filter>
- </activity>
- </application>
-
-</manifest>
diff --git a/apps/files_odfviewer/src/webodf/programs/android/CMakeLists.txt b/apps/files_odfviewer/src/webodf/programs/android/CMakeLists.txt
deleted file mode 100644
index b16c5a2f691..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/CMakeLists.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-set(ANDROID_JAR ${ANDROID_SDK_DIR}/platforms/android-8/android.jar)
-
-COPY_FILES(APKDEPS ${CMAKE_SOURCE_DIR}/programs/touchui
- ${CMAKE_CURRENT_BINARY_DIR}/assets/www ${HTML5UIFILES})
-COPY_FILES(APKDEPS ${CMAKE_CURRENT_SOURCE_DIR}/assets/www
- ${CMAKE_CURRENT_BINARY_DIR}/assets/www
- index.html icon.png phonegap-1.4.1.js)
-COPY_FILES(APKDEPS ${CMAKE_CURRENT_SOURCE_DIR}/res
- ${CMAKE_CURRENT_BINARY_DIR}/res
- drawable-hdpi/ic_launcher.png drawable-ldpi/ic_launcher.png
- drawable/icon.png drawable-mdpi/ic_launcher.png values/strings.xml
- xml/phonegap.xml xml/plugins.xml layout/selector.xml
- layout/main.xml layout/listitem.xml)
-COPY_FILES(APKDEPS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
- src/org/webodf/WebODFActivity.java libs/phonegap-1.4.1.jar
- AndroidManifest.xml)
-COPY_FILES(APKDEPS ${CMAKE_SOURCE_DIR}/webodf
- ${CMAKE_CURRENT_BINARY_DIR}/assets/www webodf.css)
-COPY_FILES(APKDEPS ${CMAKE_BINARY_DIR}/webodf
- ${CMAKE_CURRENT_BINARY_DIR}/assets/www webodf.js)
-
-set(WEBODFAPK ${CMAKE_CURRENT_BINARY_DIR}/bin/WebODF-debug.apk)
-add_custom_command(
- OUTPUT ${WEBODFAPK}
- COMMAND ${ANDROID_SDK_DIR}/tools/android
- ARGS update project --path . --target android-7 --name WebODF
- COMMAND ${ANT}
- ARGS -lib ${CMAKE_CURRENT_SOURCE_DIR}/libs/phonegap-1.4.1.jar debug
- DEPENDS ${APKDEPS}
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-)
-add_custom_target(apk ALL DEPENDS ${WEBODFAPK})
-set(WEBODFRELEASEAPK ${CMAKE_CURRENT_BINARY_DIR}/bin/WebODF-release.apk)
-add_custom_command(
- OUTPUT ${WEBODFRELEASEAPK}
- COMMAND ${ANT}
- ARGS -lib ${CMAKE_CURRENT_SOURCE_DIR}/libs/phonegap-1.4.1.jar release
- DEPENDS ${WEBODFAPK} webodf.js
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-)
-add_custom_target(releaseapk ALL DEPENDS ${WEBODFRELEASEAPK})
diff --git a/apps/files_odfviewer/src/webodf/programs/android/assets/www/config.xml b/apps/files_odfviewer/src/webodf/programs/android/assets/www/config.xml
deleted file mode 100644
index 21b5ca9ecc5..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/assets/www/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<widget xmlns = "http://www.w3.org/ns/widgets"
- xmlns:gap = "http://phonegap.com/ns/1.0"
- id = "org.webodf.phonegap.one"
- version = "1.0.0">
-
- <name>WebODF: online/offline office</name>
- <description>
- A viewer for ODF files.
- </description>
- <author href="http://webodf.org/"
- email="jos.van.den.oever@kogmbh.com">
- Jos van den Oever
- </author>
- <gap:platforms>
- <gap:platform name="android" minVersion="2.1" />
- <gap:platform name="webos" />
- <gap:platform name="symbian.wrt" />
- <gap:platform name="blackberry" project="widgets"/>
- </gap:platforms>
- <icon src="icon.png" gap:role="default" />
- <feature name="http://api.phonegap.com/1.0/file"/>
- <preference name="autorotate" value="false" readonly="true"/>
- <preference name="orientation" value="default"/>
-</widget>
diff --git a/apps/files_odfviewer/src/webodf/programs/android/assets/www/icon.png b/apps/files_odfviewer/src/webodf/programs/android/assets/www/icon.png
deleted file mode 100644
index 2993aa9f146..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/assets/www/icon.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/android/assets/www/index.html b/apps/files_odfviewer/src/webodf/programs/android/assets/www/index.html
deleted file mode 100644
index d9a299d24d1..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/assets/www/index.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>WebODF</title>
- <link href="sencha-touch.css" rel="stylesheet" type="text/css" />
- <link href="webodf.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="phonegap-1.4.1.js"></script>
- <script type="text/javascript" src="sencha-touch.js"></script>
- <script type="text/javascript" src="webodf.js"></script>
- <script type="text/javascript" src="app/app.js"></script>
- <script type="text/javascript" src="app/controller/Files.js"></script>
- <script type="text/javascript" src="app/model/FileSystem.js"></script>
- <script type="text/javascript" src="app/store/FileStore.js"></script>
- <script type="text/javascript" src="app/views/FileDetail.js"></script>
- <script type="text/javascript" src="app/views/FilesList.js"></script>
- <script type="text/javascript" src="app/views/OdfView.js"></script>
- <script type="text/javascript" src="app/views/Viewport.js"></script>
- <script type="text/javascript">
-var applicationReady = false,
- deviceReady = false,
- startScanningDirectories;
-document.addEventListener("deviceready", function () {
- deviceReady = true;
- if (applicationReady) {
- startScanningDirectories();
- }
-}, false);
-/**
- * Override this function so it waits until the device is ready.
- */
-onApplicationLaunch = function (app) {
- "use strict";
- applicationReady = true;
- startScanningDirectories = function () {
- if (typeof invokeString !== "undefined" && invokeString) {
- app.openUrl(invokeString);
- }
- app.startScanningDirectories();
- };
- if (deviceReady) {
- startScanningDirectories();
- }
-};
- </script>
- </head><body></body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/programs/android/assets/www/phonegap-1.4.1.js b/apps/files_odfviewer/src/webodf/programs/android/assets/www/phonegap-1.4.1.js
deleted file mode 100644
index 908b8a8a216..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/assets/www/phonegap-1.4.1.js
+++ /dev/null
@@ -1,4586 +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.
- */
-
-// Version 1.2.0
-
-if (typeof PhoneGap === "undefined") {
-
-/**
- * The order of events during page load and PhoneGap startup is as follows:
- *
- * onDOMContentLoaded Internal event that is received when the web page is loaded and parsed.
- * window.onload Body onload event.
- * onNativeReady Internal event that indicates the PhoneGap native side is ready.
- * onPhoneGapInit Internal event that kicks off creation of all PhoneGap JavaScript objects (runs constructors).
- * onPhoneGapReady Internal event fired when all PhoneGap JavaScript objects have been created
- * onPhoneGapInfoReady Internal event fired when device properties are available
- * onDeviceReady User event fired to indicate that PhoneGap is ready
- * onResume User event fired to indicate a start/resume lifecycle event
- * onPause User event fired to indicate a pause lifecycle event
- * onDestroy Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
- *
- * The only PhoneGap events that user code should register for are:
- * deviceready PhoneGap native code is initialized and PhoneGap APIs can be called from JavaScript
- * pause App has moved to background
- * resume App has returned to foreground
- *
- * Listeners can be registered as:
- * document.addEventListener("deviceready", myDeviceReadyListener, false);
- * document.addEventListener("resume", myResumeListener, false);
- * document.addEventListener("pause", myPauseListener, false);
- *
- * The DOM lifecycle events should be used for saving and restoring state
- * window.onload
- * window.onunload
- */
-
-/**
- * This represents the PhoneGap API itself, and provides a global namespace for accessing
- * information about the state of PhoneGap.
- * @class
- */
-var PhoneGap = {
- documentEventHandler: {}, // Collection of custom document event handlers
- windowEventHandler: {} // Collection of custom window event handlers
-};
-
-/**
- * List of resource files loaded by PhoneGap.
- * This is used to ensure JS and other files are loaded only once.
- */
-PhoneGap.resources = {base: true};
-
-/**
- * Determine if resource has been loaded by PhoneGap
- *
- * @param name
- * @return
- */
-PhoneGap.hasResource = function(name) {
- return PhoneGap.resources[name];
-};
-
-/**
- * Add a resource to list of loaded resources by PhoneGap
- *
- * @param name
- */
-PhoneGap.addResource = function(name) {
- PhoneGap.resources[name] = true;
-};
-
-/**
- * Custom pub-sub channel that can have functions subscribed to it
- * @constructor
- */
-PhoneGap.Channel = function (type)
-{
- this.type = type;
- this.handlers = {};
- this.guid = 0;
- this.fired = false;
- this.enabled = true;
-};
-
-/**
- * Subscribes the given function to the channel. Any time that
- * Channel.fire is called so too will the function.
- * Optionally specify an execution context for the function
- * and a guid that can be used to stop subscribing to the channel.
- * Returns the guid.
- */
-PhoneGap.Channel.prototype.subscribe = function(f, c, g) {
- // need a function to call
- if (f === null) { return; }
-
- var func = f;
- if (typeof c === "object" && typeof f === "function") { func = PhoneGap.close(c, f); }
-
- g = g || func.observer_guid || f.observer_guid || this.guid++;
- func.observer_guid = g;
- f.observer_guid = g;
- this.handlers[g] = func;
- return g;
-};
-
-/**
- * Like subscribe but the function is only called once and then it
- * auto-unsubscribes itself.
- */
-PhoneGap.Channel.prototype.subscribeOnce = function(f, c) {
- var g = null;
- var _this = this;
- var m = function() {
- f.apply(c || null, arguments);
- _this.unsubscribe(g);
- };
- if (this.fired) {
- if (typeof c === "object" && typeof f === "function") { f = PhoneGap.close(c, f); }
- f.apply(this, this.fireArgs);
- } else {
- g = this.subscribe(m);
- }
- return g;
-};
-
-/**
- * Unsubscribes the function with the given guid from the channel.
- */
-PhoneGap.Channel.prototype.unsubscribe = function(g) {
- if (typeof g === "function") { g = g.observer_guid; }
- this.handlers[g] = null;
- delete this.handlers[g];
-};
-
-/**
- * Calls all functions subscribed to this channel.
- */
-PhoneGap.Channel.prototype.fire = function(e) {
- if (this.enabled) {
- var fail = false;
- var item, handler, rv;
- for (item in this.handlers) {
- if (this.handlers.hasOwnProperty(item)) {
- handler = this.handlers[item];
- if (typeof handler === "function") {
- rv = (handler.apply(this, arguments) === false);
- fail = fail || rv;
- }
- }
- }
- this.fired = true;
- this.fireArgs = arguments;
- return !fail;
- }
- return true;
-};
-
-/**
- * Calls the provided function only after all of the channels specified
- * have been fired.
- */
-PhoneGap.Channel.join = function(h, c) {
- var i = c.length;
- var f = function() {
- if (!(--i)) {
- h();
- }
- };
- var len = i;
- var j;
- for (j=0; j<len; j++) {
- if (!c[j].fired) {
- c[j].subscribeOnce(f);
- }
- else {
- i--;
- }
- }
- if (!i) {
- h();
- }
-};
-
-/**
- * Add an initialization function to a queue that ensures it will run and initialize
- * application constructors only once PhoneGap has been initialized.
- * @param {Function} func The function callback you want run once PhoneGap is initialized
- */
-PhoneGap.addConstructor = function(func) {
- PhoneGap.onPhoneGapInit.subscribeOnce(function() {
- try {
- func();
- } catch(e) {
- console.log("Failed to run constructor: " + e);
- }
- });
-};
-
-/**
- * Plugins object
- */
-if (!window.plugins) {
- window.plugins = {};
-}
-
-/**
- * Adds a plugin object to window.plugins.
- * The plugin is accessed using window.plugins.<name>
- *
- * @param name The plugin name
- * @param obj The plugin object
- */
-PhoneGap.addPlugin = function(name, obj) {
- if (!window.plugins[name]) {
- window.plugins[name] = obj;
- }
- else {
- console.log("Error: Plugin "+name+" already exists.");
- }
-};
-
-/**
- * onDOMContentLoaded channel is fired when the DOM content
- * of the page has been parsed.
- */
-PhoneGap.onDOMContentLoaded = new PhoneGap.Channel('onDOMContentLoaded');
-
-/**
- * onNativeReady channel is fired when the PhoneGap native code
- * has been initialized.
- */
-PhoneGap.onNativeReady = new PhoneGap.Channel('onNativeReady');
-
-/**
- * onPhoneGapInit channel is fired when the web page is fully loaded and
- * PhoneGap native code has been initialized.
- */
-PhoneGap.onPhoneGapInit = new PhoneGap.Channel('onPhoneGapInit');
-
-/**
- * onPhoneGapReady channel is fired when the JS PhoneGap objects have been created.
- */
-PhoneGap.onPhoneGapReady = new PhoneGap.Channel('onPhoneGapReady');
-
-/**
- * onPhoneGapInfoReady channel is fired when the PhoneGap device properties
- * has been set.
- */
-PhoneGap.onPhoneGapInfoReady = new PhoneGap.Channel('onPhoneGapInfoReady');
-
-/**
- * onPhoneGapConnectionReady channel is fired when the PhoneGap connection properties
- * has been set.
- */
-PhoneGap.onPhoneGapConnectionReady = new PhoneGap.Channel('onPhoneGapConnectionReady');
-
-/**
- * onDestroy channel is fired when the PhoneGap native code
- * is destroyed. It is used internally.
- * Window.onunload should be used by the user.
- */
-PhoneGap.onDestroy = new PhoneGap.Channel('onDestroy');
-PhoneGap.onDestroy.subscribeOnce(function() {
- PhoneGap.shuttingDown = true;
-});
-PhoneGap.shuttingDown = false;
-
-// _nativeReady is global variable that the native side can set
-// to signify that the native code is ready. It is a global since
-// it may be called before any PhoneGap JS is ready.
-if (typeof _nativeReady !== 'undefined') { PhoneGap.onNativeReady.fire(); }
-
-/**
- * onDeviceReady is fired only after all PhoneGap objects are created and
- * the device properties are set.
- */
-PhoneGap.onDeviceReady = new PhoneGap.Channel('onDeviceReady');
-
-
-// Array of channels that must fire before "deviceready" is fired
-PhoneGap.deviceReadyChannelsArray = [ PhoneGap.onPhoneGapReady, PhoneGap.onPhoneGapInfoReady, PhoneGap.onPhoneGapConnectionReady];
-
-// Hashtable of user defined channels that must also fire before "deviceready" is fired
-PhoneGap.deviceReadyChannelsMap = {};
-
-/**
- * Indicate that a feature needs to be initialized before it is ready to be used.
- * This holds up PhoneGap's "deviceready" event until the feature has been initialized
- * and PhoneGap.initComplete(feature) is called.
- *
- * @param feature {String} The unique feature name
- */
-PhoneGap.waitForInitialization = function(feature) {
- if (feature) {
- var channel = new PhoneGap.Channel(feature);
- PhoneGap.deviceReadyChannelsMap[feature] = channel;
- PhoneGap.deviceReadyChannelsArray.push(channel);
- }
-};
-
-/**
- * Indicate that initialization code has completed and the feature is ready to be used.
- *
- * @param feature {String} The unique feature name
- */
-PhoneGap.initializationComplete = function(feature) {
- var channel = PhoneGap.deviceReadyChannelsMap[feature];
- if (channel) {
- channel.fire();
- }
-};
-
-/**
- * Create all PhoneGap objects once page has fully loaded and native side is ready.
- */
-PhoneGap.Channel.join(function() {
-
- // Start listening for XHR callbacks
- setTimeout(function() {
- if (PhoneGap.UsePolling) {
- PhoneGap.JSCallbackPolling();
- }
- else {
- var polling = prompt("usePolling", "gap_callbackServer:");
- PhoneGap.UsePolling = polling;
- if (polling == "true") {
- PhoneGap.UsePolling = true;
- PhoneGap.JSCallbackPolling();
- }
- else {
- PhoneGap.UsePolling = false;
- PhoneGap.JSCallback();
- }
- }
- }, 1);
-
- // Run PhoneGap constructors
- PhoneGap.onPhoneGapInit.fire();
-
- // Fire event to notify that all objects are created
- PhoneGap.onPhoneGapReady.fire();
-
- // Fire onDeviceReady event once all constructors have run and PhoneGap info has been
- // received from native side, and any user defined initialization channels.
- PhoneGap.Channel.join(function() {
- // Let native code know we are inited on JS side
- prompt("", "gap_init:");
-
- PhoneGap.onDeviceReady.fire();
- }, PhoneGap.deviceReadyChannelsArray);
-
-}, [ PhoneGap.onDOMContentLoaded, PhoneGap.onNativeReady ]);
-
-// Listen for DOMContentLoaded and notify our channel subscribers
-document.addEventListener('DOMContentLoaded', function() {
- PhoneGap.onDOMContentLoaded.fire();
-}, false);
-
-// Intercept calls to document.addEventListener and watch for deviceready
-PhoneGap.m_document_addEventListener = document.addEventListener;
-
-// Intercept calls to window.addEventListener
-PhoneGap.m_window_addEventListener = window.addEventListener;
-
-/**
- * Add a custom window event handler.
- *
- * @param {String} event The event name that callback handles
- * @param {Function} callback The event handler
- */
-PhoneGap.addWindowEventHandler = function(event, callback) {
- PhoneGap.windowEventHandler[event] = callback;
-};
-
-/**
- * Add a custom document event handler.
- *
- * @param {String} event The event name that callback handles
- * @param {Function} callback The event handler
- */
-PhoneGap.addDocumentEventHandler = function(event, callback) {
- PhoneGap.documentEventHandler[event] = callback;
-};
-
-/**
- * Intercept adding document event listeners and handle our own
- *
- * @param {Object} evt
- * @param {Function} handler
- * @param capture
- */
-document.addEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
- if (e === 'deviceready') {
- PhoneGap.onDeviceReady.subscribeOnce(handler);
- }
- else {
- // If subscribing to Android backbutton
- if (e === 'backbutton') {
- PhoneGap.exec(null, null, "App", "overrideBackbutton", [true]);
- }
-
- // If subscribing to an event that is handled by a plugin
- else if (typeof PhoneGap.documentEventHandler[e] !== "undefined") {
- if (PhoneGap.documentEventHandler[e](e, handler, true)) {
- return; // Stop default behavior
- }
- }
-
- PhoneGap.m_document_addEventListener.call(document, evt, handler, capture);
- }
-};
-
-/**
- * Intercept adding window event listeners and handle our own
- *
- * @param {Object} evt
- * @param {Function} handler
- * @param capture
- */
-window.addEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
-
- // If subscribing to an event that is handled by a plugin
- if (typeof PhoneGap.windowEventHandler[e] !== "undefined") {
- if (PhoneGap.windowEventHandler[e](e, handler, true)) {
- return; // Stop default behavior
- }
- }
-
- PhoneGap.m_window_addEventListener.call(window, evt, handler, capture);
-};
-
-// Intercept calls to document.removeEventListener and watch for events that
-// are generated by PhoneGap native code
-PhoneGap.m_document_removeEventListener = document.removeEventListener;
-
-// Intercept calls to window.removeEventListener
-PhoneGap.m_window_removeEventListener = window.removeEventListener;
-
-/**
- * Intercept removing document event listeners and handle our own
- *
- * @param {Object} evt
- * @param {Function} handler
- * @param capture
- */
-document.removeEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
-
- // If unsubscribing to Android backbutton
- if (e === 'backbutton') {
- PhoneGap.exec(null, null, "App", "overrideBackbutton", [false]);
- }
-
- // If unsubcribing from an event that is handled by a plugin
- if (typeof PhoneGap.documentEventHandler[e] !== "undefined") {
- if (PhoneGap.documentEventHandler[e](e, handler, false)) {
- return; // Stop default behavior
- }
- }
-
- PhoneGap.m_document_removeEventListener.call(document, evt, handler, capture);
-};
-
-/**
- * Intercept removing window event listeners and handle our own
- *
- * @param {Object} evt
- * @param {Function} handler
- * @param capture
- */
-window.removeEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
-
- // If unsubcribing from an event that is handled by a plugin
- if (typeof PhoneGap.windowEventHandler[e] !== "undefined") {
- if (PhoneGap.windowEventHandler[e](e, handler, false)) {
- return; // Stop default behavior
- }
- }
-
- PhoneGap.m_window_removeEventListener.call(window, evt, handler, capture);
-};
-
-/**
- * Method to fire document event
- *
- * @param {String} type The event type to fire
- * @param {Object} data Data to send with event
- */
-PhoneGap.fireDocumentEvent = function(type, data) {
- var e = document.createEvent('Events');
- e.initEvent(type);
- if (data) {
- for (var i in data) {
- e[i] = data[i];
- }
- }
- document.dispatchEvent(e);
-};
-
-/**
- * Method to fire window event
- *
- * @param {String} type The event type to fire
- * @param {Object} data Data to send with event
- */
-PhoneGap.fireWindowEvent = function(type, data) {
- var e = document.createEvent('Events');
- e.initEvent(type);
- if (data) {
- for (var i in data) {
- e[i] = data[i];
- }
- }
- window.dispatchEvent(e);
-};
-
-/**
- * Does a deep clone of the object.
- *
- * @param obj
- * @return {Object}
- */
-PhoneGap.clone = function(obj) {
- var i, retVal;
- if(!obj) {
- return obj;
- }
-
- if(obj instanceof Array){
- retVal = [];
- for(i = 0; i < obj.length; ++i){
- retVal.push(PhoneGap.clone(obj[i]));
- }
- return retVal;
- }
-
- if (typeof obj === "function") {
- return obj;
- }
-
- if(!(obj instanceof Object)){
- return obj;
- }
-
- if (obj instanceof Date) {
- return obj;
- }
-
- retVal = {};
- for(i in obj){
- if(!(i in retVal) || retVal[i] !== obj[i]) {
- retVal[i] = PhoneGap.clone(obj[i]);
- }
- }
- return retVal;
-};
-
-PhoneGap.callbackId = 0;
-PhoneGap.callbacks = {};
-PhoneGap.callbackStatus = {
- NO_RESULT: 0,
- OK: 1,
- CLASS_NOT_FOUND_EXCEPTION: 2,
- ILLEGAL_ACCESS_EXCEPTION: 3,
- INSTANTIATION_EXCEPTION: 4,
- MALFORMED_URL_EXCEPTION: 5,
- IO_EXCEPTION: 6,
- INVALID_ACTION: 7,
- JSON_EXCEPTION: 8,
- ERROR: 9
- };
-
-
-/**
- * Execute a PhoneGap command. It is up to the native side whether this action is synch or async.
- * The native side can return:
- * Synchronous: PluginResult object as a JSON string
- * Asynchrounous: Empty string ""
- * If async, the native side will PhoneGap.callbackSuccess or PhoneGap.callbackError,
- * depending upon the result of the action.
- *
- * @param {Function} success The success callback
- * @param {Function} fail The fail callback
- * @param {String} service The name of the service to use
- * @param {String} action Action to be run in PhoneGap
- * @param {Array.<String>} [args] Zero or more arguments to pass to the method
- */
-PhoneGap.exec = function(success, fail, service, action, args) {
- try {
- var callbackId = service + PhoneGap.callbackId++;
- if (success || fail) {
- PhoneGap.callbacks[callbackId] = {success:success, fail:fail};
- }
-
- var r = prompt(JSON.stringify(args), "gap:"+JSON.stringify([service, action, callbackId, true]));
-
- // If a result was returned
- if (r.length > 0) {
- eval("var v="+r+";");
-
- // If status is OK, then return value back to caller
- if (v.status === PhoneGap.callbackStatus.OK) {
-
- // If there is a success callback, then call it now with
- // returned value
- if (success) {
- try {
- success(v.message);
- } catch (e) {
- console.log("Error in success callback: " + callbackId + " = " + e);
- }
-
- // Clear callback if not expecting any more results
- if (!v.keepCallback) {
- delete PhoneGap.callbacks[callbackId];
- }
- }
- return v.message;
- }
-
- // If no result
- else if (v.status === PhoneGap.callbackStatus.NO_RESULT) {
-
- // Clear callback if not expecting any more results
- if (!v.keepCallback) {
- delete PhoneGap.callbacks[callbackId];
- }
- }
-
- // If error, then display error
- else {
- console.log("Error: Status="+v.status+" Message="+v.message);
-
- // If there is a fail callback, then call it now with returned value
- if (fail) {
- try {
- fail(v.message);
- }
- catch (e1) {
- console.log("Error in error callback: "+callbackId+" = "+e1);
- }
-
- // Clear callback if not expecting any more results
- if (!v.keepCallback) {
- delete PhoneGap.callbacks[callbackId];
- }
- }
- return null;
- }
- }
- } catch (e2) {
- console.log("Error: "+e2);
- }
-};
-
-/**
- * Called by native code when returning successful result from an action.
- *
- * @param callbackId
- * @param args
- */
-PhoneGap.callbackSuccess = function(callbackId, args) {
- if (PhoneGap.callbacks[callbackId]) {
-
- // If result is to be sent to callback
- if (args.status === PhoneGap.callbackStatus.OK) {
- try {
- if (PhoneGap.callbacks[callbackId].success) {
- PhoneGap.callbacks[callbackId].success(args.message);
- }
- }
- catch (e) {
- console.log("Error in success callback: "+callbackId+" = "+e);
- }
- }
-
- // Clear callback if not expecting any more results
- if (!args.keepCallback) {
- delete PhoneGap.callbacks[callbackId];
- }
- }
-};
-
-/**
- * Called by native code when returning error result from an action.
- *
- * @param callbackId
- * @param args
- */
-PhoneGap.callbackError = function(callbackId, args) {
- if (PhoneGap.callbacks[callbackId]) {
- try {
- if (PhoneGap.callbacks[callbackId].fail) {
- PhoneGap.callbacks[callbackId].fail(args.message);
- }
- }
- catch (e) {
- console.log("Error in error callback: "+callbackId+" = "+e);
- }
-
- // Clear callback if not expecting any more results
- if (!args.keepCallback) {
- delete PhoneGap.callbacks[callbackId];
- }
- }
-};
-
-PhoneGap.JSCallbackPort = null;
-PhoneGap.JSCallbackToken = null;
-
-/**
- * This is only for Android.
- *
- * Internal function that uses XHR to call into PhoneGap Java code and retrieve
- * any JavaScript code that needs to be run. This is used for callbacks from
- * Java to JavaScript.
- */
-PhoneGap.JSCallback = function() {
-
- // Exit if shutting down app
- if (PhoneGap.shuttingDown) {
- return;
- }
-
- // If polling flag was changed, start using polling from now on
- if (PhoneGap.UsePolling) {
- PhoneGap.JSCallbackPolling();
- return;
- }
-
- var xmlhttp = new XMLHttpRequest();
-
- // Callback function when XMLHttpRequest is ready
- xmlhttp.onreadystatechange=function(){
- if(xmlhttp.readyState === 4){
-
- // Exit if shutting down app
- if (PhoneGap.shuttingDown) {
- return;
- }
-
- // If callback has JavaScript statement to execute
- if (xmlhttp.status === 200) {
-
- // Need to url decode the response
- var msg = decodeURIComponent(xmlhttp.responseText);
- setTimeout(function() {
- try {
- var t = eval(msg);
- }
- catch (e) {
- // If we're getting an error here, seeing the message will help in debugging
- console.log("JSCallback: Message from Server: " + msg);
- console.log("JSCallback Error: "+e);
- }
- }, 1);
- setTimeout(PhoneGap.JSCallback, 1);
- }
-
- // If callback ping (used to keep XHR request from timing out)
- else if (xmlhttp.status === 404) {
- setTimeout(PhoneGap.JSCallback, 10);
- }
-
- // If security error
- else if (xmlhttp.status === 403) {
- console.log("JSCallback Error: Invalid token. Stopping callbacks.");
- }
-
- // If server is stopping
- else if (xmlhttp.status === 503) {
- console.log("JSCallback Server Closed: Stopping callbacks.");
- }
-
- // If request wasn't GET
- else if (xmlhttp.status === 400) {
- console.log("JSCallback Error: Bad request. Stopping callbacks.");
- }
-
- // If error, revert to polling
- else {
- console.log("JSCallback Error: Request failed.");
- PhoneGap.UsePolling = true;
- PhoneGap.JSCallbackPolling();
- }
- }
- };
-
- if (PhoneGap.JSCallbackPort === null) {
- PhoneGap.JSCallbackPort = prompt("getPort", "gap_callbackServer:");
- }
- if (PhoneGap.JSCallbackToken === null) {
- PhoneGap.JSCallbackToken = prompt("getToken", "gap_callbackServer:");
- }
- xmlhttp.open("GET", "http://127.0.0.1:"+PhoneGap.JSCallbackPort+"/"+PhoneGap.JSCallbackToken , true);
- xmlhttp.send();
-};
-
-/**
- * The polling period to use with JSCallbackPolling.
- * This can be changed by the application. The default is 50ms.
- */
-PhoneGap.JSCallbackPollingPeriod = 50;
-
-/**
- * Flag that can be set by the user to force polling to be used or force XHR to be used.
- */
-PhoneGap.UsePolling = false; // T=use polling, F=use XHR
-
-/**
- * This is only for Android.
- *
- * Internal function that uses polling to call into PhoneGap Java code and retrieve
- * any JavaScript code that needs to be run. This is used for callbacks from
- * Java to JavaScript.
- */
-PhoneGap.JSCallbackPolling = function() {
-
- // Exit if shutting down app
- if (PhoneGap.shuttingDown) {
- return;
- }
-
- // If polling flag was changed, stop using polling from now on
- if (!PhoneGap.UsePolling) {
- PhoneGap.JSCallback();
- return;
- }
-
- var msg = prompt("", "gap_poll:");
- if (msg) {
- setTimeout(function() {
- try {
- var t = eval(""+msg);
- }
- catch (e) {
- console.log("JSCallbackPolling: Message from Server: " + msg);
- console.log("JSCallbackPolling Error: "+e);
- }
- }, 1);
- setTimeout(PhoneGap.JSCallbackPolling, 1);
- }
- else {
- setTimeout(PhoneGap.JSCallbackPolling, PhoneGap.JSCallbackPollingPeriod);
- }
-};
-
-/**
- * Create a UUID
- *
- * @return {String}
- */
-PhoneGap.createUUID = function() {
- return PhoneGap.UUIDcreatePart(4) + '-' +
- PhoneGap.UUIDcreatePart(2) + '-' +
- PhoneGap.UUIDcreatePart(2) + '-' +
- PhoneGap.UUIDcreatePart(2) + '-' +
- PhoneGap.UUIDcreatePart(6);
-};
-
-PhoneGap.UUIDcreatePart = function(length) {
- var uuidpart = "";
- var i, uuidchar;
- for (i=0; i<length; i++) {
- uuidchar = parseInt((Math.random() * 256),0).toString(16);
- if (uuidchar.length === 1) {
- uuidchar = "0" + uuidchar;
- }
- uuidpart += uuidchar;
- }
- return uuidpart;
-};
-
-PhoneGap.close = function(context, func, params) {
- if (typeof params === 'undefined') {
- return function() {
- return func.apply(context, arguments);
- };
- } else {
- return function() {
- return func.apply(context, params);
- };
- }
-};
-
-/**
- * Load a JavaScript file after page has loaded.
- *
- * @param {String} jsfile The url of the JavaScript file to load.
- * @param {Function} successCallback The callback to call when the file has been loaded.
- */
-PhoneGap.includeJavascript = function(jsfile, successCallback) {
- var id = document.getElementsByTagName("head")[0];
- var el = document.createElement('script');
- el.type = 'text/javascript';
- if (typeof successCallback === 'function') {
- el.onload = successCallback;
- }
- el.src = jsfile;
- id.appendChild(el);
-};
-
-}
-/*
- * 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.
- */
-
-if (!PhoneGap.hasResource("device")) {
-PhoneGap.addResource("device");
-
-/**
- * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
- * phone, etc.
- * @constructor
- */
-var Device = function() {
- this.available = PhoneGap.available;
- this.platform = null;
- this.version = null;
- this.name = null;
- this.uuid = null;
- this.phonegap = null;
-
- var me = this;
- this.getInfo(
- function(info) {
- me.available = true;
- me.platform = info.platform;
- me.version = info.version;
- me.name = info.name;
- me.uuid = info.uuid;
- me.phonegap = info.phonegap;
- PhoneGap.onPhoneGapInfoReady.fire();
- },
- function(e) {
- me.available = false;
- console.log("Error initializing PhoneGap: " + e);
- alert("Error initializing PhoneGap: "+e);
- });
-};
-
-/**
- * Get device info
- *
- * @param {Function} successCallback The function to call when the heading data is available
- * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)
- */
-Device.prototype.getInfo = function(successCallback, errorCallback) {
-
- // successCallback required
- if (typeof successCallback !== "function") {
- console.log("Device Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback !== "function")) {
- console.log("Device Error: errorCallback is not a function");
- return;
- }
-
- // Get info
- PhoneGap.exec(successCallback, errorCallback, "Device", "getDeviceInfo", []);
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.device === "undefined") {
- navigator.device = window.device = new Device();
- }
-});
-}
-/*
- * 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.
- */
-
-if (!PhoneGap.hasResource("accelerometer")) {
-PhoneGap.addResource("accelerometer");
-
-/** @constructor */
-var Acceleration = function(x, y, z) {
- this.x = x;
- this.y = y;
- this.z = z;
- this.timestamp = new Date().getTime();
-};
-
-/**
- * This class provides access to device accelerometer data.
- * @constructor
- */
-var Accelerometer = function() {
-
- /**
- * The last known acceleration. type=Acceleration()
- */
- this.lastAcceleration = null;
-
- /**
- * List of accelerometer watch timers
- */
- this.timers = {};
-};
-
-Accelerometer.ERROR_MSG = ["Not running", "Starting", "", "Failed to start"];
-
-/**
- * Asynchronously aquires the current acceleration.
- *
- * @param {Function} successCallback The function to call when the acceleration data is available
- * @param {Function} errorCallback The function to call when there is an error getting the acceleration data. (OPTIONAL)
- * @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
- */
-Accelerometer.prototype.getCurrentAcceleration = function(successCallback, errorCallback, options) {
-
- // successCallback required
- if (typeof successCallback !== "function") {
- console.log("Accelerometer Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback !== "function")) {
- console.log("Accelerometer Error: errorCallback is not a function");
- return;
- }
-
- // Get acceleration
- PhoneGap.exec(successCallback, errorCallback, "Accelerometer", "getAcceleration", []);
-};
-
-/**
- * Asynchronously aquires the acceleration repeatedly at a given interval.
- *
- * @param {Function} successCallback The function to call each time the acceleration data is available
- * @param {Function} errorCallback The function to call when there is an error getting the acceleration data. (OPTIONAL)
- * @param {AccelerationOptions} options The options for getting the accelerometer data such as timeout. (OPTIONAL)
- * @return String The watch id that must be passed to #clearWatch to stop watching.
- */
-Accelerometer.prototype.watchAcceleration = function(successCallback, errorCallback, options) {
-
- // Default interval (10 sec)
- var frequency = (options !== undefined)? options.frequency : 10000;
-
- // successCallback required
- if (typeof successCallback !== "function") {
- console.log("Accelerometer Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback !== "function")) {
- console.log("Accelerometer Error: errorCallback is not a function");
- return;
- }
-
- // Make sure accelerometer timeout > frequency + 10 sec
- PhoneGap.exec(
- function(timeout) {
- if (timeout < (frequency + 10000)) {
- PhoneGap.exec(null, null, "Accelerometer", "setTimeout", [frequency + 10000]);
- }
- },
- function(e) { }, "Accelerometer", "getTimeout", []);
-
- // Start watch timer
- var id = PhoneGap.createUUID();
- navigator.accelerometer.timers[id] = setInterval(function() {
- PhoneGap.exec(successCallback, errorCallback, "Accelerometer", "getAcceleration", []);
- }, (frequency ? frequency : 1));
-
- return id;
-};
-
-/**
- * Clears the specified accelerometer watch.
- *
- * @param {String} id The id of the watch returned from #watchAcceleration.
- */
-Accelerometer.prototype.clearWatch = function(id) {
-
- // Stop javascript timer & remove from timer list
- if (id && navigator.accelerometer.timers[id] !== undefined) {
- clearInterval(navigator.accelerometer.timers[id]);
- delete navigator.accelerometer.timers[id];
- }
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.accelerometer === "undefined") {
- navigator.accelerometer = new Accelerometer();
- }
-});
-}
-/*
- * 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.
- */
-
-if (!PhoneGap.hasResource("app")) {
-PhoneGap.addResource("app");
-(function() {
-
-/**
- * Constructor
- * @constructor
- */
-var App = function() {};
-
-/**
- * Clear the resource cache.
- */
-App.prototype.clearCache = function() {
- PhoneGap.exec(null, null, "App", "clearCache", []);
-};
-
-/**
- * Load the url into the webview or into new browser instance.
- *
- * @param url The URL to load
- * @param props Properties that can be passed in to the activity:
- * wait: int => wait msec before loading URL
- * loadingDialog: "Title,Message" => display a native loading dialog
- * loadUrlTimeoutValue: int => time in msec to wait before triggering a timeout error
- * clearHistory: boolean => clear webview history (default=false)
- * openExternal: boolean => open in a new browser (default=false)
- *
- * Example:
- * navigator.app.loadUrl("http://server/myapp/index.html", {wait:2000, loadingDialog:"Wait,Loading App", loadUrlTimeoutValue: 60000});
- */
-App.prototype.loadUrl = function(url, props) {
- PhoneGap.exec(null, null, "App", "loadUrl", [url, props]);
-};
-
-/**
- * Cancel loadUrl that is waiting to be loaded.
- */
-App.prototype.cancelLoadUrl = function() {
- PhoneGap.exec(null, null, "App", "cancelLoadUrl", []);
-};
-
-/**
- * Clear web history in this web view.
- * Instead of BACK button loading the previous web page, it will exit the app.
- */
-App.prototype.clearHistory = function() {
- PhoneGap.exec(null, null, "App", "clearHistory", []);
-};
-
-/**
- * Go to previous page displayed.
- * This is the same as pressing the backbutton on Android device.
- */
-App.prototype.backHistory = function() {
- PhoneGap.exec(null, null, "App", "backHistory", []);
-};
-
-/**
- * Exit and terminate the application.
- */
-App.prototype.exitApp = function() {
- return PhoneGap.exec(null, null, "App", "exitApp", []);
-};
-
-PhoneGap.addConstructor(function() {
- navigator.app = new App();
-});
-}());
-}
-/*
- * 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.
- */
-
-if (!PhoneGap.hasResource("battery")) {
-PhoneGap.addResource("battery");
-
-/**
- * This class contains information about the current battery status.
- * @constructor
- */
-var Battery = function() {
- this._level = null;
- this._isPlugged = null;
- this._batteryListener = [];
- this._lowListener = [];
- this._criticalListener = [];
-};
-
-/**
- * Registers as an event producer for battery events.
- *
- * @param {Object} eventType
- * @param {Object} handler
- * @param {Object} add
- */
-Battery.prototype.eventHandler = function(eventType, handler, add) {
- var me = navigator.battery;
- if (add) {
- // If there are no current registered event listeners start the battery listener on native side.
- if (me._batteryListener.length === 0 && me._lowListener.length === 0 && me._criticalListener.length === 0) {
- PhoneGap.exec(me._status, me._error, "Battery", "start", []);
- }
-
- // Register the event listener in the proper array
- if (eventType === "batterystatus") {
- if (me._batteryListener.indexOf(handler) === -1) {
- me._batteryListener.push(handler);
- }
- } else if (eventType === "batterylow") {
- if (me._lowListener.indexOf(handler) === -1) {
- me._lowListener.push(handler);
- }
- } else if (eventType === "batterycritical") {
- if (me._criticalListener.indexOf(handler) === -1) {
- me._criticalListener.push(handler);
- }
- }
- } else {
- var pos = -1;
- // Remove the event listener from the proper array
- if (eventType === "batterystatus") {
- pos = me._batteryListener.indexOf(handler);
- if (pos > -1) {
- me._batteryListener.splice(pos, 1);
- }
- } else if (eventType === "batterylow") {
- pos = me._lowListener.indexOf(handler);
- if (pos > -1) {
- me._lowListener.splice(pos, 1);
- }
- } else if (eventType === "batterycritical") {
- pos = me._criticalListener.indexOf(handler);
- if (pos > -1) {
- me._criticalListener.splice(pos, 1);
- }
- }
-
- // If there are no more registered event listeners stop the battery listener on native side.
- if (me._batteryListener.length === 0 && me._lowListener.length === 0 && me._criticalListener.length === 0) {
- PhoneGap.exec(null, null, "Battery", "stop", []);
- }
- }
-};
-
-/**
- * Callback for battery status
- *
- * @param {Object} info keys: level, isPlugged
- */
-Battery.prototype._status = function(info) {
- if (info) {
- var me = this;
- var level = info.level;
- if (me._level !== level || me._isPlugged !== info.isPlugged) {
- // Fire batterystatus event
- PhoneGap.fireWindowEvent("batterystatus", info);
-
- // Fire low battery event
- if (level === 20 || level === 5) {
- if (level === 20) {
- PhoneGap.fireWindowEvent("batterylow", info);
- }
- else {
- PhoneGap.fireWindowEvent("batterycritical", info);
- }
- }
- }
- me._level = level;
- me._isPlugged = info.isPlugged;
- }
-};
-
-/**
- * Error callback for battery start
- */
-Battery.prototype._error = function(e) {
- console.log("Error initializing Battery: " + e);
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.battery === "undefined") {
- navigator.battery = new Battery();
- PhoneGap.addWindowEventHandler("batterystatus", navigator.battery.eventHandler);
- PhoneGap.addWindowEventHandler("batterylow", navigator.battery.eventHandler);
- PhoneGap.addWindowEventHandler("batterycritical", navigator.battery.eventHandler);
- }
-});
-}
-/*
- * 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.
- */
-
-if (!PhoneGap.hasResource("camera")) {
-PhoneGap.addResource("camera");
-
-/**
- * This class provides access to the device camera.
- *
- * @constructor
- */
-var Camera = function() {
- this.successCallback = null;
- this.errorCallback = null;
- this.options = null;
-};
-
-/**
- * Format of image that returned from getPicture.
- *
- * Example: navigator.camera.getPicture(success, fail,
- * { quality: 80,
- * destinationType: Camera.DestinationType.DATA_URL,
- * sourceType: Camera.PictureSourceType.PHOTOLIBRARY})
- */
-Camera.DestinationType = {
- DATA_URL: 0, // Return base64 encoded string
- FILE_URI: 1 // Return file uri (content://media/external/images/media/2 for Android)
-};
-Camera.prototype.DestinationType = Camera.DestinationType;
-
-/**
- * Encoding of image returned from getPicture.
- *
- * Example: navigator.camera.getPicture(success, fail,
- * { quality: 80,
- * destinationType: Camera.DestinationType.DATA_URL,
- * sourceType: Camera.PictureSourceType.CAMERA,
- * encodingType: Camera.EncodingType.PNG})
-*/
-Camera.EncodingType = {
- JPEG: 0, // Return JPEG encoded image
- PNG: 1 // Return PNG encoded image
-};
-Camera.prototype.EncodingType = Camera.EncodingType;
-
-/**
- * Type of pictures to select from. Only applicable when
- * PictureSourceType is PHOTOLIBRARY or SAVEDPHOTOALBUM
- *
- * Example: navigator.camera.getPicture(success, fail,
- * { quality: 80,
- * destinationType: Camera.DestinationType.DATA_URL,
- * sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
- * mediaType: Camera.MediaType.PICTURE})
- */
-Camera.MediaType = {
- PICTURE: 0, // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
- VIDEO: 1, // allow selection of video only, ONLY RETURNS URL
- ALLMEDIA : 2 // allow selection from all media types
-};
-Camera.prototype.MediaType = Camera.MediaType;
-
-
-/**
- * Source to getPicture from.
- *
- * Example: navigator.camera.getPicture(success, fail,
- * { quality: 80,
- * destinationType: Camera.DestinationType.DATA_URL,
- * sourceType: Camera.PictureSourceType.PHOTOLIBRARY})
- */
-Camera.PictureSourceType = {
- PHOTOLIBRARY : 0, // Choose image from picture library (same as SAVEDPHOTOALBUM for Android)
- CAMERA : 1, // Take picture from camera
- SAVEDPHOTOALBUM : 2 // Choose image from picture library (same as PHOTOLIBRARY for Android)
-};
-Camera.prototype.PictureSourceType = Camera.PictureSourceType;
-
-/**
- * Gets a picture from source defined by "options.sourceType", and returns the
- * image as defined by the "options.destinationType" option.
-
- * The defaults are sourceType=CAMERA and destinationType=DATA_URL.
- *
- * @param {Function} successCallback
- * @param {Function} errorCallback
- * @param {Object} options
- */
-Camera.prototype.getPicture = function(successCallback, errorCallback, options) {
-
- // successCallback required
- if (typeof successCallback !== "function") {
- console.log("Camera Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback !== "function")) {
- console.log("Camera Error: errorCallback is not a function");
- return;
- }
-
- if (options === null || typeof options === "undefined") {
- options = {};
- }
- if (options.quality === null || typeof options.quality === "undefined") {
- options.quality = 80;
- }
- if (options.maxResolution === null || typeof options.maxResolution === "undefined") {
- options.maxResolution = 0;
- }
- if (options.destinationType === null || typeof options.destinationType === "undefined") {
- options.destinationType = Camera.DestinationType.FILE_URI;
- }
- if (options.sourceType === null || typeof options.sourceType === "undefined") {
- options.sourceType = Camera.PictureSourceType.CAMERA;
- }
- if (options.encodingType === null || typeof options.encodingType === "undefined") {
- options.encodingType = Camera.EncodingType.JPEG;
- }
- if (options.mediaType === null || typeof options.mediaType === "undefined") {
- options.mediaType = Camera.MediaType.PICTURE;
- }
- if (options.targetWidth === null || typeof options.targetWidth === "undefined") {
- options.targetWidth = -1;
- }
- else if (typeof options.targetWidth === "string") {
- var width = new Number(options.targetWidth);
- if (isNaN(width) === false) {
- options.targetWidth = width.valueOf();
- }
- }
- if (options.targetHeight === null || typeof options.targetHeight === "undefined") {
- options.targetHeight = -1;
- }
- else if (typeof options.targetHeight === "string") {
- var height = new Number(options.targetHeight);
- if (isNaN(height) === false) {
- options.targetHeight = height.valueOf();
- }
- }
-
- PhoneGap.exec(successCallback, errorCallback, "Camera", "takePicture", [options]);
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.camera === "undefined") {
- navigator.camera = new Camera();
- }
-});
-}
-/*
- * 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.
- */
-
-if (!PhoneGap.hasResource("capture")) {
-PhoneGap.addResource("capture");
-
-/**
- * Represents a single file.
- *
- * name {DOMString} name of the file, without path information
- * fullPath {DOMString} the full path of the file, including the name
- * type {DOMString} mime type
- * lastModifiedDate {Date} last modified date
- * size {Number} size of the file in bytes
- */
-var MediaFile = function(name, fullPath, type, lastModifiedDate, size){
- this.name = name || null;
- this.fullPath = fullPath || null;
- this.type = type || null;
- this.lastModifiedDate = lastModifiedDate || null;
- this.size = size || 0;
-};
-
-/**
- * Launch device camera application for recording video(s).
- *
- * @param {Function} successCB
- * @param {Function} errorCB
- */
-MediaFile.prototype.getFormatData = function(successCallback, errorCallback){
- PhoneGap.exec(successCallback, errorCallback, "Capture", "getFormatData", [this.fullPath, this.type]);
-};
-
-/**
- * MediaFileData encapsulates format information of a media file.
- *
- * @param {DOMString} codecs
- * @param {long} bitrate
- * @param {long} height
- * @param {long} width
- * @param {float} duration
- */
-var MediaFileData = function(codecs, bitrate, height, width, duration){
- this.codecs = codecs || null;
- this.bitrate = bitrate || 0;
- this.height = height || 0;
- this.width = width || 0;
- this.duration = duration || 0;
-};
-
-/**
- * The CaptureError interface encapsulates all errors in the Capture API.
- */
-var CaptureError = function(){
- this.code = null;
-};
-
-// Capture error codes
-CaptureError.CAPTURE_INTERNAL_ERR = 0;
-CaptureError.CAPTURE_APPLICATION_BUSY = 1;
-CaptureError.CAPTURE_INVALID_ARGUMENT = 2;
-CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
-CaptureError.CAPTURE_NOT_SUPPORTED = 20;
-
-/**
- * The Capture interface exposes an interface to the camera and microphone of the hosting device.
- */
-var Capture = function(){
- this.supportedAudioModes = [];
- this.supportedImageModes = [];
- this.supportedVideoModes = [];
-};
-
-/**
- * Launch audio recorder application for recording audio clip(s).
- *
- * @param {Function} successCB
- * @param {Function} errorCB
- * @param {CaptureAudioOptions} options
- */
-Capture.prototype.captureAudio = function(successCallback, errorCallback, options){
- PhoneGap.exec(successCallback, errorCallback, "Capture", "captureAudio", [options]);
-};
-
-/**
- * Launch camera application for taking image(s).
- *
- * @param {Function} successCB
- * @param {Function} errorCB
- * @param {CaptureImageOptions} options
- */
-Capture.prototype.captureImage = function(successCallback, errorCallback, options){
- PhoneGap.exec(successCallback, errorCallback, "Capture", "captureImage", [options]);
-};
-
-/**
- * Launch camera application for taking image(s).
- *
- * @param {Function} successCB
- * @param {Function} errorCB
- * @param {CaptureImageOptions} options
- */
-Capture.prototype._castMediaFile = function(pluginResult){
- var mediaFiles = [];
- var i;
- for (i = 0; i < pluginResult.message.length; i++) {
- var mediaFile = new MediaFile();
- mediaFile.name = pluginResult.message[i].name;
- mediaFile.fullPath = pluginResult.message[i].fullPath;
- mediaFile.type = pluginResult.message[i].type;
- mediaFile.lastModifiedDate = pluginResult.message[i].lastModifiedDate;
- mediaFile.size = pluginResult.message[i].size;
- mediaFiles.push(mediaFile);
- }
- pluginResult.message = mediaFiles;
- return pluginResult;
-};
-
-/**
- * Launch device camera application for recording video(s).
- *
- * @param {Function} successCB
- * @param {Function} errorCB
- * @param {CaptureVideoOptions} options
- */
-Capture.prototype.captureVideo = function(successCallback, errorCallback, options){
- PhoneGap.exec(successCallback, errorCallback, "Capture", "captureVideo", [options]);
-};
-
-/**
- * Encapsulates a set of parameters that the capture device supports.
- */
-var ConfigurationData = function(){
- // The ASCII-encoded string in lower case representing the media type.
- this.type = null;
- // The height attribute represents height of the image or video in pixels.
- // In the case of a sound clip this attribute has value 0.
- this.height = 0;
- // The width attribute represents width of the image or video in pixels.
- // In the case of a sound clip this attribute has value 0
- this.width = 0;
-};
-
-/**
- * Encapsulates all image capture operation configuration options.
- */
-var CaptureImageOptions = function(){
- // Upper limit of images user can take. Value must be equal or greater than 1.
- this.limit = 1;
- // The selected image mode. Must match with one of the elements in supportedImageModes array.
- this.mode = null;
-};
-
-/**
- * Encapsulates all video capture operation configuration options.
- */
-var CaptureVideoOptions = function(){
- // Upper limit of videos user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single video clip in seconds.
- this.duration = 0;
- // The selected video mode. Must match with one of the elements in supportedVideoModes array.
- this.mode = null;
-};
-
-/**
- * Encapsulates all audio capture operation configuration options.
- */
-var CaptureAudioOptions = function(){
- // Upper limit of sound clips user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single sound clip in seconds.
- this.duration = 0;
- // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
- this.mode = null;
-};
-
-PhoneGap.addConstructor(function(){
- if (typeof navigator.device.capture === "undefined") {
- navigator.device.capture = window.device.capture = new Capture();
- }
-});
-}
-/*
- * 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.
- */
-
-if (!PhoneGap.hasResource("compass")) {
-PhoneGap.addResource("compass");
-
-var CompassError = function(){
- this.code = null;
-};
-
-// Capture error codes
-CompassError.COMPASS_INTERNAL_ERR = 0;
-CompassError.COMPASS_NOT_SUPPORTED = 20;
-
-var CompassHeading = function() {
- this.magneticHeading = null;
- this.trueHeading = null;
- this.headingAccuracy = null;
- this.timestamp = null;
-};
-
-/**
- * This class provides access to device Compass data.
- * @constructor
- */
-var Compass = function() {
- /**
- * The last known Compass position.
- */
- this.lastHeading = null;
-
- /**
- * List of compass watch timers
- */
- this.timers = {};
-};
-
-Compass.ERROR_MSG = ["Not running", "Starting", "", "Failed to start"];
-
-/**
- * Asynchronously aquires the current heading.
- *
- * @param {Function} successCallback The function to call when the heading data is available
- * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)
- * @param {PositionOptions} options The options for getting the heading data such as timeout. (OPTIONAL)
- */
-Compass.prototype.getCurrentHeading = function(successCallback, errorCallback, options) {
-
- // successCallback required
- if (typeof successCallback !== "function") {
- console.log("Compass Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback !== "function")) {
- console.log("Compass Error: errorCallback is not a function");
- return;
- }
-
- // Get heading
- PhoneGap.exec(successCallback, errorCallback, "Compass", "getHeading", []);
-};
-
-/**
- * Asynchronously aquires the heading repeatedly at a given interval.
- *
- * @param {Function} successCallback The function to call each time the heading data is available
- * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)
- * @param {HeadingOptions} options The options for getting the heading data such as timeout and the frequency of the watch. (OPTIONAL)
- * @return String The watch id that must be passed to #clearWatch to stop watching.
- */
-Compass.prototype.watchHeading= function(successCallback, errorCallback, options) {
-
- // Default interval (100 msec)
- var frequency = (options !== undefined) ? options.frequency : 100;
-
- // successCallback required
- if (typeof successCallback !== "function") {
- console.log("Compass Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback !== "function")) {
- console.log("Compass Error: errorCallback is not a function");
- return;
- }
-
- // Make sure compass timeout > frequency + 10 sec
- PhoneGap.exec(
- function(timeout) {
- if (timeout < (frequency + 10000)) {
- PhoneGap.exec(null, null, "Compass", "setTimeout", [frequency + 10000]);
- }
- },
- function(e) { }, "Compass", "getTimeout", []);
-
- // Start watch timer to get headings
- var id = PhoneGap.createUUID();
- navigator.compass.timers[id] = setInterval(
- function() {
- PhoneGap.exec(successCallback, errorCallback, "Compass", "getHeading", []);
- }, (frequency ? frequency : 1));
-
- return id;
-};
-
-
-/**
- * Clears the specified heading watch.
- *
- * @param {String} id The ID of the watch returned from #watchHeading.
- */
-Compass.prototype.clearWatch = function(id) {
-
- // Stop javascript timer & remove from timer list
- if (id && navigator.compass.timers[id]) {
- clearInterval(navigator.compass.timers[id]);
- delete navigator.compass.timers[id];
- }
-};
-
-Compass.prototype._castDate = function(pluginResult) {
- if (pluginResult.message.timestamp) {
- var timestamp = new Date(pluginResult.message.timestamp);
- pluginResult.message.timestamp = timestamp;
- }
- return pluginResult;
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.compass === "undefined") {
- navigator.compass = new Compass();
- }
-});
-}
-/*
- * 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.
- */
-
-if (!PhoneGap.hasResource("contact")) {
-PhoneGap.addResource("contact");
-
-/**
-* Contains information about a single contact.
-* @constructor
-* @param {DOMString} id unique identifier
-* @param {DOMString} displayName
-* @param {ContactName} name
-* @param {DOMString} nickname
-* @param {Array.<ContactField>} phoneNumbers array of phone numbers
-* @param {Array.<ContactField>} emails array of email addresses
-* @param {Array.<ContactAddress>} addresses array of addresses
-* @param {Array.<ContactField>} ims instant messaging user ids
-* @param {Array.<ContactOrganization>} organizations
-* @param {DOMString} birthday contact's birthday
-* @param {DOMString} note user notes about contact
-* @param {Array.<ContactField>} photos
-* @param {Array.<ContactField>} categories
-* @param {Array.<ContactField>} urls contact's web sites
-*/
-var Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,
- ims, organizations, birthday, note, photos, categories, urls) {
- this.id = id || null;
- this.rawId = null;
- this.displayName = displayName || null;
- this.name = name || null; // ContactName
- this.nickname = nickname || null;
- this.phoneNumbers = phoneNumbers || null; // ContactField[]
- this.emails = emails || null; // ContactField[]
- this.addresses = addresses || null; // ContactAddress[]
- this.ims = ims || null; // ContactField[]
- this.organizations = organizations || null; // ContactOrganization[]
- this.birthday = birthday || null;
- this.note = note || null;
- this.photos = photos || null; // ContactField[]
- this.categories = categories || null; // ContactField[]
- this.urls = urls || null; // ContactField[]
-};
-
-/**
- * ContactError.
- * An error code assigned by an implementation when an error has occurreds
- * @constructor
- */
-var ContactError = function() {
- this.code=null;
-};
-
-/**
- * Error codes
- */
-ContactError.UNKNOWN_ERROR = 0;
-ContactError.INVALID_ARGUMENT_ERROR = 1;
-ContactError.TIMEOUT_ERROR = 2;
-ContactError.PENDING_OPERATION_ERROR = 3;
-ContactError.IO_ERROR = 4;
-ContactError.NOT_SUPPORTED_ERROR = 5;
-ContactError.PERMISSION_DENIED_ERROR = 20;
-
-/**
-* Removes contact from device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.remove = function(successCB, errorCB) {
- if (this.id === null) {
- var errorObj = new ContactError();
- errorObj.code = ContactError.UNKNOWN_ERROR;
- errorCB(errorObj);
- }
- else {
- PhoneGap.exec(successCB, errorCB, "Contacts", "remove", [this.id]);
- }
-};
-
-/**
-* Creates a deep copy of this Contact.
-* With the contact ID set to null.
-* @return copy of this Contact
-*/
-Contact.prototype.clone = function() {
- var clonedContact = PhoneGap.clone(this);
- var i;
- clonedContact.id = null;
- clonedContact.rawId = null;
- // Loop through and clear out any id's in phones, emails, etc.
- if (clonedContact.phoneNumbers) {
- for (i = 0; i < clonedContact.phoneNumbers.length; i++) {
- clonedContact.phoneNumbers[i].id = null;
- }
- }
- if (clonedContact.emails) {
- for (i = 0; i < clonedContact.emails.length; i++) {
- clonedContact.emails[i].id = null;
- }
- }
- if (clonedContact.addresses) {
- for (i = 0; i < clonedContact.addresses.length; i++) {
- clonedContact.addresses[i].id = null;
- }
- }
- if (clonedContact.ims) {
- for (i = 0; i < clonedContact.ims.length; i++) {
- clonedContact.ims[i].id = null;
- }
- }
- if (clonedContact.organizations) {
- for (i = 0; i < clonedContact.organizations.length; i++) {
- clonedContact.organizations[i].id = null;
- }
- }
- if (clonedContact.tags) {
- for (i = 0; i < clonedContact.tags.length; i++) {
- clonedContact.tags[i].id = null;
- }
- }
- if (clonedContact.photos) {
- for (i = 0; i < clonedContact.photos.length; i++) {
- clonedContact.photos[i].id = null;
- }
- }
- if (clonedContact.urls) {
- for (i = 0; i < clonedContact.urls.length; i++) {
- clonedContact.urls[i].id = null;
- }
- }
- return clonedContact;
-};
-
-/**
-* Persists contact to device storage.
-* @param successCB success callback
-* @param errorCB error callback
-*/
-Contact.prototype.save = function(successCB, errorCB) {
- PhoneGap.exec(successCB, errorCB, "Contacts", "save", [this]);
-};
-
-/**
-* Contact name.
-* @constructor
-* @param formatted
-* @param familyName
-* @param givenName
-* @param middle
-* @param prefix
-* @param suffix
-*/
-var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
- this.formatted = formatted || null;
- this.familyName = familyName || null;
- this.givenName = givenName || null;
- this.middleName = middle || null;
- this.honorificPrefix = prefix || null;
- this.honorificSuffix = suffix || null;
-};
-
-/**
-* Generic contact field.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code
-* @param type
-* @param value
-* @param pref
-*/
-var ContactField = function(type, value, pref) {
- this.id = null;
- this.type = type || null;
- this.value = value || null;
- this.pref = pref || null;
-};
-
-/**
-* Contact address.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code
-* @param formatted
-* @param streetAddress
-* @param locality
-* @param region
-* @param postalCode
-* @param country
-*/
-var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {
- this.id = null;
- this.pref = pref || null;
- this.type = type || null;
- this.formatted = formatted || null;
- this.streetAddress = streetAddress || null;
- this.locality = locality || null;
- this.region = region || null;
- this.postalCode = postalCode || null;
- this.country = country || null;
-};
-
-/**
-* Contact organization.
-* @constructor
-* @param {DOMString} id unique identifier, should only be set by native code
-* @param name
-* @param dept
-* @param title
-* @param startDate
-* @param endDate
-* @param location
-* @param desc
-*/
-var ContactOrganization = function(pref, type, name, dept, title) {
- this.id = null;
- this.pref = pref || null;
- this.type = type || null;
- this.name = name || null;
- this.department = dept || null;
- this.title = title || null;
-};
-
-/**
-* Represents a group of Contacts.
-* @constructor
-*/
-var Contacts = function() {
- this.inProgress = false;
- this.records = [];
-};
-/**
-* Returns an array of Contacts matching the search criteria.
-* @param fields that should be searched
-* @param successCB success callback
-* @param errorCB error callback
-* @param {ContactFindOptions} options that can be applied to contact searching
-* @return array of Contacts matching search criteria
-*/
-Contacts.prototype.find = function(fields, successCB, errorCB, options) {
- if (successCB === null) {
- throw new TypeError("You must specify a success callback for the find command.");
- }
- if (fields === null || fields === "undefined" || fields.length === "undefined" || fields.length <= 0) {
- if (typeof errorCB === "function") {
- errorCB({"code": ContactError.INVALID_ARGUMENT_ERROR});
- }
- } else {
- PhoneGap.exec(successCB, errorCB, "Contacts", "search", [fields, options]);
- }
-};
-
-/**
-* This function creates a new contact, but it does not persist the contact
-* to device storage. To persist the contact to device storage, invoke
-* contact.save().
-* @param properties an object who's properties will be examined to create a new Contact
-* @returns new Contact object
-*/
-Contacts.prototype.create = function(properties) {
- var i;
- var contact = new Contact();
- for (i in properties) {
- if (contact[i] !== 'undefined') {
- contact[i] = properties[i];
- }
- }
- return contact;
-};
-
-/**
-* This function returns and array of contacts. It is required as we need to convert raw
-* JSON objects into concrete Contact objects. Currently this method is called after
-* navigator.contacts.find but before the find methods success call back.
-*
-* @param jsonArray an array of JSON Objects that need to be converted to Contact objects.
-* @returns an array of Contact objects
-*/
-Contacts.prototype.cast = function(pluginResult) {
- var contacts = [];
- var i;
- for (i=0; i<pluginResult.message.length; i++) {
- contacts.push(navigator.contacts.create(pluginResult.message[i]));
- }
- pluginResult.message = contacts;
- return pluginResult;
-};
-
-/**
- * ContactFindOptions.
- * @constructor
- * @param filter used to match contacts against
- * @param multiple boolean used to determine if more than one contact should be returned
- */
-var ContactFindOptions = function(filter, multiple) {
- this.filter = filter || '';
- this.multiple = multiple || false;
-};
-
-/**
- * Add the contact interface into the browser.
- */
-PhoneGap.addConstructor(function() {
- if(typeof navigator.contacts === "undefined") {
- navigator.contacts = new Contacts();
- }
-});
-}
-/*
- * 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.
- */
-
-// TODO: Needs to be commented
-
-if (!PhoneGap.hasResource("crypto")) {
-PhoneGap.addResource("crypto");
-
-/**
-* @constructor
-*/
-var Crypto = function() {
-};
-
-Crypto.prototype.encrypt = function(seed, string, callback) {
- this.encryptWin = callback;
- PhoneGap.exec(null, null, "Crypto", "encrypt", [seed, string]);
-};
-
-Crypto.prototype.decrypt = function(seed, string, callback) {
- this.decryptWin = callback;
- PhoneGap.exec(null, null, "Crypto", "decrypt", [seed, string]);
-};
-
-Crypto.prototype.gotCryptedString = function(string) {
- this.encryptWin(string);
-};
-
-Crypto.prototype.getPlainString = function(string) {
- this.decryptWin(string);
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.Crypto === "undefined") {
- navigator.Crypto = new Crypto();
- }
-});
-}
-/*
- * 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.
- */
-
-if (!PhoneGap.hasResource("file")) {
-PhoneGap.addResource("file");
-
-/**
- * This class provides some useful information about a file.
- * @constructor
- */
-var FileProperties = function(filePath) {
- this.filePath = filePath;
- this.size = 0;
- this.lastModifiedDate = null;
-};
-
-/**
- * Represents a single file.
- *
- * @constructor
- * @param name {DOMString} name of the file, without path information
- * @param fullPath {DOMString} the full path of the file, including the name
- * @param type {DOMString} mime type
- * @param lastModifiedDate {Date} last modified date
- * @param size {Number} size of the file in bytes
- */
-var File = function(name, fullPath, type, lastModifiedDate, size) {
- this.name = name || null;
- this.fullPath = fullPath || null;
- this.type = type || null;
- this.lastModifiedDate = lastModifiedDate || null;
- this.size = size || 0;
-};
-
-/** @constructor */
-var FileError = function() {
- this.code = null;
-};
-
-// File error codes
-// Found in DOMException
-FileError.NOT_FOUND_ERR = 1;
-FileError.SECURITY_ERR = 2;
-FileError.ABORT_ERR = 3;
-
-// Added by this specification
-FileError.NOT_READABLE_ERR = 4;
-FileError.ENCODING_ERR = 5;
-FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
-FileError.INVALID_STATE_ERR = 7;
-FileError.SYNTAX_ERR = 8;
-FileError.INVALID_MODIFICATION_ERR = 9;
-FileError.QUOTA_EXCEEDED_ERR = 10;
-FileError.TYPE_MISMATCH_ERR = 11;
-FileError.PATH_EXISTS_ERR = 12;
-
-//-----------------------------------------------------------------------------
-// File Reader
-//-----------------------------------------------------------------------------
-
-/**
- * This class reads the mobile device file system.
- *
- * For Android:
- * The root directory is the root of the file system.
- * To read from the SD card, the file name is "sdcard/my_file.txt"
- * @constructor
- */
-var FileReader = function() {
- this.fileName = "";
-
- this.readyState = 0;
-
- // File data
- this.result = null;
-
- // Error
- this.error = null;
-
- // Event handlers
- this.onloadstart = null; // When the read starts.
- this.onprogress = null; // While reading (and decoding) file or fileBlob data, and reporting partial file data (progess.loaded/progress.total)
- this.onload = null; // When the read has successfully completed.
- this.onerror = null; // When the read has failed (see errors).
- this.onloadend = null; // When the request has completed (either in success or failure).
- this.onabort = null; // When the read has been aborted. For instance, by invoking the abort() method.
-};
-
-// States
-FileReader.EMPTY = 0;
-FileReader.LOADING = 1;
-FileReader.DONE = 2;
-
-/**
- * Abort reading file.
- */
-FileReader.prototype.abort = function() {
- var evt;
- this.readyState = FileReader.DONE;
- this.result = null;
-
- // set error
- var error = new FileError();
- error.code = error.ABORT_ERR;
- this.error = error;
-
- // If error callback
- if (typeof this.onerror === "function") {
- this.onerror({"type":"error", "target":this});
- }
- // If abort callback
- if (typeof this.onabort === "function") {
- this.onabort({"type":"abort", "target":this});
- }
- // If load end callback
- if (typeof this.onloadend === "function") {
- this.onloadend({"type":"loadend", "target":this});
- }
-};
-
-/**
- * Read text file.
- *
- * @param file {File} File object containing file properties
- * @param encoding [Optional] (see http://www.iana.org/assignments/character-sets)
- */
-FileReader.prototype.readAsText = function(file, encoding) {
- this.fileName = "";
- if (typeof file.fullPath === "undefined") {
- this.fileName = file;
- } else {
- this.fileName = file.fullPath;
- }
-
- // LOADING state
- this.readyState = FileReader.LOADING;
-
- // If loadstart callback
- if (typeof this.onloadstart === "function") {
- this.onloadstart({"type":"loadstart", "target":this});
- }
-
- // Default encoding is UTF-8
- var enc = encoding ? encoding : "UTF-8";
-
- var me = this;
-
- // Read file
- PhoneGap.exec(
- // Success callback
- function(r) {
- var evt;
-
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileReader.DONE) {
- return;
- }
-
- // Save result
- me.result = r;
-
- // If onload callback
- if (typeof me.onload === "function") {
- me.onload({"type":"load", "target":me});
- }
-
- // DONE state
- me.readyState = FileReader.DONE;
-
- // If onloadend callback
- if (typeof me.onloadend === "function") {
- me.onloadend({"type":"loadend", "target":me});
- }
- },
- // Error callback
- function(e) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileReader.DONE) {
- return;
- }
-
- // Save error
- me.error = e;
-
- // If onerror callback
- if (typeof me.onerror === "function") {
- me.onerror({"type":"error", "target":me});
- }
-
- // DONE state
- me.readyState = FileReader.DONE;
-
- // If onloadend callback
- if (typeof me.onloadend === "function") {
- me.onloadend({"type":"loadend", "target":me});
- }
- }, "File", "readAsText", [this.fileName, enc]);
-};
-
-
-/**
- * Read file and return data as a base64 encoded data url.
- * A data url is of the form:
- * data:[<mediatype>][;base64],<data>
- *
- * @param file {File} File object containing file properties
- */
-FileReader.prototype.readAsDataURL = function(file) {
- this.fileName = "";
- if (typeof file.fullPath === "undefined") {
- this.fileName = file;
- } else {
- this.fileName = file.fullPath;
- }
-
- // LOADING state
- this.readyState = FileReader.LOADING;
-
- // If loadstart callback
- if (typeof this.onloadstart === "function") {
- this.onloadstart({"type":"loadstart", "target":this});
- }
-
- var me = this;
-
- // Read file
- PhoneGap.exec(
- // Success callback
- function(r) {
- var evt;
-
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileReader.DONE) {
- return;
- }
-
- // Save result
- me.result = r;
-
- // If onload callback
- if (typeof me.onload === "function") {
- me.onload({"type":"load", "target":me});
- }
-
- // DONE state
- me.readyState = FileReader.DONE;
-
- // If onloadend callback
- if (typeof me.onloadend === "function") {
- me.onloadend({"type":"loadend", "target":me});
- }
- },
- // Error callback
- function(e) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileReader.DONE) {
- return;
- }
-
- // Save error
- me.error = e;
-
- // If onerror callback
- if (typeof me.onerror === "function") {
- me.onerror({"type":"error", "target":me});
- }
-
- // DONE state
- me.readyState = FileReader.DONE;
-
- // If onloadend callback
- if (typeof me.onloadend === "function") {
- me.onloadend({"type":"loadend", "target":me});
- }
- }, "File", "readAsDataURL", [this.fileName]);
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file {File} File object containing file properties
- */
-FileReader.prototype.readAsBinaryString = function(file) {
- // TODO - Can't return binary data to browser.
- this.fileName = file;
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file {File} File object containing file properties
- */
-FileReader.prototype.readAsArrayBuffer = function(file) {
- // TODO - Can't return binary data to browser.
- this.fileName = file;
-};
-
-//-----------------------------------------------------------------------------
-// File Writer
-//-----------------------------------------------------------------------------
-
-/**
- * This class writes to the mobile device file system.
- *
- * For Android:
- * The root directory is the root of the file system.
- * To write to the SD card, the file name is "sdcard/my_file.txt"
- *
- * @constructor
- * @param file {File} File object containing file properties
- * @param append if true write to the end of the file, otherwise overwrite the file
- */
-var FileWriter = function(file) {
- this.fileName = "";
- this.length = 0;
- if (file) {
- this.fileName = file.fullPath || file;
- this.length = file.size || 0;
- }
- // default is to write at the beginning of the file
- this.position = 0;
-
- this.readyState = 0; // EMPTY
-
- this.result = null;
-
- // Error
- this.error = null;
-
- // Event handlers
- this.onwritestart = null; // When writing starts
- this.onprogress = null; // While writing the file, and reporting partial file data
- this.onwrite = null; // When the write has successfully completed.
- this.onwriteend = null; // When the request has completed (either in success or failure).
- this.onabort = null; // When the write has been aborted. For instance, by invoking the abort() method.
- this.onerror = null; // When the write has failed (see errors).
-};
-
-// States
-FileWriter.INIT = 0;
-FileWriter.WRITING = 1;
-FileWriter.DONE = 2;
-
-/**
- * Abort writing file.
- */
-FileWriter.prototype.abort = function() {
- // check for invalid state
- if (this.readyState === FileWriter.DONE || this.readyState === FileWriter.INIT) {
- throw FileError.INVALID_STATE_ERR;
- }
-
- // set error
- var error = new FileError(), evt;
- error.code = error.ABORT_ERR;
- this.error = error;
-
- // If error callback
- if (typeof this.onerror === "function") {
- this.onerror({"type":"error", "target":this});
- }
- // If abort callback
- if (typeof this.onabort === "function") {
- this.onabort({"type":"abort", "target":this});
- }
-
- this.readyState = FileWriter.DONE;
-
- // If write end callback
- if (typeof this.onwriteend === "function") {
- this.onwriteend({"type":"writeend", "target":this});
- }
-};
-
-/**
- * Writes data to the file
- *
- * @param text to be written
- */
-FileWriter.prototype.write = function(text) {
- // Throw an exception if we are already writing a file
- if (this.readyState === FileWriter.WRITING) {
- throw FileError.INVALID_STATE_ERR;
- }
-
- // WRITING state
- this.readyState = FileWriter.WRITING;
-
- var me = this;
-
- // If onwritestart callback
- if (typeof me.onwritestart === "function") {
- me.onwritestart({"type":"writestart", "target":me});
- }
-
- // Write file
- PhoneGap.exec(
- // Success callback
- function(r) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
- // position always increases by bytes written because file would be extended
- me.position += r;
- // The length of the file is now where we are done writing.
- me.length = me.position;
-
- // If onwrite callback
- if (typeof me.onwrite === "function") {
- me.onwrite({"type":"write", "target":me});
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- me.onwriteend({"type":"writeend", "target":me});
- }
- },
- // Error callback
- function(e) {
- var evt;
-
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
- // Save error
- me.error = e;
-
- // If onerror callback
- if (typeof me.onerror === "function") {
- me.onerror({"type":"error", "target":me});
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- me.onwriteend({"type":"writeend", "target":me});
- }
- }, "File", "write", [this.fileName, text, this.position]);
-};
-
-/**
- * Moves the file pointer to the location specified.
- *
- * If the offset is a negative number the position of the file
- * pointer is rewound. If the offset is greater than the file
- * size the position is set to the end of the file.
- *
- * @param offset is the location to move the file pointer to.
- */
-FileWriter.prototype.seek = function(offset) {
- // Throw an exception if we are already writing a file
- if (this.readyState === FileWriter.WRITING) {
- throw FileError.INVALID_STATE_ERR;
- }
-
- if (!offset) {
- return;
- }
-
- // See back from end of file.
- if (offset < 0) {
- this.position = Math.max(offset + this.length, 0);
- }
- // Offset is bigger then file size so set position
- // to the end of the file.
- else if (offset > this.length) {
- this.position = this.length;
- }
- // Offset is between 0 and file size so set the position
- // to start writing.
- else {
- this.position = offset;
- }
-};
-
-/**
- * Truncates the file to the size specified.
- *
- * @param size to chop the file at.
- */
-FileWriter.prototype.truncate = function(size) {
- // Throw an exception if we are already writing a file
- if (this.readyState === FileWriter.WRITING) {
- throw FileError.INVALID_STATE_ERR;
- }
-
- // WRITING state
- this.readyState = FileWriter.WRITING;
-
- var me = this;
-
- // If onwritestart callback
- if (typeof me.onwritestart === "function") {
- me.onwritestart({"type":"writestart", "target":this});
- }
-
- // Write file
- PhoneGap.exec(
- // Success callback
- function(r) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
- // Update the length of the file
- me.length = r;
- me.position = Math.min(me.position, r);
-
- // If onwrite callback
- if (typeof me.onwrite === "function") {
- me.onwrite({"type":"write", "target":me});
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- me.onwriteend({"type":"writeend", "target":me});
- }
- },
- // Error callback
- function(e) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
- // Save error
- me.error = e;
-
- // If onerror callback
- if (typeof me.onerror === "function") {
- me.onerror({"type":"error", "target":me});
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- me.onwriteend({"type":"writeend", "target":me});
- }
- }, "File", "truncate", [this.fileName, size]);
-};
-
-/**
- * Information about the state of the file or directory
- *
- * @constructor
- * {Date} modificationTime (readonly)
- */
-var Metadata = function() {
- this.modificationTime=null;
-};
-
-/**
- * Supplies arguments to methods that lookup or create files and directories
- *
- * @constructor
- * @param {boolean} create file or directory if it doesn't exist
- * @param {boolean} exclusive if true the command will fail if the file or directory exists
- */
-var Flags = function(create, exclusive) {
- this.create = create || false;
- this.exclusive = exclusive || false;
-};
-
-/**
- * An interface representing a file system
- *
- * @constructor
- * {DOMString} name the unique name of the file system (readonly)
- * {DirectoryEntry} root directory of the file system (readonly)
- */
-var FileSystem = function() {
- this.name = null;
- this.root = null;
-};
-
-/**
- * An interface that lists the files and directories in a directory.
- * @constructor
- */
-var DirectoryReader = function(fullPath){
- this.fullPath = fullPath || null;
-};
-
-/**
- * Returns a list of entries from a directory.
- *
- * @param {Function} successCallback is called with a list of entries
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryReader.prototype.readEntries = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "readEntries", [this.fullPath]);
-};
-
-/**
- * An interface representing a directory on the file system.
- *
- * @constructor
- * {boolean} isFile always false (readonly)
- * {boolean} isDirectory always true (readonly)
- * {DOMString} name of the directory, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the directory (readonly)
- * {FileSystem} filesystem on which the directory resides (readonly)
- */
-var DirectoryEntry = function() {
- this.isFile = false;
- this.isDirectory = true;
- this.name = null;
- this.fullPath = null;
- this.filesystem = null;
-};
-
-/**
- * Copies a directory to a new location
- *
- * @param {DirectoryEntry} parent the directory to which to copy the entry
- * @param {DOMString} newName the new name of the entry, defaults to the current name
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "copyTo", [this.fullPath, parent, newName]);
-};
-
-/**
- * Looks up the metadata of the entry
- *
- * @param {Function} successCallback is called with a Metadata object
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getMetadata = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "getMetadata", [this.fullPath]);
-};
-
-/**
- * Gets the parent of the entry
- *
- * @param {Function} successCallback is called with a parent entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getParent = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "getParent", [this.fullPath]);
-};
-
-/**
- * Moves a directory to a new location
- *
- * @param {DirectoryEntry} parent the directory to which to move the entry
- * @param {DOMString} newName the new name of the entry, defaults to the current name
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "moveTo", [this.fullPath, parent, newName]);
-};
-
-/**
- * Removes the entry
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.remove = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "remove", [this.fullPath]);
-};
-
-/**
- * Returns a URI that can be used to identify this entry.
- *
- * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
- * @return uri
- */
-DirectoryEntry.prototype.toURI = function(mimeType) {
- return "file://" + this.fullPath;
-};
-
-/**
- * Creates a new DirectoryReader to read entries from this directory
- */
-DirectoryEntry.prototype.createReader = function(successCallback, errorCallback) {
- return new DirectoryReader(this.fullPath);
-};
-
-/**
- * Creates or looks up a directory
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
- * @param {Flags} options to create or excluively create the directory
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "getDirectory", [this.fullPath, path, options]);
-};
-
-/**
- * Creates or looks up a file
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
- * @param {Flags} options to create or excluively create the file
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "getFile", [this.fullPath, path, options]);
-};
-
-/**
- * Deletes a directory and all of it's contents
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "removeRecursively", [this.fullPath]);
-};
-
-/**
- * An interface representing a directory on the file system.
- *
- * @constructor
- * {boolean} isFile always true (readonly)
- * {boolean} isDirectory always false (readonly)
- * {DOMString} name of the file, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the file (readonly)
- * {FileSystem} filesystem on which the directory resides (readonly)
- */
-var FileEntry = function() {
- this.isFile = true;
- this.isDirectory = false;
- this.name = null;
- this.fullPath = null;
- this.filesystem = null;
-};
-
-/**
- * Copies a file to a new location
- *
- * @param {DirectoryEntry} parent the directory to which to copy the entry
- * @param {DOMString} newName the new name of the entry, defaults to the current name
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "copyTo", [this.fullPath, parent, newName]);
-};
-
-/**
- * Looks up the metadata of the entry
- *
- * @param {Function} successCallback is called with a Metadata object
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.getMetadata = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "getMetadata", [this.fullPath]);
-};
-
-/**
- * Gets the parent of the entry
- *
- * @param {Function} successCallback is called with a parent entry
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.getParent = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "getParent", [this.fullPath]);
-};
-
-/**
- * Moves a directory to a new location
- *
- * @param {DirectoryEntry} parent the directory to which to move the entry
- * @param {DOMString} newName the new name of the entry, defaults to the current name
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "moveTo", [this.fullPath, parent, newName]);
-};
-
-/**
- * Removes the entry
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.remove = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "remove", [this.fullPath]);
-};
-
-/**
- * Returns a URI that can be used to identify this entry.
- *
- * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
- * @return uri
- */
-FileEntry.prototype.toURI = function(mimeType) {
- return "file://" + this.fullPath;
-};
-
-/**
- * Creates a new FileWriter associated with the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new FileWriter
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.createWriter = function(successCallback, errorCallback) {
- this.file(function(filePointer) {
- var writer = new FileWriter(filePointer);
-
- if (writer.fileName === null || writer.fileName === "") {
- if (typeof errorCallback === "function") {
- errorCallback({
- "code": FileError.INVALID_STATE_ERR
- });
- }
- }
-
- if (typeof successCallback === "function") {
- successCallback(writer);
- }
- }, errorCallback);
-};
-
-/**
- * Returns a File that represents the current state of the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new File object
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.file = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "getFileMetadata", [this.fullPath]);
-};
-
-/** @constructor */
-var LocalFileSystem = function() {
-};
-
-// File error codes
-LocalFileSystem.TEMPORARY = 0;
-LocalFileSystem.PERSISTENT = 1;
-LocalFileSystem.RESOURCE = 2;
-LocalFileSystem.APPLICATION = 3;
-
-/**
- * Requests a filesystem in which to store application data.
- *
- * @param {int} type of file system being requested
- * @param {Function} successCallback is called with the new FileSystem
- * @param {Function} errorCallback is called with a FileError
- */
-LocalFileSystem.prototype.requestFileSystem = function(type, size, successCallback, errorCallback) {
- if (type < 0 || type > 3) {
- if (typeof errorCallback === "function") {
- errorCallback({
- "code": FileError.SYNTAX_ERR
- });
- }
- }
- else {
- PhoneGap.exec(successCallback, errorCallback, "File", "requestFileSystem", [type, size]);
- }
-};
-
-/**
- *
- * @param {DOMString} uri referring to a local file in a filesystem
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-LocalFileSystem.prototype.resolveLocalFileSystemURI = function(uri, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "File", "resolveLocalFileSystemURI", [uri]);
-};
-
-/**
-* This function returns and array of contacts. It is required as we need to convert raw
-* JSON objects into concrete Contact objects. Currently this method is called after
-* navigator.service.contacts.find but before the find methods success call back.
-*
-* @param a JSON Objects that need to be converted to DirectoryEntry or FileEntry objects.
-* @returns an entry
-*/
-LocalFileSystem.prototype._castFS = function(pluginResult) {
- var entry = null;
- entry = new DirectoryEntry();
- entry.isDirectory = pluginResult.message.root.isDirectory;
- entry.isFile = pluginResult.message.root.isFile;
- entry.name = pluginResult.message.root.name;
- entry.fullPath = pluginResult.message.root.fullPath;
- pluginResult.message.root = entry;
- return pluginResult;
-};
-
-LocalFileSystem.prototype._castEntry = function(pluginResult) {
- var entry = null;
- if (pluginResult.message.isDirectory) {
- entry = new DirectoryEntry();
- }
- else if (pluginResult.message.isFile) {
- entry = new FileEntry();
- }
- entry.isDirectory = pluginResult.message.isDirectory;
- entry.isFile = pluginResult.message.isFile;
- entry.name = pluginResult.message.name;
- entry.fullPath = pluginResult.message.fullPath;
- pluginResult.message = entry;
- return pluginResult;
-};
-
-LocalFileSystem.prototype._castEntries = function(pluginResult) {
- var entries = pluginResult.message;
- var retVal = [];
- for (var i=0; i<entries.length; i++) {
- retVal.push(window.localFileSystem._createEntry(entries[i]));
- }
- pluginResult.message = retVal;
- return pluginResult;
-};
-
-LocalFileSystem.prototype._createEntry = function(castMe) {
- var entry = null;
- if (castMe.isDirectory) {
- entry = new DirectoryEntry();
- }
- else if (castMe.isFile) {
- entry = new FileEntry();
- }
- entry.isDirectory = castMe.isDirectory;
- entry.isFile = castMe.isFile;
- entry.name = castMe.name;
- entry.fullPath = castMe.fullPath;
- return entry;
-};
-
-LocalFileSystem.prototype._castDate = function(pluginResult) {
- if (pluginResult.message.modificationTime) {
- var modTime = new Date(pluginResult.message.modificationTime);
- pluginResult.message.modificationTime = modTime;
- }
- else if (pluginResult.message.lastModifiedDate) {
- var file = new File();
- file.size = pluginResult.message.size;
- file.type = pluginResult.message.type;
- file.name = pluginResult.message.name;
- file.fullPath = pluginResult.message.fullPath;
- file.lastModifiedDate = new Date(pluginResult.message.lastModifiedDate);
- pluginResult.message = file;
- }
- return pluginResult;
-};
-
-/**
- * Add the FileSystem interface into the browser.
- */
-PhoneGap.addConstructor(function() {
- var pgLocalFileSystem = new LocalFileSystem();
- // Needed for cast methods
- if (typeof window.localFileSystem === "undefined") {
- window.localFileSystem = pgLocalFileSystem;
- }
- if (typeof window.requestFileSystem === "undefined") {
- window.requestFileSystem = pgLocalFileSystem.requestFileSystem;
- }
- if (typeof window.resolveLocalFileSystemURI === "undefined") {
- window.resolveLocalFileSystemURI = pgLocalFileSystem.resolveLocalFileSystemURI;
- }
-});
-}/*
- * 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.
- */
-
-if (!PhoneGap.hasResource("filetransfer")) {
-PhoneGap.addResource("filetransfer");
-
-/**
- * FileTransfer uploads a file to a remote server.
- * @constructor
- */
-var FileTransfer = function() {};
-
-/**
- * FileUploadResult
- * @constructor
- */
-var FileUploadResult = function() {
- this.bytesSent = 0;
- this.responseCode = null;
- this.response = null;
-};
-
-/**
- * FileTransferError
- * @constructor
- */
-var FileTransferError = function() {
- this.code = null;
-};
-
-FileTransferError.FILE_NOT_FOUND_ERR = 1;
-FileTransferError.INVALID_URL_ERR = 2;
-FileTransferError.CONNECTION_ERR = 3;
-
-/**
-* Given an absolute file path, uploads a file on the device to a remote server
-* using a multipart HTTP request.
-* @param filePath {String} Full path of the file on the device
-* @param server {String} URL of the server to receive the file
-* @param successCallback (Function} Callback to be invoked when upload has completed
-* @param errorCallback {Function} Callback to be invoked upon error
-* @param options {FileUploadOptions} Optional parameters such as file name and mimetype
-*/
-FileTransfer.prototype.upload = function(filePath, server, successCallback, errorCallback, options, debug) {
-
- // check for options
- var fileKey = null;
- var fileName = null;
- var mimeType = null;
- var params = null;
- var chunkedMode = true;
- if (options) {
- fileKey = options.fileKey;
- fileName = options.fileName;
- mimeType = options.mimeType;
- if (options.chunkedMode !== null || typeof options.chunkedMode !== "undefined") {
- chunkedMode = options.chunkedMode;
- }
- if (options.params) {
- params = options.params;
- }
- else {
- params = {};
- }
- }
-
- PhoneGap.exec(successCallback, errorCallback, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, debug, chunkedMode]);
-};
-
-/**
- * Downloads a file form a given URL and saves it to the specified directory.
- * @param source {String} URL of the server to receive the file
- * @param target {String} Full path of the file on the device
- * @param successCallback (Function} Callback to be invoked when upload has completed
- * @param errorCallback {Function} Callback to be invoked upon error
- */
-FileTransfer.prototype.download = function(source, target, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, 'FileTransfer', 'download', [source, target]);
-};
-
-/**
- * Options to customize the HTTP request used to upload files.
- * @constructor
- * @param fileKey {String} Name of file request parameter.
- * @param fileName {String} Filename to be used by the server. Defaults to image.jpg.
- * @param mimeType {String} Mimetype of the uploaded file. Defaults to image/jpeg.
- * @param params {Object} Object with key: value params to send to the server.
- */
-var FileUploadOptions = function(fileKey, fileName, mimeType, params) {
- this.fileKey = fileKey || null;
- this.fileName = fileName || null;
- this.mimeType = mimeType || null;
- this.params = params || null;
-};
-}
-/*
- * 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.
- */
-
-if (!PhoneGap.hasResource("geolocation")) {
-PhoneGap.addResource("geolocation");
-
-/**
- * This class provides access to device GPS data.
- * @constructor
- */
-var Geolocation = function() {
-
- // The last known GPS position.
- this.lastPosition = null;
-
- // Geolocation listeners
- this.listeners = {};
-};
-
-/**
- * Position error object
- *
- * @constructor
- * @param code
- * @param message
- */
-var PositionError = function(code, message) {
- this.code = code;
- this.message = message;
-};
-
-PositionError.PERMISSION_DENIED = 1;
-PositionError.POSITION_UNAVAILABLE = 2;
-PositionError.TIMEOUT = 3;
-
-/**
- * Asynchronously aquires the current position.
- *
- * @param {Function} successCallback The function to call when the position data is available
- * @param {Function} errorCallback The function to call when there is an error getting the heading position. (OPTIONAL)
- * @param {PositionOptions} options The options for getting the position data. (OPTIONAL)
- */
-Geolocation.prototype.getCurrentPosition = function(successCallback, errorCallback, options) {
- if (navigator._geo.listeners.global) {
- console.log("Geolocation Error: Still waiting for previous getCurrentPosition() request.");
- try {
- errorCallback(new PositionError(PositionError.TIMEOUT, "Geolocation Error: Still waiting for previous getCurrentPosition() request."));
- } catch (e) {
- }
- return;
- }
- var maximumAge = 10000;
- var enableHighAccuracy = false;
- var timeout = 10000;
- if (typeof options !== "undefined") {
- if (typeof options.maximumAge !== "undefined") {
- maximumAge = options.maximumAge;
- }
- if (typeof options.enableHighAccuracy !== "undefined") {
- enableHighAccuracy = options.enableHighAccuracy;
- }
- if (typeof options.timeout !== "undefined") {
- timeout = options.timeout;
- }
- }
- navigator._geo.listeners.global = {"success" : successCallback, "fail" : errorCallback };
- PhoneGap.exec(null, null, "Geolocation", "getCurrentLocation", [enableHighAccuracy, timeout, maximumAge]);
-};
-
-/**
- * Asynchronously watches the geolocation for changes to geolocation. When a change occurs,
- * the successCallback is called with the new location.
- *
- * @param {Function} successCallback The function to call each time the location data is available
- * @param {Function} errorCallback The function to call when there is an error getting the location data. (OPTIONAL)
- * @param {PositionOptions} options The options for getting the location data such as frequency. (OPTIONAL)
- * @return String The watch id that must be passed to #clearWatch to stop watching.
- */
-Geolocation.prototype.watchPosition = function(successCallback, errorCallback, options) {
- var maximumAge = 10000;
- var enableHighAccuracy = false;
- var timeout = 10000;
- if (typeof options !== "undefined") {
- if (typeof options.frequency !== "undefined") {
- maximumAge = options.frequency;
- }
- if (typeof options.maximumAge !== "undefined") {
- maximumAge = options.maximumAge;
- }
- if (typeof options.enableHighAccuracy !== "undefined") {
- enableHighAccuracy = options.enableHighAccuracy;
- }
- if (typeof options.timeout !== "undefined") {
- timeout = options.timeout;
- }
- }
- var id = PhoneGap.createUUID();
- navigator._geo.listeners[id] = {"success" : successCallback, "fail" : errorCallback };
- PhoneGap.exec(null, null, "Geolocation", "start", [id, enableHighAccuracy, timeout, maximumAge]);
- return id;
-};
-
-/*
- * Native callback when watch position has a new position.
- * PRIVATE METHOD
- *
- * @param {String} id
- * @param {Number} lat
- * @param {Number} lng
- * @param {Number} alt
- * @param {Number} altacc
- * @param {Number} head
- * @param {Number} vel
- * @param {Number} stamp
- */
-Geolocation.prototype.success = function(id, lat, lng, alt, altacc, head, vel, stamp) {
- var coords = new Coordinates(lat, lng, alt, altacc, head, vel);
- var loc = new Position(coords, stamp);
- try {
- if (lat === "undefined" || lng === "undefined") {
- navigator._geo.listeners[id].fail(new PositionError(PositionError.POSITION_UNAVAILABLE, "Lat/Lng are undefined."));
- }
- else {
- navigator._geo.lastPosition = loc;
- navigator._geo.listeners[id].success(loc);
- }
- }
- catch (e) {
- console.log("Geolocation Error: Error calling success callback function.");
- }
-
- if (id === "global") {
- delete navigator._geo.listeners.global;
- }
-};
-
-/**
- * Native callback when watch position has an error.
- * PRIVATE METHOD
- *
- * @param {String} id The ID of the watch
- * @param {Number} code The error code
- * @param {String} msg The error message
- */
-Geolocation.prototype.fail = function(id, code, msg) {
- try {
- navigator._geo.listeners[id].fail(new PositionError(code, msg));
- }
- catch (e) {
- console.log("Geolocation Error: Error calling error callback function.");
- }
-};
-
-/**
- * Clears the specified heading watch.
- *
- * @param {String} id The ID of the watch returned from #watchPosition
- */
-Geolocation.prototype.clearWatch = function(id) {
- PhoneGap.exec(null, null, "Geolocation", "stop", [id]);
- delete navigator._geo.listeners[id];
-};
-
-/**
- * Force the PhoneGap geolocation to be used instead of built-in.
- */
-Geolocation.usingPhoneGap = false;
-Geolocation.usePhoneGap = function() {
- if (Geolocation.usingPhoneGap) {
- return;
- }
- Geolocation.usingPhoneGap = true;
-
- // Set built-in geolocation methods to our own implementations
- // (Cannot replace entire geolocation, but can replace individual methods)
- navigator.geolocation.setLocation = navigator._geo.setLocation;
- navigator.geolocation.getCurrentPosition = navigator._geo.getCurrentPosition;
- navigator.geolocation.watchPosition = navigator._geo.watchPosition;
- navigator.geolocation.clearWatch = navigator._geo.clearWatch;
- navigator.geolocation.start = navigator._geo.start;
- navigator.geolocation.stop = navigator._geo.stop;
-};
-
-PhoneGap.addConstructor(function() {
- navigator._geo = new Geolocation();
-
- // No native geolocation object for Android 1.x, so use PhoneGap geolocation
- if (typeof navigator.geolocation === 'undefined') {
- navigator.geolocation = navigator._geo;
- Geolocation.usingPhoneGap = true;
- }
-});
-}
-/*
- * 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.
- */
-
-if (!PhoneGap.hasResource("media")) {
-PhoneGap.addResource("media");
-
-/**
- * This class provides access to the device media, interfaces to both sound and video
- *
- * @constructor
- * @param src The file name or url to play
- * @param successCallback The callback to be called when the file is done playing or recording.
- * successCallback() - OPTIONAL
- * @param errorCallback The callback to be called if there is an error.
- * errorCallback(int errorCode) - OPTIONAL
- * @param statusCallback The callback to be called when media status has changed.
- * statusCallback(int statusCode) - OPTIONAL
- * @param positionCallback The callback to be called when media position has changed.
- * positionCallback(long position) - OPTIONAL
- */
-var Media = function(src, successCallback, errorCallback, statusCallback, positionCallback) {
-
- // successCallback optional
- if (successCallback && (typeof successCallback !== "function")) {
- console.log("Media Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback !== "function")) {
- console.log("Media Error: errorCallback is not a function");
- return;
- }
-
- // statusCallback optional
- if (statusCallback && (typeof statusCallback !== "function")) {
- console.log("Media Error: statusCallback is not a function");
- return;
- }
-
- // statusCallback optional
- if (positionCallback && (typeof positionCallback !== "function")) {
- console.log("Media Error: positionCallback is not a function");
- return;
- }
-
- this.id = PhoneGap.createUUID();
- PhoneGap.mediaObjects[this.id] = this;
- this.src = src;
- this.successCallback = successCallback;
- this.errorCallback = errorCallback;
- this.statusCallback = statusCallback;
- this.positionCallback = positionCallback;
- this._duration = -1;
- this._position = -1;
-};
-
-// Media messages
-Media.MEDIA_STATE = 1;
-Media.MEDIA_DURATION = 2;
-Media.MEDIA_POSITION = 3;
-Media.MEDIA_ERROR = 9;
-
-// Media states
-Media.MEDIA_NONE = 0;
-Media.MEDIA_STARTING = 1;
-Media.MEDIA_RUNNING = 2;
-Media.MEDIA_PAUSED = 3;
-Media.MEDIA_STOPPED = 4;
-Media.MEDIA_MSG = ["None", "Starting", "Running", "Paused", "Stopped"];
-
-// TODO: Will MediaError be used?
-/**
- * This class contains information about any Media errors.
- * @constructor
- */
-var MediaError = function() {
- this.code = null;
- this.message = "";
-};
-
-MediaError.MEDIA_ERR_NONE_ACTIVE = 0;
-MediaError.MEDIA_ERR_ABORTED = 1;
-MediaError.MEDIA_ERR_NETWORK = 2;
-MediaError.MEDIA_ERR_DECODE = 3;
-MediaError.MEDIA_ERR_NONE_SUPPORTED = 4;
-
-/**
- * Start or resume playing audio file.
- */
-Media.prototype.play = function() {
- PhoneGap.exec(null, null, "Media", "startPlayingAudio", [this.id, this.src]);
-};
-
-/**
- * Stop playing audio file.
- */
-Media.prototype.stop = function() {
- return PhoneGap.exec(null, null, "Media", "stopPlayingAudio", [this.id]);
-};
-
-/**
- * Seek or jump to a new time in the track..
- */
-Media.prototype.seekTo = function(milliseconds) {
- PhoneGap.exec(null, null, "Media", "seekToAudio", [this.id, milliseconds]);
-};
-
-/**
- * Pause playing audio file.
- */
-Media.prototype.pause = function() {
- PhoneGap.exec(null, null, "Media", "pausePlayingAudio", [this.id]);
-};
-
-/**
- * Get duration of an audio file.
- * The duration is only set for audio that is playing, paused or stopped.
- *
- * @return duration or -1 if not known.
- */
-Media.prototype.getDuration = function() {
- return this._duration;
-};
-
-/**
- * Get position of audio.
- */
-Media.prototype.getCurrentPosition = function(success, fail) {
- PhoneGap.exec(success, fail, "Media", "getCurrentPositionAudio", [this.id]);
-};
-
-/**
- * Start recording audio file.
- */
-Media.prototype.startRecord = function() {
- PhoneGap.exec(null, null, "Media", "startRecordingAudio", [this.id, this.src]);
-};
-
-/**
- * Stop recording audio file.
- */
-Media.prototype.stopRecord = function() {
- PhoneGap.exec(null, null, "Media", "stopRecordingAudio", [this.id]);
-};
-
-/**
- * Release the resources.
- */
-Media.prototype.release = function() {
- PhoneGap.exec(null, null, "Media", "release", [this.id]);
-};
-
-/**
- * Adjust the volume.
- */
-Media.prototype.setVolume = function(volume) {
- PhoneGap.exec(null, null, "Media", "setVolume", [this.id, volume]);
-};
-
-/**
- * List of media objects.
- * PRIVATE
- */
-PhoneGap.mediaObjects = {};
-
-/**
- * Object that receives native callbacks.
- * PRIVATE
- * @constructor
- */
-PhoneGap.Media = function() {};
-
-/**
- * Get the media object.
- * PRIVATE
- *
- * @param id The media object id (string)
- */
-PhoneGap.Media.getMediaObject = function(id) {
- return PhoneGap.mediaObjects[id];
-};
-
-/**
- * Audio has status update.
- * PRIVATE
- *
- * @param id The media object id (string)
- * @param status The status code (int)
- * @param msg The status message (string)
- */
-PhoneGap.Media.onStatus = function(id, msg, value) {
- var media = PhoneGap.mediaObjects[id];
- // If state update
- if (msg === Media.MEDIA_STATE) {
- if (value === Media.MEDIA_STOPPED) {
- if (media.successCallback) {
- media.successCallback();
- }
- }
- if (media.statusCallback) {
- media.statusCallback(value);
- }
- }
- else if (msg === Media.MEDIA_DURATION) {
- media._duration = value;
- }
- else if (msg === Media.MEDIA_ERROR) {
- if (media.errorCallback) {
- media.errorCallback({"code":value});
- }
- }
- else if (msg === Media.MEDIA_POSITION) {
- media._position = value;
- }
-};
-}
-/*
- * 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.
- */
-
-
-if (!PhoneGap.hasResource("network")) {
-PhoneGap.addResource("network");
-
-/**
- * This class contains information about the current network Connection.
- * @constructor
- */
-var Connection = function() {
- this.type = null;
- this._firstRun = true;
- this._timer = null;
- this.timeout = 500;
-
- var me = this;
- this.getInfo(
- function(type) {
- // Need to send events if we are on or offline
- if (type === "none") {
- // set a timer if still offline at the end of timer send the offline event
- me._timer = setTimeout(function(){
- me.type = type;
- PhoneGap.fireDocumentEvent('offline');
- me._timer = null;
- }, me.timeout);
- } else {
- // If there is a current offline event pending clear it
- if (me._timer !== null) {
- clearTimeout(me._timer);
- me._timer = null;
- }
- me.type = type;
- PhoneGap.fireDocumentEvent('online');
- }
-
- // should only fire this once
- if (me._firstRun) {
- me._firstRun = false;
- PhoneGap.onPhoneGapConnectionReady.fire();
- }
- },
- function(e) {
- // If we can't get the network info we should still tell PhoneGap
- // to fire the deviceready event.
- if (me._firstRun) {
- me._firstRun = false;
- PhoneGap.onPhoneGapConnectionReady.fire();
- }
- console.log("Error initializing Network Connection: " + e);
- });
-};
-
-Connection.UNKNOWN = "unknown";
-Connection.ETHERNET = "ethernet";
-Connection.WIFI = "wifi";
-Connection.CELL_2G = "2g";
-Connection.CELL_3G = "3g";
-Connection.CELL_4G = "4g";
-Connection.NONE = "none";
-
-/**
- * Get connection info
- *
- * @param {Function} successCallback The function to call when the Connection data is available
- * @param {Function} errorCallback The function to call when there is an error getting the Connection data. (OPTIONAL)
- */
-Connection.prototype.getInfo = function(successCallback, errorCallback) {
- // Get info
- PhoneGap.exec(successCallback, errorCallback, "Network Status", "getConnectionInfo", []);
-};
-
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.network === "undefined") {
- navigator.network = {};
- }
- if (typeof navigator.network.connection === "undefined") {
- navigator.network.connection = new Connection();
- }
-});
-}
-/*
- * 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.
- */
-
-if (!PhoneGap.hasResource("notification")) {
-PhoneGap.addResource("notification");
-
-/**
- * This class provides access to notifications on the device.
- * @constructor
- */
-var Notification = function() {
-};
-
-/**
- * Open a native alert dialog, with a customizable title and button text.
- *
- * @param {String} message Message to print in the body of the alert
- * @param {Function} completeCallback The callback that is called when user clicks on a button.
- * @param {String} title Title of the alert dialog (default: Alert)
- * @param {String} buttonLabel Label of the close button (default: OK)
- */
-Notification.prototype.alert = function(message, completeCallback, title, buttonLabel) {
- var _title = (title || "Alert");
- var _buttonLabel = (buttonLabel || "OK");
- PhoneGap.exec(completeCallback, null, "Notification", "alert", [message,_title,_buttonLabel]);
-};
-
-/**
- * Open a native confirm dialog, with a customizable title and button text.
- * The result that the user selects is returned to the result callback.
- *
- * @param {String} message Message to print in the body of the alert
- * @param {Function} resultCallback The callback that is called when user clicks on a button.
- * @param {String} title Title of the alert dialog (default: Confirm)
- * @param {String} buttonLabels Comma separated list of the labels of the buttons (default: 'OK,Cancel')
- */
-Notification.prototype.confirm = function(message, resultCallback, title, buttonLabels) {
- var _title = (title || "Confirm");
- var _buttonLabels = (buttonLabels || "OK,Cancel");
- PhoneGap.exec(resultCallback, null, "Notification", "confirm", [message,_title,_buttonLabels]);
-};
-
-/**
- * Start spinning the activity indicator on the statusbar
- */
-Notification.prototype.activityStart = function() {
- PhoneGap.exec(null, null, "Notification", "activityStart", ["Busy","Please wait..."]);
-};
-
-/**
- * Stop spinning the activity indicator on the statusbar, if it's currently spinning
- */
-Notification.prototype.activityStop = function() {
- PhoneGap.exec(null, null, "Notification", "activityStop", []);
-};
-
-/**
- * Display a progress dialog with progress bar that goes from 0 to 100.
- *
- * @param {String} title Title of the progress dialog.
- * @param {String} message Message to display in the dialog.
- */
-Notification.prototype.progressStart = function(title, message) {
- PhoneGap.exec(null, null, "Notification", "progressStart", [title, message]);
-};
-
-/**
- * Set the progress dialog value.
- *
- * @param {Number} value 0-100
- */
-Notification.prototype.progressValue = function(value) {
- PhoneGap.exec(null, null, "Notification", "progressValue", [value]);
-};
-
-/**
- * Close the progress dialog.
- */
-Notification.prototype.progressStop = function() {
- PhoneGap.exec(null, null, "Notification", "progressStop", []);
-};
-
-/**
- * Causes the device to blink a status LED.
- *
- * @param {Integer} count The number of blinks.
- * @param {String} colour The colour of the light.
- */
-Notification.prototype.blink = function(count, colour) {
- // NOT IMPLEMENTED
-};
-
-/**
- * Causes the device to vibrate.
- *
- * @param {Integer} mills The number of milliseconds to vibrate for.
- */
-Notification.prototype.vibrate = function(mills) {
- PhoneGap.exec(null, null, "Notification", "vibrate", [mills]);
-};
-
-/**
- * Causes the device to beep.
- * On Android, the default notification ringtone is played "count" times.
- *
- * @param {Integer} count The number of beeps.
- */
-Notification.prototype.beep = function(count) {
- PhoneGap.exec(null, null, "Notification", "beep", [count]);
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.notification === "undefined") {
- navigator.notification = new Notification();
- }
-});
-}
-/*
- * 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.
- */
-
-if (!PhoneGap.hasResource("position")) {
-PhoneGap.addResource("position");
-
-/**
- * This class contains position information.
- * @param {Object} lat
- * @param {Object} lng
- * @param {Object} acc
- * @param {Object} alt
- * @param {Object} altacc
- * @param {Object} head
- * @param {Object} vel
- * @constructor
- */
-var Position = function(coords, timestamp) {
- this.coords = coords;
- this.timestamp = (timestamp !== 'undefined') ? timestamp : new Date().getTime();
-};
-
-/** @constructor */
-var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {
- /**
- * The latitude of the position.
- */
- this.latitude = lat;
- /**
- * The longitude of the position,
- */
- this.longitude = lng;
- /**
- * The accuracy of the position.
- */
- this.accuracy = acc;
- /**
- * The altitude of the position.
- */
- this.altitude = alt;
- /**
- * The direction the device is moving at the position.
- */
- this.heading = head;
- /**
- * The velocity with which the device is moving at the position.
- */
- this.speed = vel;
- /**
- * The altitude accuracy of the position.
- */
- this.altitudeAccuracy = (altacc !== 'undefined') ? altacc : null;
-};
-
-/**
- * This class specifies the options for requesting position data.
- * @constructor
- */
-var PositionOptions = function() {
- /**
- * Specifies the desired position accuracy.
- */
- this.enableHighAccuracy = true;
- /**
- * The timeout after which if position data cannot be obtained the errorCallback
- * is called.
- */
- this.timeout = 10000;
-};
-
-/**
- * This class contains information about any GSP errors.
- * @constructor
- */
-var PositionError = function() {
- this.code = null;
- this.message = "";
-};
-
-PositionError.UNKNOWN_ERROR = 0;
-PositionError.PERMISSION_DENIED = 1;
-PositionError.POSITION_UNAVAILABLE = 2;
-PositionError.TIMEOUT = 3;
-}
-/*
- * 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.
- */
-
-/*
- * This is purely for the Android 1.5/1.6 HTML 5 Storage
- * I was hoping that Android 2.0 would deprecate this, but given the fact that
- * most manufacturers ship with Android 1.5 and do not do OTA Updates, this is required
- */
-
-if (!PhoneGap.hasResource("storage")) {
-PhoneGap.addResource("storage");
-
-/**
- * SQL result set object
- * PRIVATE METHOD
- * @constructor
- */
-var DroidDB_Rows = function() {
- this.resultSet = []; // results array
- this.length = 0; // number of rows
-};
-
-/**
- * Get item from SQL result set
- *
- * @param row The row number to return
- * @return The row object
- */
-DroidDB_Rows.prototype.item = function(row) {
- return this.resultSet[row];
-};
-
-/**
- * SQL result set that is returned to user.
- * PRIVATE METHOD
- * @constructor
- */
-var DroidDB_Result = function() {
- this.rows = new DroidDB_Rows();
-};
-
-/**
- * Storage object that is called by native code when performing queries.
- * PRIVATE METHOD
- * @constructor
- */
-var DroidDB = function() {
- this.queryQueue = {};
-};
-
-/**
- * Callback from native code when query is complete.
- * PRIVATE METHOD
- *
- * @param id Query id
- */
-DroidDB.prototype.completeQuery = function(id, data) {
- var query = this.queryQueue[id];
- if (query) {
- try {
- delete this.queryQueue[id];
-
- // Get transaction
- var tx = query.tx;
-
- // If transaction hasn't failed
- // Note: We ignore all query results if previous query
- // in the same transaction failed.
- if (tx && tx.queryList[id]) {
-
- // Save query results
- var r = new DroidDB_Result();
- r.rows.resultSet = data;
- r.rows.length = data.length;
- try {
- if (typeof query.successCallback === 'function') {
- query.successCallback(query.tx, r);
- }
- } catch (ex) {
- console.log("executeSql error calling user success callback: "+ex);
- }
-
- tx.queryComplete(id);
- }
- } catch (e) {
- console.log("executeSql error: "+e);
- }
- }
-};
-
-/**
- * Callback from native code when query fails
- * PRIVATE METHOD
- *
- * @param reason Error message
- * @param id Query id
- */
-DroidDB.prototype.fail = function(reason, id) {
- var query = this.queryQueue[id];
- if (query) {
- try {
- delete this.queryQueue[id];
-
- // Get transaction
- var tx = query.tx;
-
- // If transaction hasn't failed
- // Note: We ignore all query results if previous query
- // in the same transaction failed.
- if (tx && tx.queryList[id]) {
- tx.queryList = {};
-
- try {
- if (typeof query.errorCallback === 'function') {
- query.errorCallback(query.tx, reason);
- }
- } catch (ex) {
- console.log("executeSql error calling user error callback: "+ex);
- }
-
- tx.queryFailed(id, reason);
- }
-
- } catch (e) {
- console.log("executeSql error: "+e);
- }
- }
-};
-
-/**
- * SQL query object
- * PRIVATE METHOD
- *
- * @constructor
- * @param tx The transaction object that this query belongs to
- */
-var DroidDB_Query = function(tx) {
-
- // Set the id of the query
- this.id = PhoneGap.createUUID();
-
- // Add this query to the queue
- droiddb.queryQueue[this.id] = this;
-
- // Init result
- this.resultSet = [];
-
- // Set transaction that this query belongs to
- this.tx = tx;
-
- // Add this query to transaction list
- this.tx.queryList[this.id] = this;
-
- // Callbacks
- this.successCallback = null;
- this.errorCallback = null;
-
-};
-
-/**
- * Transaction object
- * PRIVATE METHOD
- * @constructor
- */
-var DroidDB_Tx = function() {
-
- // Set the id of the transaction
- this.id = PhoneGap.createUUID();
-
- // Callbacks
- this.successCallback = null;
- this.errorCallback = null;
-
- // Query list
- this.queryList = {};
-};
-
-/**
- * Mark query in transaction as complete.
- * If all queries are complete, call the user's transaction success callback.
- *
- * @param id Query id
- */
-DroidDB_Tx.prototype.queryComplete = function(id) {
- delete this.queryList[id];
-
- // If no more outstanding queries, then fire transaction success
- if (this.successCallback) {
- var count = 0;
- var i;
- for (i in this.queryList) {
- if (this.queryList.hasOwnProperty(i)) {
- count++;
- }
- }
- if (count === 0) {
- try {
- this.successCallback();
- } catch(e) {
- console.log("Transaction error calling user success callback: " + e);
- }
- }
- }
-};
-
-/**
- * Mark query in transaction as failed.
- *
- * @param id Query id
- * @param reason Error message
- */
-DroidDB_Tx.prototype.queryFailed = function(id, reason) {
-
- // The sql queries in this transaction have already been run, since
- // we really don't have a real transaction implemented in native code.
- // However, the user callbacks for the remaining sql queries in transaction
- // will not be called.
- this.queryList = {};
-
- if (this.errorCallback) {
- try {
- this.errorCallback(reason);
- } catch(e) {
- console.log("Transaction error calling user error callback: " + e);
- }
- }
-};
-
-/**
- * Execute SQL statement
- *
- * @param sql SQL statement to execute
- * @param params Statement parameters
- * @param successCallback Success callback
- * @param errorCallback Error callback
- */
-DroidDB_Tx.prototype.executeSql = function(sql, params, successCallback, errorCallback) {
-
- // Init params array
- if (typeof params === 'undefined') {
- params = [];
- }
-
- // Create query and add to queue
- var query = new DroidDB_Query(this);
- droiddb.queryQueue[query.id] = query;
-
- // Save callbacks
- query.successCallback = successCallback;
- query.errorCallback = errorCallback;
-
- // Call native code
- PhoneGap.exec(null, null, "Storage", "executeSql", [sql, params, query.id]);
-};
-
-var DatabaseShell = function() {
-};
-
-/**
- * Start a transaction.
- * Does not support rollback in event of failure.
- *
- * @param process {Function} The transaction function
- * @param successCallback {Function}
- * @param errorCallback {Function}
- */
-DatabaseShell.prototype.transaction = function(process, errorCallback, successCallback) {
- var tx = new DroidDB_Tx();
- tx.successCallback = successCallback;
- tx.errorCallback = errorCallback;
- try {
- process(tx);
- } catch (e) {
- console.log("Transaction error: "+e);
- if (tx.errorCallback) {
- try {
- tx.errorCallback(e);
- } catch (ex) {
- console.log("Transaction error calling user error callback: "+e);
- }
- }
- }
-};
-
-/**
- * Open database
- *
- * @param name Database name
- * @param version Database version
- * @param display_name Database display name
- * @param size Database size in bytes
- * @return Database object
- */
-var DroidDB_openDatabase = function(name, version, display_name, size) {
- PhoneGap.exec(null, null, "Storage", "openDatabase", [name, version, display_name, size]);
- var db = new DatabaseShell();
- return db;
-};
-
-/**
- * For browsers with no localStorage we emulate it with SQLite. Follows the w3c api.
- * TODO: Do similar for sessionStorage.
- */
-
-/**
- * @constructor
- */
-var CupcakeLocalStorage = function() {
- try {
-
- this.db = openDatabase('localStorage', '1.0', 'localStorage', 2621440);
- var storage = {};
- this.length = 0;
- function setLength (length) {
- this.length = length;
- localStorage.length = length;
- }
- this.db.transaction(
- function (transaction) {
- var i;
- transaction.executeSql('CREATE TABLE IF NOT EXISTS storage (id NVARCHAR(40) PRIMARY KEY, body NVARCHAR(255))');
- transaction.executeSql('SELECT * FROM storage', [], function(tx, result) {
- for(var i = 0; i < result.rows.length; i++) {
- storage[result.rows.item(i)['id']] = result.rows.item(i)['body'];
- }
- setLength(result.rows.length);
- PhoneGap.initializationComplete("cupcakeStorage");
- });
-
- },
- function (err) {
- alert(err.message);
- }
- );
- this.setItem = function(key, val) {
- if (typeof(storage[key])=='undefined') {
- this.length++;
- }
- storage[key] = val;
- this.db.transaction(
- function (transaction) {
- transaction.executeSql('CREATE TABLE IF NOT EXISTS storage (id NVARCHAR(40) PRIMARY KEY, body NVARCHAR(255))');
- transaction.executeSql('REPLACE INTO storage (id, body) values(?,?)', [key,val]);
- }
- );
- };
- this.getItem = function(key) {
- return storage[key];
- };
- this.removeItem = function(key) {
- delete storage[key];
- this.length--;
- this.db.transaction(
- function (transaction) {
- transaction.executeSql('CREATE TABLE IF NOT EXISTS storage (id NVARCHAR(40) PRIMARY KEY, body NVARCHAR(255))');
- transaction.executeSql('DELETE FROM storage where id=?', [key]);
- }
- );
- };
- this.clear = function() {
- storage = {};
- this.length = 0;
- this.db.transaction(
- function (transaction) {
- transaction.executeSql('CREATE TABLE IF NOT EXISTS storage (id NVARCHAR(40) PRIMARY KEY, body NVARCHAR(255))');
- transaction.executeSql('DELETE FROM storage', []);
- }
- );
- };
- this.key = function(index) {
- var i = 0;
- for (var j in storage) {
- if (i==index) {
- return j;
- } else {
- i++;
- }
- }
- return null;
- };
-
- } catch(e) {
- alert("Database error "+e+".");
- return;
- }
-};
-
-PhoneGap.addConstructor(function() {
- var setupDroidDB = function() {
- navigator.openDatabase = window.openDatabase = DroidDB_openDatabase;
- window.droiddb = new DroidDB();
- }
- if (typeof window.openDatabase === "undefined") {
- setupDroidDB();
- } else {
- window.openDatabase_orig = window.openDatabase;
- window.openDatabase = function(name, version, desc, size){
- // Some versions of Android will throw a SECURITY_ERR so we need
- // to catch the exception and seutp our own DB handling.
- var db = null;
- try {
- db = window.openDatabase_orig(name, version, desc, size);
- }
- catch (ex) {
- db = null;
- }
-
- if (db == null) {
- setupDroidDB();
- return DroidDB_openDatabase(name, version, desc, size);
- }
- else {
- return db;
- }
- };
- }
-
- if ((typeof window.localStorage == "undefined") || (window.localStorage == null)) {
- navigator.localStorage = window.localStorage = new CupcakeLocalStorage();
- PhoneGap.waitForInitialization("cupcakeStorage");
- }
-});
-}
diff --git a/apps/files_odfviewer/src/webodf/programs/android/assets/www/scripts.js b/apps/files_odfviewer/src/webodf/programs/android/assets/www/scripts.js
deleted file mode 100644
index dd3b76fb991..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/assets/www/scripts.js
+++ /dev/null
@@ -1,4123 +0,0 @@
-/* PhoneGap v1.4.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.
-*/
-
-
-/*
- * Some base contributions
- * Copyright (c) 2011, Proyectos Equis Ka, S.L.
- */
-
-if (typeof PhoneGap === "undefined") {
-
-if (typeof(DeviceInfo) !== 'object'){
- DeviceInfo = {};
-}
-/**
- * This represents the PhoneGap API itself, and provides a global namespace for accessing
- * information about the state of PhoneGap.
- * @class
- */
-PhoneGap = {
- // This queue holds the currently executing command and all pending
- // commands executed with PhoneGap.exec().
- commandQueue: [],
- // Indicates if we're currently in the middle of flushing the command
- // queue on the native side.
- commandQueueFlushing: false,
- _constructors: [],
- documentEventHandler: {}, // Collection of custom document event handlers
- windowEventHandler: {}
-};
-
-/**
- * List of resource files loaded by PhoneGap.
- * This is used to ensure JS and other files are loaded only once.
- */
-PhoneGap.resources = {base: true};
-
-/**
- * Determine if resource has been loaded by PhoneGap
- *
- * @param name
- * @return
- */
-PhoneGap.hasResource = function(name) {
- return PhoneGap.resources[name];
-};
-
-/**
- * Add a resource to list of loaded resources by PhoneGap
- *
- * @param name
- */
-PhoneGap.addResource = function(name) {
- PhoneGap.resources[name] = true;
-};
-
-/**
- * Boolean flag indicating if the PhoneGap API is available and initialized.
- */ // TODO: Remove this, it is unused here ... -jm
-PhoneGap.available = DeviceInfo.uuid != undefined;
-
-/**
- * Add an initialization function to a queue that ensures it will run and initialize
- * application constructors only once PhoneGap has been initialized.
- * @param {Function} func The function callback you want run once PhoneGap is initialized
- */
-PhoneGap.addConstructor = function(func) {
- var state = document.readyState;
- if ( ( state == 'loaded' || state == 'complete' ) && DeviceInfo.uuid != null )
- {
- func();
- }
- else
- {
- PhoneGap._constructors.push(func);
- }
-};
-
-(function()
- {
- var timer = setInterval(function()
- {
-
- var state = document.readyState;
-
- if ( ( state == 'loaded' || state == 'complete' ) && DeviceInfo.uuid != null )
- {
- clearInterval(timer); // stop looking
- // run our constructors list
- while (PhoneGap._constructors.length > 0)
- {
- var constructor = PhoneGap._constructors.shift();
- try
- {
- constructor();
- }
- catch(e)
- {
- if (typeof(console['log']) == 'function')
- {
- console.log("Failed to run constructor: " + console.processMessage(e));
- }
- else
- {
- alert("Failed to run constructor: " + e.message);
- }
- }
- }
- // all constructors run, now fire the deviceready event
- var e = document.createEvent('Events');
- e.initEvent('deviceready');
- document.dispatchEvent(e);
- }
- }, 1);
-})();
-
-// session id for calls
-PhoneGap.sessionKey = 0;
-
-// centralized callbacks
-PhoneGap.callbackId = 0;
-PhoneGap.callbacks = {};
-PhoneGap.callbackStatus = {
- NO_RESULT: 0,
- OK: 1,
- CLASS_NOT_FOUND_EXCEPTION: 2,
- ILLEGAL_ACCESS_EXCEPTION: 3,
- INSTANTIATION_EXCEPTION: 4,
- MALFORMED_URL_EXCEPTION: 5,
- IO_EXCEPTION: 6,
- INVALID_ACTION: 7,
- JSON_EXCEPTION: 8,
- ERROR: 9
- };
-
-/**
- * Creates a gap bridge iframe used to notify the native code about queued
- * commands.
- *
- * @private
- */
-PhoneGap.createGapBridge = function() {
- gapBridge = document.createElement("iframe");
- gapBridge.setAttribute("style", "display:none;");
- gapBridge.setAttribute("height","0px");
- gapBridge.setAttribute("width","0px");
- gapBridge.setAttribute("frameborder","0");
- document.documentElement.appendChild(gapBridge);
- return gapBridge;
-}
-
-/**
- * Execute a PhoneGap command by queuing it and letting the native side know
- * there are queued commands. The native side will then request all of the
- * queued commands and execute them.
- *
- * Arguments may be in one of two formats:
- *
- * FORMAT ONE (preferable)
- * The native side will call PhoneGap.callbackSuccess or
- * PhoneGap.callbackError, depending upon the result of the action.
- *
- * @param {Function} success The success callback
- * @param {Function} fail The fail callback
- * @param {String} service The name of the service to use
- * @param {String} action The name of the action to use
- * @param {String[]} [args] Zero or more arguments to pass to the method
- *
- * FORMAT TWO
- * @param {String} command Command to be run in PhoneGap, e.g.
- * "ClassName.method"
- * @param {String[]} [args] Zero or more arguments to pass to the method
- * object parameters are passed as an array object
- * [object1, object2] each object will be passed as
- * JSON strings
- */
-PhoneGap.exec = function() {
- if (!PhoneGap.available) {
- alert("ERROR: Attempting to call PhoneGap.exec()"
- +" before 'deviceready'. Ignoring.");
- return;
- }
-
- var successCallback, failCallback, service, action, actionArgs;
- var callbackId = null;
- if (typeof arguments[0] !== "string") {
- // FORMAT ONE
- successCallback = arguments[0];
- failCallback = arguments[1];
- service = arguments[2];
- action = arguments[3];
- actionArgs = arguments[4];
-
- // Since we need to maintain backwards compatibility, we have to pass
- // an invalid callbackId even if no callback was provided since plugins
- // will be expecting it. The PhoneGap.exec() implementation allocates
- // an invalid callbackId and passes it even if no callbacks were given.
- callbackId = 'INVALID';
- } else {
- // FORMAT TWO
- splitCommand = arguments[0].split(".");
- action = splitCommand.pop();
- service = splitCommand.join(".");
- actionArgs = Array.prototype.splice.call(arguments, 1);
- }
-
- // Start building the command object.
- var command = {
- className: service,
- methodName: action,
- arguments: []
- };
-
- // Register the callbacks and add the callbackId to the positional
- // arguments if given.
- if (successCallback || failCallback) {
- callbackId = service + PhoneGap.callbackId++;
- PhoneGap.callbacks[callbackId] =
- {success:successCallback, fail:failCallback};
- }
- if (callbackId != null) {
- command.arguments.push(callbackId);
- }
-
- for (var i = 0; i < actionArgs.length; ++i) {
- var arg = actionArgs[i];
- if (arg == undefined || arg == null) {
- continue;
- } else if (typeof(arg) == 'object') {
- command.options = arg;
- } else {
- command.arguments.push(arg);
- }
- }
-
- // Stringify and queue the command. We stringify to command now to
- // effectively clone the command arguments in case they are mutated before
- // the command is executed.
- PhoneGap.commandQueue.push(JSON.stringify(command));
-
- // If the queue length is 1, then that means it was empty before we queued
- // the given command, so let the native side know that we have some
- // commands to execute, unless the queue is currently being flushed, in
- // which case the command will be picked up without notification.
- if (PhoneGap.commandQueue.length == 1 && !PhoneGap.commandQueueFlushing) {
- if (!PhoneGap.gapBridge) {
- PhoneGap.gapBridge = PhoneGap.createGapBridge();
- }
-
- PhoneGap.gapBridge.src = "gap://ready";
- }
-}
-
-/**
- * Called by native code to retrieve all queued commands and clear the queue.
- */
-PhoneGap.getAndClearQueuedCommands = function() {
- json = JSON.stringify(PhoneGap.commandQueue);
- PhoneGap.commandQueue = [];
- return json;
-}
-
-/**
- * Called by native code when returning successful result from an action.
- *
- * @param callbackId
- * @param args
- * args.status - PhoneGap.callbackStatus
- * args.message - return value
- * args.keepCallback - 0 to remove callback, 1 to keep callback in PhoneGap.callbacks[]
- */
-PhoneGap.callbackSuccess = function(callbackId, args) {
- if (PhoneGap.callbacks[callbackId]) {
-
- // If result is to be sent to callback
- if (args.status == PhoneGap.callbackStatus.OK) {
- try {
- if (PhoneGap.callbacks[callbackId].success) {
- PhoneGap.callbacks[callbackId].success(args.message);
- }
- }
- catch (e) {
- console.log("Error in success callback: "+callbackId+" = "+e);
- }
- }
-
- // Clear callback if not expecting any more results
- if (!args.keepCallback) {
- delete PhoneGap.callbacks[callbackId];
- }
- }
-};
-
-/**
- * Called by native code when returning error result from an action.
- *
- * @param callbackId
- * @param args
- */
-PhoneGap.callbackError = function(callbackId, args) {
- if (PhoneGap.callbacks[callbackId]) {
- try {
- if (PhoneGap.callbacks[callbackId].fail) {
- PhoneGap.callbacks[callbackId].fail(args.message);
- }
- }
- catch (e) {
- console.log("Error in error callback: "+callbackId+" = "+e);
- }
-
- // Clear callback if not expecting any more results
- if (!args.keepCallback) {
- delete PhoneGap.callbacks[callbackId];
- }
- }
-};
-
-
-/**
- * Does a deep clone of the object.
- *
- * @param obj
- * @return
- */
-PhoneGap.clone = function(obj) {
- if(!obj) {
- return obj;
- }
-
- if(obj instanceof Array){
- var retVal = new Array();
- for(var i = 0; i < obj.length; ++i){
- retVal.push(PhoneGap.clone(obj[i]));
- }
- return retVal;
- }
-
- if (obj instanceof Function) {
- return obj;
- }
-
- if(!(obj instanceof Object)){
- return obj;
- }
-
- if (obj instanceof Date) {
- return obj;
- }
-
- retVal = new Object();
- for(i in obj){
- if(!(i in retVal) || retVal[i] != obj[i]) {
- retVal[i] = PhoneGap.clone(obj[i]);
- }
- }
- return retVal;
-};
-
-// Intercept calls to document.addEventListener
-PhoneGap.m_document_addEventListener = document.addEventListener;
-
-// Intercept calls to window.addEventListener
-PhoneGap.m_window_addEventListener = window.addEventListener;
-
-/**
- * Add a custom window event handler.
- *
- * @param {String} event The event name that callback handles
- * @param {Function} callback The event handler
- */
-PhoneGap.addWindowEventHandler = function(event, callback) {
- PhoneGap.windowEventHandler[event] = callback;
-}
-
-/**
- * Add a custom document event handler.
- *
- * @param {String} event The event name that callback handles
- * @param {Function} callback The event handler
- */
-PhoneGap.addDocumentEventHandler = function(event, callback) {
- PhoneGap.documentEventHandler[event] = callback;
-}
-
-/**
- * Intercept adding document event listeners and handle our own
- *
- * @param {Object} evt
- * @param {Function} handler
- * @param capture
- */
-document.addEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
-
- // If subscribing to an event that is handled by a plugin
- if (typeof PhoneGap.documentEventHandler[e] !== "undefined") {
- if (PhoneGap.documentEventHandler[e](e, handler, true)) {
- return; // Stop default behavior
- }
- }
-
- PhoneGap.m_document_addEventListener.call(document, evt, handler, capture);
-};
-
-/**
- * Intercept adding window event listeners and handle our own
- *
- * @param {Object} evt
- * @param {Function} handler
- * @param capture
- */
-window.addEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
-
- // If subscribing to an event that is handled by a plugin
- if (typeof PhoneGap.windowEventHandler[e] !== "undefined") {
- if (PhoneGap.windowEventHandler[e](e, handler, true)) {
- return; // Stop default behavior
- }
- }
-
- PhoneGap.m_window_addEventListener.call(window, evt, handler, capture);
-};
-
-// Intercept calls to document.removeEventListener and watch for events that
-// are generated by PhoneGap native code
-PhoneGap.m_document_removeEventListener = document.removeEventListener;
-
-// Intercept calls to window.removeEventListener
-PhoneGap.m_window_removeEventListener = window.removeEventListener;
-
-/**
- * Intercept removing document event listeners and handle our own
- *
- * @param {Object} evt
- * @param {Function} handler
- * @param capture
- */
-document.removeEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
-
- // If unsubcribing from an event that is handled by a plugin
- if (typeof PhoneGap.documentEventHandler[e] !== "undefined") {
- if (PhoneGap.documentEventHandler[e](e, handler, false)) {
- return; // Stop default behavior
- }
- }
-
- PhoneGap.m_document_removeEventListener.call(document, evt, handler, capture);
-};
-
-/**
- * Intercept removing window event listeners and handle our own
- *
- * @param {Object} evt
- * @param {Function} handler
- * @param capture
- */
-window.removeEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
-
- // If unsubcribing from an event that is handled by a plugin
- if (typeof PhoneGap.windowEventHandler[e] !== "undefined") {
- if (PhoneGap.windowEventHandler[e](e, handler, false)) {
- return; // Stop default behavior
- }
- }
-
- PhoneGap.m_window_removeEventListener.call(window, evt, handler, capture);
-};
-
-/**
- * Method to fire document event
- *
- * @param {String} type The event type to fire
- * @param {Object} data Data to send with event
- */
-PhoneGap.fireDocumentEvent = function(type, data) {
- var e = document.createEvent('Events');
- e.initEvent(type);
- if (data) {
- for (var i in data) {
- e[i] = data[i];
- }
- }
- document.dispatchEvent(e);
-};
-
-/**
- * Method to fire window event
- *
- * @param {String} type The event type to fire
- * @param {Object} data Data to send with event
- */
-PhoneGap.fireWindowEvent = function(type, data) {
- var e = document.createEvent('Events');
- e.initEvent(type);
- if (data) {
- for (var i in data) {
- e[i] = data[i];
- }
- }
- window.dispatchEvent(e);
-};
-
-/**
- * Method to fire event from native code
- * Leaving this generic version to handle problems with iOS 3.x. Is currently used by orientation and battery events
- * Remove when iOS 3.x no longer supported and call fireWindowEvent or fireDocumentEvent directly
- */
-PhoneGap.fireEvent = function(type, target, data) {
- var e = document.createEvent('Events');
- e.initEvent(type);
- if (data) {
- for (var i in data) {
- e[i] = data[i];
- }
- }
- target = target || document;
- if (target.dispatchEvent === undefined) { // ie window.dispatchEvent is undefined in iOS 3.x
- target = document;
- }
-
- target.dispatchEvent(e);
-};
-/**
- * Create a UUID
- *
- * @return
- */
-PhoneGap.createUUID = function() {
- return PhoneGap.UUIDcreatePart(4) + '-' +
- PhoneGap.UUIDcreatePart(2) + '-' +
- PhoneGap.UUIDcreatePart(2) + '-' +
- PhoneGap.UUIDcreatePart(2) + '-' +
- PhoneGap.UUIDcreatePart(6);
-};
-
-PhoneGap.UUIDcreatePart = function(length) {
- var uuidpart = "";
- for (var i=0; i<length; i++) {
- var uuidchar = parseInt((Math.random() * 256)).toString(16);
- if (uuidchar.length == 1) {
- uuidchar = "0" + uuidchar;
- }
- uuidpart += uuidchar;
- }
- return uuidpart;
-};
-};
-
-
-if (!PhoneGap.hasResource("debugconsole")) {
- PhoneGap.addResource("debugconsole");
-
-/**
- * This class provides access to the debugging console.
- * @constructor
- */
-var DebugConsole = function() {
- this.winConsole = window.console;
- this.logLevel = DebugConsole.INFO_LEVEL;
-}
-
-// from most verbose, to least verbose
-DebugConsole.ALL_LEVEL = 1; // same as first level
-DebugConsole.INFO_LEVEL = 1;
-DebugConsole.WARN_LEVEL = 2;
-DebugConsole.ERROR_LEVEL = 4;
-DebugConsole.NONE_LEVEL = 8;
-
-DebugConsole.prototype.setLevel = function(level) {
- this.logLevel = level;
-};
-
-/**
- * Utility function for rendering and indenting strings, or serializing
- * objects to a string capable of being printed to the console.
- * @param {Object|String} message The string or object to convert to an indented string
- * @private
- */
-DebugConsole.prototype.processMessage = function(message, maxDepth) {
- if (maxDepth === undefined) maxDepth = 0;
- if (typeof(message) != 'object') {
- return (this.isDeprecated ? "WARNING: debug object is deprecated, please use console object \n" + message : message);
- } else {
- /**
- * @function
- * @ignore
- */
- function indent(str) {
- return str.replace(/^/mg, " ");
- }
- /**
- * @function
- * @ignore
- */
- function makeStructured(obj, depth) {
- var str = "";
- for (var i in obj) {
- try {
- if (typeof(obj[i]) == 'object' && depth < maxDepth) {
- str += i + ":\n" + indent(makeStructured(obj[i])) + "\n";
- } else {
- str += i + " = " + indent(String(obj[i])).replace(/^ /, "") + "\n";
- }
- } catch(e) {
- str += i + " = EXCEPTION: " + e.message + "\n";
- }
- }
- return str;
- }
-
- return ("Object:\n" + makeStructured(message, maxDepth));
- }
-};
-
-/**
- * Print a normal log message to the console
- * @param {Object|String} message Message or object to print to the console
- */
-DebugConsole.prototype.log = function(message, maxDepth) {
- if (PhoneGap.available && this.logLevel <= DebugConsole.INFO_LEVEL)
- PhoneGap.exec(null, null, 'com.phonegap.debugconsole', 'log',
- [ this.processMessage(message, maxDepth), { logLevel: 'INFO' } ]
- );
- else
- this.winConsole.log(message);
-};
-
-/**
- * Print a warning message to the console
- * @param {Object|String} message Message or object to print to the console
- */
-DebugConsole.prototype.warn = function(message, maxDepth) {
- if (PhoneGap.available && this.logLevel <= DebugConsole.WARN_LEVEL)
- PhoneGap.exec(null, null, 'com.phonegap.debugconsole', 'log',
- [ this.processMessage(message, maxDepth), { logLevel: 'WARN' } ]
- );
- else
- this.winConsole.error(message);
-};
-
-/**
- * Print an error message to the console
- * @param {Object|String} message Message or object to print to the console
- */
-DebugConsole.prototype.error = function(message, maxDepth) {
- if (PhoneGap.available && this.logLevel <= DebugConsole.ERROR_LEVEL)
- PhoneGap.exec(null, null, 'com.phonegap.debugconsole', 'log',
- [ this.processMessage(message, maxDepth), { logLevel: 'ERROR' } ]
- );
- else
- this.winConsole.error(message);
-};
-
-PhoneGap.addConstructor(function() {
- window.console = new DebugConsole();
-});
-};
-if (!PhoneGap.hasResource("position")) {
- PhoneGap.addResource("position");
-
-/**
- * This class contains position information.
- * @param {Object} lat
- * @param {Object} lng
- * @param {Object} acc
- * @param {Object} alt
- * @param {Object} altAcc
- * @param {Object} head
- * @param {Object} vel
- * @constructor
- */
-Position = function(coords, timestamp) {
- this.coords = Coordinates.cloneFrom(coords);
- this.timestamp = timestamp || new Date().getTime();
-};
-
-Position.prototype.equals = function(other) {
- return (this.coords && other && other.coords &&
- this.coords.latitude == other.coords.latitude &&
- this.coords.longitude == other.coords.longitude);
-};
-
-Position.prototype.clone = function()
-{
- return new Position(
- this.coords? this.coords.clone() : null,
- this.timestamp? this.timestamp : new Date().getTime()
- );
-}
-
-Coordinates = function(lat, lng, alt, acc, head, vel, altAcc) {
- /**
- * The latitude of the position.
- */
- this.latitude = lat;
- /**
- * The longitude of the position,
- */
- this.longitude = lng;
- /**
- * The altitude of the position.
- */
- this.altitude = alt;
- /**
- * The accuracy of the position.
- */
- this.accuracy = acc;
- /**
- * The direction the device is moving at the position.
- */
- this.heading = head;
- /**
- * The velocity with which the device is moving at the position.
- */
- this.speed = vel;
- /**
- * The altitude accuracy of the position.
- */
- this.altitudeAccuracy = (altAcc != 'undefined') ? altAcc : null;
-};
-
-Coordinates.prototype.clone = function()
-{
- return new Coordinates(
- this.latitude,
- this.longitude,
- this.altitude,
- this.accuracy,
- this.heading,
- this.speed,
- this.altitudeAccuracy
- );
-};
-
-Coordinates.cloneFrom = function(obj)
-{
- return new Coordinates(
- obj.latitude,
- obj.longitude,
- obj.altitude,
- obj.accuracy,
- obj.heading,
- obj.speed,
- obj.altitudeAccuracy
- );
-};
-
-/**
- * This class specifies the options for requesting position data.
- * @constructor
- */
-PositionOptions = function(enableHighAccuracy, timeout, maximumAge) {
- /**
- * Specifies the desired position accuracy.
- */
- this.enableHighAccuracy = enableHighAccuracy || false;
- /**
- * The timeout after which if position data cannot be obtained the errorCallback
- * is called.
- */
- this.timeout = timeout || 10000;
- /**
- * The age of a cached position whose age is no greater than the specified time
- * in milliseconds.
- */
- this.maximumAge = maximumAge || 0;
-
- if (this.maximumAge < 0) {
- this.maximumAge = 0;
- }
-};
-
-/**
- * This class contains information about any GPS errors.
- * @constructor
- */
-PositionError = function(code, message) {
- this.code = code || 0;
- this.message = message || "";
-};
-
-PositionError.UNKNOWN_ERROR = 0;
-PositionError.PERMISSION_DENIED = 1;
-PositionError.POSITION_UNAVAILABLE = 2;
-PositionError.TIMEOUT = 3;
-
-};if (!PhoneGap.hasResource("acceleration")) {
- PhoneGap.addResource("acceleration");
-
-
-/**
- * This class contains acceleration information
- * @constructor
- * @param {Number} x The force applied by the device in the x-axis.
- * @param {Number} y The force applied by the device in the y-axis.
- * @param {Number} z The force applied by the device in the z-axis.
- */
-Acceleration = function(x, y, z) {
- /**
- * The force applied by the device in the x-axis.
- */
- this.x = x;
- /**
- * The force applied by the device in the y-axis.
- */
- this.y = y;
- /**
- * The force applied by the device in the z-axis.
- */
- this.z = z;
- /**
- * The time that the acceleration was obtained.
- */
- this.timestamp = new Date().getTime();
-}
-
-/**
- * This class specifies the options for requesting acceleration data.
- * @constructor
- */
-AccelerationOptions = function() {
- /**
- * The timeout after which if acceleration data cannot be obtained the errorCallback
- * is called.
- */
- this.timeout = 10000;
-}
-};if (!PhoneGap.hasResource("accelerometer")) {
- PhoneGap.addResource("accelerometer");
-
-/**
- * This class provides access to device accelerometer data.
- * @constructor
- */
-Accelerometer = function()
-{
- /**
- * The last known acceleration.
- */
- this.lastAcceleration = new Acceleration(0,0,0);
-}
-
-/**
- * Asynchronously aquires the current acceleration.
- * @param {Function} successCallback The function to call when the acceleration
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the acceleration data.
- * @param {AccelerationOptions} options The options for getting the accelerometer data
- * such as timeout.
- */
-Accelerometer.prototype.getCurrentAcceleration = function(successCallback, errorCallback, options) {
- // If the acceleration is available then call success
- // If the acceleration is not available then call error
-
- // Created for iPhone, Iphone passes back _accel obj litteral
- if (typeof successCallback == "function") {
- successCallback(this.lastAcceleration);
- }
-};
-
-// private callback called from Obj-C by name
-Accelerometer.prototype._onAccelUpdate = function(x,y,z)
-{
- this.lastAcceleration = new Acceleration(x,y,z);
-};
-
-/**
- * Asynchronously aquires the acceleration repeatedly at a given interval.
- * @param {Function} successCallback The function to call each time the acceleration
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the acceleration data.
- * @param {AccelerationOptions} options The options for getting the accelerometer data
- * such as timeout.
- */
-
-Accelerometer.prototype.watchAcceleration = function(successCallback, errorCallback, options) {
- //this.getCurrentAcceleration(successCallback, errorCallback, options);
- // TODO: add the interval id to a list so we can clear all watches
- var frequency = (options != undefined && options.frequency != undefined) ? options.frequency : 10000;
- var updatedOptions = {
- desiredFrequency:frequency
- }
- PhoneGap.exec(null, null, "com.phonegap.accelerometer", "start", [options]);
-
- return setInterval(function() {
- navigator.accelerometer.getCurrentAcceleration(successCallback, errorCallback, options);
- }, frequency);
-};
-
-/**
- * Clears the specified accelerometer watch.
- * @param {String} watchId The ID of the watch returned from #watchAcceleration.
- */
-Accelerometer.prototype.clearWatch = function(watchId) {
- PhoneGap.exec(null, null, "com.phonegap.accelerometer", "stop", []);
- clearInterval(watchId);
-};
-
-Accelerometer.install = function()
-{
- if (typeof navigator.accelerometer == "undefined") {
- navigator.accelerometer = new Accelerometer();
- }
-};
-
-Accelerometer.installDeviceMotionHandler = function()
-{
- if (!(window.DeviceMotionEvent == undefined)) {
- // supported natively, so we don't have to add support
- return;
- }
-
- var self = this;
- var devicemotionEvent = 'devicemotion';
- self.deviceMotionWatchId = null;
- self.deviceMotionListenerCount = 0;
- self.deviceMotionLastEventTimestamp = 0;
-
- // backup original `window.addEventListener`, `window.removeEventListener`
- var _addEventListener = window.addEventListener;
- var _removeEventListener = window.removeEventListener;
-
- var windowDispatchAvailable = !(window.dispatchEvent === undefined); // undefined in iOS 3.x
-
- var accelWin = function(acceleration) {
- var evt = document.createEvent('Events');
- evt.initEvent(devicemotionEvent);
-
- evt.acceleration = null; // not all devices have gyroscope, don't care for now if we actually have it.
- evt.rotationRate = null; // not all devices have gyroscope, don't care for now if we actually have it:
- evt.accelerationIncludingGravity = acceleration; // accelerometer, all iOS devices have it
-
- var currentTime = new Date().getTime();
- evt.interval = (self.deviceMotionLastEventTimestamp == 0) ? 0 : (currentTime - self.deviceMotionLastEventTimestamp);
- self.deviceMotionLastEventTimestamp = currentTime;
-
- if (windowDispatchAvailable) {
- window.dispatchEvent(evt);
- } else {
- document.dispatchEvent(evt);
- }
- };
-
- var accelFail = function() {
-
- };
-
- // override `window.addEventListener`
- window.addEventListener = function() {
- if (arguments[0] === devicemotionEvent) {
- ++(self.deviceMotionListenerCount);
- if (self.deviceMotionListenerCount == 1) { // start
- self.deviceMotionWatchId = navigator.accelerometer.watchAcceleration(accelWin, accelFail, { frequency:500});
- }
- }
-
- if (!windowDispatchAvailable) {
- return document.addEventListener.apply(this, arguments);
- } else {
- return _addEventListener.apply(this, arguments);
- }
- };
-
- // override `window.removeEventListener'
- window.removeEventListener = function() {
- if (arguments[0] === devicemotionEvent) {
- --(self.deviceMotionListenerCount);
- if (self.deviceMotionListenerCount == 0) { // stop
- navigator.accelerometer.clearWatch(self.deviceMotionWatchId);
- }
- }
-
- if (!windowDispatchAvailable) {
- return document.removeEventListener.apply(this, arguments);
- } else {
- return _removeEventListener.apply(this, arguments);
- }
- };
-};
-
-
-PhoneGap.addConstructor(Accelerometer.install);
-PhoneGap.addConstructor(Accelerometer.installDeviceMotionHandler);
-
-};
-if (!PhoneGap.hasResource("battery")) {
-PhoneGap.addResource("battery");
-
-/**
- * This class contains information about the current battery status.
- * @constructor
- */
-var Battery = function() {
- this._level = null;
- this._isPlugged = null;
- this._batteryListener = [];
- this._lowListener = [];
- this._criticalListener = [];
-};
-
-/**
- * Registers as an event producer for battery events.
- *
- * @param {Object} eventType
- * @param {Object} handler
- * @param {Object} add
- */
-Battery.prototype.eventHandler = function(eventType, handler, add) {
- var me = navigator.battery;
- if (add) {
- // If there are no current registered event listeners start the battery listener on native side.
- if (me._batteryListener.length === 0 && me._lowListener.length === 0 && me._criticalListener.length === 0) {
- PhoneGap.exec(me._status, me._error, "com.phonegap.battery", "start", []);
- }
-
- // Register the event listener in the proper array
- if (eventType === "batterystatus") {
- var pos = me._batteryListener.indexOf(handler);
- if (pos === -1) {
- me._batteryListener.push(handler);
- }
- } else if (eventType === "batterylow") {
- var pos = me._lowListener.indexOf(handler);
- if (pos === -1) {
- me._lowListener.push(handler);
- }
- } else if (eventType === "batterycritical") {
- var pos = me._criticalListener.indexOf(handler);
- if (pos === -1) {
- me._criticalListener.push(handler);
- }
- }
- } else {
- // Remove the event listener from the proper array
- if (eventType === "batterystatus") {
- var pos = me._batteryListener.indexOf(handler);
- if (pos > -1) {
- me._batteryListener.splice(pos, 1);
- }
- } else if (eventType === "batterylow") {
- var pos = me._lowListener.indexOf(handler);
- if (pos > -1) {
- me._lowListener.splice(pos, 1);
- }
- } else if (eventType === "batterycritical") {
- var pos = me._criticalListener.indexOf(handler);
- if (pos > -1) {
- me._criticalListener.splice(pos, 1);
- }
- }
-
- // If there are no more registered event listeners stop the battery listener on native side.
- if (me._batteryListener.length === 0 && me._lowListener.length === 0 && me._criticalListener.length === 0) {
- PhoneGap.exec(null, null, "com.phonegap.battery", "stop", []);
- }
- }
-};
-
-/**
- * Callback for battery status
- *
- * @param {Object} info keys: level, isPlugged
- */
-Battery.prototype._status = function(info) {
- if (info) {
- var me = this;
- if (me._level != info.level || me._isPlugged != info.isPlugged) {
- // Fire batterystatus event
- //PhoneGap.fireWindowEvent("batterystatus", info);
- // use this workaround since iOS 3.x does have window.dispatchEvent
- PhoneGap.fireEvent("batterystatus", window, info);
-
- // Fire low battery event
- if (info.level == 20 || info.level == 5) {
- if (info.level == 20) {
- //PhoneGap.fireWindowEvent("batterylow", info);
- // use this workaround since iOS 3.x does not have window.dispatchEvent
- PhoneGap.fireEvent("batterylow", window, info);
- }
- else {
- //PhoneGap.fireWindowEvent("batterycritical", info);
- // use this workaround since iOS 3.x does not have window.dispatchEvent
- PhoneGap.fireEvent("batterycritical", window, info);
- }
- }
- }
- me._level = info.level;
- me._isPlugged = info.isPlugged;
- }
-};
-
-/**
- * Error callback for battery start
- */
-Battery.prototype._error = function(e) {
- console.log("Error initializing Battery: " + e);
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.battery === "undefined") {
- navigator.battery = new Battery();
- PhoneGap.addWindowEventHandler("batterystatus", navigator.battery.eventHandler);
- PhoneGap.addWindowEventHandler("batterylow", navigator.battery.eventHandler);
- PhoneGap.addWindowEventHandler("batterycritical", navigator.battery.eventHandler);
- }
-});
-}if (!PhoneGap.hasResource("camera")) {
- PhoneGap.addResource("camera");
-
-
-/**
- * This class provides access to the device camera.
- * @constructor
- */
-Camera = function() {
-
-}
-/**
- * Available Camera Options
- * {boolean} allowEdit - true to allow editing image, default = false
- * {number} quality 0-100 (low to high) default = 100
- * {Camera.DestinationType} destinationType default = DATA_URL
- * {Camera.PictureSourceType} sourceType default = CAMERA
- * {number} targetWidth - width in pixels to scale image default = 0 (no scaling)
- * {number} targetHeight - height in pixels to scale image default = 0 (no scaling)
- * {Camera.EncodingType} - encodingType default = JPEG
- * {boolean} correctOrientation - Rotate the image to correct for the orientation of the device during capture (iOS only)
- * {boolean} saveToPhotoAlbum - Save the image to the photo album on the device after capture (iOS only)
- */
-/**
- * Format of image that is returned from getPicture.
- *
- * Example: navigator.camera.getPicture(success, fail,
- * { quality: 80,
- * destinationType: Camera.DestinationType.DATA_URL,
- * sourceType: Camera.PictureSourceType.PHOTOLIBRARY})
- */
-Camera.DestinationType = {
- DATA_URL: 0, // Return base64 encoded string
- FILE_URI: 1 // Return file uri
-};
-Camera.prototype.DestinationType = Camera.DestinationType;
-
-/**
- * Source to getPicture from.
- *
- * Example: navigator.camera.getPicture(success, fail,
- * { quality: 80,
- * destinationType: Camera.DestinationType.DATA_URL,
- * sourceType: Camera.PictureSourceType.PHOTOLIBRARY})
- */
-Camera.PictureSourceType = {
- PHOTOLIBRARY : 0, // Choose image from picture library
- CAMERA : 1, // Take picture from camera
- SAVEDPHOTOALBUM : 2 // Choose image from picture library
-};
-Camera.prototype.PictureSourceType = Camera.PictureSourceType;
-
-/**
- * Encoding of image returned from getPicture.
- *
- * Example: navigator.camera.getPicture(success, fail,
- * { quality: 80,
- * destinationType: Camera.DestinationType.DATA_URL,
- * sourceType: Camera.PictureSourceType.CAMERA,
- * encodingType: Camera.EncodingType.PNG})
- */
-Camera.EncodingType = {
- JPEG: 0, // Return JPEG encoded image
- PNG: 1 // Return PNG encoded image
-};
-Camera.prototype.EncodingType = Camera.EncodingType;
-
-/**
- * Type of pictures to select from. Only applicable when
- * PictureSourceType is PHOTOLIBRARY or SAVEDPHOTOALBUM
- *
- * Example: navigator.camera.getPicture(success, fail,
- * { quality: 80,
- * destinationType: Camera.DestinationType.DATA_URL,
- * sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
- * mediaType: Camera.MediaType.PICTURE})
- */
-Camera.MediaType = {
- PICTURE: 0, // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
- VIDEO: 1, // allow selection of video only, ONLY RETURNS URL
- ALLMEDIA : 2 // allow selection from all media types
-};
-Camera.prototype.MediaType = Camera.MediaType;
-
-/**
- * Gets a picture from source defined by "options.sourceType", and returns the
- * image as defined by the "options.destinationType" option.
-
- * The defaults are sourceType=CAMERA and destinationType=DATA_URL.
- *
- * @param {Function} successCallback
- * @param {Function} errorCallback
- * @param {Object} options
- */
-Camera.prototype.getPicture = function(successCallback, errorCallback, options) {
- // successCallback required
- if (typeof successCallback != "function") {
- console.log("Camera Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback != "function")) {
- console.log("Camera Error: errorCallback is not a function");
- return;
- }
-
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.camera","getPicture",[options]);
-};
-
-
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.camera == "undefined") navigator.camera = new Camera();
-});
-};
-
-if (!PhoneGap.hasResource("device")) {
- PhoneGap.addResource("device");
-
-/**
- * this represents the mobile device, and provides properties for inspecting the model, version, UUID of the
- * phone, etc.
- * @constructor
- */
-Device = function()
-{
- this.platform = null;
- this.version = null;
- this.name = null;
- this.phonegap = null;
- this.uuid = null;
- try
- {
- this.platform = DeviceInfo.platform;
- this.version = DeviceInfo.version;
- this.name = DeviceInfo.name;
- this.phonegap = DeviceInfo.gap;
- this.uuid = DeviceInfo.uuid;
-
- }
- catch(e)
- {
- // TODO:
- }
- this.available = PhoneGap.available = this.uuid != null;
-}
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.device === "undefined") {
- navigator.device = window.device = new Device();
- }
-});
-};
-if (!PhoneGap.hasResource("capture")) {
- PhoneGap.addResource("capture");
-/**
- * The CaptureError interface encapsulates all errors in the Capture API.
- */
-function CaptureError() {
- this.code = null;
-};
-
-// Capture error codes
-CaptureError.CAPTURE_INTERNAL_ERR = 0;
-CaptureError.CAPTURE_APPLICATION_BUSY = 1;
-CaptureError.CAPTURE_INVALID_ARGUMENT = 2;
-CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
-CaptureError.CAPTURE_NOT_SUPPORTED = 20;
-
-/**
- * The Capture interface exposes an interface to the camera and microphone of the hosting device.
- */
-function Capture() {
- this.supportedAudioModes = [];
- this.supportedImageModes = [];
- this.supportedVideoModes = [];
-};
-
-/**
- * Launch audio recorder application for recording audio clip(s).
- *
- * @param {Function} successCB
- * @param {Function} errorCB
- * @param {CaptureAudioOptions} options
- *
- * No audio recorder to launch for iOS - return CAPTURE_NOT_SUPPORTED
- */
-Capture.prototype.captureAudio = function(successCallback, errorCallback, options) {
- /*if (errorCallback && typeof errorCallback === "function") {
- errorCallback({
- "code": CaptureError.CAPTURE_NOT_SUPPORTED
- });
- }*/
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.mediacapture", "captureAudio", [options]);
-};
-
-/**
- * Launch camera application for taking image(s).
- *
- * @param {Function} successCB
- * @param {Function} errorCB
- * @param {CaptureImageOptions} options
- */
-Capture.prototype.captureImage = function(successCallback, errorCallback, options) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.mediacapture", "captureImage", [options]);
-};
-
-/**
- * Casts a PluginResult message property (array of objects) to an array of MediaFile objects
- * (used in Objective-C)
- *
- * @param {PluginResult} pluginResult
- */
-Capture.prototype._castMediaFile = function(pluginResult) {
- var mediaFiles = [];
- var i;
- for (i=0; i<pluginResult.message.length; i++) {
- var mediaFile = new MediaFile();
- mediaFile.name = pluginResult.message[i].name;
- mediaFile.fullPath = pluginResult.message[i].fullPath;
- mediaFile.type = pluginResult.message[i].type;
- mediaFile.lastModifiedDate = pluginResult.message[i].lastModifiedDate;
- mediaFile.size = pluginResult.message[i].size;
- mediaFiles.push(mediaFile);
- }
- pluginResult.message = mediaFiles;
- return pluginResult;
-};
-
-/**
- * Launch device camera application for recording video(s).
- *
- * @param {Function} successCB
- * @param {Function} errorCB
- * @param {CaptureVideoOptions} options
- */
-Capture.prototype.captureVideo = function(successCallback, errorCallback, options) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.mediacapture", "captureVideo", [options]);
-};
-
-/**
- * Encapsulates a set of parameters that the capture device supports.
- */
-function ConfigurationData() {
- // The ASCII-encoded string in lower case representing the media type.
- this.type;
- // The height attribute represents height of the image or video in pixels.
- // In the case of a sound clip this attribute has value 0.
- this.height = 0;
- // The width attribute represents width of the image or video in pixels.
- // In the case of a sound clip this attribute has value 0
- this.width = 0;
-};
-
-/**
- * Encapsulates all image capture operation configuration options.
- */
-var CaptureImageOptions = function() {
- // Upper limit of images user can take. Value must be equal or greater than 1.
- this.limit = 1;
- // The selected image mode. Must match with one of the elements in supportedImageModes array.
- this.mode = null;
-};
-
-/**
- * Encapsulates all video capture operation configuration options.
- */
-var CaptureVideoOptions = function() {
- // Upper limit of videos user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single video clip in seconds.
- this.duration = 0;
- // The selected video mode. Must match with one of the elements in supportedVideoModes array.
- this.mode = null;
-};
-
-/**
- * Encapsulates all audio capture operation configuration options.
- */
-var CaptureAudioOptions = function() {
- // Upper limit of sound clips user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single sound clip in seconds.
- this.duration = 0;
- // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
- this.mode = null;
-};
-
-/**
- * Represents a single file.
- *
- * name {DOMString} name of the file, without path information
- * fullPath {DOMString} the full path of the file, including the name
- * type {DOMString} mime type
- * lastModifiedDate {Date} last modified date
- * size {Number} size of the file in bytes
- */
-function MediaFile(name, fullPath, type, lastModifiedDate, size) {
- this.name = name || null;
- this.fullPath = fullPath || null;
- this.type = type || null;
- this.lastModifiedDate = lastModifiedDate || null;
- this.size = size || 0;
-}
-
-/**
- * Request capture format data for a specific file and type
- *
- * @param {Function} successCB
- * @param {Function} errorCB
- */
-MediaFile.prototype.getFormatData = function(successCallback, errorCallback) {
- if (typeof this.fullPath === "undefined" || this.fullPath === null) {
- errorCallback({
- "code": CaptureError.CAPTURE_INVALID_ARGUMENT
- });
- } else {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.mediacapture", "getFormatData", [this.fullPath, this.type]);
- }
-};
-
-/**
- * MediaFileData encapsulates format information of a media file.
- *
- * @param {DOMString} codecs
- * @param {long} bitrate
- * @param {long} height
- * @param {long} width
- * @param {float} duration
- */
-function MediaFileData(codecs, bitrate, height, width, duration) {
- this.codecs = codecs || null;
- this.bitrate = bitrate || 0;
- this.height = height || 0;
- this.width = width || 0;
- this.duration = duration || 0;
-}
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.device === "undefined") {
- navigator.device = window.device = new Device();
- }
- if (typeof navigator.device.capture === "undefined") {
- navigator.device.capture = window.device.capture = new Capture();
- }
-});
-};
-if (!PhoneGap.hasResource("contact")) {
- PhoneGap.addResource("contact");
-
-
-/**
-* Contains information about a single contact.
-* @param {DOMString} id unique identifier
-* @param {DOMString} displayName
-* @param {ContactName} name
-* @param {DOMString} nickname
-* @param {ContactField[]} phoneNumbers array of phone numbers
-* @param {ContactField[]} emails array of email addresses
-* @param {ContactAddress[]} addresses array of addresses
-* @param {ContactField[]} ims instant messaging user ids
-* @param {ContactOrganization[]} organizations
-* @param {DOMString} birthday contact's birthday
-* @param {DOMString} note user notes about contact
-* @param {ContactField[]} photos
-* @param {Array.<ContactField>} categories
-* @param {ContactField[]} urls contact's web sites
-*/
-var Contact = function(id, displayName, name, nickname, phoneNumbers, emails, addresses,
- ims, organizations, birthday, note, photos, categories, urls) {
- this.id = id || null;
- this.displayName = displayName || null;
- this.name = name || null; // ContactName
- this.nickname = nickname || null;
- this.phoneNumbers = phoneNumbers || null; // ContactField[]
- this.emails = emails || null; // ContactField[]
- this.addresses = addresses || null; // ContactAddress[]
- this.ims = ims || null; // ContactField[]
- this.organizations = organizations || null; // ContactOrganization[]
- this.birthday = birthday || null; // JS Date
- this.note = note || null;
- this.photos = photos || null; // ContactField[]
- this.categories = categories || null;
- this.urls = urls || null; // ContactField[]
-};
-
-/**
-* Converts Dates to milliseconds before sending to iOS
-*/
-Contact.prototype.convertDatesOut = function()
-{
- var dates = new Array("birthday");
- for (var i=0; i<dates.length; i++){
- var value = this[dates[i]];
- if (value){
- if (!value instanceof Date){
- try {
- value = new Date(value);
- } catch(exception){
- value = null;
- }
- }
- if (value instanceof Date){
- value = value.valueOf();
- }
- this[dates[i]] = value;
- }
- }
-
-};
-/**
-* Converts milliseconds to JS Date when returning from iOS
-*/
-Contact.prototype.convertDatesIn = function()
-{
- var dates = new Array("birthday");
- for (var i=0; i<dates.length; i++){
- var value = this[dates[i]];
- if (value){
- try {
- this[dates[i]] = new Date(parseFloat(value));
- } catch (exception){
- console.log("exception creating date");
- }
- }
- }
-};
-/**
-* Removes contact from device storage.
-* @param successCB success callback
-* @param errorCB error callback (optional)
-*/
-Contact.prototype.remove = function(successCB, errorCB) {
- if (this.id == null) {
- var errorObj = new ContactError();
- errorObj.code = ContactError.UNKNOWN_ERROR;
- errorCB(errorObj);
- }
- else {
- PhoneGap.exec(successCB, errorCB, "com.phonegap.contacts", "remove", [{ "contact": this}]);
- }
-};
-/**
-* iOS ONLY
-* displays contact via iOS UI
-* NOT part of W3C spec so no official documentation
-*
-* @param errorCB error callback
-* @param options object
-* allowsEditing: boolean AS STRING
-* "true" to allow editing the contact
-* "false" (default) display contact
-*/
-Contact.prototype.display = function(errorCB, options) {
- if (this.id == null) {
- if (typeof errorCB == "function") {
- var errorObj = new ContactError();
- errorObj.code = ContactError.UNKNOWN_ERROR;
- errorCB(errorObj);
- }
- }
- else {
- PhoneGap.exec(null, errorCB, "com.phonegap.contacts","displayContact", [this.id, options]);
- }
-};
-
-/**
-* Creates a deep copy of this Contact.
-* With the contact ID set to null.
-* @return copy of this Contact
-*/
-Contact.prototype.clone = function() {
- var clonedContact = PhoneGap.clone(this);
- clonedContact.id = null;
- // Loop through and clear out any id's in phones, emails, etc.
- if (clonedContact.phoneNumbers) {
- for (i=0; i<clonedContact.phoneNumbers.length; i++) {
- clonedContact.phoneNumbers[i].id = null;
- }
- }
- if (clonedContact.emails) {
- for (i=0; i<clonedContact.emails.length; i++) {
- clonedContact.emails[i].id = null;
- }
- }
- if (clonedContact.addresses) {
- for (i=0; i<clonedContact.addresses.length; i++) {
- clonedContact.addresses[i].id = null;
- }
- }
- if (clonedContact.ims) {
- for (i=0; i<clonedContact.ims.length; i++) {
- clonedContact.ims[i].id = null;
- }
- }
- if (clonedContact.organizations) {
- for (i=0; i<clonedContact.organizations.length; i++) {
- clonedContact.organizations[i].id = null;
- }
- }
- if (clonedContact.photos) {
- for (i=0; i<clonedContact.photos.length; i++) {
- clonedContact.photos[i].id = null;
- }
- }
- if (clonedContact.urls) {
- for (i=0; i<clonedContact.urls.length; i++) {
- clonedContact.urls[i].id = null;
- }
- }
- return clonedContact;
-};
-
-/**
-* Persists contact to device storage.
-* @param successCB success callback
-* @param errorCB error callback - optional
-*/
-Contact.prototype.save = function(successCB, errorCB) {
- // don't modify the original contact
- var cloned = PhoneGap.clone(this);
- cloned.convertDatesOut();
- PhoneGap.exec(successCB, errorCB, "com.phonegap.contacts","save", [{"contact": cloned}]);
-};
-
-/**
-* Contact name.
-* @param formatted
-* @param familyName
-* @param givenName
-* @param middle
-* @param prefix
-* @param suffix
-*/
-var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
- this.formatted = formatted != "undefined" ? formatted : null;
- this.familyName = familyName != "undefined" ? familyName : null;
- this.givenName = givenName != "undefined" ? givenName : null;
- this.middleName = middle != "undefined" ? middle : null;
- this.honorificPrefix = prefix != "undefined" ? prefix : null;
- this.honorificSuffix = suffix != "undefined" ? suffix : null;
-};
-
-/**
-* Generic contact field.
-* @param type
-* @param value
-* @param pref
-* @param id
-*/
-var ContactField = function(type, value, pref, id) {
- this.type = type != "undefined" ? type : null;
- this.value = value != "undefined" ? value : null;
- this.pref = pref != "undefined" ? pref : null;
- this.id = id != "undefined" ? id : null;
-};
-
-/**
-* Contact address.
-* @param pref - boolean is primary / preferred address
-* @param type - string - work, home…..
-* @param formatted
-* @param streetAddress
-* @param locality
-* @param region
-* @param postalCode
-* @param country
-*/
-var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country, id) {
- this.pref = pref != "undefined" ? pref : null;
- this.type = type != "undefined" ? type : null;
- this.formatted = formatted != "undefined" ? formatted : null;
- this.streetAddress = streetAddress != "undefined" ? streetAddress : null;
- this.locality = locality != "undefined" ? locality : null;
- this.region = region != "undefined" ? region : null;
- this.postalCode = postalCode != "undefined" ? postalCode : null;
- this.country = country != "undefined" ? country : null;
- this.id = id != "undefined" ? id : null;
-};
-
-/**
-* Contact organization.
-* @param pref - boolean is primary / preferred address
-* @param type - string - work, home…..
-* @param name
-* @param dept
-* @param title
-*/
-var ContactOrganization = function(pref, type, name, dept, title) {
- this.pref = pref != "undefined" ? pref : null;
- this.type = type != "undefined" ? type : null;
- this.name = name != "undefined" ? name : null;
- this.department = dept != "undefined" ? dept : null;
- this.title = title != "undefined" ? title : null;
-};
-
-/**
-* Contact account.
-* @param domain
-* @param username
-* @param userid
-*/
-/*var ContactAccount = function(domain, username, userid) {
- this.domain = domain != "undefined" ? domain : null;
- this.username = username != "undefined" ? username : null;
- this.userid = userid != "undefined" ? userid : null;
-}*/
-
-/**
-* Represents a group of Contacts.
-*/
-var Contacts = function() {
- this.inProgress = false;
- this.records = new Array();
-};
-/**
-* Returns an array of Contacts matching the search criteria.
-* @param fields that should be searched
-* @param successCB success callback
-* @param errorCB error callback (optional)
-* @param {ContactFindOptions} options that can be applied to contact searching
-* @return array of Contacts matching search criteria
-*/
-Contacts.prototype.find = function(fields, successCB, errorCB, options) {
- if (successCB === null) {
- throw new TypeError("You must specify a success callback for the find command.");
- }
- if (fields === null || fields === "undefined" || fields.length === "undefined" || fields.length <= 0) {
- if (typeof errorCB === "function") {
- errorCB({"code": ContactError.INVALID_ARGUMENT_ERROR});
- }
- } else {
- PhoneGap.exec(successCB, errorCB, "com.phonegap.contacts","search", [{"fields":fields, "findOptions":options}]);
- }
-};
-/**
-* need to turn the array of JSON strings representing contact objects into actual objects
-* @param array of JSON strings with contact data
-* @return call results callback with array of Contact objects
-* This function is called from objective C Contacts.search() method.
-*/
-Contacts.prototype._findCallback = function(pluginResult) {
- var contacts = new Array();
- try {
- for (var i=0; i<pluginResult.message.length; i++) {
- var newContact = navigator.contacts.create(pluginResult.message[i]);
- newContact.convertDatesIn();
- contacts.push(newContact);
- }
- pluginResult.message = contacts;
- } catch(e){
- console.log("Error parsing contacts: " +e);
- }
- return pluginResult;
-}
-
-/**
-* need to turn the JSON string representing contact object into actual object
-* @param JSON string with contact data
-* Call stored results function with Contact object
-* This function is called from objective C Contacts remove and save methods
-*/
-Contacts.prototype._contactCallback = function(pluginResult)
-{
- var newContact = null;
- if (pluginResult.message){
- try {
- newContact = navigator.contacts.create(pluginResult.message);
- newContact.convertDatesIn();
- } catch(e){
- console.log("Error parsing contact");
- }
- }
- pluginResult.message = newContact;
- return pluginResult;
-
-};
-/**
-* Need to return an error object rather than just a single error code
-* @param error code
-* Call optional error callback if found.
-* Called from objective c find, remove, and save methods on error.
-*/
-Contacts.prototype._errCallback = function(pluginResult)
-{
- var errorObj = new ContactError();
- errorObj.code = pluginResult.message;
- pluginResult.message = errorObj;
- return pluginResult;
-};
-// iPhone only api to create a new contact via the GUI
-Contacts.prototype.newContactUI = function(successCallback) {
- PhoneGap.exec(successCallback, null, "com.phonegap.contacts","newContact", []);
-};
-// iPhone only api to select a contact via the GUI
-Contacts.prototype.chooseContact = function(successCallback, options) {
- PhoneGap.exec(successCallback, null, "com.phonegap.contacts","chooseContact", options);
-};
-
-
-/**
-* This function creates a new contact, but it does not persist the contact
-* to device storage. To persist the contact to device storage, invoke
-* contact.save().
-* @param properties an object who's properties will be examined to create a new Contact
-* @returns new Contact object
-*/
-Contacts.prototype.create = function(properties) {
- var i;
- var contact = new Contact();
- for (i in properties) {
- if (contact[i] !== 'undefined') {
- contact[i] = properties[i];
- }
- }
- return contact;
-};
-
-/**
- * ContactFindOptions.
- * @param filter used to match contacts against
- * @param multiple boolean used to determine if more than one contact should be returned
- */
-var ContactFindOptions = function(filter, multiple, updatedSince) {
- this.filter = filter || '';
- this.multiple = multiple || false;
-};
-
-/**
- * ContactError.
- * An error code assigned by an implementation when an error has occurred
- */
-var ContactError = function() {
- this.code=null;
-};
-
-/**
- * Error codes
- */
-ContactError.UNKNOWN_ERROR = 0;
-ContactError.INVALID_ARGUMENT_ERROR = 1;
-ContactError.TIMEOUT_ERROR = 2;
-ContactError.PENDING_OPERATION_ERROR = 3;
-ContactError.IO_ERROR = 4;
-ContactError.NOT_SUPPORTED_ERROR = 5;
-ContactError.PERMISSION_DENIED_ERROR = 20;
-
-/**
- * Add the contact interface into the browser.
- */
-PhoneGap.addConstructor(function() {
- if(typeof navigator.contacts == "undefined") {
- navigator.contacts = new Contacts();
- }
-});
-};
-if (!PhoneGap.hasResource("file")) {
- PhoneGap.addResource("file");
-
-/**
- * This class provides generic read and write access to the mobile device file system.
- * They are not used to read files from a server.
- */
-
-/**
- * This class provides some useful information about a file.
- * This is the fields returned when navigator.fileMgr.getFileProperties()
- * is called.
- */
-FileProperties = function(filePath) {
- this.filePath = filePath;
- this.size = 0;
- this.lastModifiedDate = null;
-}
-/**
- * Represents a single file.
- *
- * name {DOMString} name of the file, without path information
- * fullPath {DOMString} the full path of the file, including the name
- * type {DOMString} mime type
- * lastModifiedDate {Date} last modified date
- * size {Number} size of the file in bytes
- */
-File = function(name, fullPath, type, lastModifiedDate, size) {
- this.name = name || null;
- this.fullPath = fullPath || null;
- this.type = type || null;
- this.lastModifiedDate = lastModifiedDate || null;
- this.size = size || 0;
-}
-/**
- * Create an event object since we can't set target on DOM event.
- *
- * @param type
- * @param target
- *
- */
-File._createEvent = function(type, target) {
- // Can't create event object, since we can't set target (its readonly)
- //var evt = document.createEvent('Events');
- //evt.initEvent("onload", false, false);
- var evt = {"type": type};
- evt.target = target;
- return evt;
-};
-
-FileError = function() {
- this.code = null;
-}
-
-// File error codes
-// Found in DOMException
-FileError.NOT_FOUND_ERR = 1;
-FileError.SECURITY_ERR = 2;
-FileError.ABORT_ERR = 3;
-
-// Added by this specification
-FileError.NOT_READABLE_ERR = 4;
-FileError.ENCODING_ERR = 5;
-FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
-FileError.INVALID_STATE_ERR = 7;
-FileError.SYNTAX_ERR = 8;
-FileError.INVALID_MODIFICATION_ERR = 9;
-FileError.QUOTA_EXCEEDED_ERR = 10;
-FileError.TYPE_MISMATCH_ERR = 11;
-FileError.PATH_EXISTS_ERR = 12;
-
-//-----------------------------------------------------------------------------
-// File manager
-//-----------------------------------------------------------------------------
-
-FileMgr = function() {
-}
-
-FileMgr.prototype.testFileExists = function(fileName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "testFileExists", [fileName]);
-};
-
-FileMgr.prototype.testDirectoryExists = function(dirName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "testDirectoryExists", [dirName]);
-};
-
-FileMgr.prototype.getFreeDiskSpace = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getFreeDiskSpace", []);
-};
-
-FileMgr.prototype.write = function(fileName, data, position, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "write", [fileName, data, position]);
-};
-
-FileMgr.prototype.truncate = function(fileName, size, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "truncateFile", [fileName, size]);
-};
-
-FileMgr.prototype.readAsText = function(fileName, encoding, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "readFile", [fileName, encoding]);
-};
-
-FileMgr.prototype.readAsDataURL = function(fileName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "readAsDataURL", [fileName]);
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.fileMgr === "undefined") {
- navigator.fileMgr = new FileMgr();
- }
-});
-
-
-//-----------------------------------------------------------------------------
-// File Reader
-//-----------------------------------------------------------------------------
-
-/**
- * This class reads the mobile device file system.
- *
- */
-FileReader = function() {
- this.fileName = "";
-
- this.readyState = 0;
-
- // File data
- this.result = null;
-
- // Error
- this.error = null;
-
- // Event handlers
- this.onloadstart = null; // When the read starts.
- this.onprogress = null; // While reading (and decoding) file or fileBlob data, and reporting partial file data (progess.loaded/progress.total)
- this.onload = null; // When the read has successfully completed.
- this.onerror = null; // When the read has failed (see errors).
- this.onloadend = null; // When the request has completed (either in success or failure).
- this.onabort = null; // When the read has been aborted. For instance, by invoking the abort() method.
-}
-
-// States
-FileReader.EMPTY = 0;
-FileReader.LOADING = 1;
-FileReader.DONE = 2;
-
-/**
- * Abort reading file.
- */
-FileReader.prototype.abort = function() {
- var evt;
- this.readyState = FileReader.DONE;
- this.result = null;
-
- // set error
- var error = new FileError();
- error.code = error.ABORT_ERR;
- this.error = error;
-
- // If error callback
- if (typeof this.onerror === "function") {
- evt = File._createEvent("error", this);
- this.onerror(evt);
- }
- // If abort callback
- if (typeof this.onabort === "function") {
- evt = File._createEvent("abort", this);
- this.onabort(evt);
- }
- // If load end callback
- if (typeof this.onloadend === "function") {
- evt = File._createEvent("loadend", this);
- this.onloadend(evt);
- }
-};
-
-/**
- * Read text file.
- *
- * @param file The name of the file
- * @param encoding [Optional] (see http://www.iana.org/assignments/character-sets)
- */
-FileReader.prototype.readAsText = function(file, encoding) {
- this.fileName = "";
- if (typeof file.fullPath === "undefined") {
- this.fileName = file;
- } else {
- this.fileName = file.fullPath;
- }
-
- // LOADING state
- this.readyState = FileReader.LOADING;
-
- // If loadstart callback
- if (typeof this.onloadstart === "function") {
- var evt = File._createEvent("loadstart", this);
- this.onloadstart(evt);
- }
-
- // Default encoding is UTF-8
- var enc = encoding ? encoding : "UTF-8";
-
- var me = this;
-
- // Read file
- navigator.fileMgr.readAsText(this.fileName, enc,
-
- // Success callback
- function(r) {
- var evt;
-
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileReader.DONE) {
- return;
- }
-
- // Save result
- me.result = decodeURIComponent(r);
-
- // If onload callback
- if (typeof me.onload === "function") {
- evt = File._createEvent("load", me);
- me.onload(evt);
- }
-
- // DONE state
- me.readyState = FileReader.DONE;
-
- // If onloadend callback
- if (typeof me.onloadend === "function") {
- evt = File._createEvent("loadend", me);
- me.onloadend(evt);
- }
- },
-
- // Error callback
- function(e) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileReader.DONE) {
- return;
- }
-
- // Save error
- me.error = e;
-
- // If onerror callback
- if (typeof me.onerror === "function") {
- evt = File._createEvent("error", me);
- me.onerror(evt);
- }
-
- // DONE state
- me.readyState = FileReader.DONE;
-
- // If onloadend callback
- if (typeof me.onloadend === "function") {
- evt = File._createEvent("loadend", me);
- me.onloadend(evt);
- }
- }
- );
-};
-
-
-/**
- * Read file and return data as a base64 encoded data url.
- * A data url is of the form:
- * data:[<mediatype>][;base64],<data>
- *
- * @param file {File} File object containing file properties
- */
-FileReader.prototype.readAsDataURL = function(file) {
- this.fileName = "";
-
- if (typeof file.fullPath === "undefined") {
- this.fileName = file;
- } else {
- this.fileName = file.fullPath;
- }
-
- // LOADING state
- this.readyState = FileReader.LOADING;
-
- // If loadstart callback
- if (typeof this.onloadstart === "function") {
- var evt = File._createEvent("loadstart", this);
- this.onloadstart(evt);
- }
-
- var me = this;
-
- // Read file
- navigator.fileMgr.readAsDataURL(this.fileName,
-
- // Success callback
- function(r) {
- var evt;
-
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileReader.DONE) {
- return;
- }
-
- // Save result
- me.result = r;
-
- // If onload callback
- if (typeof me.onload === "function") {
- evt = File._createEvent("load", me);
- me.onload(evt);
- }
-
- // DONE state
- me.readyState = FileReader.DONE;
-
- // If onloadend callback
- if (typeof me.onloadend === "function") {
- evt = File._createEvent("loadend", me);
- me.onloadend(evt);
- }
- },
-
- // Error callback
- function(e) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileReader.DONE) {
- return;
- }
-
- // Save error
- me.error = e;
-
- // If onerror callback
- if (typeof me.onerror === "function") {
- evt = File._createEvent("error", me);
- me.onerror(evt);
- }
-
- // DONE state
- me.readyState = FileReader.DONE;
-
- // If onloadend callback
- if (typeof me.onloadend === "function") {
- evt = File._createEvent("loadend", me);
- me.onloadend(evt);
- }
- }
- );
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file The name of the file
- */
-FileReader.prototype.readAsBinaryString = function(file) {
- // TODO - Can't return binary data to browser.
- this.fileName = file;
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file The name of the file
- */
-FileReader.prototype.readAsArrayBuffer = function(file) {
- // TODO - Can't return binary data to browser.
- this.fileName = file;
-};
-
-//-----------------------------------------------------------------------------
-// File Writer
-//-----------------------------------------------------------------------------
-
-/**
- * This class writes to the mobile device file system.
- *
- @param file {File} a File object representing a file on the file system
-*/
-FileWriter = function(file) {
- this.fileName = "";
- this.length = 0;
- if (file) {
- this.fileName = file.fullPath || file;
- this.length = file.size || 0;
- }
-
- // default is to write at the beginning of the file
- this.position = 0;
-
- this.readyState = 0; // EMPTY
-
- this.result = null;
-
- // Error
- this.error = null;
-
- // Event handlers
- this.onwritestart = null; // When writing starts
- this.onprogress = null; // While writing the file, and reporting partial file data
- this.onwrite = null; // When the write has successfully completed.
- this.onwriteend = null; // When the request has completed (either in success or failure).
- this.onabort = null; // When the write has been aborted. For instance, by invoking the abort() method.
- this.onerror = null; // When the write has failed (see errors).
-}
-
-// States
-FileWriter.INIT = 0;
-FileWriter.WRITING = 1;
-FileWriter.DONE = 2;
-
-/**
- * Abort writing file.
- */
-FileWriter.prototype.abort = function() {
- // check for invalid state
- if (this.readyState === FileWriter.DONE || this.readyState === FileWriter.INIT) {
- throw FileError.INVALID_STATE_ERR;
- }
-
- // set error
- var error = new FileError(), evt;
- error.code = error.ABORT_ERR;
- this.error = error;
-
- // If error callback
- if (typeof this.onerror === "function") {
- evt = File._createEvent("error", this);
- this.onerror(evt);
- }
- // If abort callback
- if (typeof this.onabort === "function") {
- evt = File._createEvent("abort", this);
- this.onabort(evt);
- }
-
- this.readyState = FileWriter.DONE;
-
- // If write end callback
- if (typeof this.onwriteend == "function") {
- evt = File._createEvent("writeend", this);
- this.onwriteend(evt);
- }
-};
-
-/**
- * @Deprecated: use write instead
- *
- * @param file to write the data to
- * @param text to be written
- * @param bAppend if true write to end of file, otherwise overwrite the file
- */
-FileWriter.prototype.writeAsText = function(file, text, bAppend) {
- // Throw an exception if we are already writing a file
- if (this.readyState === FileWriter.WRITING) {
- throw FileError.INVALID_STATE_ERR;
- }
-
- if (bAppend !== true) {
- bAppend = false; // for null values
- }
-
- this.fileName = file;
-
- // WRITING state
- this.readyState = FileWriter.WRITING;
-
- var me = this;
-
- // If onwritestart callback
- if (typeof me.onwritestart === "function") {
- var evt = File._createEvent("writestart", me);
- me.onwritestart(evt);
- }
-
-
- // Write file
- navigator.fileMgr.writeAsText(file, text, bAppend,
- // Success callback
- function(r) {
- var evt;
-
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
- // Save result
- me.result = r;
-
- // If onwrite callback
- if (typeof me.onwrite === "function") {
- evt = File._createEvent("write", me);
- me.onwrite(evt);
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- evt = File._createEvent("writeend", me);
- me.onwriteend(evt);
- }
- },
-
- // Error callback
- function(e) {
- var evt;
-
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
- // Save error
- me.error = e;
-
- // If onerror callback
- if (typeof me.onerror === "function") {
- evt = File._createEvent("error", me);
- me.onerror(evt);
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- evt = File._createEvent("writeend", me);
- me.onwriteend(evt);
- }
- }
- );
-};
-
-/**
- * Writes data to the file
- *
- * @param text to be written
- */
-FileWriter.prototype.write = function(text) {
- // Throw an exception if we are already writing a file
- if (this.readyState === FileWriter.WRITING) {
- throw FileError.INVALID_STATE_ERR;
- }
-
- // WRITING state
- this.readyState = FileWriter.WRITING;
-
- var me = this;
-
- // If onwritestart callback
- if (typeof me.onwritestart === "function") {
- var evt = File._createEvent("writestart", me);
- me.onwritestart(evt);
- }
-
- // Write file
- navigator.fileMgr.write(this.fileName, text, this.position,
-
- // Success callback
- function(r) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
-
- // position always increases by bytes written because file would be extended
- me.position += r;
- // The length of the file is now where we are done writing.
- me.length = me.position;
-
- // If onwrite callback
- if (typeof me.onwrite === "function") {
- evt = File._createEvent("write", me);
- me.onwrite(evt);
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- evt = File._createEvent("writeend", me);
- me.onwriteend(evt);
- }
- },
-
- // Error callback
- function(e) {
- var evt;
-
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
- // Save error
- me.error = e;
-
- // If onerror callback
- if (typeof me.onerror === "function") {
- evt = File._createEvent("error", me);
- me.onerror(evt);
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- evt = File._createEvent("writeend", me);
- me.onwriteend(evt);
- }
- }
- );
-
-};
-
-/**
- * Moves the file pointer to the location specified.
- *
- * If the offset is a negative number the position of the file
- * pointer is rewound. If the offset is greater than the file
- * size the position is set to the end of the file.
- *
- * @param offset is the location to move the file pointer to.
- */
-FileWriter.prototype.seek = function(offset) {
- // Throw an exception if we are already writing a file
- if (this.readyState === FileWriter.WRITING) {
- throw FileError.INVALID_STATE_ERR;
- }
-
- if (!offset) {
- return;
- }
-
- // See back from end of file.
- if (offset < 0) {
- this.position = Math.max(offset + this.length, 0);
- }
- // Offset is bigger then file size so set position
- // to the end of the file.
- else if (offset > this.length) {
- this.position = this.length;
- }
- // Offset is between 0 and file size so set the position
- // to start writing.
- else {
- this.position = offset;
- }
-};
-
-/**
- * Truncates the file to the size specified.
- *
- * @param size to chop the file at.
- */
-FileWriter.prototype.truncate = function(size) {
- // Throw an exception if we are already writing a file
- if (this.readyState === FileWriter.WRITING) {
- throw FileError.INVALID_STATE_ERR;
- }
- // what if no size specified?
-
- // WRITING state
- this.readyState = FileWriter.WRITING;
-
- var me = this;
-
- // If onwritestart callback
- if (typeof me.onwritestart === "function") {
- var evt = File._createEvent("writestart", me);
- me.onwritestart(evt);
- }
-
- // Write file
- navigator.fileMgr.truncate(this.fileName, size,
-
- // Success callback
- function(r) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
- // Update the length of the file
- me.length = r;
- me.position = Math.min(me.position, r);
-
- // If onwrite callback
- if (typeof me.onwrite === "function") {
- evt = File._createEvent("write", me);
- me.onwrite(evt);
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- evt = File._createEvent("writeend", me);
- me.onwriteend(evt);
- }
- },
-
- // Error callback
- function(e) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
- // Save error
- me.error = e;
-
- // If onerror callback
- if (typeof me.onerror === "function") {
- evt = File._createEvent("error", me);
- me.onerror(evt);
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- evt = File._createEvent("writeend", me);
- me.onwriteend(evt);
- }
- }
- );
-};
-
-LocalFileSystem = function() {
-};
-
-// File error codes
-LocalFileSystem.TEMPORARY = 0;
-LocalFileSystem.PERSISTENT = 1;
-LocalFileSystem.RESOURCE = 2;
-LocalFileSystem.APPLICATION = 3;
-
-/**
- * Requests a filesystem in which to store application data.
- *
- * @param {int} type of file system being requested
- * @param {Function} successCallback is called with the new FileSystem
- * @param {Function} errorCallback is called with a FileError
- */
-LocalFileSystem.prototype.requestFileSystem = function(type, size, successCallback, errorCallback) {
- if (type < 0 || type > 3) {
- if (typeof errorCallback == "function") {
- errorCallback({
- "code": FileError.SYNTAX_ERR
- });
- }
- }
- else {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "requestFileSystem", [type, size]);
- }
-};
-
-/**
- *
- * @param {DOMString} uri referring to a local file in a filesystem
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-LocalFileSystem.prototype.resolveLocalFileSystemURI = function(uri, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "resolveLocalFileSystemURI", [uri]);
-};
-
-/**
-* This function is required as we need to convert raw
-* JSON objects into concrete File and Directory objects.
-*
-* @param a JSON Objects that need to be converted to DirectoryEntry or FileEntry objects.
-* @returns an entry
-*/
-LocalFileSystem.prototype._castFS = function(pluginResult) {
- var entry = null;
- entry = new DirectoryEntry();
- entry.isDirectory = pluginResult.message.root.isDirectory;
- entry.isFile = pluginResult.message.root.isFile;
- entry.name = pluginResult.message.root.name;
- entry.fullPath = pluginResult.message.root.fullPath;
- pluginResult.message.root = entry;
- return pluginResult;
-}
-
-LocalFileSystem.prototype._castEntry = function(pluginResult) {
- var entry = null;
- if (pluginResult.message.isDirectory) {
- entry = new DirectoryEntry();
- }
- else if (pluginResult.message.isFile) {
- entry = new FileEntry();
- }
- entry.isDirectory = pluginResult.message.isDirectory;
- entry.isFile = pluginResult.message.isFile;
- entry.name = pluginResult.message.name;
- entry.fullPath = pluginResult.message.fullPath;
- pluginResult.message = entry;
- return pluginResult;
-}
-
-LocalFileSystem.prototype._castEntries = function(pluginResult) {
- var entries = pluginResult.message;
- var retVal = [];
- for (i=0; i<entries.length; i++) {
- retVal.push(window.localFileSystem._createEntry(entries[i]));
- }
- pluginResult.message = retVal;
- return pluginResult;
-}
-
-LocalFileSystem.prototype._createEntry = function(castMe) {
- var entry = null;
- if (castMe.isDirectory) {
- entry = new DirectoryEntry();
- }
- else if (castMe.isFile) {
- entry = new FileEntry();
- }
- entry.isDirectory = castMe.isDirectory;
- entry.isFile = castMe.isFile;
- entry.name = castMe.name;
- entry.fullPath = castMe.fullPath;
- return entry;
-
-}
-
-LocalFileSystem.prototype._castDate = function(pluginResult) {
- if (pluginResult.message.modificationTime) {
- var metadataObj = new Metadata();
-
- metadataObj.modificationTime = new Date(pluginResult.message.modificationTime);
- pluginResult.message = metadataObj;
- }
- else if (pluginResult.message.lastModifiedDate) {
- var file = new File();
- file.size = pluginResult.message.size;
- file.type = pluginResult.message.type;
- file.name = pluginResult.message.name;
- file.fullPath = pluginResult.message.fullPath;
- file.lastModifiedDate = new Date(pluginResult.message.lastModifiedDate);
- pluginResult.message = file;
- }
-
- return pluginResult;
-}
-LocalFileSystem.prototype._castError = function(pluginResult) {
- var fileError = new FileError();
- fileError.code = pluginResult.message;
- pluginResult.message = fileError;
- return pluginResult;
-}
-
-/**
- * Information about the state of the file or directory
- *
- * {Date} modificationTime (readonly)
- */
-Metadata = function() {
- this.modificationTime=null;
-};
-
-/**
- * Supplies arguments to methods that lookup or create files and directories
- *
- * @param {boolean} create file or directory if it doesn't exist
- * @param {boolean} exclusive if true the command will fail if the file or directory exists
- */
-Flags = function(create, exclusive) {
- this.create = create || false;
- this.exclusive = exclusive || false;
-};
-
-/**
- * An interface representing a file system
- *
- * {DOMString} name the unique name of the file system (readonly)
- * {DirectoryEntry} root directory of the file system (readonly)
- */
-FileSystem = function() {
- this.name = null;
- this.root = null;
-};
-
-/**
- * An interface representing a directory on the file system.
- *
- * {boolean} isFile always false (readonly)
- * {boolean} isDirectory always true (readonly)
- * {DOMString} name of the directory, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the directory (readonly)
- * {FileSystem} filesystem on which the directory resides (readonly)
- */
-DirectoryEntry = function() {
- this.isFile = false;
- this.isDirectory = true;
- this.name = null;
- this.fullPath = null;
- this.filesystem = null;
-};
-
-/**
- * Copies a directory to a new location
- *
- * @param {DirectoryEntry} parent the directory to which to copy the entry
- * @param {DOMString} newName the new name of the entry, defaults to the current name
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "copyTo", [this.fullPath, parent, newName]);
-};
-
-/**
- * Looks up the metadata of the entry
- *
- * @param {Function} successCallback is called with a Metadata object
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getMetadata = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getMetadata", [this.fullPath]);
-};
-
-/**
- * Gets the parent of the entry
- *
- * @param {Function} successCallback is called with a parent entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getParent = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getParent", [this.fullPath]);
-};
-
-/**
- * Moves a directory to a new location
- *
- * @param {DirectoryEntry} parent the directory to which to move the entry
- * @param {DOMString} newName the new name of the entry, defaults to the current name
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "moveTo", [this.fullPath, parent, newName]);
-};
-
-/**
- * Removes the entry
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.remove = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "remove", [this.fullPath]);
-};
-
-/**
- * Returns a URI that can be used to identify this entry.
- *
- * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.toURI = function(mimeType, successCallback, errorCallback) {
- return "file://localhost" + this.fullPath;
- //PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "toURI", [this.fullPath, mimeType]);
-};
-
-/**
- * Creates a new DirectoryReader to read entries from this directory
- */
-DirectoryEntry.prototype.createReader = function(successCallback, errorCallback) {
- return new DirectoryReader(this.fullPath);
-};
-
-/**
- * Creates or looks up a directory
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
- * @param {Flags} options to create or excluively create the directory
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getDirectory", [this.fullPath, path, options]);
-};
-
-/**
- * Creates or looks up a file
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
- * @param {Flags} options to create or excluively create the file
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getFile", [this.fullPath, path, options]);
-};
-
-/**
- * Deletes a directory and all of it's contents
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "removeRecursively", [this.fullPath]);
-};
-
-/**
- * An interface that lists the files and directories in a directory.
- */
-DirectoryReader = function(fullPath){
- this.fullPath = fullPath || null;
-};
-
-/**
- * Returns a list of entries from a directory.
- *
- * @param {Function} successCallback is called with a list of entries
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryReader.prototype.readEntries = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "readEntries", [this.fullPath]);
-}
-
-/**
- * An interface representing a directory on the file system.
- *
- * {boolean} isFile always true (readonly)
- * {boolean} isDirectory always false (readonly)
- * {DOMString} name of the file, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the file (readonly)
- * {FileSystem} filesystem on which the directory resides (readonly)
- */
-FileEntry = function() {
- this.isFile = true;
- this.isDirectory = false;
- this.name = null;
- this.fullPath = null;
- this.filesystem = null;
-};
-
-/**
- * Copies a file to a new location
- *
- * @param {DirectoryEntry} parent the directory to which to copy the entry
- * @param {DOMString} newName the new name of the entry, defaults to the current name
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "copyTo", [this.fullPath, parent, newName]);
-};
-
-/**
- * Looks up the metadata of the entry
- *
- * @param {Function} successCallback is called with a Metadata object
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.getMetadata = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getMetadata", [this.fullPath]);
-};
-
-/**
- * Gets the parent of the entry
- *
- * @param {Function} successCallback is called with a parent entry
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.getParent = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getParent", [this.fullPath]);
-};
-
-/**
- * Moves a directory to a new location
- *
- * @param {DirectoryEntry} parent the directory to which to move the entry
- * @param {DOMString} newName the new name of the entry, defaults to the current name
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "moveTo", [this.fullPath, parent, newName]);
-};
-
-/**
- * Removes the entry
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.remove = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "remove", [this.fullPath]);
-};
-
-/**
- * Returns a URI that can be used to identify this entry.
- *
- * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.toURI = function(mimeType, successCallback, errorCallback) {
- return "file://localhost" + this.fullPath;
- //PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "toURI", [this.fullPath, mimeType]);
-};
-
-/**
- * Creates a new FileWriter associated with the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new FileWriter
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.createWriter = function(successCallback, errorCallback) {
- this.file(function(filePointer) {
- var writer = new FileWriter(filePointer);
- if (writer.fileName == null || writer.fileName == "") {
- if (typeof errorCallback == "function") {
- errorCallback({
- "code": FileError.INVALID_STATE_ERR
- });
- }
- }
- if (typeof successCallback == "function") {
- successCallback(writer);
- }
- }, errorCallback);
-};
-
-/**
- * Returns a File that represents the current state of the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new File object
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.file = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getFileMetadata", [this.fullPath]);
-};
-
-/**
- * Add the FileSystem interface into the browser.
- */
-PhoneGap.addConstructor(function() {
- var pgLocalFileSystem = new LocalFileSystem();
- // Needed for cast methods
- if(typeof window.localFileSystem == "undefined") window.localFileSystem = pgLocalFileSystem;
- if(typeof window.requestFileSystem == "undefined") window.requestFileSystem = pgLocalFileSystem.requestFileSystem;
- if(typeof window.resolveLocalFileSystemURI == "undefined") window.resolveLocalFileSystemURI = pgLocalFileSystem.resolveLocalFileSystemURI;
-});
-};
-
-
-
-
-/*
- * Copyright (c) 2011, Matt Kane
- */
-
-if (!PhoneGap.hasResource("filetransfer")) {
- PhoneGap.addResource("filetransfer");
-
-/**
- * FileTransfer uploads a file to a remote server.
- */
-FileTransfer = function() {}
-
-/**
- * FileUploadResult
- */
-FileUploadResult = function() {
- this.bytesSent = 0;
- this.responseCode = null;
- this.response = null;
-}
-
-/**
- * FileTransferError
- */
-FileTransferError = function(errorCode) {
- this.code = errorCode || null;
-}
-
-FileTransferError.FILE_NOT_FOUND_ERR = 1;
-FileTransferError.INVALID_URL_ERR = 2;
-FileTransferError.CONNECTION_ERR = 3;
-
-/**
-* Given an absolute file path, uploads a file on the device to a remote server
-* using a multipart HTTP request.
-* @param filePath {String} Full path of the file on the device
-* @param server {String} URL of the server to receive the file
-* @param successCallback (Function} Callback to be invoked when upload has completed
-* @param errorCallback {Function} Callback to be invoked upon error
-* @param options {FileUploadOptions} Optional parameters such as file name and mimetype
-*/
-FileTransfer.prototype.upload = function(filePath, server, successCallback, errorCallback, options) {
- if(!options.params) {
- options.params = {};
- }
- options.filePath = filePath;
- options.server = server;
- if(!options.fileKey) {
- options.fileKey = 'file';
- }
- if(!options.fileName) {
- options.fileName = 'image.jpg';
- }
- if(!options.mimeType) {
- options.mimeType = 'image/jpeg';
- }
-
- // successCallback required
- if (typeof successCallback != "function") {
- console.log("FileTransfer Error: successCallback is not a function");
- return;
- }
-
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback != "function")) {
- console.log("FileTransfer Error: errorCallback is not a function");
- return;
- }
-
- PhoneGap.exec(successCallback, errorCallback, 'com.phonegap.filetransfer', 'upload', [options]);
-};
-
-FileTransfer.prototype._castTransferError = function(pluginResult) {
- var fileError = new FileTransferError(pluginResult.message);
- //fileError.code = pluginResult.message;
- pluginResult.message = fileError;
- return pluginResult;
-}
-
-FileTransfer.prototype._castUploadResult = function(pluginResult) {
- var result = new FileUploadResult();
- result.bytesSent = pluginResult.message.bytesSent;
- result.responseCode = pluginResult.message.responseCode;
- result.response = decodeURIComponent(pluginResult.message.response);
- pluginResult.message = result;
- return pluginResult;
-}
-
-/**
- * Downloads a file form a given URL and saves it to the specified directory.
- * @param source {String} URL of the server to receive the file
- * @param target {String} Full path of the file on the device
- * @param successCallback (Function} Callback to be invoked when upload has completed
- * @param errorCallback {Function} Callback to be invoked upon error
- */
-FileTransfer.prototype.download = function(source, target, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, 'com.phonegap.filetransfer', 'download', [source, target]);
-};
-
-/**
- * Options to customize the HTTP request used to upload files.
- * @param fileKey {String} Name of file request parameter.
- * @param fileName {String} Filename to be used by the server. Defaults to image.jpg.
- * @param mimeType {String} Mimetype of the uploaded file. Defaults to image/jpeg.
- * @param params {Object} Object with key: value params to send to the server.
- */
-FileUploadOptions = function(fileKey, fileName, mimeType, params) {
- this.fileKey = fileKey || null;
- this.fileName = fileName || null;
- this.mimeType = mimeType || null;
- this.params = params || null;
-}
-
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.fileTransfer == "undefined") navigator.fileTransfer = new FileTransfer();
-});
-};
-if (!PhoneGap.hasResource("geolocation")) {
- PhoneGap.addResource("geolocation");
-
-/**
- * This class provides access to device GPS data.
- * @constructor
- */
-Geolocation = function() {
- // The last known GPS position.
- this.lastPosition = null;
- this.listener = null;
- this.timeoutTimerId = 0;
-
-};
-
-
-/**
- * Asynchronously aquires the current position.
- * @param {Function} successCallback The function to call when the position
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the position data.
- * @param {PositionOptions} options The options for getting the position data
- * such as timeout.
- * PositionOptions.forcePrompt:Bool default false,
- * - tells iPhone to prompt the user to turn on location services.
- * - may cause your app to exit while the user is sent to the Settings app
- * PositionOptions.distanceFilter:double aka Number
- * - used to represent a distance in meters.
-PositionOptions
-{
- desiredAccuracy:Number
- - a distance in meters
- < 10 = best accuracy ( Default value )
- < 100 = Nearest Ten Meters
- < 1000 = Nearest Hundred Meters
- < 3000 = Accuracy Kilometers
- 3000+ = Accuracy 3 Kilometers
-
- forcePrompt:Boolean default false ( iPhone Only! )
- - tells iPhone to prompt the user to turn on location services.
- - may cause your app to exit while the user is sent to the Settings app
-
- distanceFilter:Number
- - The minimum distance (measured in meters) a device must move laterally before an update event is generated.
- - measured relative to the previously delivered location
- - default value: null ( all movements will be reported )
-
-}
-
- */
-
-Geolocation.prototype.getCurrentPosition = function(successCallback, errorCallback, options)
-{
- // create an always valid local success callback
- var win = successCallback;
- if (!win || typeof(win) != 'function')
- {
- win = function(position) {};
- }
-
- // create an always valid local error callback
- var fail = errorCallback;
- if (!fail || typeof(fail) != 'function')
- {
- fail = function(positionError) {};
- }
-
- var self = this;
- var totalTime = 0;
- var timeoutTimerId;
-
- // set params to our default values
- var params = new PositionOptions();
-
- if (options)
- {
- if (options.maximumAge)
- {
- // special case here if we have a cached value that is younger than maximumAge
- if(this.lastPosition)
- {
- var now = new Date().getTime();
- if((now - this.lastPosition.timestamp) < options.maximumAge)
- {
- win(this.lastPosition); // send cached position immediately
- return; // Note, execution stops here -jm
- }
- }
- params.maximumAge = options.maximumAge;
- }
- if (options.enableHighAccuracy)
- {
- params.enableHighAccuracy = (options.enableHighAccuracy == true); // make sure it's truthy
- }
- if (options.timeout)
- {
- params.timeout = options.timeout;
- }
- }
-
- var successListener = win;
- var failListener = fail;
- if (!this.locationRunning)
- {
- successListener = function(position)
- {
- win(position);
- self.stop();
- };
- errorListener = function(positionError)
- {
- fail(positionError);
- self.stop();
- };
- }
-
- this.listener = {"success":successListener,"fail":failListener};
- this.start(params);
-
- var onTimeout = function()
- {
- self.setError(new PositionError(PositionError.TIMEOUT,"Geolocation Error: Timeout."));
- };
-
- clearTimeout(this.timeoutTimerId);
- this.timeoutTimerId = setTimeout(onTimeout, params.timeout);
-};
-
-/**
- * Asynchronously aquires the position repeatedly at a given interval.
- * @param {Function} successCallback The function to call each time the position
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the position data.
- * @param {PositionOptions} options The options for getting the position data
- * such as timeout and the frequency of the watch.
- */
-Geolocation.prototype.watchPosition = function(successCallback, errorCallback, options) {
- // Invoke the appropriate callback with a new Position object every time the implementation
- // determines that the position of the hosting device has changed.
-
- var self = this; // those == this & that
-
- var params = new PositionOptions();
-
- if(options)
- {
- if (options.maximumAge) {
- params.maximumAge = options.maximumAge;
- }
- if (options.enableHighAccuracy) {
- params.enableHighAccuracy = options.enableHighAccuracy;
- }
- if (options.timeout) {
- params.timeout = options.timeout;
- }
- }
-
- var that = this;
- var lastPos = that.lastPosition? that.lastPosition.clone() : null;
-
- var intervalFunction = function() {
-
- var filterFun = function(position) {
- if (lastPos == null || !position.equals(lastPos)) {
- // only call the success callback when there is a change in position, per W3C
- successCallback(position);
- }
-
- // clone the new position, save it as our last position (internal var)
- lastPos = position.clone();
- };
-
- that.getCurrentPosition(filterFun, errorCallback, params);
- };
-
- // Retrieve location immediately and schedule next retrieval afterwards
- intervalFunction();
-
- return setInterval(intervalFunction, params.timeout);
-};
-
-
-/**
- * Clears the specified position watch.
- * @param {String} watchId The ID of the watch returned from #watchPosition.
- */
-Geolocation.prototype.clearWatch = function(watchId) {
- clearInterval(watchId);
-};
-
-/**
- * Called by the geolocation framework when the current location is found.
- * @param {PositionOptions} position The current position.
- */
-Geolocation.prototype.setLocation = function(position)
-{
- var _position = new Position(position.coords, position.timestamp);
-
- if(this.timeoutTimerId)
- {
- clearTimeout(this.timeoutTimerId);
- this.timeoutTimerId = 0;
- }
-
- this.lastError = null;
- this.lastPosition = _position;
-
- if(this.listener && typeof(this.listener.success) == 'function')
- {
- this.listener.success(_position);
- }
-
- this.listener = null;
-};
-
-/**
- * Called by the geolocation framework when an error occurs while looking up the current position.
- * @param {String} message The text of the error message.
- */
-Geolocation.prototype.setError = function(error)
-{
- var _error = new PositionError(error.code, error.message);
-
- this.locationRunning = false
-
- if(this.timeoutTimerId)
- {
- clearTimeout(this.timeoutTimerId);
- this.timeoutTimerId = 0;
- }
-
- this.lastError = _error;
- // call error handlers directly
- if(this.listener && typeof(this.listener.fail) == 'function')
- {
- this.listener.fail(_error);
- }
- this.listener = null;
-
-};
-
-Geolocation.prototype.start = function(positionOptions)
-{
- PhoneGap.exec(null, null, "com.phonegap.geolocation", "startLocation", [positionOptions]);
- this.locationRunning = true
-
-};
-
-Geolocation.prototype.stop = function()
-{
- PhoneGap.exec(null, null, "com.phonegap.geolocation", "stopLocation", []);
- this.locationRunning = false
-};
-
-
-PhoneGap.addConstructor(function()
-{
- if (typeof navigator._geo == "undefined")
- {
- // replace origObj's functions ( listed in funkList ) with the same method name on proxyObj
- // this is a workaround to prevent UIWebView/MobileSafari default implementation of GeoLocation
- // because it includes the full page path as the title of the alert prompt
- var __proxyObj = function (origObj,proxyObj,funkList)
- {
- var replaceFunk = function(org,proxy,fName)
- {
- org[fName] = function()
- {
- return proxy[fName].apply(proxy,arguments);
- };
- };
-
- for(var v in funkList) { replaceFunk(origObj,proxyObj,funkList[v]);}
- }
- navigator._geo = new Geolocation();
- __proxyObj(navigator.geolocation, navigator._geo,
- ["setLocation","getCurrentPosition","watchPosition",
- "clearWatch","setError","start","stop"]);
-
- }
-
-});
-};
-if (!PhoneGap.hasResource("compass")) {
- PhoneGap.addResource("compass");
-
-CompassError = function(){
- this.code = null;
-};
-
-// Capture error codes
-CompassError.COMPASS_INTERNAL_ERR = 0;
-CompassError.COMPASS_NOT_SUPPORTED = 20;
-
-CompassHeading = function() {
- this.magneticHeading = null;
- this.trueHeading = null;
- this.headingAccuracy = null;
- this.timestamp = null;
-}
-/**
- * This class provides access to device Compass data.
- * @constructor
- */
-Compass = function() {
- /**
- * List of compass watch timers
- */
- this.timers = {};
-};
-
-/**
- * Asynchronously acquires the current heading.
- * @param {Function} successCallback The function to call when the heading
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the heading data.
- * @param {PositionOptions} options The options for getting the heading data (not used).
- */
-Compass.prototype.getCurrentHeading = function(successCallback, errorCallback, options) {
- // successCallback required
- if (typeof successCallback !== "function") {
- console.log("Compass Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback !== "function")) {
- console.log("Compass Error: errorCallback is not a function");
- return;
- }
-
- // Get heading
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.geolocation", "getCurrentHeading", []);
-};
-
-/**
- * Asynchronously acquires the heading repeatedly at a given interval.
- * @param {Function} successCallback The function to call each time the heading
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the heading data.
- * @param {HeadingOptions} options The options for getting the heading data
- * such as timeout and the frequency of the watch.
- */
-Compass.prototype.watchHeading= function(successCallback, errorCallback, options)
-{
- // Default interval (100 msec)
- var frequency = (options !== undefined) ? options.frequency : 100;
-
- // successCallback required
- if (typeof successCallback !== "function") {
- console.log("Compass Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback !== "function")) {
- console.log("Compass Error: errorCallback is not a function");
- return;
- }
-
- // Start watch timer to get headings
- var id = PhoneGap.createUUID();
- navigator.compass.timers[id] = setInterval(
- function() {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.geolocation", "getCurrentHeading", [{repeats: 1}]);
- }, frequency);
-
- return id;
-};
-
-
-/**
- * Clears the specified heading watch.
- * @param {String} watchId The ID of the watch returned from #watchHeading.
- */
-Compass.prototype.clearWatch = function(id)
-{
- // Stop javascript timer & remove from timer list
- if (id && navigator.compass.timers[id]) {
- clearInterval(navigator.compass.timers[id]);
- delete navigator.compass.timers[id];
- }
- if (navigator.compass.timers.length == 0) {
- // stop the
- PhoneGap.exec(null, null, "com.phonegap.geolocation", "stopHeading", []);
- }
-};
-
-/** iOS only
- * Asynchronously fires when the heading changes from the last reading. The amount of distance
- * required to trigger the event is specified in the filter paramter.
- * @param {Function} successCallback The function to call each time the heading
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the heading data.
- * @param {HeadingOptions} options The options for getting the heading data
- * @param {filter} number of degrees change to trigger a callback with heading data (float)
- *
- * In iOS this function is more efficient than calling watchHeading with a frequency for updates.
- * Only one watchHeadingFilter can be in effect at one time. If a watchHeadingFilter is in effect, calling
- * getCurrentHeading or watchHeading will use the existing filter value for specifying heading change.
- */
-Compass.prototype.watchHeadingFilter = function(successCallback, errorCallback, options)
-{
-
- if (options === undefined || options.filter === undefined) {
- console.log("Compass Error: options.filter not specified");
- return;
- }
-
- // successCallback required
- if (typeof successCallback !== "function") {
- console.log("Compass Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback !== "function")) {
- console.log("Compass Error: errorCallback is not a function");
- return;
- }
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.geolocation", "watchHeadingFilter", [options]);
-}
-Compass.prototype.clearWatchFilter = function()
-{
- PhoneGap.exec(null, null, "com.phonegap.geolocation", "stopHeading", []);
-};
-
-PhoneGap.addConstructor(function()
-{
- if (typeof navigator.compass == "undefined")
- {
- navigator.compass = new Compass();
- }
-});
-};
-
-if (!PhoneGap.hasResource("media")) {
- PhoneGap.addResource("media");
-
-/**
- * List of media objects.
- * PRIVATE
- */
-PhoneGap.mediaObjects = {};
-
-/**
- * Object that receives native callbacks.
- * PRIVATE
- */
-PhoneGap.Media = function() {};
-
-
-/**
- * Get the media object.
- * PRIVATE
- *
- * @param id The media object id (string)
- */
-PhoneGap.Media.getMediaObject = function(id) {
- return PhoneGap.mediaObjects[id];
-};
-
-/**
- * Audio has status update.
- * PRIVATE
- *
- * @param id The media object id (string)
- * @param msg The status message (int)
- * @param value The status code (int)
- */
-PhoneGap.Media.onStatus = function(id, msg, value) {
- var media = PhoneGap.mediaObjects[id];
-
- // If state update
- if (msg == Media.MEDIA_STATE) {
- if (value == Media.MEDIA_STOPPED) {
- if (media.successCallback) {
- media.successCallback();
- }
- }
- if (media.statusCallback) {
- media.statusCallback(value);
- }
- }
- else if (msg == Media.MEDIA_DURATION) {
- media._duration = value;
- }
- else if (msg == Media.MEDIA_ERROR) {
- if (media.errorCallback) {
- media.errorCallback(value);
- }
- }
- else if (msg == Media.MEDIA_POSITION) {
- media._position = value;
- }
-};
-
-/**
- * This class provides access to the device media, interfaces to both sound and video
- *
- * @param src The file name or url to play
- * @param successCallback The callback to be called when the file is done playing or recording.
- * successCallback() - OPTIONAL
- * @param errorCallback The callback to be called if there is an error.
- * errorCallback(int errorCode) - OPTIONAL
- * @param statusCallback The callback to be called when media status has changed.
- * statusCallback(int statusCode) - OPTIONAL
- * @param positionCallback The callback to be called when media position has changed.
- * positionCallback(long position) - OPTIONAL
- */
-Media = function(src, successCallback, errorCallback, statusCallback, positionCallback) {
-
- // successCallback optional
- if (successCallback && (typeof successCallback != "function")) {
- console.log("Media Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback != "function")) {
- console.log("Media Error: errorCallback is not a function");
- return;
- }
-
- // statusCallback optional
- if (statusCallback && (typeof statusCallback != "function")) {
- console.log("Media Error: statusCallback is not a function");
- return;
- }
-
- // positionCallback optional -- NOT SUPPORTED
- if (positionCallback && (typeof positionCallback != "function")) {
- console.log("Media Error: positionCallback is not a function");
- return;
- }
-
- this.id = PhoneGap.createUUID();
- PhoneGap.mediaObjects[this.id] = this;
- this.src = src;
- this.successCallback = successCallback;
- this.errorCallback = errorCallback;
- this.statusCallback = statusCallback;
- this.positionCallback = positionCallback;
- this._duration = -1;
- this._position = -1;
-};
-
-// Media messages
-Media.MEDIA_STATE = 1;
-Media.MEDIA_DURATION = 2;
-Media.MEDIA_POSITION = 3;
-Media.MEDIA_ERROR = 9;
-
-// Media states
-Media.MEDIA_NONE = 0;
-Media.MEDIA_STARTING = 1;
-Media.MEDIA_RUNNING = 2;
-Media.MEDIA_PAUSED = 3;
-Media.MEDIA_STOPPED = 4;
-Media.MEDIA_MSG = ["None", "Starting", "Running", "Paused", "Stopped"];
-
-// TODO: Will MediaError be used?
-/**
- * This class contains information about any Media errors.
- * @constructor
- */
-
-MediaError = function() {
- this.code = null,
- this.message = "";
-}
-
-MediaError.MEDIA_ERR_ABORTED = 1;
-MediaError.MEDIA_ERR_NETWORK = 2;
-MediaError.MEDIA_ERR_DECODE = 3;
-MediaError.MEDIA_ERR_NONE_SUPPORTED = 4;
-
-/**
- * Start or resume playing audio file.
- */
-Media.prototype.play = function(options) {
- PhoneGap.exec(null, null, "com.phonegap.media", "play", [this.id, this.src, options]);
-};
-
-/**
- * Stop playing audio file.
- */
-Media.prototype.stop = function() {
- PhoneGap.exec(null, null, "com.phonegap.media","stop", [this.id, this.src]);
-};
-
-/**
- * Pause playing audio file.
- */
-Media.prototype.pause = function() {
- PhoneGap.exec(null, null, "com.phonegap.media","pause", [this.id, this.src]);
-};
-
-/**
- * Seek or jump to a new time in the track..
- */
-Media.prototype.seekTo = function(milliseconds) {
- PhoneGap.exec(null, null, "com.phonegap.media", "seekTo", [this.id, this.src, milliseconds]);
-};
-
-/**
- * Get duration of an audio file.
- * The duration is only set for audio that is playing, paused or stopped.
- *
- * @return duration or -1 if not known.
- */
-Media.prototype.getDuration = function() {
- return this._duration;
-};
-
-/**
- * Get position of audio.
- *
- * @return
- */
-Media.prototype.getCurrentPosition = function(successCB, errorCB) {
- var errCallback = (errorCB == undefined || errorCB == null) ? null : errorCB;
- PhoneGap.exec(successCB, errorCB, "com.phonegap.media", "getCurrentPosition", [this.id, this.src]);
-};
-
-// iOS only. prepare/load the audio in preparation for playing
-Media.prototype.prepare = function(successCB, errorCB) {
- PhoneGap.exec(successCB, errorCB, "com.phonegap.media", "prepare", [this.id, this.src]);
-}
-
-/**
- * Start recording audio file.
- */
-Media.prototype.startRecord = function() {
- PhoneGap.exec(null, null, "com.phonegap.media","startAudioRecord", [this.id, this.src]);
-};
-
-/**
- * Stop recording audio file.
- */
-Media.prototype.stopRecord = function() {
- PhoneGap.exec(null, null, "com.phonegap.media","stopAudioRecord", [this.id, this.src]);
-};
-
-/**
- * Release the resources.
- */
-Media.prototype.release = function() {
- PhoneGap.exec(null, null, "com.phonegap.media","release", [this.id, this.src]);
-};
-
-};
-if (!PhoneGap.hasResource("notification")) {
- PhoneGap.addResource("notification");
-
-/**
- * This class provides access to notifications on the device.
- */
-Notification = function() {
-};
-
-/**
- * Open a native alert dialog, with a customizable title and button text.
- *
- * @param {String} message Message to print in the body of the alert
- * @param {Function} completeCallback The callback that is called when user clicks on a button.
- * @param {String} title Title of the alert dialog (default: Alert)
- * @param {String} buttonLabel Label of the close button (default: OK)
- */
-Notification.prototype.alert = function(message, completeCallback, title, buttonLabel) {
- var _title = title;
- if (title == null || typeof title === 'undefined') {
- _title = "Alert";
- }
- var _buttonLabel = (buttonLabel || "OK");
- PhoneGap.exec(completeCallback, null, "com.phonegap.notification", "alert", [message,{ "title": _title, "buttonLabel": _buttonLabel}]);
-};
-
-/**
- * Open a native confirm dialog, with a customizable title and button text.
- * The result that the user selects is returned to the result callback.
- *
- * @param {String} message Message to print in the body of the alert
- * @param {Function} resultCallback The callback that is called when user clicks on a button.
- * @param {String} title Title of the alert dialog (default: Confirm)
- * @param {String} buttonLabels Comma separated list of the labels of the buttons (default: 'OK,Cancel')
- */
-Notification.prototype.confirm = function(message, resultCallback, title, buttonLabels) {
- var _title = (title || "Confirm");
- var _buttonLabels = (buttonLabels || "OK,Cancel");
- this.alert(message, resultCallback, _title, _buttonLabels);
-};
-
-/**
- * Causes the device to blink a status LED.
- * @param {Integer} count The number of blinks.
- * @param {String} colour The colour of the light.
- */
-Notification.prototype.blink = function(count, colour) {
-// NOT IMPLEMENTED
-};
-
-Notification.prototype.vibrate = function(mills) {
- PhoneGap.exec(null, null, "com.phonegap.notification", "vibrate", []);
-};
-
-Notification.prototype.beep = function(count, volume) {
- // No Volume yet for the iphone interface
- // We can use a canned beep sound and call that
- new Media('beep.wav').play();
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.notification == "undefined") navigator.notification = new Notification();
-});
-};
-if (!PhoneGap.hasResource("orientation")) {
- PhoneGap.addResource("orientation");
-
-/**
- * This class provides access to the device orientation.
- * @constructor
- */
-Orientation = function() {
- /**
- * The current orientation, or null if the orientation hasn't changed yet.
- */
- this.currentOrientation = null;
-}
-
-/**
- * Set the current orientation of the phone. This is called from the device automatically.
- *
- * When the orientation is changed, the DOMEvent \c orientationChanged is dispatched against
- * the document element. The event has the property \c orientation which can be used to retrieve
- * the device's current orientation, in addition to the \c Orientation.currentOrientation class property.
- *
- * @param {Number} orientation The orientation to be set
- */
-Orientation.prototype.setOrientation = function(orientation) {
- Orientation.currentOrientation = orientation;
- var e = document.createEvent('Events');
- e.initEvent('orientationChanged', 'false', 'false');
- e.orientation = orientation;
- document.dispatchEvent(e);
-};
-
-/**
- * Asynchronously aquires the current orientation.
- * @param {Function} successCallback The function to call when the orientation
- * is known.
- * @param {Function} errorCallback The function to call when there is an error
- * getting the orientation.
- */
-Orientation.prototype.getCurrentOrientation = function(successCallback, errorCallback) {
- // If the position is available then call success
- // If the position is not available then call error
-};
-
-/**
- * Asynchronously aquires the orientation repeatedly at a given interval.
- * @param {Function} successCallback The function to call each time the orientation
- * data is available.
- * @param {Function} errorCallback The function to call when there is an error
- * getting the orientation data.
- */
-Orientation.prototype.watchOrientation = function(successCallback, errorCallback) {
- // Invoke the appropriate callback with a new Position object every time the implementation
- // determines that the position of the hosting device has changed.
- this.getCurrentPosition(successCallback, errorCallback);
- return setInterval(function() {
- navigator.orientation.getCurrentOrientation(successCallback, errorCallback);
- }, 10000);
-};
-
-/**
- * Clears the specified orientation watch.
- * @param {String} watchId The ID of the watch returned from #watchOrientation.
- */
-Orientation.prototype.clearWatch = function(watchId) {
- clearInterval(watchId);
-};
-
-Orientation.install = function()
-{
- if (typeof navigator.orientation == "undefined") {
- navigator.orientation = new Orientation();
- }
-
- var windowDispatchAvailable = !(window.dispatchEvent === undefined); // undefined in iOS 3.x
- if (windowDispatchAvailable) {
- return;
- }
-
- // the code below is to capture window.add/remove eventListener calls on window
- // this is for iOS 3.x where listening on 'orientationchange' events don't work on document/window (don't know why)
- // however, window.onorientationchange DOES handle the 'orientationchange' event (sent through document), so...
- // then we multiplex the window.onorientationchange event (consequently - people shouldn't overwrite this)
-
- var self = this;
- var orientationchangeEvent = 'orientationchange';
- var newOrientationchangeEvent = 'orientationchange_pg';
-
- // backup original `window.addEventListener`, `window.removeEventListener`
- var _addEventListener = window.addEventListener;
- var _removeEventListener = window.removeEventListener;
-
- window.onorientationchange = function() {
- PhoneGap.fireEvent(newOrientationchangeEvent, window);
- }
-
- // override `window.addEventListener`
- window.addEventListener = function() {
- if (arguments[0] === orientationchangeEvent) {
- arguments[0] = newOrientationchangeEvent;
- }
-
- if (!windowDispatchAvailable) {
- return document.addEventListener.apply(this, arguments);
- } else {
- return _addEventListener.apply(this, arguments);
- }
- };
-
- // override `window.removeEventListener'
- window.removeEventListener = function() {
- if (arguments[0] === orientationchangeEvent) {
- arguments[0] = newOrientationchangeEvent;
- }
-
- if (!windowDispatchAvailable) {
- return document.removeEventListener.apply(this, arguments);
- } else {
- return _removeEventListener.apply(this, arguments);
- }
- };
-};
-
-PhoneGap.addConstructor(Orientation.install);
-
-};
-if (!PhoneGap.hasResource("sms")) {
- PhoneGap.addResource("sms");
-
-/**
- * This class provides access to the device SMS functionality.
- * @constructor
- */
-Sms = function() {
-
-}
-
-/**
- * Sends an SMS message.
- * @param {Integer} number The phone number to send the message to.
- * @param {String} message The contents of the SMS message to send.
- * @param {Function} successCallback The function to call when the SMS message is sent.
- * @param {Function} errorCallback The function to call when there is an error sending the SMS message.
- * @param {PositionOptions} options The options for accessing the GPS location such as timeout and accuracy.
- */
-Sms.prototype.send = function(number, message, successCallback, errorCallback, options) {
- // not sure why this is here when it does nothing????
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.sms == "undefined") navigator.sms = new Sms();
-});
-};
-if (!PhoneGap.hasResource("telephony")) {
- PhoneGap.addResource("telephony");
-
-/**
- * This class provides access to the telephony features of the device.
- * @constructor
- */
-Telephony = function() {
-
-}
-
-/**
- * Calls the specifed number.
- * @param {Integer} number The number to be called.
- */
-Telephony.prototype.call = function(number) {
- // not sure why this is here when it does nothing????
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.telephony == "undefined") navigator.telephony = new Telephony();
-});
-};if (!PhoneGap.hasResource("network")) {
- PhoneGap.addResource("network");
-
-// //////////////////////////////////////////////////////////////////
-
-Connection = function() {
- /*
- * One of the connection constants below.
- */
- this.type = Connection.UNKNOWN;
-
- /* initialize from the extended DeviceInfo properties */
- try {
- this.type = DeviceInfo.connection.type;
- }
- catch(e) {
- }
-};
-
-Connection.UNKNOWN = "unknown"; // Unknown connection type
-Connection.ETHERNET = "ethernet";
-Connection.WIFI = "wifi";
-Connection.CELL_2G = "2g"; // the default for iOS, for any cellular connection
-Connection.CELL_3G = "3g";
-Connection.CELL_4G = "4g";
-Connection.NONE = "none"; // NO connectivity
-
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.network == "undefined") navigator.network = {};
- if (typeof navigator.network.connection == "undefined") navigator.network.connection = new Connection();
-});
-
-};if (!PhoneGap.hasResource("splashscreen")) {
- PhoneGap.addResource("splashscreen");
-
-/**
- * This class provides access to the splashscreen
- */
-SplashScreen = function() {
-};
-
-SplashScreen.prototype.show = function() {
- PhoneGap.exec(null, null, "com.phonegap.splashscreen", "show", []);
-};
-
-SplashScreen.prototype.hide = function() {
- PhoneGap.exec(null, null, "com.phonegap.splashscreen", "hide", []);
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.splashscreen == "undefined") navigator.splashscreen = new SplashScreen();
-});
-
-};
diff --git a/apps/files_odfviewer/src/webodf/programs/android/libs/phonegap-1.4.1.jar b/apps/files_odfviewer/src/webodf/programs/android/libs/phonegap-1.4.1.jar
deleted file mode 100644
index a30e0218e2b..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/libs/phonegap-1.4.1.jar
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/android/res/drawable-hdpi/ic_launcher.png b/apps/files_odfviewer/src/webodf/programs/android/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index 8074c4c571b..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/android/res/drawable-ldpi/ic_launcher.png b/apps/files_odfviewer/src/webodf/programs/android/res/drawable-ldpi/ic_launcher.png
deleted file mode 100644
index 1095584ec21..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/res/drawable-ldpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/android/res/drawable-mdpi/ic_launcher.png b/apps/files_odfviewer/src/webodf/programs/android/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index a07c69fa5a0..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/android/res/drawable/icon.png b/apps/files_odfviewer/src/webodf/programs/android/res/drawable/icon.png
deleted file mode 100644
index 13ee5e8612c..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/res/drawable/icon.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/android/res/layout/listitem.xml b/apps/files_odfviewer/src/webodf/programs/android/res/layout/listitem.xml
deleted file mode 100644
index f0958d609d6..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/res/layout/listitem.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:padding="10dp"
- android:textSize="16sp" >
-</TextView> \ No newline at end of file
diff --git a/apps/files_odfviewer/src/webodf/programs/android/res/layout/main.xml b/apps/files_odfviewer/src/webodf/programs/android/res/layout/main.xml
deleted file mode 100644
index bc12cd82317..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/res/layout/main.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
-
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="@string/hello" />
-
-</LinearLayout> \ No newline at end of file
diff --git a/apps/files_odfviewer/src/webodf/programs/android/res/layout/selector.xml b/apps/files_odfviewer/src/webodf/programs/android/res/layout/selector.xml
deleted file mode 100644
index 4af1380e951..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/res/layout/selector.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" >
-
- <ScrollView
- android:layout_width="fill_parent"
- android:layout_height="fill_parent">
-
- <TextView android:id="@+id/noteview"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:textSize="10pt" />
- </ScrollView>
-
-</LinearLayout> \ No newline at end of file
diff --git a/apps/files_odfviewer/src/webodf/programs/android/res/values/strings.xml b/apps/files_odfviewer/src/webodf/programs/android/res/values/strings.xml
deleted file mode 100644
index 44673ed78b1..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/res/values/strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
- <string name="hello">Hello World, WebODFActivity!</string>
- <string name="app_name">WebODF</string>
-
-</resources> \ No newline at end of file
diff --git a/apps/files_odfviewer/src/webodf/programs/android/res/xml/phonegap.xml b/apps/files_odfviewer/src/webodf/programs/android/res/xml/phonegap.xml
deleted file mode 100755
index 97f31ea110b..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/res/xml/phonegap.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<phonegap>
- <access origin="http://127.0.0.1*"/>
- <log level="DEBUG"/>
-</phonegap>
diff --git a/apps/files_odfviewer/src/webodf/programs/android/res/xml/plugins.xml b/apps/files_odfviewer/src/webodf/programs/android/res/xml/plugins.xml
deleted file mode 100644
index 3d8d48d8381..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/res/xml/plugins.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<plugins>
- <plugin name="App" value="com.phonegap.App"/>
- <plugin name="Geolocation" value="com.phonegap.GeoBroker"/>
- <plugin name="Device" value="com.phonegap.Device"/>
- <plugin name="Accelerometer" value="com.phonegap.AccelListener"/>
- <plugin name="Compass" value="com.phonegap.CompassListener"/>
- <plugin name="Media" value="com.phonegap.AudioHandler"/>
- <plugin name="Camera" value="com.phonegap.CameraLauncher"/>
- <plugin name="Contacts" value="com.phonegap.ContactManager"/>
- <plugin name="Crypto" value="com.phonegap.CryptoHandler"/>
- <plugin name="File" value="com.phonegap.FileUtils"/>
- <plugin name="Network Status" value="com.phonegap.NetworkManager"/>
- <plugin name="Notification" value="com.phonegap.Notification"/>
- <plugin name="Storage" value="com.phonegap.Storage"/>
- <plugin name="Temperature" value="com.phonegap.TempListener"/>
- <plugin name="FileTransfer" value="com.phonegap.FileTransfer"/>
- <plugin name="Capture" value="com.phonegap.Capture"/>
-</plugins> \ No newline at end of file
diff --git a/apps/files_odfviewer/src/webodf/programs/android/src/org/webodf/WebODFActivity.java b/apps/files_odfviewer/src/webodf/programs/android/src/org/webodf/WebODFActivity.java
deleted file mode 100644
index 9c826c92107..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/src/org/webodf/WebODFActivity.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.webodf;
-
-import android.os.Bundle;
-
-import com.phonegap.DroidGap;
-
-public class WebODFActivity extends DroidGap {
-
- private String path;
-
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- path = null;
- if (getIntent() != null && getIntent().getData() != null) {
- path = getIntent().getData().getPath();
- }
- setContentView(R.layout.main);
- super.loadUrl("file:///android_asset/www/index.html");
- }
-
- @Override
- protected void onResume() {
- super.onResume();
- if (path == null) {
- return;
- }
- String escapedPath = "file://" + path.replace("'", "\\'");
- sendJavascript("invokeString = '" + escapedPath + "';");
- }
-
-} \ No newline at end of file
diff --git a/apps/files_odfviewer/src/webodf/programs/android/updateWebODF.sh b/apps/files_odfviewer/src/webodf/programs/android/updateWebODF.sh
deleted file mode 100755
index b51e94290b2..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/android/updateWebODF.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-# /bin/bash
-cd assets
-for f in `find . -type f`; do cp ../../webodf/$f $f; done
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/CMakeLists.txt b/apps/files_odfviewer/src/webodf/programs/docnosis/CMakeLists.txt
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/CMakeLists.txt
+++ /dev/null
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-manifest-schema-v1.0-os.rng b/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-manifest-schema-v1.0-os.rng
deleted file mode 100644
index 97fe580eab9..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-manifest-schema-v1.0-os.rng
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- OASIS OpenDocument v1.0
- OASIS standard, 1 May 2005
- Relax-NG Manifest Schema
-
- $Id$
-
- © 2002-2005 OASIS Open
- © 1999-2005 Sun Microsystems, Inc.
--->
-
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
-
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
-
- xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0">
-<define name="manifest">
- <element name="manifest:manifest">
- <oneOrMore>
- <ref name="file-entry"/>
- </oneOrMore>
- </element>
-</define>
-
-<start>
- <choice>
- <ref name="manifest"/>
- </choice>
-</start>
-<define name="file-entry">
- <element name="manifest:file-entry">
- <ref name="file-entry-attlist"/>
- <optional>
- <ref name="encryption-data"/>
- </optional>
- </element>
-</define>
-<define name="file-entry-attlist" combine="interleave">
- <attribute name="manifest:full-path">
- <data type="string"/>
- </attribute>
-</define>
-<define name="file-entry-attlist" combine="interleave">
- <optional>
- <attribute name="manifest:size">
- <data type="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="file-entry-attlist" combine="interleave">
- <attribute name="manifest:media-type">
- <data type="string"/>
- </attribute>
-</define>
-<define name="encryption-data">
- <element name="manifest:encryption-data">
- <ref name="encryption-data-attlist"/>
- <ref name="algorithm"/>
- <ref name="key-derivation"/>
- </element>
-</define>
-<define name="encryption-data-attlist" combine="interleave">
- <attribute name="manifest:checksum-type">
- <data type="string"/>
- </attribute>
-</define>
-<define name="encryption-data-attlist" combine="interleave">
- <attribute name="manifest:checksum">
- <data type="base64Binary"/>
- </attribute>
-</define>
-<define name="algorithm">
- <element name="manifest:algorithm">
- <ref name="algorithm-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="algorithm-attlist" combine="interleave">
- <attribute name="manifest:algorithm-name">
- <data type="string"/>
- </attribute>
-</define>
-<define name="algorithm-attlist" combine="interleave">
- <attribute name="manifest:initialisation-vector">
- <data type="base64Binary"/>
- </attribute>
-</define>
-<define name="key-derivation">
- <element name="manifest:key-derivation">
- <ref name="key-derivation-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="key-derivation-attlist" combine="interleave">
- <attribute name="manifest:key-derivation-name">
- <data type="string"/>
- </attribute>
-</define>
-<define name="key-derivation-attlist" combine="interleave">
- <attribute name="manifest:salt">
- <data type="base64Binary"/>
- </attribute>
-</define>
-<define name="key-derivation-attlist" combine="interleave">
- <attribute name="manifest:iteration-count">
- <data type="nonNegativeInteger"/>
- </attribute>
-</define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-manifest-schema-v1.1.rng b/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-manifest-schema-v1.1.rng
deleted file mode 100644
index 4082d4ba95d..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-manifest-schema-v1.1.rng
+++ /dev/null
@@ -1,111 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- OASIS OpenDocument v1.1
- OASIS Standard, 1 Feb 2007
- Relax-NG Manifest Schema
-
- $Id$
-
- © 2002-2007 OASIS Open
- © 1999-2007 Sun Microsystems, Inc.
--->
-
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
-
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
-
- xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0">
-<define name="manifest">
- <element name="manifest:manifest">
- <oneOrMore>
- <ref name="file-entry"/>
- </oneOrMore>
- </element>
-</define>
-
-<start>
- <choice>
- <ref name="manifest"/>
- </choice>
-</start>
-<define name="file-entry">
- <element name="manifest:file-entry">
- <ref name="file-entry-attlist"/>
- <optional>
- <ref name="encryption-data"/>
- </optional>
- </element>
-</define>
-<define name="file-entry-attlist" combine="interleave">
- <attribute name="manifest:full-path">
- <data type="string"/>
- </attribute>
-</define>
-<define name="file-entry-attlist" combine="interleave">
- <optional>
- <attribute name="manifest:size">
- <data type="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="file-entry-attlist" combine="interleave">
- <attribute name="manifest:media-type">
- <data type="string"/>
- </attribute>
-</define>
-<define name="encryption-data">
- <element name="manifest:encryption-data">
- <ref name="encryption-data-attlist"/>
- <ref name="algorithm"/>
- <ref name="key-derivation"/>
- </element>
-</define>
-<define name="encryption-data-attlist" combine="interleave">
- <attribute name="manifest:checksum-type">
- <data type="string"/>
- </attribute>
-</define>
-<define name="encryption-data-attlist" combine="interleave">
- <attribute name="manifest:checksum">
- <data type="base64Binary"/>
- </attribute>
-</define>
-<define name="algorithm">
- <element name="manifest:algorithm">
- <ref name="algorithm-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="algorithm-attlist" combine="interleave">
- <attribute name="manifest:algorithm-name">
- <data type="string"/>
- </attribute>
-</define>
-<define name="algorithm-attlist" combine="interleave">
- <attribute name="manifest:initialisation-vector">
- <data type="base64Binary"/>
- </attribute>
-</define>
-<define name="key-derivation">
- <element name="manifest:key-derivation">
- <ref name="key-derivation-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="key-derivation-attlist" combine="interleave">
- <attribute name="manifest:key-derivation-name">
- <data type="string"/>
- </attribute>
-</define>
-<define name="key-derivation-attlist" combine="interleave">
- <attribute name="manifest:salt">
- <data type="base64Binary"/>
- </attribute>
-</define>
-<define name="key-derivation-attlist" combine="interleave">
- <attribute name="manifest:iteration-count">
- <data type="nonNegativeInteger"/>
- </attribute>
-</define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-schema-v1.0-os.rng b/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-schema-v1.0-os.rng
deleted file mode 100644
index cf4ee51741a..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-schema-v1.0-os.rng
+++ /dev/null
@@ -1,17666 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- OASIS OpenDocument v1.0
- OASIS Standard, 1 May 2005
- Relax-NG Schema
-
- $Id$
-
- © 2002-2005 OASIS Open
- © 1999-2005 Sun Microsystems, Inc.
--->
-
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
-
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
-
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
- xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
- xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
- xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
- xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
- xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
- xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
- xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
- xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
-
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:math="http://www.w3.org/1998/Math/MathML"
- xmlns:xforms="http://www.w3.org/2002/xforms"
-
- xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
- xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
- xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"
->
-<define name="office-process-content">
- <optional>
- <attribute name="office:process-content" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<start>
- <choice>
- <ref name="office-document"/>
- <ref name="office-document-content"/>
- <ref name="office-document-styles"/>
- <ref name="office-document-meta"/>
- <ref name="office-document-settings"/>
- </choice>
-</start>
-<define name="office-document">
- <element name="office:document">
- <ref name="office-document-attrs"/>
- <ref name="office-document-common-attrs"/>
- <ref name="office-meta"/>
- <ref name="office-settings"/>
- <ref name="office-scripts"/>
- <ref name="office-font-face-decls"/>
- <ref name="office-styles"/>
- <ref name="office-automatic-styles"/>
- <ref name="office-master-styles"/>
- <ref name="office-body"/>
- </element>
-</define>
-<define name="office-document-content">
- <element name="office:document-content">
- <ref name="office-document-common-attrs"/>
- <ref name="office-scripts"/>
- <ref name="office-font-face-decls"/>
- <ref name="office-automatic-styles"/>
- <ref name="office-body"/>
- </element>
-</define>
-<define name="office-document-styles">
- <element name="office:document-styles">
- <ref name="office-document-common-attrs"/>
- <ref name="office-font-face-decls"/>
- <ref name="office-styles"/>
- <ref name="office-automatic-styles"/>
- <ref name="office-master-styles"/>
- </element>
-</define>
-<define name="office-document-meta">
- <element name="office:document-meta">
- <ref name="office-document-common-attrs"/>
- <ref name="office-meta"/>
- </element>
-</define>
-<define name="office-document-settings">
- <element name="office:document-settings">
- <ref name="office-document-common-attrs"/>
- <ref name="office-settings"/>
- </element>
-</define>
-<define name="office-document-common-attrs" combine="interleave">
- <optional>
- <attribute name="office:version">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="office-document-attrs" combine="interleave">
- <attribute name="office:mimetype">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="office-meta">
- <optional>
- <element name="office:meta">
- <ref name="office-meta-content"/>
- </element>
- </optional>
-</define>
-
-<define name="office-meta-content">
- <ref name="anyElements"/>
-</define>
-
-<define name="office-meta-content-strict">
- <zeroOrMore>
- <ref name="office-meta-data"/>
- </zeroOrMore>
-</define>
-<define name="office-body">
- <element name="office:body">
- <ref name="office-body-content"/>
- </element>
-</define>
-<define name="office-body-content" combine="choice">
- <element name="office:text">
- <ref name="office-text-attlist"/>
- <ref name="office-text-content-prelude"/>
- <zeroOrMore>
- <ref name="office-text-content-main"/>
- </zeroOrMore>
- <ref name="office-text-content-epilogue"/>
- </element>
-</define>
-<define name="office-text-content-prelude">
- <ref name="office-forms"/>
- <ref name="text-tracked-changes"/>
- <ref name="text-decls"/>
- <ref name="table-decls"/>
-</define>
-<define name="office-text-content-main">
- <choice>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- <group>
- <ref name="text-page-sequence"/>
- <zeroOrMore>
- <choice>
- <ref name="draw-a"/>
- <ref name="shape"/>
- </choice>
- </zeroOrMore>
- </group>
- </choice>
-</define>
-
-<define name="text-content">
- <choice>
- <ref name="text-h"/>
- <ref name="text-p"/>
- <ref name="text-list"/>
- <ref name="text-numbered-paragraph"/>
- <ref name="table-table"/>
- <ref name="draw-a"/>
- <ref name="text-section"/>
- <ref name="text-table-of-content"/>
- <ref name="text-illustration-index"/>
- <ref name="text-table-index"/>
- <ref name="text-object-index"/>
- <ref name="text-user-index"/>
- <ref name="text-alphabetical-index"/>
- <ref name="text-bibliography"/>
- <ref name="shape"/>
- <ref name="change-marks"/>
- </choice>
-</define>
-<define name="office-text-content-epilogue">
- <ref name="table-functions"/>
-</define>
-<define name="office-text-attlist" combine="interleave">
- <optional>
- <attribute name="text:global" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="office-body-content" combine="choice">
- <element name="office:drawing">
- <ref name="office-drawing-attlist"/>
- <ref name="office-drawing-content-prelude"/>
- <ref name="office-drawing-content-main"/>
- <ref name="office-drawing-content-epilogue"/>
- </element>
-</define>
-
-<define name="office-drawing-attlist">
- <empty/>
-</define>
-<define name="office-drawing-content-prelude">
- <ref name="text-decls"/>
- <ref name="table-decls"/>
-</define>
-<define name="office-drawing-content-main">
- <zeroOrMore>
- <ref name="draw-page"/>
- </zeroOrMore>
-</define>
-<define name="office-drawing-content-epilogue">
- <ref name="table-functions"/>
-</define>
-<define name="office-body-content" combine="choice">
- <element name="office:presentation">
- <ref name="office-presentation-attlist"/>
- <ref name="office-presentation-content-prelude"/>
- <ref name="office-presentation-content-main"/>
- <ref name="office-presentation-content-epilogue"/>
- </element>
-</define>
-
-<define name="office-presentation-attlist">
- <empty/>
-</define>
-<define name="office-presentation-content-prelude">
- <ref name="text-decls"/>
- <ref name="table-decls"/>
- <ref name="presentation-decls"/>
-</define>
-<define name="office-presentation-content-main">
- <zeroOrMore>
- <ref name="draw-page"/>
- </zeroOrMore>
-</define>
-<define name="office-presentation-content-epilogue">
- <ref name="presentation-settings"/>
- <ref name="table-functions"/>
-</define>
-<define name="office-body-content" combine="choice">
- <element name="office:spreadsheet">
- <ref name="office-spreadsheet-attlist"/>
- <ref name="office-spreadsheet-content-prelude"/>
- <ref name="office-spreadsheet-content-main"/>
- <ref name="office-spreadsheet-content-epilogue"/>
- </element>
-</define>
-<define name="office-spreadsheet-content-prelude">
- <optional>
- <ref name="table-tracked-changes"/>
- </optional>
- <ref name="text-decls"/>
- <ref name="table-decls"/>
-</define>
-
-<define name="table-decls">
- <optional>
- <ref name="table-calculation-settings"/>
- </optional>
- <optional>
- <ref name="table-content-validations"/>
- </optional>
- <optional>
- <ref name="table-label-ranges"/>
- </optional>
-</define>
-<define name="office-spreadsheet-content-main">
- <zeroOrMore>
- <ref name="table-table"/>
- </zeroOrMore>
-</define>
-<define name="office-spreadsheet-content-epilogue">
- <ref name="table-functions"/>
-</define>
-
-<define name="table-functions">
- <optional>
- <ref name="table-named-expressions"/>
- </optional>
- <optional>
- <ref name="table-database-ranges"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-tables"/>
- </optional>
- <optional>
- <ref name="table-consolidation"/>
- </optional>
- <optional>
- <ref name="table-dde-links"/>
- </optional>
-</define>
-<define name="office-body-content" combine="choice">
- <element name="office:chart">
- <ref name="office-chart-attlist"/>
- <ref name="office-chart-content-prelude"/>
- <ref name="office-chart-content-main"/>
- <ref name="office-chart-content-epilogue"/>
- </element>
-</define>
-
-<define name="office-chart-attlist">
- <empty/>
-</define>
-<define name="office-chart-content-prelude">
- <ref name="text-decls"/>
- <ref name="table-decls"/>
-</define>
-<define name="office-chart-content-main">
- <ref name="chart-chart"/>
-</define>
-<define name="office-chart-content-epilogue">
- <ref name="table-functions"/>
-</define>
-<define name="office-body-content" combine="choice">
- <element name="office:image">
- <ref name="office-image-attlist"/>
- <ref name="office-image-content-prelude"/>
- <ref name="office-image-content-main"/>
- <ref name="office-image-content-epilogue"/>
- </element>
-</define>
-
-<define name="office-image-attlist">
- <empty/>
-</define>
-<define name="office-image-content-prelude">
- <empty/>
-</define>
-<define name="office-image-content-main">
- <ref name="draw-frame"/>
-</define>
-<define name="office-image-content-epilogue">
- <empty/>
-</define>
-<define name="office-settings">
- <optional>
- <element name="office:settings">
- <oneOrMore>
- <ref name="config-config-item-set"/>
- </oneOrMore>
- </element>
- </optional>
-</define>
-<define name="config-config-item-set">
- <element name="config:config-item-set">
- <ref name="config-config-item-set-attlist"/>
- <ref name="config-items"/>
- </element>
-</define>
-
-<define name="config-items">
- <oneOrMore>
- <choice>
- <ref name="config-config-item"/>
- <ref name="config-config-item-set"/>
- <ref name="config-config-item-map-named"/>
- <ref name="config-config-item-map-indexed"/>
- </choice>
- </oneOrMore>
-</define>
-<define name="config-config-item-set-attlist" combine="interleave">
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="config-config-item">
- <element name="config:config-item">
- <ref name="config-config-item-attlist"/>
- <text/>
- </element>
-</define>
-<define name="config-config-item-attlist" combine="interleave">
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="config-config-item-attlist" combine="interleave">
- <attribute name="config:type">
- <choice>
- <value>boolean</value>
- <value>short</value>
- <value>int</value>
- <value>long</value>
- <value>double</value>
- <value>string</value>
- <value>datetime</value>
- <value>base64Binary</value>
- </choice>
- </attribute>
-</define>
-<define name="config-config-item-map-indexed">
- <element name="config:config-item-map-indexed">
- <ref name="config-config-item-map-indexed-attlist"/>
- <oneOrMore>
- <ref name="config-config-item-map-entry"/>
- </oneOrMore>
- </element>
-</define>
-<define name="config-config-item-map-indexed-attlist" combine="interleave">
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="config-config-item-map-entry">
- <element name="config:config-item-map-entry">
- <ref name="config-config-item-map-entry-attlist"/>
- <ref name="config-items"/>
- </element>
-</define>
-<define name="config-config-item-map-entry-attlist" combine="interleave">
- <optional>
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="config-config-item-map-named">
- <element name="config:config-item-map-named">
- <ref name="config-config-item-map-named-attlist"/>
- <oneOrMore>
- <ref name="config-config-item-map-entry"/>
- </oneOrMore>
- </element>
-</define>
-<define name="config-config-item-map-named-attlist" combine="interleave">
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="office-scripts">
- <optional>
- <element name="office:scripts">
- <zeroOrMore>
- <ref name="office-script"/>
- </zeroOrMore>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </element>
- </optional>
-</define>
-<define name="office-script">
- <element name="office:script">
- <ref name="office-script-attlist"/>
- <mixed>
- <ref name="anyElements"/>
- </mixed>
- </element>
-</define>
-<define name="office-script-attlist">
- <attribute name="script:language">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="office-font-face-decls">
- <optional>
- <element name="office:font-face-decls">
- <zeroOrMore>
- <ref name="style-font-face"/>
- </zeroOrMore>
- </element>
- </optional>
-</define>
-<define name="office-styles">
- <optional>
- <element name="office:styles">
- <interleave>
- <ref name="styles"/>
- <zeroOrMore>
- <ref name="style-default-style"/>
- </zeroOrMore>
- <optional>
- <ref name="text-outline-style"/>
- </optional>
- <zeroOrMore>
- <ref name="text-notes-configuration"/>
- </zeroOrMore>
- <optional>
- <ref name="text-bibliography-configuration"/>
- </optional>
- <optional>
- <ref name="text-linenumbering-configuration"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-gradient"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="svg-linearGradient"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="svg-radialGradient"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-hatch"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-fill-image"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-marker"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-stroke-dash"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-opacity"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="style-presentation-page-layout"/>
- </zeroOrMore>
- </interleave>
- </element>
- </optional>
-</define>
-<define name="office-automatic-styles">
- <optional>
- <element name="office:automatic-styles">
- <interleave>
- <ref name="styles"/>
- <zeroOrMore>
- <ref name="style-page-layout"/>
- </zeroOrMore>
- </interleave>
- </element>
- </optional>
-</define>
-<define name="office-master-styles">
- <optional>
- <element name="office:master-styles">
- <interleave>
- <zeroOrMore>
- <ref name="style-master-page"/>
- </zeroOrMore>
- <optional>
- <ref name="style-handout-master"/>
- </optional>
- <optional>
- <ref name="draw-layer-set"/>
- </optional>
- </interleave>
- </element>
- </optional>
-</define>
-
-<define name="styles">
- <interleave>
- <zeroOrMore>
- <ref name="style-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="text-list-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-number-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-currency-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-percentage-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-date-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-time-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-boolean-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-text-style"/>
- </zeroOrMore>
- </interleave>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:generator">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="dc:title">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="dc:description">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="dc:subject">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:keyword">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:initial-creator">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <ref name="dc-creator"/>
-</define>
-<define name="dc-creator">
- <element name="dc:creator">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:printed-by">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:creation-date">
- <ref name="dateTime"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <ref name="dc-date"/>
-</define>
-<define name="dc-date">
- <element name="dc:date">
- <ref name="dateTime"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:print-date">
- <ref name="dateTime"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:template">
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <value>onRequest</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:title">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:date">
- <ref name="dateTime"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:auto-reload">
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show" a:defaultValue="replace">
- <value>replace</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onLoad">
- <value>onLoad</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:delay">
- <ref name="duration"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:hyperlink-behaviour">
- <optional>
- <attribute name="office:target-frame-name">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="dc:language">
- <ref name="language"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:editing-cycles">
- <ref name="nonNegativeInteger"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:editing-duration">
- <ref name="duration"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:document-statistic">
- <optional>
- <attribute name="meta:page-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:table-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:draw-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:image-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:ole-object-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:paragraph-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:word-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:character-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="frame-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="sentence-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="syllable-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="non-whitespace-character-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:row-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:cell-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:object-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:user-defined">
- <attribute name="meta:name">
- <ref name="string"/>
- </attribute>
- <choice>
- <group>
- <attribute name="meta:value-type">
- <value>float</value>
- </attribute>
- <ref name="double"/>
- </group>
- <group>
- <attribute name="meta:value-type">
- <value>date</value>
- </attribute>
- <ref name="dateOrDateTime"/>
- </group>
- <group>
- <attribute name="meta:value-type">
- <value>time</value>
- </attribute>
- <ref name="duration"/>
- </group>
- <group>
- <attribute name="meta:value-type">
- <value>boolean</value>
- </attribute>
- <ref name="boolean"/>
- </group>
- <group>
- <attribute name="meta:value-type">
- <value>string</value>
- </attribute>
- <ref name="string"/>
- </group>
- <text/>
- </choice>
- </element>
-</define>
-<define name="text-h">
- <element name="text:h">
- <ref name="heading-attrs"/>
- <ref name="paragraph-attrs"/>
- <optional>
- <ref name="text-number"/>
- </optional>
- <zeroOrMore>
- <ref name="paragraph-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="heading-attrs" combine="interleave">
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="heading-attrs" combine="interleave">
- <optional>
- <attribute name="text:restart-numbering" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="heading-attrs" combine="interleave">
- <optional>
- <attribute name="text:start-value">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="heading-attrs" combine="interleave">
- <optional>
- <attribute name="text:is-list-header" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-number">
- <element name="text:number">
- <ref name="string"/>
- </element>
-</define>
-<define name="text-p">
- <element name="text:p">
- <ref name="paragraph-attrs"/>
- <zeroOrMore>
- <ref name="paragraph-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="paragraph-attrs">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:class-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:cond-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-attrs" combine="interleave">
- <optional>
- <ref name="text-id"/>
- </optional>
-</define>
-<define name="text-page-sequence">
- <element name="text:page-sequence">
- <oneOrMore>
- <ref name="text-page"/>
- </oneOrMore>
- </element>
-</define>
-<define name="text-page">
- <element name="text:page">
- <ref name="text-page-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="text-page-attlist">
- <attribute name="text:master-page-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="text-list">
- <element name="text:list">
- <ref name="text-list-attr"/>
- <optional>
- <ref name="text-list-header"/>
- </optional>
- <zeroOrMore>
- <ref name="text-list-item"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-list-attr" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-attr" combine="interleave">
- <optional>
- <attribute name="text:continue-numbering">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-item">
- <element name="text:list-item">
- <ref name="text-list-item-attr"/>
- <ref name="text-list-item-content"/>
- </element>
-</define>
-<define name="text-list-item-content">
- <optional>
- <ref name="text-number"/>
- </optional>
- <zeroOrMore>
- <choice>
- <ref name="text-p"/>
- <ref name="text-h"/>
- <ref name="text-list"/>
- </choice>
- </zeroOrMore>
-</define>
-<define name="text-list-item-attr" combine="interleave">
- <optional>
- <attribute name="text:start-value">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-header">
- <element name="text:list-header">
- <ref name="text-list-item-content"/>
- </element>
-</define>
-<define name="text-numbered-paragraph">
- <element name="text:numbered-paragraph">
- <ref name="text-numbered-paragraph-attr"/>
- <optional>
- <ref name="text-number"/>
- </optional>
- <choice>
- <ref name="text-p"/>
- <ref name="text-h"/>
- </choice>
- </element>
-</define>
-<define name="text-numbered-paragraph-attr" combine="interleave">
- <optional>
- <attribute name="text:level" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-numbered-paragraph-attr" combine="interleave">
- <ref name="text-list-attr"/>
-</define>
-<define name="text-numbered-paragraph-attr" combine="interleave">
- <ref name="text-list-item-attr"/>
-</define>
-<define name="text-section">
- <element name="text:section">
- <ref name="text-section-attr"/>
- <choice>
- <ref name="text-section-source"/>
- <ref name="text-section-source-dde"/>
- <empty/>
- </choice>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-section-attr" combine="interleave">
- <ref name="sectionAttr"/>
-</define>
-<define name="sectionAttr" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="sectionAttr" combine="interleave">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="sectionAttr" combine="interleave">
- <optional>
- <attribute name="text:protected">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="sectionAttr" combine="interleave">
- <optional>
- <attribute name="text:protection-key">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-section-attr" combine="interleave">
- <choice>
- <attribute name="text:display">
- <choice>
- <value>true</value>
- <value>none</value>
- </choice>
- </attribute>
- <group>
- <attribute name="text:display">
- <value>condition</value>
- </attribute>
- <attribute name="text:condition">
- <ref name="string"/>
- </attribute>
- </group>
- <empty/>
- </choice>
-</define>
-<define name="text-section-source">
- <element name="text:section-source">
- <ref name="text-section-source-attr"/>
- </element>
-</define>
-<define name="text-section-source-attr" combine="interleave">
- <optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show" a:defaultValue="embed">
- <value>embed</value>
- </attribute>
- </optional>
- </optional>
-</define>
-<define name="text-section-source-attr" combine="interleave">
- <optional>
- <attribute name="text:section-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-section-source-attr" combine="interleave">
- <optional>
- <attribute name="text:filter-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-section-source-dde">
- <ref name="office-dde-source"/>
-</define>
-<define name="text-tracked-changes">
- <optional>
- <element name="text:tracked-changes">
- <ref name="text-tracked-changes-attr"/>
- <zeroOrMore>
- <ref name="text-changed-region"/>
- </zeroOrMore>
- </element>
- </optional>
-</define>
-<define name="text-tracked-changes-attr" combine="interleave">
- <optional>
- <attribute name="text:track-changes" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-changed-region">
- <element name="text:changed-region">
- <ref name="text-changed-region-attr"/>
- <ref name="text-changed-region-content"/>
- </element>
-</define>
-<define name="text-changed-region-attr" combine="interleave">
- <attribute name="text:id">
- <ref name="ID"/>
- </attribute>
-</define>
-<define name="text-changed-region-content" combine="choice">
- <element name="text:insertion">
- <ref name="office-change-info"/>
- </element>
-</define>
-<define name="text-changed-region-content" combine="choice">
- <element name="text:deletion">
- <ref name="office-change-info"/>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-changed-region-content" combine="choice">
- <element name="text:format-change">
- <ref name="office-change-info"/>
- </element>
-</define>
-<define name="change-marks">
- <choice>
- <element name="text:change">
- <ref name="change-mark-attr"/>
- </element>
- <element name="text:change-start">
- <ref name="change-mark-attr"/>
- </element>
- <element name="text:change-end">
- <ref name="change-mark-attr"/>
- </element>
- </choice>
-</define>
-<define name="change-mark-attr">
- <attribute name="text:change-id">
- <ref name="IDREF"/>
- </attribute>
-</define>
-<define name="text-decls">
- <optional>
- <element name="text:variable-decls">
- <zeroOrMore>
- <ref name="text-variable-decl"/>
- </zeroOrMore>
- </element>
- </optional>
- <optional>
- <element name="text:sequence-decls">
- <zeroOrMore>
- <ref name="text-sequence-decl"/>
- </zeroOrMore>
- </element>
- </optional>
- <optional>
- <element name="text:user-field-decls">
- <zeroOrMore>
- <ref name="text-user-field-decl"/>
- </zeroOrMore>
- </element>
- </optional>
- <optional>
- <element name="text:dde-connection-decls">
- <zeroOrMore>
- <ref name="text-dde-connection-decl"/>
- </zeroOrMore>
- </element>
- </optional>
- <optional>
- <ref name="text-alphabetical-index-auto-mark-file"/>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <text/>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:s">
- <optional>
- <attribute name="text:c">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:tab">
- <ref name="text-tab-attr"/>
- </element>
-</define>
-<define name="text-tab-attr">
- <optional>
- <attribute name="text:tab-ref">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:line-break">
- <empty/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:span">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:class-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="paragraph-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:a">
- <ref name="text-a-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="paragraph-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-a-attlist" combine="interleave">
- <optional>
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-a-attlist" combine="interleave">
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <value>onRequest</value>
- </attribute>
- </optional>
-</define>
-<define name="text-a-attlist" combine="interleave">
- <optional>
- <attribute name="office:target-frame-name">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-a-attlist" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:visited-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <choice>
- <element name="text:bookmark">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
- <element name="text:bookmark-start">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
- <element name="text:bookmark-end">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
- </choice>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:reference-mark">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <choice>
- <element name="text:reference-mark-start">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
- <element name="text:reference-mark-end">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
- </choice>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:note">
- <ref name="text-note-class"/>
- <optional>
- <attribute name="text:id">
- <ref name="string"/>
- </attribute>
- </optional>
- <element name="text:note-citation">
- <optional>
- <attribute name="text:label">
- <ref name="string"/>
- </attribute>
- </optional>
- <text/>
- </element>
- <element name="text:note-body">
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- </element>
- </element>
-</define>
-<define name="text-note-class">
- <attribute name="text:note-class">
- <choice>
- <value>footnote</value>
- <value>endnote</value>
- </choice>
- </attribute>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:ruby">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <element name="text:ruby-base">
- <ref name="paragraph-content"/>
- </element>
- <element name="text:ruby-text">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <text/>
- </element>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <ref name="office-annotation"/>
-</define>
-<define name="paragraph-content" combine="choice">
- <ref name="change-marks"/>
-</define>
-<define name="paragraph-content" combine="choice">
- <choice>
- <ref name="shape"/>
- <ref name="draw-a"/>
- </choice>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:date">
- <ref name="text-date-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-date-attlist" combine="interleave">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
-</define>
-<define name="text-date-attlist" combine="interleave">
- <optional>
- <attribute name="text:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </optional>
-</define>
-<define name="text-date-attlist" combine="interleave">
- <optional>
- <attribute name="text:date-adjust">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:time">
- <ref name="text-time-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-time-attlist" combine="interleave">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
-</define>
-<define name="text-time-attlist" combine="interleave">
- <optional>
- <attribute name="text:time-value">
- <ref name="timeOrDateTime"/>
- </attribute>
- </optional>
-</define>
-<define name="text-time-attlist" combine="interleave">
- <optional>
- <attribute name="text:time-adjust">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:page-number">
- <ref name="text-page-number-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-page-number-attlist" combine="interleave">
- <interleave>
- <ref name="common-field-num-format-attlist"/>
- <ref name="common-field-fixed-attlist"/>
- </interleave>
-</define>
-<define name="text-page-number-attlist" combine="interleave">
- <optional>
- <attribute name="text:page-adjust">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="text-page-number-attlist" combine="interleave">
- <optional>
- <attribute name="text:select-page">
- <choice>
- <value>previous</value>
- <value>current</value>
- <value>next</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:page-continuation">
- <ref name="text-page-continuation-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-page-continuation-attlist" combine="interleave">
- <attribute name="text:select-page">
- <choice>
- <value>previous</value>
- <value>next</value>
- </choice>
- </attribute>
-</define>
-<define name="text-page-continuation-attlist" combine="interleave">
- <optional>
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-firstname">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-lastname">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-initials">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-title">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-position">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-email">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-phone-private">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-fax">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-company">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-phone-work">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-street">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-city">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-postal-code">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-country">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-state-or-province">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:author-name">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:author-initials">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:chapter">
- <ref name="text-chapter-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-chapter-attlist" combine="interleave">
- <attribute name="text:display">
- <choice>
- <value>name</value>
- <value>number</value>
- <value>number-and-name</value>
- <value>plain-number-and-name</value>
- <value>plain-number</value>
- </choice>
- </attribute>
-</define>
-<define name="text-chapter-attlist" combine="interleave">
- <attribute name="text:outline-level">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:file-name">
- <ref name="text-file-name-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-file-name-attlist" combine="interleave">
- <optional>
- <attribute name="text:display">
- <choice>
- <value>full</value>
- <value>path</value>
- <value>name</value>
- <value>name-and-extension</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-file-name-attlist" combine="interleave">
- <ref name="common-field-fixed-attlist"/>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:template-name">
- <ref name="text-template-name-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-template-name-attlist">
- <optional>
- <attribute name="text:display">
- <choice>
- <value>full</value>
- <value>path</value>
- <value>name</value>
- <value>name-and-extension</value>
- <value>area</value>
- <value>title</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sheet-name">
- <text/>
- </element>
-</define>
-<define name="text-variable-decl">
- <element name="text:variable-decl">
- <ref name="common-field-name-attlist"/>
- <ref name="common-value-type-attlist"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:variable-set">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-formula-attlist"/>
- <ref name="common-value-and-type-attlist"/>
- <ref name="common-field-display-value-none-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:variable-get">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-display-value-formula-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:variable-input">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-description-attlist"/>
- <ref name="common-value-type-attlist"/>
- <ref name="common-field-display-value-none-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="text-user-field-decl">
- <element name="text:user-field-decl">
- <ref name="common-field-name-attlist"/>
- <optional>
- <ref name="common-field-formula-attlist"/>
- </optional>
- <ref name="common-value-and-type-attlist"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:user-field-get">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-display-value-formula-none-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:user-field-input">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-description-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="text-sequence-decl">
- <element name="text:sequence-decl">
- <ref name="text-sequence-decl-attlist"/>
- </element>
-</define>
-<define name="text-sequence-decl-attlist" combine="interleave">
- <ref name="common-field-name-attlist"/>
-</define>
-<define name="text-sequence-decl-attlist" combine="interleave">
- <attribute name="text:display-outline-level">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="text-sequence-decl-attlist" combine="interleave">
- <optional>
- <attribute name="text:separation-character">
- <ref name="character"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sequence">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-formula-attlist"/>
- <ref name="common-field-num-format-attlist"/>
- <ref name="text-sequence-ref-name"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="text-sequence-ref-name">
- <optional>
- <attribute name="text:ref-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:expression">
- <interleave>
- <ref name="common-field-formula-attlist"/>
- <optional>
- <ref name="common-value-and-type-attlist"/>
- </optional>
- <ref name="common-field-display-value-formula-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:text-input">
- <ref name="common-field-description-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:initial-creator">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:creation-date">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:creation-time">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:time-value">
- <ref name="timeOrDateTime"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:description">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:user-defined">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:time-value">
- <ref name="duration"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:boolean-value">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:string-value">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:print-time">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:time-value">
- <ref name="time"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:print-date">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:date-value">
- <ref name="date"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:printed-by">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:title">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:subject">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:keywords">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:editing-cycles">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:editing-duration">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:duration">
- <ref name="duration"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:modification-time">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:time-value">
- <ref name="time"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:modification-date">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:date-value">
- <ref name="date"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:creator">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element>
- <choice>
- <name>text:page-count</name>
- <name>text:paragraph-count</name>
- <name>text:word-count</name>
- <name>text:character-count</name>
- <name>text:table-count</name>
- <name>text:image-count</name>
- <name>text:object-count</name>
- </choice>
- <ref name="common-field-num-format-attlist"/>
- <text/>
- </element>
-</define>
-<define name="common-field-database-table">
- <ref name="common-field-database-table-attlist"/>
- <ref name="common-field-database-name"/>
-</define>
-<define name="common-field-database-name" combine="choice">
- <optional>
- <attribute name="text:database-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-field-database-name" combine="choice">
- <ref name="form-connection-resource"/>
-</define>
-<define name="common-field-database-table-attlist" combine="interleave">
- <attribute name="text:table-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="common-field-database-table-attlist" combine="interleave">
- <optional>
- <attribute name="text:table-type">
- <choice>
- <value>table</value>
- <value>query</value>
- <value>command</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:database-display">
- <ref name="text-database-display-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-database-display-attlist" combine="interleave">
- <ref name="common-field-database-table"/>
-</define>
-<define name="text-database-display-attlist" combine="interleave">
- <ref name="common-field-data-style-name-attlist"/>
-</define>
-<define name="text-database-display-attlist" combine="interleave">
- <attribute name="text:column-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:database-next">
- <ref name="text-database-next-attlist"/>
- </element>
-</define>
-<define name="text-database-next-attlist" combine="interleave">
- <ref name="common-field-database-table"/>
-</define>
-<define name="text-database-next-attlist" combine="interleave">
- <optional>
- <attribute name="text:condition">
- <ref name="formula"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:database-row-select">
- <ref name="text-database-row-select-attlist"/>
- </element>
-</define>
-<define name="text-database-row-select-attlist" combine="interleave">
- <ref name="common-field-database-table"/>
-</define>
-<define name="text-database-row-select-attlist" combine="interleave">
- <optional>
- <attribute name="text:condition">
- <ref name="formula"/>
- </attribute>
- </optional>
-</define>
-<define name="text-database-row-select-attlist" combine="interleave">
- <optional>
- <attribute name="text:row-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:database-row-number">
- <interleave>
- <ref name="common-field-database-table"/>
- <ref name="common-field-num-format-attlist"/>
- <optional>
- <attribute name="text:value">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:database-name">
- <ref name="common-field-database-table"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:page-variable-set">
- <ref name="text-set-page-variable-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-set-page-variable-attlist" combine="interleave">
- <optional>
- <attribute name="text:active">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-set-page-variable-attlist" combine="interleave">
- <optional>
- <attribute name="text:page-adjust">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:page-variable-get">
- <ref name="text-get-page-variable-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-get-page-variable-attlist" combine="interleave">
- <ref name="common-field-num-format-attlist"/>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:placeholder">
- <ref name="text-placeholder-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-placeholder-attlist" combine="interleave">
- <attribute name="text:placeholder-type">
- <choice>
- <value>text</value>
- <value>table</value>
- <value>text-box</value>
- <value>image</value>
- <value>object</value>
- </choice>
- </attribute>
-</define>
-<define name="text-placeholder-attlist" combine="interleave">
- <ref name="common-field-description-attlist"/>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:conditional-text">
- <ref name="text-conditional-text-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-conditional-text-attlist" combine="interleave">
- <attribute name="text:condition">
- <ref name="formula"/>
- </attribute>
-</define>
-<define name="text-conditional-text-attlist" combine="interleave">
- <attribute name="text:string-value-if-true">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="text-conditional-text-attlist" combine="interleave">
- <attribute name="text:string-value-if-false">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="text-conditional-text-attlist" combine="interleave">
- <optional>
- <attribute name="text:current-value">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:hidden-text">
- <ref name="text-hidden-text-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-hidden-text-attlist" combine="interleave">
- <attribute name="text:condition">
- <ref name="formula"/>
- </attribute>
-</define>
-<define name="text-hidden-text-attlist" combine="interleave">
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="text-hidden-text-attlist" combine="interleave">
- <optional>
- <attribute name="text:is-hidden">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element>
- <choice>
- <name>text:reference-ref</name>
- <name>text:bookmark-ref</name>
- </choice>
- <interleave>
- <ref name="text-common-ref-content"/>
- <ref name="text-ref-content"/>
- </interleave>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:note-ref">
- <interleave>
- <ref name="text-common-ref-content"/>
- <ref name="text-note-ref-content"/>
- <ref name="text-ref-content"/>
- </interleave>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sequence-ref">
- <interleave>
- <ref name="text-common-ref-content"/>
- <ref name="text-sequence-ref-content"/>
- </interleave>
- </element>
-</define>
-<define name="text-common-ref-content" combine="interleave">
- <text/>
-</define>
-<define name="text-common-ref-content" combine="interleave">
- <optional>
- <attribute name="text:ref-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-note-ref-content" combine="interleave">
- <ref name="text-note-class"/>
-</define>
-<define name="text-ref-content" combine="interleave">
- <optional>
- <attribute name="text:reference-format">
- <choice>
- <value>page</value>
- <value>chapter</value>
- <value>direction</value>
- <value>text</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-sequence-ref-content" combine="interleave">
- <optional>
- <attribute name="text:reference-format">
- <choice>
- <value>page</value>
- <value>chapter</value>
- <value>direction</value>
- <value>text</value>
- <value>category-and-value</value>
- <value>caption</value>
- <value>value</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:script">
- <interleave>
- <choice>
- <group>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- </group>
- <text/>
- </choice>
- <optional>
- <attribute name="script:language">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:execute-macro">
- <optional>
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:hidden-paragraph">
- <ref name="text-hidden-paragraph-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-hidden-paragraph-attlist" combine="interleave">
- <attribute name="text:condition">
- <ref name="formula"/>
- </attribute>
-</define>
-<define name="text-hidden-paragraph-attlist" combine="interleave">
- <optional>
- <attribute name="text:is-hidden">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:dde-connection">
- <attribute name="text:connection-name">
- <ref name="string"/>
- </attribute>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:measure">
- <attribute name="text:kind">
- <choice>
- <value>value</value>
- <value>unit</value>
- <value>gap</value>
- </choice>
- </attribute>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:table-formula">
- <interleave>
- <ref name="common-field-formula-attlist"/>
- <ref name="common-field-display-value-formula-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="common-value-type-attlist">
- <attribute name="office:value-type">
- <ref name="valueType"/>
- </attribute>
-</define>
-<define name="common-value-and-type-attlist">
- <choice>
- <group>
- <attribute name="office:value-type">
- <value>float</value>
- </attribute>
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>percentage</value>
- </attribute>
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>currency</value>
- </attribute>
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- <optional>
- <attribute name="office:currency">
- <ref name="string"/>
- </attribute>
- </optional>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>date</value>
- </attribute>
- <attribute name="office:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>time</value>
- </attribute>
- <attribute name="office:time-value">
- <ref name="duration"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>boolean</value>
- </attribute>
- <attribute name="office:boolean-value">
- <ref name="boolean"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>string</value>
- </attribute>
- <optional>
- <attribute name="office:string-value">
- <ref name="string"/>
- </attribute>
- </optional>
- </group>
- </choice>
-</define>
-<define name="common-field-fixed-attlist">
- <optional>
- <attribute name="text:fixed">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-field-name-attlist">
- <attribute name="text:name">
- <ref name="variableName"/>
- </attribute>
-</define>
-<define name="common-field-description-attlist">
- <optional>
- <attribute name="text:description">
- <text/>
- </attribute>
- </optional>
-</define>
-<define name="common-field-display-value-none-attlist">
- <optional>
- <attribute name="text:display">
- <choice>
- <value>value</value>
- <value>none</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-field-display-value-formula-none-attlist">
- <optional>
- <attribute name="text:display">
- <choice>
- <value>value</value>
- <value>formula</value>
- <value>none</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-field-display-value-formula-attlist">
- <optional>
- <attribute name="text:display">
- <choice>
- <value>value</value>
- <value>formula</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-field-formula-attlist">
- <optional>
- <attribute name="text:formula">
- <ref name="formula"/>
- </attribute>
- </optional>
-</define>
-<define name="common-field-data-style-name-attlist">
- <optional>
- <attribute name="style:data-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="common-field-num-format-attlist">
- <optional>
- <ref name="common-num-format-attlist"/>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:toc-mark-start">
- <ref name="text-toc-mark-start-attrs"/>
- </element>
-</define>
-<define name="text-toc-mark-start-attrs">
- <ref name="text-id"/>
- <ref name="text-outline-level"/>
-</define>
-<define name="text-outline-level">
- <optional>
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-id">
- <attribute name="text:id">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:toc-mark-end">
- <ref name="text-id"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:toc-mark">
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
- <ref name="text-outline-level"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:user-index-mark-start">
- <ref name="text-id"/>
- <ref name="text-outline-level"/>
- <ref name="text-index-name"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:user-index-mark-end">
- <ref name="text-id"/>
- <ref name="text-outline-level"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:user-index-mark">
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
- <ref name="text-outline-level"/>
- <ref name="text-index-name"/>
- </element>
-</define>
-<define name="text-index-name">
- <attribute name="text:index-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:alphabetical-index-mark-start">
- <ref name="text-id"/>
- <ref name="text-alphabetical-index-mark-attrs"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:alphabetical-index-mark-end">
- <ref name="text-id"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:alphabetical-index-mark">
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
- <ref name="text-alphabetical-index-mark-attrs"/>
- </element>
-</define>
-<define name="text-alphabetical-index-mark-attrs" combine="interleave">
- <optional>
- <attribute name="text:key1">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:key2">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-mark-attrs" combine="interleave">
- <optional>
- <attribute name="text:string-value-phonetic">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:key1-phonetic">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:key2-phonetic">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-mark-attrs" combine="interleave">
- <optional>
- <attribute name="text:main-entry" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:bibliography-mark">
- <attribute name="text:bibliography-type">
- <ref name="text-bibliography-types"/>
- </attribute>
- <zeroOrMore>
- <attribute>
- <choice>
- <name>text:identifier</name>
- <name>text:address</name>
- <name>text:annote</name>
- <name>text:author</name>
- <name>text:booktitle</name>
- <name>text:chapter</name>
- <name>text:edition</name>
- <name>text:editor</name>
- <name>text:howpublished</name>
- <name>text:institution</name>
- <name>text:journal</name>
- <name>text:month</name>
- <name>text:note</name>
- <name>text:number</name>
- <name>text:organizations</name>
- <name>text:pages</name>
- <name>text:publisher</name>
- <name>text:school</name>
- <name>text:series</name>
- <name>text:title</name>
- <name>text:report-type</name>
- <name>text:volume</name>
- <name>text:year</name>
- <name>text:url</name>
- <name>text:custom1</name>
- <name>text:custom2</name>
- <name>text:custom3</name>
- <name>text:custom4</name>
- <name>text:custom5</name>
- <name>text:isbn</name>
- <name>text:issn</name>
- </choice>
- <ref name="string"/>
- </attribute>
- </zeroOrMore>
- <text/>
- </element>
-</define>
-<define name="text-bibliography-types">
- <choice>
- <value>article</value>
- <value>book</value>
- <value>booklet</value>
- <value>conference</value>
- <value>custom1</value>
- <value>custom2</value>
- <value>custom3</value>
- <value>custom4</value>
- <value>custom5</value>
- <value>email</value>
- <value>inbook</value>
- <value>incollection</value>
- <value>inproceedings</value>
- <value>journal</value>
- <value>manual</value>
- <value>mastersthesis</value>
- <value>misc</value>
- <value>phdthesis</value>
- <value>proceedings</value>
- <value>techreport</value>
- <value>unpublished</value>
- <value>www</value>
- </choice>
-</define>
-<define name="text-index-body">
- <element name="text:index-body">
- <zeroOrMore>
- <ref name="index-content-main"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="index-content-main">
- <choice>
- <ref name="text-content"/>
- <ref name="text-index-title"/>
- </choice>
-</define>
-<define name="text-index-title">
- <element name="text:index-title">
- <ref name="sectionAttr"/>
- <zeroOrMore>
- <ref name="index-content-main"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-table-of-content">
- <element name="text:table-of-content">
- <ref name="sectionAttr"/>
- <ref name="text-table-of-content-source"/>
- <ref name="text-index-body"/>
- </element>
-</define>
-<define name="text-table-of-content-source">
- <element name="text:table-of-content-source">
- <ref name="text-table-of-content-source-attlist"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <zeroOrMore>
- <ref name="text-table-of-content-entry-template"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="text-index-source-styles"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-table-of-content-source-attlist" combine="interleave">
- <optional>
- <attribute name="text:outline-level">
- <choice>
- <ref name="positiveInteger"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-table-of-content-source-attlist" combine="interleave">
- <optional>
- <attribute name="text:use-outline-level" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-table-of-content-source-attlist" combine="interleave">
- <optional>
- <attribute name="text:use-index-marks">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-table-of-content-source-attlist" combine="interleave">
- <optional>
- <attribute name="text:use-index-source-styles">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-table-of-content-source-attlist" combine="interleave">
- <optional>
- <attribute name="text:index-scope">
- <choice>
- <value>document</value>
- <value>chapter</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-table-of-content-source-attlist" combine="interleave">
- <optional>
- <attribute name="text:relative-tab-stop-position">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-table-of-content-entry-template">
- <element name="text:table-of-content-entry-template">
- <ref name="text-table-of-content-entry-template-attlist"/>
- <zeroOrMore>
- <ref name="text-table-of-content-children"/>
-
- </zeroOrMore>
- </element>
-</define>
-<define name="text-table-of-content-children">
- <choice>
- <ref name="text-index-entry-chapter"/>
- <ref name="text-index-entry-page-number"/>
- <ref name="text-index-entry-text"/>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- <ref name="text-index-entry-link-start"/>
- <ref name="text-index-entry-link-end"/>
- </choice>
-</define>
-<define name="text-table-of-content-entry-template-attlist"
- combine="interleave">
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="text-table-of-content-entry-template-attlist"
- combine="interleave">
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="text-illustration-index">
- <element name="text:illustration-index">
- <ref name="sectionAttr"/>
- <ref name="text-illustration-index-source"/>
- <ref name="text-index-body"/>
- </element>
-</define>
-<define name="text-illustration-index-source">
- <element name="text:illustration-index-source">
- <ref name="text-illustration-index-source-attrs"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <optional>
- <ref name="text-illustration-index-entry-template"/>
- </optional>
- </element>
-</define>
-<define name="text-illustration-index-source-attrs" combine="interleave">
- <ref name="text-index-scope-attr"/>
-</define>
-<define name="text-index-scope-attr">
- <optional>
- <attribute name="text:index-scope" a:defaultValue="document">
- <choice>
- <value>document</value>
- <value>chapter</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-illustration-index-source-attrs" combine="interleave">
- <ref name="text-relative-tab-stop-position-attr"/>
-</define>
-<define name="text-relative-tab-stop-position-attr">
- <optional>
- <attribute name="text:relative-tab-stop-position"
- a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-illustration-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:use-caption" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-illustration-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:caption-sequence-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-illustration-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:caption-sequence-format">
- <choice>
- <value>text</value>
- <value>category-and-value</value>
- <value>caption</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-illustration-index-entry-template">
- <element name="text:illustration-index-entry-template">
- <ref name="text-illustration-index-entry-content"/>
- </element>
-</define>
-<define name="text-illustration-index-entry-content">
- <ref name="text-illustration-index-entry-template-attrs"/>
- <zeroOrMore>
- <choice>
- <ref name="text-index-entry-page-number"/>
- <ref name="text-index-entry-text"/>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- </choice>
- </zeroOrMore>
-</define>
-<define name="text-illustration-index-entry-template-attrs">
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="text-table-index">
- <element name="text:table-index">
- <ref name="sectionAttr"/>
- <ref name="text-table-index-source"/>
- <ref name="text-index-body"/>
- </element>
-</define>
-<define name="text-table-index-source">
- <element name="text:table-index-source">
- <ref name="text-illustration-index-source-attrs"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <optional>
- <ref name="text-table-index-entry-template"/>
- </optional>
- </element>
-</define>
-<define name="text-table-index-entry-template">
- <element name="text:table-index-entry-template">
- <ref name="text-illustration-index-entry-content"/>
- </element>
-</define>
-<define name="text-object-index">
- <element name="text:object-index">
- <ref name="sectionAttr"/>
- <ref name="text-object-index-source"/>
- <ref name="text-index-body"/>
- </element>
-</define>
-<define name="text-object-index-source">
- <element name="text:object-index-source">
- <ref name="text-object-index-source-attrs"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <optional>
- <ref name="text-object-index-entry-template"/>
- </optional>
- </element>
-</define>
-<define name="text-object-index-source-attrs" combine="interleave">
- <ref name="text-index-scope-attr"/>
-</define>
-<define name="text-object-index-source-attrs" combine="interleave">
- <ref name="text-relative-tab-stop-position-attr"/>
-</define>
-<define name="text-object-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:use-spreadsheet-objects" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-object-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:use-math-objects" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-object-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:use-draw-objects" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-object-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:use-chart-objects" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-object-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:use-other-objects" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-object-index-entry-template">
- <element name="text:object-index-entry-template">
- <ref name="text-illustration-index-entry-content"/>
- </element>
-</define>
-<define name="text-user-index">
- <element name="text:user-index">
- <ref name="sectionAttr"/>
- <ref name="text-user-index-source"/>
- <ref name="text-index-body"/>
- </element>
-</define>
-<define name="text-user-index-source">
- <element name="text:user-index-source">
- <ref name="text-user-index-source-attr"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <zeroOrMore>
- <ref name="text-user-index-entry-template"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="text-index-source-styles"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-user-index-source-attr" combine="interleave">
- <ref name="text-index-scope-attr"/>
- <ref name="text-relative-tab-stop-position-attr"/>
- <attribute name="text:index-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="text-user-index-source-attr" combine="interleave">
- <optional>
- <attribute name="text:use-index-marks" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-graphics" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-tables" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-floating-frames"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-objects" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-user-index-source-attr" combine="interleave">
- <optional>
- <attribute name="text:copy-outline-levels"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-user-index-entry-template">
- <element name="text:user-index-entry-template">
- <ref name="text-user-index-entry-template-attrs"/>
- <zeroOrMore>
- <choice>
- <ref name="text-index-entry-chapter"/>
- <ref name="text-index-entry-page-number"/>
- <ref name="text-index-entry-text"/>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-user-index-entry-template-attrs" combine="interleave">
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="text-user-index-entry-template-attrs" combine="interleave">
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="text-alphabetical-index">
- <element name="text:alphabetical-index">
- <ref name="sectionAttr"/>
- <ref name="text-alphabetical-index-source"/>
- <ref name="text-index-body"/>
- </element>
-</define>
-<define name="text-alphabetical-index-source">
- <element name="text:alphabetical-index-source">
- <ref name="text-alphabetical-index-source-attrs"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <zeroOrMore>
- <ref name="text-alphabetical-index-entry-template"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <ref name="text-index-scope-attr"/>
- <ref name="text-relative-tab-stop-position-attr"/>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:ignore-case" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:main-entry-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:alphabetical-separators" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:combine-entries" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:combine-entries-with-dash"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:combine-entries-with-pp" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:use-keys-as-entries" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:capitalize-entries" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:comma-separated" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="fo:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="fo:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:sort-algorithm">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-auto-mark-file">
- <element name="text:alphabetical-index-auto-mark-file">
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="text-alphabetical-index-entry-template">
- <element name="text:alphabetical-index-entry-template">
- <ref name="text-alphabetical-index-entry-template-attrs"/>
- <zeroOrMore>
- <choice>
- <ref name="text-index-entry-chapter"/>
- <ref name="text-index-entry-page-number"/>
- <ref name="text-index-entry-text"/>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-alphabetical-index-entry-template-attrs"
- combine="interleave">
- <attribute name="text:outline-level">
- <choice>
- <value>1</value>
- <value>2</value>
- <value>3</value>
- <value>separator</value>
- </choice>
- </attribute>
-</define>
-<define name="text-alphabetical-index-entry-template-attrs"
- combine="interleave">
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="text-bibliography">
- <element name="text:bibliography">
- <ref name="sectionAttr"/>
- <ref name="text-bibliography-source"/>
- <ref name="text-index-body"/>
- </element>
-</define>
-<define name="text-bibliography-source">
- <element name="text:bibliography-source">
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <zeroOrMore>
- <ref name="text-bibliography-entry-template"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-bibliography-entry-template">
- <element name="text:bibliography-entry-template">
- <ref name="text-bibliography-entry-template-attrs"/>
- <zeroOrMore>
- <choice>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- <ref name="text-index-entry-bibliography"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-bibliography-entry-template-attrs" combine="interleave">
- <attribute name="text:bibliography-type">
- <ref name="text-bibliography-types"/>
- </attribute>
-</define>
-<define name="text-bibliography-entry-template-attrs" combine="interleave">
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="text-index-source-styles">
- <element name="text:index-source-styles">
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
- <zeroOrMore>
- <ref name="text-index-source-style"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-index-source-style">
- <element name="text:index-source-style">
- <attribute name="text:style-name">
- <ref name="styleName"/>
- </attribute>
- <empty/>
- </element>
-</define>
-<define name="text-index-title-template">
- <element name="text:index-title-template">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <text/>
- </element>
-</define>
-<define name="text-index-entry-chapter">
- <element name="text:index-entry-chapter">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <ref name="text-index-entry-chapter-attrs"/>
- </element>
-</define>
-<define name="text-index-entry-chapter-attrs">
- <optional>
- <attribute name="text:display" a:defaultValue="number">
- <choice>
- <value>name</value>
- <value>number</value>
- <value>number-and-name</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-index-entry-text">
- <element name="text:index-entry-text">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="text-index-entry-page-number">
- <element name="text:index-entry-page-number">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="text-index-entry-span">
- <element name="text:index-entry-span">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <text/>
- </element>
-</define>
-<define name="text-index-entry-bibliography">
- <element name="text:index-entry-bibliography">
- <ref name="text-index-entry-bibliography-attrs"/>
- </element>
-</define>
-<define name="text-index-entry-bibliography-attrs" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-index-entry-bibliography-attrs" combine="interleave">
- <attribute name="text:bibliography-data-field">
- <choice>
- <value>address</value>
- <value>annote</value>
- <value>author</value>
- <value>bibliography-type</value>
- <value>booktitle</value>
- <value>chapter</value>
- <value>custom1</value>
- <value>custom2</value>
- <value>custom3</value>
- <value>custom4</value>
- <value>custom5</value>
- <value>edition</value>
- <value>editor</value>
- <value>howpublished</value>
- <value>identifier</value>
- <value>institution</value>
- <value>isbn</value>
- <value>issn</value>
- <value>journal</value>
- <value>month</value>
- <value>note</value>
- <value>number</value>
- <value>organizations</value>
- <value>pages</value>
- <value>publisher</value>
- <value>report-type</value>
- <value>school</value>
- <value>series</value>
- <value>title</value>
- <value>url</value>
- <value>volume</value>
- <value>year</value>
- </choice>
- </attribute>
-</define>
-<define name="text-index-entry-tab-stop">
- <element name="text:index-entry-tab-stop">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <ref name="text-index-entry-tab-stop-attrs"/>
- </element>
-</define>
-<define name="text-index-entry-tab-stop-attrs" combine="interleave">
- <optional>
- <attribute name="style:leader-char">
- <ref name="character"/>
- </attribute>
- </optional>
-</define>
-<define name="text-index-entry-tab-stop-attrs" combine="interleave">
- <choice>
- <attribute name="style:type">
- <value>right</value>
- </attribute>
- <group>
- <attribute name="style:type">
- <value>left</value>
- </attribute>
- <attribute name="style:position">
- <ref name="length"/>
- </attribute>
- </group>
- </choice>
-</define>
-<define name="text-index-entry-link-start">
- <element name="text:index-entry-link-start">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="text-index-entry-link-end">
- <element name="text:index-entry-link-end">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="table-table">
- <element name="table:table">
- <ref name="table-table-attlist"/>
- <optional>
- <ref name="table-table-source"/>
- </optional>
- <optional>
- <ref name="office-dde-source"/>
- </optional>
- <optional>
- <ref name="table-scenario"/>
- </optional>
- <optional>
- <ref name="office-forms"/>
- </optional>
- <optional>
- <ref name="table-shapes"/>
- </optional>
- <ref name="table-columns-and-groups"/>
- <ref name="table-rows-and-groups"/>
- </element>
-</define>
-<define name="table-columns-and-groups">
- <oneOrMore>
- <choice>
- <ref name="table-table-column-group"/>
- <ref name="table-columns-no-group"/>
- </choice>
- </oneOrMore>
-</define>
-
-<define name="table-columns-no-group">
- <choice>
- <group>
- <ref name="table-columns"/>
- <optional>
- <ref name="table-table-header-columns"/>
- <optional>
- <ref name="table-columns"/>
- </optional>
- </optional>
- </group>
- <group>
- <ref name="table-table-header-columns"/>
- <optional>
- <ref name="table-columns"/>
- </optional>
- </group>
- </choice>
-</define>
-
-<define name="table-columns">
- <choice>
- <ref name="table-table-columns"/>
- <oneOrMore>
- <ref name="table-table-column"/>
- </oneOrMore>
- </choice>
-</define>
-
-<define name="table-rows-and-groups">
- <oneOrMore>
- <choice>
- <ref name="table-table-row-group"/>
- <ref name="table-rows-no-group"/>
- </choice>
- </oneOrMore>
-</define>
-
-<define name="table-rows-no-group">
- <choice>
- <group>
- <ref name="table-rows"/>
- <optional>
- <ref name="table-table-header-rows"/>
- <optional>
- <ref name="table-rows"/>
- </optional>
- </optional>
- </group>
- <group>
- <ref name="table-table-header-rows"/>
- <optional>
- <ref name="table-rows"/>
- </optional>
- </group>
- </choice>
-</define>
-
-<define name="table-rows">
- <choice>
- <ref name="table-table-rows"/>
- <oneOrMore>
- <ref name="table-table-row"/>
- </oneOrMore>
- </choice>
-</define>
-<define name="table-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:protected" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:protection-key">
- <text/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:print" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:print-ranges">
- <ref name="cellRangeAddressList"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-row">
- <element name="table:table-row">
- <ref name="table-table-row-attlist"/>
- <oneOrMore>
- <choice>
- <ref name="table-table-cell"/>
- <ref name="table-covered-table-cell"/>
- </choice>
- </oneOrMore>
- </element>
-</define>
-<define name="table-table-row-attlist" combine="interleave">
- <optional>
- <attribute name="table:number-rows-repeated" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-row-attlist" combine="interleave">
- <optional>
- <attribute name="table:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-row-attlist" combine="interleave">
- <optional>
- <attribute name="table:default-cell-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-row-attlist" combine="interleave">
- <optional>
- <attribute name="table:visibility" a:defaultValue="visible">
- <ref name="table-visibility-value"/>
- </attribute>
- </optional>
-</define>
-
-<define name="table-visibility-value">
- <choice>
- <value>visible</value>
- <value>collapse</value>
- <value>filter</value>
- </choice>
-</define>
-<define name="table-table-cell">
- <element name="table:table-cell">
- <ref name="table-table-cell-attlist"/>
- <ref name="table-table-cell-attlist-extra"/>
- <ref name="table-table-cell-content"/>
- </element>
-</define>
-
-<define name="table-covered-table-cell">
- <element name="table:covered-table-cell">
- <ref name="table-table-cell-attlist"/>
- <ref name="table-table-cell-content"/>
- </element>
-</define>
-
-<define name="table-table-cell-content">
- <optional>
- <ref name="table-cell-range-source"/>
- </optional>
- <optional>
- <ref name="office-annotation"/>
- </optional>
- <optional>
- <ref name="table-detective"/>
- </optional>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
-</define>
-<define name="table-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:number-columns-repeated" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-cell-attlist-extra" combine="interleave">
- <optional>
- <attribute name="table:number-columns-spanned" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:number-rows-spanned" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:content-validation-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:formula">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-cell-attlist-extra" combine="interleave">
- <optional>
- <attribute name="table:number-matrix-columns-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:number-matrix-rows-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-cell-attlist" combine="interleave">
- <optional>
- <ref name="common-value-and-type-attlist"/>
- </optional>
-</define>
-<define name="table-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:protect" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-column">
- <element name="table:table-column">
- <ref name="table-table-column-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-table-column-attlist" combine="interleave">
- <optional>
- <attribute name="table:number-columns-repeated" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-column-attlist" combine="interleave">
- <optional>
- <attribute name="table:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-column-attlist" combine="interleave">
- <optional>
- <attribute name="table:visibility" a:defaultValue="visible">
- <ref name="table-visibility-value"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-column-attlist" combine="interleave">
- <optional>
- <attribute name="table:default-cell-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-header-columns">
- <element name="table:table-header-columns">
- <oneOrMore>
- <ref name="table-table-column"/>
- </oneOrMore>
- </element>
-</define>
-
-<define name="table-table-columns">
- <element name="table:table-columns">
- <oneOrMore>
- <ref name="table-table-column"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-table-column-group">
- <element name="table:table-column-group">
- <ref name="table-table-column-group-attlist"/>
- <ref name="table-columns-and-groups"/>
- </element>
-</define>
-<define name="table-table-column-group-attlist" combine="interleave">
- <optional>
- <attribute name="table:display" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-header-rows">
- <element name="table:table-header-rows">
- <oneOrMore>
- <ref name="table-table-row"/>
- </oneOrMore>
- </element>
-</define>
-
-<define name="table-table-rows">
- <element name="table:table-rows">
- <oneOrMore>
- <ref name="table-table-row"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-table-row-group">
- <element name="table:table-row-group">
- <ref name="table-table-row-group-attlist"/>
- <ref name="table-rows-and-groups"/>
- </element>
-</define>
-<define name="table-table-row-group-attlist" combine="interleave">
- <optional>
- <attribute name="table:display" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:is-sub-table" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="cellAddress">
- <data type="string">
- <param name="pattern">($?([^\. ']+|'[^']+'))?\.$?[A-Z]+$?[0-9]+</param>
- </data>
-</define>
-<define name="cellRangeAddress">
- <data type="string">
- <param name="pattern">($?([^\. ']+|'[^']+'))?\.$?[A-Z]+$?[0-9]+(:($?([^\. ']+|'[^']+'))?\.$?[A-Z]+$?[0-9]+)?</param>
-
- </data>
-</define>
-<define name="cellRangeAddressList">
- <!-- Value is a space separated list of "cellRangeAddress" patterns -->
- <data type="string"/>
-</define>
-<define name="table-table-source">
- <element name="table:table-source">
- <ref name="table-table-source-attlist"/>
- <ref name="table-linked-source-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-table-source-attlist" combine="interleave">
- <optional>
- <attribute name="table:mode" a:defaultValue="copy-all">
- <choice>
- <value>copy-all</value>
- <value>copy-results-only</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-table-source-attlist" combine="interleave">
- <optional>
- <attribute name="table:table-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-linked-source-attlist" combine="interleave">
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <value>onRequest</value>
- </attribute>
- </optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
-</define>
-<define name="table-linked-source-attlist" combine="interleave">
- <optional>
- <attribute name="table:filter-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-linked-source-attlist" combine="interleave">
- <optional>
- <attribute name="table:filter-options">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-linked-source-attlist" combine="interleave">
- <optional>
- <attribute name="table:refresh-delay">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="table-scenario">
- <element name="table:scenario">
- <ref name="table-scenario-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <attribute name="table:scenario-ranges">
- <ref name="cellRangeAddressList"/>
- </attribute>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <attribute name="table:is-active">
- <ref name="boolean"/>
- </attribute>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <optional>
- <attribute name="table:display-border" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <optional>
- <attribute name="table:border-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <optional>
- <attribute name="table:copy-back" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <optional>
- <attribute name="table:copy-styles" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <optional>
- <attribute name="table:copy-formulas" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <optional>
- <attribute name="table:comment">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <optional>
- <attribute name="table:protected">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-shapes">
- <element name="table:shapes">
- <oneOrMore>
- <ref name="shape"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-cell-range-source">
- <element name="table:cell-range-source">
- <ref name="table-table-cell-range-source-attlist"/>
- <ref name="table-linked-source-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-table-cell-range-source-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-table-cell-range-source-attlist" combine="interleave">
- <attribute name="table:last-column-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- <attribute name="table:last-row-spanned">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="table-detective">
- <element name="table:detective">
- <zeroOrMore>
- <ref name="table-highlighted-range"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="table-operation"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-operation">
- <element name="table:operation">
- <ref name="table-operation-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-operation-attlist" combine="interleave">
- <attribute name="table:name">
- <choice>
- <value>trace-dependents</value>
- <value>remove-dependents</value>
- <value>trace-precedents</value>
- <value>remove-precedents</value>
- <value>trace-errors</value>
- </choice>
- </attribute>
-</define>
-<define name="table-operation-attlist" combine="interleave">
- <attribute name="table:index">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="table-highlighted-range">
- <element name="table:highlighted-range">
- <choice>
- <group>
- <ref name="table-highlighted-range-attlist"/>
- </group>
- <group>
- <ref name="table-highlighted-range-attlist-invalid"/>
- </group>
- </choice>
- <empty/>
- </element>
-</define>
-<define name="table-highlighted-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="table-highlighted-range-attlist" combine="interleave">
- <attribute name="table:direction">
- <choice>
- <value>from-another-table</value>
- <value>to-another-table</value>
- <value>from-same-table</value>
- </choice>
- </attribute>
-</define>
-<define name="table-highlighted-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:contains-error" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-highlighted-range-attlist-invalid" combine="interleave">
- <attribute name="table:marked-invalid">
- <ref name="boolean"/>
- </attribute>
-</define>
-<define name="office-spreadsheet-attlist" combine="interleave">
- <optional>
- <attribute name="table:structure-protected" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:protection-key">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-calculation-settings">
- <element name="table:calculation-settings">
- <ref name="table-calculation-setting-attlist"/>
- <optional>
- <ref name="table-null-date"/>
- </optional>
- <optional>
- <ref name="table-iteration"/>
- </optional>
- </element>
-</define>
-<define name="table-calculation-setting-attlist" combine="interleave">
- <optional>
- <attribute name="table:case-sensitive" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-calculation-setting-attlist" combine="interleave">
- <optional>
- <attribute name="table:precision-as-shown" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-calculation-setting-attlist" combine="interleave">
- <optional>
- <attribute name="table:search-criteria-must-apply-to-whole-cell"
- a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-calculation-setting-attlist" combine="interleave">
- <optional>
- <attribute name="table:automatic-find-labels" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-calculation-setting-attlist" combine="interleave">
- <optional>
- <attribute name="table:use-regular-expressions"
- a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-calculation-setting-attlist" combine="interleave">
- <optional>
- <attribute name="table:null-year" a:defaultValue="1930">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="table-null-date">
- <element name="table:null-date">
- <optional>
- <attribute name="table:value-type" a:defaultValue="date">
- <ref name="valueType"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:date-value-type"
- a:defaultValue="1899-12-30">
- <ref name="date"/>
- </attribute>
- </optional>
- <empty/>
- </element>
-</define>
-<define name="table-iteration">
- <element name="table:iteration">
- <optional>
- <attribute name="table:status" a:defaultValue="disable">
- <choice>
- <value>enable</value>
- <value>disable</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:steps" a:defaultValue="100">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:maximum-difference"
- a:defaultValue="0.001">
- <ref name="double"/>
- </attribute>
- </optional>
- <empty/>
- </element>
-</define>
-<define name="table-content-validations">
- <element name="table:content-validations">
- <oneOrMore>
- <ref name="table-content-validation"/>
- </oneOrMore>
- </element>
-</define>
-
-<define name="table-content-validation">
- <element name="table:content-validation">
- <ref name="table-validation-attlist"/>
- <optional>
- <ref name="table-help-message"/>
- </optional>
- <optional>
- <choice>
- <ref name="table-error-message"/>
- <group>
- <ref name="table-error-macro"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </group>
- </choice>
- </optional>
- </element>
-</define>
-<define name="table-validation-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-validation-attlist" combine="interleave">
- <optional>
- <attribute name="table:condition">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-validation-attlist" combine="interleave">
- <optional>
- <attribute name="table:base-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="table-validation-attlist" combine="interleave">
- <optional>
- <attribute name="table:allow-empty-cell" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-validation-attlist" combine="interleave">
- <optional>
- <attribute name="table:display-list" a:defaultValue="unsorted">
- <choice>
- <value>none</value>
- <value>unsorted</value>
- <value>sort-ascending</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-help-message">
- <element name="table:help-message">
- <optional>
- <attribute name="table:title">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:display" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-error-message">
- <element name="table:error-message">
- <optional>
- <attribute name="table:title">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:display" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:message-type" a:defaultValue="stop">
- <choice>
- <value>stop</value>
- <value>warning</value>
- <value>information</value>
- </choice>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-error-macro">
- <element name="table:error-macro">
- <optional>
- <attribute name="table:execute" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="table-label-ranges">
- <element name="table:label-ranges">
- <zeroOrMore>
- <ref name="table-label-range"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="table-label-range">
- <element name="table:label-range">
- <ref name="table-label-range-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-label-range-attlist" combine="interleave">
- <attribute name="table:label-cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
-</define>
-<define name="table-label-range-attlist" combine="interleave">
- <attribute name="table:data-cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
-</define>
-<define name="table-label-range-attlist" combine="interleave">
- <attribute name="table:orientation">
- <choice>
- <value>column</value>
- <value>row</value>
- </choice>
- </attribute>
-</define>
-<define name="table-named-expressions">
- <element name="table:named-expressions">
- <zeroOrMore>
- <choice>
- <ref name="table-named-range"/>
- <ref name="table-named-expression"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="table-named-range">
- <element name="table:named-range">
- <ref name="table-named-range-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-named-range-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- <optional>
- <attribute name="table:base-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:range-usable-as" a:defaultValue="none">
- <choice>
- <value>none</value>
- <list>
- <oneOrMore>
- <choice>
- <value>print-range</value>
- <value>filter</value>
- <value>repeat-row</value>
- <value>repeat-column</value>
- </choice>
- </oneOrMore>
- </list>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-named-expression">
- <element name="table:named-expression">
- <ref name="table-named-expression-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-named-expression-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- <attribute name="table:expression">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="table:base-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-ranges">
- <element name="table:database-ranges">
- <zeroOrMore>
- <ref name="table-database-range"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-database-range">
- <element name="table:database-range">
- <ref name="table-database-range-attlist"/>
- <optional>
- <choice>
- <ref name="table-database-source-sql"/>
- <ref name="table-database-source-table"/>
- <ref name="table-database-source-query"/>
- </choice>
- </optional>
- <optional>
- <ref name="table-filter"/>
- </optional>
- <optional>
- <ref name="table-sort"/>
- </optional>
- <optional>
- <ref name="table-subtotal-rules"/>
- </optional>
- </element>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:is-selection" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:on-update-keep-styles" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:on-update-keep-size" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:has-persistent-data" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:orientation" a:defaultValue="row">
- <choice>
- <value>column</value>
- <value>row</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:contains-header" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:display-filter-buttons"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <attribute name="table:target-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:refresh-delay">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-source-sql">
- <element name="table:database-source-sql">
- <ref name="table-database-source-sql-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-database-source-sql-attlist" combine="interleave">
- <attribute name="table:database-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-database-source-sql-attlist" combine="interleave">
- <attribute name="table:sql-statement">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-database-source-sql-attlist" combine="interleave">
- <optional>
- <attribute name="table:parse-sql-statement" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-source-query">
- <element name="table:database-source-table">
- <ref name="table-database-source-table-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-database-source-table-attlist" combine="interleave">
- <attribute name="table:database-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-database-source-table-attlist" combine="interleave">
- <attribute name="table:database-table-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-database-source-table">
- <element name="table:database-source-query">
- <ref name="table-database-source-query-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-database-source-query-attlist" combine="interleave">
- <attribute name="table:database-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-database-source-query-attlist" combine="interleave">
- <attribute name="table:query-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-sort">
- <element name="table:sort">
- <ref name="table-sort-attlist"/>
- <oneOrMore>
- <ref name="table-sort-by"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-sort-attlist" combine="interleave">
- <optional>
- <attribute name="table:bind-styles-to-content" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-attlist" combine="interleave">
- <optional>
- <attribute name="table:target-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-attlist" combine="interleave">
- <optional>
- <attribute name="table:case-sensitive" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-attlist" combine="interleave">
- <optional>
- <attribute name="table:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-attlist" combine="interleave">
- <optional>
- <attribute name="table:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-attlist" combine="interleave">
- <optional>
- <attribute name="table:algorithm">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-by">
- <element name="table:sort-by">
- <ref name="table-sort-by-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-sort-by-attlist" combine="interleave">
- <attribute name="table:field-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="table-sort-by-attlist" combine="interleave">
- <optional>
- <attribute name="table:data-type" a:defaultValue="automatic">
- <choice>
- <value>text</value>
- <value>number</value>
- <value>automatic</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-by-attlist" combine="interleave">
- <optional>
- <attribute name="table:order" a:defaultValue="ascending">
- <choice>
- <value>ascending</value>
- <value>descending</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-subtotal-rules">
- <element name="table:subtotal-rules">
- <ref name="table-subtotal-rules-attlist"/>
- <optional>
- <ref name="table-sort-groups"/>
- </optional>
- <zeroOrMore>
- <ref name="table-subtotal-rule"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-subtotal-rules-attlist" combine="interleave">
- <optional>
- <attribute name="table:bind-styles-to-content" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-subtotal-rules-attlist" combine="interleave">
- <optional>
- <attribute name="table:case-sensitive" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-subtotal-rules-attlist" combine="interleave">
- <optional>
- <attribute name="table:page-breaks-on-group-change"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-groups">
- <element name="table:sort-groups">
- <ref name="table-sort-groups-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-sort-groups-attlist" combine="interleave">
- <optional>
- <attribute name="table:data-type" a:defaultValue="automatic">
- <choice>
- <value>text</value>
- <value>number</value>
- <value>automatic</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-groups-attlist" combine="interleave">
- <optional>
- <attribute name="table:order" a:defaultValue="ascending">
- <choice>
- <value>ascending</value>
- <value>descending</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-subtotal-rule">
- <element name="table:subtotal-rule">
- <ref name="table-subtotal-rule-attlist"/>
- <zeroOrMore>
- <ref name="table-subtotal-field"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-subtotal-rule-attlist" combine="interleave">
- <attribute name="table:group-by-field-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="table-subtotal-field">
- <element name="table:subtotal-field">
- <ref name="table-subtotal-field-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-subtotal-field-attlist" combine="interleave">
- <attribute name="table:field-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="table-subtotal-field-attlist" combine="interleave">
- <attribute name="table:function">
- <choice>
- <value>auto</value>
- <value>average</value>
- <value>count</value>
- <value>countnums</value>
- <value>max</value>
- <value>min</value>
- <value>product</value>
- <value>stdev</value>
- <value>stdevp</value>
- <value>sum</value>
- <value>var</value>
- <value>varp</value>
- <ref name="string"/>
- </choice>
- </attribute>
-</define>
-<define name="table-filter">
- <element name="table:filter">
- <ref name="table-filter-attlist"/>
- <choice>
- <ref name="table-filter-condition"/>
- <ref name="table-filter-and"/>
- <ref name="table-filter-or"/>
- </choice>
- </element>
-</define>
-<define name="table-filter-attlist" combine="interleave">
- <optional>
- <attribute name="table:target-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="table-filter-attlist" combine="interleave">
- <optional>
- <attribute name="table:condition-source" a:defaultValue="self">
- <choice>
- <value>self</value>
- <value>cell-range</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-filter-attlist" combine="interleave">
- <optional>
- <attribute name="table:condition-source-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="table-filter-attlist" combine="interleave">
- <optional>
- <attribute name="table:display-duplicates" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-filter-and">
- <element name="table:filter-and">
- <oneOrMore>
- <choice>
- <ref name="table-filter-or"/>
- <ref name="table-filter-condition"/>
- </choice>
- </oneOrMore>
- </element>
-</define>
-<define name="table-filter-or">
- <element name="table:filter-or">
- <oneOrMore>
- <choice>
- <ref name="table-filter-and"/>
- <ref name="table-filter-condition"/>
- </choice>
- </oneOrMore>
- </element>
-</define>
-<define name="table-filter-condition">
- <element name="table:filter-condition">
- <ref name="table-filter-condition-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-filter-condition-attlist" combine="interleave">
- <attribute name="table:field-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="table-filter-condition-attlist" combine="interleave">
- <attribute name="table:value">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-filter-condition-attlist" combine="interleave">
- <attribute name="table:operator">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-filter-condition-attlist" combine="interleave">
- <optional>
- <attribute name="table:case-sensitive" a:defaultValue="false">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-filter-condition-attlist" combine="interleave">
- <optional>
- <attribute name="table:data-type" a:defaultValue="text">
- <choice>
- <value>text</value>
- <value>number</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-tables">
- <element name="table:data-pilot-tables">
- <zeroOrMore>
- <ref name="table-data-pilot-table"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-data-pilot-table">
- <element name="table:data-pilot-table">
- <ref name="table-data-pilot-table-attlist"/>
- <optional>
- <choice>
- <ref name="table-database-source-sql"/>
- <ref name="table-database-source-table"/>
- <ref name="table-database-source-query"/>
- <ref name="table-source-service"/>
- <ref name="table-source-cell-range"/>
- </choice>
- </optional>
- <oneOrMore>
- <ref name="table-data-pilot-field"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:application-data">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:grand-total" a:defaultValue="both">
- <choice>
- <value>none</value>
- <value>row</value>
- <value>column</value>
- <value>both</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:ignore-empty-rows" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:identify-categories" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <attribute name="table:target-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:buttons">
- <ref name="cellRangeAddressList"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:show-filter-button" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:drill-down-on-double-click"
- a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-source-cell-range">
- <element name="table:source-cell-range">
- <ref name="table-source-cell-range-attlist"/>
- <optional>
- <ref name="table-filter"/>
- </optional>
- </element>
-</define>
-<define name="table-source-cell-range-attlist" combine="interleave">
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
-</define>
-<define name="table-source-service">
- <element name="table:source-service">
- <ref name="table-source-service-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-source-service-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-source-service-attlist" combine="interleave">
- <attribute name="table:source-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-source-service-attlist" combine="interleave">
- <attribute name="table:object-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-source-service-attlist" combine="interleave">
- <optional>
- <attribute name="table:user-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-source-service-attlist" combine="interleave">
- <optional>
- <attribute name="table:password">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-field">
- <element name="table:data-pilot-field">
- <ref name="table-data-pilot-field-attlist"/>
- <optional>
- <ref name="table-data-pilot-level"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-field-reference"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-groups"/>
- </optional>
- </element>
-</define>
-<define name="table-data-pilot-field-attlist" combine="interleave">
- <attribute name="table:source-field-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-data-pilot-field-attlist" combine="interleave">
- <choice>
- <attribute name="table:orientation">
- <choice>
- <value>row</value>
- <value>column</value>
- <value>data</value>
- <value>hidden</value>
- </choice>
- </attribute>
- <group>
- <attribute name="table:orientation">
- <value>page</value>
- </attribute>
- <attribute name="table:selected-page">
- <ref name="string"/>
- </attribute>
- </group>
- </choice>
-</define>
-<define name="table-data-pilot-field-attlist" combine="interleave">
- <optional>
- <attribute name="table:is-data-layout-field" a:defaultValue="false">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-field-attlist" combine="interleave">
- <optional>
- <attribute name="table:function">
- <choice>
- <value>auto</value>
- <value>average</value>
- <value>count</value>
- <value>countnums</value>
- <value>max</value>
- <value>min</value>
- <value>product</value>
- <value>stdev</value>
- <value>stdevp</value>
- <value>sum</value>
- <value>var</value>
- <value>varp</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-field-attlist" combine="interleave">
- <optional>
- <attribute name="table:used-hierarchy" a:defaultValue="-1">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-level">
- <element name="table:data-pilot-level">
- <ref name="table-data-pilot-level-attlist"/>
- <optional>
- <ref name="table-data-pilot-subtotals"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-members"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-display-info"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-sort-info"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-layout-info"/>
- </optional>
- </element>
-</define>
-<define name="table-data-pilot-level-attlist" combine="interleave">
- <optional>
- <attribute name="table:show-empty">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-subtotals">
- <element name="table:data-pilot-subtotals">
- <zeroOrMore>
- <ref name="table-data-pilot-subtotal"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-data-pilot-subtotal">
- <element name="table:data-pilot-subtotal">
- <ref name="table-data-pilot-subtotal-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-data-pilot-subtotal-attlist" combine="interleave">
- <attribute name="table:function">
- <choice>
- <value>auto</value>
- <value>average</value>
- <value>count</value>
- <value>countnums</value>
- <value>max</value>
- <value>min</value>
- <value>product</value>
- <value>stdev</value>
- <value>stdevp</value>
- <value>sum</value>
- <value>var</value>
- <value>varp</value>
- <ref name="string"/>
- </choice>
- </attribute>
-</define>
-<define name="table-data-pilot-members">
- <element name="table:data-pilot-members">
- <zeroOrMore>
- <ref name="table-data-pilot-member"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-data-pilot-member">
- <element name="table:data-pilot-member">
- <ref name="table-data-pilot-member-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-data-pilot-member-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-data-pilot-member-attlist" combine="interleave">
- <optional>
- <attribute name="table:display">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-member-attlist" combine="interleave">
- <optional>
- <attribute name="table:show-details">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-display-info">
- <element name="table:data-pilot-display-info">
- <ref name="table-data-pilot-display-info-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-data-pilot-display-info-attlist" combine="interleave">
- <attribute name="table:enabled">
- <ref name="boolean"/>
- </attribute>
-</define>
-<define name="table-data-pilot-display-info-attlist" combine="interleave">
- <attribute name="table:data-field">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-data-pilot-display-info-attlist" combine="interleave">
- <attribute name="table:member-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="table-data-pilot-display-info-attlist" combine="interleave">
- <attribute name="table:display-member-mode">
- <choice>
- <value>from-top</value>
- <value>from-bottom</value>
- </choice>
- </attribute>
-</define>
-<define name="table-data-pilot-sort-info">
- <element name="table:data-pilot-sort-info">
- <ref name="table-data-pilot-sort-info-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-data-pilot-sort-info-attlist" combine="interleave">
- <choice>
- <group>
- <attribute name="table:sort-mode">
- <value>data</value>
- </attribute>
- <attribute name="table:data-field">
- <ref name="string"/>
- </attribute>
- </group>
- <attribute name="table:sort-mode">
- <choice>
- <value>none</value>
- <value>manual</value>
- <value>name</value>
- </choice>
- </attribute>
- </choice>
-</define>
-<define name="table-data-pilot-sort-info-attlist" combine="interleave">
- <attribute name="table:order">
- <choice>
- <value>ascending</value>
- <value>descending</value>
- </choice>
- </attribute>
-</define>
-<define name="table-data-pilot-layout-info">
- <element name="table:data-pilot-layout-info">
- <ref name="table-data-pilot-layout-info-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-data-pilot-layout-info-attlist" combine="interleave">
- <attribute name="table:layout-mode">
- <choice>
- <value>tabular-layout</value>
- <value>outline-subtotals-top</value>
- <value>outline-subtotals-bottom</value>
- </choice>
- </attribute>
-</define>
-<define name="table-data-pilot-layout-info-attlist" combine="interleave">
- <attribute name="table:add-empty-lines">
- <ref name="boolean"/>
- </attribute>
-</define>
-<define name="table-data-pilot-field-reference">
- <element name="table:data-pilot-field-reference">
- <ref name="table-data-pilot-field-reference-attlist"/>
- </element>
-</define>
-<define name="table-data-pilot-field-reference-attlist" combine="interleave">
- <attribute name="table:field-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-data-pilot-field-reference-attlist" combine="interleave">
- <choice>
- <group>
- <attribute name="table:member-type">
- <value>named</value>
- </attribute>
- <attribute name="table:member-name">
- <ref name="string"/>
- </attribute>
- </group>
- <attribute name="table:member-type">
- <choice>
- <value>previous</value>
- <value>next</value>
- </choice>
- </attribute>
- </choice>
-</define>
-<define name="table-data-pilot-field-reference-attlist" combine="interleave">
- <attribute name="table:type">
- <choice>
- <value>none</value>
- <value>member-difference</value>
- <value>member-percentage</value>
- <value>member-percentage-difference</value>
- <value>running-total</value>
- <value>row-percentage</value>
- <value>column-percentage</value>
- <value>total-percentage</value>
- <value>index</value>
- </choice>
- </attribute>
-</define>
-<define name="table-data-pilot-groups">
- <element name="table:data-pilot-groups">
- <ref name="table-data-pilot-groups-attlist"/>
- <oneOrMore>
- <ref name="table-data-pilot-group"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-data-pilot-groups-attlist" combine="interleave">
- <attribute name="table:source-field-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-data-pilot-groups-attlist" combine="interleave">
- <choice>
- <attribute name="table:date-start">
- <choice>
- <ref name="dateOrDateTime"/>
- <value>auto</value>
- </choice>
- </attribute>
- <attribute name="table:start">
- <choice>
- <ref name="double"/>
- <value>auto</value>
- </choice>
- </attribute>
- </choice>
-</define>
-<define name="table-data-pilot-groups-attlist" combine="interleave">
- <choice>
- <attribute name="table:date-end">
- <choice>
- <ref name="dateOrDateTime"/>
- <value>auto</value>
- </choice>
- </attribute>
- <attribute name="table:end">
- <choice>
- <ref name="double"/>
- <value>auto</value>
- </choice>
- </attribute>
- </choice>
-</define>
-<define name="table-data-pilot-groups-attlist" combine="interleave">
- <attribute name="table:step">
- <ref name="double"/>
- </attribute>
-</define>
-<define name="table-data-pilot-groups-attlist" combine="interleave">
- <attribute name="table:grouped-by">
- <choice>
- <value>seconds</value>
- <value>minutes</value>
- <value>hours</value>
- <value>days</value>
- <value>months</value>
- <value>quarters</value>
- <value>years</value>
- </choice>
- </attribute>
-</define>
-<define name="table-data-pilot-group">
- <element name="table:data-pilot-group">
- <ref name="table-data-pilot-group-attlist"/>
- <oneOrMore>
- <ref name="table-data-pilot-group-member"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-data-pilot-group-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-data-pilot-group-member">
- <element name="table:data-pilot-group-member">
- <ref name="table-data-pilot-group-member-attlist"/>
- </element>
-</define>
-<define name="table-data-pilot-group-member-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-consolidation">
- <element name="table:consolidation">
- <ref name="table-consolidation-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-consolidation-attlist" combine="interleave">
- <attribute name="table:function">
- <choice>
- <value>auto</value>
- <value>average</value>
- <value>count</value>
- <value>countnums</value>
- <value>max</value>
- <value>min</value>
- <value>product</value>
- <value>stdev</value>
- <value>stdevp</value>
- <value>sum</value>
- <value>var</value>
- <value>varp</value>
- <ref name="string"/>
- </choice>
- </attribute>
-</define>
-<define name="table-consolidation-attlist" combine="interleave">
- <attribute name="table:source-cell-range-addresses">
- <ref name="cellRangeAddressList"/>
- </attribute>
-</define>
-<define name="table-consolidation-attlist" combine="interleave">
- <attribute name="table:target-cell-address">
- <ref name="cellAddress"/>
- </attribute>
-</define>
-<define name="table-consolidation-attlist" combine="interleave">
- <optional>
- <attribute name="table:use-labels" a:defaultValue="none">
- <choice>
- <value>none</value>
- <value>row</value>
- <value>column</value>
- <value>both</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-consolidation-attlist" combine="interleave">
- <optional>
- <attribute name="table:link-to-source-data" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-dde-links">
- <element name="table:dde-links">
- <oneOrMore>
- <ref name="table-dde-link"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-tracked-changes">
- <element name="table:tracked-changes">
- <ref name="table-tracked-changes-attlist"/>
- <zeroOrMore>
- <choice>
- <ref name="table-cell-content-change"/>
- <ref name="table-insertion"/>
- <ref name="table-deletion"/>
- <ref name="table-movement"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-tracked-changes-attlist" combine="interleave">
- <optional>
- <attribute name="table:track-changes" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-insertion">
- <element name="table:insertion">
- <ref name="table-insertion-attlist"/>
- <ref name="common-table-change-attlist"/>
- <ref name="office-change-info"/>
- <optional>
- <ref name="table-dependencies"/>
- </optional>
- <optional>
- <ref name="table-deletions"/>
- </optional>
- </element>
-</define>
-<define name="table-insertion-attlist" combine="interleave">
- <attribute name="table:type">
- <choice>
- <value>row</value>
- <value>column</value>
- <value>table</value>
- </choice>
- </attribute>
-</define>
-<define name="table-insertion-attlist" combine="interleave">
- <attribute name="table:position">
- <ref name="integer"/>
- </attribute>
-</define>
-<define name="table-insertion-attlist" combine="interleave">
- <optional>
- <attribute name="table:count" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="table-insertion-attlist" combine="interleave">
- <optional>
- <attribute name="table:table">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="table-dependencies">
- <element name="table:dependencies">
- <oneOrMore>
- <ref name="table-dependency"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-dependency">
- <element name="table:dependency">
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
- <empty/>
- </element>
-</define>
-<define name="table-deletions">
- <element name="table:deletions">
- <oneOrMore>
- <choice>
- <ref name="table-cell-content-deletion"/>
- <ref name="table-change-deletion"/>
- </choice>
- </oneOrMore>
- </element>
-</define>
-<define name="table-cell-content-deletion">
- <element name="table:cell-content-deletion">
- <optional>
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <ref name="table-cell-address"/>
- </optional>
- <optional>
- <ref name="table-change-track-table-cell"/>
- </optional>
- </element>
-</define>
-<define name="table-change-deletion">
- <element name="table:change-deletion">
- <optional>
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
- </optional>
- <empty/>
- </element>
-</define>
-<define name="table-deletion">
- <element name="table:deletion">
- <ref name="table-deletion-attlist"/>
- <ref name="common-table-change-attlist"/>
- <ref name="office-change-info"/>
- <optional>
- <ref name="table-dependencies"/>
- </optional>
- <optional>
- <ref name="table-deletions"/>
- </optional>
- <optional>
- <ref name="table-cut-offs"/>
- </optional>
- </element>
-</define>
-<define name="table-deletion-attlist" combine="interleave">
- <attribute name="table:type">
- <choice>
- <value>row</value>
- <value>column</value>
- <value>table</value>
- </choice>
- </attribute>
-</define>
-<define name="table-deletion-attlist" combine="interleave">
- <attribute name="table:position">
- <ref name="integer"/>
- </attribute>
-</define>
-<define name="table-deletion-attlist" combine="interleave">
- <optional>
- <attribute name="table:table">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="table-deletion-attlist" combine="interleave">
- <optional>
- <attribute name="table:multi-deletion-spanned">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="table-cut-offs">
- <element name="table:cut-offs">
- <choice>
- <oneOrMore>
- <ref name="table-movement-cut-off"/>
- </oneOrMore>
- <group>
- <ref name="table-insertion-cut-off"/>
- <zeroOrMore>
- <ref name="table-movement-cut-off"/>
- </zeroOrMore>
- </group>
- </choice>
- </element>
-</define>
-<define name="table-insertion-cut-off">
- <element name="table:insertion-cut-off">
- <ref name="table-insertion-cut-off-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-insertion-cut-off-attlist" combine="interleave">
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-insertion-cut-off-attlist" combine="interleave">
- <attribute name="table:position">
- <ref name="integer"/>
- </attribute>
-</define>
-<define name="table-movement-cut-off">
- <element name="table:movement-cut-off">
- <ref name="table-movement-cut-off-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-movement-cut-off-attlist" combine="interleave">
- <choice>
- <attribute name="table:position">
- <ref name="integer"/>
- </attribute>
- <group>
- <attribute name="table:start-position">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:end-position">
- <ref name="integer"/>
- </attribute>
- </group>
- </choice>
-</define>
-<define name="table-movement">
- <element name="table:movement">
- <ref name="common-table-change-attlist"/>
- <ref name="table-source-range-address"/>
- <ref name="table-target-range-address"/>
- <ref name="office-change-info"/>
- <optional>
- <ref name="table-dependencies"/>
- </optional>
- <optional>
- <ref name="table-deletions"/>
- </optional>
- </element>
-</define>
-<define name="table-source-range-address">
- <element name="table:source-range-address">
- <ref name="common-table-range-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-target-range-address">
- <element name="table:target-range-address">
- <ref name="common-table-range-attlist"/>
- <empty/>
- </element>
-</define>
-
-
-<define name="common-table-range-attlist" combine="interleave">
- <choice>
- <group>
- <ref name="common-table-cell-address-attlist"/>
- </group>
- <group>
- <ref name="common-table-cell-range-address-attlist"/>
- </group>
- </choice>
-</define>
-<define name="common-table-cell-address-attlist" combine="interleave">
- <attribute name="table:column">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:row">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:table">
- <ref name="integer"/>
- </attribute>
-</define>
-<define name="common-table-cell-range-address-attlist" combine="interleave">
- <attribute name="table:start-column">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:start-row">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:start-table">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:end-column">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:end-row">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:end-table">
- <ref name="integer"/>
- </attribute>
-</define>
-<define name="table-change-track-table-cell" combine="interleave">
- <element name="table:change-track-table-cell">
- <ref name="table-change-track-table-cell-attlist"/>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-change-track-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="table-change-track-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:matrix-covered" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-change-track-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:formula">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:number-matrix-columns-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:number-matrix-rows-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <ref name="common-value-and-type-attlist"/>
- </optional>
-</define>
-<define name="table-cell-content-change">
- <element name="table:cell-content-change">
- <ref name="common-table-change-attlist"/>
- <ref name="table-cell-address"/>
- <ref name="office-change-info"/>
- <optional>
- <ref name="table-dependencies"/>
- </optional>
- <optional>
- <ref name="table-deletions"/>
- </optional>
- <ref name="table-previous"/>
- </element>
-</define>
-<define name="table-cell-address">
- <element name="table:cell-address">
- <ref name="common-table-cell-address-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-previous">
- <element name="table:previous">
- <optional>
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
- </optional>
- <ref name="table-change-track-table-cell"/>
- </element>
-</define>
-<define name="common-table-change-attlist" combine="interleave">
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="common-table-change-attlist" combine="interleave">
- <optional>
- <attribute name="table:acceptance-state" a:defaultValue="pending">
- <choice>
- <value>accepted</value>
- <value>rejected</value>
- <value>pending</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-table-change-attlist" combine="interleave">
- <optional>
- <attribute name="table:rejecting-change-id">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-handout-master">
- <element name="style:handout-master">
- <ref name="common-presentation-header-footer-attlist"/>
- <ref name="style-handout-master-attlist"/>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="style-handout-master-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:presentation-page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-handout-master-attlist" combine="interleave">
- <attribute name="style:page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="style-handout-master-attlist" combine="interleave">
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-layer-set">
- <element name="draw:layer-set">
- <zeroOrMore>
- <ref name="draw-layer"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-layer">
- <element name="draw:layer">
- <ref name="draw-layer-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-layer-attlist" combine="interleave">
- <attribute name="draw:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="draw-layer-attlist" combine="interleave">
- <optional>
- <attribute name="draw:protected" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-layer-attlist" combine="interleave">
- <optional>
- <attribute name="draw:display" a:defaultValue="always">
- <choice>
- <value>always</value>
- <value>screen</value>
- <value>printer</value>
- <value>none</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-page">
- <element name="draw:page">
- <ref name="common-presentation-header-footer-attlist"/>
- <ref name="draw-page-attlist"/>
- <optional>
- <ref name="office-forms"/>
- </optional>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- <optional>
- <choice>
- <ref name="presentation-animations"/>
- <ref name="animation-element"/>
- </choice>
- </optional>
- <optional>
- <ref name="presentation-notes"/>
- </optional>
- </element>
-</define>
-<define name="draw-page-attlist" combine="interleave">
- <optional>
- <attribute name="draw:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-page-attlist" combine="interleave">
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-page-attlist" combine="interleave">
- <attribute name="draw:master-page-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="draw-page-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:presentation-page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="common-presentation-header-footer-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:use-header-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-presentation-header-footer-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:use-footer-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-presentation-header-footer-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:use-date-time-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-page-attlist">
- <optional>
- <attribute name="draw:id">
- <ref name="ID"/>
- </attribute>
- </optional>
-</define>
-<define name="shape">
- <choice>
- <ref name="draw-rect"/>
- <ref name="draw-line"/>
- <ref name="draw-polyline"/>
- <ref name="draw-polygon"/>
- <ref name="draw-regular-polygon"/>
- <ref name="draw-path"/>
- <ref name="draw-circle"/>
- <ref name="draw-ellipse"/>
- <ref name="draw-g"/>
- <ref name="draw-page-thumbnail"/>
- <ref name="draw-frame"/>
- <ref name="draw-measure"/>
- <ref name="draw-caption"/>
- <ref name="draw-connector"/>
- <ref name="draw-control"/>
- <ref name="dr3d-scene"/>
- <ref name="draw-custom-shape"/>
- </choice>
-</define>
-<define name="draw-rect">
- <element name="draw:rect">
- <ref name="draw-rect-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-rect-attlist" combine="interleave">
- <optional>
- <attribute name="draw:corner-radius">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-line">
- <element name="draw:line">
- <ref name="draw-line-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-line-attlist" combine="interleave">
- <attribute name="svg:x1">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y1">
- <ref name="coordinate"/>
- </attribute>
-</define>
-<define name="draw-line-attlist" combine="interleave">
- <attribute name="svg:x2">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y2">
- <ref name="coordinate"/>
- </attribute>
-</define>
-<define name="draw-polyline">
- <element name="draw:polyline">
- <ref name="common-draw-points-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="common-draw-points-attlist">
- <attribute name="draw:points">
- <ref name="points"/>
- </attribute>
-</define>
-<define name="draw-polygon">
- <element name="draw:polygon">
- <ref name="common-draw-points-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-regular-polygon">
- <element name="draw:regular-polygon">
- <ref name="draw-regular-polygon-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-regular-polygon-attlist" combine="interleave">
- <choice>
- <attribute name="draw:concave">
- <value>false</value>
- </attribute>
- <group>
- <attribute name="draw:concave">
- <value>true</value>
- </attribute>
- <ref name="draw-regular-polygon-sharpness-attlist"/>
- </group>
- </choice>
-</define>
-<define name="draw-regular-polygon-attlist" combine="interleave">
- <attribute name="draw:corners">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="draw-regular-polygon-sharpness-attlist">
- <attribute name="draw:sharpness">
- <ref name="percent"/>
- </attribute>
-</define>
-<define name="draw-path">
- <element name="draw:path">
- <ref name="common-draw-path-data-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="common-draw-path-data-attlist">
- <attribute name="svg:d">
- <ref name="pathData"/>
- </attribute>
-</define>
-<define name="draw-circle">
- <element name="draw:circle">
- <ref name="draw-circle-attlist"/>
- <ref name="common-draw-circle-ellipse-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="common-draw-circle-ellipse-attlist" combine="interleave">
- <optional>
- <attribute name="svg:cx">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:cy">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-circle-attlist" combine="interleave">
- <optional>
- <attribute name="svg:r">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-circle-ellipse-attlist" combine="interleave">
- <optional>
- <attribute name="draw:kind" a:defaultValue="full">
- <choice>
- <value>full</value>
- <value>section</value>
- <value>cut</value>
- <value>arc</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-circle-ellipse-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start-angle">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-circle-ellipse-attlist" combine="interleave">
- <optional>
- <attribute name="draw:end-angle">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-ellipse">
- <element name="draw:ellipse">
- <ref name="common-draw-circle-ellipse-attlist"/>
- <ref name="draw-ellipse-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-ellipse-attlist" combine="interleave">
- <optional>
- <attribute name="svg:rx">
- <ref name="length"/>
- </attribute>
- <attribute name="svg:ry">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector">
- <element name="draw:connector">
- <ref name="draw-connector-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="draw:type" a:defaultValue="standard">
- <choice>
- <value>standard</value>
- <value>lines</value>
- <value>line</value>
- <value>curve</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="svg:x1">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y1">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start-shape">
- <ref name="IDREF"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start-glue-point">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="svg:x2">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y2">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="draw:end-shape">
- <ref name="IDREF"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="draw:end-glue-point">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="draw:line-skew">
- <list>
- <ref name="length"/>
- <optional>
- <ref name="length"/>
- <optional>
- <ref name="length"/>
- </optional>
- </optional>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="draw-caption">
- <element name="draw:caption">
- <ref name="draw-caption-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-caption-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-point-x">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="draw:caption-point-y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-caption-attlist" combine="interleave">
- <optional>
- <attribute name="draw:corner-radius">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-measure">
- <element name="draw:measure">
- <ref name="draw-measure-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-measure-attlist" combine="interleave">
- <attribute name="svg:x1">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y1">
- <ref name="coordinate"/>
- </attribute>
-</define>
-<define name="draw-measure-attlist" combine="interleave">
- <attribute name="svg:x2">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y2">
- <ref name="coordinate"/>
- </attribute>
-</define>
-<define name="draw-control">
- <element name="draw:control">
- <ref name="draw-control-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-control-attlist" combine="interleave">
- <attribute name="draw:control">
- <ref name="IDREF"/>
- </attribute>
-</define>
-<define name="draw-page-thumbnail">
- <element name="draw:page-thumbnail">
- <ref name="draw-page-thumbnail-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="presentation-shape-attlist"/>
- <ref name="common-draw-shape-with-styles-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-page-thumbnail-attlist">
- <optional>
- <attribute name="draw:page-number">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-g">
- <element name="draw:g">
- <ref name="draw-g-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-name-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-text-spreadsheet-shape-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-g-attlist" combine="interleave">
- <optional>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-name-attlist" combine="interleave">
- <optional>
- <attribute name="draw:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-position-attlist">
- <optional>
- <attribute name="svg:x">
- <ref name="coordinate"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-size-attlist">
- <optional>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-transform-attlist">
- <optional>
- <attribute name="draw:transform">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-viewbox-attlist">
- <attribute name="svg:viewBox">
- <list>
- <ref name="integer"/>
- <ref name="integer"/>
- <ref name="integer"/>
- <ref name="integer"/>
- </list>
- </attribute>
-</define>
-<define name="common-draw-style-name-attlist">
- <choice>
- <group>
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:class-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
- </group>
- <group>
- <optional>
- <attribute name="presentation:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:class-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
- </group>
- </choice>
-</define>
-<define name="common-draw-text-style-name-attlist">
- <optional>
- <attribute name="draw:text-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-layer-name-attlist">
- <optional>
- <attribute name="draw:layer">
- <data type="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-id-attlist">
- <optional>
- <attribute name="draw:id">
- <ref name="ID"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-z-index-attlist">
- <optional>
- <attribute name="draw:z-index">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="common-text-spreadsheet-shape-attlist" combine="interleave">
- <optional>
- <attribute name="table:end-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:end-x">
- <ref name="coordinate"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:end-y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="common-text-spreadsheet-shape-attlist" combine="interleave">
- <optional>
- <attribute name="table:table-background">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-text-spreadsheet-shape-attlist" combine="interleave">
- <ref name="common-text-anchor-attlist"/>
-</define>
-
-<define name="common-text-anchor-attlist" combine="interleave">
- <optional>
- <attribute name="text:anchor-type">
- <choice>
- <value>page</value>
- <value>frame</value>
- <value>paragraph</value>
- <value>char</value>
- <value>as-char</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-text-anchor-attlist" combine="interleave">
- <optional>
- <attribute name="text:anchor-page-number">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-text">
- <zeroOrMore>
- <choice>
- <ref name="text-p"/>
- <ref name="text-list"/>
- </choice>
- </zeroOrMore>
-</define>
-<define name="common-draw-shape-with-styles-attlist">
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-draw-transform-attlist"/>
- <ref name="common-draw-name-attlist"/>
- <ref name="common-text-spreadsheet-shape-attlist"/>
-</define>
-<define name="common-draw-shape-with-text-and-styles-attlist">
- <ref name="common-draw-shape-with-styles-attlist"/>
- <ref name="common-draw-text-style-name-attlist"/>
-</define>
-<define name="draw-glue-point">
- <element name="draw:glue-point">
- <ref name="draw-glue-point-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-glue-point-attlist" combine="interleave">
- <attribute name="draw:id">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="draw-glue-point-attlist" combine="interleave">
- <attribute name="svg:x">
- <choice>
- <ref name="distance"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <attribute name="svg:y">
- <choice>
- <ref name="distance"/>
- <ref name="percent"/>
- </choice>
- </attribute>
-</define>
-<define name="draw-glue-point-attlist" combine="interleave">
- <attribute name="draw:align">
- <choice>
- <value>top-left</value>
- <value>top</value>
- <value>top-right</value>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>bottom-left</value>
- <value>bottom-right</value>
- </choice>
- </attribute>
-</define>
-<define name="draw-glue-points-attlist" combine="interleave">
- <attribute name="draw:escape-direction">
- <choice>
- <value>auto</value>
- <value>left</value>
- <value>right</value>
- <value>up</value>
- <value>down</value>
- <value>horizontal</value>
- <value>vertical</value>
- </choice>
- </attribute>
-</define>
-<define name="draw-frame">
- <element name="draw:frame">
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-rel-size-attlist"/>
- <ref name="presentation-shape-attlist"/>
- <ref name="draw-frame-attlist"/>
- <zeroOrMore>
- <choice>
- <ref name="draw-text-box"/>
- <ref name="draw-image"/>
- <ref name="draw-object"/>
- <ref name="draw-object-ole"/>
- <ref name="draw-applet"/>
- <ref name="draw-floating-frame"/>
- <ref name="draw-plugin"/>
- </choice>
- </zeroOrMore>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <optional>
- <ref name="draw-image-map"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <choice>
- <ref name="draw-contour-polygon"/>
- <ref name="draw-contour-path"/>
- </choice>
- </optional>
- </element>
-</define>
-<define name="common-draw-rel-size-attlist">
- <ref name="common-draw-size-attlist"/>
- <optional>
- <attribute name="style:rel-width">
- <choice>
- <ref name="percent"/>
- <value>scale</value>
- <value>scale-min</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rel-height">
- <choice>
- <ref name="percent"/>
- <value>scale</value>
- <value>scale-min</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-frame-attlist" combine="interleave">
- <optional>
- <attribute name="draw:copy-of">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-text-box">
- <element name="draw:text-box">
- <ref name="draw-text-box-attlist"/>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-text-box-attlist" combine="interleave">
- <optional>
- <attribute name="draw:chain-next-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-text-box-attlist" combine="interleave">
- <optional>
- <attribute name="draw:corner-radius">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-text-box-attlist" combine="interleave">
- <optional>
- <attribute name="fo:min-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:min-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-text-box-attlist" combine="interleave">
- <optional>
- <attribute name="fo:max-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:max-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-image">
- <element name="draw:image">
- <ref name="draw-image-attlist"/>
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-binary-data"/>
- </choice>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="common-draw-data-attlist" combine="interleave">
- <group>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <choice>
- <value>simple</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show" a:defaultValue="embed">
- <choice>
- <value>embed</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onLoad">
- <choice>
- <value>onLoad</value>
- </choice>
- </attribute>
- </optional>
- </group>
-</define>
-
-<define name="office-binary-data">
- <element name="office:binary-data">
- <ref name="base64Binary"/>
- </element>
-</define>
-<define name="draw-image-attlist" combine="interleave">
- <optional>
- <attribute name="draw:filter-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-object">
- <element name="draw:object">
- <ref name="draw-object-attlist"/>
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-document"/>
- <ref name="math-math"/>
- </choice>
- </element>
-</define>
-
-<define name="draw-object-ole">
- <element name="draw:object-ole">
- <ref name="draw-object-ole-attlist"/>
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-binary-data"/>
- </choice>
- </element>
-</define>
-<define name="draw-object-attlist" combine="interleave">
- <optional>
- <attribute name="draw:notify-on-update-of-ranges">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-object-ole-attlist" combine="interleave">
- <optional>
- <attribute name="draw:class-id"/>
- </optional>
-</define>
-<define name="draw-applet">
- <element name="draw:applet">
- <ref name="draw-applet-attlist"/>
- <optional>
- <ref name="common-draw-data-attlist"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-param"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-applet-attlist" combine="interleave">
- <optional>
- <attribute name="draw:code"/>
- </optional>
-</define>
-<define name="draw-applet-attlist" combine="interleave">
- <optional>
- <attribute name="draw:object"/>
- </optional>
-</define>
-<define name="draw-applet-attlist" combine="interleave">
- <optional>
- <attribute name="draw:archive"/>
- </optional>
-</define>
-<define name="draw-applet-attlist" combine="interleave">
- <optional>
- <attribute name="draw:may-script" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-plugin">
- <element name="draw:plugin">
- <ref name="draw-plugin-attlist"/>
- <ref name="common-draw-data-attlist"/>
- <zeroOrMore>
- <ref name="draw-param"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-plugin-attlist" combine="interleave">
- <optional>
- <attribute name="draw:mime-type"/>
- </optional>
-</define>
-<define name="draw-param">
- <element name="draw:param">
- <ref name="draw-param-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-param-attlist" combine="interleave">
- <optional>
- <attribute name="draw:name"/>
- </optional>
-</define>
-<define name="draw-param-attlist" combine="interleave">
- <optional>
- <attribute name="draw:value"/>
- </optional>
-</define>
-<define name="draw-floating-frame">
- <element name="draw:floating-frame">
- <ref name="draw-floating-frame-attlist"/>
- <ref name="common-draw-data-attlist"/>
- </element>
-</define>
-<define name="draw-floating-frame-attlist" combine="interleave">
- <optional>
- <attribute name="draw:frame-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-contour-polygon">
- <element name="draw:contour-polygon">
- <ref name="common-contour-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-points-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="draw-contour-path">
- <element name="draw:contour-path">
- <ref name="common-contour-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-path-data-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="common-contour-attlist" combine="interleave">
- <attribute name="draw:recreate-on-edit">
- <ref name="boolean"/>
- </attribute>
-</define>
-<define name="svg-desc">
- <element name="svg:desc">
- <text/>
- </element>
-</define>
-<define name="draw-a">
- <element name="draw:a">
- <ref name="draw-a-attlist"/>
- <ref name="draw-frame"/>
- </element>
-</define>
-<define name="draw-a-attlist" combine="interleave">
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <choice>
- <value>onRequest</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-a-attlist" combine="interleave">
- <optional>
- <attribute name="office:target-frame-name">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-a-attlist" combine="interleave">
- <optional>
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-a-attlist" combine="interleave">
- <optional>
- <attribute name="office:server-map" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-image-map">
- <element name="draw:image-map">
- <zeroOrMore>
- <choice>
- <ref name="draw-area-rectangle"/>
- <ref name="draw-area-circle"/>
- <ref name="draw-area-polygon"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-area-rectangle">
- <element name="draw:area-rectangle">
- <ref name="common-draw-area-attlist"/>
- <attribute name="svg:x">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </element>
-</define>
-<define name="draw-area-circle">
- <element name="draw:area-circle">
- <ref name="common-draw-area-attlist"/>
- <attribute name="svg:cx">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:cy">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:r">
- <ref name="length"/>
- </attribute>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </element>
-</define>
-<define name="draw-area-polygon">
- <element name="draw:area-polygon">
- <ref name="common-draw-area-attlist"/>
- <attribute name="svg:x">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-points-attlist"/>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </element>
-</define>
-<define name="common-draw-area-attlist" combine="interleave">
- <optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <choice>
- <value>simple</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:target-frame-name">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-area-attlist" combine="interleave">
- <optional>
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-area-attlist" combine="interleave">
- <optional>
- <attribute name="draw:nohref">
- <choice>
- <value>nohref</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene">
- <element name="dr3d:scene">
- <ref name="dr3d-scene-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-text-spreadsheet-shape-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <zeroOrMore>
- <ref name="dr3d-light"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="shapes3d"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="shapes3d">
- <choice>
- <ref name="dr3d-scene"/>
- <ref name="dr3d-extrude"/>
- <ref name="dr3d-sphere"/>
- <ref name="dr3d-rotate"/>
- <ref name="dr3d-cube"/>
- </choice>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:vrp">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:vpn">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:vup">
- <ref name="vector3D"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:projection">
- <choice>
- <value>parallel</value>
- <value>perspective</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:distance">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:focal-length">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:shadow-slant">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:shade-mode">
- <choice>
- <value>flat</value>
- <value>phong</value>
- <value>gouraud</value>
- <value>draft</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:ambient-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:lighting-mode">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-dr3d-transform-attlist">
- <optional>
- <attribute name="dr3d:transform"/>
- </optional>
-</define>
-<define name="dr3d-light">
- <element name="dr3d:light">
- <ref name="dr3d-light-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="dr3d-light-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:diffuse-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-light-attlist" combine="interleave">
- <attribute name="dr3d:direction">
- <ref name="vector3D"/>
- </attribute>
-</define>
-<define name="dr3d-light-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:enabled">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-light-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:specular">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-cube">
- <element name="dr3d:cube">
- <ref name="dr3d-cube-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="dr3d-cube-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:min-edge">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:max-edge">
- <ref name="vector3D"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-sphere">
- <element name="dr3d:sphere">
- <ref name="dr3d-sphere-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="dr3d-sphere-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:center">
- <ref name="vector3D"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-sphere-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:size">
- <ref name="vector3D"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-extrude">
- <element name="dr3d:extrude">
- <ref name="common-draw-path-data-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="dr3d-rotate">
- <element name="dr3d:rotate">
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-path-data-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-custom-shape">
- <element name="draw:custom-shape">
- <ref name="draw-custom-shape-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- <optional>
- <ref name="draw-enhanced-geometry"/>
- </optional>
- </element>
-</define>
-<define name="draw-custom-shape-attlist" combine="interleave">
- <optional>
- <attribute name="draw:engine">
- <ref name="namespacedToken"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-custom-shape-attlist" combine="interleave">
- <optional>
- <attribute name="draw:data">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry">
- <element name="draw:enhanced-geometry">
- <ref name="draw-enhanced-geometry-attlist"/>
- <zeroOrMore>
- <ref name="draw-equation"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-handle"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:type" a:defaultValue="non-primitive">
- <ref name="custom-shape-type"/>
- </attribute>
- </optional>
-</define>
-
-<define name="custom-shape-type">
- <choice>
- <value>non-primitive</value>
- <ref name="string"/>
- </choice>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="svg:viewBox">
- <list>
- <ref name="integer"/>
- <ref name="integer"/>
- <ref name="integer"/>
- <ref name="integer"/>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:mirror-vertical" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:mirror-horizontal" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:text-rotate-angle" a:defaultValue="0">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-allowed" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:text-path-allowed" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:concentric-gradient-fill-allowed"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-brightness" a:defaultValue="33%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-depth" a:defaultValue="36pt 0">
- <list>
- <ref name="length"/>
- <ref name="double"/>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-diffusion" a:defaultValue="0%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-number-of-line-segments"
- a:defaultValue="30">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-light-face" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-first-light-harsh"
- a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-second-light-harsh"
- a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-first-light-level"
- a:defaultValue="66%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-second-light-level"
- a:defaultValue="66%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-first-light-direction"
- a:defaultValue="(5 0 1)">
- <ref name="vector3D"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-second-light-direction"
- a:defaultValue="(-5 0 1)">
- <ref name="vector3D"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-metal" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:shade-mode" a:defaultValue="flat">
- <choice>
- <value>flat</value>
- <value>phong</value>
- <value>gouraud</value>
- <value>draft</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-rotation-angle" a:defaultValue="0 0">
- <list>
- <ref name="double"/>
- <ref name="double"/>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-rotation-center">
- <ref name="vector3D"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-shininess" a:defaultValue="50%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-skew" a:defaultValue="50 45">
- <list>
- <ref name="double"/>
- <ref name="double"/>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-specularity" a:defaultValue="0%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:projection" a:defaultValue="parallel">
- <choice>
- <value>parallel</value>
- <value>perspective</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-viewpoint"
- a:defaultValue="3.5cm -3.5cm 25cm">
- <ref name="point3D"/>
- </attribute>
- </optional>
-</define>
-
-<define name="point3D">
- <data type="string"/>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-origin" a:defaultValue="0.5 -0.5">
- <list>
- <ref name="double"/>
- <ref name="double"/>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-color" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:enhanced-path">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:path-stretchpoint-x" a:defaultValue="0">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:path-stretchpoint-y" a:defaultValue="0">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:text-areas">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:glue-points">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:glue-point-type" a:defaultValue="none">
- <choice>
- <value>none</value>
- <value>segments</value>
- <value>rectangle</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:glue-point-leaving-directions"/>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:text-path" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:text-path-mode" a:defaultValue="normal">
- <choice>
- <value>normal</value>
- <value>path</value>
- <value>shape</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:text-path-scale" a:defaultValue="path">
- <choice>
- <value>path</value>
- <value>shape</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:text-path-same-letter-heights"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:modifiers">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-equation">
- <element name="draw:equation">
- <ref name="draw-equation-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-equation-attlist" combine="interleave">
- <optional>
- <attribute name="draw:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-equation-attlist" combine="interleave">
- <optional>
- <attribute name="draw:formula">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle">
- <element name="draw:handle">
- <ref name="draw-handle-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-mirror-vertical" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-mirror-horizontal" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-switched" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <attribute name="draw:handle-position">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-range-x-minimum">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-range-x-maximum">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-range-y-minimum">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-range-y-maximum">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-polar">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-radius-range-minimum">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-radius-range-maximum">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-shape-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:class">
- <ref name="presentation-classes"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-classes">
- <choice>
- <value>title</value>
- <value>outline</value>
- <value>subtitle</value>
- <value>text</value>
- <value>graphic</value>
- <value>object</value>
- <value>chart</value>
- <value>table</value>
- <value>orgchart</value>
- <value>page</value>
- <value>notes</value>
- <value>handout</value>
- <value>header</value>
- <value>footer</value>
- <value>date-time</value>
- <value>page-number</value>
- </choice>
-</define>
-<define name="presentation-shape-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:placeholder">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-shape-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:user-transformed">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-animations">
- <element name="presentation:animations">
- <zeroOrMore>
- <choice>
- <ref name="presentation-animation-elements"/>
- <ref name="presentation-animation-group"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="presentation-animation-elements">
- <choice>
- <ref name="presentation-show-shape"/>
- <ref name="presentation-show-text"/>
- <ref name="presentation-hide-shape"/>
- <ref name="presentation-hide-text"/>
- <ref name="presentation-dim"/>
- <ref name="presentation-play"/>
- </choice>
-</define>
-<define name="presentation-sound">
- <element name="presentation:sound">
- <ref name="presentation-sound-attlist"/>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <choice>
- <value>simple</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <choice>
- <value>onRequest</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
- <empty/>
- </element>
-</define>
-<define name="presentation-sound-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:play-full">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-show-shape">
- <element name="presentation:show-shape">
- <ref name="common-presentation-effect-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
-</define>
-<define name="common-presentation-effect-attlist" combine="interleave">
- <attribute name="draw:shape-id">
- <ref name="IDREF"/>
- </attribute>
-</define>
-<define name="common-presentation-effect-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:effect" a:defaultValue="none">
- <ref name="presentationEffects"/>
- </attribute>
- </optional>
-</define>
-<define name="presentationEffects">
- <choice>
- <value>none</value>
- <value>fade</value>
- <value>move</value>
- <value>stripes</value>
- <value>open</value>
- <value>close</value>
- <value>dissolve</value>
- <value>wavyline</value>
- <value>random</value>
- <value>lines</value>
- <value>laser</value>
- <value>appear</value>
- <value>hide</value>
- <value>move-short</value>
- <value>checkerboard</value>
- <value>rotate</value>
- <value>stretch</value>
- </choice>
-</define>
-<define name="common-presentation-effect-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:direction" a:defaultValue="none">
- <ref name="presentationEffectDirections"/>
- </attribute>
- </optional>
-</define>
-<define name="presentationEffectDirections">
- <choice>
- <value>none</value>
- <value>from-left</value>
- <value>from-top</value>
- <value>from-right</value>
- <value>from-bottom</value>
- <value>from-center</value>
- <value>from-upper-left</value>
- <value>from-upper-right</value>
- <value>from-lower-left</value>
- <value>from-lower-right</value>
- <value>to-left</value>
- <value>to-top</value>
- <value>to-right</value>
- <value>to-bottom</value>
- <value>to-upper-left</value>
- <value>to-upper-right</value>
- <value>to-lower-right</value>
- <value>to-lower-left</value>
- <value>path</value>
- <value>spiral-inward-left</value>
- <value>spiral-inward-right</value>
- <value>spiral-outward-left</value>
- <value>spiral-outward-right</value>
- <value>vertical</value>
- <value>horizontal</value>
- <value>to-center</value>
- <value>clockwise</value>
- <value>counter-clockwise</value>
- </choice>
-</define>
-<define name="common-presentation-effect-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:speed" a:defaultValue="medium">
- <ref name="presentationSpeeds"/>
- </attribute>
- </optional>
-</define>
-<define name="presentationSpeeds">
- <choice>
- <value>slow</value>
- <value>medium</value>
- <value>fast</value>
- </choice>
-</define>
-<define name="common-presentation-effect-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:delay">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="common-presentation-effect-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:start-scale" a:defaultValue="100%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="common-presentation-effect-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:path-id"/>
- </optional>
-</define>
-<define name="presentation-show-text">
- <element name="presentation:show-text">
- <ref name="common-presentation-effect-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
-</define>
-<define name="presentation-hide-shape">
- <element name="presentation:hide-shape">
- <ref name="common-presentation-effect-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
-</define>
-<define name="presentation-hide-text">
- <element name="presentation:hide-text">
- <ref name="common-presentation-effect-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
-</define>
-<define name="presentation-dim">
- <element name="presentation:dim">
- <ref name="presentation-dim-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
-</define>
-<define name="presentation-dim-attlist" combine="interleave">
- <attribute name="draw:shape-id">
- <ref name="IDREF"/>
- </attribute>
-</define>
-<define name="presentation-dim-attlist" combine="interleave">
- <attribute name="draw:color">
- <ref name="color"/>
- </attribute>
-</define>
-<define name="presentation-play">
- <element name="presentation:play">
- <ref name="presentation-play-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="presentation-play-attlist" combine="interleave">
- <attribute name="draw:shape-id">
- <ref name="IDREF"/>
- </attribute>
- <optional>
- <attribute name="presentation:speed" a:defaultValue="medium">
- <ref name="presentationSpeeds"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-animation-group">
- <element name="presentation:animation-group">
- <zeroOrMore>
- <ref name="presentation-animation-elements"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="common-anim-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:node-type" a:defaultValue="default">
- <choice>
- <value>default</value>
- <value>on-click</value>
- <value>with-previous</value>
- <value>after-previous</value>
- <value>timing-root</value>
- <value>main-sequence</value>
- <value>interactive-sequence</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:preset-id">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:preset-sub-type">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:preset-class" a:defaultValue="custom">
- <choice>
- <value>custom</value>
- <value>entrance</value>
- <value>exit</value>
- <value>emphasis</value>
- <value>motion-path</value>
- <value>ole-action</value>
- <value>media-call</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:master-element">
- <ref name="IDREF"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:group-id">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-event-listener">
- <element name="presentation:event-listener">
- <ref name="presentation-event-listener-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <attribute name="script:event-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <attribute name="presentation:action">
- <choice>
- <value>none</value>
- <value>previous-page</value>
- <value>next-page</value>
- <value>first-page</value>
- <value>last-page</value>
- <value>hide</value>
- <value>stop</value>
- <value>execute</value>
- <value>show</value>
- <value>verb</value>
- <value>fade-out</value>
- <value>sound</value>
- </choice>
- </attribute>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:effect" a:defaultValue="none">
- <ref name="presentationEffects"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:direction" a:defaultValue="none">
- <ref name="presentationEffectDirections"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:speed" a:defaultValue="medium">
- <ref name="presentationSpeeds"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:start-scale" a:defaultValue="100%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <choice>
- <value>simple</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show" a:defaultValue="embed">
- <choice>
- <value>embed</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <choice>
- <value>onRequest</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:verb">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="presentation:header">
- <empty/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="presentation:footer">
- <empty/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="presentation:date-time">
- <empty/>
- </element>
-</define>
-<define name="presentation-decls">
- <zeroOrMore>
- <ref name="presentation-decl"/>
- </zeroOrMore>
-</define>
-<define name="presentation-decl" combine="choice">
- <element name="presentation:header-decl">
- <ref name="presentation-header-decl-attlist"/>
- <text/>
- </element>
-</define>
-<define name="presentation-header-decl-attlist" combine="interleave">
- <attribute name="presentation:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="presentation-decl" combine="choice">
- <element name="presentation:footer-decl">
- <ref name="presentation-footer-decl-attlist"/>
- <text/>
- </element>
-</define>
-<define name="presentation-footer-decl-attlist" combine="interleave">
- <attribute name="presentation:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="presentation-decl" combine="choice">
- <element name="presentation:date-time-decl">
- <ref name="presentation-date-time-decl-attlist"/>
- <text/>
- </element>
-</define>
-<define name="presentation-date-time-decl-attlist" combine="interleave">
- <attribute name="presentation:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="presentation-date-time-decl-attlist" combine="interleave">
- <attribute name="presentation:source">
- <choice>
- <value>fixed</value>
- <value>current-date</value>
- </choice>
- </attribute>
-</define>
-<define name="presentation-date-time-decl-attlist" combine="interleave">
- <optional>
- <attribute name="style:data-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings">
- <optional>
- <element name="presentation:settings">
- <ref name="presentation-settings-attlist"/>
- <zeroOrMore>
- <ref name="presentation-show"/>
- </zeroOrMore>
- </element>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:start-page">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:show">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:full-screen" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:endless" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:pause">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:show-logo" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:force-manual" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:mouse-visible" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:mouse-as-pen" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:start-with-navigator"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:animations" a:defaultValue="enabled">
- <choice>
- <value>enabled</value>
- <value>disabled</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:transition-on-click"
- a:defaultValue="enabled">
- <choice>
- <value>enabled</value>
- <value>disabled</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:stay-on-top" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-show">
- <element name="presentation:show">
- <ref name="presentation-show-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="presentation-show-attlist" combine="interleave">
- <attribute name="presentation:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="presentation-show-attlist" combine="interleave">
- <attribute name="presentation:pages"/>
-</define>
-<define name="chart-chart">
- <element name="chart:chart">
- <ref name="chart-chart-attlist"/>
- <optional>
- <ref name="chart-title"/>
- </optional>
- <optional>
- <ref name="chart-subtitle"/>
- </optional>
- <optional>
- <ref name="chart-footer"/>
- </optional>
- <optional>
- <ref name="chart-legend"/>
- </optional>
- <ref name="chart-plot-area"/>
- <optional>
- <ref name="table-table"/>
- </optional>
- </element>
-</define>
-<define name="chart-chart-attlist" combine="interleave">
- <attribute name="chart:class">
- <ref name="namespacedToken"/>
- </attribute>
-</define>
-<define name="chart-chart-attlist" combine="interleave">
- <ref name="common-draw-size-attlist"/>
-</define>
-<define name="chart-chart-attlist" combine="interleave">
- <optional>
- <attribute name="chart:column-mapping">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-chart-attlist" combine="interleave">
- <optional>
- <attribute name="chart:row-mapping">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-chart-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-title">
- <element name="chart:title">
- <ref name="chart-title-attlist"/>
- <optional>
- <ref name="text-p"/>
- </optional>
- </element>
-</define>
-<define name="chart-title-attlist" combine="interleave">
- <optional>
- <attribute name="table:cell-range">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-title-attlist" combine="interleave">
- <ref name="common-draw-position-attlist"/>
-</define>
-<define name="chart-title-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-subtitle">
- <element name="chart:subtitle">
- <ref name="chart-title-attlist"/>
- <optional>
- <ref name="text-p"/>
- </optional>
- </element>
-</define>
-<define name="chart-footer">
- <element name="chart:footer">
- <ref name="chart-title-attlist"/>
- <optional>
- <ref name="text-p"/>
- </optional>
- </element>
-</define>
-<define name="chart-legend">
- <element name="chart:legend">
- <ref name="chart-legend-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="chart-legend-attlist" combine="interleave">
- <choice>
- <group>
- <attribute name="chart:legend-position">
- <choice>
- <value>start</value>
- <value>end</value>
- <value>top</value>
- <value>bottom</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="chart:legend-align">
- <choice>
- <value>start</value>
- <value>center</value>
- <value>end</value>
- </choice>
- </attribute>
- </optional>
- </group>
- <attribute name="chart:legend-position">
- <choice>
- <value>top-start</value>
- <value>bottom-start</value>
- <value>top-end</value>
- <value>bottom-end</value>
- </choice>
- </attribute>
- <empty/>
- </choice>
-</define>
-<define name="chart-legend-attlist" combine="interleave">
- <ref name="common-draw-position-attlist"/>
-</define>
-<define name="chart-legend-attlist" combine="interleave">
- <choice>
- <attribute name="style:legend-expansion">
- <choice>
- <value>wide</value>
- <value>high</value>
- <value>balanced</value>
- </choice>
- </attribute>
- <group>
- <attribute name="style:legend-expansion">
- <value>custom</value>
- </attribute>
- <attribute name="style:legend-expansion-aspect-ratio">
- <ref name="double"/>
- </attribute>
- </group>
- <empty/>
- </choice>
-</define>
-<define name="chart-legend-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-plot-area">
- <element name="chart:plot-area">
- <ref name="chart-plot-area-attlist"/>
- <zeroOrMore>
- <ref name="dr3d-light"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="chart-axis"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="chart-series"/>
- </zeroOrMore>
- <optional>
- <ref name="chart-stock-gain-marker"/>
- </optional>
- <optional>
- <ref name="chart-stock-loss-marker"/>
- </optional>
- <optional>
- <ref name="chart-stock-range-line"/>
- </optional>
- <optional>
- <ref name="chart-wall"/>
- </optional>
- <optional>
- <ref name="chart-floor"/>
- </optional>
- </element>
-</define>
-<define name="chart-plot-area-attlist" combine="interleave">
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
-</define>
-<define name="chart-plot-area-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-plot-area-attlist" combine="interleave">
- <optional>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-plot-area-attlist" combine="interleave">
- <optional>
- <attribute name="chart:data-source-has-labels" a:defaultValue="none">
- <choice>
- <value>none</value>
- <value>row</value>
- <value>column</value>
- <value>both</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="chart-plot-area-attlist" combine="interleave">
- <ref name="dr3d-scene-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
-</define>
-<define name="chart-wall">
- <element name="chart:wall">
- <ref name="chart-wall-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="chart-wall-attlist" combine="interleave">
- <optional>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-wall-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-floor">
- <element name="chart:floor">
- <ref name="chart-floor-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="chart-floor-attlist" combine="interleave">
- <optional>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-floor-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-axis">
- <element name="chart:axis">
- <ref name="chart-axis-attlist"/>
- <optional>
- <ref name="chart-title"/>
- </optional>
- <optional>
- <ref name="chart-categories"/>
- </optional>
- <zeroOrMore>
- <ref name="chart-grid"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="chart-axis-attlist" combine="interleave">
- <attribute name="chart:dimension">
- <choice>
- <value>x</value>
- <value>y</value>
- <value>z</value>
- </choice>
- </attribute>
-</define>
-<define name="chart-axis-attlist" combine="interleave">
- <optional>
- <attribute name="chart:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-axis-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-grid">
- <element name="chart:grid">
- <ref name="chart-grid-attlist"/>
- </element>
-</define>
-<define name="chart-grid-attlist" combine="interleave">
- <optional>
- <attribute name="chart:class" a:defaultValue="major">
- <choice>
- <value>major</value>
- <value>minor</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="chart-grid-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-series">
- <element name="chart:series">
- <ref name="chart-series-attlist"/>
- <zeroOrMore>
- <ref name="chart-domain"/>
- </zeroOrMore>
- <optional>
- <ref name="chart-mean-value"/>
- </optional>
- <optional>
- <ref name="chart-regression-curve"/>
- </optional>
- <optional>
- <ref name="chart-error-indicator"/>
- </optional>
- <zeroOrMore>
- <ref name="chart-data-point"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="chart-series-attlist" combine="interleave">
- <optional>
- <attribute name="chart:values-cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-series-attlist" combine="interleave">
- <optional>
- <attribute name="chart:label-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-series-attlist" combine="interleave">
- <optional>
- <attribute name="chart:class">
- <ref name="namespacedToken"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-series-attlist" combine="interleave">
- <optional>
- <attribute name="chart:attached-axis">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-series-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-domain">
- <element name="chart:domain">
- <optional>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="chart-categories">
- <element name="chart:categories">
- <optional>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="chart-data-point">
- <element name="chart:data-point">
- <ref name="chart-data-point-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="chart-data-point-attlist" combine="interleave">
- <optional>
- <attribute name="chart:repeated">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-data-point-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-
-<define name="chart-mean-value">
- <element name="chart:mean-value">
- <ref name="chart-mean-value-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="chart-mean-value-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-error-indicator">
- <element name="chart:error-indicator">
- <ref name="chart-error-indicator-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="chart-error-indicator-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-regression-curve">
- <element name="chart:regression-curve">
- <ref name="chart-regression-curve-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="chart-regression-curve-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-stock-gain-marker">
- <element name="chart:stock-gain-marker">
- <ref name="common-stock-marker-attlist"/>
- </element>
-</define>
-<define name="chart-stock-loss-marker">
- <element name="chart:stock-loss-marker">
- <ref name="common-stock-marker-attlist"/>
- </element>
-</define>
-<define name="chart-stock-range-line">
- <element name="chart:stock-range-line">
- <ref name="common-stock-marker-attlist"/>
- </element>
-</define>
-<define name="common-stock-marker-attlist">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="office-forms">
- <optional>
- <element name="office:forms">
- <ref name="office-forms-attlist"/>
- <zeroOrMore>
- <choice>
- <ref name="form-form"/>
- <ref name="xforms-model"/>
- </choice>
- </zeroOrMore>
- </element>
- </optional>
-</define>
-<define name="office-forms-attlist" combine="interleave">
- <optional>
- <attribute name="form:automatic-focus" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="office-forms-attlist" combine="interleave">
- <optional>
- <attribute name="form:apply-design-mode" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form">
- <element name="form:form">
- <ref name="common-form-control-attlist"/>
- <ref name="form-form-attlist"/>
- <optional>
- <ref name="form-properties"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <choice>
- <ref name="controls"/>
- <ref name="form-form"/>
- </choice>
- </zeroOrMore>
- <optional>
- <ref name="form-connection-resource"/>
- </optional>
- </element>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <value>onRequest</value>
- </attribute>
- </optional>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="office:target-frame" a:defaultValue="_blank">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:method" a:defaultValue="get">
- <choice>
- <value>get</value>
- <value>post</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:enctype"
- a:defaultValue="application/x-www-form-urlencoded">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:allow-deletes" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:allow-inserts" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:allow-updates" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:apply-filter" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:command-type" a:defaultValue="command">
- <choice>
- <value>table</value>
- <value>query</value>
- <value>command</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:command"/>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:datasource">
- <choice>
- <ref name="anyURI"/>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:master-fields">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:detail-fields">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:escape-processing" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:filter">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:ignore-result" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:navigation-mode">
- <ref name="navigation"/>
- </attribute>
- </optional>
-</define>
-
-<define name="navigation">
- <choice>
- <value>none</value>
- <value>current</value>
- <value>parent</value>
- </choice>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:order">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:tab-cycle">
- <ref name="tab-cycles"/>
- </attribute>
- </optional>
-</define>
-<define name="tab-cycles">
- <choice>
- <value>records</value>
- <value>current</value>
- <value>page</value>
- </choice>
-</define>
-<define name="form-connection-resource">
- <element name="form:connection-resource">
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <empty/>
- </element>
-</define>
-<define name="xforms-model">
- <element name="xforms:model">
- <ref name="anyAttListOrElements"/>
- </element>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:text">
- <ref name="form-text-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="controls" combine="choice">
- <ref name="column-controls"/>
-</define>
-<define name="form-text-attlist">
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
-</define>
-<define name="form-control-attlist">
- <ref name="common-form-control-attlist"/>
- <ref name="common-control-id-attlist"/>
- <ref name="xforms-bind-attlist"/>
-</define>
-<define name="common-form-control-content">
- <optional>
- <ref name="form-properties"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:textarea">
- <ref name="form-textarea-attlist"/>
- <ref name="common-form-control-content"/>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="form-textarea-attlist">
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
-</define>
-<define name="controls" combine="choice">
- <element name="form:password">
- <ref name="form-password-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-password-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
-</define>
-<define name="form-password-attlist" combine="interleave">
- <optional>
- <attribute name="form:echo-char" a:defaultValue="*">
- <ref name="character"/>
- </attribute>
- </optional>
-</define>
-<define name="controls" combine="choice">
- <element name="form:file">
- <ref name="form-file-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-file-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:formatted-text">
- <ref name="form-formatted-text-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-formatted-text-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
-</define>
-<define name="form-formatted-text-attlist" combine="interleave">
- <optional>
- <attribute name="form:max-value">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-formatted-text-attlist" combine="interleave">
- <optional>
- <attribute name="form:min-value">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-formatted-text-attlist" combine="interleave">
- <optional>
- <attribute name="form:validation" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:number">
- <ref name="form-number-attlist"/>
- <ref name="common-numeric-control-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="common-numeric-control-attlist">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
-</define>
-<define name="form-number-attlist" combine="interleave">
- <optional>
- <attribute name="form:value">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="form-number-attlist" combine="interleave">
- <optional>
- <attribute name="form:current-value">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="form-number-attlist" combine="interleave">
- <optional>
- <attribute name="form:min-value">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="form-number-attlist" combine="interleave">
- <optional>
- <attribute name="form:max-value">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:date">
- <ref name="form-date-attlist"/>
- <ref name="common-numeric-control-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="controls" combine="choice">
- <element name="form:time">
- <ref name="form-time-attlist"/>
- <ref name="common-numeric-control-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-date-attlist" combine="interleave">
- <optional>
- <attribute name="form:value">
- <ref name="date"/>
- </attribute>
- </optional>
-</define>
-<define name="form-time-attlist" combine="interleave">
- <optional>
- <attribute name="form:value">
- <ref name="time"/>
- </attribute>
- </optional>
-</define>
-<define name="form-date-attlist" combine="interleave">
- <optional>
- <attribute name="form:current-value">
- <ref name="date"/>
- </attribute>
- </optional>
-</define>
-<define name="form-time-attlist" combine="interleave">
- <optional>
- <attribute name="form:current-value">
- <ref name="time"/>
- </attribute>
- </optional>
-</define>
-<define name="form-date-attlist" combine="interleave">
- <optional>
- <attribute name="form:min-value">
- <ref name="date"/>
- </attribute>
- </optional>
-</define>
-<define name="form-time-attlist" combine="interleave">
- <optional>
- <attribute name="form:min-value">
- <ref name="time"/>
- </attribute>
- </optional>
-</define>
-<define name="form-date-attlist" combine="interleave">
- <optional>
- <attribute name="form:max-value">
- <ref name="date"/>
- </attribute>
- </optional>
-</define>
-<define name="form-time-attlist" combine="interleave">
- <optional>
- <attribute name="form:max-value">
- <ref name="time"/>
- </attribute>
- </optional>
-</define>
-<define name="controls" combine="choice">
- <element name="form:fixed-text">
- <ref name="form-fixed-text-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-fixed-text-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="for"/>
- <ref name="common-disabled-attlist"/>
- <ref name="label"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-title-attlist"/>
-</define>
-<define name="form-fixed-text-attlist" combine="interleave">
- <optional>
- <attribute name="form:multi-line" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:combobox">
- <ref name="form-combobox-attlist"/>
- <ref name="common-form-control-content"/>
- <zeroOrMore>
- <ref name="form-item"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="form-combobox-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="dropdown"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="size"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
- <ref name="list-source"/>
- <ref name="list-source-type"/>
-</define>
-<define name="form-combobox-attlist" combine="interleave">
- <optional>
- <attribute name="form:auto-complete">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-item">
- <element name="form:item">
- <ref name="form-item-attlist"/>
- <text/>
- </element>
-</define>
-<define name="form-item-attlist" combine="interleave">
- <ref name="label"/>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:listbox">
- <ref name="form-listbox-attlist"/>
- <ref name="common-form-control-content"/>
- <zeroOrMore>
- <ref name="form-option"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="form-listbox-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="dropdown"/>
- <ref name="common-printable-attlist"/>
- <ref name="size"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="bound-column"/>
- <ref name="common-data-field-attlist"/>
- <ref name="list-source"/>
- <ref name="list-source-type"/>
-</define>
-<define name="form-listbox-attlist" combine="interleave">
- <optional>
- <attribute name="form:multiple" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-listbox-attlist" combine="interleave">
- <optional>
- <attribute name="form:xforms-list-source">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-option">
- <element name="form:option">
- <ref name="form-option-attlist"/>
- <text/>
- </element>
-</define>
-<define name="form-option-attlist" combine="interleave">
- <ref name="current-selected"/>
- <ref name="selected"/>
- <ref name="label"/>
- <ref name="common-value-attlist"/>
-</define>
-<define name="controls" combine="choice">
- <element name="form:button">
- <ref name="form-button-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-button-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="button-type"/>
- <ref name="common-disabled-attlist"/>
- <ref name="label"/>
- <ref name="image-data"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="target-frame"/>
- <ref name="target-location"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-form-relative-image-position-attlist"/>
-</define>
-<define name="form-button-attlist" combine="interleave">
- <optional>
- <attribute name="form:default-button" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-button-attlist" combine="interleave">
- <optional>
- <attribute name="form:toggle" a:default-value="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-button-attlist" combine="interleave">
- <optional>
- <attribute name="form:focus-on-click">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-button-attlist" combine="interleave">
- <optional>
- <attribute name="form:xforms-submission">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="controls" combine="choice">
- <element name="form:image">
- <ref name="form-image-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-image-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="button-type"/>
- <ref name="common-disabled-attlist"/>
- <ref name="image-data"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="target-frame"/>
- <ref name="target-location"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:checkbox">
- <ref name="form-checkbox-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-checkbox-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="label"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-data-field-attlist"/>
- <ref name="common-form-visual-effect-attlist"/>
- <ref name="common-form-relative-image-position-attlist"/>
-</define>
-<define name="states">
- <choice>
- <value>unchecked</value>
- <value>checked</value>
- <value>unknown</value>
- </choice>
-</define>
-<define name="form-checkbox-attlist" combine="interleave">
- <optional>
- <attribute name="form:current-state">
- <ref name="states"/>
- </attribute>
- </optional>
-</define>
-<define name="form-checkbox-attlist" combine="interleave">
- <optional>
- <attribute name="form:is-tristate" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-checkbox-attlist" combine="interleave">
- <optional>
- <attribute name="form:state" a:defaultValue="unchecked">
- <ref name="states"/>
- </attribute>
- </optional>
-</define>
-<define name="controls" combine="choice">
- <element name="form:radio">
- <ref name="form-radio-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-radio-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="current-selected"/>
- <ref name="common-disabled-attlist"/>
- <ref name="label"/>
- <ref name="common-printable-attlist"/>
- <ref name="selected"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-data-field-attlist"/>
- <ref name="common-form-visual-effect-attlist"/>
- <ref name="common-form-relative-image-position-attlist"/>
-</define>
-<define name="controls" combine="choice">
- <element name="form:frame">
- <ref name="form-frame-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-frame-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="for"/>
- <ref name="label"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-title-attlist"/>
-</define>
-<define name="controls" combine="choice">
- <element name="form:image-frame">
- <ref name="form-image-frame-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-image-frame-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="image-data"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-data-field-attlist"/>
-</define>
-<define name="controls" combine="choice">
- <element name="form:hidden">
- <ref name="form-hidden-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-hidden-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-value-attlist"/>
-</define>
-<define name="controls" combine="choice">
- <element name="form:grid">
- <ref name="form-grid-attlist"/>
- <ref name="common-form-control-content"/>
- <zeroOrMore>
- <ref name="form-column"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="form-grid-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
-</define>
-<define name="form-column">
- <element name="form:column">
- <ref name="form-column-attlist"/>
- <oneOrMore>
- <ref name="column-controls"/>
- </oneOrMore>
- </element>
-</define>
-<define name="form-column-attlist" combine="interleave">
- <ref name="common-form-control-attlist"/>
- <ref name="label"/>
- <ref name="text-style-name"/>
-</define>
-<define name="text-style-name">
- <optional>
- <attribute name="form:text-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="controls" combine="choice">
- <element name="form:value-range">
- <ref name="form-value-range-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-value-range-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
-</define>
-<define name="form-value-range-attlist" combine="interleave">
- <optional>
- <attribute name="form:max-value">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-value-range-attlist" combine="interleave">
- <optional>
- <attribute name="form:min-value">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-value-range-attlist" combine="interleave">
- <optional>
- <attribute name="form:step-size" a:defaultName="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="form-value-range-attlist" combine="interleave">
- <optional>
- <attribute name="form:page-step-size">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="form-value-range-attlist" combine="interleave">
- <optional>
- <attribute name="form:delay-for-repeat">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="form-value-range-attlist" combine="interleave">
- <optional>
- <attribute name="form:orientation">
- <choice>
- <value>horizontal</value>
- <value>vertical</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="controls" combine="choice">
- <element name="form:generic-control">
- <ref name="form-generic-control-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-generic-control-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
-</define>
-<define name="common-form-control-attlist" combine="interleave">
- <optional>
- <attribute name="form:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-form-control-attlist" combine="interleave">
- <optional>
- <attribute name="form:control-implementation">
- <ref name="namespacedToken"/>
- </attribute>
- </optional>
-</define>
-<define name="xforms-bind-attlist">
- <optional>
- <attribute name="xforms:bind">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="types">
- <choice>
- <value>submit</value>
- <value>reset</value>
- <value>push</value>
- <value>url</value>
- </choice>
-</define>
-<define name="button-type">
- <optional>
- <attribute name="form:button-type" a:defaultValue="push">
- <ref name="types"/>
- </attribute>
- </optional>
-</define>
-<define name="common-control-id-attlist">
- <attribute name="form:id">
- <ref name="ID"/>
- </attribute>
-</define>
-<define name="current-selected">
- <optional>
- <attribute name="form:current-selected" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-value-attlist">
- <optional>
- <attribute name="form:value">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-current-value-attlist">
- <optional>
- <attribute name="form:current-value">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-disabled-attlist">
- <optional>
- <attribute name="form:disabled" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="dropdown">
- <optional>
- <attribute name="form:dropdown" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="for">
- <optional>
- <attribute name="form:for">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="image-data">
- <optional>
- <attribute name="form:image-data">
- <ref name="anyURI"/>
- </attribute>
- </optional>
-</define>
-<define name="label">
- <optional>
- <attribute name="form:label">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-maxlength-attlist">
- <optional>
- <attribute name="form:max-length">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="common-printable-attlist">
- <optional>
- <attribute name="form:printable" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-readonly-attlist">
- <optional>
- <attribute name="form:readonly" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="selected">
- <optional>
- <attribute name="form:selected" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="size">
- <optional>
- <attribute name="form:size">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="common-tab-attlist" combine="interleave">
- <optional>
- <attribute name="form:tab-index" a:defaultValue="0">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="common-tab-attlist" combine="interleave">
- <optional>
- <attribute name="form:tab-stop" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="target-frame">
- <optional>
- <attribute name="office:target-frame" a:defaultValue="_blank">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
-</define>
-<define name="target-location">
- <optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- </optional>
-</define>
-<define name="common-title-attlist">
- <optional>
- <attribute name="form:title"/>
- </optional>
-</define>
-<define name="common-form-visual-effect-attlist" combine="interleave">
- <optional>
- <attribute name="form:visual-effect">
- <choice>
- <value>flat</value>
- <value>3d</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-form-relative-image-position-attlist"
- combine="interleave">
- <choice>
- <optional>
- <attribute name="form:image-position" a:defaultValue="center">
- <value>center</value>
- </attribute>
- </optional>
- <group>
- <attribute name="form:image-position">
- <choice>
- <value>start</value>
- <value>end</value>
- <value>top</value>
- <value>bottom</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="form:image-align" a:defaultValue="center">
- <choice>
- <value>start</value>
- <value>center</value>
- <value>end</value>
- </choice>
- </attribute>
- </optional>
- </group>
- </choice>
-</define>
-<define name="bound-column">
- <optional>
- <attribute name="form:bound-column">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-convert-empty-attlist">
- <optional>
- <attribute name="form:convert-empty-to-null" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-data-field-attlist">
- <optional>
- <attribute name="form:data-field">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="list-source">
- <optional>
- <attribute name="form:list-source">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="list-source-type">
- <optional>
- <attribute name="form:list-source-type">
- <choice>
- <value>table</value>
- <value>query</value>
- <value>sql</value>
- <value>sql-pass-through</value>
- <value>value-list</value>
- <value>table-fields</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="form-properties">
- <element name="form:properties">
- <oneOrMore>
- <ref name="form-property"/>
- </oneOrMore>
- </element>
-</define>
-<define name="form-property" combine="choice">
- <element name="form:property">
- <ref name="form-property-name"/>
- <ref name="form-property-value-and-type-attlist"/>
- </element>
-</define>
-<define name="form-property-name" combine="interleave">
- <attribute name="form:property-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="form-property-value-and-type-attlist" combine="interleave">
- <choice>
- <ref name="common-value-and-type-attlist"/>
- <attribute name="office:value-type">
- <value>void</value>
- </attribute>
- </choice>
-</define>
-<define name="form-property" combine="choice">
- <element name="form:list-property">
- <ref name="form-property-name"/>
- <ref name="form-property-type-and-value-list"/>
- </element>
-</define>
-<define name="form-property-type-and-value-list">
- <choice>
- <group>
- <attribute name="office:value-type">
- <value>float</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>percentage</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>currency</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- <optional>
- <attribute name="office:currency">
- <ref name="string"/>
- </attribute>
- </optional>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>date</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>time</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:time-value">
- <ref name="duration"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>boolean</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:boolean-value">
- <ref name="boolean"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>string</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:string-value">
- <ref name="string"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <attribute name="office:value-type">
- <value>void</value>
- </attribute>
- </choice>
-</define>
-<define name="office-annotation">
- <element name="office:annotation">
- <ref name="office-annotation-attlist"/>
- <ref name="draw-caption-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="dc-creator"/>
- </optional>
- <optional>
- <ref name="dc-date"/>
- </optional>
- <optional>
- <ref name="meta-date-string"/>
- </optional>
- <zeroOrMore>
- <choice>
- <ref name="text-p"/>
- <ref name="text-list"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="office-annotation-attlist" combine="interleave">
- <optional>
- <attribute name="office:display">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="meta-date-string">
- <element name="meta:date-string">
- <ref name="string"/>
- </element>
-</define>
-<define name="common-num-format-prefix-suffix-attlist" combine="interleave">
- <optional>
- <attribute name="style:num-prefix">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:num-suffix">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-num-format-attlist" combine="interleave">
- <choice>
- <attribute name="style:num-format">
- <choice>
- <value>1</value>
- <value>i</value>
- <value>I</value>
- <ref name="string"/>
- <empty/>
- </choice>
- </attribute>
- <group>
- <attribute name="style:num-format">
- <choice>
- <value>a</value>
- <value>A</value>
- </choice>
- </attribute>
- <ref name="style-num-letter-sync-attlist"/>
- </group>
- <empty/>
- </choice>
-</define>
-<define name="style-num-letter-sync-attlist" combine="interleave">
- <optional>
- <attribute name="style:num-letter-sync">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="office-change-info">
- <element name="office:change-info">
- <ref name="dc-creator"/>
- <ref name="dc-date"/>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="office-event-listeners">
- <element name="office:event-listeners">
- <zeroOrMore>
- <choice>
- <ref name="script-event-listener"/>
- <ref name="presentation-event-listener"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="script-event-listener" combine="interleave">
- <element name="script:event-listener">
- <ref name="script-event-listener-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="script-event-listener-attlist" combine="interleave">
- <attribute name="script:event-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="script-event-listener-attlist" combine="interleave">
- <attribute name="script:language">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="script-event-listener-attlist" combine="interleave">
- <choice>
- <attribute name="script:macro-name">
- <ref name="string"/>
- </attribute>
- <group>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <value>onRequest</value>
- </attribute>
- </optional>
- </group>
- </choice>
-</define>
-<define name="math-math">
- <element name="math:math">
- <ref name="mathMarkup"/>
- </element>
-</define>
-
-<!-- To avoid inclusion of the complete MathML schema, anything -->
-<!-- is allowed within a math:math top-level element -->
-<define name="mathMarkup">
- <zeroOrMore>
- <choice>
- <attribute>
- <anyName/>
- </attribute>
- <text/>
- <element>
- <anyName/>
- <ref name="mathMarkup"/>
- </element>
- </choice>
- </zeroOrMore>
-</define>
-<define name="text-dde-connection-decl">
- <element name="text:dde-connection-decl">
- <ref name="text-dde-connection-decl-attlist"/>
- <ref name="common-dde-connection-decl-attlist"/>
- </element>
-</define>
-<define name="text-dde-connection-decl-attlist" combine="interleave">
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="common-dde-connection-decl-attlist" combine="interleave">
- <attribute name="office:dde-application">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="common-dde-connection-decl-attlist" combine="interleave">
- <attribute name="office:dde-topic">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="common-dde-connection-decl-attlist" combine="interleave">
- <attribute name="office:dde-item">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="common-dde-connection-decl-attlist" combine="interleave">
- <optional>
- <attribute name="office:automatic-update" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-dde-link">
- <element name="table:dde-link">
- <ref name="office-dde-source"/>
- <ref name="table-table"/>
- </element>
-</define>
-<define name="office-dde-source">
- <element name="office:dde-source">
- <ref name="office-dde-source-attlist"/>
- <ref name="common-dde-connection-decl-attlist"/>
- </element>
-</define>
-<define name="office-dde-source-attlist" combine="interleave">
- <optional>
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="office-dde-source-attlist" combine="interleave">
- <optional>
- <attribute name="office:conversion-mode"
- a:defaultValue="into-default-style-data-style">
- <choice>
- <value>into-default-style-data-style</value>
- <value>into-english-number</value>
- <value>keep-text</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:animate">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="common-anim-spline-mode-attlist"/>
- <ref name="common-spline-anim-value-attlist"/>
- <ref name="common-repeat-timing-attlist"/>
- <ref name="common-fill-timing-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- </element>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:set">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-set-values-attlist"/>
- <ref name="common-fill-timing-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- </element>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:animateMotion">
- <ref name="anim-animate-motion-attlist"/>
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="common-fill-timing-attlist"/>
- <ref name="common-spline-anim-value-attlist"/>
- </element>
-</define>
-<define name="anim-animate-motion-attlist" combine="interleave">
- <optional>
- <attribute name="svg:path">
- <ref name="pathData"/>
- </attribute>
- </optional>
-</define>
-<define name="anim-animate-motion-attlist" combine="interleave">
- <optional>
- <attribute name="svg:origin">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="anim-animate-motion-attlist" combine="interleave">
- <optional>
- <attribute name="smil:calcMode" a:defaultValue="paced">
- <choice>
- <value>discrete</value>
- <value>linear</value>
- <value>paced</value>
- <value>spline</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:animateColor">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="common-anim-spline-mode-attlist"/>
- <ref name="common-spline-anim-value-attlist"/>
- <ref name="anim-animate-color-attlist"/>
- <ref name="common-fill-timing-attlist"/>
- </element>
-</define>
-<define name="anim-animate-color-attlist" combine="interleave">
- <optional>
- <attribute name="anim:color-interpolation" a:defaultValue="rgb">
- <choice>
- <value>rgb</value>
- <value>hsl</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="anim-animate-color-attlist" combine="interleave">
- <optional>
- <attribute name="anim:color-interpolation-direction"
- a:defaultValue="clockwise">
- <choice>
- <value>clockwise</value>
- <value>counter-clockwise</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:animateTransform">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="anim-animate-transform-attlist"/>
- <ref name="common-fill-timing-attlist"/>
- </element>
-</define>
-<define name="anim-animate-transform-attlist" combine="interleave">
- <attribute name="svg:type">
- <choice>
- <value>translate</value>
- <value>scale</value>
- <value>rotate</value>
- <value>skewX</value>
- <value>skewY</value>
- </choice>
- </attribute>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:transitionFilter">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="common-anim-spline-mode-attlist "/>
- <ref name="anim-transition-filter-attlist"/>
- <ref name="common-fill-timing-attlist"/>
- </element>
-</define>
-<define name="anim-transition-filter-attlist" combine="interleave">
- <attribute name="smil:type">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="anim-transition-filter-attlist" combine="interleave">
- <optional>
- <attribute name="smil:subtype">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="anim-transition-filter-attlist" combine="interleave">
- <optional>
- <attribute name="smil:direction" a:defaultValue="forward">
- <choice>
- <value>forward</value>
- <value>reverse</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="anim-transition-filter-attlist" combine="interleave">
- <optional>
- <attribute name="smil:fadeColor">
- <choice>
- <value>forward</value>
- <value>reverse</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="anim-transition-filter-attlist" combine="interleave">
- <optional>
- <attribute name="smil:mode" a:defaultValue="in">
- <choice>
- <value>in</value>
- <value>out</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-attlist" combine="interleave">
- <optional>
- <attribute name="anim:id">
- <ref name="ID"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-target-attlist" combine="interleave">
- <optional>
- <attribute name="smil:targetElement">
- <ref name="IDREF"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-named-target-attlist" combine="interleave">
- <attribute name="smil:attributeName">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="common-anim-target-attlist" combine="interleave">
- <optional>
- <attribute name="anim:sub-item">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-values-attlist" combine="interleave">
- <optional>
- <attribute name="smil:values">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-spline-mode-attlist" combine="interleave">
- <optional>
- <attribute name="smil:calcMode" a:defaultValue="discrete">
- <choice>
- <value>discrete</value>
- <value>linear</value>
- <value>paced</value>
- <value>spline</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-spline-anim-value-attlist" combine="interleave">
- <optional>
- <attribute name="smil:keyTimes">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-spline-anim-value-attlist" combine="interleave">
- <optional>
- <attribute name="smil:keySplines">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-add-accum-attlist" combine="interleave">
- <optional>
- <attribute name="smil:accumulate">
- <choice>
- <value>none</value>
- <value>sum</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-add-accum-attlist" combine="interleave">
- <optional>
- <attribute name="smil:additive">
- <choice>
- <value>replace</value>
- <value>sum</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-values-attlist" combine="interleave">
- <optional>
- <attribute name="anim:formula">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-set-values-attlist" combine="interleave">
- <optional>
- <attribute name="smil:to">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-
-<define name="common-anim-values-attlist" combine="interleave">
- <ref name="common-anim-set-values-attlist"/>
- <optional>
- <attribute name="smil:from">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:by">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-begin-end-timing-attlist" combine="interleave">
- <optional>
- <attribute name="smil:begin">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-begin-end-timing-attlist" combine="interleave">
- <optional>
- <attribute name="smil:end">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-dur-timing-attlist" combine="interleave">
- <optional>
- <attribute name="smil:dur">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-endsync-timing-attlist" combine="interleave">
- <optional>
- <attribute name="smil:endsync">
- <choice>
- <value>first</value>
- <value>last</value>
- <value>all</value>
- <value>media</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-repeat-timing-attlist" combine="interleave">
- <optional>
- <attribute name="smil:repeatDur">
- <ref name="string"/>
- </attribute>
- <attribute name="smil:repeatCount">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="common-fill-timing-attlist" combine="interleave">
- <optional>
- <attribute name="smil:fill">
- <choice>
- <value>remove</value>
- <value>freeze</value>
- <value>hold</value>
- <value>auto</value>
- <value>default</value>
- <value>transition</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-fill-default-attlist" combine="interleave">
- <optional>
- <attribute name="smil:fillDefault">
- <choice>
- <value>remove</value>
- <value>freeze</value>
- <value>hold</value>
- <value>transition</value>
- <value>auto</value>
- <value>inherit</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-restart-timing-attlist" combine="interleave">
- <optional>
- <attribute name="smil:restart" a:defaultValue="default">
- <choice>
- <value>never</value>
- <value>always</value>
- <value>whenNotActive</value>
- <value>default</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-restart-default-attlist" combine="interleave">
- <optional>
- <attribute name="smil:restartDefault" a:defaultValue="inherit">
- <choice>
- <value>never</value>
- <value>always</value>
- <value>whenNotActive</value>
- <value>inherit</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-time-manip-attlist" combine="interleave">
- <optional>
- <attribute name="smil:accelerate" a:defaultValue="0.0">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="common-time-manip-attlist" combine="interleave">
- <optional>
- <attribute name="smil:decelerate" a:defaultValue="0.0">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="common-time-manip-attlist" combine="interleave">
- <optional>
- <attribute name="smil:autoReverse" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:par">
- <ref name="common-anim-attlist"/>
- <ref name="common-timing-attlist"/>
- <ref name="common-endsync-timing-attlist"/>
- <zeroOrMore>
- <ref name="animation-element"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="common-basic-timing-attlist" combine="interleave">
- <ref name="common-begin-end-timing-attlist"/>
- <ref name="common-dur-timing-attlist"/>
- <ref name="common-repeat-timing-attlist"/>
-</define>
-
-<define name="common-timing-attlist" combine="interleave">
- <ref name="common-basic-timing-attlist"/>
- <ref name="common-restart-timing-attlist"/>
- <ref name="common-restart-default-attlist"/>
- <ref name="common-fill-timing-attlist"/>
- <ref name="common-fill-default-attlist"/>
- <ref name="common-time-manip-attlist"/>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:seq">
- <ref name="common-anim-attlist"/>
- <ref name="common-endsync-timing-attlist"/>
- <ref name="common-timing-attlist"/>
- </element>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:iterate">
- <ref name="common-anim-attlist"/>
- <ref name="anin-iterate-attlist"/>
- <ref name="common-timing-attlist"/>
- <ref name="common-endsync-timing-attlist"/>
- <zeroOrMore>
- <ref name="animation-element"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="anin-iterate-attlist" combine="interleave">
- <optional>
- <attribute name="smil:targetElement">
- <ref name="IDREF"/>
- </attribute>
- </optional>
-</define>
-<define name="anin-iterate-attlist" combine="interleave">
- <optional>
- <attribute name="anim:iterate-type">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="anin-iterate-attlist" combine="interleave">
- <optional>
- <attribute name="anim:iterate-interval">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:audio">
- <ref name="common-anim-attlist"/>
- <ref name="anim-audio-attlist"/>
- <ref name="common-basic-timing-attlist"/>
- </element>
-</define>
-<define name="anim-audio-attlist" combine="interleave">
- <optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- </optional>
-</define>
-<define name="anim-audio-attlist" combine="interleave">
- <optional>
- <attribute name="anim:audio-level">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:command">
- <ref name="common-anim-attlist"/>
- <ref name="anim-command-attlist"/>
- <ref name="common-begin-end-timing-attlist"/>
- <ref name="common-anim-target-attlist"/>
- <zeroOrMore>
- <element name="anim:param">
- <attribute name="anim:name"/>
- <attribute name="anim:value"/>
- </element>
- </zeroOrMore>
- </element>
-</define>
-<define name="anim-command-attlist" combine="interleave">
- <attribute name="anim:command">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="style-style">
- <element name="style:style">
- <ref name="style-style-attlist"/>
- <ref name="style-style-content"/>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:parent-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:next-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:list-style-name">
- <choice>
- <ref name="styleName"/>
- <empty/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:master-page-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:auto-update" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:data-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:class">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:default-outline-level">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-map">
- <element name="style:map">
- <ref name="style-map-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="style-map-attlist" combine="interleave">
- <attribute name="style:condition">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="style-map-attlist" combine="interleave">
- <attribute name="style:apply-style-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="style-map-attlist" combine="interleave">
- <optional>
- <attribute name="style:base-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="style-default-style">
- <element name="style:default-style">
- <ref name="style-style-content"/>
- </element>
-</define>
-<define name="style-page-layout">
- <element name="style:page-layout">
- <ref name="style-page-layout-attlist"/>
- <optional>
- <ref name="style-page-layout-properties"/>
- </optional>
- <optional>
- <ref name="style-header-style"/>
- </optional>
- <optional>
- <ref name="style-footer-style"/>
- </optional>
- </element>
-</define>
-<define name="style-page-layout-attlist" combine="interleave">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="style-page-layout-attlist" combine="interleave">
- <optional>
- <attribute name="style:page-usage" a:defaultValue="all">
- <choice>
- <value>all</value>
- <value>left</value>
- <value>right</value>
- <value>mirrored</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-header-style">
- <element name="style:header-style">
- <optional>
- <ref name="style-header-footer-properties"/>
- </optional>
- </element>
-</define>
-<define name="style-footer-style">
- <element name="style:footer-style">
- <optional>
- <ref name="style-header-footer-properties"/>
- </optional>
- </element>
-</define>
-<define name="style-master-page">
- <element name="style:master-page">
- <ref name="style-master-page-attlist"/>
- <optional>
- <ref name="style-header"/>
- <optional>
- <ref name="style-header-left"/>
- </optional>
- </optional>
- <optional>
- <ref name="style-footer"/>
- <optional>
- <ref name="style-footer-left"/>
- </optional>
- </optional>
- <optional>
- <ref name="office-forms"/>
- </optional>
- <zeroOrMore>
- <ref name="style-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- <optional>
- <ref name="presentation-notes"/>
- </optional>
- </element>
-</define>
-<define name="style-master-page-attlist" combine="interleave">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="style-master-page-attlist" combine="interleave">
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-master-page-attlist" combine="interleave">
- <attribute name="style:page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="style-master-page-attlist" combine="interleave">
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-master-page-attlist" combine="interleave">
- <optional>
- <attribute name="style:next-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-header">
- <element name="style:header">
- <ref name="common-style-header-footer-attlist"/>
- <ref name="header-footer-content"/>
- </element>
-</define>
-<define name="style-footer">
- <element name="style:footer">
- <ref name="common-style-header-footer-attlist"/>
- <ref name="header-footer-content"/>
- </element>
-</define>
-<define name="style-header-left">
- <element name="style:header-left">
- <ref name="common-style-header-footer-attlist"/>
- <ref name="header-footer-content"/>
- </element>
-</define>
-<define name="style-footer-left">
- <element name="style:footer-left">
- <ref name="common-style-header-footer-attlist"/>
- <ref name="header-footer-content"/>
- </element>
-</define>
-<define name="header-footer-content">
- <choice>
- <group>
- <ref name="text-decls"/>
- <zeroOrMore>
- <choice>
- <ref name="text-h"/>
- <ref name="text-p"/>
- <ref name="text-list"/>
- <ref name="table-table"/>
- <ref name="text-section"/>
- <ref name="text-table-of-content"/>
- <ref name="text-illustration-index"/>
- <ref name="text-table-index"/>
- <ref name="text-object-index"/>
- <ref name="text-user-index"/>
- <ref name="text-alphabetical-index"/>
- <ref name="text-bibliography"/>
- <ref name="text-index-title"/>
- <ref name="change-marks"/>
- </choice>
- </zeroOrMore>
- </group>
- <group>
- <optional>
- <ref name="style-region-left"/>
- </optional>
- <optional>
- <ref name="style-region-center"/>
- </optional>
- <optional>
- <ref name="style-region-right"/>
- </optional>
- </group>
- </choice>
-</define>
-<define name="common-style-header-footer-attlist" combine="interleave">
- <optional>
- <attribute name="style:display" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-region-left">
- <element name="style:region-left">
- <ref name="region-content"/>
- </element>
-</define>
-<define name="style-region-center">
- <element name="style:region-center">
- <ref name="region-content"/>
- </element>
-</define>
-<define name="style-region-right">
- <element name="style:region-right">
- <ref name="region-content"/>
- </element>
-</define>
-
-<define name="region-content">
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
-</define>
-<define name="presentation-notes">
- <element name="presentation:notes">
- <ref name="common-presentation-header-footer-attlist"/>
- <ref name="presentation-notes-attlist"/>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="presentation-notes-attlist" combine="interleave">
- <optional>
- <attribute name="style:page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-notes-attlist" combine="interleave">
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-template">
- <element name="table:table-template">
- <ref name="table-table-template-attlist"/>
- <optional>
- <ref name="table-first-row"/>
- </optional>
- <optional>
- <ref name="table-last-row"/>
- </optional>
- <optional>
- <ref name="table-first-column"/>
- </optional>
- <optional>
- <ref name="table-last-column"/>
- </optional>
- <choice>
- <ref name="table-body"/>
- <group>
- <ref name="table-even-rows"/>
- <ref name="table-odd-rows"/>
- </group>
- <group>
- <ref name="table-even-columns"/>
- <ref name="table-odd-columns"/>
- </group>
- </choice>
- </element>
-</define>
-<define name="table-table-template-attlist" combine="interleave">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-table-template-attlist" combine="interleave">
- <attribute name="text:first-row-start-column">
- <ref name="rowOrCol"/>
- </attribute>
-</define>
-
-<define name="table-table-template-attlist" combine="interleave">
- <attribute name="text:first-row-end-column">
- <ref name="rowOrCol"/>
- </attribute>
-</define>
-
-<define name="table-table-template-attlist" combine="interleave">
- <attribute name="text:last-row-start-column">
- <ref name="rowOrCol"/>
- </attribute>
-</define>
-
-<define name="table-table-template-attlist" combine="interleave">
- <attribute name="text:last-row-end-column">
- <ref name="rowOrCol"/>
- </attribute>
-</define>
-
-<define name="rowOrCol">
- <choice>
- <value>row</value>
- <value>column</value>
- </choice>
-</define>
-<define name="table-first-row">
- <element name="table:first-row">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-last-row">
- <element name="table:last-row">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-first-column">
- <element name="table:first-column">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-last-column">
- <element name="table:last-column">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-body">
- <element name="table:body">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-even-rows">
- <element name="table:even-rows">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-odd-rows">
- <element name="table:odd-rows">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-even-columns">
- <element name="table:even-columns">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-odd-columns">
- <element name="table:odd-columns">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="common-table-template-attlist" combine="interleave">
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="style-font-face">
- <element name="style:font-face">
- <ref name="style-font-face-attlist"/>
- <optional>
- <ref name="svg-font-face-src"/>
- </optional>
- <optional>
- <ref name="svg-definition-src"/>
- </optional>
- </element>
-</define>
-<define name="style-font-face-attlist" combine="interleave">
- <optional>
- <attribute name="svg:font-family">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-style">
- <ref name="fontStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-variant">
- <ref name="fontVariant"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-weight">
- <ref name="fontWeight"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-stretch">
- <choice>
- <value>normal</value>
- <value>ultra-condensed</value>
- <value>extra-condensed</value>
- <value>condensed</value>
- <value>semi-condensed</value>
- <value>semi-expanded</value>
- <value>expanded</value>
- <value>extra-expanded</value>
- <value>ultra-expanded</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-size">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:unicode-range"/>
- </optional>
- <optional>
- <attribute name="svg:units-per-em">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:panose-1"/>
- </optional>
- <optional>
- <attribute name="svg:stemv">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:stemh">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:slope">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:cap-height">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:x-height">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:accent-height">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:ascent">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:descent">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:widths"/>
- </optional>
- <optional>
- <attribute name="svg:bbox"/>
- </optional>
- <optional>
- <attribute name="svg:ideographic">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:alphabetic">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:mathematical">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:hanging">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:v-ideographic">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:v-alphabetic">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:v-mathematical">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:v-hanging">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:underline-position">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:underline-thickness">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:strikethrough-position">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:strikethrough-thickness">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:overline-position">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:overline-thickness">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-
-<define name="svg-font-face-src">
- <element name="svg:font-face-src">
- <oneOrMore>
- <choice>
- <ref name="svg-font-face-uri"/>
- <ref name="svg-font-face-name"/>
- </choice>
- </oneOrMore>
- </element>
-</define>
-
-<define name="svg-font-face-uri">
- <element name="svg:font-face-uri">
- <ref name="common-svg-font-face-xlink-attlist"/>
- <zeroOrMore>
- <ref name="svg-font-face-format"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="svg-font-face-format">
- <element name="svg:font-face-format">
- <optional>
- <attribute name="svg:string"/>
- </optional>
- <empty/>
- </element>
-</define>
-<define name="svg-font-face-name">
- <element name="svg:font-face-name">
- <optional>
- <attribute name="name"/>
- </optional>
- <empty/>
- </element>
-</define>
-
-<define name="svg-definition-src">
- <element name="svg:definition-src">
- <ref name="common-svg-font-face-xlink-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="common-svg-font-face-xlink-attlist" combine="interleave">
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <value>onRequest</value>
- </attribute>
- </optional>
-</define>
-<define name="style-font-face-attlist" combine="interleave">
- <attribute name="style:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="style-font-face-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-adornments">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-font-face-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-family-generic">
- <ref name="fontFamilyGeneric"/>
- </attribute>
- </optional>
-</define>
-<define name="style-font-face-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-pitch">
- <ref name="fontPitch"/>
- </attribute>
- </optional>
-</define>
-
-<define name="style-font-face-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-charset">
- <ref name="textEncoding"/>
- </attribute>
- </optional>
-</define>
-<define name="number-number-style">
- <element name="number:number-style">
- <ref name="common-data-style-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <optional>
- <ref name="any-number"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </optional>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="any-number">
- <choice>
- <ref name="number-number"/>
- <ref name="number-scientific-number"/>
- <ref name="number-fraction"/>
- </choice>
-</define>
-<define name="number-number">
- <element name="number:number">
- <ref name="number-number-attlist"/>
- <ref name="common-decimal-places-attlist"/>
- <ref name="common-number-attlist"/>
- <zeroOrMore>
- <ref name="number-embedded-text"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="number-number-attlist" combine="interleave">
- <optional>
- <attribute name="number:decimal-replacement"/>
- </optional>
-</define>
-<define name="number-number-attlist" combine="interleave">
- <optional>
- <attribute name="number:display-factor" a:defaultValue="1">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="number-embedded-text">
- <element name="number:embedded-text">
- <ref name="number-embedded-text-attlist"/>
- <text/>
- </element>
-</define>
-<define name="number-embedded-text-attlist" combine="interleave">
- <attribute name="number:position">
- <ref name="integer"/>
- </attribute>
-</define>
-<define name="number-scientific-number">
- <element name="number:scientific-number">
- <ref name="number-scientific-number-attlist"/>
- <ref name="common-decimal-places-attlist"/>
- <ref name="common-number-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-scientific-number-attlist" combine="interleave">
- <optional>
- <attribute name="number:min-exponent-digits">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="number-fraction">
- <element name="number:fraction">
- <ref name="number-fraction-attlist"/>
- <ref name="common-number-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-fraction-attlist" combine="interleave">
- <optional>
- <attribute name="number:min-numerator-digits">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="number-fraction-attlist" combine="interleave">
- <optional>
- <attribute name="number:min-denominator-digits">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="number-fraction-attlist" combine="interleave">
- <optional>
- <attribute name="number:denominator-value">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="number-currency-style">
- <element name="number:currency-style">
- <ref name="common-data-style-attlist"/>
- <ref name="common-auto-reorder-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <optional>
- <choice>
- <group>
- <ref name="number-and-text"/>
- <optional>
- <ref name="currency-symbol-and-text"/>
- </optional>
- </group>
- <group>
- <ref name="currency-symbol-and-text"/>
- <optional>
- <ref name="number-and-text"/>
- </optional>
- </group>
- </choice>
- </optional>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="currency-symbol-and-text">
- <ref name="number-currency-symbol"/>
- <optional>
- <ref name="number-text"/>
- </optional>
-</define>
-<define name="number-and-text">
- <ref name="number-number"/>
- <optional>
- <ref name="number-text"/>
- </optional>
-</define>
-<define name="number-currency-symbol">
- <element name="number:currency-symbol">
- <ref name="number-currency-symbol-attlist"/>
- <text/>
- </element>
-</define>
-<define name="number-currency-symbol-attlist" combine="interleave">
- <optional>
- <attribute name="number:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
-</define>
-<define name="number-percentage-style">
- <element name="number:percentage-style">
- <ref name="common-data-style-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <optional>
- <ref name="number-and-text"/>
- </optional>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="number-date-style">
- <element name="number:date-style">
- <ref name="common-data-style-attlist"/>
- <ref name="common-auto-reorder-attlist"/>
- <ref name="common-format-source-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <!-- This DTD does not reflect the fact that some elements must not -->
- <!-- occur more than once. -->
- <optional>
- <ref name="number-text"/>
- </optional>
- <oneOrMore>
- <ref name="any-date"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </oneOrMore>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="any-date">
- <choice>
- <ref name="number-day"/>
- <ref name="number-month"/>
- <ref name="number-year"/>
- <ref name="number-era"/>
- <ref name="number-day-of-week"/>
- <ref name="number-week-of-year"/>
- <ref name="number-quarter"/>
- <ref name="number-hours"/>
- <ref name="number-am-pm"/>
- <ref name="number-minutes"/>
- <ref name="number-seconds"/>
- </choice>
-</define>
-<define name="number-day">
- <element name="number:day">
- <ref name="number-day-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-day-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-month">
- <element name="number:month">
- <ref name="number-month-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-month-attlist" combine="interleave">
- <optional>
- <attribute name="number:textual" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="number-month-attlist" combine="interleave">
- <optional>
- <attribute name="number:possessive-form" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="number-month-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-year">
- <element name="number:year">
- <ref name="number-year-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-year-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-era">
- <element name="number:era">
- <ref name="number-era-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-era-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-day-of-week">
- <element name="number:day-of-week">
- <ref name="number-day-of-week-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-day-of-week-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-week-of-year">
- <element name="number:week-of-year">
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-quarter">
- <element name="number:quarter">
- <ref name="number-quarter-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-quarter-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-time-style">
- <element name="number:time-style">
- <ref name="number-time-style-attlist"/>
- <ref name="common-data-style-attlist"/>
- <ref name="common-format-source-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <!-- This DTD does not reflect the fact that some elements must not -->
- <!-- occur more than once. -->
- <optional>
- <ref name="number-text"/>
- </optional>
- <oneOrMore>
- <ref name="any-time"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </oneOrMore>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="any-time">
- <choice>
- <ref name="number-hours"/>
- <ref name="number-am-pm"/>
- <ref name="number-minutes"/>
- <ref name="number-seconds"/>
- </choice>
-</define>
-<define name="number-time-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:truncate-on-overflow" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="number-hours">
- <element name="number:hours">
- <ref name="number-hours-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-hours-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-minutes">
- <element name="number:minutes">
- <ref name="number-minutes-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-minutes-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-seconds">
- <element name="number:seconds">
- <ref name="number-seconds-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-seconds-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-seconds-attlist" combine="interleave">
- <optional>
- <attribute name="number:decimal-places" a:defaultValue="0">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="number-am-pm">
- <element name="number:am-pm">
- <empty/>
- </element>
-</define>
-<define name="number-boolean-style">
- <element name="number:boolean-style">
- <ref name="common-data-style-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <optional>
- <ref name="number-boolean"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </optional>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="number-boolean">
- <element name="number:boolean">
- <empty/>
- </element>
-</define>
-<define name="number-text-style">
- <element name="number:text-style">
- <ref name="common-data-style-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <zeroOrMore>
- <ref name="number-text-content"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="number-text">
- <element name="number:text">
- <text/>
- </element>
-</define>
-<define name="number-text-content">
- <element name="number:text-content">
- <empty/>
- </element>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="style-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:title"/>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:volatile">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-auto-reorder-attlist" combine="interleave">
- <optional>
- <attribute name="number:automatic-order" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-format-source-attlist">
- <optional>
- <attribute name="number:format-source" a:defaultValue="fixed">
- <choice>
- <value>fixed</value>
- <value>language</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:transliteration-format" a:defaultValue="1">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:transliteration-language">
- <ref name="countryCode"/>
- </attribute>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:transliteration-country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:transliteration-style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>medium</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-decimal-places-attlist">
- <optional>
- <attribute name="number:decimal-places">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="common-number-attlist" combine="interleave">
- <optional>
- <attribute name="number:min-integer-digits">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="common-number-attlist" combine="interleave">
- <optional>
- <attribute name="number:grouping" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-calendar-attlist" combine="interleave">
- <optional>
- <attribute name="number:calendar">
- <choice>
- <value>gregorian</value>
- <value>gengou</value>
- <value>ROC</value>
- <value>hanja_yoil</value>
- <value>hanja</value>
- <value>hijri</value>
- <value>jewish</value>
- <value>buddhist</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>text</value>
- </attribute>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>paragraph</value>
- </attribute>
- <optional>
- <ref name="style-paragraph-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>section</value>
- </attribute>
- <optional>
- <ref name="style-section-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>ruby</value>
- </attribute>
- <optional>
- <ref name="style-ruby-properties"/>
- </optional>
- </group>
-</define>
-<define name="text-linenumbering-configuration">
- <element name="text:linenumbering-configuration">
- <ref name="text-linenumbering-configuration-attlist"/>
- <optional>
- <ref name="text-linenumbering-separator"/>
- </optional>
- </element>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:number-lines" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <ref name="common-num-format-attlist"/>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:increment">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:number-position" a:defaultValue="left">
- <choice>
- <value>left</value>
- <value>rigth</value>
- <value>inner</value>
- <value>outer</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:offset">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:count-empty-lines" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:count-in-text-boxes" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:restart-on-page" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-separator">
- <element name="text:linenumbering-separator">
- <optional>
- <attribute name="text:increment">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <text/>
- </element>
-</define>
-<define name="text-notes-configuration">
- <element name="text:notes-configuration">
- <ref name="text-notes-configuration-content"/>
- </element>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <ref name="text-note-class"/>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <attribute name="text:citation-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <attribute name="text:citation-body-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <attribute name="text:default-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <attribute name="text:master-page-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <attribute name="text:start-value">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <ref name="common-num-format-prefix-suffix-attlist"/>
- <optional>
- <ref name="common-num-format-attlist"/>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <attribute name="text:start-numbering-at">
- <choice>
- <value>document</value>
- <value>chapter</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <attribute name="text:footnotes-position">
- <choice>
- <value>text</value>
- <value>page</value>
- <value>section</value>
- <value>document</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <element name="text:note-continuation-notice-forward">
- <text/>
- </element>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <element name="text:note-continuation-notice-backward">
- <text/>
- </element>
- </optional>
-</define>
-<define name="text-bibliography-configuration">
- <element name="text:bibliography-configuration">
- <ref name="text-bibliography-configuration-attlist"/>
- <zeroOrMore>
- <ref name="text-sort-key"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-bibliography-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:prefix">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:suffix">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-bibliography-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:numbered-entries" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-bibliography-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:sort-by-position" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:sort-algorithm">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-sort-key">
- <element name="text:sort-key">
- <ref name="text-sort-key-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="text-sort-key-attlist" combine="interleave">
- <attribute name="text:key">
- <choice>
- <value>address</value>
- <value>annote</value>
- <value>author</value>
- <value>bibliography-type</value>
- <value>booktitle</value>
- <value>chapter</value>
- <value>custom1</value>
- <value>custom2</value>
- <value>custom3</value>
- <value>custom4</value>
- <value>custom5</value>
- <value>edition</value>
- <value>editor</value>
- <value>howpublished</value>
- <value>identifier</value>
- <value>institution</value>
- <value>isbn</value>
- <value>issn</value>
- <value>journal</value>
- <value>month</value>
- <value>note</value>
- <value>number</value>
- <value>organizations</value>
- <value>pages</value>
- <value>publisher</value>
- <value>report-type</value>
- <value>school</value>
- <value>series</value>
- <value>title</value>
- <value>url</value>
- <value>volume</value>
- <value>year</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="text:sort-ascending" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-style">
- <element name="text:list-style">
- <ref name="text-list-style-attr"/>
- <zeroOrMore>
- <ref name="text-list-style-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-list-style-attr" combine="interleave">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="text-list-style-attr" combine="interleave">
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-style-attr" combine="interleave">
- <optional>
- <attribute name="text:consecutive-numbering" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-level-style-attr">
- <attribute name="text:level">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="text-list-style-content" combine="choice">
- <element name="text:list-level-style-number">
- <ref name="text-list-level-style-attr"/>
- <ref name="text-list-level-style-number-attr"/>
- <optional>
- <ref name="style-list-level-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </element>
-</define>
-<define name="text-list-level-style-number-attr" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-level-style-number-attr" combine="interleave">
- <ref name="common-num-format-attlist"/>
- <ref name="common-num-format-prefix-suffix-attlist"/>
-</define>
-<define name="text-list-level-style-number-attr" combine="interleave">
- <optional>
- <attribute name="text:display-levels" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-level-style-number-attr" combine="interleave">
- <optional>
- <attribute name="text:start-value" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-style-content" combine="choice">
- <element name="text:list-level-style-bullet">
- <ref name="text-list-level-style-attr"/>
- <ref name="text-list-level-style-bullet-attr"/>
- <optional>
- <ref name="style-list-level-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </element>
-</define>
-<define name="text-list-level-style-bullet-attr" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-level-style-bullet-attr" combine="interleave">
- <attribute name="text:bullet-char">
- <ref name="character"/>
- </attribute>
-</define>
-<define name="text-list-level-style-bullet-attr" combine="interleave">
- <ref name="common-num-format-prefix-suffix-attlist"/>
-</define>
-<define name="text-list-level-style-bullet-attr" combine="interleave">
- <optional>
- <attribute name="text:bullet-relative-size">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-style-content" combine="choice">
- <element name="text:list-level-style-image">
- <ref name="text-list-level-style-attr"/>
- <ref name="text-list-level-style-image-attr"/>
- <optional>
- <ref name="style-list-level-properties"/>
- </optional>
- </element>
-</define>
-<define name="text-list-level-style-image-attr" combine="interleave">
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-binary-data"/>
- </choice>
-</define>
-<define name="text-outline-style">
- <element name="text:outline-style">
- <oneOrMore>
- <ref name="text-outline-level-style"/>
- </oneOrMore>
- </element>
-</define>
-<define name="text-outline-level-style">
- <element name="text:outline-level-style">
- <ref name="text-outline-level-style-attlist"/>
- <optional>
- <ref name="style-list-level-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </element>
-</define>
-<define name="text-outline-level-style-attlist" combine="interleave">
- <attribute name="text:level">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="text-outline-level-style-attlist" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-outline-level-style-attlist" combine="interleave">
- <ref name="common-num-format-attlist"/>
- <ref name="common-num-format-prefix-suffix-attlist"/>
-</define>
-<define name="text-outline-level-style-attlist" combine="interleave">
- <optional>
- <attribute name="text:display-levels" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-outline-level-style-attlist" combine="interleave">
- <optional>
- <attribute name="text:start-value" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>table</value>
- </attribute>
- <optional>
- <ref name="style-table-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>table-column</value>
- </attribute>
- <optional>
- <ref name="style-table-column-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>table-row</value>
- </attribute>
- <optional>
- <ref name="style-table-row-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>table-cell</value>
- </attribute>
- <optional>
- <ref name="style-table-cell-properties"/>
- </optional>
- <optional>
- <ref name="style-paragraph-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <choice>
- <value>graphic</value>
- <value>presentation</value>
- </choice>
- </attribute>
- <optional>
- <ref name="style-graphic-properties"/>
- </optional>
- <optional>
- <ref name="style-paragraph-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
-</define>
-
-<define name="style-graphic-properties">
- <element name="style:graphic-properties">
- <ref name="style-graphic-properties-content"/>
- </element>
-</define>
-
-<define name="style-graphic-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-graphic-properties-content-strict">
- <ref name="style-graphic-properties-attlist"/>
- <ref name="style-graphic-fill-properties-attlist"/>
- <ref name="style-graphic-properties-elements"/>
-</define>
-
-<define name=" style-graphic-properties-elements">
- <empty/>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>drawing-page</value>
- </attribute>
- <optional>
- <ref name="style-drawing-page-properties"/>
- </optional>
- </group>
-</define>
-
-<define name="style-drawing-page-properties">
- <element name="style:drawing-page-properties">
- <ref name="style-drawing-page-properties-content"/>
- </element>
-</define>
-
-<define name="style-drawing-page-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-drawing-page-properties-content-strict">
- <ref name="style-graphic-fill-properties-attlist"/>
- <ref name="style-drawing-page-properties-attlist"/>
- <ref name="style-drawing-page-properties-elements"/>
-</define>
-<define name="draw-gradient">
- <element name="draw:gradient">
- <ref name="common-draw-gradient-attlist"/>
- <ref name="draw-gradient-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="common-draw-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-gradient-attlist" combine="interleave">
- <attribute name="draw:style">
- <ref name="gradient-style"/>
- </attribute>
-</define>
-<define name="gradient-style">
- <choice>
- <value>linear</value>
- <value>axial</value>
- <value>radial</value>
- <value>ellipsoid</value>
- <value>square</value>
- <value>rectangular</value>
- </choice>
-</define>
-<define name="common-draw-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:cx">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:cy">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start-intensity">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end-intensity">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:angle">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:border">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="svg-linearGradient">
- <element name="svg:linearGradient">
- <ref name="common-svg-gradient-attlist"/>
- <optional>
- <attribute name="svg:x1" a:defaultValue="0%">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:y1" a:defaultValue="0%">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:x2" a:defaultValue="100%">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:y2" a:defaultValue="100%">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="svg-stop"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="svg-radialGradient">
- <element name="svg:radialGradient">
- <ref name="common-svg-gradient-attlist"/>
- <optional>
- <attribute name="svg:cx" a:defaultValue="50%">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:cy" a:defaultValue="50%">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:r" a:defaultValue="50%">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:fx">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:fy">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="svg-stop"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="svg-stop">
- <element name="svg:stop">
- <attribute name="svg:offset">
- <choice>
- <ref name="double"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <optional>
- <attribute name="svg:stop-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:stop-opacity">
- <ref name="double"/>
- </attribute>
- </optional>
- </element>
-</define>
-
-<define name="common-svg-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="svg:gradientUnits" a:defaultValue="objectBoundingBox">
- <value>objectBoundingBox</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:gradientTransform">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:spreadMethod" a:defaultValue="pad">
- <choice>
- <value>pad</value>
- <value>reflect</value>
- <value>repeat</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-svg-gradient-attlist" combine="interleave">
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="common-svg-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-hatch">
- <element name="draw:hatch">
- <ref name="draw-hatch-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-hatch-attlist" combine="interleave">
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="draw-hatch-attlist" combine="interleave">
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-hatch-attlist" combine="interleave">
- <attribute name="draw:style">
- <choice>
- <value>single</value>
- <value>double</value>
- <value>triple</value>
- </choice>
- </attribute>
-</define>
-<define name="draw-hatch-attlist" combine="interleave">
- <optional>
- <attribute name="draw:color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-hatch-attlist" combine="interleave">
- <optional>
- <attribute name="draw:distance">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-hatch-attlist" combine="interleave">
- <optional>
- <attribute name="draw:rotation">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-fill-image">
- <element name="draw:fill-image">
- <ref name="draw-fill-image-attlist"/>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <choice>
- <value>simple</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show" a:defaultValue="embed">
- <choice>
- <value>embed</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onLoad">
- <choice>
- <value>onLoad</value>
- </choice>
- </attribute>
- </optional>
- <empty/>
- </element>
-</define>
-<define name="draw-fill-image-attlist" combine="interleave">
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="draw-fill-image-attlist" combine="interleave">
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-fill-image-attlist" combine="interleave">
- <optional>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-opacity">
- <element name="draw:opacity">
- <ref name="common-draw-gradient-attlist"/>
- <ref name="draw-opacity-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-opacity-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-marker">
- <element name="draw:marker">
- <ref name="draw-marker-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-path-data-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-marker-attlist" combine="interleave">
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="draw-marker-attlist" combine="interleave">
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-stroke-dash">
- <element name="draw:stroke-dash">
- <ref name="draw-stroke-dash-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-stroke-dash-attlist" combine="interleave">
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="draw-stroke-dash-attlist" combine="interleave">
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-stroke-dash-attlist" combine="interleave">
- <optional>
- <attribute name="draw:style">
- <choice>
- <value>rect</value>
- <value>round</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-stroke-dash-attlist" combine="interleave">
- <optional>
- <attribute name="draw:dots1">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:dots1-length">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:dots2">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:dots2-length">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-stroke-dash-attlist" combine="interleave">
- <optional>
- <attribute name="draw:distance">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-presentation-page-layout">
- <element name="style:presentation-page-layout">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="presentation-placeholder"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="presentation-placeholder">
- <element name="presentation:placeholder">
- <attribute name="presentation:object">
- <ref name="presentation-classes"/>
- </attribute>
- <attribute name="svg:x">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <attribute name="svg:y">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <attribute name="svg:width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <attribute name="svg:height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <empty/>
- </element>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>chart</value>
- </attribute>
- <optional>
- <ref name="style-chart-properties"/>
- </optional>
- <optional>
- <ref name="style-graphic-properties"/>
- </optional>
- <optional>
- <ref name="style-paragraph-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-properties-content">
- <ref name="anyAttListOrElements"/>
-</define>
-<define name="style-page-layout-properties">
- <element name="style:page-layout-properties">
- <ref name="style-page-layout-properties-content"/>
- </element>
-</define>
-
-<define name="style-page-layout-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-page-layout-properties-content-strict">
- <ref name="style-page-layout-properties-attlist"/>
- <ref name="style-page-layout-properties-elements"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:page-width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:page-height">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <ref name="common-num-format-attlist"/>
- </optional>
- <ref name="common-num-format-prefix-suffix-attlist"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:paper-tray-name">
- <choice>
- <value>default</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:print-orientation">
- <choice>
- <value>portrait</value>
- <value>landscape</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <ref name="common-horizontal-margin-attlist"/>
- <ref name="common-vertical-margin-attlist"/>
- <ref name="common-margin-attlist"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <ref name="common-border-attlist"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <ref name="common-border-line-width-attlist"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <ref name="common-padding-attlist"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <ref name="common-shadow-attlist"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-page-layout-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-<define name="style-page-layout-properties-elements" combine="interleave">
- <ref name="style-columns"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:register-truth-ref-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:print">
- <list>
- <zeroOrMore>
- <choice>
- <value>headers</value>
- <value>grid</value>
- <value>annotations</value>
- <value>objects</value>
- <value>charts</value>
- <value>drawings</value>
- <value>formulas</value>
- <value>zero-values</value>
- </choice>
- </zeroOrMore>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:print-page-order">
- <choice>
- <value>ttb</value>
- <value>ltr</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:first-page-number">
- <choice>
- <ref name="positiveInteger"/>
- <value>continue</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:scale-to">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:scale-to-pages">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:table-centering">
- <choice>
- <value>horizontal</value>
- <value>vertical</value>
- <value>both</value>
- <value>none</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:footnote-max-height">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <ref name="common-writing-mode-attlist"/>
-</define>
-<define name="style-page-layout-properties-elements" combine="interleave">
- <ref name="style-footnote-sep"/>
-</define>
-
-<define name="style-footnote-sep">
- <optional>
- <element name="style:footnote-sep">
- <ref name="style-footnote-sep-attlist"/>
- <empty/>
- </element>
- </optional>
-</define>
-<define name="style-footnote-sep-attlist" combine="interleave">
- <optional>
- <attribute name="style:width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rel-width">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:line-style">
- <ref name="lineStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:adjustment" a:defaultValue="left">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:distance-before-sep">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:distance-after-sep">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-mode">
- <choice>
- <value>none</value>
- <value>line</value>
- <value>both</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-base-height">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-ruby-height">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-lines">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-ruby-below">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-print">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-display">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-header-footer-properties">
- <element name="style:header-footer-properties">
- <ref name="style-header-footer-properties-content"/>
- </element>
-</define>
-
-<define name="style-header-footer-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-header-footer-properties-content-strict">
- <ref name="style-header-footer-properties-attlist"/>
- <ref name="style-header-footer-properties-elements"/>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <optional>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:min-height">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <ref name="common-horizontal-margin-attlist"/>
- <ref name="common-vertical-margin-attlist"/>
- <ref name="common-margin-attlist"/>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <ref name="common-border-attlist"/>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <ref name="common-border-line-width-attlist"/>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <ref name="common-padding-attlist"/>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-header-footer-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <ref name="common-shadow-attlist"/>
-</define>
-<define name="style-header-footer-attlist" combine="interleave">
- <optional>
- <attribute name="style:dynamic-spacing">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties">
- <element name="style:text-properties">
- <ref name="style-text-properties-content"/>
- </element>
-</define>
-
-<define name="style-text-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-text-properties-content-strict">
- <ref name="style-text-properties-attlist"/>
- <ref name="style-text-properties-elements"/>
-</define>
-
-<define name="style-text-properties-elements">
- <empty/>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:font-variant">
- <ref name="fontVariant"/>
- </attribute>
- </optional>
-</define>
-
-<define name="fontVariant">
- <choice>
- <value>normal</value>
- <value>small-caps</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:text-transform">
- <choice>
- <value>none</value>
- <value>lowercase</value>
- <value>uppercase</value>
- <value>capitalize</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:use-window-font-color">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-outline">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-line-through-type">
- <ref name="lineType"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-line-through-style">
- <ref name="lineStyle"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-line-through-width">
- <ref name="lineWidth"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-line-through-color">
- <choice>
- <value>font-color</value>
- <ref name="color"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-line-through-text">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-line-through-text-style">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-position">
- <list>
- <choice>
- <ref name="percent"/>
- <value>super</value>
- <value>sub</value>
- </choice>
- <optional>
- <ref name="percent"/>
- </optional>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-name-asian">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-name-complex">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:font-family">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-asian">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-complex">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-family-generic">
- <ref name="fontFamilyGeneric"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-generic-asian">
- <ref name="fontFamilyGeneric"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-generic-complex">
- <ref name="fontFamilyGeneric"/>
- </attribute>
- </optional>
-</define>
-
-<define name="fontFamilyGeneric">
- <choice>
- <value>roman</value>
- <value>swiss</value>
- <value>modern</value>
- <value>decorative</value>
- <value>script</value>
- <value>system</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-style-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-name-asian">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-name-complex">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-pitch">
- <ref name="fontPitch"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-pitch-asian">
- <ref name="fontPitch"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-pitch-complex">
- <ref name="fontPitch"/>
- </attribute>
- </optional>
-</define>
-
-<define name="fontPitch">
- <choice>
- <value>fixed</value>
- <value>variable</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-charset">
- <ref name="textEncoding"/>
- </attribute>
- </optional>
-</define>
-
-<define name="textEncoding">
- <data type="string">
- <param name="pattern">[A-Za-z][A-Za-z0-9._\-]*</param>
- </data>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:font-size">
- <choice>
- <ref name="positiveLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-size-asian">
- <choice>
- <ref name="positiveLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-size-complex">
- <choice>
- <ref name="positiveLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-size-rel">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-size-rel-asian">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-size-rel-complex">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:script-type">
- <choice>
- <value>latin</value>
- <value>asian</value>
- <value>complex</value>
- <value>ignore</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:letter-spacing">
- <choice>
- <ref name="length"/>
- <value>normal</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:language-asian">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:language-complex">
- <ref name="languageCode"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:country-asian">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:country-complex">
- <ref name="countryCode"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:font-style">
- <ref name="fontStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-asian">
- <ref name="fontStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-complex">
- <ref name="fontStyle"/>
- </attribute>
- </optional>
-</define>
-
-<define name="fontStyle">
- <choice>
- <value>normal</value>
- <value>italic</value>
- <value>oblique</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-relief">
- <choice>
- <value>none</value>
- <value>embossed</value>
- <value>engraved</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:text-shadow">
- <ref name="shadowType"/>
- </attribute>
- </optional>
-</define>
-
-<define name="shadowType">
- <choice>
- <value>none</value>
- <!-- The follwing string must match an XSL shadow decl -->
- <ref name="string"/>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-underline-type">
- <ref name="lineType"/>
- </attribute>
- </optional>
-</define>
-
-<define name="lineType">
- <choice>
- <value>none</value>
- <value>single</value>
- <value>double</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-underline-style">
- <ref name="lineStyle"/>
- </attribute>
- </optional>
-</define>
-
-<define name="lineStyle">
- <choice>
- <value>none</value>
- <value>solid</value>
- <value>dotted</value>
- <value>dash</value>
- <value>long-dash</value>
- <value>dot-dash</value>
- <value>dot-dot-dash</value>
- <value>wave</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-underline-width">
- <ref name="lineWidth"/>
- </attribute>
- </optional>
-</define>
-
-<define name="lineWidth">
- <choice>
- <value>auto</value>
- <value>normal</value>
- <value>bold</value>
- <value>thin</value>
- <value>dash</value>
- <value>medium</value>
- <value>thick</value>
- <ref name="positiveInteger"/>
- <ref name="percent"/>
- <ref name="positiveLength"/>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-underline-color">
- <choice>
- <value>font-color</value>
- <ref name="color"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:font-weight">
- <ref name="fontWeight"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-weight-asian">
- <ref name="fontWeight"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-weight-complex">
- <ref name="fontWeight"/>
- </attribute>
- </optional>
-</define>
-
-<define name="fontWeight">
- <choice>
- <value>normal</value>
- <value>bold</value>
- <value>100</value>
- <value>200</value>
- <value>300</value>
- <value>400</value>
- <value>500</value>
- <value>600</value>
- <value>700</value>
- <value>800</value>
- <value>900</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-underline-mode">
- <ref name="lineMode"/>
- </attribute>
- </optional>
-</define>
-
-<define name="lineMode">
- <choice>
- <value>continuous</value>
- <value>skip-white-space</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-line-through-mode">
- <ref name="lineMode"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:letter-kerning">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-blinking">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-combine">
- <choice>
- <value>none</value>
- <value>letters</value>
- <value>lines</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-combine-start-char">
- <ref name="character"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-combine-end-char">
- <ref name="character"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-emphasize">
- <choice>
- <value>none</value>
- <list>
- <choice>
- <value>none</value>
- <value>accent</value>
- <value>dot</value>
- <value>circle</value>
- <value>disc</value>
- </choice>
- <choice>
- <value>above</value>
- <value>below</value>
- </choice>
- </list>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-scale">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-rotation-angle">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-rotation-scale">
- <choice>
- <value>fixed</value>
- <value>line-height</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:hyphenate">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:hyphenation-remain-char-count">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:hyphenation-push-char-count">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <choice>
- <attribute name="text:display">
- <value>true</value>
- </attribute>
- <attribute name="text:display">
- <value>none</value>
- </attribute>
- <group>
- <attribute name="text:display">
- <value>condition</value>
- </attribute>
- <attribute name="text:condition">
- <value>none</value>
- </attribute>
- </group>
- <empty/>
- </choice>
-</define>
-<define name="style-paragraph-properties">
- <element name="style:paragraph-properties">
- <ref name="style-paragraph-properties-content"/>
- </element>
-</define>
-
-<define name="style-paragraph-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-paragraph-properties-content-strict">
- <ref name="style-paragraph-properties-attlist"/>
- <ref name="style-paragraph-properties-elements"/>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:line-height">
- <choice>
- <value>normal</value>
- <ref name="nonNegativeLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:line-height-at-least">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:line-spacing">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-independent-line-spacing">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-text-align"/>
-</define>
-
-<define name="common-text-align">
- <optional>
- <attribute name="fo:text-align">
- <choice>
- <value>start</value>
- <value>end</value>
- <value>left</value>
- <value>right</value>
- <value>center</value>
- <value>justify</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:text-align-last">
- <choice>
- <value>start</value>
- <value>center</value>
- <value>justify</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:justify-single-word">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:keep-together">
- <choice>
- <value>auto</value>
- <value>always</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:widows">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:orphans">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-elements" combine="interleave">
- <ref name="style-tab-stops"/>
-</define>
-
-<define name="style-tab-stops">
- <optional>
- <element name="style:tab-stops">
- <zeroOrMore>
- <ref name="style-tab-stop"/>
- </zeroOrMore>
- </element>
- </optional>
-</define>
-
-<define name="style-tab-stop">
- <element name="style:tab-stop">
- <ref name="style-tab-stop-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <attribute name="style:position">
- <ref name="nonNegativeLength"/>
- </attribute>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <choice>
- <optional>
- <attribute name="style:type" a:defaultValue="left">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- </choice>
- </attribute>
- </optional>
- <group>
- <attribute name="style:type">
- <value>char</value>
- </attribute>
- <ref name="style-tab-stop-char-attlist"/>
- </group>
- </choice>
-</define>
-<define name="style-tab-stop-char-attlist" combine="interleave">
- <attribute name="style:char">
- <ref name="character"/>
- </attribute>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <optional>
- <attribute name="style:leader-type">
- <ref name="lineType"/>
- </attribute>
- </optional>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <optional>
- <attribute name="style:leader-style">
- <ref name="lineStyle"/>
- </attribute>
- </optional>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <optional>
- <attribute name="style:leader-width">
- <ref name="lineWidth"/>
- </attribute>
- </optional>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <optional>
- <attribute name="style:leader-color">
- <choice>
- <value>font-color</value>
- <ref name="color"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <optional>
- <attribute name="style:leader-text" a:defaultValue=" ">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <optional>
- <attribute name="style:leader-text-style">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:tab-stop-distance">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:hyphenation-keep">
- <choice>
- <value>auto</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:hyphenation-ladder-count">
- <choice>
- <value>no-limit</value>
- <ref name="positiveInteger"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-elements" combine="interleave">
- <ref name="style-drop-cap"/>
-</define>
-
-<define name="style-drop-cap">
- <optional>
- <element name="style:drop-cap">
- <ref name="style-drop-cap-attlist"/>
- <empty/>
- </element>
- </optional>
-</define>
-<define name="style-drop-cap-attlist" combine="interleave">
- <optional>
- <attribute name="style:length" a:defaultValue="1">
- <choice>
- <value>word</value>
- <ref name="positiveInteger"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drop-cap-attlist" combine="interleave">
- <optional>
- <attribute name="style:lines" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drop-cap-attlist" combine="interleave">
- <optional>
- <attribute name="style:distance" a:defaultValue="0cm">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drop-cap-attlist" combine="interleave">
- <optional>
- <attribute name="style:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:register-true">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-horizontal-margin-attlist"/>
-</define>
-
-<define name="common-horizontal-margin-attlist">
- <optional>
- <attribute name="fo:margin-left">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:margin-right">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:text-indent">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:auto-text-indent">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-vertical-margin-attlist"/>
-</define>
-
-<define name="common-vertical-margin-attlist">
- <optional>
- <attribute name="fo:margin-top">
- <choice>
- <ref name="nonNegativeLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:margin-bottom">
- <choice>
- <ref name="nonNegativeLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-margin-attlist"/>
-</define>
-
-<define name="common-margin-attlist">
- <optional>
- <attribute name="fo:margin">
- <choice>
- <ref name="nonNegativeLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-break-attlist"/>
-</define>
-
-<define name="common-break-attlist">
- <optional>
- <attribute name="fo:break-before">
- <choice>
- <value>auto</value>
- <value>column</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:break-after">
- <choice>
- <value>auto</value>
- <value>column</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-
-<define name="common-background-color-attlist">
- <optional>
- <attribute name="fo:background-color">
- <choice>
- <value>transparent</value>
- <ref name="color"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-
-<define name="style-background-image">
- <optional>
- <element name="style:background-image">
- <ref name="style-background-image-attlist"/>
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-binary-data"/>
- <empty/>
- </choice>
- </element>
- </optional>
-</define>
-<define name="style-background-image-attlist" combine="interleave">
- <optional>
- <attribute name="style:repeat" a:defaultValue="repeat">
- <choice>
- <value>no-repeat</value>
- <value>repeat</value>
- <value>stretch</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-background-image-attlist" combine="interleave">
- <optional>
- <attribute name="style:position" a:defaultValue="center">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>top</value>
- <value>bottom</value>
- <list>
- <ref name="horiBackPos"/>
- <ref name="vertBackPos"/>
- </list>
- <list>
- <ref name="vertBackPos"/>
- <ref name="horiBackPos"/>
- </list>
- </choice>
- </attribute>
- </optional>
-</define>
-
-<define name="horiBackPos">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- </choice>
-</define>
-<define name="vertBackPos">
- <choice>
- <value>top</value>
- <value>center</value>
- <value>bottom</value>
- </choice>
-</define>
-<define name="style-background-image-attlist" combine="interleave">
- <optional>
- <attribute name="style:filter-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-background-image-attlist" combine="interleave">
- <optional>
- <attribute name="draw:opacity">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-border-attlist"/>
-</define>
-
-<define name="common-border-attlist">
- <optional>
- <attribute name="fo:border">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:border-top">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:border-bottom">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:border-left">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:border-right">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-border-line-width-attlist"/>
-</define>
-
-<define name="common-border-line-width-attlist">
- <optional>
- <attribute name="style:border-line-width">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:border-line-width-top">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:border-line-width-bottom">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:border-line-width-left">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:border-line-width-right">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
-</define>
-
-<define name="borderWidths">
- <list>
- <ref name="positiveLength"/>
- <ref name="positiveLength"/>
- <ref name="positiveLength"/>
- </list>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-padding-attlist"/>
-</define>
-
-<define name="common-padding-attlist">
- <optional>
- <attribute name="fo:padding">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:padding-top">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:padding-bottom">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:padding-left">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:padding-right">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-shadow-attlist"/>
-</define>
-
-<define name="common-shadow-attlist">
- <optional>
- <attribute name="style:shadow">
- <ref name="shadowType"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-keep-with-next-attlist"/>
-</define>
-
-<define name="common-keep-with-next-attlist">
- <optional>
- <attribute name="fo:keep-with-next">
- <choice>
- <value>auto</value>
- <value>always</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:number-lines" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:line-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-autospace">
- <choice>
- <value>none</value>
- <value>ideograph-alpha</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:punctuation-wrap">
- <choice>
- <value>simple</value>
- <value>hanging</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:line-break">
- <choice>
- <value>normal</value>
- <value>strict</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:vertical-align" a:defaultValue="auto">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- <value>auto</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-writing-mode-attlist"/>
-</define>
-
-<define name="common-writing-mode-attlist">
- <optional>
- <attribute name="style:writing-mode">
- <choice>
- <value>lr-tb</value>
- <value>rl-tb</value>
- <value>tb-rl</value>
- <value>tb-lr</value>
- <value>lr</value>
- <value>rl</value>
- <value>tb</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:writing-mode-automatic">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:snap-to-layout-grid">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-page-number-attlist"/>
-</define>
-
-<define name="common-page-number-attlist">
- <optional>
- <attribute name="style:page-number">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:background-transparency">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-ruby-properties">
- <element name="style:ruby-properties">
- <ref name="style-ruby-properties-content"/>
- </element>
-</define>
-
-<define name="style-ruby-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-ruby-properties-content-strict">
- <ref name="style-ruby-properties-attlist"/>
- <ref name="style-ruby-properties-elements"/>
-</define>
-
-<define name="style-ruby-properties-elements">
- <empty/>
-</define>
-<define name="style-ruby-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:ruby-position">
- <choice>
- <value>above</value>
- <value>below</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-ruby-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:ruby-align">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>distribute-letter</value>
- <value>distribute-space</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-section-properties">
- <element name="style:section-properties">
- <ref name="style-section-properties-content"/>
- </element>
-</define>
-
-<define name="style-section-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-section-properties-content-strict">
- <ref name="style-section-properties-attlist"/>
- <ref name="style-section-properties-elements"/>
-</define>
-<define name="style-section-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-section-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-<define name="style-section-properties-attlist" combine="interleave">
- <ref name="common-horizontal-margin-attlist"/>
-</define>
-<define name="style-section-properties-elements" combine="interleave">
- <ref name="style-columns"/>
-</define>
-
-<define name="style-columns">
- <optional>
- <element name="style:columns">
- <ref name="style-columns-attlist"/>
- <optional>
- <ref name="style-column-sep"/>
- </optional>
- <zeroOrMore>
- <ref name="style-column"/>
- </zeroOrMore>
- </element>
- </optional>
-</define>
-<define name="style-columns-attlist" combine="interleave">
- <attribute name="fo:column-count">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="style-columns-attlist" combine="interleave">
- <optional>
- <attribute name="fo:column-gap">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-column">
- <element name="style:column">
- <ref name="style-column-attlist"/>
- </element>
-</define>
-<define name="style-column-attlist" combine="interleave">
- <attribute name="style:rel-width">
- <ref name="relativeLength"/>
- </attribute>
-</define>
-<define name="style-column-attlist" combine="interleave">
- <optional>
- <attribute name="fo:start-indent" a:defaultValue="0cm">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-column-attlist" combine="interleave">
- <optional>
- <attribute name="fo:end-indent" a:defaultValue="0cm">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-column-attlist" combine="interleave">
- <optional>
- <attribute name="fo:space-before" a:defaultValue="0cm">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-column-attlist" combine="interleave">
- <optional>
- <attribute name="fo:space-after" a:defaultValue="0cm">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-column-sep">
- <element name="style:column-sep">
- <ref name="style-column-sep-attlist"/>
- </element>
-</define>
-<define name="style-column-sep-attlist" combine="interleave">
- <optional>
- <attribute name="style:style" a:defaultValue="solid">
- <choice>
- <value>none</value>
- <value>solid</value>
- <value>dotted</value>
- <value>dashed</value>
- <value>dot-dashed</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-column-sep-attlist" combine="interleave">
- <attribute name="style:width">
- <ref name="length"/>
- </attribute>
-</define>
-<define name="style-column-sep-attlist" combine="interleave">
- <optional>
- <attribute name="style:height" a:defaultValue="100%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-column-sep-attlist" combine="interleave">
- <optional>
- <attribute name="style:vertical-align" a:defaultValue="top">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-column-sep-attlist" combine="interleave">
- <optional>
- <attribute name="style:color" a:defaultValue="#000000">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-section-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:protect" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-section-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:dont-balance-text-columns">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-section-properties-attlist" combine="interleave">
- <ref name="common-writing-mode-attlist"/>
-</define>
-<define name="style-section-properties-elements" combine="interleave">
- <zeroOrMore>
- <ref name="text-notes-configuration"/>
- </zeroOrMore>
-</define>
-<define name="style-table-properties">
- <element name="style:table-properties">
- <ref name="style-table-properties-content"/>
- </element>
-</define>
-
-<define name="style-table-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-table-properties-content-strict">
- <ref name="style-table-properties-attlist"/>
- <ref name="style-table-properties-elements"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:width">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rel-width">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <optional>
- <attribute name="table:align">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>margins</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-horizontal-margin-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-vertical-margin-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-margin-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-page-number-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-break-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-table-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-shadow-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-keep-with-next-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:may-break-between-rows">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <optional>
- <attribute name="table:border-model">
- <choice>
- <value>collapsing</value>
- <value>separating</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-writing-mode-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <optional>
- <attribute name="table:display">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-column-properties">
- <element name="style:table-column-properties">
- <ref name="style-table-column-properties-content"/>
- </element>
-</define>
-
-<define name="style-table-column-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-table-column-properties-content-strict">
- <ref name="style-table-column-properties-attlist"/>
- <ref name="style-table-column-properties-elements"/>
-</define>
-
-<define name="style-table-column-properties-elements">
- <empty/>
-</define>
-<define name="style-table-column-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:column-width">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rel-column-width">
- <ref name="relativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-column-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:use-optimal-column-width">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-column-properties-attlist" combine="interleave">
- <ref name="common-break-attlist"/>
-</define>
-<define name="style-table-row-properties">
- <element name="style:table-row-properties">
- <ref name="style-table-row-properties-content"/>
- </element>
-</define>
-
-<define name="style-table-row-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-table-row-properties-content-strict">
- <ref name="style-table-row-properties-attlist"/>
- <ref name="style-table-row-properties-elements"/>
-</define>
-<define name="style-table-row-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:row-height">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:min-row-height">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-row-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:use-optimal-row-height">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-row-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-table-row-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-<define name="style-table-row-properties-attlist" combine="interleave">
- <ref name="common-break-attlist"/>
-</define>
-<define name="style-table-row-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:keep-together">
- <choice>
- <value>auto</value>
- <value>always</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties">
- <element name="style:table-cell-properties">
- <ref name="style-table-cell-properties-content"/>
- </element>
-</define>
-
-<define name="style-table-cell-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-table-cell-properties-content-strict">
- <ref name="style-table-cell-properties-attlist"/>
- <ref name="style-table-cell-properties-elements"/>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:vertical-align">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- <value>automatic</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-align-source">
- <choice>
- <value>fix</value>
- <value>value-type</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <ref name="common-style-direction-attlist"/>
-</define>
-
-<define name="common-style-direction-attlist">
- <optional>
- <attribute name="style:direction">
- <choice>
- <value>ltr</value>
- <value>ttb</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:glyph-orientation-vertical">
- <choice>
- <value>auto</value>
- <value>0</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <ref name="common-shadow-attlist"/>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-table-cell-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <ref name="common-border-attlist"/>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:diagonal-tl-br">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:diagonal-tl-br-widths">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:diagonal-bl-tr">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:diagonal-bl-tr-widths">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <ref name="common-border-line-width-attlist"/>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <ref name="common-padding-attlist"/>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:wrap-option">
- <choice>
- <value>no-wrap</value>
- <value>wrap</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <ref name="common-rotation-angle-attlist"/>
-</define>
-
-<define name="common-rotation-angle-attlist">
- <optional>
- <attribute name="style:rotation-angle">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:rotation-align">
- <choice>
- <value>none</value>
- <value>bottom</value>
- <value>top</value>
- <value>center</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:cell-protect">
- <choice>
- <value>none</value>
- <value>hidden-and-protected</value>
- <list>
- <oneOrMore>
- <choice>
- <value>protected</value>
- <value>formula-hidden</value>
- </choice>
- </oneOrMore>
- </list>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:print-content">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:decimal-places">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:repeat-content">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:shrink-to-fit">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-list-level-properties">
- <element name="style:list-level-properties">
- <ref name="style-list-level-properties-content"/>
- </element>
-</define>
-
-<define name="style-list-level-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-list-level-properties-content-strict">
- <ref name="style-list-level-properties-attlist"/>
- <ref name="style-list-level-properties-elements"/>
-</define>
-
-<define name="style-list-level-properties-elements">
- <empty/>
-</define>
-<define name="style-list-level-properties-attlist" combine="interleave">
- <ref name="common-text-align"/>
-</define>
-<define name="style-list-level-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:space-before">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-list-level-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:min-label-width">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-list-level-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:min-label-distance">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-list-level-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-list-level-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:width">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:height">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-list-level-properties-attlist" combine="interleave">
- <ref name="common-vertical-rel-attlist"/>
- <ref name="common-vertical-pos-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:stroke">
- <choice>
- <value>none</value>
- <value>dash</value>
- <value>solid</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:stroke-dash">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:stroke-dash-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="svg:stroke-width">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="svg:stroke-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:marker-start">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:marker-end">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:marker-start-width">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:marker-end-width">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:marker-start-center">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:marker-end-center">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="svg:stroke-opacity">
- <choice>
- <data type="double">
- <param name="minInclusive">0</param>
- <param name="maxInclusive">1</param>
- </data>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:stroke-linejoin">
- <choice>
- <value>miter</value>
- <value>round</value>
- <value>bevel</value>
- <value>middle</value>
- <value>none</value>
- <value>inherit</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill">
- <choice>
- <value>none</value>
- <value>solid</value>
- <value>bitmap</value>
- <value>gradient</value>
- <value>hatch</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:secondary-fill-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill-gradient-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:gradient-step-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill-hatch-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill-hatch-solid">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill-image-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:repeat">
- <choice>
- <value>no-repeat</value>
- <value>repeat</value>
- <value>stretch</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill-image-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-image-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill-image-ref-point-x">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-image-ref-point-y">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-image-ref-point">
- <choice>
- <value>top-left</value>
- <value>top</value>
- <value>top-right</value>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>bottom-left</value>
- <value>bottom</value>
- <value>bottom-right</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:tile-repeat-offset"/>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:opacity">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:opacity-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="svg:fill-rule">
- <choice>
- <value>nonzero</value>
- <value>evenodd</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:symbol-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:animation">
- <choice>
- <value>none</value>
- <value>scroll</value>
- <value>alternate</value>
- <value>slide</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:animation-direction">
- <choice>
- <value>left</value>
- <value>right</value>
- <value>up</value>
- <value>down</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:animation-start-inside">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:animation-stop-inside">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:animation-repeat">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:animation-delay">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:animation-steps">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:auto-grow-width">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:auto-grow-height">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fit-to-size">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fit-to-contour">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:textarea-vertical-align">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- <value>justify</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:textarea-horizontal-align">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>justify</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:wrap-option">
- <choice>
- <value>no-wrap</value>
- <value>wrap</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-elements" combine="interleave">
- <optional>
- <ref name="text-list-style"/>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:color-mode">
- <choice>
- <value>greyscale</value>
- <value>mono</value>
- <value>watermark</value>
- <value>standard</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:color-inversion">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:luminance">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:contrast">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:gamma">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:red">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:green">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:blue">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:image-opacity">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:shadow">
- <choice>
- <value>visible</value>
- <value>hidden</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:shadow-offset-x">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:shadow-offset-y">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:shadow-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:shadow-opacity">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start-line-spacing-horizontal">
- <ref name="distance"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:start-line-spacing-vertical">
- <ref name="distance"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:end-line-spacing-horizontal">
- <ref name="distance"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end-line-spacing-vertical">
- <ref name="distance"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:line-distance">
- <ref name="distance"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:guide-overhang">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:guide-distance">
- <ref name="distance"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start-guide">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:end-guide">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:placing">
- <choice>
- <value>below</value>
- <value>above</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:parallel">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:measure-align">
- <choice>
- <value>automatic</value>
- <value>left-outside</value>
- <value>inside</value>
- <value>right-outside</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:measure-vertical-align">
- <choice>
- <value>automatic</value>
- <value>above</value>
- <value>below</value>
- <value>center</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:unit">
- <choice>
- <value>automatic</value>
- <value>mm</value>
- <value>cm</value>
- <value>m</value>
- <value>km</value>
- <value>pt</value>
- <value>pc</value>
- <value>inch</value>
- <value>ft</value>
- <value>mi</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:show-unit">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:decimal-places">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-type">
- <choice>
- <value>straight-line</value>
- <value>angled-line</value>
- <value>angled-connector-line</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-angle-type">
- <choice>
- <value>fixed</value>
- <value>free</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-angle">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-gap">
- <ref name="distance"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-escape-direction">
- <choice>
- <value>horizontal</value>
- <value>vertical</value>
- <value>auto</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-escape">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-line-length">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-fit-line-length">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:horizontal-segments">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:vertical-segments">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:edge-rounding">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:edge-rounding-mode">
- <choice>
- <value>correct</value>
- <value>attractive</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:back-scale">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:depth">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:backface-culling">
- <choice>
- <value>enabled</value>
- <value>disabled</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:end-angle">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:close-front">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:close-back">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:lighting-mode">
- <choice>
- <value>standard</value>
- <value>double-sided</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:normals-kind">
- <choice>
- <value>object</value>
- <value>flat</value>
- <value>sphere</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:normals-direction">
- <choice>
- <value>normal</value>
- <value>inverse</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:texture-generation-mode-x">
- <choice>
- <value>object</value>
- <value>parallel</value>
- <value>sphere</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:texture-generation-mode-y">
- <choice>
- <value>object</value>
- <value>parallel</value>
- <value>sphere</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:texture-kind">
- <choice>
- <value>luminance</value>
- <value>intesity</value>
- <value>color</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:texture-filter">
- <choice>
- <value>enabled</value>
- <value>disabled</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:texture-mode">
- <choice>
- <value>replace</value>
- <value>modulate</value>
- <value>blend</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:ambient-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:emissive-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:specular-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:diffuse-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:shininess">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:shadow">
- <choice>
- <value>visible</value>
- <value>hidden</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-draw-rel-size-attlist"/>
- <optional>
- <attribute name="fo:min-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:min-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:max-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:max-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-horizontal-margin-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-vertical-margin-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-margin-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:print-content">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:protect">
- <choice>
- <value>none</value>
- <list>
- <oneOrMore>
- <choice>
- <value>content</value>
- <value>position</value>
- <value>size</value>
- </choice>
- </oneOrMore>
- </list>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:horizontal-pos">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>from-left</value>
- <value>inside</value>
- <value>outside</value>
- <value>from-inside</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:x">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:horizontal-rel">
- <choice>
- <value>page</value>
- <value>page-content</value>
- <value>page-start-margin</value>
- <value>page-end-margin</value>
- <value>frame</value>
- <value>frame-content</value>
- <value>frame-start-margin</value>
- <value>frame-end-margin</value>
- <value>paragraph</value>
- <value>paragraph-content</value>
- <value>paragraph-start-margin</value>
- <value>paragraph-end-margin</value>
- <value>char</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-vertical-pos-attlist"/>
-</define>
-
-<define name="common-vertical-pos-attlist">
- <optional>
- <attribute name="style:vertical-pos">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- <value>from-top</value>
- <value>below</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-vertical-rel-attlist"/>
-</define>
-
-<define name="common-vertical-rel-attlist">
- <optional>
- <attribute name="style:vertical-rel">
- <choice>
- <value>page</value>
- <value>page-content</value>
- <value>frame</value>
- <value>frame-content</value>
- <value>paragraph</value>
- <value>paragraph-content</value>
- <value>char</value>
- <value>line</value>
- <value>baseline</value>
- <value>text</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-text-anchor-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-border-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-border-line-width-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-padding-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-shadow-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-graphic-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-<define name="style-graphic-properties-elements" combine="interleave">
- <ref name="style-columns"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:editable">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:wrap">
- <choice>
- <value>none</value>
- <value>left</value>
- <value>right</value>
- <value>parallel</value>
- <value>dynamic</value>
- <value>run-through</value>
- <value>biggest</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:wrap-dynamic-treshold">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:number-wrapped-paragraphs">
- <choice>
- <value>no-limit</value>
- <ref name="positiveInteger"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:wrap-contour">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:wrap-contour-mode">
- <choice>
- <value>full</value>
- <value>outside</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:run-through">
- <choice>
- <value>foreground</value>
- <value>background</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:flow-with-text">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:overflow-behavior">
- <choice>
- <value>clip</value>
- <value>auto-create-new-frame</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:mirror">
- <choice>
- <value>none</value>
- <value>vertical</value>
- <ref name="horizontal-mirror"/>
- <list>
- <value>vertical</value>
- <ref name="horizontal-mirror"/>
- </list>
- <list>
- <ref name="horizontal-mirror"/>
- <value>vertical</value>
- </list>
- </choice>
- </attribute>
- </optional>
-</define>
-
-<define name="horizontal-mirror">
- <choice>
- <value>horizontal</value>
- <value>horizontal-on-odd</value>
- <value>horizontal-on-even</value>
- </choice>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:clip">
- <!-- The attribute value must match the one XSL's clip -->
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:wrap-influence-on-position"
- a:defaultValue="iterative">
- <choice>
- <value>iterative</value>
- <value>once-concurrent</value>
- <value>once-successive</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:frame-display-scrollbar">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:frame-display-border">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:frame-margin-horizontal">
- <ref name="nonNegativePixelLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:frame-margin-vertical">
- <ref name="nonNegativePixelLength"/>
- </attribute>
- </optional>
-</define>
-
-<define name="nonNegativePixelLength">
- <data type="string">
- <param name="pattern">([0-9]+(\.[0-9]*)?|\.[0-9]+)(px)</param>
- </data>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:visible-area-left">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:visible-area-top">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:visible-area-width">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:visible-area-height">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:ole-draw-aspect">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties">
- <element name="style:chart-properties">
- <ref name="style-chart-properties-content"/>
- </element>
-</define>
-
-<define name="style-chart-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-chart-properties-content-strict">
- <ref name="style-chart-properties-attlist"/>
- <ref name="style-chart-properties-elements"/>
-</define>
-
-<define name="style-chart-properties-elements">
- <empty/>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:scale-text" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:three-dimensional">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:deep">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <choice>
- <attribute name="chart:symbol-type">
- <value>none</value>
- </attribute>
- <attribute name="chart:symbol-type">
- <value>automatic</value>
- </attribute>
- <group>
- <attribute name="chart:symbol-type">
- <value>named-symbol</value>
- </attribute>
- <attribute name="chart:symbol-name">
- <choice>
- <value>square</value>
- <value>diamond</value>
- <value>arrow-down</value>
- <value>arrow-up</value>
- <value>arrow-right</value>
- <value>arrow-left</value>
- <value>bow-tie</value>
- <value>hourglass</value>
- <value>circle</value>
- <value>star</value>
- <value>x</value>
- <value>plus</value>
- <value>asterisk</value>
- <value>horizontal-bar</value>
- <value>vertical-bar</value>
- </choice>
- </attribute>
- </group>
- <group>
- <attribute name="chart:symbol-type">
- <value>image</value>
- </attribute>
- <element name="chart:symbol-image">
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- </element>
- </group>
- <empty/>
- </choice>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:symbol-width">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:symbol-height">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:vertical" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:connect-bars" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:gap-width">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:overlap">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:japanese-candle-stick"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:interpolation" a:defaultValue="none">
- <choice>
- <value>none</value>
- <value>cubic-spline</value>
- <value>b-spline</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:spline-order" a:defaultValue="2">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:spline-resolution" a:defaultValue="20">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:pie-offset" a:defaultValue="0">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:lines" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:solid-type" a:defaultValue="cuboid">
- <choice>
- <value>cuboid</value>
- <value>cylinder</value>
- <value>cone</value>
- <value>pyramid</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:stacked" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:percentage" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:link-data-style-to-source">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:visible">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:logarithmic">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:maximum">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:minimum">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:origin">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:interval-major">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:interval-minor">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:tick-marks-major-inner">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:tick-marks-major-outer">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:tick-marks-minor-inner">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:tick-marks-minor-outer">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:display-label">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:text-overlap">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:line-break">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:label-arrangement"
- a:defaultValue="side-by-side">
- <choice>
- <value>side-by-side</value>
- <value>stagger-even</value>
- <value>stagger-odd</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <ref name="common-style-direction-attlist"/>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <ref name="common-rotation-angle-attlist"/>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:data-label-number">
- <choice>
- <value>none</value>
- <value>value</value>
- <value>percentage</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:data-label-text">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:data-label-symbol">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:mean-value">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:error-category" a:defaultValue="none">
- <choice>
- <value>none</value>
- <value>variance</value>
- <value>standard-deviation</value>
- <value>percentage</value>
- <value>error-margin</value>
- <value>constant</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:error-percentage">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:error-margin">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:error-lower-limit">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:error-upper-limit">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:error-upper-indicator">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:error-lower-indicator">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:series-source" a:defaultValue="columns">
- <choice>
- <value>columns</value>
- <value>rows</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:regression-type" a:defaultValue="none">
- <choice>
- <value>none</value>
- <value>linear</value>
- <value>logarithmic</value>
- <value>exponential</value>
- <value>power</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="presentation:transition-type">
- <choice>
- <value>manual</value>
- <value>automatic</value>
- <value>semi-automatic</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="presentation:transition-style">
- <choice>
- <value>none</value>
- <value>fade-from-left</value>
- <value>fade-from-top</value>
- <value>fade-from-right</value>
- <value>fade-from-bottom</value>
- <value>fade-from-upperleft</value>
- <value>fade-from-upperright</value>
- <value>fade-from-lowerleft</value>
- <value>fade-from-lowerright</value>
- <value>move-from-left</value>
- <value>move-from-top</value>
- <value>move-from-right</value>
- <value>move-from-bottom</value>
- <value>move-from-upperleft</value>
- <value>move-from-upperright</value>
- <value>move-from-lowerleft</value>
- <value>move-from-lowerright</value>
- <value>uncover-to-left</value>
- <value>uncover-to-top</value>
- <value>uncover-to-right</value>
- <value>uncover-to-bottom</value>
- <value>uncover-to-upperleft</value>
- <value>uncover-to-upperright</value>
- <value>uncover-to-lowerleft</value>
- <value>uncover-to-lowerright</value>
- <value>fade-to-center</value>
- <value>fade-from-center</value>
- <value>vertical-stripes</value>
- <value>horizontal-stripes</value>
- <value>clockwise</value>
- <value>counterclockwise</value>
- <value>open-vertical</value>
- <value>open-horizontal</value>
- <value>close-vertical</value>
- <value>close-horizontal</value>
- <value>wavyline-from-left</value>
- <value>wavyline-from-top</value>
- <value>wavyline-from-right</value>
- <value>wavyline-from-bottom</value>
- <value>spiralin-left</value>
- <value>spiralin-right</value>
- <value>spiralout-left</value>
- <value>spiralout-right</value>
- <value>roll-from-top</value>
- <value>roll-from-left</value>
- <value>roll-from-right</value>
- <value>roll-from-bottom</value>
- <value>stretch-from-left</value>
- <value>stretch-from-top</value>
- <value>stretch-from-right</value>
- <value>stretch-from-bottom</value>
-
- <value>vertical-lines</value>
- <value>horizontal-lines</value>
- <value>dissolve</value>
- <value>random</value>
- <value>vertical-checkerboard</value>
- <value>horizontal-checkerboard</value>
- <value>interlocking-horizontal-left</value>
- <value>interlocking-horizontal-right</value>
- <value>interlocking-vertical-top</value>
- <value>interlocking-vertical-bottom</value>
- <value>fly-away</value>
- <value>open</value>
- <value>close</value>
- <value>melt</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="presentation:transition-speed">
- <ref name="presentationSpeeds"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist " combine="interleave">
- <optional>
- <attribute name="smil:type">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist" combine="interleave">
- <optional>
- <attribute name="smil:subtype">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist" combine="interleave">
- <optional>
- <attribute name="smil:direction" a:defaultValue="forward">
- <choice>
- <value>forward</value>
- <value>reverse</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist" combine="interleave">
- <optional>
- <attribute name="smil:fadeColor">
- <choice>
- <value>forward</value>
- <value>reverse</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="presentation:duration">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="presentation:visibility">
- <choice>
- <value>visible</value>
- <value>hidden</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-elements"
- combine="interleave">
- <optional>
- <ref name="presentation-sound"/>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="draw:background-size">
- <choice>
- <value>full</value>
- <value>border</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="presentation:background-objects-visible">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="presentation:background-visible">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:display-header">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:display-footer">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:display-page-number">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:display-date-time">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="string">
- <data type="string"/>
-</define>
-<define name="date">
- <data type="date"/>
-</define>
-<define name="time">
- <data type="time"/>
-</define>
-<define name="dateTime">
- <data type="dateTime"/>
-</define>
-<define name="duration">
- <data type="duration"/>
-</define>
-<define name="integer">
- <data type="integer"/>
-</define>
-<define name="nonNegativeInteger">
- <data type="nonNegativeInteger"/>
-</define>
-<define name="positiveInteger">
- <data type="positiveInteger"/>
-</define>
-<define name="double">
- <data type="double"/>
-</define>
-<define name="anyURI">
- <data type="anyURI"/>
-</define>
-<define name="base64Binary">
- <data type="base64Binary"/>
-</define>
-<define name="ID">
- <data type="ID"/>
-</define>
-<define name="IDREF">
- <data type="IDREF"/>
-</define>
-<define name="boolean">
- <choice>
- <value>true</value>
- <value>false</value>
- </choice>
-</define>
-<define name="dateOrDateTime">
- <choice>
- <data type="date"/>
- <data type="dateTime"/>
- </choice>
-</define>
-<define name="timeOrDateTime">
- <choice>
- <data type="time"/>
- <data type="dateTime"/>
- </choice>
-</define>
-<define name="language">
- <data type="token">
- <param name="pattern">[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*</param>
- </data>
-</define>
-<define name="countryCode">
- <data type="token">
- <param name="pattern">[A-Za-z0-9]{1,8}</param>
- </data>
-</define>
-<define name="languageCode">
- <data type="token">
- <param name="pattern">[A-Za-z]{1,8}</param>
- </data>
-</define>
-<define name="character">
- <data type="string">
- <param name="length">1</param>
- </data>
-</define>
-<define name="length">
- <data type="string">
- <param name="pattern">-?([0-9]+(\.[0-9]*)?|\.[0-9]+)((cm)|(mm)|(in)|(pt)|(pc)|(px))</param>
-
- </data>
-</define>
-<define name="nonNegativeLength">
- <data type="string">
- <param name="pattern">([0-9]+(\.[0-9]*)?|\.[0-9]+)((cm)|(mm)|(in)|(pt)|(pc)|(px))</param>
-
- </data>
-</define>
-<define name="positiveLength">
- <data type="string">
- <!-- A zero value is not allowed here -->
- <param name="pattern">([0-9]+(\.[0-9]*)?|\.[0-9]+)((cm)|(mm)|(in)|(pt)|(pc)|(px))</param>
-
- </data>
-</define>
-<define name="percent">
- <data type="string">
- <param name="pattern">-?([0-9]+(\.[0-9]*)?|\.[0-9]+)%</param>
- </data>
-</define>
-<define name="relativeLength">
- <data type="string">
- <param name="pattern">[0-9]+\*</param>
- </data>
-</define>
-<define name="coordinate">
- <ref name="length"/>
-</define>
-<define name="distance">
- <ref name="length"/>
-</define>
-<define name="color">
- <data type="string">
- <param name="pattern">#[0-9a-fA-F]{6}</param>
- </data>
-</define>
-<define name="styleName">
- <data type="NCName"/>
-</define>
-<define name="styleNameRef">
- <choice>
- <data type="NCName"/>
- <empty/>
- </choice>
-</define>
-<define name="styleNameRefs">
- <list>
- <zeroOrMore>
- <data type="NCName"/>
- </zeroOrMore>
- </list>
-</define>
-<define name="variableName">
- <data type="string"/>
-</define>
-<define name="formula">
- <!-- A formula should start with a namespace prefix, -->
- <!-- but has no restrictions-->
- <data type="string"/>
-</define>
-
-<define name="targetFrameName">
- <choice>
- <value>_self</value>
- <value>_blank</value>
- <value>_parent</value>
- <value>_top</value>
- <ref name="string"/>
- </choice>
-</define>
-
-<define name="valueType">
- <choice>
- <value>float</value>
- <value>time</value>
- <value>date</value>
- <value>percentage</value>
- <value>currency</value>
- <value>boolean</value>
- <value>string</value>
- </choice>
-</define>
-
-<define name="points">
- <data type="string">
- <param name="pattern">-?[0-9]+,-?[0-9]+([ ]+-?[0-9]+,-?[0-9]+)*</param>
- </data>
-</define>
-<define name="pathData">
- <data type="string"/>
-</define>
-
-<define name="vector3D">
- <data type="string">
- <param name="pattern">\([ ]*-?([0-9]+(\.[0-9]*)?|\.[0-9]+)([ ]+-?([0-9]+(\.[0-9]*)?|\.[0-9]+)){2}[ ]*\)</param>
-
- </data>
-</define>
-
-<define name="namespacedToken">
- <data type="string">
- <param name="pattern">[0-9a-zA-Z_]+:[0-9a-zA-Z._\-]+</param>
- </data>
-</define>
-<define name="anyAttListOrElements">
- <zeroOrMore>
- <attribute>
- <anyName/>
- <text/>
- </attribute>
- </zeroOrMore>
- <ref name="anyElements"/>
-</define>
-<define name="anyElements">
- <zeroOrMore>
- <element>
- <anyName/>
- <mixed>
- <ref name="anyAttListOrElements"/>
- </mixed>
- </element>
- </zeroOrMore>
-</define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-schema-v1.1.rng b/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-schema-v1.1.rng
deleted file mode 100644
index 3ba6a687c49..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-schema-v1.1.rng
+++ /dev/null
@@ -1,17891 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- OASIS OpenDocument v1.1
- OASIS Standard, 1 Feb 2007
- Relax-NG Schema
-
- $Id$
-
- © 2002-2007 OASIS Open
- © 1999-2007 Sun Microsystems, Inc.
--->
-
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
-
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
-
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
- xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
- xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
- xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
- xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
- xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
- xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
- xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
- xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
-
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:math="http://www.w3.org/1998/Math/MathML"
- xmlns:xforms="http://www.w3.org/2002/xforms"
-
- xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
- xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
- xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"
->
-<define name="office-process-content">
- <optional>
- <attribute name="office:process-content" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<start>
- <choice>
- <ref name="office-document"/>
- <ref name="office-document-content"/>
- <ref name="office-document-styles"/>
- <ref name="office-document-meta"/>
- <ref name="office-document-settings"/>
- </choice>
-</start>
-<define name="office-document">
- <element name="office:document">
- <ref name="office-document-attrs"/>
- <ref name="office-document-common-attrs"/>
- <ref name="office-meta"/>
- <ref name="office-settings"/>
- <ref name="office-scripts"/>
- <ref name="office-font-face-decls"/>
- <ref name="office-styles"/>
- <ref name="office-automatic-styles"/>
- <ref name="office-master-styles"/>
- <ref name="office-body"/>
- </element>
-</define>
-<define name="office-document-content">
- <element name="office:document-content">
- <ref name="office-document-common-attrs"/>
- <ref name="office-scripts"/>
- <ref name="office-font-face-decls"/>
- <ref name="office-automatic-styles"/>
- <ref name="office-body"/>
- </element>
-</define>
-<define name="office-document-styles">
- <element name="office:document-styles">
- <ref name="office-document-common-attrs"/>
- <ref name="office-font-face-decls"/>
- <ref name="office-styles"/>
- <ref name="office-automatic-styles"/>
- <ref name="office-master-styles"/>
- </element>
-</define>
-<define name="office-document-meta">
- <element name="office:document-meta">
- <ref name="office-document-common-attrs"/>
- <ref name="office-meta"/>
- </element>
-</define>
-<define name="office-document-settings">
- <element name="office:document-settings">
- <ref name="office-document-common-attrs"/>
- <ref name="office-settings"/>
- </element>
-</define>
-<define name="office-document-common-attrs" combine="interleave">
- <optional>
- <attribute name="office:version">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="office-document-attrs" combine="interleave">
- <attribute name="office:mimetype">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="office-meta">
- <optional>
- <element name="office:meta">
- <ref name="office-meta-content"/>
- </element>
- </optional>
-</define>
-
-<define name="office-meta-content">
- <ref name="anyElements"/>
-</define>
-
-<define name="office-meta-content-strict">
- <zeroOrMore>
- <ref name="office-meta-data"/>
- </zeroOrMore>
-</define>
-<define name="office-body">
- <element name="office:body">
- <ref name="office-body-content"/>
- </element>
-</define>
-<define name="office-body-content" combine="choice">
- <element name="office:text">
- <ref name="office-text-attlist"/>
- <ref name="office-text-content-prelude"/>
- <zeroOrMore>
- <ref name="office-text-content-main"/>
- </zeroOrMore>
- <ref name="office-text-content-epilogue"/>
- </element>
-</define>
-<define name="office-text-content-prelude">
- <ref name="office-forms"/>
- <ref name="text-tracked-changes"/>
- <ref name="text-decls"/>
- <ref name="table-decls"/>
-</define>
-<define name="office-text-content-main">
- <choice>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- <group>
- <ref name="text-page-sequence"/>
- <zeroOrMore>
- <choice>
- <ref name="draw-a"/>
- <ref name="shape"/>
- </choice>
- </zeroOrMore>
- </group>
- </choice>
-</define>
-
-<define name="text-content">
- <choice>
- <ref name="text-h"/>
- <ref name="text-p"/>
- <ref name="text-list"/>
- <ref name="text-numbered-paragraph"/>
- <ref name="table-table"/>
- <ref name="draw-a"/>
- <ref name="text-section"/>
- <ref name="text-soft-page-break"/>
- <ref name="text-table-of-content"/>
- <ref name="text-illustration-index"/>
- <ref name="text-table-index"/>
- <ref name="text-object-index"/>
- <ref name="text-user-index"/>
- <ref name="text-alphabetical-index"/>
- <ref name="text-bibliography"/>
- <ref name="shape"/>
- <ref name="change-marks"/>
- </choice>
-</define>
-<define name="office-text-content-epilogue">
- <ref name="table-functions"/>
-</define>
-<define name="office-text-attlist" combine="interleave">
- <optional>
- <attribute name="text:global" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="office-text-attlist" combine="interleave">
- <optional>
- <attribute name="text:use-soft-page-breaks" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="office-body-content" combine="choice">
- <element name="office:drawing">
- <ref name="office-drawing-attlist"/>
- <ref name="office-drawing-content-prelude"/>
- <ref name="office-drawing-content-main"/>
- <ref name="office-drawing-content-epilogue"/>
- </element>
-</define>
-
-<define name="office-drawing-attlist">
- <empty/>
-</define>
-<define name="office-drawing-content-prelude">
- <ref name="text-decls"/>
- <ref name="table-decls"/>
-</define>
-<define name="office-drawing-content-main">
- <zeroOrMore>
- <ref name="draw-page"/>
- </zeroOrMore>
-</define>
-<define name="office-drawing-content-epilogue">
- <ref name="table-functions"/>
-</define>
-<define name="office-body-content" combine="choice">
- <element name="office:presentation">
- <ref name="office-presentation-attlist"/>
- <ref name="office-presentation-content-prelude"/>
- <ref name="office-presentation-content-main"/>
- <ref name="office-presentation-content-epilogue"/>
- </element>
-</define>
-
-<define name="office-presentation-attlist">
- <empty/>
-</define>
-<define name="office-presentation-content-prelude">
- <ref name="text-decls"/>
- <ref name="table-decls"/>
- <ref name="presentation-decls"/>
-</define>
-<define name="office-presentation-content-main">
- <zeroOrMore>
- <ref name="draw-page"/>
- </zeroOrMore>
-</define>
-<define name="office-presentation-content-epilogue">
- <ref name="presentation-settings"/>
- <ref name="table-functions"/>
-</define>
-<define name="office-body-content" combine="choice">
- <element name="office:spreadsheet">
- <ref name="office-spreadsheet-attlist"/>
- <ref name="office-spreadsheet-content-prelude"/>
- <ref name="office-spreadsheet-content-main"/>
- <ref name="office-spreadsheet-content-epilogue"/>
- </element>
-</define>
-<define name="office-spreadsheet-content-prelude">
- <optional>
- <ref name="table-tracked-changes"/>
- </optional>
- <ref name="text-decls"/>
- <ref name="table-decls"/>
-</define>
-
-<define name="table-decls">
- <optional>
- <ref name="table-calculation-settings"/>
- </optional>
- <optional>
- <ref name="table-content-validations"/>
- </optional>
- <optional>
- <ref name="table-label-ranges"/>
- </optional>
-</define>
-<define name="office-spreadsheet-content-main">
- <zeroOrMore>
- <ref name="table-table"/>
- </zeroOrMore>
-</define>
-<define name="office-spreadsheet-content-epilogue">
- <ref name="table-functions"/>
-</define>
-
-<define name="table-functions">
- <optional>
- <ref name="table-named-expressions"/>
- </optional>
- <optional>
- <ref name="table-database-ranges"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-tables"/>
- </optional>
- <optional>
- <ref name="table-consolidation"/>
- </optional>
- <optional>
- <ref name="table-dde-links"/>
- </optional>
-</define>
-<define name="office-body-content" combine="choice">
- <element name="office:chart">
- <ref name="office-chart-attlist"/>
- <ref name="office-chart-content-prelude"/>
- <ref name="office-chart-content-main"/>
- <ref name="office-chart-content-epilogue"/>
- </element>
-</define>
-
-<define name="office-chart-attlist">
- <empty/>
-</define>
-<define name="office-chart-content-prelude">
- <ref name="text-decls"/>
- <ref name="table-decls"/>
-</define>
-<define name="office-chart-content-main">
- <ref name="chart-chart"/>
-</define>
-<define name="office-chart-content-epilogue">
- <ref name="table-functions"/>
-</define>
-<define name="office-body-content" combine="choice">
- <element name="office:image">
- <ref name="office-image-attlist"/>
- <ref name="office-image-content-prelude"/>
- <ref name="office-image-content-main"/>
- <ref name="office-image-content-epilogue"/>
- </element>
-</define>
-
-<define name="office-image-attlist">
- <empty/>
-</define>
-<define name="office-image-content-prelude">
- <empty/>
-</define>
-<define name="office-image-content-main">
- <ref name="draw-frame"/>
-</define>
-<define name="office-image-content-epilogue">
- <empty/>
-</define>
-<define name="office-settings">
- <optional>
- <element name="office:settings">
- <oneOrMore>
- <ref name="config-config-item-set"/>
- </oneOrMore>
- </element>
- </optional>
-</define>
-<define name="config-config-item-set">
- <element name="config:config-item-set">
- <ref name="config-config-item-set-attlist"/>
- <ref name="config-items"/>
- </element>
-</define>
-
-<define name="config-items">
- <oneOrMore>
- <choice>
- <ref name="config-config-item"/>
- <ref name="config-config-item-set"/>
- <ref name="config-config-item-map-named"/>
- <ref name="config-config-item-map-indexed"/>
- </choice>
- </oneOrMore>
-</define>
-<define name="config-config-item-set-attlist" combine="interleave">
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="config-config-item">
- <element name="config:config-item">
- <ref name="config-config-item-attlist"/>
- <text/>
- </element>
-</define>
-<define name="config-config-item-attlist" combine="interleave">
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="config-config-item-attlist" combine="interleave">
- <attribute name="config:type">
- <choice>
- <value>boolean</value>
- <value>short</value>
- <value>int</value>
- <value>long</value>
- <value>double</value>
- <value>string</value>
- <value>datetime</value>
- <value>base64Binary</value>
- </choice>
- </attribute>
-</define>
-<define name="config-config-item-map-indexed">
- <element name="config:config-item-map-indexed">
- <ref name="config-config-item-map-indexed-attlist"/>
- <oneOrMore>
- <ref name="config-config-item-map-entry"/>
- </oneOrMore>
- </element>
-</define>
-<define name="config-config-item-map-indexed-attlist" combine="interleave">
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="config-config-item-map-entry">
- <element name="config:config-item-map-entry">
- <ref name="config-config-item-map-entry-attlist"/>
- <ref name="config-items"/>
- </element>
-</define>
-<define name="config-config-item-map-entry-attlist" combine="interleave">
- <optional>
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="config-config-item-map-named">
- <element name="config:config-item-map-named">
- <ref name="config-config-item-map-named-attlist"/>
- <oneOrMore>
- <ref name="config-config-item-map-entry"/>
- </oneOrMore>
- </element>
-</define>
-<define name="config-config-item-map-named-attlist" combine="interleave">
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="office-scripts">
- <optional>
- <element name="office:scripts">
- <zeroOrMore>
- <ref name="office-script"/>
- </zeroOrMore>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </element>
- </optional>
-</define>
-<define name="office-script">
- <element name="office:script">
- <ref name="office-script-attlist"/>
- <mixed>
- <ref name="anyElements"/>
- </mixed>
- </element>
-</define>
-<define name="office-script-attlist">
- <attribute name="script:language">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="office-font-face-decls">
- <optional>
- <element name="office:font-face-decls">
- <zeroOrMore>
- <ref name="style-font-face"/>
- </zeroOrMore>
- </element>
- </optional>
-</define>
-<define name="office-styles">
- <optional>
- <element name="office:styles">
- <interleave>
- <ref name="styles"/>
- <zeroOrMore>
- <ref name="style-default-style"/>
- </zeroOrMore>
- <optional>
- <ref name="text-outline-style"/>
- </optional>
- <zeroOrMore>
- <ref name="text-notes-configuration"/>
- </zeroOrMore>
- <optional>
- <ref name="text-bibliography-configuration"/>
- </optional>
- <optional>
- <ref name="text-linenumbering-configuration"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-gradient"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="svg-linearGradient"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="svg-radialGradient"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-hatch"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-fill-image"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-marker"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-stroke-dash"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-opacity"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="style-presentation-page-layout"/>
- </zeroOrMore>
- </interleave>
- </element>
- </optional>
-</define>
-<define name="office-automatic-styles">
- <optional>
- <element name="office:automatic-styles">
- <interleave>
- <ref name="styles"/>
- <zeroOrMore>
- <ref name="style-page-layout"/>
- </zeroOrMore>
- </interleave>
- </element>
- </optional>
-</define>
-<define name="office-master-styles">
- <optional>
- <element name="office:master-styles">
- <interleave>
- <zeroOrMore>
- <ref name="style-master-page"/>
- </zeroOrMore>
- <optional>
- <ref name="style-handout-master"/>
- </optional>
- <optional>
- <ref name="draw-layer-set"/>
- </optional>
- </interleave>
- </element>
- </optional>
-</define>
-
-<define name="styles">
- <interleave>
- <zeroOrMore>
- <ref name="style-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="text-list-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-number-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-currency-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-percentage-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-date-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-time-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-boolean-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-text-style"/>
- </zeroOrMore>
- </interleave>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:generator">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="dc:title">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="dc:description">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="dc:subject">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:keyword">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:initial-creator">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <ref name="dc-creator"/>
-</define>
-<define name="dc-creator">
- <element name="dc:creator">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:printed-by">
- <ref name="string"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:creation-date">
- <ref name="dateTime"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <ref name="dc-date"/>
-</define>
-<define name="dc-date">
- <element name="dc:date">
- <ref name="dateTime"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:print-date">
- <ref name="dateTime"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:template">
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <value>onRequest</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:title">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:date">
- <ref name="dateTime"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:auto-reload">
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show" a:defaultValue="replace">
- <value>replace</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onLoad">
- <value>onLoad</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:delay">
- <ref name="duration"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:hyperlink-behaviour">
- <optional>
- <attribute name="office:target-frame-name">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="dc:language">
- <ref name="language"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:editing-cycles">
- <ref name="nonNegativeInteger"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:editing-duration">
- <ref name="duration"/>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:document-statistic">
- <optional>
- <attribute name="meta:page-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:table-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:draw-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:image-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:ole-object-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:object-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:paragraph-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:word-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:character-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="frame-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="sentence-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="syllable-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="non-whitespace-character-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:row-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:cell-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="office-meta-data" combine="choice">
- <element name="meta:user-defined">
- <attribute name="meta:name">
- <ref name="string"/>
- </attribute>
- <choice>
- <group>
- <attribute name="meta:value-type">
- <value>float</value>
- </attribute>
- <ref name="double"/>
- </group>
- <group>
- <attribute name="meta:value-type">
- <value>date</value>
- </attribute>
- <ref name="dateOrDateTime"/>
- </group>
- <group>
- <attribute name="meta:value-type">
- <value>time</value>
- </attribute>
- <ref name="duration"/>
- </group>
- <group>
- <attribute name="meta:value-type">
- <value>boolean</value>
- </attribute>
- <ref name="boolean"/>
- </group>
- <group>
- <attribute name="meta:value-type">
- <value>string</value>
- </attribute>
- <ref name="string"/>
- </group>
- <text/>
- </choice>
- </element>
-</define>
-<define name="text-h">
- <element name="text:h">
- <ref name="heading-attrs"/>
- <ref name="paragraph-attrs"/>
- <optional>
- <ref name="text-number"/>
- </optional>
- <zeroOrMore>
- <ref name="paragraph-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="heading-attrs" combine="interleave">
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="heading-attrs" combine="interleave">
- <optional>
- <attribute name="text:restart-numbering" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="heading-attrs" combine="interleave">
- <optional>
- <attribute name="text:start-value">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="heading-attrs" combine="interleave">
- <optional>
- <attribute name="text:is-list-header" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-number">
- <element name="text:number">
- <ref name="string"/>
- </element>
-</define>
-<define name="text-p">
- <element name="text:p">
- <ref name="paragraph-attrs"/>
- <zeroOrMore>
- <ref name="paragraph-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="paragraph-attrs">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:class-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:cond-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-attrs" combine="interleave">
- <optional>
- <ref name="text-id"/>
- </optional>
-</define>
-<define name="text-page-sequence">
- <element name="text:page-sequence">
- <oneOrMore>
- <ref name="text-page"/>
- </oneOrMore>
- </element>
-</define>
-<define name="text-page">
- <element name="text:page">
- <ref name="text-page-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="text-page-attlist">
- <attribute name="text:master-page-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="text-list">
- <element name="text:list">
- <ref name="text-list-attr"/>
- <optional>
- <ref name="text-list-header"/>
- </optional>
- <zeroOrMore>
- <ref name="text-list-item"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-list-attr" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-attr" combine="interleave">
- <optional>
- <attribute name="text:continue-numbering">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-item">
- <element name="text:list-item">
- <ref name="text-list-item-attr"/>
- <ref name="text-list-item-content"/>
- </element>
-</define>
-<define name="text-list-item-content">
- <optional>
- <ref name="text-number"/>
- </optional>
- <zeroOrMore>
- <choice>
- <ref name="text-p"/>
- <ref name="text-h"/>
- <ref name="text-list"/>
- <ref name="text-soft-page-break"/>
- </choice>
- </zeroOrMore>
-</define>
-<define name="text-list-item-attr" combine="interleave">
- <optional>
- <attribute name="text:start-value">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-header">
- <element name="text:list-header">
- <ref name="text-list-item-content"/>
- </element>
-</define>
-<define name="text-numbered-paragraph">
- <element name="text:numbered-paragraph">
- <ref name="text-numbered-paragraph-attr"/>
- <optional>
- <ref name="text-number"/>
- </optional>
- <choice>
- <ref name="text-p"/>
- <ref name="text-h"/>
- </choice>
- </element>
-</define>
-<define name="text-numbered-paragraph-attr" combine="interleave">
- <optional>
- <attribute name="text:level" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-numbered-paragraph-attr" combine="interleave">
- <ref name="text-list-attr"/>
-</define>
-<define name="text-numbered-paragraph-attr" combine="interleave">
- <ref name="text-list-item-attr"/>
-</define>
-<define name="text-section">
- <element name="text:section">
- <ref name="text-section-attr"/>
- <choice>
- <ref name="text-section-source"/>
- <ref name="text-section-source-dde"/>
- <empty/>
- </choice>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-section-attr" combine="interleave">
- <ref name="sectionAttr"/>
-</define>
-<define name="sectionAttr" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="sectionAttr" combine="interleave">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="sectionAttr" combine="interleave">
- <optional>
- <attribute name="text:protected">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="sectionAttr" combine="interleave">
- <optional>
- <attribute name="text:protection-key">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-section-attr" combine="interleave">
- <choice>
- <attribute name="text:display">
- <choice>
- <value>true</value>
- <value>none</value>
- </choice>
- </attribute>
- <group>
- <attribute name="text:display">
- <value>condition</value>
- </attribute>
- <attribute name="text:condition">
- <ref name="string"/>
- </attribute>
- </group>
- <empty/>
- </choice>
-</define>
-<define name="text-section-source">
- <element name="text:section-source">
- <ref name="text-section-source-attr"/>
- </element>
-</define>
-<define name="text-section-source-attr" combine="interleave">
- <optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show" a:defaultValue="embed">
- <value>embed</value>
- </attribute>
- </optional>
- </optional>
-</define>
-<define name="text-section-source-attr" combine="interleave">
- <optional>
- <attribute name="text:section-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-section-source-attr" combine="interleave">
- <optional>
- <attribute name="text:filter-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-section-source-dde">
- <ref name="office-dde-source"/>
-</define>
-<define name="text-tracked-changes">
- <optional>
- <element name="text:tracked-changes">
- <ref name="text-tracked-changes-attr"/>
- <zeroOrMore>
- <ref name="text-changed-region"/>
- </zeroOrMore>
- </element>
- </optional>
-</define>
-<define name="text-tracked-changes-attr" combine="interleave">
- <optional>
- <attribute name="text:track-changes" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-changed-region">
- <element name="text:changed-region">
- <ref name="text-changed-region-attr"/>
- <ref name="text-changed-region-content"/>
- </element>
-</define>
-<define name="text-changed-region-attr" combine="interleave">
- <attribute name="text:id">
- <ref name="ID"/>
- </attribute>
-</define>
-<define name="text-changed-region-content" combine="choice">
- <element name="text:insertion">
- <ref name="office-change-info"/>
- </element>
-</define>
-<define name="text-changed-region-content" combine="choice">
- <element name="text:deletion">
- <ref name="office-change-info"/>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-changed-region-content" combine="choice">
- <element name="text:format-change">
- <ref name="office-change-info"/>
- </element>
-</define>
-<define name="change-marks">
- <choice>
- <element name="text:change">
- <ref name="change-mark-attr"/>
- </element>
- <element name="text:change-start">
- <ref name="change-mark-attr"/>
- </element>
- <element name="text:change-end">
- <ref name="change-mark-attr"/>
- </element>
- </choice>
-</define>
-<define name="change-mark-attr">
- <attribute name="text:change-id">
- <ref name="IDREF"/>
- </attribute>
-</define>
-<define name="text-soft-page-break">
- <element name="text:soft-page-break">
- <empty/>
- </element>
-</define>
-<define name="text-decls">
- <optional>
- <element name="text:variable-decls">
- <zeroOrMore>
- <ref name="text-variable-decl"/>
- </zeroOrMore>
- </element>
- </optional>
- <optional>
- <element name="text:sequence-decls">
- <zeroOrMore>
- <ref name="text-sequence-decl"/>
- </zeroOrMore>
- </element>
- </optional>
- <optional>
- <element name="text:user-field-decls">
- <zeroOrMore>
- <ref name="text-user-field-decl"/>
- </zeroOrMore>
- </element>
- </optional>
- <optional>
- <element name="text:dde-connection-decls">
- <zeroOrMore>
- <ref name="text-dde-connection-decl"/>
- </zeroOrMore>
- </element>
- </optional>
- <optional>
- <ref name="text-alphabetical-index-auto-mark-file"/>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <text/>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:s">
- <optional>
- <attribute name="text:c">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:tab">
- <ref name="text-tab-attr"/>
- </element>
-</define>
-<define name="text-tab-attr">
- <optional>
- <attribute name="text:tab-ref">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:line-break">
- <empty/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <ref name="text-soft-page-break"/>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:span">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:class-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="paragraph-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:a">
- <ref name="text-a-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="paragraph-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-a-attlist" combine="interleave">
- <optional>
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-a-attlist" combine="interleave">
- <optional>
- <attribute name="office:title">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-a-attlist" combine="interleave">
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <value>onRequest</value>
- </attribute>
- </optional>
-</define>
-<define name="text-a-attlist" combine="interleave">
- <optional>
- <attribute name="office:target-frame-name">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-a-attlist" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:visited-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <choice>
- <element name="text:bookmark">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
- <element name="text:bookmark-start">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
- <element name="text:bookmark-end">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
- </choice>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:reference-mark">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <choice>
- <element name="text:reference-mark-start">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
- <element name="text:reference-mark-end">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
- </choice>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:note">
- <ref name="text-note-class"/>
- <optional>
- <attribute name="text:id">
- <ref name="string"/>
- </attribute>
- </optional>
- <element name="text:note-citation">
- <optional>
- <attribute name="text:label">
- <ref name="string"/>
- </attribute>
- </optional>
- <text/>
- </element>
- <element name="text:note-body">
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- </element>
- </element>
-</define>
-<define name="text-note-class">
- <attribute name="text:note-class">
- <choice>
- <value>footnote</value>
- <value>endnote</value>
- </choice>
- </attribute>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:ruby">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <element name="text:ruby-base">
- <ref name="paragraph-content"/>
- </element>
- <element name="text:ruby-text">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <text/>
- </element>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <ref name="office-annotation"/>
-</define>
-<define name="paragraph-content" combine="choice">
- <ref name="change-marks"/>
-</define>
-<define name="paragraph-content" combine="choice">
- <choice>
- <ref name="shape"/>
- <ref name="draw-a"/>
- </choice>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:date">
- <ref name="text-date-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-date-attlist" combine="interleave">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
-</define>
-<define name="text-date-attlist" combine="interleave">
- <optional>
- <attribute name="text:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </optional>
-</define>
-<define name="text-date-attlist" combine="interleave">
- <optional>
- <attribute name="text:date-adjust">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:time">
- <ref name="text-time-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-time-attlist" combine="interleave">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
-</define>
-<define name="text-time-attlist" combine="interleave">
- <optional>
- <attribute name="text:time-value">
- <ref name="timeOrDateTime"/>
- </attribute>
- </optional>
-</define>
-<define name="text-time-attlist" combine="interleave">
- <optional>
- <attribute name="text:time-adjust">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:page-number">
- <ref name="text-page-number-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-page-number-attlist" combine="interleave">
- <interleave>
- <ref name="common-field-num-format-attlist"/>
- <ref name="common-field-fixed-attlist"/>
- </interleave>
-</define>
-<define name="text-page-number-attlist" combine="interleave">
- <optional>
- <attribute name="text:page-adjust">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="text-page-number-attlist" combine="interleave">
- <optional>
- <attribute name="text:select-page">
- <choice>
- <value>previous</value>
- <value>current</value>
- <value>next</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:page-continuation">
- <ref name="text-page-continuation-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-page-continuation-attlist" combine="interleave">
- <attribute name="text:select-page">
- <choice>
- <value>previous</value>
- <value>next</value>
- </choice>
- </attribute>
-</define>
-<define name="text-page-continuation-attlist" combine="interleave">
- <optional>
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-firstname">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-lastname">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-initials">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-title">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-position">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-email">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-phone-private">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-fax">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-company">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-phone-work">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-street">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-city">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-postal-code">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-country">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sender-state-or-province">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:author-name">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:author-initials">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:chapter">
- <ref name="text-chapter-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-chapter-attlist" combine="interleave">
- <attribute name="text:display">
- <choice>
- <value>name</value>
- <value>number</value>
- <value>number-and-name</value>
- <value>plain-number-and-name</value>
- <value>plain-number</value>
- </choice>
- </attribute>
-</define>
-<define name="text-chapter-attlist" combine="interleave">
- <attribute name="text:outline-level">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:file-name">
- <ref name="text-file-name-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-file-name-attlist" combine="interleave">
- <optional>
- <attribute name="text:display">
- <choice>
- <value>full</value>
- <value>path</value>
- <value>name</value>
- <value>name-and-extension</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-file-name-attlist" combine="interleave">
- <ref name="common-field-fixed-attlist"/>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:template-name">
- <ref name="text-template-name-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-template-name-attlist">
- <optional>
- <attribute name="text:display">
- <choice>
- <value>full</value>
- <value>path</value>
- <value>name</value>
- <value>name-and-extension</value>
- <value>area</value>
- <value>title</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sheet-name">
- <text/>
- </element>
-</define>
-<define name="text-variable-decl">
- <element name="text:variable-decl">
- <ref name="common-field-name-attlist"/>
- <ref name="common-value-type-attlist"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:variable-set">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-formula-attlist"/>
- <ref name="common-value-and-type-attlist"/>
- <ref name="common-field-display-value-none-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:variable-get">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-display-value-formula-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:variable-input">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-description-attlist"/>
- <ref name="common-value-type-attlist"/>
- <ref name="common-field-display-value-none-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="text-user-field-decl">
- <element name="text:user-field-decl">
- <ref name="common-field-name-attlist"/>
- <optional>
- <ref name="common-field-formula-attlist"/>
- </optional>
- <ref name="common-value-and-type-attlist"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:user-field-get">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-display-value-formula-none-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:user-field-input">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-description-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="text-sequence-decl">
- <element name="text:sequence-decl">
- <ref name="text-sequence-decl-attlist"/>
- </element>
-</define>
-<define name="text-sequence-decl-attlist" combine="interleave">
- <ref name="common-field-name-attlist"/>
-</define>
-<define name="text-sequence-decl-attlist" combine="interleave">
- <attribute name="text:display-outline-level">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="text-sequence-decl-attlist" combine="interleave">
- <optional>
- <attribute name="text:separation-character">
- <ref name="character"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sequence">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-formula-attlist"/>
- <ref name="common-field-num-format-attlist"/>
- <ref name="text-sequence-ref-name"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="text-sequence-ref-name">
- <optional>
- <attribute name="text:ref-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:expression">
- <interleave>
- <ref name="common-field-formula-attlist"/>
- <optional>
- <ref name="common-value-and-type-attlist"/>
- </optional>
- <ref name="common-field-display-value-formula-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:text-input">
- <ref name="common-field-description-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:initial-creator">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:creation-date">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:creation-time">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:time-value">
- <ref name="timeOrDateTime"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:description">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:user-defined">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:time-value">
- <ref name="duration"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:boolean-value">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:string-value">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:print-time">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:time-value">
- <ref name="time"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:print-date">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:date-value">
- <ref name="date"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:printed-by">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:title">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:subject">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:keywords">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:editing-cycles">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:editing-duration">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:duration">
- <ref name="duration"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:modification-time">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:time-value">
- <ref name="time"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:modification-date">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:date-value">
- <ref name="date"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:creator">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element>
- <choice>
- <name>text:page-count</name>
- <name>text:paragraph-count</name>
- <name>text:word-count</name>
- <name>text:character-count</name>
- <name>text:table-count</name>
- <name>text:image-count</name>
- <name>text:object-count</name>
- </choice>
- <ref name="common-field-num-format-attlist"/>
- <text/>
- </element>
-</define>
-<define name="common-field-database-table">
- <ref name="common-field-database-table-attlist"/>
- <ref name="common-field-database-name"/>
-</define>
-<define name="common-field-database-name" combine="choice">
- <optional>
- <attribute name="text:database-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-field-database-name" combine="choice">
- <ref name="form-connection-resource"/>
-</define>
-<define name="common-field-database-table-attlist" combine="interleave">
- <attribute name="text:table-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="common-field-database-table-attlist" combine="interleave">
- <optional>
- <attribute name="text:table-type">
- <choice>
- <value>table</value>
- <value>query</value>
- <value>command</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:database-display">
- <ref name="text-database-display-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-database-display-attlist" combine="interleave">
- <ref name="common-field-database-table"/>
-</define>
-<define name="text-database-display-attlist" combine="interleave">
- <ref name="common-field-data-style-name-attlist"/>
-</define>
-<define name="text-database-display-attlist" combine="interleave">
- <attribute name="text:column-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:database-next">
- <ref name="text-database-next-attlist"/>
- </element>
-</define>
-<define name="text-database-next-attlist" combine="interleave">
- <ref name="common-field-database-table"/>
-</define>
-<define name="text-database-next-attlist" combine="interleave">
- <optional>
- <attribute name="text:condition">
- <ref name="formula"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:database-row-select">
- <ref name="text-database-row-select-attlist"/>
- </element>
-</define>
-<define name="text-database-row-select-attlist" combine="interleave">
- <ref name="common-field-database-table"/>
-</define>
-<define name="text-database-row-select-attlist" combine="interleave">
- <optional>
- <attribute name="text:condition">
- <ref name="formula"/>
- </attribute>
- </optional>
-</define>
-<define name="text-database-row-select-attlist" combine="interleave">
- <optional>
- <attribute name="text:row-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:database-row-number">
- <interleave>
- <ref name="common-field-database-table"/>
- <ref name="common-field-num-format-attlist"/>
- <optional>
- <attribute name="text:value">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:database-name">
- <ref name="common-field-database-table"/>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:page-variable-set">
- <ref name="text-set-page-variable-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-set-page-variable-attlist" combine="interleave">
- <optional>
- <attribute name="text:active">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-set-page-variable-attlist" combine="interleave">
- <optional>
- <attribute name="text:page-adjust">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:page-variable-get">
- <ref name="text-get-page-variable-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-get-page-variable-attlist" combine="interleave">
- <ref name="common-field-num-format-attlist"/>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:placeholder">
- <ref name="text-placeholder-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-placeholder-attlist" combine="interleave">
- <attribute name="text:placeholder-type">
- <choice>
- <value>text</value>
- <value>table</value>
- <value>text-box</value>
- <value>image</value>
- <value>object</value>
- </choice>
- </attribute>
-</define>
-<define name="text-placeholder-attlist" combine="interleave">
- <ref name="common-field-description-attlist"/>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:conditional-text">
- <ref name="text-conditional-text-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-conditional-text-attlist" combine="interleave">
- <attribute name="text:condition">
- <ref name="formula"/>
- </attribute>
-</define>
-<define name="text-conditional-text-attlist" combine="interleave">
- <attribute name="text:string-value-if-true">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="text-conditional-text-attlist" combine="interleave">
- <attribute name="text:string-value-if-false">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="text-conditional-text-attlist" combine="interleave">
- <optional>
- <attribute name="text:current-value">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:hidden-text">
- <ref name="text-hidden-text-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-hidden-text-attlist" combine="interleave">
- <attribute name="text:condition">
- <ref name="formula"/>
- </attribute>
-</define>
-<define name="text-hidden-text-attlist" combine="interleave">
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="text-hidden-text-attlist" combine="interleave">
- <optional>
- <attribute name="text:is-hidden">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element>
- <choice>
- <name>text:reference-ref</name>
- <name>text:bookmark-ref</name>
- </choice>
- <interleave>
- <ref name="text-common-ref-content"/>
- <ref name="text-ref-content"/>
- </interleave>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:note-ref">
- <interleave>
- <ref name="text-common-ref-content"/>
- <ref name="text-note-ref-content"/>
- <ref name="text-ref-content"/>
- </interleave>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:sequence-ref">
- <interleave>
- <ref name="text-common-ref-content"/>
- <ref name="text-sequence-ref-content"/>
- </interleave>
- </element>
-</define>
-<define name="text-common-ref-content" combine="interleave">
- <text/>
-</define>
-<define name="text-common-ref-content" combine="interleave">
- <optional>
- <attribute name="text:ref-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-note-ref-content" combine="interleave">
- <ref name="text-note-class"/>
-</define>
-<define name="text-ref-content" combine="interleave">
- <optional>
- <attribute name="text:reference-format">
- <choice>
- <value>page</value>
- <value>chapter</value>
- <value>direction</value>
- <value>text</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-sequence-ref-content" combine="interleave">
- <optional>
- <attribute name="text:reference-format">
- <choice>
- <value>page</value>
- <value>chapter</value>
- <value>direction</value>
- <value>text</value>
- <value>category-and-value</value>
- <value>caption</value>
- <value>value</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:script">
- <interleave>
- <choice>
- <group>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- </group>
- <text/>
- </choice>
- <optional>
- <attribute name="script:language">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:execute-macro">
- <optional>
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:hidden-paragraph">
- <ref name="text-hidden-paragraph-attlist"/>
- <text/>
- </element>
-</define>
-<define name="text-hidden-paragraph-attlist" combine="interleave">
- <attribute name="text:condition">
- <ref name="formula"/>
- </attribute>
-</define>
-<define name="text-hidden-paragraph-attlist" combine="interleave">
- <optional>
- <attribute name="text:is-hidden">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:dde-connection">
- <attribute name="text:connection-name">
- <ref name="string"/>
- </attribute>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:measure">
- <attribute name="text:kind">
- <choice>
- <value>value</value>
- <value>unit</value>
- <value>gap</value>
- </choice>
- </attribute>
- <text/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:table-formula">
- <interleave>
- <ref name="common-field-formula-attlist"/>
- <ref name="common-field-display-value-formula-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
-</define>
-<define name="common-value-type-attlist">
- <attribute name="office:value-type">
- <ref name="valueType"/>
- </attribute>
-</define>
-<define name="common-value-and-type-attlist">
- <choice>
- <group>
- <attribute name="office:value-type">
- <value>float</value>
- </attribute>
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>percentage</value>
- </attribute>
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>currency</value>
- </attribute>
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- <optional>
- <attribute name="office:currency">
- <ref name="string"/>
- </attribute>
- </optional>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>date</value>
- </attribute>
- <attribute name="office:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>time</value>
- </attribute>
- <attribute name="office:time-value">
- <ref name="duration"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>boolean</value>
- </attribute>
- <attribute name="office:boolean-value">
- <ref name="boolean"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>string</value>
- </attribute>
- <optional>
- <attribute name="office:string-value">
- <ref name="string"/>
- </attribute>
- </optional>
- </group>
- </choice>
-</define>
-<define name="common-field-fixed-attlist">
- <optional>
- <attribute name="text:fixed">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-field-name-attlist">
- <attribute name="text:name">
- <ref name="variableName"/>
- </attribute>
-</define>
-<define name="common-field-description-attlist">
- <optional>
- <attribute name="text:description">
- <text/>
- </attribute>
- </optional>
-</define>
-<define name="common-field-display-value-none-attlist">
- <optional>
- <attribute name="text:display">
- <choice>
- <value>value</value>
- <value>none</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-field-display-value-formula-none-attlist">
- <optional>
- <attribute name="text:display">
- <choice>
- <value>value</value>
- <value>formula</value>
- <value>none</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-field-display-value-formula-attlist">
- <optional>
- <attribute name="text:display">
- <choice>
- <value>value</value>
- <value>formula</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-field-formula-attlist">
- <optional>
- <attribute name="text:formula">
- <ref name="formula"/>
- </attribute>
- </optional>
-</define>
-<define name="common-field-data-style-name-attlist">
- <optional>
- <attribute name="style:data-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="common-field-num-format-attlist">
- <optional>
- <ref name="common-num-format-attlist"/>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:toc-mark-start">
- <ref name="text-toc-mark-start-attrs"/>
- </element>
-</define>
-<define name="text-toc-mark-start-attrs">
- <ref name="text-id"/>
- <ref name="text-outline-level"/>
-</define>
-<define name="text-outline-level">
- <optional>
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-id">
- <attribute name="text:id">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:toc-mark-end">
- <ref name="text-id"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:toc-mark">
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
- <ref name="text-outline-level"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:user-index-mark-start">
- <ref name="text-id"/>
- <ref name="text-outline-level"/>
- <ref name="text-index-name"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:user-index-mark-end">
- <ref name="text-id"/>
- <ref name="text-outline-level"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:user-index-mark">
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
- <ref name="text-outline-level"/>
- <ref name="text-index-name"/>
- </element>
-</define>
-<define name="text-index-name">
- <attribute name="text:index-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:alphabetical-index-mark-start">
- <ref name="text-id"/>
- <ref name="text-alphabetical-index-mark-attrs"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:alphabetical-index-mark-end">
- <ref name="text-id"/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:alphabetical-index-mark">
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
- <ref name="text-alphabetical-index-mark-attrs"/>
- </element>
-</define>
-<define name="text-alphabetical-index-mark-attrs" combine="interleave">
- <optional>
- <attribute name="text:key1">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:key2">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-mark-attrs" combine="interleave">
- <optional>
- <attribute name="text:string-value-phonetic">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:key1-phonetic">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:key2-phonetic">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-mark-attrs" combine="interleave">
- <optional>
- <attribute name="text:main-entry" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="text:bibliography-mark">
- <attribute name="text:bibliography-type">
- <ref name="text-bibliography-types"/>
- </attribute>
- <zeroOrMore>
- <attribute>
- <choice>
- <name>text:identifier</name>
- <name>text:address</name>
- <name>text:annote</name>
- <name>text:author</name>
- <name>text:booktitle</name>
- <name>text:chapter</name>
- <name>text:edition</name>
- <name>text:editor</name>
- <name>text:howpublished</name>
- <name>text:institution</name>
- <name>text:journal</name>
- <name>text:month</name>
- <name>text:note</name>
- <name>text:number</name>
- <name>text:organizations</name>
- <name>text:pages</name>
- <name>text:publisher</name>
- <name>text:school</name>
- <name>text:series</name>
- <name>text:title</name>
- <name>text:report-type</name>
- <name>text:volume</name>
- <name>text:year</name>
- <name>text:url</name>
- <name>text:custom1</name>
- <name>text:custom2</name>
- <name>text:custom3</name>
- <name>text:custom4</name>
- <name>text:custom5</name>
- <name>text:isbn</name>
- <name>text:issn</name>
- </choice>
- <ref name="string"/>
- </attribute>
- </zeroOrMore>
- <text/>
- </element>
-</define>
-<define name="text-bibliography-types">
- <choice>
- <value>article</value>
- <value>book</value>
- <value>booklet</value>
- <value>conference</value>
- <value>custom1</value>
- <value>custom2</value>
- <value>custom3</value>
- <value>custom4</value>
- <value>custom5</value>
- <value>email</value>
- <value>inbook</value>
- <value>incollection</value>
- <value>inproceedings</value>
- <value>journal</value>
- <value>manual</value>
- <value>mastersthesis</value>
- <value>misc</value>
- <value>phdthesis</value>
- <value>proceedings</value>
- <value>techreport</value>
- <value>unpublished</value>
- <value>www</value>
- </choice>
-</define>
-<define name="text-index-body">
- <element name="text:index-body">
- <zeroOrMore>
- <ref name="index-content-main"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="index-content-main">
- <choice>
- <ref name="text-content"/>
- <ref name="text-index-title"/>
- </choice>
-</define>
-<define name="text-index-title">
- <element name="text:index-title">
- <ref name="sectionAttr"/>
- <zeroOrMore>
- <ref name="index-content-main"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-table-of-content">
- <element name="text:table-of-content">
- <ref name="sectionAttr"/>
- <ref name="text-table-of-content-source"/>
- <ref name="text-index-body"/>
- </element>
-</define>
-<define name="text-table-of-content-source">
- <element name="text:table-of-content-source">
- <ref name="text-table-of-content-source-attlist"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <zeroOrMore>
- <ref name="text-table-of-content-entry-template"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="text-index-source-styles"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-table-of-content-source-attlist" combine="interleave">
- <optional>
- <attribute name="text:outline-level">
- <choice>
- <ref name="positiveInteger"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-table-of-content-source-attlist" combine="interleave">
- <optional>
- <attribute name="text:use-outline-level" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-table-of-content-source-attlist" combine="interleave">
- <optional>
- <attribute name="text:use-index-marks">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-table-of-content-source-attlist" combine="interleave">
- <optional>
- <attribute name="text:use-index-source-styles">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-table-of-content-source-attlist" combine="interleave">
- <optional>
- <attribute name="text:index-scope">
- <choice>
- <value>document</value>
- <value>chapter</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-table-of-content-source-attlist" combine="interleave">
- <optional>
- <attribute name="text:relative-tab-stop-position">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-table-of-content-entry-template">
- <element name="text:table-of-content-entry-template">
- <ref name="text-table-of-content-entry-template-attlist"/>
- <zeroOrMore>
- <ref name="text-table-of-content-children"/>
-
- </zeroOrMore>
- </element>
-</define>
-<define name="text-table-of-content-children">
- <choice>
- <ref name="text-index-entry-chapter"/>
- <ref name="text-index-entry-page-number"/>
- <ref name="text-index-entry-text"/>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- <ref name="text-index-entry-link-start"/>
- <ref name="text-index-entry-link-end"/>
- </choice>
-</define>
-<define name="text-table-of-content-entry-template-attlist"
- combine="interleave">
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="text-table-of-content-entry-template-attlist"
- combine="interleave">
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="text-illustration-index">
- <element name="text:illustration-index">
- <ref name="sectionAttr"/>
- <ref name="text-illustration-index-source"/>
- <ref name="text-index-body"/>
- </element>
-</define>
-<define name="text-illustration-index-source">
- <element name="text:illustration-index-source">
- <ref name="text-illustration-index-source-attrs"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <optional>
- <ref name="text-illustration-index-entry-template"/>
- </optional>
- </element>
-</define>
-<define name="text-illustration-index-source-attrs" combine="interleave">
- <ref name="text-index-scope-attr"/>
-</define>
-<define name="text-index-scope-attr">
- <optional>
- <attribute name="text:index-scope" a:defaultValue="document">
- <choice>
- <value>document</value>
- <value>chapter</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-illustration-index-source-attrs" combine="interleave">
- <ref name="text-relative-tab-stop-position-attr"/>
-</define>
-<define name="text-relative-tab-stop-position-attr">
- <optional>
- <attribute name="text:relative-tab-stop-position"
- a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-illustration-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:use-caption" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-illustration-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:caption-sequence-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-illustration-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:caption-sequence-format">
- <choice>
- <value>text</value>
- <value>category-and-value</value>
- <value>caption</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-illustration-index-entry-template">
- <element name="text:illustration-index-entry-template">
- <ref name="text-illustration-index-entry-content"/>
- </element>
-</define>
-<define name="text-illustration-index-entry-content">
- <ref name="text-illustration-index-entry-template-attrs"/>
- <zeroOrMore>
- <choice>
- <ref name="text-index-entry-page-number"/>
- <ref name="text-index-entry-text"/>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- </choice>
- </zeroOrMore>
-</define>
-<define name="text-illustration-index-entry-template-attrs">
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="text-table-index">
- <element name="text:table-index">
- <ref name="sectionAttr"/>
- <ref name="text-table-index-source"/>
- <ref name="text-index-body"/>
- </element>
-</define>
-<define name="text-table-index-source">
- <element name="text:table-index-source">
- <ref name="text-illustration-index-source-attrs"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <optional>
- <ref name="text-table-index-entry-template"/>
- </optional>
- </element>
-</define>
-<define name="text-table-index-entry-template">
- <element name="text:table-index-entry-template">
- <ref name="text-illustration-index-entry-content"/>
- </element>
-</define>
-<define name="text-object-index">
- <element name="text:object-index">
- <ref name="sectionAttr"/>
- <ref name="text-object-index-source"/>
- <ref name="text-index-body"/>
- </element>
-</define>
-<define name="text-object-index-source">
- <element name="text:object-index-source">
- <ref name="text-object-index-source-attrs"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <optional>
- <ref name="text-object-index-entry-template"/>
- </optional>
- </element>
-</define>
-<define name="text-object-index-source-attrs" combine="interleave">
- <ref name="text-index-scope-attr"/>
-</define>
-<define name="text-object-index-source-attrs" combine="interleave">
- <ref name="text-relative-tab-stop-position-attr"/>
-</define>
-<define name="text-object-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:use-spreadsheet-objects" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-object-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:use-math-objects" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-object-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:use-draw-objects" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-object-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:use-chart-objects" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-object-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:use-other-objects" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-object-index-entry-template">
- <element name="text:object-index-entry-template">
- <ref name="text-illustration-index-entry-content"/>
- </element>
-</define>
-<define name="text-user-index">
- <element name="text:user-index">
- <ref name="sectionAttr"/>
- <ref name="text-user-index-source"/>
- <ref name="text-index-body"/>
- </element>
-</define>
-<define name="text-user-index-source">
- <element name="text:user-index-source">
- <ref name="text-user-index-source-attr"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <zeroOrMore>
- <ref name="text-user-index-entry-template"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="text-index-source-styles"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-user-index-source-attr" combine="interleave">
- <ref name="text-index-scope-attr"/>
- <ref name="text-relative-tab-stop-position-attr"/>
- <attribute name="text:index-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="text-user-index-source-attr" combine="interleave">
- <optional>
- <attribute name="text:use-index-marks" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-graphics" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-tables" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-floating-frames"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-objects" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-user-index-source-attr" combine="interleave">
- <optional>
- <attribute name="text:copy-outline-levels"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-user-index-entry-template">
- <element name="text:user-index-entry-template">
- <ref name="text-user-index-entry-template-attrs"/>
- <zeroOrMore>
- <choice>
- <ref name="text-index-entry-chapter"/>
- <ref name="text-index-entry-page-number"/>
- <ref name="text-index-entry-text"/>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-user-index-entry-template-attrs" combine="interleave">
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="text-user-index-entry-template-attrs" combine="interleave">
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="text-alphabetical-index">
- <element name="text:alphabetical-index">
- <ref name="sectionAttr"/>
- <ref name="text-alphabetical-index-source"/>
- <ref name="text-index-body"/>
- </element>
-</define>
-<define name="text-alphabetical-index-source">
- <element name="text:alphabetical-index-source">
- <ref name="text-alphabetical-index-source-attrs"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <zeroOrMore>
- <ref name="text-alphabetical-index-entry-template"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <ref name="text-index-scope-attr"/>
- <ref name="text-relative-tab-stop-position-attr"/>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:ignore-case" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:main-entry-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:alphabetical-separators" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:combine-entries" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:combine-entries-with-dash"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:combine-entries-with-pp" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:use-keys-as-entries" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:capitalize-entries" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:comma-separated" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="fo:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="fo:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-source-attrs" combine="interleave">
- <optional>
- <attribute name="text:sort-algorithm">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-alphabetical-index-auto-mark-file">
- <element name="text:alphabetical-index-auto-mark-file">
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="text-alphabetical-index-entry-template">
- <element name="text:alphabetical-index-entry-template">
- <ref name="text-alphabetical-index-entry-template-attrs"/>
- <zeroOrMore>
- <choice>
- <ref name="text-index-entry-chapter"/>
- <ref name="text-index-entry-page-number"/>
- <ref name="text-index-entry-text"/>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-alphabetical-index-entry-template-attrs"
- combine="interleave">
- <attribute name="text:outline-level">
- <choice>
- <value>1</value>
- <value>2</value>
- <value>3</value>
- <value>separator</value>
- </choice>
- </attribute>
-</define>
-<define name="text-alphabetical-index-entry-template-attrs"
- combine="interleave">
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="text-bibliography">
- <element name="text:bibliography">
- <ref name="sectionAttr"/>
- <ref name="text-bibliography-source"/>
- <ref name="text-index-body"/>
- </element>
-</define>
-<define name="text-bibliography-source">
- <element name="text:bibliography-source">
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <zeroOrMore>
- <ref name="text-bibliography-entry-template"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-bibliography-entry-template">
- <element name="text:bibliography-entry-template">
- <ref name="text-bibliography-entry-template-attrs"/>
- <zeroOrMore>
- <choice>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- <ref name="text-index-entry-bibliography"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-bibliography-entry-template-attrs" combine="interleave">
- <attribute name="text:bibliography-type">
- <ref name="text-bibliography-types"/>
- </attribute>
-</define>
-<define name="text-bibliography-entry-template-attrs" combine="interleave">
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="text-index-source-styles">
- <element name="text:index-source-styles">
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
- <zeroOrMore>
- <ref name="text-index-source-style"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-index-source-style">
- <element name="text:index-source-style">
- <attribute name="text:style-name">
- <ref name="styleName"/>
- </attribute>
- <empty/>
- </element>
-</define>
-<define name="text-index-title-template">
- <element name="text:index-title-template">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <text/>
- </element>
-</define>
-<define name="text-index-entry-chapter">
- <element name="text:index-entry-chapter">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <ref name="text-index-entry-chapter-attrs"/>
- </element>
-</define>
-<define name="text-index-entry-chapter-attrs">
- <optional>
- <attribute name="text:display" a:defaultValue="number">
- <choice>
- <value>name</value>
- <value>number</value>
- <value>number-and-name</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-index-entry-text">
- <element name="text:index-entry-text">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="text-index-entry-page-number">
- <element name="text:index-entry-page-number">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="text-index-entry-span">
- <element name="text:index-entry-span">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <text/>
- </element>
-</define>
-<define name="text-index-entry-bibliography">
- <element name="text:index-entry-bibliography">
- <ref name="text-index-entry-bibliography-attrs"/>
- </element>
-</define>
-<define name="text-index-entry-bibliography-attrs" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-index-entry-bibliography-attrs" combine="interleave">
- <attribute name="text:bibliography-data-field">
- <choice>
- <value>address</value>
- <value>annote</value>
- <value>author</value>
- <value>bibliography-type</value>
- <value>booktitle</value>
- <value>chapter</value>
- <value>custom1</value>
- <value>custom2</value>
- <value>custom3</value>
- <value>custom4</value>
- <value>custom5</value>
- <value>edition</value>
- <value>editor</value>
- <value>howpublished</value>
- <value>identifier</value>
- <value>institution</value>
- <value>isbn</value>
- <value>issn</value>
- <value>journal</value>
- <value>month</value>
- <value>note</value>
- <value>number</value>
- <value>organizations</value>
- <value>pages</value>
- <value>publisher</value>
- <value>report-type</value>
- <value>school</value>
- <value>series</value>
- <value>title</value>
- <value>url</value>
- <value>volume</value>
- <value>year</value>
- </choice>
- </attribute>
-</define>
-<define name="text-index-entry-tab-stop">
- <element name="text:index-entry-tab-stop">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <ref name="text-index-entry-tab-stop-attrs"/>
- </element>
-</define>
-<define name="text-index-entry-tab-stop-attrs" combine="interleave">
- <optional>
- <attribute name="style:leader-char">
- <ref name="character"/>
- </attribute>
- </optional>
-</define>
-<define name="text-index-entry-tab-stop-attrs" combine="interleave">
- <choice>
- <attribute name="style:type">
- <value>right</value>
- </attribute>
- <group>
- <attribute name="style:type">
- <value>left</value>
- </attribute>
- <attribute name="style:position">
- <ref name="length"/>
- </attribute>
- </group>
- </choice>
-</define>
-<define name="text-index-entry-link-start">
- <element name="text:index-entry-link-start">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="text-index-entry-link-end">
- <element name="text:index-entry-link-end">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="table-table">
- <element name="table:table">
- <ref name="table-table-attlist"/>
- <optional>
- <ref name="table-table-source"/>
- </optional>
- <optional>
- <ref name="office-dde-source"/>
- </optional>
- <optional>
- <ref name="table-scenario"/>
- </optional>
- <optional>
- <ref name="office-forms"/>
- </optional>
- <optional>
- <ref name="table-shapes"/>
- </optional>
- <ref name="table-columns-and-groups"/>
- <ref name="table-rows-and-groups"/>
- </element>
-</define>
-<define name="table-columns-and-groups">
- <oneOrMore>
- <choice>
- <ref name="table-table-column-group"/>
- <ref name="table-columns-no-group"/>
- </choice>
- </oneOrMore>
-</define>
-
-<define name="table-columns-no-group">
- <choice>
- <group>
- <ref name="table-columns"/>
- <optional>
- <ref name="table-table-header-columns"/>
- <optional>
- <ref name="table-columns"/>
- </optional>
- </optional>
- </group>
- <group>
- <ref name="table-table-header-columns"/>
- <optional>
- <ref name="table-columns"/>
- </optional>
- </group>
- </choice>
-</define>
-
-<define name="table-columns">
- <choice>
- <ref name="table-table-columns"/>
- <oneOrMore>
- <ref name="table-table-column"/>
- </oneOrMore>
- </choice>
-</define>
-
-<define name="table-rows-and-groups">
- <oneOrMore>
- <choice>
- <ref name="table-table-row-group"/>
- <ref name="table-rows-no-group"/>
- </choice>
- </oneOrMore>
-</define>
-
-<define name="table-rows-no-group">
- <choice>
- <group>
- <ref name="table-rows"/>
- <optional>
- <ref name="table-table-header-rows"/>
- <optional>
- <ref name="table-rows"/>
- </optional>
- </optional>
- </group>
- <group>
- <ref name="table-table-header-rows"/>
- <optional>
- <ref name="table-rows"/>
- </optional>
- </group>
- </choice>
-</define>
-
-<define name="table-rows">
- <choice>
- <ref name="table-table-rows"/>
- <oneOrMore>
- <optional>
- <ref name="text-soft-page-break"/>
- </optional>
- <ref name="table-table-row"/>
- </oneOrMore>
- </choice>
-</define>
-<define name="table-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:protected" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:protection-key">
- <text/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:print" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:print-ranges">
- <ref name="cellRangeAddressList"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-row">
- <element name="table:table-row">
- <ref name="table-table-row-attlist"/>
- <oneOrMore>
- <choice>
- <ref name="table-table-cell"/>
- <ref name="table-covered-table-cell"/>
- </choice>
- </oneOrMore>
- </element>
-</define>
-<define name="table-table-row-attlist" combine="interleave">
- <optional>
- <attribute name="table:number-rows-repeated" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-row-attlist" combine="interleave">
- <optional>
- <attribute name="table:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-row-attlist" combine="interleave">
- <optional>
- <attribute name="table:default-cell-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-row-attlist" combine="interleave">
- <optional>
- <attribute name="table:visibility" a:defaultValue="visible">
- <ref name="table-visibility-value"/>
- </attribute>
- </optional>
-</define>
-
-<define name="table-visibility-value">
- <choice>
- <value>visible</value>
- <value>collapse</value>
- <value>filter</value>
- </choice>
-</define>
-<define name="table-table-cell">
- <element name="table:table-cell">
- <ref name="table-table-cell-attlist"/>
- <ref name="table-table-cell-attlist-extra"/>
- <ref name="table-table-cell-content"/>
- </element>
-</define>
-
-<define name="table-covered-table-cell">
- <element name="table:covered-table-cell">
- <ref name="table-table-cell-attlist"/>
- <ref name="table-table-cell-content"/>
- </element>
-</define>
-
-<define name="table-table-cell-content">
- <optional>
- <ref name="table-cell-range-source"/>
- </optional>
- <optional>
- <ref name="office-annotation"/>
- </optional>
- <optional>
- <ref name="table-detective"/>
- </optional>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
-</define>
-<define name="table-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:number-columns-repeated" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-cell-attlist-extra" combine="interleave">
- <optional>
- <attribute name="table:number-columns-spanned" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:number-rows-spanned" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:content-validation-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:formula">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-cell-attlist-extra" combine="interleave">
- <optional>
- <attribute name="table:number-matrix-columns-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:number-matrix-rows-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-cell-attlist" combine="interleave">
- <optional>
- <ref name="common-value-and-type-attlist"/>
- </optional>
-</define>
-<define name="table-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:protect" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-column">
- <element name="table:table-column">
- <ref name="table-table-column-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-table-column-attlist" combine="interleave">
- <optional>
- <attribute name="table:number-columns-repeated" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-column-attlist" combine="interleave">
- <optional>
- <attribute name="table:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-column-attlist" combine="interleave">
- <optional>
- <attribute name="table:visibility" a:defaultValue="visible">
- <ref name="table-visibility-value"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-column-attlist" combine="interleave">
- <optional>
- <attribute name="table:default-cell-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-header-columns">
- <element name="table:table-header-columns">
- <oneOrMore>
- <ref name="table-table-column"/>
- </oneOrMore>
- </element>
-</define>
-
-<define name="table-table-columns">
- <element name="table:table-columns">
- <oneOrMore>
- <ref name="table-table-column"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-table-column-group">
- <element name="table:table-column-group">
- <ref name="table-table-column-group-attlist"/>
- <ref name="table-columns-and-groups"/>
- </element>
-</define>
-<define name="table-table-column-group-attlist" combine="interleave">
- <optional>
- <attribute name="table:display" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-header-rows">
- <element name="table:table-header-rows">
- <oneOrMore>
- <optional>
- <ref name="text-soft-page-break"/>
- </optional>
- <ref name="table-table-row"/>
- </oneOrMore>
- </element>
-</define>
-
-<define name="table-table-rows">
- <element name="table:table-rows">
- <oneOrMore>
- <optional>
- <ref name="text-soft-page-break"/>
- </optional>
- <ref name="table-table-row"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-table-row-group">
- <element name="table:table-row-group">
- <ref name="table-table-row-group-attlist"/>
- <ref name="table-rows-and-groups"/>
- </element>
-</define>
-<define name="table-table-row-group-attlist" combine="interleave">
- <optional>
- <attribute name="table:display" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:is-sub-table" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="cellAddress">
- <data type="string">
- <param name="pattern">($?([^\. ']+|'([^']|'')+'))?\.$?[A-Z]+$?[0-9]+</param>
-
- </data>
-</define>
-<define name="cellRangeAddress">
- <data type="string">
- <param name="pattern">($?([^\. ']+|'([^']|'')+'))?\.$?[A-Z]+$?[0-9]+(:($?([^\. ']+|'([^']|'')+'))?\.$?[A-Z]+$?[0-9]+)?</param>
-
- </data>
-</define>
-<define name="cellRangeAddressList">
- <!-- Value is a space separated list of "cellRangeAddress" patterns -->
- <data type="string"/>
-</define>
-<define name="table-table-source">
- <element name="table:table-source">
- <ref name="table-table-source-attlist"/>
- <ref name="table-linked-source-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-table-source-attlist" combine="interleave">
- <optional>
- <attribute name="table:mode" a:defaultValue="copy-all">
- <choice>
- <value>copy-all</value>
- <value>copy-results-only</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-table-source-attlist" combine="interleave">
- <optional>
- <attribute name="table:table-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-linked-source-attlist" combine="interleave">
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <value>onRequest</value>
- </attribute>
- </optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
-</define>
-<define name="table-linked-source-attlist" combine="interleave">
- <optional>
- <attribute name="table:filter-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-linked-source-attlist" combine="interleave">
- <optional>
- <attribute name="table:filter-options">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-linked-source-attlist" combine="interleave">
- <optional>
- <attribute name="table:refresh-delay">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="table-scenario">
- <element name="table:scenario">
- <ref name="table-scenario-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <attribute name="table:scenario-ranges">
- <ref name="cellRangeAddressList"/>
- </attribute>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <attribute name="table:is-active">
- <ref name="boolean"/>
- </attribute>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <optional>
- <attribute name="table:display-border" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <optional>
- <attribute name="table:border-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <optional>
- <attribute name="table:copy-back" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <optional>
- <attribute name="table:copy-styles" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <optional>
- <attribute name="table:copy-formulas" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <optional>
- <attribute name="table:comment">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-scenario-attlist" combine="interleave">
- <optional>
- <attribute name="table:protected">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-shapes">
- <element name="table:shapes">
- <oneOrMore>
- <ref name="shape"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-cell-range-source">
- <element name="table:cell-range-source">
- <ref name="table-table-cell-range-source-attlist"/>
- <ref name="table-linked-source-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-table-cell-range-source-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-table-cell-range-source-attlist" combine="interleave">
- <attribute name="table:last-column-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- <attribute name="table:last-row-spanned">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="table-detective">
- <element name="table:detective">
- <zeroOrMore>
- <ref name="table-highlighted-range"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="table-operation"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-operation">
- <element name="table:operation">
- <ref name="table-operation-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-operation-attlist" combine="interleave">
- <attribute name="table:name">
- <choice>
- <value>trace-dependents</value>
- <value>remove-dependents</value>
- <value>trace-precedents</value>
- <value>remove-precedents</value>
- <value>trace-errors</value>
- </choice>
- </attribute>
-</define>
-<define name="table-operation-attlist" combine="interleave">
- <attribute name="table:index">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="table-highlighted-range">
- <element name="table:highlighted-range">
- <choice>
- <group>
- <ref name="table-highlighted-range-attlist"/>
- </group>
- <group>
- <ref name="table-highlighted-range-attlist-invalid"/>
- </group>
- </choice>
- <empty/>
- </element>
-</define>
-<define name="table-highlighted-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="table-highlighted-range-attlist" combine="interleave">
- <attribute name="table:direction">
- <choice>
- <value>from-another-table</value>
- <value>to-another-table</value>
- <value>from-same-table</value>
- </choice>
- </attribute>
-</define>
-<define name="table-highlighted-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:contains-error" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-highlighted-range-attlist-invalid" combine="interleave">
- <attribute name="table:marked-invalid">
- <ref name="boolean"/>
- </attribute>
-</define>
-<define name="office-spreadsheet-attlist" combine="interleave">
- <optional>
- <attribute name="table:structure-protected" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:protection-key">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-calculation-settings">
- <element name="table:calculation-settings">
- <ref name="table-calculation-setting-attlist"/>
- <optional>
- <ref name="table-null-date"/>
- </optional>
- <optional>
- <ref name="table-iteration"/>
- </optional>
- </element>
-</define>
-<define name="table-calculation-setting-attlist" combine="interleave">
- <optional>
- <attribute name="table:case-sensitive" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-calculation-setting-attlist" combine="interleave">
- <optional>
- <attribute name="table:precision-as-shown" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-calculation-setting-attlist" combine="interleave">
- <optional>
- <attribute name="table:search-criteria-must-apply-to-whole-cell"
- a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-calculation-setting-attlist" combine="interleave">
- <optional>
- <attribute name="table:automatic-find-labels" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-calculation-setting-attlist" combine="interleave">
- <optional>
- <attribute name="table:use-regular-expressions"
- a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-calculation-setting-attlist" combine="interleave">
- <optional>
- <attribute name="table:null-year" a:defaultValue="1930">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="table-null-date">
- <element name="table:null-date">
- <optional>
- <attribute name="table:value-type" a:defaultValue="date">
- <ref name="valueType"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:date-value"
- a:defaultValue="1899-12-30">
- <ref name="date"/>
- </attribute>
- </optional>
- <empty/>
- </element>
-</define>
-<define name="table-iteration">
- <element name="table:iteration">
- <optional>
- <attribute name="table:status" a:defaultValue="disable">
- <choice>
- <value>enable</value>
- <value>disable</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:steps" a:defaultValue="100">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:maximum-difference"
- a:defaultValue="0.001">
- <ref name="double"/>
- </attribute>
- </optional>
- <empty/>
- </element>
-</define>
-<define name="table-content-validations">
- <element name="table:content-validations">
- <oneOrMore>
- <ref name="table-content-validation"/>
- </oneOrMore>
- </element>
-</define>
-
-<define name="table-content-validation">
- <element name="table:content-validation">
- <ref name="table-validation-attlist"/>
- <optional>
- <ref name="table-help-message"/>
- </optional>
- <optional>
- <choice>
- <ref name="table-error-message"/>
- <group>
- <ref name="table-error-macro"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </group>
- </choice>
- </optional>
- </element>
-</define>
-<define name="table-validation-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-validation-attlist" combine="interleave">
- <optional>
- <attribute name="table:condition">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-validation-attlist" combine="interleave">
- <optional>
- <attribute name="table:base-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="table-validation-attlist" combine="interleave">
- <optional>
- <attribute name="table:allow-empty-cell" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-validation-attlist" combine="interleave">
- <optional>
- <attribute name="table:display-list" a:defaultValue="unsorted">
- <choice>
- <value>none</value>
- <value>unsorted</value>
- <value>sort-ascending</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-help-message">
- <element name="table:help-message">
- <optional>
- <attribute name="table:title">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:display" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-error-message">
- <element name="table:error-message">
- <optional>
- <attribute name="table:title">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:display" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:message-type" a:defaultValue="stop">
- <choice>
- <value>stop</value>
- <value>warning</value>
- <value>information</value>
- </choice>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-error-macro">
- <element name="table:error-macro">
- <optional>
- <attribute name="table:execute" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="table-label-ranges">
- <element name="table:label-ranges">
- <zeroOrMore>
- <ref name="table-label-range"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="table-label-range">
- <element name="table:label-range">
- <ref name="table-label-range-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-label-range-attlist" combine="interleave">
- <attribute name="table:label-cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
-</define>
-<define name="table-label-range-attlist" combine="interleave">
- <attribute name="table:data-cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
-</define>
-<define name="table-label-range-attlist" combine="interleave">
- <attribute name="table:orientation">
- <choice>
- <value>column</value>
- <value>row</value>
- </choice>
- </attribute>
-</define>
-<define name="table-named-expressions">
- <element name="table:named-expressions">
- <zeroOrMore>
- <choice>
- <ref name="table-named-range"/>
- <ref name="table-named-expression"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="table-named-range">
- <element name="table:named-range">
- <ref name="table-named-range-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-named-range-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- <optional>
- <attribute name="table:base-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:range-usable-as" a:defaultValue="none">
- <choice>
- <value>none</value>
- <list>
- <oneOrMore>
- <choice>
- <value>print-range</value>
- <value>filter</value>
- <value>repeat-row</value>
- <value>repeat-column</value>
- </choice>
- </oneOrMore>
- </list>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-named-expression">
- <element name="table:named-expression">
- <ref name="table-named-expression-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-named-expression-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- <attribute name="table:expression">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="table:base-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-ranges">
- <element name="table:database-ranges">
- <zeroOrMore>
- <ref name="table-database-range"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-database-range">
- <element name="table:database-range">
- <ref name="table-database-range-attlist"/>
- <optional>
- <choice>
- <ref name="table-database-source-sql"/>
- <ref name="table-database-source-table"/>
- <ref name="table-database-source-query"/>
- </choice>
- </optional>
- <optional>
- <ref name="table-filter"/>
- </optional>
- <optional>
- <ref name="table-sort"/>
- </optional>
- <optional>
- <ref name="table-subtotal-rules"/>
- </optional>
- </element>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:is-selection" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:on-update-keep-styles" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:on-update-keep-size" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:has-persistent-data" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:orientation" a:defaultValue="row">
- <choice>
- <value>column</value>
- <value>row</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:contains-header" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:display-filter-buttons"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <attribute name="table:target-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
-</define>
-<define name="table-database-range-attlist" combine="interleave">
- <optional>
- <attribute name="table:refresh-delay">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-source-sql">
- <element name="table:database-source-sql">
- <ref name="table-database-source-sql-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-database-source-sql-attlist" combine="interleave">
- <attribute name="table:database-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-database-source-sql-attlist" combine="interleave">
- <attribute name="table:sql-statement">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-database-source-sql-attlist" combine="interleave">
- <optional>
- <attribute name="table:parse-sql-statement" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-database-source-query">
- <element name="table:database-source-table">
- <ref name="table-database-source-table-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-database-source-table-attlist" combine="interleave">
- <attribute name="table:database-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-database-source-table-attlist" combine="interleave">
- <attribute name="table:database-table-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-database-source-table">
- <element name="table:database-source-query">
- <ref name="table-database-source-query-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-database-source-query-attlist" combine="interleave">
- <attribute name="table:database-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-database-source-query-attlist" combine="interleave">
- <attribute name="table:query-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-sort">
- <element name="table:sort">
- <ref name="table-sort-attlist"/>
- <oneOrMore>
- <ref name="table-sort-by"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-sort-attlist" combine="interleave">
- <optional>
- <attribute name="table:bind-styles-to-content" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-attlist" combine="interleave">
- <optional>
- <attribute name="table:target-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-attlist" combine="interleave">
- <optional>
- <attribute name="table:case-sensitive" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-attlist" combine="interleave">
- <optional>
- <attribute name="table:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-attlist" combine="interleave">
- <optional>
- <attribute name="table:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-attlist" combine="interleave">
- <optional>
- <attribute name="table:algorithm">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-by">
- <element name="table:sort-by">
- <ref name="table-sort-by-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-sort-by-attlist" combine="interleave">
- <attribute name="table:field-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="table-sort-by-attlist" combine="interleave">
- <optional>
- <attribute name="table:data-type" a:defaultValue="automatic">
- <choice>
- <value>text</value>
- <value>number</value>
- <value>automatic</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-by-attlist" combine="interleave">
- <optional>
- <attribute name="table:order" a:defaultValue="ascending">
- <choice>
- <value>ascending</value>
- <value>descending</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-subtotal-rules">
- <element name="table:subtotal-rules">
- <ref name="table-subtotal-rules-attlist"/>
- <optional>
- <ref name="table-sort-groups"/>
- </optional>
- <zeroOrMore>
- <ref name="table-subtotal-rule"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-subtotal-rules-attlist" combine="interleave">
- <optional>
- <attribute name="table:bind-styles-to-content" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-subtotal-rules-attlist" combine="interleave">
- <optional>
- <attribute name="table:case-sensitive" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-subtotal-rules-attlist" combine="interleave">
- <optional>
- <attribute name="table:page-breaks-on-group-change"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-groups">
- <element name="table:sort-groups">
- <ref name="table-sort-groups-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-sort-groups-attlist" combine="interleave">
- <optional>
- <attribute name="table:data-type" a:defaultValue="automatic">
- <choice>
- <value>text</value>
- <value>number</value>
- <value>automatic</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-sort-groups-attlist" combine="interleave">
- <optional>
- <attribute name="table:order" a:defaultValue="ascending">
- <choice>
- <value>ascending</value>
- <value>descending</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-subtotal-rule">
- <element name="table:subtotal-rule">
- <ref name="table-subtotal-rule-attlist"/>
- <zeroOrMore>
- <ref name="table-subtotal-field"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-subtotal-rule-attlist" combine="interleave">
- <attribute name="table:group-by-field-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="table-subtotal-field">
- <element name="table:subtotal-field">
- <ref name="table-subtotal-field-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-subtotal-field-attlist" combine="interleave">
- <attribute name="table:field-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="table-subtotal-field-attlist" combine="interleave">
- <attribute name="table:function">
- <choice>
- <value>auto</value>
- <value>average</value>
- <value>count</value>
- <value>countnums</value>
- <value>max</value>
- <value>min</value>
- <value>product</value>
- <value>stdev</value>
- <value>stdevp</value>
- <value>sum</value>
- <value>var</value>
- <value>varp</value>
- <ref name="string"/>
- </choice>
- </attribute>
-</define>
-<define name="table-filter">
- <element name="table:filter">
- <ref name="table-filter-attlist"/>
- <choice>
- <ref name="table-filter-condition"/>
- <ref name="table-filter-and"/>
- <ref name="table-filter-or"/>
- </choice>
- </element>
-</define>
-<define name="table-filter-attlist" combine="interleave">
- <optional>
- <attribute name="table:target-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="table-filter-attlist" combine="interleave">
- <optional>
- <attribute name="table:condition-source" a:defaultValue="self">
- <choice>
- <value>self</value>
- <value>cell-range</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-filter-attlist" combine="interleave">
- <optional>
- <attribute name="table:condition-source-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="table-filter-attlist" combine="interleave">
- <optional>
- <attribute name="table:display-duplicates" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-filter-and">
- <element name="table:filter-and">
- <oneOrMore>
- <choice>
- <ref name="table-filter-or"/>
- <ref name="table-filter-condition"/>
- </choice>
- </oneOrMore>
- </element>
-</define>
-<define name="table-filter-or">
- <element name="table:filter-or">
- <oneOrMore>
- <choice>
- <ref name="table-filter-and"/>
- <ref name="table-filter-condition"/>
- </choice>
- </oneOrMore>
- </element>
-</define>
-<define name="table-filter-condition">
- <element name="table:filter-condition">
- <ref name="table-filter-condition-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-filter-condition-attlist" combine="interleave">
- <attribute name="table:field-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="table-filter-condition-attlist" combine="interleave">
- <attribute name="table:value">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-filter-condition-attlist" combine="interleave">
- <attribute name="table:operator">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-filter-condition-attlist" combine="interleave">
- <optional>
- <attribute name="table:case-sensitive" a:defaultValue="false">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-filter-condition-attlist" combine="interleave">
- <optional>
- <attribute name="table:data-type" a:defaultValue="text">
- <choice>
- <value>text</value>
- <value>number</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-tables">
- <element name="table:data-pilot-tables">
- <zeroOrMore>
- <ref name="table-data-pilot-table"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-data-pilot-table">
- <element name="table:data-pilot-table">
- <ref name="table-data-pilot-table-attlist"/>
- <optional>
- <choice>
- <ref name="table-database-source-sql"/>
- <ref name="table-database-source-table"/>
- <ref name="table-database-source-query"/>
- <ref name="table-source-service"/>
- <ref name="table-source-cell-range"/>
- </choice>
- </optional>
- <oneOrMore>
- <ref name="table-data-pilot-field"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:application-data">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:grand-total" a:defaultValue="both">
- <choice>
- <value>none</value>
- <value>row</value>
- <value>column</value>
- <value>both</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:ignore-empty-rows" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:identify-categories" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <attribute name="table:target-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:buttons">
- <ref name="cellRangeAddressList"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:show-filter-button" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-table-attlist" combine="interleave">
- <optional>
- <attribute name="table:drill-down-on-double-click"
- a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-source-cell-range">
- <element name="table:source-cell-range">
- <ref name="table-source-cell-range-attlist"/>
- <optional>
- <ref name="table-filter"/>
- </optional>
- </element>
-</define>
-<define name="table-source-cell-range-attlist" combine="interleave">
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
-</define>
-<define name="table-source-service">
- <element name="table:source-service">
- <ref name="table-source-service-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-source-service-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-source-service-attlist" combine="interleave">
- <attribute name="table:source-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-source-service-attlist" combine="interleave">
- <attribute name="table:object-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-source-service-attlist" combine="interleave">
- <optional>
- <attribute name="table:user-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-source-service-attlist" combine="interleave">
- <optional>
- <attribute name="table:password">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-field">
- <element name="table:data-pilot-field">
- <ref name="table-data-pilot-field-attlist"/>
- <optional>
- <ref name="table-data-pilot-level"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-field-reference"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-groups"/>
- </optional>
- </element>
-</define>
-<define name="table-data-pilot-field-attlist" combine="interleave">
- <attribute name="table:source-field-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-data-pilot-field-attlist" combine="interleave">
- <choice>
- <attribute name="table:orientation">
- <choice>
- <value>row</value>
- <value>column</value>
- <value>data</value>
- <value>hidden</value>
- </choice>
- </attribute>
- <group>
- <attribute name="table:orientation">
- <value>page</value>
- </attribute>
- <attribute name="table:selected-page">
- <ref name="string"/>
- </attribute>
- </group>
- </choice>
-</define>
-<define name="table-data-pilot-field-attlist" combine="interleave">
- <optional>
- <attribute name="table:is-data-layout-field" a:defaultValue="false">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-field-attlist" combine="interleave">
- <optional>
- <attribute name="table:function">
- <choice>
- <value>auto</value>
- <value>average</value>
- <value>count</value>
- <value>countnums</value>
- <value>max</value>
- <value>min</value>
- <value>product</value>
- <value>stdev</value>
- <value>stdevp</value>
- <value>sum</value>
- <value>var</value>
- <value>varp</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-field-attlist" combine="interleave">
- <optional>
- <attribute name="table:used-hierarchy" a:defaultValue="-1">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-level">
- <element name="table:data-pilot-level">
- <ref name="table-data-pilot-level-attlist"/>
- <optional>
- <ref name="table-data-pilot-subtotals"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-members"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-display-info"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-sort-info"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-layout-info"/>
- </optional>
- </element>
-</define>
-<define name="table-data-pilot-level-attlist" combine="interleave">
- <optional>
- <attribute name="table:show-empty">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-subtotals">
- <element name="table:data-pilot-subtotals">
- <zeroOrMore>
- <ref name="table-data-pilot-subtotal"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-data-pilot-subtotal">
- <element name="table:data-pilot-subtotal">
- <ref name="table-data-pilot-subtotal-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-data-pilot-subtotal-attlist" combine="interleave">
- <attribute name="table:function">
- <choice>
- <value>auto</value>
- <value>average</value>
- <value>count</value>
- <value>countnums</value>
- <value>max</value>
- <value>min</value>
- <value>product</value>
- <value>stdev</value>
- <value>stdevp</value>
- <value>sum</value>
- <value>var</value>
- <value>varp</value>
- <ref name="string"/>
- </choice>
- </attribute>
-</define>
-<define name="table-data-pilot-members">
- <element name="table:data-pilot-members">
- <zeroOrMore>
- <ref name="table-data-pilot-member"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-data-pilot-member">
- <element name="table:data-pilot-member">
- <ref name="table-data-pilot-member-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-data-pilot-member-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-data-pilot-member-attlist" combine="interleave">
- <optional>
- <attribute name="table:display">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-member-attlist" combine="interleave">
- <optional>
- <attribute name="table:show-details">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-data-pilot-display-info">
- <element name="table:data-pilot-display-info">
- <ref name="table-data-pilot-display-info-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-data-pilot-display-info-attlist" combine="interleave">
- <attribute name="table:enabled">
- <ref name="boolean"/>
- </attribute>
-</define>
-<define name="table-data-pilot-display-info-attlist" combine="interleave">
- <attribute name="table:data-field">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-data-pilot-display-info-attlist" combine="interleave">
- <attribute name="table:member-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="table-data-pilot-display-info-attlist" combine="interleave">
- <attribute name="table:display-member-mode">
- <choice>
- <value>from-top</value>
- <value>from-bottom</value>
- </choice>
- </attribute>
-</define>
-<define name="table-data-pilot-sort-info">
- <element name="table:data-pilot-sort-info">
- <ref name="table-data-pilot-sort-info-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-data-pilot-sort-info-attlist" combine="interleave">
- <choice>
- <group>
- <attribute name="table:sort-mode">
- <value>data</value>
- </attribute>
- <attribute name="table:data-field">
- <ref name="string"/>
- </attribute>
- </group>
- <attribute name="table:sort-mode">
- <choice>
- <value>none</value>
- <value>manual</value>
- <value>name</value>
- </choice>
- </attribute>
- </choice>
-</define>
-<define name="table-data-pilot-sort-info-attlist" combine="interleave">
- <attribute name="table:order">
- <choice>
- <value>ascending</value>
- <value>descending</value>
- </choice>
- </attribute>
-</define>
-<define name="table-data-pilot-layout-info">
- <element name="table:data-pilot-layout-info">
- <ref name="table-data-pilot-layout-info-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-data-pilot-layout-info-attlist" combine="interleave">
- <attribute name="table:layout-mode">
- <choice>
- <value>tabular-layout</value>
- <value>outline-subtotals-top</value>
- <value>outline-subtotals-bottom</value>
- </choice>
- </attribute>
-</define>
-<define name="table-data-pilot-layout-info-attlist" combine="interleave">
- <attribute name="table:add-empty-lines">
- <ref name="boolean"/>
- </attribute>
-</define>
-<define name="table-data-pilot-field-reference">
- <element name="table:data-pilot-field-reference">
- <ref name="table-data-pilot-field-reference-attlist"/>
- </element>
-</define>
-<define name="table-data-pilot-field-reference-attlist" combine="interleave">
- <attribute name="table:field-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-data-pilot-field-reference-attlist" combine="interleave">
- <choice>
- <group>
- <attribute name="table:member-type">
- <value>named</value>
- </attribute>
- <attribute name="table:member-name">
- <ref name="string"/>
- </attribute>
- </group>
- <attribute name="table:member-type">
- <choice>
- <value>previous</value>
- <value>next</value>
- </choice>
- </attribute>
- </choice>
-</define>
-<define name="table-data-pilot-field-reference-attlist" combine="interleave">
- <attribute name="table:type">
- <choice>
- <value>none</value>
- <value>member-difference</value>
- <value>member-percentage</value>
- <value>member-percentage-difference</value>
- <value>running-total</value>
- <value>row-percentage</value>
- <value>column-percentage</value>
- <value>total-percentage</value>
- <value>index</value>
- </choice>
- </attribute>
-</define>
-<define name="table-data-pilot-groups">
- <element name="table:data-pilot-groups">
- <ref name="table-data-pilot-groups-attlist"/>
- <oneOrMore>
- <ref name="table-data-pilot-group"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-data-pilot-groups-attlist" combine="interleave">
- <attribute name="table:source-field-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-data-pilot-groups-attlist" combine="interleave">
- <choice>
- <attribute name="table:date-start">
- <choice>
- <ref name="dateOrDateTime"/>
- <value>auto</value>
- </choice>
- </attribute>
- <attribute name="table:start">
- <choice>
- <ref name="double"/>
- <value>auto</value>
- </choice>
- </attribute>
- </choice>
-</define>
-<define name="table-data-pilot-groups-attlist" combine="interleave">
- <choice>
- <attribute name="table:date-end">
- <choice>
- <ref name="dateOrDateTime"/>
- <value>auto</value>
- </choice>
- </attribute>
- <attribute name="table:end">
- <choice>
- <ref name="double"/>
- <value>auto</value>
- </choice>
- </attribute>
- </choice>
-</define>
-<define name="table-data-pilot-groups-attlist" combine="interleave">
- <attribute name="table:step">
- <ref name="double"/>
- </attribute>
-</define>
-<define name="table-data-pilot-groups-attlist" combine="interleave">
- <attribute name="table:grouped-by">
- <choice>
- <value>seconds</value>
- <value>minutes</value>
- <value>hours</value>
- <value>days</value>
- <value>months</value>
- <value>quarters</value>
- <value>years</value>
- </choice>
- </attribute>
-</define>
-<define name="table-data-pilot-group">
- <element name="table:data-pilot-group">
- <ref name="table-data-pilot-group-attlist"/>
- <oneOrMore>
- <ref name="table-data-pilot-group-member"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-data-pilot-group-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-data-pilot-group-member">
- <element name="table:data-pilot-group-member">
- <ref name="table-data-pilot-group-member-attlist"/>
- </element>
-</define>
-<define name="table-data-pilot-group-member-attlist" combine="interleave">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-consolidation">
- <element name="table:consolidation">
- <ref name="table-consolidation-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-consolidation-attlist" combine="interleave">
- <attribute name="table:function">
- <choice>
- <value>auto</value>
- <value>average</value>
- <value>count</value>
- <value>countnums</value>
- <value>max</value>
- <value>min</value>
- <value>product</value>
- <value>stdev</value>
- <value>stdevp</value>
- <value>sum</value>
- <value>var</value>
- <value>varp</value>
- <ref name="string"/>
- </choice>
- </attribute>
-</define>
-<define name="table-consolidation-attlist" combine="interleave">
- <attribute name="table:source-cell-range-addresses">
- <ref name="cellRangeAddressList"/>
- </attribute>
-</define>
-<define name="table-consolidation-attlist" combine="interleave">
- <attribute name="table:target-cell-address">
- <ref name="cellAddress"/>
- </attribute>
-</define>
-<define name="table-consolidation-attlist" combine="interleave">
- <optional>
- <attribute name="table:use-labels" a:defaultValue="none">
- <choice>
- <value>none</value>
- <value>row</value>
- <value>column</value>
- <value>both</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="table-consolidation-attlist" combine="interleave">
- <optional>
- <attribute name="table:link-to-source-data" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-dde-links">
- <element name="table:dde-links">
- <oneOrMore>
- <ref name="table-dde-link"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-tracked-changes">
- <element name="table:tracked-changes">
- <ref name="table-tracked-changes-attlist"/>
- <zeroOrMore>
- <choice>
- <ref name="table-cell-content-change"/>
- <ref name="table-insertion"/>
- <ref name="table-deletion"/>
- <ref name="table-movement"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-tracked-changes-attlist" combine="interleave">
- <optional>
- <attribute name="table:track-changes" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-insertion">
- <element name="table:insertion">
- <ref name="table-insertion-attlist"/>
- <ref name="common-table-change-attlist"/>
- <ref name="office-change-info"/>
- <optional>
- <ref name="table-dependencies"/>
- </optional>
- <optional>
- <ref name="table-deletions"/>
- </optional>
- </element>
-</define>
-<define name="table-insertion-attlist" combine="interleave">
- <attribute name="table:type">
- <choice>
- <value>row</value>
- <value>column</value>
- <value>table</value>
- </choice>
- </attribute>
-</define>
-<define name="table-insertion-attlist" combine="interleave">
- <attribute name="table:position">
- <ref name="integer"/>
- </attribute>
-</define>
-<define name="table-insertion-attlist" combine="interleave">
- <optional>
- <attribute name="table:count" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="table-insertion-attlist" combine="interleave">
- <optional>
- <attribute name="table:table">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="table-dependencies">
- <element name="table:dependencies">
- <oneOrMore>
- <ref name="table-dependency"/>
- </oneOrMore>
- </element>
-</define>
-<define name="table-dependency">
- <element name="table:dependency">
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
- <empty/>
- </element>
-</define>
-<define name="table-deletions">
- <element name="table:deletions">
- <oneOrMore>
- <choice>
- <ref name="table-cell-content-deletion"/>
- <ref name="table-change-deletion"/>
- </choice>
- </oneOrMore>
- </element>
-</define>
-<define name="table-cell-content-deletion">
- <element name="table:cell-content-deletion">
- <optional>
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <ref name="table-cell-address"/>
- </optional>
- <optional>
- <ref name="table-change-track-table-cell"/>
- </optional>
- </element>
-</define>
-<define name="table-change-deletion">
- <element name="table:change-deletion">
- <optional>
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
- </optional>
- <empty/>
- </element>
-</define>
-<define name="table-deletion">
- <element name="table:deletion">
- <ref name="table-deletion-attlist"/>
- <ref name="common-table-change-attlist"/>
- <ref name="office-change-info"/>
- <optional>
- <ref name="table-dependencies"/>
- </optional>
- <optional>
- <ref name="table-deletions"/>
- </optional>
- <optional>
- <ref name="table-cut-offs"/>
- </optional>
- </element>
-</define>
-<define name="table-deletion-attlist" combine="interleave">
- <attribute name="table:type">
- <choice>
- <value>row</value>
- <value>column</value>
- <value>table</value>
- </choice>
- </attribute>
-</define>
-<define name="table-deletion-attlist" combine="interleave">
- <attribute name="table:position">
- <ref name="integer"/>
- </attribute>
-</define>
-<define name="table-deletion-attlist" combine="interleave">
- <optional>
- <attribute name="table:table">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="table-deletion-attlist" combine="interleave">
- <optional>
- <attribute name="table:multi-deletion-spanned">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="table-cut-offs">
- <element name="table:cut-offs">
- <choice>
- <oneOrMore>
- <ref name="table-movement-cut-off"/>
- </oneOrMore>
- <group>
- <ref name="table-insertion-cut-off"/>
- <zeroOrMore>
- <ref name="table-movement-cut-off"/>
- </zeroOrMore>
- </group>
- </choice>
- </element>
-</define>
-<define name="table-insertion-cut-off">
- <element name="table:insertion-cut-off">
- <ref name="table-insertion-cut-off-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-insertion-cut-off-attlist" combine="interleave">
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-insertion-cut-off-attlist" combine="interleave">
- <attribute name="table:position">
- <ref name="integer"/>
- </attribute>
-</define>
-<define name="table-movement-cut-off">
- <element name="table:movement-cut-off">
- <ref name="table-movement-cut-off-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-movement-cut-off-attlist" combine="interleave">
- <choice>
- <attribute name="table:position">
- <ref name="integer"/>
- </attribute>
- <group>
- <attribute name="table:start-position">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:end-position">
- <ref name="integer"/>
- </attribute>
- </group>
- </choice>
-</define>
-<define name="table-movement">
- <element name="table:movement">
- <ref name="common-table-change-attlist"/>
- <ref name="table-source-range-address"/>
- <ref name="table-target-range-address"/>
- <ref name="office-change-info"/>
- <optional>
- <ref name="table-dependencies"/>
- </optional>
- <optional>
- <ref name="table-deletions"/>
- </optional>
- </element>
-</define>
-<define name="table-source-range-address">
- <element name="table:source-range-address">
- <ref name="common-table-range-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-target-range-address">
- <element name="table:target-range-address">
- <ref name="common-table-range-attlist"/>
- <empty/>
- </element>
-</define>
-
-
-<define name="common-table-range-attlist" combine="interleave">
- <choice>
- <group>
- <ref name="common-table-cell-address-attlist"/>
- </group>
- <group>
- <ref name="common-table-cell-range-address-attlist"/>
- </group>
- </choice>
-</define>
-<define name="common-table-cell-address-attlist" combine="interleave">
- <attribute name="table:column">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:row">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:table">
- <ref name="integer"/>
- </attribute>
-</define>
-<define name="common-table-cell-range-address-attlist" combine="interleave">
- <attribute name="table:start-column">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:start-row">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:start-table">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:end-column">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:end-row">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:end-table">
- <ref name="integer"/>
- </attribute>
-</define>
-<define name="table-change-track-table-cell" combine="interleave">
- <element name="table:change-track-table-cell">
- <ref name="table-change-track-table-cell-attlist"/>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="table-change-track-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="table-change-track-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:matrix-covered" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-change-track-table-cell-attlist" combine="interleave">
- <optional>
- <attribute name="table:formula">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:number-matrix-columns-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:number-matrix-rows-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <ref name="common-value-and-type-attlist"/>
- </optional>
-</define>
-<define name="table-cell-content-change">
- <element name="table:cell-content-change">
- <ref name="common-table-change-attlist"/>
- <ref name="table-cell-address"/>
- <ref name="office-change-info"/>
- <optional>
- <ref name="table-dependencies"/>
- </optional>
- <optional>
- <ref name="table-deletions"/>
- </optional>
- <ref name="table-previous"/>
- </element>
-</define>
-<define name="table-cell-address">
- <element name="table:cell-address">
- <ref name="common-table-cell-address-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="table-previous">
- <element name="table:previous">
- <optional>
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
- </optional>
- <ref name="table-change-track-table-cell"/>
- </element>
-</define>
-<define name="common-table-change-attlist" combine="interleave">
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="common-table-change-attlist" combine="interleave">
- <optional>
- <attribute name="table:acceptance-state" a:defaultValue="pending">
- <choice>
- <value>accepted</value>
- <value>rejected</value>
- <value>pending</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-table-change-attlist" combine="interleave">
- <optional>
- <attribute name="table:rejecting-change-id">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-handout-master">
- <element name="style:handout-master">
- <ref name="common-presentation-header-footer-attlist"/>
- <ref name="style-handout-master-attlist"/>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="style-handout-master-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:presentation-page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-handout-master-attlist" combine="interleave">
- <attribute name="style:page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="style-handout-master-attlist" combine="interleave">
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-layer-set">
- <element name="draw:layer-set">
- <zeroOrMore>
- <ref name="draw-layer"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-layer">
- <element name="draw:layer">
- <ref name="draw-layer-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- </element>
-</define>
-<define name="draw-layer-attlist" combine="interleave">
- <attribute name="draw:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="draw-layer-attlist" combine="interleave">
- <optional>
- <attribute name="draw:protected" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-layer-attlist" combine="interleave">
- <optional>
- <attribute name="draw:display" a:defaultValue="always">
- <choice>
- <value>always</value>
- <value>screen</value>
- <value>printer</value>
- <value>none</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-page">
- <element name="draw:page">
- <ref name="common-presentation-header-footer-attlist"/>
- <ref name="draw-page-attlist"/>
- <optional>
- <ref name="office-forms"/>
- </optional>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- <optional>
- <choice>
- <ref name="presentation-animations"/>
- <ref name="animation-element"/>
- </choice>
- </optional>
- <optional>
- <ref name="presentation-notes"/>
- </optional>
- </element>
-</define>
-<define name="draw-page-attlist" combine="interleave">
- <optional>
- <attribute name="draw:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-page-attlist" combine="interleave">
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-page-attlist" combine="interleave">
- <attribute name="draw:master-page-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="draw-page-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:presentation-page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="common-presentation-header-footer-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:use-header-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-presentation-header-footer-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:use-footer-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-presentation-header-footer-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:use-date-time-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-page-attlist" combine="interleave">
- <optional>
- <attribute name="draw:id">
- <ref name="ID"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-page-attlist" combine="interleave">
- <optional>
- <attribute name="draw:nav-order">
- <ref name="IDREFS"/>
- </attribute>
- </optional>
-</define>
-<define name="shape">
- <choice>
- <ref name="draw-rect"/>
- <ref name="draw-line"/>
- <ref name="draw-polyline"/>
- <ref name="draw-polygon"/>
- <ref name="draw-regular-polygon"/>
- <ref name="draw-path"/>
- <ref name="draw-circle"/>
- <ref name="draw-ellipse"/>
- <ref name="draw-g"/>
- <ref name="draw-page-thumbnail"/>
- <ref name="draw-frame"/>
- <ref name="draw-measure"/>
- <ref name="draw-caption"/>
- <ref name="draw-connector"/>
- <ref name="draw-control"/>
- <ref name="dr3d-scene"/>
- <ref name="draw-custom-shape"/>
- </choice>
-</define>
-<define name="draw-rect">
- <element name="draw:rect">
- <ref name="draw-rect-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-rect-attlist" combine="interleave">
- <optional>
- <attribute name="draw:corner-radius">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-line">
- <element name="draw:line">
- <ref name="draw-line-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-line-attlist" combine="interleave">
- <attribute name="svg:x1">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y1">
- <ref name="coordinate"/>
- </attribute>
-</define>
-<define name="draw-line-attlist" combine="interleave">
- <attribute name="svg:x2">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y2">
- <ref name="coordinate"/>
- </attribute>
-</define>
-<define name="draw-polyline">
- <element name="draw:polyline">
- <ref name="common-draw-points-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="common-draw-points-attlist">
- <attribute name="draw:points">
- <ref name="points"/>
- </attribute>
-</define>
-<define name="draw-polygon">
- <element name="draw:polygon">
- <ref name="common-draw-points-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-regular-polygon">
- <element name="draw:regular-polygon">
- <ref name="draw-regular-polygon-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-regular-polygon-attlist" combine="interleave">
- <choice>
- <attribute name="draw:concave">
- <value>false</value>
- </attribute>
- <group>
- <attribute name="draw:concave">
- <value>true</value>
- </attribute>
- <ref name="draw-regular-polygon-sharpness-attlist"/>
- </group>
- </choice>
-</define>
-<define name="draw-regular-polygon-attlist" combine="interleave">
- <attribute name="draw:corners">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="draw-regular-polygon-sharpness-attlist">
- <attribute name="draw:sharpness">
- <ref name="percent"/>
- </attribute>
-</define>
-<define name="draw-path">
- <element name="draw:path">
- <ref name="common-draw-path-data-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="common-draw-path-data-attlist">
- <attribute name="svg:d">
- <ref name="pathData"/>
- </attribute>
-</define>
-<define name="draw-circle">
- <element name="draw:circle">
- <ref name="draw-circle-attlist"/>
- <ref name="common-draw-circle-ellipse-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="common-draw-circle-ellipse-attlist" combine="interleave">
- <optional>
- <attribute name="svg:cx">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:cy">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-circle-attlist" combine="interleave">
- <optional>
- <attribute name="svg:r">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-circle-ellipse-attlist" combine="interleave">
- <optional>
- <attribute name="draw:kind" a:defaultValue="full">
- <choice>
- <value>full</value>
- <value>section</value>
- <value>cut</value>
- <value>arc</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-circle-ellipse-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start-angle">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-circle-ellipse-attlist" combine="interleave">
- <optional>
- <attribute name="draw:end-angle">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-ellipse">
- <element name="draw:ellipse">
- <ref name="common-draw-circle-ellipse-attlist"/>
- <ref name="draw-ellipse-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-ellipse-attlist" combine="interleave">
- <optional>
- <attribute name="svg:rx">
- <ref name="length"/>
- </attribute>
- <attribute name="svg:ry">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector">
- <element name="draw:connector">
- <ref name="draw-connector-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="draw:type" a:defaultValue="standard">
- <choice>
- <value>standard</value>
- <value>lines</value>
- <value>line</value>
- <value>curve</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="svg:x1">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y1">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start-shape">
- <ref name="IDREF"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start-glue-point">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="svg:x2">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y2">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="draw:end-shape">
- <ref name="IDREF"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="draw:end-glue-point">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-connector-attlist" combine="interleave">
- <optional>
- <attribute name="draw:line-skew">
- <list>
- <ref name="length"/>
- <optional>
- <ref name="length"/>
- <optional>
- <ref name="length"/>
- </optional>
- </optional>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="draw-caption">
- <element name="draw:caption">
- <ref name="draw-caption-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-caption-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-point-x">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="draw:caption-point-y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-caption-attlist" combine="interleave">
- <optional>
- <attribute name="draw:corner-radius">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-measure">
- <element name="draw:measure">
- <ref name="draw-measure-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="draw-measure-attlist" combine="interleave">
- <attribute name="svg:x1">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y1">
- <ref name="coordinate"/>
- </attribute>
-</define>
-<define name="draw-measure-attlist" combine="interleave">
- <attribute name="svg:x2">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y2">
- <ref name="coordinate"/>
- </attribute>
-</define>
-<define name="draw-control">
- <element name="draw:control">
- <ref name="draw-control-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-control-attlist" combine="interleave">
- <attribute name="draw:control">
- <ref name="IDREF"/>
- </attribute>
-</define>
-<define name="draw-page-thumbnail">
- <element name="draw:page-thumbnail">
- <ref name="draw-page-thumbnail-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="presentation-shape-attlist"/>
- <ref name="common-draw-shape-with-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- </element>
-</define>
-<define name="draw-page-thumbnail-attlist">
- <optional>
- <attribute name="draw:page-number">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-g">
- <element name="draw:g">
- <ref name="draw-g-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-name-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-text-spreadsheet-shape-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-g-attlist" combine="interleave">
- <optional>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-name-attlist" combine="interleave">
- <optional>
- <attribute name="draw:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-caption-id-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-id">
- <ref name="IDREF"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-position-attlist">
- <optional>
- <attribute name="svg:x">
- <ref name="coordinate"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-size-attlist">
- <optional>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-transform-attlist">
- <optional>
- <attribute name="draw:transform">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-viewbox-attlist">
- <attribute name="svg:viewBox">
- <list>
- <ref name="integer"/>
- <ref name="integer"/>
- <ref name="integer"/>
- <ref name="integer"/>
- </list>
- </attribute>
-</define>
-<define name="common-draw-style-name-attlist">
- <choice>
- <group>
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:class-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
- </group>
- <group>
- <optional>
- <attribute name="presentation:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:class-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
- </group>
- </choice>
-</define>
-<define name="common-draw-text-style-name-attlist">
- <optional>
- <attribute name="draw:text-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-layer-name-attlist">
- <optional>
- <attribute name="draw:layer">
- <data type="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-id-attlist">
- <optional>
- <attribute name="draw:id">
- <ref name="ID"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-z-index-attlist">
- <optional>
- <attribute name="draw:z-index">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="common-text-spreadsheet-shape-attlist" combine="interleave">
- <optional>
- <attribute name="table:end-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:end-x">
- <ref name="coordinate"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:end-y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="common-text-spreadsheet-shape-attlist" combine="interleave">
- <optional>
- <attribute name="table:table-background">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-text-spreadsheet-shape-attlist" combine="interleave">
- <ref name="common-text-anchor-attlist"/>
-</define>
-
-<define name="common-text-anchor-attlist" combine="interleave">
- <optional>
- <attribute name="text:anchor-type">
- <choice>
- <value>page</value>
- <value>frame</value>
- <value>paragraph</value>
- <value>char</value>
- <value>as-char</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-text-anchor-attlist" combine="interleave">
- <optional>
- <attribute name="text:anchor-page-number">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-text">
- <zeroOrMore>
- <choice>
- <ref name="text-p"/>
- <ref name="text-list"/>
- </choice>
- </zeroOrMore>
-</define>
-<define name="common-draw-shape-with-styles-attlist">
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-draw-transform-attlist"/>
- <ref name="common-draw-name-attlist"/>
- <ref name="common-text-spreadsheet-shape-attlist"/>
-</define>
-<define name="common-draw-shape-with-text-and-styles-attlist">
- <ref name="common-draw-shape-with-styles-attlist"/>
- <ref name="common-draw-text-style-name-attlist"/>
-</define>
-<define name="draw-glue-point">
- <element name="draw:glue-point">
- <ref name="draw-glue-point-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-glue-point-attlist" combine="interleave">
- <attribute name="draw:id">
- <ref name="nonNegativeInteger"/>
- </attribute>
-</define>
-<define name="draw-glue-point-attlist" combine="interleave">
- <attribute name="svg:x">
- <choice>
- <ref name="distance"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <attribute name="svg:y">
- <choice>
- <ref name="distance"/>
- <ref name="percent"/>
- </choice>
- </attribute>
-</define>
-<define name="draw-glue-point-attlist" combine="interleave">
- <optional>
- <attribute name="draw:align">
- <choice>
- <value>top-left</value>
- <value>top</value>
- <value>top-right</value>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>bottom-left</value>
- <value>bottom-right</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-glue-points-attlist" combine="interleave">
- <attribute name="draw:escape-direction">
- <choice>
- <value>auto</value>
- <value>left</value>
- <value>right</value>
- <value>up</value>
- <value>down</value>
- <value>horizontal</value>
- <value>vertical</value>
- </choice>
- </attribute>
-</define>
-<define name="svg-title">
- <element name="svg:title">
- <text/>
- </element>
-</define>
-<define name="svg-desc">
- <element name="svg:desc">
- <text/>
- </element>
-</define>
-<define name="draw-frame">
- <element name="draw:frame">
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-rel-size-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <ref name="presentation-shape-attlist"/>
- <ref name="draw-frame-attlist"/>
- <zeroOrMore>
- <choice>
- <ref name="draw-text-box"/>
- <ref name="draw-image"/>
- <ref name="draw-object"/>
- <ref name="draw-object-ole"/>
- <ref name="draw-applet"/>
- <ref name="draw-floating-frame"/>
- <ref name="draw-plugin"/>
- </choice>
- </zeroOrMore>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <optional>
- <ref name="draw-image-map"/>
- </optional>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <choice>
- <ref name="draw-contour-polygon"/>
- <ref name="draw-contour-path"/>
- </choice>
- </optional>
- </element>
-</define>
-<define name="common-draw-rel-size-attlist">
- <ref name="common-draw-size-attlist"/>
- <optional>
- <attribute name="style:rel-width">
- <choice>
- <ref name="percent"/>
- <value>scale</value>
- <value>scale-min</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rel-height">
- <choice>
- <ref name="percent"/>
- <value>scale</value>
- <value>scale-min</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-frame-attlist" combine="interleave">
- <optional>
- <attribute name="draw:copy-of">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-text-box">
- <element name="draw:text-box">
- <ref name="draw-text-box-attlist"/>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-text-box-attlist" combine="interleave">
- <optional>
- <attribute name="draw:chain-next-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-text-box-attlist" combine="interleave">
- <optional>
- <attribute name="draw:corner-radius">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-text-box-attlist" combine="interleave">
- <optional>
- <attribute name="fo:min-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:min-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-text-box-attlist" combine="interleave">
- <optional>
- <attribute name="fo:max-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:max-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-text-box-attlist" combine="interleave">
- <optional>
- <ref name="text-id"/>
- </optional>
-</define>
-<define name="draw-image">
- <element name="draw:image">
- <ref name="draw-image-attlist"/>
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-binary-data"/>
- </choice>
- <ref name="draw-text"/>
- </element>
-</define>
-<define name="common-draw-data-attlist" combine="interleave">
- <group>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <choice>
- <value>simple</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show" a:defaultValue="embed">
- <choice>
- <value>embed</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onLoad">
- <choice>
- <value>onLoad</value>
- </choice>
- </attribute>
- </optional>
- </group>
-</define>
-
-<define name="office-binary-data">
- <element name="office:binary-data">
- <ref name="base64Binary"/>
- </element>
-</define>
-<define name="draw-image-attlist" combine="interleave">
- <optional>
- <attribute name="draw:filter-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-object">
- <element name="draw:object">
- <ref name="draw-object-attlist"/>
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-document"/>
- <ref name="math-math"/>
- </choice>
- </element>
-</define>
-
-<define name="draw-object-ole">
- <element name="draw:object-ole">
- <ref name="draw-object-ole-attlist"/>
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-binary-data"/>
- </choice>
- </element>
-</define>
-<define name="draw-object-attlist" combine="interleave">
- <optional>
- <attribute name="draw:notify-on-update-of-ranges">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-object-ole-attlist" combine="interleave">
- <optional>
- <attribute name="draw:class-id"/>
- </optional>
-</define>
-<define name="draw-applet">
- <element name="draw:applet">
- <ref name="draw-applet-attlist"/>
- <optional>
- <ref name="common-draw-data-attlist"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-param"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-applet-attlist" combine="interleave">
- <optional>
- <attribute name="draw:code"/>
- </optional>
-</define>
-<define name="draw-applet-attlist" combine="interleave">
- <optional>
- <attribute name="draw:object"/>
- </optional>
-</define>
-<define name="draw-applet-attlist" combine="interleave">
- <optional>
- <attribute name="draw:archive"/>
- </optional>
-</define>
-<define name="draw-applet-attlist" combine="interleave">
- <optional>
- <attribute name="draw:may-script" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-plugin">
- <element name="draw:plugin">
- <ref name="draw-plugin-attlist"/>
- <ref name="common-draw-data-attlist"/>
- <zeroOrMore>
- <ref name="draw-param"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-plugin-attlist" combine="interleave">
- <optional>
- <attribute name="draw:mime-type"/>
- </optional>
-</define>
-<define name="draw-param">
- <element name="draw:param">
- <ref name="draw-param-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-param-attlist" combine="interleave">
- <optional>
- <attribute name="draw:name"/>
- </optional>
-</define>
-<define name="draw-param-attlist" combine="interleave">
- <optional>
- <attribute name="draw:value"/>
- </optional>
-</define>
-<define name="draw-floating-frame">
- <element name="draw:floating-frame">
- <ref name="draw-floating-frame-attlist"/>
- <ref name="common-draw-data-attlist"/>
- </element>
-</define>
-<define name="draw-floating-frame-attlist" combine="interleave">
- <optional>
- <attribute name="draw:frame-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-contour-polygon">
- <element name="draw:contour-polygon">
- <ref name="common-contour-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-points-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="draw-contour-path">
- <element name="draw:contour-path">
- <ref name="common-contour-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-path-data-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="common-contour-attlist" combine="interleave">
- <attribute name="draw:recreate-on-edit">
- <ref name="boolean"/>
- </attribute>
-</define>
-<define name="draw-a">
- <element name="draw:a">
- <ref name="draw-a-attlist"/>
- <ref name="draw-frame"/>
- </element>
-</define>
-<define name="draw-a-attlist" combine="interleave">
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <choice>
- <value>onRequest</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-a-attlist" combine="interleave">
- <optional>
- <attribute name="office:target-frame-name">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-a-attlist" combine="interleave">
- <optional>
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-a-attlist" combine="interleave">
- <optional>
- <attribute name="office:title">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-a-attlist" combine="interleave">
- <optional>
- <attribute name="office:server-map" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-image-map">
- <element name="draw:image-map">
- <zeroOrMore>
- <choice>
- <ref name="draw-area-rectangle"/>
- <ref name="draw-area-circle"/>
- <ref name="draw-area-polygon"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-area-rectangle">
- <element name="draw:area-rectangle">
- <ref name="common-draw-area-attlist"/>
- <attribute name="svg:x">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </element>
-</define>
-<define name="draw-area-circle">
- <element name="draw:area-circle">
- <ref name="common-draw-area-attlist"/>
- <attribute name="svg:cx">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:cy">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:r">
- <ref name="length"/>
- </attribute>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </element>
-</define>
-<define name="draw-area-polygon">
- <element name="draw:area-polygon">
- <ref name="common-draw-area-attlist"/>
- <attribute name="svg:x">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-points-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </element>
-</define>
-<define name="common-draw-area-attlist" combine="interleave">
- <optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <choice>
- <value>simple</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:target-frame-name">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-area-attlist" combine="interleave">
- <optional>
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-area-attlist" combine="interleave">
- <optional>
- <attribute name="draw:nohref">
- <choice>
- <value>nohref</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene">
- <element name="dr3d:scene">
- <ref name="dr3d-scene-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-text-spreadsheet-shape-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <zeroOrMore>
- <ref name="dr3d-light"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="shapes3d"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="shapes3d">
- <choice>
- <ref name="dr3d-scene"/>
- <ref name="dr3d-extrude"/>
- <ref name="dr3d-sphere"/>
- <ref name="dr3d-rotate"/>
- <ref name="dr3d-cube"/>
- </choice>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:vrp">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:vpn">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:vup">
- <ref name="vector3D"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:projection">
- <choice>
- <value>parallel</value>
- <value>perspective</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:distance">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:focal-length">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:shadow-slant">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:shade-mode">
- <choice>
- <value>flat</value>
- <value>phong</value>
- <value>gouraud</value>
- <value>draft</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:ambient-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-scene-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:lighting-mode">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-dr3d-transform-attlist">
- <optional>
- <attribute name="dr3d:transform"/>
- </optional>
-</define>
-<define name="dr3d-light">
- <element name="dr3d:light">
- <ref name="dr3d-light-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="dr3d-light-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:diffuse-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-light-attlist" combine="interleave">
- <attribute name="dr3d:direction">
- <ref name="vector3D"/>
- </attribute>
-</define>
-<define name="dr3d-light-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:enabled">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-light-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:specular">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-cube">
- <element name="dr3d:cube">
- <ref name="dr3d-cube-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="dr3d-cube-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:min-edge">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:max-edge">
- <ref name="vector3D"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-sphere">
- <element name="dr3d:sphere">
- <ref name="dr3d-sphere-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="dr3d-sphere-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:center">
- <ref name="vector3D"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-sphere-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:size">
- <ref name="vector3D"/>
- </attribute>
- </optional>
-</define>
-<define name="dr3d-extrude">
- <element name="dr3d:extrude">
- <ref name="common-draw-path-data-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="dr3d-rotate">
- <element name="dr3d:rotate">
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-path-data-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-custom-shape">
- <element name="draw:custom-shape">
- <ref name="draw-custom-shape-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- <optional>
- <ref name="draw-enhanced-geometry"/>
- </optional>
- </element>
-</define>
-<define name="draw-custom-shape-attlist" combine="interleave">
- <optional>
- <attribute name="draw:engine">
- <ref name="namespacedToken"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-custom-shape-attlist" combine="interleave">
- <optional>
- <attribute name="draw:data">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry">
- <element name="draw:enhanced-geometry">
- <ref name="draw-enhanced-geometry-attlist"/>
- <zeroOrMore>
- <ref name="draw-equation"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-handle"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:type" a:defaultValue="non-primitive">
- <ref name="custom-shape-type"/>
- </attribute>
- </optional>
-</define>
-
-<define name="custom-shape-type">
- <choice>
- <value>non-primitive</value>
- <ref name="string"/>
- </choice>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="svg:viewBox">
- <list>
- <ref name="integer"/>
- <ref name="integer"/>
- <ref name="integer"/>
- <ref name="integer"/>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:mirror-vertical" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:mirror-horizontal" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:text-rotate-angle" a:defaultValue="0">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-allowed" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:text-path-allowed" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:concentric-gradient-fill-allowed"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-brightness" a:defaultValue="33%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-depth" a:defaultValue="36pt 0">
- <list>
- <ref name="length"/>
- <ref name="double"/>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-diffusion" a:defaultValue="0%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-number-of-line-segments"
- a:defaultValue="30">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-light-face" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-first-light-harsh"
- a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-second-light-harsh"
- a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-first-light-level"
- a:defaultValue="66%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-second-light-level"
- a:defaultValue="66%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-first-light-direction"
- a:defaultValue="(5 0 1)">
- <ref name="vector3D"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-second-light-direction"
- a:defaultValue="(-5 0 1)">
- <ref name="vector3D"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-metal" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:shade-mode" a:defaultValue="flat">
- <choice>
- <value>flat</value>
- <value>phong</value>
- <value>gouraud</value>
- <value>draft</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-rotation-angle" a:defaultValue="0 0">
- <list>
- <ref name="double"/>
- <ref name="double"/>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-rotation-center">
- <ref name="vector3D"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-shininess" a:defaultValue="50%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-skew" a:defaultValue="50 45">
- <list>
- <ref name="double"/>
- <ref name="double"/>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-specularity" a:defaultValue="0%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:projection" a:defaultValue="parallel">
- <choice>
- <value>parallel</value>
- <value>perspective</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-viewpoint"
- a:defaultValue="3.5cm -3.5cm 25cm">
- <ref name="point3D"/>
- </attribute>
- </optional>
-</define>
-
-<define name="point3D">
- <data type="string"/>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-origin" a:defaultValue="0.5 -0.5">
- <list>
- <ref name="double"/>
- <ref name="double"/>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:extrusion-color" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:enhanced-path">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:path-stretchpoint-x" a:defaultValue="0">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:path-stretchpoint-y" a:defaultValue="0">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:text-areas">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:glue-points">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:glue-point-type" a:defaultValue="none">
- <choice>
- <value>none</value>
- <value>segments</value>
- <value>rectangle</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:glue-point-leaving-directions"/>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:text-path" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:text-path-mode" a:defaultValue="normal">
- <choice>
- <value>normal</value>
- <value>path</value>
- <value>shape</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:text-path-scale" a:defaultValue="path">
- <choice>
- <value>path</value>
- <value>shape</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:text-path-same-letter-heights"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-enhanced-geometry-attlist" combine="interleave">
- <optional>
- <attribute name="draw:modifiers">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-equation">
- <element name="draw:equation">
- <ref name="draw-equation-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-equation-attlist" combine="interleave">
- <optional>
- <attribute name="draw:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-equation-attlist" combine="interleave">
- <optional>
- <attribute name="draw:formula">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle">
- <element name="draw:handle">
- <ref name="draw-handle-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-mirror-vertical" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-mirror-horizontal" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-switched" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <attribute name="draw:handle-position">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-range-x-minimum">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-range-x-maximum">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-range-y-minimum">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-range-y-maximum">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-polar">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-radius-range-minimum">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-handle-attlist" combine="interleave">
- <optional>
- <attribute name="draw:handle-radius-range-maximum">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-shape-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:class">
- <ref name="presentation-classes"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-classes">
- <choice>
- <value>title</value>
- <value>outline</value>
- <value>subtitle</value>
- <value>text</value>
- <value>graphic</value>
- <value>object</value>
- <value>chart</value>
- <value>table</value>
- <value>orgchart</value>
- <value>page</value>
- <value>notes</value>
- <value>handout</value>
- <value>header</value>
- <value>footer</value>
- <value>date-time</value>
- <value>page-number</value>
- </choice>
-</define>
-<define name="presentation-shape-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:placeholder">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-shape-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:user-transformed">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-animations">
- <element name="presentation:animations">
- <zeroOrMore>
- <choice>
- <ref name="presentation-animation-elements"/>
- <ref name="presentation-animation-group"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="presentation-animation-elements">
- <choice>
- <ref name="presentation-show-shape"/>
- <ref name="presentation-show-text"/>
- <ref name="presentation-hide-shape"/>
- <ref name="presentation-hide-text"/>
- <ref name="presentation-dim"/>
- <ref name="presentation-play"/>
- </choice>
-</define>
-<define name="presentation-sound">
- <element name="presentation:sound">
- <ref name="presentation-sound-attlist"/>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <choice>
- <value>simple</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <choice>
- <value>onRequest</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
- <empty/>
- </element>
-</define>
-<define name="presentation-sound-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:play-full">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-show-shape">
- <element name="presentation:show-shape">
- <ref name="common-presentation-effect-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
-</define>
-<define name="common-presentation-effect-attlist" combine="interleave">
- <attribute name="draw:shape-id">
- <ref name="IDREF"/>
- </attribute>
-</define>
-<define name="common-presentation-effect-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:effect" a:defaultValue="none">
- <ref name="presentationEffects"/>
- </attribute>
- </optional>
-</define>
-<define name="presentationEffects">
- <choice>
- <value>none</value>
- <value>fade</value>
- <value>move</value>
- <value>stripes</value>
- <value>open</value>
- <value>close</value>
- <value>dissolve</value>
- <value>wavyline</value>
- <value>random</value>
- <value>lines</value>
- <value>laser</value>
- <value>appear</value>
- <value>hide</value>
- <value>move-short</value>
- <value>checkerboard</value>
- <value>rotate</value>
- <value>stretch</value>
- </choice>
-</define>
-<define name="common-presentation-effect-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:direction" a:defaultValue="none">
- <ref name="presentationEffectDirections"/>
- </attribute>
- </optional>
-</define>
-<define name="presentationEffectDirections">
- <choice>
- <value>none</value>
- <value>from-left</value>
- <value>from-top</value>
- <value>from-right</value>
- <value>from-bottom</value>
- <value>from-center</value>
- <value>from-upper-left</value>
- <value>from-upper-right</value>
- <value>from-lower-left</value>
- <value>from-lower-right</value>
- <value>to-left</value>
- <value>to-top</value>
- <value>to-right</value>
- <value>to-bottom</value>
- <value>to-upper-left</value>
- <value>to-upper-right</value>
- <value>to-lower-right</value>
- <value>to-lower-left</value>
- <value>path</value>
- <value>spiral-inward-left</value>
- <value>spiral-inward-right</value>
- <value>spiral-outward-left</value>
- <value>spiral-outward-right</value>
- <value>vertical</value>
- <value>horizontal</value>
- <value>to-center</value>
- <value>clockwise</value>
- <value>counter-clockwise</value>
- </choice>
-</define>
-<define name="common-presentation-effect-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:speed" a:defaultValue="medium">
- <ref name="presentationSpeeds"/>
- </attribute>
- </optional>
-</define>
-<define name="presentationSpeeds">
- <choice>
- <value>slow</value>
- <value>medium</value>
- <value>fast</value>
- </choice>
-</define>
-<define name="common-presentation-effect-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:delay">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="common-presentation-effect-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:start-scale" a:defaultValue="100%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="common-presentation-effect-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:path-id"/>
- </optional>
-</define>
-<define name="presentation-show-text">
- <element name="presentation:show-text">
- <ref name="common-presentation-effect-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
-</define>
-<define name="presentation-hide-shape">
- <element name="presentation:hide-shape">
- <ref name="common-presentation-effect-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
-</define>
-<define name="presentation-hide-text">
- <element name="presentation:hide-text">
- <ref name="common-presentation-effect-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
-</define>
-<define name="presentation-dim">
- <element name="presentation:dim">
- <ref name="presentation-dim-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
-</define>
-<define name="presentation-dim-attlist" combine="interleave">
- <attribute name="draw:shape-id">
- <ref name="IDREF"/>
- </attribute>
-</define>
-<define name="presentation-dim-attlist" combine="interleave">
- <attribute name="draw:color">
- <ref name="color"/>
- </attribute>
-</define>
-<define name="presentation-play">
- <element name="presentation:play">
- <ref name="presentation-play-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="presentation-play-attlist" combine="interleave">
- <attribute name="draw:shape-id">
- <ref name="IDREF"/>
- </attribute>
- <optional>
- <attribute name="presentation:speed" a:defaultValue="medium">
- <ref name="presentationSpeeds"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-animation-group">
- <element name="presentation:animation-group">
- <zeroOrMore>
- <ref name="presentation-animation-elements"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="common-anim-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:node-type" a:defaultValue="default">
- <choice>
- <value>default</value>
- <value>on-click</value>
- <value>with-previous</value>
- <value>after-previous</value>
- <value>timing-root</value>
- <value>main-sequence</value>
- <value>interactive-sequence</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:preset-id">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:preset-sub-type">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:preset-class" a:defaultValue="custom">
- <choice>
- <value>custom</value>
- <value>entrance</value>
- <value>exit</value>
- <value>emphasis</value>
- <value>motion-path</value>
- <value>ole-action</value>
- <value>media-call</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:master-element">
- <ref name="IDREF"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:group-id">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-event-listener">
- <element name="presentation:event-listener">
- <ref name="presentation-event-listener-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <attribute name="script:event-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <attribute name="presentation:action">
- <choice>
- <value>none</value>
- <value>previous-page</value>
- <value>next-page</value>
- <value>first-page</value>
- <value>last-page</value>
- <value>hide</value>
- <value>stop</value>
- <value>execute</value>
- <value>show</value>
- <value>verb</value>
- <value>fade-out</value>
- <value>sound</value>
- </choice>
- </attribute>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:effect" a:defaultValue="none">
- <ref name="presentationEffects"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:direction" a:defaultValue="none">
- <ref name="presentationEffectDirections"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:speed" a:defaultValue="medium">
- <ref name="presentationSpeeds"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:start-scale" a:defaultValue="100%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <choice>
- <value>simple</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show" a:defaultValue="embed">
- <choice>
- <value>embed</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <choice>
- <value>onRequest</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="presentation-event-listener-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:verb">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="presentation:header">
- <empty/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="presentation:footer">
- <empty/>
- </element>
-</define>
-<define name="paragraph-content" combine="choice">
- <element name="presentation:date-time">
- <empty/>
- </element>
-</define>
-<define name="presentation-decls">
- <zeroOrMore>
- <ref name="presentation-decl"/>
- </zeroOrMore>
-</define>
-<define name="presentation-decl" combine="choice">
- <element name="presentation:header-decl">
- <ref name="presentation-header-decl-attlist"/>
- <text/>
- </element>
-</define>
-<define name="presentation-header-decl-attlist" combine="interleave">
- <attribute name="presentation:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="presentation-decl" combine="choice">
- <element name="presentation:footer-decl">
- <ref name="presentation-footer-decl-attlist"/>
- <text/>
- </element>
-</define>
-<define name="presentation-footer-decl-attlist" combine="interleave">
- <attribute name="presentation:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="presentation-decl" combine="choice">
- <element name="presentation:date-time-decl">
- <ref name="presentation-date-time-decl-attlist"/>
- <text/>
- </element>
-</define>
-<define name="presentation-date-time-decl-attlist" combine="interleave">
- <attribute name="presentation:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="presentation-date-time-decl-attlist" combine="interleave">
- <attribute name="presentation:source">
- <choice>
- <value>fixed</value>
- <value>current-date</value>
- </choice>
- </attribute>
-</define>
-<define name="presentation-date-time-decl-attlist" combine="interleave">
- <optional>
- <attribute name="style:data-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings">
- <optional>
- <element name="presentation:settings">
- <ref name="presentation-settings-attlist"/>
- <zeroOrMore>
- <ref name="presentation-show"/>
- </zeroOrMore>
- </element>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:start-page">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:show">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:full-screen" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:endless" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:pause">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:show-logo" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:force-manual" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:mouse-visible" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:mouse-as-pen" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:start-with-navigator"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:animations" a:defaultValue="enabled">
- <choice>
- <value>enabled</value>
- <value>disabled</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:transition-on-click"
- a:defaultValue="enabled">
- <choice>
- <value>enabled</value>
- <value>disabled</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:stay-on-top" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-settings-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:show-end-of-presentation-slide"
- a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-show">
- <element name="presentation:show">
- <ref name="presentation-show-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="presentation-show-attlist" combine="interleave">
- <attribute name="presentation:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="presentation-show-attlist" combine="interleave">
- <attribute name="presentation:pages"/>
-</define>
-<define name="chart-chart">
- <element name="chart:chart">
- <ref name="chart-chart-attlist"/>
- <optional>
- <ref name="chart-title"/>
- </optional>
- <optional>
- <ref name="chart-subtitle"/>
- </optional>
- <optional>
- <ref name="chart-footer"/>
- </optional>
- <optional>
- <ref name="chart-legend"/>
- </optional>
- <ref name="chart-plot-area"/>
- <optional>
- <ref name="table-table"/>
- </optional>
- </element>
-</define>
-<define name="chart-chart-attlist" combine="interleave">
- <attribute name="chart:class">
- <ref name="namespacedToken"/>
- </attribute>
-</define>
-<define name="chart-chart-attlist" combine="interleave">
- <ref name="common-draw-size-attlist"/>
-</define>
-<define name="chart-chart-attlist" combine="interleave">
- <optional>
- <attribute name="chart:column-mapping">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-chart-attlist" combine="interleave">
- <optional>
- <attribute name="chart:row-mapping">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-chart-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-title">
- <element name="chart:title">
- <ref name="chart-title-attlist"/>
- <optional>
- <ref name="text-p"/>
- </optional>
- </element>
-</define>
-<define name="chart-title-attlist" combine="interleave">
- <optional>
- <attribute name="table:cell-range">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-title-attlist" combine="interleave">
- <ref name="common-draw-position-attlist"/>
-</define>
-<define name="chart-title-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-subtitle">
- <element name="chart:subtitle">
- <ref name="chart-title-attlist"/>
- <optional>
- <ref name="text-p"/>
- </optional>
- </element>
-</define>
-<define name="chart-footer">
- <element name="chart:footer">
- <ref name="chart-title-attlist"/>
- <optional>
- <ref name="text-p"/>
- </optional>
- </element>
-</define>
-<define name="chart-legend">
- <element name="chart:legend">
- <ref name="chart-legend-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="chart-legend-attlist" combine="interleave">
- <choice>
- <group>
- <attribute name="chart:legend-position">
- <choice>
- <value>start</value>
- <value>end</value>
- <value>top</value>
- <value>bottom</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="chart:legend-align">
- <choice>
- <value>start</value>
- <value>center</value>
- <value>end</value>
- </choice>
- </attribute>
- </optional>
- </group>
- <attribute name="chart:legend-position">
- <choice>
- <value>top-start</value>
- <value>bottom-start</value>
- <value>top-end</value>
- <value>bottom-end</value>
- </choice>
- </attribute>
- <empty/>
- </choice>
-</define>
-<define name="chart-legend-attlist" combine="interleave">
- <ref name="common-draw-position-attlist"/>
-</define>
-<define name="chart-legend-attlist" combine="interleave">
- <choice>
- <attribute name="style:legend-expansion">
- <choice>
- <value>wide</value>
- <value>high</value>
- <value>balanced</value>
- </choice>
- </attribute>
- <group>
- <attribute name="style:legend-expansion">
- <value>custom</value>
- </attribute>
- <attribute name="style:legend-expansion-aspect-ratio">
- <ref name="double"/>
- </attribute>
- </group>
- <empty/>
- </choice>
-</define>
-<define name="chart-legend-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-plot-area">
- <element name="chart:plot-area">
- <ref name="chart-plot-area-attlist"/>
- <zeroOrMore>
- <ref name="dr3d-light"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="chart-axis"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="chart-series"/>
- </zeroOrMore>
- <optional>
- <ref name="chart-stock-gain-marker"/>
- </optional>
- <optional>
- <ref name="chart-stock-loss-marker"/>
- </optional>
- <optional>
- <ref name="chart-stock-range-line"/>
- </optional>
- <optional>
- <ref name="chart-wall"/>
- </optional>
- <optional>
- <ref name="chart-floor"/>
- </optional>
- </element>
-</define>
-<define name="chart-plot-area-attlist" combine="interleave">
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
-</define>
-<define name="chart-plot-area-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-plot-area-attlist" combine="interleave">
- <optional>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-plot-area-attlist" combine="interleave">
- <optional>
- <attribute name="chart:data-source-has-labels" a:defaultValue="none">
- <choice>
- <value>none</value>
- <value>row</value>
- <value>column</value>
- <value>both</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="chart-plot-area-attlist" combine="interleave">
- <ref name="dr3d-scene-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
-</define>
-<define name="chart-wall">
- <element name="chart:wall">
- <ref name="chart-wall-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="chart-wall-attlist" combine="interleave">
- <optional>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-wall-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-floor">
- <element name="chart:floor">
- <ref name="chart-floor-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="chart-floor-attlist" combine="interleave">
- <optional>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-floor-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-axis">
- <element name="chart:axis">
- <ref name="chart-axis-attlist"/>
- <optional>
- <ref name="chart-title"/>
- </optional>
- <optional>
- <ref name="chart-categories"/>
- </optional>
- <zeroOrMore>
- <ref name="chart-grid"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="chart-axis-attlist" combine="interleave">
- <attribute name="chart:dimension">
- <choice>
- <value>x</value>
- <value>y</value>
- <value>z</value>
- </choice>
- </attribute>
-</define>
-<define name="chart-axis-attlist" combine="interleave">
- <optional>
- <attribute name="chart:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-axis-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-grid">
- <element name="chart:grid">
- <ref name="chart-grid-attlist"/>
- </element>
-</define>
-<define name="chart-grid-attlist" combine="interleave">
- <optional>
- <attribute name="chart:class" a:defaultValue="major">
- <choice>
- <value>major</value>
- <value>minor</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="chart-grid-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-series">
- <element name="chart:series">
- <ref name="chart-series-attlist"/>
- <zeroOrMore>
- <ref name="chart-domain"/>
- </zeroOrMore>
- <optional>
- <ref name="chart-mean-value"/>
- </optional>
- <optional>
- <ref name="chart-regression-curve"/>
- </optional>
- <optional>
- <ref name="chart-error-indicator"/>
- </optional>
- <zeroOrMore>
- <ref name="chart-data-point"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="chart-series-attlist" combine="interleave">
- <optional>
- <attribute name="chart:values-cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-series-attlist" combine="interleave">
- <optional>
- <attribute name="chart:label-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-series-attlist" combine="interleave">
- <optional>
- <attribute name="chart:class">
- <ref name="namespacedToken"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-series-attlist" combine="interleave">
- <optional>
- <attribute name="chart:attached-axis">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-series-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-domain">
- <element name="chart:domain">
- <optional>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="chart-categories">
- <element name="chart:categories">
- <optional>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
- </element>
-</define>
-<define name="chart-data-point">
- <element name="chart:data-point">
- <ref name="chart-data-point-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="chart-data-point-attlist" combine="interleave">
- <optional>
- <attribute name="chart:repeated">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-data-point-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-
-<define name="chart-mean-value">
- <element name="chart:mean-value">
- <ref name="chart-mean-value-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="chart-mean-value-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-error-indicator">
- <element name="chart:error-indicator">
- <ref name="chart-error-indicator-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="chart-error-indicator-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-regression-curve">
- <element name="chart:regression-curve">
- <ref name="chart-regression-curve-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="chart-regression-curve-attlist" combine="interleave">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="chart-stock-gain-marker">
- <element name="chart:stock-gain-marker">
- <ref name="common-stock-marker-attlist"/>
- </element>
-</define>
-<define name="chart-stock-loss-marker">
- <element name="chart:stock-loss-marker">
- <ref name="common-stock-marker-attlist"/>
- </element>
-</define>
-<define name="chart-stock-range-line">
- <element name="chart:stock-range-line">
- <ref name="common-stock-marker-attlist"/>
- </element>
-</define>
-<define name="common-stock-marker-attlist">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="office-forms">
- <optional>
- <element name="office:forms">
- <ref name="office-forms-attlist"/>
- <zeroOrMore>
- <choice>
- <ref name="form-form"/>
- <ref name="xforms-model"/>
- </choice>
- </zeroOrMore>
- </element>
- </optional>
-</define>
-<define name="office-forms-attlist" combine="interleave">
- <optional>
- <attribute name="form:automatic-focus" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="office-forms-attlist" combine="interleave">
- <optional>
- <attribute name="form:apply-design-mode" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form">
- <element name="form:form">
- <ref name="common-form-control-attlist"/>
- <ref name="form-form-attlist"/>
- <optional>
- <ref name="form-properties"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <choice>
- <ref name="controls"/>
- <ref name="form-form"/>
- </choice>
- </zeroOrMore>
- <optional>
- <ref name="form-connection-resource"/>
- </optional>
- </element>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <value>onRequest</value>
- </attribute>
- </optional>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="office:target-frame" a:defaultValue="_blank">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:method" a:defaultValue="get">
- <choice>
- <value>get</value>
- <value>post</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:enctype"
- a:defaultValue="application/x-www-form-urlencoded">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:allow-deletes" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:allow-inserts" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:allow-updates" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:apply-filter" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:command-type" a:defaultValue="command">
- <choice>
- <value>table</value>
- <value>query</value>
- <value>command</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:command"/>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:datasource">
- <choice>
- <ref name="anyURI"/>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:master-fields">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:detail-fields">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:escape-processing" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:filter">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:ignore-result" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:navigation-mode">
- <ref name="navigation"/>
- </attribute>
- </optional>
-</define>
-
-<define name="navigation">
- <choice>
- <value>none</value>
- <value>current</value>
- <value>parent</value>
- </choice>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:order">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-form-attlist" combine="interleave">
- <optional>
- <attribute name="form:tab-cycle">
- <ref name="tab-cycles"/>
- </attribute>
- </optional>
-</define>
-<define name="tab-cycles">
- <choice>
- <value>records</value>
- <value>current</value>
- <value>page</value>
- </choice>
-</define>
-<define name="form-connection-resource">
- <element name="form:connection-resource">
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <empty/>
- </element>
-</define>
-<define name="xforms-model">
- <element name="xforms:model">
- <ref name="anyAttListOrElements"/>
- </element>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:text">
- <ref name="form-text-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="controls" combine="choice">
- <ref name="column-controls"/>
-</define>
-<define name="form-text-attlist">
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
-</define>
-<define name="form-control-attlist">
- <ref name="common-form-control-attlist"/>
- <ref name="common-control-id-attlist"/>
- <ref name="xforms-bind-attlist"/>
-</define>
-<define name="common-form-control-content">
- <optional>
- <ref name="form-properties"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:textarea">
- <ref name="form-textarea-attlist"/>
- <ref name="common-form-control-content"/>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="form-textarea-attlist">
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
-</define>
-<define name="controls" combine="choice">
- <element name="form:password">
- <ref name="form-password-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-password-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
-</define>
-<define name="form-password-attlist" combine="interleave">
- <optional>
- <attribute name="form:echo-char" a:defaultValue="*">
- <ref name="character"/>
- </attribute>
- </optional>
-</define>
-<define name="controls" combine="choice">
- <element name="form:file">
- <ref name="form-file-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-file-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:formatted-text">
- <ref name="form-formatted-text-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-formatted-text-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
-</define>
-<define name="form-formatted-text-attlist" combine="interleave">
- <optional>
- <attribute name="form:max-value">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-formatted-text-attlist" combine="interleave">
- <optional>
- <attribute name="form:min-value">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-formatted-text-attlist" combine="interleave">
- <optional>
- <attribute name="form:validation" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:number">
- <ref name="form-number-attlist"/>
- <ref name="common-numeric-control-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="common-numeric-control-attlist">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
-</define>
-<define name="form-number-attlist" combine="interleave">
- <optional>
- <attribute name="form:value">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="form-number-attlist" combine="interleave">
- <optional>
- <attribute name="form:current-value">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="form-number-attlist" combine="interleave">
- <optional>
- <attribute name="form:min-value">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="form-number-attlist" combine="interleave">
- <optional>
- <attribute name="form:max-value">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:date">
- <ref name="form-date-attlist"/>
- <ref name="common-numeric-control-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="controls" combine="choice">
- <element name="form:time">
- <ref name="form-time-attlist"/>
- <ref name="common-numeric-control-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-date-attlist" combine="interleave">
- <optional>
- <attribute name="form:value">
- <ref name="date"/>
- </attribute>
- </optional>
-</define>
-<define name="form-time-attlist" combine="interleave">
- <optional>
- <attribute name="form:value">
- <ref name="time"/>
- </attribute>
- </optional>
-</define>
-<define name="form-date-attlist" combine="interleave">
- <optional>
- <attribute name="form:current-value">
- <ref name="date"/>
- </attribute>
- </optional>
-</define>
-<define name="form-time-attlist" combine="interleave">
- <optional>
- <attribute name="form:current-value">
- <ref name="time"/>
- </attribute>
- </optional>
-</define>
-<define name="form-date-attlist" combine="interleave">
- <optional>
- <attribute name="form:min-value">
- <ref name="date"/>
- </attribute>
- </optional>
-</define>
-<define name="form-time-attlist" combine="interleave">
- <optional>
- <attribute name="form:min-value">
- <ref name="time"/>
- </attribute>
- </optional>
-</define>
-<define name="form-date-attlist" combine="interleave">
- <optional>
- <attribute name="form:max-value">
- <ref name="date"/>
- </attribute>
- </optional>
-</define>
-<define name="form-time-attlist" combine="interleave">
- <optional>
- <attribute name="form:max-value">
- <ref name="time"/>
- </attribute>
- </optional>
-</define>
-<define name="controls" combine="choice">
- <element name="form:fixed-text">
- <ref name="form-fixed-text-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-fixed-text-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="for"/>
- <ref name="common-disabled-attlist"/>
- <ref name="label"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-title-attlist"/>
-</define>
-<define name="form-fixed-text-attlist" combine="interleave">
- <optional>
- <attribute name="form:multi-line" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:combobox">
- <ref name="form-combobox-attlist"/>
- <ref name="common-form-control-content"/>
- <zeroOrMore>
- <ref name="form-item"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="form-combobox-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="dropdown"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="size"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
- <ref name="list-source"/>
- <ref name="list-source-type"/>
-</define>
-<define name="form-combobox-attlist" combine="interleave">
- <optional>
- <attribute name="form:auto-complete">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-item">
- <element name="form:item">
- <ref name="form-item-attlist"/>
- <text/>
- </element>
-</define>
-<define name="form-item-attlist" combine="interleave">
- <ref name="label"/>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:listbox">
- <ref name="form-listbox-attlist"/>
- <ref name="common-form-control-content"/>
- <zeroOrMore>
- <ref name="form-option"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="form-listbox-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="dropdown"/>
- <ref name="common-printable-attlist"/>
- <ref name="size"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="bound-column"/>
- <ref name="common-data-field-attlist"/>
- <ref name="list-source"/>
- <ref name="list-source-type"/>
-</define>
-<define name="form-listbox-attlist" combine="interleave">
- <optional>
- <attribute name="form:multiple" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-listbox-attlist" combine="interleave">
- <optional>
- <attribute name="form:xforms-list-source">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-option">
- <element name="form:option">
- <ref name="form-option-attlist"/>
- <text/>
- </element>
-</define>
-<define name="form-option-attlist" combine="interleave">
- <ref name="current-selected"/>
- <ref name="selected"/>
- <ref name="label"/>
- <ref name="common-value-attlist"/>
-</define>
-<define name="controls" combine="choice">
- <element name="form:button">
- <ref name="form-button-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-button-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="button-type"/>
- <ref name="common-disabled-attlist"/>
- <ref name="label"/>
- <ref name="image-data"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="target-frame"/>
- <ref name="target-location"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-form-relative-image-position-attlist"/>
-</define>
-<define name="form-button-attlist" combine="interleave">
- <optional>
- <attribute name="form:default-button" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-button-attlist" combine="interleave">
- <optional>
- <attribute name="form:toggle" a:default-value="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-button-attlist" combine="interleave">
- <optional>
- <attribute name="form:focus-on-click">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-button-attlist" combine="interleave">
- <optional>
- <attribute name="form:xforms-submission">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="controls" combine="choice">
- <element name="form:image">
- <ref name="form-image-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-image-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="button-type"/>
- <ref name="common-disabled-attlist"/>
- <ref name="image-data"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="target-frame"/>
- <ref name="target-location"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
-</define>
-<define name="column-controls" combine="choice">
- <element name="form:checkbox">
- <ref name="form-checkbox-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-checkbox-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="label"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-data-field-attlist"/>
- <ref name="common-form-visual-effect-attlist"/>
- <ref name="common-form-relative-image-position-attlist"/>
-</define>
-<define name="states">
- <choice>
- <value>unchecked</value>
- <value>checked</value>
- <value>unknown</value>
- </choice>
-</define>
-<define name="form-checkbox-attlist" combine="interleave">
- <optional>
- <attribute name="form:current-state">
- <ref name="states"/>
- </attribute>
- </optional>
-</define>
-<define name="form-checkbox-attlist" combine="interleave">
- <optional>
- <attribute name="form:is-tristate" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="form-checkbox-attlist" combine="interleave">
- <optional>
- <attribute name="form:state" a:defaultValue="unchecked">
- <ref name="states"/>
- </attribute>
- </optional>
-</define>
-<define name="controls" combine="choice">
- <element name="form:radio">
- <ref name="form-radio-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-radio-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="current-selected"/>
- <ref name="common-disabled-attlist"/>
- <ref name="label"/>
- <ref name="common-printable-attlist"/>
- <ref name="selected"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-data-field-attlist"/>
- <ref name="common-form-visual-effect-attlist"/>
- <ref name="common-form-relative-image-position-attlist"/>
-</define>
-<define name="controls" combine="choice">
- <element name="form:frame">
- <ref name="form-frame-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-frame-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="for"/>
- <ref name="label"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-title-attlist"/>
-</define>
-<define name="controls" combine="choice">
- <element name="form:image-frame">
- <ref name="form-image-frame-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-image-frame-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="image-data"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-data-field-attlist"/>
-</define>
-<define name="controls" combine="choice">
- <element name="form:hidden">
- <ref name="form-hidden-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-hidden-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-value-attlist"/>
-</define>
-<define name="controls" combine="choice">
- <element name="form:grid">
- <ref name="form-grid-attlist"/>
- <ref name="common-form-control-content"/>
- <zeroOrMore>
- <ref name="form-column"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="form-grid-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
-</define>
-<define name="form-column">
- <element name="form:column">
- <ref name="form-column-attlist"/>
- <oneOrMore>
- <ref name="column-controls"/>
- </oneOrMore>
- </element>
-</define>
-<define name="form-column-attlist" combine="interleave">
- <ref name="common-form-control-attlist"/>
- <ref name="label"/>
- <ref name="text-style-name"/>
-</define>
-<define name="text-style-name">
- <optional>
- <attribute name="form:text-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="controls" combine="choice">
- <element name="form:value-range">
- <ref name="form-value-range-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-value-range-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
-</define>
-<define name="form-value-range-attlist" combine="interleave">
- <optional>
- <attribute name="form:max-value">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-value-range-attlist" combine="interleave">
- <optional>
- <attribute name="form:min-value">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="form-value-range-attlist" combine="interleave">
- <optional>
- <attribute name="form:step-size" a:defaultName="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="form-value-range-attlist" combine="interleave">
- <optional>
- <attribute name="form:page-step-size">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="form-value-range-attlist" combine="interleave">
- <optional>
- <attribute name="form:delay-for-repeat">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="form-value-range-attlist" combine="interleave">
- <optional>
- <attribute name="form:orientation">
- <choice>
- <value>horizontal</value>
- <value>vertical</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="controls" combine="choice">
- <element name="form:generic-control">
- <ref name="form-generic-control-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
-</define>
-<define name="form-generic-control-attlist" combine="interleave">
- <ref name="form-control-attlist"/>
-</define>
-<define name="common-form-control-attlist" combine="interleave">
- <optional>
- <attribute name="form:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-form-control-attlist" combine="interleave">
- <optional>
- <attribute name="form:control-implementation">
- <ref name="namespacedToken"/>
- </attribute>
- </optional>
-</define>
-<define name="xforms-bind-attlist">
- <optional>
- <attribute name="xforms:bind">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="types">
- <choice>
- <value>submit</value>
- <value>reset</value>
- <value>push</value>
- <value>url</value>
- </choice>
-</define>
-<define name="button-type">
- <optional>
- <attribute name="form:button-type" a:defaultValue="push">
- <ref name="types"/>
- </attribute>
- </optional>
-</define>
-<define name="common-control-id-attlist">
- <attribute name="form:id">
- <ref name="ID"/>
- </attribute>
-</define>
-<define name="current-selected">
- <optional>
- <attribute name="form:current-selected" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-value-attlist">
- <optional>
- <attribute name="form:value">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-current-value-attlist">
- <optional>
- <attribute name="form:current-value">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-disabled-attlist">
- <optional>
- <attribute name="form:disabled" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="dropdown">
- <optional>
- <attribute name="form:dropdown" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="for">
- <optional>
- <attribute name="form:for">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="image-data">
- <optional>
- <attribute name="form:image-data">
- <ref name="anyURI"/>
- </attribute>
- </optional>
-</define>
-<define name="label">
- <optional>
- <attribute name="form:label">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-maxlength-attlist">
- <optional>
- <attribute name="form:max-length">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="common-printable-attlist">
- <optional>
- <attribute name="form:printable" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-readonly-attlist">
- <optional>
- <attribute name="form:readonly" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="selected">
- <optional>
- <attribute name="form:selected" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="size">
- <optional>
- <attribute name="form:size">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="common-tab-attlist" combine="interleave">
- <optional>
- <attribute name="form:tab-index" a:defaultValue="0">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="common-tab-attlist" combine="interleave">
- <optional>
- <attribute name="form:tab-stop" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="target-frame">
- <optional>
- <attribute name="office:target-frame" a:defaultValue="_blank">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
-</define>
-<define name="target-location">
- <optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- </optional>
-</define>
-<define name="common-title-attlist">
- <optional>
- <attribute name="form:title"/>
- </optional>
-</define>
-<define name="common-form-visual-effect-attlist" combine="interleave">
- <optional>
- <attribute name="form:visual-effect">
- <choice>
- <value>flat</value>
- <value>3d</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-form-relative-image-position-attlist"
- combine="interleave">
- <choice>
- <optional>
- <attribute name="form:image-position" a:defaultValue="center">
- <value>center</value>
- </attribute>
- </optional>
- <group>
- <attribute name="form:image-position">
- <choice>
- <value>start</value>
- <value>end</value>
- <value>top</value>
- <value>bottom</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="form:image-align" a:defaultValue="center">
- <choice>
- <value>start</value>
- <value>center</value>
- <value>end</value>
- </choice>
- </attribute>
- </optional>
- </group>
- </choice>
-</define>
-<define name="bound-column">
- <optional>
- <attribute name="form:bound-column">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-convert-empty-attlist">
- <optional>
- <attribute name="form:convert-empty-to-null" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-data-field-attlist">
- <optional>
- <attribute name="form:data-field">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="list-source">
- <optional>
- <attribute name="form:list-source">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="list-source-type">
- <optional>
- <attribute name="form:list-source-type">
- <choice>
- <value>table</value>
- <value>query</value>
- <value>sql</value>
- <value>sql-pass-through</value>
- <value>value-list</value>
- <value>table-fields</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="form-properties">
- <element name="form:properties">
- <oneOrMore>
- <ref name="form-property"/>
- </oneOrMore>
- </element>
-</define>
-<define name="form-property" combine="choice">
- <element name="form:property">
- <ref name="form-property-name"/>
- <ref name="form-property-value-and-type-attlist"/>
- </element>
-</define>
-<define name="form-property-name" combine="interleave">
- <attribute name="form:property-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="form-property-value-and-type-attlist" combine="interleave">
- <choice>
- <ref name="common-value-and-type-attlist"/>
- <attribute name="office:value-type">
- <value>void</value>
- </attribute>
- </choice>
-</define>
-<define name="form-property" combine="choice">
- <element name="form:list-property">
- <ref name="form-property-name"/>
- <ref name="form-property-type-and-value-list"/>
- </element>
-</define>
-<define name="form-property-type-and-value-list">
- <choice>
- <group>
- <attribute name="office:value-type">
- <value>float</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>percentage</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>currency</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- <optional>
- <attribute name="office:currency">
- <ref name="string"/>
- </attribute>
- </optional>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>date</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>time</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:time-value">
- <ref name="duration"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>boolean</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:boolean-value">
- <ref name="boolean"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>string</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:string-value">
- <ref name="string"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <attribute name="office:value-type">
- <value>void</value>
- </attribute>
- </choice>
-</define>
-<define name="office-annotation">
- <element name="office:annotation">
- <ref name="office-annotation-attlist"/>
- <ref name="draw-caption-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="dc-creator"/>
- </optional>
- <optional>
- <ref name="dc-date"/>
- </optional>
- <optional>
- <ref name="meta-date-string"/>
- </optional>
- <zeroOrMore>
- <choice>
- <ref name="text-p"/>
- <ref name="text-list"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="office-annotation-attlist" combine="interleave">
- <optional>
- <attribute name="office:display">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="meta-date-string">
- <element name="meta:date-string">
- <ref name="string"/>
- </element>
-</define>
-<define name="common-num-format-prefix-suffix-attlist" combine="interleave">
- <optional>
- <attribute name="style:num-prefix">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:num-suffix">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-num-format-attlist" combine="interleave">
- <choice>
- <attribute name="style:num-format">
- <choice>
- <value>1</value>
- <value>i</value>
- <value>I</value>
- <ref name="string"/>
- <empty/>
- </choice>
- </attribute>
- <group>
- <attribute name="style:num-format">
- <choice>
- <value>a</value>
- <value>A</value>
- </choice>
- </attribute>
- <ref name="style-num-letter-sync-attlist"/>
- </group>
- <empty/>
- </choice>
-</define>
-<define name="style-num-letter-sync-attlist" combine="interleave">
- <optional>
- <attribute name="style:num-letter-sync">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="office-change-info">
- <element name="office:change-info">
- <ref name="dc-creator"/>
- <ref name="dc-date"/>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="office-event-listeners">
- <element name="office:event-listeners">
- <zeroOrMore>
- <choice>
- <ref name="script-event-listener"/>
- <ref name="presentation-event-listener"/>
- </choice>
- </zeroOrMore>
- </element>
-</define>
-<define name="script-event-listener" combine="interleave">
- <element name="script:event-listener">
- <ref name="script-event-listener-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="script-event-listener-attlist" combine="interleave">
- <attribute name="script:event-name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="script-event-listener-attlist" combine="interleave">
- <attribute name="script:language">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="script-event-listener-attlist" combine="interleave">
- <choice>
- <attribute name="script:macro-name">
- <ref name="string"/>
- </attribute>
- <group>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <value>onRequest</value>
- </attribute>
- </optional>
- </group>
- </choice>
-</define>
-<define name="math-math">
- <element name="math:math">
- <ref name="mathMarkup"/>
- </element>
-</define>
-
-<!-- To avoid inclusion of the complete MathML schema, anything -->
-<!-- is allowed within a math:math top-level element -->
-<define name="mathMarkup">
- <zeroOrMore>
- <choice>
- <attribute>
- <anyName/>
- </attribute>
- <text/>
- <element>
- <anyName/>
- <ref name="mathMarkup"/>
- </element>
- </choice>
- </zeroOrMore>
-</define>
-<define name="text-dde-connection-decl">
- <element name="text:dde-connection-decl">
- <ref name="text-dde-connection-decl-attlist"/>
- <ref name="common-dde-connection-decl-attlist"/>
- </element>
-</define>
-<define name="text-dde-connection-decl-attlist" combine="interleave">
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="common-dde-connection-decl-attlist" combine="interleave">
- <attribute name="office:dde-application">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="common-dde-connection-decl-attlist" combine="interleave">
- <attribute name="office:dde-topic">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="common-dde-connection-decl-attlist" combine="interleave">
- <attribute name="office:dde-item">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="common-dde-connection-decl-attlist" combine="interleave">
- <optional>
- <attribute name="office:automatic-update" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="table-dde-link">
- <element name="table:dde-link">
- <ref name="office-dde-source"/>
- <ref name="table-table"/>
- </element>
-</define>
-<define name="office-dde-source">
- <element name="office:dde-source">
- <ref name="office-dde-source-attlist"/>
- <ref name="common-dde-connection-decl-attlist"/>
- </element>
-</define>
-<define name="office-dde-source-attlist" combine="interleave">
- <optional>
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="office-dde-source-attlist" combine="interleave">
- <optional>
- <attribute name="office:conversion-mode"
- a:defaultValue="into-default-style-data-style">
- <choice>
- <value>into-default-style-data-style</value>
- <value>into-english-number</value>
- <value>keep-text</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:animate">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="common-anim-spline-mode-attlist"/>
- <ref name="common-spline-anim-value-attlist"/>
- <ref name="common-timing-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- </element>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:set">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-set-values-attlist"/>
- <ref name="common-timing-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- </element>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:animateMotion">
- <ref name="anim-animate-motion-attlist"/>
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="common-timing-attlist"/>
- <ref name="common-spline-anim-value-attlist"/>
- </element>
-</define>
-<define name="anim-animate-motion-attlist" combine="interleave">
- <optional>
- <attribute name="svg:path">
- <ref name="pathData"/>
- </attribute>
- </optional>
-</define>
-<define name="anim-animate-motion-attlist" combine="interleave">
- <optional>
- <attribute name="svg:origin">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="anim-animate-motion-attlist" combine="interleave">
- <optional>
- <attribute name="smil:calcMode" a:defaultValue="paced">
- <choice>
- <value>discrete</value>
- <value>linear</value>
- <value>paced</value>
- <value>spline</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:animateColor">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="common-anim-spline-mode-attlist"/>
- <ref name="common-spline-anim-value-attlist"/>
- <ref name="anim-animate-color-attlist"/>
- <ref name="common-timing-attlist"/>
- </element>
-</define>
-<define name="anim-animate-color-attlist" combine="interleave">
- <optional>
- <attribute name="anim:color-interpolation" a:defaultValue="rgb">
- <choice>
- <value>rgb</value>
- <value>hsl</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="anim-animate-color-attlist" combine="interleave">
- <optional>
- <attribute name="anim:color-interpolation-direction"
- a:defaultValue="clockwise">
- <choice>
- <value>clockwise</value>
- <value>counter-clockwise</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:animateTransform">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="anim-animate-transform-attlist"/>
- <ref name="common-timing-attlist"/>
- </element>
-</define>
-<define name="anim-animate-transform-attlist" combine="interleave">
- <attribute name="svg:type">
- <choice>
- <value>translate</value>
- <value>scale</value>
- <value>rotate</value>
- <value>skewX</value>
- <value>skewY</value>
- </choice>
- </attribute>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:transitionFilter">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="common-anim-spline-mode-attlist "/>
- <ref name="anim-transition-filter-attlist"/>
- <ref name="common-timing-attlist"/>
- </element>
-</define>
-<define name="anim-transition-filter-attlist" combine="interleave">
- <attribute name="smil:type">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="anim-transition-filter-attlist" combine="interleave">
- <optional>
- <attribute name="smil:subtype">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="anim-transition-filter-attlist" combine="interleave">
- <optional>
- <attribute name="smil:direction" a:defaultValue="forward">
- <choice>
- <value>forward</value>
- <value>reverse</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="anim-transition-filter-attlist" combine="interleave">
- <optional>
- <attribute name="smil:fadeColor">
- <choice>
- <value>forward</value>
- <value>reverse</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="anim-transition-filter-attlist" combine="interleave">
- <optional>
- <attribute name="smil:mode" a:defaultValue="in">
- <choice>
- <value>in</value>
- <value>out</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-attlist" combine="interleave">
- <optional>
- <attribute name="anim:id">
- <ref name="ID"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-target-attlist" combine="interleave">
- <optional>
- <attribute name="smil:targetElement">
- <ref name="IDREF"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-named-target-attlist" combine="interleave">
- <attribute name="smil:attributeName">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="common-anim-target-attlist" combine="interleave">
- <optional>
- <attribute name="anim:sub-item">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-values-attlist" combine="interleave">
- <optional>
- <attribute name="smil:values">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-spline-mode-attlist" combine="interleave">
- <optional>
- <attribute name="smil:calcMode" a:defaultValue="discrete">
- <choice>
- <value>discrete</value>
- <value>linear</value>
- <value>paced</value>
- <value>spline</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-spline-anim-value-attlist" combine="interleave">
- <optional>
- <attribute name="smil:keyTimes">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-spline-anim-value-attlist" combine="interleave">
- <optional>
- <attribute name="smil:keySplines">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-add-accum-attlist" combine="interleave">
- <optional>
- <attribute name="smil:accumulate">
- <choice>
- <value>none</value>
- <value>sum</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-add-accum-attlist" combine="interleave">
- <optional>
- <attribute name="smil:additive">
- <choice>
- <value>replace</value>
- <value>sum</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-values-attlist" combine="interleave">
- <optional>
- <attribute name="anim:formula">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-anim-set-values-attlist" combine="interleave">
- <optional>
- <attribute name="smil:to">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-
-<define name="common-anim-values-attlist" combine="interleave">
- <ref name="common-anim-set-values-attlist"/>
- <optional>
- <attribute name="smil:from">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:by">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-begin-end-timing-attlist" combine="interleave">
- <optional>
- <attribute name="smil:begin">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-begin-end-timing-attlist" combine="interleave">
- <optional>
- <attribute name="smil:end">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-dur-timing-attlist" combine="interleave">
- <optional>
- <attribute name="smil:dur">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-endsync-timing-attlist" combine="interleave">
- <optional>
- <attribute name="smil:endsync">
- <choice>
- <value>first</value>
- <value>last</value>
- <value>all</value>
- <value>media</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-repeat-timing-attlist" combine="interleave">
- <optional>
- <attribute name="smil:repeatDur">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:repeatCount">
- <choice>
- <ref name="nonNegativeInteger"/>
- <value>indefinite</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-fill-timing-attlist" combine="interleave">
- <optional>
- <attribute name="smil:fill">
- <choice>
- <value>remove</value>
- <value>freeze</value>
- <value>hold</value>
- <value>auto</value>
- <value>default</value>
- <value>transition</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-fill-default-attlist" combine="interleave">
- <optional>
- <attribute name="smil:fillDefault">
- <choice>
- <value>remove</value>
- <value>freeze</value>
- <value>hold</value>
- <value>transition</value>
- <value>auto</value>
- <value>inherit</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-restart-timing-attlist" combine="interleave">
- <optional>
- <attribute name="smil:restart" a:defaultValue="default">
- <choice>
- <value>never</value>
- <value>always</value>
- <value>whenNotActive</value>
- <value>default</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-restart-default-attlist" combine="interleave">
- <optional>
- <attribute name="smil:restartDefault" a:defaultValue="inherit">
- <choice>
- <value>never</value>
- <value>always</value>
- <value>whenNotActive</value>
- <value>inherit</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-time-manip-attlist" combine="interleave">
- <optional>
- <attribute name="smil:accelerate" a:defaultValue="0.0">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="common-time-manip-attlist" combine="interleave">
- <optional>
- <attribute name="smil:decelerate" a:defaultValue="0.0">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="common-time-manip-attlist" combine="interleave">
- <optional>
- <attribute name="smil:autoReverse" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:par">
- <ref name="common-anim-attlist"/>
- <ref name="common-timing-attlist"/>
- <ref name="common-endsync-timing-attlist"/>
- <zeroOrMore>
- <ref name="animation-element"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="common-basic-timing-attlist" combine="interleave">
- <ref name="common-begin-end-timing-attlist"/>
- <ref name="common-dur-timing-attlist"/>
- <ref name="common-repeat-timing-attlist"/>
-</define>
-
-<define name="common-timing-attlist" combine="interleave">
- <ref name="common-basic-timing-attlist"/>
- <ref name="common-restart-timing-attlist"/>
- <ref name="common-restart-default-attlist"/>
- <ref name="common-fill-timing-attlist"/>
- <ref name="common-fill-default-attlist"/>
- <ref name="common-time-manip-attlist"/>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:seq">
- <ref name="common-anim-attlist"/>
- <ref name="common-endsync-timing-attlist"/>
- <ref name="common-timing-attlist"/>
- <zeroOrMore>
- <ref name="animation-element"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:iterate">
- <ref name="common-anim-attlist"/>
- <ref name="anim-iterate-attlist"/>
- <ref name="common-timing-attlist"/>
- <ref name="common-endsync-timing-attlist"/>
- <zeroOrMore>
- <ref name="animation-element"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="anim-iterate-attlist" combine="interleave">
- <ref name="common-anim-target-attlist"/>
-</define>
-<define name="anim-iterate-attlist" combine="interleave">
- <optional>
- <attribute name="anim:iterate-type">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="anim-iterate-attlist" combine="interleave">
- <optional>
- <attribute name="anim:iterate-interval">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:audio">
- <ref name="common-anim-attlist"/>
- <ref name="anim-audio-attlist"/>
- <ref name="common-basic-timing-attlist"/>
- </element>
-</define>
-<define name="anim-audio-attlist" combine="interleave">
- <optional>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- </optional>
-</define>
-<define name="anim-audio-attlist" combine="interleave">
- <optional>
- <attribute name="anim:audio-level">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="animation-element" combine="choice">
- <element name="anim:command">
- <ref name="common-anim-attlist"/>
- <ref name="anim-command-attlist"/>
- <ref name="common-begin-end-timing-attlist"/>
- <ref name="common-anim-target-attlist"/>
- <zeroOrMore>
- <element name="anim:param">
- <attribute name="anim:name"/>
- <attribute name="anim:value"/>
- </element>
- </zeroOrMore>
- </element>
-</define>
-<define name="anim-command-attlist" combine="interleave">
- <attribute name="anim:command">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="style-style">
- <element name="style:style">
- <ref name="style-style-attlist"/>
- <ref name="style-style-content"/>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:parent-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:next-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:list-style-name">
- <choice>
- <ref name="styleName"/>
- <empty/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:master-page-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:auto-update" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:data-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:class">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:default-outline-level">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-map">
- <element name="style:map">
- <ref name="style-map-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="style-map-attlist" combine="interleave">
- <attribute name="style:condition">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="style-map-attlist" combine="interleave">
- <attribute name="style:apply-style-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="style-map-attlist" combine="interleave">
- <optional>
- <attribute name="style:base-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
-</define>
-<define name="style-default-style">
- <element name="style:default-style">
- <ref name="style-style-content"/>
- </element>
-</define>
-<define name="style-page-layout">
- <element name="style:page-layout">
- <ref name="style-page-layout-attlist"/>
- <optional>
- <ref name="style-page-layout-properties"/>
- </optional>
- <optional>
- <ref name="style-header-style"/>
- </optional>
- <optional>
- <ref name="style-footer-style"/>
- </optional>
- </element>
-</define>
-<define name="style-page-layout-attlist" combine="interleave">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="style-page-layout-attlist" combine="interleave">
- <optional>
- <attribute name="style:page-usage" a:defaultValue="all">
- <choice>
- <value>all</value>
- <value>left</value>
- <value>right</value>
- <value>mirrored</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-header-style">
- <element name="style:header-style">
- <optional>
- <ref name="style-header-footer-properties"/>
- </optional>
- </element>
-</define>
-<define name="style-footer-style">
- <element name="style:footer-style">
- <optional>
- <ref name="style-header-footer-properties"/>
- </optional>
- </element>
-</define>
-<define name="style-master-page">
- <element name="style:master-page">
- <ref name="style-master-page-attlist"/>
- <optional>
- <ref name="style-header"/>
- <optional>
- <ref name="style-header-left"/>
- </optional>
- </optional>
- <optional>
- <ref name="style-footer"/>
- <optional>
- <ref name="style-footer-left"/>
- </optional>
- </optional>
- <optional>
- <ref name="office-forms"/>
- </optional>
- <zeroOrMore>
- <ref name="style-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- <optional>
- <ref name="presentation-notes"/>
- </optional>
- </element>
-</define>
-<define name="style-master-page-attlist" combine="interleave">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="style-master-page-attlist" combine="interleave">
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-master-page-attlist" combine="interleave">
- <attribute name="style:page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
-</define>
-<define name="style-master-page-attlist" combine="interleave">
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-master-page-attlist" combine="interleave">
- <optional>
- <attribute name="style:next-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-header">
- <element name="style:header">
- <ref name="common-style-header-footer-attlist"/>
- <ref name="header-footer-content"/>
- </element>
-</define>
-<define name="style-footer">
- <element name="style:footer">
- <ref name="common-style-header-footer-attlist"/>
- <ref name="header-footer-content"/>
- </element>
-</define>
-<define name="style-header-left">
- <element name="style:header-left">
- <ref name="common-style-header-footer-attlist"/>
- <ref name="header-footer-content"/>
- </element>
-</define>
-<define name="style-footer-left">
- <element name="style:footer-left">
- <ref name="common-style-header-footer-attlist"/>
- <ref name="header-footer-content"/>
- </element>
-</define>
-<define name="header-footer-content">
- <choice>
- <group>
- <ref name="text-tracked-changes"/>
- <ref name="text-decls"/>
- <zeroOrMore>
- <choice>
- <ref name="text-h"/>
- <ref name="text-p"/>
- <ref name="text-list"/>
- <ref name="table-table"/>
- <ref name="text-section"/>
- <ref name="text-table-of-content"/>
- <ref name="text-illustration-index"/>
- <ref name="text-table-index"/>
- <ref name="text-object-index"/>
- <ref name="text-user-index"/>
- <ref name="text-alphabetical-index"/>
- <ref name="text-bibliography"/>
- <ref name="text-index-title"/>
- <ref name="change-marks"/>
- </choice>
- </zeroOrMore>
- </group>
- <group>
- <optional>
- <ref name="style-region-left"/>
- </optional>
- <optional>
- <ref name="style-region-center"/>
- </optional>
- <optional>
- <ref name="style-region-right"/>
- </optional>
- </group>
- </choice>
-</define>
-<define name="common-style-header-footer-attlist" combine="interleave">
- <optional>
- <attribute name="style:display" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-region-left">
- <element name="style:region-left">
- <ref name="region-content"/>
- </element>
-</define>
-<define name="style-region-center">
- <element name="style:region-center">
- <ref name="region-content"/>
- </element>
-</define>
-<define name="style-region-right">
- <element name="style:region-right">
- <ref name="region-content"/>
- </element>
-</define>
-
-<define name="region-content">
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
-</define>
-<define name="presentation-notes">
- <element name="presentation:notes">
- <ref name="common-presentation-header-footer-attlist"/>
- <ref name="presentation-notes-attlist"/>
- <ref name="office-forms"/>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="presentation-notes-attlist" combine="interleave">
- <optional>
- <attribute name="style:page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="presentation-notes-attlist" combine="interleave">
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="table-table-template">
- <element name="table:table-template">
- <ref name="table-table-template-attlist"/>
- <optional>
- <ref name="table-first-row"/>
- </optional>
- <optional>
- <ref name="table-last-row"/>
- </optional>
- <optional>
- <ref name="table-first-column"/>
- </optional>
- <optional>
- <ref name="table-last-column"/>
- </optional>
- <choice>
- <ref name="table-body"/>
- <group>
- <ref name="table-even-rows"/>
- <ref name="table-odd-rows"/>
- </group>
- <group>
- <ref name="table-even-columns"/>
- <ref name="table-odd-columns"/>
- </group>
- </choice>
- </element>
-</define>
-<define name="table-table-template-attlist" combine="interleave">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="table-table-template-attlist" combine="interleave">
- <attribute name="text:first-row-start-column">
- <ref name="rowOrCol"/>
- </attribute>
-</define>
-
-<define name="table-table-template-attlist" combine="interleave">
- <attribute name="text:first-row-end-column">
- <ref name="rowOrCol"/>
- </attribute>
-</define>
-
-<define name="table-table-template-attlist" combine="interleave">
- <attribute name="text:last-row-start-column">
- <ref name="rowOrCol"/>
- </attribute>
-</define>
-
-<define name="table-table-template-attlist" combine="interleave">
- <attribute name="text:last-row-end-column">
- <ref name="rowOrCol"/>
- </attribute>
-</define>
-
-<define name="rowOrCol">
- <choice>
- <value>row</value>
- <value>column</value>
- </choice>
-</define>
-<define name="table-first-row">
- <element name="table:first-row">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-last-row">
- <element name="table:last-row">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-first-column">
- <element name="table:first-column">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-last-column">
- <element name="table:last-column">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-body">
- <element name="table:body">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-even-rows">
- <element name="table:even-rows">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-odd-rows">
- <element name="table:odd-rows">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-even-columns">
- <element name="table:even-columns">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="table-odd-columns">
- <element name="table:odd-columns">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="common-table-template-attlist" combine="interleave">
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- <attribute name="text:paragraph-style-name">
- <optional>
- <ref name="styleNameRef"/>
- </optional>
- </attribute>
-</define>
-<define name="style-font-face">
- <element name="style:font-face">
- <ref name="style-font-face-attlist"/>
- <optional>
- <ref name="svg-font-face-src"/>
- </optional>
- <optional>
- <ref name="svg-definition-src"/>
- </optional>
- </element>
-</define>
-<define name="style-font-face-attlist" combine="interleave">
- <optional>
- <attribute name="svg:font-family">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-style">
- <ref name="fontStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-variant">
- <ref name="fontVariant"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-weight">
- <ref name="fontWeight"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-stretch">
- <choice>
- <value>normal</value>
- <value>ultra-condensed</value>
- <value>extra-condensed</value>
- <value>condensed</value>
- <value>semi-condensed</value>
- <value>semi-expanded</value>
- <value>expanded</value>
- <value>extra-expanded</value>
- <value>ultra-expanded</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-size">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:unicode-range"/>
- </optional>
- <optional>
- <attribute name="svg:units-per-em">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:panose-1"/>
- </optional>
- <optional>
- <attribute name="svg:stemv">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:stemh">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:slope">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:cap-height">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:x-height">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:accent-height">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:ascent">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:descent">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:widths"/>
- </optional>
- <optional>
- <attribute name="svg:bbox"/>
- </optional>
- <optional>
- <attribute name="svg:ideographic">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:alphabetic">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:mathematical">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:hanging">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:v-ideographic">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:v-alphabetic">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:v-mathematical">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:v-hanging">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:underline-position">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:underline-thickness">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:strikethrough-position">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:strikethrough-thickness">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:overline-position">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:overline-thickness">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-
-<define name="svg-font-face-src">
- <element name="svg:font-face-src">
- <oneOrMore>
- <choice>
- <ref name="svg-font-face-uri"/>
- <ref name="svg-font-face-name"/>
- </choice>
- </oneOrMore>
- </element>
-</define>
-
-<define name="svg-font-face-uri">
- <element name="svg:font-face-uri">
- <ref name="common-svg-font-face-xlink-attlist"/>
- <zeroOrMore>
- <ref name="svg-font-face-format"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="svg-font-face-format">
- <element name="svg:font-face-format">
- <optional>
- <attribute name="svg:string"/>
- </optional>
- <empty/>
- </element>
-</define>
-<define name="svg-font-face-name">
- <element name="svg:font-face-name">
- <optional>
- <attribute name="svg:name"/>
- </optional>
- <empty/>
- </element>
-</define>
-
-<define name="svg-definition-src">
- <element name="svg:definition-src">
- <ref name="common-svg-font-face-xlink-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="common-svg-font-face-xlink-attlist" combine="interleave">
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <value>simple</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onRequest">
- <value>onRequest</value>
- </attribute>
- </optional>
-</define>
-<define name="style-font-face-attlist" combine="interleave">
- <attribute name="style:name">
- <ref name="string"/>
- </attribute>
-</define>
-<define name="style-font-face-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-adornments">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-font-face-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-family-generic">
- <ref name="fontFamilyGeneric"/>
- </attribute>
- </optional>
-</define>
-<define name="style-font-face-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-pitch">
- <ref name="fontPitch"/>
- </attribute>
- </optional>
-</define>
-
-<define name="style-font-face-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-charset">
- <ref name="textEncoding"/>
- </attribute>
- </optional>
-</define>
-<define name="number-number-style">
- <element name="number:number-style">
- <ref name="common-data-style-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <optional>
- <ref name="any-number"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </optional>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="any-number">
- <choice>
- <ref name="number-number"/>
- <ref name="number-scientific-number"/>
- <ref name="number-fraction"/>
- </choice>
-</define>
-<define name="number-number">
- <element name="number:number">
- <ref name="number-number-attlist"/>
- <ref name="common-decimal-places-attlist"/>
- <ref name="common-number-attlist"/>
- <zeroOrMore>
- <ref name="number-embedded-text"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="number-number-attlist" combine="interleave">
- <optional>
- <attribute name="number:decimal-replacement"/>
- </optional>
-</define>
-<define name="number-number-attlist" combine="interleave">
- <optional>
- <attribute name="number:display-factor" a:defaultValue="1">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="number-embedded-text">
- <element name="number:embedded-text">
- <ref name="number-embedded-text-attlist"/>
- <text/>
- </element>
-</define>
-<define name="number-embedded-text-attlist" combine="interleave">
- <attribute name="number:position">
- <ref name="integer"/>
- </attribute>
-</define>
-<define name="number-scientific-number">
- <element name="number:scientific-number">
- <ref name="number-scientific-number-attlist"/>
- <ref name="common-decimal-places-attlist"/>
- <ref name="common-number-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-scientific-number-attlist" combine="interleave">
- <optional>
- <attribute name="number:min-exponent-digits">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="number-fraction">
- <element name="number:fraction">
- <ref name="number-fraction-attlist"/>
- <ref name="common-number-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-fraction-attlist" combine="interleave">
- <optional>
- <attribute name="number:min-numerator-digits">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="number-fraction-attlist" combine="interleave">
- <optional>
- <attribute name="number:min-denominator-digits">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="number-fraction-attlist" combine="interleave">
- <optional>
- <attribute name="number:denominator-value">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="number-currency-style">
- <element name="number:currency-style">
- <ref name="common-data-style-attlist"/>
- <ref name="common-auto-reorder-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <optional>
- <choice>
- <group>
- <ref name="number-and-text"/>
- <optional>
- <ref name="currency-symbol-and-text"/>
- </optional>
- </group>
- <group>
- <ref name="currency-symbol-and-text"/>
- <optional>
- <ref name="number-and-text"/>
- </optional>
- </group>
- </choice>
- </optional>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="currency-symbol-and-text">
- <ref name="number-currency-symbol"/>
- <optional>
- <ref name="number-text"/>
- </optional>
-</define>
-<define name="number-and-text">
- <ref name="number-number"/>
- <optional>
- <ref name="number-text"/>
- </optional>
-</define>
-<define name="number-currency-symbol">
- <element name="number:currency-symbol">
- <ref name="number-currency-symbol-attlist"/>
- <text/>
- </element>
-</define>
-<define name="number-currency-symbol-attlist" combine="interleave">
- <optional>
- <attribute name="number:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
-</define>
-<define name="number-percentage-style">
- <element name="number:percentage-style">
- <ref name="common-data-style-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <optional>
- <ref name="number-and-text"/>
- </optional>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="number-date-style">
- <element name="number:date-style">
- <ref name="common-data-style-attlist"/>
- <ref name="common-auto-reorder-attlist"/>
- <ref name="common-format-source-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <!-- This DTD does not reflect the fact that some elements must not -->
- <!-- occur more than once. -->
- <optional>
- <ref name="number-text"/>
- </optional>
- <oneOrMore>
- <ref name="any-date"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </oneOrMore>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="any-date">
- <choice>
- <ref name="number-day"/>
- <ref name="number-month"/>
- <ref name="number-year"/>
- <ref name="number-era"/>
- <ref name="number-day-of-week"/>
- <ref name="number-week-of-year"/>
- <ref name="number-quarter"/>
- <ref name="number-hours"/>
- <ref name="number-am-pm"/>
- <ref name="number-minutes"/>
- <ref name="number-seconds"/>
- </choice>
-</define>
-<define name="number-day">
- <element name="number:day">
- <ref name="number-day-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-day-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-month">
- <element name="number:month">
- <ref name="number-month-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-month-attlist" combine="interleave">
- <optional>
- <attribute name="number:textual" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="number-month-attlist" combine="interleave">
- <optional>
- <attribute name="number:possessive-form" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="number-month-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-year">
- <element name="number:year">
- <ref name="number-year-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-year-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-era">
- <element name="number:era">
- <ref name="number-era-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-era-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-day-of-week">
- <element name="number:day-of-week">
- <ref name="number-day-of-week-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-day-of-week-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-week-of-year">
- <element name="number:week-of-year">
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-quarter">
- <element name="number:quarter">
- <ref name="number-quarter-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-quarter-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-time-style">
- <element name="number:time-style">
- <ref name="number-time-style-attlist"/>
- <ref name="common-data-style-attlist"/>
- <ref name="common-format-source-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <!-- This DTD does not reflect the fact that some elements must not -->
- <!-- occur more than once. -->
- <optional>
- <ref name="number-text"/>
- </optional>
- <oneOrMore>
- <ref name="any-time"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </oneOrMore>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="any-time">
- <choice>
- <ref name="number-hours"/>
- <ref name="number-am-pm"/>
- <ref name="number-minutes"/>
- <ref name="number-seconds"/>
- </choice>
-</define>
-<define name="number-time-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:truncate-on-overflow" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="number-hours">
- <element name="number:hours">
- <ref name="number-hours-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-hours-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-minutes">
- <element name="number:minutes">
- <ref name="number-minutes-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-minutes-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-seconds">
- <element name="number:seconds">
- <ref name="number-seconds-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="number-seconds-attlist" combine="interleave">
- <optional>
- <attribute name="number:style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="number-seconds-attlist" combine="interleave">
- <optional>
- <attribute name="number:decimal-places" a:defaultValue="0">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="number-am-pm">
- <element name="number:am-pm">
- <empty/>
- </element>
-</define>
-<define name="number-boolean-style">
- <element name="number:boolean-style">
- <ref name="common-data-style-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <optional>
- <ref name="number-boolean"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </optional>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="number-boolean">
- <element name="number:boolean">
- <empty/>
- </element>
-</define>
-<define name="number-text-style">
- <element name="number:text-style">
- <ref name="common-data-style-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <zeroOrMore>
- <ref name="number-text-content"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="number-text">
- <element name="number:text">
- <text/>
- </element>
-</define>
-<define name="number-text-content">
- <element name="number:text-content">
- <empty/>
- </element>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="style-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:title"/>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="style:volatile">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-auto-reorder-attlist" combine="interleave">
- <optional>
- <attribute name="number:automatic-order" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-format-source-attlist">
- <optional>
- <attribute name="number:format-source" a:defaultValue="fixed">
- <choice>
- <value>fixed</value>
- <value>language</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:transliteration-format" a:defaultValue="1">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:transliteration-language">
- <ref name="countryCode"/>
- </attribute>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:transliteration-country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
-</define>
-<define name="common-data-style-attlist" combine="interleave">
- <optional>
- <attribute name="number:transliteration-style" a:defaultValue="short">
- <choice>
- <value>short</value>
- <value>medium</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-decimal-places-attlist">
- <optional>
- <attribute name="number:decimal-places">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="common-number-attlist" combine="interleave">
- <optional>
- <attribute name="number:min-integer-digits">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="common-number-attlist" combine="interleave">
- <optional>
- <attribute name="number:grouping" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="common-calendar-attlist" combine="interleave">
- <optional>
- <attribute name="number:calendar">
- <choice>
- <value>gregorian</value>
- <value>gengou</value>
- <value>ROC</value>
- <value>hanja_yoil</value>
- <value>hanja</value>
- <value>hijri</value>
- <value>jewish</value>
- <value>buddhist</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>text</value>
- </attribute>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>paragraph</value>
- </attribute>
- <optional>
- <ref name="style-paragraph-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>section</value>
- </attribute>
- <optional>
- <ref name="style-section-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>ruby</value>
- </attribute>
- <optional>
- <ref name="style-ruby-properties"/>
- </optional>
- </group>
-</define>
-<define name="text-linenumbering-configuration">
- <element name="text:linenumbering-configuration">
- <ref name="text-linenumbering-configuration-attlist"/>
- <optional>
- <ref name="text-linenumbering-separator"/>
- </optional>
- </element>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:number-lines" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <ref name="common-num-format-attlist"/>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:increment">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:number-position" a:defaultValue="left">
- <choice>
- <value>left</value>
- <value>right</value>
- <value>inner</value>
- <value>outer</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:offset">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:count-empty-lines" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:count-in-text-boxes" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:restart-on-page" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-linenumbering-separator">
- <element name="text:linenumbering-separator">
- <optional>
- <attribute name="text:increment">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <text/>
- </element>
-</define>
-<define name="text-notes-configuration">
- <element name="text:notes-configuration">
- <ref name="text-notes-configuration-content"/>
- </element>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <ref name="text-note-class"/>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <attribute name="text:citation-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <attribute name="text:citation-body-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <attribute name="text:default-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <attribute name="text:master-page-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <attribute name="text:start-value">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <ref name="common-num-format-prefix-suffix-attlist"/>
- <optional>
- <ref name="common-num-format-attlist"/>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <attribute name="text:start-numbering-at">
- <choice>
- <value>document</value>
- <value>chapter</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <attribute name="text:footnotes-position">
- <choice>
- <value>text</value>
- <value>page</value>
- <value>section</value>
- <value>document</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <element name="text:note-continuation-notice-forward">
- <text/>
- </element>
- </optional>
-</define>
-<define name="text-notes-configuration-content" combine="interleave">
- <optional>
- <element name="text:note-continuation-notice-backward">
- <text/>
- </element>
- </optional>
-</define>
-<define name="text-bibliography-configuration">
- <element name="text:bibliography-configuration">
- <ref name="text-bibliography-configuration-attlist"/>
- <zeroOrMore>
- <ref name="text-sort-key"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-bibliography-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:prefix">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:suffix">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-bibliography-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:numbered-entries" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-bibliography-configuration-attlist" combine="interleave">
- <optional>
- <attribute name="text:sort-by-position" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:sort-algorithm">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-sort-key">
- <element name="text:sort-key">
- <ref name="text-sort-key-attlist"/>
- <empty/>
- </element>
-</define>
-
-<define name="text-sort-key-attlist" combine="interleave">
- <attribute name="text:key">
- <choice>
- <value>address</value>
- <value>annote</value>
- <value>author</value>
- <value>bibliography-type</value>
- <value>booktitle</value>
- <value>chapter</value>
- <value>custom1</value>
- <value>custom2</value>
- <value>custom3</value>
- <value>custom4</value>
- <value>custom5</value>
- <value>edition</value>
- <value>editor</value>
- <value>howpublished</value>
- <value>identifier</value>
- <value>institution</value>
- <value>isbn</value>
- <value>issn</value>
- <value>journal</value>
- <value>month</value>
- <value>note</value>
- <value>number</value>
- <value>organizations</value>
- <value>pages</value>
- <value>publisher</value>
- <value>report-type</value>
- <value>school</value>
- <value>series</value>
- <value>title</value>
- <value>url</value>
- <value>volume</value>
- <value>year</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="text:sort-ascending" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-style">
- <element name="text:list-style">
- <ref name="text-list-style-attr"/>
- <zeroOrMore>
- <ref name="text-list-style-content"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="text-list-style-attr" combine="interleave">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="text-list-style-attr" combine="interleave">
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-style-attr" combine="interleave">
- <optional>
- <attribute name="text:consecutive-numbering" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-level-style-attr">
- <attribute name="text:level">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="text-list-style-content" combine="choice">
- <element name="text:list-level-style-number">
- <ref name="text-list-level-style-attr"/>
- <ref name="text-list-level-style-number-attr"/>
- <optional>
- <ref name="style-list-level-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </element>
-</define>
-<define name="text-list-level-style-number-attr" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-level-style-number-attr" combine="interleave">
- <ref name="common-num-format-attlist"/>
- <ref name="common-num-format-prefix-suffix-attlist"/>
-</define>
-<define name="text-list-level-style-number-attr" combine="interleave">
- <optional>
- <attribute name="text:display-levels" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-level-style-number-attr" combine="interleave">
- <optional>
- <attribute name="text:start-value" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-style-content" combine="choice">
- <element name="text:list-level-style-bullet">
- <ref name="text-list-level-style-attr"/>
- <ref name="text-list-level-style-bullet-attr"/>
- <optional>
- <ref name="style-list-level-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </element>
-</define>
-<define name="text-list-level-style-bullet-attr" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-level-style-bullet-attr" combine="interleave">
- <attribute name="text:bullet-char">
- <ref name="character"/>
- </attribute>
-</define>
-<define name="text-list-level-style-bullet-attr" combine="interleave">
- <ref name="common-num-format-prefix-suffix-attlist"/>
-</define>
-<define name="text-list-level-style-bullet-attr" combine="interleave">
- <optional>
- <attribute name="text:bullet-relative-size">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="text-list-style-content" combine="choice">
- <element name="text:list-level-style-image">
- <ref name="text-list-level-style-attr"/>
- <ref name="text-list-level-style-image-attr"/>
- <optional>
- <ref name="style-list-level-properties"/>
- </optional>
- </element>
-</define>
-<define name="text-list-level-style-image-attr" combine="interleave">
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-binary-data"/>
- </choice>
-</define>
-<define name="text-outline-style">
- <element name="text:outline-style">
- <oneOrMore>
- <ref name="text-outline-level-style"/>
- </oneOrMore>
- </element>
-</define>
-<define name="text-outline-level-style">
- <element name="text:outline-level-style">
- <ref name="text-outline-level-style-attlist"/>
- <optional>
- <ref name="style-list-level-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </element>
-</define>
-<define name="text-outline-level-style-attlist" combine="interleave">
- <attribute name="text:level">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="text-outline-level-style-attlist" combine="interleave">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="text-outline-level-style-attlist" combine="interleave">
- <ref name="common-num-format-attlist"/>
- <ref name="common-num-format-prefix-suffix-attlist"/>
-</define>
-<define name="text-outline-level-style-attlist" combine="interleave">
- <optional>
- <attribute name="text:display-levels" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="text-outline-level-style-attlist" combine="interleave">
- <optional>
- <attribute name="text:start-value" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>table</value>
- </attribute>
- <optional>
- <ref name="style-table-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>table-column</value>
- </attribute>
- <optional>
- <ref name="style-table-column-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>table-row</value>
- </attribute>
- <optional>
- <ref name="style-table-row-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>table-cell</value>
- </attribute>
- <optional>
- <ref name="style-table-cell-properties"/>
- </optional>
- <optional>
- <ref name="style-paragraph-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <choice>
- <value>graphic</value>
- <value>presentation</value>
- </choice>
- </attribute>
- <optional>
- <ref name="style-graphic-properties"/>
- </optional>
- <optional>
- <ref name="style-paragraph-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
-</define>
-
-<define name="style-graphic-properties">
- <element name="style:graphic-properties">
- <ref name="style-graphic-properties-content"/>
- </element>
-</define>
-
-<define name="style-graphic-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-graphic-properties-content-strict">
- <ref name="style-graphic-properties-attlist"/>
- <ref name="style-graphic-fill-properties-attlist"/>
- <ref name="style-graphic-properties-elements"/>
-</define>
-
-<define name=" style-graphic-properties-elements">
- <empty/>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>drawing-page</value>
- </attribute>
- <optional>
- <ref name="style-drawing-page-properties"/>
- </optional>
- </group>
-</define>
-
-<define name="style-drawing-page-properties">
- <element name="style:drawing-page-properties">
- <ref name="style-drawing-page-properties-content"/>
- </element>
-</define>
-
-<define name="style-drawing-page-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-drawing-page-properties-content-strict">
- <ref name="style-graphic-fill-properties-attlist"/>
- <ref name="style-drawing-page-properties-attlist"/>
- <ref name="style-drawing-page-properties-elements"/>
-</define>
-<define name="draw-gradient">
- <element name="draw:gradient">
- <ref name="common-draw-gradient-attlist"/>
- <ref name="draw-gradient-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="common-draw-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-gradient-attlist" combine="interleave">
- <attribute name="draw:style">
- <ref name="gradient-style"/>
- </attribute>
-</define>
-<define name="gradient-style">
- <choice>
- <value>linear</value>
- <value>axial</value>
- <value>radial</value>
- <value>ellipsoid</value>
- <value>square</value>
- <value>rectangular</value>
- </choice>
-</define>
-<define name="common-draw-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:cx">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:cy">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start-intensity">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end-intensity">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:angle">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="common-draw-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:border">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="svg-linearGradient">
- <element name="svg:linearGradient">
- <ref name="common-svg-gradient-attlist"/>
- <optional>
- <attribute name="svg:x1" a:defaultValue="0%">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:y1" a:defaultValue="0%">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:x2" a:defaultValue="100%">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:y2" a:defaultValue="100%">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="svg-stop"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="svg-radialGradient">
- <element name="svg:radialGradient">
- <ref name="common-svg-gradient-attlist"/>
- <optional>
- <attribute name="svg:cx" a:defaultValue="50%">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:cy" a:defaultValue="50%">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:r" a:defaultValue="50%">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:fx">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:fy">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="svg-stop"/>
- </zeroOrMore>
- </element>
-</define>
-
-<define name="svg-stop">
- <element name="svg:stop">
- <attribute name="svg:offset">
- <choice>
- <ref name="double"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <optional>
- <attribute name="svg:stop-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:stop-opacity">
- <ref name="double"/>
- </attribute>
- </optional>
- </element>
-</define>
-
-<define name="common-svg-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="svg:gradientUnits" a:defaultValue="objectBoundingBox">
- <value>objectBoundingBox</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:gradientTransform">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:spreadMethod" a:defaultValue="pad">
- <choice>
- <value>pad</value>
- <value>reflect</value>
- <value>repeat</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="common-svg-gradient-attlist" combine="interleave">
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="common-svg-gradient-attlist" combine="interleave">
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-hatch">
- <element name="draw:hatch">
- <ref name="draw-hatch-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-hatch-attlist" combine="interleave">
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="draw-hatch-attlist" combine="interleave">
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-hatch-attlist" combine="interleave">
- <attribute name="draw:style">
- <choice>
- <value>single</value>
- <value>double</value>
- <value>triple</value>
- </choice>
- </attribute>
-</define>
-<define name="draw-hatch-attlist" combine="interleave">
- <optional>
- <attribute name="draw:color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-hatch-attlist" combine="interleave">
- <optional>
- <attribute name="draw:distance">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-hatch-attlist" combine="interleave">
- <optional>
- <attribute name="draw:rotation">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-fill-image">
- <element name="draw:fill-image">
- <ref name="draw-fill-image-attlist"/>
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- <optional>
- <attribute name="xlink:type" a:defaultValue="simple">
- <choice>
- <value>simple</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show" a:defaultValue="embed">
- <choice>
- <value>embed</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate" a:defaultValue="onLoad">
- <choice>
- <value>onLoad</value>
- </choice>
- </attribute>
- </optional>
- <empty/>
- </element>
-</define>
-<define name="draw-fill-image-attlist" combine="interleave">
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="draw-fill-image-attlist" combine="interleave">
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-fill-image-attlist" combine="interleave">
- <optional>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-opacity">
- <element name="draw:opacity">
- <ref name="common-draw-gradient-attlist"/>
- <ref name="draw-opacity-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-opacity-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-marker">
- <element name="draw:marker">
- <ref name="draw-marker-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-path-data-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-marker-attlist" combine="interleave">
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="draw-marker-attlist" combine="interleave">
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-stroke-dash">
- <element name="draw:stroke-dash">
- <ref name="draw-stroke-dash-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="draw-stroke-dash-attlist" combine="interleave">
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
-</define>
-<define name="draw-stroke-dash-attlist" combine="interleave">
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-stroke-dash-attlist" combine="interleave">
- <optional>
- <attribute name="draw:style">
- <choice>
- <value>rect</value>
- <value>round</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="draw-stroke-dash-attlist" combine="interleave">
- <optional>
- <attribute name="draw:dots1">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:dots1-length">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:dots2">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:dots2-length">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="draw-stroke-dash-attlist" combine="interleave">
- <optional>
- <attribute name="draw:distance">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-presentation-page-layout">
- <element name="style:presentation-page-layout">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="presentation-placeholder"/>
- </zeroOrMore>
- </element>
-</define>
-<define name="presentation-placeholder">
- <element name="presentation:placeholder">
- <attribute name="presentation:object">
- <ref name="presentation-classes"/>
- </attribute>
- <attribute name="svg:x">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <attribute name="svg:y">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <attribute name="svg:width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <attribute name="svg:height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <empty/>
- </element>
-</define>
-<define name="style-style-content" combine="choice">
- <group>
- <attribute name="style:family">
- <value>chart</value>
- </attribute>
- <optional>
- <ref name="style-chart-properties"/>
- </optional>
- <optional>
- <ref name="style-graphic-properties"/>
- </optional>
- <optional>
- <ref name="style-paragraph-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
-</define>
-<define name="style-properties-content">
- <ref name="anyAttListOrElements"/>
-</define>
-<define name="style-page-layout-properties">
- <element name="style:page-layout-properties">
- <ref name="style-page-layout-properties-content"/>
- </element>
-</define>
-
-<define name="style-page-layout-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-page-layout-properties-content-strict">
- <ref name="style-page-layout-properties-attlist"/>
- <ref name="style-page-layout-properties-elements"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:page-width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:page-height">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <ref name="common-num-format-attlist"/>
- </optional>
- <ref name="common-num-format-prefix-suffix-attlist"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:paper-tray-name">
- <choice>
- <value>default</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:print-orientation">
- <choice>
- <value>portrait</value>
- <value>landscape</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <ref name="common-horizontal-margin-attlist"/>
- <ref name="common-vertical-margin-attlist"/>
- <ref name="common-margin-attlist"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <ref name="common-border-attlist"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <ref name="common-border-line-width-attlist"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <ref name="common-padding-attlist"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <ref name="common-shadow-attlist"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-page-layout-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-<define name="style-page-layout-properties-elements" combine="interleave">
- <ref name="style-columns"/>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:register-truth-ref-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:print">
- <list>
- <zeroOrMore>
- <choice>
- <value>headers</value>
- <value>grid</value>
- <value>annotations</value>
- <value>objects</value>
- <value>charts</value>
- <value>drawings</value>
- <value>formulas</value>
- <value>zero-values</value>
- </choice>
- </zeroOrMore>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:print-page-order">
- <choice>
- <value>ttb</value>
- <value>ltr</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:first-page-number">
- <choice>
- <ref name="positiveInteger"/>
- <value>continue</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:scale-to">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:scale-to-pages">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:table-centering">
- <choice>
- <value>horizontal</value>
- <value>vertical</value>
- <value>both</value>
- <value>none</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:footnote-max-height">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <ref name="common-writing-mode-attlist"/>
-</define>
-<define name="style-page-layout-properties-elements" combine="interleave">
- <ref name="style-footnote-sep"/>
-</define>
-
-<define name="style-footnote-sep">
- <optional>
- <element name="style:footnote-sep">
- <ref name="style-footnote-sep-attlist"/>
- <empty/>
- </element>
- </optional>
-</define>
-<define name="style-footnote-sep-attlist" combine="interleave">
- <optional>
- <attribute name="style:width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rel-width">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:line-style">
- <ref name="lineStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:adjustment" a:defaultValue="left">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:distance-before-sep">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:distance-after-sep">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-mode">
- <choice>
- <value>none</value>
- <value>line</value>
- <value>both</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-base-height">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-ruby-height">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-lines">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-ruby-below">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-print">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-page-layout-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:layout-grid-display">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-header-footer-properties">
- <element name="style:header-footer-properties">
- <ref name="style-header-footer-properties-content"/>
- </element>
-</define>
-
-<define name="style-header-footer-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-header-footer-properties-content-strict">
- <ref name="style-header-footer-properties-attlist"/>
- <ref name="style-header-footer-properties-elements"/>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <optional>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:min-height">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <ref name="common-horizontal-margin-attlist"/>
- <ref name="common-vertical-margin-attlist"/>
- <ref name="common-margin-attlist"/>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <ref name="common-border-attlist"/>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <ref name="common-border-line-width-attlist"/>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <ref name="common-padding-attlist"/>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-header-footer-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <ref name="common-shadow-attlist"/>
-</define>
-<define name="style-header-footer-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:dynamic-spacing">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties">
- <element name="style:text-properties">
- <ref name="style-text-properties-content"/>
- </element>
-</define>
-
-<define name="style-text-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-text-properties-content-strict">
- <ref name="style-text-properties-attlist"/>
- <ref name="style-text-properties-elements"/>
-</define>
-
-<define name="style-text-properties-elements">
- <empty/>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:font-variant">
- <ref name="fontVariant"/>
- </attribute>
- </optional>
-</define>
-
-<define name="fontVariant">
- <choice>
- <value>normal</value>
- <value>small-caps</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:text-transform">
- <choice>
- <value>none</value>
- <value>lowercase</value>
- <value>uppercase</value>
- <value>capitalize</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:use-window-font-color">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-outline">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-line-through-type">
- <ref name="lineType"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-line-through-style">
- <ref name="lineStyle"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-line-through-width">
- <ref name="lineWidth"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-line-through-color">
- <choice>
- <value>font-color</value>
- <ref name="color"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-line-through-text">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-line-through-text-style">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-position">
- <list>
- <choice>
- <ref name="percent"/>
- <value>super</value>
- <value>sub</value>
- </choice>
- <optional>
- <ref name="percent"/>
- </optional>
- </list>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-name-asian">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-name-complex">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:font-family">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-asian">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-complex">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-family-generic">
- <ref name="fontFamilyGeneric"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-generic-asian">
- <ref name="fontFamilyGeneric"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-generic-complex">
- <ref name="fontFamilyGeneric"/>
- </attribute>
- </optional>
-</define>
-
-<define name="fontFamilyGeneric">
- <choice>
- <value>roman</value>
- <value>swiss</value>
- <value>modern</value>
- <value>decorative</value>
- <value>script</value>
- <value>system</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-style-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-name-asian">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-name-complex">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-pitch">
- <ref name="fontPitch"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-pitch-asian">
- <ref name="fontPitch"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-pitch-complex">
- <ref name="fontPitch"/>
- </attribute>
- </optional>
-</define>
-
-<define name="fontPitch">
- <choice>
- <value>fixed</value>
- <value>variable</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-charset">
- <ref name="textEncoding"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-charset-asian">
- <ref name="textEncoding"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-charset-complex">
- <ref name="textEncoding"/>
- </attribute>
- </optional>
-</define>
-
-<define name="textEncoding">
- <data type="string">
- <param name="pattern">[A-Za-z][A-Za-z0-9._\-]*</param>
- </data>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:font-size">
- <choice>
- <ref name="positiveLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-size-asian">
- <choice>
- <ref name="positiveLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-size-complex">
- <choice>
- <ref name="positiveLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-size-rel">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-size-rel-asian">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-size-rel-complex">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:script-type">
- <choice>
- <value>latin</value>
- <value>asian</value>
- <value>complex</value>
- <value>ignore</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:letter-spacing">
- <choice>
- <ref name="length"/>
- <value>normal</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:language-asian">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:language-complex">
- <ref name="languageCode"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:country-asian">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:country-complex">
- <ref name="countryCode"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:font-style">
- <ref name="fontStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-asian">
- <ref name="fontStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-complex">
- <ref name="fontStyle"/>
- </attribute>
- </optional>
-</define>
-
-<define name="fontStyle">
- <choice>
- <value>normal</value>
- <value>italic</value>
- <value>oblique</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-relief">
- <choice>
- <value>none</value>
- <value>embossed</value>
- <value>engraved</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:text-shadow">
- <ref name="shadowType"/>
- </attribute>
- </optional>
-</define>
-
-<define name="shadowType">
- <choice>
- <value>none</value>
- <!-- The following string must match an XSL shadow decl -->
- <ref name="string"/>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-underline-type">
- <ref name="lineType"/>
- </attribute>
- </optional>
-</define>
-
-<define name="lineType">
- <choice>
- <value>none</value>
- <value>single</value>
- <value>double</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-underline-style">
- <ref name="lineStyle"/>
- </attribute>
- </optional>
-</define>
-
-<define name="lineStyle">
- <choice>
- <value>none</value>
- <value>solid</value>
- <value>dotted</value>
- <value>dash</value>
- <value>long-dash</value>
- <value>dot-dash</value>
- <value>dot-dot-dash</value>
- <value>wave</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-underline-width">
- <ref name="lineWidth"/>
- </attribute>
- </optional>
-</define>
-
-<define name="lineWidth">
- <choice>
- <value>auto</value>
- <value>normal</value>
- <value>bold</value>
- <value>thin</value>
- <value>dash</value>
- <value>medium</value>
- <value>thick</value>
- <ref name="positiveInteger"/>
- <ref name="percent"/>
- <ref name="positiveLength"/>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-underline-color">
- <choice>
- <value>font-color</value>
- <ref name="color"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:font-weight">
- <ref name="fontWeight"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-weight-asian">
- <ref name="fontWeight"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-weight-complex">
- <ref name="fontWeight"/>
- </attribute>
- </optional>
-</define>
-
-<define name="fontWeight">
- <choice>
- <value>normal</value>
- <value>bold</value>
- <value>100</value>
- <value>200</value>
- <value>300</value>
- <value>400</value>
- <value>500</value>
- <value>600</value>
- <value>700</value>
- <value>800</value>
- <value>900</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-underline-mode">
- <ref name="lineMode"/>
- </attribute>
- </optional>
-</define>
-
-<define name="lineMode">
- <choice>
- <value>continuous</value>
- <value>skip-white-space</value>
- </choice>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-line-through-mode">
- <ref name="lineMode"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:letter-kerning">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-blinking">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-combine">
- <choice>
- <value>none</value>
- <value>letters</value>
- <value>lines</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-combine-start-char">
- <ref name="character"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-combine-end-char">
- <ref name="character"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-emphasize">
- <choice>
- <value>none</value>
- <list>
- <choice>
- <value>none</value>
- <value>accent</value>
- <value>dot</value>
- <value>circle</value>
- <value>disc</value>
- </choice>
- <choice>
- <value>above</value>
- <value>below</value>
- </choice>
- </list>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-scale">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-rotation-angle">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-rotation-scale">
- <choice>
- <value>fixed</value>
- <value>line-height</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:hyphenate">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:hyphenation-remain-char-count">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:hyphenation-push-char-count">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-text-properties-attlist" combine="interleave">
- <choice>
- <attribute name="text:display">
- <value>true</value>
- </attribute>
- <attribute name="text:display">
- <value>none</value>
- </attribute>
- <group>
- <attribute name="text:display">
- <value>condition</value>
- </attribute>
- <attribute name="text:condition">
- <value>none</value>
- </attribute>
- </group>
- <empty/>
- </choice>
-</define>
-<define name="style-paragraph-properties">
- <element name="style:paragraph-properties">
- <ref name="style-paragraph-properties-content"/>
- </element>
-</define>
-
-<define name="style-paragraph-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-paragraph-properties-content-strict">
- <ref name="style-paragraph-properties-attlist"/>
- <ref name="style-paragraph-properties-elements"/>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:line-height">
- <choice>
- <value>normal</value>
- <ref name="nonNegativeLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:line-height-at-least">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:line-spacing">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-independent-line-spacing">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-text-align"/>
-</define>
-
-<define name="common-text-align">
- <optional>
- <attribute name="fo:text-align">
- <choice>
- <value>start</value>
- <value>end</value>
- <value>left</value>
- <value>right</value>
- <value>center</value>
- <value>justify</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:text-align-last">
- <choice>
- <value>start</value>
- <value>center</value>
- <value>justify</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:justify-single-word">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:keep-together">
- <choice>
- <value>auto</value>
- <value>always</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:widows">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:orphans">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-elements" combine="interleave">
- <ref name="style-tab-stops"/>
-</define>
-
-<define name="style-tab-stops">
- <optional>
- <element name="style:tab-stops">
- <zeroOrMore>
- <ref name="style-tab-stop"/>
- </zeroOrMore>
- </element>
- </optional>
-</define>
-
-<define name="style-tab-stop">
- <element name="style:tab-stop">
- <ref name="style-tab-stop-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <attribute name="style:position">
- <ref name="nonNegativeLength"/>
- </attribute>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <choice>
- <optional>
- <attribute name="style:type" a:defaultValue="left">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- </choice>
- </attribute>
- </optional>
- <group>
- <attribute name="style:type">
- <value>char</value>
- </attribute>
- <ref name="style-tab-stop-char-attlist"/>
- </group>
- </choice>
-</define>
-<define name="style-tab-stop-char-attlist" combine="interleave">
- <attribute name="style:char">
- <ref name="character"/>
- </attribute>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <optional>
- <attribute name="style:leader-type">
- <ref name="lineType"/>
- </attribute>
- </optional>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <optional>
- <attribute name="style:leader-style">
- <ref name="lineStyle"/>
- </attribute>
- </optional>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <optional>
- <attribute name="style:leader-width">
- <ref name="lineWidth"/>
- </attribute>
- </optional>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <optional>
- <attribute name="style:leader-color">
- <choice>
- <value>font-color</value>
- <ref name="color"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <optional>
- <attribute name="style:leader-text" a:defaultValue=" ">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-tab-stop-attlist" combine="interleave">
- <optional>
- <attribute name="style:leader-text-style">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:tab-stop-distance">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:hyphenation-keep">
- <choice>
- <value>auto</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:hyphenation-ladder-count">
- <choice>
- <value>no-limit</value>
- <ref name="positiveInteger"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-elements" combine="interleave">
- <ref name="style-drop-cap"/>
-</define>
-
-<define name="style-drop-cap">
- <optional>
- <element name="style:drop-cap">
- <ref name="style-drop-cap-attlist"/>
- <empty/>
- </element>
- </optional>
-</define>
-<define name="style-drop-cap-attlist" combine="interleave">
- <optional>
- <attribute name="style:length" a:defaultValue="1">
- <choice>
- <value>word</value>
- <ref name="positiveInteger"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drop-cap-attlist" combine="interleave">
- <optional>
- <attribute name="style:lines" a:defaultValue="1">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drop-cap-attlist" combine="interleave">
- <optional>
- <attribute name="style:distance" a:defaultValue="0cm">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drop-cap-attlist" combine="interleave">
- <optional>
- <attribute name="style:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:register-true">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-horizontal-margin-attlist"/>
-</define>
-
-<define name="common-horizontal-margin-attlist">
- <optional>
- <attribute name="fo:margin-left">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:margin-right">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:text-indent">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:auto-text-indent">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-vertical-margin-attlist"/>
-</define>
-
-<define name="common-vertical-margin-attlist">
- <optional>
- <attribute name="fo:margin-top">
- <choice>
- <ref name="nonNegativeLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:margin-bottom">
- <choice>
- <ref name="nonNegativeLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-margin-attlist"/>
-</define>
-
-<define name="common-margin-attlist">
- <optional>
- <attribute name="fo:margin">
- <choice>
- <ref name="nonNegativeLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-break-attlist"/>
-</define>
-
-<define name="common-break-attlist">
- <optional>
- <attribute name="fo:break-before">
- <choice>
- <value>auto</value>
- <value>column</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:break-after">
- <choice>
- <value>auto</value>
- <value>column</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-
-<define name="common-background-color-attlist">
- <optional>
- <attribute name="fo:background-color">
- <choice>
- <value>transparent</value>
- <ref name="color"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-
-<define name="style-background-image">
- <optional>
- <element name="style:background-image">
- <ref name="style-background-image-attlist"/>
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-binary-data"/>
- <empty/>
- </choice>
- </element>
- </optional>
-</define>
-<define name="style-background-image-attlist" combine="interleave">
- <optional>
- <attribute name="style:repeat" a:defaultValue="repeat">
- <choice>
- <value>no-repeat</value>
- <value>repeat</value>
- <value>stretch</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-background-image-attlist" combine="interleave">
- <optional>
- <attribute name="style:position" a:defaultValue="center">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>top</value>
- <value>bottom</value>
- <list>
- <ref name="horiBackPos"/>
- <ref name="vertBackPos"/>
- </list>
- <list>
- <ref name="vertBackPos"/>
- <ref name="horiBackPos"/>
- </list>
- </choice>
- </attribute>
- </optional>
-</define>
-
-<define name="horiBackPos">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- </choice>
-</define>
-<define name="vertBackPos">
- <choice>
- <value>top</value>
- <value>center</value>
- <value>bottom</value>
- </choice>
-</define>
-<define name="style-background-image-attlist" combine="interleave">
- <optional>
- <attribute name="style:filter-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-background-image-attlist" combine="interleave">
- <optional>
- <attribute name="draw:opacity">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-border-attlist"/>
-</define>
-
-<define name="common-border-attlist">
- <optional>
- <attribute name="fo:border">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:border-top">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:border-bottom">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:border-left">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:border-right">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-border-line-width-attlist"/>
-</define>
-
-<define name="common-border-line-width-attlist">
- <optional>
- <attribute name="style:border-line-width">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:border-line-width-top">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:border-line-width-bottom">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:border-line-width-left">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:border-line-width-right">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
-</define>
-
-<define name="borderWidths">
- <list>
- <ref name="positiveLength"/>
- <ref name="positiveLength"/>
- <ref name="positiveLength"/>
- </list>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-padding-attlist"/>
-</define>
-
-<define name="common-padding-attlist">
- <optional>
- <attribute name="fo:padding">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:padding-top">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:padding-bottom">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:padding-left">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:padding-right">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-shadow-attlist"/>
-</define>
-
-<define name="common-shadow-attlist">
- <optional>
- <attribute name="style:shadow">
- <ref name="shadowType"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-keep-with-next-attlist"/>
-</define>
-
-<define name="common-keep-with-next-attlist">
- <optional>
- <attribute name="fo:keep-with-next">
- <choice>
- <value>auto</value>
- <value>always</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:number-lines" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:line-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-autospace">
- <choice>
- <value>none</value>
- <value>ideograph-alpha</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:punctuation-wrap">
- <choice>
- <value>simple</value>
- <value>hanging</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:line-break">
- <choice>
- <value>normal</value>
- <value>strict</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:vertical-align" a:defaultValue="auto">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- <value>auto</value>
- <value>baseline</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-writing-mode-attlist"/>
-</define>
-
-<define name="common-writing-mode-attlist">
- <optional>
- <attribute name="style:writing-mode">
- <choice>
- <value>lr-tb</value>
- <value>rl-tb</value>
- <value>tb-rl</value>
- <value>tb-lr</value>
- <value>lr</value>
- <value>rl</value>
- <value>tb</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:writing-mode-automatic">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:snap-to-layout-grid">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <ref name="common-page-number-attlist"/>
-</define>
-
-<define name="common-page-number-attlist">
- <optional>
- <attribute name="style:page-number">
- <choice> <ref name="positiveInteger"/> <value>auto</value> </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-paragraph-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:background-transparency">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-ruby-properties">
- <element name="style:ruby-properties">
- <ref name="style-ruby-properties-content"/>
- </element>
-</define>
-
-<define name="style-ruby-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-ruby-properties-content-strict">
- <ref name="style-ruby-properties-attlist"/>
- <ref name="style-ruby-properties-elements"/>
-</define>
-
-<define name="style-ruby-properties-elements">
- <empty/>
-</define>
-<define name="style-ruby-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:ruby-position">
- <choice>
- <value>above</value>
- <value>below</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-ruby-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:ruby-align">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>distribute-letter</value>
- <value>distribute-space</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-section-properties">
- <element name="style:section-properties">
- <ref name="style-section-properties-content"/>
- </element>
-</define>
-
-<define name="style-section-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-section-properties-content-strict">
- <ref name="style-section-properties-attlist"/>
- <ref name="style-section-properties-elements"/>
-</define>
-<define name="style-section-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-section-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-<define name="style-section-properties-attlist" combine="interleave">
- <ref name="common-horizontal-margin-attlist"/>
-</define>
-<define name="style-section-properties-elements" combine="interleave">
- <ref name="style-columns"/>
-</define>
-
-<define name="style-columns">
- <optional>
- <element name="style:columns">
- <ref name="style-columns-attlist"/>
- <optional>
- <ref name="style-column-sep"/>
- </optional>
- <zeroOrMore>
- <ref name="style-column"/>
- </zeroOrMore>
- </element>
- </optional>
-</define>
-<define name="style-columns-attlist" combine="interleave">
- <attribute name="fo:column-count">
- <ref name="positiveInteger"/>
- </attribute>
-</define>
-<define name="style-columns-attlist" combine="interleave">
- <optional>
- <attribute name="fo:column-gap">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-column">
- <element name="style:column">
- <ref name="style-column-attlist"/>
- </element>
-</define>
-<define name="style-column-attlist" combine="interleave">
- <attribute name="style:rel-width">
- <ref name="relativeLength"/>
- </attribute>
-</define>
-<define name="style-column-attlist" combine="interleave">
- <optional>
- <attribute name="fo:start-indent" a:defaultValue="0cm">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-column-attlist" combine="interleave">
- <optional>
- <attribute name="fo:end-indent" a:defaultValue="0cm">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-column-attlist" combine="interleave">
- <optional>
- <attribute name="fo:space-before" a:defaultValue="0cm">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-column-attlist" combine="interleave">
- <optional>
- <attribute name="fo:space-after" a:defaultValue="0cm">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-column-sep">
- <element name="style:column-sep">
- <ref name="style-column-sep-attlist"/>
- </element>
-</define>
-<define name="style-column-sep-attlist" combine="interleave">
- <optional>
- <attribute name="style:style" a:defaultValue="solid">
- <choice>
- <value>none</value>
- <value>solid</value>
- <value>dotted</value>
- <value>dashed</value>
- <value>dot-dashed</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-column-sep-attlist" combine="interleave">
- <attribute name="style:width">
- <ref name="length"/>
- </attribute>
-</define>
-<define name="style-column-sep-attlist" combine="interleave">
- <optional>
- <attribute name="style:height" a:defaultValue="100%">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-column-sep-attlist" combine="interleave">
- <optional>
- <attribute name="style:vertical-align" a:defaultValue="top">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-column-sep-attlist" combine="interleave">
- <optional>
- <attribute name="style:color" a:defaultValue="#000000">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-section-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:protect" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-section-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:dont-balance-text-columns">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-section-properties-attlist" combine="interleave">
- <ref name="common-writing-mode-attlist"/>
-</define>
-<define name="style-section-properties-elements" combine="interleave">
- <zeroOrMore>
- <ref name="text-notes-configuration"/>
- </zeroOrMore>
-</define>
-<define name="style-table-properties">
- <element name="style:table-properties">
- <ref name="style-table-properties-content"/>
- </element>
-</define>
-
-<define name="style-table-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-table-properties-content-strict">
- <ref name="style-table-properties-attlist"/>
- <ref name="style-table-properties-elements"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:width">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rel-width">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <optional>
- <attribute name="table:align">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>margins</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-horizontal-margin-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-vertical-margin-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-margin-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-page-number-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-break-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-table-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-shadow-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-keep-with-next-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:may-break-between-rows">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <optional>
- <attribute name="table:border-model">
- <choice>
- <value>collapsing</value>
- <value>separating</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <ref name="common-writing-mode-attlist"/>
-</define>
-<define name="style-table-properties-attlist" combine="interleave">
- <optional>
- <attribute name="table:display">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-column-properties">
- <element name="style:table-column-properties">
- <ref name="style-table-column-properties-content"/>
- </element>
-</define>
-
-<define name="style-table-column-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-table-column-properties-content-strict">
- <ref name="style-table-column-properties-attlist"/>
- <ref name="style-table-column-properties-elements"/>
-</define>
-
-<define name="style-table-column-properties-elements">
- <empty/>
-</define>
-<define name="style-table-column-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:column-width">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rel-column-width">
- <ref name="relativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-column-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:use-optimal-column-width">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-column-properties-attlist" combine="interleave">
- <ref name="common-break-attlist"/>
-</define>
-<define name="style-table-row-properties">
- <element name="style:table-row-properties">
- <ref name="style-table-row-properties-content"/>
- </element>
-</define>
-
-<define name="style-table-row-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-table-row-properties-content-strict">
- <ref name="style-table-row-properties-attlist"/>
- <ref name="style-table-row-properties-elements"/>
-</define>
-<define name="style-table-row-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:row-height">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:min-row-height">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-row-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:use-optimal-row-height">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-row-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-table-row-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-<define name="style-table-row-properties-attlist" combine="interleave">
- <ref name="common-break-attlist"/>
-</define>
-<define name="style-table-row-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:keep-together">
- <choice>
- <value>auto</value>
- <value>always</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties">
- <element name="style:table-cell-properties">
- <ref name="style-table-cell-properties-content"/>
- </element>
-</define>
-
-<define name="style-table-cell-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-table-cell-properties-content-strict">
- <ref name="style-table-cell-properties-attlist"/>
- <ref name="style-table-cell-properties-elements"/>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:vertical-align">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- <value>automatic</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:text-align-source">
- <choice>
- <value>fix</value>
- <value>value-type</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <ref name="common-style-direction-attlist"/>
-</define>
-
-<define name="common-style-direction-attlist">
- <optional>
- <attribute name="style:direction">
- <choice>
- <value>ltr</value>
- <value>ttb</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:glyph-orientation-vertical">
- <choice>
- <value>auto</value>
- <value>0</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <ref name="common-shadow-attlist"/>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-table-cell-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <ref name="common-border-attlist"/>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:diagonal-tl-br">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:diagonal-tl-br-widths">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:diagonal-bl-tr">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:diagonal-bl-tr-widths">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <ref name="common-border-line-width-attlist"/>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <ref name="common-padding-attlist"/>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:wrap-option">
- <choice>
- <value>no-wrap</value>
- <value>wrap</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <ref name="common-rotation-angle-attlist"/>
-</define>
-
-<define name="common-rotation-angle-attlist">
- <optional>
- <attribute name="style:rotation-angle">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:rotation-align">
- <choice>
- <value>none</value>
- <value>bottom</value>
- <value>top</value>
- <value>center</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:cell-protect">
- <choice>
- <value>none</value>
- <value>hidden-and-protected</value>
- <list>
- <oneOrMore>
- <choice>
- <value>protected</value>
- <value>formula-hidden</value>
- </choice>
- </oneOrMore>
- </list>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:print-content">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:decimal-places">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:repeat-content">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-table-cell-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:shrink-to-fit">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-list-level-properties">
- <element name="style:list-level-properties">
- <ref name="style-list-level-properties-content"/>
- </element>
-</define>
-
-<define name="style-list-level-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-list-level-properties-content-strict">
- <ref name="style-list-level-properties-attlist"/>
- <ref name="style-list-level-properties-elements"/>
-</define>
-
-<define name="style-list-level-properties-elements">
- <empty/>
-</define>
-<define name="style-list-level-properties-attlist" combine="interleave">
- <ref name="common-text-align"/>
-</define>
-<define name="style-list-level-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:space-before">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-list-level-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:min-label-width">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-list-level-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:min-label-distance">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-list-level-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:font-name">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-list-level-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:width">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:height">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-list-level-properties-attlist" combine="interleave">
- <ref name="common-vertical-rel-attlist"/>
- <ref name="common-vertical-pos-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:stroke">
- <choice>
- <value>none</value>
- <value>dash</value>
- <value>solid</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:stroke-dash">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:stroke-dash-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="svg:stroke-width">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="svg:stroke-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:marker-start">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:marker-end">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:marker-start-width">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:marker-end-width">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:marker-start-center">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:marker-end-center">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="svg:stroke-opacity">
- <choice>
- <data type="double">
- <param name="minInclusive">0</param>
- <param name="maxInclusive">1</param>
- </data>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:stroke-linejoin">
- <choice>
- <value>miter</value>
- <value>round</value>
- <value>bevel</value>
- <value>middle</value>
- <value>none</value>
- <value>inherit</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill">
- <choice>
- <value>none</value>
- <value>solid</value>
- <value>bitmap</value>
- <value>gradient</value>
- <value>hatch</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:secondary-fill-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill-gradient-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:gradient-step-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill-hatch-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill-hatch-solid">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill-image-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:repeat">
- <choice>
- <value>no-repeat</value>
- <value>repeat</value>
- <value>stretch</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill-image-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-image-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fill-image-ref-point-x">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-image-ref-point-y">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-image-ref-point">
- <choice>
- <value>top-left</value>
- <value>top</value>
- <value>top-right</value>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>bottom-left</value>
- <value>bottom</value>
- <value>bottom-right</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:tile-repeat-offset"/>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:opacity">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:opacity-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-fill-properties-attlist" combine="interleave">
- <optional>
- <attribute name="svg:fill-rule">
- <choice>
- <value>nonzero</value>
- <value>evenodd</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:symbol-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:animation">
- <choice>
- <value>none</value>
- <value>scroll</value>
- <value>alternate</value>
- <value>slide</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:animation-direction">
- <choice>
- <value>left</value>
- <value>right</value>
- <value>up</value>
- <value>down</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:animation-start-inside">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:animation-stop-inside">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:animation-repeat">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:animation-delay">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="text:animation-steps">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:auto-grow-width">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:auto-grow-height">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fit-to-size">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:fit-to-contour">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:textarea-vertical-align">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- <value>justify</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:textarea-horizontal-align">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>justify</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:wrap-option">
- <choice>
- <value>no-wrap</value>
- <value>wrap</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-elements" combine="interleave">
- <optional>
- <ref name="text-list-style"/>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:color-mode">
- <choice>
- <value>greyscale</value>
- <value>mono</value>
- <value>watermark</value>
- <value>standard</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:color-inversion">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:luminance">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:contrast">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:gamma">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:red">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:green">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:blue">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:image-opacity">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:shadow">
- <choice>
- <value>visible</value>
- <value>hidden</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:shadow-offset-x">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:shadow-offset-y">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:shadow-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:shadow-opacity">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start-line-spacing-horizontal">
- <ref name="distance"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:start-line-spacing-vertical">
- <ref name="distance"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:end-line-spacing-horizontal">
- <ref name="distance"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end-line-spacing-vertical">
- <ref name="distance"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:line-distance">
- <ref name="distance"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:guide-overhang">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:guide-distance">
- <ref name="distance"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:start-guide">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:end-guide">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:placing">
- <choice>
- <value>below</value>
- <value>above</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:parallel">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:measure-align">
- <choice>
- <value>automatic</value>
- <value>left-outside</value>
- <value>inside</value>
- <value>right-outside</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:measure-vertical-align">
- <choice>
- <value>automatic</value>
- <value>above</value>
- <value>below</value>
- <value>center</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:unit">
- <choice>
- <value>automatic</value>
- <value>mm</value>
- <value>cm</value>
- <value>m</value>
- <value>km</value>
- <value>pt</value>
- <value>pc</value>
- <value>inch</value>
- <value>ft</value>
- <value>mi</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:show-unit">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:decimal-places">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-type">
- <choice>
- <value>straight-line</value>
- <value>angled-line</value>
- <value>angled-connector-line</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-angle-type">
- <choice>
- <value>fixed</value>
- <value>free</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-angle">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-gap">
- <ref name="distance"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-escape-direction">
- <choice>
- <value>horizontal</value>
- <value>vertical</value>
- <value>auto</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-escape">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-line-length">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:caption-fit-line-length">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:horizontal-segments">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:vertical-segments">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:edge-rounding">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:edge-rounding-mode">
- <choice>
- <value>correct</value>
- <value>attractive</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:back-scale">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:depth">
- <ref name="length"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:backface-culling">
- <choice>
- <value>enabled</value>
- <value>disabled</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:end-angle">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:close-front">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:close-back">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:lighting-mode">
- <choice>
- <value>standard</value>
- <value>double-sided</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:normals-kind">
- <choice>
- <value>object</value>
- <value>flat</value>
- <value>sphere</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:normals-direction">
- <choice>
- <value>normal</value>
- <value>inverse</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:texture-generation-mode-x">
- <choice>
- <value>object</value>
- <value>parallel</value>
- <value>sphere</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:texture-generation-mode-y">
- <choice>
- <value>object</value>
- <value>parallel</value>
- <value>sphere</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:texture-kind">
- <choice>
- <value>luminance</value>
- <value>intensity</value>
- <value>color</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:texture-filter">
- <choice>
- <value>enabled</value>
- <value>disabled</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:texture-mode">
- <choice>
- <value>replace</value>
- <value>modulate</value>
- <value>blend</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:ambient-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:emissive-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:specular-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:diffuse-color">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:shininess">
- <ref name="percent"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="dr3d:shadow">
- <choice>
- <value>visible</value>
- <value>hidden</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-draw-rel-size-attlist"/>
- <optional>
- <attribute name="fo:min-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:min-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:max-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:max-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-horizontal-margin-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-vertical-margin-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-margin-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:print-content">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:protect">
- <choice>
- <value>none</value>
- <list>
- <oneOrMore>
- <choice>
- <value>content</value>
- <value>position</value>
- <value>size</value>
- </choice>
- </oneOrMore>
- </list>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:horizontal-pos">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>from-left</value>
- <value>inside</value>
- <value>outside</value>
- <value>from-inside</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:x">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:horizontal-rel">
- <choice>
- <value>page</value>
- <value>page-content</value>
- <value>page-start-margin</value>
- <value>page-end-margin</value>
- <value>frame</value>
- <value>frame-content</value>
- <value>frame-start-margin</value>
- <value>frame-end-margin</value>
- <value>paragraph</value>
- <value>paragraph-content</value>
- <value>paragraph-start-margin</value>
- <value>paragraph-end-margin</value>
- <value>char</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-vertical-pos-attlist"/>
-</define>
-
-<define name="common-vertical-pos-attlist">
- <optional>
- <attribute name="style:vertical-pos">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- <value>from-top</value>
- <value>below</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-vertical-rel-attlist"/>
-</define>
-
-<define name="common-vertical-rel-attlist">
- <optional>
- <attribute name="style:vertical-rel">
- <choice>
- <value>page</value>
- <value>page-content</value>
- <value>frame</value>
- <value>frame-content</value>
- <value>paragraph</value>
- <value>paragraph-content</value>
- <value>char</value>
- <value>line</value>
- <value>baseline</value>
- <value>text</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-text-anchor-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-border-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-border-line-width-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-padding-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-shadow-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-background-color-attlist"/>
-</define>
-<define name="style-graphic-properties-elements" combine="interleave">
- <ref name="style-background-image"/>
-</define>
-<define name="style-graphic-properties-elements" combine="interleave">
- <ref name="style-columns"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:editable">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:wrap">
- <choice>
- <value>none</value>
- <value>left</value>
- <value>right</value>
- <value>parallel</value>
- <value>dynamic</value>
- <value>run-through</value>
- <value>biggest</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:wrap-dynamic-threshold">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:number-wrapped-paragraphs">
- <choice>
- <value>no-limit</value>
- <ref name="positiveInteger"/>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:wrap-contour">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:wrap-contour-mode">
- <choice>
- <value>full</value>
- <value>outside</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:run-through">
- <choice>
- <value>foreground</value>
- <value>background</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:flow-with-text">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:overflow-behavior">
- <choice>
- <value>clip</value>
- <value>auto-create-new-frame</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="style:mirror">
- <choice>
- <value>none</value>
- <value>vertical</value>
- <ref name="horizontal-mirror"/>
- <list>
- <value>vertical</value>
- <ref name="horizontal-mirror"/>
- </list>
- <list>
- <ref name="horizontal-mirror"/>
- <value>vertical</value>
- </list>
- </choice>
- </attribute>
- </optional>
-</define>
-
-<define name="horizontal-mirror">
- <choice>
- <value>horizontal</value>
- <value>horizontal-on-odd</value>
- <value>horizontal-on-even</value>
- </choice>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="fo:clip">
- <!-- The attribute value must match the one XSL's clip -->
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:wrap-influence-on-position"
- a:defaultValue="iterative">
- <choice>
- <value>iterative</value>
- <value>once-concurrent</value>
- <value>once-successive</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <ref name="common-writing-mode-attlist"/>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:frame-display-scrollbar">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:frame-display-border">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:frame-margin-horizontal">
- <ref name="nonNegativePixelLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:frame-margin-vertical">
- <ref name="nonNegativePixelLength"/>
- </attribute>
- </optional>
-</define>
-
-<define name="nonNegativePixelLength">
- <data type="string">
- <param name="pattern">([0-9]+(\.[0-9]*)?|\.[0-9]+)(px)</param>
- </data>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:visible-area-left">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:visible-area-top">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:visible-area-width">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:visible-area-height">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-graphic-properties-attlist" combine="interleave">
- <optional>
- <attribute name="draw:ole-draw-aspect">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties">
- <element name="style:chart-properties">
- <ref name="style-chart-properties-content"/>
- </element>
-</define>
-
-<define name="style-chart-properties-content">
- <ref name="style-properties-content"/>
-</define>
-
-<define name="style-chart-properties-content-strict">
- <ref name="style-chart-properties-attlist"/>
- <ref name="style-chart-properties-elements"/>
-</define>
-
-<define name="style-chart-properties-elements">
- <empty/>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:scale-text" a:defaultValue="true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:three-dimensional">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:deep">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <choice>
- <attribute name="chart:symbol-type">
- <value>none</value>
- </attribute>
- <attribute name="chart:symbol-type">
- <value>automatic</value>
- </attribute>
- <group>
- <attribute name="chart:symbol-type">
- <value>named-symbol</value>
- </attribute>
- <attribute name="chart:symbol-name">
- <choice>
- <value>square</value>
- <value>diamond</value>
- <value>arrow-down</value>
- <value>arrow-up</value>
- <value>arrow-right</value>
- <value>arrow-left</value>
- <value>bow-tie</value>
- <value>hourglass</value>
- <value>circle</value>
- <value>star</value>
- <value>x</value>
- <value>plus</value>
- <value>asterisk</value>
- <value>horizontal-bar</value>
- <value>vertical-bar</value>
- </choice>
- </attribute>
- </group>
- <group>
- <attribute name="chart:symbol-type">
- <value>image</value>
- </attribute>
- <element name="chart:symbol-image">
- <attribute name="xlink:href">
- <ref name="anyURI"/>
- </attribute>
- </element>
- </group>
- <empty/>
- </choice>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:symbol-width">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:symbol-height">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:vertical" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:connect-bars" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:gap-width">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:overlap">
- <ref name="integer"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:japanese-candle-stick"
- a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:interpolation" a:defaultValue="none">
- <choice>
- <value>none</value>
- <value>cubic-spline</value>
- <value>b-spline</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:spline-order" a:defaultValue="2">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:spline-resolution" a:defaultValue="20">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:pie-offset" a:defaultValue="0">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:lines" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:solid-type" a:defaultValue="cuboid">
- <choice>
- <value>cuboid</value>
- <value>cylinder</value>
- <value>cone</value>
- <value>pyramid</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:stacked" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:percentage" a:defaultValue="false">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:link-data-style-to-source">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:visible">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:logarithmic">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:maximum">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:minimum">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:origin">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:interval-major">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:interval-minor-divisor">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:tick-marks-major-inner">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:tick-marks-major-outer">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:tick-marks-minor-inner">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:tick-marks-minor-outer">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:display-label">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:text-overlap">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:line-break">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:label-arrangement"
- a:defaultValue="side-by-side">
- <choice>
- <value>side-by-side</value>
- <value>stagger-even</value>
- <value>stagger-odd</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <ref name="common-style-direction-attlist"/>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <ref name="common-rotation-angle-attlist"/>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:data-label-number">
- <choice>
- <value>none</value>
- <value>value</value>
- <value>percentage</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:data-label-text">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:data-label-symbol">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:mean-value">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:error-category" a:defaultValue="none">
- <choice>
- <value>none</value>
- <value>variance</value>
- <value>standard-deviation</value>
- <value>percentage</value>
- <value>error-margin</value>
- <value>constant</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:error-percentage">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:error-margin">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:error-lower-limit">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:error-upper-limit">
- <ref name="double"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:error-upper-indicator">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:error-lower-indicator">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:series-source" a:defaultValue="columns">
- <choice>
- <value>columns</value>
- <value>rows</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-chart-properties-attlist" combine="interleave">
- <optional>
- <attribute name="chart:regression-type" a:defaultValue="none">
- <choice>
- <value>none</value>
- <value>linear</value>
- <value>logarithmic</value>
- <value>exponential</value>
- <value>power</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="presentation:transition-type">
- <choice>
- <value>manual</value>
- <value>automatic</value>
- <value>semi-automatic</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="presentation:transition-style">
- <choice>
- <value>none</value>
- <value>fade-from-left</value>
- <value>fade-from-top</value>
- <value>fade-from-right</value>
- <value>fade-from-bottom</value>
- <value>fade-from-upperleft</value>
- <value>fade-from-upperright</value>
- <value>fade-from-lowerleft</value>
- <value>fade-from-lowerright</value>
- <value>move-from-left</value>
- <value>move-from-top</value>
- <value>move-from-right</value>
- <value>move-from-bottom</value>
- <value>move-from-upperleft</value>
- <value>move-from-upperright</value>
- <value>move-from-lowerleft</value>
- <value>move-from-lowerright</value>
- <value>uncover-to-left</value>
- <value>uncover-to-top</value>
- <value>uncover-to-right</value>
- <value>uncover-to-bottom</value>
- <value>uncover-to-upperleft</value>
- <value>uncover-to-upperright</value>
- <value>uncover-to-lowerleft</value>
- <value>uncover-to-lowerright</value>
- <value>fade-to-center</value>
- <value>fade-from-center</value>
- <value>vertical-stripes</value>
- <value>horizontal-stripes</value>
- <value>clockwise</value>
- <value>counterclockwise</value>
- <value>open-vertical</value>
- <value>open-horizontal</value>
- <value>close-vertical</value>
- <value>close-horizontal</value>
- <value>wavyline-from-left</value>
- <value>wavyline-from-top</value>
- <value>wavyline-from-right</value>
- <value>wavyline-from-bottom</value>
- <value>spiralin-left</value>
- <value>spiralin-right</value>
- <value>spiralout-left</value>
- <value>spiralout-right</value>
- <value>roll-from-top</value>
- <value>roll-from-left</value>
- <value>roll-from-right</value>
- <value>roll-from-bottom</value>
- <value>stretch-from-left</value>
- <value>stretch-from-top</value>
- <value>stretch-from-right</value>
- <value>stretch-from-bottom</value>
-
- <value>vertical-lines</value>
- <value>horizontal-lines</value>
- <value>dissolve</value>
- <value>random</value>
- <value>vertical-checkerboard</value>
- <value>horizontal-checkerboard</value>
- <value>interlocking-horizontal-left</value>
- <value>interlocking-horizontal-right</value>
- <value>interlocking-vertical-top</value>
- <value>interlocking-vertical-bottom</value>
- <value>fly-away</value>
- <value>open</value>
- <value>close</value>
- <value>melt</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="presentation:transition-speed">
- <ref name="presentationSpeeds"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist " combine="interleave">
- <optional>
- <attribute name="smil:type">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist" combine="interleave">
- <optional>
- <attribute name="smil:subtype">
- <ref name="string"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist" combine="interleave">
- <optional>
- <attribute name="smil:direction" a:defaultValue="forward">
- <choice>
- <value>forward</value>
- <value>reverse</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist" combine="interleave">
- <optional>
- <attribute name="smil:fadeColor">
- <ref name="color"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="presentation:duration">
- <ref name="duration"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="presentation:visibility">
- <choice>
- <value>visible</value>
- <value>hidden</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-elements"
- combine="interleave">
- <optional>
- <ref name="presentation-sound"/>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="draw:background-size">
- <choice>
- <value>full</value>
- <value>border</value>
- </choice>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="presentation:background-objects-visible">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist"
- combine="interleave">
- <optional>
- <attribute name="presentation:background-visible">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:display-header">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:display-footer">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:display-page-number">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="style-drawing-page-properties-attlist" combine="interleave">
- <optional>
- <attribute name="presentation:display-date-time">
- <ref name="boolean"/>
- </attribute>
- </optional>
-</define>
-<define name="string">
- <data type="string"/>
-</define>
-<define name="date">
- <data type="date"/>
-</define>
-<define name="time">
- <data type="time"/>
-</define>
-<define name="dateTime">
- <data type="dateTime"/>
-</define>
-<define name="duration">
- <data type="duration"/>
-</define>
-<define name="integer">
- <data type="integer"/>
-</define>
-<define name="nonNegativeInteger">
- <data type="nonNegativeInteger"/>
-</define>
-<define name="positiveInteger">
- <data type="positiveInteger"/>
-</define>
-<define name="double">
- <data type="double"/>
-</define>
-<define name="anyURI">
- <data type="anyURI"/>
-</define>
-<define name="base64Binary">
- <data type="base64Binary"/>
-</define>
-<define name="ID">
- <data type="ID"/>
-</define>
-<define name="IDREF">
- <data type="IDREF"/>
-</define>
-<define name="IDREFS">
- <data type="IDREFS"/>
-</define>
-<define name="boolean">
- <choice>
- <value>true</value>
- <value>false</value>
- </choice>
-</define>
-<define name="dateOrDateTime">
- <choice>
- <data type="date"/>
- <data type="dateTime"/>
- </choice>
-</define>
-<define name="timeOrDateTime">
- <choice>
- <data type="time"/>
- <data type="dateTime"/>
- </choice>
-</define>
-<define name="language">
- <data type="language"/>
-</define>
-<define name="countryCode">
- <data type="token">
- <param name="pattern">[A-Za-z0-9]{1,8}</param>
- </data>
-</define>
-<define name="languageCode">
- <data type="token">
- <param name="pattern">[A-Za-z]{1,8}</param>
- </data>
-</define>
-<define name="character">
- <data type="string">
- <param name="length">1</param>
- </data>
-</define>
-<define name="length">
- <data type="string">
- <param name="pattern">-?([0-9]+(\.[0-9]*)?|\.[0-9]+)((cm)|(mm)|(in)|(pt)|(pc)|(px))</param>
-
- </data>
-</define>
-<define name="nonNegativeLength">
- <data type="string">
- <param name="pattern">([0-9]+(\.[0-9]*)?|\.[0-9]+)((cm)|(mm)|(in)|(pt)|(pc)|(px))</param>
-
- </data>
-</define>
-<define name="positiveLength">
- <data type="string">
- <param name="pattern">([0-9]*[1-9][0-9]*(\.[0-9]*)?|0+\.[0-9]*[1-9][0-9]*|\.[0-9]*[1-9][0-9]*)((cm)|(mm)|(in)|(pt)|(pc)|(px))</param>
-
- </data>
-</define>
-<define name="percent">
- <data type="string">
- <param name="pattern">-?([0-9]+(\.[0-9]*)?|\.[0-9]+)%</param>
- </data>
-</define>
-<define name="relativeLength">
- <data type="string">
- <param name="pattern">[0-9]+\*</param>
- </data>
-</define>
-<define name="coordinate">
- <ref name="length"/>
-</define>
-<define name="distance">
- <ref name="length"/>
-</define>
-<define name="color">
- <data type="string">
- <param name="pattern">#[0-9a-fA-F]{6}</param>
- </data>
-</define>
-<define name="styleName">
- <data type="NCName"/>
-</define>
-<define name="styleNameRef">
- <choice>
- <data type="NCName"/>
- <empty/>
- </choice>
-</define>
-<define name="styleNameRefs">
- <list>
- <zeroOrMore>
- <data type="NCName"/>
- </zeroOrMore>
- </list>
-</define>
-<define name="variableName">
- <data type="string"/>
-</define>
-<define name="formula">
- <!-- A formula should start with a namespace prefix, -->
- <!-- but has no restrictions-->
- <data type="string"/>
-</define>
-
-<define name="targetFrameName">
- <choice>
- <value>_self</value>
- <value>_blank</value>
- <value>_parent</value>
- <value>_top</value>
- <ref name="string"/>
- </choice>
-</define>
-
-<define name="valueType">
- <choice>
- <value>float</value>
- <value>time</value>
- <value>date</value>
- <value>percentage</value>
- <value>currency</value>
- <value>boolean</value>
- <value>string</value>
- </choice>
-</define>
-
-<define name="points">
- <data type="string">
- <param name="pattern">-?[0-9]+,-?[0-9]+([ ]+-?[0-9]+,-?[0-9]+)*</param>
- </data>
-</define>
-<define name="pathData">
- <data type="string"/>
-</define>
-
-<define name="vector3D">
- <data type="string">
- <param name="pattern">\([ ]*-?([0-9]+(\.[0-9]*)?|\.[0-9]+)([ ]+-?([0-9]+(\.[0-9]*)?|\.[0-9]+)){2}[ ]*\)</param>
-
- </data>
-</define>
-
-<define name="namespacedToken">
- <data type="string">
- <param name="pattern">[0-9a-zA-Z_]+:[0-9a-zA-Z._\-]+</param>
- </data>
-</define>
-<define name="anyAttListOrElements">
- <zeroOrMore>
- <attribute>
- <anyName/>
- <text/>
- </attribute>
- </zeroOrMore>
- <ref name="anyElements"/>
-</define>
-<define name="anyElements">
- <zeroOrMore>
- <element>
- <anyName/>
- <mixed>
- <ref name="anyAttListOrElements"/>
- </mixed>
- </element>
- </zeroOrMore>
-</define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-strict-schema-v1.0-os.rng b/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-strict-schema-v1.0-os.rng
deleted file mode 100644
index aa761dc880d..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-strict-schema-v1.0-os.rng
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- OASIS OpenDocument v1.0
- OASIS Standard, 1 May 2005
- Strict Relax-NG Schema
-
- $Id$
-
- © 2002-2005 OASIS Open
- © 1999-2005 Sun Microsystems, Inc.
--->
-
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
- <include href="OpenDocument-schema-v1.0-os.rng">
- <define name="office-meta-content">
- <ref name="office-meta-content-strict"/>
- </define>
- <define name="style-page-layout-properties-content">
- <ref name="style-page-layout-properties-content-strict"/>
- </define>
- <define name="style-header-footer-properties-content">
- <ref name="style-header-footer-properties-content-strict"/>
- </define>
- <define name="style-drawing-page-properties-content">
- <ref name="style-drawing-page-properties-content-strict"/>
- </define>
- <define name="style-text-properties-content">
- <ref name="style-text-properties-content-strict"/>
- </define>
- <define name="style-paragraph-properties-content">
- <ref name="style-paragraph-properties-content-strict"/>
- </define>
- <define name="style-ruby-properties-content">
- <ref name="style-ruby-properties-content-strict"/>
- </define>
- <define name="style-section-properties-content">
- <ref name="style-section-properties-content-strict"/>
- </define>
- <define name="style-list-level-properties-content">
- <ref name="style-list-level-properties-content-strict"/>
- </define>
- <define name="style-table-properties-content">
- <ref name="style-table-properties-content-strict"/>
- </define>
- <define name="style-table-column-properties-content">
- <ref name="style-table-column-properties-content-strict"/>
- </define>
- <define name="style-table-row-properties-content">
- <ref name="style-table-row-properties-content-strict"/>
- </define>
- <define name="style-table-cell-properties-content">
- <ref name="style-table-cell-properties-content-strict"/>
- </define>
- <define name="style-graphic-properties-content">
- <ref name="style-graphic-properties-content-strict"/>
- </define>
- <define name="style-chart-properties-content">
- <ref name="style-properties-content"/>
- </define>
- </include>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-strict-schema-v1.1.rng b/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-strict-schema-v1.1.rng
deleted file mode 100644
index e77fe4ba6ef..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-strict-schema-v1.1.rng
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- OASIS OpenDocument v1.1
- OASIS Standard, 1 Feb 2007
- Strict Relax-NG Schema
-
- $Id$
-
- © 2002-2007 OASIS Open
- © 1999-2007 Sun Microsystems, Inc.
--->
-
-<grammar xmlns="http://relaxng.org/ns/structure/1.0">
- <include href="OpenDocument-schema-v1.1.rng">
- <define name="office-meta-content">
- <ref name="office-meta-content-strict"/>
- </define>
- <define name="style-page-layout-properties-content">
- <ref name="style-page-layout-properties-content-strict"/>
- </define>
- <define name="style-header-footer-properties-content">
- <ref name="style-header-footer-properties-content-strict"/>
- </define>
- <define name="style-drawing-page-properties-content">
- <ref name="style-drawing-page-properties-content-strict"/>
- </define>
- <define name="style-text-properties-content">
- <ref name="style-text-properties-content-strict"/>
- </define>
- <define name="style-paragraph-properties-content">
- <ref name="style-paragraph-properties-content-strict"/>
- </define>
- <define name="style-ruby-properties-content">
- <ref name="style-ruby-properties-content-strict"/>
- </define>
- <define name="style-section-properties-content">
- <ref name="style-section-properties-content-strict"/>
- </define>
- <define name="style-list-level-properties-content">
- <ref name="style-list-level-properties-content-strict"/>
- </define>
- <define name="style-table-properties-content">
- <ref name="style-table-properties-content-strict"/>
- </define>
- <define name="style-table-column-properties-content">
- <ref name="style-table-column-properties-content-strict"/>
- </define>
- <define name="style-table-row-properties-content">
- <ref name="style-table-row-properties-content-strict"/>
- </define>
- <define name="style-table-cell-properties-content">
- <ref name="style-table-cell-properties-content-strict"/>
- </define>
- <define name="style-graphic-properties-content">
- <ref name="style-graphic-properties-content-strict"/>
- </define>
- <define name="style-chart-properties-content">
- <ref name="style-chart-properties-content-strict"/>
- </define>
- </include>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-v1.2-cos01-dsig-schema.rng b/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-v1.2-cos01-dsig-schema.rng
deleted file mode 100644
index bb2e591d86e..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-v1.2-cos01-dsig-schema.rng
+++ /dev/null
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Open Document Format for Office Applications (OpenDocument) Version 1.2
- Candidate OASIS Standard (COS) 01, 10 May 2011
- Digital Signatures Relax-NG Schema
- Source: http://docs.oasis-open.org/office/v1.2/cos01/
- Copyright (c) OASIS Open 2002-2011. All Rights Reserved.
-
- All capitalized terms in the following text have the meanings assigned to them
- in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The
- full Policy may be found at the OASIS website.
-
- This document and translations of it may be copied and furnished to others, and
- derivative works that comment on or otherwise explain it or assist in its
- implementation may be prepared, copied, published, and distributed, in whole or
- in part, without restriction of any kind, provided that the above copyright
- notice and this section are included on all such copies and derivative works.
- However, this document itself may not be modified in any way, including by
- removing the copyright notice or references to OASIS, except as needed for the
- purpose of developing any document or deliverable produced by an OASIS
- Technical Committee (in which case the rules applicable to copyrights, as set
- forth in the OASIS IPR Policy, must be followed) or as required to translate it
- into languages other than English.
-
- The limited permissions granted above are perpetual and will not be revoked by
- OASIS or its successors or assigns.
-
- This document and the information contained herein is provided on an "AS IS"
- basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
- LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT
- INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
- FITNESS FOR A PARTICULAR PURPOSE.
--->
-
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
-
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
-
- xmlns:dsig="urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0"
- xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
->
-<start>
- <choice>
- <ref name="dsig-document-signatures"/>
- </choice>
-</start>
-<define name="dsig-document-signatures">
- <element name="dsig:document-signatures">
- <ref name="dsig-document-signatures-attlist"/>
- <oneOrMore>
- <ref name="ds-signature"/>
- </oneOrMore>
- </element>
-</define>
-<define name="dsig-document-signatures-attlist">
- <attribute name="dsig:version">
- <value>1.2</value>
- </attribute>
-</define>
-<define name="ds-signature">
- <element name="ds:Signature">
- <!-- The permitted content of this element is the permitted -->
- <!-- content of the Signature element defined by W3C XML -->
- <!-- Signature Syntax and Processing (Second Edition). -->
- <!-- See OpenDocument v1.2 part 3, section 4.3. -->
- <ref name="dsMarkup"/>
- </element>
-</define>
-<define name="dsMarkup">
- <zeroOrMore>
- <choice>
- <attribute>
- <anyName/>
- </attribute>
- <text/>
- <element>
- <anyName/>
- <ref name="dsMarkup"/>
- </element>
- </choice>
- </zeroOrMore>
-</define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-v1.2-cos01-manifest-schema.rng b/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-v1.2-cos01-manifest-schema.rng
deleted file mode 100644
index 8902970eec3..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-v1.2-cos01-manifest-schema.rng
+++ /dev/null
@@ -1,224 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Open Document Format for Office Applications (OpenDocument) Version 1.2
- Candidate OASIS Standard (COS) 01, 10 May 2011
- Manifest Relax-NG Schema
- Source: http://docs.oasis-open.org/office/v1.2/cos01/
- Copyright (c) OASIS Open 2002-2011. All Rights Reserved.
-
- All capitalized terms in the following text have the meanings assigned to them
- in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The
- full Policy may be found at the OASIS website.
-
- This document and translations of it may be copied and furnished to others, and
- derivative works that comment on or otherwise explain it or assist in its
- implementation may be prepared, copied, published, and distributed, in whole or
- in part, without restriction of any kind, provided that the above copyright
- notice and this section are included on all such copies and derivative works.
- However, this document itself may not be modified in any way, including by
- removing the copyright notice or references to OASIS, except as needed for the
- purpose of developing any document or deliverable produced by an OASIS
- Technical Committee (in which case the rules applicable to copyrights, as set
- forth in the OASIS IPR Policy, must be followed) or as required to translate it
- into languages other than English.
-
- The limited permissions granted above are perpetual and will not be revoked by
- OASIS or its successors or assigns.
-
- This document and the information contained herein is provided on an "AS IS"
- basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
- LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT
- INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
- FITNESS FOR A PARTICULAR PURPOSE.
--->
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
-
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
-
- xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0"
->
-<start>
- <choice>
- <ref name="manifest"/>
- </choice>
-</start>
-<define name="manifest">
- <element name="manifest:manifest">
- <ref name="manifest-attlist"/>
- <oneOrMore>
- <ref name="file-entry"/>
- </oneOrMore>
- </element>
-</define>
-<define name="manifest-attlist">
- <attribute name="manifest:version">
- <value>1.2</value>
- </attribute>
-</define>
-<define name="file-entry">
- <element name="manifest:file-entry">
- <ref name="file-entry-attlist"/>
- <optional>
- <ref name="encryption-data"/>
- </optional>
- </element>
-</define>
-<define name="file-entry-attlist">
- <interleave>
- <attribute name="manifest:full-path">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="manifest:size">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <attribute name="manifest:media-type">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="manifest:preferred-view-mode">
- <choice>
- <value>edit</value>
- <value>presentation-slide-show</value>
- <value>read-only</value>
- <ref name="namespacedToken"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="manifest:version">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
-</define>
-
-<define name="encryption-data">
- <element name="manifest:encryption-data">
- <ref name="encryption-data-attlist"/>
- <ref name="algorithm"/>
- <optional>
- <ref name="start-key-generation"/>
- </optional>
- <ref name="key-derivation"/>
- </element>
-</define>
-<define name="encryption-data-attlist">
- <interleave>
- <attribute name="manifest:checksum-type">
- <choice>
- <value>SHA1/1K</value>
- <ref name="anyURI"/>
- </choice>
- </attribute>
- <attribute name="manifest:checksum">
- <ref name="base64Binary"/>
- </attribute>
- </interleave>
-</define>
-<define name="algorithm">
- <element name="manifest:algorithm">
- <ref name="algorithm-attlist"/>
- <ref name="anyElements"/>
- </element>
-</define>
-<define name="algorithm-attlist">
- <interleave>
- <attribute name="manifest:algorithm-name">
- <choice>
- <value>Blowfish CFB</value>
- <ref name="anyURI"/>
- </choice>
- </attribute>
- <attribute name="manifest:initialisation-vector">
- <ref name="base64Binary"/>
- </attribute>
- </interleave>
-</define>
-<define name="anyAttListOrElements">
- <zeroOrMore>
- <attribute>
- <anyName/>
- <text/>
- </attribute>
- </zeroOrMore>
- <ref name="anyElements"/>
-</define>
-<define name="anyElements">
- <zeroOrMore>
- <element>
- <anyName/>
- <mixed>
- <ref name="anyAttListOrElements"/>
- </mixed>
- </element>
- </zeroOrMore>
-</define>
-<define name="key-derivation">
- <element name="manifest:key-derivation">
- <ref name="key-derivation-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="key-derivation-attlist">
- <interleave>
- <attribute name="manifest:key-derivation-name">
- <choice>
- <value>PBKDF2</value>
- <ref name="anyURI"/>
- </choice>
- </attribute>
- <attribute name="manifest:salt">
- <ref name="base64Binary"/>
- </attribute>
- <attribute name="manifest:iteration-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- <optional>
- <attribute name="manifest:key-size">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </interleave>
-</define>
-<define name="start-key-generation">
- <element name="manifest:start-key-generation">
- <ref name="start-key-generation-attlist"/>
- <empty/>
- </element>
-</define>
-<define name="start-key-generation-attlist">
- <interleave>
- <attribute name="manifest:start-key-generation-name">
- <choice>
- <value>SHA1</value>
- <ref name="anyURI"/>
- </choice>
- </attribute>
- <optional>
- <attribute name="manifest:key-size">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </interleave>
-</define>
-<define name="base64Binary">
- <data type="base64Binary"/>
-</define>
-<define name="namespacedToken">
- <data type="QName">
- <param name="pattern">[^:]+:[^:]+</param>
- </data>
-</define>
-<define name="nonNegativeInteger">
- <data type="nonNegativeInteger"/>
-</define>
-<define name="string">
- <data type="string"/>
-</define>
-<define name="anyURI">
- <data type="anyURI"/>
-</define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-v1.2-cos01-schema.rng b/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-v1.2-cos01-schema.rng
deleted file mode 100644
index bd57af13f74..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/OpenDocument-v1.2-cos01-schema.rng
+++ /dev/null
@@ -1,18127 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Open Document Format for Office Applications (OpenDocument) Version 1.2
- Candidate OASIS Standard (COS) 01, 10 May 2011
- Relax-NG Schema
- Source: http://docs.oasis-open.org/office/v1.2/cos01/
- Copyright (c) OASIS Open 2002-2011. All Rights Reserved.
-
- All capitalized terms in the following text have the meanings assigned to them
- in the OASIS Intellectual Property Rights Policy (the "OASIS IPR Policy"). The
- full Policy may be found at the OASIS website.
-
- This document and translations of it may be copied and furnished to others, and
- derivative works that comment on or otherwise explain it or assist in its
- implementation may be prepared, copied, published, and distributed, in whole or
- in part, without restriction of any kind, provided that the above copyright
- notice and this section are included on all such copies and derivative works.
- However, this document itself may not be modified in any way, including by
- removing the copyright notice or references to OASIS, except as needed for the
- purpose of developing any document or deliverable produced by an OASIS
- Technical Committee (in which case the rules applicable to copyrights, as set
- forth in the OASIS IPR Policy, must be followed) or as required to translate it
- into languages other than English.
-
- The limited permissions granted above are perpetual and will not be revoked by
- OASIS or its successors or assigns.
-
- This document and the information contained herein is provided on an "AS IS"
- basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
- LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT
- INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
- FITNESS FOR A PARTICULAR PURPOSE.
--->
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
-
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
-
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
- xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
- xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
- xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
- xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
- xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
- xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
- xmlns:db="urn:oasis:names:tc:opendocument:xmlns:database:1.0"
- xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
- xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0"
-
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:math="http://www.w3.org/1998/Math/MathML"
- xmlns:xforms="http://www.w3.org/2002/xforms"
- xmlns:grddl="http://www.w3.org/2003/g/data-view#"
- xmlns:xhtml="http://www.w3.org/1999/xhtml"
-
- xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
- xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
- xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0"
->
- <define name="office-process-content">
- <optional>
- <attribute name="office:process-content">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <start>
- <choice>
- <ref name="office-document"/>
- <ref name="office-document-content"/>
- <ref name="office-document-styles"/>
- <ref name="office-document-meta"/>
- <ref name="office-document-settings"/>
- </choice>
- </start>
- <define name="office-document">
- <element name="office:document">
- <ref name="office-document-attrs"/>
- <ref name="office-document-common-attrs"/>
- <ref name="office-meta"/>
- <ref name="office-settings"/>
- <ref name="office-scripts"/>
- <ref name="office-font-face-decls"/>
- <ref name="office-styles"/>
- <ref name="office-automatic-styles"/>
- <ref name="office-master-styles"/>
- <ref name="office-body"/>
- </element>
- </define>
- <define name="office-document-content">
- <element name="office:document-content">
- <ref name="office-document-common-attrs"/>
- <ref name="office-scripts"/>
- <ref name="office-font-face-decls"/>
- <ref name="office-automatic-styles"/>
- <ref name="office-body"/>
- </element>
- </define>
- <define name="office-document-styles">
- <element name="office:document-styles">
- <ref name="office-document-common-attrs"/>
- <ref name="office-font-face-decls"/>
- <ref name="office-styles"/>
- <ref name="office-automatic-styles"/>
- <ref name="office-master-styles"/>
- </element>
- </define>
- <define name="office-document-meta">
- <element name="office:document-meta">
- <ref name="office-document-common-attrs"/>
- <ref name="office-meta"/>
- </element>
- </define>
- <define name="office-document-settings">
- <element name="office:document-settings">
- <ref name="office-document-common-attrs"/>
- <ref name="office-settings"/>
- </element>
- </define>
- <define name="office-document-common-attrs">
- <interleave>
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <optional>
- <attribute name="grddl:transformation">
- <list>
- <zeroOrMore>
- <ref name="anyIRI"/>
- </zeroOrMore>
- </list>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="office-document-attrs">
- <attribute name="office:mimetype">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="office-meta">
- <optional>
- <element name="office:meta">
- <ref name="office-meta-content-strict"/>
- </element>
- </optional>
- </define>
- <define name="office-meta-content-strict">
- <zeroOrMore>
- <ref name="office-meta-data"/>
- </zeroOrMore>
- </define>
- <define name="office-body">
- <element name="office:body">
- <ref name="office-body-content"/>
- </element>
- </define>
- <define name="office-body-content">
- <choice>
- <element name="office:text">
- <ref name="office-text-attlist"/>
- <ref name="office-text-content-prelude"/>
- <ref name="office-text-content-main"/>
- <ref name="office-text-content-epilogue"/>
- </element>
- <element name="office:drawing">
- <ref name="office-drawing-attlist"/>
- <ref name="office-drawing-content-prelude"/>
- <ref name="office-drawing-content-main"/>
- <ref name="office-drawing-content-epilogue"/>
- </element>
- <element name="office:presentation">
- <ref name="office-presentation-attlist"/>
- <ref name="office-presentation-content-prelude"/>
- <ref name="office-presentation-content-main"/>
- <ref name="office-presentation-content-epilogue"/>
- </element>
- <element name="office:spreadsheet">
- <ref name="office-spreadsheet-attlist"/>
- <ref name="office-spreadsheet-content-prelude"/>
- <ref name="office-spreadsheet-content-main"/>
- <ref name="office-spreadsheet-content-epilogue"/>
- </element>
- <element name="office:chart">
- <ref name="office-chart-attlist"/>
- <ref name="office-chart-content-prelude"/>
- <ref name="office-chart-content-main"/>
- <ref name="office-chart-content-epilogue"/>
- </element>
- <element name="office:image">
- <ref name="office-image-attlist"/>
- <ref name="office-image-content-prelude"/>
- <ref name="office-image-content-main"/>
- <ref name="office-image-content-epilogue"/>
- </element>
- <ref name="office-database"/>
- </choice>
- </define>
- <define name="office-text-content-prelude">
- <ref name="office-forms"/>
- <ref name="text-tracked-changes"/>
- <ref name="text-decls"/>
- <ref name="table-decls"/>
- </define>
- <define name="office-text-content-main">
- <choice>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- <group>
- <ref name="text-page-sequence"/>
- <zeroOrMore>
- <choice>
- <ref name="shape"/>
- </choice>
- </zeroOrMore>
- </group>
- </choice>
- </define>
- <define name="text-content">
- <choice>
- <ref name="text-h"/>
- <ref name="text-p"/>
- <ref name="text-list"/>
- <ref name="text-numbered-paragraph"/>
- <ref name="table-table"/>
- <ref name="text-section"/>
- <ref name="text-soft-page-break"/>
- <ref name="text-table-of-content"/>
- <ref name="text-illustration-index"/>
- <ref name="text-table-index"/>
- <ref name="text-object-index"/>
- <ref name="text-user-index"/>
- <ref name="text-alphabetical-index"/>
- <ref name="text-bibliography"/>
- <ref name="shape"/>
- <ref name="change-marks"/>
- </choice>
- </define>
- <define name="office-text-content-epilogue">
- <ref name="table-functions"/>
- </define>
- <define name="office-text-attlist">
- <interleave>
- <optional>
- <attribute name="text:global">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-soft-page-breaks">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="office-drawing-attlist">
- <empty/>
- </define>
- <define name="office-drawing-content-prelude">
- <ref name="text-decls"/>
- <ref name="table-decls"/>
- </define>
- <define name="office-drawing-content-main">
- <zeroOrMore>
- <ref name="draw-page"/>
- </zeroOrMore>
- </define>
- <define name="office-drawing-content-epilogue">
- <ref name="table-functions"/>
- </define>
- <define name="office-presentation-attlist">
- <empty/>
- </define>
- <define name="office-presentation-content-prelude">
- <ref name="text-decls"/>
- <ref name="table-decls"/>
- <ref name="presentation-decls"/>
- </define>
- <define name="office-presentation-content-main">
- <zeroOrMore>
- <ref name="draw-page"/>
- </zeroOrMore>
- </define>
- <define name="office-presentation-content-epilogue">
- <ref name="presentation-settings"/>
- <ref name="table-functions"/>
- </define>
- <define name="office-spreadsheet-content-prelude">
- <optional>
- <ref name="table-tracked-changes"/>
- </optional>
- <ref name="text-decls"/>
- <ref name="table-decls"/>
- </define>
- <define name="table-decls">
- <optional>
- <ref name="table-calculation-settings"/>
- </optional>
- <optional>
- <ref name="table-content-validations"/>
- </optional>
- <optional>
- <ref name="table-label-ranges"/>
- </optional>
- </define>
- <define name="office-spreadsheet-content-main">
- <zeroOrMore>
- <ref name="table-table"/>
- </zeroOrMore>
- </define>
- <define name="office-spreadsheet-content-epilogue">
- <ref name="table-functions"/>
- </define>
- <define name="table-functions">
- <optional>
- <ref name="table-named-expressions"/>
- </optional>
- <optional>
- <ref name="table-database-ranges"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-tables"/>
- </optional>
- <optional>
- <ref name="table-consolidation"/>
- </optional>
- <optional>
- <ref name="table-dde-links"/>
- </optional>
- </define>
- <define name="office-chart-attlist">
- <empty/>
- </define>
- <define name="office-chart-content-prelude">
- <ref name="text-decls"/>
- <ref name="table-decls"/>
- </define>
- <define name="office-chart-content-main">
- <ref name="chart-chart"/>
- </define>
- <define name="office-chart-content-epilogue">
- <ref name="table-functions"/>
- </define>
- <define name="office-image-attlist">
- <empty/>
- </define>
- <define name="office-image-content-prelude">
- <empty/>
- </define>
- <define name="office-image-content-main">
- <ref name="draw-frame"/>
- </define>
- <define name="office-image-content-epilogue">
- <empty/>
- </define>
- <define name="office-settings">
- <optional>
- <element name="office:settings">
- <oneOrMore>
- <ref name="config-config-item-set"/>
- </oneOrMore>
- </element>
- </optional>
- </define>
- <define name="config-config-item-set">
- <element name="config:config-item-set">
- <ref name="config-config-item-set-attlist"/>
- <ref name="config-items"/>
- </element>
- </define>
- <define name="config-items">
- <oneOrMore>
- <choice>
- <ref name="config-config-item"/>
- <ref name="config-config-item-set"/>
- <ref name="config-config-item-map-named"/>
- <ref name="config-config-item-map-indexed"/>
- </choice>
- </oneOrMore>
- </define>
- <define name="config-config-item-set-attlist">
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="config-config-item">
- <element name="config:config-item">
- <ref name="config-config-item-attlist"/>
- <text/>
- </element>
- </define>
- <define name="config-config-item-attlist">
- <interleave>
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
- <attribute name="config:type">
- <choice>
- <value>boolean</value>
- <value>short</value>
- <value>int</value>
- <value>long</value>
- <value>double</value>
- <value>string</value>
- <value>datetime</value>
- <value>base64Binary</value>
- </choice>
- </attribute>
- </interleave>
- </define>
- <define name="config-config-item-map-indexed">
- <element name="config:config-item-map-indexed">
- <ref name="config-config-item-map-indexed-attlist"/>
- <oneOrMore>
- <ref name="config-config-item-map-entry"/>
- </oneOrMore>
- </element>
- </define>
- <define name="config-config-item-map-indexed-attlist">
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="config-config-item-map-entry">
- <element name="config:config-item-map-entry">
- <ref name="config-config-item-map-entry-attlist"/>
- <ref name="config-items"/>
- </element>
- </define>
- <define name="config-config-item-map-entry-attlist">
- <optional>
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="config-config-item-map-named">
- <element name="config:config-item-map-named">
- <ref name="config-config-item-map-named-attlist"/>
- <oneOrMore>
- <ref name="config-config-item-map-entry"/>
- </oneOrMore>
- </element>
- </define>
- <define name="config-config-item-map-named-attlist">
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="office-scripts">
- <optional>
- <element name="office:scripts">
- <zeroOrMore>
- <ref name="office-script"/>
- </zeroOrMore>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </element>
- </optional>
- </define>
- <define name="office-script">
- <element name="office:script">
- <ref name="office-script-attlist"/>
- <mixed>
- <ref name="anyElements"/>
- </mixed>
- </element>
- </define>
- <define name="office-script-attlist">
- <attribute name="script:language">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="office-font-face-decls">
- <optional>
- <element name="office:font-face-decls">
- <zeroOrMore>
- <ref name="style-font-face"/>
- </zeroOrMore>
- </element>
- </optional>
- </define>
- <define name="office-styles">
- <optional>
- <element name="office:styles">
- <interleave>
- <ref name="styles"/>
- <zeroOrMore>
- <ref name="style-default-style"/>
- </zeroOrMore>
- <optional>
- <ref name="style-default-page-layout"/>
- </optional>
- <optional>
- <ref name="text-outline-style"/>
- </optional>
- <zeroOrMore>
- <ref name="text-notes-configuration"/>
- </zeroOrMore>
- <optional>
- <ref name="text-bibliography-configuration"/>
- </optional>
- <optional>
- <ref name="text-linenumbering-configuration"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-gradient"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="svg-linearGradient"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="svg-radialGradient"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-hatch"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-fill-image"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-marker"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-stroke-dash"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-opacity"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="style-presentation-page-layout"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="table-table-template"/>
- </zeroOrMore>
- </interleave>
- </element>
- </optional>
- </define>
- <define name="office-automatic-styles">
- <optional>
- <element name="office:automatic-styles">
- <interleave>
- <ref name="styles"/>
- <zeroOrMore>
- <ref name="style-page-layout"/>
- </zeroOrMore>
- </interleave>
- </element>
- </optional>
- </define>
- <define name="office-master-styles">
- <optional>
- <element name="office:master-styles">
- <interleave>
- <zeroOrMore>
- <ref name="style-master-page"/>
- </zeroOrMore>
- <optional>
- <ref name="style-handout-master"/>
- </optional>
- <optional>
- <ref name="draw-layer-set"/>
- </optional>
- </interleave>
- </element>
- </optional>
- </define>
- <define name="styles">
- <interleave>
- <zeroOrMore>
- <ref name="style-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="text-list-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-number-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-currency-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-percentage-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-date-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-time-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-boolean-style"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="number-text-style"/>
- </zeroOrMore>
- </interleave>
- </define>
- <define name="office-meta-data">
- <choice>
- <element name="meta:generator">
- <ref name="string"/>
- </element>
- <element name="dc:title">
- <ref name="string"/>
- </element>
- <element name="dc:description">
- <ref name="string"/>
- </element>
- <element name="dc:subject">
- <ref name="string"/>
- </element>
- <element name="meta:keyword">
- <ref name="string"/>
- </element>
- <element name="meta:initial-creator">
- <ref name="string"/>
- </element>
- <ref name="dc-creator"/>
- <element name="meta:printed-by">
- <ref name="string"/>
- </element>
- <element name="meta:creation-date">
- <ref name="dateTime"/>
- </element>
- <ref name="dc-date"/>
- <element name="meta:print-date">
- <ref name="dateTime"/>
- </element>
- <element name="meta:template">
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:actuate">
- <value>onRequest</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:title">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:date">
- <ref name="dateTime"/>
- </attribute>
- </optional>
- </element>
- <element name="meta:auto-reload">
- <optional>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:show">
- <value>replace</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate">
- <value>onLoad</value>
- </attribute>
- </optional>
- </optional>
- <optional>
- <attribute name="meta:delay">
- <ref name="duration"/>
- </attribute>
- </optional>
- </element>
- <element name="meta:hyperlink-behaviour">
- <optional>
- <attribute name="office:target-frame-name">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
- </element>
- <element name="dc:language">
- <ref name="language"/>
- </element>
- <element name="meta:editing-cycles">
- <ref name="nonNegativeInteger"/>
- </element>
- <element name="meta:editing-duration">
- <ref name="duration"/>
- </element>
- <element name="meta:document-statistic">
- <optional>
- <attribute name="meta:page-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:table-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:draw-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:image-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:ole-object-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:object-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:paragraph-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:word-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:character-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:frame-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:sentence-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:syllable-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:non-whitespace-character-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:row-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="meta:cell-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </element>
- <element name="meta:user-defined">
- <attribute name="meta:name">
- <ref name="string"/>
- </attribute>
- <choice>
- <group>
- <attribute name="meta:value-type">
- <value>float</value>
- </attribute>
- <ref name="double"/>
- </group>
- <group>
- <attribute name="meta:value-type">
- <value>date</value>
- </attribute>
- <ref name="dateOrDateTime"/>
- </group>
- <group>
- <attribute name="meta:value-type">
- <value>time</value>
- </attribute>
- <ref name="duration"/>
- </group>
- <group>
- <attribute name="meta:value-type">
- <value>boolean</value>
- </attribute>
- <ref name="boolean"/>
- </group>
- <group>
- <attribute name="meta:value-type">
- <value>string</value>
- </attribute>
- <ref name="string"/>
- </group>
- <text/>
- </choice>
- </element>
- </choice>
- </define>
- <define name="dc-creator">
- <element name="dc:creator">
- <ref name="string"/>
- </element>
- </define>
- <define name="dc-date">
- <element name="dc:date">
- <ref name="dateTime"/>
- </element>
- </define>
- <define name="text-h">
- <element name="text:h">
- <ref name="heading-attrs"/>
- <ref name="paragraph-attrs"/>
- <optional>
- <ref name="text-number"/>
- </optional>
- <zeroOrMore>
- <ref name="paragraph-content-or-hyperlink"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="heading-attrs">
- <interleave>
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
- <optional>
- <attribute name="text:restart-numbering">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:start-value">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:is-list-header">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-number">
- <element name="text:number">
- <ref name="string"/>
- </element>
- </define>
- <define name="text-p">
- <element name="text:p">
- <ref name="paragraph-attrs"/>
- <zeroOrMore>
- <ref name="paragraph-content-or-hyperlink"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="paragraph-attrs">
- <interleave>
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:class-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:cond-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <group>
- <ref name="xml-id"/>
- <optional>
- <attribute name="text:id">
- <ref name="NCName"/>
- </attribute>
- </optional>
- </group>
- </optional>
- <optional>
- <ref name="common-in-content-meta-attlist"/>
- </optional>
- </interleave>
- </define>
- <define name="text-page-sequence">
- <element name="text:page-sequence">
- <oneOrMore>
- <ref name="text-page"/>
- </oneOrMore>
- </element>
- </define>
- <define name="text-page">
- <element name="text:page">
- <ref name="text-page-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="text-page-attlist">
- <attribute name="text:master-page-name">
- <ref name="styleNameRef"/>
- </attribute>
- </define>
- <define name="text-list">
- <element name="text:list">
- <ref name="text-list-attr"/>
- <optional>
- <ref name="text-list-header"/>
- </optional>
- <zeroOrMore>
- <ref name="text-list-item"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-list-attr">
- <interleave>
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:continue-numbering">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:continue-list">
- <ref name="IDREF"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="text-list-item">
- <element name="text:list-item">
- <ref name="text-list-item-attr"/>
- <ref name="text-list-item-content"/>
- </element>
- </define>
- <define name="text-list-item-content">
- <optional>
- <ref name="text-number"/>
- </optional>
- <zeroOrMore>
- <choice>
- <ref name="text-p"/>
- <ref name="text-h"/>
- <ref name="text-list"/>
- <ref name="text-soft-page-break"/>
- </choice>
- </zeroOrMore>
- </define>
- <define name="text-list-item-attr">
- <interleave>
- <optional>
- <attribute name="text:start-value">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:style-override">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="text-list-header">
- <element name="text:list-header">
- <ref name="text-list-header-attr"/>
- <ref name="text-list-item-content"/>
- </element>
- </define>
- <define name="text-list-header-attr">
- <optional>
- <ref name="xml-id"/>
- </optional>
- </define>
- <define name="text-numbered-paragraph">
- <element name="text:numbered-paragraph">
- <ref name="text-numbered-paragraph-attr"/>
- <optional>
- <ref name="text-number"/>
- </optional>
- <choice>
- <ref name="text-p"/>
- <ref name="text-h"/>
- </choice>
- </element>
- </define>
- <define name="text-numbered-paragraph-attr">
- <interleave>
- <attribute name="text:list-id">
- <ref name="NCName"/>
- </attribute>
- <optional>
- <attribute name="text:level">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- <attribute name="text:continue-numbering">
- <ref name="boolean"/>
- </attribute>
- <attribute name="text:start-value">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="text-section">
- <element name="text:section">
- <ref name="text-section-attlist"/>
- <choice>
- <ref name="text-section-source"/>
- <ref name="text-section-source-dde"/>
- <empty/>
- </choice>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-section-attlist">
- <interleave>
- <ref name="common-section-attlist"/>
- <choice>
- <attribute name="text:display">
- <choice>
- <value>true</value>
- <value>none</value>
- </choice>
- </attribute>
- <group>
- <attribute name="text:display">
- <value>condition</value>
- </attribute>
- <attribute name="text:condition">
- <ref name="string"/>
- </attribute>
- </group>
- <empty/>
- </choice>
- </interleave>
- </define>
- <define name="common-section-attlist">
- <interleave>
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="text:protected">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:protection-key">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:protection-key-digest-algorithm">
- <ref name="anyIRI"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="text-section-source">
- <element name="text:section-source">
- <ref name="text-section-source-attr"/>
- </element>
- </define>
- <define name="text-section-source-attr">
- <interleave>
- <optional>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:show">
- <value>embed</value>
- </attribute>
- </optional>
- </optional>
- <optional>
- <attribute name="text:section-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:filter-name">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-section-source-dde">
- <ref name="office-dde-source"/>
- </define>
- <define name="text-tracked-changes">
- <optional>
- <element name="text:tracked-changes">
- <ref name="text-tracked-changes-attr"/>
- <zeroOrMore>
- <ref name="text-changed-region"/>
- </zeroOrMore>
- </element>
- </optional>
- </define>
- <define name="text-tracked-changes-attr">
- <optional>
- <attribute name="text:track-changes">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="text-changed-region">
- <element name="text:changed-region">
- <ref name="text-changed-region-attr"/>
- <ref name="text-changed-region-content"/>
- </element>
- </define>
- <define name="text-changed-region-attr">
- <group>
- <ref name="xml-id"/>
- <optional>
- <attribute name="text:id">
- <ref name="NCName"/>
- </attribute>
- </optional>
- </group>
- </define>
- <define name="text-changed-region-content">
- <choice>
- <element name="text:insertion">
- <ref name="office-change-info"/>
- </element>
- <element name="text:deletion">
- <ref name="office-change-info"/>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- </element>
- <element name="text:format-change">
- <ref name="office-change-info"/>
- </element>
- </choice>
- </define>
- <define name="change-marks">
- <choice>
- <element name="text:change">
- <ref name="change-mark-attr"/>
- </element>
- <element name="text:change-start">
- <ref name="change-mark-attr"/>
- </element>
- <element name="text:change-end">
- <ref name="change-mark-attr"/>
- </element>
- </choice>
- </define>
- <define name="change-mark-attr">
- <attribute name="text:change-id">
- <ref name="IDREF"/>
- </attribute>
- </define>
- <define name="text-soft-page-break">
- <element name="text:soft-page-break">
- <empty/>
- </element>
- </define>
- <define name="text-decls">
- <optional>
- <element name="text:variable-decls">
- <zeroOrMore>
- <ref name="text-variable-decl"/>
- </zeroOrMore>
- </element>
- </optional>
- <optional>
- <element name="text:sequence-decls">
- <zeroOrMore>
- <ref name="text-sequence-decl"/>
- </zeroOrMore>
- </element>
- </optional>
- <optional>
- <element name="text:user-field-decls">
- <zeroOrMore>
- <ref name="text-user-field-decl"/>
- </zeroOrMore>
- </element>
- </optional>
- <optional>
- <element name="text:dde-connection-decls">
- <zeroOrMore>
- <ref name="text-dde-connection-decl"/>
- </zeroOrMore>
- </element>
- </optional>
- <optional>
- <ref name="text-alphabetical-index-auto-mark-file"/>
- </optional>
- </define>
- <define name="paragraph-content-or-hyperlink">
- <choice>
- <ref name="paragraph-content"/>
- <ref name="text-a"/>
- </choice>
- </define>
- <define name="paragraph-content">
- <choice>
- <text/>
- <element name="text:s">
- <optional>
- <attribute name="text:c">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </element>
- <element name="text:tab">
- <ref name="text-tab-attr"/>
- </element>
- <element name="text:line-break">
- <empty/>
- </element>
- <ref name="text-soft-page-break"/>
- <element name="text:span">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:class-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="paragraph-content-or-hyperlink"/>
- </zeroOrMore>
- </element>
- <element name="text:meta">
- <ref name="text-meta-attlist"/>
- <zeroOrMore>
- <ref name="paragraph-content-or-hyperlink"/>
- </zeroOrMore>
- </element>
- <choice>
- <ref name="text-bookmark"/>
- <ref name="text-bookmark-start"/>
- <ref name="text-bookmark-end"/>
- </choice>
- <element name="text:reference-mark">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
- <choice>
- <element name="text:reference-mark-start">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
- <element name="text:reference-mark-end">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </element>
- </choice>
- <element name="text:note">
- <ref name="text-note-class"/>
- <optional>
- <attribute name="text:id">
- <ref name="string"/>
- </attribute>
- </optional>
- <element name="text:note-citation">
- <optional>
- <attribute name="text:label">
- <ref name="string"/>
- </attribute>
- </optional>
- <text/>
- </element>
- <element name="text:note-body">
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- </element>
- </element>
- <element name="text:ruby">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <element name="text:ruby-base">
- <zeroOrMore>
- <ref name="paragraph-content-or-hyperlink"/>
- </zeroOrMore>
- </element>
- <element name="text:ruby-text">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <text/>
- </element>
- </element>
- <choice>
- <ref name="office-annotation"/>
- <ref name="office-annotation-end"/>
- </choice>
- <ref name="change-marks"/>
- <ref name="shape"/>
- <element name="text:date">
- <ref name="text-date-attlist"/>
- <text/>
- </element>
- <element name="text:time">
- <ref name="text-time-attlist"/>
- <text/>
- </element>
- <element name="text:page-number">
- <ref name="text-page-number-attlist"/>
- <text/>
- </element>
- <element name="text:page-continuation">
- <ref name="text-page-continuation-attlist"/>
- <text/>
- </element>
- <element name="text:sender-firstname">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:sender-lastname">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:sender-initials">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:sender-title">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:sender-position">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:sender-email">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:sender-phone-private">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:sender-fax">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:sender-company">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:sender-phone-work">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:sender-street">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:sender-city">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:sender-postal-code">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:sender-country">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:sender-state-or-province">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:author-name">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:author-initials">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:chapter">
- <ref name="text-chapter-attlist"/>
- <text/>
- </element>
- <element name="text:file-name">
- <ref name="text-file-name-attlist"/>
- <text/>
- </element>
- <element name="text:template-name">
- <ref name="text-template-name-attlist"/>
- <text/>
- </element>
- <element name="text:sheet-name">
- <text/>
- </element>
- <element name="text:variable-set">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-formula-attlist"/>
- <ref name="common-value-and-type-attlist"/>
- <ref name="common-field-display-value-none-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
- <element name="text:variable-get">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-display-value-formula-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
- <element name="text:variable-input">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-description-attlist"/>
- <ref name="common-value-type-attlist"/>
- <ref name="common-field-display-value-none-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
- <element name="text:user-field-get">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-display-value-formula-none-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
- <element name="text:user-field-input">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-description-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
- <element name="text:sequence">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <ref name="common-field-formula-attlist"/>
- <ref name="common-field-num-format-attlist"/>
- <ref name="text-sequence-ref-name"/>
- </interleave>
- <text/>
- </element>
- <element name="text:expression">
- <interleave>
- <ref name="common-field-formula-attlist"/>
- <optional>
- <ref name="common-value-and-type-attlist"/>
- </optional>
- <ref name="common-field-display-value-formula-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
- <element name="text:text-input">
- <ref name="common-field-description-attlist"/>
- <text/>
- </element>
- <element name="text:initial-creator">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:creation-date">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
- <element name="text:creation-time">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:time-value">
- <ref name="timeOrDateTime"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
- <element name="text:description">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:user-defined">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:time-value">
- <ref name="duration"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:boolean-value">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:string-value">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
- <element name="text:print-time">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:time-value">
- <ref name="time"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
- <element name="text:print-date">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:date-value">
- <ref name="date"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
- <element name="text:printed-by">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:title">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:subject">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:keywords">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:editing-cycles">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element name="text:editing-duration">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:duration">
- <ref name="duration"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
- <element name="text:modification-time">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:time-value">
- <ref name="time"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
- <element name="text:modification-date">
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- <optional>
- <attribute name="text:date-value">
- <ref name="date"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
- <element name="text:creator">
- <ref name="common-field-fixed-attlist"/>
- <text/>
- </element>
- <element>
- <choice>
- <name>text:page-count</name>
- <name>text:paragraph-count</name>
- <name>text:word-count</name>
- <name>text:character-count</name>
- <name>text:table-count</name>
- <name>text:image-count</name>
- <name>text:object-count</name>
- </choice>
- <ref name="common-field-num-format-attlist"/>
- <text/>
- </element>
- <element name="text:database-display">
- <ref name="text-database-display-attlist"/>
- <text/>
- </element>
- <element name="text:database-next">
- <ref name="text-database-next-attlist"/>
- </element>
- <element name="text:database-row-select">
- <ref name="text-database-row-select-attlist"/>
- </element>
- <element name="text:database-row-number">
- <interleave>
- <ref name="common-field-database-table"/>
- <ref name="common-field-num-format-attlist"/>
- <optional>
- <attribute name="text:value">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </interleave>
- <text/>
- </element>
- <element name="text:database-name">
- <ref name="common-field-database-table"/>
- <text/>
- </element>
- <element name="text:page-variable-set">
- <ref name="text-set-page-variable-attlist"/>
- <text/>
- </element>
- <element name="text:page-variable-get">
- <ref name="text-get-page-variable-attlist"/>
- <text/>
- </element>
- <element name="text:placeholder">
- <ref name="text-placeholder-attlist"/>
- <text/>
- </element>
- <element name="text:conditional-text">
- <ref name="text-conditional-text-attlist"/>
- <text/>
- </element>
- <element name="text:hidden-text">
- <ref name="text-hidden-text-attlist"/>
- <text/>
- </element>
- <element>
- <choice>
- <name>text:reference-ref</name>
- <name>text:bookmark-ref</name>
- </choice>
- <interleave>
- <ref name="text-common-ref-content"/>
- <ref name="text-bookmark-ref-content"/>
- </interleave>
- </element>
- <element name="text:note-ref">
- <interleave>
- <ref name="text-common-ref-content"/>
- <ref name="text-note-ref-content"/>
- </interleave>
- </element>
- <element name="text:sequence-ref">
- <interleave>
- <ref name="text-common-ref-content"/>
- <ref name="text-sequence-ref-content"/>
- </interleave>
- </element>
- <element name="text:script">
- <interleave>
- <choice>
- <group>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- </group>
- <text/>
- </choice>
- <optional>
- <attribute name="script:language">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </element>
- <element name="text:execute-macro">
- <optional>
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <text/>
- </element>
- <element name="text:hidden-paragraph">
- <ref name="text-hidden-paragraph-attlist"/>
- <text/>
- </element>
- <element name="text:dde-connection">
- <attribute name="text:connection-name">
- <ref name="string"/>
- </attribute>
- <text/>
- </element>
- <element name="text:measure">
- <attribute name="text:kind">
- <choice>
- <value>value</value>
- <value>unit</value>
- <value>gap</value>
- </choice>
- </attribute>
- <text/>
- </element>
- <element name="text:table-formula">
- <interleave>
- <ref name="common-field-formula-attlist"/>
- <ref name="common-field-display-value-formula-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <text/>
- </element>
- <element name="text:meta-field">
- <ref name="text-meta-field-attlist"/>
- <zeroOrMore>
- <ref name="paragraph-content-or-hyperlink"/>
- </zeroOrMore>
- </element>
- <element name="text:toc-mark-start">
- <ref name="text-toc-mark-start-attrs"/>
- </element>
- <element name="text:toc-mark-end">
- <ref name="text-id"/>
- </element>
- <element name="text:toc-mark">
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
- <ref name="text-outline-level"/>
- </element>
- <element name="text:user-index-mark-start">
- <ref name="text-id"/>
- <ref name="text-outline-level"/>
- <ref name="text-index-name"/>
- </element>
- <element name="text:user-index-mark-end">
- <ref name="text-id"/>
- </element>
- <element name="text:user-index-mark">
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
- <ref name="text-outline-level"/>
- <ref name="text-index-name"/>
- </element>
- <element name="text:alphabetical-index-mark-start">
- <ref name="text-id"/>
- <ref name="text-alphabetical-index-mark-attrs"/>
- </element>
- <element name="text:alphabetical-index-mark-end">
- <ref name="text-id"/>
- </element>
- <element name="text:alphabetical-index-mark">
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
- <ref name="text-alphabetical-index-mark-attrs"/>
- </element>
- <element name="text:bibliography-mark">
- <attribute name="text:bibliography-type">
- <ref name="text-bibliography-types"/>
- </attribute>
- <zeroOrMore>
- <attribute>
- <choice>
- <name>text:identifier</name>
- <name>text:address</name>
- <name>text:annote</name>
- <name>text:author</name>
- <name>text:booktitle</name>
- <name>text:chapter</name>
- <name>text:edition</name>
- <name>text:editor</name>
- <name>text:howpublished</name>
- <name>text:institution</name>
- <name>text:journal</name>
- <name>text:month</name>
- <name>text:note</name>
- <name>text:number</name>
- <name>text:organizations</name>
- <name>text:pages</name>
- <name>text:publisher</name>
- <name>text:school</name>
- <name>text:series</name>
- <name>text:title</name>
- <name>text:report-type</name>
- <name>text:volume</name>
- <name>text:year</name>
- <name>text:url</name>
- <name>text:custom1</name>
- <name>text:custom2</name>
- <name>text:custom3</name>
- <name>text:custom4</name>
- <name>text:custom5</name>
- <name>text:isbn</name>
- <name>text:issn</name>
- </choice>
- <ref name="string"/>
- </attribute>
- </zeroOrMore>
- <text/>
- </element>
- <element name="presentation:header">
- <empty/>
- </element>
- <element name="presentation:footer">
- <empty/>
- </element>
- <element name="presentation:date-time">
- <empty/>
- </element>
- </choice>
- </define>
- <define name="text-tab-attr">
- <optional>
- <attribute name="text:tab-ref">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </define>
- <define name="text-a">
- <element name="text:a">
- <ref name="text-a-attlist"/>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="paragraph-content"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-a-attlist">
- <interleave>
- <optional>
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:title">
- <ref name="string"/>
- </attribute>
- </optional>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:actuate">
- <value>onRequest</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:target-frame-name">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:visited-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-meta-attlist">
- <interleave>
- <optional>
- <ref name="common-in-content-meta-attlist"/>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="text-bookmark">
- <element name="text:bookmark">
- <ref name="text-bookmark-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="text-bookmark-start">
- <element name="text:bookmark-start">
- <ref name="text-bookmark-start-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="text-bookmark-end">
- <element name="text:bookmark-end">
- <ref name="text-bookmark-end-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="text-bookmark-attlist">
- <interleave>
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="text-bookmark-start-attlist">
- <interleave>
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- <optional>
- <ref name="xml-id"/>
- </optional>
- <optional>
- <ref name="common-in-content-meta-attlist"/>
- </optional>
- </interleave>
- </define>
- <define name="text-bookmark-end-attlist">
- <attribute name="text:name">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="text-note-class">
- <attribute name="text:note-class">
- <choice>
- <value>footnote</value>
- <value>endnote</value>
- </choice>
- </attribute>
- </define>
- <define name="text-date-attlist">
- <interleave>
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <optional>
- <attribute name="text:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:date-adjust">
- <ref name="duration"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-time-attlist">
- <interleave>
- <interleave>
- <ref name="common-field-fixed-attlist"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- <optional>
- <attribute name="text:time-value">
- <ref name="timeOrDateTime"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:time-adjust">
- <ref name="duration"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-page-number-attlist">
- <interleave>
- <interleave>
- <ref name="common-field-num-format-attlist"/>
- <ref name="common-field-fixed-attlist"/>
- </interleave>
- <optional>
- <attribute name="text:page-adjust">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:select-page">
- <choice>
- <value>previous</value>
- <value>current</value>
- <value>next</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-page-continuation-attlist">
- <interleave>
- <attribute name="text:select-page">
- <choice>
- <value>previous</value>
- <value>next</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-chapter-attlist">
- <interleave>
- <attribute name="text:display">
- <choice>
- <value>name</value>
- <value>number</value>
- <value>number-and-name</value>
- <value>plain-number-and-name</value>
- <value>plain-number</value>
- </choice>
- </attribute>
- <attribute name="text:outline-level">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </interleave>
- </define>
- <define name="text-file-name-attlist">
- <interleave>
- <optional>
- <attribute name="text:display">
- <choice>
- <value>full</value>
- <value>path</value>
- <value>name</value>
- <value>name-and-extension</value>
- </choice>
- </attribute>
- </optional>
- <ref name="common-field-fixed-attlist"/>
- </interleave>
- </define>
- <define name="text-template-name-attlist">
- <optional>
- <attribute name="text:display">
- <choice>
- <value>full</value>
- <value>path</value>
- <value>name</value>
- <value>name-and-extension</value>
- <value>area</value>
- <value>title</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="text-variable-decl">
- <element name="text:variable-decl">
- <ref name="common-field-name-attlist"/>
- <ref name="common-value-type-attlist"/>
- </element>
- </define>
- <define name="text-user-field-decl">
- <element name="text:user-field-decl">
- <ref name="common-field-name-attlist"/>
- <optional>
- <ref name="common-field-formula-attlist"/>
- </optional>
- <ref name="common-value-and-type-attlist"/>
- </element>
- </define>
- <define name="text-sequence-decl">
- <element name="text:sequence-decl">
- <ref name="text-sequence-decl-attlist"/>
- </element>
- </define>
- <define name="text-sequence-decl-attlist">
- <interleave>
- <ref name="common-field-name-attlist"/>
- <attribute name="text:display-outline-level">
- <ref name="nonNegativeInteger"/>
- </attribute>
- <optional>
- <attribute name="text:separation-character">
- <ref name="character"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-sequence-ref-name">
- <optional>
- <attribute name="text:ref-name">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-field-database-table">
- <ref name="common-field-database-table-attlist"/>
- <ref name="common-field-database-name"/>
- </define>
- <define name="common-field-database-name">
- <choice>
- <optional>
- <attribute name="text:database-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <ref name="form-connection-resource"/>
- </choice>
- </define>
- <define name="common-field-database-table-attlist">
- <interleave>
- <attribute name="text:table-name">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="text:table-type">
- <choice>
- <value>table</value>
- <value>query</value>
- <value>command</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-database-display-attlist">
- <interleave>
- <ref name="common-field-database-table"/>
- <ref name="common-field-data-style-name-attlist"/>
- <attribute name="text:column-name">
- <ref name="string"/>
- </attribute>
- </interleave>
- </define>
- <define name="text-database-next-attlist">
- <interleave>
- <ref name="common-field-database-table"/>
- <optional>
- <attribute name="text:condition">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-database-row-select-attlist">
- <interleave>
- <ref name="common-field-database-table"/>
- <optional>
- <attribute name="text:condition">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:row-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-set-page-variable-attlist">
- <interleave>
- <optional>
- <attribute name="text:active">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:page-adjust">
- <ref name="integer"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-get-page-variable-attlist">
- <ref name="common-field-num-format-attlist"/>
- </define>
- <define name="text-placeholder-attlist">
- <interleave>
- <attribute name="text:placeholder-type">
- <choice>
- <value>text</value>
- <value>table</value>
- <value>text-box</value>
- <value>image</value>
- <value>object</value>
- </choice>
- </attribute>
- <ref name="common-field-description-attlist"/>
- </interleave>
- </define>
- <define name="text-conditional-text-attlist">
- <interleave>
- <attribute name="text:condition">
- <ref name="string"/>
- </attribute>
- <attribute name="text:string-value-if-true">
- <ref name="string"/>
- </attribute>
- <attribute name="text:string-value-if-false">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="text:current-value">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-hidden-text-attlist">
- <interleave>
- <attribute name="text:condition">
- <ref name="string"/>
- </attribute>
- <attribute name="text:string-value">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="text:is-hidden">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-common-ref-content">
- <interleave>
- <text/>
- <optional>
- <attribute name="text:ref-name">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-bookmark-ref-content">
- <optional>
- <attribute name="text:reference-format">
- <choice>
- <ref name="common-ref-format-values"/>
- <value>number-no-superior</value>
- <value>number-all-superior</value>
- <value>number</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="text-note-ref-content">
- <interleave>
- <optional>
- <attribute name="text:reference-format">
- <choice>
- <ref name="common-ref-format-values"/>
- </choice>
- </attribute>
- </optional>
- <ref name="text-note-class"/>
- </interleave>
- </define>
- <define name="text-sequence-ref-content">
- <optional>
- <attribute name="text:reference-format">
- <choice>
- <ref name="common-ref-format-values"/>
- <value>category-and-value</value>
- <value>caption</value>
- <value>value</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-ref-format-values">
- <choice>
- <value>page</value>
- <value>chapter</value>
- <value>direction</value>
- <value>text</value>
- </choice>
- </define>
- <define name="text-hidden-paragraph-attlist">
- <interleave>
- <attribute name="text:condition">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="text:is-hidden">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-meta-field-attlist">
- <interleave>
- <ref name="xml-id"/>
- <ref name="common-field-data-style-name-attlist"/>
- </interleave>
- </define>
- <define name="common-value-type-attlist">
- <attribute name="office:value-type">
- <ref name="valueType"/>
- </attribute>
- </define>
- <define name="common-value-and-type-attlist">
- <choice>
- <group>
- <attribute name="office:value-type">
- <value>float</value>
- </attribute>
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>percentage</value>
- </attribute>
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>currency</value>
- </attribute>
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- <optional>
- <attribute name="office:currency">
- <ref name="string"/>
- </attribute>
- </optional>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>date</value>
- </attribute>
- <attribute name="office:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>time</value>
- </attribute>
- <attribute name="office:time-value">
- <ref name="duration"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>boolean</value>
- </attribute>
- <attribute name="office:boolean-value">
- <ref name="boolean"/>
- </attribute>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>string</value>
- </attribute>
- <optional>
- <attribute name="office:string-value">
- <ref name="string"/>
- </attribute>
- </optional>
- </group>
- </choice>
- </define>
- <define name="common-field-fixed-attlist">
- <optional>
- <attribute name="text:fixed">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="common-field-name-attlist">
- <attribute name="text:name">
- <ref name="variableName"/>
- </attribute>
- </define>
- <define name="common-field-description-attlist">
- <optional>
- <attribute name="text:description">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-field-display-value-none-attlist">
- <optional>
- <attribute name="text:display">
- <choice>
- <value>value</value>
- <value>none</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-field-display-value-formula-none-attlist">
- <optional>
- <attribute name="text:display">
- <choice>
- <value>value</value>
- <value>formula</value>
- <value>none</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-field-display-value-formula-attlist">
- <optional>
- <attribute name="text:display">
- <choice>
- <value>value</value>
- <value>formula</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-field-formula-attlist">
- <optional>
- <attribute name="text:formula">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-field-data-style-name-attlist">
- <optional>
- <attribute name="style:data-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </define>
- <define name="common-field-num-format-attlist">
- <optional>
- <ref name="common-num-format-attlist"/>
- </optional>
- </define>
- <define name="text-toc-mark-start-attrs">
- <ref name="text-id"/>
- <ref name="text-outline-level"/>
- </define>
- <define name="text-outline-level">
- <optional>
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- </define>
- <define name="text-id">
- <attribute name="text:id">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="text-index-name">
- <attribute name="text:index-name">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="text-alphabetical-index-mark-attrs">
- <interleave>
- <optional>
- <attribute name="text:key1">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:key2">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:string-value-phonetic">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:key1-phonetic">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:key2-phonetic">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:main-entry">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-bibliography-types">
- <choice>
- <value>article</value>
- <value>book</value>
- <value>booklet</value>
- <value>conference</value>
- <value>custom1</value>
- <value>custom2</value>
- <value>custom3</value>
- <value>custom4</value>
- <value>custom5</value>
- <value>email</value>
- <value>inbook</value>
- <value>incollection</value>
- <value>inproceedings</value>
- <value>journal</value>
- <value>manual</value>
- <value>mastersthesis</value>
- <value>misc</value>
- <value>phdthesis</value>
- <value>proceedings</value>
- <value>techreport</value>
- <value>unpublished</value>
- <value>www</value>
- </choice>
- </define>
- <define name="text-index-body">
- <element name="text:index-body">
- <zeroOrMore>
- <ref name="index-content-main"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="index-content-main">
- <choice>
- <ref name="text-content"/>
- <ref name="text-index-title"/>
- </choice>
- </define>
- <define name="text-index-title">
- <element name="text:index-title">
- <ref name="common-section-attlist"/>
- <zeroOrMore>
- <ref name="index-content-main"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-table-of-content">
- <element name="text:table-of-content">
- <ref name="common-section-attlist"/>
- <ref name="text-table-of-content-source"/>
- <ref name="text-index-body"/>
- </element>
- </define>
- <define name="text-table-of-content-source">
- <element name="text:table-of-content-source">
- <ref name="text-table-of-content-source-attlist"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <zeroOrMore>
- <ref name="text-table-of-content-entry-template"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="text-index-source-styles"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-table-of-content-source-attlist">
- <interleave>
- <optional>
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-outline-level">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-index-marks">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-index-source-styles">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:index-scope">
- <choice>
- <value>document</value>
- <value>chapter</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:relative-tab-stop-position">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-table-of-content-entry-template">
- <element name="text:table-of-content-entry-template">
- <ref name="text-table-of-content-entry-template-attlist"/>
- <zeroOrMore>
- <ref name="text-table-of-content-children"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-table-of-content-children">
- <choice>
- <ref name="text-index-entry-chapter"/>
- <ref name="text-index-entry-page-number"/>
- <ref name="text-index-entry-text"/>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- <ref name="text-index-entry-link-start"/>
- <ref name="text-index-entry-link-end"/>
- </choice>
- </define>
- <define name="text-table-of-content-entry-template-attlist">
- <interleave>
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </interleave>
- </define>
- <define name="text-illustration-index">
- <element name="text:illustration-index">
- <ref name="common-section-attlist"/>
- <ref name="text-illustration-index-source"/>
- <ref name="text-index-body"/>
- </element>
- </define>
- <define name="text-illustration-index-source">
- <element name="text:illustration-index-source">
- <ref name="text-illustration-index-source-attrs"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <optional>
- <ref name="text-illustration-index-entry-template"/>
- </optional>
- </element>
- </define>
- <define name="text-illustration-index-source-attrs">
- <interleave>
- <ref name="text-index-scope-attr"/>
- <ref name="text-relative-tab-stop-position-attr"/>
- <optional>
- <attribute name="text:use-caption">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:caption-sequence-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:caption-sequence-format">
- <choice>
- <value>text</value>
- <value>category-and-value</value>
- <value>caption</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-index-scope-attr">
- <optional>
- <attribute name="text:index-scope">
- <choice>
- <value>document</value>
- <value>chapter</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="text-relative-tab-stop-position-attr">
- <optional>
- <attribute name="text:relative-tab-stop-position">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="text-illustration-index-entry-template">
- <element name="text:illustration-index-entry-template">
- <ref name="text-illustration-index-entry-content"/>
- </element>
- </define>
- <define name="text-illustration-index-entry-content">
- <ref name="text-illustration-index-entry-template-attrs"/>
- <zeroOrMore>
- <choice>
- <ref name="text-index-entry-chapter"/>
- <ref name="text-index-entry-page-number"/>
- <ref name="text-index-entry-text"/>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- </choice>
- </zeroOrMore>
- </define>
- <define name="text-illustration-index-entry-template-attrs">
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </define>
- <define name="text-table-index">
- <element name="text:table-index">
- <ref name="common-section-attlist"/>
- <ref name="text-table-index-source"/>
- <ref name="text-index-body"/>
- </element>
- </define>
- <define name="text-table-index-source">
- <element name="text:table-index-source">
- <ref name="text-illustration-index-source-attrs"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <optional>
- <ref name="text-table-index-entry-template"/>
- </optional>
- </element>
- </define>
- <define name="text-table-index-entry-template">
- <element name="text:table-index-entry-template">
- <ref name="text-illustration-index-entry-content"/>
- </element>
- </define>
- <define name="text-object-index">
- <element name="text:object-index">
- <ref name="common-section-attlist"/>
- <ref name="text-object-index-source"/>
- <ref name="text-index-body"/>
- </element>
- </define>
- <define name="text-object-index-source">
- <element name="text:object-index-source">
- <ref name="text-object-index-source-attrs"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <optional>
- <ref name="text-object-index-entry-template"/>
- </optional>
- </element>
- </define>
- <define name="text-object-index-source-attrs">
- <interleave>
- <ref name="text-index-scope-attr"/>
- <ref name="text-relative-tab-stop-position-attr"/>
- <optional>
- <attribute name="text:use-spreadsheet-objects">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-math-objects">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-draw-objects">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-chart-objects">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-other-objects">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-object-index-entry-template">
- <element name="text:object-index-entry-template">
- <ref name="text-illustration-index-entry-content"/>
- </element>
- </define>
- <define name="text-user-index">
- <element name="text:user-index">
- <ref name="common-section-attlist"/>
- <ref name="text-user-index-source"/>
- <ref name="text-index-body"/>
- </element>
- </define>
- <define name="text-user-index-source">
- <element name="text:user-index-source">
- <ref name="text-user-index-source-attr"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <zeroOrMore>
- <ref name="text-user-index-entry-template"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="text-index-source-styles"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-user-index-source-attr">
- <interleave>
- <ref name="text-index-scope-attr"/>
- <ref name="text-relative-tab-stop-position-attr"/>
- <optional>
- <attribute name="text:use-index-marks">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-index-source-styles">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-graphics">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-tables">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-floating-frames">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-objects">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:copy-outline-levels">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <attribute name="text:index-name">
- <ref name="string"/>
- </attribute>
- </interleave>
- </define>
- <define name="text-user-index-entry-template">
- <element name="text:user-index-entry-template">
- <ref name="text-user-index-entry-template-attrs"/>
- <zeroOrMore>
- <choice>
- <ref name="text-index-entry-chapter"/>
- <ref name="text-index-entry-page-number"/>
- <ref name="text-index-entry-text"/>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-user-index-entry-template-attrs">
- <interleave>
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </interleave>
- </define>
- <define name="text-alphabetical-index">
- <element name="text:alphabetical-index">
- <ref name="common-section-attlist"/>
- <ref name="text-alphabetical-index-source"/>
- <ref name="text-index-body"/>
- </element>
- </define>
- <define name="text-alphabetical-index-source">
- <element name="text:alphabetical-index-source">
- <ref name="text-alphabetical-index-source-attrs"/>
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <zeroOrMore>
- <ref name="text-alphabetical-index-entry-template"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-alphabetical-index-source-attrs">
- <interleave>
- <ref name="text-index-scope-attr"/>
- <ref name="text-relative-tab-stop-position-attr"/>
- <optional>
- <attribute name="text:ignore-case">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:main-entry-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:alphabetical-separators">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:combine-entries">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:combine-entries-with-dash">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:combine-entries-with-pp">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:use-keys-as-entries">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:capitalize-entries">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:comma-separated">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:script">
- <ref name="scriptCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rfc-language-tag">
- <ref name="language"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:sort-algorithm">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-alphabetical-index-auto-mark-file">
- <element name="text:alphabetical-index-auto-mark-file">
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- </element>
- </define>
- <define name="text-alphabetical-index-entry-template">
- <element name="text:alphabetical-index-entry-template">
- <ref name="text-alphabetical-index-entry-template-attrs"/>
- <zeroOrMore>
- <choice>
- <ref name="text-index-entry-chapter"/>
- <ref name="text-index-entry-page-number"/>
- <ref name="text-index-entry-text"/>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-alphabetical-index-entry-template-attrs">
- <interleave>
- <attribute name="text:outline-level">
- <choice>
- <value>1</value>
- <value>2</value>
- <value>3</value>
- <value>separator</value>
- </choice>
- </attribute>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </interleave>
- </define>
- <define name="text-bibliography">
- <element name="text:bibliography">
- <ref name="common-section-attlist"/>
- <ref name="text-bibliography-source"/>
- <ref name="text-index-body"/>
- </element>
- </define>
- <define name="text-bibliography-source">
- <element name="text:bibliography-source">
- <optional>
- <ref name="text-index-title-template"/>
- </optional>
- <zeroOrMore>
- <ref name="text-bibliography-entry-template"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-bibliography-entry-template">
- <element name="text:bibliography-entry-template">
- <ref name="text-bibliography-entry-template-attrs"/>
- <zeroOrMore>
- <choice>
- <ref name="text-index-entry-span"/>
- <ref name="text-index-entry-tab-stop"/>
- <ref name="text-index-entry-bibliography"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-bibliography-entry-template-attrs">
- <interleave>
- <attribute name="text:bibliography-type">
- <ref name="text-bibliography-types"/>
- </attribute>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </interleave>
- </define>
- <define name="text-index-source-styles">
- <element name="text:index-source-styles">
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
- <zeroOrMore>
- <ref name="text-index-source-style"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-index-source-style">
- <element name="text:index-source-style">
- <attribute name="text:style-name">
- <ref name="styleName"/>
- </attribute>
- <empty/>
- </element>
- </define>
- <define name="text-index-title-template">
- <element name="text:index-title-template">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <text/>
- </element>
- </define>
- <define name="text-index-entry-chapter">
- <element name="text:index-entry-chapter">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <ref name="text-index-entry-chapter-attrs"/>
- </element>
- </define>
- <define name="text-index-entry-chapter-attrs">
- <interleave>
- <optional>
- <attribute name="text:display">
- <choice>
- <value>name</value>
- <value>number</value>
- <value>number-and-name</value>
- <value>plain-number</value>
- <value>plain-number-and-name</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:outline-level">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-index-entry-text">
- <element name="text:index-entry-text">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </element>
- </define>
- <define name="text-index-entry-page-number">
- <element name="text:index-entry-page-number">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </element>
- </define>
- <define name="text-index-entry-span">
- <element name="text:index-entry-span">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <text/>
- </element>
- </define>
- <define name="text-index-entry-bibliography">
- <element name="text:index-entry-bibliography">
- <ref name="text-index-entry-bibliography-attrs"/>
- </element>
- </define>
- <define name="text-index-entry-bibliography-attrs">
- <interleave>
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <attribute name="text:bibliography-data-field">
- <choice>
- <value>address</value>
- <value>annote</value>
- <value>author</value>
- <value>bibliography-type</value>
- <value>booktitle</value>
- <value>chapter</value>
- <value>custom1</value>
- <value>custom2</value>
- <value>custom3</value>
- <value>custom4</value>
- <value>custom5</value>
- <value>edition</value>
- <value>editor</value>
- <value>howpublished</value>
- <value>identifier</value>
- <value>institution</value>
- <value>isbn</value>
- <value>issn</value>
- <value>journal</value>
- <value>month</value>
- <value>note</value>
- <value>number</value>
- <value>organizations</value>
- <value>pages</value>
- <value>publisher</value>
- <value>report-type</value>
- <value>school</value>
- <value>series</value>
- <value>title</value>
- <value>url</value>
- <value>volume</value>
- <value>year</value>
- </choice>
- </attribute>
- </interleave>
- </define>
- <define name="text-index-entry-tab-stop">
- <element name="text:index-entry-tab-stop">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <ref name="text-index-entry-tab-stop-attrs"/>
- </element>
- </define>
- <define name="text-index-entry-tab-stop-attrs">
- <interleave>
- <optional>
- <attribute name="style:leader-char">
- <ref name="character"/>
- </attribute>
- </optional>
- <choice>
- <attribute name="style:type">
- <value>right</value>
- </attribute>
- <group>
- <attribute name="style:type">
- <value>left</value>
- </attribute>
- <attribute name="style:position">
- <ref name="length"/>
- </attribute>
- </group>
- </choice>
- </interleave>
- </define>
- <define name="text-index-entry-link-start">
- <element name="text:index-entry-link-start">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </element>
- </define>
- <define name="text-index-entry-link-end">
- <element name="text:index-entry-link-end">
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </element>
- </define>
- <define name="table-table">
- <element name="table:table">
- <ref name="table-table-attlist"/>
- <optional>
- <ref name="table-title"/>
- </optional>
- <optional>
- <ref name="table-desc"/>
- </optional>
- <optional>
- <ref name="table-table-source"/>
- </optional>
- <optional>
- <ref name="office-dde-source"/>
- </optional>
- <optional>
- <ref name="table-scenario"/>
- </optional>
- <optional>
- <ref name="office-forms"/>
- </optional>
- <optional>
- <ref name="table-shapes"/>
- </optional>
- <ref name="table-columns-and-groups"/>
- <ref name="table-rows-and-groups"/>
- <optional>
- <ref name="table-named-expressions"/>
- </optional>
- </element>
- </define>
- <define name="table-columns-and-groups">
- <oneOrMore>
- <choice>
- <ref name="table-table-column-group"/>
- <ref name="table-columns-no-group"/>
- </choice>
- </oneOrMore>
- </define>
- <define name="table-columns-no-group">
- <choice>
- <group>
- <ref name="table-columns"/>
- <optional>
- <ref name="table-table-header-columns"/>
- <optional>
- <ref name="table-columns"/>
- </optional>
- </optional>
- </group>
- <group>
- <ref name="table-table-header-columns"/>
- <optional>
- <ref name="table-columns"/>
- </optional>
- </group>
- </choice>
- </define>
- <define name="table-columns">
- <choice>
- <ref name="table-table-columns"/>
- <oneOrMore>
- <ref name="table-table-column"/>
- </oneOrMore>
- </choice>
- </define>
- <define name="table-rows-and-groups">
- <oneOrMore>
- <choice>
- <ref name="table-table-row-group"/>
- <ref name="table-rows-no-group"/>
- </choice>
- </oneOrMore>
- </define>
- <define name="table-rows-no-group">
- <choice>
- <group>
- <ref name="table-rows"/>
- <optional>
- <ref name="table-table-header-rows"/>
- <optional>
- <ref name="table-rows"/>
- </optional>
- </optional>
- </group>
- <group>
- <ref name="table-table-header-rows"/>
- <optional>
- <ref name="table-rows"/>
- </optional>
- </group>
- </choice>
- </define>
- <define name="table-rows">
- <choice>
- <ref name="table-table-rows"/>
- <oneOrMore>
- <optional>
- <ref name="text-soft-page-break"/>
- </optional>
- <ref name="table-table-row"/>
- </oneOrMore>
- </choice>
- </define>
- <define name="table-table-attlist">
- <interleave>
- <optional>
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:template-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:use-first-row-styles">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:use-last-row-styles">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:use-first-column-styles">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:use-last-column-styles">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:use-banding-rows-styles">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:use-banding-columns-styles">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:protected">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:protection-key">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:protection-key-digest-algorithm">
- <ref name="anyIRI"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:print">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:print-ranges">
- <ref name="cellRangeAddressList"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- <optional>
- <attribute name="table:is-sub-table">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-title">
- <element name="table:title">
- <text/>
- </element>
- </define>
- <define name="table-desc">
- <element name="table:desc">
- <text/>
- </element>
- </define>
- <define name="table-table-row">
- <element name="table:table-row">
- <ref name="table-table-row-attlist"/>
- <oneOrMore>
- <choice>
- <ref name="table-table-cell"/>
- <ref name="table-covered-table-cell"/>
- </choice>
- </oneOrMore>
- </element>
- </define>
- <define name="table-table-row-attlist">
- <interleave>
- <optional>
- <attribute name="table:number-rows-repeated">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:default-cell-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:visibility">
- <ref name="table-visibility-value"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="table-visibility-value">
- <choice>
- <value>visible</value>
- <value>collapse</value>
- <value>filter</value>
- </choice>
- </define>
- <define name="table-table-cell">
- <element name="table:table-cell">
- <ref name="table-table-cell-attlist"/>
- <ref name="table-table-cell-attlist-extra"/>
- <ref name="table-table-cell-content"/>
- </element>
- </define>
- <define name="table-covered-table-cell">
- <element name="table:covered-table-cell">
- <ref name="table-table-cell-attlist"/>
- <ref name="table-table-cell-content"/>
- </element>
- </define>
- <define name="table-table-cell-content">
- <optional>
- <ref name="table-cell-range-source"/>
- </optional>
- <optional>
- <ref name="office-annotation"/>
- </optional>
- <optional>
- <ref name="table-detective"/>
- </optional>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- </define>
- <define name="table-table-cell-attlist">
- <interleave>
- <optional>
- <attribute name="table:number-columns-repeated">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:content-validation-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:formula">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <ref name="common-value-and-type-attlist"/>
- </optional>
- <optional>
- <attribute name="table:protect">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:protected">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- <optional>
- <ref name="common-in-content-meta-attlist"/>
- </optional>
- </interleave>
- </define>
- <define name="table-table-cell-attlist-extra">
- <interleave>
- <optional>
- <attribute name="table:number-columns-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:number-rows-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:number-matrix-columns-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:number-matrix-rows-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-table-column">
- <element name="table:table-column">
- <ref name="table-table-column-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-table-column-attlist">
- <interleave>
- <optional>
- <attribute name="table:number-columns-repeated">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:visibility">
- <ref name="table-visibility-value"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:default-cell-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="table-table-header-columns">
- <element name="table:table-header-columns">
- <oneOrMore>
- <ref name="table-table-column"/>
- </oneOrMore>
- </element>
- </define>
- <define name="table-table-columns">
- <element name="table:table-columns">
- <oneOrMore>
- <ref name="table-table-column"/>
- </oneOrMore>
- </element>
- </define>
- <define name="table-table-column-group">
- <element name="table:table-column-group">
- <ref name="table-table-column-group-attlist"/>
- <ref name="table-columns-and-groups"/>
- </element>
- </define>
- <define name="table-table-column-group-attlist">
- <optional>
- <attribute name="table:display">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="table-table-header-rows">
- <element name="table:table-header-rows">
- <oneOrMore>
- <optional>
- <ref name="text-soft-page-break"/>
- </optional>
- <ref name="table-table-row"/>
- </oneOrMore>
- </element>
- </define>
- <define name="table-table-rows">
- <element name="table:table-rows">
- <oneOrMore>
- <optional>
- <ref name="text-soft-page-break"/>
- </optional>
- <ref name="table-table-row"/>
- </oneOrMore>
- </element>
- </define>
- <define name="table-table-row-group">
- <element name="table:table-row-group">
- <ref name="table-table-row-group-attlist"/>
- <ref name="table-rows-and-groups"/>
- </element>
- </define>
- <define name="table-table-row-group-attlist">
- <optional>
- <attribute name="table:display">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="cellAddress">
- <data type="string">
- <param name="pattern">($?([^\. ']+|'([^']|'')+'))?\.$?[A-Z]+$?[0-9]+</param>
- </data>
- </define>
- <define name="cellRangeAddress">
- <choice>
- <data type="string">
- <param name="pattern">($?([^\. ']+|'([^']|'')+'))?\.$?[A-Z]+$?[0-9]+(:($?([^\. ']+|'([^']|'')+'))?\.$?[A-Z]+$?[0-9]+)?</param>
- </data>
- <data type="string">
- <param name="pattern">($?([^\. ']+|'([^']|'')+'))?\.$?[0-9]+:($?([^\. ']+|'([^']|'')+'))?\.$?[0-9]+</param>
- </data>
- <data type="string">
- <param name="pattern">($?([^\. ']+|'([^']|'')+'))?\.$?[A-Z]+:($?([^\. ']+|'([^']|'')+'))?\.$?[A-Z]+</param>
- </data>
- </choice>
- </define>
- <define name="cellRangeAddressList">
- <data type="string"/>
- <dc:description>Value is a space separated list of "cellRangeAddress" patterns</dc:description>
- </define>
- <define name="table-table-source">
- <element name="table:table-source">
- <ref name="table-table-source-attlist"/>
- <ref name="table-linked-source-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-table-source-attlist">
- <interleave>
- <optional>
- <attribute name="table:mode">
- <choice>
- <value>copy-all</value>
- <value>copy-results-only</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:table-name">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-linked-source-attlist">
- <interleave>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:actuate">
- <value>onRequest</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:filter-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:filter-options">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:refresh-delay">
- <ref name="duration"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-scenario">
- <element name="table:scenario">
- <ref name="table-scenario-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-scenario-attlist">
- <interleave>
- <attribute name="table:scenario-ranges">
- <ref name="cellRangeAddressList"/>
- </attribute>
- <attribute name="table:is-active">
- <ref name="boolean"/>
- </attribute>
- <optional>
- <attribute name="table:display-border">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:border-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:copy-back">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:copy-styles">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:copy-formulas">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:comment">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:protected">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-shapes">
- <element name="table:shapes">
- <oneOrMore>
- <ref name="shape"/>
- </oneOrMore>
- </element>
- </define>
- <define name="table-cell-range-source">
- <element name="table:cell-range-source">
- <ref name="table-table-cell-range-source-attlist"/>
- <ref name="table-linked-source-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-table-cell-range-source-attlist">
- <interleave>
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- <attribute name="table:last-column-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- <attribute name="table:last-row-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </interleave>
- </define>
- <define name="table-detective">
- <element name="table:detective">
- <zeroOrMore>
- <ref name="table-highlighted-range"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="table-operation"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="table-operation">
- <element name="table:operation">
- <ref name="table-operation-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-operation-attlist">
- <interleave>
- <attribute name="table:name">
- <choice>
- <value>trace-dependents</value>
- <value>remove-dependents</value>
- <value>trace-precedents</value>
- <value>remove-precedents</value>
- <value>trace-errors</value>
- </choice>
- </attribute>
- <attribute name="table:index">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </interleave>
- </define>
- <define name="table-highlighted-range">
- <element name="table:highlighted-range">
- <choice>
- <group>
- <ref name="table-highlighted-range-attlist"/>
- </group>
- <group>
- <ref name="table-highlighted-range-attlist-invalid"/>
- </group>
- </choice>
- <empty/>
- </element>
- </define>
- <define name="table-highlighted-range-attlist">
- <interleave>
- <optional>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
- <attribute name="table:direction">
- <choice>
- <value>from-another-table</value>
- <value>to-another-table</value>
- <value>from-same-table</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="table:contains-error">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-highlighted-range-attlist-invalid">
- <attribute name="table:marked-invalid">
- <ref name="boolean"/>
- </attribute>
- </define>
- <define name="office-spreadsheet-attlist">
- <optional>
- <attribute name="table:structure-protected">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:protection-key">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:protection-key-digest-algorithm">
- <ref name="anyIRI"/>
- </attribute>
- </optional>
- </define>
- <define name="table-calculation-settings">
- <element name="table:calculation-settings">
- <ref name="table-calculation-setting-attlist"/>
- <optional>
- <ref name="table-null-date"/>
- </optional>
- <optional>
- <ref name="table-iteration"/>
- </optional>
- </element>
- </define>
- <define name="table-calculation-setting-attlist">
- <interleave>
- <optional>
- <attribute name="table:case-sensitive">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:precision-as-shown">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:search-criteria-must-apply-to-whole-cell">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:automatic-find-labels">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:use-regular-expressions">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:use-wildcards">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:null-year">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-null-date">
- <element name="table:null-date">
- <optional>
- <attribute name="table:value-type">
- <value>date</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:date-value">
- <ref name="date"/>
- </attribute>
- </optional>
- <empty/>
- </element>
- </define>
- <define name="table-iteration">
- <element name="table:iteration">
- <optional>
- <attribute name="table:status">
- <choice>
- <value>enable</value>
- <value>disable</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:steps">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:maximum-difference">
- <ref name="double"/>
- </attribute>
- </optional>
- <empty/>
- </element>
- </define>
- <define name="table-content-validations">
- <element name="table:content-validations">
- <oneOrMore>
- <ref name="table-content-validation"/>
- </oneOrMore>
- </element>
- </define>
- <define name="table-content-validation">
- <element name="table:content-validation">
- <ref name="table-validation-attlist"/>
- <optional>
- <ref name="table-help-message"/>
- </optional>
- <optional>
- <choice>
- <ref name="table-error-message"/>
- <group>
- <ref name="table-error-macro"/>
- <ref name="office-event-listeners"/>
- </group>
- </choice>
- </optional>
- </element>
- </define>
- <define name="table-validation-attlist">
- <interleave>
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="table:condition">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:base-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:allow-empty-cell">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:display-list">
- <choice>
- <value>none</value>
- <value>unsorted</value>
- <value>sort-ascending</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-help-message">
- <element name="table:help-message">
- <optional>
- <attribute name="table:title">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:display">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="table-error-message">
- <element name="table:error-message">
- <optional>
- <attribute name="table:title">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:display">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:message-type">
- <choice>
- <value>stop</value>
- <value>warning</value>
- <value>information</value>
- </choice>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="table-error-macro">
- <element name="table:error-macro">
- <optional>
- <attribute name="table:execute">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </element>
- </define>
- <define name="table-label-ranges">
- <element name="table:label-ranges">
- <zeroOrMore>
- <ref name="table-label-range"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="table-label-range">
- <element name="table:label-range">
- <ref name="table-label-range-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-label-range-attlist">
- <interleave>
- <attribute name="table:label-cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- <attribute name="table:data-cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- <attribute name="table:orientation">
- <choice>
- <value>column</value>
- <value>row</value>
- </choice>
- </attribute>
- </interleave>
- </define>
- <define name="table-named-expressions">
- <element name="table:named-expressions">
- <zeroOrMore>
- <choice>
- <ref name="table-named-range"/>
- <ref name="table-named-expression"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- <define name="table-named-range">
- <element name="table:named-range">
- <ref name="table-named-range-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-named-range-attlist">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- <optional>
- <attribute name="table:base-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:range-usable-as">
- <choice>
- <value>none</value>
- <list>
- <oneOrMore>
- <choice>
- <value>print-range</value>
- <value>filter</value>
- <value>repeat-row</value>
- <value>repeat-column</value>
- </choice>
- </oneOrMore>
- </list>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="table-named-expression">
- <element name="table:named-expression">
- <ref name="table-named-expression-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-named-expression-attlist">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- <attribute name="table:expression">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="table:base-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
- </define>
- <define name="table-database-ranges">
- <element name="table:database-ranges">
- <zeroOrMore>
- <ref name="table-database-range"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="table-database-range">
- <element name="table:database-range">
- <ref name="table-database-range-attlist"/>
- <optional>
- <choice>
- <ref name="table-database-source-sql"/>
- <ref name="table-database-source-table"/>
- <ref name="table-database-source-query"/>
- </choice>
- </optional>
- <optional>
- <ref name="table-filter"/>
- </optional>
- <optional>
- <ref name="table-sort"/>
- </optional>
- <optional>
- <ref name="table-subtotal-rules"/>
- </optional>
- </element>
- </define>
- <define name="table-database-range-attlist">
- <interleave>
- <optional>
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:is-selection">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:on-update-keep-styles">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:on-update-keep-size">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:has-persistent-data">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:orientation">
- <choice>
- <value>column</value>
- <value>row</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:contains-header">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:display-filter-buttons">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <attribute name="table:target-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- <optional>
- <attribute name="table:refresh-delay">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-database-source-sql">
- <element name="table:database-source-sql">
- <ref name="table-database-source-sql-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-database-source-sql-attlist">
- <interleave>
- <attribute name="table:database-name">
- <ref name="string"/>
- </attribute>
- <attribute name="table:sql-statement">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="table:parse-sql-statement">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-database-source-query">
- <element name="table:database-source-table">
- <ref name="table-database-source-table-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-database-source-table-attlist">
- <interleave>
- <attribute name="table:database-name">
- <ref name="string"/>
- </attribute>
- <attribute name="table:database-table-name">
- <ref name="string"/>
- </attribute>
- </interleave>
- </define>
- <define name="table-database-source-table">
- <element name="table:database-source-query">
- <ref name="table-database-source-query-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-database-source-query-attlist">
- <interleave>
- <attribute name="table:database-name">
- <ref name="string"/>
- </attribute>
- <attribute name="table:query-name">
- <ref name="string"/>
- </attribute>
- </interleave>
- </define>
- <define name="table-sort">
- <element name="table:sort">
- <ref name="table-sort-attlist"/>
- <oneOrMore>
- <ref name="table-sort-by"/>
- </oneOrMore>
- </element>
- </define>
- <define name="table-sort-attlist">
- <interleave>
- <optional>
- <attribute name="table:bind-styles-to-content">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:target-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:case-sensitive">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:script">
- <ref name="scriptCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:rfc-language-tag">
- <ref name="language"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:algorithm">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:embedded-number-behavior">
- <choice>
- <value>alpha-numeric</value>
- <value>integer</value>
- <value>double</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-sort-by">
- <element name="table:sort-by">
- <ref name="table-sort-by-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-sort-by-attlist">
- <interleave>
- <attribute name="table:field-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
- <optional>
- <attribute name="table:data-type">
- <choice>
- <value>text</value>
- <value>number</value>
- <value>automatic</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:order">
- <choice>
- <value>ascending</value>
- <value>descending</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-subtotal-rules">
- <element name="table:subtotal-rules">
- <ref name="table-subtotal-rules-attlist"/>
- <optional>
- <ref name="table-sort-groups"/>
- </optional>
- <zeroOrMore>
- <ref name="table-subtotal-rule"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="table-subtotal-rules-attlist">
- <interleave>
- <optional>
- <attribute name="table:bind-styles-to-content">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:case-sensitive">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:page-breaks-on-group-change">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-sort-groups">
- <element name="table:sort-groups">
- <ref name="table-sort-groups-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-sort-groups-attlist">
- <interleave>
- <optional>
- <attribute name="table:data-type">
- <choice>
- <value>text</value>
- <value>number</value>
- <value>automatic</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:order">
- <choice>
- <value>ascending</value>
- <value>descending</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-subtotal-rule">
- <element name="table:subtotal-rule">
- <ref name="table-subtotal-rule-attlist"/>
- <zeroOrMore>
- <ref name="table-subtotal-field"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="table-subtotal-rule-attlist">
- <attribute name="table:group-by-field-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </define>
- <define name="table-subtotal-field">
- <element name="table:subtotal-field">
- <ref name="table-subtotal-field-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-subtotal-field-attlist">
- <interleave>
- <attribute name="table:field-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
- <attribute name="table:function">
- <choice>
- <value>average</value>
- <value>count</value>
- <value>countnums</value>
- <value>max</value>
- <value>min</value>
- <value>product</value>
- <value>stdev</value>
- <value>stdevp</value>
- <value>sum</value>
- <value>var</value>
- <value>varp</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </interleave>
- </define>
- <define name="table-filter">
- <element name="table:filter">
- <ref name="table-filter-attlist"/>
- <choice>
- <ref name="table-filter-condition"/>
- <ref name="table-filter-and"/>
- <ref name="table-filter-or"/>
- </choice>
- </element>
- </define>
- <define name="table-filter-attlist">
- <interleave>
- <optional>
- <attribute name="table:target-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:condition-source">
- <choice>
- <value>self</value>
- <value>cell-range</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:condition-source-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:display-duplicates">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-filter-and">
- <element name="table:filter-and">
- <oneOrMore>
- <choice>
- <ref name="table-filter-or"/>
- <ref name="table-filter-condition"/>
- </choice>
- </oneOrMore>
- </element>
- </define>
- <define name="table-filter-or">
- <element name="table:filter-or">
- <oneOrMore>
- <choice>
- <ref name="table-filter-and"/>
- <ref name="table-filter-condition"/>
- </choice>
- </oneOrMore>
- </element>
- </define>
- <define name="table-filter-condition">
- <element name="table:filter-condition">
- <ref name="table-filter-condition-attlist"/>
- <zeroOrMore>
- <ref name="table-filter-set-item"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="table-filter-condition-attlist">
- <interleave>
- <attribute name="table:field-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
- <attribute name="table:value">
- <choice>
- <ref name="string"/>
- <ref name="double"/>
- </choice>
- </attribute>
- <attribute name="table:operator">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="table:case-sensitive">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:data-type">
- <choice>
- <value>text</value>
- <value>number</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-filter-set-item">
- <element name="table:filter-set-item">
- <attribute name="table:value">
- <ref name="string"/>
- </attribute>
- <empty/>
- </element>
- </define>
- <define name="table-data-pilot-tables">
- <element name="table:data-pilot-tables">
- <zeroOrMore>
- <ref name="table-data-pilot-table"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="table-data-pilot-table">
- <element name="table:data-pilot-table">
- <ref name="table-data-pilot-table-attlist"/>
- <optional>
- <choice>
- <ref name="table-database-source-sql"/>
- <ref name="table-database-source-table"/>
- <ref name="table-database-source-query"/>
- <ref name="table-source-service"/>
- <ref name="table-source-cell-range"/>
- </choice>
- </optional>
- <oneOrMore>
- <ref name="table-data-pilot-field"/>
- </oneOrMore>
- </element>
- </define>
- <define name="table-data-pilot-table-attlist">
- <interleave>
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="table:application-data">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:grand-total">
- <choice>
- <value>none</value>
- <value>row</value>
- <value>column</value>
- <value>both</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:ignore-empty-rows">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:identify-categories">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <attribute name="table:target-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- <optional>
- <attribute name="table:buttons">
- <ref name="cellRangeAddressList"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:show-filter-button">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:drill-down-on-double-click">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-source-cell-range">
- <element name="table:source-cell-range">
- <ref name="table-source-cell-range-attlist"/>
- <optional>
- <ref name="table-filter"/>
- </optional>
- </element>
- </define>
- <define name="table-source-cell-range-attlist">
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddress"/>
- </attribute>
- </define>
- <define name="table-source-service">
- <element name="table:source-service">
- <ref name="table-source-service-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-source-service-attlist">
- <interleave>
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- <attribute name="table:source-name">
- <ref name="string"/>
- </attribute>
- <attribute name="table:object-name">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="table:user-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:password">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-data-pilot-field">
- <element name="table:data-pilot-field">
- <ref name="table-data-pilot-field-attlist"/>
- <optional>
- <ref name="table-data-pilot-level"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-field-reference"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-groups"/>
- </optional>
- </element>
- </define>
- <define name="table-data-pilot-field-attlist">
- <interleave>
- <attribute name="table:source-field-name">
- <ref name="string"/>
- </attribute>
- <choice>
- <attribute name="table:orientation">
- <choice>
- <value>row</value>
- <value>column</value>
- <value>data</value>
- <value>hidden</value>
- </choice>
- </attribute>
- <group>
- <attribute name="table:orientation">
- <value>page</value>
- </attribute>
- <attribute name="table:selected-page">
- <ref name="string"/>
- </attribute>
- </group>
- </choice>
- <optional>
- <attribute name="table:is-data-layout-field">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:function">
- <choice>
- <value>auto</value>
- <value>average</value>
- <value>count</value>
- <value>countnums</value>
- <value>max</value>
- <value>min</value>
- <value>product</value>
- <value>stdev</value>
- <value>stdevp</value>
- <value>sum</value>
- <value>var</value>
- <value>varp</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:used-hierarchy">
- <ref name="integer"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-data-pilot-level">
- <element name="table:data-pilot-level">
- <ref name="table-data-pilot-level-attlist"/>
- <optional>
- <ref name="table-data-pilot-subtotals"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-members"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-display-info"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-sort-info"/>
- </optional>
- <optional>
- <ref name="table-data-pilot-layout-info"/>
- </optional>
- </element>
- </define>
- <define name="table-data-pilot-level-attlist">
- <optional>
- <attribute name="table:show-empty">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="table-data-pilot-subtotals">
- <element name="table:data-pilot-subtotals">
- <zeroOrMore>
- <ref name="table-data-pilot-subtotal"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="table-data-pilot-subtotal">
- <element name="table:data-pilot-subtotal">
- <ref name="table-data-pilot-subtotal-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-data-pilot-subtotal-attlist">
- <attribute name="table:function">
- <choice>
- <value>auto</value>
- <value>average</value>
- <value>count</value>
- <value>countnums</value>
- <value>max</value>
- <value>min</value>
- <value>product</value>
- <value>stdev</value>
- <value>stdevp</value>
- <value>sum</value>
- <value>var</value>
- <value>varp</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </define>
- <define name="table-data-pilot-members">
- <element name="table:data-pilot-members">
- <zeroOrMore>
- <ref name="table-data-pilot-member"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="table-data-pilot-member">
- <element name="table:data-pilot-member">
- <ref name="table-data-pilot-member-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-data-pilot-member-attlist">
- <interleave>
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="table:display">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:show-details">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-data-pilot-display-info">
- <element name="table:data-pilot-display-info">
- <ref name="table-data-pilot-display-info-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-data-pilot-display-info-attlist">
- <interleave>
- <attribute name="table:enabled">
- <ref name="boolean"/>
- </attribute>
- <attribute name="table:data-field">
- <ref name="string"/>
- </attribute>
- <attribute name="table:member-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- <attribute name="table:display-member-mode">
- <choice>
- <value>from-top</value>
- <value>from-bottom</value>
- </choice>
- </attribute>
- </interleave>
- </define>
- <define name="table-data-pilot-sort-info">
- <element name="table:data-pilot-sort-info">
- <ref name="table-data-pilot-sort-info-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-data-pilot-sort-info-attlist">
- <interleave>
- <choice>
- <group>
- <attribute name="table:sort-mode">
- <value>data</value>
- </attribute>
- <attribute name="table:data-field">
- <ref name="string"/>
- </attribute>
- </group>
- <attribute name="table:sort-mode">
- <choice>
- <value>none</value>
- <value>manual</value>
- <value>name</value>
- </choice>
- </attribute>
- </choice>
- <attribute name="table:order">
- <choice>
- <value>ascending</value>
- <value>descending</value>
- </choice>
- </attribute>
- </interleave>
- </define>
- <define name="table-data-pilot-layout-info">
- <element name="table:data-pilot-layout-info">
- <ref name="table-data-pilot-layout-info-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-data-pilot-layout-info-attlist">
- <interleave>
- <attribute name="table:layout-mode">
- <choice>
- <value>tabular-layout</value>
- <value>outline-subtotals-top</value>
- <value>outline-subtotals-bottom</value>
- </choice>
- </attribute>
- <attribute name="table:add-empty-lines">
- <ref name="boolean"/>
- </attribute>
- </interleave>
- </define>
- <define name="table-data-pilot-field-reference">
- <element name="table:data-pilot-field-reference">
- <ref name="table-data-pilot-field-reference-attlist"/>
- </element>
- </define>
- <define name="table-data-pilot-field-reference-attlist">
- <interleave>
- <attribute name="table:field-name">
- <ref name="string"/>
- </attribute>
- <choice>
- <group>
- <attribute name="table:member-type">
- <value>named</value>
- </attribute>
- <attribute name="table:member-name">
- <ref name="string"/>
- </attribute>
- </group>
- <attribute name="table:member-type">
- <choice>
- <value>previous</value>
- <value>next</value>
- </choice>
- </attribute>
- </choice>
- <attribute name="table:type">
- <choice>
- <value>none</value>
- <value>member-difference</value>
- <value>member-percentage</value>
- <value>member-percentage-difference</value>
- <value>running-total</value>
- <value>row-percentage</value>
- <value>column-percentage</value>
- <value>total-percentage</value>
- <value>index</value>
- </choice>
- </attribute>
- </interleave>
- </define>
- <define name="table-data-pilot-groups">
- <element name="table:data-pilot-groups">
- <ref name="table-data-pilot-groups-attlist"/>
- <oneOrMore>
- <ref name="table-data-pilot-group"/>
- </oneOrMore>
- </element>
- </define>
- <define name="table-data-pilot-groups-attlist">
- <interleave>
- <attribute name="table:source-field-name">
- <ref name="string"/>
- </attribute>
- <choice>
- <attribute name="table:date-start">
- <choice>
- <ref name="dateOrDateTime"/>
- <value>auto</value>
- </choice>
- </attribute>
- <attribute name="table:start">
- <choice>
- <ref name="double"/>
- <value>auto</value>
- </choice>
- </attribute>
- </choice>
- <choice>
- <attribute name="table:date-end">
- <choice>
- <ref name="dateOrDateTime"/>
- <value>auto</value>
- </choice>
- </attribute>
- <attribute name="table:end">
- <choice>
- <ref name="double"/>
- <value>auto</value>
- </choice>
- </attribute>
- </choice>
- <attribute name="table:step">
- <ref name="double"/>
- </attribute>
- <attribute name="table:grouped-by">
- <choice>
- <value>seconds</value>
- <value>minutes</value>
- <value>hours</value>
- <value>days</value>
- <value>months</value>
- <value>quarters</value>
- <value>years</value>
- </choice>
- </attribute>
- </interleave>
- </define>
- <define name="table-data-pilot-group">
- <element name="table:data-pilot-group">
- <ref name="table-data-pilot-group-attlist"/>
- <oneOrMore>
- <ref name="table-data-pilot-group-member"/>
- </oneOrMore>
- </element>
- </define>
- <define name="table-data-pilot-group-attlist">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="table-data-pilot-group-member">
- <element name="table:data-pilot-group-member">
- <ref name="table-data-pilot-group-member-attlist"/>
- </element>
- </define>
- <define name="table-data-pilot-group-member-attlist">
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="table-consolidation">
- <element name="table:consolidation">
- <ref name="table-consolidation-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-consolidation-attlist">
- <interleave>
- <attribute name="table:function">
- <choice>
- <value>average</value>
- <value>count</value>
- <value>countnums</value>
- <value>max</value>
- <value>min</value>
- <value>product</value>
- <value>stdev</value>
- <value>stdevp</value>
- <value>sum</value>
- <value>var</value>
- <value>varp</value>
- <ref name="string"/>
- </choice>
- </attribute>
- <attribute name="table:source-cell-range-addresses">
- <ref name="cellRangeAddressList"/>
- </attribute>
- <attribute name="table:target-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- <optional>
- <attribute name="table:use-labels">
- <choice>
- <value>none</value>
- <value>row</value>
- <value>column</value>
- <value>both</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:link-to-source-data">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-dde-links">
- <element name="table:dde-links">
- <oneOrMore>
- <ref name="table-dde-link"/>
- </oneOrMore>
- </element>
- </define>
- <define name="table-tracked-changes">
- <element name="table:tracked-changes">
- <ref name="table-tracked-changes-attlist"/>
- <zeroOrMore>
- <choice>
- <ref name="table-cell-content-change"/>
- <ref name="table-insertion"/>
- <ref name="table-deletion"/>
- <ref name="table-movement"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- <define name="table-tracked-changes-attlist">
- <optional>
- <attribute name="table:track-changes">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="table-insertion">
- <element name="table:insertion">
- <ref name="table-insertion-attlist"/>
- <ref name="common-table-change-attlist"/>
- <ref name="office-change-info"/>
- <optional>
- <ref name="table-dependencies"/>
- </optional>
- <optional>
- <ref name="table-deletions"/>
- </optional>
- </element>
- </define>
- <define name="table-insertion-attlist">
- <interleave>
- <attribute name="table:type">
- <choice>
- <value>row</value>
- <value>column</value>
- <value>table</value>
- </choice>
- </attribute>
- <attribute name="table:position">
- <ref name="integer"/>
- </attribute>
- <optional>
- <attribute name="table:count">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:table">
- <ref name="integer"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-dependencies">
- <element name="table:dependencies">
- <oneOrMore>
- <ref name="table-dependency"/>
- </oneOrMore>
- </element>
- </define>
- <define name="table-dependency">
- <element name="table:dependency">
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
- <empty/>
- </element>
- </define>
- <define name="table-deletions">
- <element name="table:deletions">
- <oneOrMore>
- <choice>
- <ref name="table-cell-content-deletion"/>
- <ref name="table-change-deletion"/>
- </choice>
- </oneOrMore>
- </element>
- </define>
- <define name="table-cell-content-deletion">
- <element name="table:cell-content-deletion">
- <optional>
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <ref name="table-cell-address"/>
- </optional>
- <optional>
- <ref name="table-change-track-table-cell"/>
- </optional>
- </element>
- </define>
- <define name="table-change-deletion">
- <element name="table:change-deletion">
- <optional>
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
- </optional>
- <empty/>
- </element>
- </define>
- <define name="table-deletion">
- <element name="table:deletion">
- <ref name="table-deletion-attlist"/>
- <ref name="common-table-change-attlist"/>
- <ref name="office-change-info"/>
- <optional>
- <ref name="table-dependencies"/>
- </optional>
- <optional>
- <ref name="table-deletions"/>
- </optional>
- <optional>
- <ref name="table-cut-offs"/>
- </optional>
- </element>
- </define>
- <define name="table-deletion-attlist">
- <interleave>
- <attribute name="table:type">
- <choice>
- <value>row</value>
- <value>column</value>
- <value>table</value>
- </choice>
- </attribute>
- <attribute name="table:position">
- <ref name="integer"/>
- </attribute>
- <optional>
- <attribute name="table:table">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:multi-deletion-spanned">
- <ref name="integer"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-cut-offs">
- <element name="table:cut-offs">
- <choice>
- <oneOrMore>
- <ref name="table-movement-cut-off"/>
- </oneOrMore>
- <group>
- <ref name="table-insertion-cut-off"/>
- <zeroOrMore>
- <ref name="table-movement-cut-off"/>
- </zeroOrMore>
- </group>
- </choice>
- </element>
- </define>
- <define name="table-insertion-cut-off">
- <element name="table:insertion-cut-off">
- <ref name="table-insertion-cut-off-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-insertion-cut-off-attlist">
- <interleave>
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
- <attribute name="table:position">
- <ref name="integer"/>
- </attribute>
- </interleave>
- </define>
- <define name="table-movement-cut-off">
- <element name="table:movement-cut-off">
- <ref name="table-movement-cut-off-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-movement-cut-off-attlist">
- <choice>
- <attribute name="table:position">
- <ref name="integer"/>
- </attribute>
- <group>
- <attribute name="table:start-position">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:end-position">
- <ref name="integer"/>
- </attribute>
- </group>
- </choice>
- </define>
- <define name="table-movement">
- <element name="table:movement">
- <ref name="common-table-change-attlist"/>
- <ref name="table-source-range-address"/>
- <ref name="table-target-range-address"/>
- <ref name="office-change-info"/>
- <optional>
- <ref name="table-dependencies"/>
- </optional>
- <optional>
- <ref name="table-deletions"/>
- </optional>
- </element>
- </define>
- <define name="table-source-range-address">
- <element name="table:source-range-address">
- <ref name="common-table-range-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-target-range-address">
- <element name="table:target-range-address">
- <ref name="common-table-range-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="common-table-range-attlist">
- <choice>
- <group>
- <ref name="common-table-cell-address-attlist"/>
- </group>
- <group>
- <ref name="common-table-cell-range-address-attlist"/>
- </group>
- </choice>
- </define>
- <define name="common-table-cell-address-attlist">
- <attribute name="table:column">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:row">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:table">
- <ref name="integer"/>
- </attribute>
- </define>
- <define name="common-table-cell-range-address-attlist">
- <attribute name="table:start-column">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:start-row">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:start-table">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:end-column">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:end-row">
- <ref name="integer"/>
- </attribute>
- <attribute name="table:end-table">
- <ref name="integer"/>
- </attribute>
- </define>
- <define name="table-change-track-table-cell">
- <element name="table:change-track-table-cell">
- <ref name="table-change-track-table-cell-attlist"/>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="table-change-track-table-cell-attlist">
- <interleave>
- <optional>
- <attribute name="table:cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:matrix-covered">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:formula">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:number-matrix-columns-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:number-matrix-rows-spanned">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <ref name="common-value-and-type-attlist"/>
- </optional>
- </interleave>
- </define>
- <define name="table-cell-content-change">
- <element name="table:cell-content-change">
- <ref name="common-table-change-attlist"/>
- <ref name="table-cell-address"/>
- <ref name="office-change-info"/>
- <optional>
- <ref name="table-dependencies"/>
- </optional>
- <optional>
- <ref name="table-deletions"/>
- </optional>
- <ref name="table-previous"/>
- </element>
- </define>
- <define name="table-cell-address">
- <element name="table:cell-address">
- <ref name="common-table-cell-address-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-previous">
- <element name="table:previous">
- <optional>
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
- </optional>
- <ref name="table-change-track-table-cell"/>
- </element>
- </define>
- <define name="common-table-change-attlist">
- <interleave>
- <attribute name="table:id">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="table:acceptance-state">
- <choice>
- <value>accepted</value>
- <value>rejected</value>
- <value>pending</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:rejecting-change-id">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-handout-master">
- <element name="style:handout-master">
- <ref name="common-presentation-header-footer-attlist"/>
- <ref name="style-handout-master-attlist"/>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="style-handout-master-attlist">
- <interleave>
- <optional>
- <attribute name="presentation:presentation-page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <attribute name="style:page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="draw-layer-set">
- <element name="draw:layer-set">
- <zeroOrMore>
- <ref name="draw-layer"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="draw-layer">
- <element name="draw:layer">
- <ref name="draw-layer-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- </element>
- </define>
- <define name="draw-layer-attlist">
- <interleave>
- <attribute name="draw:name">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="draw:protected">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:display">
- <choice>
- <value>always</value>
- <value>screen</value>
- <value>printer</value>
- <value>none</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="draw-page">
- <element name="draw:page">
- <ref name="common-presentation-header-footer-attlist"/>
- <ref name="draw-page-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="draw-layer-set"/>
- </optional>
- <optional>
- <ref name="office-forms"/>
- </optional>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- <optional>
- <choice>
- <ref name="presentation-animations"/>
- <ref name="animation-element"/>
- </choice>
- </optional>
- <optional>
- <ref name="presentation-notes"/>
- </optional>
- </element>
- </define>
- <define name="draw-page-attlist">
- <interleave>
- <optional>
- <attribute name="draw:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <attribute name="draw:master-page-name">
- <ref name="styleNameRef"/>
- </attribute>
- <optional>
- <attribute name="presentation:presentation-page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <group>
- <ref name="xml-id"/>
- <optional>
- <attribute name="draw:id">
- <ref name="NCName"/>
- </attribute>
- </optional>
- </group>
- </optional>
- <optional>
- <attribute name="draw:nav-order">
- <ref name="IDREFS"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-presentation-header-footer-attlist">
- <interleave>
- <optional>
- <attribute name="presentation:use-header-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:use-footer-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:use-date-time-name">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="shape">
- <choice>
- <ref name="shape-instance"/>
- <ref name="draw-a"/>
- </choice>
- </define>
- <define name="shape-instance">
- <choice>
- <ref name="draw-rect"/>
- <ref name="draw-line"/>
- <ref name="draw-polyline"/>
- <ref name="draw-polygon"/>
- <ref name="draw-regular-polygon"/>
- <ref name="draw-path"/>
- <ref name="draw-circle"/>
- <ref name="draw-ellipse"/>
- <ref name="draw-g"/>
- <ref name="draw-page-thumbnail"/>
- <ref name="draw-frame"/>
- <ref name="draw-measure"/>
- <ref name="draw-caption"/>
- <ref name="draw-connector"/>
- <ref name="draw-control"/>
- <ref name="dr3d-scene"/>
- <ref name="draw-custom-shape"/>
- </choice>
- </define>
- <define name="draw-rect">
- <element name="draw:rect">
- <ref name="draw-rect-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
- </define>
- <define name="draw-rect-attlist">
- <choice>
- <optional>
- <attribute name="draw:corner-radius">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <group>
- <optional>
- <attribute name="svg:rx">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:ry">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- </group>
- </choice>
- </define>
- <define name="draw-line">
- <element name="draw:line">
- <ref name="draw-line-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
- </define>
- <define name="draw-line-attlist">
- <interleave>
- <attribute name="svg:x1">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y1">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:x2">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y2">
- <ref name="coordinate"/>
- </attribute>
- </interleave>
- </define>
- <define name="draw-polyline">
- <element name="draw:polyline">
- <ref name="common-draw-points-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
- </define>
- <define name="common-draw-points-attlist">
- <attribute name="draw:points">
- <ref name="points"/>
- </attribute>
- </define>
- <define name="draw-polygon">
- <element name="draw:polygon">
- <ref name="common-draw-points-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
- </define>
- <define name="draw-regular-polygon">
- <element name="draw:regular-polygon">
- <ref name="draw-regular-polygon-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
- </define>
- <define name="draw-regular-polygon-attlist">
- <interleave>
- <choice>
- <attribute name="draw:concave">
- <value>false</value>
- </attribute>
- <group>
- <attribute name="draw:concave">
- <value>true</value>
- </attribute>
- <ref name="draw-regular-polygon-sharpness-attlist"/>
- </group>
- </choice>
- <attribute name="draw:corners">
- <ref name="positiveInteger"/>
- </attribute>
- </interleave>
- </define>
- <define name="draw-regular-polygon-sharpness-attlist">
- <attribute name="draw:sharpness">
- <ref name="percent"/>
- </attribute>
- </define>
- <define name="draw-path">
- <element name="draw:path">
- <ref name="common-draw-path-data-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
- </define>
- <define name="common-draw-path-data-attlist">
- <attribute name="svg:d">
- <ref name="pathData"/>
- </attribute>
- </define>
- <define name="draw-circle">
- <element name="draw:circle">
- <choice>
- <group>
- <ref name="draw-circle-attlist"/>
- <ref name="common-draw-circle-ellipse-pos-attlist"/>
- </group>
- <group>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- </group>
- </choice>
- <ref name="common-draw-circle-ellipse-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
- </define>
- <define name="common-draw-circle-ellipse-pos-attlist">
- <attribute name="svg:cx">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:cy">
- <ref name="coordinate"/>
- </attribute>
- </define>
- <define name="draw-circle-attlist">
- <attribute name="svg:r">
- <ref name="length"/>
- </attribute>
- </define>
- <define name="common-draw-circle-ellipse-attlist">
- <interleave>
- <optional>
- <attribute name="draw:kind">
- <choice>
- <value>full</value>
- <value>section</value>
- <value>cut</value>
- <value>arc</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:start-angle">
- <ref name="angle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end-angle">
- <ref name="angle"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="draw-ellipse">
- <element name="draw:ellipse">
- <choice>
- <group>
- <ref name="draw-ellipse-attlist"/>
- <ref name="common-draw-circle-ellipse-pos-attlist"/>
- </group>
- <group>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- </group>
- </choice>
- <ref name="common-draw-circle-ellipse-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
- </define>
- <define name="draw-ellipse-attlist">
- <attribute name="svg:rx">
- <ref name="length"/>
- </attribute>
- <attribute name="svg:ry">
- <ref name="length"/>
- </attribute>
- </define>
- <define name="draw-connector">
- <element name="draw:connector">
- <ref name="draw-connector-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
- </define>
- <define name="draw-connector-attlist">
- <interleave>
- <optional>
- <attribute name="draw:type">
- <choice>
- <value>standard</value>
- <value>lines</value>
- <value>line</value>
- <value>curve</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:x1">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y1">
- <ref name="coordinate"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:start-shape">
- <ref name="IDREF"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:start-glue-point">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:x2">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y2">
- <ref name="coordinate"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end-shape">
- <ref name="IDREF"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end-glue-point">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:line-skew">
- <list>
- <ref name="length"/>
- <optional>
- <ref name="length"/>
- <optional>
- <ref name="length"/>
- </optional>
- </optional>
- </list>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:d">
- <ref name="pathData"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="draw-caption">
- <element name="draw:caption">
- <ref name="draw-caption-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
- </define>
- <define name="draw-caption-attlist">
- <interleave>
- <optional>
- <attribute name="draw:caption-point-x">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="draw:caption-point-y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:corner-radius">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="draw-measure">
- <element name="draw:measure">
- <ref name="draw-measure-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- </element>
- </define>
- <define name="draw-measure-attlist">
- <interleave>
- <attribute name="svg:x1">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y1">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:x2">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y2">
- <ref name="coordinate"/>
- </attribute>
- </interleave>
- </define>
- <define name="draw-control">
- <element name="draw:control">
- <ref name="draw-control-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="draw-control-attlist">
- <attribute name="draw:control">
- <ref name="IDREF"/>
- </attribute>
- </define>
- <define name="draw-page-thumbnail">
- <element name="draw:page-thumbnail">
- <ref name="draw-page-thumbnail-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="presentation-shape-attlist"/>
- <ref name="common-draw-shape-with-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- </element>
- </define>
- <define name="draw-page-thumbnail-attlist">
- <optional>
- <attribute name="draw:page-number">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- </define>
- <define name="draw-g">
- <element name="draw:g">
- <ref name="draw-g-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-name-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-text-spreadsheet-shape-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="draw-g-attlist">
- <optional>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
- </define>
- <define name="common-draw-name-attlist">
- <optional>
- <attribute name="draw:name">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-draw-caption-id-attlist">
- <optional>
- <attribute name="draw:caption-id">
- <ref name="IDREF"/>
- </attribute>
- </optional>
- </define>
- <define name="common-draw-position-attlist">
- <optional>
- <attribute name="svg:x">
- <ref name="coordinate"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
- </define>
- <define name="common-draw-size-attlist">
- <optional>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- </optional>
- </define>
- <define name="common-draw-transform-attlist">
- <optional>
- <attribute name="draw:transform">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-draw-viewbox-attlist">
- <attribute name="svg:viewBox">
- <list>
- <ref name="integer"/>
- <ref name="integer"/>
- <ref name="integer"/>
- <ref name="integer"/>
- </list>
- </attribute>
- </define>
- <define name="common-draw-style-name-attlist">
- <choice>
- <group>
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:class-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
- </group>
- <group>
- <optional>
- <attribute name="presentation:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:class-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
- </group>
- </choice>
- </define>
- <define name="common-draw-text-style-name-attlist">
- <optional>
- <attribute name="draw:text-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </define>
- <define name="common-draw-layer-name-attlist">
- <optional>
- <attribute name="draw:layer">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-draw-id-attlist">
- <optional>
- <group>
- <ref name="xml-id"/>
- <optional>
- <attribute name="draw:id">
- <ref name="NCName"/>
- </attribute>
- </optional>
- </group>
- </optional>
- </define>
- <define name="common-draw-z-index-attlist">
- <optional>
- <attribute name="draw:z-index">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </define>
- <define name="common-text-spreadsheet-shape-attlist">
- <interleave>
- <optional>
- <attribute name="table:end-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:end-x">
- <ref name="coordinate"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:end-y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:table-background">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <ref name="common-text-anchor-attlist"/>
- </interleave>
- </define>
- <define name="common-text-anchor-attlist">
- <interleave>
- <optional>
- <attribute name="text:anchor-type">
- <choice>
- <value>page</value>
- <value>frame</value>
- <value>paragraph</value>
- <value>char</value>
- <value>as-char</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:anchor-page-number">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="draw-text">
- <zeroOrMore>
- <choice>
- <ref name="text-p"/>
- <ref name="text-list"/>
- </choice>
- </zeroOrMore>
- </define>
- <define name="common-draw-shape-with-styles-attlist">
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-draw-transform-attlist"/>
- <ref name="common-draw-name-attlist"/>
- <ref name="common-text-spreadsheet-shape-attlist"/>
- </define>
- <define name="common-draw-shape-with-text-and-styles-attlist">
- <ref name="common-draw-shape-with-styles-attlist"/>
- <ref name="common-draw-text-style-name-attlist"/>
- </define>
- <define name="draw-glue-point">
- <element name="draw:glue-point">
- <ref name="draw-glue-point-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="draw-glue-point-attlist">
- <interleave>
- <attribute name="draw:id">
- <ref name="nonNegativeInteger"/>
- </attribute>
- <attribute name="svg:x">
- <choice>
- <ref name="distance"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <attribute name="svg:y">
- <choice>
- <ref name="distance"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <optional>
- <attribute name="draw:align">
- <choice>
- <value>top-left</value>
- <value>top</value>
- <value>top-right</value>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>bottom-left</value>
- <value>bottom-right</value>
- </choice>
- </attribute>
- </optional>
- <attribute name="draw:escape-direction">
- <choice>
- <value>auto</value>
- <value>left</value>
- <value>right</value>
- <value>up</value>
- <value>down</value>
- <value>horizontal</value>
- <value>vertical</value>
- </choice>
- </attribute>
- </interleave>
- </define>
- <define name="svg-title">
- <element name="svg:title">
- <text/>
- </element>
- </define>
- <define name="svg-desc">
- <element name="svg:desc">
- <text/>
- </element>
- </define>
- <define name="draw-frame">
- <element name="draw:frame">
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-rel-size-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <ref name="presentation-shape-attlist"/>
- <ref name="draw-frame-attlist"/>
- <zeroOrMore>
- <choice>
- <ref name="draw-text-box"/>
- <ref name="draw-image"/>
- <ref name="draw-object"/>
- <ref name="draw-object-ole"/>
- <ref name="draw-applet"/>
- <ref name="draw-floating-frame"/>
- <ref name="draw-plugin"/>
- <ref name="table-table"/>
- </choice>
- </zeroOrMore>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <optional>
- <ref name="draw-image-map"/>
- </optional>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <choice>
- <ref name="draw-contour-polygon"/>
- <ref name="draw-contour-path"/>
- </choice>
- </optional>
- </element>
- </define>
- <define name="common-draw-rel-size-attlist">
- <ref name="common-draw-size-attlist"/>
- <optional>
- <attribute name="style:rel-width">
- <choice>
- <ref name="percent"/>
- <value>scale</value>
- <value>scale-min</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rel-height">
- <choice>
- <ref name="percent"/>
- <value>scale</value>
- <value>scale-min</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="draw-frame-attlist">
- <optional>
- <attribute name="draw:copy-of">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="draw-text-box">
- <element name="draw:text-box">
- <ref name="draw-text-box-attlist"/>
- <zeroOrMore>
- <ref name="text-content"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="draw-text-box-attlist">
- <interleave>
- <optional>
- <attribute name="draw:chain-next-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:corner-radius">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:min-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:min-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:max-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:max-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <group>
- <ref name="xml-id"/>
- <optional>
- <attribute name="text:id">
- <ref name="NCName"/>
- </attribute>
- </optional>
- </group>
- </optional>
- </interleave>
- </define>
- <define name="draw-image">
- <element name="draw:image">
- <ref name="draw-image-attlist"/>
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-binary-data"/>
- </choice>
- <ref name="draw-text"/>
- </element>
- </define>
- <define name="common-draw-data-attlist">
- <group>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:show">
- <value>embed</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate">
- <value>onLoad</value>
- </attribute>
- </optional>
- </group>
- </define>
- <define name="office-binary-data">
- <element name="office:binary-data">
- <ref name="base64Binary"/>
- </element>
- </define>
- <define name="draw-image-attlist">
- <interleave>
- <optional>
- <attribute name="draw:filter-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="draw-object">
- <element name="draw:object">
- <ref name="draw-object-attlist"/>
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-document"/>
- <ref name="math-math"/>
- </choice>
- </element>
- </define>
- <define name="draw-object-ole">
- <element name="draw:object-ole">
- <ref name="draw-object-ole-attlist"/>
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-binary-data"/>
- </choice>
- </element>
- </define>
- <define name="draw-object-attlist">
- <interleave>
- <optional>
- <attribute name="draw:notify-on-update-of-ranges">
- <choice>
- <ref name="cellRangeAddressList"/>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="draw-object-ole-attlist">
- <interleave>
- <optional>
- <attribute name="draw:class-id">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="draw-applet">
- <element name="draw:applet">
- <ref name="draw-applet-attlist"/>
- <optional>
- <ref name="common-draw-data-attlist"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-param"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="draw-applet-attlist">
- <interleave>
- <optional>
- <attribute name="draw:code">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:object">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:archive">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:may-script">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="draw-plugin">
- <element name="draw:plugin">
- <ref name="draw-plugin-attlist"/>
- <ref name="common-draw-data-attlist"/>
- <zeroOrMore>
- <ref name="draw-param"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="draw-plugin-attlist">
- <interleave>
- <optional>
- <attribute name="draw:mime-type">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="draw-param">
- <element name="draw:param">
- <ref name="draw-param-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="draw-param-attlist">
- <interleave>
- <optional>
- <attribute name="draw:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:value">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="draw-floating-frame">
- <element name="draw:floating-frame">
- <ref name="draw-floating-frame-attlist"/>
- <ref name="common-draw-data-attlist"/>
- </element>
- </define>
- <define name="draw-floating-frame-attlist">
- <interleave>
- <optional>
- <attribute name="draw:frame-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="draw-contour-polygon">
- <element name="draw:contour-polygon">
- <ref name="common-contour-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-points-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="draw-contour-path">
- <element name="draw:contour-path">
- <ref name="common-contour-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-path-data-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="common-contour-attlist">
- <attribute name="draw:recreate-on-edit">
- <ref name="boolean"/>
- </attribute>
- </define>
- <define name="draw-a">
- <element name="draw:a">
- <ref name="draw-a-attlist"/>
- <ref name="shape-instance"/>
- </element>
- </define>
- <define name="draw-a-attlist">
- <interleave>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:actuate">
- <value>onRequest</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:target-frame-name">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:title">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:server-map">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="draw-image-map">
- <element name="draw:image-map">
- <zeroOrMore>
- <choice>
- <ref name="draw-area-rectangle"/>
- <ref name="draw-area-circle"/>
- <ref name="draw-area-polygon"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- <define name="draw-area-rectangle">
- <element name="draw:area-rectangle">
- <ref name="common-draw-area-attlist"/>
- <attribute name="svg:x">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </element>
- </define>
- <define name="draw-area-circle">
- <element name="draw:area-circle">
- <ref name="common-draw-area-attlist"/>
- <attribute name="svg:cx">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:cy">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:r">
- <ref name="length"/>
- </attribute>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </element>
- </define>
- <define name="draw-area-polygon">
- <element name="draw:area-polygon">
- <ref name="common-draw-area-attlist"/>
- <attribute name="svg:x">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-points-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </element>
- </define>
- <define name="common-draw-area-attlist">
- <interleave>
- <optional>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="office:target-frame-name">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
- </optional>
- <optional>
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:nohref">
- <value>nohref</value>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="dr3d-scene">
- <element name="dr3d:scene">
- <ref name="dr3d-scene-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-text-spreadsheet-shape-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <zeroOrMore>
- <ref name="dr3d-light"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="shapes3d"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="shapes3d">
- <choice>
- <ref name="dr3d-scene"/>
- <ref name="dr3d-extrude"/>
- <ref name="dr3d-sphere"/>
- <ref name="dr3d-rotate"/>
- <ref name="dr3d-cube"/>
- </choice>
- </define>
- <define name="dr3d-scene-attlist">
- <interleave>
- <optional>
- <attribute name="dr3d:vrp">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:vpn">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:vup">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:projection">
- <choice>
- <value>parallel</value>
- <value>perspective</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:distance">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:focal-length">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:shadow-slant">
- <ref name="angle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:shade-mode">
- <choice>
- <value>flat</value>
- <value>phong</value>
- <value>gouraud</value>
- <value>draft</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:ambient-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:lighting-mode">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-dr3d-transform-attlist">
- <optional>
- <attribute name="dr3d:transform">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="dr3d-light">
- <element name="dr3d:light">
- <ref name="dr3d-light-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="dr3d-light-attlist">
- <interleave>
- <optional>
- <attribute name="dr3d:diffuse-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <attribute name="dr3d:direction">
- <ref name="vector3D"/>
- </attribute>
- <optional>
- <attribute name="dr3d:enabled">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:specular">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="dr3d-cube">
- <element name="dr3d:cube">
- <ref name="dr3d-cube-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="dr3d-cube-attlist">
- <optional>
- <attribute name="dr3d:min-edge">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:max-edge">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- </define>
- <define name="dr3d-sphere">
- <element name="dr3d:sphere">
- <ref name="dr3d-sphere-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="dr3d-sphere-attlist">
- <interleave>
- <optional>
- <attribute name="dr3d:center">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:size">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="dr3d-extrude">
- <element name="dr3d:extrude">
- <ref name="common-draw-path-data-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="dr3d-rotate">
- <element name="dr3d:rotate">
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-path-data-attlist"/>
- <ref name="common-draw-z-index-attlist"/>
- <ref name="common-draw-id-attlist"/>
- <ref name="common-draw-layer-name-attlist"/>
- <ref name="common-draw-style-name-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="draw-custom-shape">
- <element name="draw:custom-shape">
- <ref name="draw-custom-shape-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <ref name="common-draw-caption-id-attlist"/>
- <optional>
- <ref name="svg-title"/>
- </optional>
- <optional>
- <ref name="svg-desc"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <ref name="draw-glue-point"/>
- </zeroOrMore>
- <ref name="draw-text"/>
- <optional>
- <ref name="draw-enhanced-geometry"/>
- </optional>
- </element>
- </define>
- <define name="draw-custom-shape-attlist">
- <interleave>
- <optional>
- <attribute name="draw:engine">
- <ref name="namespacedToken"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:data">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="draw-enhanced-geometry">
- <element name="draw:enhanced-geometry">
- <ref name="draw-enhanced-geometry-attlist"/>
- <zeroOrMore>
- <ref name="draw-equation"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="draw-handle"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="draw-enhanced-geometry-attlist">
- <interleave>
- <optional>
- <attribute name="draw:type">
- <ref name="custom-shape-type"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:viewBox">
- <list>
- <ref name="integer"/>
- <ref name="integer"/>
- <ref name="integer"/>
- <ref name="integer"/>
- </list>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:mirror-vertical">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:mirror-horizontal">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:text-rotate-angle">
- <ref name="angle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-allowed">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:text-path-allowed">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:concentric-gradient-fill-allowed">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-brightness">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-depth">
- <list>
- <ref name="length"/>
- <ref name="double"/>
- </list>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-diffusion">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-number-of-line-segments">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-light-face">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-first-light-harsh">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-second-light-harsh">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-first-light-level">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-second-light-level">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-first-light-direction">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-second-light-direction">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-metal">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:shade-mode">
- <choice>
- <value>flat</value>
- <value>phong</value>
- <value>gouraud</value>
- <value>draft</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-rotation-angle">
- <list>
- <ref name="angle"/>
- <ref name="angle"/>
- </list>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-rotation-center">
- <ref name="vector3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-shininess">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-skew">
- <list>
- <ref name="double"/>
- <ref name="angle"/>
- </list>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-specularity">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:projection">
- <choice>
- <value>parallel</value>
- <value>perspective</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-viewpoint">
- <ref name="point3D"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-origin">
- <list>
- <ref name="extrusionOrigin"/>
- <ref name="extrusionOrigin"/>
- </list>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:extrusion-color">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:enhanced-path">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:path-stretchpoint-x">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:path-stretchpoint-y">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:text-areas">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:glue-points">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:glue-point-type">
- <choice>
- <value>none</value>
- <value>segments</value>
- <value>rectangle</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:glue-point-leaving-directions">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:text-path">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:text-path-mode">
- <choice>
- <value>normal</value>
- <value>path</value>
- <value>shape</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:text-path-scale">
- <choice>
- <value>path</value>
- <value>shape</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:text-path-same-letter-heights">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:modifiers">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="custom-shape-type">
- <choice>
- <value>non-primitive</value>
- <ref name="string"/>
- </choice>
- </define>
- <define name="point3D">
- <data type="string">
- <param name="pattern">\([ ]*-?([0-9]+(\.[0-9]*)?|\.[0-9]+)((cm)|(mm)|(in)|(pt)|(pc))([ ]+-?([0-9]+(\.[0-9]*)?|\.[0-9]+)((cm)|(mm)|(in)|(pt)|(pc))){2}[ ]*\)</param>
- </data>
- </define>
- <define name="extrusionOrigin">
- <data type="double">
- <param name="minInclusive">-0.5</param>
- <param name="maxInclusive">0.5</param>
- </data>
- </define>
- <define name="draw-equation">
- <element name="draw:equation">
- <ref name="draw-equation-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="draw-equation-attlist">
- <interleave>
- <optional>
- <attribute name="draw:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:formula">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="draw-handle">
- <element name="draw:handle">
- <ref name="draw-handle-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="draw-handle-attlist">
- <interleave>
- <optional>
- <attribute name="draw:handle-mirror-vertical">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:handle-mirror-horizontal">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:handle-switched">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <attribute name="draw:handle-position">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="draw:handle-range-x-minimum">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:handle-range-x-maximum">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:handle-range-y-minimum">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:handle-range-y-maximum">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:handle-polar">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:handle-radius-range-minimum">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:handle-radius-range-maximum">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="presentation-shape-attlist">
- <interleave>
- <optional>
- <attribute name="presentation:class">
- <ref name="presentation-classes"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:placeholder">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:user-transformed">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="presentation-classes">
- <choice>
- <value>title</value>
- <value>outline</value>
- <value>subtitle</value>
- <value>text</value>
- <value>graphic</value>
- <value>object</value>
- <value>chart</value>
- <value>table</value>
- <value>orgchart</value>
- <value>page</value>
- <value>notes</value>
- <value>handout</value>
- <value>header</value>
- <value>footer</value>
- <value>date-time</value>
- <value>page-number</value>
- </choice>
- </define>
- <define name="presentation-animations">
- <element name="presentation:animations">
- <zeroOrMore>
- <choice>
- <ref name="presentation-animation-elements"/>
- <ref name="presentation-animation-group"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- <define name="presentation-animation-elements">
- <choice>
- <ref name="presentation-show-shape"/>
- <ref name="presentation-show-text"/>
- <ref name="presentation-hide-shape"/>
- <ref name="presentation-hide-text"/>
- <ref name="presentation-dim"/>
- <ref name="presentation-play"/>
- </choice>
- </define>
- <define name="presentation-sound">
- <element name="presentation:sound">
- <ref name="presentation-sound-attlist"/>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:actuate">
- <value>onRequest</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:show">
- <choice>
- <value>new</value>
- <value>replace</value>
- </choice>
- </attribute>
- </optional>
- <empty/>
- </element>
- </define>
- <define name="presentation-sound-attlist">
- <interleave>
- <optional>
- <attribute name="presentation:play-full">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="presentation-show-shape">
- <element name="presentation:show-shape">
- <ref name="common-presentation-effect-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
- </define>
- <define name="common-presentation-effect-attlist">
- <interleave>
- <attribute name="draw:shape-id">
- <ref name="IDREF"/>
- </attribute>
- <optional>
- <attribute name="presentation:effect">
- <ref name="presentationEffects"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:direction">
- <ref name="presentationEffectDirections"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:speed">
- <ref name="presentationSpeeds"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:delay">
- <ref name="duration"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:start-scale">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:path-id">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="presentationEffects">
- <choice>
- <value>none</value>
- <value>fade</value>
- <value>move</value>
- <value>stripes</value>
- <value>open</value>
- <value>close</value>
- <value>dissolve</value>
- <value>wavyline</value>
- <value>random</value>
- <value>lines</value>
- <value>laser</value>
- <value>appear</value>
- <value>hide</value>
- <value>move-short</value>
- <value>checkerboard</value>
- <value>rotate</value>
- <value>stretch</value>
- </choice>
- </define>
- <define name="presentationEffectDirections">
- <choice>
- <value>none</value>
- <value>from-left</value>
- <value>from-top</value>
- <value>from-right</value>
- <value>from-bottom</value>
- <value>from-center</value>
- <value>from-upper-left</value>
- <value>from-upper-right</value>
- <value>from-lower-left</value>
- <value>from-lower-right</value>
- <value>to-left</value>
- <value>to-top</value>
- <value>to-right</value>
- <value>to-bottom</value>
- <value>to-upper-left</value>
- <value>to-upper-right</value>
- <value>to-lower-right</value>
- <value>to-lower-left</value>
- <value>path</value>
- <value>spiral-inward-left</value>
- <value>spiral-inward-right</value>
- <value>spiral-outward-left</value>
- <value>spiral-outward-right</value>
- <value>vertical</value>
- <value>horizontal</value>
- <value>to-center</value>
- <value>clockwise</value>
- <value>counter-clockwise</value>
- </choice>
- </define>
- <define name="presentationSpeeds">
- <choice>
- <value>slow</value>
- <value>medium</value>
- <value>fast</value>
- </choice>
- </define>
- <define name="presentation-show-text">
- <element name="presentation:show-text">
- <ref name="common-presentation-effect-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
- </define>
- <define name="presentation-hide-shape">
- <element name="presentation:hide-shape">
- <ref name="common-presentation-effect-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
- </define>
- <define name="presentation-hide-text">
- <element name="presentation:hide-text">
- <ref name="common-presentation-effect-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
- </define>
- <define name="presentation-dim">
- <element name="presentation:dim">
- <ref name="presentation-dim-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
- </define>
- <define name="presentation-dim-attlist">
- <interleave>
- <attribute name="draw:shape-id">
- <ref name="IDREF"/>
- </attribute>
- <attribute name="draw:color">
- <ref name="color"/>
- </attribute>
- </interleave>
- </define>
- <define name="presentation-play">
- <element name="presentation:play">
- <ref name="presentation-play-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="presentation-play-attlist">
- <attribute name="draw:shape-id">
- <ref name="IDREF"/>
- </attribute>
- <optional>
- <attribute name="presentation:speed">
- <ref name="presentationSpeeds"/>
- </attribute>
- </optional>
- </define>
- <define name="presentation-animation-group">
- <element name="presentation:animation-group">
- <zeroOrMore>
- <ref name="presentation-animation-elements"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="common-anim-attlist">
- <interleave>
- <optional>
- <attribute name="presentation:node-type">
- <choice>
- <value>default</value>
- <value>on-click</value>
- <value>with-previous</value>
- <value>after-previous</value>
- <value>timing-root</value>
- <value>main-sequence</value>
- <value>interactive-sequence</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:preset-id">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:preset-sub-type">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:preset-class">
- <choice>
- <value>custom</value>
- <value>entrance</value>
- <value>exit</value>
- <value>emphasis</value>
- <value>motion-path</value>
- <value>ole-action</value>
- <value>media-call</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:master-element">
- <ref name="IDREF"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:group-id">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <group>
- <ref name="xml-id"/>
- <optional>
- <attribute name="anim:id">
- <ref name="NCName"/>
- </attribute>
- </optional>
- </group>
- </optional>
- </interleave>
- </define>
- <define name="presentation-event-listener">
- <element name="presentation:event-listener">
- <ref name="presentation-event-listener-attlist"/>
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </element>
- </define>
- <define name="presentation-event-listener-attlist">
- <interleave>
- <attribute name="script:event-name">
- <ref name="string"/>
- </attribute>
- <attribute name="presentation:action">
- <choice>
- <value>none</value>
- <value>previous-page</value>
- <value>next-page</value>
- <value>first-page</value>
- <value>last-page</value>
- <value>hide</value>
- <value>stop</value>
- <value>execute</value>
- <value>show</value>
- <value>verb</value>
- <value>fade-out</value>
- <value>sound</value>
- <value>last-visited-page</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="presentation:effect">
- <ref name="presentationEffects"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:direction">
- <ref name="presentationEffectDirections"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:speed">
- <ref name="presentationSpeeds"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:start-scale">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:show">
- <value>embed</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate">
- <value>onRequest</value>
- </attribute>
- </optional>
- </optional>
- <optional>
- <attribute name="presentation:verb">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="presentation-decls">
- <zeroOrMore>
- <ref name="presentation-decl"/>
- </zeroOrMore>
- </define>
- <define name="presentation-decl">
- <choice>
- <element name="presentation:header-decl">
- <ref name="presentation-header-decl-attlist"/>
- <text/>
- </element>
- <element name="presentation:footer-decl">
- <ref name="presentation-footer-decl-attlist"/>
- <text/>
- </element>
- <element name="presentation:date-time-decl">
- <ref name="presentation-date-time-decl-attlist"/>
- <text/>
- </element>
- </choice>
- </define>
- <define name="presentation-header-decl-attlist">
- <attribute name="presentation:name">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="presentation-footer-decl-attlist">
- <attribute name="presentation:name">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="presentation-date-time-decl-attlist">
- <interleave>
- <attribute name="presentation:name">
- <ref name="string"/>
- </attribute>
- <attribute name="presentation:source">
- <choice>
- <value>fixed</value>
- <value>current-date</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="style:data-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="presentation-settings">
- <optional>
- <element name="presentation:settings">
- <ref name="presentation-settings-attlist"/>
- <zeroOrMore>
- <ref name="presentation-show"/>
- </zeroOrMore>
- </element>
- </optional>
- </define>
- <define name="presentation-settings-attlist">
- <interleave>
- <optional>
- <attribute name="presentation:start-page">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:show">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:full-screen">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:endless">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:pause">
- <ref name="duration"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:show-logo">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:force-manual">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:mouse-visible">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:mouse-as-pen">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:start-with-navigator">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:animations">
- <choice>
- <value>enabled</value>
- <value>disabled</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:transition-on-click">
- <choice>
- <value>enabled</value>
- <value>disabled</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:stay-on-top">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:show-end-of-presentation-slide">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="presentation-show">
- <element name="presentation:show">
- <ref name="presentation-show-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="presentation-show-attlist">
- <interleave>
- <attribute name="presentation:name">
- <ref name="string"/>
- </attribute>
- <attribute name="presentation:pages">
- <ref name="string"/>
- </attribute>
- </interleave>
- </define>
- <define name="chart-chart">
- <element name="chart:chart">
- <ref name="chart-chart-attlist"/>
- <optional>
- <ref name="chart-title"/>
- </optional>
- <optional>
- <ref name="chart-subtitle"/>
- </optional>
- <optional>
- <ref name="chart-footer"/>
- </optional>
- <optional>
- <ref name="chart-legend"/>
- </optional>
- <ref name="chart-plot-area"/>
- <optional>
- <ref name="table-table"/>
- </optional>
- </element>
- </define>
- <define name="chart-chart-attlist">
- <interleave>
- <attribute name="chart:class">
- <ref name="namespacedToken"/>
- </attribute>
- <ref name="common-draw-size-attlist"/>
- <optional>
- <attribute name="chart:column-mapping">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:row-mapping">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <group>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- </group>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="chart-title">
- <element name="chart:title">
- <ref name="chart-title-attlist"/>
- <optional>
- <ref name="text-p"/>
- </optional>
- </element>
- </define>
- <define name="chart-title-attlist">
- <interleave>
- <optional>
- <attribute name="table:cell-range">
- <ref name="cellRangeAddressList"/>
- </attribute>
- </optional>
- <ref name="common-draw-position-attlist"/>
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="chart-subtitle">
- <element name="chart:subtitle">
- <ref name="chart-title-attlist"/>
- <optional>
- <ref name="text-p"/>
- </optional>
- </element>
- </define>
- <define name="chart-footer">
- <element name="chart:footer">
- <ref name="chart-title-attlist"/>
- <optional>
- <ref name="text-p"/>
- </optional>
- </element>
- </define>
- <define name="chart-legend">
- <element name="chart:legend">
- <ref name="chart-legend-attlist"/>
- <optional>
- <ref name="text-p"/>
- </optional>
- </element>
- </define>
- <define name="chart-legend-attlist">
- <interleave>
- <choice>
- <group>
- <attribute name="chart:legend-position">
- <choice>
- <value>start</value>
- <value>end</value>
- <value>top</value>
- <value>bottom</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="chart:legend-align">
- <choice>
- <value>start</value>
- <value>center</value>
- <value>end</value>
- </choice>
- </attribute>
- </optional>
- </group>
- <attribute name="chart:legend-position">
- <choice>
- <value>top-start</value>
- <value>bottom-start</value>
- <value>top-end</value>
- <value>bottom-end</value>
- </choice>
- </attribute>
- <empty/>
- </choice>
- <ref name="common-draw-position-attlist"/>
- <choice>
- <attribute name="style:legend-expansion">
- <choice>
- <value>wide</value>
- <value>high</value>
- <value>balanced</value>
- </choice>
- </attribute>
- <group>
- <attribute name="style:legend-expansion">
- <value>custom</value>
- </attribute>
- <attribute name="style:legend-expansion-aspect-ratio">
- <ref name="double"/>
- </attribute>
- </group>
- <empty/>
- </choice>
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="chart-plot-area">
- <element name="chart:plot-area">
- <ref name="chart-plot-area-attlist"/>
- <zeroOrMore>
- <ref name="dr3d-light"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="chart-axis"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="chart-series"/>
- </zeroOrMore>
- <optional>
- <ref name="chart-stock-gain-marker"/>
- </optional>
- <optional>
- <ref name="chart-stock-loss-marker"/>
- </optional>
- <optional>
- <ref name="chart-stock-range-line"/>
- </optional>
- <optional>
- <ref name="chart-wall"/>
- </optional>
- <optional>
- <ref name="chart-floor"/>
- </optional>
- </element>
- </define>
- <define name="chart-plot-area-attlist">
- <interleave>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddressList"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:data-source-has-labels">
- <choice>
- <value>none</value>
- <value>row</value>
- <value>column</value>
- <value>both</value>
- </choice>
- </attribute>
- </optional>
- <ref name="dr3d-scene-attlist"/>
- <ref name="common-dr3d-transform-attlist"/>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="chart-wall">
- <element name="chart:wall">
- <ref name="chart-wall-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="chart-wall-attlist">
- <interleave>
- <optional>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="chart-floor">
- <element name="chart:floor">
- <ref name="chart-floor-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="chart-floor-attlist">
- <interleave>
- <optional>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="chart-axis">
- <element name="chart:axis">
- <ref name="chart-axis-attlist"/>
- <optional>
- <ref name="chart-title"/>
- </optional>
- <optional>
- <ref name="chart-categories"/>
- </optional>
- <zeroOrMore>
- <ref name="chart-grid"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="chart-axis-attlist">
- <interleave>
- <attribute name="chart:dimension">
- <ref name="chart-dimension"/>
- </attribute>
- <optional>
- <attribute name="chart:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="chart-dimension">
- <choice>
- <value>x</value>
- <value>y</value>
- <value>z</value>
- </choice>
- </define>
- <define name="chart-categories">
- <element name="chart:categories">
- <optional>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddressList"/>
- </attribute>
- </optional>
- </element>
- </define>
- <define name="chart-grid">
- <element name="chart:grid">
- <ref name="chart-grid-attlist"/>
- </element>
- </define>
- <define name="chart-grid-attlist">
- <interleave>
- <optional>
- <attribute name="chart:class">
- <choice>
- <value>major</value>
- <value>minor</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="chart-series">
- <element name="chart:series">
- <ref name="chart-series-attlist"/>
- <zeroOrMore>
- <ref name="chart-domain"/>
- </zeroOrMore>
- <optional>
- <ref name="chart-mean-value"/>
- </optional>
- <zeroOrMore>
- <ref name="chart-regression-curve"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="chart-error-indicator"/>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="chart-data-point"/>
- </zeroOrMore>
- <optional>
- <ref name="chart-data-label"/>
- </optional>
- </element>
- </define>
- <define name="chart-series-attlist">
- <interleave>
- <optional>
- <attribute name="chart:values-cell-range-address">
- <ref name="cellRangeAddressList"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:label-cell-address">
- <ref name="cellRangeAddressList"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:class">
- <ref name="namespacedToken"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:attached-axis">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="chart-domain">
- <element name="chart:domain">
- <optional>
- <attribute name="table:cell-range-address">
- <ref name="cellRangeAddressList"/>
- </attribute>
- </optional>
- </element>
- </define>
- <define name="chart-data-point">
- <element name="chart:data-point">
- <ref name="chart-data-point-attlist"/>
- <optional>
- <ref name="chart-data-label"/>
- </optional>
- </element>
- </define>
- <define name="chart-data-point-attlist">
- <interleave>
- <optional>
- <attribute name="chart:repeated">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <ref name="xml-id"/>
- </optional>
- </interleave>
- </define>
- <define name="chart-data-label">
- <element name="chart:data-label">
- <ref name="chart-data-label-attlist"/>
- <optional>
- <ref name="text-p"/>
- </optional>
- </element>
- </define>
- <define name="chart-data-label-attlist">
- <interleave>
- <ref name="common-draw-position-attlist"/>
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="chart-mean-value">
- <element name="chart:mean-value">
- <ref name="chart-mean-value-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="chart-mean-value-attlist">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </define>
- <define name="chart-error-indicator">
- <element name="chart:error-indicator">
- <ref name="chart-error-indicator-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="chart-error-indicator-attlist">
- <interleave>
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <attribute name="chart:dimension">
- <ref name="chart-dimension"/>
- </attribute>
- </interleave>
- </define>
- <define name="chart-regression-curve">
- <element name="chart:regression-curve">
- <ref name="chart-regression-curve-attlist"/>
- <optional>
- <ref name="chart-equation"/>
- </optional>
- </element>
- </define>
- <define name="chart-regression-curve-attlist">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </define>
- <define name="chart-equation">
- <element name="chart:equation">
- <ref name="chart-equation-attlist"/>
- <optional>
- <ref name="text-p"/>
- </optional>
- </element>
- </define>
- <define name="chart-equation-attlist">
- <interleave>
- <optional>
- <attribute name="chart:automatic-content">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:display-r-square">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:display-equation">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <ref name="common-draw-position-attlist"/>
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="chart-stock-gain-marker">
- <element name="chart:stock-gain-marker">
- <ref name="common-stock-marker-attlist"/>
- </element>
- </define>
- <define name="chart-stock-loss-marker">
- <element name="chart:stock-loss-marker">
- <ref name="common-stock-marker-attlist"/>
- </element>
- </define>
- <define name="chart-stock-range-line">
- <element name="chart:stock-range-line">
- <ref name="common-stock-marker-attlist"/>
- </element>
- </define>
- <define name="common-stock-marker-attlist">
- <optional>
- <attribute name="chart:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </define>
- <define name="office-database">
- <element name="office:database">
- <ref name="db-data-source"/>
- <optional>
- <ref name="db-forms"/>
- </optional>
- <optional>
- <ref name="db-reports"/>
- </optional>
- <optional>
- <ref name="db-queries"/>
- </optional>
- <optional>
- <ref name="db-table-presentations"/>
- </optional>
- <optional>
- <ref name="db-schema-definition"/>
- </optional>
- </element>
- </define>
- <define name="db-data-source">
- <element name="db:data-source">
- <ref name="db-data-source-attlist"/>
- <ref name="db-connection-data"/>
- <optional>
- <ref name="db-driver-settings"/>
- </optional>
- <optional>
- <ref name="db-application-connection-settings"/>
- </optional>
- </element>
- </define>
- <define name="db-data-source-attlist">
- <empty/>
- </define>
- <define name="db-connection-data">
- <element name="db:connection-data">
- <ref name="db-connection-data-attlist"/>
- <choice>
- <ref name="db-database-description"/>
- <ref name="db-connection-resource"/>
- </choice>
- <optional>
- <ref name="db-login"/>
- </optional>
- </element>
- </define>
- <define name="db-connection-data-attlist">
- <empty/>
- </define>
- <define name="db-database-description">
- <element name="db:database-description">
- <ref name="db-database-description-attlist"/>
- <choice>
- <ref name="db-file-based-database"/>
- <ref name="db-server-database"/>
- </choice>
- </element>
- </define>
- <define name="db-database-description-attlist">
- <empty/>
- </define>
- <define name="db-file-based-database">
- <element name="db:file-based-database">
- <ref name="db-file-based-database-attlist"/>
- </element>
- </define>
- <define name="db-file-based-database-attlist">
- <interleave>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <attribute name="db:media-type">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="db:extension">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="db-server-database">
- <element name="db:server-database">
- <ref name="db-server-database-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="db-server-database-attlist">
- <interleave>
- <attribute name="db:type">
- <ref name="namespacedToken"/>
- </attribute>
- <choice>
- <ref name="db-host-and-port"/>
- <ref name="db-local-socket-name"/>
- </choice>
- <optional>
- <attribute name="db:database-name">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="db-host-and-port">
- <attribute name="db:hostname">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="db:port">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- </define>
- <define name="db-local-socket-name">
- <optional>
- <attribute name="db:local-socket">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="db-connection-resource">
- <element name="db:connection-resource">
- <ref name="db-connection-resource-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="db-connection-resource-attlist">
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:show">
- <value>none</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate">
- <value>onRequest</value>
- </attribute>
- </optional>
- </define>
- <define name="db-login">
- <element name="db:login">
- <ref name="db-login-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="db-login-attlist">
- <interleave>
- <optional>
- <choice>
- <attribute name="db:user-name">
- <ref name="string"/>
- </attribute>
- <attribute name="db:use-system-user">
- <ref name="boolean"/>
- </attribute>
- </choice>
- </optional>
- <optional>
- <attribute name="db:is-password-required">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:login-timeout">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="db-driver-settings">
- <element name="db:driver-settings">
- <ref name="db-driver-settings-attlist"/>
- <optional>
- <ref name="db-auto-increment"/>
- </optional>
- <optional>
- <ref name="db-delimiter"/>
- </optional>
- <optional>
- <ref name="db-character-set"/>
- </optional>
- <optional>
- <ref name="db-table-settings"/>
- </optional>
- </element>
- </define>
- <define name="db-driver-settings-attlist">
- <interleave>
- <ref name="db-show-deleted"/>
- <optional>
- <attribute name="db:system-driver-settings">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:base-dn">
- <ref name="string"/>
- </attribute>
- </optional>
- <ref name="db-is-first-row-header-line"/>
- <optional>
- <attribute name="db:parameter-name-substitution">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="db-show-deleted">
- <optional>
- <attribute name="db:show-deleted">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="db-is-first-row-header-line">
- <optional>
- <attribute name="db:is-first-row-header-line">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="db-auto-increment">
- <element name="db:auto-increment">
- <ref name="db-auto-increment-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="db-auto-increment-attlist">
- <interleave>
- <optional>
- <attribute name="db:additional-column-statement">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:row-retrieving-statement">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="db-delimiter">
- <element name="db:delimiter">
- <ref name="db-delimiter-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="db-delimiter-attlist">
- <interleave>
- <optional>
- <attribute name="db:field">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:string">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:decimal">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:thousand">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="db-character-set">
- <element name="db:character-set">
- <ref name="db-character-set-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="db-character-set-attlist">
- <optional>
- <attribute name="db:encoding">
- <ref name="textEncoding"/>
- </attribute>
- </optional>
- </define>
- <define name="db-table-settings">
- <element name="db:table-settings">
- <zeroOrMore>
- <ref name="db-table-setting"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="db-table-setting">
- <element name="db:table-setting">
- <ref name="db-table-setting-attlist"/>
- <optional>
- <ref name="db-delimiter"/>
- </optional>
- <optional>
- <ref name="db-character-set"/>
- </optional>
- <empty/>
- </element>
- </define>
- <define name="db-table-setting-attlist">
- <ref name="db-is-first-row-header-line"/>
- <ref name="db-show-deleted"/>
- </define>
- <define name="db-application-connection-settings">
- <element name="db:application-connection-settings">
- <ref name="db-application-connection-settings-attlist"/>
- <optional>
- <ref name="db-table-filter"/>
- </optional>
- <optional>
- <ref name="db-table-type-filter"/>
- </optional>
- <optional>
- <ref name="db-data-source-settings"/>
- </optional>
- </element>
- </define>
- <define name="db-application-connection-settings-attlist">
- <interleave>
- <optional>
- <attribute name="db:is-table-name-length-limited">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:enable-sql92-check">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:append-table-alias-name">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:ignore-driver-privileges">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:boolean-comparison-mode">
- <choice>
- <value>equal-integer</value>
- <value>is-boolean</value>
- <value>equal-boolean</value>
- <value>equal-use-only-zero</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:use-catalog">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:max-row-count">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:suppress-version-columns">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="db-table-filter">
- <element name="db:table-filter">
- <ref name="db-table-filter-attlist"/>
- <optional>
- <ref name="db-table-include-filter"/>
- </optional>
- <optional>
- <ref name="db-table-exclude-filter"/>
- </optional>
- </element>
- </define>
- <define name="db-table-filter-attlist">
- <empty/>
- </define>
- <define name="db-table-include-filter">
- <element name="db:table-include-filter">
- <ref name="db-table-include-filter-attlist"/>
- <oneOrMore>
- <ref name="db-table-filter-pattern"/>
- </oneOrMore>
- </element>
- </define>
- <define name="db-table-include-filter-attlist">
- <empty/>
- </define>
- <define name="db-table-exclude-filter">
- <element name="db:table-exclude-filter">
- <ref name="db-table-exclude-filter-attlist"/>
- <oneOrMore>
- <ref name="db-table-filter-pattern"/>
- </oneOrMore>
- </element>
- </define>
- <define name="db-table-exclude-filter-attlist">
- <empty/>
- </define>
- <define name="db-table-filter-pattern">
- <element name="db:table-filter-pattern">
- <ref name="db-table-filter-pattern-attlist"/>
- <ref name="string"/>
- </element>
- </define>
- <define name="db-table-filter-pattern-attlist">
- <empty/>
- </define>
- <define name="db-table-type-filter">
- <element name="db:table-type-filter">
- <ref name="db-table-type-filter-attlist"/>
- <zeroOrMore>
- <ref name="db-table-type"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="db-table-type-filter-attlist">
- <empty/>
- </define>
- <define name="db-table-type">
- <element name="db:table-type">
- <ref name="db-table-type-attlist"/>
- <ref name="string"/>
- </element>
- </define>
- <define name="db-table-type-attlist">
- <empty/>
- </define>
- <define name="db-data-source-settings">
- <element name="db:data-source-settings">
- <ref name="db-data-source-settings-attlist"/>
- <oneOrMore>
- <ref name="db-data-source-setting"/>
- </oneOrMore>
- </element>
- </define>
- <define name="db-data-source-settings-attlist">
- <empty/>
- </define>
- <define name="db-data-source-setting">
- <element name="db:data-source-setting">
- <ref name="db-data-source-setting-attlist"/>
- <oneOrMore>
- <ref name="db-data-source-setting-value"/>
- </oneOrMore>
- </element>
- </define>
- <define name="db-data-source-setting-attlist">
- <interleave>
- <optional>
- <attribute name="db:data-source-setting-is-list">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <attribute name="db:data-source-setting-name">
- <ref name="string"/>
- </attribute>
- <attribute name="db:data-source-setting-type">
- <ref name="db-data-source-setting-types"/>
- </attribute>
- </interleave>
- </define>
- <define name="db-data-source-setting-types">
- <choice>
- <value>boolean</value>
- <value>short</value>
- <value>int</value>
- <value>long</value>
- <value>double</value>
- <value>string</value>
- </choice>
- </define>
- <define name="db-data-source-setting-value">
- <element name="db:data-source-setting-value">
- <ref name="db-data-source-setting-value-attlist"/>
- <ref name="string"/>
- </element>
- </define>
- <define name="db-data-source-setting-value-attlist">
- <empty/>
- </define>
- <define name="db-forms">
- <element name="db:forms">
- <ref name="db-forms-attlist"/>
- <zeroOrMore>
- <choice>
- <ref name="db-component"/>
- <ref name="db-component-collection"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- <define name="db-forms-attlist">
- <empty/>
- </define>
- <define name="db-reports">
- <element name="db:reports">
- <ref name="db-reports-attlist"/>
- <zeroOrMore>
- <choice>
- <ref name="db-component"/>
- <ref name="db-component-collection"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- <define name="db-reports-attlist">
- <empty/>
- </define>
- <define name="db-component-collection">
- <element name="db:component-collection">
- <ref name="db-component-collection-attlist"/>
- <ref name="common-db-object-name"/>
- <ref name="common-db-object-title"/>
- <ref name="common-db-object-description"/>
- <zeroOrMore>
- <choice>
- <ref name="db-component"/>
- <ref name="db-component-collection"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- <define name="db-component-collection-attlist">
- <empty/>
- </define>
- <define name="db-component">
- <element name="db:component">
- <ref name="db-component-attlist"/>
- <ref name="common-db-object-name"/>
- <ref name="common-db-object-title"/>
- <ref name="common-db-object-description"/>
- <optional>
- <choice>
- <ref name="office-document"/>
- <ref name="math-math"/>
- </choice>
- </optional>
- </element>
- </define>
- <define name="db-component-attlist">
- <interleave>
- <optional>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:show">
- <value>none</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate">
- <value>onRequest</value>
- </attribute>
- </optional>
- </optional>
- <optional>
- <attribute name="db:as-template">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="db-queries">
- <element name="db:queries">
- <ref name="db-queries-attlist"/>
- <zeroOrMore>
- <choice>
- <ref name="db-query"/>
- <ref name="db-query-collection"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- <define name="db-queries-attlist">
- <empty/>
- </define>
- <define name="db-query-collection">
- <element name="db:query-collection">
- <ref name="db-query-collection-attlist"/>
- <ref name="common-db-object-name"/>
- <ref name="common-db-object-title"/>
- <ref name="common-db-object-description"/>
- <zeroOrMore>
- <choice>
- <ref name="db-query"/>
- <ref name="db-query-collection"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- <define name="db-query-collection-attlist">
- <empty/>
- </define>
- <define name="db-query">
- <element name="db:query">
- <ref name="db-query-attlist"/>
- <ref name="common-db-object-name"/>
- <ref name="common-db-object-title"/>
- <ref name="common-db-object-description"/>
- <ref name="common-db-table-style-name"/>
- <optional>
- <ref name="db-order-statement"/>
- </optional>
- <optional>
- <ref name="db-filter-statement"/>
- </optional>
- <optional>
- <ref name="db-columns"/>
- </optional>
- <optional>
- <ref name="db-update-table"/>
- </optional>
- </element>
- </define>
- <define name="db-query-attlist">
- <interleave>
- <attribute name="db:command">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="db:escape-processing">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="db-order-statement">
- <element name="db:order-statement">
- <ref name="db-command"/>
- <ref name="db-apply-command"/>
- <empty/>
- </element>
- </define>
- <define name="db-filter-statement">
- <element name="db:filter-statement">
- <ref name="db-command"/>
- <ref name="db-apply-command"/>
- <empty/>
- </element>
- </define>
- <define name="db-update-table">
- <element name="db:update-table">
- <ref name="common-db-table-name-attlist"/>
- </element>
- </define>
- <define name="db-table-presentations">
- <element name="db:table-representations">
- <ref name="db-table-presentations-attlist"/>
- <zeroOrMore>
- <ref name="db-table-presentation"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="db-table-presentations-attlist">
- <empty/>
- </define>
- <define name="db-table-presentation">
- <element name="db:table-representation">
- <ref name="db-table-presentation-attlist"/>
- <ref name="common-db-table-name-attlist"/>
- <ref name="common-db-object-title"/>
- <ref name="common-db-object-description"/>
- <ref name="common-db-table-style-name"/>
- <optional>
- <ref name="db-order-statement"/>
- </optional>
- <optional>
- <ref name="db-filter-statement"/>
- </optional>
- <optional>
- <ref name="db-columns"/>
- </optional>
- </element>
- </define>
- <define name="db-table-presentation-attlist">
- <empty/>
- </define>
- <define name="db-columns">
- <element name="db:columns">
- <ref name="db-columns-attlist"/>
- <oneOrMore>
- <ref name="db-column"/>
- </oneOrMore>
- </element>
- </define>
- <define name="db-columns-attlist">
- <empty/>
- </define>
- <define name="db-column">
- <element name="db:column">
- <ref name="db-column-attlist"/>
- <ref name="common-db-object-name"/>
- <ref name="common-db-object-title"/>
- <ref name="common-db-object-description"/>
- <ref name="common-db-default-value"/>
- </element>
- </define>
- <define name="db-column-attlist">
- <interleave>
- <optional>
- <attribute name="db:visible">
- <ref name="boolean"/>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="db:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:default-cell-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="db-command">
- <attribute name="db:command">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="db-apply-command">
- <optional>
- <attribute name="db:apply-command">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="common-db-table-name-attlist">
- <interleave>
- <attribute name="db:name">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="db:catalog-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:schema-name">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-db-object-name">
- <attribute name="db:name">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="common-db-object-title">
- <optional>
- <attribute name="db:title">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-db-object-description">
- <optional>
- <attribute name="db:description">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-db-table-style-name">
- <interleave>
- <optional>
- <attribute name="db:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="db:default-row-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-db-default-value">
- <optional>
- <ref name="common-value-and-type-attlist"/>
- </optional>
- </define>
- <define name="db-schema-definition">
- <element name="db:schema-definition">
- <ref name="db-schema-definition-attlist"/>
- <ref name="db-table-definitions"/>
- </element>
- </define>
- <define name="db-schema-definition-attlist">
- <empty/>
- </define>
- <define name="db-table-definitions">
- <element name="db:table-definitions">
- <ref name="db-table-definitions-attlist"/>
- <zeroOrMore>
- <ref name="db-table-definition"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="db-table-definitions-attlist">
- <empty/>
- </define>
- <define name="db-table-definition">
- <element name="db:table-definition">
- <ref name="common-db-table-name-attlist"/>
- <ref name="db-table-definition-attlist"/>
- <ref name="db-column-definitions"/>
- <optional>
- <ref name="db-keys"/>
- </optional>
- <optional>
- <ref name="db-indices"/>
- </optional>
- </element>
- </define>
- <define name="db-table-definition-attlist">
- <optional>
- <attribute name="db:type">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="db-column-definitions">
- <element name="db:column-definitions">
- <ref name="db-column-definitions-attlist"/>
- <oneOrMore>
- <ref name="db-column-definition"/>
- </oneOrMore>
- </element>
- </define>
- <define name="db-column-definitions-attlist">
- <empty/>
- </define>
- <define name="db-column-definition">
- <element name="db:column-definition">
- <ref name="db-column-definition-attlist"/>
- <ref name="common-db-default-value"/>
- </element>
- </define>
- <define name="db-column-definition-attlist">
- <interleave>
- <attribute name="db:name">
- <ref name="string"/>
- </attribute>
-
- <optional>
- <attribute name="db:data-type">
- <ref name="db-data-types"/>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="db:type-name">
- <ref name="string"/>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="db:precision">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="db:scale">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="db:is-nullable">
- <choice>
- <value>no-nulls</value>
- <value>nullable</value>
- </choice>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="db:is-empty-allowed">
- <ref name="boolean"/>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="db:is-autoincrement">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="db-data-types">
- <choice>
- <value>bit</value>
- <value>boolean</value>
- <value>tinyint</value>
- <value>smallint</value>
- <value>integer</value>
- <value>bigint</value>
- <value>float</value>
- <value>real</value>
- <value>double</value>
- <value>numeric</value>
- <value>decimal</value>
- <value>char</value>
- <value>varchar</value>
- <value>longvarchar</value>
- <value>date</value>
- <value>time</value>
- <value>timestmp</value>
- <value>binary</value>
- <value>varbinary</value>
- <value>longvarbinary</value>
- <value>sqlnull</value>
- <value>other</value>
- <value>object</value>
- <value>distinct</value>
- <value>struct</value>
- <value>array</value>
- <value>blob</value>
- <value>clob</value>
- <value>ref</value>
- </choice>
- </define>
- <define name="db-keys">
- <element name="db:keys">
- <ref name="db-keys-attlist"/>
- <oneOrMore>
- <ref name="db-key"/>
- </oneOrMore>
- </element>
- </define>
- <define name="db-keys-attlist">
- <empty/>
- </define>
- <define name="db-key">
- <element name="db:key">
- <ref name="db-key-attlist"/>
- <oneOrMore>
- <ref name="db-key-columns"/>
- </oneOrMore>
- </element>
- </define>
- <define name="db-key-attlist">
- <interleave>
- <optional>
- <attribute name="db:name">
- <ref name="string"/>
- </attribute>
- </optional>
-
- <attribute name="db:type">
- <choice>
- <value>primary</value>
- <value>unique</value>
- <value>foreign</value>
- </choice>
- </attribute>
-
- <optional>
- <attribute name="db:referenced-table-name">
- <ref name="string"/>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="db:update-rule">
- <choice>
- <value>cascade</value>
- <value>restrict</value>
- <value>set-null</value>
- <value>no-action</value>
- <value>set-default</value>
- </choice>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="db:delete-rule">
- <choice>
- <value>cascade</value>
- <value>restrict</value>
- <value>set-null</value>
- <value>no-action</value>
- <value>set-default</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="db-key-columns">
- <element name="db:key-columns">
- <ref name="db-key-columns-attlist"/>
- <oneOrMore>
- <ref name="db-key-column"/>
- </oneOrMore>
- </element>
- </define>
- <define name="db-key-columns-attlist">
- <empty/>
- </define>
- <define name="db-key-column">
- <element name="db:key-column">
- <ref name="db-key-column-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="db-key-column-attlist">
- <interleave>
- <optional>
- <attribute name="db:name">
- <ref name="string"/>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="db:related-column-name">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="db-indices">
- <element name="db:indices">
- <ref name="db-indices-attlist"/>
- <oneOrMore>
- <ref name="db-index"/>
- </oneOrMore>
- </element>
- </define>
- <define name="db-indices-attlist">
- <empty/>
- </define>
- <define name="db-index">
- <element name="db:index">
- <ref name="db-index-attlist"/>
- <oneOrMore>
- <ref name="db-index-columns"/>
- </oneOrMore>
- </element>
- </define>
- <define name="db-index-attlist">
- <interleave>
- <attribute name="db:name">
- <ref name="string"/>
- </attribute>
-
- <optional>
- <attribute name="db:catalog-name">
- <ref name="string"/>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="db:is-unique">
- <ref name="boolean"/>
- </attribute>
- </optional>
-
- <optional>
- <attribute name="db:is-clustered">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="db-index-columns">
- <element name="db:index-columns">
- <oneOrMore>
- <ref name="db-index-column"/>
- </oneOrMore>
- </element>
- </define>
- <define name="db-index-column">
- <element name="db:index-column">
- <ref name="db-index-column-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="db-index-column-attlist">
- <interleave>
- <attribute name="db:name">
- <ref name="string"/>
- </attribute>
-
- <optional>
- <attribute name="db:is-ascending">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="office-forms">
- <optional>
- <element name="office:forms">
- <ref name="office-forms-attlist"/>
- <zeroOrMore>
- <choice>
- <ref name="form-form"/>
- <ref name="xforms-model"/>
- </choice>
- </zeroOrMore>
- </element>
- </optional>
- </define>
- <define name="office-forms-attlist">
- <interleave>
- <optional>
- <attribute name="form:automatic-focus">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:apply-design-mode">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="form-form">
- <element name="form:form">
- <ref name="common-form-control-attlist"/>
- <ref name="form-form-attlist"/>
- <optional>
- <ref name="form-properties"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- <zeroOrMore>
- <choice>
- <ref name="controls"/>
- <ref name="form-form"/>
- </choice>
- </zeroOrMore>
- <optional>
- <ref name="form-connection-resource"/>
- </optional>
- </element>
- </define>
- <define name="form-form-attlist">
- <interleave>
- <optional>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:actuate">
- <value>onRequest</value>
- </attribute>
- </optional>
- </optional>
- <optional>
- <attribute name="office:target-frame">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:method">
- <choice>
- <value>get</value>
- <value>post</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:enctype">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:allow-deletes">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:allow-inserts">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:allow-updates">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:apply-filter">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:command-type">
- <choice>
- <value>table</value>
- <value>query</value>
- <value>command</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:command">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:datasource">
- <choice>
- <ref name="anyIRI"/>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:master-fields">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:detail-fields">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:escape-processing">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:filter">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:ignore-result">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:navigation-mode">
- <ref name="navigation"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:order">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:tab-cycle">
- <ref name="tab-cycles"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="navigation">
- <choice>
- <value>none</value>
- <value>current</value>
- <value>parent</value>
- </choice>
- </define>
- <define name="tab-cycles">
- <choice>
- <value>records</value>
- <value>current</value>
- <value>page</value>
- </choice>
- </define>
- <define name="form-connection-resource">
- <element name="form:connection-resource">
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <empty/>
- </element>
- </define>
- <define name="xforms-model">
- <element name="xforms:model">
- <ref name="anyAttListOrElements"/>
- </element>
- </define>
- <define name="column-controls">
- <choice>
- <element name="form:text">
- <ref name="form-text-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
- <element name="form:textarea">
- <ref name="form-textarea-attlist"/>
- <ref name="common-form-control-content"/>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
- <element name="form:formatted-text">
- <ref name="form-formatted-text-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
- <element name="form:number">
- <ref name="form-number-attlist"/>
- <ref name="common-numeric-control-attlist"/>
- <ref name="common-form-control-content"/>
- <ref name="common-linked-cell"/>
- <ref name="common-spin-button"/>
- <ref name="common-repeat"/>
- <ref name="common-delay-for-repeat"/>
- </element>
- <element name="form:date">
- <ref name="form-date-attlist"/>
- <ref name="common-numeric-control-attlist"/>
- <ref name="common-form-control-content"/>
- <ref name="common-linked-cell"/>
- <ref name="common-spin-button"/>
- <ref name="common-repeat"/>
- <ref name="common-delay-for-repeat"/>
- </element>
- <element name="form:time">
- <ref name="form-time-attlist"/>
- <ref name="common-numeric-control-attlist"/>
- <ref name="common-form-control-content"/>
- <ref name="common-linked-cell"/>
- <ref name="common-spin-button"/>
- <ref name="common-repeat"/>
- <ref name="common-delay-for-repeat"/>
- </element>
- <element name="form:combobox">
- <ref name="form-combobox-attlist"/>
- <ref name="common-form-control-content"/>
- <zeroOrMore>
- <ref name="form-item"/>
- </zeroOrMore>
- </element>
- <element name="form:listbox">
- <ref name="form-listbox-attlist"/>
- <ref name="common-form-control-content"/>
- <zeroOrMore>
- <ref name="form-option"/>
- </zeroOrMore>
- </element>
- <element name="form:checkbox">
- <ref name="form-checkbox-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
- </choice>
- </define>
- <define name="controls">
- <choice>
- <ref name="column-controls"/>
- <element name="form:password">
- <ref name="form-password-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
- <element name="form:file">
- <ref name="form-file-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
- <element name="form:fixed-text">
- <ref name="form-fixed-text-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
- <element name="form:button">
- <ref name="form-button-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
- <element name="form:image">
- <ref name="form-image-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
- <element name="form:radio">
- <ref name="form-radio-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
- <element name="form:frame">
- <ref name="form-frame-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
- <element name="form:image-frame">
- <ref name="form-image-frame-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
- <element name="form:hidden">
- <ref name="form-hidden-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
- <element name="form:grid">
- <ref name="form-grid-attlist"/>
- <ref name="common-form-control-content"/>
- <zeroOrMore>
- <ref name="form-column"/>
- </zeroOrMore>
- </element>
- <element name="form:value-range">
- <ref name="form-value-range-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
- <element name="form:generic-control">
- <ref name="form-generic-control-attlist"/>
- <ref name="common-form-control-content"/>
- </element>
- </choice>
- </define>
- <define name="form-text-attlist">
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
- <ref name="common-linked-cell"/>
- </define>
- <define name="form-control-attlist">
- <ref name="common-form-control-attlist"/>
- <ref name="common-control-id-attlist"/>
- <ref name="xforms-bind-attlist"/>
- </define>
- <define name="common-form-control-content">
- <optional>
- <ref name="form-properties"/>
- </optional>
- <optional>
- <ref name="office-event-listeners"/>
- </optional>
- </define>
- <define name="form-textarea-attlist">
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
- <ref name="common-linked-cell"/>
- </define>
- <define name="form-password-attlist">
- <interleave>
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-linked-cell"/>
- <optional>
- <attribute name="form:echo-char">
- <ref name="character"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="form-file-attlist">
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-linked-cell"/>
- </define>
- <define name="form-formatted-text-attlist">
- <interleave>
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
- <ref name="common-linked-cell"/>
- <ref name="common-spin-button"/>
- <ref name="common-repeat"/>
- <ref name="common-delay-for-repeat"/>
- <optional>
- <attribute name="form:max-value">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:min-value">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:validation">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-numeric-control-attlist">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
- </define>
- <define name="form-number-attlist">
- <interleave>
- <optional>
- <attribute name="form:value">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:current-value">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:min-value">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:max-value">
- <ref name="double"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="form-date-attlist">
- <interleave>
- <optional>
- <attribute name="form:value">
- <ref name="date"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:current-value">
- <ref name="date"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:min-value">
- <ref name="date"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:max-value">
- <ref name="date"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="form-time-attlist">
- <interleave>
- <optional>
- <attribute name="form:value">
- <ref name="time"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:current-value">
- <ref name="time"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:min-value">
- <ref name="time"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:max-value">
- <ref name="time"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="form-fixed-text-attlist">
- <interleave>
- <ref name="form-control-attlist"/>
- <ref name="for"/>
- <ref name="common-disabled-attlist"/>
- <ref name="label"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-title-attlist"/>
- <optional>
- <attribute name="form:multi-line">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="form-combobox-attlist">
- <interleave>
- <ref name="form-control-attlist"/>
- <ref name="common-current-value-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="dropdown"/>
- <ref name="common-maxlength-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="size"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-convert-empty-attlist"/>
- <ref name="common-data-field-attlist"/>
- <ref name="list-source"/>
- <ref name="list-source-type"/>
- <ref name="common-linked-cell"/>
- <ref name="common-source-cell-range"/>
- <optional>
- <attribute name="form:auto-complete">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="form-item">
- <element name="form:item">
- <ref name="form-item-attlist"/>
- <text/>
- </element>
- </define>
- <define name="form-item-attlist">
- <ref name="label"/>
- </define>
- <define name="form-listbox-attlist">
- <interleave>
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="dropdown"/>
- <ref name="common-printable-attlist"/>
- <ref name="size"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="bound-column"/>
- <ref name="common-data-field-attlist"/>
- <ref name="list-source"/>
- <ref name="list-source-type"/>
- <ref name="common-linked-cell"/>
- <ref name="list-linkage-type"/>
- <ref name="common-source-cell-range"/>
- <optional>
- <attribute name="form:multiple">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:xforms-list-source">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="list-linkage-type">
- <optional>
- <attribute name="form:list-linkage-type">
- <choice>
- <value>selection</value>
- <value>selection-indices</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="form-option">
- <element name="form:option">
- <ref name="form-option-attlist"/>
- <text/>
- </element>
- </define>
- <define name="form-option-attlist">
- <ref name="current-selected"/>
- <ref name="selected"/>
- <ref name="label"/>
- <ref name="common-value-attlist"/>
- </define>
- <define name="form-button-attlist">
- <interleave>
- <ref name="form-control-attlist"/>
- <ref name="button-type"/>
- <ref name="common-disabled-attlist"/>
- <ref name="label"/>
- <ref name="image-data"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="target-frame"/>
- <ref name="target-location"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-form-relative-image-position-attlist"/>
- <ref name="common-repeat"/>
- <ref name="common-delay-for-repeat"/>
- <optional>
- <attribute name="form:default-button">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:toggle">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:focus-on-click">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:xforms-submission">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="form-image-attlist">
- <ref name="form-control-attlist"/>
- <ref name="button-type"/>
- <ref name="common-disabled-attlist"/>
- <ref name="image-data"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="target-frame"/>
- <ref name="target-location"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- </define>
- <define name="form-checkbox-attlist">
- <interleave>
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="label"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-data-field-attlist"/>
- <ref name="common-form-visual-effect-attlist"/>
- <ref name="common-form-relative-image-position-attlist"/>
- <ref name="common-linked-cell"/>
- <optional>
- <attribute name="form:current-state">
- <ref name="states"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:is-tristate">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:state">
- <ref name="states"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="states">
- <choice>
- <value>unchecked</value>
- <value>checked</value>
- <value>unknown</value>
- </choice>
- </define>
- <define name="form-radio-attlist">
- <ref name="form-control-attlist"/>
- <ref name="current-selected"/>
- <ref name="common-disabled-attlist"/>
- <ref name="label"/>
- <ref name="common-printable-attlist"/>
- <ref name="selected"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-data-field-attlist"/>
- <ref name="common-form-visual-effect-attlist"/>
- <ref name="common-form-relative-image-position-attlist"/>
- <ref name="common-linked-cell"/>
- </define>
- <define name="form-frame-attlist">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="for"/>
- <ref name="label"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-title-attlist"/>
- </define>
- <define name="form-image-frame-attlist">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="image-data"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-readonly-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-data-field-attlist"/>
- </define>
- <define name="form-hidden-attlist">
- <ref name="form-control-attlist"/>
- <ref name="common-value-attlist"/>
- </define>
- <define name="form-grid-attlist">
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- </define>
- <define name="form-column">
- <element name="form:column">
- <ref name="form-column-attlist"/>
- <oneOrMore>
- <ref name="column-controls"/>
- </oneOrMore>
- </element>
- </define>
- <define name="form-column-attlist">
- <ref name="common-form-control-attlist"/>
- <ref name="label"/>
- <ref name="text-style-name"/>
- </define>
- <define name="text-style-name">
- <optional>
- <attribute name="form:text-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </define>
- <define name="form-value-range-attlist">
- <interleave>
- <ref name="form-control-attlist"/>
- <ref name="common-disabled-attlist"/>
- <ref name="common-printable-attlist"/>
- <ref name="common-tab-attlist"/>
- <ref name="common-title-attlist"/>
- <ref name="common-value-attlist"/>
- <ref name="common-linked-cell"/>
- <ref name="common-repeat"/>
- <ref name="common-delay-for-repeat"/>
- <optional>
- <attribute name="form:max-value">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:min-value">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:step-size">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:page-step-size">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:orientation">
- <choice>
- <value>horizontal</value>
- <value>vertical</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="form-generic-control-attlist">
- <ref name="form-control-attlist"/>
- </define>
- <define name="common-form-control-attlist">
- <interleave>
- <optional>
- <attribute name="form:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:control-implementation">
- <ref name="namespacedToken"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="xforms-bind-attlist">
- <optional>
- <attribute name="xforms:bind">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="types">
- <choice>
- <value>submit</value>
- <value>reset</value>
- <value>push</value>
- <value>url</value>
- </choice>
- </define>
- <define name="button-type">
- <optional>
- <attribute name="form:button-type">
- <ref name="types"/>
- </attribute>
- </optional>
- </define>
- <define name="common-control-id-attlist">
- <group>
- <ref name="xml-id"/>
- <optional>
- <attribute name="form:id">
- <ref name="NCName"/>
- </attribute>
- </optional>
- </group>
- </define>
- <define name="current-selected">
- <optional>
- <attribute name="form:current-selected">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="common-value-attlist">
- <optional>
- <attribute name="form:value">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-current-value-attlist">
- <optional>
- <attribute name="form:current-value">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-disabled-attlist">
- <optional>
- <attribute name="form:disabled">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="dropdown">
- <optional>
- <attribute name="form:dropdown">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="for">
- <optional>
- <attribute name="form:for">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="image-data">
- <optional>
- <attribute name="form:image-data">
- <ref name="anyIRI"/>
- </attribute>
- </optional>
- </define>
- <define name="label">
- <optional>
- <attribute name="form:label">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-maxlength-attlist">
- <optional>
- <attribute name="form:max-length">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </define>
- <define name="common-printable-attlist">
- <optional>
- <attribute name="form:printable">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="common-readonly-attlist">
- <optional>
- <attribute name="form:readonly">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="selected">
- <optional>
- <attribute name="form:selected">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="size">
- <optional>
- <attribute name="form:size">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </define>
- <define name="common-tab-attlist">
- <interleave>
- <optional>
- <attribute name="form:tab-index">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="form:tab-stop">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="target-frame">
- <optional>
- <attribute name="office:target-frame">
- <ref name="targetFrameName"/>
- </attribute>
- </optional>
- </define>
- <define name="target-location">
- <optional>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- </optional>
- </define>
- <define name="common-title-attlist">
- <optional>
- <attribute name="form:title">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-form-visual-effect-attlist">
- <optional>
- <attribute name="form:visual-effect">
- <choice>
- <value>flat</value>
- <value>3d</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-form-relative-image-position-attlist">
- <choice>
- <optional>
- <attribute name="form:image-position">
- <value>center</value>
- </attribute>
- </optional>
- <group>
- <attribute name="form:image-position">
- <choice>
- <value>start</value>
- <value>end</value>
- <value>top</value>
- <value>bottom</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="form:image-align">
- <choice>
- <value>start</value>
- <value>center</value>
- <value>end</value>
- </choice>
- </attribute>
- </optional>
- </group>
- </choice>
- </define>
- <define name="bound-column">
- <optional>
- <attribute name="form:bound-column">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-convert-empty-attlist">
- <optional>
- <attribute name="form:convert-empty-to-null">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="common-data-field-attlist">
- <optional>
- <attribute name="form:data-field">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="list-source">
- <optional>
- <attribute name="form:list-source">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="list-source-type">
- <optional>
- <attribute name="form:list-source-type">
- <choice>
- <value>table</value>
- <value>query</value>
- <value>sql</value>
- <value>sql-pass-through</value>
- <value>value-list</value>
- <value>table-fields</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-linked-cell">
- <optional>
- <attribute name="form:linked-cell">
- <choice>
- <ref name="cellAddress"/>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-source-cell-range">
- <optional>
- <attribute name="form:source-cell-range">
- <choice>
- <ref name="cellRangeAddress"/>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-spin-button">
- <optional>
- <attribute name="form:spin-button">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="common-repeat">
- <optional>
- <attribute name="form:repeat">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="common-delay-for-repeat">
- <optional>
- <attribute name="form:delay-for-repeat">
- <ref name="duration"/>
- </attribute>
- </optional>
- </define>
- <define name="form-properties">
- <element name="form:properties">
- <oneOrMore>
- <ref name="form-property"/>
- </oneOrMore>
- </element>
- </define>
- <define name="form-property">
- <choice>
- <element name="form:property">
- <ref name="form-property-name"/>
- <ref name="form-property-value-and-type-attlist"/>
- </element>
- <element name="form:list-property">
- <ref name="form-property-name"/>
- <ref name="form-property-type-and-value-list"/>
- </element>
- </choice>
- </define>
- <define name="form-property-name">
- <attribute name="form:property-name">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="form-property-value-and-type-attlist">
- <choice>
- <ref name="common-value-and-type-attlist"/>
- <attribute name="office:value-type">
- <value>void</value>
- </attribute>
- </choice>
- </define>
- <define name="form-property-type-and-value-list">
- <choice>
- <group>
- <attribute name="office:value-type">
- <value>float</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>percentage</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>currency</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:value">
- <ref name="double"/>
- </attribute>
- <optional>
- <attribute name="office:currency">
- <ref name="string"/>
- </attribute>
- </optional>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>date</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:date-value">
- <ref name="dateOrDateTime"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>time</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:time-value">
- <ref name="duration"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>boolean</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:boolean-value">
- <ref name="boolean"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <group>
- <attribute name="office:value-type">
- <value>string</value>
- </attribute>
- <zeroOrMore>
- <element name="form:list-value">
- <attribute name="office:string-value">
- <ref name="string"/>
- </attribute>
- </element>
- </zeroOrMore>
- </group>
- <attribute name="office:value-type">
- <value>void</value>
- </attribute>
- </choice>
- </define>
- <define name="office-annotation">
- <element name="office:annotation">
- <ref name="office-annotation-attlist"/>
- <ref name="draw-caption-attlist"/>
- <ref name="common-draw-position-attlist"/>
- <ref name="common-draw-size-attlist"/>
- <ref name="common-draw-shape-with-text-and-styles-attlist"/>
- <optional>
- <ref name="dc-creator"/>
- </optional>
- <optional>
- <ref name="dc-date"/>
- </optional>
- <optional>
- <ref name="meta-date-string"/>
- </optional>
- <zeroOrMore>
- <choice>
- <ref name="text-p"/>
- <ref name="text-list"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- <define name="office-annotation-end">
- <element name="office:annotation-end">
- <ref name="office-annotation-end-attlist"/>
- </element>
- </define>
- <define name="office-annotation-attlist">
- <interleave>
- <optional>
- <attribute name="office:display">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <ref name="common-office-annotation-name-attlist"/>
- </optional>
- </interleave>
- </define>
- <define name="office-annotation-end-attlist">
- <ref name="common-office-annotation-name-attlist"/>
- </define>
- <define name="common-office-annotation-name-attlist">
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="meta-date-string">
- <element name="meta:date-string">
- <ref name="string"/>
- </element>
- </define>
- <define name="common-num-format-prefix-suffix-attlist">
- <optional>
- <attribute name="style:num-prefix">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:num-suffix">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-num-format-attlist">
- <choice>
- <attribute name="style:num-format">
- <choice>
- <value>1</value>
- <value>i</value>
- <value>I</value>
- <ref name="string"/>
- <empty/>
- </choice>
- </attribute>
- <group>
- <attribute name="style:num-format">
- <choice>
- <value>a</value>
- <value>A</value>
- </choice>
- </attribute>
- <ref name="style-num-letter-sync-attlist"/>
- </group>
- <empty/>
- </choice>
- </define>
- <define name="style-num-letter-sync-attlist">
- <optional>
- <attribute name="style:num-letter-sync">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="office-change-info">
- <element name="office:change-info">
- <ref name="dc-creator"/>
- <ref name="dc-date"/>
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="office-event-listeners">
- <element name="office:event-listeners">
- <zeroOrMore>
- <choice>
- <ref name="script-event-listener"/>
- <ref name="presentation-event-listener"/>
- </choice>
- </zeroOrMore>
- </element>
- </define>
- <define name="script-event-listener">
- <element name="script:event-listener">
- <ref name="script-event-listener-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="script-event-listener-attlist">
- <interleave>
- <attribute name="script:event-name">
- <ref name="string"/>
- </attribute>
- <attribute name="script:language">
- <ref name="string"/>
- </attribute>
- <choice>
- <attribute name="script:macro-name">
- <ref name="string"/>
- </attribute>
- <group>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:actuate">
- <value>onRequest</value>
- </attribute>
- </optional>
- </group>
- </choice>
- </interleave>
- </define>
- <define name="math-math">
- <element name="math:math">
- <ref name="mathMarkup"/>
- </element>
- </define>
- <define name="mathMarkup">
- <dc:description>To avoid inclusion of the complete MathML schema, anything is allowed within a math:math top-level element</dc:description>
- <zeroOrMore>
- <choice>
- <attribute>
- <anyName/>
- </attribute>
- <text/>
- <element>
- <anyName/>
- <ref name="mathMarkup"/>
- </element>
- </choice>
- </zeroOrMore>
- </define>
- <define name="text-dde-connection-decl">
- <element name="text:dde-connection-decl">
- <ref name="text-dde-connection-decl-attlist"/>
- <ref name="common-dde-connection-decl-attlist"/>
- </element>
- </define>
- <define name="text-dde-connection-decl-attlist">
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="common-dde-connection-decl-attlist">
- <interleave>
- <attribute name="office:dde-application">
- <ref name="string"/>
- </attribute>
- <attribute name="office:dde-topic">
- <ref name="string"/>
- </attribute>
- <attribute name="office:dde-item">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="office:automatic-update">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-dde-link">
- <element name="table:dde-link">
- <ref name="office-dde-source"/>
- <ref name="table-table"/>
- </element>
- </define>
- <define name="office-dde-source">
- <element name="office:dde-source">
- <ref name="office-dde-source-attlist"/>
- <ref name="common-dde-connection-decl-attlist"/>
- </element>
- </define>
- <define name="office-dde-source-attlist">
- <interleave>
- <optional>
- <attribute name="office:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="office:conversion-mode">
- <choice>
- <value>into-default-style-data-style</value>
- <value>into-english-number</value>
- <value>keep-text</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="animation-element">
- <choice>
- <element name="anim:animate">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="common-anim-spline-mode-attlist"/>
- <ref name="common-spline-anim-value-attlist"/>
- <ref name="common-timing-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- </element>
- <element name="anim:set">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-set-values-attlist"/>
- <ref name="common-timing-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- </element>
- <element name="anim:animateMotion">
- <ref name="anim-animate-motion-attlist"/>
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="common-timing-attlist"/>
- <ref name="common-spline-anim-value-attlist"/>
- </element>
- <element name="anim:animateColor">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="common-anim-spline-mode-attlist"/>
- <ref name="common-spline-anim-value-attlist"/>
- <ref name="anim-animate-color-attlist"/>
- <ref name="common-timing-attlist"/>
- </element>
- <element name="anim:animateTransform">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-named-target-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="anim-animate-transform-attlist"/>
- <ref name="common-timing-attlist"/>
- </element>
- <element name="anim:transitionFilter">
- <ref name="common-anim-target-attlist"/>
- <ref name="common-anim-add-accum-attlist"/>
- <ref name="common-anim-values-attlist"/>
- <ref name="common-anim-spline-mode-attlist"/>
- <ref name="anim-transition-filter-attlist"/>
- <ref name="common-timing-attlist"/>
- </element>
- <element name="anim:par">
- <ref name="common-anim-attlist"/>
- <ref name="common-timing-attlist"/>
- <ref name="common-endsync-timing-attlist"/>
- <zeroOrMore>
- <ref name="animation-element"/>
- </zeroOrMore>
- </element>
- <element name="anim:seq">
- <ref name="common-anim-attlist"/>
- <ref name="common-endsync-timing-attlist"/>
- <ref name="common-timing-attlist"/>
- <zeroOrMore>
- <ref name="animation-element"/>
- </zeroOrMore>
- </element>
- <element name="anim:iterate">
- <ref name="common-anim-attlist"/>
- <ref name="anim-iterate-attlist"/>
- <ref name="common-timing-attlist"/>
- <ref name="common-endsync-timing-attlist"/>
- <zeroOrMore>
- <ref name="animation-element"/>
- </zeroOrMore>
- </element>
- <element name="anim:audio">
- <ref name="common-anim-attlist"/>
- <ref name="anim-audio-attlist"/>
- <ref name="common-basic-timing-attlist"/>
- </element>
- <element name="anim:command">
- <ref name="common-anim-attlist"/>
- <ref name="anim-command-attlist"/>
- <ref name="common-begin-end-timing-attlist"/>
- <ref name="common-anim-target-attlist"/>
- <zeroOrMore>
- <element name="anim:param">
- <attribute name="anim:name">
- <ref name="string"/>
- </attribute>
- <attribute name="anim:value">
- <ref name="string"/>
- </attribute>
- </element>
- </zeroOrMore>
- </element>
- </choice>
- </define>
- <define name="anim-animate-motion-attlist">
- <interleave>
- <optional>
- <attribute name="svg:path">
- <ref name="pathData"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:origin">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:calcMode">
- <choice>
- <value>discrete</value>
- <value>linear</value>
- <value>paced</value>
- <value>spline</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="anim-animate-color-attlist">
- <interleave>
- <optional>
- <attribute name="anim:color-interpolation">
- <choice>
- <value>rgb</value>
- <value>hsl</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="anim:color-interpolation-direction">
- <choice>
- <value>clockwise</value>
- <value>counter-clockwise</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="anim-animate-transform-attlist">
- <attribute name="svg:type">
- <choice>
- <value>translate</value>
- <value>scale</value>
- <value>rotate</value>
- <value>skewX</value>
- <value>skewY</value>
- </choice>
- </attribute>
- </define>
- <define name="anim-transition-filter-attlist">
- <interleave>
- <attribute name="smil:type">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="smil:subtype">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:direction">
- <choice>
- <value>forward</value>
- <value>reverse</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:fadeColor">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:mode">
- <choice>
- <value>in</value>
- <value>out</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-anim-target-attlist">
- <interleave>
- <optional>
- <attribute name="smil:targetElement">
- <ref name="IDREF"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="anim:sub-item">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-anim-named-target-attlist">
- <attribute name="smil:attributeName">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="common-anim-values-attlist">
- <interleave>
- <optional>
- <attribute name="smil:values">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="anim:formula">
- <ref name="string"/>
- </attribute>
- </optional>
- <ref name="common-anim-set-values-attlist"/>
- <optional>
- <attribute name="smil:from">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:by">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-anim-spline-mode-attlist">
- <optional>
- <attribute name="smil:calcMode">
- <choice>
- <value>discrete</value>
- <value>linear</value>
- <value>paced</value>
- <value>spline</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-spline-anim-value-attlist">
- <interleave>
- <optional>
- <attribute name="smil:keyTimes">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:keySplines">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-anim-add-accum-attlist">
- <interleave>
- <optional>
- <attribute name="smil:accumulate">
- <choice>
- <value>none</value>
- <value>sum</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:additive">
- <choice>
- <value>replace</value>
- <value>sum</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-anim-set-values-attlist">
- <optional>
- <attribute name="smil:to">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-begin-end-timing-attlist">
- <interleave>
- <optional>
- <attribute name="smil:begin">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:end">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-dur-timing-attlist">
- <optional>
- <attribute name="smil:dur">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-endsync-timing-attlist">
- <optional>
- <attribute name="smil:endsync">
- <choice>
- <value>first</value>
- <value>last</value>
- <value>all</value>
- <value>media</value>
- <ref name="IDREF"/>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-repeat-timing-attlist">
- <optional>
- <attribute name="smil:repeatDur">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:repeatCount">
- <choice>
- <ref name="nonNegativeDecimal"/>
- <value>indefinite</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="nonNegativeDecimal">
- <data type="decimal">
- <param name="minInclusive">0.0</param>
- </data>
- </define>
- <define name="common-fill-timing-attlist">
- <optional>
- <attribute name="smil:fill">
- <choice>
- <value>remove</value>
- <value>freeze</value>
- <value>hold</value>
- <value>auto</value>
- <value>default</value>
- <value>transition</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-fill-default-attlist">
- <optional>
- <attribute name="smil:fillDefault">
- <choice>
- <value>remove</value>
- <value>freeze</value>
- <value>hold</value>
- <value>transition</value>
- <value>auto</value>
- <value>inherit</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-restart-timing-attlist">
- <optional>
- <attribute name="smil:restart">
- <choice>
- <value>never</value>
- <value>always</value>
- <value>whenNotActive</value>
- <value>default</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-restart-default-attlist">
- <optional>
- <attribute name="smil:restartDefault">
- <choice>
- <value>never</value>
- <value>always</value>
- <value>whenNotActive</value>
- <value>inherit</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-time-manip-attlist">
- <interleave>
- <optional>
- <attribute name="smil:accelerate">
- <ref name="zeroToOneDecimal"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:decelerate">
- <ref name="zeroToOneDecimal"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:autoReverse">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="zeroToOneDecimal">
- <data type="decimal">
- <param name="minInclusive">0</param>
- <param name="maxInclusive">1</param>
- </data>
- </define>
- <define name="common-basic-timing-attlist">
- <ref name="common-begin-end-timing-attlist"/>
- <ref name="common-dur-timing-attlist"/>
- <ref name="common-repeat-timing-attlist"/>
- <ref name="common-restart-timing-attlist"/>
- <ref name="common-restart-default-attlist"/>
- <ref name="common-fill-timing-attlist"/>
- <ref name="common-fill-default-attlist"/>
- </define>
- <define name="common-timing-attlist">
- <ref name="common-basic-timing-attlist"/>
- <ref name="common-time-manip-attlist"/>
- </define>
- <define name="anim-iterate-attlist">
- <interleave>
- <ref name="common-anim-target-attlist"/>
- <optional>
- <attribute name="anim:iterate-type">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="anim:iterate-interval">
- <ref name="duration"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="anim-audio-attlist">
- <interleave>
- <optional>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="anim:audio-level">
- <ref name="double"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="anim-command-attlist">
- <attribute name="anim:command">
- <ref name="string"/>
- </attribute>
- </define>
- <define name="style-style">
- <element name="style:style">
- <ref name="style-style-attlist"/>
- <ref name="style-style-content"/>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="common-in-content-meta-attlist">
- <attribute name="xhtml:about">
- <ref name="URIorSafeCURIE"/>
- </attribute>
- <attribute name="xhtml:property">
- <ref name="CURIEs"/>
- </attribute>
- <ref name="common-meta-literal-attlist"/>
- </define>
- <define name="common-meta-literal-attlist">
- <optional>
- <attribute name="xhtml:datatype">
- <ref name="CURIE"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="xhtml:content">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="xml-id">
- <attribute name="xml:id">
- <ref name="ID"/>
- </attribute>
- </define>
- <define name="style-style-attlist">
- <interleave>
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:parent-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:next-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:list-level">
- <choice>
- <ref name="positiveInteger"/>
- <empty/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:list-style-name">
- <choice>
- <ref name="styleName"/>
- <empty/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:master-page-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:auto-update">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:data-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:percentage-data-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:class">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:default-outline-level">
- <choice>
- <ref name="positiveInteger"/>
- <empty/>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-map">
- <element name="style:map">
- <ref name="style-map-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="style-map-attlist">
- <interleave>
- <attribute name="style:condition">
- <ref name="string"/>
- </attribute>
- <attribute name="style:apply-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- <optional>
- <attribute name="style:base-cell-address">
- <ref name="cellAddress"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-default-style">
- <element name="style:default-style">
- <ref name="style-style-content"/>
- </element>
- </define>
- <define name="style-page-layout">
- <element name="style:page-layout">
- <ref name="style-page-layout-attlist"/>
- <ref name="style-page-layout-content"/>
- </element>
- </define>
- <define name="style-page-layout-content">
- <optional>
- <ref name="style-page-layout-properties"/>
- </optional>
- <optional>
- <ref name="style-header-style"/>
- </optional>
- <optional>
- <ref name="style-footer-style"/>
- </optional>
- </define>
- <define name="style-page-layout-attlist">
- <interleave>
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
- <optional>
- <attribute name="style:page-usage">
- <choice>
- <value>all</value>
- <value>left</value>
- <value>right</value>
- <value>mirrored</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-header-style">
- <element name="style:header-style">
- <optional>
- <ref name="style-header-footer-properties"/>
- </optional>
- </element>
- </define>
- <define name="style-footer-style">
- <element name="style:footer-style">
- <optional>
- <ref name="style-header-footer-properties"/>
- </optional>
- </element>
- </define>
- <define name="style-default-page-layout">
- <element name="style:default-page-layout">
- <ref name="style-page-layout-content"/>
- </element>
- </define>
- <define name="style-master-page">
- <element name="style:master-page">
- <ref name="style-master-page-attlist"/>
- <optional>
- <ref name="style-header"/>
- <optional>
- <ref name="style-header-left"/>
- </optional>
- </optional>
- <optional>
- <ref name="style-footer"/>
- <optional>
- <ref name="style-footer-left"/>
- </optional>
- </optional>
- <optional>
- <ref name="draw-layer-set"/>
- </optional>
- <optional>
- <ref name="office-forms"/>
- </optional>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- <optional>
- <ref name="animation-element"/>
- </optional>
- <optional>
- <ref name="presentation-notes"/>
- </optional>
- </element>
- </define>
- <define name="style-master-page-attlist">
- <interleave>
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <attribute name="style:page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:next-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-header">
- <element name="style:header">
- <ref name="common-style-header-footer-attlist"/>
- <ref name="header-footer-content"/>
- </element>
- </define>
- <define name="style-footer">
- <element name="style:footer">
- <ref name="common-style-header-footer-attlist"/>
- <ref name="header-footer-content"/>
- </element>
- </define>
- <define name="style-header-left">
- <element name="style:header-left">
- <ref name="common-style-header-footer-attlist"/>
- <ref name="header-footer-content"/>
- </element>
- </define>
- <define name="style-footer-left">
- <element name="style:footer-left">
- <ref name="common-style-header-footer-attlist"/>
- <ref name="header-footer-content"/>
- </element>
- </define>
- <define name="header-footer-content">
- <choice>
- <group>
- <ref name="text-tracked-changes"/>
- <ref name="text-decls"/>
- <zeroOrMore>
- <choice>
- <ref name="text-h"/>
- <ref name="text-p"/>
- <ref name="text-list"/>
- <ref name="table-table"/>
- <ref name="text-section"/>
- <ref name="text-table-of-content"/>
- <ref name="text-illustration-index"/>
- <ref name="text-table-index"/>
- <ref name="text-object-index"/>
- <ref name="text-user-index"/>
- <ref name="text-alphabetical-index"/>
- <ref name="text-bibliography"/>
- <ref name="text-index-title"/>
- <ref name="change-marks"/>
- </choice>
- </zeroOrMore>
- </group>
- <group>
- <optional>
- <ref name="style-region-left"/>
- </optional>
- <optional>
- <ref name="style-region-center"/>
- </optional>
- <optional>
- <ref name="style-region-right"/>
- </optional>
- </group>
- </choice>
- </define>
- <define name="common-style-header-footer-attlist">
- <optional>
- <attribute name="style:display">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="style-region-left">
- <element name="style:region-left">
- <ref name="region-content"/>
- </element>
- </define>
- <define name="style-region-center">
- <element name="style:region-center">
- <ref name="region-content"/>
- </element>
- </define>
- <define name="style-region-right">
- <element name="style:region-right">
- <ref name="region-content"/>
- </element>
- </define>
- <define name="region-content">
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </define>
- <define name="presentation-notes">
- <element name="presentation:notes">
- <ref name="common-presentation-header-footer-attlist"/>
- <ref name="presentation-notes-attlist"/>
- <ref name="office-forms"/>
- <zeroOrMore>
- <ref name="shape"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="presentation-notes-attlist">
- <interleave>
- <optional>
- <attribute name="style:page-layout-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="table-table-template">
- <element name="table:table-template">
- <ref name="table-table-template-attlist"/>
- <optional>
- <ref name="table-first-row"/>
- </optional>
- <optional>
- <ref name="table-last-row"/>
- </optional>
- <optional>
- <ref name="table-first-column"/>
- </optional>
- <optional>
- <ref name="table-last-column"/>
- </optional>
- <ref name="table-body"/>
- <optional>
- <ref name="table-even-rows"/>
- </optional>
- <optional>
- <ref name="table-odd-rows"/>
- </optional>
- <optional>
- <ref name="table-even-columns"/>
- </optional>
- <optional>
- <ref name="table-odd-columns"/>
- </optional>
- <optional>
- <ref name="table-background"/>
- </optional>
- </element>
- </define>
- <define name="table-table-template-attlist">
- <interleave>
- <attribute name="table:name">
- <ref name="string"/>
- </attribute>
- <attribute name="table:first-row-start-column">
- <ref name="rowOrCol"/>
- </attribute>
- <attribute name="table:first-row-end-column">
- <ref name="rowOrCol"/>
- </attribute>
- <attribute name="table:last-row-start-column">
- <ref name="rowOrCol"/>
- </attribute>
- <attribute name="table:last-row-end-column">
- <ref name="rowOrCol"/>
- </attribute>
- </interleave>
- </define>
- <define name="rowOrCol">
- <choice>
- <value>row</value>
- <value>column</value>
- </choice>
- </define>
- <define name="table-first-row">
- <element name="table:first-row">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-last-row">
- <element name="table:last-row">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-first-column">
- <element name="table:first-column">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-last-column">
- <element name="table:last-column">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-body">
- <element name="table:body">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-even-rows">
- <element name="table:even-rows">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-odd-rows">
- <element name="table:odd-rows">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-even-columns">
- <element name="table:even-columns">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-odd-columns">
- <element name="table:odd-columns">
- <ref name="common-table-template-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="common-table-template-attlist">
- <attribute name="table:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- <optional>
- <attribute name="table:paragraph-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </define>
- <define name="table-background">
- <element name="table:background">
- <ref name="table-background-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="table-background-attlist">
- <attribute name="table:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </define>
- <define name="style-font-face">
- <element name="style:font-face">
- <ref name="style-font-face-attlist"/>
- <optional>
- <ref name="svg-font-face-src"/>
- </optional>
- <optional>
- <ref name="svg-definition-src"/>
- </optional>
- </element>
- </define>
- <define name="style-font-face-attlist">
- <interleave>
- <optional>
- <attribute name="svg:font-family">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-style">
- <ref name="fontStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-variant">
- <ref name="fontVariant"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-weight">
- <ref name="fontWeight"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-stretch">
- <choice>
- <value>normal</value>
- <value>ultra-condensed</value>
- <value>extra-condensed</value>
- <value>condensed</value>
- <value>semi-condensed</value>
- <value>semi-expanded</value>
- <value>expanded</value>
- <value>extra-expanded</value>
- <value>ultra-expanded</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:font-size">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:unicode-range">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:units-per-em">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:panose-1">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:stemv">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:stemh">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:slope">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:cap-height">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:x-height">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:accent-height">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:ascent">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:descent">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:widths">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:bbox">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:ideographic">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:alphabetic">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:mathematical">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:hanging">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:v-ideographic">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:v-alphabetic">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:v-mathematical">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:v-hanging">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:underline-position">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:underline-thickness">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:strikethrough-position">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:strikethrough-thickness">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:overline-position">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:overline-thickness">
- <ref name="integer"/>
- </attribute>
- </optional>
- <attribute name="style:name">
- <ref name="string"/>
- </attribute>
- <optional>
- <attribute name="style:font-adornments">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-generic">
- <ref name="fontFamilyGeneric"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-pitch">
- <ref name="fontPitch"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-charset">
- <ref name="textEncoding"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="svg-font-face-src">
- <element name="svg:font-face-src">
- <oneOrMore>
- <choice>
- <ref name="svg-font-face-uri"/>
- <ref name="svg-font-face-name"/>
- </choice>
- </oneOrMore>
- </element>
- </define>
- <define name="svg-font-face-uri">
- <element name="svg:font-face-uri">
- <ref name="common-svg-font-face-xlink-attlist"/>
- <zeroOrMore>
- <ref name="svg-font-face-format"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="svg-font-face-format">
- <element name="svg:font-face-format">
- <optional>
- <attribute name="svg:string">
- <ref name="string"/>
- </attribute>
- </optional>
- <empty/>
- </element>
- </define>
- <define name="svg-font-face-name">
- <element name="svg:font-face-name">
- <optional>
- <attribute name="svg:name">
- <ref name="string"/>
- </attribute>
- </optional>
- <empty/>
- </element>
- </define>
- <define name="svg-definition-src">
- <element name="svg:definition-src">
- <ref name="common-svg-font-face-xlink-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="common-svg-font-face-xlink-attlist">
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:actuate">
- <value>onRequest</value>
- </attribute>
- </optional>
- </define>
- <define name="number-number-style">
- <element name="number:number-style">
- <ref name="common-data-style-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <optional>
- <ref name="any-number"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </optional>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="any-number">
- <choice>
- <ref name="number-number"/>
- <ref name="number-scientific-number"/>
- <ref name="number-fraction"/>
- </choice>
- </define>
- <define name="number-number">
- <element name="number:number">
- <ref name="number-number-attlist"/>
- <ref name="common-decimal-places-attlist"/>
- <ref name="common-number-attlist"/>
- <zeroOrMore>
- <ref name="number-embedded-text"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="number-number-attlist">
- <interleave>
- <optional>
- <attribute name="number:decimal-replacement">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:display-factor">
- <ref name="double"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="number-embedded-text">
- <element name="number:embedded-text">
- <ref name="number-embedded-text-attlist"/>
- <text/>
- </element>
- </define>
- <define name="number-embedded-text-attlist">
- <attribute name="number:position">
- <ref name="integer"/>
- </attribute>
- </define>
- <define name="number-scientific-number">
- <element name="number:scientific-number">
- <ref name="number-scientific-number-attlist"/>
- <ref name="common-decimal-places-attlist"/>
- <ref name="common-number-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="number-scientific-number-attlist">
- <optional>
- <attribute name="number:min-exponent-digits">
- <ref name="integer"/>
- </attribute>
- </optional>
- </define>
- <define name="number-fraction">
- <element name="number:fraction">
- <ref name="number-fraction-attlist"/>
- <ref name="common-number-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="number-fraction-attlist">
- <interleave>
- <optional>
- <attribute name="number:min-numerator-digits">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:min-denominator-digits">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:denominator-value">
- <ref name="integer"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="number-currency-style">
- <element name="number:currency-style">
- <ref name="common-data-style-attlist"/>
- <ref name="common-auto-reorder-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <optional>
- <choice>
- <group>
- <ref name="number-and-text"/>
- <optional>
- <ref name="currency-symbol-and-text"/>
- </optional>
- </group>
- <group>
- <ref name="currency-symbol-and-text"/>
- <optional>
- <ref name="number-and-text"/>
- </optional>
- </group>
- </choice>
- </optional>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="currency-symbol-and-text">
- <ref name="number-currency-symbol"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </define>
- <define name="number-and-text">
- <ref name="number-number"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </define>
- <define name="number-currency-symbol">
- <element name="number:currency-symbol">
- <ref name="number-currency-symbol-attlist"/>
- <text/>
- </element>
- </define>
- <define name="number-currency-symbol-attlist">
- <optional>
- <attribute name="number:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:script">
- <ref name="scriptCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:rfc-language-tag">
- <ref name="language"/>
- </attribute>
- </optional>
- </define>
- <define name="number-percentage-style">
- <element name="number:percentage-style">
- <ref name="common-data-style-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <optional>
- <ref name="number-and-text"/>
- </optional>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="number-date-style">
- <element name="number:date-style">
- <ref name="common-data-style-attlist"/>
- <ref name="common-auto-reorder-attlist"/>
- <ref name="common-format-source-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <oneOrMore>
- <ref name="any-date"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </oneOrMore>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="any-date">
- <choice>
- <ref name="number-day"/>
- <ref name="number-month"/>
- <ref name="number-year"/>
- <ref name="number-era"/>
- <ref name="number-day-of-week"/>
- <ref name="number-week-of-year"/>
- <ref name="number-quarter"/>
- <ref name="number-hours"/>
- <ref name="number-am-pm"/>
- <ref name="number-minutes"/>
- <ref name="number-seconds"/>
- </choice>
- </define>
- <define name="number-day">
- <element name="number:day">
- <ref name="number-day-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="number-day-attlist">
- <optional>
- <attribute name="number:style">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="number-month">
- <element name="number:month">
- <ref name="number-month-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="number-month-attlist">
- <interleave>
- <optional>
- <attribute name="number:textual">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:possessive-form">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:style">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="number-year">
- <element name="number:year">
- <ref name="number-year-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="number-year-attlist">
- <optional>
- <attribute name="number:style">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="number-era">
- <element name="number:era">
- <ref name="number-era-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="number-era-attlist">
- <optional>
- <attribute name="number:style">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="number-day-of-week">
- <element name="number:day-of-week">
- <ref name="number-day-of-week-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="number-day-of-week-attlist">
- <optional>
- <attribute name="number:style">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="number-week-of-year">
- <element name="number:week-of-year">
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="number-quarter">
- <element name="number:quarter">
- <ref name="number-quarter-attlist"/>
- <ref name="common-calendar-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="number-quarter-attlist">
- <optional>
- <attribute name="number:style">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="number-time-style">
- <element name="number:time-style">
- <ref name="number-time-style-attlist"/>
- <ref name="common-data-style-attlist"/>
- <ref name="common-format-source-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <oneOrMore>
- <ref name="any-time"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </oneOrMore>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="any-time">
- <choice>
- <ref name="number-hours"/>
- <ref name="number-am-pm"/>
- <ref name="number-minutes"/>
- <ref name="number-seconds"/>
- </choice>
- </define>
- <define name="number-time-style-attlist">
- <optional>
- <attribute name="number:truncate-on-overflow">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="number-hours">
- <element name="number:hours">
- <ref name="number-hours-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="number-hours-attlist">
- <optional>
- <attribute name="number:style">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="number-minutes">
- <element name="number:minutes">
- <ref name="number-minutes-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="number-minutes-attlist">
- <optional>
- <attribute name="number:style">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="number-seconds">
- <element name="number:seconds">
- <ref name="number-seconds-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="number-seconds-attlist">
- <interleave>
- <optional>
- <attribute name="number:style">
- <choice>
- <value>short</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:decimal-places">
- <ref name="integer"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="number-am-pm">
- <element name="number:am-pm">
- <empty/>
- </element>
- </define>
- <define name="number-boolean-style">
- <element name="number:boolean-style">
- <ref name="common-data-style-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <optional>
- <ref name="number-boolean"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </optional>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="number-boolean">
- <element name="number:boolean">
- <empty/>
- </element>
- </define>
- <define name="number-text-style">
- <element name="number:text-style">
- <ref name="common-data-style-attlist"/>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- <optional>
- <ref name="number-text"/>
- </optional>
- <zeroOrMore>
- <ref name="number-text-content"/>
- <optional>
- <ref name="number-text"/>
- </optional>
- </zeroOrMore>
- <zeroOrMore>
- <ref name="style-map"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="number-text">
- <element name="number:text">
- <text/>
- </element>
- </define>
- <define name="number-text-content">
- <element name="number:text-content">
- <empty/>
- </element>
- </define>
- <define name="common-data-style-attlist">
- <interleave>
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:script">
- <ref name="scriptCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:rfc-language-tag">
- <ref name="language"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:title">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:volatile">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:transliteration-format">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:transliteration-language">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:transliteration-country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:transliteration-style">
- <choice>
- <value>short</value>
- <value>medium</value>
- <value>long</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-auto-reorder-attlist">
- <optional>
- <attribute name="number:automatic-order">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="common-format-source-attlist">
- <optional>
- <attribute name="number:format-source">
- <choice>
- <value>fixed</value>
- <value>language</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-decimal-places-attlist">
- <optional>
- <attribute name="number:decimal-places">
- <ref name="integer"/>
- </attribute>
- </optional>
- </define>
- <define name="common-number-attlist">
- <interleave>
- <optional>
- <attribute name="number:min-integer-digits">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="number:grouping">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-calendar-attlist">
- <optional>
- <attribute name="number:calendar">
- <choice>
- <value>gregorian</value>
- <value>gengou</value>
- <value>ROC</value>
- <value>hanja_yoil</value>
- <value>hanja</value>
- <value>hijri</value>
- <value>jewish</value>
- <value>buddhist</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="style-style-content">
- <choice>
- <group>
- <attribute name="style:family">
- <value>text</value>
- </attribute>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
- <group>
- <attribute name="style:family">
- <value>paragraph</value>
- </attribute>
- <optional>
- <ref name="style-paragraph-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
- <group>
- <attribute name="style:family">
- <value>section</value>
- </attribute>
- <optional>
- <ref name="style-section-properties"/>
- </optional>
- </group>
- <group>
- <attribute name="style:family">
- <value>ruby</value>
- </attribute>
- <optional>
- <ref name="style-ruby-properties"/>
- </optional>
- </group>
- <group>
- <attribute name="style:family">
- <value>table</value>
- </attribute>
- <optional>
- <ref name="style-table-properties"/>
- </optional>
- </group>
- <group>
- <attribute name="style:family">
- <value>table-column</value>
- </attribute>
- <optional>
- <ref name="style-table-column-properties"/>
- </optional>
- </group>
- <group>
- <attribute name="style:family">
- <value>table-row</value>
- </attribute>
- <optional>
- <ref name="style-table-row-properties"/>
- </optional>
- </group>
- <group>
- <attribute name="style:family">
- <value>table-cell</value>
- </attribute>
- <optional>
- <ref name="style-table-cell-properties"/>
- </optional>
- <optional>
- <ref name="style-paragraph-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
- <group>
- <attribute name="style:family">
- <choice>
- <value>graphic</value>
- <value>presentation</value>
- </choice>
- </attribute>
- <optional>
- <ref name="style-graphic-properties"/>
- </optional>
- <optional>
- <ref name="style-paragraph-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
- <group>
- <attribute name="style:family">
- <value>drawing-page</value>
- </attribute>
- <optional>
- <ref name="style-drawing-page-properties"/>
- </optional>
- </group>
- <group>
- <attribute name="style:family">
- <value>chart</value>
- </attribute>
- <optional>
- <ref name="style-chart-properties"/>
- </optional>
- <optional>
- <ref name="style-graphic-properties"/>
- </optional>
- <optional>
- <ref name="style-paragraph-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </group>
- </choice>
- </define>
- <define name="text-linenumbering-configuration">
- <element name="text:linenumbering-configuration">
- <ref name="text-linenumbering-configuration-attlist"/>
- <optional>
- <ref name="text-linenumbering-separator"/>
- </optional>
- </element>
- </define>
- <define name="text-linenumbering-configuration-attlist">
- <interleave>
- <optional>
- <attribute name="text:number-lines">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <ref name="common-num-format-attlist"/>
- </optional>
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:increment">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:number-position">
- <choice>
- <value>left</value>
- <value>right</value>
- <value>inner</value>
- <value>outer</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:offset">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:count-empty-lines">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:count-in-text-boxes">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:restart-on-page">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-linenumbering-separator">
- <element name="text:linenumbering-separator">
- <optional>
- <attribute name="text:increment">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <text/>
- </element>
- </define>
- <define name="text-notes-configuration">
- <element name="text:notes-configuration">
- <ref name="text-notes-configuration-content"/>
- </element>
- </define>
- <define name="text-notes-configuration-content">
- <interleave>
- <ref name="text-note-class"/>
- <optional>
- <attribute name="text:citation-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:citation-body-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:default-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:master-page-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:start-value">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <ref name="common-num-format-prefix-suffix-attlist"/>
- <optional>
- <ref name="common-num-format-attlist"/>
- </optional>
- <optional>
- <attribute name="text:start-numbering-at">
- <choice>
- <value>document</value>
- <value>chapter</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:footnotes-position">
- <choice>
- <value>text</value>
- <value>page</value>
- <value>section</value>
- <value>document</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <element name="text:note-continuation-notice-forward">
- <text/>
- </element>
- </optional>
- <optional>
- <element name="text:note-continuation-notice-backward">
- <text/>
- </element>
- </optional>
- </interleave>
- </define>
- <define name="text-bibliography-configuration">
- <element name="text:bibliography-configuration">
- <ref name="text-bibliography-configuration-attlist"/>
- <zeroOrMore>
- <ref name="text-sort-key"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-bibliography-configuration-attlist">
- <interleave>
- <optional>
- <attribute name="text:prefix">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:suffix">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:numbered-entries">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:sort-by-position">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:script">
- <ref name="scriptCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rfc-language-tag">
- <ref name="language"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:sort-algorithm">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-sort-key">
- <element name="text:sort-key">
- <ref name="text-sort-key-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="text-sort-key-attlist">
- <attribute name="text:key">
- <choice>
- <value>address</value>
- <value>annote</value>
- <value>author</value>
- <value>bibliography-type</value>
- <value>booktitle</value>
- <value>chapter</value>
- <value>custom1</value>
- <value>custom2</value>
- <value>custom3</value>
- <value>custom4</value>
- <value>custom5</value>
- <value>edition</value>
- <value>editor</value>
- <value>howpublished</value>
- <value>identifier</value>
- <value>institution</value>
- <value>isbn</value>
- <value>issn</value>
- <value>journal</value>
- <value>month</value>
- <value>note</value>
- <value>number</value>
- <value>organizations</value>
- <value>pages</value>
- <value>publisher</value>
- <value>report-type</value>
- <value>school</value>
- <value>series</value>
- <value>title</value>
- <value>url</value>
- <value>volume</value>
- <value>year</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="text:sort-ascending">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="text-list-style">
- <element name="text:list-style">
- <ref name="text-list-style-attr"/>
- <zeroOrMore>
- <ref name="text-list-style-content"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="text-list-style-attr">
- <interleave>
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:consecutive-numbering">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-list-style-content">
- <choice>
- <element name="text:list-level-style-number">
- <ref name="text-list-level-style-attr"/>
- <ref name="text-list-level-style-number-attr"/>
- <optional>
- <ref name="style-list-level-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </element>
- <element name="text:list-level-style-bullet">
- <ref name="text-list-level-style-attr"/>
- <ref name="text-list-level-style-bullet-attr"/>
- <optional>
- <ref name="style-list-level-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </element>
- <element name="text:list-level-style-image">
- <ref name="text-list-level-style-attr"/>
- <ref name="text-list-level-style-image-attr"/>
- <optional>
- <ref name="style-list-level-properties"/>
- </optional>
- </element>
- </choice>
- </define>
- <define name="text-list-level-style-number-attr">
- <interleave>
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <ref name="common-num-format-attlist"/>
- <ref name="common-num-format-prefix-suffix-attlist"/>
- <optional>
- <attribute name="text:display-levels">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:start-value">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-list-level-style-bullet-attr">
- <interleave>
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <attribute name="text:bullet-char">
- <ref name="character"/>
- </attribute>
- <ref name="common-num-format-prefix-suffix-attlist"/>
- <optional>
- <attribute name="text:bullet-relative-size">
- <ref name="percent"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="text-list-level-style-image-attr">
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-binary-data"/>
- </choice>
- </define>
- <define name="text-list-level-style-attr">
- <attribute name="text:level">
- <ref name="positiveInteger"/>
- </attribute>
- </define>
- <define name="text-outline-style">
- <element name="text:outline-style">
- <ref name="text-outline-style-attr"/>
- <oneOrMore>
- <ref name="text-outline-level-style"/>
- </oneOrMore>
- </element>
- </define>
- <define name="text-outline-style-attr">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
- </define>
- <define name="text-outline-level-style">
- <element name="text:outline-level-style">
- <ref name="text-outline-level-style-attlist"/>
- <optional>
- <ref name="style-list-level-properties"/>
- </optional>
- <optional>
- <ref name="style-text-properties"/>
- </optional>
- </element>
- </define>
- <define name="text-outline-level-style-attlist">
- <interleave>
- <attribute name="text:level">
- <ref name="positiveInteger"/>
- </attribute>
- <optional>
- <attribute name="text:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <ref name="common-num-format-attlist"/>
- <ref name="common-num-format-prefix-suffix-attlist"/>
- <optional>
- <attribute name="text:display-levels">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:start-value">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-graphic-properties">
- <element name="style:graphic-properties">
- <ref name="style-graphic-properties-content-strict"/>
- </element>
- </define>
- <define name="style-graphic-properties-content-strict">
- <ref name="style-graphic-properties-attlist"/>
- <ref name="style-graphic-fill-properties-attlist"/>
- <ref name="style-graphic-properties-elements"/>
- </define>
- <define name="style-drawing-page-properties">
- <element name="style:drawing-page-properties">
- <ref name="style-drawing-page-properties-content-strict"/>
- </element>
- </define>
- <define name="style-drawing-page-properties-content-strict">
- <ref name="style-graphic-fill-properties-attlist"/>
- <ref name="style-drawing-page-properties-attlist"/>
- <ref name="style-drawing-page-properties-elements"/>
- </define>
- <define name="draw-gradient">
- <element name="draw:gradient">
- <ref name="common-draw-gradient-attlist"/>
- <ref name="draw-gradient-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="common-draw-gradient-attlist">
- <interleave>
- <optional>
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <attribute name="draw:style">
- <ref name="gradient-style"/>
- </attribute>
- <optional>
- <attribute name="draw:cx">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:cy">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:angle">
- <ref name="angle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:border">
- <ref name="percent"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="gradient-style">
- <choice>
- <value>linear</value>
- <value>axial</value>
- <value>radial</value>
- <value>ellipsoid</value>
- <value>square</value>
- <value>rectangular</value>
- </choice>
- </define>
- <define name="draw-gradient-attlist">
- <interleave>
- <optional>
- <attribute name="draw:start-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:start-intensity">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end-intensity">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="svg-linearGradient">
- <element name="svg:linearGradient">
- <ref name="common-svg-gradient-attlist"/>
- <optional>
- <attribute name="svg:x1">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:y1">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:x2">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:y2">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="svg-stop"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="svg-radialGradient">
- <element name="svg:radialGradient">
- <ref name="common-svg-gradient-attlist"/>
- <optional>
- <attribute name="svg:cx">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:cy">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:r">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:fx">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:fy">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="svg-stop"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="svg-stop">
- <element name="svg:stop">
- <attribute name="svg:offset">
- <choice>
- <ref name="double"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <optional>
- <attribute name="svg:stop-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:stop-opacity">
- <ref name="double"/>
- </attribute>
- </optional>
- </element>
- </define>
- <define name="common-svg-gradient-attlist">
- <interleave>
- <optional>
- <attribute name="svg:gradientUnits">
- <value>objectBoundingBox</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:gradientTransform">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:spreadMethod">
- <choice>
- <value>pad</value>
- <value>reflect</value>
- <value>repeat</value>
- </choice>
- </attribute>
- </optional>
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="draw-hatch">
- <element name="draw:hatch">
- <ref name="draw-hatch-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="draw-hatch-attlist">
- <interleave>
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <attribute name="draw:style">
- <choice>
- <value>single</value>
- <value>double</value>
- <value>triple</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="draw:color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:distance">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:rotation">
- <ref name="angle"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="draw-fill-image">
- <element name="draw:fill-image">
- <ref name="draw-fill-image-attlist"/>
- <attribute name="xlink:type">
- <value>simple</value>
- </attribute>
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- <optional>
- <attribute name="xlink:show">
- <value>embed</value>
- </attribute>
- </optional>
- <optional>
- <attribute name="xlink:actuate">
- <value>onLoad</value>
- </attribute>
- </optional>
- <empty/>
- </element>
- </define>
- <define name="draw-fill-image-attlist">
- <interleave>
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="draw-opacity">
- <element name="draw:opacity">
- <ref name="common-draw-gradient-attlist"/>
- <ref name="draw-opacity-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="draw-opacity-attlist">
- <optional>
- <attribute name="draw:start">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- </define>
- <define name="draw-marker">
- <element name="draw:marker">
- <ref name="draw-marker-attlist"/>
- <ref name="common-draw-viewbox-attlist"/>
- <ref name="common-draw-path-data-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="draw-marker-attlist">
- <interleave>
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="draw-stroke-dash">
- <element name="draw:stroke-dash">
- <ref name="draw-stroke-dash-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="draw-stroke-dash-attlist">
- <interleave>
- <attribute name="draw:name">
- <ref name="styleName"/>
- </attribute>
- <optional>
- <attribute name="draw:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:style">
- <choice>
- <value>rect</value>
- <value>round</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:dots1">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:dots1-length">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:dots2">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:dots2-length">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:distance">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-presentation-page-layout">
- <element name="style:presentation-page-layout">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
- <optional>
- <attribute name="style:display-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <zeroOrMore>
- <ref name="presentation-placeholder"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="presentation-placeholder">
- <element name="presentation:placeholder">
- <attribute name="presentation:object">
- <ref name="presentation-classes"/>
- </attribute>
- <attribute name="svg:x">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <attribute name="svg:y">
- <choice>
- <ref name="coordinate"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <attribute name="svg:width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <attribute name="svg:height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- <empty/>
- </element>
- </define>
- <define name="style-page-layout-properties">
- <element name="style:page-layout-properties">
- <ref name="style-page-layout-properties-content-strict"/>
- </element>
- </define>
- <define name="style-page-layout-properties-content-strict">
- <ref name="style-page-layout-properties-attlist"/>
- <ref name="style-page-layout-properties-elements"/>
- </define>
- <define name="style-page-layout-properties-attlist">
- <interleave>
- <optional>
- <attribute name="fo:page-width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:page-height">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <ref name="common-num-format-attlist"/>
- </optional>
- <ref name="common-num-format-prefix-suffix-attlist"/>
- <optional>
- <attribute name="style:paper-tray-name">
- <choice>
- <value>default</value>
- <ref name="string"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:print-orientation">
- <choice>
- <value>portrait</value>
- <value>landscape</value>
- </choice>
- </attribute>
- </optional>
- <ref name="common-horizontal-margin-attlist"/>
- <ref name="common-vertical-margin-attlist"/>
- <ref name="common-margin-attlist"/>
- <ref name="common-border-attlist"/>
- <ref name="common-border-line-width-attlist"/>
- <ref name="common-padding-attlist"/>
- <ref name="common-shadow-attlist"/>
- <ref name="common-background-color-attlist"/>
- <optional>
- <attribute name="style:register-truth-ref-style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:print">
- <list>
- <zeroOrMore>
- <choice>
- <value>headers</value>
- <value>grid</value>
- <value>annotations</value>
- <value>objects</value>
- <value>charts</value>
- <value>drawings</value>
- <value>formulas</value>
- <value>zero-values</value>
- </choice>
- </zeroOrMore>
- </list>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:print-page-order">
- <choice>
- <value>ttb</value>
- <value>ltr</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:first-page-number">
- <choice>
- <ref name="positiveInteger"/>
- <value>continue</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:scale-to">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:scale-to-pages">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:table-centering">
- <choice>
- <value>horizontal</value>
- <value>vertical</value>
- <value>both</value>
- <value>none</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:footnote-max-height">
- <ref name="length"/>
- </attribute>
- </optional>
- <ref name="common-writing-mode-attlist"/>
- <optional>
- <attribute name="style:layout-grid-mode">
- <choice>
- <value>none</value>
- <value>line</value>
- <value>both</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:layout-grid-standard-mode">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:layout-grid-base-height">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:layout-grid-ruby-height">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:layout-grid-lines">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:layout-grid-base-width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:layout-grid-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:layout-grid-ruby-below">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:layout-grid-print">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:layout-grid-display">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:layout-grid-snap-to">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-page-layout-properties-elements">
- <interleave>
- <ref name="style-background-image"/>
- <ref name="style-columns"/>
- <ref name="style-footnote-sep"/>
- </interleave>
- </define>
- <define name="style-footnote-sep">
- <optional>
- <element name="style:footnote-sep">
- <ref name="style-footnote-sep-attlist"/>
- <empty/>
- </element>
- </optional>
- </define>
- <define name="style-footnote-sep-attlist">
- <optional>
- <attribute name="style:width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rel-width">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:line-style">
- <ref name="lineStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:adjustment">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:distance-before-sep">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:distance-after-sep">
- <ref name="length"/>
- </attribute>
- </optional>
- </define>
- <define name="style-header-footer-properties">
- <element name="style:header-footer-properties">
- <ref name="style-header-footer-properties-content-strict"/>
- </element>
- </define>
- <define name="style-header-footer-properties-content-strict">
- <ref name="style-header-footer-properties-attlist"/>
- <ref name="style-header-footer-properties-elements"/>
- </define>
- <define name="style-header-footer-properties-attlist">
- <interleave>
- <optional>
- <attribute name="svg:height">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:min-height">
- <ref name="length"/>
- </attribute>
- </optional>
- <ref name="common-horizontal-margin-attlist"/>
- <ref name="common-vertical-margin-attlist"/>
- <ref name="common-margin-attlist"/>
- <ref name="common-border-attlist"/>
- <ref name="common-border-line-width-attlist"/>
- <ref name="common-padding-attlist"/>
- <ref name="common-background-color-attlist"/>
- <ref name="common-shadow-attlist"/>
- <optional>
- <attribute name="style:dynamic-spacing">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-header-footer-properties-elements">
- <ref name="style-background-image"/>
- </define>
- <define name="style-text-properties">
- <element name="style:text-properties">
- <ref name="style-text-properties-content-strict"/>
- </element>
- </define>
- <define name="style-text-properties-content-strict">
- <ref name="style-text-properties-attlist"/>
- <ref name="style-text-properties-elements"/>
- </define>
- <define name="style-text-properties-elements">
- <empty/>
- </define>
- <define name="style-text-properties-attlist">
- <interleave>
- <optional>
- <attribute name="fo:font-variant">
- <ref name="fontVariant"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:text-transform">
- <choice>
- <value>none</value>
- <value>lowercase</value>
- <value>uppercase</value>
- <value>capitalize</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:use-window-font-color">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-outline">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-line-through-type">
- <ref name="lineType"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-line-through-style">
- <ref name="lineStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-line-through-width">
- <ref name="lineWidth"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-line-through-color">
- <choice>
- <value>font-color</value>
- <ref name="color"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-line-through-text">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-line-through-text-style">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-position">
- <list>
- <choice>
- <ref name="percent"/>
- <value>super</value>
- <value>sub</value>
- </choice>
- <optional>
- <ref name="percent"/>
- </optional>
- </list>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-name-asian">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-name-complex">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:font-family">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-asian">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-complex">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-generic">
- <ref name="fontFamilyGeneric"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-generic-asian">
- <ref name="fontFamilyGeneric"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-generic-complex">
- <ref name="fontFamilyGeneric"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-name-asian">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-name-complex">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-pitch">
- <ref name="fontPitch"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-pitch-asian">
- <ref name="fontPitch"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-pitch-complex">
- <ref name="fontPitch"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-charset">
- <ref name="textEncoding"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-charset-asian">
- <ref name="textEncoding"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-charset-complex">
- <ref name="textEncoding"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:font-size">
- <choice>
- <ref name="positiveLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-size-asian">
- <choice>
- <ref name="positiveLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-size-complex">
- <choice>
- <ref name="positiveLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-size-rel">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-size-rel-asian">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-size-rel-complex">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:script-type">
- <choice>
- <value>latin</value>
- <value>asian</value>
- <value>complex</value>
- <value>ignore</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:letter-spacing">
- <choice>
- <ref name="length"/>
- <value>normal</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:language">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:language-asian">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:language-complex">
- <ref name="languageCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:country">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:country-asian">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:country-complex">
- <ref name="countryCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:script">
- <ref name="scriptCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:script-asian">
- <ref name="scriptCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:script-complex">
- <ref name="scriptCode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rfc-language-tag">
- <ref name="language"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rfc-language-tag-asian">
- <ref name="language"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rfc-language-tag-complex">
- <ref name="language"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:font-style">
- <ref name="fontStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-asian">
- <ref name="fontStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-complex">
- <ref name="fontStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-relief">
- <choice>
- <value>none</value>
- <value>embossed</value>
- <value>engraved</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:text-shadow">
- <ref name="shadowType"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-underline-type">
- <ref name="lineType"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-underline-style">
- <ref name="lineStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-underline-width">
- <ref name="lineWidth"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-underline-color">
- <choice>
- <value>font-color</value>
- <ref name="color"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-overline-type">
- <ref name="lineType"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-overline-style">
- <ref name="lineStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-overline-width">
- <ref name="lineWidth"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-overline-color">
- <choice>
- <value>font-color</value>
- <ref name="color"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-overline-mode">
- <ref name="lineMode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:font-weight">
- <ref name="fontWeight"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-weight-asian">
- <ref name="fontWeight"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-weight-complex">
- <ref name="fontWeight"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-underline-mode">
- <ref name="lineMode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-line-through-mode">
- <ref name="lineMode"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:letter-kerning">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-blinking">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <ref name="common-background-color-attlist"/>
- <optional>
- <attribute name="style:text-combine">
- <choice>
- <value>none</value>
- <value>letters</value>
- <value>lines</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-combine-start-char">
- <ref name="character"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-combine-end-char">
- <ref name="character"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-emphasize">
- <choice>
- <value>none</value>
- <list>
- <choice>
- <value>none</value>
- <value>accent</value>
- <value>dot</value>
- <value>circle</value>
- <value>disc</value>
- </choice>
- <choice>
- <value>above</value>
- <value>below</value>
- </choice>
- </list>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-scale">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-rotation-angle">
- <ref name="angle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-rotation-scale">
- <choice>
- <value>fixed</value>
- <value>line-height</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:hyphenate">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:hyphenation-remain-char-count">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:hyphenation-push-char-count">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <choice>
- <attribute name="text:display">
- <value>true</value>
- </attribute>
- <attribute name="text:display">
- <value>none</value>
- </attribute>
- <group>
- <attribute name="text:display">
- <value>condition</value>
- </attribute>
- <attribute name="text:condition">
- <value>none</value>
- </attribute>
- </group>
- <empty/>
- </choice>
- </interleave>
- </define>
- <define name="fontVariant">
- <choice>
- <value>normal</value>
- <value>small-caps</value>
- </choice>
- </define>
- <define name="fontFamilyGeneric">
- <choice>
- <value>roman</value>
- <value>swiss</value>
- <value>modern</value>
- <value>decorative</value>
- <value>script</value>
- <value>system</value>
- </choice>
- </define>
- <define name="fontPitch">
- <choice>
- <value>fixed</value>
- <value>variable</value>
- </choice>
- </define>
- <define name="textEncoding">
- <data type="string">
- <param name="pattern">[A-Za-z][A-Za-z0-9._\-]*</param>
- </data>
- </define>
- <define name="fontStyle">
- <choice>
- <value>normal</value>
- <value>italic</value>
- <value>oblique</value>
- </choice>
- </define>
- <define name="shadowType">
- <choice>
- <value>none</value>
- <ref name="string"/>
- </choice>
- </define>
- <define name="lineType">
- <choice>
- <value>none</value>
- <value>single</value>
- <value>double</value>
- </choice>
- </define>
- <define name="lineStyle">
- <choice>
- <value>none</value>
- <value>solid</value>
- <value>dotted</value>
- <value>dash</value>
- <value>long-dash</value>
- <value>dot-dash</value>
- <value>dot-dot-dash</value>
- <value>wave</value>
- </choice>
- </define>
- <define name="lineWidth">
- <choice>
- <value>auto</value>
- <value>normal</value>
- <value>bold</value>
- <value>thin</value>
- <value>medium</value>
- <value>thick</value>
- <ref name="positiveInteger"/>
- <ref name="percent"/>
- <ref name="positiveLength"/>
- </choice>
- </define>
- <define name="fontWeight">
- <choice>
- <value>normal</value>
- <value>bold</value>
- <value>100</value>
- <value>200</value>
- <value>300</value>
- <value>400</value>
- <value>500</value>
- <value>600</value>
- <value>700</value>
- <value>800</value>
- <value>900</value>
- </choice>
- </define>
- <define name="lineMode">
- <choice>
- <value>continuous</value>
- <value>skip-white-space</value>
- </choice>
- </define>
- <define name="style-paragraph-properties">
- <element name="style:paragraph-properties">
- <ref name="style-paragraph-properties-content-strict"/>
- </element>
- </define>
- <define name="style-paragraph-properties-content-strict">
- <ref name="style-paragraph-properties-attlist"/>
- <ref name="style-paragraph-properties-elements"/>
- </define>
- <define name="style-paragraph-properties-attlist">
- <interleave>
- <optional>
- <attribute name="fo:line-height">
- <choice>
- <value>normal</value>
- <ref name="nonNegativeLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:line-height-at-least">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:line-spacing">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-independent-line-spacing">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <ref name="common-text-align"/>
- <optional>
- <attribute name="fo:text-align-last">
- <choice>
- <value>start</value>
- <value>center</value>
- <value>justify</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:justify-single-word">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:keep-together">
- <choice>
- <value>auto</value>
- <value>always</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:widows">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:orphans">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:tab-stop-distance">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:hyphenation-keep">
- <choice>
- <value>auto</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:hyphenation-ladder-count">
- <choice>
- <value>no-limit</value>
- <ref name="positiveInteger"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:register-true">
- <ref name="boolean"/>
- </attribute>
- </optional>
-
- <ref name="common-horizontal-margin-attlist"/>
- <optional>
- <attribute name="fo:text-indent">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:auto-text-indent">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <ref name="common-vertical-margin-attlist"/>
- <ref name="common-margin-attlist"/>
- <ref name="common-break-attlist"/>
- <ref name="common-background-color-attlist"/>
- <ref name="common-border-attlist"/>
- <ref name="common-border-line-width-attlist"/>
- <optional>
- <attribute name="style:join-border">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <ref name="common-padding-attlist"/>
- <ref name="common-shadow-attlist"/>
- <ref name="common-keep-with-next-attlist"/>
- <optional>
- <attribute name="text:number-lines">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:line-number">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-autospace">
- <choice>
- <value>none</value>
- <value>ideograph-alpha</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:punctuation-wrap">
- <choice>
- <value>simple</value>
- <value>hanging</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:line-break">
- <choice>
- <value>normal</value>
- <value>strict</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:vertical-align">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- <value>auto</value>
- <value>baseline</value>
- </choice>
- </attribute>
- </optional>
- <ref name="common-writing-mode-attlist"/>
- <optional>
- <attribute name="style:writing-mode-automatic">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:snap-to-layout-grid">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <ref name="common-page-number-attlist"/>
- <ref name="common-background-transparency-attlist"/>
- </interleave>
- </define>
- <define name="common-text-align">
- <optional>
- <attribute name="fo:text-align">
- <choice>
- <value>start</value>
- <value>end</value>
- <value>left</value>
- <value>right</value>
- <value>center</value>
- <value>justify</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="style-paragraph-properties-elements">
- <interleave>
- <ref name="style-tab-stops"/>
- <ref name="style-drop-cap"/>
- <ref name="style-background-image"/>
- </interleave>
- </define>
- <define name="style-tab-stops">
- <optional>
- <element name="style:tab-stops">
- <zeroOrMore>
- <ref name="style-tab-stop"/>
- </zeroOrMore>
- </element>
- </optional>
- </define>
- <define name="style-tab-stop">
- <element name="style:tab-stop">
- <ref name="style-tab-stop-attlist"/>
- <empty/>
- </element>
- </define>
- <define name="style-tab-stop-attlist">
- <interleave>
- <attribute name="style:position">
- <ref name="length"/>
- </attribute>
- <choice>
- <optional>
- <attribute name="style:type">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- </choice>
- </attribute>
- </optional>
- <group>
- <attribute name="style:type">
- <value>char</value>
- </attribute>
- <ref name="style-tab-stop-char-attlist"/>
- </group>
- </choice>
- <optional>
- <attribute name="style:leader-type">
- <ref name="lineType"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:leader-style">
- <ref name="lineStyle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:leader-width">
- <ref name="lineWidth"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:leader-color">
- <choice>
- <value>font-color</value>
- <ref name="color"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:leader-text">
- <ref name="character"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:leader-text-style">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-tab-stop-char-attlist">
- <attribute name="style:char">
- <ref name="character"/>
- </attribute>
- </define>
- <define name="style-drop-cap">
- <optional>
- <element name="style:drop-cap">
- <ref name="style-drop-cap-attlist"/>
- <empty/>
- </element>
- </optional>
- </define>
- <define name="style-drop-cap-attlist">
- <interleave>
- <optional>
- <attribute name="style:length">
- <choice>
- <value>word</value>
- <ref name="positiveInteger"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:lines">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:distance">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:style-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-horizontal-margin-attlist">
- <optional>
- <attribute name="fo:margin-left">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:margin-right">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-vertical-margin-attlist">
- <optional>
- <attribute name="fo:margin-top">
- <choice>
- <ref name="nonNegativeLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:margin-bottom">
- <choice>
- <ref name="nonNegativeLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-margin-attlist">
- <optional>
- <attribute name="fo:margin">
- <choice>
- <ref name="nonNegativeLength"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-break-attlist">
- <optional>
- <attribute name="fo:break-before">
- <choice>
- <value>auto</value>
- <value>column</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:break-after">
- <choice>
- <value>auto</value>
- <value>column</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-background-color-attlist">
- <optional>
- <attribute name="fo:background-color">
- <choice>
- <value>transparent</value>
- <ref name="color"/>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="style-background-image">
- <optional>
- <element name="style:background-image">
- <ref name="style-background-image-attlist"/>
- <choice>
- <ref name="common-draw-data-attlist"/>
- <ref name="office-binary-data"/>
- <empty/>
- </choice>
- </element>
- </optional>
- </define>
- <define name="style-background-image-attlist">
- <interleave>
- <optional>
- <attribute name="style:repeat">
- <choice>
- <value>no-repeat</value>
- <value>repeat</value>
- <value>stretch</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:position">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>top</value>
- <value>bottom</value>
- <list>
- <ref name="horiBackPos"/>
- <ref name="vertBackPos"/>
- </list>
- <list>
- <ref name="vertBackPos"/>
- <ref name="horiBackPos"/>
- </list>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:filter-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:opacity">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="horiBackPos">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- </choice>
- </define>
- <define name="vertBackPos">
- <choice>
- <value>top</value>
- <value>center</value>
- <value>bottom</value>
- </choice>
- </define>
- <define name="common-border-attlist">
- <optional>
- <attribute name="fo:border">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:border-top">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:border-bottom">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:border-left">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:border-right">
- <ref name="string"/>
- </attribute>
- </optional>
- </define>
- <define name="common-border-line-width-attlist">
- <optional>
- <attribute name="style:border-line-width">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:border-line-width-top">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:border-line-width-bottom">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:border-line-width-left">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:border-line-width-right">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- </define>
- <define name="borderWidths">
- <list>
- <ref name="positiveLength"/>
- <ref name="positiveLength"/>
- <ref name="positiveLength"/>
- </list>
- </define>
- <define name="common-padding-attlist">
- <optional>
- <attribute name="fo:padding">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:padding-top">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:padding-bottom">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:padding-left">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:padding-right">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- </define>
- <define name="common-shadow-attlist">
- <optional>
- <attribute name="style:shadow">
- <ref name="shadowType"/>
- </attribute>
- </optional>
- </define>
- <define name="common-keep-with-next-attlist">
- <optional>
- <attribute name="fo:keep-with-next">
- <choice>
- <value>auto</value>
- <value>always</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-writing-mode-attlist">
- <optional>
- <attribute name="style:writing-mode">
- <choice>
- <value>lr-tb</value>
- <value>rl-tb</value>
- <value>tb-rl</value>
- <value>tb-lr</value>
- <value>lr</value>
- <value>rl</value>
- <value>tb</value>
- <value>page</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-page-number-attlist">
- <optional>
- <attribute name="style:page-number">
- <choice>
- <ref name="positiveInteger"/>
- <value>auto</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-background-transparency-attlist">
- <optional>
- <attribute name="style:background-transparency">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- </define>
- <define name="style-ruby-properties">
- <element name="style:ruby-properties">
- <ref name="style-ruby-properties-content-strict"/>
- </element>
- </define>
- <define name="style-ruby-properties-content-strict">
- <ref name="style-ruby-properties-attlist"/>
- <ref name="style-ruby-properties-elements"/>
- </define>
- <define name="style-ruby-properties-elements">
- <empty/>
- </define>
- <define name="style-ruby-properties-attlist">
- <interleave>
- <optional>
- <attribute name="style:ruby-position">
- <choice>
- <value>above</value>
- <value>below</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:ruby-align">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>distribute-letter</value>
- <value>distribute-space</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-section-properties">
- <element name="style:section-properties">
- <ref name="style-section-properties-content-strict"/>
- </element>
- </define>
- <define name="style-section-properties-content-strict">
- <ref name="style-section-properties-attlist"/>
- <ref name="style-section-properties-elements"/>
- </define>
- <define name="style-section-properties-attlist">
- <interleave>
- <ref name="common-background-color-attlist"/>
- <ref name="common-horizontal-margin-attlist"/>
- <optional>
- <attribute name="style:protect">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <ref name="common-editable-attlist"/>
- <optional>
- <attribute name="text:dont-balance-text-columns">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <ref name="common-writing-mode-attlist"/>
- </interleave>
- </define>
- <define name="style-section-properties-elements">
- <interleave>
- <ref name="style-background-image"/>
- <ref name="style-columns"/>
- <zeroOrMore>
- <ref name="text-notes-configuration"/>
- </zeroOrMore>
- </interleave>
- </define>
- <define name="style-columns">
- <optional>
- <element name="style:columns">
- <ref name="style-columns-attlist"/>
- <optional>
- <ref name="style-column-sep"/>
- </optional>
- <zeroOrMore>
- <ref name="style-column"/>
- </zeroOrMore>
- </element>
- </optional>
- </define>
- <define name="style-columns-attlist">
- <interleave>
- <attribute name="fo:column-count">
- <ref name="positiveInteger"/>
- </attribute>
- <optional>
- <attribute name="fo:column-gap">
- <ref name="length"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-column">
- <element name="style:column">
- <ref name="style-column-attlist"/>
- </element>
- </define>
- <define name="style-column-attlist">
- <interleave>
- <attribute name="style:rel-width">
- <ref name="relativeLength"/>
- </attribute>
- <optional>
- <attribute name="fo:start-indent">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:end-indent">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:space-before">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:space-after">
- <ref name="length"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-column-sep">
- <element name="style:column-sep">
- <ref name="style-column-sep-attlist"/>
- </element>
- </define>
- <define name="style-column-sep-attlist">
- <interleave>
- <optional>
- <attribute name="style:style">
- <choice>
- <value>none</value>
- <value>solid</value>
- <value>dotted</value>
- <value>dashed</value>
- <value>dot-dashed</value>
- </choice>
- </attribute>
- </optional>
- <attribute name="style:width">
- <ref name="length"/>
- </attribute>
- <optional>
- <attribute name="style:height">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:vertical-align">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:color">
- <ref name="color"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-table-properties">
- <element name="style:table-properties">
- <ref name="style-table-properties-content-strict"/>
- </element>
- </define>
- <define name="style-table-properties-content-strict">
- <ref name="style-table-properties-attlist"/>
- <ref name="style-table-properties-elements"/>
- </define>
- <define name="style-table-properties-attlist">
- <interleave>
- <optional>
- <attribute name="style:width">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rel-width">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:align">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>margins</value>
- </choice>
- </attribute>
- </optional>
- <ref name="common-horizontal-margin-attlist"/>
- <ref name="common-vertical-margin-attlist"/>
- <ref name="common-margin-attlist"/>
- <ref name="common-page-number-attlist"/>
- <ref name="common-break-attlist"/>
- <ref name="common-background-color-attlist"/>
- <ref name="common-shadow-attlist"/>
- <ref name="common-keep-with-next-attlist"/>
- <optional>
- <attribute name="style:may-break-between-rows">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="table:border-model">
- <choice>
- <value>collapsing</value>
- <value>separating</value>
- </choice>
- </attribute>
- </optional>
- <ref name="common-writing-mode-attlist"/>
- <optional>
- <attribute name="table:display">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-table-properties-elements">
- <ref name="style-background-image"/>
- </define>
- <define name="style-table-column-properties">
- <element name="style:table-column-properties">
- <ref name="style-table-column-properties-content-strict"/>
- </element>
- </define>
- <define name="style-table-column-properties-content-strict">
- <ref name="style-table-column-properties-attlist"/>
- <ref name="style-table-column-properties-elements"/>
- </define>
- <define name="style-table-column-properties-elements">
- <empty/>
- </define>
- <define name="style-table-column-properties-attlist">
- <interleave>
- <optional>
- <attribute name="style:column-width">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:rel-column-width">
- <ref name="relativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:use-optimal-column-width">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <ref name="common-break-attlist"/>
- </interleave>
- </define>
- <define name="style-table-row-properties">
- <element name="style:table-row-properties">
- <ref name="style-table-row-properties-content-strict"/>
- </element>
- </define>
- <define name="style-table-row-properties-content-strict">
- <ref name="style-table-row-properties-attlist"/>
- <ref name="style-table-row-properties-elements"/>
- </define>
- <define name="style-table-row-properties-attlist">
- <interleave>
- <optional>
- <attribute name="style:row-height">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:min-row-height">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:use-optimal-row-height">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <ref name="common-background-color-attlist"/>
- <ref name="common-break-attlist"/>
- <optional>
- <attribute name="fo:keep-together">
- <choice>
- <value>auto</value>
- <value>always</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-table-row-properties-elements">
- <ref name="style-background-image"/>
- </define>
- <define name="style-table-cell-properties">
- <element name="style:table-cell-properties">
- <ref name="style-table-cell-properties-content-strict"/>
- </element>
- </define>
- <define name="style-table-cell-properties-content-strict">
- <ref name="style-table-cell-properties-attlist"/>
- <ref name="style-table-cell-properties-elements"/>
- </define>
- <define name="style-table-cell-properties-attlist">
- <interleave>
- <optional>
- <attribute name="style:vertical-align">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- <value>automatic</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:text-align-source">
- <choice>
- <value>fix</value>
- <value>value-type</value>
- </choice>
- </attribute>
- </optional>
- <ref name="common-style-direction-attlist"/>
- <optional>
- <attribute name="style:glyph-orientation-vertical">
- <choice>
- <value>auto</value>
- <value>0</value>
- <value>0deg</value>
- <value>0rad</value>
- <value>0grad</value>
- </choice>
- </attribute>
- </optional>
- <ref name="common-writing-mode-attlist"/>
- <ref name="common-shadow-attlist"/>
- <ref name="common-background-color-attlist"/>
- <ref name="common-border-attlist"/>
- <optional>
- <attribute name="style:diagonal-tl-br">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:diagonal-tl-br-widths">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:diagonal-bl-tr">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:diagonal-bl-tr-widths">
- <ref name="borderWidths"/>
- </attribute>
- </optional>
- <ref name="common-border-line-width-attlist"/>
- <ref name="common-padding-attlist"/>
- <optional>
- <attribute name="fo:wrap-option">
- <choice>
- <value>no-wrap</value>
- <value>wrap</value>
- </choice>
- </attribute>
- </optional>
- <ref name="common-rotation-angle-attlist"/>
- <optional>
- <attribute name="style:rotation-align">
- <choice>
- <value>none</value>
- <value>bottom</value>
- <value>top</value>
- <value>center</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:cell-protect">
- <choice>
- <value>none</value>
- <value>hidden-and-protected</value>
- <list>
- <oneOrMore>
- <choice>
- <value>protected</value>
- <value>formula-hidden</value>
- </choice>
- </oneOrMore>
- </list>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:print-content">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:decimal-places">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:repeat-content">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:shrink-to-fit">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="common-style-direction-attlist">
- <optional>
- <attribute name="style:direction">
- <choice>
- <value>ltr</value>
- <value>ttb</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="style-table-cell-properties-elements">
- <ref name="style-background-image"/>
- </define>
- <define name="common-rotation-angle-attlist">
- <optional>
- <attribute name="style:rotation-angle">
- <ref name="angle"/>
- </attribute>
- </optional>
- </define>
- <define name="style-list-level-properties">
- <element name="style:list-level-properties">
- <ref name="style-list-level-properties-content-strict"/>
- </element>
- </define>
- <define name="style-list-level-properties-content-strict">
- <ref name="style-list-level-properties-attlist"/>
- <ref name="style-list-level-properties-elements"/>
- </define>
- <define name="style-list-level-properties-attlist">
- <interleave>
- <ref name="common-text-align"/>
- <optional>
- <attribute name="text:space-before">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:min-label-width">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:min-label-distance">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:width">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:height">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <ref name="common-vertical-rel-attlist"/>
- <ref name="common-vertical-pos-attlist"/>
- <optional>
- <attribute name="text:list-level-position-and-space-mode">
- <choice>
- <value>label-width-and-position</value>
- <value>label-alignment</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-list-level-properties-elements">
- <ref name="style-list-level-label-alignment"/>
- </define>
- <define name="style-list-level-label-alignment">
- <optional>
- <element name="style:list-level-label-alignment">
- <ref name="style-list-level-label-alignment-attlist"/>
- <empty/>
- </element>
- </optional>
- </define>
- <define name="style-list-level-label-alignment-attlist">
- <interleave>
- <attribute name="text:label-followed-by">
- <choice>
- <value>listtab</value>
- <value>space</value>
- <value>nothing</value>
- </choice>
- </attribute>
- <optional>
- <attribute name="text:list-tab-stop-position">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:text-indent">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:margin-left">
- <ref name="length"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-graphic-properties-attlist">
- <interleave>
- <optional>
- <attribute name="draw:stroke">
- <choice>
- <value>none</value>
- <value>dash</value>
- <value>solid</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:stroke-dash">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:stroke-dash-names">
- <ref name="styleNameRefs"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:stroke-width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:stroke-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:marker-start">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:marker-end">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:marker-start-width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:marker-end-width">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:marker-start-center">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:marker-end-center">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:stroke-opacity">
- <choice>
- <data type="double">
- <param name="minInclusive">0</param>
- <param name="maxInclusive">1</param>
- </data>
- <ref name="zeroToHundredPercent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:stroke-linejoin">
- <choice>
- <value>miter</value>
- <value>round</value>
- <value>bevel</value>
- <value>middle</value>
- <value>none</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:stroke-linecap">
- <choice>
- <value>butt</value>
- <value>square</value>
- <value>round</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:symbol-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:animation">
- <choice>
- <value>none</value>
- <value>scroll</value>
- <value>alternate</value>
- <value>slide</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:animation-direction">
- <choice>
- <value>left</value>
- <value>right</value>
- <value>up</value>
- <value>down</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:animation-start-inside">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:animation-stop-inside">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:animation-repeat">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:animation-delay">
- <ref name="duration"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:animation-steps">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:auto-grow-width">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:auto-grow-height">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fit-to-size">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fit-to-contour">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:textarea-vertical-align">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- <value>justify</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:textarea-horizontal-align">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>justify</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:wrap-option">
- <choice>
- <value>no-wrap</value>
- <value>wrap</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:shrink-to-fit">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:color-mode">
- <choice>
- <value>greyscale</value>
- <value>mono</value>
- <value>watermark</value>
- <value>standard</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:color-inversion">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:luminance">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:contrast">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:gamma">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:red">
- <ref name="signedZeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:green">
- <ref name="signedZeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:blue">
- <ref name="signedZeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:image-opacity">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:shadow">
- <choice>
- <value>visible</value>
- <value>hidden</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:shadow-offset-x">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:shadow-offset-y">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:shadow-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:shadow-opacity">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:start-line-spacing-horizontal">
- <ref name="distance"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:start-line-spacing-vertical">
- <ref name="distance"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end-line-spacing-horizontal">
- <ref name="distance"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end-line-spacing-vertical">
- <ref name="distance"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:line-distance">
- <ref name="distance"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:guide-overhang">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:guide-distance">
- <ref name="distance"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:start-guide">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:end-guide">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:placing">
- <choice>
- <value>below</value>
- <value>above</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:parallel">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:measure-align">
- <choice>
- <value>automatic</value>
- <value>left-outside</value>
- <value>inside</value>
- <value>right-outside</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:measure-vertical-align">
- <choice>
- <value>automatic</value>
- <value>above</value>
- <value>below</value>
- <value>center</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:unit">
- <choice>
- <value>automatic</value>
- <value>mm</value>
- <value>cm</value>
- <value>m</value>
- <value>km</value>
- <value>pt</value>
- <value>pc</value>
- <value>inch</value>
- <value>ft</value>
- <value>mi</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:show-unit">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:decimal-places">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:caption-type">
- <choice>
- <value>straight-line</value>
- <value>angled-line</value>
- <value>angled-connector-line</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:caption-angle-type">
- <choice>
- <value>fixed</value>
- <value>free</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:caption-angle">
- <ref name="angle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:caption-gap">
- <ref name="distance"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:caption-escape-direction">
- <choice>
- <value>horizontal</value>
- <value>vertical</value>
- <value>auto</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:caption-escape">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:caption-line-length">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:caption-fit-line-length">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:horizontal-segments">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:vertical-segments">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:edge-rounding">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:edge-rounding-mode">
- <choice>
- <value>correct</value>
- <value>attractive</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:back-scale">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:depth">
- <ref name="length"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:backface-culling">
- <choice>
- <value>enabled</value>
- <value>disabled</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:end-angle">
- <ref name="angle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:close-front">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:close-back">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:lighting-mode">
- <choice>
- <value>standard</value>
- <value>double-sided</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:normals-kind">
- <choice>
- <value>object</value>
- <value>flat</value>
- <value>sphere</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:normals-direction">
- <choice>
- <value>normal</value>
- <value>inverse</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:texture-generation-mode-x">
- <choice>
- <value>object</value>
- <value>parallel</value>
- <value>sphere</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:texture-generation-mode-y">
- <choice>
- <value>object</value>
- <value>parallel</value>
- <value>sphere</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:texture-kind">
- <choice>
- <value>luminance</value>
- <value>intensity</value>
- <value>color</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:texture-filter">
- <choice>
- <value>enabled</value>
- <value>disabled</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:texture-mode">
- <choice>
- <value>replace</value>
- <value>modulate</value>
- <value>blend</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:ambient-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:emissive-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:specular-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:diffuse-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:shininess">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="dr3d:shadow">
- <choice>
- <value>visible</value>
- <value>hidden</value>
- </choice>
- </attribute>
- </optional>
- <ref name="common-draw-rel-size-attlist"/>
- <optional>
- <attribute name="fo:min-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:min-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:max-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:max-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <ref name="common-horizontal-margin-attlist"/>
- <ref name="common-vertical-margin-attlist"/>
- <ref name="common-margin-attlist"/>
- <optional>
- <attribute name="style:print-content">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:protect">
- <choice>
- <value>none</value>
- <list>
- <oneOrMore>
- <choice>
- <value>content</value>
- <value>position</value>
- <value>size</value>
- </choice>
- </oneOrMore>
- </list>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:horizontal-pos">
- <choice>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>from-left</value>
- <value>inside</value>
- <value>outside</value>
- <value>from-inside</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:x">
- <ref name="coordinate"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:horizontal-rel">
- <choice>
- <value>page</value>
- <value>page-content</value>
- <value>page-start-margin</value>
- <value>page-end-margin</value>
- <value>frame</value>
- <value>frame-content</value>
- <value>frame-start-margin</value>
- <value>frame-end-margin</value>
- <value>paragraph</value>
- <value>paragraph-content</value>
- <value>paragraph-start-margin</value>
- <value>paragraph-end-margin</value>
- <value>char</value>
- </choice>
- </attribute>
- </optional>
- <ref name="common-vertical-pos-attlist"/>
- <ref name="common-vertical-rel-attlist"/>
- <ref name="common-text-anchor-attlist"/>
- <ref name="common-border-attlist"/>
- <ref name="common-border-line-width-attlist"/>
- <ref name="common-padding-attlist"/>
- <ref name="common-shadow-attlist"/>
- <ref name="common-background-color-attlist"/>
- <ref name="common-background-transparency-attlist"/>
- <ref name="common-editable-attlist"/>
- <optional>
- <attribute name="style:wrap">
- <choice>
- <value>none</value>
- <value>left</value>
- <value>right</value>
- <value>parallel</value>
- <value>dynamic</value>
- <value>run-through</value>
- <value>biggest</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:wrap-dynamic-threshold">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:number-wrapped-paragraphs">
- <choice>
- <value>no-limit</value>
- <ref name="positiveInteger"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:wrap-contour">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:wrap-contour-mode">
- <choice>
- <value>full</value>
- <value>outside</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:run-through">
- <choice>
- <value>foreground</value>
- <value>background</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:flow-with-text">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:overflow-behavior">
- <choice>
- <value>clip</value>
- <value>auto-create-new-frame</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:mirror">
- <choice>
- <value>none</value>
- <value>vertical</value>
- <ref name="horizontal-mirror"/>
- <list>
- <value>vertical</value>
- <ref name="horizontal-mirror"/>
- </list>
- <list>
- <ref name="horizontal-mirror"/>
- <value>vertical</value>
- </list>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:clip">
- <choice>
- <value>auto</value>
- <ref name="clipShape"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:wrap-influence-on-position">
- <choice>
- <value>iterative</value>
- <value>once-concurrent</value>
- <value>once-successive</value>
- </choice>
- </attribute>
- </optional>
- <ref name="common-writing-mode-attlist"/>
- <optional>
- <attribute name="draw:frame-display-scrollbar">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:frame-display-border">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:frame-margin-horizontal">
- <ref name="nonNegativePixelLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:frame-margin-vertical">
- <ref name="nonNegativePixelLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:visible-area-left">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:visible-area-top">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:visible-area-width">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:visible-area-height">
- <ref name="positiveLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:draw-aspect">
- <choice>
- <value>content</value>
- <value>thumbnail</value>
- <value>icon</value>
- <value>print-view</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:ole-draw-aspect">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-graphic-fill-properties-attlist">
- <interleave>
- <optional>
- <attribute name="draw:fill">
- <choice>
- <value>none</value>
- <value>solid</value>
- <value>bitmap</value>
- <value>gradient</value>
- <value>hatch</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:secondary-fill-color">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-gradient-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:gradient-step-count">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-hatch-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-hatch-solid">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-image-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:repeat">
- <choice>
- <value>no-repeat</value>
- <value>repeat</value>
- <value>stretch</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-image-width">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-image-height">
- <choice>
- <ref name="length"/>
- <ref name="percent"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-image-ref-point-x">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-image-ref-point-y">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:fill-image-ref-point">
- <choice>
- <value>top-left</value>
- <value>top</value>
- <value>top-right</value>
- <value>left</value>
- <value>center</value>
- <value>right</value>
- <value>bottom-left</value>
- <value>bottom</value>
- <value>bottom-right</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:tile-repeat-offset">
- <list>
- <ref name="zeroToHundredPercent"/>
- <choice>
- <value>horizontal</value>
- <value>vertical</value>
- </choice>
- </list>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:opacity">
- <ref name="zeroToHundredPercent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:opacity-name">
- <ref name="styleNameRef"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:fill-rule">
- <choice>
- <value>nonzero</value>
- <value>evenodd</value>
- </choice>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-graphic-properties-elements">
- <interleave>
- <optional>
- <ref name="text-list-style"/>
- </optional>
- <ref name="style-background-image"/>
- <ref name="style-columns"/>
- </interleave>
- </define>
- <define name="common-vertical-pos-attlist">
- <optional>
- <attribute name="style:vertical-pos">
- <choice>
- <value>top</value>
- <value>middle</value>
- <value>bottom</value>
- <value>from-top</value>
- <value>below</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:y">
- <ref name="coordinate"/>
- </attribute>
- </optional>
- </define>
- <define name="common-vertical-rel-attlist">
- <optional>
- <attribute name="style:vertical-rel">
- <choice>
- <value>page</value>
- <value>page-content</value>
- <value>frame</value>
- <value>frame-content</value>
- <value>paragraph</value>
- <value>paragraph-content</value>
- <value>char</value>
- <value>line</value>
- <value>baseline</value>
- <value>text</value>
- </choice>
- </attribute>
- </optional>
- </define>
- <define name="common-editable-attlist">
- <optional>
- <attribute name="style:editable">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </define>
- <define name="horizontal-mirror">
- <choice>
- <value>horizontal</value>
- <value>horizontal-on-odd</value>
- <value>horizontal-on-even</value>
- </choice>
- </define>
- <define name="clipShape">
- <data type="string">
- <param name="pattern">rect\([ ]*((-?([0-9]+(\.[0-9]*)?|\.[0-9]+)((cm)|(mm)|(in)|(pt)|(pc)))|(auto))([ ]*,[ ]*((-?([0-9]+(\.[0-9]*)?|\.[0-9]+)((cm)|(mm)|(in)|(pt)|(pc))))|(auto)){3}[ ]*\)</param>
- </data>
- </define>
- <define name="nonNegativePixelLength">
- <data type="string">
- <param name="pattern">([0-9]+(\.[0-9]*)?|\.[0-9]+)(px)</param>
- </data>
- </define>
- <define name="style-chart-properties">
- <element name="style:chart-properties">
- <ref name="style-chart-properties-content-strict"/>
- </element>
- </define>
- <define name="style-chart-properties-content-strict">
- <ref name="style-chart-properties-attlist"/>
- <ref name="style-chart-properties-elements"/>
- </define>
- <define name="style-chart-properties-elements">
- <empty/>
- </define>
- <define name="style-chart-properties-attlist">
- <interleave>
- <optional>
- <attribute name="chart:scale-text">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:three-dimensional">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:deep">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:right-angled-axes">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <choice>
- <attribute name="chart:symbol-type">
- <value>none</value>
- </attribute>
- <attribute name="chart:symbol-type">
- <value>automatic</value>
- </attribute>
- <group>
- <attribute name="chart:symbol-type">
- <value>named-symbol</value>
- </attribute>
- <attribute name="chart:symbol-name">
- <choice>
- <value>square</value>
- <value>diamond</value>
- <value>arrow-down</value>
- <value>arrow-up</value>
- <value>arrow-right</value>
- <value>arrow-left</value>
- <value>bow-tie</value>
- <value>hourglass</value>
- <value>circle</value>
- <value>star</value>
- <value>x</value>
- <value>plus</value>
- <value>asterisk</value>
- <value>horizontal-bar</value>
- <value>vertical-bar</value>
- </choice>
- </attribute>
- </group>
- <group>
- <attribute name="chart:symbol-type">
- <value>image</value>
- </attribute>
- <element name="chart:symbol-image">
- <attribute name="xlink:href">
- <ref name="anyIRI"/>
- </attribute>
- </element>
- </group>
- <empty/>
- </choice>
- <optional>
- <attribute name="chart:symbol-width">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:symbol-height">
- <ref name="nonNegativeLength"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:sort-by-x-values">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:vertical">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:connect-bars">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:gap-width">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:overlap">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:group-bars-per-axis">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:japanese-candle-stick">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:interpolation">
- <choice>
- <value>none</value>
- <value>cubic-spline</value>
- <value>b-spline</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:spline-order">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:spline-resolution">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:pie-offset">
- <ref name="nonNegativeInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:angle-offset">
- <ref name="angle"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:hole-size">
- <ref name="percent"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:lines">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:solid-type">
- <choice>
- <value>cuboid</value>
- <value>cylinder</value>
- <value>cone</value>
- <value>pyramid</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:stacked">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:percentage">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:treat-empty-cells">
- <choice>
- <value>use-zero</value>
- <value>leave-gap</value>
- <value>ignore</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:link-data-style-to-source">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:logarithmic">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:maximum">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:minimum">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:origin">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:interval-major">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:interval-minor-divisor">
- <ref name="positiveInteger"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:tick-marks-major-inner">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:tick-marks-major-outer">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:tick-marks-minor-inner">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:tick-marks-minor-outer">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:reverse-direction">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:display-label">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:text-overlap">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="text:line-break">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:label-arrangement">
- <choice>
- <value>side-by-side</value>
- <value>stagger-even</value>
- <value>stagger-odd</value>
- </choice>
- </attribute>
- </optional>
- <ref name="common-style-direction-attlist"/>
- <ref name="common-rotation-angle-attlist"/>
- <optional>
- <attribute name="chart:data-label-number">
- <choice>
- <value>none</value>
- <value>value</value>
- <value>percentage</value>
- <value>value-and-percentage</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:data-label-text">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:data-label-symbol">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <element name="chart:label-separator">
- <ref name="text-p"/>
- </element>
- </optional>
- <optional>
- <attribute name="chart:label-position">
- <ref name="labelPositions"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:label-position-negative">
- <ref name="labelPositions"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:visible">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:auto-position">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:auto-size">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:mean-value">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:error-category">
- <choice>
- <value>none</value>
- <value>variance</value>
- <value>standard-deviation</value>
- <value>percentage</value>
- <value>error-margin</value>
- <value>constant</value>
- <value>standard-error</value>
- <value>cell-range</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:error-percentage">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:error-margin">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:error-lower-limit">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:error-upper-limit">
- <ref name="double"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:error-upper-indicator">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:error-lower-indicator">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:error-lower-range">
- <ref name="cellRangeAddressList"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:error-upper-range">
- <ref name="cellRangeAddressList"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:series-source">
- <choice>
- <value>columns</value>
- <value>rows</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:regression-type">
- <choice>
- <value>none</value>
- <value>linear</value>
- <value>logarithmic</value>
- <value>exponential</value>
- <value>power</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:axis-position">
- <choice>
- <value>start</value>
- <value>end</value>
- <ref name="double"/>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:axis-label-position">
- <choice>
- <value>near-axis</value>
- <value>near-axis-other-side</value>
- <value>outside-start</value>
- <value>outside-end</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:tick-mark-position">
- <choice>
- <value>at-labels</value>
- <value>at-axis</value>
- <value>at-labels-and-axis</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="chart:include-hidden-cells">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="labelPositions">
- <choice>
- <value>avoid-overlap</value>
- <value>center</value>
- <value>top</value>
- <value>top-right</value>
- <value>right</value>
- <value>bottom-right</value>
- <value>bottom</value>
- <value>bottom-left</value>
- <value>left</value>
- <value>top-left</value>
- <value>inside</value>
- <value>outside</value>
- <value>near-origin</value>
- </choice>
- </define>
- <define name="style-drawing-page-properties-attlist">
- <interleave>
- <optional>
- <attribute name="presentation:transition-type">
- <choice>
- <value>manual</value>
- <value>automatic</value>
- <value>semi-automatic</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:transition-style">
- <choice>
- <value>none</value>
- <value>fade-from-left</value>
- <value>fade-from-top</value>
- <value>fade-from-right</value>
- <value>fade-from-bottom</value>
- <value>fade-from-upperleft</value>
- <value>fade-from-upperright</value>
- <value>fade-from-lowerleft</value>
- <value>fade-from-lowerright</value>
- <value>move-from-left</value>
- <value>move-from-top</value>
- <value>move-from-right</value>
- <value>move-from-bottom</value>
- <value>move-from-upperleft</value>
- <value>move-from-upperright</value>
- <value>move-from-lowerleft</value>
- <value>move-from-lowerright</value>
- <value>uncover-to-left</value>
- <value>uncover-to-top</value>
- <value>uncover-to-right</value>
- <value>uncover-to-bottom</value>
- <value>uncover-to-upperleft</value>
- <value>uncover-to-upperright</value>
- <value>uncover-to-lowerleft</value>
- <value>uncover-to-lowerright</value>
- <value>fade-to-center</value>
- <value>fade-from-center</value>
- <value>vertical-stripes</value>
- <value>horizontal-stripes</value>
- <value>clockwise</value>
- <value>counterclockwise</value>
- <value>open-vertical</value>
- <value>open-horizontal</value>
- <value>close-vertical</value>
- <value>close-horizontal</value>
- <value>wavyline-from-left</value>
- <value>wavyline-from-top</value>
- <value>wavyline-from-right</value>
- <value>wavyline-from-bottom</value>
- <value>spiralin-left</value>
- <value>spiralin-right</value>
- <value>spiralout-left</value>
- <value>spiralout-right</value>
- <value>roll-from-top</value>
- <value>roll-from-left</value>
- <value>roll-from-right</value>
- <value>roll-from-bottom</value>
- <value>stretch-from-left</value>
- <value>stretch-from-top</value>
- <value>stretch-from-right</value>
- <value>stretch-from-bottom</value>
- <value>vertical-lines</value>
- <value>horizontal-lines</value>
- <value>dissolve</value>
- <value>random</value>
- <value>vertical-checkerboard</value>
- <value>horizontal-checkerboard</value>
- <value>interlocking-horizontal-left</value>
- <value>interlocking-horizontal-right</value>
- <value>interlocking-vertical-top</value>
- <value>interlocking-vertical-bottom</value>
- <value>fly-away</value>
- <value>open</value>
- <value>close</value>
- <value>melt</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:transition-speed">
- <ref name="presentationSpeeds"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:type">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:subtype">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:direction">
- <choice>
- <value>forward</value>
- <value>reverse</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="smil:fadeColor">
- <ref name="color"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:duration">
- <ref name="duration"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:visibility">
- <choice>
- <value>visible</value>
- <value>hidden</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="draw:background-size">
- <choice>
- <value>full</value>
- <value>border</value>
- </choice>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:background-objects-visible">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:background-visible">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:display-header">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:display-footer">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:display-page-number">
- <ref name="boolean"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="presentation:display-date-time">
- <ref name="boolean"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="style-drawing-page-properties-elements">
- <optional>
- <ref name="presentation-sound"/>
- </optional>
- </define>
- <define name="string">
- <data type="string"/>
- </define>
- <define name="date">
- <data type="date"/>
- </define>
- <define name="time">
- <data type="time"/>
- </define>
- <define name="dateTime">
- <data type="dateTime"/>
- </define>
- <define name="duration">
- <data type="duration"/>
- </define>
- <define name="integer">
- <data type="integer"/>
- </define>
- <define name="nonNegativeInteger">
- <data type="nonNegativeInteger"/>
- </define>
- <define name="positiveInteger">
- <data type="positiveInteger"/>
- </define>
- <define name="double">
- <data type="double"/>
- </define>
- <define name="anyURI">
- <data type="anyURI"/>
- </define>
- <define name="base64Binary">
- <data type="base64Binary"/>
- </define>
- <define name="ID">
- <data type="ID"/>
- </define>
- <define name="IDREF">
- <data type="IDREF"/>
- </define>
- <define name="IDREFS">
- <data type="IDREFS"/>
- </define>
- <define name="NCName">
- <data type="NCName"/>
- </define>
- <define name="boolean">
- <choice>
- <value>true</value>
- <value>false</value>
- </choice>
- </define>
- <define name="dateOrDateTime">
- <choice>
- <data type="date"/>
- <data type="dateTime"/>
- </choice>
- </define>
- <define name="timeOrDateTime">
- <choice>
- <data type="time"/>
- <data type="dateTime"/>
- </choice>
- </define>
- <define name="language">
- <data type="language"/>
- </define>
- <define name="countryCode">
- <data type="token">
- <param name="pattern">[A-Za-z0-9]{1,8}</param>
- </data>
- </define>
- <define name="languageCode">
- <data type="token">
- <param name="pattern">[A-Za-z]{1,8}</param>
- </data>
- </define>
- <define name="scriptCode">
- <data type="token">
- <param name="pattern">[A-Za-z0-9]{1,8}</param>
- </data>
- </define>
- <define name="character">
- <data type="string">
- <param name="length">1</param>
- </data>
- </define>
- <define name="length">
- <data type="string">
- <param name="pattern">-?([0-9]+(\.[0-9]*)?|\.[0-9]+)((cm)|(mm)|(in)|(pt)|(pc)|(px))</param>
- </data>
- </define>
- <define name="nonNegativeLength">
- <data type="string">
- <param name="pattern">([0-9]+(\.[0-9]*)?|\.[0-9]+)((cm)|(mm)|(in)|(pt)|(pc)|(px))</param>
- </data>
- </define>
- <define name="positiveLength">
- <data type="string">
- <param name="pattern">([0-9]*[1-9][0-9]*(\.[0-9]*)?|0+\.[0-9]*[1-9][0-9]*|\.[0-9]*[1-9][0-9]*)((cm)|(mm)|(in)|(pt)|(pc)|(px))</param>
- </data>
- </define>
- <define name="percent">
- <data type="string">
- <param name="pattern">-?([0-9]+(\.[0-9]*)?|\.[0-9]+)%</param>
- </data>
- </define>
- <define name="zeroToHundredPercent">
- <data type="string">
- <param name="pattern">([0-9]?[0-9](\.[0-9]*)?|100(\.0*)?|\.[0-9]+)%</param>
- </data>
- </define>
- <define name="signedZeroToHundredPercent">
- <data type="string">
- <param name="pattern">-?([0-9]?[0-9](\.[0-9]*)?|100(\.0*)?|\.[0-9]+)%</param>
- </data>
- </define>
- <define name="relativeLength">
- <data type="string">
- <param name="pattern">[0-9]+\*</param>
- </data>
- </define>
- <define name="coordinate">
- <ref name="length"/>
- </define>
- <define name="distance">
- <ref name="length"/>
- </define>
- <define name="color">
- <data type="string">
- <param name="pattern">#[0-9a-fA-F]{6}</param>
- </data>
- </define>
- <define name="angle">
- <data type="string"/>
- </define>
- <define name="CURIE">
- <data type="string">
- <param name="pattern">(([\i-[:]][\c-[:]]*)?:)?.+</param>
- <param name="minLength">1</param>
- </data>
- </define>
- <define name="CURIEs">
- <list>
- <oneOrMore>
- <ref name="CURIE"/>
- </oneOrMore>
- </list>
- </define>
- <define name="SafeCURIE">
- <data type="string">
- <param name="pattern">\[(([\i-[:]][\c-[:]]*)?:)?.+\]</param>
- <param name="minLength">3</param>
- </data>
- </define>
- <define name="URIorSafeCURIE">
- <choice>
- <ref name="anyURI"/>
- <ref name="SafeCURIE"/>
- </choice>
- </define>
- <define name="styleName">
- <data type="NCName"/>
- </define>
- <define name="styleNameRef">
- <choice>
- <data type="NCName"/>
- <empty/>
- </choice>
- </define>
- <define name="styleNameRefs">
- <list>
- <zeroOrMore>
- <data type="NCName"/>
- </zeroOrMore>
- </list>
- </define>
- <define name="variableName">
- <data type="string"/>
- </define>
- <define name="targetFrameName">
- <choice>
- <value>_self</value>
- <value>_blank</value>
- <value>_parent</value>
- <value>_top</value>
- <ref name="string"/>
- </choice>
- </define>
- <define name="valueType">
- <choice>
- <value>float</value>
- <value>time</value>
- <value>date</value>
- <value>percentage</value>
- <value>currency</value>
- <value>boolean</value>
- <value>string</value>
- </choice>
- </define>
- <define name="points">
- <data type="string">
- <param name="pattern">-?[0-9]+,-?[0-9]+([ ]+-?[0-9]+,-?[0-9]+)*</param>
- </data>
- </define>
- <define name="pathData">
- <data type="string"/>
- </define>
- <define name="vector3D">
- <data type="string">
- <param name="pattern">\([ ]*-?([0-9]+(\.[0-9]*)?|\.[0-9]+)([ ]+-?([0-9]+(\.[0-9]*)?|\.[0-9]+)){2}[ ]*\)</param>
- </data>
- </define>
- <define name="namespacedToken">
- <data type="QName">
- <param name="pattern">[^:]+:[^:]+</param>
- </data>
- </define>
- <define name="anyIRI">
- <data type="anyURI"/>
- <dc:description>An IRI-reference as defined in [RFC3987]. See ODF 1.2 Part 1 section 18.3.</dc:description>
- </define>
- <define name="anyAttListOrElements">
- <zeroOrMore>
- <attribute>
- <anyName/>
- <text/>
- </attribute>
- </zeroOrMore>
- <ref name="anyElements"/>
- </define>
- <define name="anyElements">
- <zeroOrMore>
- <element>
- <anyName/>
- <mixed>
- <ref name="anyAttListOrElements"/>
- </mixed>
- </element>
- </zeroOrMore>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/application-vnd.oasis.opendocument.presentation.png b/apps/files_odfviewer/src/webodf/programs/docnosis/application-vnd.oasis.opendocument.presentation.png
deleted file mode 100644
index 1d0fdc08af2..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/application-vnd.oasis.opendocument.presentation.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/application-vnd.oasis.opendocument.spreadsheet.png b/apps/files_odfviewer/src/webodf/programs/docnosis/application-vnd.oasis.opendocument.spreadsheet.png
deleted file mode 100644
index 9614ca81d6a..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/application-vnd.oasis.opendocument.spreadsheet.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/application-vnd.oasis.opendocument.text.png b/apps/files_odfviewer/src/webodf/programs/docnosis/application-vnd.oasis.opendocument.text.png
deleted file mode 100644
index 3fa71f4dc14..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/application-vnd.oasis.opendocument.text.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/docnosis.js b/apps/files_odfviewer/src/webodf/programs/docnosis/docnosis.js
deleted file mode 100644
index 4bddc12cc26..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/docnosis.js
+++ /dev/null
@@ -1,779 +0,0 @@
-/*global runtime, Node, window, DOMParser, core, xmldom, NodeFilter, alert,
- FileReader*/
-runtime.loadClass("core.Zip");
-runtime.loadClass("core.Base64");
-runtime.loadClass("xmldom.RelaxNG");
-
-/** This code runs a number of tests on an ODF document.
- * Ideally, it would use ODFContainer, but for now, it uses a custome container
- * for loaded odf files.
- */
-
-function conformsToPattern(object, pattern, name) {
- "use strict";
- var i;
- if (object === undefined || object === null) {
- return pattern === null || (typeof pattern) !== "object";
- }
- for (i in pattern) {
- if (pattern.hasOwnProperty(i)) {
- if (!(object.hasOwnProperty(i) ||
- (i === "length" && object.length)) ||
- !conformsToPattern(object[i], pattern[i], i)) {
- return false;
- }
- }
- }
- return true;
-}
-
-function getConformingObjects(object, pattern, name) {
- "use strict";
- var c = [], i, j;
- name = name || "??";
- // we do not look inside long arrays and strings atm,
- // detection of these types could be better
- function accept(object) {
- return object !== null && object !== undefined &&
- (typeof object) === "object" &&
- (object.length === undefined || object.length < 1000) &&
- !(object instanceof Node) &&
- !(object.constructor && object.constructor === window.Uint8Array);
- }
- for (i in object) {
- if (object.hasOwnProperty(i) && accept(object[i])) {
- c = c.concat(getConformingObjects(object[i], pattern, i));
- }
- }
- if (conformsToPattern(object, pattern, "?")) {
- c.push(object);
- }
- return c;
-}
-function parseXml(data, errorlog, name) {
- "use strict";
- function getText(e) {
- var str = "", c = e.firstChild;
- while (c) {
- if (c.nodeType === 3) {
- str += c.nodeValue;
- } else {
- str += getText(c);
- }
- c = c.nextSibling;
- }
- return str;
- }
- var str, parser, errorelements;
- try {
- str = runtime.byteArrayToString(data, "utf8");
- parser = new DOMParser();
- str = parser.parseFromString(str, "text/xml");
- if (str.documentElement.localName === "parsererror"
- || str.documentElement.localName === "html") {
- errorelements = str.getElementsByTagName("parsererror");
- if (errorelements.length > 0) {
- errorlog.push("invalid XML in " + name + ": " +
- getText(errorelements[0]));
- str = null;
- }
- }
- } catch (err) {
- errorlog.push(err);
- }
- return str;
-}
-
-/*** the jobs / tests ***/
-
-function ParseXMLJob() {
- "use strict";
- this.inputpattern = { file: { entries: [] } };
- this.outputpattern = {
- file: { entries: [] },
- errors: { parseXmlErrors: [] },
- content_xml: null,
- manifest_xml: null,
- settings_xml: null,
- meta_xml: null,
- styles_xml: null
- };
- function parseXmlFiles(input, position, callback) {
- var e = input.file.entries,
- filename,
- ext,
- dom;
- if (position >= e.length) {
- return callback();
- }
- filename = e[position].filename;
- ext = filename.substring(filename.length - 4);
- if (ext === ".xml" || ext === ".rdf") {
- dom = parseXml(e[position].data, input.errors.parseXmlErrors,
- filename);
- if (filename === "content.xml") {
- input.content_xml = dom;
- } else if (filename === "META-INF/manifest.xml") {
- input.manifest_xml = dom;
- } else if (filename === "styles.xml") {
- input.styles_xml = dom;
- } else if (filename === "meta.xml") {
- input.meta_xml = dom;
- } else if (filename === "settings.xml") {
- input.settings_xml = dom;
- }
- e[position].dom = dom;
- }
- window.setTimeout(function () {
- parseXmlFiles(input, position + 1, callback);
- }, 0);
- }
- this.run = function (input, callback) {
- input.errors = input.errors || {};
- input.errors.parseXmlErrors = [];
- input.content_xml = null;
- input.manifest_xml = null;
- input.styles_xml = null;
- input.meta_xml = null;
- input.settings_xml = null;
- parseXmlFiles(input, 0, callback);
- };
-}
-function UnpackJob() {
- "use strict";
- this.inputpattern = { file: { path: "", data: { length: 0 } } };
- this.outputpattern = {
- file: { entries: [], dom: null }, errors: { unpackErrors: [] }
- };
- function getText(e) {
- var str = "", c = e.firstChild;
- while (c) {
- if (c.nodeType === 3) {
- str += c.nodeValue;
- } else {
- str += getText(c);
- }
- c = c.nextSibling;
- }
- return str;
- }
- function loadZipEntries(input, position, callback) {
- if (position >= input.file.entries.length) {
- return callback();
- }
- var e = input.file.entries[position];
- e.load(function (err, data) {
- if (err) {
- input.errors.unpackErrors.push(err);
- }
- e.error = err;
- e.data = data;
- window.setTimeout(function () {
- loadZipEntries(input, position + 1, callback);
- }, 0);
- });
- }
- function loadZip(input, callback) {
- var zip = new core.Zip(input.file.path, function (err, zip) {
- var i;
- if (err) {
- input.errors.unpackErrors.push(err);
- callback();
- } else {
- input.file.entries = zip.getEntries();
- loadZipEntries(input, 0, callback);
- }
- });
- }
- function loadXml(input, callback) {
- input.file.dom = parseXml(input.file.data, input.errors.unpackErrors,
- input.file.name);
- callback();
- }
- this.run = function (input, callback) {
- input.errors = input.errors || {};
- input.errors.unpackErrors = [];
- input.file.dom = null;
- input.file.entries = [];
-
- if (input.file.data.length < 1) {
- input.errors.unpackErrors.push("Input data is empty.");
- return;
- }
- if (input.file.data[0] === 80) { // a ZIP file starts with 'P'
- loadZip(input, callback);
- } else {
- loadXml(input, callback);
- }
- };
-}
-function MimetypeTestJob(odffile) {
- "use strict";
- this.inputpattern = {
- file: { entries: [], dom: null },
- manifest_xml: null
- };
- this.outputpattern = { mimetype: "", errors: { mimetypeErrors: [] } };
- var manifestns = "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0";
- function getManifestMimetype(manifest) {
- if (!manifest) {
- return null;
- }
- var path, mimetype, node;
- node = manifest.documentElement.firstChild;
- while (node) {
- if (node.nodeType === 1 && node.localName === "file-entry" &&
- node.namespaceURI === manifestns) {
- path = node.getAttributeNS(manifestns, "full-path");
- if (path === "/") {
- mimetype = node.getAttributeNS(manifestns, "media-type");
- break;
- }
- }
- node = node.nextSibling;
- }
- return mimetype;
- }
- this.run = function (input, callback) {
- input.mimetype = null;
- input.errors.mimetypeErrors = [];
- var mime = null,
- altmime,
- e = input.file.entries,
- i;
- if (input.file.dom) {
- mime = input.file.dom.documentElement.getAttributeNS(
- "urn:oasis:names:tc:opendocument:xmlns:office:1.0", "mimetype");
- } else {
- if (e.length < 1 || e[0].filename !== "mimetype") {
- input.errors.mimetypeErrors.push(
- "First file in zip is not 'mimetype'");
- }
- for (i = 0; i < e.length; i += 1) {
- if (e[i].filename === "mimetype") {
- mime = runtime.byteArrayToString(e[i].data, "binary");
- break;
- }
- }
- if (mime) {
- altmime = input.file.data.slice(38, 38 + mime.length);
- altmime = runtime.byteArrayToString(altmime, "binary");
- if (mime !== altmime) {
- input.errors.mimetypeErrors.push(
- "mimetype should start at byte 38 in the zip file.");
- }
- }
- // compare with mimetype from manifest_xml
- altmime = getManifestMimetype(input.manifest_xml);
- if (altmime !== mime) {
- input.errors.mimetypeErrors.push(
- "manifest.xml has a different mimetype.");
- }
- }
- if (!mime) {
- input.errors.mimetypeErrors.push("No mimetype was found.");
- }
- input.mimetype = mime;
- callback();
- };
-}
-function VersionTestJob() {
- "use strict";
- this.inputpattern = {
- file: { dom: null },
- content_xml: null,
- styles_xml: null,
- meta_xml: null,
- settings_xml: null,
- manifest_xml: null
- };
- this.outputpattern = { version: "", errors: { versionErrors: [] } };
- var officens = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
- function getVersion(dom, filename, log, vinfo, filerequired) {
- var v, ns = officens;
- if (!dom) {
- if (filerequired) {
- log.push(filename + " is missing, so version cannot be found.");
- }
- return;
- }
- if (filename === "META-INF/manifest.xml") {
- ns = "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0";
- }
- if (!dom.documentElement.hasAttributeNS(ns, "version")) {
- if (vinfo.versionrequired) {
- log.push(filename + " has no version number.");
- }
- return;
- }
- v = dom.documentElement.getAttributeNS(ns, "version");
- if (vinfo.version === undefined) {
- vinfo.version = v;
- // version number is required since ODF 1.2
- vinfo.needversion = vinfo.version === "1.2";
- vinfo.versionSource = filename;
- } else if (v !== vinfo.version) {
- log.push(vinfo.versionSource + " and " + filename + " " +
- " have different version number.");
- }
- }
- this.run = function (input, callback) {
- input.errors.versionErrors = [];
- var v,
- e = input.file.entries,
- log = input.errors.versionErrors,
- vinfo = {
- version: undefined,
- needversion: null,
- versionSource: null
- },
- contentxmlhasnoversionnumber;
- if (input.file.dom) {
- getVersion(input.file.dom, input.file.name, log, vinfo, true);
- } else {
- // until we know the version number, we cannot claim that
- // content.xml needs a version number
- getVersion(input.content_xml, "content.xml", log, vinfo, true);
- contentxmlhasnoversionnumber = vinfo.version === undefined;
- getVersion(input.manifest_xml, "META-INF/manifest.xml", log,
- vinfo, true);
- getVersion(input.styles_xml, "styles.xml", log, vinfo);
- getVersion(input.meta_xml, "meta.xml", log, vinfo);
- getVersion(input.settings_xml, "settings.xml", log, vinfo);
- if (vinfo.needversion && contentxmlhasnoversionnumber) {
- log.push("content.xml has no version number.");
- }
- }
- input.version = vinfo.version;
- callback();
- };
-}
-function GetThumbnailJob() {
- "use strict";
- var base64 = new core.Base64();
- this.inputpattern = { file: { entries: [] }, errors: {}, mimetype: "" };
- this.outputpattern = { thumbnail: "", errors: { thumbnailErrors: [] } };
- this.run = function (input, callback) {
- input.thumbnail = null;
- input.errors.thumbnailErrors = [];
- var i, e = input.file.entries, mime = input.mimetype, thumb = null;
- if (mime === "application/vnd.oasis.opendocument.text") {
- thumb = "application-vnd.oasis.opendocument.text.png";
- } else if (mime === "application/vnd.oasis.opendocument.spreadsheet") {
- thumb = "application-vnd.oasis.opendocument.spreadsheet.png";
- } else if (mime === "application/vnd.oasis.opendocument.presentation") {
- thumb = "application-vnd.oasis.opendocument.presentation.png";
- }
- for (i = 0; i < e.length; i += 1) {
- if (e[i].filename === "Thumbnails/thumbnail.png") {
- thumb = "data:image/png;base64," +
- base64.convertUTF8ArrayToBase64(e[i].data);
- break;
- }
- }
- input.thumbnail = thumb;
- callback();
- };
-}
-function RelaxNGJob() {
- "use strict";
- var parser = new xmldom.RelaxNGParser(),
- validators = {};
- this.inputpattern = { file: {dom: null}, version: null };
- this.outputpattern = { errors: { relaxngErrors: [] } };
- function loadValidator(ns, version, callback) {
- var rng;
- if (ns === "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0") {
- if (version === "1.2") {
- rng = "OpenDocument-v1.2-cos01-manifest-schema.rng";
- } else if (version === "1.1") {
- rng = "OpenDocument-manifest-schema-v1.1.rng";
- } else if (version === "1.0") {
- rng = "OpenDocument-manifest-schema-v1.0-os.rng";
- }
- } else if (ns === "urn:oasis:names:tc:opendocument:xmlns:office:1.0") {
- if (version === "1.2") {
- rng = "OpenDocument-v1.2-cos01-schema.rng";
- } else if (version === "1.1") {
- rng = "OpenDocument-schema-v1.1.rng";
- } else if (version === "1.0") {
- rng = "OpenDocument-schema-v1.0-os.rng";
- }
- }
- if (rng) {
- runtime.loadXML(rng, function (err, dom) {
- var relaxng;
- if (err) {
- runtime.log(err);
- } else {
- relaxng = new xmldom.RelaxNG();
- err = parser.parseRelaxNGDOM(dom, relaxng.makePattern);
- if (err) {
- runtime.log(err);
- } else {
- relaxng.init(parser.rootPattern);
- }
- }
- validators[ns] = validators[ns] || {};
- validators[ns][version] = relaxng;
- callback(relaxng);
- });
- } else {
- callback(null);
- }
- }
- function getValidator(ns, version, callback) {
- if (ns === "urn:oasis:names:tc:opendocument:xmlns:office:1.0" ||
- ns === "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0") {
- if (!version) {
- version = "1.1";
- }
- }
- if (validators[ns] && validators[ns][version]) {
- return callback(validators[ns][version]);
- }
- loadValidator(ns, version, callback);
- }
- function validate(log, dom, filename, version, callback) {
- var ns = dom.documentElement.namespaceURI;
- getValidator(ns, version, function (relaxng) {
- if (!relaxng) {
- return callback();
- }
- var walker = dom.createTreeWalker(dom.firstChild, 0xFFFFFFFF,
- { acceptNode: function(node) {
- return NodeFilter.FILTER_ACCEPT; }
- }, false),
- err;
-runtime.log("START VALIDATING");
- err = relaxng.validate(walker, function (err) {
-runtime.log("FINISHED VALIDATING");
- var i;
- if (err) {
- for (i = 0; i < err.length; i += 1) {
- log.push(filename + ": " + err[i]);
- }
- }
- callback();
- });
- });
- }
- function validateEntries(log, entries, position, version, callback) {
- if (position >= entries.length) {
- return callback();
- }
- var e = entries[position];
- if (e.dom) {
- validate(log, e.dom, e.filename, version, function () {
- window.setTimeout(function () {
- validateEntries(log, entries, position + 1, version,
- callback);
- }, 0);
- });
- } else {
- validateEntries(log, entries, position + 1, version, callback);
- }
- }
- this.run = function (input, callback) {
- input.errors = input.errors || {};
- input.errors.relaxngErrors = [];
- runtime.log(input.version);
- if (input.file.dom) {
- validate(input.errors.relaxngErrors, input.file.dom,
- input.file.path, input.version, callback);
- return;
- }
- var i, e = input.file.entries;
- validateEntries(input.errors.relaxngErrors, input.file.entries, 0,
- input.version, callback);
- };
-}
-
-function DataRenderer(parentelement) {
- "use strict";
- var doc = parentelement.ownerDocument,
- element = doc.createElement("div"),
- lastrendertime,
- delayedRenderComing,
- renderinterval = 300; // minimal milliseconds between renders
- function clear(element) {
- while (element.firstChild) {
- element.removeChild(element.firstChild);
- }
- }
- function addParagraph(div, text) {
- var p = doc.createElement("p");
- p.appendChild(doc.createTextNode(text));
- div.appendChild(p);
- }
- function addSpan(parent, nodename, text) {
- var e = doc.createElement(nodename);
- e.appendChild(doc.createTextNode(text));
- parent.appendChild(e);
- }
- function addErrors(div, e, active) {
- var i, o;
- for (i in e) {
- if (e.hasOwnProperty(i)) {
- o = e[i];
- if (active && ((typeof o) === "string"
- || o instanceof String)) {
- addParagraph(div, o);
- } else if (o && (typeof o) === "object" &&
- !(o instanceof Node) &&
- !(o.constructor &&
- o.constructor === window.Uint8Array)) {
- addErrors(div, o, active || i === "errors");
- }
- }
- }
- }
- function renderFile(data) {
- var div = doc.createElement("div"),
- h1 = doc.createElement("h1"),
- icon = doc.createElement("img");
- div.style.clear = "both";
- div.appendChild(h1);
- div.appendChild(icon);
- h1.appendChild(doc.createTextNode(data.file.path));
- element.appendChild(div);
- if (data.thumbnail) {
- icon.src = data.thumbnail;
- }
- icon.style.width = "128px";
- icon.style.float = "left";
- icon.style.mozBoxShadow = icon.style.webkitBoxShadow =
- icon.style.boxShadow = "3px 3px 4px #000";
- icon.style.marginRight = icon.style.marginBottom = "10px";
- addParagraph(div, "mimetype: " + data.mimetype);
- addParagraph(div, "version: " + data.version);
- addParagraph(div, "document representation: " +
- ((data.file.dom) ? "single XML document" :"package"));
- addErrors(div, data, false);
- }
- function dorender(data) {
- clear(element);
- var i;
- for (i = 0; i < data.length; i += 1) {
- renderFile(data[i]);
- }
- }
- this.render = function render(data) {
- var now = Date.now();
- if (!lastrendertime || now - lastrendertime > renderinterval) {
- lastrendertime = now;
- dorender(data);
- } else if (!delayedRenderComing) {
- delayedRenderComing = true;
- window.setTimeout(function () {
- delayedRenderComing = false;
- lastrendertime = now + renderinterval;
- dorender(data);
- }, renderinterval);
- }
- };
- parentelement.appendChild(element);
-}
-
-function JobRunner(datarenderer) {
- "use strict";
- var jobrunner = this,
- jobtypes = [],
- data,
- busy = false,
- todo = [];
-
- jobtypes.push(new UnpackJob());
- jobtypes.push(new MimetypeTestJob());
- jobtypes.push(new GetThumbnailJob());
- jobtypes.push(new VersionTestJob());
- jobtypes.push(new ParseXMLJob());
- jobtypes.push(new RelaxNGJob());
-
- function run() {
- if (busy) {
- return;
- }
- var job = todo.shift();
- if (job) {
- busy = true;
- job.job.run(job.object, function () {
- busy = false;
- if (!conformsToPattern(job.object, job.job.outputpattern)) {
- throw "Job does not give correct output.";
- }
- datarenderer.render(data);
- window.setTimeout(run, 0);
- });
- }
- }
-
- function update(ignore, callback) {
- var i, jobtype, j, inobjects, outobjects;
- todo = [];
- for (i = 0; i < jobtypes.length; i += 1) {
- jobtype = jobtypes[i];
- inobjects = getConformingObjects(data, jobtype.inputpattern);
- outobjects = getConformingObjects(data, jobtype.outputpattern);
- for (j = 0; j < inobjects.length; j += 1) {
- if (outobjects.indexOf(inobjects[j]) === -1) {
- todo.push({job: jobtype, object: inobjects[j]});
- }
- }
- }
- if (todo.length > 0) {
- // run update again after all todos are done
- todo.push({job: jobrunner, object: null});
- }
- if (callback) {
- callback();
- } else {
- run();
- }
- }
-
- this.run = update;
-
- this.setData = function setData(newdata) {
- data = newdata;
- if (busy) {
- todo = [];
- todo.push({job: jobrunner, object: null});
- } else {
- update();
- }
- };
-}
-function LoadingFile(file) {
- "use strict";
- var data,
- error,
- readRequests = [];
- function load(callback) {
- var reader = new FileReader();
- reader.onloadend = function(evt) {
- data = runtime.byteArrayFromString(evt.target.result, "binary");
- error = evt.target.error && String(evt.target.error);
- var i = 0;
- for (i = 0; i < readRequests.length; i += 1) {
- readRequests[i]();
- }
- readRequests = undefined;
- reader = undefined;
- callback(error, data);
- };
- reader.readAsBinaryString(file);
- }
- this.file = file;
- this.read = function (offset, length, callback) {
- function read() {
- if (error) {
- return callback(error);
- }
- if (data) {
- return callback(error, data.slice(offset, offset + length));
- }
- readRequests.push(read);
- }
- read();
- };
- this.load = load;
-}
-function Docnosis(element) {
- "use strict";
- var doc = element.ownerDocument,
- form,
- diagnoses = doc.createElement("div"),
- openedFiles = {},
- datarenderer = new DataRenderer(diagnoses),
- jobrunner = new JobRunner(datarenderer),
- jobrunnerdata = [];
-
- function dragHandler(evt) {
- var over = evt.type === "dragover" && evt.target.nodeName !== "INPUT";
- if (over || evt.type === "drop") {
- evt.stopPropagation();
- evt.preventDefault();
- }
- if (evt.target.style) {
- evt.target.style.background = (over ? "#CCCCCC" : "inherit");
- }
- }
-
- function fileSelectHandler(evt) {
- // cancel event and hover styling
- dragHandler(evt);
-
- function diagnoseFile(file) {
- var loadingfile, path;
- path = file.name;
- loadingfile = new LoadingFile(file);
- openedFiles[path] = loadingfile;
- loadingfile.load(function (error, data) {
- jobrunnerdata.push({file:{
- path: path,
- data: data
- }});
- jobrunner.setData(jobrunnerdata);
- });
- }
- // process all File objects
- var i, files, div;
- files = (evt.target && evt.target.files) ||
- (evt.dataTransfer && evt.dataTransfer.files);
- if (files) {
- for (i = 0; files && i < files.length; i += 1) {
- div = doc.createElement("div");
- diagnoses.appendChild(div);
- diagnoseFile(files[i]);
- }
- } else {
- alert("File(s) could not be opened in this browser.");
- }
- }
-
- function createForm() {
- var form = doc.createElement("form"),
- fieldset = doc.createElement("fieldset"),
- legend = doc.createElement("legend"),
- input = doc.createElement("input");
- form = doc.createElement("form");
- form.appendChild(fieldset);
- fieldset.appendChild(legend);
- input.setAttribute("type", "file");
- input.setAttribute("name", "fileselect[]");
- input.setAttribute("multiple", "multiple");
- input.addEventListener("change", fileSelectHandler, false);
- fieldset.appendChild(input);
- fieldset.appendChild(doc.createTextNode("or drop files here"));
- legend.appendChild(doc.createTextNode("docnosis"));
- form.addEventListener("dragover", dragHandler, false);
- form.addEventListener("dragleave", dragHandler, false);
- form.addEventListener("drop", fileSelectHandler, false);
- return form;
- }
-
- function enhanceRuntime() {
- var read = runtime.read,
- getFileSize = runtime.getFileSize;
- runtime.read = function (path, offset, length, callback) {
- if (openedFiles.hasOwnProperty(path)) {
- return openedFiles[path].read(offset, length, callback);
- } else {
- return read(path, offset, length, callback);
- }
- };
- runtime.getFileSize = function (path, callback) {
- if (openedFiles.hasOwnProperty(path)) {
- return callback(openedFiles[path].file.size);
- } else {
- return getFileSize(path, callback);
- }
- };
- }
-
- form = createForm();
- element.appendChild(form);
- element.appendChild(diagnoses);
- enhanceRuntime();
-}
diff --git a/apps/files_odfviewer/src/webodf/programs/docnosis/index.html b/apps/files_odfviewer/src/webodf/programs/docnosis/index.html
deleted file mode 100644
index cd56d4f7463..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/docnosis/index.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
- <title>docnosis</title>
- <!-- <script src="../../webodf/webodf.js" type="text/javascript" charset="utf-8"></script> -->
- <script src="../../webodf/lib/runtime.js" type="text/javascript" charset="utf-8"></script>
- <script type="text/javascript">//<![CDATA[
-runtime.libraryPaths = function () {
- return ["../../webodf/lib/"];
-};
- //]]></script>
- <script src="docnosis.js" type="text/javascript" charset="utf-8"></script>
- <script type="text/javascript">//<![CDATA[
-runtime.libraryPaths = function () {
- return ["../../webodf/lib/"];
-};
-window.addEventListener("load", function () {
- var docnosis = document.getElementById("docnosis");
- new Docnosis(docnosis);
-}, false);
- //]]></script>
- </head>
- <body>
- <div id="docnosis"></div>
- </body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/programs/firefoxextension/CMakeLists.txt b/apps/files_odfviewer/src/webodf/programs/firefoxextension/CMakeLists.txt
deleted file mode 100644
index 92d1e19f7c2..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/firefoxextension/CMakeLists.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-# the files that go into the extension
-set(FIREFOXEXTENSIONFILES
- bootstrap.js
- chrome.manifest
- skin/default/icon.png
- content/odf.html
- components/odfContentHandler.js
-)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/install.rdf.in
- ${CMAKE_CURRENT_SOURCE_DIR}/install.rdf)
-set(WEBODFXPI ${CMAKE_CURRENT_BINARY_DIR}/webodf-${WEBODF_VERSION}.xpi)
-add_custom_command(
- OUTPUT ${WEBODFXPI}
- # copy the common webodf.css and webodf.js
- COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different
- ${CMAKE_SOURCE_DIR}/webodf/webodf.css
- ${CMAKE_CURRENT_SOURCE_DIR}/content/webodf.css
- COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different
- ${CMAKE_BINARY_DIR}/webodf/webodf.js
- ${CMAKE_CURRENT_SOURCE_DIR}/content/webodf.js
- # zip using javascript code running in node.js
- COMMAND ${NODE} ARGS ../../webodf/lib/runtime.js packextension.js
- ${WEBODFXPI}
- ${FIREFOXEXTENSIONFILES}
- content/webodf.js
- content/webodf.css
- install.rdf
- DEPENDS NodeJS
- packextension.js ${FIREFOXEXTENSIONFILES}
- install.rdf.in
- ${CMAKE_SOURCE_DIR}/webodf/webodf.css
- ${CMAKE_BINARY_DIR}/webodf/webodf.js
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-add_custom_target(firefoxextension ALL DEPENDS ${WEBODFXPI})
diff --git a/apps/files_odfviewer/src/webodf/programs/firefoxextension/bootstrap.js b/apps/files_odfviewer/src/webodf/programs/firefoxextension/bootstrap.js
deleted file mode 100644
index c95dbd4a908..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/firefoxextension/bootstrap.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/*global Components: true, dump: true, Services: true*/
-
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cm = Components.manager;
-var Cu = Components.utils;
-
-Cu["import"]('resource://gre/modules/Services.jsm');
-
-function log(str) {
- "use strict";
- dump(str + '\n');
-}
-
-function startup(aData, aReason) {
- "use strict";
- var manifestPath = 'chrome.manifest',
- file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsILocalFile);
- try {
- file.initWithPath(aData.installPath.path);
- file.append(manifestPath);
- Cm.QueryInterface(Ci.nsIComponentRegistrar).autoRegister(file);
- } catch (e) {
- log(e);
- }
-}
-
-function shutdown(aData, aReason) {
- "use strict";
-}
-
-function install(aData, aReason) {
- "use strict";
- var url = 'chrome://webodf.js/content/odf.html?file=%s';
- Services.prefs.setCharPref('extensions.webodf.js.url', url);
-}
diff --git a/apps/files_odfviewer/src/webodf/programs/firefoxextension/chrome.manifest b/apps/files_odfviewer/src/webodf/programs/firefoxextension/chrome.manifest
deleted file mode 100644
index b6f6e75cfb9..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/firefoxextension/chrome.manifest
+++ /dev/null
@@ -1,13 +0,0 @@
-content webodf.js content/
-skin webodf.js default skin/default/
-
-component {afe5fa21-709d-4916-b51c-56f60d574a0a} components/odfContentHandler.js
-contract @mozilla.org/uriloader/content-handler;1?type=application/vnd.oasis.opendocument.text {afe5fa21-709d-4916-b51c-56f60d574a0a}
-contract @mozilla.org/uriloader/content-handler;1?type=application/vnd.oasis.opendocument.spreadsheet {afe5fa21-709d-4916-b51c-56f60d574a0a}
-contract @mozilla.org/uriloader/content-handler;1?type=application/vnd.oasis.opendocument.presentation {afe5fa21-709d-4916-b51c-56f60d574a0a}
-category ext-to-type-mapping odt application/vnd.oasis.opendocument.text
-category ext-to-type-mapping fodt application/vnd.oasis.opendocument.text
-category ext-to-type-mapping ods application/vnd.oasis.opendocument.spreadsheet
-category ext-to-type-mapping fods application/vnd.oasis.opendocument.spreadsheet
-category ext-to-type-mapping odp application/vnd.oasis.opendocument.presentation
-category ext-to-type-mapping fodp application/vnd.oasis.opendocument.presentation
diff --git a/apps/files_odfviewer/src/webodf/programs/firefoxextension/components/odfContentHandler.js b/apps/files_odfviewer/src/webodf/programs/firefoxextension/components/odfContentHandler.js
deleted file mode 100644
index 47a3d349ac7..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/firefoxextension/components/odfContentHandler.js
+++ /dev/null
@@ -1,196 +0,0 @@
-/*jslint bitwise: true*/
-/*global Components: true, dump: true, Uint8Array: true, Services: true,
- XPCOMUtils: true*/
-var Cc = Components.classes;
-var Ci = Components.interfaces;
-var Cr = Components.results;
-var Cu = Components.utils;
-
-var ODF_CONTENT_TYPE_PREFIX = 'application/vnd.oasis.opendocument.';
-var NS_ERROR_WONT_HANDLE_CONTENT = 0x805d0001;
-
-Cu["import"]('resource://gre/modules/XPCOMUtils.jsm');
-Cu["import"]('resource://gre/modules/Services.jsm');
-
-function log(aMsg) {
- "use strict";
- var msg = 'odfContentHandler.js: ' + (aMsg.join ? aMsg.join('') : aMsg);
- Cc['@mozilla.org/consoleservice;1'].getService(Ci.nsIConsoleService)
- .logStringMessage(msg);
- dump(msg + '\n');
-}
-
-function fireEventTo(aName, aData, aWindow) {
- "use strict";
- var mywindow = aWindow.wrappedJSObject,
- evt = mywindow.document.createEvent('CustomEvent');
- evt.initCustomEvent('odf' + aName, false, false, aData);
- mywindow.document.dispatchEvent(evt);
-}
-
-function loadDocument(aWindow, aDocumentUrl) {
- "use strict";
- var xhr = Cc['@mozilla.org/xmlextras/xmlhttprequest;1']
- .createInstance(Ci.nsIXMLHttpRequest);
- xhr.onprogress = function updateProgress(evt) {
- if (evt.lengthComputable) {
- fireEventTo(evt.type, evt.loaded / evt.total, aWindow);
- }
- };
-
- xhr.onerror = function error(evt) {
- fireEventTo(evt.type, false, aWindow);
- };
-
- xhr.onload = function load(evt) {
- var data = (xhr.mozResponseArrayBuffer || xhr.mozResponse ||
- xhr.responseArrayBuffer || xhr.response),
- view,
- mywindow,
- arrayBuffer,
- view2,
- array,
- i;
- try {
- view = new Uint8Array(data);
- mywindow = aWindow.wrappedJSObject;
- arrayBuffer = new mywindow.ArrayBuffer(data.byteLength);
- view2 = new mywindow.Uint8Array(arrayBuffer);
- view2.set(view);
- array = [];
- array.length = view2.byteLength;
- for (i = 0; i < view2.byteLength; i += 1) {
- array[i] = view2[i];
- }
- fireEventTo(evt.type, array, aWindow);
- } catch (e) {
- log('Error - ' + e);
- }
- };
-
- xhr.open('GET', aDocumentUrl);
- xhr.responseType = 'arraybuffer';
- xhr.send(null);
-}
-
-var WebProgressListener = {
- init: function WebProgressListenerInit(aWindow, aUrl) {
- "use strict";
- this.locationHasChanged = false;
- this.documentUrl = aUrl;
-
- var flags = Ci.nsIWebProgress.NOTIFY_LOCATION |
- Ci.nsIWebProgress.NOTIFY_STATE_NETWORK |
- Ci.nsIWebProgress.NOTIFY_STATE_DOCUMENT,
- docShell = aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIDocShell),
- webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebProgress);
- try {
- webProgress.removeProgressListener(this);
- } catch (e) {
- }
- webProgress.addProgressListener(this, flags);
- },
-
- onStateChange: function onStateChange(aWebProgress, aRequest, aStateFlags,
- aStatus) {
- "use strict";
- var complete = Ci.nsIWebProgressListener.STATE_IS_WINDOW +
- Ci.nsIWebProgressListener.STATE_STOP;
- if ((aStateFlags & complete) === complete && this.locationHasChanged) {
- aWebProgress.removeProgressListener(this);
- loadDocument(aWebProgress.DOMWindow, this.documentUrl);
- }
- },
-
- onProgressChange: function onProgressChange(aWebProgress, aRequest,
- aCurSelf, aMaxSelf, aCurTotal,
- aMaxTotal) {
- "use strict";
- },
-
- onLocationChange: function onLocationChange(aWebProgress, aRequest,
- aLocationURI) {
- "use strict";
- this.locationHasChanged = true;
- },
-
- onStatusChange: function onStatusChange(aWebProgress, aRequest, aStatus,
- aMessage) {
- "use strict";
- },
-
- onSecurityChange: function onSecurityChange(aWebProgress, aRequest, aState) {
- "use strict";
- },
-
- QueryInterface: function QueryInterface(aIID) {
- "use strict";
- if (aIID.equals(Ci.nsIWebProgressListener) ||
- aIID.equals(Ci.nsISupportsWeakReference) ||
- aIID.equals(Ci.nsISupports)) {
- return this;
- }
- throw Components.results.NS_ERROR_NO_INTERFACE;
- }
-};
-
-function odfContentHandler() {
- "use strict";
-}
-
-odfContentHandler.prototype = {
- handleContent: function handleContent(aMimetype, aContext, aRequest) {
- "use strict";
-
- if (!(aMimetype.indexOf(ODF_CONTENT_TYPE_PREFIX) === 0 ||
- aMimetype === "application/octet-stream")) {
- throw NS_ERROR_WONT_HANDLE_CONTENT;
- }
-
- if (!(aRequest instanceof Ci.nsIChannel)) {
- throw NS_ERROR_WONT_HANDLE_CONTENT;
- }
-
- var mywindow = null,
- callbacks,
- uri = aRequest.URI,
- targetUrl = uri.spec,
- tail = targetUrl.substring(targetUrl.length-9),
- url;
-
- // if the url ends with a download parameter, then do not handle it
- if (tail === "#download") {
- throw NS_ERROR_WONT_HANDLE_CONTENT;
- }
-
- callbacks = aRequest.notificationCallbacks ||
- aRequest.loadGroup.notificationCallbacks;
- if (!callbacks) {
- return;
- }
-
- mywindow = callbacks.getInterface(Ci.nsIDOMWindow);
-
- WebProgressListener.init(mywindow, uri.spec);
-
- try {
- url = Services.prefs.getCharPref('extensions.webodf.js.url');
- //url = url.replace('%s', encodeURIComponent(targetUrl));
- url = url.replace('%s', targetUrl);
- } catch (e) {
- log('Error retrieving the webodf base url - ' + e);
- throw NS_ERROR_WONT_HANDLE_CONTENT;
- }
-
- aRequest.cancel(Cr.NS_BINDING_ABORTED);
- mywindow.location = url;
- },
-
- classID: Components.ID('{afe5fa21-709d-4916-b51c-56f60d574a0a}'),
- QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentHandler])
-};
-
-var NSGetFactory = XPCOMUtils.generateNSGetFactory([odfContentHandler]);
diff --git a/apps/files_odfviewer/src/webodf/programs/firefoxextension/content/odf.html b/apps/files_odfviewer/src/webodf/programs/firefoxextension/content/odf.html
deleted file mode 100644
index 0dc023aed8e..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/firefoxextension/content/odf.html
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
- <style type="text/css" media="screen">
- body, html, div {
- padding: 0px;
- margin: 0px;
- border: 0px;
- }
- body, html {
- height: 100%;
- text-align: center;
- }
- html > body {
- background: black;
- }
- div#toolbar {
- background: white;
- padding: 7px;
- border-bottom: 1px solid black;
- }
- div#toolbar > span {
- border: 1px solid black;
- padding: 2px;
- }
- div#toolbar > span:hover {
- background: #CCCCCC;
- }
- </style>
- <link rel="stylesheet" type="text/css" href="webodf.css"/>
- <script src="webodf.js" type="text/javascript" charset="utf-8"></script>
- <script type="text/javascript" charset="utf-8">//<![CDATA[
-var webodffirefox = {
- url: undefined,
- data: undefined,
- odfcanvas: undefined
-};
-window.addEventListener('odfload', function webViewerLoad(evt) {
- runtime.loadClass("odf.OdfCanvas");
- var wf = webodffirefox,
- params = document.location.search.substring(1).split('&'),
- param,
- odfelement = document.getElementById("odf"),
- data = evt.detail;
- for (i = 0; i < params.length; i += 1) {
- param = params[i].split('=');
- params[unescape(param[0])] = unescape(param[1]);
- }
- wf.url = params.file;
- wf.data = data;
- wf.odfcanvas = new odf.OdfCanvas(odfelement);
-
- runtime.read = function (path, offset, length, callback) {
- var d = data.slice(offset, offset + length);
- callback(null, d);
- }
- runtime.getFileSize = function (path, callback) {
- callback(data.length);
- }
- wf.odfcanvas.load(params.file);
-}, true);
-function addButton(parent, label, onclick) {
- var doc = parent.ownerDocument,
- button = doc.createElement("span");
- button.appendChild(doc.createTextNode(label));
- button.onclick = onclick;
- parent.appendChild(button);
-}
-function init() {
- runtime.loadClass("core.Base64");
- var toolbar = document.getElementById("toolbar");
- addButton(toolbar, "download", function onclick() {
- window.location.href = webodffirefox.url + "#download";
- });
-}
-window.setTimeout(function () {
- init();
-}, 1);
-//--></script>
- <title></title>
-</head>
-<body>
- <div id="toolbar">
- </div>
- <div id="odf"/>
-</body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/programs/firefoxextension/install.rdf.in b/apps/files_odfviewer/src/webodf/programs/firefoxextension/install.rdf.in
deleted file mode 100644
index caf59198a20..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/firefoxextension/install.rdf.in
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-
- <Description about="urn:mozilla:install-manifest">
- <em:id>uriloader@webodf.js</em:id>
- <em:name>WebODF</em:name>
- <em:type>2</em:type>
- <em:version>@WEBODF_VERSION@</em:version>
- <em:iconURL>chrome://webodf.js/skin/icon.png</em:iconURL>
- <em:targetApplication>
- <!-- Firefox -->
- <Description>
- <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
- <em:minVersion>3.6</em:minVersion>
- <em:maxVersion>9.*</em:maxVersion>
- </Description>
- </em:targetApplication>
- <em:targetApplication>
- <!-- Fennec -->
- <Description>
- <em:id>{a23983c0-fd0e-11dc-95ff-0800200c9a66}</em:id>
- <em:minVersion>4.0</em:minVersion>
- <em:maxVersion>9.*</em:maxVersion>
- </Description>
- </em:targetApplication>
- <em:bootstrap>true</em:bootstrap>
- <em:unpack>true</em:unpack>
- <em:creator>Jos van den Oever</em:creator>
- <em:description>OpenDocument Viewer</em:description>
- <em:homepageURL>http://webodf.org/</em:homepageURL>
- </Description>
-</RDF>
diff --git a/apps/files_odfviewer/src/webodf/programs/firefoxextension/packextension.js b/apps/files_odfviewer/src/webodf/programs/firefoxextension/packextension.js
deleted file mode 100644
index ce606817eae..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/firefoxextension/packextension.js
+++ /dev/null
@@ -1,77 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, core: true*/
-runtime.loadClass("core.Zip");
-runtime.loadClass("core.Base64");
-
-function addFiles(zip, pos, files, callback) {
- "use strict";
- if (pos >= files.length) {
- zip.write(function (err) {
- return callback(err);
- });
- return;
- }
- var path = files[pos];
- runtime.readFile(path, "binary", function (err, data) {
- var base64;
- if (err) {
- return callback(err);
- }
- if (path === "content/webodf.js") {
- // replace eval() with evil(), since Firefox does not approve of it
- base64 = new core.Base64();
- data = base64.convertUTF8ArrayToUTF16String(data);
- data = data.replace(new RegExp('eval\\(', 'g'), 'evil(');
- data = runtime.byteArrayFromString(data);
- }
- zip.save(path, data, false, new Date());
- addFiles(zip, pos + 1, files, callback);
- });
-}
-
-var args = arguments,
- filename = args[1],
- zipmembers = [],
- i,
- zip = new core.Zip(filename, null);
-for (i = 2; i < arguments.length; i += 1) {
- zipmembers.push(arguments[i]);
-}
-
-addFiles(zip, 0, zipmembers, function (err) {
- "use strict";
- if (err) {
- runtime.log(err);
- }
-});
diff --git a/apps/files_odfviewer/src/webodf/programs/firefoxextension/skin/default/icon.png b/apps/files_odfviewer/src/webodf/programs/firefoxextension/skin/default/icon.png
deleted file mode 100644
index 94d7d8da5de..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/firefoxextension/skin/default/icon.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/Default-Landscape~ipad.png b/apps/files_odfviewer/src/webodf/programs/ios/Default-Landscape~ipad.png
deleted file mode 100644
index 06bb96b394f..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/Default-Landscape~ipad.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/Default-Portrait~ipad.png b/apps/files_odfviewer/src/webodf/programs/ios/Default-Portrait~ipad.png
deleted file mode 100644
index dbfed967af6..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/Default-Portrait~ipad.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF.xcodeproj/project.pbxproj b/apps/files_odfviewer/src/webodf/programs/ios/WebODF.xcodeproj/project.pbxproj
deleted file mode 100644
index d4a76518f35..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,512 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 46;
- objects = {
-
-/* Begin PBXBuildFile section */
- CB099EC714DAC535000D7B99 /* Default-Portrait~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = CB099EC614DAC535000D7B99 /* Default-Portrait~ipad.png */; };
- CB099EC914DAC53D000D7B99 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = CB099EC814DAC53D000D7B99 /* Default-Landscape~ipad.png */; };
- CB29ECBD14FFBBBB00CEAEE3 /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = CB29ECBC14FFBBBB00CEAEE3 /* unzip.c */; };
- CB29ECBF14FFBC0500CEAEE3 /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = CB29ECBE14FFBC0500CEAEE3 /* ioapi.c */; };
- CB29ECC114FFBC1B00CEAEE3 /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = CB29ECC014FFBC1B00CEAEE3 /* mztools.c */; };
- CB29ECC314FFBC5500CEAEE3 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = CB29ECC214FFBC5500CEAEE3 /* libz.dylib */; };
- CB36D11814F68F7F0084BECB /* www in Resources */ = {isa = PBXBuildFile; fileRef = CB36D11714F68F7F0084BECB /* www */; };
- CB533D9114DABDA600C733F6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB533D9014DABDA600C733F6 /* Foundation.framework */; };
- CB533D9314DABDA600C733F6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB533D9214DABDA600C733F6 /* UIKit.framework */; };
- CB533D9514DABDA600C733F6 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB533D9414DABDA600C733F6 /* CoreGraphics.framework */; };
- CB533D9714DABDA600C733F6 /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB533D9614DABDA600C733F6 /* AddressBook.framework */; };
- CB533D9914DABDA600C733F6 /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB533D9814DABDA600C733F6 /* AddressBookUI.framework */; };
- CB533D9B14DABDA600C733F6 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB533D9A14DABDA600C733F6 /* AudioToolbox.framework */; };
- CB533D9D14DABDA600C733F6 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB533D9C14DABDA600C733F6 /* AVFoundation.framework */; };
- CB533D9F14DABDA600C733F6 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB533D9E14DABDA600C733F6 /* CoreLocation.framework */; };
- CB533DA114DABDA600C733F6 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB533DA014DABDA600C733F6 /* MediaPlayer.framework */; };
- CB533DA314DABDA600C733F6 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB533DA214DABDA600C733F6 /* QuartzCore.framework */; };
- CB533DA514DABDA600C733F6 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB533DA414DABDA600C733F6 /* SystemConfiguration.framework */; };
- CB533DA714DABDA600C733F6 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB533DA614DABDA600C733F6 /* MobileCoreServices.framework */; };
- CB533DA914DABDA600C733F6 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB533DA814DABDA600C733F6 /* CoreMedia.framework */; };
- CB533DAF14DABDA600C733F6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = CB533DAD14DABDA600C733F6 /* InfoPlist.strings */; };
- CB533DB114DABDA600C733F6 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CB533DB014DABDA600C733F6 /* main.m */; };
- CB533DB414DABDA600C733F6 /* PhoneGap.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB533DB314DABDA600C733F6 /* PhoneGap.framework */; };
- CB533DB914DABDA600C733F6 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = CB533DB714DABDA600C733F6 /* Localizable.strings */; };
- CB533DC014DABDA600C733F6 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = CB533DBF14DABDA600C733F6 /* icon.png */; };
- CB533DC214DABDA600C733F6 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CB533DC114DABDA600C733F6 /* icon@2x.png */; };
- CB533DC414DABDA600C733F6 /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = CB533DC314DABDA600C733F6 /* icon-72.png */; };
- CB533DC714DABDA600C733F6 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = CB533DC614DABDA600C733F6 /* Default.png */; };
- CB533DC914DABDA600C733F6 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = CB533DC814DABDA600C733F6 /* Default@2x.png */; };
- CB533DCD14DABDA600C733F6 /* PhoneGap.plist in Resources */ = {isa = PBXBuildFile; fileRef = CB533DCC14DABDA600C733F6 /* PhoneGap.plist */; };
- CB533DD114DABDA600C733F6 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CB533DD014DABDA600C733F6 /* AppDelegate.m */; };
- CB533DD414DABDA600C733F6 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CB533DD314DABDA600C733F6 /* MainViewController.m */; };
- CB533DD614DABDA600C733F6 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = CB533DD514DABDA600C733F6 /* MainViewController.xib */; };
- CBD2B77314FF8E9700FC3A44 /* NativeZip.m in Sources */ = {isa = PBXBuildFile; fileRef = CBD2B77214FF8E9700FC3A44 /* NativeZip.m */; };
- CBDCA69D1504EAEB00C706C7 /* WebViewCache.m in Sources */ = {isa = PBXBuildFile; fileRef = CBDCA69C1504EAEB00C706C7 /* WebViewCache.m */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
- CB099EC614DAC535000D7B99 /* Default-Portrait~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Portrait~ipad.png"; path = "../Default-Portrait~ipad.png"; sourceTree = "<group>"; };
- CB099EC814DAC53D000D7B99 /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Landscape~ipad.png"; path = "../Default-Landscape~ipad.png"; sourceTree = "<group>"; };
- CB29ECBC14FFBBBB00CEAEE3 /* unzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = unzip.c; path = WebODF/Classes/minizip/unzip.c; sourceTree = "<group>"; };
- CB29ECBE14FFBC0500CEAEE3 /* ioapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ioapi.c; path = WebODF/Classes/minizip/ioapi.c; sourceTree = "<group>"; };
- CB29ECC014FFBC1B00CEAEE3 /* mztools.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mztools.c; path = WebODF/Classes/minizip/mztools.c; sourceTree = "<group>"; };
- CB29ECC214FFBC5500CEAEE3 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
- CB36D11714F68F7F0084BECB /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = "<group>"; };
- CB533D8C14DABDA500C733F6 /* KO Viewer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "KO Viewer.app"; sourceTree = BUILT_PRODUCTS_DIR; };
- CB533D9014DABDA600C733F6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
- CB533D9214DABDA600C733F6 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
- CB533D9414DABDA600C733F6 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
- CB533D9614DABDA600C733F6 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
- CB533D9814DABDA600C733F6 /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; };
- CB533D9A14DABDA600C733F6 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
- CB533D9C14DABDA600C733F6 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
- CB533D9E14DABDA600C733F6 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; };
- CB533DA014DABDA600C733F6 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; };
- CB533DA214DABDA600C733F6 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
- CB533DA414DABDA600C733F6 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
- CB533DA614DABDA600C733F6 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
- CB533DA814DABDA600C733F6 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
- CB533DAC14DABDA600C733F6 /* WebODF-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "WebODF-Info.plist"; sourceTree = "<group>"; };
- CB533DAE14DABDA600C733F6 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
- CB533DB014DABDA600C733F6 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
- CB533DB214DABDA600C733F6 /* WebODF-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WebODF-Prefix.pch"; sourceTree = "<group>"; };
- CB533DB314DABDA600C733F6 /* PhoneGap.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhoneGap.framework; path = /Users/Shared/PhoneGap/Frameworks/PhoneGap.framework; sourceTree = "<absolute>"; };
- CB533DB814DABDA600C733F6 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
- CB533DBF14DABDA600C733F6 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = "<group>"; };
- CB533DC114DABDA600C733F6 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = "<group>"; };
- CB533DC314DABDA600C733F6 /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = "<group>"; };
- CB533DC614DABDA600C733F6 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = "<group>"; };
- CB533DC814DABDA600C733F6 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = "<group>"; };
- CB533DCC14DABDA600C733F6 /* PhoneGap.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = PhoneGap.plist; sourceTree = "<group>"; };
- CB533DCF14DABDA600C733F6 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = "<group>"; };
- CB533DD014DABDA600C733F6 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = "<group>"; };
- CB533DD214DABDA600C733F6 /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = "<group>"; };
- CB533DD314DABDA600C733F6 /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = "<group>"; };
- CB533DD514DABDA600C733F6 /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = "<group>"; };
- CBD2B77114FF8E9700FC3A44 /* NativeZip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NativeZip.h; path = Classes/NativeZip.h; sourceTree = "<group>"; };
- CBD2B77214FF8E9700FC3A44 /* NativeZip.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NativeZip.m; path = Classes/NativeZip.m; sourceTree = "<group>"; };
- CBDCA69B1504EAEB00C706C7 /* WebViewCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebViewCache.h; path = Classes/WebViewCache.h; sourceTree = "<group>"; };
- CBDCA69C1504EAEB00C706C7 /* WebViewCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WebViewCache.m; path = Classes/WebViewCache.m; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- CB533D8614DABDA500C733F6 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- CB29ECC314FFBC5500CEAEE3 /* libz.dylib in Frameworks */,
- CB533D9114DABDA600C733F6 /* Foundation.framework in Frameworks */,
- CB533D9314DABDA600C733F6 /* UIKit.framework in Frameworks */,
- CB533D9514DABDA600C733F6 /* CoreGraphics.framework in Frameworks */,
- CB533D9714DABDA600C733F6 /* AddressBook.framework in Frameworks */,
- CB533D9914DABDA600C733F6 /* AddressBookUI.framework in Frameworks */,
- CB533D9B14DABDA600C733F6 /* AudioToolbox.framework in Frameworks */,
- CB533D9D14DABDA600C733F6 /* AVFoundation.framework in Frameworks */,
- CB533D9F14DABDA600C733F6 /* CoreLocation.framework in Frameworks */,
- CB533DA114DABDA600C733F6 /* MediaPlayer.framework in Frameworks */,
- CB533DA314DABDA600C733F6 /* QuartzCore.framework in Frameworks */,
- CB533DA514DABDA600C733F6 /* SystemConfiguration.framework in Frameworks */,
- CB533DA714DABDA600C733F6 /* MobileCoreServices.framework in Frameworks */,
- CB533DA914DABDA600C733F6 /* CoreMedia.framework in Frameworks */,
- CB533DB414DABDA600C733F6 /* PhoneGap.framework in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- CB533D8914DABDA500C733F6 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- CB533D7E14DABDA500C733F6 = {
- isa = PBXGroup;
- children = (
- CB29ECC214FFBC5500CEAEE3 /* libz.dylib */,
- CB29ECC014FFBC1B00CEAEE3 /* mztools.c */,
- CB29ECBE14FFBC0500CEAEE3 /* ioapi.c */,
- CB29ECBC14FFBBBB00CEAEE3 /* unzip.c */,
- CB36D11714F68F7F0084BECB /* www */,
- CB533DAA14DABDA600C733F6 /* WebODF */,
- CB533D8F14DABDA500C733F6 /* Frameworks */,
- CB533D8D14DABDA500C733F6 /* Products */,
- );
- sourceTree = "<group>";
- };
- CB533D8D14DABDA500C733F6 /* Products */ = {
- isa = PBXGroup;
- children = (
- CB533D8C14DABDA500C733F6 /* KO Viewer.app */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- CB533D8F14DABDA500C733F6 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- CB533D9014DABDA600C733F6 /* Foundation.framework */,
- CB533D9214DABDA600C733F6 /* UIKit.framework */,
- CB533D9414DABDA600C733F6 /* CoreGraphics.framework */,
- CB533D9614DABDA600C733F6 /* AddressBook.framework */,
- CB533D9814DABDA600C733F6 /* AddressBookUI.framework */,
- CB533D9A14DABDA600C733F6 /* AudioToolbox.framework */,
- CB533D9C14DABDA600C733F6 /* AVFoundation.framework */,
- CB533D9E14DABDA600C733F6 /* CoreLocation.framework */,
- CB533DA014DABDA600C733F6 /* MediaPlayer.framework */,
- CB533DA214DABDA600C733F6 /* QuartzCore.framework */,
- CB533DA414DABDA600C733F6 /* SystemConfiguration.framework */,
- CB533DA614DABDA600C733F6 /* MobileCoreServices.framework */,
- CB533DA814DABDA600C733F6 /* CoreMedia.framework */,
- );
- name = Frameworks;
- sourceTree = "<group>";
- };
- CB533DAA14DABDA600C733F6 /* WebODF */ = {
- isa = PBXGroup;
- children = (
- CB533DB314DABDA600C733F6 /* PhoneGap.framework */,
- CB533DB514DABDA600C733F6 /* Resources */,
- CB533DCE14DABDA600C733F6 /* Classes */,
- CB533DAB14DABDA600C733F6 /* Supporting Files */,
- );
- path = WebODF;
- sourceTree = "<group>";
- };
- CB533DAB14DABDA600C733F6 /* Supporting Files */ = {
- isa = PBXGroup;
- children = (
- CB533DAC14DABDA600C733F6 /* WebODF-Info.plist */,
- CB533DAD14DABDA600C733F6 /* InfoPlist.strings */,
- CB533DB014DABDA600C733F6 /* main.m */,
- CB533DB214DABDA600C733F6 /* WebODF-Prefix.pch */,
- CB533DCC14DABDA600C733F6 /* PhoneGap.plist */,
- CB533DD514DABDA600C733F6 /* MainViewController.xib */,
- );
- name = "Supporting Files";
- sourceTree = "<group>";
- };
- CB533DB514DABDA600C733F6 /* Resources */ = {
- isa = PBXGroup;
- children = (
- CB533DB614DABDA600C733F6 /* en.lproj */,
- CB533DBE14DABDA600C733F6 /* icons */,
- CB533DC514DABDA600C733F6 /* splash */,
- );
- name = Resources;
- sourceTree = "<group>";
- };
- CB533DB614DABDA600C733F6 /* en.lproj */ = {
- isa = PBXGroup;
- children = (
- CB533DB714DABDA600C733F6 /* Localizable.strings */,
- );
- name = en.lproj;
- sourceTree = "<group>";
- };
- CB533DBE14DABDA600C733F6 /* icons */ = {
- isa = PBXGroup;
- children = (
- CB533DBF14DABDA600C733F6 /* icon.png */,
- CB533DC114DABDA600C733F6 /* icon@2x.png */,
- CB533DC314DABDA600C733F6 /* icon-72.png */,
- );
- name = icons;
- sourceTree = "<group>";
- };
- CB533DC514DABDA600C733F6 /* splash */ = {
- isa = PBXGroup;
- children = (
- CB099EC814DAC53D000D7B99 /* Default-Landscape~ipad.png */,
- CB099EC614DAC535000D7B99 /* Default-Portrait~ipad.png */,
- CB533DC614DABDA600C733F6 /* Default.png */,
- CB533DC814DABDA600C733F6 /* Default@2x.png */,
- );
- name = splash;
- sourceTree = "<group>";
- };
- CB533DCE14DABDA600C733F6 /* Classes */ = {
- isa = PBXGroup;
- children = (
- CBDCA69B1504EAEB00C706C7 /* WebViewCache.h */,
- CBDCA69C1504EAEB00C706C7 /* WebViewCache.m */,
- CB533DCF14DABDA600C733F6 /* AppDelegate.h */,
- CB533DD014DABDA600C733F6 /* AppDelegate.m */,
- CB533DD214DABDA600C733F6 /* MainViewController.h */,
- CB533DD314DABDA600C733F6 /* MainViewController.m */,
- CBD2B77114FF8E9700FC3A44 /* NativeZip.h */,
- CBD2B77214FF8E9700FC3A44 /* NativeZip.m */,
- );
- name = Classes;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- CB533D8B14DABDA500C733F6 /* KO Viewer */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = CB533DDB14DABDA600C733F6 /* Build configuration list for PBXNativeTarget "KO Viewer" */;
- buildPhases = (
- CB533D8514DABDA500C733F6 /* Sources */,
- CB533D8614DABDA500C733F6 /* Frameworks */,
- CB533D8714DABDA500C733F6 /* Resources */,
- CB533D8814DABDA500C733F6 /* Sources */,
- CB533D8914DABDA500C733F6 /* Frameworks */,
- CB533D8A14DABDA500C733F6 /* ShellScript */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = "KO Viewer";
- productName = WebODF;
- productReference = CB533D8C14DABDA500C733F6 /* KO Viewer.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- CB533D8014DABDA500C733F6 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastUpgradeCheck = 0420;
- };
- buildConfigurationList = CB533D8314DABDA500C733F6 /* Build configuration list for PBXProject "WebODF" */;
- compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- es,
- );
- mainGroup = CB533D7E14DABDA500C733F6;
- productRefGroup = CB533D8D14DABDA500C733F6 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- CB533D8B14DABDA500C733F6 /* KO Viewer */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- CB533D8714DABDA500C733F6 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- CB533DAF14DABDA600C733F6 /* InfoPlist.strings in Resources */,
- CB533DB914DABDA600C733F6 /* Localizable.strings in Resources */,
- CB533DC014DABDA600C733F6 /* icon.png in Resources */,
- CB533DC214DABDA600C733F6 /* icon@2x.png in Resources */,
- CB533DC414DABDA600C733F6 /* icon-72.png in Resources */,
- CB533DC714DABDA600C733F6 /* Default.png in Resources */,
- CB533DC914DABDA600C733F6 /* Default@2x.png in Resources */,
- CB533DCD14DABDA600C733F6 /* PhoneGap.plist in Resources */,
- CB533DD614DABDA600C733F6 /* MainViewController.xib in Resources */,
- CB099EC714DAC535000D7B99 /* Default-Portrait~ipad.png in Resources */,
- CB099EC914DAC53D000D7B99 /* Default-Landscape~ipad.png in Resources */,
- CB36D11814F68F7F0084BECB /* www in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
- CB533D8A14DABDA500C733F6 /* ShellScript */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/bash;
- shellScript = "rsync -a ../touchui/app/ www/app/\ncp ../../webodf/webodf.css www/\ncp ../touchui/sencha-touch.* www/\ncp ../touchui/Zoom*.png www/\nif [ ! -e www/webodf.js ]; then\n # webodf.js should be built\n if [ ! -e build ]; then mkdir build; fi\n cd build\n cmake -G Xcode ../../.. && make && cp webodf/webodf.js ..\n if [ ! -e webodf.js ]; then\n echo \"put webodf.js in the ios/www directory\"\n exit 1;\n fi\nfi\n";
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- CB533D8514DABDA500C733F6 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- CB533DB114DABDA600C733F6 /* main.m in Sources */,
- CB533DD114DABDA600C733F6 /* AppDelegate.m in Sources */,
- CB533DD414DABDA600C733F6 /* MainViewController.m in Sources */,
- CBD2B77314FF8E9700FC3A44 /* NativeZip.m in Sources */,
- CB29ECBD14FFBBBB00CEAEE3 /* unzip.c in Sources */,
- CB29ECBF14FFBC0500CEAEE3 /* ioapi.c in Sources */,
- CB29ECC114FFBC1B00CEAEE3 /* mztools.c in Sources */,
- CBDCA69D1504EAEB00C706C7 /* WebViewCache.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
- CB533D8814DABDA500C733F6 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
- CB533DAD14DABDA600C733F6 /* InfoPlist.strings */ = {
- isa = PBXVariantGroup;
- children = (
- CB533DAE14DABDA600C733F6 /* en */,
- );
- name = InfoPlist.strings;
- sourceTree = "<group>";
- };
- CB533DB714DABDA600C733F6 /* Localizable.strings */ = {
- isa = PBXVariantGroup;
- children = (
- CB533DB814DABDA600C733F6 /* en */,
- );
- name = Localizable.strings;
- sourceTree = "<group>";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- CB533DD914DABDA600C733F6 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
- CLANG_ENABLE_OBJC_ARC = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_SYMBOLS_PRIVATE_EXTERN = NO;
- GCC_VERSION = com.apple.compilers.llvmgcc42;
- GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 3.0;
- SDKROOT = iphoneos;
- };
- name = Debug;
- };
- CB533DDA14DABDA600C733F6 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- ARCHS = "$(ARCHS_STANDARD_32_BIT)";
- CLANG_ENABLE_OBJC_ARC = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_VERSION = com.apple.compilers.llvmgcc42;
- GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 3.0;
- SDKROOT = iphoneos;
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
- CB533DDC14DABDA600C733F6 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = YES;
- CODE_SIGN_IDENTITY = "iPhone Developer: Jos van den Oever (GJ9RDPR233)";
- COPY_PHASE_STRIP = NO;
- FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "WebODF/WebODF-Prefix.pch";
- GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
- INFOPLIST_FILE = "WebODF/WebODF-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 5.0;
- OTHER_LDFLAGS = (
- "-weak_framework",
- UIKit,
- "-weak_framework",
- AVFoundation,
- "-weak_framework",
- CoreMedia,
- "-weak_library",
- /usr/lib/libSystem.B.dylib,
- );
- PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE = "8A253628-DC77-4EEA-8543-53315AA93987";
- TARGETED_DEVICE_FAMILY = "1,2";
- WRAPPER_EXTENSION = app;
- };
- name = Debug;
- };
- CB533DDD14DABDA600C733F6 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = YES;
- ARCHS = (
- armv6,
- "$(ARCHS_STANDARD_32_BIT)",
- );
- CODE_SIGN_IDENTITY = "iPhone Developer: Jos van den Oever (GJ9RDPR233)";
- COPY_PHASE_STRIP = YES;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- FRAMEWORK_SEARCH_PATHS = /Users/Shared/PhoneGap/Frameworks;
- GCC_PRECOMPILE_PREFIX_HEADER = YES;
- GCC_PREFIX_HEADER = "WebODF/WebODF-Prefix.pch";
- GCC_PREPROCESSOR_DEFINITIONS = "PHONEGAP_FRAMEWORK=YES";
- GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
- INFOPLIST_FILE = "WebODF/WebODF-Info.plist";
- IPHONEOS_DEPLOYMENT_TARGET = 5.0;
- OTHER_LDFLAGS = (
- "-weak_framework",
- UIKit,
- "-weak_framework",
- AVFoundation,
- "-weak_framework",
- CoreMedia,
- "-weak_library",
- /usr/lib/libSystem.B.dylib,
- );
- PRODUCT_NAME = "$(TARGET_NAME)";
- PROVISIONING_PROFILE = "8A253628-DC77-4EEA-8543-53315AA93987";
- TARGETED_DEVICE_FAMILY = "1,2";
- VALIDATE_PRODUCT = YES;
- WRAPPER_EXTENSION = app;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- CB533D8314DABDA500C733F6 /* Build configuration list for PBXProject "WebODF" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- CB533DD914DABDA600C733F6 /* Debug */,
- CB533DDA14DABDA600C733F6 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- CB533DDB14DABDA600C733F6 /* Build configuration list for PBXNativeTarget "KO Viewer" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- CB533DDC14DABDA600C733F6 /* Debug */,
- CB533DDD14DABDA600C733F6 /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = CB533D8014DABDA500C733F6 /* Project object */;
-}
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/AppDelegate.h b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/AppDelegate.h
deleted file mode 100644
index e2e93b0d9e0..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/AppDelegate.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.
- */
-
-//
-// AppDelegate.h
-// WebODF
-//
-// Created by KO GmbH on 2/2/12.
-// Copyright __MyCompanyName__ 2012. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-#ifdef PHONEGAP_FRAMEWORK
- #import <PhoneGap/PGViewController.h>
-#else
- #import "PGViewController.h"
-#endif
-
-
-@interface AppDelegate : NSObject < UIApplicationDelegate, UIWebViewDelegate, PGCommandDelegate > {
-
- NSString* invokeString;
-}
-
-// invoke string is passed to your app on launch, this is only valid if you
-// edit FooBar.plist to add a protocol
-// a simple tutorial can be found here :
-// http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
-
-@property (nonatomic, copy) NSString* invokeString;
-@property (nonatomic, retain) IBOutlet UIWindow* window;
-@property (nonatomic, retain) IBOutlet PGViewController* viewController;
-
-@end
-
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/AppDelegate.m b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/AppDelegate.m
deleted file mode 100644
index 6845e953497..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/AppDelegate.m
+++ /dev/null
@@ -1,202 +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.
- */
-
-//
-// AppDelegate.m
-// WebODF
-//
-// Created by KO GmbH on 2/2/12.
-// Copyright __MyCompanyName__ 2012. All rights reserved.
-//
-
-#import "AppDelegate.h"
-#import "MainViewController.h"
-
-#ifdef PHONEGAP_FRAMEWORK
- #import <PhoneGap/PGPlugin.h>
- #import <PhoneGap/PGURLProtocol.h>
-#else
- #import "PGPlugin.h"
- #import "PGURLProtocol.h"
-#endif
-#import "WebViewCache.h"
-
-
-@implementation AppDelegate
-
-@synthesize invokeString, window, viewController;
-
-- (id) init
-{
- /** If you need to do any extra app-specific initialization, you can do it here
- * -jm
- **/
- NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
- [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
-
- [PGURLProtocol registerPGHttpURLProtocol];
-
- return [super init];
-}
-
-#pragma UIApplicationDelegate implementation
-
-/**
- * This is main kick off after the app inits, the views and Settings are setup here. (preferred - iOS4 and up)
- */
-- (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
-{
- NSURL* url = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey];
- if (url && [url isKindOfClass:[NSURL class]]) {
- self.invokeString = [url absoluteString];
- NSLog(@"WebODF launchOptions = %@", url);
- }
-
- CGRect screenBounds = [[UIScreen mainScreen] bounds];
- self.window = [[UIWindow alloc] initWithFrame:screenBounds];
- self.window.autoresizesSubviews = YES;
-
- CGRect viewBounds = [[UIScreen mainScreen] applicationFrame];
-
- self.viewController = [[MainViewController alloc] init];
- self.viewController.useSplashScreen = YES;
- self.viewController.wwwFolderName = @"www";
- self.viewController.startPage = @"index.html";
- self.viewController.view.frame = viewBounds;
-
- // over-ride delegates
- self.viewController.webView.delegate = self;
- self.viewController.commandDelegate = self;
-
- // check whether the current orientation is supported: if it is, keep it, rather than forcing a rotation
- BOOL forceStartupRotation = YES;
- UIDeviceOrientation curDevOrientation = [[UIDevice currentDevice] orientation];
-
- if (UIDeviceOrientationUnknown == curDevOrientation) {
- // UIDevice isn't firing orientation notifications yet… go look at the status bar
- curDevOrientation = (UIDeviceOrientation)[[UIApplication sharedApplication] statusBarOrientation];
- }
-
- if (UIDeviceOrientationIsValidInterfaceOrientation(curDevOrientation)) {
- for (NSNumber *orient in self.viewController.supportedOrientations) {
- if ([orient intValue] == curDevOrientation) {
- forceStartupRotation = NO;
- break;
- }
- }
- }
-
- if (forceStartupRotation) {
- NSLog(@"supportedOrientations: %@", self.viewController.supportedOrientations);
- // The first item in the supportedOrientations array is the start orientation (guaranteed to be at least Portrait)
- UIInterfaceOrientation newOrient = [[self.viewController.supportedOrientations objectAtIndex:0] intValue];
- NSLog(@"AppDelegate forcing status bar to: %d from: %d", newOrient, curDevOrientation);
- [[UIApplication sharedApplication] setStatusBarOrientation:newOrient];
- }
-
- [self.window addSubview:self.viewController.view];
- [self.window makeKeyAndVisible];
-
-
- NSString *path = @"./cache";
- NSUInteger discCapacity = 1*1024*1024;
- NSUInteger memoryCapacity = 0*1024*1024;
-
- WebViewCache *cache =
- [[WebViewCache alloc] initWithMemoryCapacity: memoryCapacity
- diskCapacity: discCapacity diskPath:path];
- [NSURLCache setSharedURLCache:cache];
-
-
- return YES;
-}
-
-// this happens while we are running ( in the background, or from within our own app )
-// only valid if FooBar.plist specifies a protocol to handle
-- (BOOL) application:(UIApplication*)application handleOpenURL:(NSURL*)url
-{
- if (!url) {
- return NO;
- }
-
- // calls into javascript global function 'handleOpenURL'
- NSString* jsString = [NSString stringWithFormat:@"handleOpenURL(\"%@\");", url];
- [self.viewController.webView stringByEvaluatingJavaScriptFromString:jsString];
-
- // all plugins will get the notification, and their handlers will be called
- [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:PGPluginHandleOpenURLNotification object:url]];
-
- return YES;
-}
-
-#pragma PGCommandDelegate implementation
-
-- (id) getCommandInstance:(NSString*)className
-{
- return [self.viewController getCommandInstance:className];
-}
-
-- (BOOL) execute:(InvokedUrlCommand*)command
-{
- return [self.viewController execute:command];
-}
-
-- (NSString*) pathForResource:(NSString*)resourcepath;
-{
- return [self.viewController pathForResource:resourcepath];
-}
-
-#pragma UIWebDelegate implementation
-
-- (void) webViewDidFinishLoad:(UIWebView*) theWebView
-{
- // only valid if FooBar.plist specifies a protocol to handle
- if (self.invokeString)
- {
- // this is passed before the deviceready event is fired, so you can access it in js when you receive deviceready
- NSString* jsString = [NSString stringWithFormat:@"var invokeString = \"%@\";", self.invokeString];
- [theWebView stringByEvaluatingJavaScriptFromString:jsString];
- }
-
- // Black base color for background matches the native apps
- theWebView.backgroundColor = [UIColor blackColor];
-
- return [self.viewController webViewDidFinishLoad:theWebView];
-}
-
-- (void) webViewDidStartLoad:(UIWebView*)theWebView
-{
- return [self.viewController webViewDidStartLoad:theWebView];
-}
-
-- (void) webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error
-{
- return [self.viewController webView:theWebView didFailLoadWithError:error];
-}
-
-- (BOOL) webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
-{
- return [self.viewController webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType];
-}
-
-- (void) dealloc
-{
-}
-
-@end
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/MainViewController.h b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/MainViewController.h
deleted file mode 100644
index 33ddbc21030..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/MainViewController.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// MainViewController.h
-// FooBar
-//
-// Created by Shazron Abdullah on 12-01-26.
-// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
-//
-
-#ifdef PHONEGAP_FRAMEWORK
- #import <PhoneGap/PGViewController.h>
-#else
- #import "PGViewController.h"
-#endif
-
-@interface MainViewController : PGViewController
-
-@end
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/MainViewController.m b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/MainViewController.m
deleted file mode 100644
index 550e4b25c21..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/MainViewController.m
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// MainViewController.m
-// WebODF
-//
-#import "MainViewController.h"
-
-@implementation MainViewController
-
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
-{
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- // Custom initialization
- }
- return self;
-}
-
-- (void)didReceiveMemoryWarning
-{
- // Releases the view if it doesn't have a superview.
- [super didReceiveMemoryWarning];
-
- // Release any cached data, images, etc that aren't in use.
-}
-
-#pragma mark - View lifecycle
-
-- (void)viewDidLoad
-{
- [super viewDidLoad];
- // Do any additional setup after loading the view from its nib.
-}
-
-- (void)viewDidUnload
-{
- [super viewDidUnload];
- // Release any retained subviews of the main view.
- // e.g. self.myOutlet = nil;
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
-{
- // Return YES for supported orientations
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
-}
-
-@end
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/MainViewController.xib b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/MainViewController.xib
deleted file mode 100644
index 9837f578ca1..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/MainViewController.xib
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
- <data>
- <int key="IBDocument.SystemTarget">1280</int>
- <string key="IBDocument.SystemVersion">11C25</string>
- <string key="IBDocument.InterfaceBuilderVersion">1919</string>
- <string key="IBDocument.AppKitVersion">1138.11</string>
- <string key="IBDocument.HIToolboxVersion">566.00</string>
- <object class="NSMutableDictionary" key="IBDocument.PluginVersions">
- <string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="NS.object.0">916</string>
- </object>
- <array key="IBDocument.IntegratedClassDependencies">
- <string>IBProxyObject</string>
- <string>IBUIView</string>
- </array>
- <array key="IBDocument.PluginDependencies">
- <string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- </array>
- <object class="NSMutableDictionary" key="IBDocument.Metadata">
- <string key="NS.key.0">PluginDependencyRecalculationVersion</string>
- <integer value="1" key="NS.object.0"/>
- </object>
- <array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
- <object class="IBProxyObject" id="372490531">
- <string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <object class="IBProxyObject" id="975951072">
- <string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- <object class="IBUIView" id="191373211">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">274</int>
- <string key="NSFrame">{{0, 20}, {320, 460}}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
- <object class="NSColor" key="IBUIBackgroundColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MQA</bytes>
- <object class="NSColorSpace" key="NSCustomColorSpace">
- <int key="NSID">2</int>
- </object>
- </object>
- <object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
- <string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
- </object>
- </array>
- <object class="IBObjectContainer" key="IBDocument.Objects">
- <array class="NSMutableArray" key="connectionRecords">
- <object class="IBConnectionRecord">
- <object class="IBCocoaTouchOutletConnection" key="connection">
- <string key="label">view</string>
- <reference key="source" ref="372490531"/>
- <reference key="destination" ref="191373211"/>
- </object>
- <int key="connectionID">3</int>
- </object>
- </array>
- <object class="IBMutableOrderedSet" key="objectRecords">
- <array key="orderedObjects">
- <object class="IBObjectRecord">
- <int key="objectID">0</int>
- <array key="object" id="0"/>
- <reference key="children" ref="1000"/>
- <nil key="parent"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">1</int>
- <reference key="object" ref="191373211"/>
- <reference key="parent" ref="0"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-1</int>
- <reference key="object" ref="372490531"/>
- <reference key="parent" ref="0"/>
- <string key="objectName">File's Owner</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">-2</int>
- <reference key="object" ref="975951072"/>
- <reference key="parent" ref="0"/>
- </object>
- </array>
- </object>
- <dictionary class="NSMutableDictionary" key="flattenedProperties">
- <string key="-1.CustomClassName">MainViewController</string>
- <string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="-2.CustomClassName">UIResponder</string>
- <string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- <string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
- <nil key="activeLocalization"/>
- <dictionary class="NSMutableDictionary" key="localizations"/>
- <nil key="sourceID"/>
- <int key="maxID">3</int>
- </object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <array class="NSMutableArray" key="referencedPartialClassDescriptions">
- <object class="IBPartialClassDescription">
- <string key="className">MainViewController</string>
- <string key="superclassName">UIViewController</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/MainViewController.h</string>
- </object>
- </object>
- </array>
- </object>
- <int key="IBDocument.localizationMode">0</int>
- <string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
- <bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
- <int key="IBDocument.defaultPropertyAccessControl">3</int>
- <string key="IBCocoaTouchPluginVersion">916</string>
- </data>
-</archive>
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NSData+Base64.h b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NSData+Base64.h
deleted file mode 100644
index eb1ff485a73..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NSData+Base64.h
+++ /dev/null
@@ -1,33 +0,0 @@
-//
-// NSData+Base64.h
-// base64
-//
-// Created by Matt Gallagher on 2009/06/03.
-// Copyright 2009 Matt Gallagher. All rights reserved.
-//
-// Permission is given to use this source code file, free of charge, in any
-// project, commercial or otherwise, entirely at your risk, with the condition
-// that any redistribution (in part or whole) of source code must retain
-// this copyright and permission notice. Attribution in compiled projects is
-// appreciated but not required.
-//
-
-#import <Foundation/Foundation.h>
-
-void *NewBase64Decode(
- const char *inputBuffer,
- size_t length,
- size_t *outputLength);
-
-char *NewBase64Encode(
- const void *inputBuffer,
- size_t length,
- bool separateLines,
- size_t *outputLength);
-
-@interface NSData (Base64)
-
-+ (NSData *)dataFromBase64String:(NSString *)aString;
-- (NSString *)base64EncodedString;
-
-@end
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NSData+Base64.m b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NSData+Base64.m
deleted file mode 100644
index 13f828d09ca..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NSData+Base64.m
+++ /dev/null
@@ -1,299 +0,0 @@
-//
-// NSData+Base64.m
-// base64
-//
-// Created by Matt Gallagher on 2009/06/03.
-// Copyright 2009 Matt Gallagher. All rights reserved.
-//
-// Permission is given to use this source code file, free of charge, in any
-// project, commercial or otherwise, entirely at your risk, with the condition
-// that any redistribution (in part or whole) of source code must retain
-// this copyright and permission notice. Attribution in compiled projects is
-// appreciated but not required.
-//
-
-#import "NSData+Base64.h"
-
-//
-// Mapping from 6 bit pattern to ASCII character.
-//
-static unsigned char base64EncodeLookup[65] =
- "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-//
-// Definition for "masked-out" areas of the base64DecodeLookup mapping
-//
-#define xx 65
-
-//
-// Mapping from ASCII character to 6 bit pattern.
-//
-static unsigned char base64DecodeLookup[256] =
-{
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, 62, xx, xx, xx, 63,
- 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, xx, xx, xx, xx, xx, xx,
- xx, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, xx, xx, xx, xx, xx,
- xx, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, xx, xx, xx, xx, xx,
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
- xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx, xx,
-};
-
-//
-// Fundamental sizes of the binary and base64 encode/decode units in bytes
-//
-#define BINARY_UNIT_SIZE 3
-#define BASE64_UNIT_SIZE 4
-
-//
-// NewBase64Decode
-//
-// Decodes the base64 ASCII string in the inputBuffer to a newly malloced
-// output buffer.
-//
-// inputBuffer - the source ASCII string for the decode
-// length - the length of the string or -1 (to specify strlen should be used)
-// outputLength - if not-NULL, on output will contain the decoded length
-//
-// returns the decoded buffer. Must be free'd by caller. Length is given by
-// outputLength.
-//
-void *NewBase64Decode(
- const char *inputBuffer,
- size_t length,
- size_t *outputLength)
-{
- if (length == -1)
- {
- length = strlen(inputBuffer);
- }
-
- size_t outputBufferSize = (length / BASE64_UNIT_SIZE) * BINARY_UNIT_SIZE;
- unsigned char *outputBuffer = (unsigned char *)malloc(outputBufferSize);
-
- size_t i = 0;
- size_t j = 0;
- while (i < length)
- {
- //
- // Accumulate 4 valid characters (ignore everything else)
- //
- unsigned char accumulated[BASE64_UNIT_SIZE];
- bzero(accumulated, sizeof(unsigned char) * BASE64_UNIT_SIZE);
- size_t accumulateIndex = 0;
- while (i < length)
- {
- unsigned char decode = base64DecodeLookup[inputBuffer[i++]];
- if (decode != xx)
- {
- accumulated[accumulateIndex] = decode;
- accumulateIndex++;
-
- if (accumulateIndex == BASE64_UNIT_SIZE)
- {
- break;
- }
- }
- }
-
- //
- // Store the 6 bits from each of the 4 characters as 3 bytes
- //
- outputBuffer[j] = (accumulated[0] << 2) | (accumulated[1] >> 4);
- outputBuffer[j + 1] = (accumulated[1] << 4) | (accumulated[2] >> 2);
- outputBuffer[j + 2] = (accumulated[2] << 6) | accumulated[3];
- j += accumulateIndex - 1;
- }
-
- if (outputLength)
- {
- *outputLength = j;
- }
- return outputBuffer;
-}
-
-//
-// NewBase64Decode
-//
-// Encodes the arbitrary data in the inputBuffer as base64 into a newly malloced
-// output buffer.
-//
-// inputBuffer - the source data for the encode
-// length - the length of the input in bytes
-// separateLines - if zero, no CR/LF characters will be added. Otherwise
-// a CR/LF pair will be added every 64 encoded chars.
-// outputLength - if not-NULL, on output will contain the encoded length
-// (not including terminating 0 char)
-//
-// returns the encoded buffer. Must be free'd by caller. Length is given by
-// outputLength.
-//
-char *NewBase64Encode(
- const void *buffer,
- size_t length,
- bool separateLines,
- size_t *outputLength)
-{
- const unsigned char *inputBuffer = (const unsigned char *)buffer;
-
- #define MAX_NUM_PADDING_CHARS 2
- #define OUTPUT_LINE_LENGTH 64
- #define INPUT_LINE_LENGTH ((OUTPUT_LINE_LENGTH / BASE64_UNIT_SIZE) * BINARY_UNIT_SIZE)
- #define CR_LF_SIZE 0
-
- //
- // Byte accurate calculation of final buffer size
- //
- size_t outputBufferSize =
- ((length / BINARY_UNIT_SIZE)
- + ((length % BINARY_UNIT_SIZE) ? 1 : 0))
- * BASE64_UNIT_SIZE;
- if (separateLines)
- {
- outputBufferSize +=
- (outputBufferSize / OUTPUT_LINE_LENGTH) * CR_LF_SIZE;
- }
-
- //
- // Include space for a terminating zero
- //
- outputBufferSize += 1;
-
- //
- // Allocate the output buffer
- //
- char *outputBuffer = (char *)malloc(outputBufferSize);
- if (!outputBuffer)
- {
- return NULL;
- }
-
- size_t i = 0;
- size_t j = 0;
- const size_t lineLength = separateLines ? INPUT_LINE_LENGTH : length;
- size_t lineEnd = lineLength;
-
- while (true)
- {
- if (lineEnd > length)
- {
- lineEnd = length;
- }
-
- for (; i + BINARY_UNIT_SIZE - 1 < lineEnd; i += BINARY_UNIT_SIZE)
- {
- //
- // Inner loop: turn 48 bytes into 64 base64 characters
- //
- outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
- outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
- | ((inputBuffer[i + 1] & 0xF0) >> 4)];
- outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i + 1] & 0x0F) << 2)
- | ((inputBuffer[i + 2] & 0xC0) >> 6)];
- outputBuffer[j++] = base64EncodeLookup[inputBuffer[i + 2] & 0x3F];
- }
-
- if (lineEnd == length)
- {
- break;
- }
-
- //
- // Add the newline
- //
- //outputBuffer[j++] = '\r';
- //outputBuffer[j++] = '\n';
- lineEnd += lineLength;
- }
-
- if (i + 1 < length)
- {
- //
- // Handle the single '=' case
- //
- outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
- outputBuffer[j++] = base64EncodeLookup[((inputBuffer[i] & 0x03) << 4)
- | ((inputBuffer[i + 1] & 0xF0) >> 4)];
- outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i + 1] & 0x0F) << 2];
- outputBuffer[j++] = '=';
- }
- else if (i < length)
- {
- //
- // Handle the double '=' case
- //
- outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0xFC) >> 2];
- outputBuffer[j++] = base64EncodeLookup[(inputBuffer[i] & 0x03) << 4];
- outputBuffer[j++] = '=';
- outputBuffer[j++] = '=';
- }
- outputBuffer[j] = 0;
-
- //
- // Set the output length and return the buffer
- //
- if (outputLength)
- {
- *outputLength = j;
- }
- return outputBuffer;
-}
-
-@implementation NSData (Base64)
-
-//
-// dataFromBase64String:
-//
-// Creates an NSData object containing the base64 decoded representation of
-// the base64 string 'aString'
-//
-// Parameters:
-// aString - the base64 string to decode
-//
-// returns the autoreleased NSData representation of the base64 string
-//
-+ (NSData *)dataFromBase64String:(NSString *)aString
-{
- NSData *data = [aString dataUsingEncoding:NSASCIIStringEncoding];
- size_t outputLength;
- void *outputBuffer = NewBase64Decode([data bytes], [data length], &outputLength);
- NSData *result = [NSData dataWithBytes:outputBuffer length:outputLength];
- free(outputBuffer);
- return result;
-}
-
-//
-// base64EncodedString
-//
-// Creates an NSString object that contains the base 64 encoding of the
-// receiver's data. Lines are broken at 64 characters long.
-//
-// returns an autoreleased NSString being the base 64 representation of the
-// receiver.
-//
-- (NSString *)base64EncodedString
-{
- size_t outputLength;
- char *outputBuffer =
- NewBase64Encode([self bytes], [self length], true, &outputLength);
-
- NSString *result =
- [[[NSString alloc]
- initWithBytes:outputBuffer
- length:outputLength
- encoding:NSASCIIStringEncoding]
- autorelease];
- free(outputBuffer);
- return result;
-}
-
-@end
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NativeZip.h b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NativeZip.h
deleted file mode 100644
index 44e296b8cf9..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NativeZip.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#import <PhoneGap/PGPlugin.h>
-
-@interface NativeZip : PGPlugin {
- NSString* callbackID;
-}
-
-@property (nonatomic, copy) NSString* callbackID;
-
-- (void) load:(BOOL)base64 arguments:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
-- (void) loadAsString:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
-- (void) loadAsDataURL:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options;
-
-@end \ No newline at end of file
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NativeZip.m b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NativeZip.m
deleted file mode 100644
index d8c241cf0b4..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/NativeZip.m
+++ /dev/null
@@ -1,79 +0,0 @@
-#import "NativeZip.h"
-#import "minizip/unzip.h"
-#import "NSData+Base64.h"
-
-@implementation NativeZip
-@synthesize callbackID;
-
--(void) load:(BOOL)base64 arguments:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options
-{
- self.callbackID = [arguments objectAtIndex:0];
- NSString *zipPath = [arguments objectAtIndex:1];
- NSString *entryPath = [arguments objectAtIndex:2];
- NSString *mimetype = nil;
- if (base64 == TRUE) {
- mimetype = [arguments objectAtIndex:3];
- }
-
- const char* path = [ zipPath cStringUsingEncoding:NSUTF8StringEncoding ];
- unzFile unzipFile = unzOpen(path);
- NSString* jsString = nil;
- BOOL error = TRUE;
- if (!unzipFile) {
- jsString = [[NSString alloc] initWithString: @"cannot open file"];
- } else {
- path = [ entryPath cStringUsingEncoding:NSUTF8StringEncoding ];
- int r = unzLocateFile(unzipFile, path, 2);
- if (r != UNZ_OK) {
- jsString = [[NSString alloc] initWithString: @"cannot find entry"];
- } else {
- unz_file_info info;
- r = unzGetCurrentFileInfo(unzipFile, &info, 0, 0, 0, 0, 0, 0);
- if (r != UNZ_OK) {
- jsString = [[NSString alloc] initWithString: @"cannot determine size"];
- } else {
- r = unzOpenCurrentFile(unzipFile);
- if (r != UNZ_OK) {
- jsString = [[NSString alloc] initWithString: @"cannot open entry"];
- } else {
- char* contents = malloc(info.uncompressed_size);
- r = unzReadCurrentFile(unzipFile, contents, info.uncompressed_size);
- if (r != info.uncompressed_size) {
- jsString = [[NSString alloc] initWithString: @"cannot uncompress file"];
- } else {
- if (base64) {
- NSData* readData = [NSData dataWithBytes:(const void *)contents length:sizeof(unsigned char)*info.uncompressed_size];
- jsString = [NSString stringWithFormat:@"data:%@;base64,%@", mimetype, [readData base64EncodedString]];
- } else {
- jsString = [[NSString alloc] initWithUTF8String: contents];
- }
- }
- unzCloseCurrentFile(unzipFile);
- free(contents);
- error = FALSE;
- }
- }
- }
- unzClose(unzipFile);
- }
- PluginResult* pluginResult = [PluginResult
- resultWithStatus:PGCommandStatus_OK
- messageAsString: jsString
- ];
- if (!error) {
- [self writeJavascript: [pluginResult toSuccessCallbackString:self.callbackID]];
- } else {
- [self writeJavascript: [pluginResult toErrorCallbackString:self.callbackID]];
- }
-}
-
--(void)loadAsString:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options
-{
- [self load:FALSE arguments:arguments withDict:options];
-}
--(void)loadAsDataURL:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options
-{
- [self load:TRUE arguments:arguments withDict:options];
-}
-
-@end
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/WebViewCache.h b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/WebViewCache.h
deleted file mode 100644
index 216a0bf2bb5..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/WebViewCache.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// WebCache.h
-// KO Viewer
-//
-// Created by Tobias Hintze on 3/5/12.
-// Copyright (c) 2012 KO GmbH. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-@interface WebViewCache : NSURLCache
-
-- (NSData*)getSomeData:(NSString*)zip entry:(NSString*)entry;
-
-@end
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/WebViewCache.m b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/WebViewCache.m
deleted file mode 100644
index 4de0bb3a0c3..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/WebViewCache.m
+++ /dev/null
@@ -1,72 +0,0 @@
-//
-// WebCache.m
-// KO Viewer
-//
-// Created by Tobias Hintze on 3/5/12.
-// Copyright (c) 2012 KO GmbH. All rights reserved.
-//
-
-#import "WebViewCache.h"
-#import "minizip/unzip.h"
-
-@implementation WebViewCache
-
-- (NSCachedURLResponse*)cachedResponseForRequest:(NSURLRequest*)request
-{
- [super removeAllCachedResponses];
- NSURL *url = [request URL];
- if ([url query]) {
- NSData *somedata = [self getSomeData:[url path] entry:[url query]];
- NSHTTPURLResponse *response = [[NSHTTPURLResponse alloc] initWithURL:url
- MIMEType:@"text/xml"
- expectedContentLength:[somedata length]
- textEncodingName:nil];
- NSCachedURLResponse *cachedResponse = [[NSCachedURLResponse alloc]
- initWithResponse:response data:somedata];
- return cachedResponse;
- }
- return [super cachedResponseForRequest:request];
-}
-
-- (NSData*)getSomeData:(NSString*)zip entry:(NSString*)entry
-{
- NSLog(@"get some data: %@ %@", zip, entry);
- const char* path = [ zip cStringUsingEncoding:NSUTF8StringEncoding ];
- unzFile unzipFile = unzOpen(path);
- NSData *data = nil;
- if (!unzipFile) {
- NSLog(@"cannot open file %@", zip);
- } else {
- path = [ entry cStringUsingEncoding:NSUTF8StringEncoding ];
- int r = unzLocateFile(unzipFile, path, 2);
- if (r != UNZ_OK) {
- NSLog(@"cannot find entry %@", entry);
- } else {
- unz_file_info info;
- r = unzGetCurrentFileInfo(unzipFile, &info, 0, 0, 0, 0, 0, 0);
- if (r != UNZ_OK) {
- NSLog(@"cannot determine size of %@", entry);
- } else {
- r = unzOpenCurrentFile(unzipFile);
- if (r != UNZ_OK) {
- NSLog(@"cannot open entry %@", entry);
- } else {
- char* contents = malloc(info.uncompressed_size);
- r = unzReadCurrentFile(unzipFile, contents, info.uncompressed_size);
- if (r != info.uncompressed_size) {
- NSLog(@"cannot uncompress file %@", entry);
- } else {
- data = [NSData dataWithBytes:(const void *)contents length:sizeof(unsigned char)*info.uncompressed_size];
- NSLog(@"read file entry %li %@", info.uncompressed_size, entry);
- }
- unzCloseCurrentFile(unzipFile);
- free(contents);
- }
- }
- }
- unzClose(unzipFile);
- }
- return data;
-}
-
-@end
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/crypt.h b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/crypt.h
deleted file mode 100644
index 622f4bc2ec4..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/crypt.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* crypt.h -- base code for crypt/uncrypt ZIPfile
-
-
- Version 1.01e, February 12th, 2005
-
- Copyright (C) 1998-2005 Gilles Vollant
-
- This code is a modified version of crypting code in Infozip distribution
-
- The encryption/decryption parts of this source code (as opposed to the
- non-echoing password parts) were originally written in Europe. The
- whole source package can be freely distributed, including from the USA.
- (Prior to January 2000, re-export from the US was a violation of US law.)
-
- This encryption code is a direct transcription of the algorithm from
- Roger Schlafly, described by Phil Katz in the file appnote.txt. This
- file (appnote.txt) is distributed with the PKZIP program (even in the
- version without encryption capabilities).
-
- If you don't need crypting in your application, just define symbols
- NOCRYPT and NOUNCRYPT.
-
- This code support the "Traditional PKWARE Encryption".
-
- The new AES encryption added on Zip format by Winzip (see the page
- http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong
- Encryption is not supported.
-*/
-
-#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))
-
-/***********************************************************************
- * Return the next byte in the pseudo-random sequence
- */
-static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
-{
- unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
- * unpredictable manner on 16-bit systems; not a problem
- * with any known compiler so far, though */
-
- temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
- return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
-}
-
-/***********************************************************************
- * Update the encryption keys with the next byte of plain text
- */
-static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)
-{
- (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
- (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
- (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
- {
- register int keyshift = (int)((*(pkeys+1)) >> 24);
- (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
- }
- return c;
-}
-
-
-/***********************************************************************
- * Initialize the encryption keys and the random header according to
- * the given password.
- */
-static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)
-{
- *(pkeys+0) = 305419896L;
- *(pkeys+1) = 591751049L;
- *(pkeys+2) = 878082192L;
- while (*passwd != '\0') {
- update_keys(pkeys,pcrc_32_tab,(int)*passwd);
- passwd++;
- }
-}
-
-#define zdecode(pkeys,pcrc_32_tab,c) \
- (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
-
-#define zencode(pkeys,pcrc_32_tab,c,t) \
- (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))
-
-#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED
-
-#define RAND_HEAD_LEN 12
- /* "last resort" source for second part of crypt seed pattern */
-# ifndef ZCR_SEED2
-# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
-# endif
-
-static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
- const char *passwd; /* password string */
- unsigned char *buf; /* where to write header */
- int bufSize;
- unsigned long* pkeys;
- const unsigned long* pcrc_32_tab;
- unsigned long crcForCrypting;
-{
- int n; /* index in random header */
- int t; /* temporary */
- int c; /* random byte */
- unsigned char header[RAND_HEAD_LEN-2]; /* random header */
- static unsigned calls = 0; /* ensure different random header each time */
-
- if (bufSize<RAND_HEAD_LEN)
- return 0;
-
- /* First generate RAND_HEAD_LEN-2 random bytes. We encrypt the
- * output of rand() to get less predictability, since rand() is
- * often poorly implemented.
- */
- if (++calls == 1)
- {
- srand((unsigned)(time(NULL) ^ ZCR_SEED2));
- }
- init_keys(passwd, pkeys, pcrc_32_tab);
- for (n = 0; n < RAND_HEAD_LEN-2; n++)
- {
- c = (rand() >> 7) & 0xff;
- header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
- }
- /* Encrypt random header (last two bytes is high word of crc) */
- init_keys(passwd, pkeys, pcrc_32_tab);
- for (n = 0; n < RAND_HEAD_LEN-2; n++)
- {
- buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
- }
- buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
- buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);
- return n;
-}
-
-#endif
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/ioapi.c b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/ioapi.c
deleted file mode 100644
index 7f20c182f98..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/ioapi.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/* ioapi.c -- IO base function header for compress/uncompress .zip
- files using zlib + zip or unzip API
-
- Version 1.01e, February 12th, 2005
-
- Copyright (C) 1998-2005 Gilles Vollant
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "zlib.h"
-#include "ioapi.h"
-
-
-
-/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
-
-#ifndef SEEK_CUR
-#define SEEK_CUR 1
-#endif
-
-#ifndef SEEK_END
-#define SEEK_END 2
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#endif
-
-voidpf ZCALLBACK fopen_file_func OF((
- voidpf opaque,
- const char* filename,
- int mode));
-
-uLong ZCALLBACK fread_file_func OF((
- voidpf opaque,
- voidpf stream,
- void* buf,
- uLong size));
-
-uLong ZCALLBACK fwrite_file_func OF((
- voidpf opaque,
- voidpf stream,
- const void* buf,
- uLong size));
-
-long ZCALLBACK ftell_file_func OF((
- voidpf opaque,
- voidpf stream));
-
-long ZCALLBACK fseek_file_func OF((
- voidpf opaque,
- voidpf stream,
- uLong offset,
- int origin));
-
-int ZCALLBACK fclose_file_func OF((
- voidpf opaque,
- voidpf stream));
-
-int ZCALLBACK ferror_file_func OF((
- voidpf opaque,
- voidpf stream));
-
-
-voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
- voidpf opaque;
- const char* filename;
- int mode;
-{
- FILE* file = NULL;
- const char* mode_fopen = NULL;
- if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
- mode_fopen = "rb";
- else
- if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
- mode_fopen = "r+b";
- else
- if (mode & ZLIB_FILEFUNC_MODE_CREATE)
- mode_fopen = "wb";
-
- if ((filename!=NULL) && (mode_fopen != NULL))
- file = fopen(filename, mode_fopen);
- return file;
-}
-
-
-uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
- voidpf opaque;
- voidpf stream;
- void* buf;
- uLong size;
-{
- uLong ret;
- ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
- return ret;
-}
-
-
-uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
- voidpf opaque;
- voidpf stream;
- const void* buf;
- uLong size;
-{
- uLong ret;
- ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
- return ret;
-}
-
-long ZCALLBACK ftell_file_func (opaque, stream)
- voidpf opaque;
- voidpf stream;
-{
- long ret;
- ret = ftell((FILE *)stream);
- return ret;
-}
-
-long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
- voidpf opaque;
- voidpf stream;
- uLong offset;
- int origin;
-{
- int fseek_origin=0;
- long ret;
- switch (origin)
- {
- case ZLIB_FILEFUNC_SEEK_CUR :
- fseek_origin = SEEK_CUR;
- break;
- case ZLIB_FILEFUNC_SEEK_END :
- fseek_origin = SEEK_END;
- break;
- case ZLIB_FILEFUNC_SEEK_SET :
- fseek_origin = SEEK_SET;
- break;
- default: return -1;
- }
- ret = 0;
- fseek((FILE *)stream, offset, fseek_origin);
- return ret;
-}
-
-int ZCALLBACK fclose_file_func (opaque, stream)
- voidpf opaque;
- voidpf stream;
-{
- int ret;
- ret = fclose((FILE *)stream);
- return ret;
-}
-
-int ZCALLBACK ferror_file_func (opaque, stream)
- voidpf opaque;
- voidpf stream;
-{
- int ret;
- ret = ferror((FILE *)stream);
- return ret;
-}
-
-void fill_fopen_filefunc (pzlib_filefunc_def)
- zlib_filefunc_def* pzlib_filefunc_def;
-{
- pzlib_filefunc_def->zopen_file = fopen_file_func;
- pzlib_filefunc_def->zread_file = fread_file_func;
- pzlib_filefunc_def->zwrite_file = fwrite_file_func;
- pzlib_filefunc_def->ztell_file = ftell_file_func;
- pzlib_filefunc_def->zseek_file = fseek_file_func;
- pzlib_filefunc_def->zclose_file = fclose_file_func;
- pzlib_filefunc_def->zerror_file = ferror_file_func;
- pzlib_filefunc_def->opaque = NULL;
-}
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/ioapi.h b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/ioapi.h
deleted file mode 100644
index e73a3b2bd88..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/ioapi.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/* ioapi.h -- IO base function header for compress/uncompress .zip
- files using zlib + zip or unzip API
-
- Version 1.01e, February 12th, 2005
-
- Copyright (C) 1998-2005 Gilles Vollant
-*/
-
-#ifndef _ZLIBIOAPI_H
-#define _ZLIBIOAPI_H
-
-
-#define ZLIB_FILEFUNC_SEEK_CUR (1)
-#define ZLIB_FILEFUNC_SEEK_END (2)
-#define ZLIB_FILEFUNC_SEEK_SET (0)
-
-#define ZLIB_FILEFUNC_MODE_READ (1)
-#define ZLIB_FILEFUNC_MODE_WRITE (2)
-#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
-
-#define ZLIB_FILEFUNC_MODE_EXISTING (4)
-#define ZLIB_FILEFUNC_MODE_CREATE (8)
-
-
-#ifndef ZCALLBACK
-
-#if (defined(WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
-#define ZCALLBACK CALLBACK
-#else
-#define ZCALLBACK
-#endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode));
-typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size));
-typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
-typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream));
-typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin));
-typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream));
-typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
-
-typedef struct zlib_filefunc_def_s
-{
- open_file_func zopen_file;
- read_file_func zread_file;
- write_file_func zwrite_file;
- tell_file_func ztell_file;
- seek_file_func zseek_file;
- close_file_func zclose_file;
- testerror_file_func zerror_file;
- voidpf opaque;
-} zlib_filefunc_def;
-
-
-
-void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
-
-#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))
-#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))
-#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream))
-#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode))
-#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream))
-#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream))
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/mztools.c b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/mztools.c
deleted file mode 100644
index 74e6c757786..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/mztools.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- Additional tools for Minizip
- Code: Xavier Roche '2004
- License: Same as ZLIB (www.gzip.org)
-*/
-
-/* Code */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "zlib.h"
-#include "unzip.h"
-
-#define READ_8(adr) ((unsigned char)*(adr))
-#define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) )
-#define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) )
-
-#define WRITE_8(buff, n) do { \
- *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \
-} while(0)
-#define WRITE_16(buff, n) do { \
- WRITE_8((unsigned char*)(buff), n); \
- WRITE_8(((unsigned char*)(buff)) + 1, (n) >> 8); \
-} while(0)
-#define WRITE_32(buff, n) do { \
- WRITE_16((unsigned char*)(buff), (n) & 0xffff); \
- WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \
-} while(0)
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/mztools.h b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/mztools.h
deleted file mode 100644
index 82d1597ad70..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/mztools.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- Additional tools for Minizip
- Code: Xavier Roche '2004
- License: Same as ZLIB (www.gzip.org)
-*/
-
-#ifndef _zip_tools_H
-#define _zip_tools_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _ZLIB_H
-#include "zlib.h"
-#endif
-
-#include "unzip.h"
-
-/* Repair a ZIP file (missing central directory)
- file: file to recover
- fileOut: output file after recovery
- fileOutTmp: temporary file name used for recovery
-*/
-extern int ZEXPORT unzRepair(const char* file,
- const char* fileOut,
- const char* fileOutTmp,
- uLong* nRecovered,
- uLong* bytesRecovered);
-
-#endif
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/unzip.c b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/unzip.c
deleted file mode 100644
index 81aee6a149d..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/unzip.c
+++ /dev/null
@@ -1,1597 +0,0 @@
-/* unzip.c -- IO for uncompress .zip files using zlib
- Version 1.01e, February 12th, 2005
-
- Copyright (C) 1998-2005 Gilles Vollant
-
- Read unzip.h for more info
-*/
-
-/* Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of
-compatibility with older software. The following is from the original crypt.c. Code
-woven in by Terry Thorsen 1/2003.
-*/
-/*
- Copyright (c) 1990-2000 Info-ZIP. All rights reserved.
-
- See the accompanying file LICENSE, version 2000-Apr-09 or later
- (the contents of which are also included in zip.h) for terms of use.
- If, for some reason, all these files are missing, the Info-ZIP license
- also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
-*/
-/*
- crypt.c (full version) by Info-ZIP. Last revised: [see crypt.h]
-
- The encryption/decryption parts of this source code (as opposed to the
- non-echoing password parts) were originally written in Europe. The
- whole source package can be freely distributed, including from the USA.
- (Prior to January 2000, re-export from the US was a violation of US law.)
- */
-
-/*
- This encryption code is a direct transcription of the algorithm from
- Roger Schlafly, described by Phil Katz in the file appnote.txt. This
- file (appnote.txt) is distributed with the PKZIP program (even in the
- version without encryption capabilities).
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "zlib.h"
-#include "unzip.h"
-
-#ifdef STDC
-# include <stddef.h>
-# include <string.h>
-# include <stdlib.h>
-#endif
-#ifdef NO_ERRNO_H
- extern int errno;
-#else
-# include <errno.h>
-#endif
-
-
-#ifndef local
-# define local static
-#endif
-/* compile with -Dlocal if your debugger can't find static symbols */
-
-
-#ifndef CASESENSITIVITYDEFAULT_NO
-# if !defined(unix) && !defined(CASESENSITIVITYDEFAULT_YES)
-# define CASESENSITIVITYDEFAULT_NO
-# endif
-#endif
-
-
-#ifndef UNZ_BUFSIZE
-#define UNZ_BUFSIZE (16384)
-#endif
-
-#ifndef UNZ_MAXFILENAMEINZIP
-#define UNZ_MAXFILENAMEINZIP (256)
-#endif
-
-#ifndef ALLOC
-# define ALLOC(size) (malloc(size))
-#endif
-#ifndef TRYFREE
-# define TRYFREE(p) {if (p) free(p);}
-#endif
-
-#define SIZECENTRALDIRITEM (0x2e)
-#define SIZEZIPLOCALHEADER (0x1e)
-
-
-
-
-const char unz_copyright[] =
- " unzip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll";
-
-/* unz_file_info_interntal contain internal info about a file in zipfile*/
-typedef struct unz_file_info_internal_s
-{
- uLong offset_curfile;/* relative offset of local header 4 bytes */
-} unz_file_info_internal;
-
-
-/* file_in_zip_read_info_s contain internal information about a file in zipfile,
- when reading and decompress it */
-typedef struct
-{
- char *read_buffer; /* internal buffer for compressed data */
- z_stream stream; /* zLib stream structure for inflate */
-
- uLong pos_in_zipfile; /* position in byte on the zipfile, for fseek*/
- uLong stream_initialised; /* flag set if stream structure is initialised*/
-
- uLong offset_local_extrafield;/* offset of the local extra field */
- uInt size_local_extrafield;/* size of the local extra field */
- uLong pos_local_extrafield; /* position in the local extra field in read*/
-
- uLong crc32; /* crc32 of all data uncompressed */
- uLong crc32_wait; /* crc32 we must obtain after decompress all */
- uLong rest_read_compressed; /* number of byte to be decompressed */
- uLong rest_read_uncompressed;/*number of byte to be obtained after decomp*/
- zlib_filefunc_def z_filefunc;
- voidpf filestream; /* io structore of the zipfile */
- uLong compression_method; /* compression method (0==store) */
- uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
- int raw;
-} file_in_zip_read_info_s;
-
-
-/* unz_s contain internal information about the zipfile
-*/
-typedef struct
-{
- zlib_filefunc_def z_filefunc;
- voidpf filestream; /* io structore of the zipfile */
- unz_global_info gi; /* public global information */
- uLong byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
- uLong num_file; /* number of the current file in the zipfile*/
- uLong pos_in_central_dir; /* pos of the current file in the central dir*/
- uLong current_file_ok; /* flag about the usability of the current file*/
- uLong central_pos; /* position of the beginning of the central dir*/
-
- uLong size_central_dir; /* size of the central directory */
- uLong offset_central_dir; /* offset of start of central directory with
- respect to the starting disk number */
-
- unz_file_info cur_file_info; /* public info about the current file in zip*/
- unz_file_info_internal cur_file_info_internal; /* private info about it*/
- file_in_zip_read_info_s* pfile_in_zip_read; /* structure about the current
- file if we are decompressing it */
- int encrypted;
-# ifndef NOUNCRYPT
- unsigned long keys[3]; /* keys defining the pseudo-random sequence */
- const unsigned long* pcrc_32_tab;
-# endif
-} unz_s;
-
-
-#ifndef NOUNCRYPT
-#include "crypt.h"
-#endif
-
-/* ===========================================================================
- Read a byte from a gz_stream; update next_in and avail_in. Return EOF
- for end of file.
- IN assertion: the stream s has been sucessfully opened for reading.
-*/
-
-
-local int unzlocal_getByte OF((
- const zlib_filefunc_def* pzlib_filefunc_def,
- voidpf filestream,
- int *pi));
-
-local int unzlocal_getByte(pzlib_filefunc_def,filestream,pi)
- const zlib_filefunc_def* pzlib_filefunc_def;
- voidpf filestream;
- int *pi;
-{
- unsigned char c;
- int err = (int)ZREAD(*pzlib_filefunc_def,filestream,&c,1);
- if (err==1)
- {
- *pi = (int)c;
- return UNZ_OK;
- }
- else
- {
- if (ZERROR(*pzlib_filefunc_def,filestream))
- return UNZ_ERRNO;
- else
- return UNZ_EOF;
- }
-}
-
-
-/* ===========================================================================
- Reads a long in LSB order from the given gz_stream. Sets
-*/
-local int unzlocal_getShort OF((
- const zlib_filefunc_def* pzlib_filefunc_def,
- voidpf filestream,
- uLong *pX));
-
-local int unzlocal_getShort (pzlib_filefunc_def,filestream,pX)
- const zlib_filefunc_def* pzlib_filefunc_def;
- voidpf filestream;
- uLong *pX;
-{
- uLong x ;
- int i;
- int err;
-
- err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
- x = (uLong)i;
-
- if (err==UNZ_OK)
- err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((uLong)i)<<8;
-
- if (err==UNZ_OK)
- *pX = x;
- else
- *pX = 0;
- return err;
-}
-
-local int unzlocal_getLong OF((
- const zlib_filefunc_def* pzlib_filefunc_def,
- voidpf filestream,
- uLong *pX));
-
-local int unzlocal_getLong (pzlib_filefunc_def,filestream,pX)
- const zlib_filefunc_def* pzlib_filefunc_def;
- voidpf filestream;
- uLong *pX;
-{
- uLong x ;
- int i;
- int err;
-
- err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
- x = (uLong)i;
-
- if (err==UNZ_OK)
- err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((uLong)i)<<8;
-
- if (err==UNZ_OK)
- err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((uLong)i)<<16;
-
- if (err==UNZ_OK)
- err = unzlocal_getByte(pzlib_filefunc_def,filestream,&i);
- x += ((uLong)i)<<24;
-
- if (err==UNZ_OK)
- *pX = x;
- else
- *pX = 0;
- return err;
-}
-
-
-/* My own strcmpi / strcasecmp */
-local int strcmpcasenosensitive_internal (fileName1,fileName2)
- const char* fileName1;
- const char* fileName2;
-{
- for (;;)
- {
- char c1=*(fileName1++);
- char c2=*(fileName2++);
- if ((c1>='a') && (c1<='z'))
- c1 -= 0x20;
- if ((c2>='a') && (c2<='z'))
- c2 -= 0x20;
- if (c1=='\0')
- return ((c2=='\0') ? 0 : -1);
- if (c2=='\0')
- return 1;
- if (c1<c2)
- return -1;
- if (c1>c2)
- return 1;
- }
-}
-
-
-#ifdef CASESENSITIVITYDEFAULT_NO
-#define CASESENSITIVITYDEFAULTVALUE 2
-#else
-#define CASESENSITIVITYDEFAULTVALUE 1
-#endif
-
-#ifndef STRCMPCASENOSENTIVEFUNCTION
-#define STRCMPCASENOSENTIVEFUNCTION strcmpcasenosensitive_internal
-#endif
-
-/*
- Compare two filename (fileName1,fileName2).
- If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
- If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
- or strcasecmp)
- If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
- (like 1 on Unix, 2 on Windows)
-
-*/
-extern int ZEXPORT unzStringFileNameCompare (fileName1,fileName2,iCaseSensitivity)
- const char* fileName1;
- const char* fileName2;
- int iCaseSensitivity;
-{
- if (iCaseSensitivity==0)
- iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE;
-
- if (iCaseSensitivity==1)
- return strcmp(fileName1,fileName2);
-
- return STRCMPCASENOSENTIVEFUNCTION(fileName1,fileName2);
-}
-
-#ifndef BUFREADCOMMENT
-#define BUFREADCOMMENT (0x400)
-#endif
-
-/*
- Locate the Central directory of a zipfile (at the end, just before
- the global comment)
-*/
-local uLong unzlocal_SearchCentralDir OF((
- const zlib_filefunc_def* pzlib_filefunc_def,
- voidpf filestream));
-
-local uLong unzlocal_SearchCentralDir(pzlib_filefunc_def,filestream)
- const zlib_filefunc_def* pzlib_filefunc_def;
- voidpf filestream;
-{
- unsigned char* buf;
- uLong uSizeFile;
- uLong uBackRead;
- uLong uMaxBack=0xffff; /* maximum size of global comment */
- uLong uPosFound=0;
-
- if (ZSEEK(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
- return 0;
-
-
- uSizeFile = ZTELL(*pzlib_filefunc_def,filestream);
-
- if (uMaxBack>uSizeFile)
- uMaxBack = uSizeFile;
-
- buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
- if (buf==NULL)
- return 0;
-
- uBackRead = 4;
- while (uBackRead<uMaxBack)
- {
- uLong uReadSize,uReadPos ;
- int i;
- if (uBackRead+BUFREADCOMMENT>uMaxBack)
- uBackRead = uMaxBack;
- else
- uBackRead+=BUFREADCOMMENT;
- uReadPos = uSizeFile-uBackRead ;
-
- uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
- (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
- if (ZSEEK(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0)
- break;
-
- if (ZREAD(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize)
- break;
-
- for (i=(int)uReadSize-3; (i--)>0;)
- if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) &&
- ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06))
- {
- uPosFound = uReadPos+i;
- break;
- }
-
- if (uPosFound!=0)
- break;
- }
- TRYFREE(buf);
- return uPosFound;
-}
-
-/*
- Open a Zip file. path contain the full pathname (by example,
- on a Windows NT computer "c:\\test\\zlib114.zip" or on an Unix computer
- "zlib/zlib114.zip".
- If the zipfile cannot be opened (file doesn't exist or in not valid), the
- return value is NULL.
- Else, the return value is a unzFile Handle, usable with other function
- of this unzip package.
-*/
-extern unzFile ZEXPORT unzOpen2 (path, pzlib_filefunc_def)
- const char *path;
- zlib_filefunc_def* pzlib_filefunc_def;
-{
- unz_s us;
- unz_s *s;
- uLong central_pos,uL;
-
- uLong number_disk; /* number of the current dist, used for
- spaning ZIP, unsupported, always 0*/
- uLong number_disk_with_CD; /* number the the disk with central dir, used
- for spaning ZIP, unsupported, always 0*/
- uLong number_entry_CD; /* total number of entries in
- the central dir
- (same than number_entry on nospan) */
-
- int err=UNZ_OK;
-
- if (unz_copyright[0]!=' ')
- return NULL;
-
- if (pzlib_filefunc_def==NULL)
- fill_fopen_filefunc(&us.z_filefunc);
- else
- us.z_filefunc = *pzlib_filefunc_def;
-
- us.filestream= (*(us.z_filefunc.zopen_file))(us.z_filefunc.opaque,
- path,
- ZLIB_FILEFUNC_MODE_READ |
- ZLIB_FILEFUNC_MODE_EXISTING);
- if (us.filestream==NULL)
- return NULL;
-
- central_pos = unzlocal_SearchCentralDir(&us.z_filefunc,us.filestream);
- if (central_pos==0)
- err=UNZ_ERRNO;
-
- if (ZSEEK(us.z_filefunc, us.filestream,
- central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0)
- err=UNZ_ERRNO;
-
- /* the signature, already checked */
- if (unzlocal_getLong(&us.z_filefunc, us.filestream,&uL)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- /* number of this disk */
- if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- /* number of the disk with the start of the central directory */
- if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_disk_with_CD)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- /* total number of entries in the central dir on this disk */
- if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.number_entry)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- /* total number of entries in the central dir */
- if (unzlocal_getShort(&us.z_filefunc, us.filestream,&number_entry_CD)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- if ((number_entry_CD!=us.gi.number_entry) ||
- (number_disk_with_CD!=0) ||
- (number_disk!=0))
- err=UNZ_BADZIPFILE;
-
- /* size of the central directory */
- if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.size_central_dir)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- /* offset of start of central directory with respect to the
- starting disk number */
- if (unzlocal_getLong(&us.z_filefunc, us.filestream,&us.offset_central_dir)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- /* zipfile comment length */
- if (unzlocal_getShort(&us.z_filefunc, us.filestream,&us.gi.size_comment)!=UNZ_OK)
- err=UNZ_ERRNO;
-
- if ((central_pos<us.offset_central_dir+us.size_central_dir) &&
- (err==UNZ_OK))
- err=UNZ_BADZIPFILE;
-
- if (err!=UNZ_OK)
- {
- ZCLOSE(us.z_filefunc, us.filestream);
- return NULL;
- }
-
- us.byte_before_the_zipfile = central_pos -
- (us.offset_central_dir+us.size_central_dir);
- us.central_pos = central_pos;
- us.pfile_in_zip_read = NULL;
- us.encrypted = 0;
-
-
- s=(unz_s*)ALLOC(sizeof(unz_s));
- *s=us;
- unzGoToFirstFile((unzFile)s);
- return (unzFile)s;
-}
-
-
-extern unzFile ZEXPORT unzOpen (path)
- const char *path;
-{
- return unzOpen2(path, NULL);
-}
-
-/*
- Close a ZipFile opened with unzipOpen.
- If there is files inside the .Zip opened with unzipOpenCurrentFile (see later),
- these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
- return UNZ_OK if there is no problem. */
-extern int ZEXPORT unzClose (file)
- unzFile file;
-{
- unz_s* s;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
-
- if (s->pfile_in_zip_read!=NULL)
- unzCloseCurrentFile(file);
-
- ZCLOSE(s->z_filefunc, s->filestream);
- TRYFREE(s);
- return UNZ_OK;
-}
-
-
-/*
- Write info about the ZipFile in the *pglobal_info structure.
- No preparation of the structure is needed
- return UNZ_OK if there is no problem. */
-extern int ZEXPORT unzGetGlobalInfo (file,pglobal_info)
- unzFile file;
- unz_global_info *pglobal_info;
-{
- unz_s* s;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- *pglobal_info=s->gi;
- return UNZ_OK;
-}
-
-
-/*
- Translate date/time from Dos format to tm_unz (readable more easilty)
-*/
-local void unzlocal_DosDateToTmuDate (ulDosDate, ptm)
- uLong ulDosDate;
- tm_unz* ptm;
-{
- uLong uDate;
- uDate = (uLong)(ulDosDate>>16);
- ptm->tm_mday = (uInt)(uDate&0x1f) ;
- ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ;
- ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ;
-
- ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);
- ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ;
- ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ;
-}
-
-/*
- Get Info about the current file in the zipfile, with internal only info
-*/
-local int unzlocal_GetCurrentFileInfoInternal OF((unzFile file,
- unz_file_info *pfile_info,
- unz_file_info_internal
- *pfile_info_internal,
- char *szFileName,
- uLong fileNameBufferSize,
- void *extraField,
- uLong extraFieldBufferSize,
- char *szComment,
- uLong commentBufferSize));
-
-local int unzlocal_GetCurrentFileInfoInternal (file,
- pfile_info,
- pfile_info_internal,
- szFileName, fileNameBufferSize,
- extraField, extraFieldBufferSize,
- szComment, commentBufferSize)
- unzFile file;
- unz_file_info *pfile_info;
- unz_file_info_internal *pfile_info_internal;
- char *szFileName;
- uLong fileNameBufferSize;
- void *extraField;
- uLong extraFieldBufferSize;
- char *szComment;
- uLong commentBufferSize;
-{
- unz_s* s;
- unz_file_info file_info;
- unz_file_info_internal file_info_internal;
- int err=UNZ_OK;
- uLong uMagic;
- long lSeek=0;
-
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- if (ZSEEK(s->z_filefunc, s->filestream,
- s->pos_in_central_dir+s->byte_before_the_zipfile,
- ZLIB_FILEFUNC_SEEK_SET)!=0)
- err=UNZ_ERRNO;
-
-
- /* we check the magic */
- if (err==UNZ_OK)
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
- err=UNZ_ERRNO;
- else if (uMagic!=0x02014b50)
- err=UNZ_BADZIPFILE;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.version_needed) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.flag) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.compression_method) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.dosDate) != UNZ_OK)
- err=UNZ_ERRNO;
-
- unzlocal_DosDateToTmuDate(file_info.dosDate,&file_info.tmu_date);
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.crc) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_filename) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_extra) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.size_file_comment) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&file_info.internal_fa) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info.external_fa) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK)
- err=UNZ_ERRNO;
-
- lSeek+=file_info.size_filename;
- if ((err==UNZ_OK) && (szFileName!=NULL))
- {
- uLong uSizeRead ;
- if (file_info.size_filename<fileNameBufferSize)
- {
- *(szFileName+file_info.size_filename)='\0';
- uSizeRead = file_info.size_filename;
- }
- else
- uSizeRead = fileNameBufferSize;
-
- if ((file_info.size_filename>0) && (fileNameBufferSize>0))
- if (ZREAD(s->z_filefunc, s->filestream,szFileName,uSizeRead)!=uSizeRead)
- err=UNZ_ERRNO;
- lSeek -= uSizeRead;
- }
-
-
- if ((err==UNZ_OK) && (extraField!=NULL))
- {
- uLong uSizeRead ;
- if (file_info.size_file_extra<extraFieldBufferSize)
- uSizeRead = file_info.size_file_extra;
- else
- uSizeRead = extraFieldBufferSize;
-
- if (lSeek!=0)
- if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
- lSeek=0;
- else
- err=UNZ_ERRNO;
- if ((file_info.size_file_extra>0) && (extraFieldBufferSize>0))
- if (ZREAD(s->z_filefunc, s->filestream,extraField,uSizeRead)!=uSizeRead)
- err=UNZ_ERRNO;
- lSeek += file_info.size_file_extra - uSizeRead;
- }
- else
- lSeek+=file_info.size_file_extra;
-
-
- if ((err==UNZ_OK) && (szComment!=NULL))
- {
- uLong uSizeRead ;
- if (file_info.size_file_comment<commentBufferSize)
- {
- *(szComment+file_info.size_file_comment)='\0';
- uSizeRead = file_info.size_file_comment;
- }
- else
- uSizeRead = commentBufferSize;
-
- if (lSeek!=0)
- if (ZSEEK(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
- lSeek=0;
- else
- err=UNZ_ERRNO;
- if ((file_info.size_file_comment>0) && (commentBufferSize>0))
- if (ZREAD(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
- err=UNZ_ERRNO;
- lSeek+=file_info.size_file_comment - uSizeRead;
- }
- else
- lSeek+=file_info.size_file_comment;
-
- if ((err==UNZ_OK) && (pfile_info!=NULL))
- *pfile_info=file_info;
-
- if ((err==UNZ_OK) && (pfile_info_internal!=NULL))
- *pfile_info_internal=file_info_internal;
-
- return err;
-}
-
-
-
-/*
- Write info about the ZipFile in the *pglobal_info structure.
- No preparation of the structure is needed
- return UNZ_OK if there is no problem.
-*/
-extern int ZEXPORT unzGetCurrentFileInfo (file,
- pfile_info,
- szFileName, fileNameBufferSize,
- extraField, extraFieldBufferSize,
- szComment, commentBufferSize)
- unzFile file;
- unz_file_info *pfile_info;
- char *szFileName;
- uLong fileNameBufferSize;
- void *extraField;
- uLong extraFieldBufferSize;
- char *szComment;
- uLong commentBufferSize;
-{
- return unzlocal_GetCurrentFileInfoInternal(file,pfile_info,NULL,
- szFileName,fileNameBufferSize,
- extraField,extraFieldBufferSize,
- szComment,commentBufferSize);
-}
-
-/*
- Set the current file of the zipfile to the first file.
- return UNZ_OK if there is no problem
-*/
-extern int ZEXPORT unzGoToFirstFile (file)
- unzFile file;
-{
- int err=UNZ_OK;
- unz_s* s;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- s->pos_in_central_dir=s->offset_central_dir;
- s->num_file=0;
- err=unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
- &s->cur_file_info_internal,
- NULL,0,NULL,0,NULL,0);
- s->current_file_ok = (err == UNZ_OK);
- return err;
-}
-
-/*
- Set the current file of the zipfile to the next file.
- return UNZ_OK if there is no problem
- return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
-*/
-extern int ZEXPORT unzGoToNextFile (file)
- unzFile file;
-{
- unz_s* s;
- int err;
-
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- if (!s->current_file_ok)
- return UNZ_END_OF_LIST_OF_FILE;
- if (s->gi.number_entry != 0xffff) /* 2^16 files overflow hack */
- if (s->num_file+1==s->gi.number_entry)
- return UNZ_END_OF_LIST_OF_FILE;
-
- s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +
- s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ;
- s->num_file++;
- err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
- &s->cur_file_info_internal,
- NULL,0,NULL,0,NULL,0);
- s->current_file_ok = (err == UNZ_OK);
- return err;
-}
-
-
-/*
- Try locate the file szFileName in the zipfile.
- For the iCaseSensitivity signification, see unzipStringFileNameCompare
-
- return value :
- UNZ_OK if the file is found. It becomes the current file.
- UNZ_END_OF_LIST_OF_FILE if the file is not found
-*/
-extern int ZEXPORT unzLocateFile (file, szFileName, iCaseSensitivity)
- unzFile file;
- const char *szFileName;
- int iCaseSensitivity;
-{
- unz_s* s;
- int err;
-
- /* We remember the 'current' position in the file so that we can jump
- * back there if we fail.
- */
- unz_file_info cur_file_infoSaved;
- unz_file_info_internal cur_file_info_internalSaved;
- uLong num_fileSaved;
- uLong pos_in_central_dirSaved;
-
-
- if (file==NULL)
- return UNZ_PARAMERROR;
-
- if (strlen(szFileName)>=UNZ_MAXFILENAMEINZIP)
- return UNZ_PARAMERROR;
-
- s=(unz_s*)file;
- if (!s->current_file_ok)
- return UNZ_END_OF_LIST_OF_FILE;
-
- /* Save the current state */
- num_fileSaved = s->num_file;
- pos_in_central_dirSaved = s->pos_in_central_dir;
- cur_file_infoSaved = s->cur_file_info;
- cur_file_info_internalSaved = s->cur_file_info_internal;
-
- err = unzGoToFirstFile(file);
-
- while (err == UNZ_OK)
- {
- char szCurrentFileName[UNZ_MAXFILENAMEINZIP+1];
- err = unzGetCurrentFileInfo(file,NULL,
- szCurrentFileName,sizeof(szCurrentFileName)-1,
- NULL,0,NULL,0);
- if (err == UNZ_OK)
- {
- if (unzStringFileNameCompare(szCurrentFileName,
- szFileName,iCaseSensitivity)==0)
- return UNZ_OK;
- err = unzGoToNextFile(file);
- }
- }
-
- /* We failed, so restore the state of the 'current file' to where we
- * were.
- */
- s->num_file = num_fileSaved ;
- s->pos_in_central_dir = pos_in_central_dirSaved ;
- s->cur_file_info = cur_file_infoSaved;
- s->cur_file_info_internal = cur_file_info_internalSaved;
- return err;
-}
-
-
-/*
-///////////////////////////////////////////
-// Contributed by Ryan Haksi (mailto://cryogen@infoserve.net)
-// I need random access
-//
-// Further optimization could be realized by adding an ability
-// to cache the directory in memory. The goal being a single
-// comprehensive file read to put the file I need in a memory.
-*/
-
-/*
-typedef struct unz_file_pos_s
-{
- uLong pos_in_zip_directory; // offset in file
- uLong num_of_file; // # of file
-} unz_file_pos;
-*/
-
-extern int ZEXPORT unzGetFilePos(file, file_pos)
- unzFile file;
- unz_file_pos* file_pos;
-{
- unz_s* s;
-
- if (file==NULL || file_pos==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- if (!s->current_file_ok)
- return UNZ_END_OF_LIST_OF_FILE;
-
- file_pos->pos_in_zip_directory = s->pos_in_central_dir;
- file_pos->num_of_file = s->num_file;
-
- return UNZ_OK;
-}
-
-extern int ZEXPORT unzGoToFilePos(file, file_pos)
- unzFile file;
- unz_file_pos* file_pos;
-{
- unz_s* s;
- int err;
-
- if (file==NULL || file_pos==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
-
- /* jump to the right spot */
- s->pos_in_central_dir = file_pos->pos_in_zip_directory;
- s->num_file = file_pos->num_of_file;
-
- /* set the current file */
- err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
- &s->cur_file_info_internal,
- NULL,0,NULL,0,NULL,0);
- /* return results */
- s->current_file_ok = (err == UNZ_OK);
- return err;
-}
-
-/*
-// Unzip Helper Functions - should be here?
-///////////////////////////////////////////
-*/
-
-/*
- Read the local header of the current zipfile
- Check the coherency of the local header and info in the end of central
- directory about this file
- store in *piSizeVar the size of extra info in local header
- (filename and size of extra field data)
-*/
-local int unzlocal_CheckCurrentFileCoherencyHeader (s,piSizeVar,
- poffset_local_extrafield,
- psize_local_extrafield)
- unz_s* s;
- uInt* piSizeVar;
- uLong *poffset_local_extrafield;
- uInt *psize_local_extrafield;
-{
- uLong uMagic,uData,uFlags;
- uLong size_filename;
- uLong size_extra_field;
- int err=UNZ_OK;
-
- *piSizeVar = 0;
- *poffset_local_extrafield = 0;
- *psize_local_extrafield = 0;
-
- if (ZSEEK(s->z_filefunc, s->filestream,s->cur_file_info_internal.offset_curfile +
- s->byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET)!=0)
- return UNZ_ERRNO;
-
-
- if (err==UNZ_OK)
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uMagic) != UNZ_OK)
- err=UNZ_ERRNO;
- else if (uMagic!=0x04034b50)
- err=UNZ_BADZIPFILE;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
- err=UNZ_ERRNO;
-/*
- else if ((err==UNZ_OK) && (uData!=s->cur_file_info.wVersion))
- err=UNZ_BADZIPFILE;
-*/
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uFlags) != UNZ_OK)
- err=UNZ_ERRNO;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&uData) != UNZ_OK)
- err=UNZ_ERRNO;
- else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compression_method))
- err=UNZ_BADZIPFILE;
-
- if ((err==UNZ_OK) && (s->cur_file_info.compression_method!=0) &&
- (s->cur_file_info.compression_method!=Z_DEFLATED))
- err=UNZ_BADZIPFILE;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* date/time */
- err=UNZ_ERRNO;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* crc */
- err=UNZ_ERRNO;
- else if ((err==UNZ_OK) && (uData!=s->cur_file_info.crc) &&
- ((uFlags & 8)==0))
- err=UNZ_BADZIPFILE;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size compr */
- err=UNZ_ERRNO;
- else if ((err==UNZ_OK) && (uData!=s->cur_file_info.compressed_size) &&
- ((uFlags & 8)==0))
- err=UNZ_BADZIPFILE;
-
- if (unzlocal_getLong(&s->z_filefunc, s->filestream,&uData) != UNZ_OK) /* size uncompr */
- err=UNZ_ERRNO;
- else if ((err==UNZ_OK) && (uData!=s->cur_file_info.uncompressed_size) &&
- ((uFlags & 8)==0))
- err=UNZ_BADZIPFILE;
-
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_filename) != UNZ_OK)
- err=UNZ_ERRNO;
- else if ((err==UNZ_OK) && (size_filename!=s->cur_file_info.size_filename))
- err=UNZ_BADZIPFILE;
-
- *piSizeVar += (uInt)size_filename;
-
- if (unzlocal_getShort(&s->z_filefunc, s->filestream,&size_extra_field) != UNZ_OK)
- err=UNZ_ERRNO;
- *poffset_local_extrafield= s->cur_file_info_internal.offset_curfile +
- SIZEZIPLOCALHEADER + size_filename;
- *psize_local_extrafield = (uInt)size_extra_field;
-
- *piSizeVar += (uInt)size_extra_field;
-
- return err;
-}
-
-/*
- Open for reading data the current file in the zipfile.
- If there is no error and the file is opened, the return value is UNZ_OK.
-*/
-extern int ZEXPORT unzOpenCurrentFile3 (file, method, level, raw, password)
- unzFile file;
- int* method;
- int* level;
- int raw;
- const char* password;
-{
- int err=UNZ_OK;
- uInt iSizeVar;
- unz_s* s;
- file_in_zip_read_info_s* pfile_in_zip_read_info;
- uLong offset_local_extrafield; /* offset of the local extra field */
- uInt size_local_extrafield; /* size of the local extra field */
-# ifndef NOUNCRYPT
- char source[12];
-# else
- if (password != NULL)
- return UNZ_PARAMERROR;
-# endif
-
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- if (!s->current_file_ok)
- return UNZ_PARAMERROR;
-
- if (s->pfile_in_zip_read != NULL)
- unzCloseCurrentFile(file);
-
- if (unzlocal_CheckCurrentFileCoherencyHeader(s,&iSizeVar,
- &offset_local_extrafield,&size_local_extrafield)!=UNZ_OK)
- return UNZ_BADZIPFILE;
-
- pfile_in_zip_read_info = (file_in_zip_read_info_s*)
- ALLOC(sizeof(file_in_zip_read_info_s));
- if (pfile_in_zip_read_info==NULL)
- return UNZ_INTERNALERROR;
-
- pfile_in_zip_read_info->read_buffer=(char*)ALLOC(UNZ_BUFSIZE);
- pfile_in_zip_read_info->offset_local_extrafield = offset_local_extrafield;
- pfile_in_zip_read_info->size_local_extrafield = size_local_extrafield;
- pfile_in_zip_read_info->pos_local_extrafield=0;
- pfile_in_zip_read_info->raw=raw;
-
- if (pfile_in_zip_read_info->read_buffer==NULL)
- {
- TRYFREE(pfile_in_zip_read_info);
- return UNZ_INTERNALERROR;
- }
-
- pfile_in_zip_read_info->stream_initialised=0;
-
- if (method!=NULL)
- *method = (int)s->cur_file_info.compression_method;
-
- if (level!=NULL)
- {
- *level = 6;
- switch (s->cur_file_info.flag & 0x06)
- {
- case 6 : *level = 1; break;
- case 4 : *level = 2; break;
- case 2 : *level = 9; break;
- }
- }
-
- if ((s->cur_file_info.compression_method!=0) &&
- (s->cur_file_info.compression_method!=Z_DEFLATED))
- err=UNZ_BADZIPFILE;
-
- pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
- pfile_in_zip_read_info->crc32=0;
- pfile_in_zip_read_info->compression_method =
- s->cur_file_info.compression_method;
- pfile_in_zip_read_info->filestream=s->filestream;
- pfile_in_zip_read_info->z_filefunc=s->z_filefunc;
- pfile_in_zip_read_info->byte_before_the_zipfile=s->byte_before_the_zipfile;
-
- pfile_in_zip_read_info->stream.total_out = 0;
-
- if ((s->cur_file_info.compression_method==Z_DEFLATED) &&
- (!raw))
- {
- pfile_in_zip_read_info->stream.zalloc = (alloc_func)0;
- pfile_in_zip_read_info->stream.zfree = (free_func)0;
- pfile_in_zip_read_info->stream.opaque = (voidpf)0;
- pfile_in_zip_read_info->stream.next_in = (voidpf)0;
- pfile_in_zip_read_info->stream.avail_in = 0;
-
- err=inflateInit2(&pfile_in_zip_read_info->stream, -MAX_WBITS);
- if (err == Z_OK)
- pfile_in_zip_read_info->stream_initialised=1;
- else
- {
- TRYFREE(pfile_in_zip_read_info);
- return err;
- }
- /* windowBits is passed < 0 to tell that there is no zlib header.
- * Note that in this case inflate *requires* an extra "dummy" byte
- * after the compressed stream in order to complete decompression and
- * return Z_STREAM_END.
- * In unzip, i don't wait absolutely Z_STREAM_END because I known the
- * size of both compressed and uncompressed data
- */
- }
- pfile_in_zip_read_info->rest_read_compressed =
- s->cur_file_info.compressed_size ;
- pfile_in_zip_read_info->rest_read_uncompressed =
- s->cur_file_info.uncompressed_size ;
-
-
- pfile_in_zip_read_info->pos_in_zipfile =
- s->cur_file_info_internal.offset_curfile + SIZEZIPLOCALHEADER +
- iSizeVar;
-
- pfile_in_zip_read_info->stream.avail_in = (uInt)0;
-
- s->pfile_in_zip_read = pfile_in_zip_read_info;
-
-# ifndef NOUNCRYPT
- if (password != NULL)
- {
- int i;
- s->pcrc_32_tab = get_crc_table();
- init_keys(password,s->keys,s->pcrc_32_tab);
- if (ZSEEK(s->z_filefunc, s->filestream,
- s->pfile_in_zip_read->pos_in_zipfile +
- s->pfile_in_zip_read->byte_before_the_zipfile,
- SEEK_SET)!=0)
- return UNZ_INTERNALERROR;
- if(ZREAD(s->z_filefunc, s->filestream,source, 12)<12)
- return UNZ_INTERNALERROR;
-
- for (i = 0; i<12; i++)
- zdecode(s->keys,s->pcrc_32_tab,source[i]);
-
- s->pfile_in_zip_read->pos_in_zipfile+=12;
- s->encrypted=1;
- }
-# endif
-
-
- return UNZ_OK;
-}
-
-extern int ZEXPORT unzOpenCurrentFile (file)
- unzFile file;
-{
- return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL);
-}
-
-extern int ZEXPORT unzOpenCurrentFilePassword (file, password)
- unzFile file;
- const char* password;
-{
- return unzOpenCurrentFile3(file, NULL, NULL, 0, password);
-}
-
-extern int ZEXPORT unzOpenCurrentFile2 (file,method,level,raw)
- unzFile file;
- int* method;
- int* level;
- int raw;
-{
- return unzOpenCurrentFile3(file, method, level, raw, NULL);
-}
-
-/*
- Read bytes from the current file.
- buf contain buffer where data must be copied
- len the size of buf.
-
- return the number of byte copied if somes bytes are copied
- return 0 if the end of file was reached
- return <0 with error code if there is an error
- (UNZ_ERRNO for IO error, or zLib error for uncompress error)
-*/
-extern int ZEXPORT unzReadCurrentFile (file, buf, len)
- unzFile file;
- voidp buf;
- unsigned len;
-{
- int err=UNZ_OK;
- uInt iRead = 0;
- unz_s* s;
- file_in_zip_read_info_s* pfile_in_zip_read_info;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- pfile_in_zip_read_info=s->pfile_in_zip_read;
-
- if (pfile_in_zip_read_info==NULL)
- return UNZ_PARAMERROR;
-
-
- if (pfile_in_zip_read_info->read_buffer == NULL)
- return UNZ_END_OF_LIST_OF_FILE;
- if (len==0)
- return 0;
-
- pfile_in_zip_read_info->stream.next_out = (Bytef*)buf;
-
- pfile_in_zip_read_info->stream.avail_out = (uInt)len;
-
- if ((len>pfile_in_zip_read_info->rest_read_uncompressed) &&
- (!(pfile_in_zip_read_info->raw)))
- pfile_in_zip_read_info->stream.avail_out =
- (uInt)pfile_in_zip_read_info->rest_read_uncompressed;
-
- if ((len>pfile_in_zip_read_info->rest_read_compressed+
- pfile_in_zip_read_info->stream.avail_in) &&
- (pfile_in_zip_read_info->raw))
- pfile_in_zip_read_info->stream.avail_out =
- (uInt)pfile_in_zip_read_info->rest_read_compressed+
- pfile_in_zip_read_info->stream.avail_in;
-
- while (pfile_in_zip_read_info->stream.avail_out>0)
- {
- if ((pfile_in_zip_read_info->stream.avail_in==0) &&
- (pfile_in_zip_read_info->rest_read_compressed>0))
- {
- uInt uReadThis = UNZ_BUFSIZE;
- if (pfile_in_zip_read_info->rest_read_compressed<uReadThis)
- uReadThis = (uInt)pfile_in_zip_read_info->rest_read_compressed;
- if (uReadThis == 0)
- return UNZ_EOF;
- if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
- pfile_in_zip_read_info->filestream,
- pfile_in_zip_read_info->pos_in_zipfile +
- pfile_in_zip_read_info->byte_before_the_zipfile,
- ZLIB_FILEFUNC_SEEK_SET)!=0)
- return UNZ_ERRNO;
- if (ZREAD(pfile_in_zip_read_info->z_filefunc,
- pfile_in_zip_read_info->filestream,
- pfile_in_zip_read_info->read_buffer,
- uReadThis)!=uReadThis)
- return UNZ_ERRNO;
-
-
-# ifndef NOUNCRYPT
- if(s->encrypted)
- {
- uInt i;
- for(i=0;i<uReadThis;i++)
- pfile_in_zip_read_info->read_buffer[i] =
- zdecode(s->keys,s->pcrc_32_tab,
- pfile_in_zip_read_info->read_buffer[i]);
- }
-# endif
-
-
- pfile_in_zip_read_info->pos_in_zipfile += uReadThis;
-
- pfile_in_zip_read_info->rest_read_compressed-=uReadThis;
-
- pfile_in_zip_read_info->stream.next_in =
- (Bytef*)pfile_in_zip_read_info->read_buffer;
- pfile_in_zip_read_info->stream.avail_in = (uInt)uReadThis;
- }
-
- if ((pfile_in_zip_read_info->compression_method==0) || (pfile_in_zip_read_info->raw))
- {
- uInt uDoCopy,i ;
-
- if ((pfile_in_zip_read_info->stream.avail_in == 0) &&
- (pfile_in_zip_read_info->rest_read_compressed == 0))
- return (iRead==0) ? UNZ_EOF : iRead;
-
- if (pfile_in_zip_read_info->stream.avail_out <
- pfile_in_zip_read_info->stream.avail_in)
- uDoCopy = pfile_in_zip_read_info->stream.avail_out ;
- else
- uDoCopy = pfile_in_zip_read_info->stream.avail_in ;
-
- for (i=0;i<uDoCopy;i++)
- *(pfile_in_zip_read_info->stream.next_out+i) =
- *(pfile_in_zip_read_info->stream.next_in+i);
-
- pfile_in_zip_read_info->crc32 = crc32(pfile_in_zip_read_info->crc32,
- pfile_in_zip_read_info->stream.next_out,
- uDoCopy);
- pfile_in_zip_read_info->rest_read_uncompressed-=uDoCopy;
- pfile_in_zip_read_info->stream.avail_in -= uDoCopy;
- pfile_in_zip_read_info->stream.avail_out -= uDoCopy;
- pfile_in_zip_read_info->stream.next_out += uDoCopy;
- pfile_in_zip_read_info->stream.next_in += uDoCopy;
- pfile_in_zip_read_info->stream.total_out += uDoCopy;
- iRead += uDoCopy;
- }
- else
- {
- uLong uTotalOutBefore,uTotalOutAfter;
- const Bytef *bufBefore;
- uLong uOutThis;
- int flush=Z_SYNC_FLUSH;
-
- uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
- bufBefore = pfile_in_zip_read_info->stream.next_out;
-
- /*
- if ((pfile_in_zip_read_info->rest_read_uncompressed ==
- pfile_in_zip_read_info->stream.avail_out) &&
- (pfile_in_zip_read_info->rest_read_compressed == 0))
- flush = Z_FINISH;
- */
- err=inflate(&pfile_in_zip_read_info->stream,flush);
-
- if ((err>=0) && (pfile_in_zip_read_info->stream.msg!=NULL))
- err = Z_DATA_ERROR;
-
- uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
- uOutThis = uTotalOutAfter-uTotalOutBefore;
-
- pfile_in_zip_read_info->crc32 =
- crc32(pfile_in_zip_read_info->crc32,bufBefore,
- (uInt)(uOutThis));
-
- pfile_in_zip_read_info->rest_read_uncompressed -=
- uOutThis;
-
- iRead += (uInt)(uTotalOutAfter - uTotalOutBefore);
-
- if (err==Z_STREAM_END)
- return (iRead==0) ? UNZ_EOF : iRead;
- if (err!=Z_OK)
- break;
- }
- }
-
- if (err==Z_OK)
- return iRead;
- return err;
-}
-
-
-/*
- Give the current position in uncompressed data
-*/
-extern z_off_t ZEXPORT unztell (file)
- unzFile file;
-{
- unz_s* s;
- file_in_zip_read_info_s* pfile_in_zip_read_info;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- pfile_in_zip_read_info=s->pfile_in_zip_read;
-
- if (pfile_in_zip_read_info==NULL)
- return UNZ_PARAMERROR;
-
- return (z_off_t)pfile_in_zip_read_info->stream.total_out;
-}
-
-
-/*
- return 1 if the end of file was reached, 0 elsewhere
-*/
-extern int ZEXPORT unzeof (file)
- unzFile file;
-{
- unz_s* s;
- file_in_zip_read_info_s* pfile_in_zip_read_info;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- pfile_in_zip_read_info=s->pfile_in_zip_read;
-
- if (pfile_in_zip_read_info==NULL)
- return UNZ_PARAMERROR;
-
- if (pfile_in_zip_read_info->rest_read_uncompressed == 0)
- return 1;
- else
- return 0;
-}
-
-
-
-/*
- Read extra field from the current file (opened by unzOpenCurrentFile)
- This is the local-header version of the extra field (sometimes, there is
- more info in the local-header version than in the central-header)
-
- if buf==NULL, it return the size of the local extra field that can be read
-
- if buf!=NULL, len is the size of the buffer, the extra header is copied in
- buf.
- the return value is the number of bytes copied in buf, or (if <0)
- the error code
-*/
-extern int ZEXPORT unzGetLocalExtrafield (file,buf,len)
- unzFile file;
- voidp buf;
- unsigned len;
-{
- unz_s* s;
- file_in_zip_read_info_s* pfile_in_zip_read_info;
- uInt read_now;
- uLong size_to_read;
-
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- pfile_in_zip_read_info=s->pfile_in_zip_read;
-
- if (pfile_in_zip_read_info==NULL)
- return UNZ_PARAMERROR;
-
- size_to_read = (pfile_in_zip_read_info->size_local_extrafield -
- pfile_in_zip_read_info->pos_local_extrafield);
-
- if (buf==NULL)
- return (int)size_to_read;
-
- if (len>size_to_read)
- read_now = (uInt)size_to_read;
- else
- read_now = (uInt)len ;
-
- if (read_now==0)
- return 0;
-
- if (ZSEEK(pfile_in_zip_read_info->z_filefunc,
- pfile_in_zip_read_info->filestream,
- pfile_in_zip_read_info->offset_local_extrafield +
- pfile_in_zip_read_info->pos_local_extrafield,
- ZLIB_FILEFUNC_SEEK_SET)!=0)
- return UNZ_ERRNO;
-
- if (ZREAD(pfile_in_zip_read_info->z_filefunc,
- pfile_in_zip_read_info->filestream,
- buf,read_now)!=read_now)
- return UNZ_ERRNO;
-
- return (int)read_now;
-}
-
-/*
- Close the file in zip opened with unzipOpenCurrentFile
- Return UNZ_CRCERROR if all the file was read but the CRC is not good
-*/
-extern int ZEXPORT unzCloseCurrentFile (file)
- unzFile file;
-{
- int err=UNZ_OK;
-
- unz_s* s;
- file_in_zip_read_info_s* pfile_in_zip_read_info;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- pfile_in_zip_read_info=s->pfile_in_zip_read;
-
- if (pfile_in_zip_read_info==NULL)
- return UNZ_PARAMERROR;
-
-
- if ((pfile_in_zip_read_info->rest_read_uncompressed == 0) &&
- (!pfile_in_zip_read_info->raw))
- {
- if (pfile_in_zip_read_info->crc32 != pfile_in_zip_read_info->crc32_wait)
- err=UNZ_CRCERROR;
- }
-
-
- TRYFREE(pfile_in_zip_read_info->read_buffer);
- pfile_in_zip_read_info->read_buffer = NULL;
- if (pfile_in_zip_read_info->stream_initialised)
- inflateEnd(&pfile_in_zip_read_info->stream);
-
- pfile_in_zip_read_info->stream_initialised = 0;
- TRYFREE(pfile_in_zip_read_info);
-
- s->pfile_in_zip_read=NULL;
-
- return err;
-}
-
-
-/*
- Get the global comment string of the ZipFile, in the szComment buffer.
- uSizeBuf is the size of the szComment buffer.
- return the number of byte copied or an error code <0
-*/
-extern int ZEXPORT unzGetGlobalComment (file, szComment, uSizeBuf)
- unzFile file;
- char *szComment;
- uLong uSizeBuf;
-{
- unz_s* s;
- uLong uReadThis ;
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
-
- uReadThis = uSizeBuf;
- if (uReadThis>s->gi.size_comment)
- uReadThis = s->gi.size_comment;
-
- if (ZSEEK(s->z_filefunc,s->filestream,s->central_pos+22,ZLIB_FILEFUNC_SEEK_SET)!=0)
- return UNZ_ERRNO;
-
- if (uReadThis>0)
- {
- *szComment='\0';
- if (ZREAD(s->z_filefunc,s->filestream,szComment,uReadThis)!=uReadThis)
- return UNZ_ERRNO;
- }
-
- if ((szComment != NULL) && (uSizeBuf > s->gi.size_comment))
- *(szComment+s->gi.size_comment)='\0';
- return (int)uReadThis;
-}
-
-/* Additions by RX '2004 */
-extern uLong ZEXPORT unzGetOffset (file)
- unzFile file;
-{
- unz_s* s;
-
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
- if (!s->current_file_ok)
- return 0;
- if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff)
- if (s->num_file==s->gi.number_entry)
- return 0;
- return s->pos_in_central_dir;
-}
-
-extern int ZEXPORT unzSetOffset (file, pos)
- unzFile file;
- uLong pos;
-{
- unz_s* s;
- int err;
-
- if (file==NULL)
- return UNZ_PARAMERROR;
- s=(unz_s*)file;
-
- s->pos_in_central_dir = pos;
- s->num_file = s->gi.number_entry; /* hack */
- err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
- &s->cur_file_info_internal,
- NULL,0,NULL,0,NULL,0);
- s->current_file_ok = (err == UNZ_OK);
- return err;
-}
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/unzip.h b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/unzip.h
deleted file mode 100644
index c3206a05899..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/minizip/unzip.h
+++ /dev/null
@@ -1,354 +0,0 @@
-/* unzip.h -- IO for uncompress .zip files using zlib
- Version 1.01e, February 12th, 2005
-
- Copyright (C) 1998-2005 Gilles Vollant
-
- This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g
- WinZip, InfoZip tools and compatible.
-
- Multi volume ZipFile (span) are not supported.
- Encryption compatible with pkzip 2.04g only supported
- Old compressions used by old PKZip 1.x are not supported
-
-
- I WAIT FEEDBACK at mail info@winimage.com
- Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution
-
- Condition of use and distribution are the same than zlib :
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the authors be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
-
-*/
-
-/* for more info about .ZIP format, see
- http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip
- http://www.info-zip.org/pub/infozip/doc/
- PkWare has also a specification at :
- ftp://ftp.pkware.com/probdesc.zip
-*/
-
-#ifndef _unz_H
-#define _unz_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _ZLIB_H
-#include "zlib.h"
-#endif
-
-#ifndef _ZLIBIOAPI_H
-#include "ioapi.h"
-#endif
-
-#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
-/* like the STRICT of WIN32, we define a pointer that cannot be converted
- from (void*) without cast */
-typedef struct TagunzFile__ { int unused; } unzFile__;
-typedef unzFile__ *unzFile;
-#else
-typedef voidp unzFile;
-#endif
-
-
-#define UNZ_OK (0)
-#define UNZ_END_OF_LIST_OF_FILE (-100)
-#define UNZ_ERRNO (Z_ERRNO)
-#define UNZ_EOF (0)
-#define UNZ_PARAMERROR (-102)
-#define UNZ_BADZIPFILE (-103)
-#define UNZ_INTERNALERROR (-104)
-#define UNZ_CRCERROR (-105)
-
-/* tm_unz contain date/time info */
-typedef struct tm_unz_s
-{
- uInt tm_sec; /* seconds after the minute - [0,59] */
- uInt tm_min; /* minutes after the hour - [0,59] */
- uInt tm_hour; /* hours since midnight - [0,23] */
- uInt tm_mday; /* day of the month - [1,31] */
- uInt tm_mon; /* months since January - [0,11] */
- uInt tm_year; /* years - [1980..2044] */
-} tm_unz;
-
-/* unz_global_info structure contain global data about the ZIPfile
- These data comes from the end of central dir */
-typedef struct unz_global_info_s
-{
- uLong number_entry; /* total number of entries in
- the central dir on this disk */
- uLong size_comment; /* size of the global comment of the zipfile */
-} unz_global_info;
-
-
-/* unz_file_info contain information about a file in the zipfile */
-typedef struct unz_file_info_s
-{
- uLong version; /* version made by 2 bytes */
- uLong version_needed; /* version needed to extract 2 bytes */
- uLong flag; /* general purpose bit flag 2 bytes */
- uLong compression_method; /* compression method 2 bytes */
- uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
- uLong crc; /* crc-32 4 bytes */
- uLong compressed_size; /* compressed size 4 bytes */
- uLong uncompressed_size; /* uncompressed size 4 bytes */
- uLong size_filename; /* filename length 2 bytes */
- uLong size_file_extra; /* extra field length 2 bytes */
- uLong size_file_comment; /* file comment length 2 bytes */
-
- uLong disk_num_start; /* disk number start 2 bytes */
- uLong internal_fa; /* internal file attributes 2 bytes */
- uLong external_fa; /* external file attributes 4 bytes */
-
- tm_unz tmu_date;
-} unz_file_info;
-
-extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
- const char* fileName2,
- int iCaseSensitivity));
-/*
- Compare two filename (fileName1,fileName2).
- If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
- If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
- or strcasecmp)
- If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
- (like 1 on Unix, 2 on Windows)
-*/
-
-
-extern unzFile ZEXPORT unzOpen OF((const char *path));
-/*
- Open a Zip file. path contain the full pathname (by example,
- on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
- "zlib/zlib113.zip".
- If the zipfile cannot be opened (file don't exist or in not valid), the
- return value is NULL.
- Else, the return value is a unzFile Handle, usable with other function
- of this unzip package.
-*/
-
-extern unzFile ZEXPORT unzOpen2 OF((const char *path,
- zlib_filefunc_def* pzlib_filefunc_def));
-/*
- Open a Zip file, like unzOpen, but provide a set of file low level API
- for read/write the zip file (see ioapi.h)
-*/
-
-extern int ZEXPORT unzClose OF((unzFile file));
-/*
- Close a ZipFile opened with unzipOpen.
- If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
- these files MUST be closed with unzipCloseCurrentFile before call unzipClose.
- return UNZ_OK if there is no problem. */
-
-extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
- unz_global_info *pglobal_info));
-/*
- Write info about the ZipFile in the *pglobal_info structure.
- No preparation of the structure is needed
- return UNZ_OK if there is no problem. */
-
-
-extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
- char *szComment,
- uLong uSizeBuf));
-/*
- Get the global comment string of the ZipFile, in the szComment buffer.
- uSizeBuf is the size of the szComment buffer.
- return the number of byte copied or an error code <0
-*/
-
-
-/***************************************************************************/
-/* Unzip package allow you browse the directory of the zipfile */
-
-extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
-/*
- Set the current file of the zipfile to the first file.
- return UNZ_OK if there is no problem
-*/
-
-extern int ZEXPORT unzGoToNextFile OF((unzFile file));
-/*
- Set the current file of the zipfile to the next file.
- return UNZ_OK if there is no problem
- return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
-*/
-
-extern int ZEXPORT unzLocateFile OF((unzFile file,
- const char *szFileName,
- int iCaseSensitivity));
-/*
- Try locate the file szFileName in the zipfile.
- For the iCaseSensitivity signification, see unzStringFileNameCompare
-
- return value :
- UNZ_OK if the file is found. It becomes the current file.
- UNZ_END_OF_LIST_OF_FILE if the file is not found
-*/
-
-
-/* ****************************************** */
-/* Ryan supplied functions */
-/* unz_file_info contain information about a file in the zipfile */
-typedef struct unz_file_pos_s
-{
- uLong pos_in_zip_directory; /* offset in zip file directory */
- uLong num_of_file; /* # of file */
-} unz_file_pos;
-
-extern int ZEXPORT unzGetFilePos(
- unzFile file,
- unz_file_pos* file_pos);
-
-extern int ZEXPORT unzGoToFilePos(
- unzFile file,
- unz_file_pos* file_pos);
-
-/* ****************************************** */
-
-extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
- unz_file_info *pfile_info,
- char *szFileName,
- uLong fileNameBufferSize,
- void *extraField,
- uLong extraFieldBufferSize,
- char *szComment,
- uLong commentBufferSize));
-/*
- Get Info about the current file
- if pfile_info!=NULL, the *pfile_info structure will contain somes info about
- the current file
- if szFileName!=NULL, the filemane string will be copied in szFileName
- (fileNameBufferSize is the size of the buffer)
- if extraField!=NULL, the extra field information will be copied in extraField
- (extraFieldBufferSize is the size of the buffer).
- This is the Central-header version of the extra field
- if szComment!=NULL, the comment string of the file will be copied in szComment
- (commentBufferSize is the size of the buffer)
-*/
-
-/***************************************************************************/
-/* for reading the content of the current zipfile, you can open it, read data
- from it, and close it (you can close it before reading all the file)
- */
-
-extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
-/*
- Open for reading data the current file in the zipfile.
- If there is no error, the return value is UNZ_OK.
-*/
-
-extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file,
- const char* password));
-/*
- Open for reading data the current file in the zipfile.
- password is a crypting password
- If there is no error, the return value is UNZ_OK.
-*/
-
-extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
- int* method,
- int* level,
- int raw));
-/*
- Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
- if raw==1
- *method will receive method of compression, *level will receive level of
- compression
- note : you can set level parameter as NULL (if you did not want known level,
- but you CANNOT set method parameter as NULL
-*/
-
-extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
- int* method,
- int* level,
- int raw,
- const char* password));
-/*
- Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
- if raw==1
- *method will receive method of compression, *level will receive level of
- compression
- note : you can set level parameter as NULL (if you did not want known level,
- but you CANNOT set method parameter as NULL
-*/
-
-
-extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
-/*
- Close the file in zip opened with unzOpenCurrentFile
- Return UNZ_CRCERROR if all the file was read but the CRC is not good
-*/
-
-extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
- voidp buf,
- unsigned len));
-/*
- Read bytes from the current file (opened by unzOpenCurrentFile)
- buf contain buffer where data must be copied
- len the size of buf.
-
- return the number of byte copied if somes bytes are copied
- return 0 if the end of file was reached
- return <0 with error code if there is an error
- (UNZ_ERRNO for IO error, or zLib error for uncompress error)
-*/
-
-extern z_off_t ZEXPORT unztell OF((unzFile file));
-/*
- Give the current position in uncompressed data
-*/
-
-extern int ZEXPORT unzeof OF((unzFile file));
-/*
- return 1 if the end of file was reached, 0 elsewhere
-*/
-
-extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
- voidp buf,
- unsigned len));
-/*
- Read extra field from the current file (opened by unzOpenCurrentFile)
- This is the local-header version of the extra field (sometimes, there is
- more info in the local-header version than in the central-header)
-
- if buf==NULL, it return the size of the local extra field
-
- if buf!=NULL, len is the size of the buffer, the extra header is copied in
- buf.
- the return value is the number of bytes copied in buf, or (if <0)
- the error code
-*/
-
-/***************************************************************************/
-
-/* Get the current file offset */
-extern uLong ZEXPORT unzGetOffset (unzFile file);
-
-/* Set the current file offset */
-extern int ZEXPORT unzSetOffset (unzFile file, uLong pos);
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _unz_H */
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/zip.h b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/zip.h
deleted file mode 100644
index a4f0716054c..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Classes/zip.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// Header.h
-// WebODF
-//
-// Created by KO GmbH on 3/1/12.
-// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
-//
-
-#ifndef WebODF_Header_h
-#define WebODF_Header_h
-
-void readZipEntry(const char* zippath, const char* entrypath) {}
-
-
-#endif
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/PhoneGap.plist b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/PhoneGap.plist
deleted file mode 100644
index 29011e6d11e..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/PhoneGap.plist
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>TopActivityIndicator</key>
- <string>gray</string>
- <key>EnableLocation</key>
- <false/>
- <key>EnableViewportScale</key>
- <false/>
- <key>AutoHideSplashScreen</key>
- <true/>
- <key>ShowSplashScreenSpinner</key>
- <true/>
- <key>MediaPlaybackRequiresUserAction</key>
- <false/>
- <key>AllowInlineMediaPlayback</key>
- <false/>
- <key>OpenAllWhitelistURLsInWebView</key>
- <false/>
- <key>ExternalHosts</key>
- <array>
- <string>zipserver</string>
- </array>
- <key>Plugins</key>
- <dict>
- <key>ZipClass</key>
- <string>NativeZip</string>
- <key>com.phonegap.accelerometer</key>
- <string>PGAccelerometer</string>
- <key>com.phonegap.camera</key>
- <string>PGCamera</string>
- <key>com.phonegap.connection</key>
- <string>PGConnection</string>
- <key>com.phonegap.contacts</key>
- <string>PGContacts</string>
- <key>com.phonegap.debugconsole</key>
- <string>PGDebugConsole</string>
- <key>com.phonegap.file</key>
- <string>PGFile</string>
- <key>com.phonegap.filetransfer</key>
- <string>PGFileTransfer</string>
- <key>com.phonegap.geolocation</key>
- <string>PGLocation</string>
- <key>com.phonegap.notification</key>
- <string>PGNotification</string>
- <key>com.phonegap.media</key>
- <string>PGSound</string>
- <key>com.phonegap.mediacapture</key>
- <string>PGCapture</string>
- <key>com.phonegap.splashscreen</key>
- <string>PGSplashScreen</string>
- <key>com.phonegap.battery</key>
- <string>PGBattery</string>
- </dict>
-</dict>
-</plist>
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/en.lproj/Localizable.strings b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/en.lproj/Localizable.strings
deleted file mode 100644
index 8972684435c..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/en.lproj/Localizable.strings
+++ /dev/null
@@ -1,25 +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.
- */
-
-// accessibility label for recording button
-"toggle audio recording" = "toggle audio recording";
-// notification spoken by VoiceOver when timed recording finishes
-"timed recording complete" = "timed recording complete";
-// accessibility hint for display of recorded elapsed time
-"recorded time in minutes and seconds" = "recorded time in minutes and seconds"; \ No newline at end of file
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/icons/icon-72.png b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/icons/icon-72.png
deleted file mode 100644
index 1aebf5d34b6..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/icons/icon-72.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/icons/icon.png b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/icons/icon.png
deleted file mode 100644
index 9e654236c0b..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/icons/icon.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/icons/icon@2x.png b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/icons/icon@2x.png
deleted file mode 100644
index b7ccb848e39..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/icons/icon@2x.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default-Landscape~ipad.png b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default-Landscape~ipad.png
deleted file mode 100644
index 06bb96b394f..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default-Landscape~ipad.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default-Portrait~ipad.png b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default-Portrait~ipad.png
deleted file mode 100644
index dbfed967af6..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default-Portrait~ipad.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default.png b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default.png
deleted file mode 100755
index fbf06e22d23..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default@2x.png b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default@2x.png
deleted file mode 100755
index e845a3f0b01..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/Resources/splash/Default@2x.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/WebODF-Info.plist b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/WebODF-Info.plist
deleted file mode 100644
index 18518ec4c14..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/WebODF-Info.plist
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleDisplayName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundleDocumentTypes</key>
- <array>
- <dict>
- <key>CFBundleTypeIconFiles</key>
- <array>
- <string>icon.png</string>
- </array>
- <key>CFBundleTypeName</key>
- <string>OpenDocument Text</string>
- <key>CFBundleTypeRole</key>
- <string>Viewer</string>
- <key>LSHandlerRank</key>
- <string>Owner</string>
- <key>LSItemContentTypes</key>
- <array>
- <string>org.oasis.opendocument.text</string>
- </array>
- </dict>
- <dict>
- <key>CFBundleTypeIconFiles</key>
- <array>
- <string>icon.png</string>
- </array>
- <key>CFBundleTypeName</key>
- <string>OpenDocument Presentation</string>
- <key>CFBundleTypeRole</key>
- <string>Viewer</string>
- <key>LSHandlerRank</key>
- <string>Owner</string>
- <key>LSItemContentTypes</key>
- <array>
- <string>org.oasis.opendocument.presentation</string>
- </array>
- </dict>
- </array>
- <key>CFBundleExecutable</key>
- <string>${EXECUTABLE_NAME}</string>
- <key>CFBundleIconFile</key>
- <string>icon.png</string>
- <key>CFBundleIconFiles</key>
- <array>
- <string>icon.png</string>
- <string>icon@2x.png</string>
- <string>icon-72.png</string>
- </array>
- <key>CFBundleIdentifier</key>
- <string>WebODF-03</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1.0</string>
- <key>LSRequiresIPhoneOS</key>
- <true/>
- <key>UISupportedInterfaceOrientations</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- </array>
- <key>UISupportedInterfaceOrientations~ipad</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- </array>
- <key>UTExportedTypeDeclarations</key>
- <array>
- <dict>
- <key>UTTypeConformsTo</key>
- <array>
- <string>org.gnu.gnu-zip-archive</string>
- </array>
- <key>UTTypeDescription</key>
- <string>OpenDocument Text</string>
- <key>UTTypeIdentifier</key>
- <string>org.oasis.opendocument.text</string>
- <key>UTTypeTagSpecification</key>
- <dict>
- <key>public.filename-extension</key>
- <string>odt</string>
- <key>public.mime-type</key>
- <string>application/vnd.oasis.opendocument.text</string>
- </dict>
- </dict>
- <dict>
- <key>UTTypeConformsTo</key>
- <array>
- <string>org.gnu.gnu-zip-archive</string>
- </array>
- <key>UTTypeDescription</key>
- <string>OpenDocument Presentation</string>
- <key>UTTypeIdentifier</key>
- <string>org.oasis.opendocument.presentation</string>
- <key>UTTypeTagSpecification</key>
- <dict>
- <key>public.filename-extension</key>
- <string>odp</string>
- <key>public.mime-type</key>
- <string>application/vnd.oasis.opendocument.presentation</string>
- </dict>
- </dict>
- </array>
-</dict>
-</plist>
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/WebODF-Prefix.pch b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/WebODF-Prefix.pch
deleted file mode 100644
index da48b6a1fde..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/WebODF-Prefix.pch
+++ /dev/null
@@ -1,7 +0,0 @@
-//
-// Prefix header for all source files of the 'WebODF' target in the 'WebODF' project
-//
-
-#ifdef __OBJC__
- #import <UIKit/UIKit.h>
-#endif
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/en.lproj/InfoPlist.strings b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/en.lproj/InfoPlist.strings
deleted file mode 100644
index 477b28ff8f8..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/en.lproj/InfoPlist.strings
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Localized versions of Info.plist keys */
-
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/main.m b/apps/files_odfviewer/src/webodf/programs/ios/WebODF/main.m
deleted file mode 100644
index bda2f99ea35..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/WebODF/main.m
+++ /dev/null
@@ -1,32 +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.
- */
-//
-// main.m
-// WebODF
-//
-// Created by KO GmbH on 2/2/12.
-// Copyright __MyCompanyName__ 2012. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-int main(int argc, char *argv[]) {
- int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
- return retVal;
-}
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/www/index.html b/apps/files_odfviewer/src/webodf/programs/ios/www/index.html
deleted file mode 100644
index ec998a10056..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/www/index.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>WebODF</title>
- <link href="sencha-touch.css" rel="stylesheet" type="text/css" />
- <link href="webodf.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="phonegap-1.4.1.js"></script>
- <script type="text/javascript" src="sencha-touch.js"></script>
- <script type="text/javascript" src="webodf.js"></script>
- <script type="text/javascript" src="nativezip.js"></script>
- <script type="text/javascript" src="app/app.js"></script>
- <script type="text/javascript" src="app/controller/Files.js"></script>
- <script type="text/javascript" src="app/model/FileSystem.js"></script>
- <script type="text/javascript" src="app/store/FileStore.js"></script>
- <script type="text/javascript" src="app/views/FileDetail.js"></script>
- <script type="text/javascript" src="app/views/FilesList.js"></script>
- <script type="text/javascript" src="app/views/OdfView.js"></script>
- <script type="text/javascript" src="app/views/Viewport.js"></script>
- <script type="text/javascript">
-var applicationReady = false,
- deviceReady = false,
- startScanningDirectories,
- application;
-document.addEventListener("deviceready", function () {
- deviceReady = true;
- if (applicationReady) {
- startScanningDirectories();
- }
-}, false);
-/**
- * Override this function so it waits until the device is ready.
- */
-onApplicationLaunch = function (app) {
- "use strict";
- application = app;
- applicationReady = true;
- startScanningDirectories = function () {
- if (typeof invokeString !== "undefined" && invokeString) {
- app.openUrl(invokeString);
- }
- app.startScanningDirectories();
- };
- if (deviceReady) {
- startScanningDirectories();
- }
-};
-function handleOpenURL(url) {
- application.openUrl(url);
-}
- </script>
- </head><body></body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/www/nativezip.js b/apps/files_odfviewer/src/webodf/programs/ios/www/nativezip.js
deleted file mode 100644
index 04a8ff13c7b..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/www/nativezip.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/*global PhoneGap, core*/
-
-var ZipPlugin = {
- loadAsString: function (zippath, entrypath, success, fail) {
- "use strict";
- return PhoneGap.exec(success, fail, "ZipClass", "loadAsString", [zippath, entrypath]);
- },
- loadAsDataURL: function (zippath, entrypath, mimetype, success, fail) {
- "use strict";
- return PhoneGap.exec(success, fail, "ZipClass", "loadAsDataURL", [zippath, entrypath, mimetype]);
- }
-};
-core.Zip = function (url, entriesReadCallback) {
- "use strict";
- // remove 'odf:' prefix
- url = url.substr(4);
- var zip = this;
- this.load = function (filename, callback) {
- //alert(filename);
- callback(null, "");
- };
- this.loadAsString = function (filename, callback) {
- alert("loadAsString");
- };
- this.loadAsDOM = function (filename, callback) {
- var xhr = new XMLHttpRequest();
- function handleResult() {
- var xml;
- console.log("loading " + filename + " status " + xhr.status + " readyState " + xhr.readyState);
- if (xhr.readyState === 4) {
- xml = xhr.responseXML;
- console.log("done accessing responseXML " + xml + " " + (xhr.responseText && xhr.responseText.length)
- + " " + xhr.statusText);
- console.log("statusText " + xhr.statusText);
- if (xhr.status === 0 && !xml) {
- // empty files are considered as errors
- callback("File " + path + " is not valid XML.");
- } else if (xhr.status === 200 || xhr.status === 0) {
- try {
- callback(null, xml);
- } catch (e) {
- console.log(e);
- }
- } else {
- // report error
- callback(xhr.responseText || xhr.statusText);
- }
- }
- }
- xhr.open('GET', "http://zipserver" + url + "?" + filename, true);
- xhr.onreadystatechange = handleResult;
- xhr.send(null);
- };
- this.loadAsDataURL = function (filename, mimetype, callback) {
- callback(null, "http://zipserver" + url + "?" + filename);
- /*
- ZipPlugin.loadAsDataURL(url, filename, mimetype,
- function (content) {
- callback(null, content);
- },
- function (err) { callback(err, null); }
- );
- */
- };
- this.getEntries = function () {
- alert("getEntries");
- };
- this.loadContentXmlAsFragments = function (filename, handler) {
- // the javascript implementation simply reads the file
- zip.loadAsString(filename, function (err, data) {
- if (err) {
- return handler.rootElementReady(err);
- }
- handler.rootElementReady(null, data, true);
- });
- };
- this.save = function () {
- alert("save");
- };
- this.write = function () {
- alert("write");
- };
- entriesReadCallback(null, this);
-};
diff --git a/apps/files_odfviewer/src/webodf/programs/ios/www/phonegap-1.4.1.js b/apps/files_odfviewer/src/webodf/programs/ios/www/phonegap-1.4.1.js
deleted file mode 100644
index 680e1802093..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/ios/www/phonegap-1.4.1.js
+++ /dev/null
@@ -1,4123 +0,0 @@
-/* PhoneGap v1.4.1 */
-/*
- 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.
-*/
-
-
-/*
- * Some base contributions
- * Copyright (c) 2011, Proyectos Equis Ka, S.L.
- */
-
-if (typeof PhoneGap === "undefined") {
-
-if (typeof(DeviceInfo) !== 'object'){
- DeviceInfo = {};
-}
-/**
- * This represents the PhoneGap API itself, and provides a global namespace for accessing
- * information about the state of PhoneGap.
- * @class
- */
-PhoneGap = {
- // This queue holds the currently executing command and all pending
- // commands executed with PhoneGap.exec().
- commandQueue: [],
- // Indicates if we're currently in the middle of flushing the command
- // queue on the native side.
- commandQueueFlushing: false,
- _constructors: [],
- documentEventHandler: {}, // Collection of custom document event handlers
- windowEventHandler: {}
-};
-
-/**
- * List of resource files loaded by PhoneGap.
- * This is used to ensure JS and other files are loaded only once.
- */
-PhoneGap.resources = {base: true};
-
-/**
- * Determine if resource has been loaded by PhoneGap
- *
- * @param name
- * @return
- */
-PhoneGap.hasResource = function(name) {
- return PhoneGap.resources[name];
-};
-
-/**
- * Add a resource to list of loaded resources by PhoneGap
- *
- * @param name
- */
-PhoneGap.addResource = function(name) {
- PhoneGap.resources[name] = true;
-};
-
-/**
- * Boolean flag indicating if the PhoneGap API is available and initialized.
- */ // TODO: Remove this, it is unused here ... -jm
-PhoneGap.available = DeviceInfo.uuid != undefined;
-
-/**
- * Add an initialization function to a queue that ensures it will run and initialize
- * application constructors only once PhoneGap has been initialized.
- * @param {Function} func The function callback you want run once PhoneGap is initialized
- */
-PhoneGap.addConstructor = function(func) {
- var state = document.readyState;
- if ( ( state == 'loaded' || state == 'complete' ) && DeviceInfo.uuid != null )
- {
- func();
- }
- else
- {
- PhoneGap._constructors.push(func);
- }
-};
-
-(function()
- {
- var timer = setInterval(function()
- {
-
- var state = document.readyState;
-
- if ( ( state == 'loaded' || state == 'complete' ) && DeviceInfo.uuid != null )
- {
- clearInterval(timer); // stop looking
- // run our constructors list
- while (PhoneGap._constructors.length > 0)
- {
- var constructor = PhoneGap._constructors.shift();
- try
- {
- constructor();
- }
- catch(e)
- {
- if (typeof(console['log']) == 'function')
- {
- console.log("Failed to run constructor: " + console.processMessage(e));
- }
- else
- {
- alert("Failed to run constructor: " + e.message);
- }
- }
- }
- // all constructors run, now fire the deviceready event
- var e = document.createEvent('Events');
- e.initEvent('deviceready');
- document.dispatchEvent(e);
- }
- }, 1);
-})();
-
-// session id for calls
-PhoneGap.sessionKey = 0;
-
-// centralized callbacks
-PhoneGap.callbackId = 0;
-PhoneGap.callbacks = {};
-PhoneGap.callbackStatus = {
- NO_RESULT: 0,
- OK: 1,
- CLASS_NOT_FOUND_EXCEPTION: 2,
- ILLEGAL_ACCESS_EXCEPTION: 3,
- INSTANTIATION_EXCEPTION: 4,
- MALFORMED_URL_EXCEPTION: 5,
- IO_EXCEPTION: 6,
- INVALID_ACTION: 7,
- JSON_EXCEPTION: 8,
- ERROR: 9
- };
-
-/**
- * Creates a gap bridge iframe used to notify the native code about queued
- * commands.
- *
- * @private
- */
-PhoneGap.createGapBridge = function() {
- gapBridge = document.createElement("iframe");
- gapBridge.setAttribute("style", "display:none;");
- gapBridge.setAttribute("height","0px");
- gapBridge.setAttribute("width","0px");
- gapBridge.setAttribute("frameborder","0");
- document.documentElement.appendChild(gapBridge);
- return gapBridge;
-}
-
-/**
- * Execute a PhoneGap command by queuing it and letting the native side know
- * there are queued commands. The native side will then request all of the
- * queued commands and execute them.
- *
- * Arguments may be in one of two formats:
- *
- * FORMAT ONE (preferable)
- * The native side will call PhoneGap.callbackSuccess or
- * PhoneGap.callbackError, depending upon the result of the action.
- *
- * @param {Function} success The success callback
- * @param {Function} fail The fail callback
- * @param {String} service The name of the service to use
- * @param {String} action The name of the action to use
- * @param {String[]} [args] Zero or more arguments to pass to the method
- *
- * FORMAT TWO
- * @param {String} command Command to be run in PhoneGap, e.g.
- * "ClassName.method"
- * @param {String[]} [args] Zero or more arguments to pass to the method
- * object parameters are passed as an array object
- * [object1, object2] each object will be passed as
- * JSON strings
- */
-PhoneGap.exec = function() {
- if (!PhoneGap.available) {
- alert("ERROR: Attempting to call PhoneGap.exec()"
- +" before 'deviceready'. Ignoring.");
- return;
- }
-
- var successCallback, failCallback, service, action, actionArgs;
- var callbackId = null;
- if (typeof arguments[0] !== "string") {
- // FORMAT ONE
- successCallback = arguments[0];
- failCallback = arguments[1];
- service = arguments[2];
- action = arguments[3];
- actionArgs = arguments[4];
-
- // Since we need to maintain backwards compatibility, we have to pass
- // an invalid callbackId even if no callback was provided since plugins
- // will be expecting it. The PhoneGap.exec() implementation allocates
- // an invalid callbackId and passes it even if no callbacks were given.
- callbackId = 'INVALID';
- } else {
- // FORMAT TWO
- splitCommand = arguments[0].split(".");
- action = splitCommand.pop();
- service = splitCommand.join(".");
- actionArgs = Array.prototype.splice.call(arguments, 1);
- }
-
- // Start building the command object.
- var command = {
- className: service,
- methodName: action,
- arguments: []
- };
-
- // Register the callbacks and add the callbackId to the positional
- // arguments if given.
- if (successCallback || failCallback) {
- callbackId = service + PhoneGap.callbackId++;
- PhoneGap.callbacks[callbackId] =
- {success:successCallback, fail:failCallback};
- }
- if (callbackId != null) {
- command.arguments.push(callbackId);
- }
-
- for (var i = 0; i < actionArgs.length; ++i) {
- var arg = actionArgs[i];
- if (arg == undefined || arg == null) {
- continue;
- } else if (typeof(arg) == 'object') {
- command.options = arg;
- } else {
- command.arguments.push(arg);
- }
- }
-
- // Stringify and queue the command. We stringify to command now to
- // effectively clone the command arguments in case they are mutated before
- // the command is executed.
- PhoneGap.commandQueue.push(JSON.stringify(command));
-
- // If the queue length is 1, then that means it was empty before we queued
- // the given command, so let the native side know that we have some
- // commands to execute, unless the queue is currently being flushed, in
- // which case the command will be picked up without notification.
- if (PhoneGap.commandQueue.length == 1 && !PhoneGap.commandQueueFlushing) {
- if (!PhoneGap.gapBridge) {
- PhoneGap.gapBridge = PhoneGap.createGapBridge();
- }
-
- PhoneGap.gapBridge.src = "gap://ready";
- }
-}
-
-/**
- * Called by native code to retrieve all queued commands and clear the queue.
- */
-PhoneGap.getAndClearQueuedCommands = function() {
- json = JSON.stringify(PhoneGap.commandQueue);
- PhoneGap.commandQueue = [];
- return json;
-}
-
-/**
- * Called by native code when returning successful result from an action.
- *
- * @param callbackId
- * @param args
- * args.status - PhoneGap.callbackStatus
- * args.message - return value
- * args.keepCallback - 0 to remove callback, 1 to keep callback in PhoneGap.callbacks[]
- */
-PhoneGap.callbackSuccess = function(callbackId, args) {
- if (PhoneGap.callbacks[callbackId]) {
-
- // If result is to be sent to callback
- if (args.status == PhoneGap.callbackStatus.OK) {
- try {
- if (PhoneGap.callbacks[callbackId].success) {
- PhoneGap.callbacks[callbackId].success(args.message);
- }
- }
- catch (e) {
- console.log("Error in success callback: "+callbackId+" = "+e);
- }
- }
-
- // Clear callback if not expecting any more results
- if (!args.keepCallback) {
- delete PhoneGap.callbacks[callbackId];
- }
- }
-};
-
-/**
- * Called by native code when returning error result from an action.
- *
- * @param callbackId
- * @param args
- */
-PhoneGap.callbackError = function(callbackId, args) {
- if (PhoneGap.callbacks[callbackId]) {
- try {
- if (PhoneGap.callbacks[callbackId].fail) {
- PhoneGap.callbacks[callbackId].fail(args.message);
- }
- }
- catch (e) {
- console.log("Error in error callback: "+callbackId+" = "+e);
- }
-
- // Clear callback if not expecting any more results
- if (!args.keepCallback) {
- delete PhoneGap.callbacks[callbackId];
- }
- }
-};
-
-
-/**
- * Does a deep clone of the object.
- *
- * @param obj
- * @return
- */
-PhoneGap.clone = function(obj) {
- if(!obj) {
- return obj;
- }
-
- if(obj instanceof Array){
- var retVal = new Array();
- for(var i = 0; i < obj.length; ++i){
- retVal.push(PhoneGap.clone(obj[i]));
- }
- return retVal;
- }
-
- if (obj instanceof Function) {
- return obj;
- }
-
- if(!(obj instanceof Object)){
- return obj;
- }
-
- if (obj instanceof Date) {
- return obj;
- }
-
- retVal = new Object();
- for(i in obj){
- if(!(i in retVal) || retVal[i] != obj[i]) {
- retVal[i] = PhoneGap.clone(obj[i]);
- }
- }
- return retVal;
-};
-
-// Intercept calls to document.addEventListener
-PhoneGap.m_document_addEventListener = document.addEventListener;
-
-// Intercept calls to window.addEventListener
-PhoneGap.m_window_addEventListener = window.addEventListener;
-
-/**
- * Add a custom window event handler.
- *
- * @param {String} event The event name that callback handles
- * @param {Function} callback The event handler
- */
-PhoneGap.addWindowEventHandler = function(event, callback) {
- PhoneGap.windowEventHandler[event] = callback;
-}
-
-/**
- * Add a custom document event handler.
- *
- * @param {String} event The event name that callback handles
- * @param {Function} callback The event handler
- */
-PhoneGap.addDocumentEventHandler = function(event, callback) {
- PhoneGap.documentEventHandler[event] = callback;
-}
-
-/**
- * Intercept adding document event listeners and handle our own
- *
- * @param {Object} evt
- * @param {Function} handler
- * @param capture
- */
-document.addEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
-
- // If subscribing to an event that is handled by a plugin
- if (typeof PhoneGap.documentEventHandler[e] !== "undefined") {
- if (PhoneGap.documentEventHandler[e](e, handler, true)) {
- return; // Stop default behavior
- }
- }
-
- PhoneGap.m_document_addEventListener.call(document, evt, handler, capture);
-};
-
-/**
- * Intercept adding window event listeners and handle our own
- *
- * @param {Object} evt
- * @param {Function} handler
- * @param capture
- */
-window.addEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
-
- // If subscribing to an event that is handled by a plugin
- if (typeof PhoneGap.windowEventHandler[e] !== "undefined") {
- if (PhoneGap.windowEventHandler[e](e, handler, true)) {
- return; // Stop default behavior
- }
- }
-
- PhoneGap.m_window_addEventListener.call(window, evt, handler, capture);
-};
-
-// Intercept calls to document.removeEventListener and watch for events that
-// are generated by PhoneGap native code
-PhoneGap.m_document_removeEventListener = document.removeEventListener;
-
-// Intercept calls to window.removeEventListener
-PhoneGap.m_window_removeEventListener = window.removeEventListener;
-
-/**
- * Intercept removing document event listeners and handle our own
- *
- * @param {Object} evt
- * @param {Function} handler
- * @param capture
- */
-document.removeEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
-
- // If unsubcribing from an event that is handled by a plugin
- if (typeof PhoneGap.documentEventHandler[e] !== "undefined") {
- if (PhoneGap.documentEventHandler[e](e, handler, false)) {
- return; // Stop default behavior
- }
- }
-
- PhoneGap.m_document_removeEventListener.call(document, evt, handler, capture);
-};
-
-/**
- * Intercept removing window event listeners and handle our own
- *
- * @param {Object} evt
- * @param {Function} handler
- * @param capture
- */
-window.removeEventListener = function(evt, handler, capture) {
- var e = evt.toLowerCase();
-
- // If unsubcribing from an event that is handled by a plugin
- if (typeof PhoneGap.windowEventHandler[e] !== "undefined") {
- if (PhoneGap.windowEventHandler[e](e, handler, false)) {
- return; // Stop default behavior
- }
- }
-
- PhoneGap.m_window_removeEventListener.call(window, evt, handler, capture);
-};
-
-/**
- * Method to fire document event
- *
- * @param {String} type The event type to fire
- * @param {Object} data Data to send with event
- */
-PhoneGap.fireDocumentEvent = function(type, data) {
- var e = document.createEvent('Events');
- e.initEvent(type);
- if (data) {
- for (var i in data) {
- e[i] = data[i];
- }
- }
- document.dispatchEvent(e);
-};
-
-/**
- * Method to fire window event
- *
- * @param {String} type The event type to fire
- * @param {Object} data Data to send with event
- */
-PhoneGap.fireWindowEvent = function(type, data) {
- var e = document.createEvent('Events');
- e.initEvent(type);
- if (data) {
- for (var i in data) {
- e[i] = data[i];
- }
- }
- window.dispatchEvent(e);
-};
-
-/**
- * Method to fire event from native code
- * Leaving this generic version to handle problems with iOS 3.x. Is currently used by orientation and battery events
- * Remove when iOS 3.x no longer supported and call fireWindowEvent or fireDocumentEvent directly
- */
-PhoneGap.fireEvent = function(type, target, data) {
- var e = document.createEvent('Events');
- e.initEvent(type);
- if (data) {
- for (var i in data) {
- e[i] = data[i];
- }
- }
- target = target || document;
- if (target.dispatchEvent === undefined) { // ie window.dispatchEvent is undefined in iOS 3.x
- target = document;
- }
-
- target.dispatchEvent(e);
-};
-/**
- * Create a UUID
- *
- * @return
- */
-PhoneGap.createUUID = function() {
- return PhoneGap.UUIDcreatePart(4) + '-' +
- PhoneGap.UUIDcreatePart(2) + '-' +
- PhoneGap.UUIDcreatePart(2) + '-' +
- PhoneGap.UUIDcreatePart(2) + '-' +
- PhoneGap.UUIDcreatePart(6);
-};
-
-PhoneGap.UUIDcreatePart = function(length) {
- var uuidpart = "";
- for (var i=0; i<length; i++) {
- var uuidchar = parseInt((Math.random() * 256)).toString(16);
- if (uuidchar.length == 1) {
- uuidchar = "0" + uuidchar;
- }
- uuidpart += uuidchar;
- }
- return uuidpart;
-};
-};
-
-
-if (!PhoneGap.hasResource("debugconsole")) {
- PhoneGap.addResource("debugconsole");
-
-/**
- * This class provides access to the debugging console.
- * @constructor
- */
-var DebugConsole = function() {
- this.winConsole = window.console;
- this.logLevel = DebugConsole.INFO_LEVEL;
-}
-
-// from most verbose, to least verbose
-DebugConsole.ALL_LEVEL = 1; // same as first level
-DebugConsole.INFO_LEVEL = 1;
-DebugConsole.WARN_LEVEL = 2;
-DebugConsole.ERROR_LEVEL = 4;
-DebugConsole.NONE_LEVEL = 8;
-
-DebugConsole.prototype.setLevel = function(level) {
- this.logLevel = level;
-};
-
-/**
- * Utility function for rendering and indenting strings, or serializing
- * objects to a string capable of being printed to the console.
- * @param {Object|String} message The string or object to convert to an indented string
- * @private
- */
-DebugConsole.prototype.processMessage = function(message, maxDepth) {
- if (maxDepth === undefined) maxDepth = 0;
- if (typeof(message) != 'object') {
- return (this.isDeprecated ? "WARNING: debug object is deprecated, please use console object \n" + message : message);
- } else {
- /**
- * @function
- * @ignore
- */
- function indent(str) {
- return str.replace(/^/mg, " ");
- }
- /**
- * @function
- * @ignore
- */
- function makeStructured(obj, depth) {
- var str = "";
- for (var i in obj) {
- try {
- if (typeof(obj[i]) == 'object' && depth < maxDepth) {
- str += i + ":\n" + indent(makeStructured(obj[i])) + "\n";
- } else {
- str += i + " = " + indent(String(obj[i])).replace(/^ /, "") + "\n";
- }
- } catch(e) {
- str += i + " = EXCEPTION: " + e.message + "\n";
- }
- }
- return str;
- }
-
- return ("Object:\n" + makeStructured(message, maxDepth));
- }
-};
-
-/**
- * Print a normal log message to the console
- * @param {Object|String} message Message or object to print to the console
- */
-DebugConsole.prototype.log = function(message, maxDepth) {
- if (PhoneGap.available && this.logLevel <= DebugConsole.INFO_LEVEL)
- PhoneGap.exec(null, null, 'com.phonegap.debugconsole', 'log',
- [ this.processMessage(message, maxDepth), { logLevel: 'INFO' } ]
- );
- else
- this.winConsole.log(message);
-};
-
-/**
- * Print a warning message to the console
- * @param {Object|String} message Message or object to print to the console
- */
-DebugConsole.prototype.warn = function(message, maxDepth) {
- if (PhoneGap.available && this.logLevel <= DebugConsole.WARN_LEVEL)
- PhoneGap.exec(null, null, 'com.phonegap.debugconsole', 'log',
- [ this.processMessage(message, maxDepth), { logLevel: 'WARN' } ]
- );
- else
- this.winConsole.error(message);
-};
-
-/**
- * Print an error message to the console
- * @param {Object|String} message Message or object to print to the console
- */
-DebugConsole.prototype.error = function(message, maxDepth) {
- if (PhoneGap.available && this.logLevel <= DebugConsole.ERROR_LEVEL)
- PhoneGap.exec(null, null, 'com.phonegap.debugconsole', 'log',
- [ this.processMessage(message, maxDepth), { logLevel: 'ERROR' } ]
- );
- else
- this.winConsole.error(message);
-};
-
-PhoneGap.addConstructor(function() {
- window.console = new DebugConsole();
-});
-};
-if (!PhoneGap.hasResource("position")) {
- PhoneGap.addResource("position");
-
-/**
- * This class contains position information.
- * @param {Object} lat
- * @param {Object} lng
- * @param {Object} acc
- * @param {Object} alt
- * @param {Object} altAcc
- * @param {Object} head
- * @param {Object} vel
- * @constructor
- */
-Position = function(coords, timestamp) {
- this.coords = Coordinates.cloneFrom(coords);
- this.timestamp = timestamp || new Date().getTime();
-};
-
-Position.prototype.equals = function(other) {
- return (this.coords && other && other.coords &&
- this.coords.latitude == other.coords.latitude &&
- this.coords.longitude == other.coords.longitude);
-};
-
-Position.prototype.clone = function()
-{
- return new Position(
- this.coords? this.coords.clone() : null,
- this.timestamp? this.timestamp : new Date().getTime()
- );
-}
-
-Coordinates = function(lat, lng, alt, acc, head, vel, altAcc) {
- /**
- * The latitude of the position.
- */
- this.latitude = lat;
- /**
- * The longitude of the position,
- */
- this.longitude = lng;
- /**
- * The altitude of the position.
- */
- this.altitude = alt;
- /**
- * The accuracy of the position.
- */
- this.accuracy = acc;
- /**
- * The direction the device is moving at the position.
- */
- this.heading = head;
- /**
- * The velocity with which the device is moving at the position.
- */
- this.speed = vel;
- /**
- * The altitude accuracy of the position.
- */
- this.altitudeAccuracy = (altAcc != 'undefined') ? altAcc : null;
-};
-
-Coordinates.prototype.clone = function()
-{
- return new Coordinates(
- this.latitude,
- this.longitude,
- this.altitude,
- this.accuracy,
- this.heading,
- this.speed,
- this.altitudeAccuracy
- );
-};
-
-Coordinates.cloneFrom = function(obj)
-{
- return new Coordinates(
- obj.latitude,
- obj.longitude,
- obj.altitude,
- obj.accuracy,
- obj.heading,
- obj.speed,
- obj.altitudeAccuracy
- );
-};
-
-/**
- * This class specifies the options for requesting position data.
- * @constructor
- */
-PositionOptions = function(enableHighAccuracy, timeout, maximumAge) {
- /**
- * Specifies the desired position accuracy.
- */
- this.enableHighAccuracy = enableHighAccuracy || false;
- /**
- * The timeout after which if position data cannot be obtained the errorCallback
- * is called.
- */
- this.timeout = timeout || 10000;
- /**
- * The age of a cached position whose age is no greater than the specified time
- * in milliseconds.
- */
- this.maximumAge = maximumAge || 0;
-
- if (this.maximumAge < 0) {
- this.maximumAge = 0;
- }
-};
-
-/**
- * This class contains information about any GPS errors.
- * @constructor
- */
-PositionError = function(code, message) {
- this.code = code || 0;
- this.message = message || "";
-};
-
-PositionError.UNKNOWN_ERROR = 0;
-PositionError.PERMISSION_DENIED = 1;
-PositionError.POSITION_UNAVAILABLE = 2;
-PositionError.TIMEOUT = 3;
-
-};if (!PhoneGap.hasResource("acceleration")) {
- PhoneGap.addResource("acceleration");
-
-
-/**
- * This class contains acceleration information
- * @constructor
- * @param {Number} x The force applied by the device in the x-axis.
- * @param {Number} y The force applied by the device in the y-axis.
- * @param {Number} z The force applied by the device in the z-axis.
- */
-Acceleration = function(x, y, z) {
- /**
- * The force applied by the device in the x-axis.
- */
- this.x = x;
- /**
- * The force applied by the device in the y-axis.
- */
- this.y = y;
- /**
- * The force applied by the device in the z-axis.
- */
- this.z = z;
- /**
- * The time that the acceleration was obtained.
- */
- this.timestamp = new Date().getTime();
-}
-
-/**
- * This class specifies the options for requesting acceleration data.
- * @constructor
- */
-AccelerationOptions = function() {
- /**
- * The timeout after which if acceleration data cannot be obtained the errorCallback
- * is called.
- */
- this.timeout = 10000;
-}
-};if (!PhoneGap.hasResource("accelerometer")) {
- PhoneGap.addResource("accelerometer");
-
-/**
- * This class provides access to device accelerometer data.
- * @constructor
- */
-Accelerometer = function()
-{
- /**
- * The last known acceleration.
- */
- this.lastAcceleration = new Acceleration(0,0,0);
-}
-
-/**
- * Asynchronously aquires the current acceleration.
- * @param {Function} successCallback The function to call when the acceleration
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the acceleration data.
- * @param {AccelerationOptions} options The options for getting the accelerometer data
- * such as timeout.
- */
-Accelerometer.prototype.getCurrentAcceleration = function(successCallback, errorCallback, options) {
- // If the acceleration is available then call success
- // If the acceleration is not available then call error
-
- // Created for iPhone, Iphone passes back _accel obj litteral
- if (typeof successCallback == "function") {
- successCallback(this.lastAcceleration);
- }
-};
-
-// private callback called from Obj-C by name
-Accelerometer.prototype._onAccelUpdate = function(x,y,z)
-{
- this.lastAcceleration = new Acceleration(x,y,z);
-};
-
-/**
- * Asynchronously aquires the acceleration repeatedly at a given interval.
- * @param {Function} successCallback The function to call each time the acceleration
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the acceleration data.
- * @param {AccelerationOptions} options The options for getting the accelerometer data
- * such as timeout.
- */
-
-Accelerometer.prototype.watchAcceleration = function(successCallback, errorCallback, options) {
- //this.getCurrentAcceleration(successCallback, errorCallback, options);
- // TODO: add the interval id to a list so we can clear all watches
- var frequency = (options != undefined && options.frequency != undefined) ? options.frequency : 10000;
- var updatedOptions = {
- desiredFrequency:frequency
- }
- PhoneGap.exec(null, null, "com.phonegap.accelerometer", "start", [options]);
-
- return setInterval(function() {
- navigator.accelerometer.getCurrentAcceleration(successCallback, errorCallback, options);
- }, frequency);
-};
-
-/**
- * Clears the specified accelerometer watch.
- * @param {String} watchId The ID of the watch returned from #watchAcceleration.
- */
-Accelerometer.prototype.clearWatch = function(watchId) {
- PhoneGap.exec(null, null, "com.phonegap.accelerometer", "stop", []);
- clearInterval(watchId);
-};
-
-Accelerometer.install = function()
-{
- if (typeof navigator.accelerometer == "undefined") {
- navigator.accelerometer = new Accelerometer();
- }
-};
-
-Accelerometer.installDeviceMotionHandler = function()
-{
- if (!(window.DeviceMotionEvent == undefined)) {
- // supported natively, so we don't have to add support
- return;
- }
-
- var self = this;
- var devicemotionEvent = 'devicemotion';
- self.deviceMotionWatchId = null;
- self.deviceMotionListenerCount = 0;
- self.deviceMotionLastEventTimestamp = 0;
-
- // backup original `window.addEventListener`, `window.removeEventListener`
- var _addEventListener = window.addEventListener;
- var _removeEventListener = window.removeEventListener;
-
- var windowDispatchAvailable = !(window.dispatchEvent === undefined); // undefined in iOS 3.x
-
- var accelWin = function(acceleration) {
- var evt = document.createEvent('Events');
- evt.initEvent(devicemotionEvent);
-
- evt.acceleration = null; // not all devices have gyroscope, don't care for now if we actually have it.
- evt.rotationRate = null; // not all devices have gyroscope, don't care for now if we actually have it:
- evt.accelerationIncludingGravity = acceleration; // accelerometer, all iOS devices have it
-
- var currentTime = new Date().getTime();
- evt.interval = (self.deviceMotionLastEventTimestamp == 0) ? 0 : (currentTime - self.deviceMotionLastEventTimestamp);
- self.deviceMotionLastEventTimestamp = currentTime;
-
- if (windowDispatchAvailable) {
- window.dispatchEvent(evt);
- } else {
- document.dispatchEvent(evt);
- }
- };
-
- var accelFail = function() {
-
- };
-
- // override `window.addEventListener`
- window.addEventListener = function() {
- if (arguments[0] === devicemotionEvent) {
- ++(self.deviceMotionListenerCount);
- if (self.deviceMotionListenerCount == 1) { // start
- self.deviceMotionWatchId = navigator.accelerometer.watchAcceleration(accelWin, accelFail, { frequency:500});
- }
- }
-
- if (!windowDispatchAvailable) {
- return document.addEventListener.apply(this, arguments);
- } else {
- return _addEventListener.apply(this, arguments);
- }
- };
-
- // override `window.removeEventListener'
- window.removeEventListener = function() {
- if (arguments[0] === devicemotionEvent) {
- --(self.deviceMotionListenerCount);
- if (self.deviceMotionListenerCount == 0) { // stop
- navigator.accelerometer.clearWatch(self.deviceMotionWatchId);
- }
- }
-
- if (!windowDispatchAvailable) {
- return document.removeEventListener.apply(this, arguments);
- } else {
- return _removeEventListener.apply(this, arguments);
- }
- };
-};
-
-
-PhoneGap.addConstructor(Accelerometer.install);
-PhoneGap.addConstructor(Accelerometer.installDeviceMotionHandler);
-
-};
-if (!PhoneGap.hasResource("battery")) {
-PhoneGap.addResource("battery");
-
-/**
- * This class contains information about the current battery status.
- * @constructor
- */
-var Battery = function() {
- this._level = null;
- this._isPlugged = null;
- this._batteryListener = [];
- this._lowListener = [];
- this._criticalListener = [];
-};
-
-/**
- * Registers as an event producer for battery events.
- *
- * @param {Object} eventType
- * @param {Object} handler
- * @param {Object} add
- */
-Battery.prototype.eventHandler = function(eventType, handler, add) {
- var me = navigator.battery;
- if (add) {
- // If there are no current registered event listeners start the battery listener on native side.
- if (me._batteryListener.length === 0 && me._lowListener.length === 0 && me._criticalListener.length === 0) {
- PhoneGap.exec(me._status, me._error, "com.phonegap.battery", "start", []);
- }
-
- // Register the event listener in the proper array
- if (eventType === "batterystatus") {
- var pos = me._batteryListener.indexOf(handler);
- if (pos === -1) {
- me._batteryListener.push(handler);
- }
- } else if (eventType === "batterylow") {
- var pos = me._lowListener.indexOf(handler);
- if (pos === -1) {
- me._lowListener.push(handler);
- }
- } else if (eventType === "batterycritical") {
- var pos = me._criticalListener.indexOf(handler);
- if (pos === -1) {
- me._criticalListener.push(handler);
- }
- }
- } else {
- // Remove the event listener from the proper array
- if (eventType === "batterystatus") {
- var pos = me._batteryListener.indexOf(handler);
- if (pos > -1) {
- me._batteryListener.splice(pos, 1);
- }
- } else if (eventType === "batterylow") {
- var pos = me._lowListener.indexOf(handler);
- if (pos > -1) {
- me._lowListener.splice(pos, 1);
- }
- } else if (eventType === "batterycritical") {
- var pos = me._criticalListener.indexOf(handler);
- if (pos > -1) {
- me._criticalListener.splice(pos, 1);
- }
- }
-
- // If there are no more registered event listeners stop the battery listener on native side.
- if (me._batteryListener.length === 0 && me._lowListener.length === 0 && me._criticalListener.length === 0) {
- PhoneGap.exec(null, null, "com.phonegap.battery", "stop", []);
- }
- }
-};
-
-/**
- * Callback for battery status
- *
- * @param {Object} info keys: level, isPlugged
- */
-Battery.prototype._status = function(info) {
- if (info) {
- var me = this;
- if (me._level != info.level || me._isPlugged != info.isPlugged) {
- // Fire batterystatus event
- //PhoneGap.fireWindowEvent("batterystatus", info);
- // use this workaround since iOS 3.x does have window.dispatchEvent
- PhoneGap.fireEvent("batterystatus", window, info);
-
- // Fire low battery event
- if (info.level == 20 || info.level == 5) {
- if (info.level == 20) {
- //PhoneGap.fireWindowEvent("batterylow", info);
- // use this workaround since iOS 3.x does not have window.dispatchEvent
- PhoneGap.fireEvent("batterylow", window, info);
- }
- else {
- //PhoneGap.fireWindowEvent("batterycritical", info);
- // use this workaround since iOS 3.x does not have window.dispatchEvent
- PhoneGap.fireEvent("batterycritical", window, info);
- }
- }
- }
- me._level = info.level;
- me._isPlugged = info.isPlugged;
- }
-};
-
-/**
- * Error callback for battery start
- */
-Battery.prototype._error = function(e) {
- console.log("Error initializing Battery: " + e);
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.battery === "undefined") {
- navigator.battery = new Battery();
- PhoneGap.addWindowEventHandler("batterystatus", navigator.battery.eventHandler);
- PhoneGap.addWindowEventHandler("batterylow", navigator.battery.eventHandler);
- PhoneGap.addWindowEventHandler("batterycritical", navigator.battery.eventHandler);
- }
-});
-}if (!PhoneGap.hasResource("camera")) {
- PhoneGap.addResource("camera");
-
-
-/**
- * This class provides access to the device camera.
- * @constructor
- */
-Camera = function() {
-
-}
-/**
- * Available Camera Options
- * {boolean} allowEdit - true to allow editing image, default = false
- * {number} quality 0-100 (low to high) default = 100
- * {Camera.DestinationType} destinationType default = DATA_URL
- * {Camera.PictureSourceType} sourceType default = CAMERA
- * {number} targetWidth - width in pixels to scale image default = 0 (no scaling)
- * {number} targetHeight - height in pixels to scale image default = 0 (no scaling)
- * {Camera.EncodingType} - encodingType default = JPEG
- * {boolean} correctOrientation - Rotate the image to correct for the orientation of the device during capture (iOS only)
- * {boolean} saveToPhotoAlbum - Save the image to the photo album on the device after capture (iOS only)
- */
-/**
- * Format of image that is returned from getPicture.
- *
- * Example: navigator.camera.getPicture(success, fail,
- * { quality: 80,
- * destinationType: Camera.DestinationType.DATA_URL,
- * sourceType: Camera.PictureSourceType.PHOTOLIBRARY})
- */
-Camera.DestinationType = {
- DATA_URL: 0, // Return base64 encoded string
- FILE_URI: 1 // Return file uri
-};
-Camera.prototype.DestinationType = Camera.DestinationType;
-
-/**
- * Source to getPicture from.
- *
- * Example: navigator.camera.getPicture(success, fail,
- * { quality: 80,
- * destinationType: Camera.DestinationType.DATA_URL,
- * sourceType: Camera.PictureSourceType.PHOTOLIBRARY})
- */
-Camera.PictureSourceType = {
- PHOTOLIBRARY : 0, // Choose image from picture library
- CAMERA : 1, // Take picture from camera
- SAVEDPHOTOALBUM : 2 // Choose image from picture library
-};
-Camera.prototype.PictureSourceType = Camera.PictureSourceType;
-
-/**
- * Encoding of image returned from getPicture.
- *
- * Example: navigator.camera.getPicture(success, fail,
- * { quality: 80,
- * destinationType: Camera.DestinationType.DATA_URL,
- * sourceType: Camera.PictureSourceType.CAMERA,
- * encodingType: Camera.EncodingType.PNG})
- */
-Camera.EncodingType = {
- JPEG: 0, // Return JPEG encoded image
- PNG: 1 // Return PNG encoded image
-};
-Camera.prototype.EncodingType = Camera.EncodingType;
-
-/**
- * Type of pictures to select from. Only applicable when
- * PictureSourceType is PHOTOLIBRARY or SAVEDPHOTOALBUM
- *
- * Example: navigator.camera.getPicture(success, fail,
- * { quality: 80,
- * destinationType: Camera.DestinationType.DATA_URL,
- * sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
- * mediaType: Camera.MediaType.PICTURE})
- */
-Camera.MediaType = {
- PICTURE: 0, // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType
- VIDEO: 1, // allow selection of video only, ONLY RETURNS URL
- ALLMEDIA : 2 // allow selection from all media types
-};
-Camera.prototype.MediaType = Camera.MediaType;
-
-/**
- * Gets a picture from source defined by "options.sourceType", and returns the
- * image as defined by the "options.destinationType" option.
-
- * The defaults are sourceType=CAMERA and destinationType=DATA_URL.
- *
- * @param {Function} successCallback
- * @param {Function} errorCallback
- * @param {Object} options
- */
-Camera.prototype.getPicture = function(successCallback, errorCallback, options) {
- // successCallback required
- if (typeof successCallback != "function") {
- console.log("Camera Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback != "function")) {
- console.log("Camera Error: errorCallback is not a function");
- return;
- }
-
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.camera","getPicture",[options]);
-};
-
-
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.camera == "undefined") navigator.camera = new Camera();
-});
-};
-
-if (!PhoneGap.hasResource("device")) {
- PhoneGap.addResource("device");
-
-/**
- * this represents the mobile device, and provides properties for inspecting the model, version, UUID of the
- * phone, etc.
- * @constructor
- */
-Device = function()
-{
- this.platform = null;
- this.version = null;
- this.name = null;
- this.phonegap = null;
- this.uuid = null;
- try
- {
- this.platform = DeviceInfo.platform;
- this.version = DeviceInfo.version;
- this.name = DeviceInfo.name;
- this.phonegap = DeviceInfo.gap;
- this.uuid = DeviceInfo.uuid;
-
- }
- catch(e)
- {
- // TODO:
- }
- this.available = PhoneGap.available = this.uuid != null;
-}
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.device === "undefined") {
- navigator.device = window.device = new Device();
- }
-});
-};
-if (!PhoneGap.hasResource("capture")) {
- PhoneGap.addResource("capture");
-/**
- * The CaptureError interface encapsulates all errors in the Capture API.
- */
-function CaptureError() {
- this.code = null;
-};
-
-// Capture error codes
-CaptureError.CAPTURE_INTERNAL_ERR = 0;
-CaptureError.CAPTURE_APPLICATION_BUSY = 1;
-CaptureError.CAPTURE_INVALID_ARGUMENT = 2;
-CaptureError.CAPTURE_NO_MEDIA_FILES = 3;
-CaptureError.CAPTURE_NOT_SUPPORTED = 20;
-
-/**
- * The Capture interface exposes an interface to the camera and microphone of the hosting device.
- */
-function Capture() {
- this.supportedAudioModes = [];
- this.supportedImageModes = [];
- this.supportedVideoModes = [];
-};
-
-/**
- * Launch audio recorder application for recording audio clip(s).
- *
- * @param {Function} successCB
- * @param {Function} errorCB
- * @param {CaptureAudioOptions} options
- *
- * No audio recorder to launch for iOS - return CAPTURE_NOT_SUPPORTED
- */
-Capture.prototype.captureAudio = function(successCallback, errorCallback, options) {
- /*if (errorCallback && typeof errorCallback === "function") {
- errorCallback({
- "code": CaptureError.CAPTURE_NOT_SUPPORTED
- });
- }*/
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.mediacapture", "captureAudio", [options]);
-};
-
-/**
- * Launch camera application for taking image(s).
- *
- * @param {Function} successCB
- * @param {Function} errorCB
- * @param {CaptureImageOptions} options
- */
-Capture.prototype.captureImage = function(successCallback, errorCallback, options) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.mediacapture", "captureImage", [options]);
-};
-
-/**
- * Casts a PluginResult message property (array of objects) to an array of MediaFile objects
- * (used in Objective-C)
- *
- * @param {PluginResult} pluginResult
- */
-Capture.prototype._castMediaFile = function(pluginResult) {
- var mediaFiles = [];
- var i;
- for (i=0; i<pluginResult.message.length; i++) {
- var mediaFile = new MediaFile();
- mediaFile.name = pluginResult.message[i].name;
- mediaFile.fullPath = pluginResult.message[i].fullPath;
- mediaFile.type = pluginResult.message[i].type;
- mediaFile.lastModifiedDate = pluginResult.message[i].lastModifiedDate;
- mediaFile.size = pluginResult.message[i].size;
- mediaFiles.push(mediaFile);
- }
- pluginResult.message = mediaFiles;
- return pluginResult;
-};
-
-/**
- * Launch device camera application for recording video(s).
- *
- * @param {Function} successCB
- * @param {Function} errorCB
- * @param {CaptureVideoOptions} options
- */
-Capture.prototype.captureVideo = function(successCallback, errorCallback, options) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.mediacapture", "captureVideo", [options]);
-};
-
-/**
- * Encapsulates a set of parameters that the capture device supports.
- */
-function ConfigurationData() {
- // The ASCII-encoded string in lower case representing the media type.
- this.type;
- // The height attribute represents height of the image or video in pixels.
- // In the case of a sound clip this attribute has value 0.
- this.height = 0;
- // The width attribute represents width of the image or video in pixels.
- // In the case of a sound clip this attribute has value 0
- this.width = 0;
-};
-
-/**
- * Encapsulates all image capture operation configuration options.
- */
-var CaptureImageOptions = function() {
- // Upper limit of images user can take. Value must be equal or greater than 1.
- this.limit = 1;
- // The selected image mode. Must match with one of the elements in supportedImageModes array.
- this.mode = null;
-};
-
-/**
- * Encapsulates all video capture operation configuration options.
- */
-var CaptureVideoOptions = function() {
- // Upper limit of videos user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single video clip in seconds.
- this.duration = 0;
- // The selected video mode. Must match with one of the elements in supportedVideoModes array.
- this.mode = null;
-};
-
-/**
- * Encapsulates all audio capture operation configuration options.
- */
-var CaptureAudioOptions = function() {
- // Upper limit of sound clips user can record. Value must be equal or greater than 1.
- this.limit = 1;
- // Maximum duration of a single sound clip in seconds.
- this.duration = 0;
- // The selected audio mode. Must match with one of the elements in supportedAudioModes array.
- this.mode = null;
-};
-
-/**
- * Represents a single file.
- *
- * name {DOMString} name of the file, without path information
- * fullPath {DOMString} the full path of the file, including the name
- * type {DOMString} mime type
- * lastModifiedDate {Date} last modified date
- * size {Number} size of the file in bytes
- */
-function MediaFile(name, fullPath, type, lastModifiedDate, size) {
- this.name = name || null;
- this.fullPath = fullPath || null;
- this.type = type || null;
- this.lastModifiedDate = lastModifiedDate || null;
- this.size = size || 0;
-}
-
-/**
- * Request capture format data for a specific file and type
- *
- * @param {Function} successCB
- * @param {Function} errorCB
- */
-MediaFile.prototype.getFormatData = function(successCallback, errorCallback) {
- if (typeof this.fullPath === "undefined" || this.fullPath === null) {
- errorCallback({
- "code": CaptureError.CAPTURE_INVALID_ARGUMENT
- });
- } else {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.mediacapture", "getFormatData", [this.fullPath, this.type]);
- }
-};
-
-/**
- * MediaFileData encapsulates format information of a media file.
- *
- * @param {DOMString} codecs
- * @param {long} bitrate
- * @param {long} height
- * @param {long} width
- * @param {float} duration
- */
-function MediaFileData(codecs, bitrate, height, width, duration) {
- this.codecs = codecs || null;
- this.bitrate = bitrate || 0;
- this.height = height || 0;
- this.width = width || 0;
- this.duration = duration || 0;
-}
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.device === "undefined") {
- navigator.device = window.device = new Device();
- }
- if (typeof navigator.device.capture === "undefined") {
- navigator.device.capture = window.device.capture = new Capture();
- }
-});
-};
-if (!PhoneGap.hasResource("contact")) {
- PhoneGap.addResource("contact");
-
-
-/**
-* Contains information about a single contact.
-* @param {DOMString} id unique identifier
-* @param {DOMString} displayName
-* @param {ContactName} name
-* @param {DOMString} nickname
-* @param {ContactField[]} phoneNumbers array of phone numbers
-* @param {ContactField[]} emails array of email addresses
-* @param {ContactAddress[]} addresses array of addresses
-* @param {ContactField[]} ims instant messaging user ids
-* @param {ContactOrganization[]} organizations
-* @param {DOMString} birthday contact's birthday
-* @param {DOMString} note user notes about contact
-* @param {ContactField[]} photos
-* @param {Array.<ContactField>} categories
-* @param {ContactField[]} urls contact's web sites
-*/
-var Contact = function(id, displayName, name, nickname, phoneNumbers, emails, addresses,
- ims, organizations, birthday, note, photos, categories, urls) {
- this.id = id || null;
- this.displayName = displayName || null;
- this.name = name || null; // ContactName
- this.nickname = nickname || null;
- this.phoneNumbers = phoneNumbers || null; // ContactField[]
- this.emails = emails || null; // ContactField[]
- this.addresses = addresses || null; // ContactAddress[]
- this.ims = ims || null; // ContactField[]
- this.organizations = organizations || null; // ContactOrganization[]
- this.birthday = birthday || null; // JS Date
- this.note = note || null;
- this.photos = photos || null; // ContactField[]
- this.categories = categories || null;
- this.urls = urls || null; // ContactField[]
-};
-
-/**
-* Converts Dates to milliseconds before sending to iOS
-*/
-Contact.prototype.convertDatesOut = function()
-{
- var dates = new Array("birthday");
- for (var i=0; i<dates.length; i++){
- var value = this[dates[i]];
- if (value){
- if (!value instanceof Date){
- try {
- value = new Date(value);
- } catch(exception){
- value = null;
- }
- }
- if (value instanceof Date){
- value = value.valueOf();
- }
- this[dates[i]] = value;
- }
- }
-
-};
-/**
-* Converts milliseconds to JS Date when returning from iOS
-*/
-Contact.prototype.convertDatesIn = function()
-{
- var dates = new Array("birthday");
- for (var i=0; i<dates.length; i++){
- var value = this[dates[i]];
- if (value){
- try {
- this[dates[i]] = new Date(parseFloat(value));
- } catch (exception){
- console.log("exception creating date");
- }
- }
- }
-};
-/**
-* Removes contact from device storage.
-* @param successCB success callback
-* @param errorCB error callback (optional)
-*/
-Contact.prototype.remove = function(successCB, errorCB) {
- if (this.id == null) {
- var errorObj = new ContactError();
- errorObj.code = ContactError.UNKNOWN_ERROR;
- errorCB(errorObj);
- }
- else {
- PhoneGap.exec(successCB, errorCB, "com.phonegap.contacts", "remove", [{ "contact": this}]);
- }
-};
-/**
-* iOS ONLY
-* displays contact via iOS UI
-* NOT part of W3C spec so no official documentation
-*
-* @param errorCB error callback
-* @param options object
-* allowsEditing: boolean AS STRING
-* "true" to allow editing the contact
-* "false" (default) display contact
-*/
-Contact.prototype.display = function(errorCB, options) {
- if (this.id == null) {
- if (typeof errorCB == "function") {
- var errorObj = new ContactError();
- errorObj.code = ContactError.UNKNOWN_ERROR;
- errorCB(errorObj);
- }
- }
- else {
- PhoneGap.exec(null, errorCB, "com.phonegap.contacts","displayContact", [this.id, options]);
- }
-};
-
-/**
-* Creates a deep copy of this Contact.
-* With the contact ID set to null.
-* @return copy of this Contact
-*/
-Contact.prototype.clone = function() {
- var clonedContact = PhoneGap.clone(this);
- clonedContact.id = null;
- // Loop through and clear out any id's in phones, emails, etc.
- if (clonedContact.phoneNumbers) {
- for (i=0; i<clonedContact.phoneNumbers.length; i++) {
- clonedContact.phoneNumbers[i].id = null;
- }
- }
- if (clonedContact.emails) {
- for (i=0; i<clonedContact.emails.length; i++) {
- clonedContact.emails[i].id = null;
- }
- }
- if (clonedContact.addresses) {
- for (i=0; i<clonedContact.addresses.length; i++) {
- clonedContact.addresses[i].id = null;
- }
- }
- if (clonedContact.ims) {
- for (i=0; i<clonedContact.ims.length; i++) {
- clonedContact.ims[i].id = null;
- }
- }
- if (clonedContact.organizations) {
- for (i=0; i<clonedContact.organizations.length; i++) {
- clonedContact.organizations[i].id = null;
- }
- }
- if (clonedContact.photos) {
- for (i=0; i<clonedContact.photos.length; i++) {
- clonedContact.photos[i].id = null;
- }
- }
- if (clonedContact.urls) {
- for (i=0; i<clonedContact.urls.length; i++) {
- clonedContact.urls[i].id = null;
- }
- }
- return clonedContact;
-};
-
-/**
-* Persists contact to device storage.
-* @param successCB success callback
-* @param errorCB error callback - optional
-*/
-Contact.prototype.save = function(successCB, errorCB) {
- // don't modify the original contact
- var cloned = PhoneGap.clone(this);
- cloned.convertDatesOut();
- PhoneGap.exec(successCB, errorCB, "com.phonegap.contacts","save", [{"contact": cloned}]);
-};
-
-/**
-* Contact name.
-* @param formatted
-* @param familyName
-* @param givenName
-* @param middle
-* @param prefix
-* @param suffix
-*/
-var ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {
- this.formatted = formatted != "undefined" ? formatted : null;
- this.familyName = familyName != "undefined" ? familyName : null;
- this.givenName = givenName != "undefined" ? givenName : null;
- this.middleName = middle != "undefined" ? middle : null;
- this.honorificPrefix = prefix != "undefined" ? prefix : null;
- this.honorificSuffix = suffix != "undefined" ? suffix : null;
-};
-
-/**
-* Generic contact field.
-* @param type
-* @param value
-* @param pref
-* @param id
-*/
-var ContactField = function(type, value, pref, id) {
- this.type = type != "undefined" ? type : null;
- this.value = value != "undefined" ? value : null;
- this.pref = pref != "undefined" ? pref : null;
- this.id = id != "undefined" ? id : null;
-};
-
-/**
-* Contact address.
-* @param pref - boolean is primary / preferred address
-* @param type - string - work, home…..
-* @param formatted
-* @param streetAddress
-* @param locality
-* @param region
-* @param postalCode
-* @param country
-*/
-var ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country, id) {
- this.pref = pref != "undefined" ? pref : null;
- this.type = type != "undefined" ? type : null;
- this.formatted = formatted != "undefined" ? formatted : null;
- this.streetAddress = streetAddress != "undefined" ? streetAddress : null;
- this.locality = locality != "undefined" ? locality : null;
- this.region = region != "undefined" ? region : null;
- this.postalCode = postalCode != "undefined" ? postalCode : null;
- this.country = country != "undefined" ? country : null;
- this.id = id != "undefined" ? id : null;
-};
-
-/**
-* Contact organization.
-* @param pref - boolean is primary / preferred address
-* @param type - string - work, home…..
-* @param name
-* @param dept
-* @param title
-*/
-var ContactOrganization = function(pref, type, name, dept, title) {
- this.pref = pref != "undefined" ? pref : null;
- this.type = type != "undefined" ? type : null;
- this.name = name != "undefined" ? name : null;
- this.department = dept != "undefined" ? dept : null;
- this.title = title != "undefined" ? title : null;
-};
-
-/**
-* Contact account.
-* @param domain
-* @param username
-* @param userid
-*/
-/*var ContactAccount = function(domain, username, userid) {
- this.domain = domain != "undefined" ? domain : null;
- this.username = username != "undefined" ? username : null;
- this.userid = userid != "undefined" ? userid : null;
-}*/
-
-/**
-* Represents a group of Contacts.
-*/
-var Contacts = function() {
- this.inProgress = false;
- this.records = new Array();
-};
-/**
-* Returns an array of Contacts matching the search criteria.
-* @param fields that should be searched
-* @param successCB success callback
-* @param errorCB error callback (optional)
-* @param {ContactFindOptions} options that can be applied to contact searching
-* @return array of Contacts matching search criteria
-*/
-Contacts.prototype.find = function(fields, successCB, errorCB, options) {
- if (successCB === null) {
- throw new TypeError("You must specify a success callback for the find command.");
- }
- if (fields === null || fields === "undefined" || fields.length === "undefined" || fields.length <= 0) {
- if (typeof errorCB === "function") {
- errorCB({"code": ContactError.INVALID_ARGUMENT_ERROR});
- }
- } else {
- PhoneGap.exec(successCB, errorCB, "com.phonegap.contacts","search", [{"fields":fields, "findOptions":options}]);
- }
-};
-/**
-* need to turn the array of JSON strings representing contact objects into actual objects
-* @param array of JSON strings with contact data
-* @return call results callback with array of Contact objects
-* This function is called from objective C Contacts.search() method.
-*/
-Contacts.prototype._findCallback = function(pluginResult) {
- var contacts = new Array();
- try {
- for (var i=0; i<pluginResult.message.length; i++) {
- var newContact = navigator.contacts.create(pluginResult.message[i]);
- newContact.convertDatesIn();
- contacts.push(newContact);
- }
- pluginResult.message = contacts;
- } catch(e){
- console.log("Error parsing contacts: " +e);
- }
- return pluginResult;
-}
-
-/**
-* need to turn the JSON string representing contact object into actual object
-* @param JSON string with contact data
-* Call stored results function with Contact object
-* This function is called from objective C Contacts remove and save methods
-*/
-Contacts.prototype._contactCallback = function(pluginResult)
-{
- var newContact = null;
- if (pluginResult.message){
- try {
- newContact = navigator.contacts.create(pluginResult.message);
- newContact.convertDatesIn();
- } catch(e){
- console.log("Error parsing contact");
- }
- }
- pluginResult.message = newContact;
- return pluginResult;
-
-};
-/**
-* Need to return an error object rather than just a single error code
-* @param error code
-* Call optional error callback if found.
-* Called from objective c find, remove, and save methods on error.
-*/
-Contacts.prototype._errCallback = function(pluginResult)
-{
- var errorObj = new ContactError();
- errorObj.code = pluginResult.message;
- pluginResult.message = errorObj;
- return pluginResult;
-};
-// iPhone only api to create a new contact via the GUI
-Contacts.prototype.newContactUI = function(successCallback) {
- PhoneGap.exec(successCallback, null, "com.phonegap.contacts","newContact", []);
-};
-// iPhone only api to select a contact via the GUI
-Contacts.prototype.chooseContact = function(successCallback, options) {
- PhoneGap.exec(successCallback, null, "com.phonegap.contacts","chooseContact", options);
-};
-
-
-/**
-* This function creates a new contact, but it does not persist the contact
-* to device storage. To persist the contact to device storage, invoke
-* contact.save().
-* @param properties an object who's properties will be examined to create a new Contact
-* @returns new Contact object
-*/
-Contacts.prototype.create = function(properties) {
- var i;
- var contact = new Contact();
- for (i in properties) {
- if (contact[i] !== 'undefined') {
- contact[i] = properties[i];
- }
- }
- return contact;
-};
-
-/**
- * ContactFindOptions.
- * @param filter used to match contacts against
- * @param multiple boolean used to determine if more than one contact should be returned
- */
-var ContactFindOptions = function(filter, multiple, updatedSince) {
- this.filter = filter || '';
- this.multiple = multiple || false;
-};
-
-/**
- * ContactError.
- * An error code assigned by an implementation when an error has occurred
- */
-var ContactError = function() {
- this.code=null;
-};
-
-/**
- * Error codes
- */
-ContactError.UNKNOWN_ERROR = 0;
-ContactError.INVALID_ARGUMENT_ERROR = 1;
-ContactError.TIMEOUT_ERROR = 2;
-ContactError.PENDING_OPERATION_ERROR = 3;
-ContactError.IO_ERROR = 4;
-ContactError.NOT_SUPPORTED_ERROR = 5;
-ContactError.PERMISSION_DENIED_ERROR = 20;
-
-/**
- * Add the contact interface into the browser.
- */
-PhoneGap.addConstructor(function() {
- if(typeof navigator.contacts == "undefined") {
- navigator.contacts = new Contacts();
- }
-});
-};
-if (!PhoneGap.hasResource("file")) {
- PhoneGap.addResource("file");
-
-/**
- * This class provides generic read and write access to the mobile device file system.
- * They are not used to read files from a server.
- */
-
-/**
- * This class provides some useful information about a file.
- * This is the fields returned when navigator.fileMgr.getFileProperties()
- * is called.
- */
-FileProperties = function(filePath) {
- this.filePath = filePath;
- this.size = 0;
- this.lastModifiedDate = null;
-}
-/**
- * Represents a single file.
- *
- * name {DOMString} name of the file, without path information
- * fullPath {DOMString} the full path of the file, including the name
- * type {DOMString} mime type
- * lastModifiedDate {Date} last modified date
- * size {Number} size of the file in bytes
- */
-File = function(name, fullPath, type, lastModifiedDate, size) {
- this.name = name || null;
- this.fullPath = fullPath || null;
- this.type = type || null;
- this.lastModifiedDate = lastModifiedDate || null;
- this.size = size || 0;
-}
-/**
- * Create an event object since we can't set target on DOM event.
- *
- * @param type
- * @param target
- *
- */
-File._createEvent = function(type, target) {
- // Can't create event object, since we can't set target (its readonly)
- //var evt = document.createEvent('Events');
- //evt.initEvent("onload", false, false);
- var evt = {"type": type};
- evt.target = target;
- return evt;
-};
-
-FileError = function() {
- this.code = null;
-}
-
-// File error codes
-// Found in DOMException
-FileError.NOT_FOUND_ERR = 1;
-FileError.SECURITY_ERR = 2;
-FileError.ABORT_ERR = 3;
-
-// Added by this specification
-FileError.NOT_READABLE_ERR = 4;
-FileError.ENCODING_ERR = 5;
-FileError.NO_MODIFICATION_ALLOWED_ERR = 6;
-FileError.INVALID_STATE_ERR = 7;
-FileError.SYNTAX_ERR = 8;
-FileError.INVALID_MODIFICATION_ERR = 9;
-FileError.QUOTA_EXCEEDED_ERR = 10;
-FileError.TYPE_MISMATCH_ERR = 11;
-FileError.PATH_EXISTS_ERR = 12;
-
-//-----------------------------------------------------------------------------
-// File manager
-//-----------------------------------------------------------------------------
-
-FileMgr = function() {
-}
-
-FileMgr.prototype.testFileExists = function(fileName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "testFileExists", [fileName]);
-};
-
-FileMgr.prototype.testDirectoryExists = function(dirName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "testDirectoryExists", [dirName]);
-};
-
-FileMgr.prototype.getFreeDiskSpace = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getFreeDiskSpace", []);
-};
-
-FileMgr.prototype.write = function(fileName, data, position, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "write", [fileName, data, position]);
-};
-
-FileMgr.prototype.truncate = function(fileName, size, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "truncateFile", [fileName, size]);
-};
-
-FileMgr.prototype.readAsText = function(fileName, encoding, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "readFile", [fileName, encoding]);
-};
-
-FileMgr.prototype.readAsDataURL = function(fileName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "readAsDataURL", [fileName]);
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.fileMgr === "undefined") {
- navigator.fileMgr = new FileMgr();
- }
-});
-
-
-//-----------------------------------------------------------------------------
-// File Reader
-//-----------------------------------------------------------------------------
-
-/**
- * This class reads the mobile device file system.
- *
- */
-FileReader = function() {
- this.fileName = "";
-
- this.readyState = 0;
-
- // File data
- this.result = null;
-
- // Error
- this.error = null;
-
- // Event handlers
- this.onloadstart = null; // When the read starts.
- this.onprogress = null; // While reading (and decoding) file or fileBlob data, and reporting partial file data (progess.loaded/progress.total)
- this.onload = null; // When the read has successfully completed.
- this.onerror = null; // When the read has failed (see errors).
- this.onloadend = null; // When the request has completed (either in success or failure).
- this.onabort = null; // When the read has been aborted. For instance, by invoking the abort() method.
-}
-
-// States
-FileReader.EMPTY = 0;
-FileReader.LOADING = 1;
-FileReader.DONE = 2;
-
-/**
- * Abort reading file.
- */
-FileReader.prototype.abort = function() {
- var evt;
- this.readyState = FileReader.DONE;
- this.result = null;
-
- // set error
- var error = new FileError();
- error.code = error.ABORT_ERR;
- this.error = error;
-
- // If error callback
- if (typeof this.onerror === "function") {
- evt = File._createEvent("error", this);
- this.onerror(evt);
- }
- // If abort callback
- if (typeof this.onabort === "function") {
- evt = File._createEvent("abort", this);
- this.onabort(evt);
- }
- // If load end callback
- if (typeof this.onloadend === "function") {
- evt = File._createEvent("loadend", this);
- this.onloadend(evt);
- }
-};
-
-/**
- * Read text file.
- *
- * @param file The name of the file
- * @param encoding [Optional] (see http://www.iana.org/assignments/character-sets)
- */
-FileReader.prototype.readAsText = function(file, encoding) {
- this.fileName = "";
- if (typeof file.fullPath === "undefined") {
- this.fileName = file;
- } else {
- this.fileName = file.fullPath;
- }
-
- // LOADING state
- this.readyState = FileReader.LOADING;
-
- // If loadstart callback
- if (typeof this.onloadstart === "function") {
- var evt = File._createEvent("loadstart", this);
- this.onloadstart(evt);
- }
-
- // Default encoding is UTF-8
- var enc = encoding ? encoding : "UTF-8";
-
- var me = this;
-
- // Read file
- navigator.fileMgr.readAsText(this.fileName, enc,
-
- // Success callback
- function(r) {
- var evt;
-
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileReader.DONE) {
- return;
- }
-
- // Save result
- me.result = decodeURIComponent(r);
-
- // If onload callback
- if (typeof me.onload === "function") {
- evt = File._createEvent("load", me);
- me.onload(evt);
- }
-
- // DONE state
- me.readyState = FileReader.DONE;
-
- // If onloadend callback
- if (typeof me.onloadend === "function") {
- evt = File._createEvent("loadend", me);
- me.onloadend(evt);
- }
- },
-
- // Error callback
- function(e) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileReader.DONE) {
- return;
- }
-
- // Save error
- me.error = e;
-
- // If onerror callback
- if (typeof me.onerror === "function") {
- evt = File._createEvent("error", me);
- me.onerror(evt);
- }
-
- // DONE state
- me.readyState = FileReader.DONE;
-
- // If onloadend callback
- if (typeof me.onloadend === "function") {
- evt = File._createEvent("loadend", me);
- me.onloadend(evt);
- }
- }
- );
-};
-
-
-/**
- * Read file and return data as a base64 encoded data url.
- * A data url is of the form:
- * data:[<mediatype>][;base64],<data>
- *
- * @param file {File} File object containing file properties
- */
-FileReader.prototype.readAsDataURL = function(file) {
- this.fileName = "";
-
- if (typeof file.fullPath === "undefined") {
- this.fileName = file;
- } else {
- this.fileName = file.fullPath;
- }
-
- // LOADING state
- this.readyState = FileReader.LOADING;
-
- // If loadstart callback
- if (typeof this.onloadstart === "function") {
- var evt = File._createEvent("loadstart", this);
- this.onloadstart(evt);
- }
-
- var me = this;
-
- // Read file
- navigator.fileMgr.readAsDataURL(this.fileName,
-
- // Success callback
- function(r) {
- var evt;
-
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileReader.DONE) {
- return;
- }
-
- // Save result
- me.result = r;
-
- // If onload callback
- if (typeof me.onload === "function") {
- evt = File._createEvent("load", me);
- me.onload(evt);
- }
-
- // DONE state
- me.readyState = FileReader.DONE;
-
- // If onloadend callback
- if (typeof me.onloadend === "function") {
- evt = File._createEvent("loadend", me);
- me.onloadend(evt);
- }
- },
-
- // Error callback
- function(e) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileReader.DONE) {
- return;
- }
-
- // Save error
- me.error = e;
-
- // If onerror callback
- if (typeof me.onerror === "function") {
- evt = File._createEvent("error", me);
- me.onerror(evt);
- }
-
- // DONE state
- me.readyState = FileReader.DONE;
-
- // If onloadend callback
- if (typeof me.onloadend === "function") {
- evt = File._createEvent("loadend", me);
- me.onloadend(evt);
- }
- }
- );
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file The name of the file
- */
-FileReader.prototype.readAsBinaryString = function(file) {
- // TODO - Can't return binary data to browser.
- this.fileName = file;
-};
-
-/**
- * Read file and return data as a binary data.
- *
- * @param file The name of the file
- */
-FileReader.prototype.readAsArrayBuffer = function(file) {
- // TODO - Can't return binary data to browser.
- this.fileName = file;
-};
-
-//-----------------------------------------------------------------------------
-// File Writer
-//-----------------------------------------------------------------------------
-
-/**
- * This class writes to the mobile device file system.
- *
- @param file {File} a File object representing a file on the file system
-*/
-FileWriter = function(file) {
- this.fileName = "";
- this.length = 0;
- if (file) {
- this.fileName = file.fullPath || file;
- this.length = file.size || 0;
- }
-
- // default is to write at the beginning of the file
- this.position = 0;
-
- this.readyState = 0; // EMPTY
-
- this.result = null;
-
- // Error
- this.error = null;
-
- // Event handlers
- this.onwritestart = null; // When writing starts
- this.onprogress = null; // While writing the file, and reporting partial file data
- this.onwrite = null; // When the write has successfully completed.
- this.onwriteend = null; // When the request has completed (either in success or failure).
- this.onabort = null; // When the write has been aborted. For instance, by invoking the abort() method.
- this.onerror = null; // When the write has failed (see errors).
-}
-
-// States
-FileWriter.INIT = 0;
-FileWriter.WRITING = 1;
-FileWriter.DONE = 2;
-
-/**
- * Abort writing file.
- */
-FileWriter.prototype.abort = function() {
- // check for invalid state
- if (this.readyState === FileWriter.DONE || this.readyState === FileWriter.INIT) {
- throw FileError.INVALID_STATE_ERR;
- }
-
- // set error
- var error = new FileError(), evt;
- error.code = error.ABORT_ERR;
- this.error = error;
-
- // If error callback
- if (typeof this.onerror === "function") {
- evt = File._createEvent("error", this);
- this.onerror(evt);
- }
- // If abort callback
- if (typeof this.onabort === "function") {
- evt = File._createEvent("abort", this);
- this.onabort(evt);
- }
-
- this.readyState = FileWriter.DONE;
-
- // If write end callback
- if (typeof this.onwriteend == "function") {
- evt = File._createEvent("writeend", this);
- this.onwriteend(evt);
- }
-};
-
-/**
- * @Deprecated: use write instead
- *
- * @param file to write the data to
- * @param text to be written
- * @param bAppend if true write to end of file, otherwise overwrite the file
- */
-FileWriter.prototype.writeAsText = function(file, text, bAppend) {
- // Throw an exception if we are already writing a file
- if (this.readyState === FileWriter.WRITING) {
- throw FileError.INVALID_STATE_ERR;
- }
-
- if (bAppend !== true) {
- bAppend = false; // for null values
- }
-
- this.fileName = file;
-
- // WRITING state
- this.readyState = FileWriter.WRITING;
-
- var me = this;
-
- // If onwritestart callback
- if (typeof me.onwritestart === "function") {
- var evt = File._createEvent("writestart", me);
- me.onwritestart(evt);
- }
-
-
- // Write file
- navigator.fileMgr.writeAsText(file, text, bAppend,
- // Success callback
- function(r) {
- var evt;
-
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
- // Save result
- me.result = r;
-
- // If onwrite callback
- if (typeof me.onwrite === "function") {
- evt = File._createEvent("write", me);
- me.onwrite(evt);
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- evt = File._createEvent("writeend", me);
- me.onwriteend(evt);
- }
- },
-
- // Error callback
- function(e) {
- var evt;
-
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
- // Save error
- me.error = e;
-
- // If onerror callback
- if (typeof me.onerror === "function") {
- evt = File._createEvent("error", me);
- me.onerror(evt);
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- evt = File._createEvent("writeend", me);
- me.onwriteend(evt);
- }
- }
- );
-};
-
-/**
- * Writes data to the file
- *
- * @param text to be written
- */
-FileWriter.prototype.write = function(text) {
- // Throw an exception if we are already writing a file
- if (this.readyState === FileWriter.WRITING) {
- throw FileError.INVALID_STATE_ERR;
- }
-
- // WRITING state
- this.readyState = FileWriter.WRITING;
-
- var me = this;
-
- // If onwritestart callback
- if (typeof me.onwritestart === "function") {
- var evt = File._createEvent("writestart", me);
- me.onwritestart(evt);
- }
-
- // Write file
- navigator.fileMgr.write(this.fileName, text, this.position,
-
- // Success callback
- function(r) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
-
- // position always increases by bytes written because file would be extended
- me.position += r;
- // The length of the file is now where we are done writing.
- me.length = me.position;
-
- // If onwrite callback
- if (typeof me.onwrite === "function") {
- evt = File._createEvent("write", me);
- me.onwrite(evt);
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- evt = File._createEvent("writeend", me);
- me.onwriteend(evt);
- }
- },
-
- // Error callback
- function(e) {
- var evt;
-
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
- // Save error
- me.error = e;
-
- // If onerror callback
- if (typeof me.onerror === "function") {
- evt = File._createEvent("error", me);
- me.onerror(evt);
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- evt = File._createEvent("writeend", me);
- me.onwriteend(evt);
- }
- }
- );
-
-};
-
-/**
- * Moves the file pointer to the location specified.
- *
- * If the offset is a negative number the position of the file
- * pointer is rewound. If the offset is greater than the file
- * size the position is set to the end of the file.
- *
- * @param offset is the location to move the file pointer to.
- */
-FileWriter.prototype.seek = function(offset) {
- // Throw an exception if we are already writing a file
- if (this.readyState === FileWriter.WRITING) {
- throw FileError.INVALID_STATE_ERR;
- }
-
- if (!offset) {
- return;
- }
-
- // See back from end of file.
- if (offset < 0) {
- this.position = Math.max(offset + this.length, 0);
- }
- // Offset is bigger then file size so set position
- // to the end of the file.
- else if (offset > this.length) {
- this.position = this.length;
- }
- // Offset is between 0 and file size so set the position
- // to start writing.
- else {
- this.position = offset;
- }
-};
-
-/**
- * Truncates the file to the size specified.
- *
- * @param size to chop the file at.
- */
-FileWriter.prototype.truncate = function(size) {
- // Throw an exception if we are already writing a file
- if (this.readyState === FileWriter.WRITING) {
- throw FileError.INVALID_STATE_ERR;
- }
- // what if no size specified?
-
- // WRITING state
- this.readyState = FileWriter.WRITING;
-
- var me = this;
-
- // If onwritestart callback
- if (typeof me.onwritestart === "function") {
- var evt = File._createEvent("writestart", me);
- me.onwritestart(evt);
- }
-
- // Write file
- navigator.fileMgr.truncate(this.fileName, size,
-
- // Success callback
- function(r) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
- // Update the length of the file
- me.length = r;
- me.position = Math.min(me.position, r);
-
- // If onwrite callback
- if (typeof me.onwrite === "function") {
- evt = File._createEvent("write", me);
- me.onwrite(evt);
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- evt = File._createEvent("writeend", me);
- me.onwriteend(evt);
- }
- },
-
- // Error callback
- function(e) {
- var evt;
- // If DONE (cancelled), then don't do anything
- if (me.readyState === FileWriter.DONE) {
- return;
- }
-
- // Save error
- me.error = e;
-
- // If onerror callback
- if (typeof me.onerror === "function") {
- evt = File._createEvent("error", me);
- me.onerror(evt);
- }
-
- // DONE state
- me.readyState = FileWriter.DONE;
-
- // If onwriteend callback
- if (typeof me.onwriteend === "function") {
- evt = File._createEvent("writeend", me);
- me.onwriteend(evt);
- }
- }
- );
-};
-
-LocalFileSystem = function() {
-};
-
-// File error codes
-LocalFileSystem.TEMPORARY = 0;
-LocalFileSystem.PERSISTENT = 1;
-LocalFileSystem.RESOURCE = 2;
-LocalFileSystem.APPLICATION = 3;
-
-/**
- * Requests a filesystem in which to store application data.
- *
- * @param {int} type of file system being requested
- * @param {Function} successCallback is called with the new FileSystem
- * @param {Function} errorCallback is called with a FileError
- */
-LocalFileSystem.prototype.requestFileSystem = function(type, size, successCallback, errorCallback) {
- if (type < 0 || type > 3) {
- if (typeof errorCallback == "function") {
- errorCallback({
- "code": FileError.SYNTAX_ERR
- });
- }
- }
- else {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "requestFileSystem", [type, size]);
- }
-};
-
-/**
- *
- * @param {DOMString} uri referring to a local file in a filesystem
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-LocalFileSystem.prototype.resolveLocalFileSystemURI = function(uri, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "resolveLocalFileSystemURI", [uri]);
-};
-
-/**
-* This function is required as we need to convert raw
-* JSON objects into concrete File and Directory objects.
-*
-* @param a JSON Objects that need to be converted to DirectoryEntry or FileEntry objects.
-* @returns an entry
-*/
-LocalFileSystem.prototype._castFS = function(pluginResult) {
- var entry = null;
- entry = new DirectoryEntry();
- entry.isDirectory = pluginResult.message.root.isDirectory;
- entry.isFile = pluginResult.message.root.isFile;
- entry.name = pluginResult.message.root.name;
- entry.fullPath = pluginResult.message.root.fullPath;
- pluginResult.message.root = entry;
- return pluginResult;
-}
-
-LocalFileSystem.prototype._castEntry = function(pluginResult) {
- var entry = null;
- if (pluginResult.message.isDirectory) {
- entry = new DirectoryEntry();
- }
- else if (pluginResult.message.isFile) {
- entry = new FileEntry();
- }
- entry.isDirectory = pluginResult.message.isDirectory;
- entry.isFile = pluginResult.message.isFile;
- entry.name = pluginResult.message.name;
- entry.fullPath = pluginResult.message.fullPath;
- pluginResult.message = entry;
- return pluginResult;
-}
-
-LocalFileSystem.prototype._castEntries = function(pluginResult) {
- var entries = pluginResult.message;
- var retVal = [];
- for (i=0; i<entries.length; i++) {
- retVal.push(window.localFileSystem._createEntry(entries[i]));
- }
- pluginResult.message = retVal;
- return pluginResult;
-}
-
-LocalFileSystem.prototype._createEntry = function(castMe) {
- var entry = null;
- if (castMe.isDirectory) {
- entry = new DirectoryEntry();
- }
- else if (castMe.isFile) {
- entry = new FileEntry();
- }
- entry.isDirectory = castMe.isDirectory;
- entry.isFile = castMe.isFile;
- entry.name = castMe.name;
- entry.fullPath = castMe.fullPath;
- return entry;
-
-}
-
-LocalFileSystem.prototype._castDate = function(pluginResult) {
- if (pluginResult.message.modificationTime) {
- var metadataObj = new Metadata();
-
- metadataObj.modificationTime = new Date(pluginResult.message.modificationTime);
- pluginResult.message = metadataObj;
- }
- else if (pluginResult.message.lastModifiedDate) {
- var file = new File();
- file.size = pluginResult.message.size;
- file.type = pluginResult.message.type;
- file.name = pluginResult.message.name;
- file.fullPath = pluginResult.message.fullPath;
- file.lastModifiedDate = new Date(pluginResult.message.lastModifiedDate);
- pluginResult.message = file;
- }
-
- return pluginResult;
-}
-LocalFileSystem.prototype._castError = function(pluginResult) {
- var fileError = new FileError();
- fileError.code = pluginResult.message;
- pluginResult.message = fileError;
- return pluginResult;
-}
-
-/**
- * Information about the state of the file or directory
- *
- * {Date} modificationTime (readonly)
- */
-Metadata = function() {
- this.modificationTime=null;
-};
-
-/**
- * Supplies arguments to methods that lookup or create files and directories
- *
- * @param {boolean} create file or directory if it doesn't exist
- * @param {boolean} exclusive if true the command will fail if the file or directory exists
- */
-Flags = function(create, exclusive) {
- this.create = create || false;
- this.exclusive = exclusive || false;
-};
-
-/**
- * An interface representing a file system
- *
- * {DOMString} name the unique name of the file system (readonly)
- * {DirectoryEntry} root directory of the file system (readonly)
- */
-FileSystem = function() {
- this.name = null;
- this.root = null;
-};
-
-/**
- * An interface representing a directory on the file system.
- *
- * {boolean} isFile always false (readonly)
- * {boolean} isDirectory always true (readonly)
- * {DOMString} name of the directory, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the directory (readonly)
- * {FileSystem} filesystem on which the directory resides (readonly)
- */
-DirectoryEntry = function() {
- this.isFile = false;
- this.isDirectory = true;
- this.name = null;
- this.fullPath = null;
- this.filesystem = null;
-};
-
-/**
- * Copies a directory to a new location
- *
- * @param {DirectoryEntry} parent the directory to which to copy the entry
- * @param {DOMString} newName the new name of the entry, defaults to the current name
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "copyTo", [this.fullPath, parent, newName]);
-};
-
-/**
- * Looks up the metadata of the entry
- *
- * @param {Function} successCallback is called with a Metadata object
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getMetadata = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getMetadata", [this.fullPath]);
-};
-
-/**
- * Gets the parent of the entry
- *
- * @param {Function} successCallback is called with a parent entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getParent = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getParent", [this.fullPath]);
-};
-
-/**
- * Moves a directory to a new location
- *
- * @param {DirectoryEntry} parent the directory to which to move the entry
- * @param {DOMString} newName the new name of the entry, defaults to the current name
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "moveTo", [this.fullPath, parent, newName]);
-};
-
-/**
- * Removes the entry
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.remove = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "remove", [this.fullPath]);
-};
-
-/**
- * Returns a URI that can be used to identify this entry.
- *
- * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.toURI = function(mimeType, successCallback, errorCallback) {
- return "file://localhost" + this.fullPath;
- //PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "toURI", [this.fullPath, mimeType]);
-};
-
-/**
- * Creates a new DirectoryReader to read entries from this directory
- */
-DirectoryEntry.prototype.createReader = function(successCallback, errorCallback) {
- return new DirectoryReader(this.fullPath);
-};
-
-/**
- * Creates or looks up a directory
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
- * @param {Flags} options to create or excluively create the directory
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getDirectory", [this.fullPath, path, options]);
-};
-
-/**
- * Creates or looks up a file
- *
- * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
- * @param {Flags} options to create or excluively create the file
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getFile", [this.fullPath, path, options]);
-};
-
-/**
- * Deletes a directory and all of it's contents
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "removeRecursively", [this.fullPath]);
-};
-
-/**
- * An interface that lists the files and directories in a directory.
- */
-DirectoryReader = function(fullPath){
- this.fullPath = fullPath || null;
-};
-
-/**
- * Returns a list of entries from a directory.
- *
- * @param {Function} successCallback is called with a list of entries
- * @param {Function} errorCallback is called with a FileError
- */
-DirectoryReader.prototype.readEntries = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "readEntries", [this.fullPath]);
-}
-
-/**
- * An interface representing a directory on the file system.
- *
- * {boolean} isFile always true (readonly)
- * {boolean} isDirectory always false (readonly)
- * {DOMString} name of the file, excluding the path leading to it (readonly)
- * {DOMString} fullPath the absolute full path to the file (readonly)
- * {FileSystem} filesystem on which the directory resides (readonly)
- */
-FileEntry = function() {
- this.isFile = true;
- this.isDirectory = false;
- this.name = null;
- this.fullPath = null;
- this.filesystem = null;
-};
-
-/**
- * Copies a file to a new location
- *
- * @param {DirectoryEntry} parent the directory to which to copy the entry
- * @param {DOMString} newName the new name of the entry, defaults to the current name
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "copyTo", [this.fullPath, parent, newName]);
-};
-
-/**
- * Looks up the metadata of the entry
- *
- * @param {Function} successCallback is called with a Metadata object
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.getMetadata = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getMetadata", [this.fullPath]);
-};
-
-/**
- * Gets the parent of the entry
- *
- * @param {Function} successCallback is called with a parent entry
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.getParent = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getParent", [this.fullPath]);
-};
-
-/**
- * Moves a directory to a new location
- *
- * @param {DirectoryEntry} parent the directory to which to move the entry
- * @param {DOMString} newName the new name of the entry, defaults to the current name
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "moveTo", [this.fullPath, parent, newName]);
-};
-
-/**
- * Removes the entry
- *
- * @param {Function} successCallback is called with no parameters
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.remove = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "remove", [this.fullPath]);
-};
-
-/**
- * Returns a URI that can be used to identify this entry.
- *
- * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.
- * @param {Function} successCallback is called with the new entry
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.toURI = function(mimeType, successCallback, errorCallback) {
- return "file://localhost" + this.fullPath;
- //PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "toURI", [this.fullPath, mimeType]);
-};
-
-/**
- * Creates a new FileWriter associated with the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new FileWriter
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.createWriter = function(successCallback, errorCallback) {
- this.file(function(filePointer) {
- var writer = new FileWriter(filePointer);
- if (writer.fileName == null || writer.fileName == "") {
- if (typeof errorCallback == "function") {
- errorCallback({
- "code": FileError.INVALID_STATE_ERR
- });
- }
- }
- if (typeof successCallback == "function") {
- successCallback(writer);
- }
- }, errorCallback);
-};
-
-/**
- * Returns a File that represents the current state of the file that this FileEntry represents.
- *
- * @param {Function} successCallback is called with the new File object
- * @param {Function} errorCallback is called with a FileError
- */
-FileEntry.prototype.file = function(successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.file", "getFileMetadata", [this.fullPath]);
-};
-
-/**
- * Add the FileSystem interface into the browser.
- */
-PhoneGap.addConstructor(function() {
- var pgLocalFileSystem = new LocalFileSystem();
- // Needed for cast methods
- if(typeof window.localFileSystem == "undefined") window.localFileSystem = pgLocalFileSystem;
- if(typeof window.requestFileSystem == "undefined") window.requestFileSystem = pgLocalFileSystem.requestFileSystem;
- if(typeof window.resolveLocalFileSystemURI == "undefined") window.resolveLocalFileSystemURI = pgLocalFileSystem.resolveLocalFileSystemURI;
-});
-};
-
-
-
-
-/*
- * Copyright (c) 2011, Matt Kane
- */
-
-if (!PhoneGap.hasResource("filetransfer")) {
- PhoneGap.addResource("filetransfer");
-
-/**
- * FileTransfer uploads a file to a remote server.
- */
-FileTransfer = function() {}
-
-/**
- * FileUploadResult
- */
-FileUploadResult = function() {
- this.bytesSent = 0;
- this.responseCode = null;
- this.response = null;
-}
-
-/**
- * FileTransferError
- */
-FileTransferError = function(errorCode) {
- this.code = errorCode || null;
-}
-
-FileTransferError.FILE_NOT_FOUND_ERR = 1;
-FileTransferError.INVALID_URL_ERR = 2;
-FileTransferError.CONNECTION_ERR = 3;
-
-/**
-* Given an absolute file path, uploads a file on the device to a remote server
-* using a multipart HTTP request.
-* @param filePath {String} Full path of the file on the device
-* @param server {String} URL of the server to receive the file
-* @param successCallback (Function} Callback to be invoked when upload has completed
-* @param errorCallback {Function} Callback to be invoked upon error
-* @param options {FileUploadOptions} Optional parameters such as file name and mimetype
-*/
-FileTransfer.prototype.upload = function(filePath, server, successCallback, errorCallback, options) {
- if(!options.params) {
- options.params = {};
- }
- options.filePath = filePath;
- options.server = server;
- if(!options.fileKey) {
- options.fileKey = 'file';
- }
- if(!options.fileName) {
- options.fileName = 'image.jpg';
- }
- if(!options.mimeType) {
- options.mimeType = 'image/jpeg';
- }
-
- // successCallback required
- if (typeof successCallback != "function") {
- console.log("FileTransfer Error: successCallback is not a function");
- return;
- }
-
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback != "function")) {
- console.log("FileTransfer Error: errorCallback is not a function");
- return;
- }
-
- PhoneGap.exec(successCallback, errorCallback, 'com.phonegap.filetransfer', 'upload', [options]);
-};
-
-FileTransfer.prototype._castTransferError = function(pluginResult) {
- var fileError = new FileTransferError(pluginResult.message);
- //fileError.code = pluginResult.message;
- pluginResult.message = fileError;
- return pluginResult;
-}
-
-FileTransfer.prototype._castUploadResult = function(pluginResult) {
- var result = new FileUploadResult();
- result.bytesSent = pluginResult.message.bytesSent;
- result.responseCode = pluginResult.message.responseCode;
- result.response = decodeURIComponent(pluginResult.message.response);
- pluginResult.message = result;
- return pluginResult;
-}
-
-/**
- * Downloads a file form a given URL and saves it to the specified directory.
- * @param source {String} URL of the server to receive the file
- * @param target {String} Full path of the file on the device
- * @param successCallback (Function} Callback to be invoked when upload has completed
- * @param errorCallback {Function} Callback to be invoked upon error
- */
-FileTransfer.prototype.download = function(source, target, successCallback, errorCallback) {
- PhoneGap.exec(successCallback, errorCallback, 'com.phonegap.filetransfer', 'download', [source, target]);
-};
-
-/**
- * Options to customize the HTTP request used to upload files.
- * @param fileKey {String} Name of file request parameter.
- * @param fileName {String} Filename to be used by the server. Defaults to image.jpg.
- * @param mimeType {String} Mimetype of the uploaded file. Defaults to image/jpeg.
- * @param params {Object} Object with key: value params to send to the server.
- */
-FileUploadOptions = function(fileKey, fileName, mimeType, params) {
- this.fileKey = fileKey || null;
- this.fileName = fileName || null;
- this.mimeType = mimeType || null;
- this.params = params || null;
-}
-
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.fileTransfer == "undefined") navigator.fileTransfer = new FileTransfer();
-});
-};
-if (!PhoneGap.hasResource("geolocation")) {
- PhoneGap.addResource("geolocation");
-
-/**
- * This class provides access to device GPS data.
- * @constructor
- */
-Geolocation = function() {
- // The last known GPS position.
- this.lastPosition = null;
- this.listener = null;
- this.timeoutTimerId = 0;
-
-};
-
-
-/**
- * Asynchronously aquires the current position.
- * @param {Function} successCallback The function to call when the position
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the position data.
- * @param {PositionOptions} options The options for getting the position data
- * such as timeout.
- * PositionOptions.forcePrompt:Bool default false,
- * - tells iPhone to prompt the user to turn on location services.
- * - may cause your app to exit while the user is sent to the Settings app
- * PositionOptions.distanceFilter:double aka Number
- * - used to represent a distance in meters.
-PositionOptions
-{
- desiredAccuracy:Number
- - a distance in meters
- < 10 = best accuracy ( Default value )
- < 100 = Nearest Ten Meters
- < 1000 = Nearest Hundred Meters
- < 3000 = Accuracy Kilometers
- 3000+ = Accuracy 3 Kilometers
-
- forcePrompt:Boolean default false ( iPhone Only! )
- - tells iPhone to prompt the user to turn on location services.
- - may cause your app to exit while the user is sent to the Settings app
-
- distanceFilter:Number
- - The minimum distance (measured in meters) a device must move laterally before an update event is generated.
- - measured relative to the previously delivered location
- - default value: null ( all movements will be reported )
-
-}
-
- */
-
-Geolocation.prototype.getCurrentPosition = function(successCallback, errorCallback, options)
-{
- // create an always valid local success callback
- var win = successCallback;
- if (!win || typeof(win) != 'function')
- {
- win = function(position) {};
- }
-
- // create an always valid local error callback
- var fail = errorCallback;
- if (!fail || typeof(fail) != 'function')
- {
- fail = function(positionError) {};
- }
-
- var self = this;
- var totalTime = 0;
- var timeoutTimerId;
-
- // set params to our default values
- var params = new PositionOptions();
-
- if (options)
- {
- if (options.maximumAge)
- {
- // special case here if we have a cached value that is younger than maximumAge
- if(this.lastPosition)
- {
- var now = new Date().getTime();
- if((now - this.lastPosition.timestamp) < options.maximumAge)
- {
- win(this.lastPosition); // send cached position immediately
- return; // Note, execution stops here -jm
- }
- }
- params.maximumAge = options.maximumAge;
- }
- if (options.enableHighAccuracy)
- {
- params.enableHighAccuracy = (options.enableHighAccuracy == true); // make sure it's truthy
- }
- if (options.timeout)
- {
- params.timeout = options.timeout;
- }
- }
-
- var successListener = win;
- var failListener = fail;
- if (!this.locationRunning)
- {
- successListener = function(position)
- {
- win(position);
- self.stop();
- };
- errorListener = function(positionError)
- {
- fail(positionError);
- self.stop();
- };
- }
-
- this.listener = {"success":successListener,"fail":failListener};
- this.start(params);
-
- var onTimeout = function()
- {
- self.setError(new PositionError(PositionError.TIMEOUT,"Geolocation Error: Timeout."));
- };
-
- clearTimeout(this.timeoutTimerId);
- this.timeoutTimerId = setTimeout(onTimeout, params.timeout);
-};
-
-/**
- * Asynchronously aquires the position repeatedly at a given interval.
- * @param {Function} successCallback The function to call each time the position
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the position data.
- * @param {PositionOptions} options The options for getting the position data
- * such as timeout and the frequency of the watch.
- */
-Geolocation.prototype.watchPosition = function(successCallback, errorCallback, options) {
- // Invoke the appropriate callback with a new Position object every time the implementation
- // determines that the position of the hosting device has changed.
-
- var self = this; // those == this & that
-
- var params = new PositionOptions();
-
- if(options)
- {
- if (options.maximumAge) {
- params.maximumAge = options.maximumAge;
- }
- if (options.enableHighAccuracy) {
- params.enableHighAccuracy = options.enableHighAccuracy;
- }
- if (options.timeout) {
- params.timeout = options.timeout;
- }
- }
-
- var that = this;
- var lastPos = that.lastPosition? that.lastPosition.clone() : null;
-
- var intervalFunction = function() {
-
- var filterFun = function(position) {
- if (lastPos == null || !position.equals(lastPos)) {
- // only call the success callback when there is a change in position, per W3C
- successCallback(position);
- }
-
- // clone the new position, save it as our last position (internal var)
- lastPos = position.clone();
- };
-
- that.getCurrentPosition(filterFun, errorCallback, params);
- };
-
- // Retrieve location immediately and schedule next retrieval afterwards
- intervalFunction();
-
- return setInterval(intervalFunction, params.timeout);
-};
-
-
-/**
- * Clears the specified position watch.
- * @param {String} watchId The ID of the watch returned from #watchPosition.
- */
-Geolocation.prototype.clearWatch = function(watchId) {
- clearInterval(watchId);
-};
-
-/**
- * Called by the geolocation framework when the current location is found.
- * @param {PositionOptions} position The current position.
- */
-Geolocation.prototype.setLocation = function(position)
-{
- var _position = new Position(position.coords, position.timestamp);
-
- if(this.timeoutTimerId)
- {
- clearTimeout(this.timeoutTimerId);
- this.timeoutTimerId = 0;
- }
-
- this.lastError = null;
- this.lastPosition = _position;
-
- if(this.listener && typeof(this.listener.success) == 'function')
- {
- this.listener.success(_position);
- }
-
- this.listener = null;
-};
-
-/**
- * Called by the geolocation framework when an error occurs while looking up the current position.
- * @param {String} message The text of the error message.
- */
-Geolocation.prototype.setError = function(error)
-{
- var _error = new PositionError(error.code, error.message);
-
- this.locationRunning = false
-
- if(this.timeoutTimerId)
- {
- clearTimeout(this.timeoutTimerId);
- this.timeoutTimerId = 0;
- }
-
- this.lastError = _error;
- // call error handlers directly
- if(this.listener && typeof(this.listener.fail) == 'function')
- {
- this.listener.fail(_error);
- }
- this.listener = null;
-
-};
-
-Geolocation.prototype.start = function(positionOptions)
-{
- PhoneGap.exec(null, null, "com.phonegap.geolocation", "startLocation", [positionOptions]);
- this.locationRunning = true
-
-};
-
-Geolocation.prototype.stop = function()
-{
- PhoneGap.exec(null, null, "com.phonegap.geolocation", "stopLocation", []);
- this.locationRunning = false
-};
-
-
-PhoneGap.addConstructor(function()
-{
- if (typeof navigator._geo == "undefined")
- {
- // replace origObj's functions ( listed in funkList ) with the same method name on proxyObj
- // this is a workaround to prevent UIWebView/MobileSafari default implementation of GeoLocation
- // because it includes the full page path as the title of the alert prompt
- var __proxyObj = function (origObj,proxyObj,funkList)
- {
- var replaceFunk = function(org,proxy,fName)
- {
- org[fName] = function()
- {
- return proxy[fName].apply(proxy,arguments);
- };
- };
-
- for(var v in funkList) { replaceFunk(origObj,proxyObj,funkList[v]);}
- }
- navigator._geo = new Geolocation();
- __proxyObj(navigator.geolocation, navigator._geo,
- ["setLocation","getCurrentPosition","watchPosition",
- "clearWatch","setError","start","stop"]);
-
- }
-
-});
-};
-if (!PhoneGap.hasResource("compass")) {
- PhoneGap.addResource("compass");
-
-CompassError = function(){
- this.code = null;
-};
-
-// Capture error codes
-CompassError.COMPASS_INTERNAL_ERR = 0;
-CompassError.COMPASS_NOT_SUPPORTED = 20;
-
-CompassHeading = function() {
- this.magneticHeading = null;
- this.trueHeading = null;
- this.headingAccuracy = null;
- this.timestamp = null;
-}
-/**
- * This class provides access to device Compass data.
- * @constructor
- */
-Compass = function() {
- /**
- * List of compass watch timers
- */
- this.timers = {};
-};
-
-/**
- * Asynchronously acquires the current heading.
- * @param {Function} successCallback The function to call when the heading
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the heading data.
- * @param {PositionOptions} options The options for getting the heading data (not used).
- */
-Compass.prototype.getCurrentHeading = function(successCallback, errorCallback, options) {
- // successCallback required
- if (typeof successCallback !== "function") {
- console.log("Compass Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback !== "function")) {
- console.log("Compass Error: errorCallback is not a function");
- return;
- }
-
- // Get heading
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.geolocation", "getCurrentHeading", []);
-};
-
-/**
- * Asynchronously acquires the heading repeatedly at a given interval.
- * @param {Function} successCallback The function to call each time the heading
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the heading data.
- * @param {HeadingOptions} options The options for getting the heading data
- * such as timeout and the frequency of the watch.
- */
-Compass.prototype.watchHeading= function(successCallback, errorCallback, options)
-{
- // Default interval (100 msec)
- var frequency = (options !== undefined) ? options.frequency : 100;
-
- // successCallback required
- if (typeof successCallback !== "function") {
- console.log("Compass Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback !== "function")) {
- console.log("Compass Error: errorCallback is not a function");
- return;
- }
-
- // Start watch timer to get headings
- var id = PhoneGap.createUUID();
- navigator.compass.timers[id] = setInterval(
- function() {
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.geolocation", "getCurrentHeading", [{repeats: 1}]);
- }, frequency);
-
- return id;
-};
-
-
-/**
- * Clears the specified heading watch.
- * @param {String} watchId The ID of the watch returned from #watchHeading.
- */
-Compass.prototype.clearWatch = function(id)
-{
- // Stop javascript timer & remove from timer list
- if (id && navigator.compass.timers[id]) {
- clearInterval(navigator.compass.timers[id]);
- delete navigator.compass.timers[id];
- }
- if (navigator.compass.timers.length == 0) {
- // stop the
- PhoneGap.exec(null, null, "com.phonegap.geolocation", "stopHeading", []);
- }
-};
-
-/** iOS only
- * Asynchronously fires when the heading changes from the last reading. The amount of distance
- * required to trigger the event is specified in the filter paramter.
- * @param {Function} successCallback The function to call each time the heading
- * data is available
- * @param {Function} errorCallback The function to call when there is an error
- * getting the heading data.
- * @param {HeadingOptions} options The options for getting the heading data
- * @param {filter} number of degrees change to trigger a callback with heading data (float)
- *
- * In iOS this function is more efficient than calling watchHeading with a frequency for updates.
- * Only one watchHeadingFilter can be in effect at one time. If a watchHeadingFilter is in effect, calling
- * getCurrentHeading or watchHeading will use the existing filter value for specifying heading change.
- */
-Compass.prototype.watchHeadingFilter = function(successCallback, errorCallback, options)
-{
-
- if (options === undefined || options.filter === undefined) {
- console.log("Compass Error: options.filter not specified");
- return;
- }
-
- // successCallback required
- if (typeof successCallback !== "function") {
- console.log("Compass Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback !== "function")) {
- console.log("Compass Error: errorCallback is not a function");
- return;
- }
- PhoneGap.exec(successCallback, errorCallback, "com.phonegap.geolocation", "watchHeadingFilter", [options]);
-}
-Compass.prototype.clearWatchFilter = function()
-{
- PhoneGap.exec(null, null, "com.phonegap.geolocation", "stopHeading", []);
-};
-
-PhoneGap.addConstructor(function()
-{
- if (typeof navigator.compass == "undefined")
- {
- navigator.compass = new Compass();
- }
-});
-};
-
-if (!PhoneGap.hasResource("media")) {
- PhoneGap.addResource("media");
-
-/**
- * List of media objects.
- * PRIVATE
- */
-PhoneGap.mediaObjects = {};
-
-/**
- * Object that receives native callbacks.
- * PRIVATE
- */
-PhoneGap.Media = function() {};
-
-
-/**
- * Get the media object.
- * PRIVATE
- *
- * @param id The media object id (string)
- */
-PhoneGap.Media.getMediaObject = function(id) {
- return PhoneGap.mediaObjects[id];
-};
-
-/**
- * Audio has status update.
- * PRIVATE
- *
- * @param id The media object id (string)
- * @param msg The status message (int)
- * @param value The status code (int)
- */
-PhoneGap.Media.onStatus = function(id, msg, value) {
- var media = PhoneGap.mediaObjects[id];
-
- // If state update
- if (msg == Media.MEDIA_STATE) {
- if (value == Media.MEDIA_STOPPED) {
- if (media.successCallback) {
- media.successCallback();
- }
- }
- if (media.statusCallback) {
- media.statusCallback(value);
- }
- }
- else if (msg == Media.MEDIA_DURATION) {
- media._duration = value;
- }
- else if (msg == Media.MEDIA_ERROR) {
- if (media.errorCallback) {
- media.errorCallback(value);
- }
- }
- else if (msg == Media.MEDIA_POSITION) {
- media._position = value;
- }
-};
-
-/**
- * This class provides access to the device media, interfaces to both sound and video
- *
- * @param src The file name or url to play
- * @param successCallback The callback to be called when the file is done playing or recording.
- * successCallback() - OPTIONAL
- * @param errorCallback The callback to be called if there is an error.
- * errorCallback(int errorCode) - OPTIONAL
- * @param statusCallback The callback to be called when media status has changed.
- * statusCallback(int statusCode) - OPTIONAL
- * @param positionCallback The callback to be called when media position has changed.
- * positionCallback(long position) - OPTIONAL
- */
-Media = function(src, successCallback, errorCallback, statusCallback, positionCallback) {
-
- // successCallback optional
- if (successCallback && (typeof successCallback != "function")) {
- console.log("Media Error: successCallback is not a function");
- return;
- }
-
- // errorCallback optional
- if (errorCallback && (typeof errorCallback != "function")) {
- console.log("Media Error: errorCallback is not a function");
- return;
- }
-
- // statusCallback optional
- if (statusCallback && (typeof statusCallback != "function")) {
- console.log("Media Error: statusCallback is not a function");
- return;
- }
-
- // positionCallback optional -- NOT SUPPORTED
- if (positionCallback && (typeof positionCallback != "function")) {
- console.log("Media Error: positionCallback is not a function");
- return;
- }
-
- this.id = PhoneGap.createUUID();
- PhoneGap.mediaObjects[this.id] = this;
- this.src = src;
- this.successCallback = successCallback;
- this.errorCallback = errorCallback;
- this.statusCallback = statusCallback;
- this.positionCallback = positionCallback;
- this._duration = -1;
- this._position = -1;
-};
-
-// Media messages
-Media.MEDIA_STATE = 1;
-Media.MEDIA_DURATION = 2;
-Media.MEDIA_POSITION = 3;
-Media.MEDIA_ERROR = 9;
-
-// Media states
-Media.MEDIA_NONE = 0;
-Media.MEDIA_STARTING = 1;
-Media.MEDIA_RUNNING = 2;
-Media.MEDIA_PAUSED = 3;
-Media.MEDIA_STOPPED = 4;
-Media.MEDIA_MSG = ["None", "Starting", "Running", "Paused", "Stopped"];
-
-// TODO: Will MediaError be used?
-/**
- * This class contains information about any Media errors.
- * @constructor
- */
-
-MediaError = function() {
- this.code = null,
- this.message = "";
-}
-
-MediaError.MEDIA_ERR_ABORTED = 1;
-MediaError.MEDIA_ERR_NETWORK = 2;
-MediaError.MEDIA_ERR_DECODE = 3;
-MediaError.MEDIA_ERR_NONE_SUPPORTED = 4;
-
-/**
- * Start or resume playing audio file.
- */
-Media.prototype.play = function(options) {
- PhoneGap.exec(null, null, "com.phonegap.media", "play", [this.id, this.src, options]);
-};
-
-/**
- * Stop playing audio file.
- */
-Media.prototype.stop = function() {
- PhoneGap.exec(null, null, "com.phonegap.media","stop", [this.id, this.src]);
-};
-
-/**
- * Pause playing audio file.
- */
-Media.prototype.pause = function() {
- PhoneGap.exec(null, null, "com.phonegap.media","pause", [this.id, this.src]);
-};
-
-/**
- * Seek or jump to a new time in the track..
- */
-Media.prototype.seekTo = function(milliseconds) {
- PhoneGap.exec(null, null, "com.phonegap.media", "seekTo", [this.id, this.src, milliseconds]);
-};
-
-/**
- * Get duration of an audio file.
- * The duration is only set for audio that is playing, paused or stopped.
- *
- * @return duration or -1 if not known.
- */
-Media.prototype.getDuration = function() {
- return this._duration;
-};
-
-/**
- * Get position of audio.
- *
- * @return
- */
-Media.prototype.getCurrentPosition = function(successCB, errorCB) {
- var errCallback = (errorCB == undefined || errorCB == null) ? null : errorCB;
- PhoneGap.exec(successCB, errorCB, "com.phonegap.media", "getCurrentPosition", [this.id, this.src]);
-};
-
-// iOS only. prepare/load the audio in preparation for playing
-Media.prototype.prepare = function(successCB, errorCB) {
- PhoneGap.exec(successCB, errorCB, "com.phonegap.media", "prepare", [this.id, this.src]);
-}
-
-/**
- * Start recording audio file.
- */
-Media.prototype.startRecord = function() {
- PhoneGap.exec(null, null, "com.phonegap.media","startAudioRecord", [this.id, this.src]);
-};
-
-/**
- * Stop recording audio file.
- */
-Media.prototype.stopRecord = function() {
- PhoneGap.exec(null, null, "com.phonegap.media","stopAudioRecord", [this.id, this.src]);
-};
-
-/**
- * Release the resources.
- */
-Media.prototype.release = function() {
- PhoneGap.exec(null, null, "com.phonegap.media","release", [this.id, this.src]);
-};
-
-};
-if (!PhoneGap.hasResource("notification")) {
- PhoneGap.addResource("notification");
-
-/**
- * This class provides access to notifications on the device.
- */
-Notification = function() {
-};
-
-/**
- * Open a native alert dialog, with a customizable title and button text.
- *
- * @param {String} message Message to print in the body of the alert
- * @param {Function} completeCallback The callback that is called when user clicks on a button.
- * @param {String} title Title of the alert dialog (default: Alert)
- * @param {String} buttonLabel Label of the close button (default: OK)
- */
-Notification.prototype.alert = function(message, completeCallback, title, buttonLabel) {
- var _title = title;
- if (title == null || typeof title === 'undefined') {
- _title = "Alert";
- }
- var _buttonLabel = (buttonLabel || "OK");
- PhoneGap.exec(completeCallback, null, "com.phonegap.notification", "alert", [message,{ "title": _title, "buttonLabel": _buttonLabel}]);
-};
-
-/**
- * Open a native confirm dialog, with a customizable title and button text.
- * The result that the user selects is returned to the result callback.
- *
- * @param {String} message Message to print in the body of the alert
- * @param {Function} resultCallback The callback that is called when user clicks on a button.
- * @param {String} title Title of the alert dialog (default: Confirm)
- * @param {String} buttonLabels Comma separated list of the labels of the buttons (default: 'OK,Cancel')
- */
-Notification.prototype.confirm = function(message, resultCallback, title, buttonLabels) {
- var _title = (title || "Confirm");
- var _buttonLabels = (buttonLabels || "OK,Cancel");
- this.alert(message, resultCallback, _title, _buttonLabels);
-};
-
-/**
- * Causes the device to blink a status LED.
- * @param {Integer} count The number of blinks.
- * @param {String} colour The colour of the light.
- */
-Notification.prototype.blink = function(count, colour) {
-// NOT IMPLEMENTED
-};
-
-Notification.prototype.vibrate = function(mills) {
- PhoneGap.exec(null, null, "com.phonegap.notification", "vibrate", []);
-};
-
-Notification.prototype.beep = function(count, volume) {
- // No Volume yet for the iphone interface
- // We can use a canned beep sound and call that
- new Media('beep.wav').play();
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.notification == "undefined") navigator.notification = new Notification();
-});
-};
-if (!PhoneGap.hasResource("orientation")) {
- PhoneGap.addResource("orientation");
-
-/**
- * This class provides access to the device orientation.
- * @constructor
- */
-Orientation = function() {
- /**
- * The current orientation, or null if the orientation hasn't changed yet.
- */
- this.currentOrientation = null;
-}
-
-/**
- * Set the current orientation of the phone. This is called from the device automatically.
- *
- * When the orientation is changed, the DOMEvent \c orientationChanged is dispatched against
- * the document element. The event has the property \c orientation which can be used to retrieve
- * the device's current orientation, in addition to the \c Orientation.currentOrientation class property.
- *
- * @param {Number} orientation The orientation to be set
- */
-Orientation.prototype.setOrientation = function(orientation) {
- Orientation.currentOrientation = orientation;
- var e = document.createEvent('Events');
- e.initEvent('orientationChanged', 'false', 'false');
- e.orientation = orientation;
- document.dispatchEvent(e);
-};
-
-/**
- * Asynchronously aquires the current orientation.
- * @param {Function} successCallback The function to call when the orientation
- * is known.
- * @param {Function} errorCallback The function to call when there is an error
- * getting the orientation.
- */
-Orientation.prototype.getCurrentOrientation = function(successCallback, errorCallback) {
- // If the position is available then call success
- // If the position is not available then call error
-};
-
-/**
- * Asynchronously aquires the orientation repeatedly at a given interval.
- * @param {Function} successCallback The function to call each time the orientation
- * data is available.
- * @param {Function} errorCallback The function to call when there is an error
- * getting the orientation data.
- */
-Orientation.prototype.watchOrientation = function(successCallback, errorCallback) {
- // Invoke the appropriate callback with a new Position object every time the implementation
- // determines that the position of the hosting device has changed.
- this.getCurrentPosition(successCallback, errorCallback);
- return setInterval(function() {
- navigator.orientation.getCurrentOrientation(successCallback, errorCallback);
- }, 10000);
-};
-
-/**
- * Clears the specified orientation watch.
- * @param {String} watchId The ID of the watch returned from #watchOrientation.
- */
-Orientation.prototype.clearWatch = function(watchId) {
- clearInterval(watchId);
-};
-
-Orientation.install = function()
-{
- if (typeof navigator.orientation == "undefined") {
- navigator.orientation = new Orientation();
- }
-
- var windowDispatchAvailable = !(window.dispatchEvent === undefined); // undefined in iOS 3.x
- if (windowDispatchAvailable) {
- return;
- }
-
- // the code below is to capture window.add/remove eventListener calls on window
- // this is for iOS 3.x where listening on 'orientationchange' events don't work on document/window (don't know why)
- // however, window.onorientationchange DOES handle the 'orientationchange' event (sent through document), so...
- // then we multiplex the window.onorientationchange event (consequently - people shouldn't overwrite this)
-
- var self = this;
- var orientationchangeEvent = 'orientationchange';
- var newOrientationchangeEvent = 'orientationchange_pg';
-
- // backup original `window.addEventListener`, `window.removeEventListener`
- var _addEventListener = window.addEventListener;
- var _removeEventListener = window.removeEventListener;
-
- window.onorientationchange = function() {
- PhoneGap.fireEvent(newOrientationchangeEvent, window);
- }
-
- // override `window.addEventListener`
- window.addEventListener = function() {
- if (arguments[0] === orientationchangeEvent) {
- arguments[0] = newOrientationchangeEvent;
- }
-
- if (!windowDispatchAvailable) {
- return document.addEventListener.apply(this, arguments);
- } else {
- return _addEventListener.apply(this, arguments);
- }
- };
-
- // override `window.removeEventListener'
- window.removeEventListener = function() {
- if (arguments[0] === orientationchangeEvent) {
- arguments[0] = newOrientationchangeEvent;
- }
-
- if (!windowDispatchAvailable) {
- return document.removeEventListener.apply(this, arguments);
- } else {
- return _removeEventListener.apply(this, arguments);
- }
- };
-};
-
-PhoneGap.addConstructor(Orientation.install);
-
-};
-if (!PhoneGap.hasResource("sms")) {
- PhoneGap.addResource("sms");
-
-/**
- * This class provides access to the device SMS functionality.
- * @constructor
- */
-Sms = function() {
-
-}
-
-/**
- * Sends an SMS message.
- * @param {Integer} number The phone number to send the message to.
- * @param {String} message The contents of the SMS message to send.
- * @param {Function} successCallback The function to call when the SMS message is sent.
- * @param {Function} errorCallback The function to call when there is an error sending the SMS message.
- * @param {PositionOptions} options The options for accessing the GPS location such as timeout and accuracy.
- */
-Sms.prototype.send = function(number, message, successCallback, errorCallback, options) {
- // not sure why this is here when it does nothing????
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.sms == "undefined") navigator.sms = new Sms();
-});
-};
-if (!PhoneGap.hasResource("telephony")) {
- PhoneGap.addResource("telephony");
-
-/**
- * This class provides access to the telephony features of the device.
- * @constructor
- */
-Telephony = function() {
-
-}
-
-/**
- * Calls the specifed number.
- * @param {Integer} number The number to be called.
- */
-Telephony.prototype.call = function(number) {
- // not sure why this is here when it does nothing????
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.telephony == "undefined") navigator.telephony = new Telephony();
-});
-};if (!PhoneGap.hasResource("network")) {
- PhoneGap.addResource("network");
-
-// //////////////////////////////////////////////////////////////////
-
-Connection = function() {
- /*
- * One of the connection constants below.
- */
- this.type = Connection.UNKNOWN;
-
- /* initialize from the extended DeviceInfo properties */
- try {
- this.type = DeviceInfo.connection.type;
- }
- catch(e) {
- }
-};
-
-Connection.UNKNOWN = "unknown"; // Unknown connection type
-Connection.ETHERNET = "ethernet";
-Connection.WIFI = "wifi";
-Connection.CELL_2G = "2g"; // the default for iOS, for any cellular connection
-Connection.CELL_3G = "3g";
-Connection.CELL_4G = "4g";
-Connection.NONE = "none"; // NO connectivity
-
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.network == "undefined") navigator.network = {};
- if (typeof navigator.network.connection == "undefined") navigator.network.connection = new Connection();
-});
-
-};if (!PhoneGap.hasResource("splashscreen")) {
- PhoneGap.addResource("splashscreen");
-
-/**
- * This class provides access to the splashscreen
- */
-SplashScreen = function() {
-};
-
-SplashScreen.prototype.show = function() {
- PhoneGap.exec(null, null, "com.phonegap.splashscreen", "show", []);
-};
-
-SplashScreen.prototype.hide = function() {
- PhoneGap.exec(null, null, "com.phonegap.splashscreen", "hide", []);
-};
-
-PhoneGap.addConstructor(function() {
- if (typeof navigator.splashscreen == "undefined") navigator.splashscreen = new SplashScreen();
-});
-
-};
diff --git a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/CMakeLists.txt b/apps/files_odfviewer/src/webodf/programs/nativeQtClient/CMakeLists.txt
deleted file mode 100644
index f317693e3d7..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-include(${QT_USE_FILE})
-include_directories(${CMAKE_CURRENT_BINARY_DIR} ${QT_QTCORE_INCLUDE_DIR})
-QT4_WRAP_CPP(NATIVEQTCLIENT_MOC
- odfview.h
- ../qtjsruntime/nativeio.h
- ../qtjsruntime/nam.h
-)
-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/application.qrc
- "<RCC><qresource prefix='/'>")
-foreach(FILE ${HTML5UIFILES} ${LIBJSFILES} index.html scripts.js webodf.css)
- file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/application.qrc
- "<file>www/${FILE}</file>\n")
-endforeach(FILE ${HTML5UIFILES})
-file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/application.qrc
- "</qresource></RCC>")
-COPY_FILES(NATIVEDEPS ${CMAKE_SOURCE_DIR}/programs/touchui
- ${CMAKE_CURRENT_BINARY_DIR}/www ${HTML5UIFILES})
-COPY_FILES(NATIVEDEPS ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}/www scripts.js)
-COPY_FILES(NATIVEDEPS ${CMAKE_SOURCE_DIR}/programs/touchui
- ${CMAKE_CURRENT_BINARY_DIR}/www index.html)
-COPY_FILES(NATIVEDEPS ${CMAKE_SOURCE_DIR}/webodf
- ${CMAKE_CURRENT_BINARY_DIR}/www webodf.css)
-COPY_FILES(NATIVEDEPS ${CMAKE_SOURCE_DIR}/webodf
- ${CMAKE_CURRENT_BINARY_DIR}/www ${LIBJSFILES})
-QT4_ADD_RESOURCES(NATIVEQTCLIENT_RES
- ${CMAKE_CURRENT_BINARY_DIR}/application.qrc)
-
-add_custom_target(nativeQtClientDepencencies ALL DEPENDS ${NATIVEDEPS})
-
-add_executable(nativeQtClient
- main.cpp
- odfview.cpp
- ../qtjsruntime/nativeio.cpp
- odfpage.cpp ${NATIVEQTCLIENT_MOC} ${NATIVEQTCLIENT_UI}
- ${NATIVEQTCLIENT_RES})
-
-target_link_libraries(nativeQtClient ${QT_LIBRARIES})
-add_dependencies(nativeQtClient nativeQtClientDepencencies)
diff --git a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/README b/apps/files_odfviewer/src/webodf/programs/nativeQtClient/README
deleted file mode 100644
index 4860fa1b000..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/README
+++ /dev/null
@@ -1 +0,0 @@
-This is a small app that can show ODF documents using mainly javascript. Some functions that are not fast in browers are provided in C++ and it gives the ability to open files on the file system.
diff --git a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/application.qrc b/apps/files_odfviewer/src/webodf/programs/nativeQtClient/application.qrc
deleted file mode 100644
index 5010cdb8a8d..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/application.qrc
+++ /dev/null
@@ -1,18 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>www/app/app.js</file>
- <file>www/app/controller/Files.js</file>
- <file>www/app/model/FileSystem.js</file>
- <file>www/app/store/FileStore.js</file>
- <file>www/app/views/FileDetail.js</file>
- <file>www/app/views/FilesList.js</file>
- <file>www/app/views/OdfView.js</file>
- <file>www/app/views/Viewport.js</file>
- <file>www/index.html</file>
- <file>www/scripts.js</file>
- <file>www/sencha-touch.css</file>
- <file>www/sencha-touch.js</file>
- <file>www/webodf.css</file>
- <file>www/webodf.js</file>
- </qresource>
-</RCC>
diff --git a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/main.cpp b/apps/files_odfviewer/src/webodf/programs/nativeQtClient/main.cpp
deleted file mode 100644
index 62e5fa18bee..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/main.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "odfview.h"
-#include <QtGui/QApplication>
-#include <QtCore/QTimer>
-
-int main(int argc, char *argv[]) {
- QApplication a(argc, argv);
- OdfView view;
- view.show();
- return a.exec();
-}
diff --git a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/mainwindow.cpp b/apps/files_odfviewer/src/webodf/programs/nativeQtClient/mainwindow.cpp
deleted file mode 100644
index 861014399e7..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/mainwindow.cpp
+++ /dev/null
@@ -1,173 +0,0 @@
-#include "mainwindow.h"
-#include "ui_mainwindow.h"
-#include "odfview.h"
-#include <QtGui/QDockWidget>
-#include <QtGui/QFileDialog>
-#include <QtGui/QFileSystemModel>
-#include <QtGui/QLineEdit>
-#include <QtGui/QMdiArea>
-#include <QtGui/QTreeView>
-#include <QtGui/QVBoxLayout>
-#include <QtCore/QDir>
-#include <QtCore/QSettings>
-
-MainWindow::MainWindow(QWidget *parent) :
- QMainWindow(parent),
- ui(new Ui::MainWindow)
-{
- ui->setupUi(this);
-
- createActions();
- createToolBars();
-
- QCoreApplication::setOrganizationName("KO");
- //QCoreApplication::setOrganizationDomain("example.com");
- QCoreApplication::setApplicationName("Odf Viewer");
-
- QSettings settings;
-
- setWindowTitle(tr("Odf Viewer"));
- setUnifiedTitleAndToolBarOnMac(true);
-
- QStringList odfNameFilter;
- odfNameFilter << "*.odt" << "*.ods" << "*.odp";
- dirmodel = new QFileSystemModel(this);
- dirmodel->setNameFilters(odfNameFilter);
- dirmodel->setFilter(QDir::AllDirs|QDir::AllEntries|QDir::NoDotAndDotDot);
- dirview = new QTreeView(this);
- dirview->setModel(dirmodel);
- dirview->setHeaderHidden(true);
- dirview->setAnimated(true);
- for (int i = 1; i < dirmodel->columnCount(); i++) {
- dirview->setColumnHidden(i, true);
- }
- QString rootpath = settings.value("rootpath", QDir::homePath()).toString();
- dirmodel->setRootPath(rootpath);
- const QModelIndex rootindex = dirmodel->index(rootpath);
- dirview->setRootIndex(rootindex);
- QLineEdit *dirPath = new QLineEdit(rootpath, this);
- dirdock = new QDockWidget(this);
- QWidget *w = new QWidget(dirdock);
- QVBoxLayout *layout = new QVBoxLayout(w);
- dirdock->setWidget(w);
- layout->addWidget(dirPath);
- layout->addWidget(dirview);
- addDockWidget(Qt::LeftDockWidgetArea, dirdock);
-
- connect(dirview, SIGNAL(clicked(QModelIndex)), this, SLOT(loadOdf(QModelIndex)));
- connect(dirPath, SIGNAL(textChanged(QString)), this, SLOT(setPath(QString)));
-}
-
-MainWindow::~MainWindow()
-{
- delete ui;
-}
-
-void
-MainWindow::openFile(const QString& path)
-{
- QMdiSubWindow* w = findMdiChild(path);
- OdfView* v = (w) ?dynamic_cast<OdfView*>(w->widget()) :0;
- if (v == 0) {
- w = ui->mdiArea->activeSubWindow();
- v = (w) ?dynamic_cast<OdfView*>(w->widget()) :0;
- }
- if (v == 0) {
- v = new OdfView(this);
- v->showMaximized();
- w = ui->mdiArea->addSubWindow(v);
- w->showMaximized();
- }
- ui->mdiArea->setActiveSubWindow(w);
- v->loadFile(path);
-}
-
-void MainWindow::changeEvent(QEvent *e)
-{
- QMainWindow::changeEvent(e);
- switch (e->type()) {
- case QEvent::LanguageChange:
- ui->retranslateUi(this);
- break;
- default:
- break;
- }
-}
-void MainWindow::open()
-{
- QString fileName = QFileDialog::getOpenFileName(this, QString(), QString(),
- tr("Office Files (*.odt *.odp *.ods)"));
- if (!fileName.isEmpty()) {
- QMdiSubWindow *existing = findMdiChild(fileName);
- if (existing) {
- ui->mdiArea->setActiveSubWindow(existing);
- return;
- }
-
- OdfView *child = createOdfView();
- if (child->loadFile(fileName)) {
- statusBar()->showMessage(tr("File loaded"), 2000);
- child->showMaximized();
- } else {
- child->close();
- }
- }
-}
-void MainWindow::createActions()
-{
- //openAct = new QAction(QIcon(":/images/open.png"), tr("&Open..."), this);
- openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcuts(QKeySequence::Open);
- openAct->setStatusTip(tr("Open an existing file"));
- connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
-}
-void MainWindow::createToolBars()
-{
- fileToolBar = addToolBar(tr("File"));
- fileToolBar->addAction(openAct);
-}
-QMdiSubWindow *MainWindow::findMdiChild(const QString &fileName)
-{
- QString canonicalFilePath = QFileInfo(fileName).canonicalFilePath();
-
- foreach (QMdiSubWindow *window, ui->mdiArea->subWindowList()) {
- OdfView *odfView = qobject_cast<OdfView *>(window->widget());
- if (odfView->currentFile() == canonicalFilePath)
- return window;
- }
- return 0;
-}
-
-OdfView *MainWindow::createOdfView()
-{
- OdfView *view = new OdfView(this);
- ui->mdiArea->addSubWindow(view);
- return view;
-}
-
-void
-MainWindow::loadOdf(const QModelIndex& index) {
- if (dirmodel->isDir(index)) {
- if (dirview->isExpanded(index)) {
- dirview->collapse(index);
- } else {
- dirview->expand(index);
- }
- return;
- }
- QString path = dirmodel->filePath(index);
- path = QFileInfo(path).canonicalFilePath();
- openFile(path);
-}
-
-void MainWindow::setPath(const QString &path)
-{
- dirmodel->setRootPath(path);
- const QModelIndex rootindex = dirmodel->index(path);
- dirview->setRootIndex(rootindex);
- QSettings settings;
- settings.setValue("rootpath", path);
-}
-
-
-
diff --git a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/mainwindow.h b/apps/files_odfviewer/src/webodf/programs/nativeQtClient/mainwindow.h
deleted file mode 100644
index d0bc822d03b..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/mainwindow.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include <QtGui/QMainWindow>
-#include <QtGui/QMdiSubWindow>
-
-namespace Ui {
- class MainWindow;
-}
-
-class OdfView;
-class QFileSystemModel;
-class QTreeView;
-class QDockWidget;
-class QModelIndex;
-
-class MainWindow : public QMainWindow {
- Q_OBJECT
-public:
- MainWindow(QWidget *parent = 0);
- ~MainWindow();
- void openFile(const QString& path);
-
-private slots:
- void open();
- OdfView *createOdfView();
- void loadOdf(const QModelIndex& index);
- void setPath(const QString &path);
-
-private:
- QMdiSubWindow *findMdiChild(const QString &fileName);
- void createActions();
- void createToolBars();
- QToolBar *fileToolBar;
- QAction *openAct;
-protected:
- void changeEvent(QEvent *e);
-
-private:
- Ui::MainWindow *ui;
- QFileSystemModel* dirmodel;
- QTreeView* dirview;
- QDockWidget* dirdock;
-};
-
-#endif // MAINWINDOW_H
diff --git a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/mainwindow.ui b/apps/files_odfviewer/src/webodf/programs/nativeQtClient/mainwindow.ui
deleted file mode 100644
index 38682c7010f..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/mainwindow.ui
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>800</width>
- <height>600</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>MainWindow</string>
- </property>
- <widget class="QWidget" name="centralWidget">
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QMdiArea" name="mdiArea"/>
- </item>
- </layout>
- </widget>
- <widget class="QMenuBar" name="menuBar">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>800</width>
- <height>23</height>
- </rect>
- </property>
- </widget>
- <widget class="QToolBar" name="mainToolBar">
- <attribute name="toolBarArea">
- <enum>TopToolBarArea</enum>
- </attribute>
- <attribute name="toolBarBreak">
- <bool>false</bool>
- </attribute>
- </widget>
- <widget class="QStatusBar" name="statusBar"/>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <resources/>
- <connections/>
-</ui>
diff --git a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfpage.cpp b/apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfpage.cpp
deleted file mode 100644
index d87a8baa2b5..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfpage.cpp
+++ /dev/null
@@ -1 +0,0 @@
-#include "odfpage.h"
diff --git a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfpage.h b/apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfpage.h
deleted file mode 100644
index 487d169917d..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfpage.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef ODFPAGE_H
-#define ODFPAGE_H
-
-#include <QtWebKit/QWebPage>
-#include <QtCore/QDebug>
-
-class OdfPage : public QWebPage {
-public:
- OdfPage(QObject* parent) :QWebPage(parent) {}
- void javaScriptConsoleMessage(const QString& message, int lineNumber, const QString & sourceID) {
- qDebug() << sourceID << ":" << lineNumber << ":" << message;
- }
-};
-
-#endif // ODFPAGE_H
diff --git a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfview.cpp b/apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfview.cpp
deleted file mode 100644
index 97125a5537a..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfview.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-#include "odfview.h"
-
-#include "../qtjsruntime/nativeio.h"
-#include "../qtjsruntime/nam.h"
-
-#include "odfpage.h"
-
-#include <QtCore/QByteArray>
-#include <QtWebKit/QWebFrame>
-#include <QtNetwork/QNetworkAccessManager>
-#include <QtNetwork/QNetworkRequest>
-#include <QtNetwork/QNetworkReply>
-#include <QtCore/QFileInfo>
-#include <QtCore/QDir>
-
-OdfView::OdfView(QWidget* parent) :QWebView(parent)
-{
- QString prefix = "../android/assets/"; // set this to the right value when debugging
- QString htmlfile = QDir(prefix).absoluteFilePath("www/index.html");
- if (!QFileInfo(htmlfile).exists()) {
- prefix = "qrc:/";
- htmlfile = "qrc:/www/index.html";
- }
- setPage(new OdfPage(this));
- nativeio = new NativeIO(this, QDir(prefix), QDir::current());
- connect(page(), SIGNAL(loadFinished(bool)), this, SLOT(slotLoadFinished(bool)));
- page()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
-
- connect(page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()),
- this, SLOT(slotInitWindowObjects()));
-
- // use our own networkaccessmanager that gives limited access to the local
- // file system
- networkaccessmanager = new NAM(this);
- page()->setNetworkAccessManager(networkaccessmanager);
- setUrl(QUrl(htmlfile));
- loaded = false;
-}
-
-OdfView::~OdfView() {
-}
-
-void
-OdfView::slotInitWindowObjects()
-{
- QWebFrame *frame = page()->mainFrame();
- frame->addToJavaScriptWindowObject("nativeio", nativeio);
-}
-
-bool
-OdfView::loadFile(const QString &fileName) {
- curFile = fileName;
- // odf->addFile(identifier, fileName);
- // networkaccessmanager->setCurrentFile(odf->getOpenContainer(identifier));
- if (loaded) {
- slotLoadFinished(true);
- }
- return true;
-}
-void
-OdfView::slotLoadFinished(bool ok) {
- if (!ok) return;
- loaded = true;
- QWebFrame *frame = page()->mainFrame();
- QString js =
- "var originalReadFileSync = runtime.readFileSync;"
- "runtime.readFileSync = function (path, encoding) {"
- " if (path.substr(path.length - 3) === '.js') {"
- " return originalReadFileSync.apply(runtime,"
- " [path, encoding]);"
- " }"
- " return nativeio.readFileSync(path, encoding);"
- "};"
- "runtime.read = function (path, offset, length, callback) {"
- " var data = nativeio.read(path, offset, length);"
- " data = runtime.byteArrayFromString(data, 'binary');"
- " callback(nativeio.error()||null, data);"
- "};"
- "runtime.getFileSize = function (path, callback) {"
- " callback(nativeio.getFileSize(path));"
- "};";
- frame->evaluateJavaScript(js);
-}
diff --git a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfview.h b/apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfview.h
deleted file mode 100644
index f61ba3c926d..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/odfview.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef ODFVIEW_H
-#define ODFVIEW_H
-
-#include <QtWebKit/QWebView>
-#include <QtNetwork/QNetworkAccessManager>
-class NativeIO;
-
-class OdfView : public QWebView {
-Q_OBJECT
-public:
- OdfView(QWidget* parent = 0);
- ~OdfView();
- QString currentFile() { return curFile; }
-
-public slots:
- bool loadFile(const QString &fileName);
-
-private slots:
- void slotLoadFinished(bool ok);
- void slotInitWindowObjects();
-
-private:
- bool loaded;
- QString curFile;
- QNetworkAccessManager* networkaccessmanager;
- NativeIO* nativeio;
-};
-
-#endif // ODFVIEW_H
diff --git a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/scripts.js b/apps/files_odfviewer/src/webodf/programs/nativeQtClient/scripts.js
deleted file mode 100644
index ce2086bc7a9..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/nativeQtClient/scripts.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/*global alert, app, window, runtime*/
-var LocalFileSystem = {
- PERSISTENT: 0,
- TEMPORARY: 1
-};
-function FileEntry(name, fullPath) {
- "use strict";
- this.isFile = true;
- this.isDirectory = false;
- this.name = name;
- this.fullPath = fullPath;
- this.file = function (onsuccess, onerror) {
- function File(fullPath) {
- this.name = name;
- this.fullPath = fullPath;
- this.type = "";
- this.size = -1;
- this.lastModifiedDate = -1;
- }
- var file = new File(fullPath);
- try {
- onsuccess(file);
- } catch (e) {
- alert("Error on determining file properties: " + e);
- onerror(e);
- }
- };
-}
-function FileReader() {
- "use strict";
- var fr = this;
- this.readAsArrayBuffer = function (file) {
- var path = file.fullPath.substr(7),
- data = runtime.readFileSync(path, 'binary');
- data = runtime.byteArrayFromString(data, "binary");
- window.setTimeout(function () {
- fr.onloadend({target: {result: data}});
- }, 1);
- };
-}
-var DirectoryReader;
-function DirectoryEntry(name, fullPath) {
- "use strict";
- this.isFile = false;
- this.isDirectory = true;
- this.name = name;
- this.fullPath = fullPath;
- this.createReader = function () {
- var reader = new DirectoryReader(fullPath);
- return reader;
- };
-}
-function DirectoryReader(fullPath) {
- "use strict";
- this.readEntries = function (onsuccess, onerror) {
- window.setTimeout(function () {
- var entries = [];
- entries[entries.length] = new FileEntry("welcome.odt",
- "welcome.odt");
- entries[entries.length] = new FileEntry("Traktatenblad.odt",
- "Traktatenblad.odt");
- try {
- onsuccess(entries);
- } catch (e) {
- onerror(e);
- }
- }, 1);
- };
-}
-window.resolveLocalFileSystemURI = function (path, onsuccess, onerror) {
- "use strict";
- var p = path.lastIndexOf("/"),
- name = (p === -1) ? path : path.substr(p + 1);
- onsuccess(new FileEntry(name, path));
-};
-window.requestFileSystem = function (filesystem, id, onsuccess, onerror) {
- "use strict";
- var dirs = [], shared, subfolder, path;
- try {
- if (filesystem === LocalFileSystem.PERSISTENT) {
- path = "";
- onsuccess({
- name: "root",
- root: new DirectoryEntry("root", path)
- });
- } else {
- onerror("not defined");
- }
- } catch (e) {
- onerror(e);
- }
-};
-var device = {};
diff --git a/apps/files_odfviewer/src/webodf/programs/playbook/CMakeLists.txt b/apps/files_odfviewer/src/webodf/programs/playbook/CMakeLists.txt
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/playbook/CMakeLists.txt
+++ /dev/null
diff --git a/apps/files_odfviewer/src/webodf/programs/playbook/build_sign.bat b/apps/files_odfviewer/src/webodf/programs/playbook/build_sign.bat
deleted file mode 100644
index 34e8deeab38..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/playbook/build_sign.bat
+++ /dev/null
@@ -1,23 +0,0 @@
-@echo on
-set WWSDK=M:\blackberrysdk\webworkssdk
-set BBWP=%WWSDK%\bbwp\bbwp
-set DEPLOY=%WWSDK%\bbwp\blackberry-tablet-sdk\bin\blackberry-deploy
-set JAVA_HOME=%WWSDK%\jre
-set PATH=%PATH%;%JAVA_HOME%\bin
-
-mkdir bin
-mkdir signed
-
-zip -r webodf.zip config.xml index.html icon.png scripts.js app sencha-touch.js sencha-touch.css webodf.js webodf.css ZoomIn.png ZoomOut.png
-
-rem MAKE A DEBUG VERSION
-del bin\webodf.bar
-%BBWP% webodf.zip -d -o bin
-if %errorlevel% neq 0 exit /b %errorlevel%
-
-%DEPLOY% -installApp -password ko -device 192.168.1.111 -package bin\webodf.bar
-if %errorlevel% neq 0 exit /b %errorlevel%
-
-rem MAKE A SIGNED VERSION, (can be done only once for each buildId!)
-rem %BBWP% webodf.zip -g U9gXpJXbGC -buildId 2 -o signed
-
diff --git a/apps/files_odfviewer/src/webodf/programs/playbook/config.xml b/apps/files_odfviewer/src/webodf/programs/playbook/config.xml
deleted file mode 100644
index cab7788317d..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/playbook/config.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<widget xmlns="http://www.w3.org/ns/widgets"
- xmlns:rim="http://www.blackberry.com/ns/widgets"
- version="2.0.0.0">
- <author href="http://www.kogmbh.com/" rim:copyright="Copyright 2010-2012 KO GmbH">KO GmbH</author>
- <name>WebODF</name>
- <description>
- Viewer for OpenDocument files.
- </description>
- <rim:orientation mode="auto"/>
- <rim:loadingScreen onLocalPageLoad="true" onRemotePageLoad="true">
- <rim:transitionEffect type="zoomIn"/>
- </rim:loadingScreen>
- <rim:category name="productivity"/>
-
- <rim:permissions>
- <rim:permit>access_shared</rim:permit>
- </rim:permissions>
- <icon src="icon.png"/>
- <content src="index.html" rim:allowInvokeParams="true"/>
- <feature id="blackberry.ui.dialog"/>
- <feature id="blackberry.io.dir" />
- <feature id="blackberry.io.file" />
- <feature id="blackberry.utils" />
- <feature id="blackberry.custom.filereader"/>
-</widget>
diff --git a/apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/js/common/custom_filereader_dispatcher.js b/apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/js/common/custom_filereader_dispatcher.js
deleted file mode 100644
index 8c4d91c46e0..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/js/common/custom_filereader_dispatcher.js
+++ /dev/null
@@ -1,17 +0,0 @@
-(function () {
- var CUSTOM_FILEREADER_API_URL = "blackberry/custom/filereader";
-
- var ARGS_PATH = "path";
- var ARGS_DATA = "data";
-
- function CustomFileReader() {
- };
-
- CustomFileReader.prototype.readAsDataURL = function(path) {
- var remoteCall = new blackberry.transport.RemoteFunctionCall(CUSTOM_FILEREADER_API_URL + "/readAsDataURL");
- remoteCall.addParam(ARGS_PATH, path);
- return remoteCall.makeSyncCall();
- };
-
- blackberry.Loader.javascriptLoaded("blackberry.custom.filereader", CustomFileReader);
-})();
diff --git a/apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/js/common/custom_filereader_ns.js b/apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/js/common/custom_filereader_ns.js
deleted file mode 100644
index 2ae1ede11e3..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/js/common/custom_filereader_ns.js
+++ /dev/null
@@ -1,8 +0,0 @@
-(function () {
-
- function CustomFileReader(disp) {
- this.constructor.prototype.readAsDataURL = function(path) { return disp.readAsDataURL(path); };
- };
-
- blackberry.Loader.javascriptLoaded("blackberry.custom.filereader", CustomFileReader);
-})();
diff --git a/apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/library.xml b/apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/library.xml
deleted file mode 100644
index 1f3aa52d368..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/library.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<library>
- <extension id="blackberry.custom.filereader">
- <entryClass>blackberry.custom.filereader.CustomFileReader</entryClass>
- </extension>
- <platforms>
- <platform value="AIR">
- <target version="default" config="AIR_XHR" />
- </platform>
- </platforms>
-
- <configurations>
- <configuration name="AIR_XHR" version="1.0" comment="For XHR architecture for implementation">
- <src type="text/javascript" path="js/common/custom_filereader_dispatcher.js" comment="Application JS interface" />
- <src type="text/javascript" path="js/common/custom_filereader_ns.js" comment="Application JS interface" />
- <src type="text/actionscript" path="src/Air/CustomFileReader/src" comment="ActionScript implementation" />
- </configuration>
- </configurations>
- <features>
- <feature id="blackberry.custom.filereader" version="1.0.0" />
- </features>
-</library> \ No newline at end of file
diff --git a/apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/src/AIR/CustomFileReader/src/blackberry/custom/filereader/CustomFileReader.as b/apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/src/AIR/CustomFileReader/src/blackberry/custom/filereader/CustomFileReader.as
deleted file mode 100644
index 3261fbcf457..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/playbook/ext/blackberry.custom.filereader/src/AIR/CustomFileReader/src/blackberry/custom/filereader/CustomFileReader.as
+++ /dev/null
@@ -1,34 +0,0 @@
-package blackberry.custom.filereader {
- import flash.filesystem.File;
- import flash.filesystem.FileMode;
- import flash.filesystem.FileStream;
- import flash.utils.ByteArray;
- import mx.utils.Base64Encoder;
- import webworks.extension.DefaultExtension;
-
- public class CustomFileReader extends DefaultExtension {
-
- public function CustomFileReader() {
- super();
- }
-
- override public function getFeatureList():Array {
- return new Array ("blackberry.custom.filereader");
- }
-
- public function readAsDataURL(path:String):String {
- var file:File = new File(path);
- if (!file.exists) {
- return "";
- }
- var bytes:ByteArray = new ByteArray();
- var stream:FileStream = new FileStream();
- stream.open(file, FileMode.READ);
- stream.readBytes(bytes);
- var btoa:Base64Encoder = new Base64Encoder();
- btoa.encodeBytes(bytes);
- stream.close();
- return "data:;base64," + btoa.toString();
- }
- }
-} \ No newline at end of file
diff --git a/apps/files_odfviewer/src/webodf/programs/playbook/icon.png b/apps/files_odfviewer/src/webodf/programs/playbook/icon.png
deleted file mode 100644
index b7ccb848e39..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/playbook/icon.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/playbook/index.html b/apps/files_odfviewer/src/webodf/programs/playbook/index.html
deleted file mode 100644
index 77d331c12e4..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/playbook/index.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0">
- <link href="sencha-touch.css" rel="stylesheet" type="text/css" />
- <link href="webodf.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="sencha-touch.js"></script>
- <script type="text/javascript" src="webodf.js"></script>
- <script type="text/javascript" src="scripts.js"></script>
- <script type="text/javascript" src="app/app.js"></script>
- <script type="text/javascript" src="app/controller/Files.js"></script>
- <script type="text/javascript" src="app/model/FileSystem.js"></script>
- <script type="text/javascript" src="app/store/FileStore.js"></script>
- <script type="text/javascript" src="app/views/FileDetail.js"></script>
- <script type="text/javascript" src="app/views/FilesList.js"></script>
- <script type="text/javascript" src="app/views/OdfView.js"></script>
- <script type="text/javascript" src="app/views/Viewport.js"></script>
- <title>WebODF</title>
- <style>
-body {
- background: url(icon.png);
-}
-</style>
- </head>
- <body onload="go()">
- </body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/programs/playbook/scripts.js b/apps/files_odfviewer/src/webodf/programs/playbook/scripts.js
deleted file mode 100644
index e7913527d65..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/playbook/scripts.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/*global blackberry, alert, document, window, app*/
-var LocalFileSystem = {
- PERSISTENT: 0,
- TEMPORARY: 1
-};
-function FileWriter(fullPath) {
- "use strict";
- this.write = function (data) {
- var blob;
- try {
- blob = blackberry.utils.stringToBlob(data, "UTF-8");
- blackberry.io.file.saveFile(fullPath, blob);
- } catch (e) {
- }
- };
-}
-function FileEntry(name, fullPath) {
- "use strict";
- this.isFile = true;
- this.isDirectory = false;
- this.name = name;
- this.fullPath = fullPath;
- this.file = function (onsuccess, onerror) {
- function File(fullPath) {
- this.name = name;
- this.fullPath = fullPath;
- this.type = "";
- this.size = -1;
- this.lastModifiedDate = -1;
- }
- var file = new File(fullPath),
- properties;
- try {
- properties = blackberry.io.file.getFileProperties(fullPath);
- file.type = properties.mimeType;
- file.size = properties.size;
- file.lastModifiedDate = properties.dateModified;
- onsuccess(file);
- } catch (e) {
- alert("Error on determining file properties: " + e);
- onerror(e);
- }
- };
- this.createWriter = function (onsuccess, onerror) {
- onsuccess(new FileWriter(fullPath));
- };
-}
-function FileReader() {
- "use strict";
- var fr = this;
- this.readAsDataURL = function (file) {
- var path = file.fullPath.substr(7);
- window.setTimeout(function () {
- try {
- var data = blackberry.custom.filereader.readAsDataURL(path);
- fr.onloadend({target: {result: data}});
- } catch (e) {
- alert("Error on reading file: " + e + " " + file.fullPath);
- }
- }, 1);
- };
- this.readAsText = function (file) {
- var path = file.fullPath.substr(7);
- try {
- blackberry.io.file.readFile(path, function (fullPath, blob) {
- var str = blackberry.utils.blobToString(blob, "UTF-8");
- fr.onloadend({target: {result: str}});
- }, true);
- } catch (e) {
- fr.onloadend({target: {result: "[]"}});
- }
- };
-}
-var DirectoryReader;
-function DirectoryEntry(name, fullPath) {
- "use strict";
- this.isFile = false;
- this.isDirectory = true;
- this.name = name;
- this.fullPath = fullPath;
- this.createReader = function () {
- var reader = new DirectoryReader(fullPath);
- return reader;
- };
-}
-function DirectoryReader(fullPath) {
- "use strict";
- this.readEntries = function (onsuccess, onerror) {
- window.setTimeout(function () {
- var entries = [],
- dirs = blackberry.io.dir.listDirectories(fullPath),
- files = blackberry.io.dir.listFiles(fullPath),
- i;
- try {
- for (i = 0; i < dirs.length; i += 1) {
- entries[entries.length] = new DirectoryEntry(dirs[i],
- fullPath + "/" + dirs[i]);
- }
- for (i = 0; i < files.length; i += 1) {
- entries[entries.length] = new FileEntry(files[i],
- fullPath + "/" + files[i]);
- }
- onsuccess(entries);
- } catch (e) {
- onerror(e);
- }
- }, 1);
- };
-}
-window.resolveLocalFileSystemURI = function (path, onsuccess, onerror) {
- "use strict";
- var p = path.lastIndexOf("/"),
- name;
- if (p === -1) {
- name = path;
- path = blackberry.io.dir.appDirs.shared.documents.path + "/" + path;
- } else {
- name = path.substr(p + 1);
- }
- onsuccess(new FileEntry(name, path));
-};
-window.requestFileSystem = function (filesystem, id, onsuccess, onerror) {
- "use strict";
- var dirs = [], shared, subfolder;
- try {
- if (filesystem === LocalFileSystem.PERSISTENT) {
- shared = blackberry.io.dir.appDirs.shared;
- for (subfolder in shared) {
- if (shared.hasOwnProperty(subfolder)) {
- dirs[dirs.length] = subfolder;
- }
- }
- onsuccess({
- name: "root",
- root: new DirectoryEntry("root", shared.documents.path
- //+ "/kofficetests/odf/odt"
- )
- });
- } else {
- onerror("not defined");
- }
- } catch (e) {
- onerror(e);
- }
-};
-var device = {};
diff --git a/apps/files_odfviewer/src/webodf/programs/qtjsruntime/CMakeLists.txt b/apps/files_odfviewer/src/webodf/programs/qtjsruntime/CMakeLists.txt
deleted file mode 100644
index ec8026741c9..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/qtjsruntime/CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-include(${QT_USE_FILE})
-QT4_WRAP_CPP(QTJSRUNTIME_MOC nam.h pagerunner.h nativeio.h)
-add_executable(qtjsruntime qtjsruntime.cpp pagerunner.cpp nativeio.cpp ${QTJSRUNTIME_MOC})
-target_link_libraries(qtjsruntime ${QT_LIBRARIES})
diff --git a/apps/files_odfviewer/src/webodf/programs/qtjsruntime/nam.h b/apps/files_odfviewer/src/webodf/programs/qtjsruntime/nam.h
deleted file mode 100644
index ebb62f261a4..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/qtjsruntime/nam.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef NAM_H
-#define NAM_H
-
-#include <QtNetwork/QNetworkAccessManager>
-#include <QtNetwork/QNetworkRequest>
-
-class NAM : public QNetworkAccessManager {
-Q_OBJECT
-private:
- const QString host;
- const int port;
- int outstandingRequests;
-public:
- NAM(QObject* parent, const QString& host_ = QString(), int port_ = -1)
- :QNetworkAccessManager(parent), host(host_), port(port_) {
- outstandingRequests = 0;
- connect(this, SIGNAL(finished(QNetworkReply*)),
- this, SLOT(requestFinished()));
- }
- QNetworkReply* createRequest(QNetworkAccessManager::Operation o,
- QNetworkRequest const& r, QIODevice* d) {
- outstandingRequests += 1;
- bool samehost = false;
- if (port > 0) {
- samehost = r.url().host() == host
- || r.url().host().endsWith("." + host)
- || host.endsWith("." + r.url().host());
- samehost &= r.url().port() != port;
- } else {
- // use host string as a prefix
- samehost = r.url().toString().startsWith(host);
- }
- if (!samehost) {
- // if not same host or domain and port, block
- return QNetworkAccessManager::createRequest(o, QNetworkRequest(),
- d);
- }
- return QNetworkAccessManager::createRequest(o, r, d);
- }
- bool hasOutstandingRequests() {
- return outstandingRequests > 0;
- }
-public slots:
- void requestFinished() {
- outstandingRequests -= 1;
- }
-};
-#endif
diff --git a/apps/files_odfviewer/src/webodf/programs/qtjsruntime/nativeio.cpp b/apps/files_odfviewer/src/webodf/programs/qtjsruntime/nativeio.cpp
deleted file mode 100644
index 0657a0c7117..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/qtjsruntime/nativeio.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-#include "nativeio.h"
-#include <QtWebKit/QWebPage>
-#include <QtCore/QCoreApplication>
-#include <QtCore/QTextCodec>
-
-NativeIO::NativeIO(QObject* parent, const QDir& runtimedir_,
- const QDir& cwd_,
- const QMap<QString, QFile::Permissions>& pathPermissions_)
- :QObject(parent), runtimedir(runtimedir_), cwd(cwd_),
- pathPermissions(pathPermissions_) {
-}
-QString
-NativeIO::readFileSync(const QString& path, const QString& encoding) {
- errstr = QString();
- QFile file(cwd.absoluteFilePath(path));
- QByteArray data;
- if (file.open(QIODevice::ReadOnly)) {
- data = file.readAll();
- }
- QString out;
- if (encoding != "binary") {
- QTextCodec *codec = QTextCodec::codecForName(encoding.toAscii());
- if (codec) {
- out = codec->toUnicode(data);
- }
- }
- if (out.length() == 0 && data.length() > 0) {
- out = QString(data.length(), 0);
- for (int i = 0; i < data.length(); ++i) {
- out[i] = data[i];
- }
- }
- return out;
-}
-QString
-NativeIO::read(const QString& path, int offset, int length) {
- errstr = QString();
- QFile file(cwd.absoluteFilePath(path));
- QByteArray data;
- if (file.open(QIODevice::ReadOnly) && (offset == 0 || file.seek(offset))) {
- int lastLength = 0;
- do {
- lastLength = data.length();
- data += file.read(length - data.length());
- } while (data.length() < length && data.length() != lastLength);
- }
- if (length != data.length()) {
- errstr = "Not enough data: " + QString::number(length) +
- " instead of " + QString::number(data.length());
- return QString();
- }
- QString out(length, 0);
- for (int i = 0; i < length; ++i) {
- out[i] = data[i];
- }
- return out;
-}
-void
-NativeIO::writeFile(const QString& path, const QString& data) {
- QFile file(cwd.absoluteFilePath(path));
- errstr = QString();
- if (!file.open(QIODevice::WriteOnly)) {
- errstr = "Could not open file for writing.";
- return;
- }
- int length = data.length();
- QByteArray out(length, 0);
- for (int i = 0; i < length; ++i) {
- out[i] = data[i].unicode();
- }
- if (file.write(out) != out.length()) {
- errstr = "Could not write to file.";
- }
- return;
-}
-void
-NativeIO::unlink(const QString& path) {
- errstr = QString();
- QFile file(cwd.absoluteFilePath(path));
- if (!file.remove()) {
- errstr = "Could not delete file";
- }
-}
-int
-NativeIO::getFileSize(const QString& path) {
- errstr = QString();
- QFile file(cwd.absoluteFilePath(path));
- if (!file.exists()) {
- errstr = "Could not determine file size.";
- }
- return file.size();
-}
-void
-NativeIO::exit(int exitcode) {
- qApp->exit(exitcode);
-}
-QString
-NativeIO::currentDirectory() const {
- return QDir::currentPath();
-}
-QStringList
-NativeIO::libraryPaths() const {
- QStringList paths;
- paths << runtimedir.absolutePath() << cwd.absolutePath();
- return paths;
-}
diff --git a/apps/files_odfviewer/src/webodf/programs/qtjsruntime/nativeio.h b/apps/files_odfviewer/src/webodf/programs/qtjsruntime/nativeio.h
deleted file mode 100644
index b6997442269..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/qtjsruntime/nativeio.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef NATIVEIO_H
-#define NATIVEIO_H
-
-#include <QtCore/QFile>
-#include <QtCore/QDir>
-#include <QtCore/QMap>
-
-class QWebPage;
-
-// class that exposes filesystem to web environment
-class NativeIO : public QObject {
-Q_OBJECT
-private:
- QWebPage* webpage;
- QString errstr;
- const QDir runtimedir;
- const QDir cwd;
- const QMap<QString, QFile::Permissions> pathPermissions;
-public:
- typedef QMap<QString, QFile::Permissions> PathMap;
- PathMap v;
- NativeIO(QObject* parent, const QDir& runtimedir, const QDir& cwd,
- const PathMap& pathPermissions = PathMap());
-public slots:
- /**
- * Return the last error.
- */
- QString error() {
- return errstr;
- }
- QString readFileSync(const QString& path, const QString& encoding);
- QString read(const QString& path, int offset, int length);
- void writeFile(const QString& path, const QString& data);
- void unlink(const QString& path);
- int getFileSize(const QString& path);
- void exit(int exitcode);
- QString currentDirectory() const;
- QStringList libraryPaths() const;
-};
-
-#endif
diff --git a/apps/files_odfviewer/src/webodf/programs/qtjsruntime/pagerunner.cpp b/apps/files_odfviewer/src/webodf/programs/qtjsruntime/pagerunner.cpp
deleted file mode 100644
index a91794d9a28..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/qtjsruntime/pagerunner.cpp
+++ /dev/null
@@ -1,191 +0,0 @@
-#include "pagerunner.h"
-
-#include "nam.h"
-#include "nativeio.h"
-#include <QtCore/QFileInfo>
-#include <QtCore/QTemporaryFile>
-#include <QtCore/QTimer>
-#include <QtCore/QCoreApplication>
-#include <QtGui/QPainter>
-#include <QtGui/QPrinter>
-#include <QtWebKit/QWebFrame>
-#include <QtCore/QDebug>
-
-QByteArray getRuntimeBindings() {
- return
- "if (typeof(runtime) !== 'undefined') {"
- " runtime.readFileSync = function (path, encoding) {"
- " return nativeio.readFileSync(path, encoding);"
- " };"
- " runtime.read = function (path, offset, length, callback) {"
- " var data = nativeio.read(path, offset, length);"
- " data = runtime.byteArrayFromString(data, 'binary');"
- " callback(nativeio.error()||null, data);"
- " };"
- " runtime.writeFile = function (path, data, callback) {"
- " data = runtime.byteArrayToString(data, 'binary');"
- " nativeio.writeFile(path, data);"
- " callback(nativeio.error()||null);"
- " };"
- " runtime.deleteFile = function (path, callback) {"
- " nativeio.unlink(path);"
- " callback(nativeio.error()||null);"
- " };"
- " runtime.getFileSize = function (path, callback) {"
- " callback(nativeio.getFileSize(path));"
- " };"
- " runtime.exit = function (exitCode) {"
- " nativeio.exit(exitCode);"
- " };"
- " runtime.currentDirectory = function () {"
- " return nativeio.currentDirectory();"
- " };"
- "}";
-}
-
-PageRunner::PageRunner(const QStringList& args)
- : QWebPage(0),
- out(stdout),
- err(stderr),
- view(new QWidget()) {
-
- QMap<QString, QString> settings = parseArguments(args);
- QStringList arguments = args.mid(settings.size() * 2);
- exportpdf = settings.value("export-pdf");
- exportpng = settings.value("export-png");
- url = QUrl(arguments[0]);
- nativeio = new NativeIO(this, QFileInfo(arguments[0]).dir(),
- QDir::current());
- if (url.scheme() == "file" || url.isRelative()) {
- QFileInfo info(url.toLocalFile());
- if (!info.isReadable() || !info.isFile()) {
- QTextStream err(stderr);
- err << "Cannot read file '" + url.toString() + "'.\n";
- qApp->exit(1);
- }
- }
- nam = new NAM(this, QUrl(url).host(), QUrl(url).port());
-
- setNetworkAccessManager(nam);
- connect(this, SIGNAL(loadFinished(bool)), this, SLOT(finished(bool)));
- connect(mainFrame(), SIGNAL(javaScriptWindowObjectCleared()),
- this, SLOT(slotInitWindowObjects()));
- sawJSError = false;
-
- setView(view);
- scriptMode = arguments[0].endsWith(".js");
- if (scriptMode) {
- QByteArray html = "'" + arguments[0].toUtf8().replace('\'', "\\'")
- + "'";
- for (int i = 1; i < arguments.length(); ++i) {
- html += ",'" + arguments[i].toUtf8().replace('\'', "\\'") + "'";
- }
- html = "<html>"
- "<head><base href=\".\"></base><title></title>"
- "<script>var arguments=[" + html + "];</script>"
- "<script src=\"" + arguments[0].toUtf8() + "\"></script>";
- if (arguments[0].endsWith("runtime.js")) {
- // add runtime modification
- html += "<script>" + getRuntimeBindings() +
- " runtime.libraryPaths = function () {"
- " /* convert to javascript array */"
- " var p = nativeio.libraryPaths(),"
- " a = [], i;"
- " for (i in p) { a[i] = p[i]; }"
- " return a;"
- " };</script>";
- }
- html += "</head><body></body></html>\n";
- QTemporaryFile tmp("XXXXXX.html");
- tmp.setAutoRemove(true);
- tmp.open();
- tmp.write(html);
- tmp.close();
- mainFrame()->load(tmp.fileName());
- } else {
- // Make the url absolute. If it is not done here, QWebFrame will do
- // it, and it will lose the query and fragment part.
- QUrl absurl;
- if (url.isRelative()) {
- absurl = QUrl::fromLocalFile(QFileInfo(url.toLocalFile()).absoluteFilePath());
- absurl.setQueryItems(url.queryItems());
- absurl.setFragment(url.fragment());
- } else {
- absurl = url;
- }
- mainFrame()->load(absurl);
- }
-}
-PageRunner::~PageRunner() {
- delete view;
-}
-void PageRunner::finished(bool ok) {
- // bind nativeio
- if (!ok) {
- qApp->exit(1);
- }
- if (!scriptMode) {
- mainFrame()->evaluateJavaScript(getRuntimeBindings());
- }
-
- // connect signals
- connect(this, SIGNAL(contentsChanged()), this, SLOT(noteChange()));
- connect(this, SIGNAL(downloadRequested(QNetworkRequest)),
- this, SLOT(noteChange()));
- connect(this, SIGNAL(repaintRequested(QRect)),
- this, SLOT(noteChange()));
- connect(mainFrame(), SIGNAL(pageChanged()), this, SLOT(noteChange()));
- connect(this, SIGNAL(geometryChangeRequested(QRect)),
- this, SLOT(noteChange()));
- QTimer::singleShot(150, this, SLOT(reallyFinished()));
- changed = false;
- time.start();
-}
-void PageRunner::reallyFinished() {
- int latency = time.restart();
- // err << latency << " " << changed << " " << nam->hasOutstandingRequests() << endl;
- if (changed || latency >= 152 || nam->hasOutstandingRequests()) {
- QTimer::singleShot(150, this, SLOT(reallyFinished()));
- changed = false;
- return;
- }
- if (!exportpdf.isEmpty() || !exportpng.isEmpty()) {
- setViewportSize(mainFrame()->contentsSize());
- }
- if (!exportpng.isEmpty()) {
- renderToFile(exportpng);
- }
- if (!exportpdf.isEmpty()) {
- printToFile(exportpdf);
- }
- qApp->exit(sawJSError);
-}
-QMap<QString, QString> PageRunner::parseArguments(const QStringList& args) {
- int i = 0;
- QMap<QString, QString> settings;
- while (i + 2 < args.length()) {
- if (args[i].startsWith("--")) {
- settings[args[i].mid(2)] = args[i+1];
- }
- i += 2;
- }
- return settings;
-}
-void PageRunner::slotInitWindowObjects() {
- mainFrame()->addToJavaScriptWindowObject("nativeio", nativeio);
-}
-void PageRunner::renderToFile(const QString& filename) {
- QImage pixmap(mainFrame()->contentsSize().boundedTo(QSize(10000,10000)),
- QImage::Format_ARGB32_Premultiplied);
- QPainter painter(&pixmap);
- mainFrame()->render(&painter, QWebFrame::ContentsLayer);
- painter.end();
- pixmap.save(filename);
-}
-void PageRunner::printToFile(const QString& filename) {
- QPrinter printer(QPrinter::HighResolution);
- printer.setFontEmbeddingEnabled(true);
- printer.setOutputFormat(QPrinter::PdfFormat);
- printer.setOutputFileName(filename);
- mainFrame()->print(&printer);
-}
diff --git a/apps/files_odfviewer/src/webodf/programs/qtjsruntime/pagerunner.h b/apps/files_odfviewer/src/webodf/programs/qtjsruntime/pagerunner.h
deleted file mode 100644
index 9c848acc105..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/qtjsruntime/pagerunner.h
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef PAGERUNNER_H
-#define PAGERUNNER_H
-
-#include <QtCore/QTextStream>
-#include <QtCore/QTime>
-#include <QtWebKit/QWebPage>
-
-class NAM;
-class NativeIO;
-
-class PageRunner : public QWebPage {
-Q_OBJECT
-private:
- QUrl url;
- NAM* nam;
- QTextStream out;
- QTextStream err;
- bool changed;
- QWidget* const view;
- QTime time;
- bool scriptMode;
- NativeIO* nativeio;
- QString exportpdf;
- QString exportpng;
- bool sawJSError;
-public:
- PageRunner(const QStringList& args);
- ~PageRunner();
-private slots:
- void finished(bool ok);
- void noteChange() {
- changed = true;
- }
- void reallyFinished();
- void slotInitWindowObjects();
- bool shouldInterruptJavaScript() {
- changed = true;
- return false;
- }
-private:
- void javaScriptConsoleMessage(const QString& message, int lineNumber,
- const QString& sourceID) {
- changed = true;
- if (scriptMode) {
- err << message << endl;
- } else {
- err << sourceID << ":" << lineNumber << " " << message << endl;
- }
- sawJSError = true;
- }
- void javaScriptAlert(QWebFrame* /*frame*/, const QString& msg) {
- changed = true;
- err << "ALERT: " << msg << endl;
- }
- bool javaScriptPrompt(QWebFrame*, const QString&, const QString&, QString*){
- changed = true;
- return false;
- }
- void renderToFile(const QString& filename);
- void printToFile(const QString& filename);
- // overload because default impl was causing a crash
- QString userAgentForUrl(const QUrl&) const {
- return QString();
- }
- QMap<QString, QString> parseArguments(const QStringList& args);
-};
-
-#endif
diff --git a/apps/files_odfviewer/src/webodf/programs/qtjsruntime/qtjsruntime.cpp b/apps/files_odfviewer/src/webodf/programs/qtjsruntime/qtjsruntime.cpp
deleted file mode 100644
index 35d04da1467..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/qtjsruntime/qtjsruntime.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * Small executable that loads a javascript or html page from local a URI.
- * If the URI ends in .js it will be run in QtScript engine, otherwise, it will
- * be assumed to be a webpage that will be opened in
- */
-#include "pagerunner.h"
-#include <QtGui/QApplication>
-int
-main(int argc, char** argv) {
- if (argc < 2) {
- QTextStream err(stderr);
- err << "Usage: " << argv[0] << " [--export-pdf pdffile] "
- "[--export-png pngfile] html/javascripfile [arguments]\n";
- return 1;
- }
- QApplication app(argc, argv);
- app.setApplicationName(argv[0]);
- PageRunner p(QCoreApplication::arguments().mid(1));
- return app.exec();
-}
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/CMakeLists.txt b/apps/files_odfviewer/src/webodf/programs/touchui/CMakeLists.txt
deleted file mode 100644
index 0a18076273b..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/CMakeLists.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-COPY_FILES(TOUCHUIDEPS ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR} ${HTML5UIFILES})
-COPY_FILES(TOUCHUIDEPS ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR} index.html scripts.js welcome.odt)
-COPY_FILES(TOUCHUIDEPS ${CMAKE_SOURCE_DIR}/webodf
- ${CMAKE_CURRENT_BINARY_DIR} webodf.css ${LIBJSFILES})
-add_custom_target(touchuiDepencencies ALL DEPENDS ${TOUCHUIDEPS})
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/ZoomIn.png b/apps/files_odfviewer/src/webodf/programs/touchui/ZoomIn.png
deleted file mode 100644
index 6041c6ff937..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/ZoomIn.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/ZoomOut.png b/apps/files_odfviewer/src/webodf/programs/touchui/ZoomOut.png
deleted file mode 100644
index 733a4e1adab..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/ZoomOut.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/app/app.js b/apps/files_odfviewer/src/webodf/programs/touchui/app/app.js
deleted file mode 100644
index 60da480a5f4..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/app/app.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*global Ext, invokeString, document*/
-/**
- * When the application has been initialized, this function is called, if
- * it has been set. By default, it will start scanning the files in the
- * files sytem. It can be overridden by e.g. PhoneGap to wait until the device
- * is ready.
- */
-var onApplicationLaunch = function (app) {
- "use strict";
- app.startScanningDirectories();
-};
-Ext.application({
- name : 'WebODFApp',
- models: ['FileSystem'],
- views: ['Viewport', 'FilesList', 'FileDetail', 'OdfView'],
- controllers: ['Files'],
- stores: ['FileStore'],
- launch: function () {
- 'use strict';
- var app = this;
- Ext.create('WebODFApp.view.Viewport');
- app.openUrl = function (url) {
- var proxy = Ext.getStore("FileStore").getProxy();
- proxy.getRecord(url, function (record) {
- var controller;
- if (!record) {
- alert("Cannot open " + url);
- } else {
- controller = app.getController('Files');
- controller.show(null, null, null, record);
- }
- });
- };
- this.startScanningDirectories = function () {
- var proxy = Ext.getStore("FileStore").getProxy();
- proxy.startScanningDirectories();
- };
- onApplicationLaunch(this);
- }
-});
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/app/controller/Files.js b/apps/files_odfviewer/src/webodf/programs/touchui/app/controller/Files.js
deleted file mode 100644
index 22e06f85b62..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/app/controller/Files.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/*global Ext, runtime*/
-Ext.define('WebODFApp.controller.Files', {
- extend: 'Ext.app.Controller',
-
- config: {
- refs: {
- mainView: 'mainview',
- filesList: 'fileslist list',
- fileDetail: 'filedetail',
- openButton: '#openButton',
- odfView: 'odfview',
- title: 'titlebar'
- },
- control: {
- mainView: {
- pop: 'pop',
- push: 'push',
- back: 'back'
- },
- filesList: {
- itemtap: 'show'
- },
- openButton: {
- tap: 'open'
- }
- }
- },
- back: function () {
- "use strict";
- this.odfView.hideCanvas();
- },
- push: function (view, item) {
- "use strict";
- if (item.xtype === "filedetail") {
- this.getOpenButton().show();
- } else {
- this.getOpenButton().hide();
- }
- },
- pop: function (view, item) {
- "use strict";
- if (item.xtype === "odfview") { // going to filedetail
- this.getOpenButton().show();
- } else {
- this.getOpenButton().hide();
- }
- this.getFilesList().deselectAll();
- },
- show: function (list, index, target, record, e) {
- "use strict";
- // set the record in the details view and the file view
- // this way, document starts loading in the background
- var c = this;
- if (!this.fileDetail) {
- this.fileDetail = Ext.create('WebODFApp.view.FileDetail');
- }
- if (!this.odfView) {
- this.odfView = Ext.create('WebODFApp.view.OdfView');
- this.odfView.addCanvasListener(this.fileDetail.canvasListener);
- }
- this.odfView.hideCanvas();
- this.fileDetail.odfView = this.odfView;
- this.fileDetail.setRecord(record);
- this.getMainView().push(this.fileDetail);
- runtime.setTimeout(function () {
- c.odfView.setRecord(record);
- }, 300);
- },
- open: function (options) {
- "use strict";
- var c = this;
- if (!this.odfView) {
- this.odfView = Ext.create('WebODFApp.view.OdfView');
- }
- this.odfView.hideCanvas();
- this.odfView.setRecord(this.fileDetail.getRecord());
- this.getMainView().push(this.odfView);
- runtime.setTimeout(function () {
- c.odfView.showCanvas();
- }, 300);
- }
-});
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/app/model/FileSystem.js b/apps/files_odfviewer/src/webodf/programs/touchui/app/model/FileSystem.js
deleted file mode 100644
index 3346008f1ac..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/app/model/FileSystem.js
+++ /dev/null
@@ -1,265 +0,0 @@
-/*global Ext, console, app, window, LocalFileSystem, JSON, FileReader, runtime*/
-Ext.define("WebODFApp.model.FileSystemProxy", (function () {
- "use strict";
- var self = this,
- scanner;
- function Scanner(proxy) {
- var todo = [],
- done = false,
- fileSystems,
- files,
- cachedList = [],
- dirs = {},
- lastUpdate = 0,
- lastUpdateTime = new Date();
-
- function getFileId(fullPath) {
- var i;
- if (!files) {
- return -1;
- }
- for (i = 0; i < files.length; i += 1) {
- if (files[i].get('fullPath') === fullPath) {
- return i;
- }
- }
- return -1;
- }
- this.getFileId = getFileId;
- function addFileEntry(entry, callback) {
- function fail() {
- callback(-1);
- }
- var id = getFileId(entry.fullPath);
- if (id !== -1) {
- return callback(id);
- }
- entry.file(function (file) {
- var id = files.length;
- files.push(Ext.create('WebODFApp.model.FileSystem', {
- id: id,
- fileName: entry.name,
- fullPath: entry.fullPath,
- size: file.size
- }));
- callback(id);
- }, fail);
- }
- function parseCachedFileList(pos, callback) {
- if (pos === cachedList.length) {
- return callback();
- }
- window.resolveLocalFileSystemURI(cachedList[pos], function (entry) {
- addFileEntry(entry, function () {
- parseCachedFileList(pos + 1, callback);
- });
- }, function () {
- parseCachedFileList(pos + 1, callback);
- });
- }
- function readCachedFileList(callback) {
- window.resolveLocalFileSystemURI("cachedODFList.json",
- function (fileentry) {
- var reader = new FileReader();
- reader.onloadend = function (evt) {
- cachedList = [];
- try {
- cachedList = JSON.parse(evt.target.result);
- } catch (e) {
- alert(e);
- }
- parseCachedFileList(0, callback);
- };
- reader.readAsText(fileentry);
- }, function () {
- callback();
- });
- }
- function writeCachedFileList() {
- var i,
- l = files.length;
- cachedList.length = files.length;
- for (i = 0; i < l; i += 1) {
- cachedList[i] = files[i].get('fullPath');
- }
- window.resolveLocalFileSystemURI("cachedODFList.json",
- function (fileentry) {
- fileentry.createWriter(function (writer) {
- writer.write(JSON.stringify(cachedList));
- }, function (e) {
- runtime.log(JSON.stringify(e));
- });
- }, function (e) {
- runtime.log(JSON.stringify(e));
- });
- }
- function filter(name) {
- var suffix = name.substr(name.length - 4);
- return suffix === ".odt" || suffix === ".odp" || suffix === ".ods";
- }
- function errorCallback(err) {
- console.log("FILE READ ERROR " + err + " " + todo.length);
- done = true;
- }
- function load(entry, callback) {
- function fail() {
- callback(-1);
- }
- if (entry.isDirectory) {
- entry.createReader().readEntries(function (entries) {
- var i = 0;
- for (i = 0; i < entries.length; i += 1) {
- entry = entries[i];
- if (entry.isDirectory
- && !dirs.hasOwnProperty(entry.fullPath)) {
- todo.push(entry);
- dirs[entry.fullPath] = entry;
- } else if (filter(entry.name)) {
- todo.push(entry);
- }
- }
- callback(-1);
- }, fail);
- } else if (entry.isFile) {
- addFileEntry(entry, callback);
- } else {
- fail();
- }
- }
- function addFileSystem(fileSystem) {
- var dir = fileSystems[fileSystem.name] = {};
- todo.push(fileSystem.root);
- function callback() {
- var now = new Date(),
- // a limit is needed, otherwise the # of files too large to
- // be handled by sencha touch
- done = todo.length === 0 || files.length > 2000,
- store = Ext.getStore('FileStore');
- if (done || lastUpdate === 0 || (files.length - lastUpdate > 0
- && now - lastUpdateTime > files.length * 100)) {
- store.load();
- lastUpdate = files.length;
- lastUpdateTime = now;
- }
- if (done) {
- writeCachedFileList();
- } else {
- load(todo.shift(), callback);
- }
- }
- load(todo.shift(), callback);
- }
- function addFileSystems() {
- window.requestFileSystem(LocalFileSystem.PERSISTENT, 0,
- addFileSystem, errorCallback);
- window.requestFileSystem(LocalFileSystem.TEMPORARY, 0,
- addFileSystem, function () {});
- }
- this.scan = function () {
- if (fileSystems !== undefined) {
- return;
- }
- fileSystems = {};
- readCachedFileList(function () {
- addFileSystems();
- });
- };
- this.load = load;
- this.files = files = [];
- }
- function finishOperation(proxy, operation, callback, scope) {
- if (operation) {
- var i = 0,
- recs = operation.getRecords(),
- len = recs.length;
-
- for (i; i < len; i += 1) {
- recs[i].commit();
- }
- operation.setSuccessful();
-
- Ext.callback(callback, scope || proxy, [operation]);
- }
- }
- return {
- extend: "Ext.data.proxy.Proxy",
- xtype: 'filesystemproxy',
- constructor: function (config) {
- this.initConfig(config);
- scanner = new Scanner(this);
- this.startScanningDirectories = function () {
- scanner.scan();
- };
- this.getRecord = function (url, callback) {
- var id = scanner.getFileId(url);
- if (id !== -1) {
- return callback(scanner.files[id]);
- }
- window.resolveLocalFileSystemURI(url,
- function (fileentry) {
- scanner.load(fileentry, function (id) {
- Ext.getStore('FileStore').load();
- callback(scanner.files[id]);
- });
- },
- function (evt) {
- callback(null);
- });
- };
- },
-
- create: function (operation, callback, scope) {
- finishOperation(this, operation, callback, scope);
- },
-
- read: function (operation, callback, scope) {
- var me = this,
- records = scanner.files;
- if (!records) {
- return;
- }
- // return model instances in a resultset
- operation.setResultSet(new Ext.data.ResultSet({
- //total: records.length,
- count: records.length,
- records: records,
- success: true
- }));
-
- // announce success
- operation.setSuccessful();
- operation.setCompleted();
-
- // finish with callback
- Ext.callback(callback, scope || me, [operation]);
- },
-
- update: function (operation, callback, scope) {
- finishOperation(this, operation, callback, scope);
- },
-
- destroy: function (operation, callback, scope) {
- finishOperation(this, operation, callback, scope);
- }
- };
-}()));
-
-Ext.define("WebODFApp.model.FileSystem", {
- extend: 'Ext.data.Model',
- config: {
- idProperty: 'id',
- fields: [ {
- name: "id",
- type: "auto"
- }, {
- name: "fullPath",
- type: "string"
- }, {
- name: "fileName",
- type: "string"
- }, {
- name: "size",
- type: "int"
- } ]
- }
-});
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/app/store/FileStore.js b/apps/files_odfviewer/src/webodf/programs/touchui/app/store/FileStore.js
deleted file mode 100644
index d2932c89893..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/app/store/FileStore.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*global Ext*/
-Ext.define('WebODFApp.store.FileStore', {
- extend: 'Ext.data.Store',
- config: {
- storeId: 'FileStore',
- model: 'WebODFApp.model.FileSystem',
- autoLoad: true,
- grouper: {
- groupFn: function (record) {
- "use strict";
- return record.get('fileName')[0].toUpperCase();
- }
- },
- proxy: {
- xtype: 'filesystemproxy'
- },
- sorters: function (a, b) {
- "use strict";
- a = a.get('fileName').toUpperCase();
- b = b.get('fileName').toUpperCase();
- if (a > b) {
- return 1;
- }
- if (a < b) {
- return -1;
- }
- return 0;
- }
- }
-});
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/app/views/FileDetail.js b/apps/files_odfviewer/src/webodf/programs/touchui/app/views/FileDetail.js
deleted file mode 100644
index b79876c6dec..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/app/views/FileDetail.js
+++ /dev/null
@@ -1,122 +0,0 @@
-/*global Ext, app, runtime, xmldom, odf*/
-runtime.loadClass("xmldom.XPath");
-runtime.loadClass("odf.Style2CSS");
-Ext.define('WebODFApp.view.FileDetail', (function () {
- "use strict";
- var panel,
- style2CSS = new odf.Style2CSS(),
- xpath = new xmldom.XPath(),
- fileDetail,
- title,
- image,
- list,
- emptyImageUrl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAAXNSR0IArs4c6QAAAAtJREFUCB1jYGAAAAADAAFPSAqvAAAAAElFTkSuQmCC";
- function getTitle(body) {
- var ps,
- title;
- ps = xpath.getODFElementsWithXPath(body,
- ".//text:h", style2CSS.namespaceResolver);
- title = "";
- if (ps && ps.length) {
- title = ps[0].nodeValue;
- } else {
- ps = xpath.getODFElementsWithXPath(body,
- ".//text:p", style2CSS.namespaceResolver);
- if (ps && ps.length) {
- title = ps[0].nodeValue;
- }
- }
- return title;
- }
- function metaToJSON(body, meta) {
- var json = [],
- title = body && getTitle(body),
- e = meta && meta.firstChild,
- name;
- if (title) {
- json.push({name: "title", value: title});
- }
- while (e) {
- if (e.nodeType === 1 && e.textContent) {
- if (e.localName === "user-defined") {
- name = e.getAttributeNS(
- "urn:oasis:names:tc:opendocument:xmlns:meta:1.0",
- "name"
- );
- } else {
- name = e.localName;
- }
- json.push({
- name: name,
- value: e.textContent
- });
- }
- e = e.nextSibling;
- }
- return json;
- }
- return {
- extend: 'Ext.Panel',
- xtype: 'filedetail',
- config: {
- title: 'File details',
- layout: 'vbox',
- items: [{
- id: "title",
- dock: 'top',
- xtype: 'toolbar'
- }, {
- id: 'details',
- xtype: 'container',
- layout: 'hbox',
- flex: 1,
- items: [{
- id: 'thumbnail',
- xtype: 'image',
- width: 256,
- maxWidth: "50%"
- }, {
- id: 'metalist',
- xtype: 'list',
- store: {
- fields: ["name", "value"],
- data: []
- },
- itemTpl: "{name}: {value}",
- flex: 1
- }]
- }],
- listeners: {
- initialize: function () {
- fileDetail = this.query("#details")[0];
- title = this.query("#title")[0];
- image = fileDetail.query('#thumbnail')[0];
- list = fileDetail.query('#metalist')[0];
- }
- }
- },
- updateRecord: function (record) {
- if (record) {
- fileDetail.setMasked({
- xtype: 'loadmask',
- message: 'Loading...'
- });
- title.setTitle(record.get('fileName'));
- }
- },
- canvasListener: function (odfcanvas) {
- var view = this,
- odfcontainer = odfcanvas.odfContainer(),
- part = odfcontainer.getPart("Thumbnails/thumbnail.png"),
- metajson = [];
- metajson = metaToJSON(odfcontainer.rootElement.body,
- odfcontainer.rootElement.meta);
- part.onstatereadychange = function (part) {
- image.setSrc(part.url || emptyImageUrl);
- };
- part.load();
- list.getStore().setData(metajson);
- fileDetail.unmask();
- }
- };
-}()));
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/app/views/FilesList.js b/apps/files_odfviewer/src/webodf/programs/touchui/app/views/FilesList.js
deleted file mode 100644
index 1a82a2e8b64..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/app/views/FilesList.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*global Ext, app, filestore */
-Ext.define("WebODFApp.view.FilesList", {
- extend: "Ext.Panel",
- xtype: 'fileslist',
- config: {
- layout: 'fit',
- items: [{
- xtype: 'list',
- store: 'FileStore',
-/*
- store: {
- fields: ['fileName', 'fullPath'],
- grouper: {
- groupFn: function (record) {
- "use strict";
- return record.get('fileName')[0].toUpperCase();
- }
- },
- data: [
- {fileName: 'Cowper', fullPath: '-'},
- {fileName: 'Everett', fullPath: '-'},
- {fileName: 'University', fullPath: '-'},
- {fileName: 'Forest', fullPath: '-'}
- ]
- },
-*/
-/*
- listeners: {
- 'itemtap': function (view, number, item) {
- "use strict";
- var record = view.getStore().getAt(number);
- if (record) {
- Ext.app.dispatch({
- controller: 'Files', //app.controllers.files,
- action: 'show',
- id: record.getId()
- });
- }
- }
- },
-*/
- itemTpl: '{fileName}<br/><span style="font-size:x-small">{fullPath}</span>',
- grouped: true,
- indexBar: true
- }]
- }
-});
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/app/views/OdfView.js b/apps/files_odfviewer/src/webodf/programs/touchui/app/views/OdfView.js
deleted file mode 100644
index 2098304d328..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/app/views/OdfView.js
+++ /dev/null
@@ -1,170 +0,0 @@
-/*global Ext, runtime, core, odf, window, FileReader, PhoneGap, gui*/
-runtime.loadClass('odf.OdfCanvas');
-
-Ext.define('WebODFApp.view.OdfView', (function () {
- "use strict";
- var currentPath,
- overridePath,
- overridePathPrefix = "odf:",
- data,
- globalreadfunction,
- globalfilesizefunction,
- odfcanvas,
- zoom = 1,
- dom,
- canvasListeners = [],
- view;
- function signalCanvasChange() {
- var i;
- for (i = 0; i < canvasListeners.length; i += 1) {
- canvasListeners[i](odfcanvas);
- }
- }
- function initCanvas() {
- var cmp;
- if (globalreadfunction === undefined) {
- // overload the global read function with one that only reads
- // the data from this canvas
- globalreadfunction = runtime.read;
- globalfilesizefunction = runtime.getFileSize;
- runtime.read = function (path, offset, length, callback) {
- if (path !== overridePath) {
- globalreadfunction.apply(runtime,
- [path, offset, length, callback]);
- } else {
- callback(null, data.slice(offset, offset + length));
- }
- };
- runtime.getFileSize = function (path, callback) {
- if (path !== overridePath) {
- globalfilesizefunction.apply(runtime, [path, callback]);
- } else {
- callback(data.length);
- }
- };
- dom = Ext.getCmp('webodf').element.dom;
- odfcanvas = new odf.OdfCanvas(dom);
- odfcanvas.addListener("statereadychange", signalCanvasChange);
- }
- }
- function load(path) {
- if (path === currentPath) {
- return;
- }
- currentPath = path;
- overridePath = overridePathPrefix + path;
- data = null;
- window.resolveLocalFileSystemURI("file://" + path, function (file) {
- var reader = new FileReader();
- // so far phonegap is very limited, ideally it would implement
- // readAsArrayBuffer and slice() on the File object
- // right now, it has a dummy function, hence breaking simple
- // detection of which features are implemented
- if (reader.readAsArrayBuffer
- && (typeof PhoneGap === "undefined")) {
- reader.onloadend = function (evt) {
- data = evt.target.result;
- odfcanvas.load(overridePath);
- };
- reader.readAsArrayBuffer(file);
- } else {
- reader.onloadend = function (evt) {
- var b = new core.Base64();
- data = evt.target.result;
- data = data.substr(data.indexOf(",") + 1);
- data = b.convertBase64ToUTF8Array(data);
- odfcanvas.load(overridePath);
- };
- reader.readAsDataURL(file);
- }
- }, function () {
- runtime.log("COULD NOT RESOLVE " + path);
- });
- }
- function tapHandler(button) {
- var id = button.getId(),
- dom = Ext.getCmp('odfcontainer').element.dom,
- width = dom.offsetWidth,
- height = dom.offsetHeight;
- if (id === 'zoomin') {
- odfcanvas.setZoomLevel(odfcanvas.getZoomLevel() * 1.25);
- } else if (id === 'zoomout') {
- odfcanvas.setZoomLevel(odfcanvas.getZoomLevel() * 0.8);
- } else if (id === 'fit-best') {
- odfcanvas.fitToContainingElement(width, height);
- } else if (id === 'fit-width') {
- odfcanvas.fitToWidth(width);
- } else if (id === 'fit-height') {
- odfcanvas.fitToHeight(height);
- } else if (id === 'next') {
- odfcanvas.showNextPage();
- } else if (id === 'previous') {
- odfcanvas.showPreviousPage();
- }
- }
- return {
- extend: 'Ext.Container',
- xtype: 'odfview',
- id: 'odfcontainer',
- config: {
- scrollable: 'both',
- items: [{
- id: 'webodf'
- }, {
- xtype : 'toolbar',
- docked: 'bottom',
- scrollable: false,
- defaults: {
- iconMask: false,
- ui : 'plain',
- handler: tapHandler
- },
- items: [
- { id: 'previous', icon: 'go-previous.png'},
- { id: 'next', icon: 'go-next.png' },
- { id: 'zoomin', icon: 'ZoomIn.png'},
- { id: 'zoomout', icon: 'ZoomOut.png' },
- { id: 'fit-best', icon: 'zoom-fit-best.png' },
- { id: 'fit-height', icon: 'zoom-fit-height.png' },
- { id: 'fit-width', icon: 'zoom-fit-width.png' }
- ],
- layout: {
- pack : 'center',
- align: 'center'
- }
- }],
- listeners: {
- painted: function () {
- // make sure the viewport is the right size
- odfcanvas.setZoomLevel(odfcanvas.getZoomLevel());
- }
- }
- },
- updateRecord: function (record) {
- view = this;
- initCanvas();
- load(record.get('fullPath'));
- },
- addCanvasListener: function (listener) {
- canvasListeners.push(listener);
- },
- hideCanvas: function () {
- if (dom) {
- dom.style.display = "none";
- }
- if (view) {
- view.setMasked({
- xtype: 'loadmask',
- message: 'Loading...'
- });
- }
- },
- showCanvas: function () {
- if (view) {
- view.unmask();
- }
- dom.style.display = "inline-block";
- odfcanvas.setZoomLevel(odfcanvas.getZoomLevel());
- }
- };
-}()));
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/app/views/Viewport.js b/apps/files_odfviewer/src/webodf/programs/touchui/app/views/Viewport.js
deleted file mode 100644
index 3023ddc0174..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/app/views/Viewport.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/*global Ext, app*/
-Ext.define("WebODFApp.view.Viewport", {
- extend: "Ext.navigation.View",
- xtype: "mainview",
- requires: [
- "WebODFApp.view.FilesList",
- "WebODFApp.view.FileDetail"
- ],
- config: {
- fullscreen: true,
- autoDestroy: false,
- navigationBar: {
- items: [{
- xtype: 'button',
- id: 'openButton',
- text: 'Open',
- align: 'right',
- hidden: true
- }]
- },
- items: [
- { title: 'Files', xtype: 'fileslist' }
- ]
- }
-/*
- initComponent: function () {
-
- //put instances of cards into app.views namespace
- Ext.apply(app.views, {
- filesList: new app.views.FilesList(),
- fileDetail: new app.views.FileDetail(),
- odfView: new app.views.OdfView()
- });
- //put instances of cards into viewport
- Ext.apply(this, {
- items: [
- app.views.filesList,
- app.views.fileDetail,
- app.views.odfView
- ]
- });
- app.views.Viewport.superclass.initComponent.apply(this, arguments);
- },
- listeners: {
- afterlayout: function () {
- if (app.stores.filesystem.initialUrl) {
- app.openUrl(app.stores.filesystem.initialUrl);
- app.stores.filesystem.initialUrl = undefined;
- }
- }
- }
- };
-*/
-});
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/go-next.png b/apps/files_odfviewer/src/webodf/programs/touchui/go-next.png
deleted file mode 100644
index c4da8a9a3d7..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/go-next.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/go-previous.png b/apps/files_odfviewer/src/webodf/programs/touchui/go-previous.png
deleted file mode 100644
index 68ed8a13ebd..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/go-previous.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/index.html b/apps/files_odfviewer/src/webodf/programs/touchui/index.html
deleted file mode 100644
index 49b8a31f443..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/index.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>WebODF</title>
- <link href="sencha-touch.css" rel="stylesheet" type="text/css" />
- <link href="webodf.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="sencha-touch.js"></script>
- <script type="text/javascript" src="lib/runtime.js"></script>
- <script type="text/javascript" src="app/app.js"></script>
- <script type="text/javascript" src="scripts.js"></script>
- <script type="text/javascript" src="app/controller/Files.js"></script>
- <script type="text/javascript" src="app/model/FileSystem.js"></script>
- <script type="text/javascript" src="app/store/FileStore.js"></script>
- <script type="text/javascript" src="app/views/FileDetail.js"></script>
- <script type="text/javascript" src="app/views/FilesList.js"></script>
- <script type="text/javascript" src="app/views/OdfView.js"></script>
- <script type="text/javascript" src="app/views/Viewport.js"></script>
- </head>
- <body>
- </body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/scripts.js b/apps/files_odfviewer/src/webodf/programs/touchui/scripts.js
deleted file mode 100644
index 2683bc83b4a..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/scripts.js
+++ /dev/null
@@ -1,130 +0,0 @@
-/*global alert, app, window, runtime*/
-var LocalFileSystem = {
- PERSISTENT: 0,
- TEMPORARY: 1
-};
-function FileWriter(fullPath) {
- "use strict";
- this.write = function (data) {
- data = runtime.byteArrayFromString(data, "utf8");
- runtime.writeFile(fullPath, data, function () {});
- };
-}
-function FileEntry(name, fullPath) {
- "use strict";
- this.isFile = true;
- this.isDirectory = false;
- this.name = name;
- this.fullPath = fullPath;
- this.file = function (onsuccess, onerror) {
- function File(fullPath) {
- this.name = name;
- this.fullPath = fullPath;
- this.type = "";
- this.size = -1;
- this.lastModifiedDate = -1;
- }
- var file = new File(fullPath);
- try {
- onsuccess(file);
- } catch (e) {
- alert("Error on determining file properties: " + e);
- onerror(e);
- }
- };
- this.createWriter = function (onsuccess, onerror) {
- onsuccess(new FileWriter(fullPath));
- };
-}
-function FileReader() {
- "use strict";
- var fr = this;
- this.readAsArrayBuffer = function (file) {
- var path = file.fullPath;
- if (path.substr(0, 7) === "file://") {
- path = path.substr(7);
- }
- runtime.readFile(path, 'binary', function (error, data) {
- fr.onloadend({target: {result: data}});
- });
- };
- this.readAsText = function (file) {
- var path = file.fullPath;
- if (path.substr(0, 7) === "file://") {
- path = path.substr(7);
- }
- runtime.readFile(path, 'utf8', function (error, data) {
- fr.onloadend({target: {result: data}});
- });
- };
-}
-var DirectoryReader;
-function DirectoryEntry(name, fullPath) {
- "use strict";
- this.isFile = false;
- this.isDirectory = true;
- this.name = name;
- this.fullPath = fullPath;
- this.createReader = function () {
- var reader = new DirectoryReader(fullPath);
- return reader;
- };
-}
-function DirectoryReader(fullPath) {
- "use strict";
- this.readEntries = function (onsuccess, onerror) {
- window.setTimeout(function () {
- var entries = [];
- entries[entries.length] = new FileEntry("welcome.odt",
- "welcome.odt");
- entries[entries.length] = new FileEntry("Traktatenblad.odt",
- "Traktatenblad.odt");
- entries[entries.length] = new FileEntry("DanskTest01.odt",
- "DanskTest01.odt");
- entries[entries.length] = new FileEntry("plugfest-gouda.odp",
- "plugfest-gouda.odp");
- entries[entries.length] = new FileEntry("OpenDocument-v1.2.odt",
- "OpenDocument-v1.2.odt");
- entries[entries.length] = new FileEntry("OpenDocument-v1.2-part1.odt",
- "OpenDocument-v1.2-part1.odt");
- entries[entries.length] = new FileEntry("OpenDocument-v1.2-part2.odt",
- "OpenDocument-v1.2-part2.odt");
- try {
- onsuccess(entries);
- } catch (e) {
- onerror(e);
- }
- }, 1);
- };
-}
-window.resolveLocalFileSystemURI = function (path, onsuccess, onerror) {
- "use strict";
- var p = path.lastIndexOf("/"),
- name = (p === -1) ? path : path.substr(p + 1);
- onsuccess(new FileEntry(name, path));
-};
-window.requestFileSystem = function (filesystem, id, onsuccess, onerror) {
- "use strict";
- var dirs = [], shared, subfolder, path;
- try {
- if (filesystem === LocalFileSystem.PERSISTENT) {
- path = "";
- onsuccess({
- name: "root",
- root: new DirectoryEntry("root", path)
- });
- } else {
- onerror("not defined");
- }
- } catch (e) {
- onerror(e);
- }
-};
-var device = {};
-/*
- * override launch function to quickly open a file for testing
-onApplicationLaunch = function (app) {
- "use strict";
- app.openUrl("plugfest-gouda.odp");
-};
-*/
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/sencha-touch.css b/apps/files_odfviewer/src/webodf/programs/touchui/sencha-touch.css
deleted file mode 100644
index 7227e268bea..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/sencha-touch.css
+++ /dev/null
@@ -1 +0,0 @@
-body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}li{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:""}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:text-top}sub{vertical-align:text-bottom}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit}*:focus{outline:none}html,body{font-family:"Helvetica Neue", HelveticaNeue, "Helvetica-Neue", Helvetica, "BBAlpha Sans", sans-serif;font-weight:normal;position:relative;-webkit-text-size-adjust:none}body.x-desktop{overflow:hidden}*,*:after,*:before{-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-user-select:none;-webkit-touch-callout:none;-webkit-user-drag:none}.x-ios.x-tablet .x-landscape *{-webkit-text-stroke:1px transparent}body{font-size:104%}body.x-ios{-webkit-backface-visibility:hidden}body.x-android.x-phone{font-size:116%}body.x-android.x-phone.x-silk{font-size:130%}body.x-ios.x-phone{font-size:114%}body.x-desktop{font-size:114%}input,textarea{-webkit-user-select:text}.x-hidden-visibility{visibility:hidden !important}.x-hidden-display,.x-field-hidden{display:none !important}.x-hidden-offsets{position:absolute !important;left:-10000em;top:-10000em;visibility:hidden}.x-fullscreen{position:absolute !important}.x-desktop .x-body-stretcher{margin-bottom:0px}.x-mask{position:absolute;top:0;left:0;bottom:0;right:0;height:100%;z-index:10;display:-webkit-box;display:box;-webkit-box-align:center;box-align:center;-webkit-box-pack:center;box-pack:center;background:rgba(0, 0, 0, 0.3) center center no-repeat}.x-mask.x-mask-gray{background-color:rgba(0, 0, 0, 0.5)}.x-mask.x-mask-transparent{background-color:transparent}.x-mask .x-mask-inner{background:rgba(0, 0, 0, 0.25);color:#fff;text-align:center;padding:.4em;font-size:.95em;font-weight:bold;-webkit-border-radius:0.5em;border-radius:0.5em}.x-mask .x-loading-spinner-outer{display:-webkit-box;display:box;-webkit-box-orient:vertical;box-orient:vertical;-webkit-box-align:center;box-align:center;-webkit-box-pack:center;box-pack:center;width:100%;min-width:8.5em;height:8.5em}.x-mask.x-indicator-hidden .x-loading-spinner-outer{display:none}.x-mask .x-mask-message{text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0;-webkit-box-flex:0 !important;max-width:13em;min-width:8.5em}.x-draggable{z-index:1}.x-dragging{opacity:0.7}.x-panel-list{background-color:#bacfe8}.x-html{-webkit-user-select:auto;-webkit-touch-callout:inherit;line-height:1.5;color:#333;font-size:.8em;padding:1.2em}.x-html body{line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#333333;font-size:75%}.x-html h1,.x-html h2,.x-html h3,.x-html h4,.x-html h5,.x-html h6{font-weight:normal;color:#222222}.x-html h1 img,.x-html h2 img,.x-html h3 img,.x-html h4 img,.x-html h5 img,.x-html h6 img{margin:0}.x-html h1{font-size:3em;line-height:1;margin-bottom:0.50em}.x-html h2{font-size:2em;margin-bottom:0.75em}.x-html h3{font-size:1.5em;line-height:1;margin-bottom:1.00em}.x-html h4{font-size:1.2em;line-height:1.25;margin-bottom:1.25em}.x-html h5{font-size:1em;font-weight:bold;margin-bottom:1.50em}.x-html h6{font-size:1em;font-weight:bold}.x-html p{margin:0 0 1.5em}.x-html p .left{display:inline;float:left;margin:1.5em 1.5em 1.5em 0;padding:0}.x-html p .right{display:inline;float:right;margin:1.5em 0 1.5em 1.5em;padding:0}.x-html a{text-decoration:underline;color:#0066cc}.x-html a:visited{color:#004c99}.x-html a:focus{color:#0099ff}.x-html a:hover{color:#0099ff}.x-html a:active{color:#bf00ff}.x-html blockquote{margin:1.5em;color:#666666;font-style:italic}.x-html strong,.x-html dfn{font-weight:bold}.x-html em,.x-html dfn{font-style:italic}.x-html sup,.x-html sub{line-height:0}.x-html abbr,.x-html acronym{border-bottom:1px dotted #666666}.x-html address{margin:0 0 1.5em;font-style:italic}.x-html del{color:#666666}.x-html pre{margin:1.5em 0;white-space:pre}.x-html pre,.x-html code,.x-html tt{font:1em "andale mono", "lucida console", monospace;line-height:1.5}.x-html li ul,.x-html li ol{margin:0}.x-html ul,.x-html ol{margin:0 1.5em 1.5em 0;padding-left:1.5em}.x-html ul{list-style-type:disc}.x-html ol{list-style-type:decimal}.x-html dl{margin:0 0 1.5em 0}.x-html dl dt{font-weight:bold}.x-html dd{margin-left:1.5em}.x-html table{margin-bottom:1.4em;width:100%}.x-html th{font-weight:bold}.x-html thead th{background:#c3d9ff}.x-html th,.x-html td,.x-html caption{padding:4px 10px 4px 5px}.x-html table.striped tr:nth-child(even) td,.x-html table tr.even td{background:#e5ecf9}.x-html tfoot{font-style:italic}.x-html caption{background:#eeeeee}.x-html .quiet{color:#666666}.x-html .loud{color:#111111}.x-html ul li{list-style-type:circle}.x-html ol li{list-style-type:decimal}.x-video{background-color:#000}.x-sortable .x-dragging{opacity:1;z-index:5}.x-layout-card-item{background:#eeeeee}.x-map{background-color:#edeae2}.x-map *{-webkit-box-sizing:content-box;box-sizing:content-box}.x-mask-map{background:transparent !important}.x-img{background-repeat:no-repeat}.x-video{height:100%;width:100%}.x-video > *{height:100%;width:100%;position:absolute}.x-video-ghost{-webkit-background-size:100% auto;background:black url() center center no-repeat}audio{width:100%}.x-panel,.x-msgbox,.x-panel-body{position:relative}.x-panel.x-floating,.x-msgbox.x-floating,.x-form.x-floating{padding:6px;-webkit-border-radius:0.3em;border-radius:0.3em;-webkit-box-shadow:rgba(0, 0, 0, 0.8) 0 0.2em 0.6em;background-color:black;background-image:none}.x-panel.x-floating.x-floating-light,.x-msgbox.x-floating.x-floating-light,.x-form.x-floating.x-floating-light{background-color:#354f6e;background-image:none}.x-panel.x-floating > .x-panel-inner,.x-panel.x-floating .x-scroll-view,.x-panel.x-floating .x-body,.x-msgbox.x-floating > .x-panel-inner,.x-msgbox.x-floating .x-scroll-view,.x-msgbox.x-floating .x-body,.x-form.x-floating > .x-panel-inner,.x-form.x-floating .x-scroll-view,.x-form.x-floating .x-body{background-color:#fff;-webkit-border-radius:0.3em;border-radius:0.3em}.x-anchor{width:1.631em;height:0.7em;position:absolute;left:0;top:0;z-index:1;-webkit-mask:0 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAPCAYAAABut3YUAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAPZJREFUeNpi/PX7LwOFwAyIG6HseiA+Ra5BjBQ6xg+IVwAxJ5T/HYgjgHgTOYYxUeCQUiBeh+QQBih7HVSOLiHDDMSTgTiTgLrpQJwLxH9p5RhOaLT4EakeFF3RQPyF2o6RhkaBGYkheRmIPYH4KbXSjC4QnyTDIch6danhGCcgPgwNGXKBNNQMb0ocEwXE24GYn4FyADJjI76Ej88x7UC8FIjZGKgHQDlxGtRsZmISMMjy+dBQoSXYBC0gv+NyDD80xzgx0AeAqg4fIH6NHk0qQHyMjg6B1WvHYDkNFjIgwS1ALMowMOAjEAeBHINe2Q0U+AUQYACQ10C2QNhRogAAAABJRU5ErkJggg==') no-repeat;-webkit-mask-size:1.631em 0.7em;overflow:hidden;background-color:black;-webkit-transform-origin:0% 0%}.x-anchor.x-anchor-top{margin-left:-0.816em;margin-top:-0.7em}.x-anchor.x-anchor-bottom{-webkit-transform:rotate(180deg);margin-left:0.816em;margin-top:0.6em}.x-anchor.x-anchor-left{-webkit-transform:rotate(270deg);margin-left:-0.7em;margin-top:-0.1em}.x-anchor.x-anchor-right{-webkit-transform:rotate(90deg);margin-left:0.7em;margin-top:0}.x-floating.x-panel-light:after{background-color:#354f6e}.x-button{-webkit-background-clip:padding;background-clip:padding-box;-webkit-border-radius:0.4em;border-radius:0.4em;display:-webkit-box;display:box;-webkit-box-align:center;box-align:center;min-height:1.8em !important;padding:.3em .6em;position:relative;overflow:hidden;-webkit-user-select:none}.x-button,.x-toolbar .x-button{border:1px solid #999999;border-top-color:#a6a6a6;color:black}.x-button.x-button-back:before,.x-button.x-button-forward:before,.x-toolbar .x-button.x-button-back:before,.x-toolbar .x-button.x-button-forward:before{background:#999999}.x-button,.x-button.x-button-back:after,.x-button.x-button-forward:after,.x-toolbar .x-button,.x-toolbar .x-button.x-button-back:after,.x-toolbar .x-button.x-button-forward:after{background-color:#ccc;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #dedede), color-stop(100%, #bababa));background-image:-webkit-linear-gradient(#ffffff,#dedede 2%,#bababa);background-image:linear-gradient(#ffffff,#dedede 2%,#bababa)}.x-button .x-button-icon.x-icon-mask,.x-toolbar .x-button .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-button.x-button-pressing,.x-button.x-button-pressing:after,.x-button.x-button-pressed,.x-button.x-button-pressed:after,.x-button.x-button-active,.x-button.x-button-active:after,.x-toolbar .x-button.x-button-pressing,.x-toolbar .x-button.x-button-pressing:after,.x-toolbar .x-button.x-button-pressed,.x-toolbar .x-button.x-button-pressed:after,.x-toolbar .x-button.x-button-active,.x-toolbar .x-button.x-button-active:after{background-color:#c4c4c4;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ababab), color-stop(10%, #b8b8b8), color-stop(65%, #c4c4c4), color-stop(100%, #c6c6c6));background-image:-webkit-linear-gradient(#ababab,#b8b8b8 10%,#c4c4c4 65%,#c6c6c6);background-image:linear-gradient(#ababab,#b8b8b8 10%,#c4c4c4 65%,#c6c6c6)}.x-button .x-button-icon{width:2.1em;height:2.1em;background-repeat:no-repeat;background-position:center;display:block}.x-button .x-button-icon.x-icon-mask{width:1.3em;height:1.3em;-webkit-mask-size:1.3em}.x-button.x-item-disabled .x-button-label,.x-button.x-item-disabled .x-hasbadge .x-badge,.x-hasbadge .x-button.x-item-disabled .x-badge,.x-button.x-item-disabled .x-button-icon{opacity:.5}.x-button-round,.x-button.x-button-action-round,.x-button.x-button-confirm-round,.x-button.x-button-decline-round{-webkit-border-radius:0.9em;border-radius:0.9em;padding:0.1em 0.9em}.x-iconalign-left,.x-icon-align-right{-webkit-box-orient:horizontal;box-orient:horizontal}.x-iconalign-top,.x-iconalign-bottom{-webkit-box-orient:vertical;box-orient:vertical}.x-iconalign-bottom,.x-iconalign-right{-webkit-box-direction:reverse;box-direction:reverse}.x-iconalign-center{-webkit-box-pack:center;box-pack:center}.x-iconalign-left .x-button-label,.x-iconalign-left .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-left .x-badge{margin-left:0.3em}.x-iconalign-right .x-button-label,.x-iconalign-right .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-right .x-badge{margin-right:0.3em}.x-iconalign-top .x-button-label,.x-iconalign-top .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-top .x-badge{margin-top:0.3em}.x-iconalign-bottom .x-button-label,.x-iconalign-bottom .x-hasbadge .x-badge,.x-hasbadge .x-iconalign-bottom .x-badge{margin-bottom:0.3em}.x-button-label,.x-hasbadge .x-badge{-webkit-box-flex:1;box-flex:1;-webkit-box-align:center;box-align:center;white-space:nowrap;text-overflow:ellipsis;text-align:center;font-weight:bold;line-height:1.2em;display:block;overflow:hidden}.x-toolbar .x-button{margin:0 .2em;padding:.3em .6em}.x-toolbar .x-button .x-button-label,.x-toolbar .x-button .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button .x-badge{font-size:.7em}.x-button-small,.x-button.x-button-action-small,.x-button.x-button-confirm-small,.x-button.x-button-decline-small,.x-toolbar .x-button-small,.x-toolbar .x-button.x-button-action-small,.x-toolbar .x-button.x-button-confirm-small,.x-toolbar .x-button.x-button-decline-small{-webkit-border-radius:0.3em;border-radius:0.3em;padding:.2em .4em;min-height:0}.x-button-small .x-button-label,.x-button.x-button-action-small .x-button-label,.x-button.x-button-confirm-small .x-button-label,.x-button.x-button-decline-small .x-button-label,.x-button-small .x-hasbadge .x-badge,.x-hasbadge .x-button-small .x-badge,.x-button.x-button-action-small .x-hasbadge .x-badge,.x-hasbadge .x-button.x-button-action-small .x-badge,.x-button.x-button-confirm-small .x-hasbadge .x-badge,.x-hasbadge .x-button.x-button-confirm-small .x-badge,.x-button.x-button-decline-small .x-hasbadge .x-badge,.x-hasbadge .x-button.x-button-decline-small .x-badge,.x-toolbar .x-button-small .x-button-label,.x-toolbar .x-button.x-button-action-small .x-button-label,.x-toolbar .x-button.x-button-confirm-small .x-button-label,.x-toolbar .x-button.x-button-decline-small .x-button-label,.x-toolbar .x-button-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button-small .x-badge,.x-toolbar .x-button.x-button-action-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button.x-button-action-small .x-badge,.x-toolbar .x-button.x-button-confirm-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button.x-button-confirm-small .x-badge,.x-toolbar .x-button.x-button-decline-small .x-hasbadge .x-badge,.x-hasbadge .x-toolbar .x-button.x-button-decline-small .x-badge{font-size:.6em}.x-button-small .x-button-icon,.x-button.x-button-action-small .x-button-icon,.x-button.x-button-confirm-small .x-button-icon,.x-button.x-button-decline-small .x-button-icon,.x-toolbar .x-button-small .x-button-icon,.x-toolbar .x-button.x-button-action-small .x-button-icon,.x-toolbar .x-button.x-button-confirm-small .x-button-icon,.x-toolbar .x-button.x-button-decline-small .x-button-icon{width:.75em;height:.75em}.x-button-forward,.x-button-back{position:relative;overflow:visible;height:1.8em;z-index:1}.x-button-forward:before,.x-button-forward:after,.x-button-back:before,.x-button-back:after{content:"";position:absolute;width:0.773em;height:1.8em;top:-0.1em;left:auto;z-index:2;-webkit-mask:0.145em 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAABGCAYAAADb7SQ4AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAiNJREFUeNrEWb9LQlEUvj5BcHoQvMnVKXD1D3CLwqBJbHJsazQaWoSCxgbHJiMIAiNok6AhCDdXVycnJ8EQOgeOYaG+d39998KH+HyP753zzjnfd325xfdSgVeV8B6BScuEV0IRSbxHeCMk/AVFXCA8ScQKSXxPqK0fQBBfE5r/D+Y8VzUT9jb94DPimqRYIYkrhGcpKhhxIqTxrpNcExdlQJTTTnRJnCc8ykhUSOIOoZ71ZFfEZ4S2zgUu+rguxZRHEnPbfKRVsOtUl0RtYpOLTYljIS2Z3nVk2DY9SbNCEt8RDm0rUpe4La1jvXSqmtum72raZI24KuNQIYl/nSGSOJb0Jq61M0pxhjwK9304hUjHGSKILzc5Q5drUzttdYY+I97pDH1FzG0zNFUb04gTG4kzJS5kdYauiZtZnaFr4ooKsCIVaDHxKAQxt1NBnGIVHfGCcEQYh3jGU8KBfMKLiyM+lgzAq/qT0ArVTg+Ei1B9fEPoovV4fcfQd2HedScX39GprwGTNjJn0maTELN6IuSzECLB6T5x2eM66jQgnIeSxa60GnS3uL56tr7b1Ai0JPVwYi6yho2U2lgfKym19VxjMRHzEGbvS9K+RBPzetGVUpf29lZHSl2/DMnLvwh1ZMQrKW3Ic4fvJOZS6ZMQW5hpmpT63DvtlFLfm7bBNruM2C2yXb7y3U6ZpRS5P/4jpUjihRTbCJ3q1eL3GMMfAQYAJmB6SBO619IAAAAASUVORK5CYII=') no-repeat;-webkit-mask-size:0.773em 1.8em;overflow:hidden}.x-button-back,.x-toolbar .x-button-back{margin-left:0.828em;padding-left:.4em}.x-button-back:before,.x-toolbar .x-button-back:before{left:-0.693em}.x-button-back:after,.x-toolbar .x-button-back:after{left:-0.628em}.x-button-forward,.x-toolbar .x-button-forward{margin-right:0.828em;padding-right:.4em}.x-button-forward:before,.x-button-forward:after,.x-toolbar .x-button-forward:before,.x-toolbar .x-button-forward:after{-webkit-mask:-0.145em 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAABGCAYAAADb7SQ4AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAXlJREFUaN7lmTFqAlEQhh8EhFSCYJXW1law9QAewMrWAwQWAmmtbPcGHiCQ1gPYCla2QsDKSsgmQecvFqImu2/fzry/2OLb9mt23vwz47Kvn5MwEFxM8DkLB6HHEIOd0GGIwUpoMcRgyRKDOUsMJizxpzBiiMFR6DPEeZl1GWKwFh4ZYvAmPDDEqmVWVQxmLPG3MGaIVcosVAz2whNDDDZCmyEG7yFlpiEGKUsMEpb4XKXMtMXeiVVb7J1YLcRgW1ZmVuLSxGopLkys1mLwwhL/mVhjie8Sayxx3kp7DPFVYo0tzhNriyEGU5Z40TjxtDE/F6WcDowHBE/msDFNImG0xZQRBAonDCvxhhH2vKZIZ9Ds+7EDfaWFnKZ4xhja5owxdcnYCAQv1p1Gi4sprn08cZbDt6ZYZasXIn5mLFHTjLCvVt1V+4rVt/M+4r3FPaJMbHaBKRKb3pyKxKZXtv/Er4yjZpRL6q042u34tzh4xV9H/FHnqBHKBQeEd6aqqwD6AAAAAElFTkSuQmCC') no-repeat}.x-button-forward:before,.x-toolbar .x-button-forward:before{right:-0.693em}.x-button-forward:after,.x-toolbar .x-button-forward:after{right:-0.628em}.x-button.x-button-plain,.x-toolbar .x-button.x-button-plain{background:none;border:0 none;-webkit-border-radius:none;border-radius:none;min-height:0;text-shadow:none;line-height:auto;height:auto;padding:0.5em}.x-button.x-button-plain > *,.x-toolbar .x-button.x-button-plain > *{overflow:visible}.x-button.x-button-plain .x-button-icon,.x-toolbar .x-button.x-button-plain .x-button-icon{-webkit-mask-size:1.4em;width:1.4em;height:1.4em}.x-button.x-button-plain.x-button-pressing,.x-button.x-button-plain.x-button-pressed,.x-toolbar .x-button.x-button-plain.x-button-pressing,.x-toolbar .x-button.x-button-plain.x-button-pressed{background:none;background-image:-webkit-gradient(radial, 50% 50%, 0, 50% 50%, 24, color-stop(0%, rgba(119,178,248,0.7)), color-stop(100%, rgba(119,178,248,0)));background-image:-webkit-radial-gradient(rgba(119,178,248,0.7),rgba(119,178,248,0) 24px);background-image:radial-gradient(rgba(119,178,248,0.7),rgba(119,178,248,0) 24px)}.x-button.x-button-plain.x-button-pressing .x-button-icon.x-button-mask,.x-button.x-button-plain.x-button-pressed .x-button-icon.x-button-mask,.x-toolbar .x-button.x-button-plain.x-button-pressing .x-button-icon.x-button-mask,.x-toolbar .x-button.x-button-plain.x-button-pressed .x-button-icon.x-button-mask{background-color:#fff;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e6e6e6), color-stop(10%, #f2f2f2), color-stop(65%, #ffffff), color-stop(100%, #ffffff));background-image:-webkit-linear-gradient(#e6e6e6,#f2f2f2 10%,#ffffff 65%,#ffffff);background-image:linear-gradient(#e6e6e6,#f2f2f2 10%,#ffffff 65%,#ffffff)}.x-segmentedbutton .x-button{margin:0;-webkit-border-radius:0;border-radius:0}.x-segmentedbutton .x-button.x-first{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em}.x-segmentedbutton .x-button.x-last{-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-segmentedbutton .x-button:not(:first-child){border-left:0}.x-hasbadge{overflow:visible}.x-hasbadge .x-badge{-webkit-border-radius:1em;border-radius:1em;-webkit-background-clip:padding;background-clip:padding-box;padding:.15em .25em;z-index:2;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0;-webkit-box-shadow:#000 0 .1em .2em;overflow:hidden;color:#fff;border:2px solid #fff;position:absolute;width:auto;min-width:2em;height:2em;line-height:1.2em;font-size:.6em;top:-0.15em;right:0px;max-width:100%;background-color:#990000;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e60000), color-stop(50%, #b30000), color-stop(51%, #990000), color-stop(100%, #800000));background-image:-webkit-linear-gradient(#e60000,#b30000 50%,#990000 51%,#800000);background-image:linear-gradient(#e60000,#b30000 50%,#990000 51%,#800000);display:inline-block}.x-tab .x-button-icon.action,.x-button .x-button-icon.x-icon-mask.action{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFI0lEQVRoBe2YW4hVVRjHZ0yzq6lFEaMlE0PShYRAJIl6iEqKHnqI6WJB0IvdICkfEk0aIyo0KFCph8giCitI7CkoohQL7SoZDaQmXSgKo4uWNf1+zt7DOXvOOXuvvc85bc+cD36ssy/r+77/Xmt9e+3TOzIy0jORbNJEEqvWruBOH/HuCHdHuMOeQOmmdO+ozaA5oxXPunSC2Re4MbgCNiB6vvqbKbx0giNxp9BeBU/BIJqnRecLN2UVrLDj4GIYgscRfSltYSuzYMUdA/0wCI8ieglM5XduK7vgWJhTegGshucRfQHkyj1XpziLNrfmOh2ug1dhMaJn0gbZZDpNpsexQb2y3azfKXCAwns4W5dMd7m2B2ANLCT/x/A/nKknN5mUhWFp1g4Z7vM14jrbBZvgEwi1tAdkDEf3ZrgI0S/RrkP4IdqGpuA+cJo0yw7iyNfJmzAcMrokfjp93HC4XrPYCdzkgPXDPPqvJN7eRh0VrBWqfKMuev6k3Qzr4SP4HWqOFIkZ73iYA/NhLpwPZ4LLS+FZzUp+GtwAA/heS/sGwv+irWnXc9bdTRF20/8eOBWmEKwnCectOrPhSlgF2+Bb+Bl+AxP8B/6FvLn8Td8fYQXMSubgsVZU8Cv4mAeNhC7k+jLYCopzrRURlvZA9P8WLIJJlcI5zi1Ypw+Dr4oqp3EAzlsbLCjfg1PeEUxLtlnXXU4/wQboq8gpl2BHx2l5UuyosuW8I6rQb8Bp1iwRefy4VN6FReaopU3pX7jnhwSO7MmVIiNnJ3L+DtgHCm3ltA0RH4/26rhKk1tdu4kr7yeuHkKgU3rMqI5ncfAQDIKbg14oi1nJv4OvTShthC9LjmTyGB8XwhZw+oQ8+Xbc68C8AOboK6+YYPpfDV+B06YdAkJiuMtzhvrOP1JYafMLpu/Z8CmEJNGOe60fz0J/cjZmWcP0G2+sWZ/aUnCqhFosOq7gyf6uOT888th+Ot0HmxF7MOkgt2AcXQNLkg5rHPv+dffjVvPX6PdeWtf7MJhUssD578ZtEGL6sY4MIfTjeh1zCWZ0Z+DwQXAkapkjtzviPdoPYB+JuJVMNfy7QQkR7MbGPfRaYhi7ruUSjLcbwe1k0tw2vgivwy6C70/ekPE4JK+N+HySWDuz+A5xXOnvlsqD6Lf/QjwBnxNc4a02YwzBeuIdyBosWDDT7RKcn1MRYA+/V8ImAv9Rcb5VP53ufoQ8AB8S0+PMFiwYz5fDzCjCF7SLCbojOm514zZ3HViYLIZVxmD4h8B0rtWtFXkEn4tTv22thPe2SawVeDs8TTz/NqoyhLqDGoC7wervt3lNCxKMY/fIc+BLuJXgn9G20pyuVuA1sJF4vt7GjHx8nZnT7XAXzIXnoK4FCcbLVHAqLW+DWF8v78Aq2EY8v7zGDK2+EmfBI3AtTAPNTU1dCxXs/a6ht+t6bM4FNykvw/0IdYSrDLHu8iyeQ7Cg6mLKQahgd0pbSOJwit/cl6Np6p+BrxGn6hNUp1z3m/tOWAH+DrIgwSTQcBcTFLnOzcRwSjZ6j/vdvQyCxRrSanu0mWvZqp3LjkbBuYTGnSac4CxreCQqJPFD+r/bhq+dtOSyCO7DyWzIcm9avKLXXb+FcskiYjlBfB0lP9KLJp+nv6N7ZL+cp7N9sgg+L6/zMvabcEWrK7iM07CZOXVHuJlPs4y+rNJ74JkyJpczp62N+vWOfpw0uqWzrnXXcGeN53g13REe/0w660x3hDtrPMer+Q9LNCcV91c+jgAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.add,.x-button .x-button-icon.x-icon-mask.add{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAABqUlEQVRoBe2awWnDUBBE843B4NxcQSAFOC4lJeTkoxtJDykgvRhcgCFNJCFgIs+ChEHSJX93YT6ZD4ssmR3NztNFH5Wu6+6iVynlEZpbp+4J3s5OjWm7DRxZuMMCdUB9oyzNmrJe01hEejMtM5exIh6bCI3JbFkDT27EckEDs5DI8iHCWcmy6IowC4ksHyKclSyLrgizkMjyIcJZybLoijALiSwfIpyVLItuOGFso/xiuEvAgJdeK0DqJrHEhtsTTh9ul9y/ChR2KE+Y1ruDt2ccI7d6PszcK+oFFblWELt3Cn6i/8epMW5/W+LKGrUZ/0NwboF5QxuPsfY8dmOxJs41cBOYHCZF2BFeE60i3AQmh0kRdoTXRKsIN4HJYVKEHeE10frvCNvr4RH1HojH3rGHr3hqA7VdkxPKvuKJ3AA4hn7BM3xxA5N71Fdv1gz/tax3P+hFHmsJwM/8wraMadqOh5GuXda76rVqNWb7wgeevQvRRQ1MBCPFiginxEokKsJEMFKsiHBKrESiIkwEI8WKCKfESiQqwkQwUqyIcEqsRKIiTAQjxcoVrP83/9czD9EAAAAASUVORK5CYII=')}.x-tab .x-button-icon.arrow_down,.x-button .x-button-icon.x-icon-mask.arrow_down{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpGRTdGMTE3NDA3MjA2ODExOTJDQUMyNUQwRUE4NjdEQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxQTFBMDFDQ0I5NEYxMURGQUU1RjlGMEFERUNDQTVEMCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyMkRCMDIxMkI5NEUxMURGQUU1RjlGMEFERUNDQTVEMCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjMwRTE0QzVBNDIyMjY4MTFCQ0ZCOTAzOTcwNzcyRkVCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFN0YxMTc0MDcyMDY4MTE5MkNBQzI1RDBFQTg2N0RCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+HfrH/AAAAeVJREFUeNrs2cFHBGEUAPA3zYqIiIhOnTpFRHSKrp26RqeuEV077R/QqWtE166dOkVERHRa9hQRnZalFcv0Hk/W1Mx+38z3vvlm5j3eZW+/9+abne+9KEkSaFPMQMtCwQpWsIIVrGAFK1jBClawgo2ik/4hiqJGwLKuvfpIc5xSkWqYr5hzU1s/mRNxXTPsJ+ZqluvXlwOmSj3XBDvG3M1rpAmYYoUrFzr4ZNqTawqm2MH8Dhh7ZXJUbcAUx4FinzBnJcAUl4FhP/jIgRSYKvkYCJaO2LbNv08RMMUy5nsA4COTLy0XYIqtil9iF6aflq7AwBWuAvuQ9ZKSBgNX2ieWjtKSzeXBNZgqfe8J+4W5aXtbcg0GrvibB/BhkeuhBJhigzsghT0veh+WAlMcCGHvMOMQwcCdcIntYy6WmXhIg2PuiAvsEHO97IhHGgzckb4D8L6LmZYPMHBnhiWwXVdDPF9g4A4Vwd66nFr6BAN3ygbbw1yoMzjmjplgB5hrrufSvsHAHesZDOD2JAbxVYCBOzfIAZ9JbR6qAgN3cPwP9kZy1VIlGLiTdluCmoOBO/pnS9Bk8DzmS3pL4BMcpZEe1qX0GI/atC4dQYXRMa1MU0IX4gpWsIIVrGAFK1jBCnYUPwIMAPUPAyFL+nRdAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.arrow_left,.x-button .x-button-icon.x-icon-mask.arrow_left{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpGRTdGMTE3NDA3MjA2ODExOTJDQUMyNUQwRUE4NjdEQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGMDZEQTFBREFDOTMxMURGOEQ2MUVDMjM0MzY2NTBDQSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGMDZEQTFBQ0FDOTMxMURGOEQ2MUVDMjM0MzY2NTBDQSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkFGQzJEMjQxRjIyMDY4MTE4QTZEQzUxMDg5Q0Y0RTRFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFN0YxMTc0MDcyMDY4MTE5MkNBQzI1RDBFQTg2N0RCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+FXGmxAAAAghJREFUeNrsm09ERFEUxt+rxBAxqyFm1SqiRYpMSpFapUVaRGpTRIpIbWLaFJEoRZtilChRWiRKsyklilYRERERERGZvsN57Wfmvnnnznkfv+WM+bn3e/ePN24mk3E0pcRRllC42FOWy4dc1w30R+fz3LFthEs1TelZ0KlBuAIcgmRgHS5gqlm2RsNTmqbvrUlZycLT4BhUiliWfEwEbII+UeuwT4nzqNZq2Gm1gTu/ZaUIj4NTEBW7tTTY1zUwKH4vbaive6BBw2kpAa6DkA1CeBicgZhVx8McUg5WWNi+83CWiXFfE9ZeAGQR6ukBqJKyu/Gzw7TcXEiS9UuYbiWWeU8ckXYqMT2lozyFW6SeOU0K1/FhPS75RsHUlKbj3KV0WRPC1Nd5sCuxr6anNPV12zFwk2jLCCdtk81XeAIsahL+BVOgH3xrEPayA5rAixZhyj2oB2ktwpR30A5WtQh7vR4DQ+BHg7CXLdAMXrUIU26411dahClvoBVsaBF2uMsjYFRCrwt5a7kOOnjUVQg7vE43cr9VCDu8I6Nep7QIO7z3HgCTvHYXvbCXJe71hxZhyjmv1w9ahCnP/DDb1yLs9boXzGgR9rIAusCnFmHKCff6UYsw5Ymlj7QIU75AN5gz9YVuLu8eB/S+dA+v1+l83pe2Sfg/BRe2OeGfPELhUDgUtip/AgwAw4tbozZtKFwAAAAASUVORK5CYII=')}.x-tab .x-button-icon.arrow_right,.x-button .x-button-icon.x-icon-mask.arrow_right{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpGRTdGMTE3NDA3MjA2ODExOTJDQUMyNUQwRUE4NjdEQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpGMDZEQTFCMUFDOTMxMURGOEQ2MUVDMjM0MzY2NTBDQSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpGMDZEQTFCMEFDOTMxMURGOEQ2MUVDMjM0MzY2NTBDQSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkFGQzJEMjQxRjIyMDY4MTE4QTZEQzUxMDg5Q0Y0RTRFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFN0YxMTc0MDcyMDY4MTE5MkNBQzI1RDBFQTg2N0RCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+xvZexwAAAhhJREFUeNrsm8FHRFEUxu9rxhARsxqiVauYXWoTpTYtUkRqlWkz0WaiTW2iNi3atGhTm4k2E5GYSJRaZcZQtIqIISIiYhgyfZdv/oF59913X+cdfst5733u+c495743XqvVUpKiSwmLWPB/j2QnP/I8L9SH9lN3/KxwQlpKT4FtaR7eAhegR1LRmgEVMCCpSg+CGtNczLbUC8pgQ9I+rCv3LiiBbkmNxwJ93S+p08qCRzAhqbVMg2tQkNRLa1/vg6ILvrY5POTAXdi+tj0tDbOYjUoaDzPgBuQlzcMpcEhSkg4A8lztjBTBin6u0d8iBOvoYwXPSRGsuEcXuWcnJAhuR4G+TksRrGOMfXhWimDFjqzCyUuE4LavS5yxExIEt0OfopRN+DpKbx6MHAtHSfAeWPN7kWQEhDbAMjg1cTHXBdfBLHiSUKXvwZBJsS4LPgCT4NP0hV1L6SZYAcdB3cAlwe9gDlQlTEsP9Gs16Bu5IPgIjIOP/34AoP26Ss82bd00LA/r1Vzk1mM1whCsfTrPpsJ62E7pE/q1HpaPbAn+Betgib1xaGEjpb+Ywrcu7H9BC35m8//mSncTZEqfgRGXxAYpeJNp3FCOhemU/ub+euXqzGlS8AuYBq8unyiYSulLNv9OizUleIcr+6MiEF4n3x7ze2n9OkSfE5/bfmg/30v7ERxaWBcc5Yj/5BELjgXHgiMVfwIMAGPkXbHq6ClAAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.arrow_up,.x-button .x-button-icon.x-icon-mask.arrow_up{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpGRTdGMTE3NDA3MjA2ODExOTJDQUMyNUQwRUE4NjdEQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpDQUZBQUM3NEFDOTMxMURGOEQ2MUVDMjM0MzY2NTBDQSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpDQUZBQUM3M0FDOTMxMURGOEQ2MUVDMjM0MzY2NTBDQSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkFGQzJEMjQxRjIyMDY4MTE4QTZEQzUxMDg5Q0Y0RTRFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFN0YxMTc0MDcyMDY4MTE5MkNBQzI1RDBFQTg2N0RCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+ar3jxgAAAbFJREFUeNrs2j9ExGEcx/H71YmmpoiIaIq4KSKi6dabbo1oiqamm1qboimiNZpuuikiIqLppiPipqYjIuLp+/D95vy6X/frfr/n730e3sst53XP9x7u+V2ilKpM05qpTNkCGGCAAQYYYIABBhhggAEGeNSqpl9IkiQKWNbvfBc7PDdNIz1PPVK7Trd+OMPrRr8l9Uat2nT9+CyCW4yVnnnHowTXqa8UWHcdI3iNGozASscxgReo7h9YxTtfjwXcHoOVBjwJQYNPcmKlLk9EkODGP7FSO0TwOvU+IVjxZAQD1iPZK4CVGiGAZ6lOCVjFE7LhO/i0JKzUK3KImQY3S8ZKHZ4cr8A16sMQWPHkeANepF4MYqWmD2A9arcWsIonqOYafGYJK73yRDkB71nGSnd5r4jKBG9Sn47AunOb4CWq7xAr7dsA61G69wCreMK2TIMvPMFKfZ44I+ADz7DSQ9YhVgS87fiQGtdlmeBlvkNWnndYBljfGT8FgJVDbKco+CoQrBp6mrEyKfgoMOyvpxlZ4CT9vcXj0shWNe8nE8vCfzwABhhggAEGGGCATa1vAQYAZekAmr8OukgAAAAASUVORK5CYII=')}.x-tab .x-button-icon.compose,.x-button .x-button-icon.x-icon-mask.compose{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAF/0lEQVRoBe2aW4hVVRjH54xa6nSzm92sHiZNorJowMpxrDEoyECiUUpztIkeeumpoCB6rAwi6FHwIXqKXkqiEE0no0QNLWwyspmGsruWlVqp0+9/2t9hz3Lty+mcfTnpB/9Za397Xf7//a219lr7TGVsbKztZLL2k0mstJ4S/H+P+ESfwEqlMhn/VNAJpoOjoGibAIFfwDbWnT/DZOCrex34D4b9vvw4wVScRKEu0AcWgQtBmYb9DvgsA6OganCWhgFwL/lHEf35v3ci/mqVFrAO8AT4FugJHge6URZsg0s3aDfOAe+H8f0INAo3gavD9928iT2bgqvBYVAWgWEeG+E1G0wwAeQ18hTZ/cDKSvROECnaBD9Iod9DFa2BMqSDEgAqjtiH8H3v4XwM32ZwlZUPp/jbLgHDoAziXA7r4aXIhsVqgZLYA8Atb9eK9BbQGRarvOwxEDdfdU9D/UiOUH9bwTixAWGJ/QmYuKhUojU6xomu4HgL3AV89ipO3ZdYlc3LJOJTsAeR1bAEr56V+J4H00Aa0/D+BNxPM0NW4Wcyvqe0G7+Gu5b9IhAexnrYq8A+4OMa55PoDaA6p0kjG1jHvVqnetBFQBxAP9CrJ27qxYm2OX25IhdlxxGoRgqzYFOxHAIvgHMbIKKF7iIwVe+yMtsA5F4CjYiVPu2+lhG/z3QRNRTeKGIIB4NKgXgEHIrhF8Xb9WuxmmVayhphLVDPgimgEdtL5VWI3RNuxH0idp17hCGlAOg924zISmyXRdbSskVYYjVnmxFZvXt14DjBLKJummuEYXU3iNsuuvyirnXam2cRddNSRJjXj1bjteAc0Ih9QeU+RG6JayTqSeUSYYhpu/griOKR1j9MGze7EXWvKRPZUaaC6VebAYltxrFUYue64nzXRQ7pfki+CDpAI6bVWJuKD9M0Ere1TFO/7jLMV+2NbTXWh8JGTDuoxYjVySqVFRFhfV15DjQqdoQ2BuoRS/mqRS0KTZ3D9KTISuxvIKrPtP5R2rjFnaP4Ek93lInsvGmC6eM00A+asRp/RTu3esRej3+G63evKZOL4HvoJ/x1MW0k3XI/0E6PR0Q3/o/AHPeee53XHO6DzDRgw5ls3fYlNZYgYHO4JmvgfVy/DjqBPhDEWuaCIXQpDOYELNaQPg4SiQXlLfmazErEvmsOpbQ9j+RlcAH4G6Qyd9jYdVPmMAx6wDEgkXOBHrK+lIqg9RWXSmy3OzTxzQcjwOrq29x1bjn3mjK1ClbR0oYF07Z2U08FfewiPV8EMK3YOu8midYCNd9DWpHVSm1clZZC8HkQ2R4Qe4Z0kpEnr5Vb36oU+TBxy2uB6rXyluK7AehAb+UsTSU46zl8BcRuBBrSg5CuzTPyf+HTfPbNaUVvKWU2kLq2BMdM15n2OmvBd0BEw3cHGPaQ0r1XwNuhe/r2vAKxG0O+cNbWg7AvdT6zvTQrqH5rXhowWYeAqmD8Z+DTqroA9IKFYDqQSewDlN2kiywsM8GQnR3gCOkQQmeRanhL4J1Av2qY6SP7XvBklmLVWZaCV9D+6eAQ0DxVVK8EZiNkPgDvAS1sQ4jV2ThTy0Qw0ZwM69sD5joVdQV5iV8P9DOOxO5DpL5j5WaZCIb9AqAV+ij4A+hw/maA/XlEkr68lpXga+ltKxgE2sDs9vZegDMrwWsQuboAPYldtieW+A8F8p6X9VDMRHA9BPIuGyd4LG8yKfuL46WdW6xJcFQDU3i96LRTGoOPBGmnligsirQWre/AxZ4C1+DrpY/3PfeKcl1Gxz3AJ1inrsR3uiquBf3AZ9/g1FFMjZXBZkBCW1Sf7WSx1NEx0bSv1QZBQ7tVoYA8jeDEf7yhXNuZ4B2gSq0qeBjuM1MJViGsB6hSK4rW598BMO6/bKPE14YAFXQ2HQWtMrwVnINAYmufjqKEmr8mOIj0bVTWSUYb/qQPbBoaRUABOQz03znLwUQTkyat/hZDpZrxGjqLi4VgMbgJ6L1XFlNUPwYKymvgACL10FPbCYJT12zRgnFbyxaVFE/7lOD459P6d/8Bhs9x6sTqrJgAAAAASUVORK5CYII=')}.x-tab .x-button-icon.delete,.x-button .x-button-icon.x-icon-mask.delete{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGcElEQVRoBdWbzYscRRjGexY1EPK9u9mVoJH4cVBPCYR8mB0IbkISyB/gOYIeFSUQQaIX8eBBDKuCsBFFxJuieFCMEb9RiZrcxKOgB7+i0RjN+vwm9Q41Nd0z1d3Vk9mGh6rufut93l93dc9katNaWlrKymytVmuD4mek7zX2YpmxqWJVwwrl2iL9qBp+LpN3okywjNYo/qh0Sjqi/ZVlxqeIdZ5HXA1HXU3xqbnDMVJGYJ+UzktMi1+le6VrY8aniMHLeeJNDdRCTWti88fCTirpSemChJHpT/Uflq6LNawah4fzwtP8aanppDQZk3sosBJNS4tSCGumf+jcMWlFjGGVGHI7D7zM12+pjRqnh+UfCKwE66SXpL8k3yDsc/4+KfmdJqfLHVMDta4bBF0IrIFrpaeloqsaQvM83S8lgyaXy2nvjdAz3KdWal5bBJ0LrAGz0rPS31KYdNA+8Y9Jtac3OVyuKjVQ+2wedB+wAqekE9Iv0iC4onNMvUelytCMdTmGTeOiGqgdhqkQugdYAdzZBakqrBXAXXlCWhkaDttnjBtb9s6at7UwwNJzp7vAOsE3KKaCfcbZwKrtP8r1oBR9p4l1Yxhb1dcfBwtMG+xCd4A5IHFHfpL8AXX7fFw8YGbDWmIlxtT19cfDBFsHWm22UVqUfpP8wFR97tbxCNjjikt1Z8PaYYMR1uwRidd5GJRyn39k8PaeCME55s4Rk9IzzAUjrNmcdEb6VwqDUu5fUv6npGsMmr47xrmUXmEu2GCcs2d4v3Y+kZqaUlbAf/J4SOKuIvocs/NNtDDBtp8L7b+lt+vgaWkU0M/IB40CFqbt3VllnQ59lu3Tyc+kpqfYZXmgJu6o5YQBln09jD07WdZSwF6JKdA0tBXWREvtMMDS6mH0d6yvoLb0sdT0lGsClpqpvW08ftt9hv2D9LVxdb6Vmn57p4SmVmreG/LYfiGwg96hwd8sE2hgqXWHweW1A4Ed9AElOTfm0MBS44E8SP/YUGAHzfQ+O6bQwFJb4TQuDexBj9v0tmkcBdvh8OmH9XUVt0nvSE1/7415kVEDtWwbVrd/PmpK9wzIsq0y+VLi6sYU1kQM3tSw1a8tpl8amKTa2s7wakAbbDsGMIypBOygdwr6C6npr4j+DMELz50hSOx+ZWAHvVvmX0mj+EaGB167Y+Hy4iaUoM7GW/sHiSvf9IYHXnhW3/KuQswxOa6SFqSqP6X6UzW2jxeeq2JqzIupNKVlyEri81K4sBVbeJ04PPGOXjH0wUsDy2i19IJ0QapTeJ2xeFPDah8mpl8KWAbc2cel36U6BacYSw3UUupORwMr8aS0KF3NOxteKGqhpqi1YWZAFLASrpdelMYJ1uCpidrWJ5nSSjQtvSyNI6wPTY1JFsRJNMqPHoMo21IjtVZeEJ9xCZYDrF0cg54pmt65z7BAp6QT0nKC9aGpvW9tOPel5WAX1KZaNrVCRtlSOwx90D13WAEsiD8nLWdYu7AwwDJwQZypUHf13wwHtWfkgwbFpDhnf/rQtyC+SeZ8Px3FnX1LPpud6KcAG5QDJtg2dZ5hdTZKi1JTC+J+MZ/K5yZ7g9KXOObHNNHvWRA/JsPzIzB9Xx53GKy1HJM41wSonxNGWLN56Wupyd+nTiv/rQYZtpyTiPELTNmHDcb5zltanTnplHRRSmlErjek60PIcJ8YF5vaHybY5vDsfizpwB4p9TLp68p5SwhXtE+sxJhU0JeUC6Y95tkF7tBn2SGd/FxK8VcAHyjPzVLP+qwZ57XEujGMrQsNAyyHfK8eYAfNM82bsw40KwJ3Sn1/teOb5/UZ48aSoyo0tcMwH3r0ATvogwrmzwWq/Pz6nsbdLpWGteIY63KQqyw0NVP7Qcvnt7nADpq1YZYzeA5iTV9T7I1S9DT2i/H75HC5yBnrT63UXLhGXAjsoNsafFaKudOvKG6zVBvWwMnlcpJ7GDQ1Umvbxue1A4EZoO2wSzToc/ptxdwgJYO1YsnpcuNRBE1twB62cUXtUGAHzTN9TsqDflPHb5OSw1rR5HYeeIXQ1ERtuc+s5bA2CthB80yHn9P8pDIrNQbbLfQKNF54GjTPLDUVPrM23tpoYAe9S8k/kjB6VdoiNQ7bLfYKNJ54UwO17LLzMW2nWA2K3vQ/we5S8N0SL5LvZHI5enCCQPnzkcU3snukd+X/YZm0/wPdHqnTTpY+CgAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.organize,.x-button .x-button-icon.x-icon-mask.organize{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAEdUlEQVRoBe2aS2xMURjHjbbqUaLoI7RChQUiGo9YaEqkoolIkCASSki68dixsLIVYmHbkJA03UgkFRI2QgRBKl4RgtJFK0jUI+o5fv/p68ztmUlHzpzO9PZLfjP3fOfcO9//fOeee+69E4lGo6PCZKPDJFZaQyc4N1mGI5FIMfUVkAfZMPaVwE54yqn6i+8BllQwravgAEyEv5DppsQ8gYPw3hqsJi0bNJ4El0GZzSa6iHcbjLbpsp7DDGX5V8ByyDbLJ+CdUGQLPNGQnkzj3TDFspN68BNkwhDPIY5poG/T1lBYR+LOkuW4uSeR4KXssN48grF9h20NdeukYLRL96Y6vAD2wCwwbQyFvXARPpoVA85fKnXiN4HtvP2Gf0tPG3XWUKNYT4E6PxjvD3x1EDHPZZvgxTTSDBc8gMrKbql5gKHeJh7NM6/AFu91/EVmjHGTFmN+HA3qYSoE7SuO8+zcEawY4vJdfr8Z/ljiqMS3AV2RvjpTPc7V0A623rqJv8RsnynbxDUXXieJuy/LfRmmEzSd7wKtroL2Hcc5BL4LVmRCmbheEIfmHduVQ1muQV/3BN2bJZyqaANbdm/jL+xtm4nfxKcsP08Q/zX8MxV3TDXqx+PYBGUQNHVAI9AsYrsuB9sPVflDT5xH+O7OZn8kK9msJf6G3ooFOOr66+O2NOVL6A7oP/njmmREQcN5LGhy1cLJtBwK++FSLqrVSGvPcrCZGu8DZTqTBSs+zUkarTZTUrerYh50gHYY7rSpRxZCCYTByvouS2FQK42hE9w7S/tKsOaIt/AGfoMWO3OgFLyYb8FaGByHl6C1r27jlsAh8HaN14LD1+x8jN/KNVdqlAvhgq8YfJ/DLYjVUDatk8J905HObd+Cf1rEaHTp5sSL+RacaKWWyO+8E3wLdi4g1QOOCE61x7Kt/UiGsy1jqcY7kuFUeyzF9ok6WA8ZvJjLtbQWEI/hXpLIW4N1rLyiPHV5hP9MsM4or2V7hlH+702XghWE3gAcTRKN3mjY7AZOdZbNCnAug4wTrNXSItCrmmYSZ3tGTNVAo+1nvCLOyLyeT9WC7WlqXNtUCq7vlpTlGkQMeG+Vio9j6NbxMOjtn8u7udjzaJcH1H3uLViVikCzLftqEtsKbeAyNh3LuWAdVM+yr8JsU8hgt9mvGh6ATousEKwgdcvXCMWDFap2mOYBTWK6b3YtNvYDrs9hM0i9BTgB+YMRTbvp0AS6bzaP43I7LUPaDFBvHPVmIy+ZaOp1+TkJX8Dc3/V22gUrYF1jN4L1r0T4NSPXg+sZ2dZZXgRr5m6BymCW8en6rc54BrYAXfu8CFbQmoQ0c1eYoilXw0NQp7gWZzueN8H68S44DbG/IPA9H66AL7FR12tpYk9qetOwGfSaVjcMNVAFie6iqHJv6bws2YaUfLpctYP+S5WoTVr8vjOMvphN4FN4N69Dybs6yw+OCLZ0yrByhS7DmrRaoQE0Kw5707JOf/UvH/ZKewTG/kscFrHSGbpzOHSC/wHSRhVOrpN3ggAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.refresh,.x-button .x-button-icon.x-icon-mask.refresh{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAG1ElEQVRoBc2aa6hVRRiGO17yrmloWpqhllH2wyKSEIsIo8QorLSbqVRgJd3DyFAQIyIiKQz61cUgpB+B0EWii4VkGFRUJpWKphZaaVZeutjz6FmwOnuvNbPWXvvs88HD2nvNzDfzrpn55tvrnLYjR44c1wpra2vrRr8jYC9j+KOzxmCnrTL7ng2LEN+rswbRSsH/ItL+Fwqij+8M0a0UrD5Fa0vg2c4Q3WrBik3sVj480WzRXUlwG4Lnw9OI7p08haqvXUmw2tzH8+AhRPf1RtXW1QSrz4i9CJYjepA3qrSuKFh9PeEWcE9XOtMtE0yyYYROojQfa0zRc8GZ7l9TWvJGj5LtCjdj0AYll6uD90HLQMizZKZ70vzOKjKypgpmkONQMxpGwWlwAvg9STLG8jlkip4FO/H3GKJ/DzXIK2/DQV554TIGdQaNpsNkmAAjoYpj5i/8rIIFjPlXruVMwY1Czy7X8+Al+B4OgU+yag7i0wjereyYqxDrDD4Ku6FqgfX87aGfR6BPGdENCabTqfAh/A31Btesez/T32LoXVR0KcF0NByeBPdSs0SF/Nr33VBIdOEoTVDyKFkCN0OlSQH+Ys2HsReMF66ueCuyJPDqzD4HvqEIzUCzyk1WtsAcKBy8opc0zgfBU+A52CwxIb+K3Qw3FJmodN0owXTgseNxsA9Cg2pm+S76vyktoOjn2D3sfjVAhFJBqmSax8km+BZ2gBnUlXAmhMyH+B3cj8DVocq55aEnROOJsB7MdIrOnnt9DVwD48G3lAPAB21evRRCPl3G22FaaKwx5blLmk4c2DNQdN+aaa2DKdAvayCULYQ8wYnYhpZxuv+QYGf3a/gnMLD0oH+h7mIYnO6o42fK/bX0MKTbpj8nYmd1bNvI98w9zHnbh8FcDSPBwcWYe/ReWMOgfEhlTbH6ugs/75Z1Urdd1tOi8qnwGcTO7j7qXgU9snym71Mva4bt70uYmq5f1ee6M8zsOphJoOiY2XVGlsEbDKxY5kOjlLmkt4Iz+z7Xyi1LjD/QJ4PLOsbWUmklGMkbsc00fqBZYh1Y3RnmvjnyWeDREbL9VHgVdjNQZ6is/URDxb5e1kFMuyzBij0ZzLBC5n5bzUAbmV2Titvx8V6os0bLs5b0aBz3j3CuyA/A36dlzK2zFTpFrAPMmuFRlPWzQsDMpN6BMoGqO+2+h9tiZ7Y9mBpXQivPIHoYvzXjyhKsUwcUsoNU2IRjj5JCRhtXx8rYRohV5Bh4EExP8+KFK24VfAT/syzBLmeT+5Ap9LdQpYrKFTwMrgcF55k/Tj6FGsFZe/gUKhupu5q5VGOCo7Nv3RrLEryLmgdqarf2hjPsyssac9ToshobjGKepO1jzuqowQQqGVNOj+zvMPVMdWssS/Cf1IwJRAa3CcSTmABX03nBG451DMTEFleniUyNZQneQk0zqJC5xHw3HTOIkK9QuYHqQsgKtOn2Ct6ZvpF8zhK8jQou65DZ+UXQ1ADHCrKfyTAWQubK/AH8XV5jWYI3UtOzLMZMQ2cyqGbOshnZDPBYCpn79xuouyWzBLskPodDEDJf394IXiu39vgwEccXQyjDsn/H/gkovMayBCt0Hdg4xi6g0rVNmuUT8b0AzA1C5vnryjT7q3sOZ77TopH7ZQOYj+oohH89NAuKeuPBgDL7Tsrw5SmwHEJ9J+W+bLR+/8RHx2tmpzRy3yyCfZA4DF23UfcK6Nmxo6Lf8WFUfhzM10P9JuUeRZfl9ZUp2EaYeycJAInT0NU/ct0HQ/M6ziqjnft0PLwCsavLMbkNV8OQLN9HNeUWHjtfn8eJiUhIaLrcCPkaTIHo2aau+3UmbIS0v5jPnrtz8vQEBR+tcOxVz3qcmWrGdJyu42y/BXfAJKjZW9w7CaaBy/djKDKrSV/mDCsg+HCj/qmF6DsPZ8tgOJQxV8geMBnwszPobCp2IAyFYVDGXE1fwAwmaEvQQWgJtM+ySYWC90PyVLvC1aPHQHl5jI6jWqIrHpuFl3F+oAuJ/pGxzIXoP4znRumODwPHI+BFcFm2eoZ907IEBnQcZ973QoJ1hLnnXoBWiXYZ74D50CtPXL2ywoLbRRtwloKBqDNnWrEGvOugVEZXSnC76O506o8GX8QbKZst3KPnTTi33szF3istOOmAAZgVrYBm/SeeD/MruAf6Jv2WvUadw3QUNM5q30ZcCrNhDMT8lKNapil0LayCtxG4JbNmgYLKBNsnortxccbPh+lgBuUvnlhzW3iumpaaofkzbzvXyqxSwelRIb4f3w1u58AlMA6GwNkwGEwhN4PZl0vWWLABDEr7EVr3BzxlDdl/zhnCj3tOo0oAAAAASUVORK5CYII=')}.x-tab .x-button-icon.reply,.x-button .x-button-icon.x-icon-mask.reply{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAES0lEQVRoBe2ZSWgUQRSGM24YTdSo4AYRTcxBEZJDJCoigrtGg6CIgihqogfRgEERguhB40UP6kHw4kEET4J4E9wPAdeg4ALigjuKcSMuMX7/mAmdSU/SXdM9PTPpBx/T3al67/31urq6K5G2trac3mR9epNYaQ0FZ3vFwwqHFc6yEQhv6SwraBc5YYW7DEmWXUhZhSORSC7UwKIgxzAlghE5CZFHoAEKgxTcz8/gCI3gfzHsh6l+xnLq2zfBaC0miXpYDvmgu+kXBGqeC0aohK2D7TAF+kPamKeCETseZdugGgZDSp4RxHFsnghGqKo4H/aB5uoASEtLWjBiZ6KsFlaAHlJpbUkJRmwl6rTcFKW1SktyRoIROhofdbARhlr8OTkMdBPNlWCE6iG0AA5AqRN1Nm1cxbTpn9Qlx8ERO4pIG0Br6yDDqH3pV4kvPdRewCd4C+/ZPdWx7xZxsk1LgqvIZDeUeZzRT/xJ8Dt4BQ/gGjSSVzO/3psEJ4JoY+A4fATNvVTwhjh34RSshMGJ8jO5biuWIJqrc6AJ/kIqhNrF+EFs3fqHYRoMMxFp7dNFME5Hwi5QMLskgrqmgb8M+hgZYRXh5riTYBxpFM9CUKKcxlWOSyHPjVi1jQqmYy7shQ/gNGjQ7f6Q6yWY7UY07XNK4CK0QtAiTOK/J29tLOQ7EU67nIGgtfU1mARMhz6a3zegtCfRHXOYxhXtndJBgGkOT9FQ1Z3oDsFqhBXAFngJpkGD7veN3NclEt1JcKwRHaaD3niCTt40vh6+q2N6rL+2gtUA03p8FL6AaeAg++ntsNwqNqor/kL8OZ2WgF71vEpeq8FvC36uDveJM8qqyenHwzg67oE1MAxMTeLOQyNod0SDqO2hCaDVIma6u3R9OAxq/9WxW9PT+wRsQ7RiE7Gbj4f4v9F8Fujxb1ptfR2tj/cbf04bfbbqZWgsFEM5LITNcBLc3HF6iM2IxXAlWJ0wJXEQfoFb4RJcEwtu8kv/PCiEGdAAevFQJbvL5Rh/j351uRbcLloVmA83ewgUn0TSgq2DRGzloVt9E9yDFoiPqfOvUBHN3erA7TFOtG6fBqdfVp4KtuZLDqr8DrgDdqIPcb2/UYXjAmmu1cLDBIGswX0THMuJHIrgDGglsMZu4nxI0oItgcbjUHP7MyRaanwXrHywvlAFj8E6v+dqZ8MTI9BzHO2DtaC9KY1wIEYurXCO4JrbjyA6CvzO80wwznS3tMAFDpfBKdArnkY4ECOXqwTWUqZvA1mJp4L/+4wKf8ZxDeyE26AlLBBD9HUC14GWr8mezWEc2/oiiNZM/TumGbRLkdQ6nChOT9eJWw3ffakwjjuMRF5wUg9b4QnE5hOHKTVNsSuO3qW9SosN/Yn4KmAQbnnl040f4pelVLCb5Pxq6/st7Vfipn5DwaYjlyn9wgpnSqVM8wwrbDpymdIvrHCmVMo0z15X4X9rh8wHLEjawQAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.search,.x-button .x-button-icon.x-icon-mask.search{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGdElEQVRoBdWaa4ycUxjHd9rpbm2bqKhiUavbVZdo0LCyLl3iHhGEkkZsKBYJX4RISHwQIYIPNJoQlUjTuCakUZ9oVGRF0GywslvqbgkpDarqsn7/6XsmM5n38pzzvtudeZL/nplznvM8z//cz5ktTU5OtuWRUqk0i/qdoAN0gcXgP+CkzIcx8APYBXbi82/SaZFSKGGILiTibnA+GADHgbkgSXZT8CF4GwyDEXxvI92r4k0Yoj1EeAG4CvSDEggRkX8VbID4lhADQXXUwxZgfAF4CGwFmgdFYQJb68HJljjy6mSSJZAZ4CLwESiKZJydb7A/CGblJZVWP5UwzueBB8AfIC7IovO0mK0B89KCzlOWSBinWoBeAkWTstiT3948xJLqxhLG2Xzw4jSRdQ0yiv/upMBD8xsI40Rzdu00k3WknyeO+aHk4urFEb4TJ/80CWEdYB4BhS1kdfswe+zpGNf80RYUIr9QSdgOdNCYCfaLcABpqFxBbymu3FIlDFkdD18B5wRYHaHOJvAeGCU4fa8IdnXUPAaoMZeDk4CvfEKFM7CrhswnbpxjZQX4C7j5Y0m1d64EXc5OWoqeFsPLwTvAYt/p/Iv+6jTb1rLKHMbYgWCjZxCb0T/e6qhWj3o6hz8HRMSRykp17l5WayfksyN8oafzTegfHOLQ1aG+blc6ZGQRdeVawB4GlWno7Pim1G9rB08AZzgrfRfdw3wdxelHvl/38K01Itc2Rf22Q8BPIIuoynXQL/SQj71DwcfA4n8nev1xjWfN0yGjD2gxsYh6432LolWHQL9F91Gj/j7oacUPFhE+11hbLxbrCFBzqWh5A4PDRqN90RZqVK9XE+ET67MSv41D9s3E0nwFX1Ndu4RFjkZpjkUxTkeEdTDIEvXqW1lKoeU0pOavXj10OsuSI1CYnaWUVC7COvpliR7f9CQzlaK5/LPBQRc6mstBIsIW0WXiO4tiDh35mIr1oS4kK2ENOctwqzPu+SX0MdDLjZWw9Pb1suyv7EPYR7cuEithLRLL6moW/0VriaVRtT1qTQkSER411Cyjc4pBL4/KEirPNRj4FZ3gXy5EWM+vWaIhtJQNf2GWYkg5dtWzui9bhuqn6OkVNUhE+ANjTZG91Kjrq6bDxHnGStqvcxHWsU5bQpZ0orCK3rDs21m2quXY6+DLTWBBNTP9wxbOKZZ4E63omLYZWG4r0nkQtOtwVASwdYeH723o9uTxS/3Ks+ytHk5/R3cI5LqIK2hEDw86XVkb+wV0Z+YiHDnWCjnu4Vj3Ug3DzhDn1NPacTX4HljJ6gFPr5e5RpZ74tFz6l0ezhWk5tFTYJFPEOjrLKxhrEazktWR8zVQ9vEVp1ttLYyplyeANQinN0ydIXBUnAOXR7nsrwAbgatrTbX3nu1s5Ul1oKgIRsZYMR/jy72gY0+u6a8OJMJX1P+C9MsaqDcPAseCHtANQkRTwHIoybZd21qR0Q2k1pZP0tNJSIubLhxJOr75egO/sjbekM/VIe0qY1RDb6p//PYl6/QniO0sF2tI2kBYRpBTgVrUOWqm9DPiGgghW+GWVBGj/UCvEM1E1sWinr4sKfa0/NgedhUwqsVITzvOUTOl6gxv0qmERRw5HOi/bHz2zb3VMHp28hremYQj0rq23QhGwFSQ0ZVPu8NvAfa3Use8kJkI1wzxxRhfDcYDAotrKF0GngYnRA17D599f7KVXcVzmoszLfUi7AxhfBG4GKwFPudhBacnmpfBStDwnzrkrQIhpDW8L3ExJqXV/wBA2Vs4WelquT9Qzy8FvdHnDlKR01RQ8OrJMaAp8TnYQUA7SBsEm6pzPXgcyI6PaCG7Hdu6VcVLUkuE5ONBR8ByDGb42sPGteBPEDcV0vK0ZZ2Z5C9oSCcZKzqfwO8OJK2FbCAunqYmrICRQaA3rLRejSvTWtGwTzc94Yj0DQS/O4C05nQd6VYhrIVMpEN6Wqv3crBngY4b582aR9DXgJCFTPt05T+AtKq2jNARzxLs/UBbnY/0onwLO97sXPuwj8cidQn8OuytAe0edjUyuluqh2vIPcNnPS1rIbOKfkRf0pKEGdqSJyFwM/AZ3j+2JGHXpZDWWf4+sMvlpaTal7e3xLYEsdQ4ITIIsras29AppxrKctRM5ZDRLUvv13GnLl1p5yjellylCb5BolvWkRQMgT6g6apXmnVgPWQrc/1/boJCaHVWyukAAAAASUVORK5CYII=')}.x-tab .x-button-icon.settings,.x-button .x-button-icon.x-icon-mask.settings{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAIkklEQVRoBdWZd6yeUxjAe2lLUbVKrFaLUhUVo1pbQtqqESOECGLGH2IkCP8YQewYtUoTKmkJ/2hVEDFixN5FadXWBjFaq0b9fl/vuc5973nf9xtvez9P8rtnPeec5zn7/W7HsmXL+vzfpKOjYxVs3hR2hlXhT/gcX94iLBYd/r+BR2vB+eBsyVJ4FPqX+eJItbUwm8rmMEZDTRAMhG1Nd4p+bABbmUZlAGwLI0D9Lmlrh7HV5boHOHuPkL6LcCisDztCEJ1aBxwYwyvgMbgfToD/pGwJ9FY5FjoZ42AuhKX7N/HX4Er4Psq33PQ0eBz+APP+gbfhAOjQl7bdvxjYH86F4Gwc/pWT74DEesYXwWWwtg6385L25J0FH0JWXOopyfrjDC+AmTj7sxWyCua1hWCgs6Ox58GPTRr1FfVmwBuhfts6rIH47NJ9Eu6BWBwM9+xU8HqaDA5OLL+ReAmm044zXZPlGzmk2iDklHUSvF4mwU4wHEbCuqDo7OdwKXgK/w4DwEfIdVC7vgjVcxnPg/fhHZjVdocWRmn8faDBKRaTf4srPoa81eFocABS9cy7ra2XNAam5BcyvZqy4vL/Er7OFsTpdnW4yK5+OBCWd+yLjw9neY04Mxsvajiru7LS3qXut2/Aq8mZ6zp0iPuOnsBeH0wYi1thL8jmW99l7ux/1G0fxHui2TiNOojdaLQt6vcF38tbwyHg0zLel57AD8Io2Ay2h+sh3r++tl6AI2AbWBv62XAlwogPoyFPVhvuJpRpyCwc/7hbQU4CPWdlMfWWEFrX2YvFpXskTIRFsD4Mgqy4Qr6gPZ+ny6XR0c/Tp7Up4GdaPBNx/KG8unn5tOV+vLOgzbj9VNwD7gHYMPRRyR5mJpyBIVDU3lD0/ISrS9B19U2A4+uqkFZywMbCYbTnqig00PJ6xYNCPCnzZD0KRuQVJvJty089PyJicdY+hfggs7y2fAl/MBGJk+DJ7grgb+YCz6ZRceY8OHaEftly08ho+AQ0IrW0zPsWjkrV72zDg+VwGB50iHse3AbhpJ5P/AzYBz6E0Jf9egqfDieBZ4Vl38E1MKirzRBJhSh6ED0D7k0bvAA2gVVifdITwQd+MCAVOgMXx/WMIx42J8M88Ep6E7YJesSd5SthBuwOzvxweBhCPw6IV5nL1y+pPWEqXAJd+7fWX2g4G6K4HTwHGhoaNnwZDoLVQh3iZ4NXRayXinuV1N7vtc779NmN9NOZejr9FowL7WdDyjyVb4TQhzY+A7Vv3qBPuquvrrwQiUMUR8JMyDobOlhI2dXgIbQaXAvhV4agkwqfQs+DxH11PrhqUnou0TkwNrYrxMn3ADoMXgUnwIm5Ano4GOqEsMceppJ76REomzGX0bNwCrgMnZmU8XGeA3UizIK8wQz6Ou0+HROMjUPyXboOngyArhUX62XjKYcvp7IHTOi4N0MH5eGs0a2kXVpZ8fBYnM3spbSrxqVdnWRHi5Y9Ne+Gn6E3Z1dnn4fBWRtbSfdY0jaGjAYf3u6j3nLabbVfK86l6qaWNP3UllGYZdMrWzzxJ8OLVXdcO8ZTjfL29CP7VvD4r71DU3qJvPnkfQ1hZWxGfMuEXl7WXxQ8AacwQ9/kKTWdn5r2kEejO8DbUM+V8yR6x8II8CM9XBdbEffJ6FVXtkUsXwC7BhuqDpN7OHRCx951flgvgTBj2XApZX7CDYHci5+ywXAOFD1QbGsq9A02VB32pXH/26Zj/cEL3JkZCs6MT7+DwfyU6PwUuBDDCq8yyr+ln5vQ3RB8ZaXOD+2xv2XovkK4AD4CB9yB+o12XG1Niw/xLeBA2Alcji5jr6Z6xJfWQRihQXULzsxG2T7rER8fbqu54J08m/7eIWxarqJm0TLLLuGQ1pCjYFUMKNwa2XLq7Au/Q2ir3tDZfQoa7jPY4LLym9Pl3Kg42q/TUDNLzDv+tUY7RF973RJNS2of1duYDv9Sr3JGz9P4jUxePUlXgnWbllYcdmY1oFnxvl3p0orDrdTV0VbrNzVYrXS6NT3mXVdlxng7bF+mlCi3Xkuiw57QzRw8Xl9DuGKaGbSNqbsrNCpuIX+YaFq86KfDuuA97AnorPl2Lju51TkTXoe6Dy8GyFm6CLwdysSJ0EH5CfwFZEqTNwNVO5+CtcjymRpKfDsY1UlI+6NZaiZ19CyYhhHey6WCv0egdDf4a2RKfiDzPVgI78OczvAD+mjphKYdjtmSRwMqPh1/VTWHz8g/AZK/Wcfto7MfzIO8thy0B+M6VccLHaZzD6aXQEPyjDTfc8CtcQD0eAWRtwdMBWevqB1n0FkdVbWjob2i7+GBdHwpnAZrQj3yPUoLQKMXwXowEhy4wVCPOLjT4AKMtL1qJXieDellEvgzS9GMrKgyz4ZTszZVkU4uaTobBrPB19CKcqqoXZf2fBhdhZNxGz0cphOvm5uhbL8VGVxFmYP9BAyMDW41nrpqDqGT8ZB3bVC0UsQfJfYGr73KJOXwLrS+QQM9NHo3NqLvw2hcA7aUqqYcdu/6ovG0LJM5KNwBX4LLuEz8Geh28OebMrE9T/p7yhQbKk/tCRrw55eXwaddaj/6a8VMGAP+93AyeBendOO85zr1hxNOA5+McXmIuwr8ifaklH2t5PU4tEJjdDYWfCdnHx1zyTsG1lAX6YAzIc/44ITh/epHffhQ8feqWEdnXWGTgl6VYa7Dnc7sQ8fvgiems3ov+M7u9poifSh4d8aGp+JXZ42nzibgP7eXgM5+CuOzelWlCx3udNqZvgGOg+QVQb467mMNTjlqnl87J6cMJ9+zZH+4BfZN6VSVV+pwPR1hpA+VNyFvz+vwJ7B3Pe2tSJ3UKY1dDctX1PBzTsfyxGeq26NXpRKHmZGleOEV4pLOk4Xo+XrrVfFir0r8bh4EG0E8057i3r8eTL0u/wJCZSL2DoplLgAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.star,.x-button .x-button-icon.x-icon-mask.star{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFfUlEQVRoBd2aXahVRRTHz/Ujv+2mZRGZB7W6mtpFikC7+UWUZiqBD0JPFdRL1EMFPfjoU4baS0FUD/UWZBEVShA+BCpmWApRSkgllNpDmZWZt9//eOay72afvWfWOTPn3rvgz8yeWbPW+s/XmT379AwODtZSSQ+CryVgA/gVfIx/pelEhFMBVlvBOaBeFo6Cean8y09KsnMg932TqCOs9M2UhMfhMJVsxtHcAmcbmekLCsqjFKUkvAYG1xSwmEHZqoLyKEVJCDOCNxH9HUCbVl6mULAuXxjrOQlhgl8Bbi0h0Uen3FBS37GqVIQHiHh2SdR16jTlo0t0woycpuxiUDSdHcFeMv3uIWYanTDB3wIWVZBQHP10zuQKvbarUxDWT1HRz1E++Ds99fLtgp6jEmbExhPNcs+IbkZPiCpRCRP5TPCQJ4MJ6A3QSUqjSWzC2ozuC4j+fnSnB+gHq8YmvJKIJgVEpRPX9QH6waqxCa8PjEhHT981H2j6qno0wqzF63BhOUxsom3Zb7aJqGsUjTAONFJlpysXQz7VuXpavrBTzzEJaz1adlzNjHs6RTBvJyZhjZTF/kTaWZZCnlvhsyWgQkPZQpagzsX1bFlAXjGtDdAPUu1p3PPQhCCXkdwG/mta0PWLds060AuAnqtEOjpdbQR3VymX1P9F3UfgGJA9X9F92c/ADaQ2P8V0DJ4/kDbeYKaSvgI2AN0+OGJK1VAbSIhTOXEOybYll2kte77yD4rqrHyb85S9Cl4HtReAyI11/A7HpRq5PSD6oR0f3Rad+H7S1DvV7UgS+tc1cU3n3V/AWJ/SX8BxVuMinow2rNNjlPQVeH0GFg378kDBfLAPXARjZbTPwmUXmOG+bgz71EKFfqKeAUWfREZbJxyCxyOOqEuHER4qrNUWovwy0CFktBHV4eNZMNvxyaaFhKWAaBt/HJwEo4W0luSKLMF8viVhp4iBeeBd8CcYqcQ1qi+CKS7uVmklYdcQY0+C42Ckkf6EmO51cVal3oRlCFkCdKgfCWtbo7obDO3AVWQbHHyUsjo40E6uq9cvQbdG+wN892fj8s0HjXDWKA51/t4JUo72H/jTDtybjSUkbyYsJ0gdfAtSjfTn+JoWQjCv2+57a4M1QaQSvZvrMsIs7RJejGcdUlLJUhzpZsYsZsJcCen6ZwCE3IaYA2021OfUdU3fJltmwni7Fvh+KDMF16KR3ux0lWuSdgjPxeNdJq/tNdKNqJaSSUyEmVK6JNPomtqbIh3eSKNsEmvAarfJ5LEzjbbR59MtpqyEb8eZjpndkhtxvNri3Er4YZxpx+yW6Jdhi8V5MOHm+n0QZ9afo0u0fQO8A5S3iPaQ1cTSG9w4f/SqesZBH/gRWI6T+gyyxfkgvw2cMdrS+/lTzpZvGnyWxsnTwHLRd4R2a/OBqQyoztKBe/P2qp6DCBOUptKHhuA+pU1fq2Co0/F0L9CVaghxXTbWW9ktKg8lrFfCrwODeh/9wgu1bEDo6OT2Fvgb+JLWq+nQEsnaa5UPJbwKBxc8A9KXPG1O3u+u6E4F24GvD3XMDjCxFcF8uTdhjGpHfwn49L42lCeAdyDZwGi3HpwAPr6+Q29htn1ZPoSwfuz3ewShXVcBNz62lzkvq6O9DjZHgQ9p72kdQljvob9VBPAN9Q+UEQmpw5b+Sf8e0FotI/4a9ZN8bIcQXlnh9AD1y3ychuhgU0tpJyhb14epn+ljN+Sk9S9G1ct50d8SdgF9x9EO3lHB5hXwPEYfA8dbGD9LuWZBtfj0inSQWUDTKzu1dAB5Dkz2tdOOHn70LvwVyMag/FYwzse295Rukq5j+G1wEOib66PAy5FPMD46+NPmqTV7CpwGGvkJPm2l8z8GWDNDloqpGQAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.trash,.x-button .x-button-icon.x-icon-mask.trash{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFBElEQVRoBe2aS4gdRRRA8+L/m0QIJkYNLlQUNOAvigpRcCEIcSsiCLoLLoILcaM7QVBX4koRshDxt9CFKCoiuvGDCP5QkxCiJhInRo2Ovzie80gPNWX1dL3uesM09IUz3V1169a9daur+031aG5ubkUpGY1GK7G1Dq4Cz9vKiIY74Sv8+72tkWQ7Ay4Bxo+Hu2E3/AuOZBf+ov2TsL6Ef5WNUsGazXvgEHQJMm77N/aeg3Mrh7seOweMM2bWYH+B2OES1/9g9w0oEnSngHHCYO+FGSgRXJ0NM/0idA565BRpKyxSt9J2B5xWY+Mw5Udq6uqKT6XimESlmX4d7sTnA4n6rKJjs7QSSgTrSno7nJyodtFyGr4AP4G6TeLIHweb4A44C0LR1xtgCzwP7aTtIkBvLlSfQjwNZyl7FNa0sU077V4DX0Js25X7cRjPzDb2Nd5FnK7xPbGXskdwxsxOLLRzdnwIj8GvkQFnypqobKLLrgGnOjMzP6cqJijzfn0NXPljmXRNWNC+dcBHM7HA2NELp10nwbaz5iC4OsdidTyrYp3a68ZFi7XJFfNsOBGcUmFnPpbiBWkVZefT7g+OXcTF0EUsFPtaje0Lw0LOzfoM49B4Gy36WMKwK+WDcC2cAmGwXK7YAAYdym9c+NiIdUOdnHODc6DjpPioix9LBvwtPE3QOzjWi7MjBS0M8CGY1huUA1ISg/4cNqXiqcqSwVqJ3AQ/QEmnpm3LR+IzsLYKMD4mA6bBOfAKuFpO28nS9v0Bcxckn9V1Ad9Pg2m/H5cONLT3Mf5fFGfX63hBQG8s7/LXxcdV0nvjMtgKp0MojuaroM60xYB8Z78ZTog6c515B1ylXey+ARe3/0tqFNCy0RjrkdvgOwhH0TeiB2A1uMBNGx9Ta+FZiP34mrIrQR39cECSUzqZYYIcR0mjJtmFwmHUvdenLjwmnUl7Eh05+LP40fjvoGTACYN1Rc6CecGhM7lw2lt+AA7Fg4fOespXgYO0j3pvnXmh3rY+/52+vrXtRSd841rQJ/WV1JVX9eNj14DnjeHnJVw8DBeAnX8A2ynfXwXN+cWUPQUOjNl6i7Jt1I9nCOe+1V0NT4AB/wkvw31QRIoFjDfnwRXgfVbJGZzsry44boTNUGVjlvOToPpV5FvbjXApKE7VLZ6UkpWlDGHH+96pV93/4TSsujGA8MeF51Xw6njuO3soKTth/UTnJQOeqONFlKsBW0SlfdVyDLh9NBkth4AzBqnXKkOGe52+DOeHDGcMUq9Vhgz3On0Zzg8ZzhikXqsMGe51+jKcHzKcMUi9Vhky3Ov0ZTg/ZDhjkHqtMmS41+nLcH7IcMYg9VplOWY4/Md88cEtHbDOVg5Xx9jpsM9Yx52JeAcw1ontTXRdcm9pFz3vBveHdNJN6YPVRhrnivtMlruZ5g7DFxBuXLut8j7sA/d43Yr5CIpJsYAJ7DN2/27Bsw1gwAb3I8wLOp+g4w6+nw/6HddOyszqWDg/Qv2bXFwH4+1SyhyUYtI1YLc85wXn/ORAagWdPVRKUqh3AJwtdTLeWq2rbCoP76cm3bjeLG6ELjZim03XJujyJqXF6rtmeDvGNzMN/ajEAZi2rKOD67t00jVgN7+3dnFgqdsu5XRc6tiS/eUGvBTTNengBIVZPuYG7LcYPjdluYk++bTw++pGyQ34bSy9B35Vs5zEYGfgJfg+x7H/ADoy2VfnrtXoAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.maps,.x-button .x-button-icon.x-icon-mask.maps{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAADl0lEQVRoBe2b24tNURzHjfutXEPycDAltwhJbuMSJUqSB/HiES/+AK9ePc6T8uCFkImQW5KGkdwSxYyMGkZu45bbDOPzyZyTrJnjnDkGrVm/+szas2bv397f33ftPS+/Vdba2toj5igj0NcfRkG/3qWIJdcIrs/AO6gDq7cKPkOjUNAmxr8ePJsix8NUWAvLoapowSQawIUzYCZUwAqohF3QAjtgGTyCy5x/nfEu1MNDCmAxuiS4Vy8ST4DZMB9WwiTIRUGC26q1gKtWwyyYBsPB5aLIL5CNTxzotDeWTeA5DUKuO4xXoQbxHpcUbSIzJFkDi0EzdLYnBNGuYJJ4ch+YAhvB5TAORsKvib4x97vwPpk2FjJuhibu85zxAlyCangBLRQib06u68t5vk4uVYVqgO+oqy9v5ASTRLd0LQNLYB24bAfBnw5zikX0HtuhGW5ANY9ylvEBvIY3FOArcz7rWHCpboBFMAxyGjguKIZy1jzYCqfAD5BLslB8J3dCP/AdOgo+fKHXd3Sebh+EctCMieBK6Oj8QuYrXZ7roQr88PiSD4b/IVyyfhB9jQy/uppTUijYhANLytJ1F/sxzL7POpg97vQdFfwVTNYtQsHdKpLg2O1ODieHI6tAWtKRGRrISQ4HJYlsIjkcmaGBnORwUJLIJpLDkRkayEkOByWJbCI5HJmhgZzkcFCSyCaSw5EZGshJDgcliWwiORyZoYGc5HBQksgmksORGRrISQ4HJYlsIjkcmaGBnORwUJLIJpLDkRkayEkOByWJbKLbOVx0r3E7httIbttwNvzddt//JWxIfQynYX8pgu2TbgBbjw9Ds53sNHJv49gOehu5bUe2DfjXojDVpWG/9iu4CEegBp7xfO+LFfyGC5+AiQ7BFXj/c8s+xw+Z24PwvYwKnQxLoQLccGEB7Hsu9t5ckjcU2QjuozgA5+Apz9PCmItCbvqWs2vhJpwBl8ZrEuVtOebPtiWLbf2ymyL0ZVT8XJgDbgHIgFsPOhPmr4d7oAnHue9txg6jI8EfueIaHIOrcAuafieSc/IG19vw7TYD6UEBbE4vhwxMB7cizIYhYPT6MeR+WjBFPoCToEgF1hb6bD8LNpHLwT0L56EOGkhUchc6edoNcruvQWoQ7/6GMTAa3E2zACxGNjRhH9wHV4zP9oGxqCjj7C0wA06Ay/YliRT/T4MCuGnEfQ4feJ5mfvdfaG+OXSWdju+VpAoIK3D9tAAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.locate,.x-button .x-button-icon.x-icon-mask.locate{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAIDklEQVRoBe2aaaxeQxiA3eqCltpLkWotLUUtsUuJrbUFtSSaiIjljz8kQhOJiAQRQYREYvmFSPrDFiSExFpL49JSS6u0Re1bLUVRz3N7ph1z53zfud8956sf3uS5s7/zvjNzZuac7/asXr16g25IT0/PKPrZAfaFXWAMvAEL4GNYgS1/EjYqPU07jKNb4sGZcBocB0MhlYVkPAgPYM+itLDWtA43BYY6m7PBZVSFXuqd2ZQ96m3S2ZkY/0lFR+PBcFlf3ZTTjTiMwQfCR4WzfxO+D8/BTxA7Vxb/nXqzmnC6docxdDg8WTj2F+EtMBrMPxiqzvqn1N2nbqebcHg6hoaZfJn4sNho0hdB2cym+bOoOzRuP9j4EBTWJuzII1F2OngEuZQfwcBVhLG8FifaxM+jfHybOgMqrtVhet4OfH6VHsjpn9xXWu3PRKrtXK1qtVo5g6q1zNfyzJ1UFOnwCcz6ZqEq8bHErwzpCqE6JtHOsBap2+FNsGrjyLIjid+PvYfBDOJPwJSovEp0wyqVqtbJ3Xqqts3Vy83EKVSUTiWns1Nd2WesY2U0XAHfDkZBpu3vbHzu3rVI3Uv6G6z6oBbL1il5b1108LG6Hf4ak+YO3qy1Gl4ltnhtqoZIrQ6z8lZi06PwWw22qUJdn9Wkq09NrQ4Xhs0hfLgGI99Fx30MotfT+sT9oG6wbhzMAzebTviRdufUbZf6anc2GInBh8A7HTj8A23Ogw2DrjrDxhzuG80118KHMP7XCo57934Ljq/TwVRX4594cGADblmXEEyDqeCrYiy+XPhC8RzcioHfETYmXXE4WI/jXi1PDOkiXE44CUd9pWxcmtilWxnt0k5lVbecteNuO+xsplLrOZsqT9PddviL1ADSn2fyGsvqtsO5N59c3v8O1zUC3Z7hDzHcm1cs5nVNuu2wr4+pNHrupp3V/cUj1d+X5vwdTsS+RmYqjKDcT0N/cjz9kSmvNav2iwfGj8HCfcDflXaGbcGPezpsuBfEsoTEMvAnFmf7K1gCXjPnMwhfEtYmg3YYB30s9oeT4TDYCbYocGY7EWf6+wJ/qZgDj0MvA+Cdu2PpyOFiifrJ9SS4AHYDv1bW+oURfUF8J/bjgj+l3gteUZd38ggMyGEc1aHJcDb4k4nLtZW4RMMy/YW4LwonQHz29hZ1NiV0yW9VhASl4rK/G2bDAhyv/JGgssM4668K58OFMB5io0muFZ+518CPb34EWAga9VuxMvxlMIhH1FGUvUCZb1G7wu4wBfaAg8E9ISe2/RjugbvQUe1rKRXbvhOj8Ax4AxxJO0pxw3kEnHk3pezLO/mbgV81Q3v17ZmzgXxXk7rU+TSENmlo3y/C9JyeNK+lsyix08vAWUs7Mq3BL8GxMDpVnqapMwqc/aDL9lum9dI0ddwETwX7ctMK7UNonndybc0OdtBZ6jANh8GV4DMYFMfhj+TfCBsFZe1C6urwXAh6Kjkc9NLO5/wW+DXSEXQZausVUPoTa9ZhGvh8OqI+F7HCEP+I/JnBkKohbXS4N9HZdoZT/bR3JssmwpmelrYJ6aEU5mRPMp09l1JOlpI5lo1mFmHYvDyPXfqzUb6CMCc+b4thv6LQgTMvK8VGdhaFblwu2yD2uQRy9m1L/s20XYYd7xH/twTPQ0ipl4XrwY/pYUbT0DKPmBgNnwc7BV1pSJm674Sg73Xio9J6IW0Z+MyrO+7Li0nZsla39unD8KArhLkZ9iw8F0ZAmbQq+6asEfnO0nx4rIgvIiydYYz8mZnSATfPVNxjysSB9X/DboWv40o5h4+igod/Tj4j02XoaOdkHkauzBWYR5nOOcNSVeZQ0UtLTrR/AuyYFLrkvQn66HikrZMw1SGk5BooW84ukxGh7voOsWUjuBnCIxKHDvylqY1uNKnEm0Na5kiOTjPXR5ql7ixuD3uU9G/55mlZzuGfqeRI5cQb11T6yj0KufpN5vlcHwRHl3TixH2YluUMf5NKXghysgmZHuzzcXoRy6VsYHJt/QXCAZ4A6gkyoMu/jQo9vm9fBWUbqD4shH9LusYp9WxbBo5Q/EzE8Qcom5i2bZemjTelBYnerdq1S8tpvzf4Y3lsUxzXdk+ALfq17ZexZiO4g8q+1cRK0vjblM9I27dKawD8EOl1FgZ006L+TNCZ1J44re03Qb8Ntt/Vkko+7FOh7OoWK/bMdefeoZWjoYx6nvFx+8oO2wdcB98nOmJ9Ie6V+PDQbxz2c9hCZGNwhNrNspU1+hO4FiZDq5uTDls/GGZ869igOK4uUKe67SNuG3SkoUeq9fvdsvp8izuI4zTYBeZClU5Cp559D8GFcCCMh82DXuJukrE+nzV/OewbeOuCbQ4FdahLnUF/u9CLzfMwLuhMw5ZfPNgNp9H4NtgdXOoDkRVUfh/cKX3mloM76u0QdOmA1793wSW7G0yEKTAcBiIOnndzLxvev/OSjkCappVL6hlw9NqN8PoqX4Vt3s/Hp/an6ewz3K/SmhvNDSj86T/otDZp25jU7ly6ksM2RIbADHgFBvJcNTXrOvpCYdOQnHO5vMoOh8Z0sA1cDi9Cq3fSphy1z2fhYsjuxMHWXNhy00JhqbCheWtyJ54Ox8D+0KT0ovwp0NmXcMYjc8DSscOhJxwfRnxHGAfHwQFwBIyEwcgvNNY5HyHxHF6Kox5rHcugHY57xnnPWS8t4lHmIHjEeNyMBXf67WACeJNbDH+Ag+ax5fE1D5YWcd/cVuKkR04t8g94XuILUVeybgAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.home,.x-button .x-button-icon.x-icon-mask.home{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAEK0lEQVRoBe2Zy28NURzHe/vwqEepYkFIQzxWaCOC2HhELEgQImhXIrqyIEXikVQi+gdIwx9AItg1NiJELMSGhKQbobY2VY9Srfp8m5lmTO/cOXN7Zu656f0ln8zMnTNnft/z+505j5sbGxurmk5WPZ3ESuu0E1xbigjncrka3jsbftClIvsU5RZ65aLK5Lj/C75SzSjHWCuJYLxqhPXwBgYhylq4sRaixChDP8EzGIJ4UwNnCR6tgFswANegKer93LsLim4herm/JKqO8O+ZRdhL42acOwunYAacg2Hu3ePYj3Ph1A1fU2ySmZSZeCiTjxaC1LAboRs6QGJl8+AKXIU1kLqlHmHEqlFboQv2gD40QdPHqx3qKdtJkD8Hb9o+TzXCXmT1cboB+cT6evTVPgIXeWYl6DoVSy3COF2Hx0rjTthp4L0a/4xXrofn33OeqH8avKMqFcE4O4uXb4ULsNfEEa+M0v00LIIuCKc/P03NrAtGrD5Iiuh10Dia1JTOR0EZsjjpw3HlrQpGbD0v3AzFig36e4CLkeAPNs6tCUbsHBxS+mpsLSayYT2KtLBqVgQjdgFe7QP1u9VWPbRc2ZQFe2LV5zSBWG7ZP+vVTUkwYhvx6DicB+fFqvWKFuyJ1QxJ00It48rCNNgnNi+N23hQaVw2YiU0cYQRq9Q9CJdBKV1q02zMeEaWSDBil1L5JTgBDeCCzcUJ8cXImfACOeqayjbBffgDfqu6cPyJP3dgVZTvwd9jdzuoSFmgicRDGAYXRIZ9+I5fPbA6KC7feUHBVKD5rJZ1EutaZMOiv+HjbWjJJ9T/LVIwDyqyh+ApuC7WFy/RCk4r5HyRwWNewRSW2N3wGv6CX2E5HBWcB9AaFOqfTxJMQa1lNewosqNQDiLDPmqv+hFsgzpfrI7/CeamVjwnQZEtV7G+eEX6MeyHGl/0hGB+1MJdYt+B/1C5H9UdX8J2qJ6IMBfz4Ri8hXIXGfZfmdoLWr5W1zJ7ktg2aId18BuiTHNvDVUumQSNxDikLSdtBzdok0yCD8MyiLNmCqhxXBL9An+egNI3yqRT9z+O92FO/O2UuOMuymoqF06bUl53489MQw21Gm8lWmkRa6R/oVaMfT6lAmrsUVMNRa2HU3I8k2orgjNp5hK+ZLwPp/x+fR+0ONfMp9BfJ+qLmulpyze1zMtC8AACbkI/xAneQZkO0JiZimUheAjPn0MfxAnWVo3RiEG5oiwLwXJsmGFDK5iCxrCnGZNSOzVLra+EPDZ9T6EMCFVZ3KWpI8XV7uBTFcEOBsWqS5UIW21OByurRNjBoFh1qRJhq83pYGWVCDsYFKsuVSJstTkdrGz8L0VTv1i+NVF2CyTJDC0LX7E8HIx7D/Vrb3wDaLvY1D5QsI/6jXZUEwk29cDlckki5bIOY9+mneB/GfbU3e4Ey5kAAAAASUVORK5CYII=')}.x-button.x-button-action,.x-toolbar .x-button.x-button-action,.x-button.x-button-action-round,.x-toolbar .x-button.x-button-action-round,.x-button.x-button-action-small,.x-toolbar .x-button.x-button-action-small{border:1px solid #010509;border-top-color:#021022;color:white}.x-button.x-button-action.x-button-back:before,.x-button.x-button-action.x-button-forward:before,.x-toolbar .x-button.x-button-action.x-button-back:before,.x-toolbar .x-button.x-button-action.x-button-forward:before,.x-button.x-button-action-round.x-button-back:before,.x-button.x-button-action-round.x-button-forward:before,.x-toolbar .x-button.x-button-action-round.x-button-back:before,.x-toolbar .x-button.x-button-action-round.x-button-forward:before,.x-button.x-button-action-small.x-button-back:before,.x-button.x-button-action-small.x-button-forward:before,.x-toolbar .x-button.x-button-action-small.x-button-back:before,.x-toolbar .x-button.x-button-action-small.x-button-forward:before{background:#010509}.x-button.x-button-action,.x-button.x-button-action.x-button-back:after,.x-button.x-button-action.x-button-forward:after,.x-toolbar .x-button.x-button-action,.x-toolbar .x-button.x-button-action.x-button-back:after,.x-toolbar .x-button.x-button-action.x-button-forward:after,.x-button.x-button-action-round,.x-button.x-button-action-round.x-button-back:after,.x-button.x-button-action-round.x-button-forward:after,.x-toolbar .x-button.x-button-action-round,.x-toolbar .x-button.x-button-action-round.x-button-back:after,.x-toolbar .x-button.x-button-action-round.x-button-forward:after,.x-button.x-button-action-small,.x-button.x-button-action-small.x-button-back:after,.x-button.x-button-action-small.x-button-forward:after,.x-toolbar .x-button.x-button-action-small,.x-toolbar .x-button.x-button-action-small.x-button-back:after,.x-toolbar .x-button.x-button-action-small.x-button-forward:after{background-color:#06346a;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #167bf3), color-stop(2%, #07448c), color-stop(100%, #042348));background-image:-webkit-linear-gradient(#167bf3,#07448c 2%,#042348);background-image:linear-gradient(#167bf3,#07448c 2%,#042348)}.x-button.x-button-action .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-action .x-button-icon.x-icon-mask,.x-button.x-button-action-round .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-action-round .x-button-icon.x-icon-mask,.x-button.x-button-action-small .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-action-small .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #ddecfd));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#ddecfd);background-image:linear-gradient(#ffffff,#ffffff 2%,#ddecfd)}.x-button.x-button-action.x-button-pressing,.x-button.x-button-action.x-button-pressing:after,.x-button.x-button-action.x-button-pressed,.x-button.x-button-action.x-button-pressed:after,.x-button.x-button-action.x-button-active,.x-button.x-button-action.x-button-active:after,.x-toolbar .x-button.x-button-action.x-button-pressing,.x-toolbar .x-button.x-button-action.x-button-pressing:after,.x-toolbar .x-button.x-button-action.x-button-pressed,.x-toolbar .x-button.x-button-action.x-button-pressed:after,.x-toolbar .x-button.x-button-action.x-button-active,.x-toolbar .x-button.x-button-action.x-button-active:after,.x-button.x-button-action-round.x-button-pressing,.x-button.x-button-action-round.x-button-pressing:after,.x-button.x-button-action-round.x-button-pressed,.x-button.x-button-action-round.x-button-pressed:after,.x-button.x-button-action-round.x-button-active,.x-button.x-button-action-round.x-button-active:after,.x-toolbar .x-button.x-button-action-round.x-button-pressing,.x-toolbar .x-button.x-button-action-round.x-button-pressing:after,.x-toolbar .x-button.x-button-action-round.x-button-pressed,.x-toolbar .x-button.x-button-action-round.x-button-pressed:after,.x-toolbar .x-button.x-button-action-round.x-button-active,.x-toolbar .x-button.x-button-action-round.x-button-active:after,.x-button.x-button-action-small.x-button-pressing,.x-button.x-button-action-small.x-button-pressing:after,.x-button.x-button-action-small.x-button-pressed,.x-button.x-button-action-small.x-button-pressed:after,.x-button.x-button-action-small.x-button-active,.x-button.x-button-action-small.x-button-active:after,.x-toolbar .x-button.x-button-action-small.x-button-pressing,.x-toolbar .x-button.x-button-action-small.x-button-pressing:after,.x-toolbar .x-button.x-button-action-small.x-button-pressed,.x-toolbar .x-button.x-button-action-small.x-button-pressed:after,.x-toolbar .x-button.x-button-action-small.x-button-active,.x-toolbar .x-button.x-button-action-small.x-button-active:after{background-color:#052d5c;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #02152b), color-stop(10%, #042144), color-stop(65%, #052d5c), color-stop(100%, #052e5e));background-image:-webkit-linear-gradient(#02152b,#042144 10%,#052d5c 65%,#052e5e);background-image:linear-gradient(#02152b,#042144 10%,#052d5c 65%,#052e5e)}.x-button.x-button-confirm,.x-toolbar .x-button.x-button-confirm,.x-button.x-button-confirm-round,.x-toolbar .x-button.x-button-confirm-round,.x-button.x-button-confirm-small,.x-toolbar .x-button.x-button-confirm-small{border:1px solid #263501;border-top-color:#374e02;color:white}.x-button.x-button-confirm.x-button-back:before,.x-button.x-button-confirm.x-button-forward:before,.x-toolbar .x-button.x-button-confirm.x-button-back:before,.x-toolbar .x-button.x-button-confirm.x-button-forward:before,.x-button.x-button-confirm-round.x-button-back:before,.x-button.x-button-confirm-round.x-button-forward:before,.x-toolbar .x-button.x-button-confirm-round.x-button-back:before,.x-toolbar .x-button.x-button-confirm-round.x-button-forward:before,.x-button.x-button-confirm-small.x-button-back:before,.x-button.x-button-confirm-small.x-button-forward:before,.x-toolbar .x-button.x-button-confirm-small.x-button-back:before,.x-toolbar .x-button.x-button-confirm-small.x-button-forward:before{background:#263501}.x-button.x-button-confirm,.x-button.x-button-confirm.x-button-back:after,.x-button.x-button-confirm.x-button-forward:after,.x-toolbar .x-button.x-button-confirm,.x-toolbar .x-button.x-button-confirm.x-button-back:after,.x-toolbar .x-button.x-button-confirm.x-button-forward:after,.x-button.x-button-confirm-round,.x-button.x-button-confirm-round.x-button-back:after,.x-button.x-button-confirm-round.x-button-forward:after,.x-toolbar .x-button.x-button-confirm-round,.x-toolbar .x-button.x-button-confirm-round.x-button-back:after,.x-toolbar .x-button.x-button-confirm-round.x-button-forward:after,.x-button.x-button-confirm-small,.x-button.x-button-confirm-small.x-button-back:after,.x-button.x-button-confirm-small.x-button-forward:after,.x-toolbar .x-button.x-button-confirm-small,.x-toolbar .x-button.x-button-confirm-small.x-button-back:after,.x-toolbar .x-button.x-button-confirm-small.x-button-forward:after{background-color:#6c9804;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c2fa3b), color-stop(2%, #85bb05), color-stop(100%, #547503));background-image:-webkit-linear-gradient(#c2fa3b,#85bb05 2%,#547503);background-image:linear-gradient(#c2fa3b,#85bb05 2%,#547503)}.x-button.x-button-confirm .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-confirm .x-button-icon.x-icon-mask,.x-button.x-button-confirm-round .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-confirm-round .x-button-icon.x-icon-mask,.x-button.x-button-confirm-small .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-confirm-small .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #f4fedc));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#f4fedc);background-image:linear-gradient(#ffffff,#ffffff 2%,#f4fedc)}.x-button.x-button-confirm.x-button-pressing,.x-button.x-button-confirm.x-button-pressing:after,.x-button.x-button-confirm.x-button-pressed,.x-button.x-button-confirm.x-button-pressed:after,.x-button.x-button-confirm.x-button-active,.x-button.x-button-confirm.x-button-active:after,.x-toolbar .x-button.x-button-confirm.x-button-pressing,.x-toolbar .x-button.x-button-confirm.x-button-pressing:after,.x-toolbar .x-button.x-button-confirm.x-button-pressed,.x-toolbar .x-button.x-button-confirm.x-button-pressed:after,.x-toolbar .x-button.x-button-confirm.x-button-active,.x-toolbar .x-button.x-button-confirm.x-button-active:after,.x-button.x-button-confirm-round.x-button-pressing,.x-button.x-button-confirm-round.x-button-pressing:after,.x-button.x-button-confirm-round.x-button-pressed,.x-button.x-button-confirm-round.x-button-pressed:after,.x-button.x-button-confirm-round.x-button-active,.x-button.x-button-confirm-round.x-button-active:after,.x-toolbar .x-button.x-button-confirm-round.x-button-pressing,.x-toolbar .x-button.x-button-confirm-round.x-button-pressing:after,.x-toolbar .x-button.x-button-confirm-round.x-button-pressed,.x-toolbar .x-button.x-button-confirm-round.x-button-pressed:after,.x-toolbar .x-button.x-button-confirm-round.x-button-active,.x-toolbar .x-button.x-button-confirm-round.x-button-active:after,.x-button.x-button-confirm-small.x-button-pressing,.x-button.x-button-confirm-small.x-button-pressing:after,.x-button.x-button-confirm-small.x-button-pressed,.x-button.x-button-confirm-small.x-button-pressed:after,.x-button.x-button-confirm-small.x-button-active,.x-button.x-button-confirm-small.x-button-active:after,.x-toolbar .x-button.x-button-confirm-small.x-button-pressing,.x-toolbar .x-button.x-button-confirm-small.x-button-pressing:after,.x-toolbar .x-button.x-button-confirm-small.x-button-pressed,.x-toolbar .x-button.x-button-confirm-small.x-button-pressed:after,.x-toolbar .x-button.x-button-confirm-small.x-button-active,.x-toolbar .x-button.x-button-confirm-small.x-button-active:after{background-color:#628904;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #3e5702), color-stop(10%, #507003), color-stop(65%, #628904), color-stop(100%, #648c04));background-image:-webkit-linear-gradient(#3e5702,#507003 10%,#628904 65%,#648c04);background-image:linear-gradient(#3e5702,#507003 10%,#628904 65%,#648c04)}.x-button.x-button-decline,.x-toolbar .x-button.x-button-decline,.x-button.x-button-decline-round,.x-toolbar .x-button.x-button-decline-round,.x-button.x-button-decline-small,.x-toolbar .x-button.x-button-decline-small{border:1px solid #630303;border-top-color:#7c0303;color:white}.x-button.x-button-decline.x-button-back:before,.x-button.x-button-decline.x-button-forward:before,.x-toolbar .x-button.x-button-decline.x-button-back:before,.x-toolbar .x-button.x-button-decline.x-button-forward:before,.x-button.x-button-decline-round.x-button-back:before,.x-button.x-button-decline-round.x-button-forward:before,.x-toolbar .x-button.x-button-decline-round.x-button-back:before,.x-toolbar .x-button.x-button-decline-round.x-button-forward:before,.x-button.x-button-decline-small.x-button-back:before,.x-button.x-button-decline-small.x-button-forward:before,.x-toolbar .x-button.x-button-decline-small.x-button-back:before,.x-toolbar .x-button.x-button-decline-small.x-button-forward:before{background:#630303}.x-button.x-button-decline,.x-button.x-button-decline.x-button-back:after,.x-button.x-button-decline.x-button-forward:after,.x-toolbar .x-button.x-button-decline,.x-toolbar .x-button.x-button-decline.x-button-back:after,.x-toolbar .x-button.x-button-decline.x-button-forward:after,.x-button.x-button-decline-round,.x-button.x-button-decline-round.x-button-back:after,.x-button.x-button-decline-round.x-button-forward:after,.x-toolbar .x-button.x-button-decline-round,.x-toolbar .x-button.x-button-decline-round.x-button-back:after,.x-toolbar .x-button.x-button-decline-round.x-button-forward:after,.x-button.x-button-decline-small,.x-button.x-button-decline-small.x-button-back:after,.x-button.x-button-decline-small.x-button-forward:after,.x-toolbar .x-button.x-button-decline-small,.x-toolbar .x-button.x-button-decline-small.x-button-back:after,.x-toolbar .x-button.x-button-decline-small.x-button-forward:after{background-color:#c70505;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fb6a6a), color-stop(2%, #ea0606), color-stop(100%, #a40404));background-image:-webkit-linear-gradient(#fb6a6a,#ea0606 2%,#a40404);background-image:linear-gradient(#fb6a6a,#ea0606 2%,#a40404)}.x-button.x-button-decline .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-decline .x-button-icon.x-icon-mask,.x-button.x-button-decline-round .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-decline-round .x-button-icon.x-icon-mask,.x-button.x-button-decline-small .x-button-icon.x-icon-mask,.x-toolbar .x-button.x-button-decline-small .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #fedcdc));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#fedcdc);background-image:linear-gradient(#ffffff,#ffffff 2%,#fedcdc)}.x-button.x-button-decline.x-button-pressing,.x-button.x-button-decline.x-button-pressing:after,.x-button.x-button-decline.x-button-pressed,.x-button.x-button-decline.x-button-pressed:after,.x-button.x-button-decline.x-button-active,.x-button.x-button-decline.x-button-active:after,.x-toolbar .x-button.x-button-decline.x-button-pressing,.x-toolbar .x-button.x-button-decline.x-button-pressing:after,.x-toolbar .x-button.x-button-decline.x-button-pressed,.x-toolbar .x-button.x-button-decline.x-button-pressed:after,.x-toolbar .x-button.x-button-decline.x-button-active,.x-toolbar .x-button.x-button-decline.x-button-active:after,.x-button.x-button-decline-round.x-button-pressing,.x-button.x-button-decline-round.x-button-pressing:after,.x-button.x-button-decline-round.x-button-pressed,.x-button.x-button-decline-round.x-button-pressed:after,.x-button.x-button-decline-round.x-button-active,.x-button.x-button-decline-round.x-button-active:after,.x-toolbar .x-button.x-button-decline-round.x-button-pressing,.x-toolbar .x-button.x-button-decline-round.x-button-pressing:after,.x-toolbar .x-button.x-button-decline-round.x-button-pressed,.x-toolbar .x-button.x-button-decline-round.x-button-pressed:after,.x-toolbar .x-button.x-button-decline-round.x-button-active,.x-toolbar .x-button.x-button-decline-round.x-button-active:after,.x-button.x-button-decline-small.x-button-pressing,.x-button.x-button-decline-small.x-button-pressing:after,.x-button.x-button-decline-small.x-button-pressed,.x-button.x-button-decline-small.x-button-pressed:after,.x-button.x-button-decline-small.x-button-active,.x-button.x-button-decline-small.x-button-active:after,.x-toolbar .x-button.x-button-decline-small.x-button-pressing,.x-toolbar .x-button.x-button-decline-small.x-button-pressing:after,.x-toolbar .x-button.x-button-decline-small.x-button-pressed,.x-toolbar .x-button.x-button-decline-small.x-button-pressed:after,.x-toolbar .x-button.x-button-decline-small.x-button-active,.x-toolbar .x-button.x-button-decline-small.x-button-active:after{background-color:#b80505;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #860303), color-stop(10%, #9f0404), color-stop(65%, #b80505), color-stop(100%, #ba0505));background-image:-webkit-linear-gradient(#860303,#9f0404 10%,#b80505 65%,#ba0505);background-image:linear-gradient(#860303,#9f0404 10%,#b80505 65%,#ba0505)}.x-sheet,.x-sheet-action{padding:0.7em;border-top:1px solid #030507;height:auto;background-color:rgba(0, 0, 0, 0.9);background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(50,74,103,0.9)), color-stop(2%, rgba(12,17,24,0.9)), color-stop(100%, rgba(0,0,0,0.9)));background-image:-webkit-linear-gradient(rgba(50,74,103,0.9),rgba(12,17,24,0.9) 2%,rgba(0,0,0,0.9));background-image:linear-gradient(rgba(50,74,103,0.9),rgba(12,17,24,0.9) 2%,rgba(0,0,0,0.9));-webkit-border-radius:0;border-radius:0}.x-sheet-inner > .x-button,.x-sheet-action-inner > .x-button{margin-bottom:0.5em}.x-sheet-inner > .x-button:last-child,.x-sheet-action-inner > .x-button:last-child{margin-bottom:0}.x-sheet.x-picker{padding:0}.x-sheet.x-picker .x-sheet-inner{position:relative;background-color:#fff;-webkit-border-radius:0.4em;border-radius:0.4em;-webkit-background-clip:padding;background-clip:padding-box;overflow:hidden;margin:0.7em}.x-sheet.x-picker .x-sheet-inner:before,.x-sheet.x-picker .x-sheet-inner:after{z-index:1;content:"";position:absolute;width:100%;height:30%;top:0;left:0}.x-sheet.x-picker .x-sheet-inner:before{top:auto;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em;bottom:0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #bbbbbb));background-image:-webkit-linear-gradient(#ffffff,#bbbbbb);background-image:linear-gradient(#ffffff,#bbbbbb)}.x-sheet.x-picker .x-sheet-inner:after{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bbbbbb), color-stop(100%, #ffffff));background-image:-webkit-linear-gradient(#bbbbbb,#ffffff);background-image:linear-gradient(#bbbbbb,#ffffff)}.x-sheet.x-picker .x-sheet-inner .x-picker-slot .x-body{border-left:1px solid #999999;border-right:1px solid #ACACAC}.x-sheet.x-picker .x-sheet-inner .x-picker-slot:first-child .x-body{border-left:0}.x-sheet.x-picker .x-sheet-inner .x-picker-slot:last-child .x-body{border-left:0;border-right:0}.x-picker-slot .x-scroll-view{z-index:2;position:relative;-webkit-box-shadow:rgba(0, 0, 0, 0.4) -1px 0 1px}.x-picker-slot .x-scroll-view:first-child{-webkit-box-shadow:none}.x-picker-mask{position:absolute;top:0;left:0;right:0;bottom:0;z-index:3;display:-webkit-box;display:box;-webkit-box-align:stretch;box-align:stretch;-webkit-box-orient:vertical;box-orient:vertical;-webkit-box-pack:center;box-pack:center;pointer-events:none}.x-picker-bar{border-top:0.12em solid #06346a;border-bottom:0.12em solid #06346a;height:2.5em;background-color:rgba(13, 117, 242, 0.3);background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(158,200,250,0.3)), color-stop(2%, rgba(47,137,244,0.3)), color-stop(100%, rgba(11,101,208,0.3)));background-image:-webkit-linear-gradient(rgba(158,200,250,0.3),rgba(47,137,244,0.3) 2%,rgba(11,101,208,0.3));background-image:linear-gradient(rgba(158,200,250,0.3),rgba(47,137,244,0.3) 2%,rgba(11,101,208,0.3));-webkit-box-shadow:rgba(0, 0, 0, 0.2) 0 0.2em 0.2em}.x-use-titles .x-picker-bar{margin-top:1.5em}.x-picker-slot-title{height:1.5em;position:relative;z-index:2;background-color:#345b89;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #85a7d1), color-stop(2%, #3e6ca3), color-stop(100%, #2a496f));background-image:-webkit-linear-gradient(#85a7d1,#3e6ca3 2%,#2a496f);background-image:linear-gradient(#85a7d1,#3e6ca3 2%,#2a496f);border-top:1px solid #345b89;border-bottom:1px solid #182a3f;-webkit-box-shadow:0px 0.1em 0.3em rgba(0, 0, 0, 0.3);padding:0.2em 1.02em}.x-picker-slot-title > div{font-weight:bold;font-size:0.8em;color:#0d1116;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-picker-slot .x-dataview-inner{width:100%}.x-picker-slot .x-dataview-item{vertical-align:middle;height:2.5em;line-height:2.5em;font-weight:bold;padding:0 10px}.x-picker-slot .x-picker-item{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-picker-right{text-align:right}.x-picker-center{text-align:center}.x-picker-left{text-align:left}.x-tabbar.x-docked-top{border-bottom:.1em solid;height:2.6em;padding:0 .8em}.x-tabbar.x-docked-top .x-tab{padding:0.4em 0.8em;height:1.8em;-webkit-border-radius:0.9em;border-radius:0.9em}.x-tabbar.x-docked-top .x-button-label,.x-tabbar.x-docked-top .x-hasbadge .x-badge,.x-hasbadge .x-tabbar.x-docked-top .x-badge{font-size:.8em;line-height:1.2em;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}.x-tabbar.x-docked-bottom{border-top:.1em solid;height:3em;padding:0}.x-tabbar.x-docked-bottom .x-tab{-webkit-border-radius:0.25em;border-radius:0.25em;min-width:3.3em;position:relative;padding-top:.2em}.x-tabbar.x-docked-bottom .x-tab .x-button-icon{-webkit-mask-size:1.65em;width:1.65em;height:1.65em;display:block;margin:0 auto;position:relative}.x-tabbar.x-docked-bottom .x-tab .x-button-label,.x-tabbar.x-docked-bottom .x-tab .x-hasbadge .x-badge,.x-hasbadge .x-tabbar.x-docked-bottom .x-tab .x-badge{margin:0;padding:.1em 0 .2em 0;font-size:9px;line-height:12px;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}.x-tab .x-button-icon.bookmarks,.x-button .x-button-icon.x-icon-mask.bookmarks{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAHC0lEQVRoBe2aW4hVVRiAx8t4qXFMvGZGeLcblUVWdJEoiTIhI9KoHiIyKyh6SOvBh166vPTQQ2IXkKyIktIyLQzLUoMkSbKoVEwtK2+VZWrl9H3bs4Y1e/a5eDxzDsycHz7X2muv9f/r//+11p6zt91aWloaupJ070rO6mvd4c6e8XqGO3uGe5biYDck188y1LOGeuS3Hvs8AVrrWZ0LtUU27VbIbrCRlMVsluQwBptgHEyHS+BcGAxBDlLZCOvhY/gQ/oD/oFxxuw2Fy2AKTIIJ0AuUf2EbrIF18A7shcOQX0xCPhh1KsyEVWAES+U7+j4Co/PpLtTOOB2bA7uhVJu/0fdZmFRQd9ZNBvWB6+AjKNVgVr+vGX8fNEO3LFuhzftgRu+HrZClr5S2fYydC8Ohe9AfynbZpdPJ8CTsgSwDLiWXjcs4cIj6P3AUssYsoH0kZDptO4yHFZA13rYjoJ1g8+9cWz6bn3D/UmjjdDIBGhPhoOhL5WmYBY1J47F/gkGNfAEb4Ptjt5J9ehp19/XF4N7uDToRxL28Gu4m0mavVXKH02ganoGprTeOVXTG4Bp8HdgEv4L7WxsT4WoYlLvuQRmLc50Nn2NXHwhnbg9T9QDTWTMYR9nM7YTH4WzoDy55HQp4kPQDHX8AvgEzEuuxvhD6BZu5OZxO23JIZ8rxHkj3wDBoApMQbOq0q3E43AKr4U9I61lP25hgM3GYBpVMASMZT/IvrpdCwYMgKAsl/UfAc+CKiPUZPAPXI+esWZqf6mP//eD4gUFnsZK+JuEx2AGxTesvQHNiM2fYCfooiTsaYU+9IcWMZd1nnBl4Anw8xXpdkpPB+zMgvaJ09mHI3O9ZtuI2xt0EuyC2adZd2tpM9oKHVNzBTLwKJ8XKyqmjw1PXgybWv5LrK+CrVPsBrm8rx048Bh3T4KeUbgM9CZI9kI7Il7SPjZWUW0ePS+098OAKTptF92ccCIP8FPQs11YYhw4zOQ888IJNy9eh4cZUo0tsdhhciRJ90+GXlJ14ItYN8qhK2FMH0gye7LGdI0aiF8RipN+IGypQfxcdnxXQo81lTHRrgT7HdQtdnh2LUoMadTgJR3TDa5daxQTjHoBvgqd+lvjYW5Z14wTb2vmRnFoZSn1MVVqWoNBHRloMsEtvXfpGBa7b+ZHP4QrYaqsit8QWt21Nrn7n35e576Ojw6VqDuc8WUuZdsy95oldFam2w+7ltBwlu/5FVhWptsPt9lRVvIyMVNvhyHRtqnWHaxP36lmtZ7h6sa6NpXqGaxP36lmtZ7h6sa6NpXqGaxP36lntchn25XtJkvtC0JfOvhLyxVz8Q8Af8f4SksP8+vGVTUUk9zVEm841/TrKn5q+qNNmSb+4ijqMwQEoHA5nwjlwBoyHeHX4RnI7+PbzW8b4iWMHk/iZ8riF8QZUm+PgPBgDg8EvELEc4sL3YNsYs4FyC+zCrm9FMyWfw4dQ0MSIa+F6uAb6gxH2c0c60jQl35XMrFl2Ip+iYznlKibgpIoK/Z3PRXADTIFRoPPa9F4PiMWV5Qcz7WrTd2YfoOctSl8ZOZd24itUBwZcGnfB27AbVOLSCfdLLZ3APlgLD0JvmAzx+2l1bSEgFMmHsYWUm8G3IOkvEqXadb6+dPcD+SuQHpe8M44bde5HcMJxe1y3T0AHCgXE6DsBjT8EaUd20nYnuA0MdiFd3tNeMZvO1b3tx7V43i0ePGY4/XLNTvGhxGWDX9j3ghnbAlvBfhofASPB5egydN93h1gMoJkbEjdSNwDqHQTpJWsAfMm3AQyIifDaubmtxsBYuBAc3wwFxX2RJbGzLmv3w4uwHpy4WZMg6hH323i4AybDaAjiPUmL44amGn2fvBH8ILAEDJQZMzhmWXGOjTk8b66EaXA5DIO8YobbpD26XkHdyRu9Xu61YtBPB8ywE1gE+yGf/qz2TfR/FAxWUzF74T59DeZAmAFrIEu3be32sI1Ocg64RMr6uMU4l7TP7anwA+SbQGg3c/NhApQU3OBsXDLWgJvhueAqDPpD2c5h9+pM6BMrKreOHidwFbgHg9F0qbMvgSuprO/C6fmhx6fCLNgDsb02Duvs7dCYVnAi1+jzMDofXK6x8VB/nvZTTsRG1lh0erDNBvd/sNXqsI33QkWdDRNBr0vc88KgBuOWK2Fw6FfpEt06vQB8mmiv4eZc5X3KAZU2GOtDv8t7HriENe7z+YK4T0fUsXEW+GhLHL6VymaY2BHG0jqx0w9eA4273Nr8P6p0/0pcawOmwEEj7jNvPoo9VDpcsHOAv3VdYp7gS7k22x0qORv+jb3Yh/co2E+jj6KqCIZ93PnM3I5d91ZVBLtjdVj8gyJZ39WwjOHEZi3stvmvh9VwttY23MxdSuoOd/Z01zPc2TP8PxKYOEKWmL1pAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.download,.x-button .x-button-icon.x-icon-mask.download{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGb0lEQVRoBd2aX4gVVRzH3V1dU5JMk9Q2wVxCo0QNTYRYS4l6CBFBomA1qjcjSOgPPUgR0VNBFBT0Bx96qAiSXipCH4rKIhGNUqE2SK3MqKwsLbXPZ7rnMo73jnPnzF6v9wefPefMnPP7/b7z58yZudtz6tSpMaNlPT09E/DdDxPhMpgNJyBtfTRG4AAchePk9BflqFhP1YIRqbCZsACWwjWwGIrYZ3TaDZ/ATjhIfh6IyqwywQhdRlaLYBVcB5Mgxn5n8HbYAjsQ/lGMs/pYz3AMOFLgG/AzeH+MBvo2xqqYXB1bSiyBe2EJvAaH4SSMhtC0T2MYy5jG7i0jvmXBBJoMj4D3VjuEpkVbN6axzWFyq6JbEkyAhfAqOJtmE2l32xzMZWErogsLxvE62As+Vtotrlk8czGndUVFFxKMw41wEM7FJdxMbNhuTua2sYjoXME4cVHwEDhZhACdWpqjufblCW8qmIHOxHfCT9CpIrN5mas5N53B8wS7kPgKOumezQrMts3VnJc1O8sNV1qsmq5k0LNwI3hZx9ovONgEPk4amcvRR+HiRjtb3KborbAB0fvOGJs9EnRwwf88HIHsESzbVuisbKzQdh/Yp6z/7DhzV8OEECOU3qd148z20FgDK+DC+o74in59Y2pm7rNPVWbualhT01T3e5pgts6D9eARrzIB3LXVzF0N60FNdasL5kj0sXUtzIf+eo/zt6IGtaytaUuU1AXTugKuhyomjsR5B/xRi5rUllgimCMwltYQzAHr3WJqUdNQTWOyuFDcpbASptnoMlOT2tQ4phfl3uBzwes9byZl93lpalLbXLV6SXtzr4BuPLvISkxtauxX8DjwW5Qv9t1qalPjOAX7vJoB3TRZIec0U5saZyl4ELr57CIvMTUOKngAqlxGJt478I8aBxQ8Hbpxds4eczVOV/BUuCC7twvbapyq4Ha8JPQVOIBF+hRwk9slWVLm9miy8xjbj0PRA/YHfU828eVm99mnyFziu6/9XT+Mh5as7KPIoE/BB/BPgYgeoP05/dx3OxQR4LrBF4IHoWUrK9j7wZeNzXxJGGk5amYAPvyovj2zuWGT1eEcdjwOpeYdL8mytpyBr5BAW5akroOxy4n5MiyFUqZg78W8+yvPsZfWEyQy3WzyOsbsq/n2Q9+TYMwypsbjCj4EXlJlzPHDcD/48W+0TN8PgF9kyh5YNR4y4e/AGbKsOVveC8OcCSeUSg2fir0H7oayc445qVGtY5bBHnDmjeFXxt8GY8Mn0dhSX+Ds/RvE5OZYNao1eQ/+kNJrPNapoocg9/edIgdCH3AL6DM2L7WpcZqXtKd6L/wJsXYRDl6ABVyK+i5ltbGLGfw06DPW1KbG5NY1MS+bbyD2SIbxO/G1HFo+046BG+ALCP5iS7WpsTf5MY3KPPgYTkCs8zD+XXzNLHL5hj70dwb2WbsNgp/YUk1qm2ecINh/MXoMfoTYAGG8gV6ES4Kgs5X2hZegivkk5KEmtU2qC04q/082u9gROlZRmvgmSH6lzBNMHx9pJlZF3LQPNQ2F2PXfh9noEvF18AGdHhBb/xd/d4SAzUr63AX2jY2XHq8WNU0LceuC3YCtBiecqgP7HF0XgmZL9m2AI5BONrauBrWsTsfLCnbV9AxU8ezLJnwAv2vSwa27DX6AbP/YthrU0p+OeZrgWgLO2FvB99zYoNnx+/B5dUiA+kL4FrL9YtvmroZkZg7xEn3pRqjTcRhGIDZwo/E+rpyNZ4D1Rn1it43gdzjoSZdnnGF3Yq5h74Oq76sg5D18b4PQrrI0Z3NvuKZvKLgmegqDNkPVs3aV4rK+zNWcp6TParreVHBN9ACDt8DfkHXeaW1zNNeBtMBsPVdwTfQgTt6CThZtbuY4mBWYbZ9VcEr0mx0qWrHmdlaxiZbsEWjWxuFkeBhcm7pkPNeXtDmYizkV/r/pQmc4HAQc+934ZtgBVa/GWjmAxjYHcxkf8itStiQ4OCTIbHgO9kM7z7axjGns2SGfVspSgkMAgq4EZ0b/i3U0hevbGMZaGeKXKRv+cylOCxufY/xCcS3cCl5ii6AXqjCFeum+A2/D54j0Pbu0RQsOkRHu+6zP7avgJvDsz4VWxStyD7wPrsi+hP0ILfIbFl3zrTLB6TCId3KbCK6X58MSmAOuocW69jUcrmH9U9gF38NRRB6jrNT+AwkLDdxcvfCRAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.favorites,.x-button .x-button-icon.x-icon-mask.favorites{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFfUlEQVRoBd2aXahVRRTHz/Ujv+2mZRGZB7W6mtpFikC7+UWUZiqBD0JPFdRL1EMFPfjoU4baS0FUD/UWZBEVShA+BCpmWApRSkgllNpDmZWZt9//eOay72afvWfWOTPn3rvgz8yeWbPW+s/XmT379AwODtZSSQ+CryVgA/gVfIx/pelEhFMBVlvBOaBeFo6Cean8y09KsnMg932TqCOs9M2UhMfhMJVsxtHcAmcbmekLCsqjFKUkvAYG1xSwmEHZqoLyKEVJCDOCNxH9HUCbVl6mULAuXxjrOQlhgl8Bbi0h0Uen3FBS37GqVIQHiHh2SdR16jTlo0t0woycpuxiUDSdHcFeMv3uIWYanTDB3wIWVZBQHP10zuQKvbarUxDWT1HRz1E++Ds99fLtgp6jEmbExhPNcs+IbkZPiCpRCRP5TPCQJ4MJ6A3QSUqjSWzC2ozuC4j+fnSnB+gHq8YmvJKIJgVEpRPX9QH6waqxCa8PjEhHT981H2j6qno0wqzF63BhOUxsom3Zb7aJqGsUjTAONFJlpysXQz7VuXpavrBTzzEJaz1adlzNjHs6RTBvJyZhjZTF/kTaWZZCnlvhsyWgQkPZQpagzsX1bFlAXjGtDdAPUu1p3PPQhCCXkdwG/mta0PWLds060AuAnqtEOjpdbQR3VymX1P9F3UfgGJA9X9F92c/ADaQ2P8V0DJ4/kDbeYKaSvgI2AN0+OGJK1VAbSIhTOXEOybYll2kte77yD4rqrHyb85S9Cl4HtReAyI11/A7HpRq5PSD6oR0f3Rad+H7S1DvV7UgS+tc1cU3n3V/AWJ/SX8BxVuMinow2rNNjlPQVeH0GFg378kDBfLAPXARjZbTPwmUXmOG+bgz71EKFfqKeAUWfREZbJxyCxyOOqEuHER4qrNUWovwy0CFktBHV4eNZMNvxyaaFhKWAaBt/HJwEo4W0luSKLMF8viVhp4iBeeBd8CcYqcQ1qi+CKS7uVmklYdcQY0+C42Ckkf6EmO51cVal3oRlCFkCdKgfCWtbo7obDO3AVWQbHHyUsjo40E6uq9cvQbdG+wN892fj8s0HjXDWKA51/t4JUo72H/jTDtybjSUkbyYsJ0gdfAtSjfTn+JoWQjCv2+57a4M1QaQSvZvrMsIs7RJejGcdUlLJUhzpZsYsZsJcCen6ZwCE3IaYA2021OfUdU3fJltmwni7Fvh+KDMF16KR3ux0lWuSdgjPxeNdJq/tNdKNqJaSSUyEmVK6JNPomtqbIh3eSKNsEmvAarfJ5LEzjbbR59MtpqyEb8eZjpndkhtxvNri3Er4YZxpx+yW6Jdhi8V5MOHm+n0QZ9afo0u0fQO8A5S3iPaQ1cTSG9w4f/SqesZBH/gRWI6T+gyyxfkgvw2cMdrS+/lTzpZvGnyWxsnTwHLRd4R2a/OBqQyoztKBe/P2qp6DCBOUptKHhuA+pU1fq2Co0/F0L9CVaghxXTbWW9ktKg8lrFfCrwODeh/9wgu1bEDo6OT2Fvgb+JLWq+nQEsnaa5UPJbwKBxc8A9KXPG1O3u+u6E4F24GvD3XMDjCxFcF8uTdhjGpHfwn49L42lCeAdyDZwGi3HpwAPr6+Q29htn1ZPoSwfuz3ewShXVcBNz62lzkvq6O9DjZHgQ9p72kdQljvob9VBPAN9Q+UEQmpw5b+Sf8e0FotI/4a9ZN8bIcQXlnh9AD1y3ychuhgU0tpJyhb14epn+ljN+Sk9S9G1ct50d8SdgF9x9EO3lHB5hXwPEYfA8dbGD9LuWZBtfj0inSQWUDTKzu1dAB5Dkz2tdOOHn70LvwVyMag/FYwzse295Rukq5j+G1wEOib66PAy5FPMD46+NPmqTV7CpwGGvkJPm2l8z8GWDNDloqpGQAAAABJRU5ErkJggg==')}.x-tab .x-button-icon.info,.x-button .x-button-icon.x-icon-mask.info{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAHOElEQVRoBdWbXYgVZRjHXdf8ysjUQl011lbRIFEjM6Uu0iyiEDG86EItKoIuuhDJCgoioouugqKbgi4CKwulILG0mxLTUtMyTWQNPzLTPszU1cx+v+OZw9nZM3POmZl3zQd+zMz7zvs8z//MvF+z2nLhwoU+oaylpWUQvvvDYGiDdjgP1dbKRSccglNwlpxOcwxiLUULRqTCRsNUmAk3wS3QiG3hpp2wCbbDYfLzhyjMChOM0FlkNR3mw61wFeSxv2j8FayBrQjfmMdZpa1POA84UuD7cBzsHyHQtzHm58nVtpnEErgvzIB34Rj8CyGEVvs0hrGMaey+WcQ3LZhAQ+FZsG/1htBq0Z4b09jmMLRZ0U0JJsA0eAccTeOJ9Pa1OZjLtGZENywYx0tgDzit9La4pHjmYk5LGhXdkGAcLoPDcCle4SSxUbk5mduyRkSnCsaJi4IV4GARBSj6eALfR8sxunLEMUdzbU0TniiYho7ED8GvULRI/UV9cDbnrsauheXQCVnjmas5J47gaYJdSPwAIfqsPlfEnwRl/eBBOAlZROvXnGfFfUfXNQXTYCKsg38gS+B6bT6MEogfiTcKNuaIa87mPjHu2+segrnRBf8bYN+ql3jW+ntrJVNK6OJGw+VkVt+2M3c1DIrHsZ9WjPVwCxcLYQ4MqVQUf/Jjikt3VnnX4eauhoVlTZVw3QRTOhmWwjhQfCi7ppZjkjOf62FCrfomysxdDUtBTRWrCCZYK6WLYAo4aoa0JxKcu2x9CsYk1DdTrAa1LCpru9g2ese58lddD+cgT/9ppK2j8ONR7HLf9Um8B0XOCmpR04QoVmnQosDp4BHYD40kXMQ9zsPfgSI/hyNQhN+4j/34VVu/0g9b/nXbKFgJf0O8weV+rSa1tam1b3kUm0SB77sj5KUw18OhTE1qm6RWBy07t0O4S7veto8J6FLwbng+YHC1qbE0GDtnrYXeGKzsHj7NT2AejKgMJn36DODaASZEF1KbGof4hJ2vXM45cIW2nwjwKDyA0HXgDicyl4RpC5LovixHtalxnCcd4PwX0hTjcvEFRO5ICBRyoWNINXYo2Ek+5DJyP/6fgZWI9XVNs3r1aW3r1alxjIJHQqjR+Vt8L0fnpxzrmU+45pKzXsMG69U4UsHDYWCDjRq9zYFpCzwGLi5K5qyA+KQpSMHt5VtDHNQ4XMEh+s5R/L4CuxSIUKeDO8BX1pG4lrlDmlqrosCy0jxcoL+KK5PvgFbEOka8CKsgbRd0u/dDUPMJh7ArcXon/A4PwwxwyvkKkuwuKi5bwYqaDbdBNAP8wvn3kGQ+4RDdq1u8UE/YINUjv313L/35bLfo5Qte+xs5va5WXdFlrrRMImnkLCreaRxtSnE2i7q8n3VS3Jeq1HhWwY6o7k1Dmn/r3ZgSYCZ1g1Lqi6hS41EFHwC/QIQ0P5D7vbiH8Tq7DnD7Frr/qvGAgvfBnxDSNqcsOJx7Xe2FNjXuU/BeOAah1rHn8f0FJJkDlk85pKlNjXsV7KPeA34KCWUuM5OsN760qE2NJxXcBevBfhbCOnFqsB5G/72aQj8vVVuIN01tauyKFvPbuHBhEGJ6+hK/SSLaqBsPmrFfhZe9KND0q7ZtjiM+Ye0guIXzPS/atuPQflzLxlI4Go6AOys/wq+Gn6EoU5Pa1Fj6G7Dfpp0nfeT+EkXaOZx9jf+kJ+xqbAPcxy1vwhnOd8MuKMrUtB7fauz2HcsgBuuAQVCEHcLJ8RRHrr42kExpWqRPu3mYDTektGmmyhVe9x+QYJU/mVK5AHwF/QblU8nLWnyMrY6Rds69T4Kvd964tleDWhZUx6yItRBzo+7A8QcUEXQVfkZVB6x1zj3GfQ587YqIqw81qKV/dcxugsuiJ3OT/cr+lzf4S/gYXB0wfk69HwX8YRxN88aL2pu7Gib3iBcv8BpbDJ0QOch6fB0fNf+1HOVXwD2wE7L6T2rXic/FNbXVLLw4mNmfTuRMZi/tx8djUDYHPgAHlaSks5abs7mX/lrYI3a8ILqmwTB4G9xWZQ1uu7egHQbC/aBQR+88PpPamqs5D4t0xI89+nD1DTT0A9waOANJQeqVu+j4Ddx3u26vd3/WenM01zHVGuLnqYK9GXNeXg15RGcV0Wg7czPHjrjA+HVdwVWifRX/j6LNydzqii1pif8CSdc4HApPg0u1IqeQRp9i/D5zMBdzqjkT1NLS0BOOGuLYv+E6lWyFolZjcSGNXBvbHMxlQJRfI8emBEcOCeKo+xq4A+nNp20sYxq7PcqnmWMmwVEAgs4FR0Y32CGF69sYxpobxc9yzP3feMo7nJtJxDnWV2w6RPtsTnOZQn1118JH8A0ik/bWVNe33IKjEAh3qei87Ue5eeDTnwTNilfkbvgM1oHb1oMIdX2c2woTXJ0J4h3c3NyPgikwA9zjjigT7Xf3ce0XCfF8M+wAv3icQmQXx0LtP/qKurS9uZqyAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.more,.x-button .x-button-icon.x-icon-mask.more{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAADJ0lEQVRoBe2YS2sUQRSFp5MgvmLU+CAMiBJFDBHcCeoPEFciuHMjroMK4lZBcONG0JW60U1UEgRx59IXuNMoKEElKL7GRwyIqNHxO0N66FT3UNU9IHRNFXz0VNW5t+vW6RcT1ev1Sie1rk4qVrWGgn13PDgcHPZsB8Il7ZmhqXKCw6kt8WwgOOyZoalygsOpLfFsIDjsmaGpcoLDqS3xbCA47JmhqXKCw6kt8Wyg6XAURV2wEy7BM5iFtzAKu2BB0dqJ7YEtcBYmQblfwzjshUVt5O4mfhjOwwQodw3GYA8snpd77n9pFXMYvoP+qDaZZewcVKXPAzE64Qn4CmZe9f/AFSiSu4e4IzANrXJfZ24gXjO/KxEcg9+QFZQcU/CSONh2RKsraMQhr85xE/psOeN5tCr2APyA5Bqzfl9D06tYtX3wC7KE5pg2ZX98UtsR7XZo5ayZW/1DENnyzi18CO1nyMqTNXYcrTapcitHkBLJiZW2RaGRuxcg6+Stxu6i73fI3Y3uZM7cU+hXQeVvzsBP6Dc5LupxztzaiEGH3AvR3S+Qe4dc0D2cp/Uj1oPI1pR7g030n+erWlTe9pMA3cu2Jre+2ERtzBdZe01BL3Ke9Al6vQZsTbfKQ5vImH9PXxtqa3qVPbWJjHk94J6r4DPGhK17A8EHm4j7UAWP2nTG/GX6NWMs1SW3rrCroLeLaxtDqDdG4368zbHVkzM5Polus+2hEs+j7YNxx9zv0FkfhoncvegvOuZ+iW6rYhtfTXTWgV7OyeLM3w+Y3xaf0PVIzAqwFf0IzW7XnLGOmLUg58y1JvsTzA83Y5o/eLcyMQISJAN0z56G9bE275HYNXAU7kAy9xv6p2Bj3pyxntjVcBDuQTL3FH19Dg/FWh0bXzUMNhsf23JkOQzCK9B1P4NY39OFG3kjgpeB8g/AR/gG0+3mJkeF9Lp9lkIVZkDfC1r3vPs8VTAir1uRd1mpNyQUXGr7HBYfHHbYpFJLgsOlts9h8cFhh00qtSQ4XGr7HBYfHHbYpFJLgsOlts9h8cFhh00qtSQ4XGr7HBYfHHbYpFJLOs7hf5j4Vg3iLoGkAAAAAElFTkSuQmCC')}.x-tab .x-button-icon.time,.x-button .x-button-icon.x-icon-mask.time{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAIPElEQVRoBdWae4gVVRzH97qr66vyhWbmurY+MA111dRMkLIXRuhG/pMVSUKGBGYPMTLDR0iaJBFUlIp/FJJlpWJS6vrAlCwTe1iaippSZipmPjL7fC/3XGbnzjkzc3fudTvwYWbO73d+jzlnzjkz96YuX75cUqiSSqWaYVs0hvZQBY3AW/7gYg/8A+fgPDFd5FiQkko6YZJUYj2hNwyDAXADlIOrHEO4A3bDVvgZ9hLfBY6JlUQSJkn14CAYAiNgFPh7kqpY5SDay2EjbCfxo7Fa25TVw/UBuw/BWvgT9HwUgl3YnQXX1ydWtc0rWRyr9zRcV8FpKESSfpuX8LMXnoDm+SYeO2GcXQfz4Cz4gyrGtSa3TaDHp1HcxGMljIN+sAGKkViYj+PEMRkax0k6csIYfgoOQVggxZa/R0ydoiYdaZZmFp6C0ZmgNTVu0YSzBQ6A1tuTYEqKk5ugA/SFkdAU4pbVNHiYpLWmu4vrztBSy83TcAai9pyeba2lz0E1tIFysD5vyMrgKugIY0GToW5MVJ/SWwltXPlIZh3SNNbdV9B/QRTH59GrhQehSZhjl5z2pucXc/4rRPEvHfV0B6dtm5CGI+B3iOLse/SehVgTiM23tx6bGuafwb8QJRY909ZlK7CHadATtOZFcfAmel28QSZ9jn0914/AYQiLScvW45Cen/yx5CSMYhNYA2GGtdGfDS38Rm3X6GpO0PNsKLPpBtXTbij8BGGxaWQODrThr0RxEuguuYzqeZ0Opf72tmt09TKxHU57+JLz7rY2QfXo3wpRkt6MXs7QrtPDKHSDfeBKVpPYjKBgXHW0mQVBz+HzrnZBMuwo6b3gilNb0Yn+9v6E30UpKCiv4WnoBD4ffuPea9q8YrE91asX9Rxb2loeBG9s/nO9YlZ6bWZf4dhc9EB4B2hJsBXtYd/AgAzHLfm0cfnYhvBlUE/aSlcE473CdMIkqyTvhU5eoe9cE8E8cvXulHwqxbvM3PRFeFzn8FqKbDTpdTQ6pof1BlQDtt5V7yzDySemYUM4Eo8mz4WgFwlb0RJbbYQm4e5U6JmwFe125tiEV7KepLWlFJp7goqW2WH0spbEkkacqOJ+UPfbylIMK+mGWl4lsLOO4DR69Tynv1y04DhSF5aiDcY7FllDqdbLSq0jmB7IKiXXkNYDrXFuK+sRHLMJG0I9o09zzEeOWDQ3DWI0lyphPbuqsJU1CFzDxdau2PVfhMSpiaupEh7uiEyJfsUNtE0IjqZFF2mmdi1R+j6eTriLI7T9yLT+/h/KBYLUHttWtPSWqYevtWlQfxjOOORJiJIaPRcJ5pAjIC1LnZVwL4fSEWSFTvhqh//IoszEtSekQYUSdpUTCLUsFbI8wOw5HvRNq75Fb3LOEpawa/Z2Gg4Q2mxpjdQ6v4KkBwa0i1Nl85G1EZZwVjGBE/Mx0GbqNgQfkvQECA3cZiSkPqWEtQG3lQoEiTxj2FkCW8E1SXVG/josJecqjnGLNlGuck4Jf+PQaIcsn4/vOSaZVLTE3Q0LwLVz095en3rXknQNlHMeWtBTLl1DFHdIri2ZtmZBaFnqo51bkmBT79660UE+vXV6DOZCVZh/dJrDUvC2956fRtYeSmaAV+A/vy/MWT5yfGr4PQNa9vw+/df6VDMRrB8NkWk0/gL+tuZ6G7JroOQeh5KU50Csz6lRbwB2NQyHwhYI+1Kqbe770D7IPvXaOmp+MAn6j5pDmkH6hywZ8yuY653I2gY5SaoO+y1hKujHMOPXdnwJnZwOoG52SNsJildFzlaCzYHqRyWVnMsOfsaAetsVyzTkdX674lrP7z5HO80F/U3CGlb6G4HLSS3ynLvqCj5fGX5ag37o/g38MX1HXc6Qzui7HolPTbv07MtFPzgKfgfm+m9kY/JNIp92+BsCmmhMDJrcJvltUaeXn689ekbfe3wSefrnWpOw9rHa3nmV/OebkLf2OyzkNf606XkNDsLbkPPrJHUa4hfAH6+51kipNnFm11cqtTa6Gko20zRsCEfiuREOgEku6LgKeXY58yasRTlsaGgjkr1bVzJp4tDHx8UQlKSp0+ozzhtnNmFVUh6DsI3At+hUeo0U+xz/KVgIJjHbcTU6dR4Df8Lat34cwdAGdDoWO9FMp5Tiezq4Hj/dAHVceinyxlkn4YxB7ViibADWo1fUnsafOmQW6KOErVdN/Yvo5PzKmZNwJmmtg6ah66gXgAHeO1ioc/y0g7kR49qIXqugWGwJl9EgyjOim6GJbCaE/mUoKIAoddgeDdvBdfONTDuuXja7gQlLmdIKwrZ5xol2ObqrYyC7BNicRq3HVm9YBPpUbHy5jifQe9Rl35pwJunBGNgV0ZkC0Z5V29BR0AHKXc79MvS1zdVmoy/Mg+PgStAr0yQ1BZw3PP1Qo2QtfEnQJLYY+liVggVHqF4O60DDXjsezax6ETf7Xo0iTUQ6toZb4Ha4E+IUbX1f4AbOD2sUmrAMkLR6egHo3TWfcopGO0G9oG2ieR2t4lw92g0qIZ+iz0XzSVYjIrz4h5XtGkvqgagTmXeoFfJcb0+B/8ey5mETBNVjvClMhjjPViES1s8qy6AiKE5XnXPSCmqIE23rBsIK0PNYiIRcNn/E53jI6/08dsLem4DTcbADdMddQSYh0we6t6BeW9pIkxZOrIUJrS3Cm6EG7gJ9TE+qaFbXLP8BbOZm76mv4XonbAIg8ZacV0B/GAvDQRNdPkVfOvQe+znsJ1HXh/tY9hNL2OuV5PWu2hyqQZsIra/6FCO6gClapn6AU7AbtDfXxuUknCHRSxwTLf8Bgi31NJnvpzwAAAAASUVORK5CYII=')}.x-tab .x-button-icon.user,.x-button .x-button-icon.x-icon-mask.user{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAEWElEQVRoBe2aS0gVYRiGO1lmF8nQQlETutGFokAiqEV0ISKwgmrdMtzUpnW7drWKbFGbQAKpJIhuUGIUFUkW0T1Jq4V2U4ui7GLPexpDD+ecuX1jHqcPHseZ+f9vvnf++e8n0d/fPyZONjZOYqU1doLHRV3CiURCz5gMxTANJsJg+8XJJ+iBt9BHNdO1SCwRZR1GbAFRl8F8WAFLoRwGLME/ffAM7kETvIYPxPWDo7lFIhiheURaCVtgBywHXXOzbhJcggZoRvR7twy+76uELSEAtQsqySPwGdQN+KWDPHuh2DI2+TIVm3T455M9G0Bk6ktRvd4NBZaiTQUT3AQnSNW/VAFBzl/iZw0kq56FcOtuaQHB7QIv9ZVkrqZ2YA9Mck3pMYGZYKeh2sBz1SJb2mqcmfk0E0xQ6l9rwNoKcWjm11JwEYFVW6t1/K218mspeB5B5VsFluKnIuU88Kml4PGBo3DPqBGZiVkKNgvKRFkGJ5aCv2Z4xoi6bCm4DWUaXERhZhMJS8FfolDq+DSbRFgKjrIOa8poYpaCTQKK2sl/wSHfcFSNlll1sSzhn7ys3pAvLFP275lu+L1uKVhBPfYbgMf0zz2mc01mKfgbT7vi+kT/CeT3sv9s6XNYCtbg4CJ0pX9U4Kv3yXk3cO6UjGaCWX5Rg/UArqY8I8yp1qdPQ08YJ4Pzmgl2nCqwc2DVyKjunuddqkE0MVPBBKYSuQ7tJtEhFj9apDczU8FOVB0ctZiuHYUw9obMjbxErW2bmblgApTQengVIkq1B83QEsJH2qzmgp2n3ObYCEGndZ3krbcuXcUWiWACldCjoA0yv6a8J6HJb0Yv6SMRrAcj+gmHA+B3aneDPHXk/8jR3LR3a2rOfnAlTmfDVPDb6Khrq8bPDI5PoRPxZpMSk+1SgtOKpTa8l8BC0JaLmAkloA1xr/aOhJqEtINGWeqW7jjHXrQHbRdw4WxSJf8L8Aeh2m1QaWoBfiUsA61PTwGtUYeZ1qlP1zhan3YraBSnz/0mdAUVHqiEESoxKs0a2AxloJIMI5DsWU0vQH2z2oZToAnFI7+fu2/BiF3PgzbCKqgC1bXhNH3S6rba4BocR7TquifzLBih5XjcCSrROaAGKbJWHt9uJuGq67fgAki4zrNaVsGIzCP3dNgE20B1VJ+uro8UUz3Xr39UvxugCeEZl3UzCkZsBZn1+W6HRaB6qtZ4pJp2PtTna+58DFoR3sVxqHFxyM8euFsIW6EeXoDeoPrBXEEbAlpqqoN1kD9YY6rYxSQ4DGoE9KOSXBGZLk4NYB7CfigZEP1XMBfVEJ0BJUznIFevaSBzEEolOimYkyo4AfocclVYtrjViB0C9SzJEdE+jrn+CWcTrHvdUKuRUSm0gPrZ0W7tGjjMhTiIVWFWSbAGEnGxhAT/y+HhsL9oiVWFjo3FqnRVqrETrG5pFmiSEAuTYC3TFMVCLSIzTg9H6wuIXR2OneDfMJq1NmzzbS8AAAAASUVORK5CYII=')}.x-tab .x-button-icon.team,.x-button .x-button-icon.x-icon-mask.team{-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAFI0lEQVRoBe2ZSYgdVRSG+yUmnagRQYU4NbZKNLYKWTgg4gQOaDYqJIIGl4LixhBwoy50LSIiulEjCkpAUBBRURpdGceFMQ7YtgkOJE4xTjGa9vuedUl1Vd2qevSrFqvrwJ97695zzj3/PXd6nd7MzMzIQpJFC4msXDvCbc94l+Euwy2bgW5JtyyhOTpdhnNT0rKGLsMtS2iOTpfh3JS0rOGQ+eLT6/VWMNYJ4NjUmN9T/xLs4WfqvPxO7TU9DkTdNmvBbeAskJ7kv/n+AjwKXiSW7yibFQk3BSIPZHdTl5xZzML238DDYFlTsQS/jZF1AGQ1mAZZkkXfe9FbGwJrqmz6lL4cEmOgjhyO0jq2gGVj0hhhAl9M1FeB3gDRn4Pu/5NwQnJ0ALKqrgKHDmgzkHpjGR4oioPKP1H96+Dn8GvpKyLqneV5Lp0XgnHggTMFJjlYPqAcpnyLsz/LHBLL0fRfCzwbvNN3gLeI5WXKaik7DbF2/20A28HPYF+CPZQfg9tj9vS5h18DRSdyrO0j9FeW+PQenwTe138AJ+d34OPFa215zDa0l15LOLgamM0DIBukbQ60JjhLl7RL+HWQtSv7jhLGz1FgM3DJZ30Yy69gYzqGonrVHr4eJ+OgB7Ji2xi4lGUW8+PsD0vOwNGNwInMirF42K0nlmXZzvR3LNARDN3fx6WVI3VJF50Fzvr7EZtY8zQdLtUiOYXGIrJpXUmvTDdk61HCKEqiagD9SSwnLCeX3RYwSJafRd/zoUj2FzVm2hyzMJ6gV0Y46Myl/BzjeqfnyMg36G5NJqpoTPvnLGWEnS0f9lVStL/7NgT/C5XNoHTW6XesV4En/1wlGo+Oo4QJ1ivoxxqju+fKCG2lf1uFH7P3eEl2K8xndRt3VKKEE4sPKWOHiCreg28TaPR1RN/X6GwEO0GReJ3cg95kUWeqzT8W6KtMpujcVaZQRfgFjL8qcbCDvndi/Zz0h4Hr6L8JHBHRW0L7DejdAU6K6Nj8CfBQi4mH4xYmrmy1sXlK/gCAAyfkQaAT91kWj9HW/6tJ8MO3NmeC+4CHlqdu1q7o25Xk5Hqynw+WBp+hpO1K4JItsnfr5GyCbSirCHstnQpcKulBXMK+o1frCPGgWAomwL2gLsm0z3S9ny38XARWgEXJOI7xNMiS9ns9MN5ZCQhEQ1lIGCOXmZf4ZeAW8C4IAblv3wBXAIn6sjkZ3Arc80FvGKW/nu4H/nhZDiR0IngI+LYPY3i43gWuAeNgFBQSn0UYJZejRH3CPQ8cMDi19Jp6AviuVfd48ADwRZXWG3Z9J/6fApeAJUm2TYRE02OZjPfA3WAM9HVDdvt2iXHI1HkoPQd2g7SjUHef+NyU7AXgFRD65qOcZrybQXgFmtUDIDu2xE3CBuCWWBxIU+8vk9MozdQukDUO3x4qm5IJOp36ZyW6waaJci/jrkviWEV9qiQOdd8Ebr/+T0fKkYvBp6AqOB2fnQz0SA39Kn9z6Z9mfPeze/UlUOXrB3Q2AW36a77KwP7tYCwh7Mupjk1TOmZuNInlyZqxuN8n3ItrQF1xryvRl9W/3Y3/60QGCTGF71h5JB0Tbn7vsDqyP6Vkva5dymxoVQ+lIE6+3+lJCH3Zcp+E78y2Fny7Evw7kstC8YA7BtQZRP1hiwTDKnuGun8aSiekaDxXwrbG/zOtaOT/ss3MLSjpCLc93V2Guwy3bAa6Jd2yhObodBnOTUnLGroMtyyhOTpdhnNT0rKGfwD3f6JVZi/xSQAAAABJRU5ErkJggg==')}.x-tabbar-light{background-color:#475c76;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #96a9c0), color-stop(2%, #546e8c), color-stop(100%, #394b5f));background-image:-webkit-linear-gradient(#96a9c0,#546e8c 2%,#394b5f);background-image:linear-gradient(#96a9c0,#546e8c 2%,#394b5f);border-color:#3d5066}.x-tabbar-light .x-tab{color:#b6c3d3}.x-tabbar-light .x-tab-active{color:white}.x-tabbar-light .x-tab-pressed{color:white}.x-tabbar-light.x-docked-bottom .x-tab{text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-tabbar-light.x-docked-bottom .x-tab .x-button-icon{background-color:#768fad;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #d5dde6), color-stop(2%, #8ca1ba), color-stop(100%, #607d9f));background-image:-webkit-linear-gradient(#d5dde6,#8ca1ba 2%,#607d9f);background-image:linear-gradient(#d5dde6,#8ca1ba 2%,#607d9f)}.x-tabbar-light.x-docked-bottom .x-tab-active{background-color:#506986;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #a6b6c9), color-stop(2%, #5e7a9c), color-stop(100%, #43576f));background-image:-webkit-linear-gradient(#a6b6c9,#5e7a9c 2%,#43576f);background-image:linear-gradient(#a6b6c9,#5e7a9c 2%,#43576f);text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-tabbar-light.x-docked-bottom .x-tab-active .x-button-icon{background-color:#003370;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0056bd), color-stop(50%, #003f8a), color-stop(51%, #003370), color-stop(100%, #002757));background-image:-webkit-linear-gradient(#0056bd,#003f8a 50%,#003370 51%,#002757);background-image:linear-gradient(#0056bd,#003f8a 50%,#003370 51%,#002757)}.x-tabbar-light.x-docked-top .x-tab-active{background-color:#3d5066;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #2a3746), color-stop(10%, #344356), color-stop(65%, #3d5066), color-stop(100%, #3e5167));background-image:-webkit-linear-gradient(#2a3746,#344356 10%,#3d5066 65%,#3e5167);background-image:linear-gradient(#2a3746,#344356 10%,#3d5066 65%,#3e5167);color:white}.x-tabbar-dark{background-color:#141e29;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #466890), color-stop(2%, #1f2f41), color-stop(100%, #080c11));background-image:-webkit-linear-gradient(#466890,#1f2f41 2%,#080c11);background-image:linear-gradient(#466890,#1f2f41 2%,#080c11);border-color:#0c1118}.x-tabbar-dark .x-tab{color:#5a81af}.x-tabbar-dark .x-tab-active{color:white}.x-tabbar-dark .x-tab-pressed{color:white}.x-tabbar-dark.x-docked-bottom .x-tab{text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-tabbar-dark.x-docked-bottom .x-tab .x-button-icon{background-color:#354f6e;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7c9bc0), color-stop(2%, #416086), color-stop(100%, #293e56));background-image:-webkit-linear-gradient(#7c9bc0,#416086 2%,#293e56);background-image:linear-gradient(#7c9bc0,#416086 2%,#293e56)}.x-tabbar-dark.x-docked-bottom .x-tab-active{background-color:#1c2a3a;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4e74a2), color-stop(2%, #283b52), color-stop(100%, #111922));background-image:-webkit-linear-gradient(#4e74a2,#283b52 2%,#111922);background-image:linear-gradient(#4e74a2,#283b52 2%,#111922);text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-tabbar-dark.x-docked-bottom .x-tab-active .x-button-icon{background-color:#0a7aff;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #57a3ff), color-stop(50%, #2488ff), color-stop(51%, #0a7aff), color-stop(100%, #006df0));background-image:-webkit-linear-gradient(#57a3ff,#2488ff 50%,#0a7aff 51%,#006df0);background-image:linear-gradient(#57a3ff,#2488ff 50%,#0a7aff 51%,#006df0)}.x-tabbar-dark.x-docked-top .x-tab-active{background-color:#0c1118;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #000000), color-stop(10%, #030507), color-stop(65%, #0c1118), color-stop(100%, #0c121a));background-image:-webkit-linear-gradient(#000000,#030507 10%,#0c1118 65%,#0c121a);background-image:linear-gradient(#000000,#030507 10%,#0c1118 65%,#0c121a);color:white}.x-tab.x-item-disabled span.x-button-label,.x-tab.x-item-disabled .x-hasbadge span.x-badge,.x-hasbadge .x-tab.x-item-disabled span.x-badge,.x-tab.x-item-disabled .x-button-icon{opacity:.5}.x-tab.x-draggable{opacity:.7}.x-tab{-webkit-user-select:none;overflow:visible !important}.x-toolbar{padding:0 0.2em;overflow:hidden;position:relative;height:2.6em}.x-toolbar > *{z-index:1}.x-toolbar.x-docked-top{border-bottom:.1em solid}.x-toolbar.x-docked-bottom{border-top:.1em solid}.x-toolbar.x-docked-left{width:7em;height:auto;padding:0.2em;border-right:.1em solid}.x-toolbar.x-docked-right{width:7em;height:auto;padding:0.2em;border-left:.1em solid}.x-title{line-height:2.1em;font-size:1.2em;text-align:center;font-weight:bold;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0 0.3em;max-width:100%}.x-title .x-innerhtml{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 .3em}.x-toolbar-dark{background-color:#24364c;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5a81af), color-stop(2%, #304864), color-stop(100%, #192533));background-image:-webkit-linear-gradient(#5a81af,#304864 2%,#192533);background-image:linear-gradient(#5a81af,#304864 2%,#192533);border-color:black}.x-toolbar-dark .x-title{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-dark.x-docked-top{border-bottom-color:black}.x-toolbar-dark.x-docked-bottom{border-top-color:black}.x-toolbar-dark.x-docked-left{border-right-color:black}.x-toolbar-dark.x-docked-right{border-left-color:black}.x-toolbar-dark .x-button,.x-toolbar .x-toolbar-dark .x-button,.x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar-dark .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before{border:1px solid black;border-top-color:black;color:white}.x-toolbar-dark .x-button.x-button-back:before,.x-toolbar-dark .x-button.x-button-forward:before,.x-toolbar .x-toolbar-dark .x-button.x-button-back:before,.x-toolbar .x-toolbar-dark .x-button.x-button-forward:before,.x-toolbar-dark .x-field-select .x-component-outer.x-button-back:before,.x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-back:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:before{background:black}.x-toolbar-dark .x-button,.x-toolbar-dark .x-button.x-button-back:after,.x-toolbar-dark .x-button.x-button-forward:after,.x-toolbar .x-toolbar-dark .x-button,.x-toolbar .x-toolbar-dark .x-button.x-button-back:after,.x-toolbar .x-toolbar-dark .x-button.x-button-forward:after,.x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar-dark .x-field-select .x-component-outer.x-button-back:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-back:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar-dark .x-field-select .x-component-outer:before,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-forward:after{background-color:#141e29;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #466890), color-stop(2%, #1f2f41), color-stop(100%, #080c11));background-image:-webkit-linear-gradient(#466890,#1f2f41 2%,#080c11);background-image:linear-gradient(#466890,#1f2f41 2%,#080c11)}.x-toolbar-dark .x-button .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-dark .x-button .x-button-icon.x-icon-mask,.x-toolbar-dark .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar-dark .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #e7edf3));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#e7edf3);background-image:linear-gradient(#ffffff,#ffffff 2%,#e7edf3)}.x-toolbar-dark .x-button.x-button-pressing,.x-toolbar-dark .x-button.x-button-pressing:after,.x-toolbar-dark .x-button.x-button-pressed,.x-toolbar-dark .x-button.x-button-pressed:after,.x-toolbar-dark .x-button.x-button-active,.x-toolbar-dark .x-button.x-button-active:after,.x-toolbar .x-toolbar-dark .x-button.x-button-pressing,.x-toolbar .x-toolbar-dark .x-button.x-button-pressing:after,.x-toolbar .x-toolbar-dark .x-button.x-button-pressed,.x-toolbar .x-toolbar-dark .x-button.x-button-pressed:after,.x-toolbar .x-toolbar-dark .x-button.x-button-active,.x-toolbar .x-toolbar-dark .x-button.x-button-active:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed,.x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar-dark .x-field-select .x-component-outer.x-button-active,.x-toolbar-dark .x-field-select .x-component-outer.x-button-active:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-active,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer.x-button-active:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active,.x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active,.x-toolbar .x-toolbar-dark .x-field-select .x-component-outer:before.x-button-active:after{background-color:#0f161f;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #000000), color-stop(10%, #070a0e), color-stop(65%, #0f161f), color-stop(100%, #101721));background-image:-webkit-linear-gradient(#000000,#070a0e 10%,#0f161f 65%,#101721);background-image:linear-gradient(#000000,#070a0e 10%,#0f161f 65%,#101721)}.x-toolbar-dark .x-form-label{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-light{background-color:#354f6e;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7c9bc0), color-stop(2%, #416086), color-stop(100%, #293e56));background-image:-webkit-linear-gradient(#7c9bc0,#416086 2%,#293e56);background-image:linear-gradient(#7c9bc0,#416086 2%,#293e56);border-color:black}.x-toolbar-light .x-title{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-toolbar-light.x-docked-top{border-bottom-color:black}.x-toolbar-light.x-docked-bottom{border-top-color:black}.x-toolbar-light.x-docked-left{border-right-color:black}.x-toolbar-light.x-docked-right{border-left-color:black}.x-toolbar-light .x-button,.x-toolbar .x-toolbar-light .x-button,.x-toolbar-light .x-field-select .x-component-outer,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer,.x-toolbar-light .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before{border:1px solid #030507;border-top-color:#0c1118;color:white}.x-toolbar-light .x-button.x-button-back:before,.x-toolbar-light .x-button.x-button-forward:before,.x-toolbar .x-toolbar-light .x-button.x-button-back:before,.x-toolbar .x-toolbar-light .x-button.x-button-forward:before,.x-toolbar-light .x-field-select .x-component-outer.x-button-back:before,.x-toolbar-light .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-back:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-forward:before,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:before{background:#030507}.x-toolbar-light .x-button,.x-toolbar-light .x-button.x-button-back:after,.x-toolbar-light .x-button.x-button-forward:after,.x-toolbar .x-toolbar-light .x-button,.x-toolbar .x-toolbar-light .x-button.x-button-back:after,.x-toolbar .x-toolbar-light .x-button.x-button-forward:after,.x-toolbar-light .x-field-select .x-component-outer,.x-toolbar-light .x-field-select .x-component-outer.x-button-back:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-back:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-forward:after,.x-toolbar-light .x-field-select .x-component-outer:before,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-back:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-forward:after{background-color:#24364c;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #5a81af), color-stop(2%, #304864), color-stop(100%, #192533));background-image:-webkit-linear-gradient(#5a81af,#304864 2%,#192533);background-image:linear-gradient(#5a81af,#304864 2%,#192533)}.x-toolbar-light .x-button .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-light .x-button .x-button-icon.x-icon-mask,.x-toolbar-light .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer .x-button-icon.x-icon-mask,.x-toolbar-light .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before .x-button-icon.x-icon-mask{background-color:white;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #e7edf3));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#e7edf3);background-image:linear-gradient(#ffffff,#ffffff 2%,#e7edf3)}.x-toolbar-light .x-button.x-button-pressing,.x-toolbar-light .x-button.x-button-pressing:after,.x-toolbar-light .x-button.x-button-pressed,.x-toolbar-light .x-button.x-button-pressed:after,.x-toolbar-light .x-button.x-button-active,.x-toolbar-light .x-button.x-button-active:after,.x-toolbar .x-toolbar-light .x-button.x-button-pressing,.x-toolbar .x-toolbar-light .x-button.x-button-pressing:after,.x-toolbar .x-toolbar-light .x-button.x-button-pressed,.x-toolbar .x-toolbar-light .x-button.x-button-pressed:after,.x-toolbar .x-toolbar-light .x-button.x-button-active,.x-toolbar .x-toolbar-light .x-button.x-button-active:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressing,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressed,.x-toolbar-light .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar-light .x-field-select .x-component-outer.x-button-active,.x-toolbar-light .x-field-select .x-component-outer.x-button-active:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressing,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressing:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressed,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-pressed:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-active,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer.x-button-active:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-active,.x-toolbar-light .x-field-select .x-component-outer:before.x-button-active:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressing:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-pressed:after,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-active,.x-toolbar .x-toolbar-light .x-field-select .x-component-outer:before.x-button-active:after{background-color:#1f2f41;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0f161f), color-stop(10%, #172330), color-stop(65%, #1f2f41), color-stop(100%, #203043));background-image:-webkit-linear-gradient(#0f161f,#172330 10%,#1f2f41 65%,#203043);background-image:linear-gradient(#0f161f,#172330 10%,#1f2f41 65%,#203043)}.x-toolbar-light .x-form-label{color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-navigation-bar .x-container{overflow:visible}.x-desktop .x-toolbar .x-field-search{padding-left:1.06em}.x-spinner .x-input-el,.x-field-select .x-input-el{-webkit-text-fill-color:#000;-webkit-opacity:1}.x-spinner.x-item-disabled .x-input-el,.x-field-select.x-item-disabled .x-input-el{-webkit-text-fill-color:currentcolor}.x-toolbar .x-field-select .x-input-el{-webkit-text-fill-color:#fff}.x-toolbar .x-field-select.x-item-disabled .x-input-el{-webkit-text-fill-color:rgba(255, 255, 255, 0.6)}.x-toolbar .x-form-field-container{padding:0 .3em}.x-toolbar .x-field{width:13em;margin:.5em;min-height:0;border-bottom:0}.x-toolbar .x-field .x-clear-icon{background-size:50% 50%;right:-0.8em;margin-top:-1.06em}.x-toolbar .x-field-input{padding-right:1.6em !important}.x-toolbar .x-field-textarea .x-component-outer,.x-toolbar .x-field-text .x-component-outer,.x-toolbar .x-field-number .x-component-outer,.x-toolbar .x-field-search .x-component-outer{-webkit-border-radius:0.3em;border-radius:0.3em;background-color:white;-webkit-box-shadow:inset rgba(0, 0, 0, 0.5) 0 0.1em 0, inset rgba(0, 0, 0, 0.5) 0 -0.1em 0, inset rgba(0, 0, 0, 0.5) 0.1em 0 0, inset rgba(0, 0, 0, 0.5) -0.1em 0 0, inset rgba(0, 0, 0, 0.5) 0 0.15em 0.4em}.x-toolbar .x-form-label{background:transparent;border:0;padding:0;line-height:1.4em}.x-toolbar .x-form-field{height:1.6em;color:#6e6e6e;background:transparent;min-height:0;-webkit-appearance:none;padding:0em .3em;margin:0}.x-toolbar .x-form-field:focus{color:black}.x-toolbar .x-field-select .x-component-outer,.x-toolbar .x-field-search .x-component-outer{-webkit-border-radius:0.8em;border-radius:0.8em}.x-toolbar .x-field-search .x-field-input{background-position:.5em 50%}.x-toolbar .x-field-select{-webkit-box-shadow:none}.x-toolbar .x-field-select .x-form-field{height:1.4em}.x-toolbar .x-field-select{background:transparent}.x-toolbar .x-field-select .x-component-outer:after{right:.4em}.x-toolbar .x-field-select.x-item-disabled .x-component-outer:after{opacity:.6}.x-toolbar .x-field-select .x-component-outer:before{width:3em;border-left:none;-webkit-border-top-right-radius:0.8em;border-top-right-radius:0.8em;-webkit-border-bottom-right-radius:0.8em;border-bottom-right-radius:0.8em;-webkit-mask:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAABCAYAAACc0f2yAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADJJREFUeNpi/P//PwMjIyMbAwMDOxRzAjEXFHMDMQ8a5kXC6HLcSHo5kcwEmU9TABBgAOcTBAFcRiSpAAAAAElFTkSuQmCC');-webkit-mask-position:right top;-webkit-mask-repeat:repeat-y;-webkit-mask-size:3em 0.05em}.x-toolbar .x-field-select .x-input-text{color:#fff}.x-android .x-field-search .x-field-input{padding-left:.2em !important;padding-right:2.2em !important}.x-indexbar-wrapper{-webkit-box-pack:end !important;box-pack:end !important;pointer-events:none}.x-indexbar-vertical{width:1.1em;-webkit-box-orient:vertical;box-orient:vertical;margin-right:8px}.x-indexbar-horizontal{height:1.1em;-webkit-box-orient:horizontal;box-orient:horizontal;margin-bottom:8px}.x-indexbar{pointer-events:auto;z-index:2;padding:.3em 0;min-height:0 !important;height:auto !important;-webkit-box-flex:0 !important}.x-indexbar > div{color:#1e2a38;font-size:0.6em;text-align:center;line-height:1.1em;font-weight:bold;display:block}.x-phone.x-landscape .x-indexbar > div{font-size:0.38em;line-height:1em}.x-indexbar-pressed{-webkit-border-radius:0.55em;border-radius:0.55em;background-color:rgba(143, 152, 163, 0.8)}.x-list{position:relative;background-color:#f7f7f7}.x-list .x-list-inner{width:100%}.x-list .x-list-disclosure{position:absolute;bottom:0.44em;right:0.44em}.x-list .x-list-disclosure{overflow:visible;-webkit-mask:0 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpFNkNCM0JGNTZFMjI2ODExQkNGQjkwMzk3MDc3MkZFQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo3M0MzQUU1QUFDQkQxMURGOEQ2MUVDMjM0MzY2NTBDQSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo3M0MzQUU1OUFDQkQxMURGOEQ2MUVDMjM0MzY2NTBDQSIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkU3Q0IzQkY1NkUyMjY4MTFCQ0ZCOTAzOTcwNzcyRkVCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkU2Q0IzQkY1NkUyMjY4MTFCQ0ZCOTAzOTcwNzcyRkVCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+uoWjuwAACh9JREFUeNrUm2toVdkVx7eJRqPRaHzFGBOjidGYaLQaX9GREXXAkloYQVpT+qFYBkcqLS0zTKFQWpwv86F0KLRfHFqnWDq0UCsMFYqlqHSwGo2v4Du+X9FoNL5P12/N3rLn9Cb33HNvrnHDujfnnHvO2f+91l57/dfaGWBe8xYEQUq/H5ilftWIVIoU2+Ov2e/jIt0inSKnRVpEnvdlR/oK8CKRt0QaRd4QyU3hXkDvFvmXyOeZHoABGXzWWJF3RL4rUuFfKC4uNmPHjjUjRozQ44kTJ+r3jRs3zNOnT013d7e5deuWuXTpknnx4oV/602RP4n8TqQ1EyadCcBlIh9YoHmcqKioMFOnTjXl5eVm1KhR5smTJwrs+fPnCohvOjpw4ECTk5Ojwt/5+fnmzp075vr16+bkyZPm1KlT/nv+KvJLkf++KsCAe89KPidmz55t5s6dawoLC839+/fNo0ePFCwgHjx4oMe0u3fv6vfw4cNNbm6uGTRokCkoKNDBycvLU+DDhg3TQTp27Jg5fPiwuXfvnnvvJyI/EunIJmCczqci1RzMmzfPLFiwQF9Ox65cuWKuXr2qZoqk0ikGa/z48WbcuHFm0qRJOihDhw41LS0tZu/evToI1sl9W2RXNgC/K/IRGp42bZpZsmSJasSZ4fnz51WbmWiDBw9W0NXV1TrvOd6zZ49pbX05nd8XwB/2FWA87a+tYzKLFi0yixcvVoCY3NmzZ8MOJ6OttLRUpwy+4dy5c2bnzp3u0h9FvifAuzMJmPm6Q+SbHGzYsEHn3P79+83Ro0fVCWWrVVZWmqVLl+rfO3bsUA8v7QuRbwjoa5l6z2/xD7KsBJs3bw7WrVsXiINh8rwSGTJkSLBmzRrtS1lZmTv/H5wnc7o3iTpnA1k69AXLli0LZAmJ1VGeQWfFEek3x3FBc684ymDLli0+6E/TBfymyDMeJmasL4jbSe4bPXp0MGvWLJX6+vpAApJAlqTYoAcMGBDU1NQEmzZtCsRxuvPvxQVM7Hubh4gnDsRJxdYsInM+kOUrkHVXj/lmAGVOBuJ909K0rBZBc3OzO4eCmuIA/jcPkEAiWLVqVVqdQjA7WWLc8TZ3ns7W1tYGstaqxuI8m8GbM2dOIKuGO3dDpCAVwCw9QUlJSbB+/XrfXGLLzJkzffMtFNko8pjjyZMnq4njFONOGRSyevVqNXF77hdRARc4U167dm0wZsyYjHhW5m0IsLFMCm0EEl0FDQ0NgZCMl2afqjBgTU1N7vg+PCUK4B9yw/Tp0wNZ6NOatxEAO/JxxC03mCWmH8eZMVBVVVVBXV2dO/ebMOCcEFhIwI/5g1j2woUL5tmzZ30dS7SLLBb5DHKxb98+jaVhXDIAKT2IAIgYnnjcto3iF6r934QBr4G+Tpkyxdy+fdt0dXVlK4DiRetEfs7BgQMHtPPE6rAm6XTkBz18+FDJC2GoDYc39ga4mQ9ZL5UMZEG74fYzC7zrzJkzSitlaqnG4MxRGvH8zZs3daBs+5YMWG6iFE+R1bA+HD6bNBCXkcfsioqKNJsBl+1JGwT9J06ciNLnz0TaRP5+8eLFMvohnlfJCVQzihLQMoMF05JnFNsAanf4dxCDoLy8XIOBKGsiyxXLjUyBQEY0FQdTGDFltMdFVAQ+MmiR4wGiONZme7w1kdNayYcsQ0rio8SdaBa2wuhnigOH8lmryGfRF5gZaSDYEvw7qVMQ/4PF+djCc7iBD9ItUTtPNoK5blu5pZtRpDMi6Cci3xfZjBNua2tTc8WZ8e7e5jWK8GhrvVhJng841+aOdY643FPSjEBubrac2cciK8hjQf6vXbumzowcWE99ACyKGzlypMNX6QNmYueTO3r8+HFWCX0KjTz1AtK1WNXx48c19TNhwgS1ykQNLFiCR4ZeAsZBqMe1SbL+2k7bIGUX2iNIIectsbjmu8INLN7yNNEHXKBrlDiFfqrdcJDydZEPXZDinG0is/YcV6EPWA+42JeJuAy390XW49hI2JNjC8cAYEGJvlJzzOvb8mztStPFeOUkS2muH2l1OxOIGsK94kZU+BdLL1W7xM/hBhYvMuv0NdzhvFoWl5q4rY6pC1iWnIULFxI+6vocbpizt8R2+IDb/egkFXaS5Ub4u496HYU64b2GYARml8j3hIKo9rCGOyh84d69id6f2gfWjAsIOgAMGaEwlwisIzaucGe+LL5/hS1RiH4Tk+5n6zGB8+9F3uaAWhZ9O3ToUK+MDqURSFkNd4lDaw976f18YPPeYp00w9DHrcxWFN6GMKxYsUKJzZEjR5LSV8B6DviLROThn3wQtuEMonhrXko6xrYLGaaHb1iwdSUlJapZ4mjMOEqsT0jZ2fmSo+xOBBgNd7icUBQK1tHRob8jJeTFrJlopGX+QYxP4qCqqkqLdlQqoyQAMGeXtbFtV6KMR7fNNmzExZPBSEYTGWm4MLy4trZWHV4iD8854t3t27frjoAkwcRHtp6lmQ46jgnjfKIWw1iXWW3IeuCb5L7WRIBpnwAY+kUBmpRKb86LDhDhXL58WcH3Ng0izPevBBPLly/XKXPw4MGUkgs4XTKunnb/kOweFnWtBGQqCZ8kL+2CibNcE2sJVq5cGQj1i1XeIRlPzcpLxhf1lpemsVNGQzWSYB7byEowIQOtjglCQOSXSmPuwo897X4sIDt6S9PS2B7Uwh4qzBAvnIn4uof593/BBPOVKRKHteE48T04N0sjfxX13kY/W0gBO12TnjFjhl+UI8PyZ3eNcix1pXTeQ5mGSqfMX3fuB6mWS3Wbg5iI1pjSLZeWlpZqldAen3JpXgkmtBZEh+M+G99ATQmx5w7hv1IFDGE+aWwNFw2lA5r6L46LEqyx9WKcU0VFRVoFOwposqKohdhz0KaauFse6o2t4eI1SYTH7RzTg2Q9SXuhdLobAPOLWwQ3tvpPebWxsdE/35zuphaCdt3nQSmTykQ6+zLoJLXgdIvsaNaB9erJWzOxi4f2jnvR/Pnz1cTTmXNxC95OZKnUGnII7LZkYFPdpviueyHOAUeGV01n61GcaYFlUKzHI3vXtvXkpNIB7Mz7ofPemDhOJ50NKalolXcSReEHvGtbowB1EieXgyNjG6JW1mEylDwIFoi9U42OkjXSNLA3oj6Ykle4g/t9R0D8LZXnxU1esWRttXM7lwwJNA6qCL2EpMO44iYIXNaFyMlFeu3t7Zq78ugeBbZz2d4RX2mBa/oFTRPLQs+ggfBlGA/gYV09hYvQR5eScRvF+Zt7iOm92JjMxU9snam3kLXPALvWYHlsoztBmgjtIGiazkMhw6ABC4+GpADa/QuA5bJ+Temn5sv/f4gSo/c5YNfYKd9kGVBdOCmO5hI1pkAC3t1uExKfmwTbFfoL4HACDlN/y5p+RZLfU/Fvs+BgbK1psLBXAjhR+qauh2unTfRdAa8N4D5pqQL+nwADAKGFDQ//Deb9AAAAAElFTkSuQmCC') no-repeat;-webkit-mask-size:1.7em;background-color:#003370;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0a7aff), color-stop(2%, #004394), color-stop(100%, #00234c));background-image:-webkit-linear-gradient(#0a7aff,#004394 2%,#00234c);background-image:linear-gradient(#0a7aff,#004394 2%,#00234c);width:1.7em;height:1.7em}.x-list.x-list-indexed .x-list-disclosure{margin-right:1em}.x-list .x-item-selected .x-list-disclosure{background:#fff none}.x-list .x-list-item{position:relative;color:black}.x-list .x-list-item .x-list-item-label{min-height:2.6em;padding:0.7em 0.8em}.x-list .x-list-item.x-item-pressed .x-list-item-label{background:#77b2f8 none}.x-list .x-list-item.x-item-selected .x-list-item-label{background-color:#06346a;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #167bf3), color-stop(2%, #07448c), color-stop(100%, #042348));background-image:-webkit-linear-gradient(#167bf3,#07448c 2%,#042348);background-image:linear-gradient(#167bf3,#07448c 2%,#042348);color:white;text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-list-header{position:relative}.x-list-header-swap{position:absolute;left:0;width:100%;z-index:1}.x-ios .x-list-header-swap{-webkit-transform:translate3d(0, 0, 0)}.x-list-normal .x-list-header{background-color:#4d80bc;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bccfe6), color-stop(2%, #6792c5), color-stop(100%, #3f6ea6));background-image:-webkit-linear-gradient(#bccfe6,#6792c5 2%,#3f6ea6);background-image:linear-gradient(#bccfe6,#6792c5 2%,#3f6ea6);color:#1f3651;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0;border-top:1px solid #4d80bc;border-bottom:1px solid #2d4e76;font-weight:bold;font-size:0.8em;padding:0.2em 1.02em;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0}.x-list-normal .x-list-item .x-list-item-label{border-top:1px solid #d1d1d1}.x-list-normal .x-list-item:first-child{border-top:none}.x-list-normal .x-list-item:last-child .x-list-item-label{border-bottom:1px solid #d1d1d1}.x-list-normal .x-list-item.x-item-pressed .x-list-item-label{border-top-color:#77b2f8}.x-list-normal .x-list-item.x-item-selected .x-list-item-label{border-top-color:#084b9b;border-bottom-color:#021022}.x-list-round .x-scroll-view{background-color:#EEEEEE !important}.x-list-round .x-list-disclosure{-webkit-mask:0 0 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAtpJREFUeNrs2k2IVlUYAODndZyaUfMnakxsERU5JChUCBIG0s8iaNGPBa0sSkUQJdq0CGnRzypyJS0SddPCsFr0QxtxlURmbcW0NlqgZg6CyuRp4RmYxUz3Bvf7Zo6eF87qu3zffXjPPe97zv0ipeRmijlusqjgCq7gCq7gCq7gCq7gCi4BHBHLIuKpiFh0Q4PjeoziLXyAjRExPBvAc3uAHcCj2IRnMQ+LcTYivkopXZhJcHS5H46I2/AMXsVjGJz08S84gD0ppTPFZzgi7szQjRid4pLVWIahiNidUjpd+jM8H89Pg52IEbyOrRExUjr4LD7FiYbrlmb0loi4p+/ilFJnA4vwCn5EahhnsBururyHxnvs/Au5BS/iaAv0JezHymLBGT2MF/ATxhvQY9iDhyaqRnHgjB7MdfhrXGlAX8QXeKRYcEbPyU3Il/inAT2Og3i4WPAk9Nqc6csN6Kv4HOuKBWd05Ezva4Eex7d4EgNd38vcPpW+FBFHcB7X8FJe2KaKATyOBbmDO5RSGp+VdbhltkfxSV6d/yvT13AYT2OoqCk9BXpFLlmpxfgGS7v67b6feETErbgvNyhN8Rd+zWWtvCmdkRtwpEVtHsNHuL+4VTpjh3L3dazFNB7DXtxbalmayGyb5/ZcbjVXltp4LMmHAm2wp/AuHiy1tVyIHTjeAvsn3sRIqZuHhdiO31pg/8B7uKPU7eFibGuJPY13sLzUA4Db8UZL7Em8jbuKPADAcuzE7y2wP2Nzr5/ZnoHzNH4/l5Um7Am8jOF+t7Vd7pYCd+cGY9rGLmM/xMGU0uViTy0zeA0+xoVpMns0T+MFM7Fp6TTD6br6h4g4n/e9z+GBSZccxi58l1K6NGMvl3pUlkbwGr7PmT2GJ3pxgvF/R/Tqz6URMR/r88u1Q/is05OL2fD2cAr0YK7Lf8/IAtVvcP2PRwVXcAVXcAVXcAVXcAVX8I0T/w4ADBKP+GttJ+EAAAAASUVORK5CYII=') no-repeat;background-color:#777777;background-image:none}.x-list-round .x-list-header{color:#777;font-size:1em;font-weight:bold;padding-left:26px;line-height:1.7em;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #eeeeee), color-stop(30%, rgba(238,238,238,0.9)), color-stop(100%, rgba(238,238,238,0.4)));background-image:-webkit-linear-gradient(top, #eeeeee,rgba(238,238,238,0.9) 30%,rgba(238,238,238,0.4));background-image:linear-gradient(top, #eeeeee,rgba(238,238,238,0.9) 30%,rgba(238,238,238,0.4))}.x-list-round .x-list-container{padding:13px 13px 0 13px}.x-list-round .x-list-container .x-list-header{padding-left:13px;background-image:none}.x-list-round.x-list-ungrouped .x-list-item-label,.x-list-round.x-list-grouped .x-list-item-label{border:solid #DDDDDD;border-width:1px 1px 0 1px;background:#fff}.x-list-round.x-list-ungrouped .x-list-item:first-child .x-list-item-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-list-round.x-list-ungrouped .x-list-item:last-child{margin-bottom:13px}.x-list-round.x-list-ungrouped .x-list-item:last-child .x-list-item-label{-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em;border-width:1px}.x-list-round.x-list-grouped .x-list-header-item .x-list-item-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-list-round.x-list-grouped .x-list-footer-item{margin-bottom:13px}.x-list-round.x-list-grouped .x-list-footer-item .x-list-item-label{border-width:1px;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-dataview-inlineblock .x-dataview-item{display:inline-block !important}.x-dataview-nowrap .x-dataview-container{white-space:nowrap !important}.x-list-inlineblock .x-list-item{display:inline-block !important}.x-list-nowrap .x-list-inner{width:auto}.x-list-nowrap .x-list-container{white-space:nowrap !important}.x-list-paging{height:50px}.x-list-paging .x-loading-spinner{display:none;margin:auto}.x-list-paging .x-list-paging-msg{text-align:center;color:#06346a;padding-top:10px;-webkit-border-radius:6px;border-radius:6px}.x-list-paging.x-loading .x-loading-spinner{display:block}.x-list-paging.x-loading .x-list-paging-msg{display:none}.x-list-pullrefresh{display:-webkit-box;display:box;-webkit-box-orient:horizontal;box-orient:horizontal;-webkit-box-align:center;box-align:center;-webkit-box-pack:center;box-pack:center;position:absolute;top:-5em;left:0;width:100%;height:4.5em}.x-list-pullrefresh .x-loading-spinner{display:none}.x-list-pullrefresh-arrow{width:2.5em;height:4.5em;background:center center url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAA8CAYAAAAUufjgAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAjFJREFUeNrsmU8oREEYwOexdtNuKBfFwdVhCyfuysnFiXISS+1BLopyUpKLXETkRLaUi1LK3Q2lpPbiQLnIn03a/Hm+z86Ttv0zM++bfbOar36Hbad5v535Zp7v47iuy0wOpyoEHccRHV9L9NxPkUE/bhKCOKiOSPAdn69DsJ5I8E2HYA0QJRJ8Bb50CDYRCT7pEMQD0kwk+CByUFQEW4gE73UIhoA2IsFb4ENEMCQ5MdU1IxwygpT3oKNLMGyyYFVscdhusc8tDpu+xRG7xf95BW0O2kNiV1AgIvaQ2BzUJNgJNJYZGyUU7OG1cal4Bi68oqkDPszy2teEwJp5Cdyu/lZ1g8CwIYJ7wEF+2YmrNw90Byx3BizgKhaqizEP1wg7CLLxCEzy/CtauMeBlQDyEfNuGrgU6SyM8F9SyVgHdmRaH6tAb4XkToEp2d4M5mOK0TWMigU2koa8vJMRZPxEb2ss2LEVPMpPLlMRxBgDZjQJLgNbxb6Uab9tAn3EcifAeKkBMoLY+j0GWonk7oB+lmsFkwhidAGHBPmIeTcAnJcbKCuIMQEs+hScAzZEBqoIYuzyFVCJI36lMJ2CDfxibZeUu+EX/4uMIFP8ZyLejxkgK0hG5a8kP4IYSZbr1IuQVHmAX0HGX4VuGfZVJ6cQxPd1uoRcWqDW0SroFVzZAnJZ/h0LWhAjUUAw4XdSSsH8fExRTEgtGAOuOTETBb16Jk412e+bxOSwglYw6PgWYABvLk8P7zGJFwAAAABJRU5ErkJggg==') no-repeat;background-size:2em 3em;-webkit-transform:rotate(0deg)}.x-list-pullrefresh-release .x-list-pullrefresh-arrow{-webkit-transform:rotate(-180deg)}.x-list-pullrefresh-wrap{width:20em;font-size:0.7em}.x-list-pullrefresh-message{font-weight:bold;font-size:1.3em;margin-bottom:0.1em;text-align:center}.x-list-pullrefresh-updated{text-align:center}html,body{width:100%;height:100%}.x-translatable{position:absolute;top:100%;left:100%;z-index:1}.x-translatable-container{position:relative}.x-translatable-wrapper{width:100%;height:100%;position:absolute;overflow:hidden}.x-translatable-stretcher{width:300%;height:300%;position:absolute;visibility:hidden;z-index:-1}.x-translatable-nested-stretcher{width:100%;height:100%;left:100%;top:100%;position:absolute;visibility:hidden;z-index:-1}.x-layout-fit,.x-layout-card{position:relative;overflow:hidden}.x-layout-fit-item,.x-layout-card-item{position:absolute !important;width:100%;height:100%}.x-layout-hbox,.x-layout-vbox{display:-webkit-box}.x-layout-hbox > *,.x-layout-vbox > *{-webkit-box-flex:0}.x-layout-hbox{-webkit-box-orient:horizontal}.x-layout-vbox{-webkit-box-orient:vertical}.x-layout-hbox > .x-layout-box-item{width:0 !important}.x-layout-vbox > .x-layout-box-item{height:0 !important}.x-table-inner{display:table !important;width:100%;height:100%}.x-table-inner.x-table-fixed{table-layout:fixed !important}.x-table-row{display:table-row !important}.x-table-row > *{display:table-cell !important;vertical-align:middle}.x-container,.x-body{display:-webkit-box}.x-body{overflow:hidden;-webkit-box-flex:1;min-width:100%;min-height:100%}.x-body > .x-inner,.x-container > .x-inner{-webkit-box-flex:1;min-width:100%;min-height:100%;position:relative}.x-docking-horizontal{display:-webkit-box;-webkit-box-flex:1;-webkit-box-orient:horizontal;min-width:100%;min-height:100%}.x-docking-vertical{display:-webkit-box;-webkit-box-flex:1;-webkit-box-orient:vertical;min-width:100%;min-height:100%}.x-centered{position:absolute !important;width:100%;height:100%;display:-webkit-box;-webkit-box-align:center;-webkit-box-pack:center}.x-floating{position:absolute !important}.x-centered > *{position:relative !important;-webkit-box-flex:0 !important}.x-size-change-detector{visibility:hidden;position:absolute;left:0;top:0;z-index:-1;width:100%;height:100%;overflow:hidden}.x-size-change-detector > *{visibility:hidden}.x-size-change-detector-shrink > *{width:200%;height:200%}.x-size-change-detector-expand > *{width:100000px;height:100000px}.x-scroll-view{position:relative;display:block}.x-scroll-container{position:absolute;overflow:hidden;width:100%;height:100%}.x-scroll-scroller{position:absolute;min-width:100%;min-height:100%}.x-ios .x-scroll-scroller{-webkit-transform:translate3d(0, 0, 0)}.x-scroll-stretcher{position:absolute;visibility:hidden}.x-scroll-bar-grid-wrapper{position:absolute;width:100%;height:100%}.x-scroll-bar-grid{display:table;width:100%;height:100%}.x-scroll-bar-grid > *{display:table-row}.x-scroll-bar-grid > * > *{display:table-cell}.x-scroll-bar-grid > :first-child > :first-child{width:100%;height:100%}.x-scroll-bar-grid > :first-child > :nth-child(2){padding:3px 3px 0 0}.x-scroll-bar-grid > :nth-child(2) > :first-child{padding:0 0 3px 3px}.x-scroll-bar{position:relative;overflow:hidden}.x-scroll-bar-stretcher{position:absolute;visibility:hidden;width:100%;height:100%}.x-scroll-bar-x{width:100%}.x-scroll-bar-x > .x-scroll-bar-stretcher{width:300%}.x-scroll-bar-x.active{height:6px}.x-scroll-bar-y{height:100%}.x-scroll-bar-y > .x-scroll-bar-stretcher{height:300%}.x-scroll-bar-y.active{width:6px}.x-scroll-indicator{background:#333;position:absolute;z-index:2;opacity:0.5}.x-scroll-indicator.default{-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.x-list-light .x-scroll-indicator,.x-dataview-light .x-scroll-indicator{background:#fff;opacity:1}.x-scroll-indicator-x{height:100%}.x-scroll-indicator-y{width:100%}.x-scroll-indicator.csstransform{background:none}.x-scroll-indicator.csstransform > *{position:absolute;background-color:#333}.x-scroll-indicator.csstransform > :nth-child(2){-webkit-transform-origin:0% 0%;background:none;content:url(data:image/bmp;base64,Qk08AAAAAAAAADYAAAAoAAAAAQAAAAEAAAABABAAAAAAAAYAAAASCwAAEgsAAAAAAAAAAAAAxhgAAAAA)}.x-scroll-indicator.csstransform.x-scroll-indicator-light > *{background-color:#eee}.x-scroll-indicator.csstransform.x-scroll-indicator-light > :nth-child(2){content:url(data:image/bmp;base64,Qk08AAAAAAAAADYAAAAoAAAAAQAAAAEAAAABABAAAAAAAAYAAAASCwAAEgsAAAAAAAAAAAAAvXcAAAAA)}.x-scroll-indicator.csstransform.x-scroll-indicator-y > *{width:100%}.x-scroll-indicator.csstransform.x-scroll-indicator-y > :first-child{height:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px}.x-scroll-indicator.csstransform.x-scroll-indicator-y > :nth-child(2){height:1px}.x-scroll-indicator.csstransform.x-scroll-indicator-y > :last-child{height:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.x-scroll-indicator.csstransform.x-scroll-indicator-x > *{height:100%}.x-scroll-indicator.csstransform.x-scroll-indicator-x > :first-child{width:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.x-scroll-indicator.csstransform.x-scroll-indicator-x > :nth-child(2){width:1px}.x-scroll-indicator.csstransform.x-scroll-indicator-x > :last-child{width:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}.x-carousel{position:relative;overflow:hidden}.x-carousel-item{position:absolute;width:100%;height:100%}.x-carousel-item > *{position:absolute;width:100%;height:100%}.x-carousel-indicator{padding:0;-webkit-border-radius:0;border-radius:0;-webkit-box-shadow:none;background-color:transparent;background-image:none}.x-carousel-indicator{-webkit-box-flex:1;display:-webkit-box;display:box;-webkit-box-pack:center;box-pack:center;-webkit-box-align:center;box-align:center}.x-carousel-indicator span{display:block;width:0.5em;height:0.5em;-webkit-border-radius:0.25em;border-radius:0.25em;margin:0.2em}.x-carousel-indicator-horizontal{height:1.5em;width:100%}.x-carousel-indicator-vertical{-webkit-box-orient:vertical;box-orient:vertical;width:1.5em;height:100%}.x-carousel-indicator-light span{background-color:rgba(255, 255, 255, 0.1);background-image:none}.x-carousel-indicator-light span.x-carousel-indicator-active{background-color:rgba(255, 255, 255, 0.3);background-image:none}.x-carousel-indicator-dark span{background-color:rgba(0, 0, 0, 0.1);background-image:none}.x-carousel-indicator-dark span.x-carousel-indicator-active{background-color:rgba(0, 0, 0, 0.3);background-image:none}.x-form .x-scroll-container{background-color:#eeeeee}.x-form .x-scroll-container > .x-inner{padding:1em}.x-form-label{text-shadow:#fff 0 1px 1px;color:#333333;text-shadow:rgba(255, 255, 255, 0.25) 0 0.08em 0;padding:0.6em;display:none !important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.x-form-label span{font-size:.8em;font-weight:bold}.x-field{min-height:2.5em}.x-field .x-field-input{position:relative}.x-field .x-field-input,.x-field .x-input-el{width:100%}.x-field.x-field-labeled .x-form-label{display:block !important}.x-field:last-child{border-bottom:0}.x-label-align-left .x-component-outer,.x-label-align-right .x-component-outer{-webkit-box-flex:1;box-flex:1}.x-label-align-left:first-child .x-form-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em}.x-label-align-left:last-child .x-form-label{-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em}.x-label-align-right{-webkit-box-direction:reverse;box-direction:reverse}.x-label-align-right:first-child .x-form-label{-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-label-align-right:last-child{border-bottom:0}.x-label-align-right:last-child .x-form-label{-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-label-align-top,.x-label-align-bottom{-webkit-box-orient:vertical;box-orient:vertical}.x-label-align-top:first-child .x-form-label{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-label-align-bottom:last-child .x-form-label{-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-input-el{padding:.4em;min-height:2.5em;display:block;border-width:0;background:transparent;-webkit-appearance:none}.x-field-mask{position:absolute;top:0;right:0;bottom:0;left:0}.x-field-required label:after,.x-field-required .x-form-label:after{content:"*";display:inline}.x-item-disabled label:after,.x-item-disabled .x-form-label:after{color:#666 !important}.x-field-textarea textarea{min-height:6em;padding-top:.5em}.x-checkmark-base,.x-field .x-input-radio:after,.x-field .x-input-checkbox:after,.x-field .x-input-radio:checked:after,.x-field .x-input-checkbox:checked:after,.x-field.x-item-disabled .x-input-radio:checked:after,.x-field.x-item-disabled .x-input-checkbox:checked:after,.x-select-overlay .x-item-selected .x-list-item-label:before,.x-select-overlay .x-item-selected .x-list-item-label:after{content:"";position:absolute;width:1.4em;height:1.4em;top:50%;left:auto;right:1.1em;-webkit-mask-size:1.4em;-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAE+klEQVRoBe2aS28URxRGsY0h2FmwCQuEWLHjvUNgZAQ4PMwrEkIRIGEgySKwB8QvYIvEP+ANO0CwsJAA88wGBEKBZJUVQkJCQrwJ5nxN31Z5pnpc7e4ZT9vT0peqqanquqfurVvlIW3Dw8NTJtPTPplgxdoCnugeb3m45eEJtgJTJwJPGw8cP8V6TfmC4/Z/H9uEAAZsIdqHZiMBn2UNbvigSw8M2AIAD6PtqBPpmYe+8t1NoL9GLfYf3bTKKhiWo9PoA9KV0dUgn/tRh8tXWg/Hnj0KUB8yz1JNnjXUuhFd264A/f0O7dKXpQ7EIiTPfkKuVyvrSlx3US+KPF26cMbwxeg8Gg3W4LWHFd6rUUepQprQnI/Rh9A25AtjmqseHVkK7w59UxpgYFdg7wH0CwqFpWvyrKI23GZ7OWluwgqwOnqOobVoWh4Tm97DwCpBHUFp2TiUX3v5QVMnLQzMmqAsUVWWyta3UX/TAmOcwjjk6KmE830W7GbU0ZTAGKYEJdj3yAcQ2qYw1jmsG9e0KF8122UDw/SHwFX0EYWC+fpZGG/hPcn1sqk8jGHas+dQ6KXCB6o2g91IPfKsObZpgDGsqAT1hXdpz25A7QZqZU1gBsxFSh5zbEA9yniOU5R5PSvvCnYTSsLYtdkLTGf9uKdD/gS6gI6jPndgUXXe24OKSFAK4zsoSVA+G6uAGaC758/oBrIs+Zb6rbg9up35Xpa1jffpUqEEldezysbJ0VPLjhHADOpEfUiw2gtuUtAKDiGtYNXeqDWJ7zveYQnqM3V3nqx1s2s97xmRoLzzWqMgkLLaTVQJa0ZoJe+hXjRmaMYKVlslr2dlp5wgu4PsiTyszmg5qgVr0CqvoZW2WFlKxhV5gxJsdIMKtYH+Eew6yksoNLy0soJeFzqR+vEI9gx6h9wFzFoPSlA+25g3SlChnnUNU3grkWmxRg0n+ihBnUR5w9j2bCbPGjzzR3sgbc+6gL66TV4zkTHHEqSfZSzr+94V0mbzKUF1GkSWknG5QktGyoj7qBdVeZo2S1Ch2yUNXOMVUcEJyrcQjOeP4vzQCu9BpBtOck5T70HybN4w1iJcR7ouem9QPjhfG+On7EBPUNrKhrYLWp7+FS1FCjtdKvJ6VvM/Q9o2uWC1AHq60QB6hELh0voJ+im6iHReF+FZwe5HP/g8lrXNzuEfeeFu9C9Kg8nSrr9lBZ9ljK/v37xjL5qRFSytf3K15KXy9EH0D/JN3ui2Qj1rC5AAq4FnJvoDPUSNBnTnUy4YQF1maFHlCOAYuouJFN6PkWtEo+ryrH5sL2TPVi5UFXAMrfDegxrtae3ZfWh6paFFffYCx9BKZLtQo/a0YLXIhSUo3yKlAsfQ8vSBBkALtrCjxwdqbTWBY2glst9REee0Lw/ULUEZpFuOChxD1yuRybNbUV0SlAtq9SDgGFp7ushEJlhdKuqWoAzSLYOBHeidGPkc+cIztE2wA6iuCcoFtXom4Bha4f0nGmv2FqyOnoaFscFG9rsfQusYq0T2G8qayASrbdEdOlfR/TJ72AzAaHla5/QD9BnVCucvfK/fjZXtx8WzZneu/+WBf53XOb0G6XetHjQXyfv2vKLyH7qLLqMhJn5DOW5PLmBZDfRUilloGUoD/ovvXgIrT4/rkxt4XK0fw+TtYxhT6iEt4FK7L8D4locDFqnUXSadh78Bx5bEl2CLG+8AAAAASUVORK5CYII=');margin-top:-0.7em}.x-field .x-input-radio,.x-field .x-input-checkbox{position:relative}.x-field .x-input-radio:after,.x-field .x-input-checkbox:after{background-color:#dddddd}.x-field .x-input-radio:checked:after,.x-field .x-input-checkbox:checked:after{background-color:#06346a}.x-field.x-item-disabled .x-input-radio:checked:after,.x-field.x-item-disabled .x-input-checkbox:checked:after{background-color:#9caaba}.x-spinner .x-component-outer{display:-webkit-box;display:box}.x-spinner .x-component-outer > *{width:auto}.x-spinner .x-field-input{-webkit-box-flex:1}.x-spinner .x-field-input .x-input-el{-webkit-text-fill-color:#000;padding:0;width:100%;text-align:center}.x-spinner .x-field-input input::-webkit-outer-spin-button,.x-spinner .x-field-input input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.x-spinner.x-item-disabled .x-input-el{-webkit-text-fill-color:#B3B3B3}.x-spinner.x-item-disabled .x-spinner-button{color:#aaa !important}.x-spinner.x-item-disabled .x-spinner-button,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button{border:1px solid #c4c4c4;border-top-color:#d0d0d0;color:black}.x-spinner.x-item-disabled .x-spinner-button.x-button-back:before,.x-spinner.x-item-disabled .x-spinner-button.x-button-forward:before,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-back:before,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-forward:before{background:#c4c4c4}.x-spinner.x-item-disabled .x-spinner-button,.x-spinner.x-item-disabled .x-spinner-button.x-button-back:after,.x-spinner.x-item-disabled .x-spinner-button.x-button-forward:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-back:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-forward:after{background-color:#f7f7f7;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #ffffff), color-stop(100%, #e5e5e5));background-image:-webkit-linear-gradient(#ffffff,#ffffff 2%,#e5e5e5);background-image:linear-gradient(#ffffff,#ffffff 2%,#e5e5e5)}.x-spinner.x-item-disabled .x-spinner-button .x-button-icon.x-icon-mask,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-spinner.x-item-disabled .x-spinner-button.x-button-pressing,.x-spinner.x-item-disabled .x-spinner-button.x-button-pressing:after,.x-spinner.x-item-disabled .x-spinner-button.x-button-pressed,.x-spinner.x-item-disabled .x-spinner-button.x-button-pressed:after,.x-spinner.x-item-disabled .x-spinner-button.x-button-active,.x-spinner.x-item-disabled .x-spinner-button.x-button-active:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressing,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressing:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressed,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-pressed:after,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-active,.x-toolbar .x-spinner.x-item-disabled .x-spinner-button.x-button-active:after{background-color:#efefef;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #d5d5d5), color-stop(10%, #e2e2e2), color-stop(65%, #efefef), color-stop(100%, #f0f0f0));background-image:-webkit-linear-gradient(#d5d5d5,#e2e2e2 10%,#efefef 65%,#f0f0f0);background-image:linear-gradient(#d5d5d5,#e2e2e2 10%,#efefef 65%,#f0f0f0)}.x-spinner .x-spinner-button{width:3em;padding:.65em 0;font-weight:bold;text-align:center}.x-spinner .x-spinner-button,.x-toolbar .x-spinner .x-spinner-button{border:1px solid #aaaaaa;border-top-color:#b7b7b7;color:black}.x-spinner .x-spinner-button.x-button-back:before,.x-spinner .x-spinner-button.x-button-forward:before,.x-toolbar .x-spinner .x-spinner-button.x-button-back:before,.x-toolbar .x-spinner .x-spinner-button.x-button-forward:before{background:#aaaaaa}.x-spinner .x-spinner-button,.x-spinner .x-spinner-button.x-button-back:after,.x-spinner .x-spinner-button.x-button-forward:after,.x-toolbar .x-spinner .x-spinner-button,.x-toolbar .x-spinner .x-spinner-button.x-button-back:after,.x-toolbar .x-spinner .x-spinner-button.x-button-forward:after{background-color:#dddddd;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #efefef), color-stop(100%, #cbcbcb));background-image:-webkit-linear-gradient(#ffffff,#efefef 2%,#cbcbcb);background-image:linear-gradient(#ffffff,#efefef 2%,#cbcbcb)}.x-spinner .x-spinner-button .x-button-icon.x-icon-mask,.x-toolbar .x-spinner .x-spinner-button .x-button-icon.x-icon-mask{background-color:black;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #4d4d4d), color-stop(2%, #121212), color-stop(100%, #000000));background-image:-webkit-linear-gradient(#4d4d4d,#121212 2%,#000000);background-image:linear-gradient(#4d4d4d,#121212 2%,#000000)}.x-spinner .x-spinner-button.x-button-pressing,.x-spinner .x-spinner-button.x-button-pressing:after,.x-spinner .x-spinner-button.x-button-pressed,.x-spinner .x-spinner-button.x-button-pressed:after,.x-spinner .x-spinner-button.x-button-active,.x-spinner .x-spinner-button.x-button-active:after,.x-toolbar .x-spinner .x-spinner-button.x-button-pressing,.x-toolbar .x-spinner .x-spinner-button.x-button-pressing:after,.x-toolbar .x-spinner .x-spinner-button.x-button-pressed,.x-toolbar .x-spinner .x-spinner-button.x-button-pressed:after,.x-toolbar .x-spinner .x-spinner-button.x-button-active,.x-toolbar .x-spinner .x-spinner-button.x-button-active:after{background-color:#d5d5d5;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #bcbcbc), color-stop(10%, #c9c9c9), color-stop(65%, #d5d5d5), color-stop(100%, #d7d7d7));background-image:-webkit-linear-gradient(#bcbcbc,#c9c9c9 10%,#d5d5d5 65%,#d7d7d7);background-image:linear-gradient(#bcbcbc,#c9c9c9 10%,#d5d5d5 65%,#d7d7d7)}.x-spinner .x-spinner-button-down{border:0 !important;border-right:1px solid #dddddd !important}.x-spinner .x-spinner-button-up{border:0 !important;border-left:1px solid #dddddd !important}.x-phone .x-select-overlay{min-width:14em;min-height:12.5em}.x-select-overlay{min-width:18em;min-height:22em}.x-select-overlay .x-list-item-label{height:2.6em}.x-select-overlay .x-list-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.x-select-overlay .x-item-selected .x-list-label{margin-right:2.6em}.x-select-overlay .x-item-selected .x-list-item-label:before{background-color:rgba(0, 0, 0, 0.3);margin-top:-0.8em}.x-select-overlay .x-item-selected .x-list-item-label:after{background-color:#dddddd}.x-slider-field .x-component-outer,.x-toggle-field .x-component-outer{padding:0.6em}.x-slider,.x-toggle{position:relative;height:2.2em;min-height:0;min-width:0}.x-slider > *,.x-toggle > *{position:absolute;width:100%;height:100%}.x-slider.x-item-disabled{opacity:.6}.x-thumb{position:absolute;height:2.2em;width:2.2em}.x-thumb:before{content:"";position:absolute;width:1.85em;height:1.85em;top:0.175em;left:0.175em;border:1px solid #919191;-webkit-border-radius:0.925em;border-radius:0.925em;background-color:#dddddd;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #efefef), color-stop(100%, #cbcbcb));background-image:-webkit-linear-gradient(#ffffff,#efefef 2%,#cbcbcb);background-image:linear-gradient(#ffffff,#efefef 2%,#cbcbcb);-webkit-background-clip:padding;background-clip:padding-box}.x-thumb.x-dragging{opacity:1}.x-thumb.x-dragging:before{background-color:#d0d0d0;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(2%, #e2e2e2), color-stop(100%, #bebebe));background-image:-webkit-linear-gradient(#ffffff,#e2e2e2 2%,#bebebe);background-image:linear-gradient(#ffffff,#e2e2e2 2%,#bebebe)}.x-slider:after{content:"";position:absolute;width:auto;height:0.8em;top:0.737em;left:0;right:0;margin:0 0.925em;background-color:#dddddd;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c4c4c4), color-stop(10%, #d0d0d0), color-stop(65%, #dddddd), color-stop(100%, #dedede));background-image:-webkit-linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);background-image:linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);border:0.1em solid rgba(0, 0, 0, 0.1);border-bottom:0;-webkit-box-shadow:rgba(255, 255, 255, 0.7) 0 0.1em 0;-webkit-border-radius:0.4em;border-radius:0.4em}.x-toggle{width:4.4em;-webkit-border-radius:1.1em;border-radius:1.1em;overflow:hidden;border:1px solid #b7b7b7;background-color:#ddd;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #c4c4c4), color-stop(10%, #d0d0d0), color-stop(65%, #dddddd), color-stop(100%, #dedede));background-image:-webkit-linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);background-image:linear-gradient(#c4c4c4,#d0d0d0 10%,#dddddd 65%,#dedede);-webkit-box-flex:0}.x-toggle .x-thumb.x-dragging{opacity:1}.x-toggle .x-thumb:before{top:0.175em}.x-toggle-on{background-color:#92cf00;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #6e9c00), color-stop(10%, #80b500), color-stop(65%, #92cf00), color-stop(100%, #94d200));background-image:-webkit-linear-gradient(#6e9c00,#80b500 10%,#92cf00 65%,#94d200);background-image:linear-gradient(#6e9c00,#80b500 10%,#92cf00 65%,#94d200)}input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}.x-field-number input::-webkit-outer-spin-button,.x-field-number input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.x-field-search .x-field-input{position:relative}.x-field-search .x-field-input:before{content:"";position:absolute;width:0.86em;height:0.86em;top:50%;left:0.5em;-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGdElEQVRoBdWaa4ycUxjHd9rpbm2bqKhiUavbVZdo0LCyLl3iHhGEkkZsKBYJX4RISHwQIYIPNJoQlUjTuCakUZ9oVGRF0GywslvqbgkpDarqsn7/6XsmM5n38pzzvtudeZL/nplznvM8z//cz5ktTU5OtuWRUqk0i/qdoAN0gcXgP+CkzIcx8APYBXbi82/SaZFSKGGILiTibnA+GADHgbkgSXZT8CF4GwyDEXxvI92r4k0Yoj1EeAG4CvSDEggRkX8VbID4lhADQXXUwxZgfAF4CGwFmgdFYQJb68HJljjy6mSSJZAZ4CLwESiKZJydb7A/CGblJZVWP5UwzueBB8AfIC7IovO0mK0B89KCzlOWSBinWoBeAkWTstiT3948xJLqxhLG2Xzw4jSRdQ0yiv/upMBD8xsI40Rzdu00k3WknyeO+aHk4urFEb4TJ/80CWEdYB4BhS1kdfswe+zpGNf80RYUIr9QSdgOdNCYCfaLcABpqFxBbymu3FIlDFkdD18B5wRYHaHOJvAeGCU4fa8IdnXUPAaoMZeDk4CvfEKFM7CrhswnbpxjZQX4C7j5Y0m1d64EXc5OWoqeFsPLwTvAYt/p/Iv+6jTb1rLKHMbYgWCjZxCb0T/e6qhWj3o6hz8HRMSRykp17l5WayfksyN8oafzTegfHOLQ1aG+blc6ZGQRdeVawB4GlWno7Pim1G9rB08AZzgrfRfdw3wdxelHvl/38K01Itc2Rf22Q8BPIIuoynXQL/SQj71DwcfA4n8nev1xjWfN0yGjD2gxsYh6432LolWHQL9F91Gj/j7oacUPFhE+11hbLxbrCFBzqWh5A4PDRqN90RZqVK9XE+ET67MSv41D9s3E0nwFX1Ndu4RFjkZpjkUxTkeEdTDIEvXqW1lKoeU0pOavXj10OsuSI1CYnaWUVC7COvpliR7f9CQzlaK5/LPBQRc6mstBIsIW0WXiO4tiDh35mIr1oS4kK2ENOctwqzPu+SX0MdDLjZWw9Pb1suyv7EPYR7cuEithLRLL6moW/0VriaVRtT1qTQkSER411Cyjc4pBL4/KEirPNRj4FZ3gXy5EWM+vWaIhtJQNf2GWYkg5dtWzui9bhuqn6OkVNUhE+ANjTZG91Kjrq6bDxHnGStqvcxHWsU5bQpZ0orCK3rDs21m2quXY6+DLTWBBNTP9wxbOKZZ4E63omLYZWG4r0nkQtOtwVASwdYeH723o9uTxS/3Ks+ytHk5/R3cI5LqIK2hEDw86XVkb+wV0Z+YiHDnWCjnu4Vj3Ug3DzhDn1NPacTX4HljJ6gFPr5e5RpZ74tFz6l0ezhWk5tFTYJFPEOjrLKxhrEazktWR8zVQ9vEVp1ttLYyplyeANQinN0ydIXBUnAOXR7nsrwAbgatrTbX3nu1s5Ul1oKgIRsZYMR/jy72gY0+u6a8OJMJX1P+C9MsaqDcPAseCHtANQkRTwHIoybZd21qR0Q2k1pZP0tNJSIubLhxJOr75egO/sjbekM/VIe0qY1RDb6p//PYl6/QniO0sF2tI2kBYRpBTgVrUOWqm9DPiGgghW+GWVBGj/UCvEM1E1sWinr4sKfa0/NgedhUwqsVITzvOUTOl6gxv0qmERRw5HOi/bHz2zb3VMHp28hremYQj0rq23QhGwFSQ0ZVPu8NvAfa3Use8kJkI1wzxxRhfDcYDAotrKF0GngYnRA17D599f7KVXcVzmoszLfUi7AxhfBG4GKwFPudhBacnmpfBStDwnzrkrQIhpDW8L3ExJqXV/wBA2Vs4WelquT9Qzy8FvdHnDlKR01RQ8OrJMaAp8TnYQUA7SBsEm6pzPXgcyI6PaCG7Hdu6VcVLUkuE5ONBR8ByDGb42sPGteBPEDcV0vK0ZZ2Z5C9oSCcZKzqfwO8OJK2FbCAunqYmrICRQaA3rLRejSvTWtGwTzc94Yj0DQS/O4C05nQd6VYhrIVMpEN6Wqv3crBngY4b582aR9DXgJCFTPt05T+AtKq2jNARzxLs/UBbnY/0onwLO97sXPuwj8cidQn8OuytAe0edjUyuluqh2vIPcNnPS1rIbOKfkRf0pKEGdqSJyFwM/AZ3j+2JGHXpZDWWf4+sMvlpaTal7e3xLYEsdQ4ITIIsras29AppxrKctRM5ZDRLUvv13GnLl1p5yjellylCb5BolvWkRQMgT6g6apXmnVgPWQrc/1/boJCaHVWyukAAAAASUVORK5CYII=');-webkit-mask-size:.86em;background-color:#ccc;-webkit-mask-repeat:no-repeat;margin-top:-0.43em}.x-field-search .x-field-input .x-form-field{margin-left:1.0em}.x-field-input .x-clear-icon{display:none;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAADHmlDQ1BJQ0MgUHJvZmlsZQAAeAGFVN9r01AU/tplnbDhizpnEQk+aJFuZFN0Q5y2a1e6zVrqNrchSJumbVyaxiTtfrAH2YtvOsV38Qc++QcM2YNve5INxhRh+KyIIkz2IrOemzRNJ1MDufe73/nuOSfn5F6g+XFa0xQvDxRVU0/FwvzE5BTf8gFeHEMr/GhNi4YWSiZHQA/Tsnnvs/MOHsZsdO5v36v+Y9WalQwR8BwgvpQ1xCLhWaBpXNR0E+DWie+dMTXCzUxzWKcECR9nOG9jgeGMjSOWZjQ1QJoJwgfFQjpLuEA4mGng8w3YzoEU5CcmqZIuizyrRVIv5WRFsgz28B9zg/JfsKiU6Zut5xCNbZoZTtF8it4fOX1wjOYA1cE/Xxi9QbidcFg246M1fkLNJK4RJr3n7nRpmO1lmpdZKRIlHCS8YlSuM2xp5gsDiZrm0+30UJKwnzS/NDNZ8+PtUJUE6zHF9fZLRvS6vdfbkZMH4zU+pynWf0D+vff1corleZLw67QejdX0W5I6Vtvb5M2mI8PEd1E/A0hCgo4cZCjgkUIMYZpjxKr4TBYZIkqk0ml0VHmyONY7KJOW7RxHeMlfDrheFvVbsrj24Pue3SXXjrwVhcW3o9hR7bWB6bqyE5obf3VhpaNu4Te55ZsbbasLCFH+iuWxSF5lyk+CUdd1NuaQU5f8dQvPMpTuJXYSWAy6rPBe+CpsCk+FF8KXv9TIzt6tEcuAcSw+q55TzcbsJdJM0utkuL+K9ULGGPmQMUNanb4kTZyKOfLaUAsnBneC6+biXC/XB567zF3h+rkIrS5yI47CF/VFfCHwvjO+Pl+3b4hhp9u+02TrozFa67vTkbqisXqUj9sn9j2OqhMZsrG+sX5WCCu0omNqSrN0TwADJW1Ol/MFk+8RhAt8iK4tiY+rYleQTysKb5kMXpcMSa9I2S6wO4/tA7ZT1l3maV9zOfMqcOkb/cPrLjdVBl4ZwNFzLhegM3XkCbB8XizrFdsfPJ63gJE722OtPW1huos+VqvbdC5bHgG7D6vVn8+q1d3n5H8LeKP8BqkjCtbCoV8yAAAACXBIWXMAAAsTAAALEwEAmpwYAAABbmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNC40LjAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iPgogICAgICAgICA8ZGM6c3ViamVjdD4KICAgICAgICAgICAgPHJkZjpCYWcvPgogICAgICAgICA8L2RjOnN1YmplY3Q+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgrlPw1BAAAIWklEQVRoBdVbS2hVRxiee83LmJeaRBOTCKWgtIiJoQYNFAnSRSF205AqKEJ3urDQlq7aECuuCqUUzK5gS20XBUMLlQYaH3TRoGJsaTURN0mMryQGE40mJun3He65zL2ZmTPnZZOBm3POzPz//N/MN/88k1hcXBRxh2vXrlUsLCxsWbVq1WaUV5JIJIpRZi5+0/iewvc40gdvI7S1tc3GaU8iDsBXr17dlpOTsxeGt+C3G791NiBgyzzA30De83jvffLkye/Nzc1TNrK2eSIDDJBVAHkIhh6E0a/bGmDKB10zSO9G659ubGzswXdoOoYGfOXKlVcA9BOAPAzj8kwAwqQB67+QP3nr1q0fQfv5oLoCA+7r6yvJz88/joKPAmxOUAMCyN2cn58/umPHjt4AsiIQ4P7+/ndQWBeAVgUpNAoZtPgP0HOkvr5+0o8+X4ABMAGP+xkeHSgk4aegmPIOQO++7du3D9rqtwYMp1SIYeU0wL5rq/xl5ENLT8KmdoDusSkvaZPp8uXLtXBMfyw3sLQdNpUB9K/oZsdssHi2MMHm5ub2QfH/1l9tgDAPhq8TDQ0Nn5ryGwGTxmxZKGgwKVlOaQB9AKDp0JRBS2m0aIJ9FlIrBiwRJpPJb0DvN5Roma5LSHnjZeWgdLZmxRfguxv2V2fFO59KwBxn0cAcelZkgO3V+J29cOHCkgnRkojUDKoLSI3jbF1dnVi7dq22QsbGxsSdO3e06aaE2tpasW6dfr0xMjIixsfHTSrovXeWlZV9gExfyBmXtDCni8js6ZEJZm5uTtaV8b5+/XpRVFSUEWfzQRlTRT5+/FhMTEzYqCLoDjRgjZw5AzAXAkg8KmfQvWM+K4aGhnTJLEzU1NTQiWjzZCe4MnyqwosXLwRbF+OuKlkVV1RQUNApJ2RYk1r1LKG5LCC/Y70qHj58KEdlvIMtoqrKkyxpmY0bNwrK6ALBmlilkkPlHMTwWuempQFzPYuaPewm2DxZ0/fv3xfPnj3TZmdftKF2YWGhKC8v1+ohjUlnvwGYctGQH7lyacCIPIRI3+tZUnt4eNjVt+RJSm/atMmh+JJEKYJ5dPSfnZ0Vd+/e9UNlSbOg3MFz58451EkDZmRGLh8fMzMzjkE6EdK0ulo5LDoiGzZsEKtXr9aJO/2W/TdoQCuXobu0Ut4BDDpvQ2TgbRlSm8ME+7QqQLfjeVXUhlNxqMw8qvDgwQMxPT2tSvIVB/bsp4ADGHTe60takZnU5lCFuawiVQhMU51WzqYtWx7lK2XIHDpFVmjYAB0tnZ2d6TGjJaxCytN5sa/pAluTntgNprGaIFmBYajslsMnad3a2trg9uFmOTHoO4189OiR1pvK1M7LyxOVlZVaZ3bv3j3x9OnToKYo5VD+7hxukoNm+jmiUlQfSWqzlTnMqKjKOI7N9LwErQpTU1PObCoKKsv6AXhrEkq3ypFRvHtRmx65pKREWRQpzNaNispyIQC8JcnjDzkyqvfJyUmH3ip9pHa283LzcSITNZVd3WjczUl4VZ7zRB7orTmkPH/+3Fq3qZKslRgyoqJLkvgTC2CWS2qzxWz6IiuGeekD4gqwo5hemqd4sQWOpXRQXoEOzDTb8pK3TM8l4PDTGE1pnGxw2mhaAbmi7NfMy7E6xjBNLx3pcaRsLBfy2HWQo4zvrBiOzayoOAIqdYp92LxXErBkjsNsMVWgQ9P1a1ZSaWmpSix0HMocp5ceDK0pSwEnF5xCqiYezMp1Lfu2LnBiElN/HkzymgGQR+Ya2Re56C8uVjt/d23L2ZhucuFWWNTUhm0DSd6pwMsNXW37jSeV5QWCLE8ac2wmaC75OO/WUZszMdKbFRhVAJuvu4uH81EoZcuYdjcIUt5e5RTStD1EakfotRcB+KIDGLUc6DRdriS2REVFhbbvkb6jo6OyiLN2ZpxussHpJyswCmoD41+4JzLmAOZtGUTovUiGmeoP7mZwSFEF0pYLeVVrelF7zZo1guvmsNSGDb/QNgdw6mpQt8pYmzhSmXvQukCPzL6rC2xl05w7Cq8NtnzH8t0+THp9qzPIFM+ap0G6tS30eh65kAGm7SGWz+OXENT+070WkQYMfv+Ggnk1yFegNzWdA/GMyWa5R2qbjlDovDiRCUjtL11QacAAy52yk26CzRM3A4xUJk3piW0Dx2YTtekU2ad9hoHu7u6fXJk0YEbw0hceN91E05M1zX6rm02x/nyeAzle20uGp5Z+qA07jnd0dKS3UjMA84YbgtVhGmms26ZhRXFSQZr6DdljdbY8WcWhyiYA7CXc4zoj51Xe8cCB+Bm0oLNxLWdeSe8AOwcMDXBW/8h2Z7SwlHAE7wPS94p7BeBj2WAJQgk4dZ1vH4R8XetbLrUCu0/hJk+Xyh4lYGbkuAVKtEM4spWUyoAY4nqxGai9pKYFnALdg+eHMRgVi0o0zm2M+W179uzRHjUaAdMq0PsrzJZOxGJhhEoJFox8e9euXcYLIJ6AaROv8wH0Abzqj/ojNN6vKoA9j/n6TnZDL1krwFTC63xQ/CZ+mWs8rxJiToc9p9Bn3/JqWdcM5TjsJqqevOEG6pzFb6cq/WXFAegcfsd03lhnh3ULuwpQwChqtBmFfYw4/1MpV1GIJ8q+hAqHKeqhx6TadwvLynjpC6uYThjA/2SJ9QQjVe4AyvocjvR72Q4/775bWFbe1NQ0AkfxPubfryL+axgT10SlD/rbsep5LQxY2h6qhalADrwahM2AfWjt9wC+BU/7YwdZkXPTaPFv6PiZOxU23jdTXP8VKWC5GF4g4Z0KgG7Gbwt+WwFgM57FeHLTml1gGt/8d7wxvHNmN4Dh7zp+F7nhJuuL6v0/Vc+vwPfknLsAAAAASUVORK5CYII=') no-repeat;background-position:center center;background-size:55% 55%;width:2.2em;height:2.2em;margin:.5em;margin-top:-1.1em;position:absolute;top:50%;right:-0.5em}.x-field-clearable .x-clear-icon{display:block}.x-field-clearable .x-field-input{padding-right:2.2em}.x-android .x-input-el{-webkit-text-fill-color:#000}.x-android .x-empty .x-input-el{-webkit-text-fill-color:#A9A9A9}.x-item-disabled .x-form-label span,.x-item-disabled input,.x-item-disabled .x-input-el,.x-item-disabled .x-spinner-body,.x-item-disabled select,.x-item-disabled textarea,.x-item-disabled .x-field-clear-container{color:#b3b3b3;-webkit-text-fill-color:#b3b3b3;pointer-events:none}.x-form-fieldset{margin:0 0 1.5em}.x-form-fieldset .x-form-label{background-color:#f7f7f7;border-top:1px solid white}.x-form-fieldset .x-form-fieldset-inner{border:1px solid #dddddd;background:#fff;padding:0;-webkit-border-radius:0.4em;border-radius:0.4em;overflow:hidden}.x-form-fieldset .x-field{border-bottom:1px solid #dddddd}.x-form-fieldset .x-field:first-child{-webkit-border-top-left-radius:0.4em;border-top-left-radius:0.4em;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em}.x-form-fieldset .x-field:last-child{border-bottom:0;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em}.x-form-fieldset-title{text-shadow:#fff 0 1px 1px;color:#333333;margin:1em 0.7em 0.3em;color:#333333;font-weight:bold;white-space:nowrap}.x-form-fieldset-instructions{text-shadow:#fff 0 1px 1px;color:#333333;color:gray;margin:1em 0.7em 0.3em;font-size:.8em;text-align:center}.x-selectmark-base,.x-field-select .x-component-outer:after{content:"";position:absolute;width:1em;height:1em;top:50%;left:auto;right:0.7em;-webkit-mask-size:1em;-webkit-mask-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpGRTdGMTE3NDA3MjA2ODExOTJDQUMyNUQwRUE4NjdEQiIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoxQTFBMDFDQ0I5NEYxMURGQUU1RjlGMEFERUNDQTVEMCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyMkRCMDIxMkI5NEUxMURGQUU1RjlGMEFERUNDQTVEMCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjMwRTE0QzVBNDIyMjY4MTFCQ0ZCOTAzOTcwNzcyRkVCIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkZFN0YxMTc0MDcyMDY4MTE5MkNBQzI1RDBFQTg2N0RCIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+HfrH/AAAAeVJREFUeNrs2cFHBGEUAPA3zYqIiIhOnTpFRHSKrp26RqeuEV077R/QqWtE166dOkVERHRa9hQRnZalFcv0Hk/W1Mx+38z3vvlm5j3eZW+/9+abne+9KEkSaFPMQMtCwQpWsIIVrGAFK1jBClawgo2ik/4hiqJGwLKuvfpIc5xSkWqYr5hzU1s/mRNxXTPsJ+ZqluvXlwOmSj3XBDvG3M1rpAmYYoUrFzr4ZNqTawqm2MH8Dhh7ZXJUbcAUx4FinzBnJcAUl4FhP/jIgRSYKvkYCJaO2LbNv08RMMUy5nsA4COTLy0XYIqtil9iF6aflq7AwBWuAvuQ9ZKSBgNX2ieWjtKSzeXBNZgqfe8J+4W5aXtbcg0GrvibB/BhkeuhBJhigzsghT0veh+WAlMcCGHvMOMQwcCdcIntYy6WmXhIg2PuiAvsEHO97IhHGgzckb4D8L6LmZYPMHBnhiWwXVdDPF9g4A4Vwd66nFr6BAN3ygbbw1yoMzjmjplgB5hrrufSvsHAHesZDOD2JAbxVYCBOzfIAZ9JbR6qAgN3cPwP9kZy1VIlGLiTdluCmoOBO/pnS9Bk8DzmS3pL4BMcpZEe1qX0GI/atC4dQYXRMa1MU0IX4gpWsIIVrGAFK1jBCnYUPwIMAPUPAyFL+nRdAAAAAElFTkSuQmCC');margin-top:-0.5em}.x-field-select{position:relative}.x-field-select .x-component-outer:after{background-color:#dddddd;z-index:2}.x-field-select .x-component-outer:before,.x-field-select .x-component-outer:after{pointer-events:none;position:absolute;display:block}.x-field-select .x-component-outer:before{content:"";position:absolute;width:4em;height:auto;top:0;left:auto;right:0;bottom:0;-webkit-border-top-right-radius:0.4em;border-top-right-radius:0.4em;-webkit-border-bottom-right-radius:0.4em;border-bottom-right-radius:0.4em;background:-webkit-gradient(linear, 0% 0%, 100% 0%, from(rgba(255, 255, 255, 0)), color-stop(0.5, white));z-index:1}.x-msgbox{min-width:15em;max-width:20em;padding:0.8em;-webkit-box-shadow:rgba(0, 0, 0, 0.4) 0 0.1em 0.5em;-webkit-border-radius:0.3em;border-radius:0.3em;border:0.15em solid #354f6e}.x-msgbox .x-icon{margin-left:1.3em}.x-msgbox .x-title{font-size:.9em;line-height:1.4em}.x-msgbox .x-body{background:transparent !important}.x-msgbox .x-toolbar{background:transparent none;-webkit-box-shadow:none}.x-msgbox .x-toolbar.x-docked-top{border-bottom:0;height:1.3em}.x-msgbox .x-toolbar.x-docked-bottom{border-top:0}.x-msgbox .x-field{min-height:2em;background:#fff;-webkit-border-radius:0.2em;border-radius:0.2em}.x-msgbox .x-form-field{min-height:1.5em;padding-right:0 !important;-webkit-appearance:none}.x-msgbox .x-field-input{padding-right:2.2em}.x-msgbox-text{text-align:center;padding:6px 0;line-height:1.4em}.x-msgbox-buttons{padding:0.4em 0;height:auto}.x-msgbox-buttons .x-button{min-width:4.5em}.x-msgbox-buttons .x-button-normal span{opacity:.7}.x-msgbox-dark .x-msgbox-text{color:rgba(186, 202, 222, 0.9);text-shadow:rgba(0, 0, 0, 0.5) 0 -0.08em 0}.x-msgbox-dark .x-msgbox-input{background-color:rgba(186, 202, 222, 0.9);background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(152,176,205,0.9)), color-stop(10%, rgba(169,189,214,0.9)), color-stop(65%, rgba(186,202,222,0.9)), color-stop(100%, rgba(188,204,223,0.9)));background-image:-webkit-linear-gradient(rgba(152,176,205,0.9),rgba(169,189,214,0.9) 10%,rgba(186,202,222,0.9) 65%,rgba(188,204,223,0.9));background-image:linear-gradient(rgba(152,176,205,0.9),rgba(169,189,214,0.9) 10%,rgba(186,202,222,0.9) 65%,rgba(188,204,223,0.9));border:0.1em solid rgba(66, 99, 138, 0.9)}.x-loading-spinner{font-size:250%;height:1em;width:1em;position:relative;-webkit-transform-origin:0.5em 0.5em}.x-loading-spinner > span,.x-loading-spinner > span:before,.x-loading-spinner > span:after{display:block;position:absolute;width:0.1em;height:0.25em;top:0;-webkit-transform-origin:0.05em 0.5em;-webkit-border-radius:0.05em;border-radius:0.05em;content:" "}.x-loading-spinner > span.x-loading-top{background-color:rgba(170, 170, 170, 0.99)}.x-loading-spinner > span.x-loading-top::after{background-color:rgba(170, 170, 170, 0.9)}.x-loading-spinner > span.x-loading-left::before{background-color:rgba(170, 170, 170, 0.8)}.x-loading-spinner > span.x-loading-left{background-color:rgba(170, 170, 170, 0.7)}.x-loading-spinner > span.x-loading-left::after{background-color:rgba(170, 170, 170, 0.6)}.x-loading-spinner > span.x-loading-bottom::before{background-color:rgba(170, 170, 170, 0.5)}.x-loading-spinner > span.x-loading-bottom{background-color:rgba(170, 170, 170, 0.4)}.x-loading-spinner > span.x-loading-bottom::after{background-color:rgba(170, 170, 170, 0.35)}.x-loading-spinner > span.x-loading-right::before{background-color:rgba(170, 170, 170, 0.3)}.x-loading-spinner > span.x-loading-right{background-color:rgba(170, 170, 170, 0.25)}.x-loading-spinner > span.x-loading-right::after{background-color:rgba(170, 170, 170, 0.2)}.x-loading-spinner > span.x-loading-top::before{background-color:rgba(170, 170, 170, 0.15)}.x-loading-spinner > span{left:50%;margin-left:-0.05em}.x-loading-spinner > span.x-loading-top{-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg)}.x-loading-spinner > span.x-loading-right{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg)}.x-loading-spinner > span.x-loading-bottom{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg)}.x-loading-spinner > span.x-loading-left{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg)}.x-loading-spinner > span::before{-webkit-transform:rotate(30deg);-moz-transform:rotate(30deg)}.x-loading-spinner > span::after{-webkit-transform:rotate(-30deg);-moz-transform:rotate(-30deg)}.x-loading-spinner{-webkit-animation-name:x-loading-spinner-rotate;-webkit-animation-duration:.5s;-webkit-animation-iteration-count:infinite;-webkit-animation-timing-function:linear}@-webkit-keyframes x-loading-spinner-rotate{0%{-webkit-transform:rotate(0deg)}8.32%{-webkit-transform:rotate(0deg)}8.33%{-webkit-transform:rotate(30deg)}16.65%{-webkit-transform:rotate(30deg)}16.66%{-webkit-transform:rotate(60deg)}24.99%{-webkit-transform:rotate(60deg)}25%{-webkit-transform:rotate(90deg)}33.32%{-webkit-transform:rotate(90deg)}33.33%{-webkit-transform:rotate(120deg)}41.65%{-webkit-transform:rotate(120deg)}41.66%{-webkit-transform:rotate(150deg)}49.99%{-webkit-transform:rotate(150deg)}50%{-webkit-transform:rotate(180deg)}58.32%{-webkit-transform:rotate(180deg)}58.33%{-webkit-transform:rotate(210deg)}66.65%{-webkit-transform:rotate(210deg)}66.66%{-webkit-transform:rotate(240deg)}74.99%{-webkit-transform:rotate(240deg)}75%{-webkit-transform:rotate(270deg)}83.32%{-webkit-transform:rotate(270deg)}83.33%{-webkit-transform:rotate(300deg)}91.65%{-webkit-transform:rotate(300deg)}91.66%{-webkit-transform:rotate(330deg)}100%{-webkit-transform:rotate(330deg)}}
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/sencha-touch.js b/apps/files_odfviewer/src/webodf/programs/touchui/sencha-touch.js
deleted file mode 100644
index caf8e4541d2..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/sencha-touch.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
-
-This file is part of Sencha Touch 2
-
-Copyright (c) 2012 Sencha Inc
-
-Contact: http://www.sencha.com/contact
-
-Commercial Usage
-Licensees holding valid commercial licenses may use this file in accordance with the Commercial Software License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Sencha.
-
-If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
-
-*/
-(function(){var global=this,objectPrototype=Object.prototype,toString=objectPrototype.toString,enumerables=true,enumerablesTest={toString:1},emptyFn=function(){},i;if(typeof Ext==="undefined"){global.Ext={}}Ext.global=global;for(i in enumerablesTest){enumerables=null}if(enumerables){enumerables=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"]}Ext.enumerables=enumerables;Ext.apply=function(object,config,defaults){if(defaults){Ext.apply(object,defaults)}if(object&&config&&typeof config==="object"){var i,j,k;for(i in config){object[i]=config[i]}if(enumerables){for(j=enumerables.length;j--;){k=enumerables[j];if(config.hasOwnProperty(k)){object[k]=config[k]}}}}return object};Ext.buildSettings=Ext.apply({baseCSSPrefix:"x-",scopeResetCSS:false},Ext.buildSettings||{});Ext.apply(Ext,{emptyFn:emptyFn,baseCSSPrefix:Ext.buildSettings.baseCSSPrefix,applyIf:function(object,config){var property;if(object){for(property in config){if(object[property]===undefined){object[property]=config[property]}}}return object},iterate:function(object,fn,scope){if(Ext.isEmpty(object)){return}if(scope===undefined){scope=object}if(Ext.isIterable(object)){Ext.Array.each.call(Ext.Array,object,fn,scope)}else{Ext.Object.each.call(Ext.Object,object,fn,scope)}}});Ext.apply(Ext,{extend:function(){var objectConstructor=objectPrototype.constructor,inlineOverrides=function(o){for(var m in o){if(!o.hasOwnProperty(m)){continue}this[m]=o[m]}};return function(subclass,superclass,overrides){if(Ext.isObject(superclass)){overrides=superclass;superclass=subclass;subclass=overrides.constructor!==objectConstructor?overrides.constructor:function(){superclass.apply(this,arguments)}}var F=function(){},subclassProto,superclassProto=superclass.prototype;F.prototype=superclassProto;subclassProto=subclass.prototype=new F();subclassProto.constructor=subclass;subclass.superclass=superclassProto;if(superclassProto.constructor===objectConstructor){superclassProto.constructor=superclass}subclass.override=function(overrides){Ext.override(subclass,overrides)};subclassProto.override=inlineOverrides;subclassProto.proto=subclassProto;subclass.override(overrides);subclass.extend=function(o){return Ext.extend(subclass,o)};return subclass}}(),override:function(cls,overrides){if(cls.$isClass){return cls.override(overrides)}else{Ext.apply(cls.prototype,overrides)}}});Ext.apply(Ext,{valueFrom:function(value,defaultValue,allowBlank){return Ext.isEmpty(value,allowBlank)?defaultValue:value},typeOf:function(value){if(value===null){return"null"}var type=typeof value;if(type==="undefined"||type==="string"||type==="number"||type==="boolean"){return type}var typeToString=toString.call(value);switch(typeToString){case"[object Array]":return"array";case"[object Date]":return"date";case"[object Boolean]":return"boolean";case"[object Number]":return"number";case"[object RegExp]":return"regexp"}if(type==="function"){return"function"}if(type==="object"){if(value.nodeType!==undefined){if(value.nodeType===3){return(/\S/).test(value.nodeValue)?"textnode":"whitespace"}else{return"element"}}return"object"}},isEmpty:function(value,allowEmptyString){return(value===null)||(value===undefined)||(!allowEmptyString?value==="":false)||(Ext.isArray(value)&&value.length===0)},isArray:("isArray" in Array)?Array.isArray:function(value){return toString.call(value)==="[object Array]"},isDate:function(value){return toString.call(value)==="[object Date]"},isObject:(toString.call(null)==="[object Object]")?function(value){return value!==null&&value!==undefined&&toString.call(value)==="[object Object]"&&value.ownerDocument===undefined}:function(value){return toString.call(value)==="[object Object]"},isSimpleObject:function(value){return value instanceof Object&&value.constructor===Object},isPrimitive:function(value){var type=typeof value;return type==="string"||type==="number"||type==="boolean"},isFunction:(typeof document!=="undefined"&&typeof document.getElementsByTagName("body")==="function")?function(value){return toString.call(value)==="[object Function]"}:function(value){return typeof value==="function"},isNumber:function(value){return typeof value==="number"&&isFinite(value)},isNumeric:function(value){return !isNaN(parseFloat(value))&&isFinite(value)},isString:function(value){return typeof value==="string"},isBoolean:function(value){return typeof value==="boolean"},isElement:function(value){return value?value.nodeType===1:false},isTextNode:function(value){return value?value.nodeName==="#text":false},isDefined:function(value){return typeof value!=="undefined"},isIterable:function(value){return(value&&typeof value!=="string")?value.length!==undefined:false}});Ext.apply(Ext,{clone:function(item){if(item===null||item===undefined){return item}if(item.nodeType&&item.cloneNode){return item.cloneNode(true)}var type=toString.call(item);if(type==="[object Date]"){return new Date(item.getTime())}var i,j,k,clone,key;if(type==="[object Array]"){i=item.length;clone=[];while(i--){clone[i]=Ext.clone(item[i])}}else{if(type==="[object Object]"&&item.constructor===Object){clone={};for(key in item){clone[key]=Ext.clone(item[key])}if(enumerables){for(j=enumerables.length;j--;){k=enumerables[j];clone[k]=item[k]}}}}return clone||item},getUniqueGlobalNamespace:function(){var uniqueGlobalNamespace=this.uniqueGlobalNamespace;if(uniqueGlobalNamespace===undefined){var i=0;do{uniqueGlobalNamespace="ExtBox"+(++i)}while(Ext.global[uniqueGlobalNamespace]!==undefined);Ext.global[uniqueGlobalNamespace]=Ext;this.uniqueGlobalNamespace=uniqueGlobalNamespace}return uniqueGlobalNamespace},functionFactory:function(){var args=Array.prototype.slice.call(arguments),ln=args.length;if(ln>0){args[ln-1]="var Ext=window."+this.getUniqueGlobalNamespace()+";"+args[ln-1]}return Function.prototype.constructor.apply(Function.prototype,args)},globalEval:("execScript" in global)?function(code){global.execScript(code)}:function(code){(function(){eval(code)})()},});Ext.type=Ext.typeOf})();(function(){var a="4.1.0",b;Ext.Version=b=Ext.extend(Object,{constructor:function(d){var c=this.toNumber,f,e;if(d instanceof b){return d}this.version=this.shortVersion=String(d).toLowerCase().replace(/_/g,".").replace(/[\-+]/g,"");e=this.version.search(/([^\d\.])/);if(e!==-1){this.release=this.version.substr(e,d.length);this.shortVersion=this.version.substr(0,e)}this.shortVersion=this.shortVersion.replace(/[^\d]/g,"");f=this.version.split(".");this.major=c(f.shift());this.minor=c(f.shift());this.patch=c(f.shift());this.build=c(f.shift());return this},toNumber:function(c){c=parseInt(c||0,10);if(isNaN(c)){c=0}return c},toString:function(){return this.version},valueOf:function(){return this.version},getMajor:function(){return this.major||0},getMinor:function(){return this.minor||0},getPatch:function(){return this.patch||0},getBuild:function(){return this.build||0},getRelease:function(){return this.release||""},isGreaterThan:function(c){return b.compare(this.version,c)===1},isGreaterThanOrEqual:function(c){return b.compare(this.version,c)>=0},isLessThan:function(c){return b.compare(this.version,c)===-1},isLessThanOrEqual:function(c){return b.compare(this.version,c)<=0},equals:function(c){return b.compare(this.version,c)===0},match:function(c){c=String(c);return this.version.substr(0,c.length)===c},toArray:function(){return[this.getMajor(),this.getMinor(),this.getPatch(),this.getBuild(),this.getRelease()]},getShortVersion:function(){return this.shortVersion},gt:function(){return this.isGreaterThan.apply(this,arguments)},lt:function(){return this.isLessThan.apply(this,arguments)},gtEq:function(){return this.isGreaterThanOrEqual.apply(this,arguments)},ltEq:function(){return this.isLessThanOrEqual.apply(this,arguments)}});Ext.apply(b,{releaseValueMap:{dev:-6,alpha:-5,a:-5,beta:-4,b:-4,rc:-3,"#":-2,p:-1,pl:-1},getComponentValue:function(c){return !c?0:(isNaN(c)?this.releaseValueMap[c]||c:parseInt(c,10))},compare:function(g,f){var d,e,c;g=new b(g).toArray();f=new b(f).toArray();for(c=0;c<Math.max(g.length,f.length);c++){d=this.getComponentValue(g[c]);e=this.getComponentValue(f[c]);if(d<e){return -1}else{if(d>e){return 1}}}return 0}});Ext.apply(Ext,{versions:{},lastRegisteredVersion:null,setVersion:function(d,c){Ext.versions[d]=new b(c);Ext.lastRegisteredVersion=Ext.versions[d];return this},getVersion:function(c){if(c===undefined){return Ext.lastRegisteredVersion}return Ext.versions[c]},deprecate:function(c,e,f,d){if(b.compare(Ext.getVersion(c),e)<1){f.call(d)}}});Ext.setVersion("core",a)})();Ext.String={trimRegex:/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,escapeRe:/('|\\)/g,formatRe:/\{(\d+)\}/g,escapeRegexRe:/([-.*+?^${}()|[\]\/\\])/g,htmlEncode:(function(){var d={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;"},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+")","g");return function(e){return(!e)?e:String(e).replace(a,function(g,f){return d[f]})}})(),htmlDecode:(function(){var d={"&amp;":"&","&gt;":">","&lt;":"<","&quot;":'"'},b=[],c,a;for(c in d){b.push(c)}a=new RegExp("("+b.join("|")+"|&#[0-9]{1,5};)","g");return function(e){return(!e)?e:String(e).replace(a,function(g,f){if(f in d){return d[f]}else{return String.fromCharCode(parseInt(f.substr(2),10))}})}})(),urlAppend:function(b,a){if(!Ext.isEmpty(a)){return b+(b.indexOf("?")===-1?"?":"&")+a}return b},trim:function(a){return a.replace(Ext.String.trimRegex,"")},capitalize:function(a){return a.charAt(0).toUpperCase()+a.substr(1)},ellipsis:function(c,a,d){if(c&&c.length>a){if(d){var e=c.substr(0,a-2),b=Math.max(e.lastIndexOf(" "),e.lastIndexOf("."),e.lastIndexOf("!"),e.lastIndexOf("?"));if(b!==-1&&b>=(a-15)){return e.substr(0,b)+"..."}}return c.substr(0,a-3)+"..."}return c},escapeRegex:function(a){return a.replace(Ext.String.escapeRegexRe,"\\$1")},escape:function(a){return a.replace(Ext.String.escapeRe,"\\$1")},toggle:function(b,c,a){return b===c?a:c},leftPad:function(b,c,d){var a=String(b);d=d||" ";while(a.length<c){a=d+a}return a},format:function(b){var a=Ext.Array.toArray(arguments,1);return b.replace(Ext.String.formatRe,function(c,d){return a[d]})},repeat:function(e,d,b){for(var a=[],c=d;c--;){a.push(e)}return a.join(b||"")}};Ext.htmlEncode=Ext.String.htmlEncode;Ext.htmlDecode=Ext.String.htmlDecode;Ext.urlAppend=Ext.String.urlAppend;(function(){var f=Array.prototype,n=f.slice,p=function(){var z=[],e,y=20;if(!z.splice){return false}while(y--){z.push("A")}z.splice(15,0,"F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F","F");e=z.length;z.splice(13,0,"XXX");if(e+1!=z.length){return false}return true}(),i="forEach" in f,t="map" in f,o="indexOf" in f,x="every" in f,c="some" in f,d="filter" in f,m=function(){var e=[1,2,3,4,5].sort(function(){return 0});return e[0]===1&&e[1]===2&&e[2]===3&&e[3]===4&&e[4]===5}(),j=true,a;try{if(typeof document!=="undefined"){n.call(document.getElementsByTagName("body"))}}catch(r){j=false}function l(y,e){return(e<0)?Math.max(0,y.length+e):Math.min(y.length,e)}function w(F,E,y,I){var J=I?I.length:0,A=F.length,G=l(F,E);if(G===A){if(J){F.push.apply(F,I)}}else{var D=Math.min(y,A-G),H=G+D,z=H+J-D,e=A-H,B=A-D,C;if(z<H){for(C=0;C<e;++C){F[z+C]=F[H+C]}}else{if(z>H){for(C=e;C--;){F[z+C]=F[H+C]}}}if(J&&G===B){F.length=B;F.push.apply(F,I)}else{F.length=B+J;for(C=0;C<J;++C){F[G+C]=I[C]}}}return F}function h(A,e,z,y){if(y&&y.length){if(e<A.length){A.splice.apply(A,[e,z].concat(y))}else{A.push.apply(A,y)}}else{A.splice(e,z)}return A}function b(z,e,y){return w(z,e,y)}function q(z,e,y){z.splice(e,y);return z}function k(B,e,z){var A=l(B,e),y=B.slice(e,l(B,A+z));if(arguments.length<4){w(B,A,z)}else{w(B,A,z,n.call(arguments,3))}return y}function g(e){return e.splice.apply(e,n.call(arguments,1))}var v=p?q:b,s=p?h:w,u=p?g:k;a=Ext.Array={each:function(C,A,z,e){C=a.from(C);var y,B=C.length;if(e!==true){for(y=0;y<B;y++){if(A.call(z||C[y],C[y],y,C)===false){return y}}}else{for(y=B-1;y>-1;y--){if(A.call(z||C[y],C[y],y,C)===false){return y}}}return true},forEach:i?function(z,y,e){return z.forEach(y,e)}:function(B,z,y){var e=0,A=B.length;for(;e<A;e++){z.call(y,B[e],e,B)}},indexOf:(o)?function(z,e,y){return z.indexOf(e,y)}:function(B,z,A){var e,y=B.length;for(e=(A<0)?Math.max(0,y+A):A||0;e<y;e++){if(B[e]===z){return e}}return -1},contains:o?function(y,e){return y.indexOf(e)!==-1}:function(A,z){var e,y;for(e=0,y=A.length;e<y;e++){if(A[e]===z){return true}}return false},toArray:function(z,B,e){if(!z||!z.length){return[]}if(typeof z==="string"){z=z.split("")}if(j){return n.call(z,B||0,e||z.length)}var A=[],y;B=B||0;e=e?((e<0)?z.length+e:e):z.length;for(y=B;y<e;y++){A.push(z[y])}return A},pluck:function(C,e){var y=[],z,B,A;for(z=0,B=C.length;z<B;z++){A=C[z];y.push(A[e])}return y},map:t?function(z,y,e){return z.map(y,e)}:function(C,B,A){var z=[],y=0,e=C.length;for(;y<e;y++){z[y]=B.call(A,C[y],y,C)}return z},every:function(B,z,y){if(x){return B.every(z,y)}var e=0,A=B.length;for(;e<A;++e){if(!z.call(y,B[e],e,B)){return false}}return true},some:function(B,z,y){if(c){return B.some(z,y)}var e=0,A=B.length;for(;e<A;++e){if(z.call(y,B[e],e,B)){return true}}return false},clean:function(B){var y=[],e=0,A=B.length,z;for(;e<A;e++){z=B[e];if(!Ext.isEmpty(z)){y.push(z)}}return y},unique:function(B){var A=[],e=0,z=B.length,y;for(;e<z;e++){y=B[e];if(a.indexOf(A,y)===-1){A.push(y)}}return A},filter:function(C,A,z){if(d){return C.filter(A,z)}var y=[],e=0,B=C.length;for(;e<B;e++){if(A.call(z,C[e],e,C)){y.push(C[e])}}return y},from:function(y,e){if(y===undefined||y===null){return[]}if(Ext.isArray(y)){return(e)?n.call(y):y}if(y&&y.length!==undefined&&typeof y!=="string"){return a.toArray(y)}return[y]},remove:function(z,y){var e=a.indexOf(z,y);if(e!==-1){v(z,e,1)}return z},include:function(y,e){if(!a.contains(y,e)){y.push(e)}},clone:function(e){return n.call(e)},merge:function(){var e=n.call(arguments),A=[],y,z;for(y=0,z=e.length;y<z;y++){A=A.concat(e[y])}return a.unique(A)},intersect:function(){var A=[],e=n.call(arguments),E,C,B,G,H,K,J,I,z,D;if(!e.length){return A}for(E=K=0,I=e.length;E<I,H=e[E];E++){if(!G||H.length<G.length){G=H;K=E}}G=a.unique(G);v(e,K,1);for(E=0,I=G.length;E<I,K=G[E];E++){var F=0;for(C=0,z=e.length;C<z,H=e[C];C++){for(B=0,D=H.length;B<D,J=H[B];B++){if(K===J){F++;break}}}if(F===z){A.push(K)}}return A},difference:function(y,e){var D=n.call(y),B=D.length,A,z,C;for(A=0,C=e.length;A<C;A++){for(z=0;z<B;z++){if(D[z]===e[A]){v(D,z,1);z--;B--}}}return D},slice:function(z,y,e){return n.call(z,y,e)},sort:function(E,D){if(m){if(D){return E.sort(D)}else{return E.sort()}}var B=E.length,A=0,C,e,z,y;for(;A<B;A++){z=A;for(e=A+1;e<B;e++){if(D){C=D(E[e],E[z]);if(C<0){z=e}}else{if(E[e]<E[z]){z=e}}}if(z!==A){y=E[A];E[A]=E[z];E[z]=y}}return E},flatten:function(z){var y=[];function e(A){var C,D,B;for(C=0,D=A.length;C<D;C++){B=A[C];if(Ext.isArray(B)){e(B)}else{y.push(B)}}return y}return e(z)},min:function(C,B){var y=C[0],e,A,z;for(e=0,A=C.length;e<A;e++){z=C[e];if(B){if(B(y,z)===1){y=z}}else{if(z<y){y=z}}}return y},max:function(C,B){var e=C[0],y,A,z;for(y=0,A=C.length;y<A;y++){z=C[y];if(B){if(B(e,z)===-1){e=z}}else{if(z>e){e=z}}}return e},mean:function(e){return e.length>0?a.sum(e)/e.length:undefined},sum:function(B){var y=0,e,A,z;for(e=0,A=B.length;e<A;e++){z=B[e];y+=z}return y},erase:v,insert:function(z,y,e){return s(z,y,0,e)},replace:s,splice:u};Ext.each=a.each;a.union=a.merge;Ext.min=a.min;Ext.max=a.max;Ext.sum=a.sum;Ext.mean=a.mean;Ext.flatten=a.flatten;Ext.clean=a.clean;Ext.unique=a.unique;Ext.pluck=a.pluck;Ext.toArray=function(){return a.toArray.apply(a,arguments)}})();(function(){var a=(0.9).toFixed()!=="1";Ext.Number={constrain:function(d,c,b){d=parseFloat(d);if(!isNaN(c)){d=Math.max(d,c)}if(!isNaN(b)){d=Math.min(d,b)}return d},snap:function(e,c,d,g){var f=e,b;if(!(c&&e)){return e}b=e%c;if(b!==0){f-=b;if(b*2>=c){f+=c}else{if(b*2<-c){f-=c}}}return Ext.Number.constrain(f,d,g)},toFixed:function(d,b){if(a){b=b||0;var c=Math.pow(10,b);return(Math.round(d*c)/c).toFixed(b)}return d.toFixed(b)},from:function(c,b){if(isFinite(c)){c=parseFloat(c)}return !isNaN(c)?c:b}}})();Ext.num=function(){return Ext.Number.from.apply(this,arguments)};(function(){var a=function(){};var b=Ext.Object={chain:function(d){a.prototype=d;var c=new a();a.prototype=null;return c},toQueryObjects:function(e,j,d){var c=b.toQueryObjects,h=[],f,g;if(Ext.isArray(j)){for(f=0,g=j.length;f<g;f++){if(d){h=h.concat(c(e+"["+f+"]",j[f],true))}else{h.push({name:e,value:j[f]})}}}else{if(Ext.isObject(j)){for(f in j){if(j.hasOwnProperty(f)){if(d){h=h.concat(c(e+"["+f+"]",j[f],true))}else{h.push({name:e,value:j[f]})}}}}else{h.push({name:e,value:j})}}return h},toQueryString:function(f,d){var g=[],e=[],k,h,l,c,m;for(k in f){if(f.hasOwnProperty(k)){g=g.concat(b.toQueryObjects(k,f[k],d))}}for(h=0,l=g.length;h<l;h++){c=g[h];m=c.value;if(Ext.isEmpty(m)){m=""}else{if(Ext.isDate(m)){m=Ext.Date.toString(m)}}e.push(encodeURIComponent(c.name)+"="+encodeURIComponent(String(m)))}return e.join("&")},fromQueryString:function(d,q){var l=d.replace(/^\?/,"").split("&"),t={},r,h,v,m,p,f,n,o,c,g,s,k,u,e;for(p=0,f=l.length;p<f;p++){n=l[p];if(n.length>0){h=n.split("=");v=decodeURIComponent(h[0]);m=(h[1]!==undefined)?decodeURIComponent(h[1]):"";if(!q){if(t.hasOwnProperty(v)){if(!Ext.isArray(t[v])){t[v]=[t[v]]}t[v].push(m)}else{t[v]=m}}else{g=v.match(/(\[):?([^\]]*)\]/g);s=v.match(/^([^\[]+)/);v=s[0];k=[];if(g===null){t[v]=m;continue}for(o=0,c=g.length;o<c;o++){u=g[o];u=(u.length===2)?"":u.substring(1,u.length-1);k.push(u)}k.unshift(v);r=t;for(o=0,c=k.length;o<c;o++){u=k[o];if(o===c-1){if(Ext.isArray(r)&&u===""){r.push(m)}else{r[u]=m}}else{if(r[u]===undefined||typeof r[u]==="string"){e=k[o+1];r[u]=(Ext.isNumeric(e)||e==="")?[]:{}}r=r[u]}}}}}return t},each:function(c,e,d){for(var f in c){if(c.hasOwnProperty(f)){if(e.call(d||c,f,c[f],c)===false){return}}}},merge:function(c){var h=1,j=arguments.length,d=b.merge,f=Ext.clone,g,l,k,e;for(;h<j;h++){g=arguments[h];for(l in g){k=g[l];if(k&&k.constructor===Object){e=c[l];if(e&&e.constructor===Object){d(e,k)}else{c[l]=f(k)}}else{c[l]=k}}}return c},mergeIf:function(j){var f=1,g=arguments.length,d=Ext.clone,c,e,h;for(;f<g;f++){c=arguments[f];for(e in c){if(!(e in j)){h=c[e];if(h&&h.constructor===Object){j[e]=d(h)}else{j[e]=h}}}}return j},getKey:function(c,e){for(var d in c){if(c.hasOwnProperty(d)&&c[d]===e){return d}}return null},getValues:function(d){var c=[],e;for(e in d){if(d.hasOwnProperty(e)){c.push(d[e])}}return c},getKeys:("keys" in Object)?Object.keys:function(c){var d=[],e;for(e in c){if(c.hasOwnProperty(e)){d.push(e)}}return d},getSize:function(c){var d=0,e;for(e in c){if(c.hasOwnProperty(e)){d++}}return d},classify:function(f){var e=f,h=[],d={},c=function(){var j=0,k=h.length,l;for(;j<k;j++){l=h[j];this[l]=new d[l]}},g,i;for(g in f){if(f.hasOwnProperty(g)){i=f[g];if(i&&i.constructor===Object){h.push(g);d[g]=b.classify(i)}}}c.prototype=e;return c},defineProperty:("defineProperty" in Object)?Object.defineProperty:function(d,c,e){if(e.get){d.__defineGetter__(c,e.get)}if(e.set){d.__defineSetter__(c,e.set)}}};Ext.merge=Ext.Object.merge;Ext.mergeIf=Ext.Object.mergeIf;Ext.urlEncode=function(){var c=Ext.Array.from(arguments),d="";if((typeof c[1]==="string")){d=c[1]+"&";c[1]=false}return d+b.toQueryString.apply(b,c)};Ext.urlDecode=function(){return b.fromQueryString.apply(b,arguments)}})();Ext.Function={flexSetter:function(a){return function(d,c){var e,f;if(d===null){return this}if(typeof d!=="string"){for(e in d){if(d.hasOwnProperty(e)){a.call(this,e,d[e])}}if(Ext.enumerables){for(f=Ext.enumerables.length;f--;){e=Ext.enumerables[f];if(d.hasOwnProperty(e)){a.call(this,e,d[e])}}}}else{a.call(this,d,c)}return this}},bind:function(d,c,b,a){if(arguments.length===2){return function(){return d.apply(c,arguments)}}var f=d,e=Array.prototype.slice;return function(){var g=b||arguments;if(a===true){g=e.call(arguments,0);g=g.concat(b)}else{if(typeof a=="number"){g=e.call(arguments,0);Ext.Array.insert(g,a,b)}}return f.apply(c||window,g)}},pass:function(c,a,b){if(!Ext.isArray(a)){a=Ext.Array.clone(a)}return function(){a.push.apply(a,arguments);return c.apply(b||this,a)}},alias:function(b,a){return function(){return b[a].apply(b,arguments)}},clone:function(a){return function(){return a.apply(this,arguments)}},createInterceptor:function(d,c,b,a){var e=d;if(!Ext.isFunction(c)){return d}else{return function(){var g=this,f=arguments;c.target=g;c.method=d;return(c.apply(b||g||window,f)!==false)?d.apply(g||window,f):a||null}}},createDelayed:function(e,c,d,b,a){if(d||b){e=Ext.Function.bind(e,d,b,a)}return function(){var g=this,f=Array.prototype.slice.call(arguments);setTimeout(function(){e.apply(g,f)},c)}},defer:function(e,c,d,b,a){e=Ext.Function.bind(e,d,b,a);if(c>0){return setTimeout(e,c)}e();return 0},createSequence:function(b,c,a){if(!c){return b}else{return function(){var d=b.apply(this,arguments);c.apply(a||this,arguments);return d}}},createBuffered:function(e,b,d,c){var a;return function(){if(!d){d=this}if(!c){c=Array.prototype.slice.call(arguments)}if(a){clearTimeout(a);a=null}a=setTimeout(function(){e.apply(d,c)},b)}},createThrottled:function(e,b,d){var f,a,c,h,g=function(){e.apply(d||this,c);f=new Date().getTime()};return function(){a=new Date().getTime()-f;c=arguments;clearTimeout(h);if(!f||(a>=b)){g()}else{h=setTimeout(g,b-a)}}},interceptBefore:function(b,a,c){var d=b[a]||Ext.emptyFn;return b[a]=function(){var e=c.apply(this,arguments);d.apply(this,arguments);return e}},interceptAfter:function(b,a,c){var d=b[a]||Ext.emptyFn;return b[a]=function(){d.apply(this,arguments);return c.apply(this,arguments)}}};Ext.defer=Ext.Function.alias(Ext.Function,"defer");Ext.pass=Ext.Function.alias(Ext.Function,"pass");Ext.bind=Ext.Function.alias(Ext.Function,"bind");Ext.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return eval("("+json+")")},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.JSON.encodeDate(o)}else{if(Ext.isString(o)){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{if(Ext.isObject(o)){return encodeObject(o)}else{if(typeof o==="function"){return"null"}}}}}}}}return"undefined"},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\","\x0b":"\\u000b"},charToReplace=/[\\\"\x00-\x1f\x7f-\uffff]/g,encodeString=function(s){return'"'+s.replace(charToReplace,function(a){var c=m[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"'},encodeArray=function(o){var a=["[",""],len=o.length,i;for(i=0;i<len;i+=1){a.push(doEncode(o[i]),",")}a[a.length-1]="]";return a.join("")},encodeObject=function(o){var a=["{",""],i;for(i in o){if(!useHasOwn||o.hasOwnProperty(i)){a.push(doEncode(i),":",doEncode(o[i]),",")}}a[a.length-1]="}";return a.join("")};this.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};this.encode=function(){var ec;return function(o){if(!ec){ec=isNative()?JSON.stringify:doEncode}return ec(o)}}();this.decode=function(){var dc;return function(json,safe){if(!dc){dc=isNative()?JSON.parse:doDecode}try{return dc(json)}catch(e){if(safe===true){return null}Ext.Error.raise({sourceClass:"Ext.JSON",sourceMethod:"decode",msg:"You're trying to decode an invalid JSON String: "+json})}}}()})();Ext.encode=Ext.JSON.encode;Ext.decode=Ext.JSON.decode;Ext.Error={raise:function(a){throw new Error(a.msg)}};Ext.Date={now:Date.now,toString:function(a){if(!a){a=new Date()}var b=Ext.String.leftPad;return a.getFullYear()+"-"+b(a.getMonth()+1,2,"0")+"-"+b(a.getDate(),2,"0")+"T"+b(a.getHours(),2,"0")+":"+b(a.getMinutes(),2,"0")+":"+b(a.getSeconds(),2,"0")}};(function(a){var c=[],b=function(){};Ext.apply(b,{$className:"Ext.Base",$isClass:true,create:function(){return Ext.create.apply(Ext,[this].concat(Array.prototype.slice.call(arguments,0)))},extend:function(h){var d=h.prototype,l,f,g,j,e,k;f=this.prototype=Ext.Object.chain(d);f.self=this;this.superclass=f.superclass=d;if(!h.$isClass){l=Ext.Base.prototype;for(g in l){if(g in f){f[g]=l[g]}}}k=d.$inheritableStatics;if(k){for(g=0,j=k.length;g<j;g++){e=k[g];if(!this.hasOwnProperty(e)){this[e]=h[e]}}}if(h.$onExtended){this.$onExtended=h.$onExtended.slice()}f.config=f.defaultConfig=new f.configClass;f.initConfigList=f.initConfigList.slice();f.initConfigMap=Ext.Object.chain(f.initConfigMap)},"$onExtended":[],triggerExtended:function(){var f=this.$onExtended,e=f.length,d,g;if(e>0){for(d=0;d<e;d++){g=f[d];g.fn.apply(g.scope||this,arguments)}}},onExtended:function(e,d){this.$onExtended.push({fn:e,scope:d});return this},addConfig:function(f,i){var j=this.prototype,g=j.initConfigList,e=j.initConfigMap,h=j.defaultConfig,l,d,k;i=Boolean(i);for(d in f){if(f.hasOwnProperty(d)&&(i||!(d in h))){k=f[d];l=e[d];if(k!==null){if(!l){e[d]=true;g.push(d)}}else{if(l){e[d]=false;Ext.Array.remove(g,d)}}}}if(i){Ext.merge(h,f)}else{Ext.mergeIf(h,f)}j.configClass=Ext.Object.classify(h)},addStatics:function(d){var f,e;for(e in d){if(d.hasOwnProperty(e)){f=d[e];this[e]=f}}return this},addInheritableStatics:function(e){var h,d,g=this.prototype,f,i;h=g.$inheritableStatics;d=g.$hasInheritableStatics;if(!h){h=g.$inheritableStatics=[];d=g.$hasInheritableStatics={}}for(f in e){if(e.hasOwnProperty(f)){i=e[f];this[f]=i;if(!d[f]){d[f]=true;h.push(f)}}}return this},addMembers:function(e){var g=this.prototype,d=Ext.enumerables,k=[],h,j,f,l;for(f in e){k.push(f)}if(d){k.push.apply(k,d)}for(h=0,j=k.length;h<j;h++){f=k[h];if(e.hasOwnProperty(f)){l=e[f];if(typeof l=="function"&&!l.$isClass&&l!==Ext.emptyFn){l.$owner=this;l.$name=f}g[f]=l}}return this},addMember:function(d,e){if(typeof e=="function"&&!e.$isClass&&e!==Ext.emptyFn){e.$owner=this;e.$name=d}this.prototype[d]=e;return this},implement:function(){this.addMembers.apply(this,arguments)},borrow:function(h,f){var m=this.prototype,l=h.prototype,g,j,e,k,d;f=Ext.Array.from(f);for(g=0,j=f.length;g<j;g++){e=f[g];d=l[e];if(typeof d=="function"){k=function(){return d.apply(this,arguments)};k.$owner=this;k.$name=e;m[e]=k}else{m[e]=d}}return this},override:function(e){var l=this,n=Ext.enumerables,j=l.prototype,g=Ext.Function.clone,d,i,f,m,k,h;if(arguments.length===2){d=e;e={};e[d]=arguments[1];n=null}do{k=[];m=null;for(d in e){if(d=="statics"){m=e[d]}else{k.push(d)}}if(n){k.push.apply(k,n)}for(i=k.length;i--;){d=k[i];if(e.hasOwnProperty(d)){f=e[d];if(typeof f=="function"&&!f.$className&&f!==Ext.emptyFn){if(typeof f.$owner!="undefined"){f=g(f)}f.$owner=l;f.$name=d;h=j[d];if(h){f.$previous=h}}j[d]=f}}j=l;e=m}while(e);return this},callParent:function(d){var e;return(e=this.callParent.caller)&&(e.$previous||((e=e.$owner?e:e.caller)&&e.$owner.superclass.$class[e.$name])).apply(this,d||c)},mixin:function(f,h){var d=h.prototype,e=this.prototype,g;if(typeof d.onClassMixedIn!="undefined"){d.onClassMixedIn.call(h,this)}if(!e.hasOwnProperty("mixins")){if("mixins" in e){e.mixins=Ext.Object.chain(e.mixins)}else{e.mixins={}}}for(g in d){if(g==="mixins"){Ext.merge(e.mixins,d[g])}else{if(typeof e[g]=="undefined"&&g!="mixinId"&&g!="config"){e[g]=d[g]}}}if("config" in d){this.addConfig(d.config,false)}e.mixins[f]=d},getName:function(){return Ext.getClassName(this)},createAlias:a(function(e,d){this.override(e,function(){return this[d].apply(this,arguments)})}),addXtype:function(h){var e=this.prototype,g=e.xtypesMap,f=e.xtypes,d=e.xtypesChain;if(!e.hasOwnProperty("xtypesMap")){g=e.xtypesMap=Ext.merge({},e.xtypesMap||{});f=e.xtypes=e.xtypes?[].concat(e.xtypes):[];d=e.xtypesChain=e.xtypesChain?[].concat(e.xtypesChain):[];e.xtype=h}if(!g[h]){g[h]=true;f.push(h);d.push(h);Ext.ClassManager.setAlias(this,"widget."+h)}return this}});b.implement({isInstance:true,$className:"Ext.Base",configClass:Ext.emptyFn,initConfigList:[],initConfigMap:{},statics:function(){var e=this.statics.caller,d=this.self;if(!e){return d}return e.$owner},callParent:function(e){var f,d=(f=this.callParent.caller)&&(f.$previous||((f=f.$owner?f:f.caller)&&f.$owner.superclass[f.$name]));return d.apply(this,e||c)},self:b,constructor:function(){return this},wasInstantiated:false,initConfig:function(m){var l=Ext.Class.configNameCache,p=this.self.prototype,h=this.initConfigList,f=this.initConfigMap,g=new this.configClass,j=this.defaultConfig,k,o,e,q,n,d;this.initConfig=Ext.emptyFn;this.initialConfig=m||{};if(m){Ext.merge(g,m)}this.config=g;if(!p.hasOwnProperty("wasInstantiated")){p.wasInstantiated=true;for(k=0,o=h.length;k<o;k++){e=h[k];n=l[e];q=j[e];if(!(n.apply in p)&&!(n.update in p)&&p[n.set].$isDefault&&typeof q!="object"){p[n.internal]=j[e];f[e]=false;Ext.Array.remove(h,e);k--;o--}}}if(m){h=h.slice();for(e in m){if(e in j&&!f[e]){h.push(e)}}}for(k=0,o=h.length;k<o;k++){e=h[k];n=l[e];this[n.get]=this[n.initGet]}this.beforeInitConfig(g);for(k=0,o=h.length;k<o;k++){e=h[k];n=l[e];d=n.get;if(this.hasOwnProperty(d)){this[n.set].call(this,g[e]);delete this[d]}}return this},beforeInitConfig:Ext.emptyFn,getCurrentConfig:function(){var d=this.defaultConfig,g=Ext.Class.configNameCache,f={},e,h;for(e in d){h=g[e];f[e]=this[h.get].call(this)}return f},setConfig:function(e,l){if(!e){return this}var h=Ext.Class.configNameCache,j=this.config,f=this.defaultConfig,o=this.initialConfig,k=[],d,g,n,m;l=Boolean(l);for(d in e){if((l&&(d in o))){continue}j[d]=e[d];if(d in f){k.push(d);m=h[d];this[m.get]=this[m.initGet]}}for(g=0,n=k.length;g<n;g++){d=k[g];m=h[d];this[m.set].call(this,e[d]);delete this[m.get]}return this},getConfig:function(d){return this[Ext.Class.configNameCache[d].get].call(this)},hasConfig:function(d){return(d in this.defaultConfig)},getInitialConfig:function(e){var d=this.config;if(!e){return d}else{return d[e]}},onConfigUpdate:function(j,l,m){var n=this.self,f,h,d,g,k,e;j=Ext.Array.from(j);m=m||this;for(f=0,h=j.length;f<h;f++){d=j[f];g="update"+Ext.String.capitalize(d);k=this[g]||Ext.emptyFn;e=function(){k.apply(this,arguments);m[l].apply(m,arguments)};e.$name=g;e.$owner=n;this[g]=e}},destroy:function(){this.destroy=Ext.emptyFn;this.isDestroyed=true}});b.prototype.callOverridden=b.prototype.callParent;Ext.Base=b})(Ext.Function.flexSetter);(function(){var b,a=Ext.Base,e=[],d,c;for(d in a){if(a.hasOwnProperty(d)){e.push(d)}}c=e.length;Ext.Class=b=function(g,h,f){if(typeof g!="function"){f=h;h=g;g=null}if(!h){h={}}g=b.create(g);b.process(g,h,f);return g};Ext.apply(b,{onBeforeCreated:function(g,h,f){g.addMembers(h);f.onCreated.call(g,g)},create:function(f){var g,h;if(!f){f=function(){return this.constructor.apply(this,arguments)}}for(h=0;h<c;h++){g=e[h];f[g]=a[g]}return f},process:function(g,m,k){var j=m.preprocessors||b.defaultPreprocessors,q=this.preprocessors,t={onBeforeCreated:this.onBeforeCreated,onCreated:k||Ext.emptyFn},n=0,f,u,p,l,o,r,s,h;delete m.preprocessors;h=function(v,w,i){r=null;while(r===null){f=j[n++];if(f){u=q[f];p=u.properties;if(p===true){r=u.fn}else{for(l=0,o=p.length;l<o;l++){s=p[l];if(w.hasOwnProperty(s)){r=u.fn;break}}}}else{i.onBeforeCreated.apply(this,arguments);return}}if(r.call(this,v,w,i,h)!==false){h.apply(this,arguments)}};h.call(this,g,m,t)},preprocessors:{},registerPreprocessor:function(g,j,h,f,i){if(!f){f="last"}if(!h){h=[g]}this.preprocessors[g]={name:g,properties:h||false,fn:j};this.setDefaultPreprocessorPosition(g,f,i);return this},getPreprocessor:function(f){return this.preprocessors[f]},getPreprocessors:function(){return this.preprocessors},defaultPreprocessors:[],getDefaultPreprocessors:function(){return this.defaultPreprocessors},setDefaultPreprocessors:function(f){this.defaultPreprocessors=Ext.Array.from(f);return this},setDefaultPreprocessorPosition:function(h,j,i){var f=this.defaultPreprocessors,g;if(typeof j=="string"){if(j==="first"){f.unshift(h);return this}else{if(j==="last"){f.push(h);return this}}j=(j==="after")?1:-1}g=Ext.Array.indexOf(f,i);if(g!==-1){Ext.Array.splice(f,Math.max(0,g+j),0,h)}return this},configNameCache:{},getConfigNameMap:function(h){var g=this.configNameCache,i=g[h],f;if(!i){f=h.charAt(0).toUpperCase()+h.substr(1);i=g[h]={name:h,internal:"_"+h,initializing:"is"+f+"Initializing",apply:"apply"+f,update:"update"+f,set:"set"+f,get:"get"+f,initGet:"initGet"+f,doSet:"doSet"+f,changeEvent:h.toLowerCase()+"change"}}return i},generateSetter:function(i){var g=i.internal,h=i.get,f=i.apply,k=i.update,j;j=function(n){var m=this[g],l=this[f],o=this[k];delete this[h];if(l){n=l.call(this,n,m)}if(typeof n!="undefined"){this[g]=n;if(o&&n!==m){o.call(this,n,m)}}return this};j.$isDefault=true;return j},generateInitGetter:function(j){var f=j.name,i=j.set,g=j.get,h=j.initializing;return function(){this[h]=true;delete this[g];this[i].call(this,this.config[f]);delete this[h];return this[g].apply(this,arguments)}},generateGetter:function(g){var f=g.internal;return function(){return this[f]}}});b.registerPreprocessor("extend",function(g,k){var j=Ext.Base,l=j.prototype,m=k.extend,i,f,h;delete k.extend;if(m&&m!==Object){i=m}else{i=j}f=i.prototype;if(!i.$isClass){for(h in l){if(!f[h]){f[h]=l[h]}}}g.extend(i);g.triggerExtended.apply(g,arguments);if(k.onClassExtended){g.onExtended(k.onClassExtended,g);delete k.onClassExtended}},true);b.registerPreprocessor("statics",function(f,g){f.addStatics(g.statics);delete g.statics});b.registerPreprocessor("inheritableStatics",function(f,g){f.addInheritableStatics(g.inheritableStatics);delete g.inheritableStatics});b.registerPreprocessor("config",function(h,m){var j=m.config,p=h.prototype,l=p.config,o,g,n,f,i,k,q;delete m.config;for(g in j){if(j.hasOwnProperty(g)&&!(g in l)){q=j[g];o=this.getConfigNameMap(g);n=o.set;f=o.get;i=o.initGet;k=o.internal;m[i]=this.generateInitGetter(o);if(q===null&&!m.hasOwnProperty(k)){m[k]=null}if(!m.hasOwnProperty(f)){m[f]=this.generateGetter(o)}if(!m.hasOwnProperty(n)){m[n]=this.generateSetter(o)}}}h.addConfig(j,true)});b.registerPreprocessor("mixins",function(j,n,f){var g=n.mixins,k,h,l,m;delete n.mixins;Ext.Function.interceptBefore(f,"onCreated",function(){if(g instanceof Array){for(l=0,m=g.length;l<m;l++){h=g[l];k=h.prototype.mixinId||h.$className;j.mixin(k,h)}}else{for(k in g){if(g.hasOwnProperty(k)){j.mixin(k,g[k])}}}})});Ext.extend=function(h,i,g){if(arguments.length===2&&Ext.isObject(i)){g=i;i=h;h=null}var f;if(!i){throw new Error("[Ext.extend] Attempting to extend from a class which has not been loaded on the page.")}g.extend=i;g.preprocessors=["extend","statics","inheritableStatics","mixins","config"];if(h){f=new b(h,g)}else{f=new b(g)}f.prototype.override=function(k){for(var j in k){if(k.hasOwnProperty(j)){this[j]=k[j]}}};return f}})();(function(b,d,f,c,e){var a=Ext.ClassManager={classes:{},existCache:{},namespaceRewrites:[{from:"Ext.",to:Ext}],maps:{alternateToName:{},aliasToName:{},nameToAliases:{},nameToAlternates:{},overridesByName:{}},enableNamespaceParseCache:true,namespaceParseCache:{},instantiators:[],isCreated:function(l){var k=this.existCache,j,m,h,g,n;if(this.classes[l]||k[l]){return true}g=e;n=this.parseNamespace(l);for(j=0,m=n.length;j<m;j++){h=n[j];if(typeof h!="string"){g=h}else{if(!g||!g[h]){return false}g=g[h]}}k[l]=true;this.triggerCreated(l);return true},createdListeners:[],nameCreatedListeners:{},triggerCreated:function(k){var j=this.createdListeners,h=this.nameCreatedListeners,g,l,m;for(g=0,l=j.length;g<l;g++){m=j[g];m.fn.call(m.scope,k)}j=h[k];if(j){for(g=0,l=j.length;g<l;g++){m=j[g];m.fn.call(m.scope,k)}delete h[k]}},onCreated:function(k,j,i){var h=this.createdListeners,g=this.nameCreatedListeners,l={fn:k,scope:j};if(i){if(this.isCreated(i)){k.call(j,i);return}if(!g[i]){g[i]=[]}g[i].push(l)}else{h.push(l)}},parseNamespace:function(j){var g=this.namespaceParseCache;if(this.enableNamespaceParseCache){if(g.hasOwnProperty(j)){return g[j]}}var k=[],m=this.namespaceRewrites,o=e,h=j,r,q,p,l,n;for(l=0,n=m.length;l<n;l++){r=m[l];q=r.from;p=r.to;if(h===q||h.substring(0,q.length)===q){h=h.substring(q.length);if(typeof p!="string"){o=p}else{k=k.concat(p.split("."))}break}}k.push(o);k=k.concat(h.split("."));if(this.enableNamespaceParseCache){g[j]=k}return k},setNamespace:function(k,n){var h=e,o=this.parseNamespace(k),m=o.length-1,g=o[m],l,j;for(l=0;l<m;l++){j=o[l];if(typeof j!="string"){h=j}else{if(!h[j]){h[j]={}}h=h[j]}}h[g]=n;return h[g]},createNamespaces:function(){var g=e,n,k,l,h,m,o;for(l=0,m=arguments.length;l<m;l++){n=this.parseNamespace(arguments[l]);for(h=0,o=n.length;h<o;h++){k=n[h];if(typeof k!="string"){g=k}else{if(!g[k]){g[k]={}}g=g[k]}}}return g},set:function(g,k){var j=this,m=j.maps,l=m.nameToAlternates,i=j.getName(k),h;j.classes[g]=j.setNamespace(g,k);if(i&&i!==g){m.alternateToName[g]=i;h=l[i]||(l[i]=[]);h.push(g)}return this},get:function(j){var l=this.classes;if(l[j]){return l[j]}var g=e,n=this.parseNamespace(j),h,k,m;for(k=0,m=n.length;k<m;k++){h=n[k];if(typeof h!="string"){g=h}else{if(!g||!g[h]){return null}g=g[h]}}return g},setAlias:function(g,h){var j=this.maps.aliasToName,k=this.maps.nameToAliases,i;if(typeof g=="string"){i=g}else{i=this.getName(g)}if(h&&j[h]!==i){j[h]=i}if(!k[i]){k[i]=[]}if(h){Ext.Array.include(k[i],h)}return this},getByAlias:function(g){return this.get(this.getNameByAlias(g))},getNameByAlias:function(g){return this.maps.aliasToName[g]||""},getNameByAlternate:function(g){return this.maps.alternateToName[g]||""},getAliasesByName:function(g){return this.maps.nameToAliases[g]||[]},getName:function(g){return g&&g.$className||""},getClass:function(g){return g&&g.self||null},applyOverrides:function(g){var m=this,k=m.maps.overridesByName,n=k[g],l=n&&n.length||0,j=m.createOverride,h;delete k[g];for(h=0;h<l;++h){j.apply(m,n[h])}},create:function(h,i,g){i.$className=h;return new b(i,function(){var n=i.postprocessors||a.defaultPostprocessors,u=a.postprocessors,r=0,v=[],t,k,o,s,m,q,p,w,l;delete i.postprocessors;for(o=0,s=n.length;o<s;o++){t=n[o];if(typeof t=="string"){t=u[t];p=t.properties;if(p===true){v.push(t.fn)}else{if(p){for(m=0,q=p.length;m<q;m++){w=p[m];if(i.hasOwnProperty(w)){v.push(t.fn);break}}}}}else{v.push(t)}}k=function(x,j,y){t=v[r++];if(!t){a.set(h,j);if(g){g.call(j,j)}a.triggerCreated(h);return}if(t.call(this,x,j,y,k)!==false){k.apply(this,arguments)}};k.call(a,h,this,i);a.applyOverrides(h);l=a.maps.nameToAlternates[h];for(o=0,s=l&&l.length||0;o<s;++o){a.applyOverrides(l[o])}})},createOverride:function(h,j,g){var m=this,l=j.override,o=m.get(l),k,i,n;if(o){k=Ext.apply({},j);delete k.requires;delete k.uses;delete k.override;m.create(h,{requires:j.requires,uses:j.uses,override:l},function(){this.active=true;if(o.override){o.override(k)}else{o.self.override(k)}if(g){g.call(o)}})}else{i=m.maps.overridesByName;n=i[l]||(i[l]=[]);n.push(Array.prototype.slice.call(arguments,0));m.setNamespace(h,{override:l})}},instantiateByAlias:function(){var h=arguments[0],g=f.call(arguments),i=this.getNameByAlias(h);if(!i){i=this.maps.aliasToName[h];Ext.syncRequire(i)}g[0]=i;return this.instantiate.apply(this,g)},instantiate:function(){var i=arguments[0],h=f.call(arguments,1),j=i,k,g;if(typeof i!="function"){g=this.get(i)}else{g=i}if(!g){k=this.getNameByAlias(i);if(k){i=k;g=this.get(i)}}if(!g){k=this.getNameByAlternate(i);if(k){i=k;g=this.get(i)}}if(!g){Ext.syncRequire(i);g=this.get(i)}return this.getInstantiator(h.length)(g,h)},dynInstantiate:function(h,g){g=c(g,true);g.unshift(h);return this.instantiate.apply(this,g)},getInstantiator:function(k){var j=this.instantiators,l;l=j[k];if(!l){var h=k,g=[];for(h=0;h<k;h++){g.push("a["+h+"]")}l=j[k]=new Function("c","a","return new c("+g.join(",")+")")}return l},postprocessors:{},defaultPostprocessors:[],registerPostprocessor:function(h,k,i,g,j){if(!g){g="last"}if(!i){i=[h]}this.postprocessors[h]={name:h,properties:i||false,fn:k};this.setDefaultPostprocessorPosition(h,g,j);return this},setDefaultPostprocessors:function(g){this.defaultPostprocessors=c(g);return this},setDefaultPostprocessorPosition:function(h,k,j){var i=this.defaultPostprocessors,g;if(typeof k=="string"){if(k==="first"){i.unshift(h);return this}else{if(k==="last"){i.push(h);return this}}k=(k==="after")?1:-1}g=Ext.Array.indexOf(i,j);if(g!==-1){Ext.Array.splice(i,Math.max(0,g+k),0,h)}return this},getNamesByExpression:function(o){var m=this.maps.nameToAliases,p=[],g,l,j,h,q,k,n;if(o.indexOf("*")!==-1){o=o.replace(/\*/g,"(.*?)");q=new RegExp("^"+o+"$");for(g in m){if(m.hasOwnProperty(g)){j=m[g];if(g.search(q)!==-1){p.push(g)}else{for(k=0,n=j.length;k<n;k++){l=j[k];if(l.search(q)!==-1){p.push(g);break}}}}}}else{h=this.getNameByAlias(o);if(h){p.push(h)}else{h=this.getNameByAlternate(o);if(h){p.push(h)}else{p.push(o)}}}return p}};a.registerPostprocessor("alias",function(j,h,m){var g=m.alias,k,l;for(k=0,l=g.length;k<l;k++){d=g[k];this.setAlias(h,d)}},["xtype","alias"]);a.registerPostprocessor("singleton",function(h,g,j,i){i.call(this,h,new g(),j);return false});a.registerPostprocessor("alternateClassName",function(h,g,m){var k=m.alternateClassName,j,l,n;if(!(k instanceof Array)){k=[k]}for(j=0,l=k.length;j<l;j++){n=k[j];this.set(n,g)}});Ext.apply(Ext,{create:d(a,"instantiate"),widget:function(h){var g=f.call(arguments);g[0]="widget."+h;return a.instantiateByAlias.apply(a,g)},createByAlias:d(a,"instantiateByAlias"),define:function(h,i,g){if(i.override){return a.createOverride.apply(a,arguments)}return a.create.apply(a,arguments)},getClassName:d(a,"getName"),getDisplayName:function(g){if(g){if(g.displayName){return g.displayName}if(g.$name&&g.$class){return Ext.getClassName(g.$class)+"#"+g.$name}if(g.$className){return g.$className}}return"Anonymous"},getClass:d(a,"getClass"),namespace:d(a,"createNamespaces")});Ext.createWidget=Ext.widget;Ext.ns=Ext.namespace;b.registerPreprocessor("className",function(g,h){if(h.$className){g.$className=h.$className}},true,"first");b.registerPreprocessor("alias",function(s,m){var q=s.prototype,j=c(m.xtype),g=c(m.alias),t="widget.",r=t.length,n=Array.prototype.slice.call(q.xtypesChain||[]),k=Ext.merge({},q.xtypesMap||{}),l,p,o,h;for(l=0,p=g.length;l<p;l++){o=g[l];if(o.substring(0,r)===t){h=o.substring(r);Ext.Array.include(j,h)}}s.xtype=m.xtype=j[0];m.xtypes=j;for(l=0,p=j.length;l<p;l++){h=j[l];if(!k[h]){k[h]=true;n.push(h)}}m.xtypesChain=n;m.xtypesMap=k;Ext.Function.interceptAfter(m,"onClassCreated",function(){var i=q.mixins,v,u;for(v in i){if(i.hasOwnProperty(v)){u=i[v];j=u.xtypes;if(j){for(l=0,p=j.length;l<p;l++){h=j[l];if(!k[h]){k[h]=true;n.push(h)}}}}}});for(l=0,p=j.length;l<p;l++){h=j[l];Ext.Array.include(g,t+h)}m.alias=g},["xtype","alias"])})(Ext.Class,Ext.Function.alias,Array.prototype.slice,Ext.Array.from,Ext.global);(function(a,c,d,g,i,h,f,j){var e=["extend","mixins","requires"],b;b=Ext.Loader={isInHistory:{},history:[],config:{enabled:false,disableCaching:true,disableCachingParam:"_dc",paths:{Ext:"."}},setConfig:function(k,l){if(Ext.isObject(k)&&arguments.length===1){Ext.merge(this.config,k)}else{this.config[k]=(Ext.isObject(l))?Ext.merge(this.config[k],l):l}return this},getConfig:function(k){if(k){return this.config[k]}return this.config},setPath:d(function(k,l){this.config.paths[k]=l;return this}),getPath:function(k){var m="",n=this.config.paths,l=this.getPrefix(k);if(l.length>0){if(l===k){return n[l]}m=n[l];k=k.substring(l.length+1)}if(m.length>0){m+="/"}return m.replace(/\/\.\//g,"/")+k.replace(/\./g,"/")+".js"},getPrefix:function(l){var n=this.config.paths,m,k="";if(n.hasOwnProperty(l)){return l}for(m in n){if(n.hasOwnProperty(m)&&m+"."===l.substring(0,m.length+1)){if(m.length>k.length){k=m}}}return k},require:function(m,l,k,n){if(l){l.call(k)}},syncRequire:function(){},exclude:function(l){var k=this;return{require:function(o,n,m){return k.require(o,n,m,l)},syncRequire:function(o,n,m){return k.syncRequire(o,n,m,l)}}},onReady:function(n,m,o,k){var l;if(o!==false&&Ext.onDocumentReady){l=n;n=function(){Ext.onDocumentReady(l,m,k)}}n.call(m)}};Ext.apply(b,{documentHead:typeof document!="undefined"&&(document.head||document.getElementsByTagName("head")[0]),isLoading:false,queue:[],isClassFileLoaded:{},isFileLoaded:{},readyListeners:[],optionalRequires:[],requiresMap:{},numPendingFiles:0,numLoadedFiles:0,hasFileLoadError:false,classNameToFilePathMap:{},syncModeEnabled:false,scriptElements:{},refreshQueue:function(){var k=this.queue,q=k.length,n,p,l,o,m;if(q===0){this.triggerReady();return}for(n=0;n<q;n++){p=k[n];if(p){o=p.requires;m=p.references;if(o.length>this.numLoadedFiles){continue}l=0;do{if(a.isCreated(o[l])){f(o,l,1)}else{l++}}while(l<o.length);if(p.requires.length===0){f(k,n,1);p.callback.call(p.scope);this.refreshQueue();break}}}return this},injectScriptElement:function(m,o,q,n){var l=document.createElement("script"),p=this,k=function(){p.cleanupScriptElement(l);o.call(n)},r=function(){p.cleanupScriptElement(l);q.call(n)};l.type="text/javascript";l.src=m;l.onload=k;l.onerror=r;l.onreadystatechange=function(){if(this.readyState==="loaded"||this.readyState==="complete"){k()}};this.documentHead.appendChild(l);return l},removeScriptElement:function(l){var k=this.scriptElements;if(k[l]){this.cleanupScriptElement(k[l],true);delete k[l]}return this},cleanupScriptElement:function(l,k){l.onload=null;l.onreadystatechange=null;l.onerror=null;if(k){this.documentHead.removeChild(l)}return this},loadScriptFile:function(l,s,p,w,k){var r=this,x=this.isFileLoaded,n=this.scriptElements,v=l+(this.getConfig("disableCaching")?("?"+this.getConfig("disableCachingParam")+"="+Ext.Date.now()):""),m=false,u,o,t;if(x[l]){return this}w=w||this;this.isLoading=true;if(!k){t=function(){};if(!Ext.isReady&&Ext.onDocumentReady){Ext.onDocumentReady(function(){if(!x[l]){n[l]=r.injectScriptElement(v,s,t,w)}})}else{n[l]=this.injectScriptElement(v,s,t,w)}}else{if(typeof XMLHttpRequest!="undefined"){u=new XMLHttpRequest()}else{u=new ActiveXObject("Microsoft.XMLHTTP")}try{u.open("GET",v,false);u.send(null)}catch(q){m=true}o=(u.status===1223)?204:u.status;if(!m){m=(o===0)}if(m){}else{if(o>=200&&o<300){Ext.globalEval(u.responseText+"\n//@ sourceURL="+l);s.call(w)}else{}}u=null}},syncRequire:function(){var k=this.syncModeEnabled;if(!k){this.syncModeEnabled=true}this.require.apply(this,arguments);if(!k){this.syncModeEnabled=false}this.refreshQueue()},require:function(F,t,n,q){var v={},m={},y=this.queue,C=this.classNameToFilePathMap,A=this.isClassFileLoaded,s=[],H=[],E=[],l=[],r,G,x,w,k,p,D,B,z,u,o;if(q){q=h(q);for(B=0,u=q.length;B<u;B++){k=q[B];if(typeof k=="string"&&k.length>0){s=a.getNamesByExpression(k);for(z=0,o=s.length;z<o;z++){v[s[z]]=true}}}}F=h(F);if(t){if(t.length>0){r=function(){var K=[],J,L,I;for(J=0,L=l.length;J<L;J++){I=l[J];K.push(a.get(I))}return t.apply(this,K)}}else{r=t}}else{r=Ext.emptyFn}n=n||Ext.global;for(B=0,u=F.length;B<u;B++){w=F[B];if(typeof w=="string"&&w.length>0){H=a.getNamesByExpression(w);o=H.length;for(z=0;z<o;z++){D=H[z];if(v[D]!==true){l.push(D);if(!a.isCreated(D)&&!m[D]){m[D]=true;E.push(D)}}}}}if(E.length>0){if(!this.config.enabled){throw new Error("Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class"+((E.length>1)?"es":"")+": "+E.join(", "))}}else{r.call(n);return this}G=this.syncModeEnabled;if(!G){y.push({requires:E.slice(),callback:r,scope:n})}u=E.length;for(B=0;B<u;B++){p=E[B];x=this.getPath(p);if(G&&A.hasOwnProperty(p)){this.numPendingFiles--;this.removeScriptElement(x);delete A[p]}if(!A.hasOwnProperty(p)){A[p]=false;C[p]=x;this.numPendingFiles++;this.loadScriptFile(x,i(this.onFileLoaded,[p,x],this),i(this.onFileLoadError,[p,x]),this,G)}}if(G){r.call(n);if(u===1){return a.get(p)}}return this},onFileLoaded:function(l,k){this.numLoadedFiles++;this.isClassFileLoaded[l]=true;this.isFileLoaded[k]=true;this.numPendingFiles--;if(this.numPendingFiles===0){this.refreshQueue()}},onFileLoadError:function(m,l,k,n){this.numPendingFiles--;this.hasFileLoadError=true},addOptionalRequires:function(m){var o=this.optionalRequires,l,n,k;m=h(m);for(l=0,n=m.length;l<n;l++){k=m[l];j(o,k)}return this},triggerReady:function(l){var n=this.readyListeners,m=this.optionalRequires,k;if(this.isLoading||l){this.isLoading=false;if(m.length!==0){m=m.slice();this.optionalRequires.length=0;this.require(m,i(this.triggerReady,[true],this),this);return this}while(n.length){k=n.shift();k.fn.call(k.scope);if(this.isLoading){return this}}}return this},onReady:function(n,m,o,k){var l;if(o!==false&&Ext.onDocumentReady){l=n;n=function(){Ext.onDocumentReady(l,m,k)}}if(!this.isLoading){n.call(m)}else{this.readyListeners.push({fn:n,scope:m})}},historyPush:function(l){var k=this.isInHistory;if(l&&this.isClassFileLoaded.hasOwnProperty(l)&&!k[l]){k[l]=true;this.history.push(l)}return this}});Ext.require=g(b,"require");Ext.syncRequire=g(b,"syncRequire");Ext.exclude=g(b,"exclude");Ext.onReady=function(m,l,k){b.onReady(m,l,true,k)};c.registerPreprocessor("loader",function(x,m,w,v){var t=this,r=[],s=a.getName(x),n,l,q,p,u,o,k;for(n=0,q=e.length;n<q;n++){o=e[n];if(m.hasOwnProperty(o)){k=m[o];if(typeof k=="string"){r.push(k)}else{if(k instanceof Array){for(l=0,p=k.length;l<p;l++){u=k[l];if(typeof u=="string"){r.push(u)}}}else{if(typeof k!="function"){for(l in k){if(k.hasOwnProperty(l)){u=k[l];if(typeof u=="string"){r.push(u)}}}}}}}}if(r.length===0){return}b.require(r,function(){for(n=0,q=e.length;n<q;n++){o=e[n];if(m.hasOwnProperty(o)){k=m[o];if(typeof k=="string"){m[o]=a.get(k)}else{if(k instanceof Array){for(l=0,p=k.length;l<p;l++){u=k[l];if(typeof u=="string"){m[o][l]=a.get(u)}}}else{if(typeof k!="function"){for(var y in k){if(k.hasOwnProperty(y)){u=k[y];if(typeof u=="string"){m[o][y]=a.get(u)}}}}}}}}v.call(t,x,m,w)});return false},true,"after","className");a.registerPostprocessor("uses",function(n,l,r){var k=h(r.uses),m=[],o,q,p;for(o=0,q=k.length;o<q;o++){p=k[o];if(typeof p=="string"){m.push(p)}}b.addOptionalRequires(m)});a.onCreated(function(k){this.historyPush(k)},b)})(Ext.ClassManager,Ext.Class,Ext.Function.flexSetter,Ext.Function.alias,Ext.Function.pass,Ext.Array.from,Ext.Array.erase,Ext.Array.include);Ext.setVersion("touch","2.0.0.rc");Ext.apply(Ext,{version:Ext.getVersion("touch"),idSeed:0,repaint:function(){var a=Ext.getBody().createChild({cls:Ext.baseCSSPrefix+"mask "+Ext.baseCSSPrefix+"mask-transparent"});setTimeout(function(){a.destroy()},0)},id:function(a,b){if(a&&a.id){return a.id}a=Ext.getDom(a)||{};if(a===document||a===document.documentElement){a.id="ext-application"}else{if(a===document.body){a.id="ext-viewport"}else{if(a===window){a.id="ext-window"}}}a.id=a.id||((b||"ext-element-")+(++Ext.idSeed));return a.id},getBody:function(){if(!Ext.documentBodyElement){if(!document.body){throw new Error("[Ext.getBody] document.body does not exist at this point")}Ext.documentBodyElement=Ext.get(document.body)}return Ext.documentBodyElement},getHead:function(){if(!Ext.documentHeadElement){Ext.documentHeadElement=Ext.get(document.head||document.getElementsByTagName("head")[0])}return Ext.documentHeadElement},getDoc:function(){if(!Ext.documentElement){Ext.documentElement=Ext.get(document)}return Ext.documentElement},getCmp:function(a){return Ext.ComponentMgr.get(a)},copyTo:function(a,b,d,c){if(typeof d=="string"){d=d.split(/[,;\s]/)}Ext.each(d,function(e){if(c||b.hasOwnProperty(e)){a[e]=b[e]}},this);return a},destroy:function(){var a=arguments,d=a.length,b,c;for(b=0;b<d;b++){c=a[b];if(c){if(Ext.isArray(c)){this.destroy.apply(this,c)}else{if(Ext.isFunction(c.destroy)){c.destroy()}}}}},getDom:function(a){if(!a||!document){return null}return a.dom?a.dom:(typeof a=="string"?document.getElementById(a):a)},removeNode:function(a){if(a&&a.parentNode&&a.tagName!="BODY"){Ext.get(a).clearListeners();a.parentNode.removeChild(a);delete Ext.cache[a.id]}},defaultSetupConfig:{eventPublishers:{dom:{xclass:"Ext.event.publisher.Dom"},touchGesture:{xclass:"Ext.event.publisher.TouchGesture",recognizers:{drag:{xclass:"Ext.event.recognizer.Drag"},tap:{xclass:"Ext.event.recognizer.Tap"},doubleTap:{xclass:"Ext.event.recognizer.DoubleTap"},longPress:{xclass:"Ext.event.recognizer.LongPress"},swipe:{xclass:"Ext.event.recognizer.HorizontalSwipe"},pinch:{xclass:"Ext.event.recognizer.Pinch"},rotate:{xclass:"Ext.event.recognizer.Rotate"}}},componentDelegation:{xclass:"Ext.event.publisher.ComponentDelegation"},componentPaint:{xclass:"Ext.event.publisher.ComponentPaint"},componentSize:{xclass:"Ext.event.publisher.ComponentSize"}},animator:{xclass:"Ext.fx.Runner"},viewport:{xclass:"Ext.viewport.Viewport"}},isSetup:false,setupListeners:[],onSetup:function(b,a){if(Ext.isSetup){b.call(a)}else{Ext.setupListeners.push({fn:b,scope:a})}},setup:function(s){var i=Ext.defaultSetupConfig,b=s.onReady||Ext.emptyFn,a=s.scope,c=Ext.Array.from(s.requires),n=Ext.onReady,o=s.icon,f,p,g;Ext.setup=function(){throw new Error("Ext.setup has already been called before")};delete s.requires;delete s.onReady;delete s.scope;Ext.require(["Ext.event.Dispatcher","Ext.MessageBox"]);f=function(){var v=Ext.setupListeners,w=v.length,u,x;delete Ext.setupListeners;Ext.isSetup=true;for(u=0;u<w;u++){x=v[u];x.fn.call(x.scope)}Ext.onReady=n;Ext.onReady(b,a)};Ext.onReady=function(w,v){var u=b;b=function(){u();Ext.onReady(w,v)}};s=Ext.merge({},i,s);Ext.onDocumentReady(function(){Ext.factoryConfig(s,function(u){Ext.event.Dispatcher.getInstance().setPublishers(u.eventPublishers);if(u.logger){Ext.Logger=u.logger}if(u.animator){Ext.Animator=u.animator}if(u.viewport){Ext.Viewport=p=u.viewport;if(!a){a=p}Ext.require(c,function(){Ext.Viewport.on("ready",f,null,{single:true})})}else{Ext.require(c,f)}})});if(!document.body){var k=s.phoneIcon,m=s.tabletIcon,l=s.tabletStartupScreen,d=s.statusBarStyle,q=s.phoneStartupScreen,j=Ext.os.is.iPad;document.write('<meta id="extViewportMeta" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">');document.write('<meta name="apple-mobile-web-app-capable" content="yes">');document.write('<meta name="apple-touch-fullscreen" content="yes">');if(Ext.isString(d)){document.write('<meta name="apple-mobile-web-app-status-bar-style" content="'+d+'">')}if(l&&j){document.write('<link rel="apple-touch-startup-image" href="'+l+'">')}if(q&&!j){document.write('<link rel="apple-touch-startup-image" href="'+q+'">')}if(Ext.isString(o)||Ext.isString(k)||Ext.isString(m)){o={"57":k||m||o,"72":m||k||o,"114":k||m||o}}g=(s.glossOnIcon===false)?"-precomposed":"";if(o){var t=o["72"],e=o["57"],h=o["114"],r='<link rel="apple-touch-icon';if(j&&t){document.write(r+g+'" sizes="72x72" href="'+t+'">')}else{if(!j){if(e){document.write(r+g+'" href="'+e+'">')}if(h){document.write(r+g+'" sizes="114x114" href="'+h+'">')}}}}}},application:function(a){var c,b;if(!a){a={}}Ext.Loader.setPath(a.name,a.appFolder||"app");a.requires=Ext.Array.from(a.requires);a.requires.push("Ext.app.Application");c=a.onReady;b=a.scope;a.onReady=function(){new Ext.app.Application(a);if(c){c.call(b)}};Ext.setup(a)},factoryConfig:function(a,l){var g=Ext.isSimpleObject(a);if(g&&a.xclass){var f=a.xclass;delete a.xclass;Ext.require(f,function(){Ext.factoryConfig(a,function(i){l(Ext.create(f,i))})});return}var d=Ext.isArray(a),m=[],k,j,c,e;if(g||d){if(g){for(k in a){if(a.hasOwnProperty(k)){j=a[k];if(Ext.isSimpleObject(j)||Ext.isArray(j)){m.push(k)}}}}else{for(c=0,e=a.length;c<e;c++){j=a[c];if(Ext.isSimpleObject(j)||Ext.isArray(j)){m.push(c)}}}c=0;e=m.length;if(e===0){l(a);return}function h(i){a[k]=i;c++;b()}function b(){if(c>=e){l(a);return}k=m[c];j=a[k];Ext.factoryConfig(j,h)}b();return}l(a)},factory:function(b,e,a,f){var d=Ext.ClassManager,c;if(!b||b.isInstance){if(a&&a!==b){a.destroy()}return b}if(f){if(typeof b=="string"){return d.instantiateByAlias(f+"."+b)}else{if(Ext.isObject(b)&&"type" in b){return d.instantiateByAlias(f+"."+b.type,b)}}}else{if(typeof b=="string"){return Ext.getCmp(b)}}if(b===true){if(a){return a}else{return d.instantiate(e)}}if("xtype" in b){c=d.instantiateByAlias("widget."+b.xtype,b)}if("xclass" in b){c=d.instantiate(b.xclass,b)}if(c){if(a){a.destroy()}return c}if(a){return a.setConfig(b)}return d.instantiate(e,b)},deprecateClassMember:function(b,c,a,d){return this.deprecateProperty(b.prototype,c,a,d)},deprecateClassMembers:function(b,c){var d=b.prototype,e,a;for(e in c){if(c.hasOwnProperty(e)){a=c[e];this.deprecateProperty(d,e,a)}}},deprecateProperty:function(b,c,a,d){if(!d){d="'"+c+"' is deprecated"}if(a){d+=", please use '"+a+"' instead"}if(a){Ext.Object.defineProperty(b,c,{get:function(){return this[a]},set:function(e){this[a]=e},configurable:true})}},deprecatePropertyValue:function(b,a,d,c){Ext.Object.defineProperty(b,a,{get:function(){return d},configurable:true})},deprecateMethod:function(b,a,d,c){b[a]=function(){if(d){return d.apply(this,arguments)}}},deprecateClassMethod:function(a,b,h,d){if(typeof b!="string"){var g,f;for(g in b){if(b.hasOwnProperty(g)){f=b[g];Ext.deprecateClassMethod(a,g,f)}}return}var c=typeof h=="string",e;if(!d){d="'"+b+"()' is deprecated, please use '"+(c?h:h.name)+"()' instead"}if(c){e=function(){return this[h].apply(this,arguments)}}else{e=function(){return h.apply(this,arguments)}}if(b in a.prototype){Ext.Object.defineProperty(a.prototype,b,{value:null,writable:true,configurable:true})}a.addMember(b,e)},isReady:false,readyListeners:[],triggerReady:function(){var b=Ext.readyListeners,a,c,d;if(!Ext.isReady){Ext.isReady=true;for(a=0,c=b.length;a<c;a++){d=b[a];d.fn.call(d.scope)}delete Ext.readyListeners}},onDocumentReady:function(c,b){if(Ext.isReady){c.call(b)}else{var a=Ext.triggerReady;Ext.readyListeners.push({fn:c,scope:b});if(Ext.browser.is.PhoneGap&&!Ext.os.is.Desktop){if(!Ext.readyListenerAttached){Ext.readyListenerAttached=true;document.addEventListener("deviceready",a,false)}}else{if(document.readyState.match(/interactive|complete|loaded/)!==null){a()}else{if(!Ext.readyListenerAttached){Ext.readyListenerAttached=true;window.addEventListener("DOMContentLoaded",a,false)}}}}},callback:function(d,c,b,a){if(Ext.isFunction(d)){b=b||[];c=c||window;if(a){Ext.defer(d,a,c,b)}else{d.apply(c,b)}}}});Ext.define("Ext.env.Browser",{requires:["Ext.Version"],statics:{browserNames:{ie:"IE",firefox:"Firefox",safari:"Safari",chrome:"Chrome",opera:"Opera",dolfin:"Dolfin",webosbrowser:"webOSBrowser",chromeMobile:"ChromeMobile",silk:"Silk",other:"Other"},engineNames:{webkit:"WebKit",gecko:"Gecko",presto:"Presto",trident:"Trident",other:"Other"},enginePrefixes:{webkit:"AppleWebKit/",gecko:"Gecko/",presto:"Presto/",trident:"Trident/"},browserPrefixes:{ie:"MSIE ",firefox:"Firefox/",chrome:"Chrome/",safari:"Version/",opera:"Opera/",dolfin:"Dolfin/",webosbrowser:"wOSBrowser/",chromeMobile:"CrMo/",silk:"Silk/"}},styleDashPrefixes:{WebKit:"-webkit-",Gecko:"-moz-",Trident:"-ms-",Presto:"-o-",Other:""},stylePrefixes:{WebKit:"Webkit",Gecko:"Moz",Trident:"ms",Presto:"O",Other:""},propertyPrefixes:{WebKit:"webkit",Gecko:"moz",Trident:"ms",Presto:"o",Other:""},is:Ext.emptyFn,name:null,version:null,engineName:null,engineVersion:null,setFlag:function(a,b){if(typeof b=="undefined"){b=true}this.is[a]=b;this.is[a.toLowerCase()]=b;return this},constructor:function(o){this.userAgent=o;e=this.is=function(i){return e[i]===true};var k=this.statics(),c=o.match(new RegExp("((?:"+Ext.Object.getValues(k.browserPrefixes).join(")|(?:")+"))([\\w\\._]+)")),b=o.match(new RegExp("((?:"+Ext.Object.getValues(k.enginePrefixes).join(")|(?:")+"))([\\w\\._]+)")),g=k.browserNames,j=g.other,f=k.engineNames,n=f.other,m="",l="",h=false,e,d,a;if(c){j=g[Ext.Object.getKey(k.browserPrefixes,c[1])];m=new Ext.Version(c[2])}if(b){n=f[Ext.Object.getKey(k.enginePrefixes,b[1])];l=new Ext.Version(b[2])}Ext.apply(this,{engineName:n,engineVersion:l,name:j,version:m});this.setFlag(j);if(m){this.setFlag(j+(m.getMajor()||""));this.setFlag(j+m.getShortVersion())}for(d in g){if(g.hasOwnProperty(d)){a=g[d];this.setFlag(a,j===a)}}this.setFlag(a);if(l){this.setFlag(n+(l.getMajor()||""));this.setFlag(n+l.getShortVersion())}for(d in f){if(f.hasOwnProperty(d)){a=f[d];this.setFlag(a,n===a)}}this.setFlag("Standalone",!!navigator.standalone);if(typeof window.PhoneGap!="undefined"){h=true;this.setFlag("PhoneGap")}else{if(!!window.isNK){h=true;this.setFlag("Sencha")}}this.setFlag("WebView",h);this.isStrict=document.compatMode=="CSS1Compat";this.isSecure=/^https/i.test(window.location.protocol);return this},getStyleDashPrefix:function(){return this.styleDashPrefixes[this.engineName]},getStylePrefix:function(){return this.stylePrefixes[this.engineName]},getVendorProperyName:function(a){var b=this.propertyPrefixes[this.engineName];if(b.length>0){return b+Ext.String.capitalize(a)}return a}},function(){var a=Ext.browser=new this(Ext.global.navigator.userAgent)});Ext.define("Ext.env.OS",{requires:["Ext.Version"],statics:{names:{ios:"iOS",android:"Android",webos:"webOS",blackberry:"BlackBerry",rimTablet:"RIMTablet",mac:"MacOS",win:"Windows",linux:"Linux",bada:"Bada",other:"Other"},prefixes:{ios:"i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS ",android:"(Android |HTC_|Silk/)",blackberry:"BlackBerry(?:.*)Version/",rimTablet:"RIM Tablet OS ",webos:"(?:webOS|hpwOS)/",bada:"Bada/"}},is:Ext.emptyFn,name:null,version:null,setFlag:function(a,b){if(typeof b=="undefined"){b=true}this.is[a]=b;this.is[a.toLowerCase()]=b;return this},constructor:function(m,b){var k=this.statics(),j=k.names,c=k.prefixes,a,h="",d,g,f,l,e;e=this.is=function(i){return this.is[i]===true};for(d in c){if(c.hasOwnProperty(d)){g=c[d];f=m.match(new RegExp("(?:"+g+")([^\\s;]+)"));if(f){a=j[d];if(f[1]&&(f[1]=="HTC_"||f[1]=="Silk/")){h=new Ext.Version("2.3")}else{h=new Ext.Version(f[f.length-1])}break}}}if(!a){a=j[(m.toLowerCase().match(/mac|win|linux/)||["other"])[0]];h=new Ext.Version("")}this.name=a;this.version=h;if(b){this.setFlag(b)}this.setFlag(a);if(h){this.setFlag(a+(h.getMajor()||""));this.setFlag(a+h.getShortVersion())}for(d in j){if(j.hasOwnProperty(d)){l=j[d];if(!e.hasOwnProperty(a)){this.setFlag(l,(a===l))}}}return this}},function(){var a=Ext.global.navigator,e=a.userAgent,b,g,d;Ext.os=b=new this(e,a.platform);g=b.name;var c=window.location.search.match(/deviceType=(Tablet|Phone)/),f=window.deviceType;if(c&&c[1]){d=c[1]}else{if(f==="iPhone"){d="Phone"}else{if(f==="iPad"){d="Tablet"}else{if(!b.is.Android&&!b.is.iOS&&/Windows|Linux|MacOS/.test(g)){d="Desktop"}else{if(b.is.iPad||b.is.Android3||(b.is.Android4&&e.search(/mobile/i)==-1)){d="Tablet"}else{d="Phone"}}}}}b.setFlag(d,true);b.deviceType=d});Ext.define("Ext.env.Feature",{requires:["Ext.env.Browser","Ext.env.OS"],constructor:function(){this.testElements={};this.has=function(a){return !!this.has[a]};return this},getTestElement:function(a,b){if(a===undefined){a="div"}else{if(typeof a!=="string"){return a}}if(b){return document.createElement(a)}if(!this.testElements[a]){this.testElements[a]=document.createElement(a)}return this.testElements[a]},isStyleSupported:function(c,b){var d=this.getTestElement(b).style,a=Ext.String.capitalize(c);if(typeof d[c]!=="undefined"||typeof d[Ext.browser.getStylePrefix(c)+a]!=="undefined"){return true}return false},isEventSupported:function(c,a){if(a===undefined){a=window}var e=this.getTestElement(a),b="on"+c.toLowerCase(),d=(b in e);if(!d){if(e.setAttribute&&e.removeAttribute){e.setAttribute(b,"");d=typeof e[b]==="function";if(typeof e[b]!=="undefined"){e[b]=undefined}e.removeAttribute(b)}}return d},getSupportedPropertyName:function(b,a){var c=Ext.browser.getVendorProperyName(a);if(c in b){return c}else{if(a in b){return a}}return null},registerTest:Ext.Function.flexSetter(function(a,b){this.has[a]=b.call(this);return this})},function(){Ext.feature=new this;var a=Ext.feature.has;Ext.feature.registerTest({Canvas:function(){var b=this.getTestElement("canvas");return !!(b&&b.getContext&&b.getContext("2d"))},Svg:function(){var b=document;return !!(b.createElementNS&&!!b.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect)},Vml:function(){var c=this.getTestElement(),b=false;c.innerHTML="<!--[if vml]><br><![endif]-->";b=(c.childNodes.length===1);c.innerHTML="";return b},Touch:function(){return this.isEventSupported("touchstart")&&!(Ext.os&&Ext.os.name.match(/Windows|MacOSX|Linux/))},Orientation:function(){return("orientation" in window)&&this.isEventSupported("orientationchange")},OrientationChange:function(){return this.isEventSupported("orientationchange")},DeviceMotion:function(){return this.isEventSupported("devicemotion")},Geolocation:function(){return"geolocation" in window.navigator},SqlDatabase:function(){return"openDatabase" in window},WebSockets:function(){return"WebSocket" in window},Range:function(){return !!document.createRange},CreateContextualFragment:function(){var b=!!document.createRange?document.createRange():false;return b&&!!b.createContextualFragment},History:function(){return("history" in window&&"pushState" in window.history)},CssTransforms:function(){return this.isStyleSupported("transform")},Css3dTransforms:function(){return this.has("CssTransforms")&&this.isStyleSupported("perspective")&&!Ext.os.is.Android2},CssAnimations:function(){return this.isStyleSupported("animationName")},CssTransitions:function(){return this.isStyleSupported("transitionProperty")},Audio:function(){return !!this.getTestElement("audio").canPlayType},Video:function(){return !!this.getTestElement("video").canPlayType},ClassList:function(){return"classList" in this.getTestElement()}})});Ext.define("Ext.dom.Query",{select:function(h,b){var g=[],d,f,e,c,a;b=b||document;if(typeof b=="string"){b=document.getElementById(b)}h=h.split(",");for(f=0,c=h.length;f<c;f++){if(typeof h[f]=="string"){if(h[f][0]=="@"){d=b.getAttributeNode(h[f].substring(1));g.push(d)}else{d=b.querySelectorAll(h[f]);for(e=0,a=d.length;e<a;e++){g.push(d[e])}}}}return g},selectNode:function(b,a){return this.select(b,a)[0]},is:function(a,b){if(typeof a=="string"){a=document.getElementById(a)}return this.select(b).indexOf(a)!==-1},isXml:function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":false}},function(){Ext.ns("Ext.core");Ext.core.DomQuery=Ext.DomQuery=new this();Ext.query=Ext.Function.alias(Ext.DomQuery,"select")});Ext.define("Ext.dom.Helper",{emptyTags:/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,confRe:/tag|children|cn|html|tpl|tplData$/i,endRe:/end/i,attribXlat:{cls:"class",htmlFor:"for"},closeTags:{},decamelizeName:function(){var c=/([a-z])([A-Z])/g,b={};function a(d,f,e){return f+"-"+e.toLowerCase()}return function(d){return b[d]||(b[d]=d.replace(c,a))}}(),generateMarkup:function(d,c){var g=this,b,h,a,e,f;if(typeof d=="string"){c.push(d)}else{if(Ext.isArray(d)){for(e=0;e<d.length;e++){if(d[e]){g.generateMarkup(d[e],c)}}}else{a=d.tag||"div";c.push("<",a);for(b in d){if(d.hasOwnProperty(b)){h=d[b];if(!g.confRe.test(b)){if(typeof h=="object"){c.push(" ",b,'="');g.generateStyles(h,c).push('"')}else{c.push(" ",g.attribXlat[b]||b,'="',h,'"')}}}}if(g.emptyTags.test(a)){c.push("/>")}else{c.push(">");if((h=d.tpl)){h.applyOut(d.tplData,c)}if((h=d.html)){c.push(h)}if((h=d.cn||d.children)){g.generateMarkup(h,c)}f=g.closeTags;c.push(f[a]||(f[a]="</"+a+">"))}}}return c},generateStyles:function(e,c){var b=c||[],d;for(d in e){if(e.hasOwnProperty(d)){b.push(this.decamelizeName(d),":",e[d],";")}}return c||b.join("")},markup:function(a){if(typeof a=="string"){return a}var b=this.generateMarkup(a,[]);return b.join("")},applyStyles:function(a,b){Ext.fly(a).applyStyles(b)},createContextualFragment:function(c){var f=document.createElement("div"),a=document.createDocumentFragment(),b=0,d,e;f.innerHTML=c;e=f.childNodes;d=e.length;for(;b<d;b++){a.appendChild(e[b].cloneNode(true))}return a},insertHtml:function(d,a,e){var h,f,i,c,b,g;d=d.toLowerCase();if(Ext.isTextNode(a)){if(d=="afterbegin"){d="beforebegin"}else{if(d=="beforeend"){d="afterend"}}}b=d=="beforebegin";g=d=="afterbegin";f=Ext.feature.has.CreateContextualFragment?a.ownerDocument.createRange():undefined;h="setStart"+(this.endRe.test(d)?"After":"Before");if(b||d=="afterend"){if(f){f[h](a);i=f.createContextualFragment(e)}else{i=this.createContextualFragment(e)}a.parentNode.insertBefore(i,b?a:a.nextSibling);return a[(b?"previous":"next")+"Sibling"]}else{c=(g?"first":"last")+"Child";if(a.firstChild){if(f){f[h](a[c]);i=f.createContextualFragment(e)}else{i=this.createContextualFragment(e)}if(g){a.insertBefore(i,a.firstChild)}else{a.appendChild(i)}}else{a.innerHTML=e}return a[c]}},insertBefore:function(a,c,b){return this.doInsert(a,c,b,"beforebegin")},insertAfter:function(a,c,b){return this.doInsert(a,c,b,"afterend")},insertFirst:function(a,c,b){return this.doInsert(a,c,b,"afterbegin")},append:function(a,c,b){return this.doInsert(a,c,b,"beforeend")},overwrite:function(a,c,b){a=Ext.getDom(a);a.innerHTML=this.markup(c);return b?Ext.get(a.firstChild):a.firstChild},doInsert:function(b,d,c,e){var a=this.insertHtml(e,Ext.getDom(b),this.markup(d));return c?Ext.get(a,true):a},createTemplate:function(b){var a=this.markup(b);return new Ext.Template(a)}},function(){Ext.ns("Ext.core");Ext.core.DomHelper=Ext.DomHelper=new this});Ext.define("Ext.mixin.Identifiable",{statics:{uniqueIds:{}},isIdentifiable:true,mixinId:"identifiable",idCleanRegex:/\.|[^\w\-]/g,defaultIdPrefix:"ext-",defaultIdSeparator:"-",getOptimizedId:function(){return this.id},getUniqueId:function(){var f=this.id,b,d,e,a,c;if(!f){b=this.self.prototype;d=this.defaultIdSeparator;a=Ext.mixin.Identifiable.uniqueIds;if(!b.hasOwnProperty("identifiablePrefix")){e=this.xtype;if(e){c=this.defaultIdPrefix+e+d}else{c=b.$className.replace(this.idCleanRegex,d).toLowerCase()+d}b.identifiablePrefix=c}c=this.identifiablePrefix;if(!a.hasOwnProperty(c)){a[c]=0}f=this.id=c+(++a[c])}this.getUniqueId=this.getOptimizedId;return f},setId:function(a){this.id=a},getId:function(){var a=this.id;if(!a){a=this.getUniqueId()}this.getId=this.getOptimizedId;return a}});Ext.define("Ext.dom.Element",{alternateClassName:"Ext.Element",mixins:["Ext.mixin.Identifiable"],requires:["Ext.dom.Query","Ext.dom.Helper"],observableType:"element",xtype:"element",statics:{CREATE_ATTRIBUTES:{style:"style",className:"className",cls:"cls",classList:"classList",text:"text",hidden:"hidden",html:"html",children:"children"},create:function(c,b){var f=this.CREATE_ATTRIBUTES,e,h,k,j,a,d,g;if(!c){c={}}if(c.isElement){return c.dom}else{if("nodeType" in c){return c}}if(typeof c=="string"){return document.createTextNode(c)}k=c.tag;if(!k){k="div"}e=document.createElement(k);h=e.style;for(a in c){if(a!="tag"&&c.hasOwnProperty(a)){j=c[a];switch(a){case f.style:if(typeof j=="string"){e.setAttribute(a,j)}else{for(d in j){if(j.hasOwnProperty(d)){h[d]=j[d]}}}break;case f.className:case f.cls:e.className=j;break;case f.classList:e.className=j.join(" ");break;case f.text:e.textContent=j;break;case f.hidden:if(j){e.style.display="none"}break;case f.html:e.innerHTML=j;break;case f.children:for(d=0,g=j.length;d<g;d++){e.appendChild(this.create(j[d],true))}break;default:e.setAttribute(a,j)}}}if(b){return e}else{return this.get(e)}},documentElement:null,cache:{},get:function(c){var b=this.cache,a,d,e;if(!c){return null}if(typeof c=="string"){if(b.hasOwnProperty(c)){return b[c]}if(!(d=document.getElementById(c))){return null}b[c]=a=new this(d);return a}if("tagName" in c){e=c.id;if(b.hasOwnProperty(e)){return b[e]}a=new this(c);b[a.getId()]=a;return a}if(c.isElement){return c}if(c.isComposite){return c}if(Ext.isArray(c)){return this.select(c)}if(c===document){if(!this.documentElement){this.documentElement=new this(document.documentElement);this.documentElement.setId("ext-application")}return this.documentElement}return null},data:function(c,b,e){var a=Ext.cache,f,d;c=this.get(c);if(!c){return null}f=c.id;d=a[f].data;if(!d){a[f].data=d={}}if(arguments.length==2){return d[b]}else{return(d[b]=e)}}},isElement:true,constructor:function(a){if(typeof a=="string"){a=document.getElementById(a)}if(!a){throw new Error("Invalid domNode reference or an id of an existing domNode: "+a)}this.dom=a;this.getUniqueId()},attach:function(a){this.dom=a;this.id=a.id;return this},getUniqueId:function(){var b=this.id,a;if(!b){a=this.dom;if(a.id.length>0){this.id=b=a.id}else{a.id=b=this.mixins.identifiable.getUniqueId.call(this)}this.self.cache[b]=this}return b},setId:function(c){var a=this.id,b=this.self.cache;if(a){delete b[a]}this.dom.id=c;this.id=c;b[c]=this;return this},setHtml:function(a){this.dom.innerHTML=a},getHtml:function(){return this.dom.innerHTML},setText:function(a){this.dom.textContent=a},redraw:function(){var b=this.dom,a=b.style;a.display="none";b.offsetHeight;a.display=""},isPainted:function(){return Boolean(this.dom.offsetParent)},set:function(a,b){var e=this.dom,c,d;for(c in a){if(a.hasOwnProperty(c)){d=a[c];if(c=="style"){this.applyStyles(d)}else{if(c=="cls"){e.className=d}else{if(b!==false){if(d===undefined){e.removeAttribute(c)}else{e.setAttribute(c,d)}}else{e[c]=d}}}}}return this},is:function(a){return Ext.DomQuery.is(this.dom,a)},getValue:function(b){var a=this.dom.value;return b?parseInt(a,10):a},getAttribute:function(a,b){var c=this.dom;return c.getAttributeNS(b,a)||c.getAttribute(b+":"+a)||c.getAttribute(a)||c[a]},destroy:function(){this.isDestroyed=true;var a=Ext.Element.cache,b=this.dom;if(b&&b.parentNode&&b.tagName!="BODY"){b.parentNode.removeChild(b)}delete a[this.id];delete this.dom}},function(a){Ext.elements=Ext.cache=a.cache;this.addStatics({Fly:new Ext.Class({extend:a,constructor:function(b){this.dom=b}}),_flyweights:{},fly:function(d,b){var e=null,c=a._flyweights;b=b||"_global";d=Ext.getDom(d);if(d){e=c[b]||(c[b]=new a.Fly());e.dom=d;e.isSynchronized=false}return e}});Ext.get=function(b){return a.get.call(a,b)};Ext.fly=function(){return a.fly.apply(a,arguments)};Ext.ClassManager.onCreated(function(){a.mixin("observable",Ext.mixin.Observable)},null,"Ext.mixin.Observable")});Ext.dom.Element.addStatics({unitRe:/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,camelRe:/(-[a-z])/gi,cssRe:/([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi,opacityRe:/alpha\(opacity=(.*)\)/i,propertyCache:{},defaultUnit:"px",borders:{l:"border-left-width",r:"border-right-width",t:"border-top-width",b:"border-bottom-width"},paddings:{l:"padding-left",r:"padding-right",t:"padding-top",b:"padding-bottom"},margins:{l:"margin-left",r:"margin-right",t:"margin-top",b:"margin-bottom"},addUnits:function(b,a){if(Ext.isNumber(b)){return b+(a||this.defaultUnit||"px")}if(b===""||b=="auto"||b===undefined||b===null){return b||""}if(!this.unitRe.test(b)){return b||""}return b},isAncestor:function(b,d){var a=false;b=Ext.getDom(b);d=Ext.getDom(d);if(b&&d){if(b.contains){return b.contains(d)}else{if(b.compareDocumentPosition){return !!(b.compareDocumentPosition(d)&16)}else{while((d=d.parentNode)){a=d==b||a}}}}return a},parseBox:function(b){if(typeof b!="string"){b=b.toString()}var c=b.split(" "),a=c.length;if(a==1){c[1]=c[2]=c[3]=c[0]}else{if(a==2){c[2]=c[0];c[3]=c[1]}else{if(a==3){c[3]=c[1]}}}return{top:parseFloat(c[0])||0,right:parseFloat(c[1])||0,bottom:parseFloat(c[2])||0,left:parseFloat(c[3])||0}},unitizeBox:function(f,e){var d=this.addUnits,c=this.parseBox(f);return d(c.top,e)+" "+d(c.right,e)+" "+d(c.bottom,e)+" "+d(c.left,e)},camelReplaceFn:function(b,c){return c.charAt(1).toUpperCase()},normalize:function(a){return this.propertyCache[a]||(this.propertyCache[a]=a.replace(this.camelRe,this.camelReplaceFn))},fromPoint:function(a,b){return Ext.get(document.elementFromPoint(a,b))},parseStyles:function(c){var a={},b=this.cssRe,d;if(c){b.lastIndex=0;while((d=b.exec(c))){a[d[1]]=d[2]}}return a}});Ext.dom.Element.addMembers({appendChild:function(a){this.dom.appendChild(Ext.getDom(a));return this},removeChild:function(a){this.dom.removeChild(Ext.getDom(a));return this},append:function(){this.appendChild.apply(this,arguments)},appendTo:function(a){Ext.getDom(a).appendChild(this.dom);return this},insertBefore:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a);return this},insertAfter:function(a){a=Ext.getDom(a);a.parentNode.insertBefore(this.dom,a.nextSibling);return this},insertFirst:function(b){var a=Ext.getDom(b),d=this.dom,c=d.firstChild;if(!c){d.appendChild(a)}else{d.insertBefore(a,c)}return this},insertSibling:function(e,c,d){var f=this,b,a=(c||"before").toLowerCase()=="after",g;if(Ext.isArray(e)){g=f;Ext.each(e,function(h){b=Ext.fly(g,"_internal").insertSibling(h,c,d);if(a){g=b}});return b}e=e||{};if(e.nodeType||e.dom){b=f.dom.parentNode.insertBefore(Ext.getDom(e),a?f.dom.nextSibling:f.dom);if(!d){b=Ext.get(b)}}else{if(a&&!f.dom.nextSibling){b=Ext.core.DomHelper.append(f.dom.parentNode,e,!d)}else{b=Ext.core.DomHelper[a?"insertAfter":"insertBefore"](f.dom,e,!d)}}return b},replace:function(a){a=Ext.get(a);this.insertBefore(a);a.remove();return this},replaceWith:function(a){var b=this;if(a.nodeType||a.dom||typeof a=="string"){a=Ext.get(a);b.dom.parentNode.insertBefore(a,b.dom)}else{a=Ext.core.DomHelper.insertBefore(b.dom,a)}delete Ext.cache[b.id];Ext.removeNode(b.dom);b.id=Ext.id(b.dom=a);Ext.dom.Element.addToCache(b.isFlyweight?new Ext.dom.Element(b.dom):b);return b},createChild:function(b,a,c){b=b||{tag:"div"};if(a){return Ext.core.DomHelper.insertBefore(a,b,c!==true)}else{return Ext.core.DomHelper[!this.dom.firstChild?"insertFirst":"append"](this.dom,b,c!==true)}},wrap:function(b,c){var e=this.dom,f=this.self.create(b,c),d=(c)?f:f.dom,a=e.parentNode;if(a){a.insertBefore(d,e)}d.appendChild(e);return f},wrapAllChildren:function(a){var d=this.dom,b=d.childNodes,e=this.self.create(a),c=e.dom;while(b.length>0){c.appendChild(d.firstChild)}d.appendChild(c);return e},unwrapAllChildren:function(){var c=this.dom,b=c.childNodes,a=c.parentNode;if(a){while(b.length>0){a.insertBefore(c,c.firstChild)}this.destroy()}},unwrap:function(){var c=this.dom,a=c.parentNode,b;if(a){b=a.parentNode;b.insertBefore(c,a);b.removeChild(a)}else{b=document.createDocumentFragment();b.appendChild(c)}return this},insertHtml:function(b,c,a){var d=Ext.core.DomHelper.insertHtml(b,this.dom,c);return a?Ext.get(d):d}});Ext.dom.Element.override({getX:function(a){return this.getXY(a)[0]},getY:function(a){return this.getXY(a)[1]},getXY:function(){var a=window.webkitConvertPointFromNodeToPage;if(a){return function(){var b=a(this.dom,new WebKitPoint(0,0));return[b.x,b.y]}}else{return function(){var c=this.dom.getBoundingClientRect(),b=Math.round;return[b(c.left+window.pageXOffset),b(c.top+window.pageYOffset)]}}}(),getOffsetsTo:function(a){var c=this.getXY(),b=Ext.fly(a,"_internal").getXY();return[c[0]-b[0],c[1]-b[1]]},setX:function(a){return this.setXY([a,this.getY()])},setY:function(a){return this.setXY([this.getX(),a])},setXY:function(d){var b=this;if(arguments.length>1){d=[d,arguments[1]]}var c=b.translatePoints(d),a=b.dom.style;for(d in c){if(!c.hasOwnProperty(d)){continue}if(!isNaN(c[d])){a[d]=c[d]+"px"}}return b},getLeft:function(){return parseInt(this.getStyle("left"),10)||0},getRight:function(){return parseInt(this.getStyle("right"),10)||0},getTop:function(){return parseInt(this.getStyle("top"),10)||0},getBottom:function(){return parseInt(this.getStyle("bottom"),10)||0},translatePoints:function(a,g){g=isNaN(a[1])?g:a[1];a=isNaN(a[0])?a:a[0];var d=this,e=d.isStyle("position","relative"),f=d.getXY(),b=parseInt(d.getStyle("left"),10),c=parseInt(d.getStyle("top"),10);b=!isNaN(b)?b:(e?0:d.dom.offsetLeft);c=!isNaN(c)?c:(e?0:d.dom.offsetTop);return{left:(a-f[0]+b),top:(g-f[1]+c)}},setBox:function(d){var c=this,b=d.width,a=d.height,f=d.top,e=d.left;if(e!==undefined){c.setLeft(e)}if(f!==undefined){c.setTop(f)}if(b!==undefined){c.setWidth(b)}if(a!==undefined){c.setHeight(a)}return this},getBox:function(g,j){var h=this,e=h.dom,c=e.offsetWidth,k=e.offsetHeight,n,f,d,a,m,i;if(!j){n=h.getXY()}else{if(g){n=[0,0]}else{n=[parseInt(h.getStyle("left"),10)||0,parseInt(h.getStyle("top"),10)||0]}}if(!g){f={x:n[0],y:n[1],0:n[0],1:n[1],width:c,height:k}}else{d=h.getBorderWidth.call(h,"l")+h.getPadding.call(h,"l");a=h.getBorderWidth.call(h,"r")+h.getPadding.call(h,"r");m=h.getBorderWidth.call(h,"t")+h.getPadding.call(h,"t");i=h.getBorderWidth.call(h,"b")+h.getPadding.call(h,"b");f={x:n[0]+d,y:n[1]+m,0:n[0]+d,1:n[1]+m,width:c-(d+a),height:k-(m+i)}}f.left=f.x;f.top=f.y;f.right=f.x+f.width;f.bottom=f.y+f.height;return f},getPageBox:function(e){var g=this,c=g.dom,j=c.offsetWidth,f=c.offsetHeight,m=g.getXY(),k=m[1],a=m[0]+j,i=m[1]+f,d=m[0];if(!c){return new Ext.util.Region()}if(e){return new Ext.util.Region(k,a,i,d)}else{return{left:d,top:k,width:j,height:f,right:a,bottom:i}}}});Ext.dom.Element.addMembers({WIDTH:"width",HEIGHT:"height",MIN_WIDTH:"min-width",MIN_HEIGHT:"min-height",MAX_WIDTH:"max-width",MAX_HEIGHT:"max-height",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left",VISIBILITY:1,DISPLAY:2,OFFSETS:3,SEPARATOR:"-",trimRe:/^\s+|\s+$/g,wordsRe:/\w/g,spacesRe:/\s+/,styleSplitRe:/\s*(?::|;)\s*/,transparentRe:/^(?:transparent|(?:rgba[(](?:\s*\d+\s*[,]){3}\s*0\s*[)]))$/i,classNameSplitRegex:/[\s]+/,borders:{t:"border-top-width",r:"border-right-width",b:"border-bottom-width",l:"border-left-width"},paddings:{t:"padding-top",r:"padding-right",b:"padding-bottom",l:"padding-left"},margins:{t:"margin-top",r:"margin-right",b:"margin-bottom",l:"margin-left"},defaultUnit:"px",isSynchronized:false,synchronize:function(){var g=this.dom,a={},d=g.className,f,c,e,b;if(d.length>0){f=g.className.split(this.classNameSplitRegex);for(c=0,e=f.length;c<e;c++){b=f[c];a[b]=true}}else{f=[]}this.classList=f;this.hasClassMap=a;this.isSynchronized=true;return this},addCls:function(j,g,k){if(!j){return this}if(!this.isSynchronized){this.synchronize()}var e=this.dom,c=this.hasClassMap,d=this.classList,a=this.SEPARATOR,f,h,b;g=g?g+a:"";k=k?a+k:"";if(typeof j=="string"){j=j.split(this.spacesRe)}for(f=0,h=j.length;f<h;f++){b=g+j[f]+k;if(!c[b]){c[b]=true;d.push(b)}}e.className=d.join(" ");return this},removeCls:function(j,g,k){if(!j){return this}if(!this.isSynchronized){this.synchronize()}if(!k){k=""}var e=this.dom,c=this.hasClassMap,d=this.classList,a=this.SEPARATOR,f,h,b;g=g?g+a:"";k=k?a+k:"";if(typeof j=="string"){j=j.split(this.spacesRe)}for(f=0,h=j.length;f<h;f++){b=g+j[f]+k;if(c[b]){delete c[b];Ext.Array.remove(d,b)}}e.className=d.join(" ");return this},replaceCls:function(b,a,c,d){return this.removeCls(b,c,d).addCls(a,c,d)},hasCls:function(a){if(!this.isSynchronized){this.synchronize()}return this.hasClassMap.hasOwnProperty(a)},toggleCls:function(a){return this.hasCls(a)?this.removeCls(a):this.addCls(a)},setWidth:function(a){return this.setLengthValue(this.WIDTH,a)},setHeight:function(a){return this.setLengthValue(this.HEIGHT,a)},setSize:function(b,a){if(Ext.isObject(b)){a=b.height;b=b.width}this.setWidth(b);this.setHeight(a);return this},setMinWidth:function(a){return this.setLengthValue(this.MIN_WIDTH,a)},setMinHeight:function(a){return this.setLengthValue(this.MIN_HEIGHT,a)},setMaxWidth:function(a){return this.setLengthValue(this.MAX_WIDTH,a)},setMaxHeight:function(a){return this.setLengthValue(this.MAX_HEIGHT,a)},setTop:function(a){return this.setLengthValue(this.TOP,a)},setRight:function(a){return this.setLengthValue(this.RIGHT,a)},setBottom:function(a){return this.setLengthValue(this.BOTTOM,a)},setLeft:function(a){return this.setLengthValue(this.LEFT,a)},setMargin:function(b){var a=this.dom.style;if(b||b===0){b=this.self.unitizeBox((b===true)?5:b);a.setProperty("margin",b,"important")}else{a.removeProperty("margin-top");a.removeProperty("margin-right");a.removeProperty("margin-bottom");a.removeProperty("margin-left")}},setPadding:function(b){var a=this.dom.style;if(b||b===0){b=this.self.unitizeBox((b===true)?5:b);a.setProperty("padding",b,"important")}else{a.removeProperty("padding-top");a.removeProperty("padding-right");a.removeProperty("padding-bottom");a.removeProperty("padding-left")}},setBorder:function(a){var b=this.dom.style;if(a||a===0){a=this.self.unitizeBox((a===true)?1:a);b.setProperty("border-width",a,"important")}else{b.removeProperty("border-top-width");b.removeProperty("border-right-width");b.removeProperty("border-bottom-width");b.removeProperty("border-left-width")}},setLengthValue:function(a,c){var b=this.dom.style;if(c===null){b.removeProperty(a);return this}if(typeof c=="number"){c=c+"px"}b.setProperty(a,c,"important");return this},setVisible:function(b){var a=this.getVisibilityMode(),c=b?"removeCls":"addCls";switch(a){case this.VISIBILITY:this.removeCls(["x-hidden-display","x-hidden-offsets"]);this[c]("x-hidden-visibility");break;case this.DISPLAY:this.removeCls(["x-hidden-visibility","x-hidden-offsets"]);this[c]("x-hidden-display");break;case this.OFFSETS:this.removeCls(["x-hidden-visibility","x-hidden-display"]);this[c]("x-hidden-offsets");break}return this},getVisibilityMode:function(){var b=this.dom,a=Ext.dom.Element.data(b,"visibilityMode");if(a===undefined){Ext.dom.Element.data(b,"visibilityMode",a=this.DISPLAY)}return a},setVisibilityMode:function(a){this.self.data(this.dom,"visibilityMode",a);return this},show:function(){var a=this.dom;if(a){a.style.removeProperty("display")}},hide:function(){var c=this.dom,b=c.style,a=Ext.os.is.iOS5;if(b.getPropertyValue("display")!=="none"){if(a){b.setProperty("display","none","important");c.offsetHeight;b.removeProperty("display");c.offsetHeight}b.setProperty("display","none","important")}},setVisibility:function(a){var b=this.dom.style;if(a){b.removeProperty("visibility")}else{b.setProperty("visibility","hidden","important")}},styleHooks:{},addStyles:function(h,g){var b=0,f=h.match(this.wordsRe),e=0,a=f.length,d,c;for(;e<a;e++){d=f[e];c=d&&parseInt(this.getStyle(g[d]),10);if(c){b+=Math.abs(c)}}return b},isStyle:function(a,b){return this.getStyle(a)==b},getStyle:function(f){var c=this,e=c.dom,d=c.styleHooks[f],b,a;if(e==document){return null}if(!d){c.styleHooks[f]=d={name:this.self.normalize(f)}}if(d.get){return d.get(e,c)}b=window.getComputedStyle(e,"");a=(b&&b[d.name]);return a},setStyle:function(a,h){var f=this,d=f.dom,i=f.styleHooks,b=d.style,e=Ext.valueFrom,c,g;if(typeof a=="string"){g=i[a];if(!g){i[a]=g={name:Ext.dom.Element.normalize(a)}}h=e(h,"");if(g.set){g.set(d,h,f)}else{b[g.name]=h}}else{for(c in a){if(a.hasOwnProperty(c)){g=i[c];if(!g){i[c]=g={name:Ext.dom.Element.normalize(c)}}h=e(a[c],"");if(g.set){g.set(d,h,f)}else{b[g.name]=h}}}}return f},getHeight:function(b){var c=this.dom,a=b?(c.clientHeight-this.getPadding("tb")):c.offsetHeight;return a>0?a:0},getWidth:function(a){var c=this.dom,b=a?(c.clientWidth-this.getPadding("lr")):c.offsetWidth;return b>0?b:0},getBorderWidth:function(a){return this.addStyles(a,this.borders)},getPadding:function(a){return this.addStyles(a,this.paddings)},applyStyles:function(d){if(d){var e=this.dom,c,b,a;if(typeof d=="function"){d=d.call()}c=typeof d;if(c=="string"){d=Ext.util.Format.trim(d).split(this.styleSplitRe);for(b=0,a=d.length;b<a;){e.style[Ext.dom.Element.normalize(d[b++])]=d[b++]}}else{if(c=="object"){this.setStyle(d)}}}},getSize:function(b){var a=this.dom;return{width:Math.max(0,b?(a.clientWidth-this.getPadding("lr")):a.offsetWidth),height:Math.max(0,b?(a.clientHeight-this.getPadding("tb")):a.offsetHeight)}},repaint:function(){var a=this.dom;this.addCls(Ext.baseCSSPrefix+"repaint");setTimeout(function(){Ext.fly(a).removeCls(Ext.baseCSSPrefix+"repaint")},1);return this},getMargin:function(b){var c=this,d={t:"top",l:"left",r:"right",b:"bottom"},e={},a;if(!b){for(a in c.margins){e[d[a]]=parseFloat(c.getStyle(c.margins[a]))||0}return e}else{return c.addStyles.call(c,b,c.margins)}}});Ext.dom.Element.addMembers({getParent:function(){return Ext.get(this.dom.parentNode)},getFirstChild:function(){return Ext.get(this.dom.firstElementChild)},contains:function(a){if(!a){return false}var b=Ext.getDom(a);return(b===this.dom)||this.self.isAncestor(this.dom,b)},findParent:function(h,g,c){var e=this.dom,a=document.body,f=0,d;g=g||50;if(isNaN(g)){d=Ext.getDom(g);g=Number.MAX_VALUE}while(e&&e.nodeType==1&&f<g&&e!=a&&e!=d){if(Ext.DomQuery.is(e,h)){return c?Ext.get(e):e}f++;e=e.parentNode}return null},findParentNode:function(d,c,a){var b=Ext.fly(this.dom.parentNode,"_internal");return b?b.findParent(d,c,a):null},up:function(b,a){return this.findParentNode(b,a,true)},select:function(a,b){return Ext.dom.Element.select(a,this.dom,b)},query:function(a){return Ext.DomQuery.select(a,this.dom)},down:function(a,b){var c=Ext.DomQuery.selectNode(a,this.dom);return b?c:Ext.get(c)},child:function(a,b){var d,c=this,e;e=Ext.get(c).id;e=e.replace(/[\.:]/g,"\\$0");d=Ext.DomQuery.selectNode("#"+e+" > "+a,c.dom);return b?d:Ext.get(d)},parent:function(a,b){return this.matchNode("parentNode","parentNode",a,b)},next:function(a,b){return this.matchNode("nextSibling","nextSibling",a,b)},prev:function(a,b){return this.matchNode("previousSibling","previousSibling",a,b)},first:function(a,b){return this.matchNode("nextSibling","firstChild",a,b)},last:function(a,b){return this.matchNode("previousSibling","lastChild",a,b)},matchNode:function(b,e,a,c){if(!this.dom){return null}var d=this.dom[e];while(d){if(d.nodeType==1&&(!a||Ext.DomQuery.is(d,a))){return !c?Ext.get(d):d}d=d[b]}return null},isAncestor:function(a){return this.self.isAncestor.call(this.self,this.dom,a)}});Ext.define("Ext.dom.CompositeElementLite",{alternateClassName:["Ext.CompositeElementLite","Ext.CompositeElement"],requires:["Ext.dom.Element"],statics:{importElementMethods:function(){}},constructor:function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.dom.Element.Fly()},isComposite:true,getElement:function(a){return this.el.attach(a)},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(c,a){var e=this.elements,b,d;if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}else{if(c.isComposite){c=c.elements}else{if(!Ext.isIterable(c)){c=[c]}}}for(b=0,d=c.length;b<d;++b){e.push(this.transformElement(c[b]))}return this},invoke:function(d,a){var f=this.elements,e=f.length,c,b;for(b=0;b<e;b++){c=f[b];if(c){Ext.dom.Element.prototype[d].apply(this.getElement(c),a)}}return this},item:function(b){var c=this.elements[b],a=null;if(c){a=this.getElement(c)}return a},addListener:function(b,h,g,f){var d=this.elements,a=d.length,c,j;for(c=0;c<a;c++){j=d[c];if(j){Ext.EventManager.on(j,b,h,g||j,f)}}return this},each:function(f,d){var g=this,c=g.elements,a=c.length,b,h;for(b=0;b<a;b++){h=c[b];if(h){h=this.getElement(h);if(f.call(d||h,h,g,b)===false){break}}}return g},fill:function(a){var b=this;b.elements=[];b.add(a);return b},filter:function(a){var b=[],d=this,c=Ext.isFunction(a)?a:function(e){return e.is(a)};d.each(function(g,e,f){if(c(g,f)!==false){b[b.length]=d.transformElement(g)}});d.elements=b;return d},indexOf:function(a){return Ext.Array.indexOf(this.elements,this.transformElement(a))},replaceElement:function(e,c,a){var b=!isNaN(e)?e:this.indexOf(e),f;if(b>-1){c=Ext.getDom(c);if(a){f=this.elements[b];f.parentNode.insertBefore(c,f);Ext.removeNode(f)}Ext.Array.splice(this.elements,b,1,c)}return this},clear:function(){this.elements=[]},addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.dom.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(c,e){var b=this,d=this.elements,a;Ext.each(c,function(f){if((a=(d[f]||d[f=b.indexOf(f)]))){if(e){if(a.dom){a.remove()}else{Ext.removeNode(a)}}Ext.Array.erase(d,f,1)}});return this}},function(){var a=Ext.dom.Element,d=a.prototype,c=this.prototype,b;for(b in d){if(typeof d[b]=="function"){(function(e){c[e]=c[e]||function(){return this.invoke(e,arguments)}}).call(c,b)}}c.on=c.addListener;if(Ext.DomQuery){a.selectorFunction=Ext.DomQuery.select}a.select=function(e,f){var g;if(typeof e=="string"){g=a.selectorFunction(e,f)}else{if(e.length!==undefined){g=e}else{}}return new Ext.CompositeElementLite(g)};Ext.select=function(){return a.select.apply(a,arguments)}});Ext.define("Ext.ComponentManager",{alternateClassName:"Ext.ComponentMgr",singleton:true,constructor:function(){var a={};this.all={map:a,getArray:function(){var b=[],c;for(c in a){b.push(a[c])}return b}};this.map=a},register:function(a){this.map[a.getId()]=a},unregister:function(a){delete this.map[a.getId()]},isRegistered:function(a){return this.map[a]!==undefined},get:function(a){return this.map[a]},create:function(a,c){if(a.isComponent){return a}else{if(Ext.isString(a)){return Ext.createByAlias("widget."+a)}else{var b=a.xtype||c;return Ext.createByAlias("widget."+b,a)}}},registerType:Ext.emptyFn});Ext.define("Ext.ComponentQuery",{singleton:true,uses:["Ext.ComponentManager"]},function(){var g=this,j=["var r = [],","i = 0,","it = items,","l = it.length,","c;","for (; i < l; i++) {","c = it[i];","if (c.{0}) {","r.push(c);","}","}","return r;"].join(""),e=function(o,n){return n.method.apply(this,[o].concat(n.args))},a=function(p,t){var n=[],q=0,s=p.length,r,o=t!==">";for(;q<s;q++){r=p[q];if(r.getRefItems){n=n.concat(r.getRefItems(o))}}return n},f=function(o){var n=[],p=0,r=o.length,q;for(;p<r;p++){q=o[p];while(!!(q=(q.ownerCt||q.floatParent))){n.push(q)}}return n},l=function(o,t,s){if(t==="*"){return o.slice()}else{var n=[],p=0,r=o.length,q;for(;p<r;p++){q=o[p];if(q.isXType(t,s)){n.push(q)}}return n}},i=function(o,r){var t=Ext.Array,n=[],p=0,s=o.length,q;for(;p<s;p++){q=o[p];if(q.el?q.el.hasCls(r):t.contains(q.initCls(),r)){n.push(q)}}return n},m=function(r,u,o,t){var w=[],q=0,n=r.length,v,s,p;for(;q<n;q++){v=r[q];s=Ext.Class.getConfigNameMap(u).get;if(v[s]){p=v[s]();if(!t?!!p:(String(p)===t)){w.push(v)}}else{if(v.config&&v.config[u]){if(!t?!!v.config[u]:(String(v.config[u])===t)){w.push(v)}}else{if(!t?!!v[u]:(String(v[u])===t)){w.push(v)}}}}return w},d=function(o,s){var n=[],p=0,r=o.length,q;for(;p<r;p++){q=o[p];if(q.getId()===s||q.getItemId()===s){n.push(q)}}return n},k=function(n,o,p){return g.pseudos[o](n,p)},h=/^(\s?([>\^])\s?|\s|$)/,c=/^(#)?([\w\-]+|\*)(?:\((true|false)\))?/,b=[{re:/^\.([\w\-]+)(?:\((true|false)\))?/,method:l},{re:/^(?:[\[](?:@)?([\w\-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]])/,method:m},{re:/^#([\w\-]+)/,method:d},{re:/^\:([\w\-]+)(?:\(((?:\{[^\}]+\})|(?:(?!\{)[^\s>\/]*?(?!\})))\))?/,method:k},{re:/^(?:\{([^\}]+)\})/,method:j}];g.Query=Ext.extend(Object,{constructor:function(n){n=n||{};Ext.apply(this,n)},execute:function(o){var q=this.operations,r=0,s=q.length,p,n;if(!o){n=Ext.ComponentManager.all.getArray()}else{if(Ext.isArray(o)){n=o}}for(;r<s;r++){p=q[r];if(p.mode==="^"){n=f(n||[o])}else{if(p.mode){n=a(n||[o],p.mode)}else{n=e(n||a([o]),p)}}if(r===s-1){return n}}return[]},is:function(p){var o=this.operations,s=Ext.isArray(p)?p:[p],n=s.length,t=o[o.length-1],r,q;s=e(s,t);if(s.length===n){if(o.length>1){for(q=0,r=s.length;q<r;q++){if(Ext.Array.indexOf(this.execute(),s[q])===-1){return false}}}return true}return false}});Ext.apply(this,{cache:{},pseudos:{not:function(t,n){var u=Ext.ComponentQuery,r=0,s=t.length,q=[],p=-1,o;for(;r<s;++r){o=t[r];if(!u.is(o,n)){q[++p]=o}}return q}},query:function(o,v){var w=o.split(","),n=w.length,p=0,q=[],x=[],u={},s,r,t;for(;p<n;p++){o=Ext.String.trim(w[p]);s=this.parse(o);q=q.concat(s.execute(v))}if(n>1){r=q.length;for(p=0;p<r;p++){t=q[p];if(!u[t.id]){x.push(t);u[t.id]=true}}q=x}return q},is:function(o,n){if(!n){return true}var p=this.cache[n];if(!p){this.cache[n]=p=this.parse(n)}return p.is(o)},parse:function(q){var o=[],p=b.length,u,r,v,w,x,s,t,n;while(q&&u!==q){u=q;r=q.match(c);if(r){v=r[1];if(v==="#"){o.push({method:d,args:[Ext.String.trim(r[2])]})}else{if(v==="."){o.push({method:i,args:[Ext.String.trim(r[2])]})}else{o.push({method:l,args:[Ext.String.trim(r[2]),Boolean(r[3])]})}}q=q.replace(r[0],"")}while(!(w=q.match(h))){for(s=0;q&&s<p;s++){t=b[s];x=q.match(t.re);n=t.method;if(x){o.push({method:Ext.isString(t.method)?Ext.functionFactory("items",Ext.String.format.apply(Ext.String,[n].concat(x.slice(1)))):t.method,args:x.slice(1)});q=q.replace(x[0],"");break}}}if(w[1]){o.push({mode:w[2]||w[1]});q=q.replace(w[0],"")}}return new g.Query({operations:o})}})});Ext.define("Ext.XTemplateParser",{constructor:function(a){Ext.apply(this,a)},doTpl:Ext.emptyFn,parse:function(n){var o=this,l=n.length,c={elseif:"elif"},j=o.topRe,b=o.actionsRe,k,p,r,f,q,g,a,e,d,h,i;o.level=0;o.stack=p=[];for(k=0;k<l;k=h){j.lastIndex=k;f=j.exec(n);if(!f){o.doText(n.substring(k,l));break}d=f.index;h=j.lastIndex;if(k<d){o.doText(n.substring(k,d))}if(f[1]){h=n.indexOf("%}",d+2);o.doEval(n.substring(d+2,h));h+=2}else{if(f[2]){h=n.indexOf("]}",d+2);o.doExpr(n.substring(d+2,h));h+=2}else{if(f[3]){o.doTag(f[3])}else{if(f[4]){i=null;while((e=b.exec(f[4]))!==null){r=e[2]||e[3];if(r){r=Ext.String.htmlDecode(r);q=e[1];q=c[q]||q;i=i||{};g=i[q];if(typeof g=="string"){i[q]=[g,r]}else{if(g){i[q].push(r)}else{i[q]=r}}}}if(!i){if(o.elseRe.test(f[4])){o.doElse()}else{if(o.defaultRe.test(f[4])){o.doDefault()}else{o.doTpl();p.push({type:"tpl"})}}}else{if(i["if"]){o.doIf(i["if"],i);p.push({type:"if"})}else{if(i["switch"]){o.doSwitch(i["switch"],i);p.push({type:"switch"})}else{if(i["case"]){o.doCase(i["case"],i)}else{if(i.elif){o.doElseIf(i.elif,i)}else{if(i["for"]){++o.level;o.doFor(i["for"],i);p.push({type:"for",actions:i})}else{if(i.exec){o.doExec(i.exec,i);p.push({type:"exec",actions:i})}}}}}}}}else{a=p.pop();o.doEnd(a.type,a.actions);if(a.type=="for"){--o.level}}}}}}},topRe:/(?:(\{\%)|(\{\[)|\{([^{}]*)\})|(?:<tpl([^>]*)\>)|(?:<\/tpl>)/g,actionsRe:/\s*(elif|elseif|if|for|exec|switch|case|eval)\s*\=\s*(?:(?:["]([^"]*)["])|(?:[']([^']*)[']))\s*/g,defaultRe:/^\s*default\s*$/,elseRe:/^\s*else\s*$/});Ext.define("Ext.app.Action",{config:{scope:null,application:null,controller:null,action:null,args:[],url:undefined,data:{},title:null,beforeFilters:[],currentFilterIndex:-1},constructor:function(a){this.initConfig(a);this.getUrl()},execute:function(){this.resume()},resume:function(){var b=this.getCurrentFilterIndex()+1,c=this.getBeforeFilters(),a=this.getController(),d=c[b];if(d){this.setCurrentFilterIndex(b);d.call(a,this)}else{a[this.getAction()].apply(a,this.getArgs())}},applyUrl:function(a){if(a===null||a===undefined){a=this.urlEncode()}return a},applyController:function(a){var c=this.getApplication(),b=c.getCurrentProfile();if(Ext.isString(a)){a=c.getController(a,b?b.getNamespace():null)}return a},urlEncode:function(){var a=this.getController(),b;if(a instanceof Ext.app.Controller){b=a.$className.split(".");a=b[b.length-1]}return a+"/"+this.getAction()}});Ext.define("Ext.app.Route",{config:{conditions:{},url:null,controller:null,action:null,initialized:false},constructor:function(a){this.initConfig(a)},recognize:function(b){if(!this.getInitialized()){this.initialize()}if(this.recognizes(b)){var c=this.matchesFor(b),a=b.match(this.matcherRegex);a.shift();return Ext.applyIf(c,{controller:this.getController(),action:this.getAction(),historyUrl:b,args:a})}},initialize:function(){this.paramMatchingRegex=new RegExp(/:([0-9A-Za-z\_]*)/g);this.paramsInMatchString=this.getUrl().match(this.paramMatchingRegex)||[];this.matcherRegex=this.createMatcherRegex(this.getUrl());this.setInitialized(true)},recognizes:function(a){return this.matcherRegex.test(a)},matchesFor:function(b){var f={},e=this.paramsInMatchString,a=b.match(this.matcherRegex),d=e.length,c;a.shift();for(c=0;c<d;c++){f[e[c].replace(":","")]=a[c]}return f},argsFor:function(c){var b=[],f=this.paramsInMatchString,a=c.match(this.matcherRegex),e=f.length,d;a.shift();for(d=0;d<e;d++){b.push(f[d].replace(":",""));params[f[d].replace(":","")]=a[d]}return params},urlFor:function(b){var a=this.getUrl();for(var c in b){a=a.replace(":"+c,b[c])}return a},createMatcherRegex:function(a){var e=this.paramsInMatchString,d=e.length,b,c,f;for(b=0;b<d;b++){c=this.getConditions()[e[b]];f=Ext.util.Format.format("({0})",c||"[%a-zA-Z0-9-\\_\\s,]+");a=a.replace(new RegExp(e[b]),f)}return new RegExp("^"+a+"$")}});Ext.define("Ext.app.Router",{requires:["Ext.app.Route"],config:{routes:[],defaults:{action:"index"}},constructor:function(a){this.initConfig(a)},connect:function(b,c){c=Ext.apply({url:b},c||{},this.getDefaults());var a=Ext.create("Ext.app.Route",c);this.getRoutes().push(a);return a},recognize:function(c){var b=this.getRoutes(),e=b.length,d,a;for(d=0;d<e;d++){a=b[d].recognize(c);if(a!==undefined){return a}}return undefined},draw:function(a){a.call(this,this)},clear:function(){this.setRoutes([])}},function(){});Ext.define("Ext.behavior.Behavior",{constructor:function(a){this.component=a;a.on("destroy","onComponentDestroy",this)},onComponentDestroy:Ext.emptyFn});Ext.define("Ext.data.JsonP",{alternateClassName:"Ext.util.JSONP",singleton:true,statics:{requestCount:0,requests:{}},timeout:30000,disableCaching:true,disableCachingParam:"_dc",callbackKey:"callback",request:function(m){m=Ext.apply({},m);var i=this,d=Ext.isDefined(m.disableCaching)?m.disableCaching:i.disableCaching,g=m.disableCachingParam||i.disableCachingParam,c=++i.statics().requestCount,k=m.callbackName||"callback"+c,h=m.callbackKey||i.callbackKey,l=Ext.isDefined(m.timeout)?m.timeout:i.timeout,e=Ext.apply({},m.params),b=m.url,a=Ext.isSandboxed?Ext.getUniqueGlobalNamespace():"Ext",f,j;e[h]=a+".data.JsonP."+k;if(d){e[g]=new Date().getTime()}j=i.createScript(b,e,m);i.statics().requests[c]=f={url:b,params:e,script:j,id:c,scope:m.scope,success:m.success,failure:m.failure,callback:m.callback,callbackKey:h,callbackName:k};if(l>0){f.timeout=setTimeout(Ext.bind(i.handleTimeout,i,[f]),l)}i.setupErrorHandling(f);i[k]=Ext.bind(i.handleResponse,i,[f],true);i.loadScript(f);return f},abort:function(b){var c=this.statics().requests,a;if(b){if(!b.id){b=c[b]}this.abort(b)}else{for(a in c){if(c.hasOwnProperty(a)){this.abort(c[a])}}}},setupErrorHandling:function(a){a.script.onerror=Ext.bind(this.handleError,this,[a])},handleAbort:function(a){a.errorType="abort";this.handleResponse(null,a)},handleError:function(a){a.errorType="error";this.handleResponse(null,a)},cleanupErrorHandling:function(a){a.script.onerror=null},handleTimeout:function(a){a.errorType="timeout";this.handleResponse(null,a)},handleResponse:function(a,b){var c=true;if(b.timeout){clearTimeout(b.timeout)}delete this[b.callbackName];delete this.statics()[b.id];this.cleanupErrorHandling(b);Ext.fly(b.script).destroy();if(b.errorType){c=false;Ext.callback(b.failure,b.scope,[b.errorType])}else{Ext.callback(b.success,b.scope,[a])}Ext.callback(b.callback,b.scope,[c,a,b.errorType])},createScript:function(c,d,b){var a=document.createElement("script");a.setAttribute("src",Ext.urlAppend(c,Ext.Object.toQueryString(d)));a.setAttribute("async",true);a.setAttribute("type","text/javascript");return a},loadScript:function(a){Ext.getHead().appendChild(a.script)}});Ext.define("Ext.data.Operation",{config:{synchronous:true,action:null,filters:null,sorters:null,grouper:null,start:null,limit:null,batch:null,callback:null,scope:null,resultSet:null,records:null,request:null,response:null,withCredentials:null,params:null,url:null,page:null,node:null,model:undefined,addRecords:false},started:false,running:false,complete:false,success:undefined,exception:false,error:undefined,constructor:function(a){this.initConfig(a)},applyModel:function(a){if(typeof a=="string"){a=Ext.data.ModelManager.getModel(a);if(!a){Ext.Logger.error("Model with name "+arguments[0]+" doesnt exist.")}}if(a&&!a.prototype.isModel&&Ext.isObject(a)){a=Ext.data.ModelManager.registerType(a.storeId||a.id||Ext.id(),a)}return a},getRecords:function(){var a=this.getResultSet();return this._records||(a?a.getRecords():[])},setStarted:function(){this.started=true;this.running=true},setCompleted:function(){this.complete=true;this.running=false},setSuccessful:function(){this.success=true},setException:function(a){this.exception=true;this.success=false;this.running=false;this.error=a},hasException:function(){return this.exception===true},getError:function(){return this.error},isStarted:function(){return this.started===true},isRunning:function(){return this.running===true},isComplete:function(){return this.complete===true},wasSuccessful:function(){return this.isComplete()&&this.success===true},allowWrite:function(){return this.getAction()!="read"},process:function(d,b,c,a){if(b.getSuccess()!==false){this.setResponse(a);this.setResultSet(b);this.setCompleted();this.setSuccessful()}else{return false}return this["process"+Ext.String.capitalize(d)].call(this,b,c,a)},processRead:function(d){var b=d.getRecords(),g=[],f=this.getModel(),e=b.length,c,a;for(c=0;c<e;c++){a=b[c];g.push(new f(a.data,a.id,a.node))}this.setRecords(g);return true},processCreate:function(d){var b=d.getRecords(),e=b.length,c,a,f;for(c=0;c<e;c++){f=b[c];a=this.findCurrentRecord(f.clientId);if(a){this.updateRecord(a,f)}}return true},processUpdate:function(e){var c=e.getRecords(),b=this.getRecords(),f=c.length,d,a,g;for(d=0;d<f;d++){g=c[d];a=b[d];if(a){this.updateRecord(a,g)}}return true},processDestroy:function(d){var b=d.getRecords(),e=b.length,c,a,f;for(c=0;c<e;c++){f=b[c];a=this.findCurrentRecord(f.id);if(a){a.setIsErased(true);a.notifyStores("afterErase",a)}}},findCurrentRecord:function(a){var c=this.getRecords(),e=c.length,d,b;for(d=0;d<e;d++){b=c[d];if(b.getId()===a){return b}}},updateRecord:function(b,d){var a=d.data,c=d.id;b.beginEdit();b.set(a);if(c!==null){b.setId(c)}b.endEdit(true);b.commit()}});Ext.define("Ext.data.Request",{config:{action:null,params:null,method:"GET",url:null,operation:null,proxy:null,disableCaching:false,headers:{},callbackKey:null,jsonP:null,jsonData:null,xmlData:null,withCredentials:null,callback:null,scope:null,timeout:30000,records:null,directFn:null,args:null},constructor:function(a){this.initConfig(a)}});Ext.define("Ext.data.ResultSet",{config:{loaded:true,count:null,total:null,success:false,records:null},constructor:function(a){this.initConfig(a)},applyCount:function(a){if(!a&&a!==0){return this.getRecords().length}return a},updateRecords:function(a){this.setCount(a.length)}});Ext.define("Ext.data.SortTypes",{singleton:true,stripTagsRE:/<\/?[^>]+>/gi,none:function(a){return a},asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){a=parseFloat(String(a).replace(/,/g,""));return isNaN(a)?0:a},asInt:function(a){a=parseInt(String(a).replace(/,/g,""),10);return isNaN(a)?0:a}});Ext.define("Ext.data.Types",{singleton:true,requires:["Ext.data.SortTypes"],stripRe:/[\$,%]/g,dashesRe:/-/g,iso8601TestRe:/\d\dT\d\d/,iso8601SplitRe:/[- :T\.Z\+]/},function(){var b=this,a=Ext.data.SortTypes;Ext.apply(b,{AUTO:{convert:function(c){return c},sortType:a.none,type:"auto"},STRING:{convert:function(c){return(c===undefined||c===null)?(this.getAllowNull()?null:""):String(c)},sortType:a.asUCString,type:"string"},INT:{convert:function(c){return(c!==undefined&&c!==null&&c!=="")?((typeof c==="number")?parseInt(c,10):parseInt(String(c).replace(b.stripRe,""),10)):(this.getAllowNull()?null:0)},sortType:a.none,type:"int"},FLOAT:{convert:function(c){return(c!==undefined&&c!==null&&c!=="")?((typeof c==="number")?c:parseFloat(String(c).replace(b.stripRe,""),10)):(this.getAllowNull()?null:0)},sortType:a.none,type:"float"},BOOL:{convert:function(c){if((c===undefined||c===null||c==="")&&this.getAllowNull()){return null}return c===true||c==="true"||c==1},sortType:a.none,type:"bool"},DATE:{convert:function(e){var c=this.getDateFormat(),d;if(!e){return null}if(Ext.isDate(e)){return e}if(c){if(c=="timestamp"){return new Date(e*1000)}if(c=="time"){return new Date(parseInt(e,10))}return Ext.Date.parse(e,c)}d=new Date(Date.parse(e));if(isNaN(d)){if(b.iso8601TestRe.test(e)){d=e.split(b.iso8601SplitRe);d=new Date(d[0],d[1]-1,d[2],d[3],d[4],d[5])}if(isNaN(d)){d=new Date(Date.parse(e.replace(this.dashesRe,"/")))}}return isNaN(d)?null:d},sortType:a.asDate,type:"date"}});Ext.apply(b,{BOOLEAN:this.BOOL,INTEGER:this.INT,NUMBER:this.FLOAT})});Ext.define("Ext.data.Validations",{alternateClassName:"Ext.data.validations",singleton:true,config:{presenceMessage:"must be present",lengthMessage:"is the wrong length",formatMessage:"is the wrong format",inclusionMessage:"is not included in the list of acceptable values",exclusionMessage:"is not an acceptable value",emailMessage:"is not a valid email address"},constructor:function(a){this.initConfig(a)},getMessage:function(a){var b=this["get"+a[0].toUpperCase()+a.slice(1)+"Message"];if(b){return b.call(this)}return""},emailRe:/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,presence:function(a,b){if(b===undefined){b=a}return !!b||b===0},length:function(b,e){if(e===undefined||e===null){return false}var d=e.length,c=b.min,a=b.max;if((c&&d<c)||(a&&d>a)){return false}else{return true}},email:function(b,a){return Ext.data.validations.emailRe.test(a)},format:function(a,b){return !!(a.matcher&&a.matcher.test(b))},inclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)!=-1},exclusion:function(a,b){return a.list&&Ext.Array.indexOf(a.list,b)==-1}});Ext.define("Ext.data.identifier.Simple",{alias:"data.identifier.simple",statics:{AUTO_ID:1},config:{prefix:"ext-record-"},constructor:function(a){this.initConfig(a)},generate:function(a){return this._prefix+this.self.AUTO_ID++}});Ext.define("Ext.data.identifier.Uuid",{extend:"Ext.data.identifier.Simple",alias:"data.identifier.uuid",config:{id:undefined,salt:null,timestamp:null,version:4},applyId:function(a){if(a===undefined){return Ext.data.identifier.Uuid.Global}return a},constructor:function(){var a=this;a.callParent(arguments);a.parts=[];a.init()},reconfigure:function(a){this.setConfig(a);this.init()},generate:function(){var c=this,e=c.parts,a=c.getVersion(),b=c.getSalt(),d=c.getTimestamp();e[0]=c.toHex(d.lo,8);e[1]=c.toHex(d.hi&65535,4);e[2]=c.toHex(((d.hi>>>16)&4095)|(a<<12),4);e[3]=c.toHex(128|((c.clockSeq>>>8)&63),2)+c.toHex(c.clockSeq&255,2);e[4]=c.toHex(b.hi,4)+c.toHex(b.lo,8);if(a==4){c.init()}else{++d.lo;if(d.lo>=c.twoPow32){d.lo=0;++d.hi}}return e.join("-").toLowerCase()},init:function(){var b=this,a=b.getSalt(),c=b.getTimestamp();if(b.getVersion()==4){b.clockSeq=b.rand(0,b.twoPow14-1);if(!a){a={};b.setSalt(a)}if(!c){c={};b.setTimestamp(c)}a.lo=b.rand(0,b.twoPow32-1);a.hi=b.rand(0,b.twoPow16-1);c.lo=b.rand(0,b.twoPow32-1);c.hi=b.rand(0,b.twoPow28-1)}else{b.setSalt(b.split(b.getSalt()));b.setTimestamp(b.split(b.getTimestamp()));b.getSalt().hi|=256}},twoPow14:Math.pow(2,14),twoPow16:Math.pow(2,16),twoPow28:Math.pow(2,28),twoPow32:Math.pow(2,32),toHex:function(c,b){var a=c.toString(16);if(a.length>b){a=a.substring(a.length-b)}else{if(a.length<b){a=Ext.String.leftPad(a,b,"0")}}return a},rand:function(c,b){var a=Math.random()*(b-c+1);return Math.floor(a)+c},split:function(b){if(typeof(b)=="number"){var a=Math.floor(b/this.twoPow32);return{lo:Math.floor(b-a*this.twoPow32),hi:a}}return b}},function(){this.Global=new this({id:"uuid"})});Ext.define("Ext.data.writer.Writer",{alias:"writer.base",alternateClassName:["Ext.data.DataWriter","Ext.data.Writer"],config:{writeAllFields:true,nameProperty:"name"},constructor:function(a){this.initConfig(a)},write:function(e){var c=e.getOperation(),b=c.getRecords()||[],a=b.length,d=0,f=[];for(;d<a;d++){f.push(this.getRecordData(b[d]))}return this.writeRecords(e,f)},writeDate:function(c,b){var a=c.dateFormat||"timestamp";switch(a){case"timestamp":return b.getTime()/1000;case"time":return b.getTime();default:return Ext.Date.format(b,a)}},getRecordData:function(f){var k=f.phantom===true,c=this.getWriteAllFields()||k,d=this.getNameProperty(),g=f.getFields(),e={},i,a,h,l,j,b;if(c){g.each(function(m){b=m.config;if(b.persist){a=b[d]||b.name;j=f.get(b.name);if(b.type.type=="date"){j=this.writeDate(b,j)}e[a]=j}},this)}else{i=f.getChanges();for(l in i){if(i.hasOwnProperty(l)){h=g.get(l);b=h.config;if(b.persist){a=b[d]||h.name;j=i[l];if(b.type.type=="date"){j=this.writeDate(b,j)}e[a]=j}}}if(!k){e[f.idProperty]=f.getId()}}return e}});Ext.define("Ext.data.writer.Xml",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.XmlWriter",alias:"writer.xml",config:{documentRoot:"xmlData",defaultDocumentRoot:"xmlData",header:"",record:"record"},writeRecords:function(a,b){var g=this,d=[],c=0,f=b.length,h=g.getDocumentRoot(),e=g.getRecord(),l=b.length!==1,k,j;d.push(g.getHeader()||"");if(!h&&l){h=g.getDefaultDocumentRoot()}if(h){d.push("<",h,">")}for(;c<f;++c){k=b[c];d.push("<",e,">");for(j in k){if(k.hasOwnProperty(j)){d.push("<",j,">",k[j],"</",j,">")}}d.push("</",e,">")}if(h){d.push("</",h,">")}a.setXmlData(d.join(""));return a}});Ext.define("Ext.direct.RemotingMethod",{config:{name:null,params:null,formHandler:null,len:null,ordered:true},constructor:function(a){this.initConfig(a)},applyParams:function(f){if(Ext.isNumber(f)){this.setLen(f)}else{if(Ext.isArray(f)){this.setOrdered(false);var d=f.length,b=[],c,e,a;for(c=0;c<d;c++){e=f[c];a=Ext.isObject(e)?e.name:e;b.push(a)}return b}}},getArgs:function(e,a,f){var b=[],c,d;if(this.getOrdered()){if(this.getLen()>0){if(a){for(c=0,d=a.length;c<d;c++){b.push(e[a[c]])}}else{if(f){b.push(e)}}}}else{b.push(e)}return b},getCallData:function(c){var e=this,f=null,a=e.getLen(),g=e.getParams(),h,d,b;if(e.getOrdered()){h=c[a];d=c[a+1];if(a!==0){f=c.slice(0,a)}}else{f=Ext.apply({},c[0]);h=c[1];d=c[2];for(b in f){if(f.hasOwnProperty(b)){if(!Ext.Array.contains(g,b)){delete f[b]}}}}return{data:f,callback:h,scope:d}}});Ext.define("Ext.direct.Transaction",{alias:"direct.transaction",alternateClassName:"Ext.Direct.Transaction",statics:{TRANSACTION_ID:0},config:{id:undefined,provider:null,retryCount:0,args:null,action:null,method:null,data:null,callback:null,form:null},constructor:function(a){this.initConfig(a)},applyId:function(a){if(a===undefined){a=++this.self.TRANSACTION_ID}return a},updateId:function(a){this.id=this.tid=a},getTid:function(){return this.tid},send:function(){this.getProvider().queueTransaction(this)},retry:function(){this.setRetryCount(this.getRetryCount()+1);this.send()}});Ext.define("Ext.dom.CompositeElement",{alternateClassName:"Ext.CompositeElement",extend:"Ext.dom.CompositeElementLite",getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}},function(){Ext.dom.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.dom.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)}});Ext.define("Ext.event.Controller",{isFiring:false,listenerStack:null,constructor:function(a){this.firingListeners=[];this.firingArguments=[];this.setInfo(a);return this},setInfo:function(a){this.info=a},getInfo:function(){return this.info},setListenerStacks:function(a){this.listenerStacks=a},fire:function(h,e){var n=this.listenerStacks,m=this.firingListeners,d=this.firingArguments,k=m.push,g=n.length,j,l,c,o,a=false,b=false,f;m.length=0;if(e){if(e.order!=="after"){a=true}else{b=true}}if(g===1){j=n[0].listeners;l=j.before;c=j.current;o=j.after;if(l.length>0){k.apply(m,l)}if(a){k.call(m,e)}if(c.length>0){k.apply(m,c)}if(b){k.call(m,e)}if(o.length>0){k.apply(m,o)}}else{for(f=0;f<g;f++){l=n[f].listeners.before;if(l.length>0){k.apply(m,l)}}if(a){k.call(m,e)}for(f=0;f<g;f++){c=n[f].listeners.current;if(c.length>0){k.apply(m,c)}}if(b){k.call(m,e)}for(f=0;f<g;f++){o=n[f].listeners.after;if(o.length>0){k.apply(m,o)}}}if(m.length===0){return this}if(!h){h=[]}d.length=0;d.push.apply(d,h);d.push(null,this);this.doFire();return this},doFire:function(){var k=this.firingListeners,c=this.firingArguments,g=c.length-2,d,f,b,o,h,n,a,j,l,e,m;this.isPausing=false;this.isPaused=false;this.isStopped=false;this.isFiring=true;for(d=0,f=k.length;d<f;d++){b=k[d];o=b.options;h=b.fn;n=b.firingFn;a=b.boundFn;j=b.isLateBinding;l=b.scope;if(j&&a&&a!==l[h]){a=false;n=false}if(!a){if(j){a=l[h];if(!a){continue}}else{a=h}b.boundFn=a}if(!n){n=a;if(o.buffer){n=Ext.Function.createBuffered(n,o.buffer,l)}if(o.delay){n=Ext.Function.createDelayed(n,o.delay,l)}b.firingFn=n}c[g]=o;e=c;if(o.args){e=o.args.concat(e)}if(o.single===true){b.stack.remove(h,l,b.order)}m=n.apply(l,e);if(m===false){this.stop()}if(this.isStopped){break}if(this.isPausing){this.isPaused=true;k.splice(0,d+1);return}}this.isFiring=false;this.listenerStacks=null;k.length=0;c.length=0;this.connectingController=null},connect:function(a){this.connectingController=a},resume:function(){var a=this.connectingController;this.isPausing=false;if(this.isPaused&&this.firingListeners.length>0){this.isPaused=false;this.doFire()}if(a){a.resume()}return this},isInterrupted:function(){return this.isStopped||this.isPaused},stop:function(){var a=this.connectingController;this.isStopped=true;if(a){this.connectingController=null;a.stop()}this.isFiring=false;this.listenerStacks=null;return this},pause:function(){var a=this.connectingController;this.isPausing=true;if(a){a.pause()}return this}});Ext.define("Ext.event.Event",{alternateClassName:"Ext.EventObject",isStopped:false,set:function(a,b){if(arguments.length===1&&typeof a!="string"){var c=a;for(a in c){if(c.hasOwnProperty(a)){this[a]=c[a]}}}else{this[a]=c[a]}},stopEvent:function(){return this.stopPropagation()},stopPropagation:function(){this.isStopped=true;return this}});Ext.define("Ext.event.ListenerStack",{currentOrder:"current",length:0,constructor:function(){this.listeners={before:[],current:[],after:[]};this.lateBindingMap={};return this},add:function(h,j,k,e){var a=this.lateBindingMap,g=this.getAll(e),f=g.length,b,d,c;if(typeof h=="string"&&j.isIdentifiable){c=j.getId();b=a[c];if(b){if(b[h]){return false}else{b[h]=true}}else{a[c]=b={};b[h]=true}}else{if(f>0){while(f--){d=g[f];if(d.fn===h&&d.scope===j){d.options=k;return false}}}}d=this.create(h,j,k,e);if(k&&k.prepend){delete k.prepend;g.unshift(d)}else{g.push(d)}this.length++;return true},getAt:function(b,a){return this.getAll(a)[b]},getAll:function(a){if(!a){a=this.currentOrder}return this.listeners[a]},count:function(a){return this.getAll(a).length},create:function(d,c,b,a){return{stack:this,fn:d,firingFn:false,boundFn:false,isLateBinding:typeof d=="string",scope:c,options:b||{},order:a}},remove:function(h,j,e){var g=this.getAll(e),f=g.length,b=false,a=this.lateBindingMap,d,c;if(f>0){while(f--){d=g[f];if(d.fn===h&&d.scope===j){g.splice(f,1);b=true;this.length--;if(typeof h=="string"&&j.isIdentifiable){c=j.getId();if(a[c]&&a[c][h]){delete a[c][h]}}break}}}return b}});Ext.define("Ext.event.publisher.Publisher",{targetType:"",idSelectorRegex:/^#([\w\-]+)$/i,constructor:function(){var b=this.handledEvents,a,c,e,d;a=this.handledEventsMap={};for(c=0,e=b.length;c<e;c++){d=b[c];a[d]=true}this.subscribers={};return this},handles:function(a){var b=this.handledEventsMap;return !!b[a]||!!b["*"]||a==="*"},getHandledEvents:function(){return this.handledEvents},setDispatcher:function(a){this.dispatcher=a},subscribe:function(){return false},unsubscribe:function(){return false},unsubscribeAll:function(){delete this.subscribers;this.subscribers={};return this},notify:function(){return false},getTargetType:function(){return this.targetType},dispatch:function(c,a,b){this.dispatcher.doDispatchEvent(this.targetType,c,a,b)}});Ext.define("Ext.event.recognizer.Recognizer",{mixins:["Ext.mixin.Identifiable"],handledEvents:[],config:{onRecognized:Ext.emptyFn,onFailed:Ext.emptyFn,callbackScope:null},constructor:function(a){this.initConfig(a);return this},getHandledEvents:function(){return this.handledEvents},onStart:Ext.emptyFn,onEnd:Ext.emptyFn,fail:function(){this.getOnFailed().apply(this.getCallbackScope(),arguments);return false},fire:function(){this.getOnRecognized().apply(this.getCallbackScope(),arguments)}});Ext.define("Ext.event.recognizer.Touch",{extend:"Ext.event.recognizer.Recognizer",onTouchStart:Ext.emptyFn,onTouchMove:Ext.emptyFn,onTouchEnd:Ext.emptyFn});Ext.define("Ext.fx.State",{isAnimatable:{"background-color":true,"background-image":true,"background-position":true,"border-bottom-color":true,"border-bottom-width":true,"border-color":true,"border-left-color":true,"border-left-width":true,"border-right-color":true,"border-right-width":true,"border-spacing":true,"border-top-color":true,"border-top-width":true,"border-width":true,bottom:true,color:true,crop:true,"font-size":true,"font-weight":true,height:true,left:true,"letter-spacing":true,"line-height":true,"margin-bottom":true,"margin-left":true,"margin-right":true,"margin-top":true,"max-height":true,"max-width":true,"min-height":true,"min-width":true,opacity:true,"outline-color":true,"outline-offset":true,"outline-width":true,"padding-bottom":true,"padding-left":true,"padding-right":true,"padding-top":true,right:true,"text-indent":true,"text-shadow":true,top:true,"vertical-align":true,visibility:true,width:true,"word-spacing":true,"z-index":true,zoom:true,transform:true},constructor:function(a){this.data={};this.set(a)},setConfig:function(a){this.set(a);return this},setRaw:function(a){this.data=a;return this},clear:function(){return this.setRaw({})},setTransform:function(c,g){var f=this.data,a=Ext.isArray(g),b=f.transform,e,d;if(!b){b=f.transform={translateX:0,translateY:0,translateZ:0,scaleX:1,scaleY:1,scaleZ:1,rotate:0,rotateX:0,rotateY:0,rotateZ:0,skewX:0,skewY:0}}if(typeof c=="string"){switch(c){case"translate":if(a){e=g.length;if(e==0){break}b.translateX=g[0];if(e==1){break}b.translateY=g[1];if(e==2){break}b.translateZ=g[2]}else{b.translateX=g}break;case"rotate":if(a){e=g.length;if(e==0){break}b.rotateX=g[0];if(e==1){break}b.rotateY=g[1];if(e==2){break}b.rotateZ=g[2]}else{b.rotate=g}break;case"scale":if(a){e=g.length;if(e==0){break}b.scaleX=g[0];if(e==1){break}b.scaleY=g[1];if(e==2){break}b.scaleZ=g[2]}else{b.scaleX=g;b.scaleY=g}break;case"skew":if(a){e=g.length;if(e==0){break}b.skewX=g[0];if(e==1){break}b.skewY=g[1]}else{b.skewX=g}break;default:b[c]=g}}else{for(d in c){if(c.hasOwnProperty(d)){g=c[d];this.setTransform(d,g)}}}},set:function(a,d){var c=this.data,b;if(typeof a!="string"){for(b in a){d=a[b];if(b==="transform"){this.setTransform(d)}else{c[b]=d}}}else{if(a==="transform"){this.setTransform(d)}else{c[a]=d}}return this},unset:function(a){var b=this.data;if(b.hasOwnProperty(a)){delete b[a]}return this},getData:function(){return this.data}});Ext.define("Ext.fx.easing.Abstract",{config:{startTime:0,startValue:0},isEasing:true,isEnded:false,constructor:function(a){this.initConfig(a);return this},applyStartTime:function(a){if(!a){a=Ext.Date.now()}return a},updateStartTime:function(a){this.reset()},reset:function(){this.isEnded=false},getValue:Ext.emptyFn});Ext.define("Ext.fx.easing.Bounce",{extend:"Ext.fx.easing.Abstract",config:{springTension:0.3,acceleration:30,startVelocity:0},getValue:function(){var b=Ext.Date.now()-this.getStartTime(),c=(b/this.getAcceleration()),a=c*Math.pow(Math.E,-this.getSpringTension()*c);return this.getStartValue()+(this.getStartVelocity()*a)}});Ext.define("Ext.fx.easing.Linear",{extend:"Ext.fx.easing.Abstract",alias:"easing.linear",config:{duration:0,endValue:0},updateStartValue:function(a){this.distance=this.getEndValue()-a},updateEndValue:function(a){this.distance=a-this.getStartValue()},getValue:function(){var a=Ext.Date.now()-this.getStartTime(),b=this.getDuration();if(a>b){this.isEnded=true;return this.getEndValue()}else{return this.getStartValue()+((a/b)*this.distance)}}});Ext.define("Ext.fx.easing.Momentum",{extend:"Ext.fx.easing.Abstract",config:{acceleration:30,friction:0,startVelocity:0},alpha:0,updateFriction:function(b){var a=Math.log(1-(b/10));this.theta=a;this.alpha=a/this.getAcceleration()},updateStartVelocity:function(a){this.velocity=a*this.getAcceleration()},updateAcceleration:function(a){this.velocity=this.getStartVelocity()*a;this.alpha=this.theta/a},getValue:function(){return this.getStartValue()-this.velocity*(1-this.getFrictionFactor())/this.theta},getFrictionFactor:function(){var a=Ext.Date.now()-this.getStartTime();return Math.exp(a*this.alpha)},getVelocity:function(){return this.getFrictionFactor()*this.velocity}});Ext.define("Ext.mixin.Mixin",{onClassExtended:function(b,e){var a=e.mixinConfig,d,f,c;if(a){d=b.superclass.mixinConfig;if(d){a=e.mixinConfig=Ext.merge({},d,a)}e.mixinId=a.id;f=a.beforeHooks;c=a.hooks||a.afterHooks;if(f||c){Ext.Function.interceptBefore(e,"onClassMixedIn",function(h){var g=this.prototype;if(f){Ext.Object.each(f,function(j,i){h.override(i,function(){if(g[j].apply(this,arguments)!==false){return this.callOverridden(arguments)}})})}if(c){Ext.Object.each(c,function(j,i){h.override(i,function(){var k=this.callOverridden(arguments);g[j].apply(this,arguments);return k})})}})}}}});Ext.define("Ext.mixin.Selectable",{extend:"Ext.mixin.Mixin",mixinConfig:{id:"selectable",hooks:{updateStore:"updateStore"}},config:{disableSelection:null,mode:"SINGLE",allowDeselect:false,lastSelected:null,lastFocused:null,deselectOnContainerClick:true},modes:{SINGLE:true,SIMPLE:true,MULTI:true},selectableEventHooks:{addrecords:"onSelectionStoreAdd",removerecords:"onSelectionStoreRemove",updaterecord:"onSelectionStoreUpdate",load:"refreshSelection",refresh:"refreshSelection"},constructor:function(){this.selected=new Ext.util.MixedCollection();this.callParent(arguments)},applyMode:function(a){a=a?a.toUpperCase():"SINGLE";return this.modes[a]?a:"SINGLE"},updateStore:function(a,c){var b=this,d=Ext.apply({},b.selectableEventHooks,{scope:b});if(c&&Ext.isObject(c)&&c.isStore){if(c.autoDestroy){c.destroy()}else{c.un(d)}}if(a){a.on(d);b.refreshSelection()}},selectAll:function(a){var e=this,c=e.getStore().getRange(),d=c.length,b=0;for(;b<d;b++){e.select(c[b],true,a)}},deselectAll:function(e){var d=this,b=d.getStore().getRange(),c=b.length,a=0;for(;a<c;a++){d.deselect(b,e)}d.selected.clear();d.setLastSelected(null);d.setLastFocused(null)},selectWithEvent:function(a){var c=this,b=c.isSelected(a);switch(c.getMode()){case"MULTI":case"SIMPLE":if(b){c.deselect(a)}else{c.select(a,true)}break;case"SINGLE":if(c.getAllowDeselect()&&b){c.deselect(a)}else{c.select(a,false)}break}},selectRange:function(h,j,m,b){var g=this,k=g.getStore(),l=k.indexOf(h),d=k.indexOf(j),c=0,f,a,e;if(g.getDisableSelection()){return}if(l>d){f=d;d=l;l=f}for(e=l;e<=d;e++){if(g.isSelected(k.getAt(e))){c++}}if(!b){a=-1}else{a=(b=="up")?l:d}for(e=l;e<=d;e++){if(c==(d-l+1)){if(e!=a){g.deselect(e,true)}}else{g.select(e,true)}}},select:function(c,e,b){var d=this,a;if(d.getDisableSelection()){return}if(typeof c==="number"){c=[d.getStore().getAt(c)]}if(!c){return}if(d.getMode()=="SINGLE"&&c){a=c.length?c[0]:c;d.doSingleSelect(a,b)}else{d.doMultiSelect(c,e,b)}},doSingleSelect:function(a,b){var d=this,c=d.selected;if(d.getDisableSelection()){return}if(d.isSelected(a)){return}if(c.getCount()>0){d.deselect(d.getLastSelected(),b)}c.add(a);d.setLastSelected(a);d.onItemSelect(a,b);d.setLastFocused(a);d.fireSelectionChange(!b)},doMultiSelect:function(a,j,h){if(a===null||this.getDisableSelection()){return}a=!Ext.isArray(a)?[a]:a;var f=this,b=f.selected,e=a.length,g=false,c=0,d;if(!j&&b.getCount()>0){g=true;f.deselect(f.getSelection(),true)}for(;c<e;c++){d=a[c];if(j&&f.isSelected(d)){continue}g=true;f.setLastSelected(d);b.add(d);if(!h){f.setLastFocused(d)}f.onItemSelect(d,h)}this.fireSelectionChange(g&&!h)},deselect:function(a,j){var f=this;if(f.getDisableSelection()){return}a=Ext.isArray(a)?a:[a];var b=f.selected,g=false,c=0,h=f.getStore(),e=a.length,d;for(;c<e;c++){d=a[c];if(typeof d==="number"){d=h.getAt(d)}if(b.remove(d)){if(f.getLastSelected()==d){f.setLastSelected(b.last())}g=true}if(d){f.onItemDeselect(d,j)}}f.fireSelectionChange(g&&!j)},updateLastFocused:function(b,a){this.onLastFocusChanged(a,b)},fireSelectionChange:function(a){var b=this;if(a){b.fireEvent("selectionchange",b,b.getSelection())}},getSelection:function(){return this.selected.getRange()},isSelected:function(a){a=Ext.isNumber(a)?this.getStore().getAt(a):a;return this.selected.indexOf(a)!==-1},hasSelection:function(){return this.selected.getCount()>0},refreshSelection:function(){var b=this,a=b.getSelection();b.deselectAll(true);if(a.length){b.select(a,false,true)}},onSelectionStoreClear:function(){var b=this,a=b.selected;if(a.getCount()>0){a.clear();b.setLastSelected(null);b.setLastFocused(null);b.fireSelectionChange(true)}},onSelectionStoreRemove:function(b,a){var d=this,c=d.selected;if(d.getDisableSelection()){return}if(c.remove(a)){if(d.getLastSelected()==a){d.setLastSelected(null)}if(d.getLastFocused()==a){d.setLastFocused(null)}d.fireSelectionChange(true)}},getSelectionCount:function(){return this.selected.getCount()},onSelectionStoreAdd:Ext.emptyFn,onSelectionStoreUpdate:Ext.emptyFn,onItemSelect:Ext.emptyFn,onItemDeselect:Ext.emptyFn,onLastFocusChanged:Ext.emptyFn,onEditorKey:Ext.emptyFn},function(){});Ext.define("Ext.mixin.Traversable",{extend:"Ext.mixin.Mixin",mixinConfig:{id:"traversable"},setParent:function(a){this.parent=a;return this},hasParent:function(){return Boolean(this.parent)},getParent:function(){return this.parent},getAncestors:function(){var b=[],a=this.getParent();while(a){b.push(a);a=a.getParent()}return b},getAncestorIds:function(){var b=[],a=this.getParent();while(a){b.push(a.getId());a=a.getParent()}return b}});Ext.define("Ext.util.DelayedTask",{config:{interval:null,delay:null,fn:null,scope:null,args:null},constructor:function(d,c,b){var a={fn:d,scope:c,args:b};this.initConfig(a)},delay:function(b,f,e,a){var d=this;d.cancel();d.setConfig({delay:b,fn:f,scope:e,args:a});var c=function(){d.getFn().apply(d.getScope(),d.getArgs()||[]);d.cancel()};d.setInterval(setInterval(c,d.getDelay()))},cancel:function(){this.setInterval(null)},updateInterval:function(a,b){if(b){clearInterval(b)}},applyArgs:function(a){if(!Ext.isArray(a)){a=[a]}return a}});Ext.define("Ext.util.Filter",{isFilter:true,config:{property:null,value:null,filterFn:Ext.emptyFn,anyMatch:false,exactMatch:false,caseSensitive:false,root:null,id:undefined,scope:null},applyId:function(a){if(!a){if(this.getProperty()){a=this.getProperty()+"-"+String(this.getValue())}if(!a){a=Ext.id(null,"ext-filter-")}}return a},constructor:function(a){this.initConfig(a)},applyFilterFn:function(b){if(b===Ext.emptyFn){b=this.getInitialConfig("filter");if(b){return b}var a=this.getValue();if(!this.getProperty()&&!a&&a!==0){return Ext.emptyFn}else{return this.createFilterFn()}}return b},createFilterFn:function(){var a=this,b=a.createValueMatcher();return function(d){var c=a.getRoot(),e=a.getProperty();if(c){d=d[c]}return b.test(d[e])}},createValueMatcher:function(){var d=this,e=d.getValue(),f=d.getAnyMatch(),c=d.getExactMatch(),a=d.getCaseSensitive(),b=Ext.String.escapeRegex;if(e===null||e===undefined||!e.exec){e=String(e);if(f===true){e=b(e)}else{e="^"+b(e);if(c===true){e+="$"}}e=new RegExp(e,a?"":"i")}return e}});Ext.define("Ext.util.Point",{radianToDegreeConstant:180/Math.PI,statics:{fromEvent:function(b){var a=b.changedTouches,c=(a&&a.length>0)?a[0]:b;return this.fromTouch(c)},fromTouch:function(a){return new this(a.pageX,a.pageY)},from:function(a){if(!a){return new this(0,0)}if(!(a instanceof this)){return new this(a.x,a.y)}return a}},constructor:function(a,b){if(typeof a=="undefined"){a=0}if(typeof b=="undefined"){b=0}this.x=a;this.y=b;return this},clone:function(){return new this.self(this.x,this.y)},copy:function(){return this.clone.apply(this,arguments)},copyFrom:function(a){this.x=a.x;this.y=a.y;return this},toString:function(){return"Point["+this.x+","+this.y+"]"},equals:function(a){return(this.x===a.x&&this.y===a.y)},isCloseTo:function(c,b){if(typeof b=="number"){b={x:b};b.y=b.x}var a=c.x,f=c.y,e=b.x,d=b.y;return(this.x<=a+e&&this.x>=a-e&&this.y<=f+d&&this.y>=f-d)},isWithin:function(){return this.isCloseTo.apply(this,arguments)},translate:function(a,b){this.x+=a;this.y+=b;return this},roundedEquals:function(a){return(Math.round(this.x)===Math.round(a.x)&&Math.round(this.y)===Math.round(a.y))},getDistanceTo:function(b){var c=this.x-b.x,a=this.y-b.y;return Math.sqrt(c*c+a*a)},getAngleTo:function(b){var c=this.x-b.x,a=this.y-b.y;return Math.atan2(a,c)*this.radianToDegreeConstant}});Ext.define("Ext.util.Region",{statics:{getRegion:function(a){return Ext.fly(a).getPageBox(true)},from:function(a){return new this(a.top,a.right,a.bottom,a.left)}},constructor:function(d,f,a,c){var e=this;e.top=d;e[1]=d;e.right=f;e.bottom=a;e.left=c;e[0]=c},contains:function(b){var a=this;return(b.left>=a.left&&b.right<=a.right&&b.top>=a.top&&b.bottom<=a.bottom)},intersect:function(g){var f=this,d=Math.max(f.top,g.top),e=Math.min(f.right,g.right),a=Math.min(f.bottom,g.bottom),c=Math.max(f.left,g.left);if(a>d&&e>c){return new Ext.util.Region(d,e,a,c)}else{return false}},union:function(g){var f=this,d=Math.min(f.top,g.top),e=Math.max(f.right,g.right),a=Math.max(f.bottom,g.bottom),c=Math.min(f.left,g.left);return new Ext.util.Region(d,e,a,c)},constrainTo:function(b){var a=this,c=Ext.util.Numbers.constrain;a.top=c(a.top,b.top,b.bottom);a.bottom=c(a.bottom,b.top,b.bottom);a.left=c(a.left,b.left,b.right);a.right=c(a.right,b.left,b.right);return a},adjust:function(d,f,a,c){var e=this;e.top+=d;e.left+=c;e.right+=f;e.bottom+=a;return e},getOutOfBoundOffset:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.getOutOfBoundOffsetX(b)}else{return this.getOutOfBoundOffsetY(b)}}else{b=a;var c=new Ext.util.Offset();c.x=this.getOutOfBoundOffsetX(b.x);c.y=this.getOutOfBoundOffsetY(b.y);return c}},getOutOfBoundOffsetX:function(a){if(a<=this.left){return this.left-a}else{if(a>=this.right){return this.right-a}}return 0},getOutOfBoundOffsetY:function(a){if(a<=this.top){return this.top-a}else{if(a>=this.bottom){return this.bottom-a}}return 0},isOutOfBound:function(a,b){if(!Ext.isObject(a)){if(a=="x"){return this.isOutOfBoundX(b)}else{return this.isOutOfBoundY(b)}}else{b=a;return(this.isOutOfBoundX(b.x)||this.isOutOfBoundY(b.y))}},isOutOfBoundX:function(a){return(a<this.left||a>this.right)},isOutOfBoundY:function(a){return(a<this.top||a>this.bottom)},restrict:function(b,d,a){if(Ext.isObject(b)){var c;a=d;d=b;if(d.copy){c=d.copy()}else{c={x:d.x,y:d.y}}c.x=this.restrictX(d.x,a);c.y=this.restrictY(d.y,a);return c}else{if(b=="x"){return this.restrictX(d,a)}else{return this.restrictY(d,a)}}},restrictX:function(b,a){if(!a){a=1}if(b<=this.left){b-=(b-this.left)*a}else{if(b>=this.right){b-=(b-this.right)*a}}return b},restrictY:function(b,a){if(!a){a=1}if(b<=this.top){b-=(b-this.top)*a}else{if(b>=this.bottom){b-=(b-this.bottom)*a}}return b},getSize:function(){return{width:this.right-this.left,height:this.bottom-this.top}},copy:function(){return new Ext.util.Region(this.top,this.right,this.bottom,this.left)},toString:function(){return"Region["+this.top+","+this.right+","+this.bottom+","+this.left+"]"},translateBy:function(a){this.left+=a.x;this.right+=a.x;this.top+=a.y;this.bottom+=a.y;return this},round:function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this},equals:function(a){return(this.top==a.top&&this.right==a.right&&this.bottom==a.bottom&&this.left==a.left)}});Ext.define("Ext.util.Sorter",{isSorter:true,config:{property:null,sorterFn:null,root:null,transform:null,direction:"ASC",id:undefined},constructor:function(a){this.initConfig(a)},applyId:function(a){if(!a){a=this.getProperty();if(!a){a=Ext.id(null,"ext-sorter-")}}return a},createSortFunction:function(b){var c=this,a=c.getDirection().toUpperCase()=="DESC"?-1:1;return function(e,d){return a*b.call(c,e,d)}},defaultSortFn:function(e,c){var g=this,f=g._transform,b=g._root,d,a,h=g._property;if(b!==null){e=e[b];c=c[b]}d=e[h];a=c[h];if(f){d=f(d);a=f(a)}return d>a?1:(d<a?-1:0)},updateDirection:function(){this.updateSortFn()},updateSortFn:function(){this.sort=this.createSortFunction(this.getSorterFn()||this.defaultSortFn)},toggle:function(){this.setDirection(Ext.String.toggle(this.getDirection(),"ASC","DESC"))}});Ext.define("Ext.util.Inflector",{singleton:true,plurals:[[(/(quiz)$/i),"$1zes"],[(/^(ox)$/i),"$1en"],[(/([m|l])ouse$/i),"$1ice"],[(/(matr|vert|ind)ix|ex$/i),"$1ices"],[(/(x|ch|ss|sh)$/i),"$1es"],[(/([^aeiouy]|qu)y$/i),"$1ies"],[(/(hive)$/i),"$1s"],[(/(?:([^f])fe|([lr])f)$/i),"$1$2ves"],[(/sis$/i),"ses"],[(/([ti])um$/i),"$1a"],[(/(buffal|tomat|potat)o$/i),"$1oes"],[(/(bu)s$/i),"$1ses"],[(/(alias|status|sex)$/i),"$1es"],[(/(octop|vir)us$/i),"$1i"],[(/(ax|test)is$/i),"$1es"],[(/^person$/),"people"],[(/^man$/),"men"],[(/^(child)$/),"$1ren"],[(/s$/i),"s"],[(/$/),"s"]],singulars:[[(/(quiz)zes$/i),"$1"],[(/(matr)ices$/i),"$1ix"],[(/(vert|ind)ices$/i),"$1ex"],[(/^(ox)en/i),"$1"],[(/(alias|status)es$/i),"$1"],[(/(octop|vir)i$/i),"$1us"],[(/(cris|ax|test)es$/i),"$1is"],[(/(shoe)s$/i),"$1"],[(/(o)es$/i),"$1"],[(/(bus)es$/i),"$1"],[(/([m|l])ice$/i),"$1ouse"],[(/(x|ch|ss|sh)es$/i),"$1"],[(/(m)ovies$/i),"$1ovie"],[(/(s)eries$/i),"$1eries"],[(/([^aeiouy]|qu)ies$/i),"$1y"],[(/([lr])ves$/i),"$1f"],[(/(tive)s$/i),"$1"],[(/(hive)s$/i),"$1"],[(/([^f])ves$/i),"$1fe"],[(/(^analy)ses$/i),"$1sis"],[(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i),"$1$2sis"],[(/([ti])a$/i),"$1um"],[(/(n)ews$/i),"$1ews"],[(/people$/i),"person"],[(/s$/i),""]],uncountable:["sheep","fish","series","species","money","rice","information","equipment","grass","mud","offspring","deer","means"],singular:function(b,a){this.singulars.unshift([b,a])},plural:function(b,a){this.plurals.unshift([b,a])},clearSingulars:function(){this.singulars=[]},clearPlurals:function(){this.plurals=[]},isTransnumeral:function(a){return Ext.Array.indexOf(this.uncountable,a)!=-1},pluralize:function(f){if(this.isTransnumeral(f)){return f}var e=this.plurals,d=e.length,a,c,b;for(b=0;b<d;b++){a=e[b];c=a[0];if(c==f||(c.test&&c.test(f))){return f.replace(c,a[1])}}return f},singularize:function(f){if(this.isTransnumeral(f)){return f}var e=this.singulars,d=e.length,a,c,b;for(b=0;b<d;b++){a=e[b];c=a[0];if(c==f||(c.test&&c.test(f))){return f.replace(c,a[1])}}return f},classify:function(a){return Ext.String.capitalize(this.singularize(a))},ordinalize:function(d){var b=parseInt(d,10),c=b%10,a=b%100;if(11<=a&&a<=13){return d+"th"}else{switch(c){case 1:return d+"st";case 2:return d+"nd";case 3:return d+"rd";default:return d+"th"}}}},function(){var b={alumnus:"alumni",cactus:"cacti",focus:"foci",nucleus:"nuclei",radius:"radii",stimulus:"stimuli",ellipsis:"ellipses",paralysis:"paralyses",oasis:"oases",appendix:"appendices",index:"indexes",beau:"beaux",bureau:"bureaux",tableau:"tableaux",woman:"women",child:"children",man:"men",corpus:"corpora",criterion:"criteria",curriculum:"curricula",genus:"genera",memorandum:"memoranda",phenomenon:"phenomena",foot:"feet",goose:"geese",tooth:"teeth",antenna:"antennae",formula:"formulae",nebula:"nebulae",vertebra:"vertebrae",vita:"vitae"},a;for(a in b){this.plural(a,b[a]);this.singular(b[a],a)}});Ext.Anim=Ext.extend(Object,{isAnim:true,disableAnimations:false,defaultConfig:{from:{},to:{},duration:250,delay:0,easing:"ease-in-out",autoClear:true,out:true,direction:null,reverse:false},opposites:{left:"right",right:"left",up:"down",down:"up"},constructor:function(a){a=Ext.apply({},a||{},this.defaultConfig);this.config=a;Ext.Anim.superclass.constructor.call(this);this.running=[]},initConfig:function(c,b){var d=this,a=Ext.apply({},b||{},d.config);a.el=c=Ext.get(c);if(a.reverse&&d.opposites[a.direction]){a.direction=d.opposites[a.direction]}if(d.config.before){d.config.before.call(a,c,a)}if(b.before){b.before.call(a.scope||a,c,a)}return a},run:function(c,a){c=Ext.get(c);a=a||{};var d=this,b=c.dom.style,e,f=a.after;if(d.running[c.id]){d.onTransitionEnd(null,c,{config:a,after:f})}a=this.initConfig(c,a);if(this.disableAnimations){for(e in a.to){if(!a.to.hasOwnProperty(e)){continue}b[e]=a.to[e]}this.onTransitionEnd(null,c,{config:a,after:f});return d}c.un("transitionend",d.onTransitionEnd,d);b.webkitTransitionDuration="0ms";for(e in a.from){if(!a.from.hasOwnProperty(e)){continue}b[e]=a.from[e]}setTimeout(function(){if(!c.dom){return}if(a.is3d===true){c.parent().setStyle({"-webkit-perspective":"1200","-webkit-transform-style":"preserve-3d"})}b.webkitTransitionDuration=a.duration+"ms";b.webkitTransitionProperty="all";b.webkitTransitionTimingFunction=a.easing;c.on("transitionend",d.onTransitionEnd,d,{single:true,config:a,after:f});for(e in a.to){if(!a.to.hasOwnProperty(e)){continue}b[e]=a.to[e]}},a.delay||5);d.running[c.id]=a;return d},onTransitionEnd:function(e,c,g){c=Ext.get(c);if(this.running[c.id]===undefined){return}var b=c.dom.style,a=g.config,d=this,f;if(a.autoClear){for(f in a.to){if(!a.to.hasOwnProperty(f)||a[f]===false){continue}b[f]=""}}b.webkitTransitionDuration=null;b.webkitTransitionProperty=null;b.webkitTransitionTimingFunction=null;if(a.is3d){c.parent().setStyle({"-webkit-perspective":"","-webkit-transform-style":""})}if(d.config.after){d.config.after.call(a,c,a)}if(g.after){g.after.call(a.scope||d,c,a)}delete d.running[c.id]}});Ext.Anim.seed=1000;Ext.Anim.run=function(b,c,a){if(b.isComponent){b=b.element}a=a||{};if(c.isAnim){c.run(b,a)}else{if(Ext.isObject(c)){if(a.before&&c.before){a.before=Ext.createInterceptor(a.before,c.before,c.scope)}if(a.after&&c.after){a.after=Ext.createInterceptor(a.after,c.after,c.scope)}a=Ext.apply({},a,c);c=c.type}if(!Ext.anims[c]){throw c+" is not a valid animation type."}else{if(b&&b.dom){Ext.anims[c].run(b,a)}}}};Ext.anims={fade:new Ext.Anim({type:"fade",before:function(b){var c=1,a=1,e=b.getStyle("z-index")=="auto"?0:b.getStyle("z-index"),d=e;if(this.out){a=0}else{d=Math.abs(e)+1;c=0}this.from={opacity:c,"z-index":d};this.to={opacity:a,"z-index":d}}}),slide:new Ext.Anim({direction:"left",cover:false,reveal:false,opacity:false,"z-index":false,before:function(a){var c=a.getStyle("z-index")=="auto"?0:a.getStyle("z-index"),f=a.getStyle("opacity"),h=c+1,d=this.out,l=this.direction,k=0,i=0,j=0,g=0,b=a.getHeight(),e=a.getWidth();if(l=="left"||l=="right"){if(d){k=-e}else{j=e}}else{if(l=="up"||l=="down"){if(d){i=-b}else{g=b}}}if(l=="right"||l=="down"){i*=-1;k*=-1;g*=-1;j*=-1}if(this.cover&&d){k=0;i=0;h=c}else{if(this.reveal&&!d){j=0;g=0;h=c}}this.from={"-webkit-transform":"translate3d("+j+"px, "+g+"px, 0)","z-index":h,opacity:f-0.01};this.to={"-webkit-transform":"translate3d("+k+"px, "+i+"px, 0)","z-index":h,opacity:f}}}),pop:new Ext.Anim({scaleOnExit:true,before:function(d){var b=1,c=1,g=1,a=1,h=d.getStyle("z-index")=="auto"?0:d.getStyle("z-index"),f=h,e=h;if(!this.out){b=0.01;f=h+1;e=h+1;g=0}else{if(this.scaleOnExit){c=0.01;a=0}else{a=0.8}}this.from={"-webkit-transform":"scale("+b+")","-webkit-transform-origin":"50% 50%",opacity:g,"z-index":f};this.to={"-webkit-transform":"scale("+c+")","-webkit-transform-origin":"50% 50%",opacity:a,"z-index":e}}}),flip:new Ext.Anim({is3d:true,direction:"left",before:function(c){var f="Y",a=1,b=1,e=0,d=0;if(this.out){d=-180;b=0.8}else{e=180;a=0.8}if(this.direction=="up"||this.direction=="down"){f="X"}if(this.direction=="right"||this.direction=="left"){d*=-1;e*=-1}this.from={"-webkit-transform":"rotate"+f+"("+e+"deg) scale("+a+")","-webkit-backface-visibility":"hidden"};this.to={"-webkit-transform":"rotate"+f+"("+d+"deg) scale("+b+")","-webkit-backface-visibility":"hidden"}}}),cube:new Ext.Anim({is3d:true,direction:"left",style:"outer",before:function(b){var k="0% 0%",l=0,a=0,i="Y",f=0,g=0,e=b.getWidth(),d=b.getHeight(),j=true,c=" translateX(0)",h="";if(this.direction=="left"||this.direction=="right"){if(this.out){k="100% 100%";g=e;a=-90}else{k="0% 0%";f=e;l=90}}else{if(this.direction=="up"||this.direction=="down"){i="X";if(this.out){k="100% 100%";g=d;a=90}else{k="0% 0%";f=d;l=-90}}}if(this.direction=="down"||this.direction=="right"){l*=-1;a*=-1;k=(k=="0% 0%")?"100% 100%":"0% 0%"}if(this.style=="inner"){f*=-1;g*=-1;l*=-1;a*=-1;if(!this.out){h=" translateX(0px)";k="0% 50%"}else{h=c;k="100% 50%"}}this.from={"-webkit-transform":"rotate"+i+"("+l+"deg)"+(j?" translateZ("+f+"px)":"")+c,"-webkit-transform-origin":k};this.to={"-webkit-transform":"rotate"+i+"("+a+"deg) translateZ("+g+"px)"+h,"-webkit-transform-origin":k}},duration:250}),wipe:new Ext.Anim({before:function(b){var d=b.getStyle("z-index"),c,a="";if(!this.out){c=d+1;a="-webkit-gradient(linear, left bottom, right bottom, from(transparent), to(#000), color-stop(66%, #000), color-stop(33%, transparent))";this.from={"-webkit-mask-image":a,"-webkit-mask-size":b.getWidth()*3+"px "+b.getHeight()+"px","z-index":c,"-webkit-mask-position-x":0};this.to={"-webkit-mask-image":a,"-webkit-mask-size":b.getWidth()*3+"px "+b.getHeight()+"px","z-index":c,"-webkit-mask-position-x":-b.getWidth()*2+"px"}}},duration:500})};Ext.define("Ext.XTemplateCompiler",{extend:"Ext.XTemplateParser",useEval:Ext.isGecko,useFormat:true,propNameRe:/^[\w\d\$]*$/,compile:function(a){var c=this,b=c.generate(a);return c.useEval?c.evalTpl(b):(new Function("Ext",b))(Ext)},generate:function(a){var c=this;c.body=["var c0=values, p0=parent, n0=xcount, i0=xindex;\n"];c.funcs=["var fm=Ext.util.Format;"];c.switches=[];c.parse(a);c.funcs.push((c.useEval?"$=":"return")+" function ("+c.fnArgs+") {",c.body.join(""),"}");var b=c.funcs.join("\n");return b},doText:function(a){a=a.replace(this.aposRe,"\\'");a=a.replace(this.newLineRe,"\\n");this.body.push("out.push('",a,"')\n")},doExpr:function(a){this.body.push("out.push(String(",a,"))\n")},doTag:function(a){this.doExpr(this.parseTag(a))},doElse:function(){this.body.push("} else {\n")},doEval:function(a){this.body.push(a,"\n")},doIf:function(b,c){var a=this;if(a.propNameRe.test(b)){a.body.push("if (",a.parseTag(b),") {\n")}else{a.body.push("if (",a.addFn(b),a.callFn,") {\n")}if(c.exec){a.doExec(c.exec)}},doElseIf:function(b,c){var a=this;if(a.propNameRe.test(b)){a.body.push("} else if (",a.parseTag(b),") {\n")}else{a.body.push("} else if (",a.addFn(b),a.callFn,") {\n")}if(c.exec){a.doExec(c.exec)}},doSwitch:function(b){var a=this;if(a.propNameRe.test(b)){a.body.push("switch (",a.parseTag(b),") {\n")}else{a.body.push("switch (",a.addFn(b),a.callFn,") {\n")}a.switches.push(0)},doCase:function(e){var d=this,c=Ext.isArray(e)?e:[e],f=d.switches.length-1,a,b;if(d.switches[f]){d.body.push("break;\n")}else{d.switches[f]++}for(b=0,f=c.length;b<f;++b){a=d.intRe.exec(c[b]);c[b]=a?a[1]:("'"+c[b].replace(d.aposRe,"\\'")+"'")}d.body.push("case ",c.join(": case "),":\n")},doDefault:function(){var a=this,b=a.switches.length-1;if(a.switches[b]){a.body.push("break;\n")}else{a.switches[b]++}a.body.push("default:\n")},doEnd:function(b,d){var c=this,a=c.level-1;if(b=="for"){if(d.exec){c.doExec(d.exec)}c.body.push("}\n");c.body.push("parent=p",a,";values=r",a+1,";xcount=n",a,";xindex=i",a,"\n")}else{if(b=="if"||b=="switch"){c.body.push("}\n")}}},doFor:function(e,f){var d=this,c=d.addFn(e),b=d.level,a=b-1;d.body.push("var c",b,"=",c,d.callFn,", a",b,"=Ext.isArray(c",b,"),p",b,"=(parent=c",a,"),r",b,"=values\n","for (var i",b,"=0,n",b,"=a",b,"?c",b,".length:(c",b,"?1:0), xcount=n",b,";i",b,"<n"+b+";++i",b,"){\n","values=a",b,"?c",b,"[i",b,"]:c",b,"\n","xindex=i",b,"+1\n")},doExec:function(c,d){var b=this,a="f"+b.funcs.length;b.funcs.push("function "+a+"("+b.fnArgs+") {"," try { with(values) {"," "+c," }} catch(e) {}","}");b.body.push(a+b.callFn+"\n")},addFn:function(a){var c=this,b="f"+c.funcs.length;if(a==="."){c.funcs.push("function "+b+"("+c.fnArgs+") {"," return values","}")}else{if(a===".."){c.funcs.push("function "+b+"("+c.fnArgs+") {"," return parent","}")}else{c.funcs.push("function "+b+"("+c.fnArgs+") {"," try { with(values) {"," return("+a+")"," }} catch(e) {}","}")}}return b},parseTag:function(b){var a=this.tagRe.exec(b),e=a[1],g=a[2],d=a[3],f=a[4],c;if(e=="."){c='Ext.Array.indexOf(["string", "number", "boolean"], typeof values) > -1 || Ext.isDate(values) ? values : ""'}else{if(e=="#"){c="xindex"}else{if(e.substr(0,7)=="parent."){c=e}else{if((e.indexOf(".")!==-1)&&(e.indexOf("-")===-1)){c="values."+e}else{c="values['"+e+"']"}}}}if(f){c="("+c+f+")"}if(g&&this.useFormat){d=d?","+d:"";if(g.substr(0,5)!="this."){g="fm."+g+"("}else{g+="("}}else{d="";g="("+c+" === undefined ? '' : "}return g+c+d+")"},evalTpl:function($){eval($);return $},newLineRe:/\r\n|\r|\n/g,aposRe:/[']/g,intRe:/^\s*(\d+)\s*$/,tagRe:/([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\/]\s?[\d\.\+\-\*\/\(\)]+)?/},function(){var a=this.prototype;a.fnArgs="out,values,parent,xindex,xcount";a.callFn=".call(this,"+a.fnArgs+")"});Ext.define("Ext.data.Field",{requires:["Ext.data.Types","Ext.data.SortTypes"],alias:"data.field",isField:true,config:{name:null,type:"auto",convert:undefined,dateFormat:null,allowNull:true,defaultValue:undefined,mapping:null,sortType:undefined,sortDir:"ASC",allowBlank:true,persist:true,encode:null,decode:null},constructor:function(a){if(Ext.isString(a)){a={name:a}}this.initConfig(a)},applyType:function(c){var b=Ext.data.Types,a=b.AUTO;if(c){if(Ext.isString(c)){return b[c.toUpperCase()]||a}else{return c}}return a},updateType:function(a,b){var c=this.getConvert();if(b&&c===b.convert){this.setConvert(a.convert)}},applySortType:function(d){var c=Ext.data.SortTypes,a=this.getType(),b=a.sortType;if(d){if(Ext.isString(d)){return c[d]||b}else{return d}}return b},applyConvert:function(b){var a=this.getType().convert;if(b&&b!==a){this._hasCustomConvert=true;return b}else{this._hasCustomConvert=false;return a}},hasCustomConvert:function(){return this._hasCustomConvert}});Ext.define("Ext.data.identifier.Sequential",{extend:"Ext.data.identifier.Simple",alias:"data.identifier.sequential",config:{prefix:"",seed:1},constructor:function(){var a=this;a.callParent(arguments);a.parts=[a.getPrefix(),""]},generate:function(b){var c=this,d=c.parts,a=c.getSeed()+1;c.setSeed(a);d[1]=a;return d.join("")}});Ext.define("Ext.data.writer.Json",{extend:"Ext.data.writer.Writer",alternateClassName:"Ext.data.JsonWriter",alias:"writer.json",config:{root:undefined,encode:false,allowSingle:true,encodeRequest:false},applyRoot:function(a){if(!a&&(this.getEncode()||this.getEncodeRequest())){a="data"}return a},writeRecords:function(d,e){var a=this.getRoot(),f=d.getParams(),b=this.getAllowSingle(),c;if(this.getAllowSingle()&&e&&e.length==1){e=e[0]}if(this.getEncodeRequest()){c=d.getJsonData()||{};if(e&&(e.length||(b&&Ext.isObject(e)))){c[a]=e}d.setJsonData(Ext.apply(c,f||{}));d.setParams(null);d.setMethod("POST");return d}if(!e||!(e.length||(b&&Ext.isObject(e)))){return d}if(this.getEncode()){if(a){f[a]=Ext.encode(e)}else{}}else{c=d.getJsonData()||{};if(a){c[a]=e}else{c=e}d.setJsonData(c)}return d}});Ext.define("Ext.event.Dispatcher",{requires:["Ext.event.ListenerStack","Ext.event.Controller"],statics:{getInstance:function(){if(!this.instance){this.instance=new this()}return this.instance},setInstance:function(a){this.instance=a;return this}},config:{publishers:{}},wildcard:"*",constructor:function(a){this.listenerStacks={};this.activePublishers={};this.publishersCache={};this.noActivePublishers=[];this.controller=null;this.initConfig(a);return this},getListenerStack:function(e,g,c,b){var d=this.listenerStacks,f=d[e],a;b=Boolean(b);if(!f){if(b){d[e]=f={}}else{return null}}f=f[g];if(!f){if(b){d[e][g]=f={}}else{return null}}a=f[c];if(!a){if(b){f[c]=a=new Ext.event.ListenerStack()}else{return null}}return a},getController:function(d,f,c,b){var a=this.controller,e={targetType:d,target:f,eventName:c};if(!a){this.controller=a=new Ext.event.Controller()}if(a.isFiring){a=new Ext.event.Controller()}a.setInfo(e);if(b&&a!==b){a.connect(b)}return a},applyPublishers:function(c){var a,b;this.publishersCache={};for(a in c){if(c.hasOwnProperty(a)){b=c[a];this.registerPublisher(b)}}return c},registerPublisher:function(b){var a=this.activePublishers,c=b.getTargetType(),d=a[c];if(!d){a[c]=d=[]}d.push(b);b.setDispatcher(this);return this},getCachedActivePublishers:function(c,b){var a=this.publishersCache,d;if((d=a[c])&&(d=d[b])){return d}return null},cacheActivePublishers:function(c,b,d){var a=this.publishersCache;if(!a[c]){a[c]={}}a[c][b]=d;return d},getActivePublishers:function(f,b){var g,a,c,e,d;if((g=this.getCachedActivePublishers(f,b))){return g}a=this.activePublishers[f];if(a){g=[];for(c=0,e=a.length;c<e;c++){d=a[c];if(d.handles(b)){g.push(d)}}}else{g=this.noActivePublishers}return this.cacheActivePublishers(f,b,g)},hasListener:function(c,d,b){var a=this.getListenerStack(c,d,b);if(a){return a.count()>0}return false},addListener:function(d,e,a){var f=this.getActivePublishers(d,a),c=f.length,b;if(c>0){for(b=0;b<c;b++){f[b].subscribe(e,a)}}return this.doAddListener.apply(this,arguments)},doAddListener:function(g,h,c,f,e,d,a){var b=this.getListenerStack(g,h,c,true);return b.add(f,e,d,a)},removeListener:function(d,e,a){var f=this.getActivePublishers(d,a),c=f.length,b;if(c>0){for(b=0;b<c;b++){f[b].unsubscribe(e,a)}}return this.doRemoveListener.apply(this,arguments)},doRemoveListener:function(f,g,c,e,d,a){var b=this.getListenerStack(f,g,c);if(b===null){return false}return b.remove(e,d,a)},clearListeners:function(a,e,d){var j=this.listenerStacks,f=arguments.length,b,h,c,g;if(f===3){if(j[a]&&j[a][e]){this.removeListener(a,e,d);delete j[a][e][d]}}else{if(f===2){if(j[a]){b=j[a][e];if(b){for(d in b){if(b.hasOwnProperty(d)){h=this.getActivePublishers(a,d);for(c=0,f=h.length;c<f;c++){h[c].unsubscribe(e,d,true)}}}delete j[a][e]}}}else{if(f===1){h=this.activePublishers[a];for(c=0,f=h.length;c<f;c++){h[c].unsubscribeAll()}delete j[a]}else{h=this.activePublishers;for(a in h){if(h.hasOwnProperty(a)){g=h[a];for(c=0,f=g.length;c<f;c++){g[c].unsubscribeAll()}}}delete this.listenerStacks;this.listenerStacks={}}}}return this},dispatchEvent:function(d,e,a){var f=this.getActivePublishers(d,a),c=f.length,b;if(c>0){for(b=0;b<c;b++){f[b].notify(e,a)}}return this.doDispatchEvent.apply(this,arguments)},doDispatchEvent:function(a,g,f,i,c,b){var h=this.getListenerStack(a,g,f),d=this.getWildcardListenerStacks(a,g,f),e;if((h===null||h.length==0)){if(d.length==0&&!c){return}}else{d.push(h)}e=this.getController(a,g,f,b);e.setListenerStacks(d);e.fire(i,c);return !e.isInterrupted()},getWildcardListenerStacks:function(g,h,d){var f=[],b=this.wildcard,c=d!==b,e=h!==b,a;if(c&&(a=this.getListenerStack(g,h,b))){f.push(a)}if(e&&(a=this.getListenerStack(g,b,d))){f.push(a)}return f}});Ext.define("Ext.event.Dom",{extend:"Ext.event.Event",constructor:function(a){var c=a.target,b;if(c&&c.nodeType!==1){c=c.parentNode}b=a.changedTouches;if(b){b=b[0];this.pageX=b.pageX;this.pageY=b.pageY}else{this.pageX=a.pageX;this.pageY=a.pageY}this.browserEvent=this.event=a;this.target=this.delegatedTarget=c;this.type=a.type;this.timeStamp=this.time=a.timeStamp;if(typeof this.time!="number"){this.time=new Date(this.time).getTime()}return this},stopEvent:function(){this.preventDefault();return this.callParent()},preventDefault:function(){this.browserEvent.preventDefault()},getPageX:function(){return this.browserEvent.pageX},getPageY:function(){return this.browserEvent.pageY},getXY:function(){if(!this.xy){this.xy=[this.getPageX(),this.getPageY()]}return this.xy},getTarget:function(b,c,a){if(arguments.length===0){return this.delegatedTarget}return b?Ext.fly(this.target).findParent(b,c,a):(a?Ext.get(this.target):this.target)},getTime:function(){return this.time},setDelegatedTarget:function(a){this.delegatedTarget=a},makeUnpreventable:function(){this.browserEvent.preventDefault=Ext.emptyFn}});Ext.define("Ext.event.Touch",{extend:"Ext.event.Dom",requires:["Ext.util.Point"],constructor:function(a,b){if(b){this.set(b)}this.touchesMap={};this.changedTouches=this.cloneTouches(a.changedTouches);this.touches=this.cloneTouches(a.touches);this.targetTouches=this.cloneTouches(a.targetTouches);return this.callParent([a])},clone:function(){return new this.self(this)},setTargets:function(a){this.doSetTargets(this.changedTouches,a);this.doSetTargets(this.touches,a);this.doSetTargets(this.targetTouches,a)},doSetTargets:function(f,d){var c,e,g,b,a;for(c=0,e=f.length;c<e;c++){g=f[c];b=g.identifier;a=d[b];if(a){g.targets=a}}},cloneTouches:function(f){var e=this.touchesMap,h=[],d=null,b,c,g,a;for(b=0,c=f.length;b<c;b++){g=f[b];a=g.identifier;if(d!==null&&a===d){a++}d=a;if(!e[a]){e[a]={pageX:g.pageX,pageY:g.pageY,identifier:a,target:g.target,timeStamp:g.timeStamp,point:Ext.util.Point.fromTouch(g),targets:g.targets}}h[b]=e[a]}return h}});Ext.define("Ext.event.publisher.ComponentPaint",{extend:"Ext.event.publisher.Publisher",targetType:"component",handledEvents:["painted","erased"],eventNames:{painted:"painted",erased:"erased"},constructor:function(){this.callParent(arguments);this.hiddenQueue={};this.renderedQueue={}},getSubscribers:function(b,a){var c=this.subscribers;if(!c.hasOwnProperty(b)){if(!a){return null}c[b]={$length:0}}return c[b]},setDispatcher:function(a){var b=this.targetType;a.doAddListener(b,"*","renderedchange","onBeforeComponentRenderedChange",this,null,"before");a.doAddListener(b,"*","hiddenchange","onBeforeComponentHiddenChange",this,null,"before");a.doAddListener(b,"*","renderedchange","onComponentRenderedChange",this,null,"after");a.doAddListener(b,"*","hiddenchange","onComponentHiddenChange",this,null,"after");return this.callParent(arguments)},subscribe:function(d,a){var b=d.match(this.idSelectorRegex),c,e;if(!b){return false}e=b[1];c=this.getSubscribers(a,true);if(c.hasOwnProperty(e)){c[e]++;return true}c[e]=1;c.$length++;return true},unsubscribe:function(e,a,c){var b=e.match(this.idSelectorRegex),d,f;if(!b||!(d=this.getSubscribers(a))){return false}f=b[1];if(!d.hasOwnProperty(f)||(!c&&--d[f]>0)){return true}delete d[f];if(--d.$length===0){delete this.subscribers[a]}return true},onBeforeComponentRenderedChange:function(b,d,g){var f=this.eventNames,c=g?f.painted:f.erased,e=this.getSubscribers(c),a;if(e&&e.$length>0){this.renderedQueue[d.getId()]=a=[];this.publish(e,d,c,a)}},onBeforeComponentHiddenChange:function(c,d){var f=this.eventNames,b=d?f.erased:f.painted,e=this.getSubscribers(b),a;if(e&&e.$length>0){this.hiddenQueue[c.getId()]=a=[];this.publish(e,c,b,a)}},onComponentRenderedChange:function(b,c){var d=this.renderedQueue,e=c.getId(),a;if(!d.hasOwnProperty(e)){return}a=d[e];delete d[e];if(a.length>0){this.dispatchQueue(a)}},onComponentHiddenChange:function(c){var b=this.hiddenQueue,d=c.getId(),a;if(!b.hasOwnProperty(d)){return}a=b[d];delete b[d];if(a.length>0){this.dispatchQueue(a)}},dispatchQueue:function(g){var l=this.dispatcher,a=this.targetType,b=this.eventNames,e=g.slice(),f=e.length,c,k,h,d,j;g.length=0;if(f>0){for(c=0;c<f;c++){k=e[c];h=k.component;d=k.eventName;j=h.isPainted();if((d===b.painted&&j)||d===b.erased&&!j){l.doDispatchEvent(a,"#"+k.id,d,[h])}}e.length=0}},publish:function(a,k,f,j){var c=k.getId(),b=false,d,h,e,g,l;if(a[c]){d=this.eventNames;l=k.isPainted();if((f===d.painted&&!l)||f===d.erased&&l){b=true}else{return this}}if(k.isContainer){h=k.getItems().items;for(e=0,g=h.length;e<g;e++){this.publish(a,h[e],f,j)}}else{if(k.isDecorator){this.publish(a,k.getComponent(),f,j)}}if(b){j.push({id:c,eventName:f,component:k})}}});Ext.define("Ext.event.publisher.Dom",{extend:"Ext.event.publisher.Publisher",requires:["Ext.env.Browser","Ext.Element","Ext.event.Dom"],targetType:"element",idOrClassSelectorRegex:/^([#|\.])([\w\-]+)$/,handledEvents:["click","focus","blur","mousemove","mousedown","mouseup","mouseover","mouseout","keyup","keydown","keypress","submit","transitionend","animationstart","animationend"],classNameSplitRegex:/\s+/,SELECTOR_ALL:"*",constructor:function(){var f=this.getHandledEvents(),e={},b,c,a,d;this.doBubbleEventsMap={click:true,submit:true,mousedown:true,mousemove:true,mouseup:true,mouseover:true,mouseout:true,transitionend:true};this.onEvent=Ext.Function.bind(this.onEvent,this);for(b=0,c=f.length;b<c;b++){a=f[b];d=this.getVendorEventName(a);e[d]=a;this.attachListener(d)}this.eventNameMap=e;return this.callParent()},getSubscribers:function(a){var c=this.subscribers,b=c[a];if(!b){b=c[a]={id:{$length:0},className:{$length:0},selector:[],all:0,$length:0}}return b},getVendorEventName:function(a){if(a==="transitionend"){a=Ext.browser.getVendorProperyName("transitionEnd")}else{if(a==="animationstart"){a=Ext.browser.getVendorProperyName("animationStart")}else{if(a==="animationend"){a=Ext.browser.getVendorProperyName("animationEnd")}}}return a},attachListener:function(a){document.addEventListener(a,this.onEvent,!this.doesEventBubble(a));return this},removeListener:function(a){document.removeEventListener(a,this.onEvent,!this.doesEventBubble(a));return this},doesEventBubble:function(a){return !!this.doBubbleEventsMap[a]},subscribe:function(g,f){if(!this.handles(f)){return false}var e=g.match(this.idOrClassSelectorRegex),a=this.getSubscribers(f),c=a.id,d=a.className,b=a.selector,h,i;if(e!==null){h=e[1];i=e[2];if(h==="#"){if(c.hasOwnProperty(i)){c[i]++;return true}c[i]=1;c.$length++}else{if(d.hasOwnProperty(i)){d[i]++;return true}d[i]=1;d.$length++}}else{if(g===this.SELECTOR_ALL){a.all++}else{if(b.hasOwnProperty(g)){b[g]++;return true}b[g]=1;b.push(g)}}a.$length++;return true},unsubscribe:function(g,f,j){if(!this.handles(f)){return false}var e=g.match(this.idOrClassSelectorRegex),a=this.getSubscribers(f),c=a.id,d=a.className,b=a.selector,h,i;j=Boolean(j);if(e!==null){h=e[1];i=e[2];if(h==="#"){if(!c.hasOwnProperty(i)||(!j&&--c[i]>0)){return true}delete c[i];c.$length--}else{if(!d.hasOwnProperty(i)||(!j&&--d[i]>0)){return true}delete d[i];d.$length--}}else{if(g===this.SELECTOR_ALL){if(j){a.all=0}else{a.all--}}else{if(!b.hasOwnProperty(g)||(!j&&--b[g]>0)){return true}delete b[g];Ext.Array.remove(b,g)}}a.$length--;return true},getElementTarget:function(a){if(a.nodeType!==1){a=a.parentNode;if(!a||a.nodeType!==1){return null}}return a},getBubblingTargets:function(b){var a=[];if(!b){return a}do{a[a.length]=b;b=b.parentNode}while(b&&b.nodeType===1);return a},dispatch:function(c,a,b){b.push(b[0].target);this.callParent(arguments)},publish:function(b,a,c){var d=this.getSubscribers(b),e;if(d.$length===0||!this.doPublish(d,b,a,c)){e=this.getSubscribers("*");if(e.$length>0){this.doPublish(e,b,a,c)}}return this},doPublish:function(f,h,x,u){var r=f.id,g=f.className,b=f.selector,p=r.$length>0,a=g.$length>0,l=b.length>0,o=f.all>0,y={},e=[u],q=false,m=this.classNameSplitRegex,v,k,t,d,z,n,c,w,s;for(v=0,k=x.length;v<k;v++){z=x[v];u.setDelegatedTarget(z);if(p){n=z.id;if(n){if(r.hasOwnProperty(n)){q=true;this.dispatch("#"+n,h,e)}}}if(a){c=z.className;if(c){w=c.split(m);for(t=0,d=w.length;t<d;t++){c=w[t];if(!y[c]){y[c]=true;if(g.hasOwnProperty(c)){q=true;this.dispatch("."+c,h,e)}}}}}if(u.isStopped){return q}}if(o&&!q){u.setDelegatedTarget(u.browserEvent.target);q=true;this.dispatch(this.ALL_SELECTOR,h,e);if(u.isStopped){return q}}if(l){for(t=0,d=x.length;t<d;t++){z=x[t];for(v=0,k=b.length;v<k;v++){s=b[v];if(this.matchesSelector(z,s)){u.setDelegatedTarget(z);q=true;this.dispatch(s,h,e)}if(u.isStopped){return q}}}}return q},matchesSelector:function(b,a){if("webkitMatchesSelector" in b){return b.webkitMatchesSelector(a)}return Ext.DomQuery.is(b,a)},onEvent:function(d){var b=this.eventNameMap[d.type];if(!b||this.getSubscribersCount(b)===0){return}var c=this.getElementTarget(d.target),a;if(!c){return}if(this.doesEventBubble(b)){a=this.getBubblingTargets(c)}else{a=[c]}this.publish(b,a,new Ext.event.Dom(d))},getSubscribersCount:function(a){if(!this.handles(a)){return 0}return this.getSubscribers(a).$length+this.getSubscribers("*").$length}});Ext.define("Ext.event.publisher.TouchGesture",{extend:"Ext.event.publisher.Dom",requires:["Ext.util.Point","Ext.event.Touch"],handledEvents:["touchstart","touchmove","touchend","touchcancel"],moveEventName:"touchmove",config:{moveThrottle:1,buffering:{enabled:false,interval:10},recognizers:{}},currentTouchesCount:0,constructor:function(a){this.processEvents=Ext.Function.bind(this.processEvents,this);this.eventProcessors={touchstart:this.onTouchStart,touchmove:this.onTouchMove,touchend:this.onTouchEnd,touchcancel:this.onTouchEnd};this.eventToRecognizerMap={};this.activeRecognizers=[];this.currentRecognizers=[];this.currentTargets={};this.currentTouches={};this.buffer=[];this.initConfig(a);return this.callParent()},applyBuffering:function(a){if(a.enabled===true){this.bufferTimer=setInterval(this.processEvents,a.interval)}else{clearInterval(this.bufferTimer)}return a},applyRecognizers:function(b){var c,a;for(c in b){if(b.hasOwnProperty(c)){a=b[c];this.registerRecognizer(a)}}return b},handles:function(a){return this.callParent(arguments)||this.eventToRecognizerMap.hasOwnProperty(a)},doesEventBubble:function(){return true},eventLogs:[],onEvent:function(b){var a=this.getBuffering();b=new Ext.event.Touch(b);if(a.enabled){this.buffer.push(b)}else{this.processEvent(b)}},processEvents:function(){var a=this.buffer,f=a.length,d=[],c,e,b;if(f>0){c=a.slice(0);a.length=0;for(b=0;b<f;b++){e=c[b];if(e.type===this.moveEventName){d.push(e)}else{if(d.length>0){this.processEvent(this.mergeEvents(d));d.length=0}this.processEvent(e)}}if(d.length>0){this.processEvent(this.mergeEvents(d));d.length=0}}},mergeEvents:function(c){var b=[],f=c.length,a,e,d;d=c[f-1];if(f===1){return d}for(a=0;a<f;a++){e=c[a];b.push(e.changedTouches)}d.changedTouches=this.mergeTouchLists(b);return d},mergeTouchLists:function(l){var e={},h=[],d,k,a,b,f,c,g;for(d=0,k=l.length;d<k;d++){a=l[d];for(b=0,f=a.length;b<f;b++){c=a[b];g=c.identifier;e[g]=c}}for(g in e){if(e.hasOwnProperty(g)){h.push(e[g])}}return h},registerRecognizer:function(a){var g=this.eventToRecognizerMap,e=this.activeRecognizers,c=a.getHandledEvents(),d,f,b;a.setOnRecognized(this.onRecognized);a.setCallbackScope(this);for(d=0,f=c.length;d<f;d++){b=c[d];g[b]=a}e.push(a);return this},onRecognized:function(f,h,d,a){var k=[],j=d.length,g,c,b;if(j===1){return this.publish(f,d[0].targets,h,a)}for(c=0;c<j;c++){b=d[c];k.push(b.targets)}g=this.getCommonTargets(k);this.publish(f,g,h,a)},publish:function(b,a,c,d){c.set(d);return this.callParent([b,a,c])},getCommonTargets:function(a){var h=a[0],f=a.length;if(f===1){return h}var d=[],e=1,g,b,c;while(true){g=h[h.length-e];if(!g){return d}for(c=1;c<f;c++){b=a[c];if(b[b.length-e]!==g){return d}}d.unshift(g);e++}return d},invokeRecognizers:function(c,g){var b=this.activeRecognizers,f=b.length,d,a;if(c==="onStart"){for(d=0;d<f;d++){b[d].isActive=true}}for(d=0;d<f;d++){a=b[d];if(a.isActive&&a[c].call(a,g)===false){a.isActive=false}}},getActiveRecognizers:function(){return this.activeRecognizers},processEvent:function(a){this.eventProcessors[a.type].call(this,a)},onTouchStart:function(k){var m=this.currentTargets,g=this.currentTouches,o=this.currentTouchesCount,n=k.changedTouches,f=k.touches,h=f.length,a={},l=n.length,d,c,j,b;o+=l;if(o>h){for(d=0;d<h;d++){c=f[d];j=c.identifier;a[j]=true}for(j in g){if(g.hasOwnProperty(j)){if(!a[j]){o--;b=k.clone();c=g[j];c.targets=this.getBubblingTargets(this.getElementTarget(c.target));b.changedTouches=[c];this.onTouchEnd(b)}}}if(o>h){return}}for(d=0;d<l;d++){c=n[d];j=c.identifier;if(!g.hasOwnProperty(j)){this.currentTouchesCount++}g[j]=c;m[j]=this.getBubblingTargets(this.getElementTarget(c.target))}k.setTargets(m);for(d=0;d<l;d++){c=n[d];this.publish("touchstart",c.targets,k,{touch:c})}if(!this.isStarted){this.isStarted=true;this.invokeRecognizers("onStart",k)}this.invokeRecognizers("onTouchStart",k)},onTouchMove:function(j){if(!this.isStarted){return}var l=this.currentTargets,g=this.currentTouches,c=this.getMoveThrottle(),m=j.changedTouches,b=0,f,k,d,n,a,h;j.setTargets(l);for(f=0,k=m.length;f<k;f++){d=m[f];h=d.identifier;n=d.point;a=g[h].point;if(c&&n.isCloseTo(a,c)){b++;continue}g[h]=d;this.publish("touchmove",d.targets,j,{touch:d})}if(b<k){this.invokeRecognizers("onTouchMove",j)}},onTouchEnd:function(d){if(!this.isStarted){return}var h=this.currentTargets,c=this.currentTouches,k=d.changedTouches,g=k.length,j,f,b,a;d.setTargets(h);this.currentTouchesCount-=g;j=(this.currentTouchesCount===0);if(j){this.isStarted=false}for(b=0;b<g;b++){a=k[b];f=a.identifier;delete c[f];delete h[f];this.publish("touchend",a.targets,d,{touch:a})}this.invokeRecognizers("onTouchEnd",d);if(j){this.invokeRecognizers("onEnd",d)}}},function(){if(!Ext.feature.has.Touch){this.override({moveEventName:"mousemove",map:{mouseToTouch:{mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},touchToMouse:{touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"}},attachListener:function(a){a=this.map.touchToMouse[a];if(!a){return}return this.callOverridden([a])},lastEventType:null,onEvent:function(d){if("button" in d&&d.button!==0){return}var c=d.type,b=[d];if(c==="mousedown"&&this.lastEventType&&this.lastEventType!=="mouseup"){var a=document.createEvent("MouseEvent");a.initMouseEvent("mouseup",d.bubbles,d.cancelable,document.defaultView,d.detail,d.screenX,d.screenY,d.clientX,d.clientY,d.ctrlKey,d.altKey,d.shiftKey,d.metaKey,d.metaKey,d.button,d.relatedTarget);this.onEvent(a)}if(c!=="mousemove"){this.lastEventType=c}d.identifier=1;d.touches=(c!=="mouseup")?b:[];d.targetTouches=(c!=="mouseup")?b:[];d.changedTouches=b;return this.callOverridden([d])},processEvent:function(a){this.eventProcessors[this.map.mouseToTouch[a.type]].call(this,a)}})}});Ext.define("Ext.event.recognizer.MultiTouch",{extend:"Ext.event.recognizer.Touch",requiredTouchesCount:2,isTracking:false,isStarted:false,onTouchStart:function(d){var a=this.requiredTouchesCount,c=d.touches,b=c.length;if(b===a){this.start(d)}else{if(b>a){this.end(d)}}},onTouchEnd:function(a){this.end(a)},start:function(){if(!this.isTracking){this.isTracking=true;this.isStarted=false}},end:function(a){if(this.isTracking){this.isTracking=false;if(this.isStarted){this.isStarted=false;this.fireEnd(a)}}}});Ext.define("Ext.event.recognizer.Pinch",{extend:"Ext.event.recognizer.MultiTouch",requiredTouchesCount:2,handledEvents:["pinchstart","pinch","pinchend"],startDistance:0,lastTouches:null,onTouchMove:function(c){if(!this.isTracking){return}var b=Array.prototype.slice.call(c.touches),d,a,f;d=b[0].point;a=b[1].point;f=d.getDistanceTo(a);if(f===0){return}if(!this.isStarted){this.isStarted=true;this.startDistance=f;this.fire("pinchstart",c,b,{touches:b,distance:f,scale:1})}else{this.fire("pinch",c,b,{touches:b,distance:f,scale:f/this.startDistance})}this.lastTouches=b},fireEnd:function(a){this.fire("pinchend",a,this.lastTouches)},fail:function(){return this.callParent(arguments)}});Ext.define("Ext.event.recognizer.Rotate",{extend:"Ext.event.recognizer.MultiTouch",requiredTouchesCount:2,handledEvents:["rotatestart","rotate","rotateend"],startAngle:0,lastTouches:null,lastAngle:null,onTouchMove:function(h){if(!this.isTracking){return}var g=Array.prototype.slice.call(h.touches),b=this.lastAngle,d,f,c,a,i,j;d=g[0].point;f=g[1].point;c=d.getAngleTo(f);if(b!==null){j=Math.abs(b-c);a=c+360;i=c-360;if(Math.abs(a-b)<j){c=a}else{if(Math.abs(i-b)<j){c=i}}}this.lastAngle=c;if(!this.isStarted){this.isStarted=true;this.startAngle=c;this.fire("rotatestart",h,g,{touches:g,angle:c,rotation:0})}else{this.fire("rotate",h,g,{touches:g,angle:c,rotation:c-this.startAngle})}this.lastTouches=g},fireEnd:function(a){this.lastAngle=null;this.fire("rotateend",a,this.lastTouches)}});Ext.define("Ext.event.recognizer.SingleTouch",{extend:"Ext.event.recognizer.Touch",inheritableStatics:{NOT_SINGLE_TOUCH:1,TOUCH_MOVED:2},onTouchStart:function(a){if(a.touches.length>1){return this.fail(this.self.NOT_SINGLE_TOUCH)}}});Ext.define("Ext.event.recognizer.DoubleTap",{extend:"Ext.event.recognizer.SingleTouch",config:{maxDuration:300},handledEvents:["singletap","doubletap"],singleTapTimer:null,onTouchStart:function(a){if(this.callParent(arguments)===false){return false}this.startTime=a.time;clearTimeout(this.singleTapTimer)},onTouchMove:function(){return this.fail(this.self.TOUCH_MOVED)},onEnd:function(g){var c=this,b=this.getMaxDuration(),h=g.changedTouches[0],f=g.time,a=this.lastTapTime,d;this.lastTapTime=f;if(a){d=f-a;if(d<=b){this.lastTapTime=0;this.fire("doubletap",g,[h],{touch:h,duration:d});return}}if(f-this.startTime>b){this.fireSingleTap(g,h)}else{this.singleTapTimer=setTimeout(function(){c.fireSingleTap(g,h)},b)}},fireSingleTap:function(a,b){this.fire("singletap",a,[b],{touch:b})}});Ext.define("Ext.event.recognizer.Drag",{extend:"Ext.event.recognizer.SingleTouch",isStarted:false,startPoint:null,previousPoint:null,lastPoint:null,handledEvents:["dragstart","drag","dragend"],onTouchStart:function(b){var c,a;if(this.callParent(arguments)===false){if(this.isStarted&&this.lastMoveEvent!==null){this.onTouchEnd(this.lastMoveEvent)}return false}this.startTouches=c=b.changedTouches;this.startTouch=a=c[0];this.startPoint=a.point},onTouchMove:function(d){var c=d.changedTouches,f=c[0],a=f.point,b=d.time;if(this.lastPoint){this.previousPoint=this.lastPoint}if(this.lastTime){this.previousTime=this.lastTime}this.lastTime=b;this.lastPoint=a;this.lastMoveEvent=d;if(!this.isStarted){this.isStarted=true;this.startTime=b;this.previousTime=b;this.previousPoint=this.startPoint;this.fire("dragstart",d,this.startTouches,this.getInfo(d,this.startTouch))}else{this.fire("drag",d,c,this.getInfo(d,f))}},onTouchEnd:function(c){if(this.isStarted){var b=c.changedTouches,d=b[0],a=d.point;this.isStarted=false;this.lastPoint=a;this.fire("dragend",c,b,this.getInfo(c,d));this.startTime=0;this.previousTime=0;this.lastTime=0;this.startPoint=null;this.previousPoint=null;this.lastPoint=null;this.lastMoveEvent=null}},getInfo:function(j,i){var d=j.time,a=this.startPoint,f=this.previousPoint,b=this.startTime,k=this.previousTime,l=this.lastPoint,h=l.x-a.x,g=l.y-a.y,c={touch:i,startX:a.x,startY:a.y,previousX:f.x,previousY:f.y,pageX:l.x,pageY:l.y,deltaX:h,deltaY:g,absDeltaX:Math.abs(h),absDeltaY:Math.abs(g),previousDeltaX:l.x-f.x,previousDeltaY:l.y-f.y,time:d,startTime:b,previousTime:k,deltaTime:d-b,previousDeltaTime:d-k};return c}});Ext.define("Ext.event.recognizer.LongPress",{extend:"Ext.event.recognizer.SingleTouch",inheritableStatics:{DURATION_NOT_ENOUGH:32},config:{minDuration:1000},handledEvents:["longpress"],fireLongPress:function(a){var b=a.changedTouches[0];this.fire("longpress",a,[b],{touch:b,duration:this.getMinDuration()});this.isLongPress=true},onTouchStart:function(b){var a=this;if(this.callParent(arguments)===false){return false}this.isLongPress=false;this.timer=setTimeout(function(){a.fireLongPress(b)},this.getMinDuration())},onTouchMove:function(){return this.fail(this.self.TOUCH_MOVED)},onTouchEnd:function(){if(!this.isLongPress){return this.fail(this.self.DURATION_NOT_ENOUGH)}},fail:function(){clearTimeout(this.timer);return this.callParent(arguments)}},function(){});Ext.define("Ext.event.recognizer.Tap",{handledEvents:["tap"],extend:"Ext.event.recognizer.SingleTouch",onTouchMove:function(){return this.fail(this.self.TOUCH_MOVED)},onTouchEnd:function(a){var b=a.changedTouches[0];this.fire("tap",a,[b])}},function(){});(function(){function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,f){return c[f]})}Ext.DateExtras={now:Date.now||function(){return +new Date()},getElapsed:function(d,c){return Math.abs(d-(c||new Date()))},useStrict:false,formatCodeToRegex:function(d,c){var e=a.parseCodes[d];if(e){e=typeof e=="function"?e():e;a.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.String.escapeRegex(d)}},parseFunctions:{MS:function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var f=(d||"").match(e);return f?new Date(((f[1]||"")+f[2])*1):null}},parseRegexes:[],formatFunctions:{MS:function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},defaultFormat:"m/d/Y",getShortMonthName:function(c){return a.monthNames[c].substring(0,3)},getShortDayName:function(c){return a.dayNames[c].substring(0,3)},getMonthNumber:function(c){return a.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatCodes:{d:"Ext.String.leftPad(this.getDate(), 2, '0')",D:"Ext.Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Ext.Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"Ext.Date.getSuffix(this)",w:"this.getDay()",z:"Ext.Date.getDayOfYear(this)",W:"Ext.String.leftPad(Ext.Date.getWeekOfYear(this), 2, '0')",F:"Ext.Date.monthNames[this.getMonth()]",m:"Ext.String.leftPad(this.getMonth() + 1, 2, '0')",M:"Ext.Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"Ext.Date.getDaysInMonth(this)",L:"(Ext.Date.isLeapYear(this) ? 1 : 0)",o:"(this.getFullYear() + (Ext.Date.getWeekOfYear(this) == 1 && this.getMonth() > 0 ? +1 : (Ext.Date.getWeekOfYear(this) >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"Ext.String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"Ext.String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"Ext.String.leftPad(this.getHours(), 2, '0')",i:"Ext.String.leftPad(this.getMinutes(), 2, '0')",s:"Ext.String.leftPad(this.getSeconds(), 2, '0')",u:"Ext.String.leftPad(this.getMilliseconds(), 3, '0')",O:"Ext.Date.getGMTOffset(this)",P:"Ext.Date.getGMTOffset(this, true)",T:"Ext.Date.getTimezone(this)",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var j="Y-m-dTH:i:sP",g=[],f=0,d=j.length;f<d;++f){var h=j.charAt(f);g.push(h=="T"?"'T'":a.getFormatCode(h))}return g.join(" + ")},U:"Math.round(this.getTime() / 1000)"},isValid:function(n,c,l,j,f,g,e){j=j||0;f=f||0;g=g||0;e=e||0;var k=a.add(new Date(n<100?100:n,c-1,l,j,f,g,e),a.YEAR,n<100?n-100:0);return n==k.getFullYear()&&c==k.getMonth()+1&&l==k.getDate()&&j==k.getHours()&&f==k.getMinutes()&&g==k.getSeconds()&&e==k.getMilliseconds()},parse:function(d,f,c){var e=a.parseFunctions;if(e[f]==null){a.createParser(f)}return e[f](d,Ext.isDefined(c)?c:a.useStrict)},parseDate:function(d,e,c){return a.parse(d,e,c)},getFormatCode:function(d){var c=a.formatCodes[d];if(c){c=typeof c=="function"?c():c;a.formatCodes[d]=c}return c||("'"+Ext.String.escape(d)+"'")},createFormat:function(g){var f=[],c=false,e="";for(var d=0;d<g.length;++d){e=g.charAt(d);if(!c&&e=="\\"){c=true}else{if(c){c=false;f.push("'"+Ext.String.escape(e)+"'")}else{f.push(a.getFormatCode(e))}}}a.formatFunctions[g]=Ext.functionFactory("return "+f.join("+"))},createParser:(function(){var c=["var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,","def = Ext.Date.defaults,","results = String(input).match(Ext.Date.parseRegexes[{0}]);","if(results){","{1}","if(u != null){","v = new Date(u * 1000);","}else{","dt = Ext.Date.clearTime(new Date);","y = Ext.Number.from(y, Ext.Number.from(def.y, dt.getFullYear()));","m = Ext.Number.from(m, Ext.Number.from(def.m - 1, dt.getMonth()));","d = Ext.Number.from(d, Ext.Number.from(def.d, dt.getDate()));","h = Ext.Number.from(h, Ext.Number.from(def.h, dt.getHours()));","i = Ext.Number.from(i, Ext.Number.from(def.i, dt.getMinutes()));","s = Ext.Number.from(s, Ext.Number.from(def.s, dt.getSeconds()));","ms = Ext.Number.from(ms, Ext.Number.from(def.ms, dt.getMilliseconds()));","if(z >= 0 && y >= 0){","v = Ext.Date.add(new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (Ext.Date.isLeapYear(v) && z <= 365))? Ext.Date.add(v, Ext.Date.DAY, z) : null);","}else if(strict === true && !Ext.Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = Ext.Date.add(new Date(y < 100 ? 100 : y, m, d, h, i, s, ms), Ext.Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = Ext.Date.add(v, Ext.Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = Ext.Date.add(v, Ext.Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(l){var e=a.parseRegexes.length,m=1,f=[],k=[],j=false,d="";for(var h=0;h<l.length;++h){d=l.charAt(h);if(!j&&d=="\\"){j=true}else{if(j){j=false;k.push(Ext.String.escape(d))}else{var g=a.formatCodeToRegex(d,m);m+=g.g;k.push(g.s);if(g.g&&g.c){f.push(g.c)}}}}a.parseRegexes[e]=new RegExp("^"+k.join("")+"$","i");a.parseFunctions[l]=Ext.functionFactory("input","strict",b(c,e,f.join("")))}})(),parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function(){for(var c=[],d=0;d<7;c.push(a.getShortDayName(d)),++d){}return{g:0,c:null,s:"(?:"+c.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+a.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:1,c:"z = parseInt(results[{0}], 10);\n",s:"(\\d{1,3})"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Ext.Date.getMonthNumber(results[{0}]), 10);\n",s:"("+a.monthNames.join("|")+")"}},M:function(){for(var c=[],d=0;d<12;c.push(a.getShortMonthName(d)),++d){}return Ext.applyIf({s:"("+c.join("|")+")"},a.formatCodeToRegex("F"))},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return a.formatCodeToRegex("Y")},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\ny = ty > Ext.Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm|AM|PM)"},A:{g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)"},g:function(){return a.formatCodeToRegex("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a.formatCodeToRegex("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + Ext.String.leftPad(hr, 2, '0') + Ext.String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a.formatCodeToRegex("Y",1),a.formatCodeToRegex("m",2),a.formatCodeToRegex("d",3),a.formatCodeToRegex("h",4),a.formatCodeToRegex("i",5),a.formatCodeToRegex("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a.formatCodeToRegex("P",8).c,"}else{",a.formatCodeToRegex("O",8).c,"}","}"].join("\n")}];for(var f=0,d=c.length;f<d;++f){e.push(c[f].c)}return{g:1,c:e.join(""),s:[c[0].s,"(?:","-",c[1].s,"(?:","-",c[2].s,"(?:","(?:T| )?",c[3].s,":",c[4].s,"(?::",c[5].s,")?","(?:(?:\\.|,)(\\d+))?","(Z|(?:[-+]\\d{2}(?::)?\\d{2}))?",")?",")?",")?"].join("")}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}},dateFormat:function(c,d){return a.format(c,d)},format:function(d,e){if(a.formatFunctions[e]==null){a.createFormat(e)}var c=a.formatFunctions[e].call(d);return c+""},getTimezone:function(c){return c.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"")},getGMTOffset:function(c,d){var e=c.getTimezoneOffset();return(e>0?"-":"+")+Ext.String.leftPad(Math.floor(Math.abs(e)/60),2,"0")+(d?":":"")+Ext.String.leftPad(Math.abs(e%60),2,"0")},getDayOfYear:function(f){var e=0,h=Ext.Date.clone(f),c=f.getMonth(),g;for(g=0,h.setDate(1),h.setMonth(0);g<c;h.setMonth(++g)){e+=a.getDaysInMonth(h)}return e+f.getDate()-1},getWeekOfYear:(function(){var c=86400000,d=7*c;return function(f){var g=Date.UTC(f.getFullYear(),f.getMonth(),f.getDate()+3)/c,e=Math.floor(g/7),h=new Date(e*d).getUTCFullYear();return e-Math.floor(Date.UTC(h,0,7)/d)+1}})(),isLeapYear:function(c){var d=c.getFullYear();return !!((d&3)==0&&(d%100||(d%400==0&&d)))},getFirstDayOfMonth:function(d){var c=(d.getDay()-(d.getDate()-1))%7;return(c<0)?(c+7):c},getLastDayOfMonth:function(c){return a.getLastDateOfMonth(c).getDay()},getFirstDateOfMonth:function(c){return new Date(c.getFullYear(),c.getMonth(),1)},getLastDateOfMonth:function(c){return new Date(c.getFullYear(),c.getMonth(),a.getDaysInMonth(c))},getDaysInMonth:(function(){var c=[31,28,31,30,31,30,31,31,30,31,30,31];return function(e){var d=e.getMonth();return d==1&&a.isLeapYear(e)?29:c[d]}})(),getSuffix:function(c){switch(c.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},clone:function(c){return new Date(c.getTime())},isDST:function(c){return new Date(c.getFullYear(),0,1).getTimezoneOffset()!=c.getTimezoneOffset()},clearTime:function(e,i){if(i){return Ext.Date.clearTime(Ext.Date.clone(e))}var g=e.getDate();e.setHours(0);e.setMinutes(0);e.setSeconds(0);e.setMilliseconds(0);if(e.getDate()!=g){for(var f=1,h=a.add(e,Ext.Date.HOUR,f);h.getDate()!=g;f++,h=a.add(e,Ext.Date.HOUR,f)){}e.setDate(g);e.setHours(h.getHours())}return e},add:function(g,f,h){var i=Ext.Date.clone(g),c=Ext.Date;if(!f||h===0){return i}switch(f.toLowerCase()){case Ext.Date.MILLI:i.setMilliseconds(i.getMilliseconds()+h);break;case Ext.Date.SECOND:i.setSeconds(i.getSeconds()+h);break;case Ext.Date.MINUTE:i.setMinutes(i.getMinutes()+h);break;case Ext.Date.HOUR:i.setHours(i.getHours()+h);break;case Ext.Date.DAY:i.setDate(i.getDate()+h);break;case Ext.Date.MONTH:var e=g.getDate();if(e>28){e=Math.min(e,Ext.Date.getLastDateOfMonth(Ext.Date.add(Ext.Date.getFirstDateOfMonth(g),"mo",h)).getDate())}i.setDate(e);i.setMonth(g.getMonth()+h);break;case Ext.Date.YEAR:i.setFullYear(g.getFullYear()+h);break}return i},between:function(d,f,c){var e=d.getTime();return f.getTime()<=e&&e<=c.getTime()}};var a=Ext.DateExtras;Ext.apply(Ext.Date,a)})();Ext.define("Ext.fx.Easing",{requires:["Ext.fx.easing.Linear"],constructor:function(a){return Ext.factory(a,Ext.fx.easing.Linear,null,"easing")}});Ext.define("Ext.fx.easing.BoundMomentum",{extend:"Ext.fx.easing.Abstract",requires:["Ext.fx.easing.Momentum","Ext.fx.easing.Bounce"],config:{momentum:null,bounce:null,minMomentumValue:0,maxMomentumValue:0,minVelocity:0.01,startVelocity:0},applyMomentum:function(a,b){return Ext.factory(a,Ext.fx.easing.Momentum,b)},applyBounce:function(a,b){return Ext.factory(a,Ext.fx.easing.Bounce,b)},updateStartTime:function(a){this.getMomentum().setStartTime(a);this.callParent(arguments)},updateStartVelocity:function(a){this.getMomentum().setStartVelocity(a)},updateStartValue:function(a){this.getMomentum().setStartValue(a)},reset:function(){this.lastValue=null;this.isBouncingBack=false;this.isOutOfBound=false;return this.callParent(arguments)},getValue:function(){var a=this.getMomentum(),j=this.getBounce(),e=a.getStartVelocity(),f=e>0?1:-1,g=this.getMinMomentumValue(),d=this.getMaxMomentumValue(),c=(f==1)?d:g,h=this.lastValue,i,b;if(e===0){return this.getStartValue()}if(!this.isOutOfBound){i=a.getValue();b=a.getVelocity();if(Math.abs(b)<this.getMinVelocity()){this.isEnded=true}if(i>=g&&i<=d){return i}this.isOutOfBound=true;j.setStartTime(Ext.Date.now()).setStartVelocity(b).setStartValue(c)}i=j.getValue();if(!this.isEnded){if(!this.isBouncingBack){if(h!==null){if((f==1&&i<h)||(f==-1&&i>h)){this.isBouncingBack=true}}}else{if(Math.round(i)==c){this.isEnded=true}}}this.lastValue=i;return i}});Ext.define("Ext.fx.easing.EaseIn",{extend:"Ext.fx.easing.Linear",alias:"easing.ease-in",config:{exponent:4,duration:1500},getValue:function(){var c=Ext.Date.now()-this.getStartTime(),g=this.getDuration(),b=this.getStartValue(),a=this.getEndValue(),h=this.distance,e=c/g,d=Math.pow(e,this.getExponent()),f=b+(d*h);if(c>=g){this.isEnded=true;return a}return f}});Ext.define("Ext.fx.easing.EaseOut",{extend:"Ext.fx.easing.Linear",alias:"easing.ease-out",config:{exponent:4,duration:1500},getValue:function(){var f=Ext.Date.now()-this.getStartTime(),d=this.getDuration(),b=this.getStartValue(),h=this.getEndValue(),a=this.distance,c=f/d,g=1-c,e=1-Math.pow(g,this.getExponent()),i=b+(e*a);if(f>=d){this.isEnded=true;return h}return i}});Ext.define("Ext.mixin.Filterable",{extend:"Ext.mixin.Mixin",requires:["Ext.util.Filter"],mixinConfig:{id:"filterable"},config:{filters:null,filterRoot:null},dirtyFilterFn:false,filterFn:null,filtered:false,applyFilters:function(a,b){if(!b){b=this.createFiltersCollection()}b.clear();this.filtered=false;this.dirtyFilterFn=true;if(a){this.addFilters(a)}return b},createFiltersCollection:function(){this._filters=Ext.create("Ext.util.Collection",function(a){return a.getId()});return this._filters},addFilter:function(a){this.addFilters([a])},addFilters:function(b){var a=this.getFilters();return this.insertFilters(a?a.length:0,b)},insertFilter:function(a,b){return this.insertFilters(a,[b])},insertFilters:function(h,c){if(!Ext.isArray(c)){c=[c]}var j=c.length,a=this.getFilterRoot(),d=this.getFilters(),e=[],f,g,b;if(!d){d=this.createFiltersCollection()}for(g=0;g<j;g++){b=c[g];f={root:a};if(Ext.isFunction(b)){f.filterFn=b}else{if(Ext.isObject(b)){if(!b.isFilter){if(b.fn){b.filterFn=b.fn;delete b.fn}f=Ext.apply(f,b)}else{e.push(b);if(!b.getRoot()){b.setRoot(a)}continue}}}b=Ext.create("Ext.util.Filter",f);e.push(b)}for(g=0,j=e.length;g<j;g++){d.insert(h+g,e[g])}this.dirtyFilterFn=true;if(d.length){this.filtered=true}return d},removeFilters:function(e){if(!Ext.isArray(e)){e=[e]}var d=e.length,c=this.getFilters(),a,b;for(a=0;a<d;a++){b=e[a];if(typeof b==="string"){c.each(function(f){if(f.getProperty()===b){c.remove(f)}})}else{if(typeof b==="function"){c.each(function(f){if(f.getFilterFn()===b){c.remove(f)}})}else{if(b.isFilter){c.remove(b)}else{if(b.property!==undefined&&b.value!==undefined){c.each(function(f){if(f.getProperty()===b.property&&f.getValue()===b.value){c.remove(f)}})}}}}}if(!c.length){this.filtered=false}},updateFilterFn:function(){var a=this.getFilters().items;this.filterFn=function(h){var f=true,g=a.length,b;for(b=0;b<g;b++){var e=a[b],d=e.getFilterFn(),c=e.getScope()||this;f=f&&d.call(c,h)}return f};this.dirtyFilterFn=false;return this.filterFn},filter:function(a){return this.getFilters().length?Ext.Array.filter(a,this.getFilterFn()):a},isFiltered:function(a){return this.getFilters().length?!this.getFilterFn()(a):false},getFilterFn:function(){if(this.dirtyFilterFn){return this.updateFilterFn()}return this.filterFn}});Ext.define("Ext.mixin.Observable",{requires:["Ext.event.Dispatcher"],extend:"Ext.mixin.Mixin",mixins:["Ext.mixin.Identifiable"],mixinConfig:{id:"observable",hooks:{destroy:"destroy"}},alternateClassName:"Ext.util.Observable",isObservable:true,observableType:"observable",validIdRegex:/^([\w\-]+)$/,observableIdPrefix:"#",listenerOptionsRegex:/^(?:delegate|single|delay|buffer|args|prepend)$/,config:{listeners:null,bubbleEvents:null},constructor:function(a){this.initConfig(a)},applyListeners:function(a){if(a){this.addListener(a)}},applyBubbleEvents:function(a){if(a){this.enableBubble(a)}},getOptimizedObservableId:function(){return this.observableId},getObservableId:function(){if(!this.observableId){var a=this.getUniqueId();this.observableId=this.observableIdPrefix+a;this.getObservableId=this.getOptimizedObservableId}return this.observableId},getOptimizedEventDispatcher:function(){return this.eventDispatcher},getEventDispatcher:function(){if(!this.eventDispatcher){this.eventDispatcher=Ext.event.Dispatcher.getInstance();this.getEventDispatcher=this.getOptimizedEventDispatcher;this.getListeners();this.getBubbleEvents()}return this.eventDispatcher},getManagedListeners:function(c,b){var d=c.getUniqueId(),a=this.managedListeners;if(!a){this.managedListeners=a={}}if(!a[d]){a[d]={};c.doAddListener("destroy","clearManagedListeners",this,{single:true,args:[c]})}if(!a[d][b]){a[d][b]=[]}return a[d][b]},getUsedSelectors:function(){var a=this.usedSelectors;if(!a){a=this.usedSelectors=[];a.$map={}}return a},fireEvent:function(a){var b=Array.prototype.slice.call(arguments,1);return this.doFireEvent(a,b)},fireAction:function(c,e,g,f,d,a){var b=typeof g,h;if(e===undefined){e=[]}if(b!="undefined"){h={fn:g,isLateBinding:b=="string",scope:f||this,options:d||{},order:a}}return this.doFireEvent(c,e,h)},doFireEvent:function(b,c,e,a){if(this.eventFiringSuspended){return}var f=this.getObservableId(),d=this.getEventDispatcher();return d.dispatchEvent(this.observableType,f,b,c,e,a)},doAddListener:function(a,i,k,l,c){var e=(k&&k!==this&&k.isIdentifiable),b=this.getUsedSelectors(),f=b.$map,d=this.getObservableId(),g,j,h;if(!l){l={}}if(!k){k=this}if(l.delegate){h=l.delegate;d+=" "+h}if(!(d in f)){f[d]=true;b.push(d)}g=this.addDispatcherListener(d,a,i,k,l,c);if(g&&e){j=this.getManagedListeners(k,a);j.push({delegate:h,scope:k,fn:i,order:c})}return g},addDispatcherListener:function(b,d,f,e,c,a){return this.getEventDispatcher().addListener(this.observableType,b,d,f,e,c,a)},doRemoveListener:function(b,k,m,n,d){var g=(m&&m!==this&&m.isIdentifiable),e=this.getObservableId(),a,l,f,h,c,j;if(n&&n.delegate){j=n.delegate;e+=" "+j}if(!m){m=this}a=this.removeDispatcherListener(e,b,k,m,d);if(a&&g){l=this.getManagedListeners(m,b);for(f=0,h=l.length;f<h;f++){c=l[f];if(c.fn===k&&c.scope===m&&c.delegate===j&&c.order===d){l.splice(f,1);break}}}return a},removeDispatcherListener:function(b,c,e,d,a){return this.getEventDispatcher().removeListener(this.observableType,b,c,e,d,a)},clearManagedListeners:function(d){var j=this.managedListeners,a,c,h,f,e,g,b,k;if(!j){return this}if(d){if(typeof d!="string"){a=d.getUniqueId()}else{a=d}c=j[a];for(f in c){if(c.hasOwnProperty(f)){h=c[f];for(e=0,g=h.length;e<g;e++){b=h[e];k={};if(b.delegate){k.delegate=b.delegate}if(this.doRemoveListener(f,b.fn,b.scope,k,b.order)){e--;g--}}}}delete j[a];return this}for(a in j){if(j.hasOwnProperty(a)){this.clearManagedListeners(a)}}},changeListener:function(l,h,n,p,q,d){var b,m,g,j,a,o,f,k,c,e;if(typeof n!="undefined"){if(typeof h!="string"){for(f=0,k=h.length;f<k;f++){a=h[f];l.call(this,a,n,p,q,d)}return this}l.call(this,h,n,p,q,d)}else{if(Ext.isArray(h)){m=h;for(f=0,k=m.length;f<k;f++){c=m[f];l.call(this,c.event,c.fn,c.scope,c,c.order)}}else{g=this.listenerOptionsRegex;q=h;b=[];m=[];j={};for(a in q){o=q[a];if(a==="scope"){p=o;continue}else{if(a==="order"){d=o;continue}}if(!g.test(a)){e=typeof o;if(e!="string"&&e!="function"){l.call(this,a,o.fn,o.scope||p,o,o.order||d);continue}b.push(a);m.push(o)}else{j[a]=o}}for(f=0,k=b.length;f<k;f++){l.call(this,b[f],m[f],p,j,d)}}}},addListener:function(b,e,d,c,a){return this.changeListener(this.doAddListener,b,e,d,c,a)},addBeforeListener:function(a,d,c,b){return this.addListener(a,d,c,b,"before")},addAfterListener:function(a,d,c,b){return this.addListener(a,d,c,b,"after")},removeListener:function(b,e,d,c,a){return this.changeListener(this.doRemoveListener,b,e,d,c,a)},removeBeforeListener:function(a,d,c,b){return this.removeListener(a,d,c,b,"before")},removeAfterListener:function(a,d,c,b){return this.removeListener(a,d,c,b,"after")},clearListeners:function(){var e=this.getUsedSelectors(),c=this.getEventDispatcher(),b,d,a;for(b=0,d=e.length;b<d;b++){a=e[b];c.clearListeners(this.observableType,a)}},hasListener:function(a){return this.getEventDispatcher().hasListener(this.observableType,this.getObservableId(),a)},suspendEvents:function(a){this.eventFiringSuspended=true},resumeEvents:function(){this.eventFiringSuspended=false},relayEvents:function(b,d,g){var c,f,e,a;if(typeof g=="undefined"){g=""}if(typeof d=="string"){d=[d]}if(Ext.isArray(d)){for(c=0,f=d.length;c<f;c++){e=d[c];a=g+e;b.addListener(e,this.createEventRelayer(a),this)}}else{for(e in d){if(d.hasOwnProperty(e)){a=g+d[e];b.addListener(e,this.createEventRelayer(a),this)}}}return this},relayEvent:function(e,f,h,i,a){var g=typeof f,c=e[e.length-1],d=c.getInfo().eventName,b;e=Array.prototype.slice.call(e,0,-2);e[0]=this;if(g!="undefined"){b={fn:f,scope:h||this,options:i||{},order:a,isLateBinding:g=="string"}}return this.doFireEvent(d,e,b,c)},createEventRelayer:function(a){return function(){return this.doFireEvent(a,Array.prototype.slice.call(arguments,0,-2))}},enableBubble:function(d){var a=this.isBubblingEnabled,c,e,b;if(!a){a=this.isBubblingEnabled={}}if(typeof d=="string"){d=Ext.Array.clone(arguments)}for(c=0,e=d.length;c<e;c++){b=d[c];if(!a[b]){a[b]=true;this.addListener(b,this.createEventBubbler(b),this)}}},createEventBubbler:function(a){return function b(){var c=("getBubbleTarget" in this)?this.getBubbleTarget():null;if(c&&c!==this&&c.isObservable){c.fireAction(a,Array.prototype.slice.call(arguments,0,-2),b,c,null,"after")}}},getBubbleTarget:function(){return false},destroy:function(){if(this.observableId){this.fireEvent("destroy",this);this.clearListeners();this.clearManagedListeners()}},addEvents:Ext.emptyFn},function(){this.createAlias({on:"addListener",un:"removeListener",onBefore:"addBeforeListener",onAfter:"addAfterListener",unBefore:"removeBeforeListener",unAfter:"removeAfterListener"})});Ext.define("Ext.Evented",{alternateClassName:"Ext.EventedBase",mixins:["Ext.mixin.Observable"],statics:{generateSetter:function(e){var c=e.internal,b=e.apply,a=e.changeEvent,d=e.doSet;return function(h){var i=this.initialized,g=this[c],f=this[b];if(f){h=f.call(this,h,g);if(typeof h=="undefined"){return this}}if(h!==g){if(i){this.fireAction(a,[this,h,g],this.doSet,this,{nameMap:e})}else{this[c]=h;this[d].call(this,h,g)}}return this}}},initialized:false,constructor:function(a){this.initialConfig=a;this.initialize()},initialize:function(){this.initConfig(this.initialConfig);this.initialized=true},doSet:function(c,d,b,a){var e=a.nameMap;c[e.internal]=d;c[e.doSet].call(this,d,b)},onClassExtended:function(a,e){if(!e.hasOwnProperty("eventedConfig")){return}var d=Ext.Class,c=e.config,g=e.eventedConfig,b,f;e.config=(c)?Ext.applyIf(c,g):g;for(b in g){if(g.hasOwnProperty(b)){f=d.getConfigNameMap(b);e[f.set]=this.generateSetter(f)}}}});Ext.define("Ext.AbstractComponent",{extend:"Ext.Evented",onClassExtended:function(b,f){if(!f.hasOwnProperty("cachedConfig")){return}var g=b.prototype,c=f.config,e=f.cachedConfig,d=g.cachedConfigList,i=g.hasCachedConfig,a,h;delete f.cachedConfig;g.cachedConfigList=d=(d)?d.slice():[];g.hasCachedConfig=i=(i)?Ext.Object.chain(i):{};if(!c){f.config=c={}}for(a in e){if(e.hasOwnProperty(a)){h=e[a];if(!i[a]){i[a]=true;d.push(a)}c[a]=h}}},getElementConfig:Ext.emptyFn,referenceAttributeName:"reference",referenceSelector:"[reference]",addReferenceNode:function(a,b){Ext.Object.defineProperty(this,a,{get:function(){var c;delete this[a];this[a]=c=new Ext.Element(b);return c},configurable:true})},initElement:function(){var k=this.self.prototype,n=this.getId(),s=[],g=true,x=this.referenceAttributeName,p=false,e,v,b,o,t,d,l,c,f,j,w,m,a,q,h,y,u,r;if(k.hasOwnProperty("renderTemplate")){e=this.renderTemplate.cloneNode(true);v=e.firstChild}else{g=false;p=true;e=document.createDocumentFragment();v=Ext.Element.create(this.getElementConfig(),true);e.appendChild(v)}o=e.querySelectorAll(this.referenceSelector);for(t=0,d=o.length;t<d;t++){l=o[t];c=l.getAttribute(x);if(g){l.removeAttribute(x)}if(c=="element"){l.id=n;this.element=b=new Ext.Element(l)}else{this.addReferenceNode(c,l)}s.push(c)}this.referenceList=s;if(!this.innerElement){this.innerElement=b}if(v===b.dom){this.renderElement=b}else{this.addReferenceNode("renderElement",v)}if(p){f=Ext.Class.configNameCache;j=this.config;w=this.cachedConfigList;m=this.initConfigList;a=this.initConfigMap;q=[];for(t=0,d=w.length;t<d;t++){y=w[t];u=f[y];if(a[y]){a[y]=false;Ext.Array.remove(m,y)}if(j[y]!==null){q.push(y);this[u.get]=this[u.initGet]}}for(t=0,d=q.length;t<d;t++){y=q[t];u=f[y];r=u.internal;this[r]=null;this[u.set].call(this,j[y]);delete this[u.get];k[r]=this[r]}v=this.renderElement.dom;k.renderTemplate=e=document.createDocumentFragment();e.appendChild(v.cloneNode(true));h=e.querySelectorAll("[id]");for(t=0,d=h.length;t<d;t++){b=h[t];b.removeAttribute("id")}for(t=0,d=s.length;t<d;t++){c=s[t];this[c].dom.removeAttribute("reference")}}return this}});Ext.define("Ext.app.Controller",{mixins:{observable:"Ext.mixin.Observable"},config:{refs:{},routes:{},control:{},before:{},application:{},stores:[],models:[],views:[]},constructor:function(a){this.initConfig(a);this.mixins.observable.constructor.call(this,a)},init:Ext.emptyFn,launch:Ext.emptyFn,redirectTo:function(a){return this.getApplication().redirectTo(a)},execute:function(b,a){b.setBeforeFilters(this.getBefore()[b.getAction()]);b.execute()},applyBefore:function(e){var d,a,c,b;for(a in e){d=Ext.Array.from(e[a]);c=d.length;for(b=0;b<c;b++){d[b]=this[d[b]]}e[a]=d}return e},applyControl:function(a){this.control(a,this);return a},applyRefs:function(a){this.ref(a);return a},applyRoutes:function(a){var f=this instanceof Ext.app.Application?this:this.getApplication(),c=f.getRouter(),b,e,d;for(e in a){b=a[e];d={controller:this.$className};if(Ext.isString(b)){d.action=b}else{Ext.apply(d,b)}c.connect(e,d)}return a},applyStores:function(a){return this.getFullyQualified(a,"store")},applyModels:function(a){return this.getFullyQualified(a,"model")},applyViews:function(a){return this.getFullyQualified(a,"view")},getFullyQualified:function(b,e){var f=b.length,a=this.getApplication().getName(),c,d;for(d=0;d<f;d++){c=b[d];if(Ext.isString(c)&&(Ext.Loader.getPrefix(c)===""||c===a)){b[d]=a+"."+e+"."+c}}return b},control:function(a){this.getApplication().control(a,this)},ref:function(b){var e,c,a,d;for(e in b){a=b[e];c="get"+Ext.String.capitalize(e);if(!this[c]){if(Ext.isString(b[e])){d={ref:e,selector:a}}else{d=b[e]}this[c]=Ext.Function.pass(this.getRef,[e,d],this)}this.references=this.references||[];this.references.push(e.toLowerCase())}},getRef:function(d,e,a){this.refCache=this.refCache||{};e=e||{};a=a||{};Ext.apply(e,a);if(e.forceCreate){return Ext.ComponentManager.create(e,"component")}var c=this,b=c.refCache[d];if(!b){c.refCache[d]=b=Ext.ComponentQuery.query(e.selector)[0];if(!b&&e.autoCreate){c.refCache[d]=b=Ext.ComponentManager.create(e,"component")}if(b){b.on("destroy",function(){c.refCache[d]=null})}}return b},hasRef:function(a){return this.references&&this.references.indexOf(a.toLowerCase())!==-1},},function(){});Ext.define("Ext.app.History",{mixins:["Ext.mixin.Observable"],config:{actions:[],updateUrl:true,token:""},constructor:function(a){if(Ext.feature.has.History){window.addEventListener("hashchange",Ext.bind(this.detectStateChange,this))}else{setInterval(Ext.bind(this.detectStateChange,this),50)}this.initConfig(a)},add:function(c,a){this.getActions().push(Ext.factory(c,Ext.app.Action));var b=c.getUrl();if(this.getUpdateUrl()){this.setToken(b);window.location.hash=b}if(a!==true){this.fireEvent("change",b)}this.setToken(b)},back:function(){this.getActions().pop().run()},applyToken:function(a){return a[0]=="#"?a.substr(1):a},detectStateChange:function(){var b=this.applyToken(window.location.hash),a=this.getToken();if(b!=a){this.onStateChange();this.setToken(b)}},onStateChange:function(){this.fireEvent("change",window.location.hash.substr(1))}});Ext.define("Ext.app.Profile",{mixins:{observable:"Ext.mixin.Observable"},config:{namespace:"auto",name:"auto",controllers:[],models:[],views:[],stores:[],application:null},constructor:function(a){this.initConfig(a);this.mixins.observable.constructor.apply(this,arguments)},isActive:function(){return false},launch:Ext.emptyFn,applyNamespace:function(a){if(a=="auto"){a=this.getName()}return a.toLowerCase()},applyName:function(a){if(a=="auto"){var b=this.$className.split(".");a=b[b.length-1]}return a},getDependencies:function(){var c=[],g=Ext.String.format,b=this.getApplication().getName(),d=this.getNamespace(),f={model:this.getModels(),view:this.getViews(),controller:this.getControllers(),store:this.getStores()},e,h,a;for(e in f){h=[];Ext.each(f[e],function(i){if(Ext.isString(i)){if(i.match("\\.")){a=i}else{a=g("{0}.{1}.{2}.{3}",b,e,d,i)}h.push(a);c.push(a)}});f[e]=h}f.all=c;return f}});Ext.define("Ext.app.Application",{extend:"Ext.app.Controller",requires:["Ext.app.History","Ext.app.Profile","Ext.app.Router","Ext.app.Action"],config:{profiles:[],controllers:[],history:{},name:null,appFolder:"app",router:{},controllerInstances:[],profileInstances:[],currentProfile:null,launch:Ext.emptyFn,enableLoader:true},constructor:function(a){a=a||{};Ext.applyIf(a,{application:this});this.initConfig(a);for(var b in a){this[b]=a[b]}if(this.getEnableLoader()!==false){Ext.require(this.getProfiles(),this.onProfilesLoaded,this)}},dispatch:function(e,d){e=e||{};Ext.applyIf(e,{application:this});e=Ext.factory(e,Ext.app.Action);if(e){var c=this.getCurrentProfile(),b=c?c.getNamespace():undefined,a=this.getController(e.getController(),b);if(a){if(d!==false){this.getHistory().add(e,true)}a.execute(e)}}},redirectTo:function(c){if(Ext.data&&Ext.data.Model&&c instanceof Ext.data.Model){var a=c;c=a.toUrl()}var b=this.getRouter().recognize(c);if(b){b.url=c;if(a){b.data={};b.data.record=a}return this.dispatch(b)}},control:function(h,d){d=d||this;var i=this.getEventDispatcher(),g=(d)?d.getRefs():{},c,e,b,f,a;for(c in h){if(h.hasOwnProperty(c)){f=h[c];a=g[c];if(a){c=a.selector||a}for(e in f){b=f[e];if(Ext.isString(b)){b=d[b]}i.addListener("component",c,e,b,d)}}}},getController:function(b,d){var f=this.getControllerInstances(),a=this.getName(),e=Ext.String.format,c;if(b instanceof Ext.app.Controller){return b}if(f[b]){return f[b]}else{c=e("{0}.controller.{1}",a,b);d=e("{0}.controller.{1}.{2}",a,d,b);return f[d]||f[c]}},onProfilesLoaded:function(){var b=this.getProfiles(),e=b.length,g=[],d=this.gatherDependencies(),f,c,a;for(c=0;c<e;c++){g[c]=Ext.create(b[c],{application:this});a=g[c].getDependencies();d=d.concat(a.all);if(g[c].isActive()&&!f){f=g[c];this.setCurrentProfile(f);this.setControllers(this.getControllers().concat(a.controller));this.setModels(this.getModels().concat(a.model));this.setViews(this.getViews().concat(a.view));this.setStores(this.getStores().concat(a.store))}}this.setProfileInstances(g);Ext.require(d,this.loadControllerDependencies,this)},loadControllerDependencies:function(){this.instantiateStores();this.instantiateControllers();var e=this.getControllerInstances(),d=[],c,a,b;for(b in e){a=e[b];d=d.concat(a.getModels().concat(a.getViews()).concat(a.getStores()))}Ext.require(d,this.onDependenciesLoaded,this)},onDependenciesLoaded:function(){var c=this,b=this.getCurrentProfile(),e=this.getLaunch(),d,a;d=this.getControllerInstances();for(a in d){d[a].init(this)}if(b){b.launch()}e.call(c);for(a in d){d[a].launch(this)}c.redirectTo(window.location.hash.substr(1))},gatherDependencies:function(){var a=this.getModels().concat(this.getViews()).concat(this.getControllers());Ext.each(this.getStores(),function(b){if(Ext.isString(b)){a.push(b)}},this);return a},instantiateStores:function(){var b=this.getStores(),f=b.length,c,a,d,g,e;for(e=0;e<f;e++){c=b[e];if(Ext.data&&Ext.data.Store&&!(c instanceof Ext.data.Store)){if(Ext.isString(c)){d=c;a=Ext.ClassManager.classes[c];c={xclass:c};if(a.prototype.defaultConfig.storeId===undefined){g=d.split(".");c.id=g[g.length-1]}}b[e]=Ext.factory(c,Ext.data.Store)}}this.setStores(b)},instantiateControllers:function(){var e=this.getControllers(),d={},c=e.length,a,b;for(b=0;b<c;b++){a=e[b];d[a]=Ext.create(a,{application:this})}return this.setControllerInstances(d)},applyControllers:function(a){return this.getFullyQualified(a,"controller")},applyProfiles:function(a){return this.getFullyQualified(a,"profile")},applyName:function(a){var b;if(a&&a.match(/ /g)){b=a;a=a.replace(/ /g,"")}return a},updateName:function(a){Ext.ClassManager.setNamespace(a+".app",this);if(!Ext.Loader.config.paths[a]){Ext.Loader.setPath(a,this.getAppFolder())}},applyRouter:function(a){return Ext.factory(a,Ext.app.Router,this.getRouter())},applyHistory:function(a){var b=Ext.factory(a,Ext.app.History,this.getHistory());b.on("change",this.onHistoryChange,this);return b},onHistoryChange:function(a){this.dispatch(this.getRouter().recognize(a),false)}},function(){});Ext.define("Ext.data.Batch",{mixins:{observable:"Ext.mixin.Observable"},config:{autoStart:false,pauseOnException:true,proxy:null},current:-1,total:0,isRunning:false,isComplete:false,hasException:false,constructor:function(a){var b=this;b.initConfig(a);b.operations=[]},add:function(a){this.total++;a.setBatch(this);this.operations.push(a)},start:function(){this.hasException=false;this.isRunning=true;this.runNextOperation()},runNextOperation:function(){this.runOperation(this.current+1)},pause:function(){this.isRunning=false},runOperation:function(d){var e=this,c=e.operations,b=c[d],a;if(b===undefined){e.isRunning=false;e.isComplete=true;e.fireEvent("complete",e,c[c.length-1])}else{e.current=d;a=function(f){var g=f.hasException();if(g){e.hasException=true;e.fireEvent("exception",e,f)}else{e.fireEvent("operationcomplete",e,f)}if(g&&e.getPauseOnException()){e.pause()}else{f.setCompleted();e.runNextOperation()}};b.setStarted();e.getProxy()[b.getAction()](b,a,e)}}});Ext.define("Ext.data.Connection",{mixins:{observable:"Ext.util.Observable"},statics:{requestId:0},config:{url:null,async:true,method:null,username:"",password:"",disableCaching:true,disableCachingParam:"_dc",timeout:30000,extraParams:null,defaultHeaders:null,useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",autoAbort:false},textAreaRe:/textarea/i,multiPartRe:/multipart\/form-data/i,lineBreakRe:/\r\n/g,constructor:function(a){this.initConfig(a);this.requests={}},request:function(j){j=j||{};var f=this,i=j.scope||window,e=j.username||f.getUsername(),g=j.password||f.getPassword()||"",b,c,d,a,h;if(f.fireEvent("beforerequest",f,j)!==false){c=f.setOptions(j,i);if(this.isFormUpload(j)===true){this.upload(j.form,c.url,c.data,j);return null}if(j.autoAbort===true||f.getAutoAbort()){f.abort()}h=this.getXhrInstance();b=j.async!==false?(j.async||f.getAsync()):false;if(e){h.open(c.method,c.url,b,e,g)}else{h.open(c.method,c.url,b)}a=f.setupHeaders(h,j,c.data,c.params);d={id:++this.self.requestId,xhr:h,headers:a,options:j,async:b,timeout:setTimeout(function(){d.timedout=true;f.abort(d)},j.timeout||f.getTimeout())};f.requests[d.id]=d;if(b){h.onreadystatechange=Ext.Function.bind(f.onStateChange,f,[d])}h.send(c.data);if(!b){return this.onComplete(d)}return d}else{Ext.callback(j.callback,j.scope,[j,undefined,undefined]);return null}},upload:function(e,c,i,k){e=Ext.getDom(e);k=k||{};var d=Ext.id(),g=document.createElement("iframe"),j=[],h="multipart/form-data",f={target:e.target,method:e.method,encoding:e.encoding,enctype:e.enctype,action:e.action},b=function(l,m){a=document.createElement("input");Ext.fly(a).set({type:"hidden",value:m,name:l});e.appendChild(a);j.push(a)},a;Ext.fly(g).set({id:d,name:d,cls:Ext.baseCSSPrefix+"hide-display",src:Ext.SSL_SECURE_URL});document.body.appendChild(g);if(document.frames){document.frames[d].name=d}Ext.fly(e).set({target:d,method:"POST",enctype:h,encoding:h,action:c||f.action});if(i){Ext.iterate(Ext.Object.fromQueryString(i),function(l,m){if(Ext.isArray(m)){Ext.each(m,function(n){b(l,n)})}else{b(l,m)}})}Ext.fly(g).on("load",Ext.Function.bind(this.onUploadComplete,this,[g,k]),null,{single:true});e.submit();Ext.fly(e).set(f);Ext.each(j,function(l){Ext.removeNode(l)})},onUploadComplete:function(h,b){var c=this,a={responseText:"",responseXML:null},g,f;try{g=h.contentWindow.document||h.contentDocument||window.frames[id].document;if(g){if(g.body){if(this.textAreaRe.test((f=g.body.firstChild||{}).tagName)){a.responseText=f.value}else{a.responseText=g.body.innerHTML}}a.responseXML=g.XMLDocument||g}}catch(d){}c.fireEvent("requestcomplete",c,a,b);Ext.callback(b.success,b.scope,[a,b]);Ext.callback(b.callback,b.scope,[b,true,a]);setTimeout(function(){Ext.removeNode(h)},100)},isFormUpload:function(a){var b=this.getForm(a);if(b){return(a.isUpload||(this.multiPartRe).test(b.getAttribute("enctype")))}return false},getForm:function(a){return Ext.getDom(a.form)||null},setOptions:function(k,j){var h=this,e=k.params||{},g=h.getExtraParams(),d=k.urlParams,c=k.url||h.getUrl(),i=k.jsonData,b,a,f;if(Ext.isFunction(e)){e=e.call(j,k)}if(Ext.isFunction(c)){c=c.call(j,k)}c=this.setupUrl(k,c);f=k.rawData||k.xmlData||i||null;if(i&&!Ext.isPrimitive(i)){f=Ext.encode(f)}if(Ext.isObject(e)){e=Ext.Object.toQueryString(e)}if(Ext.isObject(g)){g=Ext.Object.toQueryString(g)}e=e+((g)?((e)?"&":"")+g:"");d=Ext.isObject(d)?Ext.Object.toQueryString(d):d;e=this.setupParams(k,e);b=(k.method||h.getMethod()||((e||f)?"POST":"GET")).toUpperCase();this.setupMethod(k,b);a=k.disableCaching!==false?(k.disableCaching||h.getDisableCaching()):false;if(b==="GET"&&a){c=Ext.urlAppend(c,(k.disableCachingParam||h.getDisableCachingParam())+"="+(new Date().getTime()))}if((b=="GET"||f)&&e){c=Ext.urlAppend(c,e);e=null}if(d){c=Ext.urlAppend(c,d)}return{url:c,method:b,data:f||e||null}},setupUrl:function(b,a){var c=this.getForm(b);if(c){a=a||c.action}return a},setupParams:function(a,d){var c=this.getForm(a),b;if(c&&!this.isFormUpload(a)){b=Ext.Element.serializeForm(c);d=d?(d+"&"+b):b}return d},setupMethod:function(a,b){if(this.isFormUpload(a)){return"POST"}return b},setupHeaders:function(l,m,d,c){var h=this,b=Ext.apply({},m.headers||{},h.getDefaultHeaders()||{}),k=h.getDefaultPostHeader(),i=m.jsonData,a=m.xmlData,j,f;if(!b["Content-Type"]&&(d||c)){if(d){if(m.rawData){k="text/plain"}else{if(a&&Ext.isDefined(a)){k="text/xml"}else{if(i&&Ext.isDefined(i)){k="application/json"}}}}b["Content-Type"]=k}if(h.getUseDefaultXhrHeader()&&!b["X-Requested-With"]){b["X-Requested-With"]=h.getDefaultXhrHeader()}try{for(j in b){if(b.hasOwnProperty(j)){f=b[j];l.setRequestHeader(j,f)}}}catch(g){h.fireEvent("exception",j,f)}if(m.withCredentials){l.withCredentials=m.withCredentials}return b},getXhrInstance:(function(){var b=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("MSXML2.XMLHTTP.3.0")},function(){return new ActiveXObject("MSXML2.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],c=0,a=b.length,f;for(;c<a;++c){try{f=b[c];f();break}catch(d){}}return f})(),isLoading:function(a){if(!(a&&a.xhr)){return false}var b=a.xhr.readyState;return !(b===0||b==4)},abort:function(b){var a=this,d=a.requests,c;if(b&&a.isLoading(b)){b.xhr.onreadystatechange=null;b.xhr.abort();a.clearTimeout(b);if(!b.timedout){b.aborted=true}a.onComplete(b);a.cleanup(b)}else{if(!b){for(c in d){if(d.hasOwnProperty(c)){a.abort(d[c])}}}}},abortAll:function(){this.abort()},onStateChange:function(a){if(a.xhr.readyState==4){this.clearTimeout(a);this.onComplete(a);this.cleanup(a)}},clearTimeout:function(a){clearTimeout(a.timeout);delete a.timeout},cleanup:function(a){a.xhr=null;delete a.xhr},onComplete:function(f){var d=this,c=f.options,a,h,b;try{a=d.parseStatus(f.xhr.status);if(f.timedout){a.success=false}}catch(g){a={success:false,isException:false}}h=a.success;if(h){b=d.createResponse(f);d.fireEvent("requestcomplete",d,b,c);Ext.callback(c.success,c.scope,[b,c])}else{if(a.isException||f.aborted||f.timedout){b=d.createException(f)}else{b=d.createResponse(f)}d.fireEvent("requestexception",d,b,c);Ext.callback(c.failure,c.scope,[b,c])}Ext.callback(c.callback,c.scope,[c,h,b]);delete d.requests[f.id];return b},parseStatus:function(a){a=a==1223?204:a;var c=(a>=200&&a<300)||a==304||a==0,b=false;if(!c){switch(a){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:b=true;break}}return{success:c,isException:b}},createResponse:function(c){var g=c.xhr,a={},h,d,i,e,f,b;if(c.timedout||c.aborted){c.success=false;h=[]}else{h=g.getAllResponseHeaders().replace(this.lineBreakRe,"\n").split("\n")}d=h.length;while(d--){i=h[d];e=i.indexOf(":");if(e>=0){f=i.substr(0,e).toLowerCase();if(i.charAt(e+1)==" "){++e}a[f]=i.substr(e+1)}}c.xhr=null;delete c.xhr;b={request:c,requestId:c.id,status:g.status,statusText:g.statusText,getResponseHeader:function(j){return a[j.toLowerCase()]},getAllResponseHeaders:function(){return a},responseText:g.responseText,responseXML:g.responseXML};g=null;return b},createException:function(a){return{request:a,requestId:a.id,status:a.aborted?-1:0,statusText:a.aborted?"transaction aborted":"communication failure",aborted:a.aborted,timedout:a.timedout}}});Ext.define("Ext.Ajax",{extend:"Ext.data.Connection",singleton:true,autoAbort:false});Ext.define("Ext.data.reader.Reader",{requires:["Ext.data.ResultSet"],alternateClassName:["Ext.data.Reader","Ext.data.DataReader"],mixins:["Ext.mixin.Observable"],isReader:true,config:{idProperty:undefined,clientIdProperty:"clientId",totalProperty:"total",successProperty:"success",messageProperty:null,rootProperty:"",implicitIncludes:true,model:undefined},constructor:function(a){this.initConfig(a)},fieldCount:0,applyModel:function(a){if(typeof a=="string"){a=Ext.data.ModelManager.getModel(a);if(!a){Ext.Logger.error("Model with name "+arguments[0]+" doesnt exist.")}}if(a&&!a.prototype.isModel&&Ext.isObject(a)){a=Ext.data.ModelManager.registerType(a.storeId||a.id||Ext.id(),a)}return a},applyIdProperty:function(a){if(!a&&this.getModel()){a=this.getModel().getIdProperty()}return a},updateModel:function(a){if(a){if(!this.getIdProperty()){this.setIdProperty(a.getIdProperty())}this.buildExtractors()}},createAccessor:Ext.emptyFn,createFieldAccessExpression:function(){return"undefined"},buildExtractors:function(){if(!this.getModel()){return}var b=this,c=b.getTotalProperty(),a=b.getSuccessProperty(),d=b.getMessageProperty();if(c){b.getTotal=b.createAccessor(c)}if(a){b.getSuccess=b.createAccessor(a)}if(d){b.getMessage=b.createAccessor(d)}b.extractRecordData=b.buildRecordDataExtractor()},buildRecordDataExtractor:function(){var k=this,e=k.getModel(),g=e.getFields(),j=g.length,a=[],h=k.getModel().getClientIdProperty(),f="__field",b=["var me = this,\n"," fields = me.getModel().getFields(),\n"," idProperty = me.getIdProperty(),\n",' idPropertyIsFn = (typeof idProperty == "function"),'," value,\n"," internalId"],d,l,c,m;g=g.items;for(d=0;d<j;d++){l=g[d];m=l.getName();if(m===e.getIdProperty()){a[d]="idField"}else{a[d]=f+d}b.push(",\n ",a[d],' = fields.get("',l.getName(),'")')}b.push(";\n\n return function(source) {\n var dest = {};\n");b.push(" if (idPropertyIsFn) {\n");b.push(" idField.setMapping(idProperty);\n");b.push(" }\n");for(d=0;d<j;d++){l=g[d];c=a[d];m=l.getName();if(m===e.getIdProperty()&&l.getMapping()===null){l.setMapping(this.getIdProperty())}b.push(' dest["'+l.getName()+'"]'," = ",k.createFieldAccessExpression(l,c,"source"),";\n")}if(h){b.push(" internalId = "+k.createFieldAccessExpression(Ext.create("Ext.data.Field",{name:h}),null,"source")+";\n");b.push(" if (internalId !== undefined) {\n");b.push(' dest["_clientId"] = internalId;\n }\n')}b.push(" return dest;\n");b.push(" };");return Ext.functionFactory(b.join("")).call(k)},getFields:function(){return this.getModel().getFields().items},getData:function(a){return a},getResponseData:function(a){return a},getRoot:function(a){return a},read:function(c){var g=c,h=this.getModel(),e,b,d,f,a;if(c){g=this.getResponseData(c)}if(g){e=this.readRecords(g);b=e.getRecords();for(d=0,f=b.length;d<f;d++){a=b[d];b[d]=new h(a.data,a.id,a.node)}return e}else{return this.nullResultSet}},process:function(a){var b=a;if(a){b=this.getResponseData(a)}if(b){return this.readRecords(b)}else{return this.nullResultSet}},readRecords:function(c){var d=this;d.rawData=c;c=d.getData(c);if(c.metaData){d.onMetaChange(c.metaData)}var f=Ext.isArray(c)?c:d.getRoot(c),h=true,b=0,e,g,a,i;if(d.getTotalProperty()){g=parseInt(d.getTotal(c),10);if(!isNaN(g)){e=g}}if(d.getSuccessProperty()){g=d.getSuccess(c);if(g===false||g==="false"){h=false}}if(d.getMessageProperty()){i=d.getMessage(c)}if(f){a=d.extractData(f);b=a.length}else{b=0;a=[]}return new Ext.data.ResultSet({total:e,count:b,records:a,success:h,message:i})},extractData:function(l){var j=this,e=[],c=l.length,h=j.getModel(),m=h.getIdProperty(),k=h.getFields(),d,g,f,b,a;if(k.isDirty){j.buildExtractors(true);delete k.isDirty}if(!l.length&&Ext.isObject(l)){l=[l];c=1}for(g=0;g<c;g++){a=null;b=null;d=l[g];f=j.extractRecordData(d);if(f._clientId!==undefined){a=f._clientId;delete f._clientId}if(f[m]!==undefined){b=f[m]}if(j.getImplicitIncludes()){j.readAssociated(f,d)}e.push({clientId:a,id:b,data:f,node:d})}return e},readAssociated:function(h,g){var e=this.getModel().associations.items,d=0,f=e.length,a,c,b;for(;d<f;d++){a=e[d];b=a.getAssociationKey();c=this.getAssociatedDataRoot(g,b);if(c){h[b]=c}}},getAssociatedDataRoot:function(b,a){return b[a]},onMetaChange:function(f){var a=f.fields,e=this,d,c,b;e.metaData=f;if(f.rootProperty!==undefined){e.setRootProperty(f.rootProperty)}else{if(f.root!==undefined){e.setRootProperty(f.root)}}if(f.idProperty!==undefined){e.setIdProperty(f.idProperty)}if(f.totalProperty!==undefined){e.setTotalProperty(f.totalProperty)}if(f.successProperty!==undefined){e.setSuccessProperty(f.successProperty)}if(f.messageProperty!==undefined){e.setMessageProperty(f.messageProperty)}if(a){if(e.getModel()){e.getModel().setFields(a);e.buildExtractors()}else{b=e.getIdProperty();c={fields:a};if(b){c.idProperty=b}d=Ext.define("Ext.data.reader.MetaModel"+Ext.id(),{extend:"Ext.data.Model",config:c});e.setModel(d)}}else{e.buildExtractors()}}},function(){Ext.apply(this.prototype,{nullResultSet:new Ext.data.ResultSet({total:0,count:0,records:[],success:true})})});Ext.define("Ext.data.reader.Json",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.JsonReader",alias:"reader.json",config:{record:null,useSimpleAccessors:false},objectRe:/[\[\.]/,getResponseData:function(a){var d=a;if(a&&a.responseText){d=a.responseText}if(typeof d!=="string"){return d}var c;try{c=Ext.decode(d)}catch(b){this.fireEvent("exception",this,a,"Unable to parse the JSON returned by the server: "+b.toString());Ext.Logger.warn("Unable to parse the JSON returned by the server: "+b.toString())}return c},buildExtractors:function(){var b=this,a=b.getRootProperty();b.callParent(arguments);if(a){b.rootAccessor=b.createAccessor(a)}else{delete b.rootAccessor}},getRoot:function(b){var a=this.getModel().getFields();if(a.isDirty){this.buildExtractors(true);delete a.isDirty}if(this.rootAccessor){return this.rootAccessor.call(this,b)}else{return b}},extractData:function(a){var e=this.getRecord(),d=[],c,b;if(e){c=a.length;if(!c&&Ext.isObject(a)){c=1;a=[a]}for(b=0;b<c;b++){d[b]=a[b][e]}}else{d=a}return this.callParent([d])},createAccessor:function(){var a=/[\[\.]/;return function(c){if(Ext.isEmpty(c)){return Ext.emptyFn}if(Ext.isFunction(c)){return c}if(this.getUseSimpleAccessors()!==true){var b=String(c).search(a);if(b>=0){return Ext.functionFactory("obj","var value; try {value = obj"+(b>0?".":"")+c+"} catch(e) {}; return value;")}}return function(d){return d[c]}}}(),createFieldAccessExpression:function(g,b,c){var f=this,h=f.objectRe,e=(g.getMapping()!==null),a=e?g.getMapping():g.getName(),i,d;if(typeof a==="function"){i=b+".getMapping()("+c+", this)"}else{if(f.getUseSimpleAccessors()===true||((d=String(a).search(h))<0)){if(!e||isNaN(a)){a='"'+a+'"'}i=c+"["+a+"]"}else{i=c+(d>0?".":"")+a}}return i}});Ext.define("Ext.data.proxy.Proxy",{extend:"Ext.Evented",alias:"proxy.proxy",alternateClassName:["Ext.data.DataProxy","Ext.data.Proxy"],requires:["Ext.data.reader.Json","Ext.data.writer.Json"],uses:["Ext.data.Batch","Ext.data.Operation","Ext.data.Model"],config:{batchOrder:"create,update,destroy",batchActions:true,model:null,reader:{type:"json"},writer:{type:"json"}},isProxy:true,applyModel:function(a){if(typeof a=="string"){a=Ext.data.ModelManager.getModel(a);if(!a){Ext.Logger.error("Model with name "+arguments[0]+" doesnt exist.")}}if(a&&!a.prototype.isModel&&Ext.isObject(a)){a=Ext.data.ModelManager.registerType(a.storeId||a.id||Ext.id(),a)}return a},updateModel:function(b){if(b){var a=this.getReader();if(a&&!a.getModel()){a.setModel(b)}}},applyReader:function(b,a){return Ext.factory(b,Ext.data.Reader,a,"reader")},updateReader:function(a){if(a){var b=this.getModel();if(!b){b=a.getModel();if(b){this.setModel(b)}}else{a.setModel(b)}if(a.onMetaChange){a.onMetaChange=Ext.Function.createSequence(a.onMetaChange,this.onMetaChange,this)}}},onMetaChange:function(b){var a=this.getReader().getModel();if(!this.getModel()&&a){this.setModel(a)}this.fireEvent("metachange",this,b)},applyWriter:function(b,a){return Ext.factory(b,Ext.data.Writer,a,"writer")},create:Ext.emptyFn,read:Ext.emptyFn,update:Ext.emptyFn,destroy:Ext.emptyFn,onDestroy:function(){Ext.destroy(this.getReader(),this.getWriter())},batch:function(e,f){var g=this,d=g.getBatchActions(),c=this.getModel(),b,a;if(e.operations===undefined){e={operations:e,batch:{listeners:f}}}if(e.batch){if(e.batch.isBatch){e.batch.setProxy(g)}else{e.batch.proxy=g}}else{e.batch={proxy:g,listeners:e.listeners||{}}}if(!b){b=new Ext.data.Batch(e.batch)}b.on("complete",Ext.bind(g.onBatchComplete,g,[e],0));Ext.each(g.getBatchOrder().split(","),function(h){a=e.operations[h];if(a){if(d){b.add(new Ext.data.Operation({action:h,records:a,model:c}))}else{Ext.each(a,function(i){b.add(new Ext.data.Operation({action:h,records:[i],model:c}))})}}},g);b.start();return b},onBatchComplete:function(a,b){var c=a.scope||this;if(b.hasException){if(Ext.isFunction(a.failure)){Ext.callback(a.failure,c,[b,a])}}else{if(Ext.isFunction(a.success)){Ext.callback(a.success,c,[b,a])}}if(Ext.isFunction(a.callback)){Ext.callback(a.callback,c,[b,a])}}},function(){});Ext.define("Ext.data.proxy.Client",{extend:"Ext.data.proxy.Proxy",alternateClassName:"Ext.proxy.ClientProxy",clear:function(){}});Ext.define("Ext.data.proxy.Memory",{extend:"Ext.data.proxy.Client",alias:"proxy.memory",alternateClassName:"Ext.data.MemoryProxy",isMemoryProxy:true,config:{data:[]},finishOperation:function(b,f,d){if(b){var c=0,e=b.getRecords(),a=e.length;for(c;c<a;c++){e[c].commit()}b.setSuccessful();Ext.callback(f,d||this,[b])}},create:function(){this.finishOperation.apply(this,arguments)},update:function(){this.finishOperation.apply(this,arguments)},destroy:function(){this.finishOperation.apply(this,arguments)},read:function(b,e,c){var d=this,a=d.getReader();if(b.process("read",a.process(d.getData()))===false){this.fireEvent("exception",this,null,b)}Ext.callback(e,c||d,[b])},clear:Ext.emptyFn});Ext.define("Ext.data.proxy.Server",{extend:"Ext.data.proxy.Proxy",alias:"proxy.server",alternateClassName:"Ext.data.ServerProxy",requires:["Ext.data.Request"],config:{url:null,pageParam:"page",startParam:"start",limitParam:"limit",groupParam:"group",sortParam:"sort",filterParam:"filter",directionParam:"dir",enablePagingParams:true,simpleSortMode:false,noCache:true,cacheString:"_dc",timeout:30000,api:{create:undefined,read:undefined,update:undefined,destroy:undefined},extraParams:{}},constructor:function(a){a=a||{};if(a.nocache!==undefined){a.noCache=a.nocache}this.callParent([a])},create:function(){return this.doRequest.apply(this,arguments)},read:function(){return this.doRequest.apply(this,arguments)},update:function(){return this.doRequest.apply(this,arguments)},destroy:function(){return this.doRequest.apply(this,arguments)},setExtraParam:function(a,b){this.getExtraParams()[a]=b},buildRequest:function(a){var c=this,d=Ext.applyIf(a.getParams()||{},c.getExtraParams()||{}),b;d=Ext.applyIf(d,c.getParams(a));b=Ext.create("Ext.data.Request",{params:d,action:a.getAction(),records:a.getRecords(),url:a.getUrl(),operation:a,proxy:c});b.setUrl(c.buildUrl(b));a.setRequest(b);return b},processResponse:function(k,b,d,c,j,l){var h=this,a=b.getAction(),f,i;if(k===true){f=h.getReader();try{i=f.process(c)}catch(g){b.setException(g.message);h.fireEvent("exception",this,c,b);return}if(!b.getModel()){b.setModel(this.getModel())}if(b.process(a,i,d,c)===false){this.fireEvent("exception",this,c,b)}}else{h.setException(b,c);h.fireEvent("exception",this,c,b)}if(typeof j=="function"){j.call(l||h,b)}h.afterRequest(d,k)},setException:function(b,a){b.setException({status:a.status,statusText:a.statusText})},applyEncoding:function(a){return Ext.encode(a)},encodeSorters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].getProperty(),direction:d[a].getDirection()}}return this.applyEncoding(b)},encodeFilters:function(d){var b=[],c=d.length,a=0;for(;a<c;a++){b[a]={property:d[a].getProperty(),value:d[a].getValue()}}return this.applyEncoding(b)},getParams:function(i){var n=this,h={},a=i.getGrouper(),m=i.getSorters(),f=i.getFilters(),l=i.getPage(),d=i.getStart(),g=i.getLimit(),o=n.getSimpleSortMode(),q=n.getPageParam(),k=n.getStartParam(),p=n.getLimitParam(),j=n.getGroupParam(),e=n.getSortParam(),c=n.getFilterParam(),b=n.getDirectionParam();if(n.getEnablePagingParams()){if(q&&l!==null){h[q]=l}if(k&&d!==null){h[k]=d}if(p&&g!==null){h[p]=g}}if(j&&a){h[j]=n.encodeSorters([a])}if(e&&m&&m.length>0){if(o){h[e]=m[0].getProperty();h[b]=m[0].getDirection()}else{h[e]=n.encodeSorters(m)}}if(c&&f&&f.length>0){h[c]=n.encodeFilters(f)}return h},buildUrl:function(c){var b=this,a=b.getUrl(c);if(b.getNoCache()){a=Ext.urlAppend(a,Ext.String.format("{0}={1}",b.getCacheString(),Ext.Date.now()))}return a},getUrl:function(a){return a?a.getUrl()||this.getApi()[a.getAction()]||this._url:this._url},doRequest:function(a,c,b){},afterRequest:Ext.emptyFn});Ext.define("Ext.data.proxy.JsonP",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.ScriptTagProxy",alias:["proxy.jsonp","proxy.scripttag"],requires:["Ext.data.JsonP"],config:{defaultWriterType:"base",callbackKey:"callback",recordParam:"records",autoAppendParams:true},doRequest:function(a,g,b){var d=this,e=d.getWriter(),c=d.buildRequest(a),f=c.getParams();if(a.allowWrite()){c=e.write(c)}c.setConfig({callbackKey:d.getCallbackKey(),timeout:d.getTimeout(),scope:d,callback:d.createRequestCallback(c,a,g,b)});if(d.getAutoAppendParams()){c.setParams({})}c.setJsonP(Ext.data.JsonP.request(c.getCurrentConfig()));c.setParams(f);a.setStarted();d.lastRequest=c;return c},createRequestCallback:function(d,a,e,b){var c=this;return function(h,f,g){delete c.lastRequest;c.processResponse(h,a,d,f,e,b)}},setException:function(b,a){b.setException(b.getRequest().getJsonP().errorType)},buildUrl:function(f){var h=this,a=h.callParent(arguments),e=Ext.apply({},f.getParams()),c=e.filters,d,b,g,j;delete e.filters;if(h.getAutoAppendParams()){a=Ext.urlAppend(a,Ext.Object.toQueryString(e))}if(c&&c.length){for(g=0;g<c.length;g++){b=c[g];j=b.getValue();if(j){a=Ext.urlAppend(a,b.getProperty()+"="+j)}}}d=f.getRecords();if(Ext.isArray(d)&&d.length>0){a=Ext.urlAppend(a,Ext.String.format("{0}={1}",h.getRecordParam(),h.encodeRecords(d)))}return a},destroy:function(){this.abort();this.callParent(arguments)},abort:function(){var a=this.lastRequest;if(a){Ext.data.JsonP.abort(a.getJsonP())}},encodeRecords:function(b){var d="",c=0,a=b.length;for(;c<a;c++){d+=Ext.Object.toQueryString(b[c].getData())}return d}});Ext.define("Ext.data.proxy.WebStorage",{extend:"Ext.data.proxy.Client",alternateClassName:"Ext.data.WebStorageProxy",requires:"Ext.Date",config:{id:undefined,reader:null,writer:null},constructor:function(a){this.callParent(arguments);this.cache={}},updateModel:function(a){if(!this.getId()){this.setId(a.modelName)}},create:function(e,h,j){var d=e.getRecords(),c=d.length,a=this.getIds(),b,g,f;e.setStarted();for(f=0;f<c;f++){g=d[f];if(g.phantom){g.phantom=false;b=this.getNextId()}else{b=g.getId()}this.setRecord(g,b);a.push(b)}this.setIds(a);e.setCompleted();e.setSuccessful();if(typeof h=="function"){h.call(j||this,e)}},read:function(e,j,k){var c=[],a=this.getIds(),h=this.getModel(),l=h.getIdProperty(),d=e.getParams()||{},b=a.length,f,g;if(d[l]!==undefined){g=this.getRecord(d[l]);if(g){c.push(g);e.setSuccessful()}}else{for(f=0;f<b;f++){c.push(this.getRecord(a[f]))}e.setSuccessful()}e.setCompleted();e.setResultSet(Ext.create("Ext.data.ResultSet",{records:c,total:c.length,loaded:true}));e.setRecords(c);if(typeof j=="function"){j.call(k||this,e)}},update:function(e,h,j){var d=e.getRecords(),c=d.length,a=this.getIds(),g,b,f;e.setStarted();for(f=0;f<c;f++){g=d[f];this.setRecord(g);b=g.getId();if(b!==undefined&&Ext.Array.indexOf(a,b)==-1){a.push(b)}}this.setIds(a);e.setCompleted();e.setSuccessful();if(typeof h=="function"){h.call(j||this,e)}},destroy:function(b,h,e){var a=b.getRecords(),f=a.length,d=this.getIds(),g=[].concat(d),c;for(c=0;c<f;c++){Ext.Array.remove(g,a[c].getId());this.removeRecord(a[c],false)}this.setIds(g);b.setCompleted();b.setSuccessful();if(typeof h=="function"){h.call(e||this,b)}},getRecord:function(d){if(this.cache[d]===undefined){var m=this.getRecordKey(d),n=this.getStorageObject().getItem(m),g={},f=this.getModel(),k=f.getFields().items,e=k.length,h,l,c,j,a,b;if(!n){return}a=Ext.decode(n);for(h=0;h<e;h++){l=k[h];c=l.getName();if(typeof l.getDecode()=="function"){g[c]=l.getDecode()(a[c])}else{if(l.getType().type=="date"){b=l.getDateFormat();if(b){g[c]=Ext.Date.parse(a[c],b)}else{g[c]=new Date(a[c])}}else{g[c]=a[c]}}}j=new f(g,d);this.cache[d]=j}return this.cache[d]},setRecord:function(k,d){if(d){k.setId(d)}else{d=k.getId()}var m=this,a=k.getData(),j={},f=m.getModel(),l=f.getFields().items,e=l.length,h=0,n,c,g,o,b;for(;h<e;h++){n=l[h];c=n.getName();if(typeof n.getEncode()=="function"){j[c]=n.getEncode()(a[c],k)}else{if(n.getType().type=="date"&&Ext.isDate(a[c])){b=n.getDateFormat();if(b){j[c]=Ext.Date.format(a[c],b)}else{j[c]=a[c].getTime()}}else{j[c]=a[c]}}}g=m.getStorageObject();o=m.getRecordKey(d);m.cache[d]=k;g.removeItem(o);g.setItem(o,Ext.encode(j))},removeRecord:function(d,c){var b=this,a;if(d.isModel){d=d.getId()}if(c!==false){a=b.getIds();Ext.Array.remove(a,d);b.setIds(a)}b.getStorageObject().removeItem(b.getRecordKey(d))},getRecordKey:function(a){if(a.isModel){a=a.getId()}return Ext.String.format("{0}-{1}",this.getId(),a)},getRecordCounterKey:function(){return Ext.String.format("{0}-counter",this.getId())},getIds:function(){var b=(this.getStorageObject().getItem(this.getId())||"").split(","),c=b.length,a;if(c==1&&b[0]===""){b=[]}else{for(a=0;a<c;a++){b[a]=parseInt(b[a],10)}}return b},setIds:function(b){var c=this.getStorageObject(),d=b.join(","),e=this.getId(),a=this.getRecordCounterKey();c.removeItem(e);if(Ext.isEmpty(d)){c.removeItem(a)}else{c.setItem(e,d)}},getNextId:function(){var d=this.getStorageObject(),a=this.getRecordCounterKey(),c=d.getItem(a),b,e;if(c===null){b=this.getIds();c=b[b.length-1]||0}e=parseInt(c,10)+1;d.setItem(a,e);return e},initialize:function(){this.callParent(arguments);var a=this.getStorageObject();a.setItem(this.getId(),a.getItem(this.getId())||"")},clear:function(){var d=this.getStorageObject(),c=this.getIds(),a=c.length,b;for(b=0;b<a;b++){this.removeRecord(c[b])}d.removeItem(this.getRecordCounterKey());d.removeItem(this.getId())},getStorageObject:function(){}});Ext.define("Ext.data.proxy.LocalStorage",{extend:"Ext.data.proxy.WebStorage",alias:"proxy.localstorage",alternateClassName:"Ext.data.LocalStorageProxy",getStorageObject:function(){return window.localStorage}});Ext.define("Ext.data.proxy.SessionStorage",{extend:"Ext.data.proxy.WebStorage",alias:"proxy.sessionstorage",alternateClassName:"Ext.data.SessionStorageProxy",getStorageObject:function(){return window.sessionStorage}});Ext.define("Ext.data.reader.Array",{extend:"Ext.data.reader.Json",alternateClassName:"Ext.data.ArrayReader",alias:"reader.array",config:{totalProperty:undefined,successProperty:undefined},getResponseData:function(a){return a},createFieldAccessExpression:function(g,c,b){var f=this,e=g.getMapping(),d=(e==null)?f.getModel().getFields().indexOf(g):e,a;if(typeof d==="function"){a=c+".getMapping()("+b+", this)"}else{if(isNaN(d)){d='"'+d+'"'}a=b+"["+d+"]"}return a}});Ext.define("Ext.data.reader.Xml",{extend:"Ext.data.reader.Reader",alternateClassName:"Ext.data.XmlReader",alias:"reader.xml",config:{record:null},createAccessor:function(b){var a=this;if(Ext.isEmpty(b)){return Ext.emptyFn}if(Ext.isFunction(b)){return b}return function(c){return a.getNodeValue(Ext.DomQuery.selectNode(b,c))}},getNodeValue:function(a){if(a&&a.firstChild){return a.firstChild.nodeValue}return undefined},getResponseData:function(a){if(a.nodeType===1){return a}var b=a.responseXML;return b},getData:function(a){return a.documentElement||a},getRoot:function(b){var c=b.nodeName,a=this.getRootProperty();if(!a||(c&&c==a)){return b}else{if(Ext.DomQuery.isXml(b)){return Ext.DomQuery.selectNode(a,b)}}},extractData:function(a){var b=this.getRecord();if(b!=a.nodeName){a=Ext.DomQuery.select(b,a)}else{a=[a]}return this.callParent([a])},getAssociatedDataRoot:function(b,a){return Ext.DomQuery.select(a,b)[0]},readRecords:function(a){if(Ext.isArray(a)){a=a[0]}return this.callParent([a])},createFieldAccessExpression:function(e,d,c){var b=e.getMapping()||e.getName(),a;if(typeof b==="function"){a=d+".getMapping()("+c+", this)"}else{a='me.getNodeValue(Ext.DomQuery.selectNode("'+b+'", '+c+"))"}return a}});Ext.define("Ext.direct.Provider",{alias:"direct.provider",mixins:{observable:"Ext.util.Observable"},config:{id:undefined},constructor:function(a){this.initConfig(a)},applyId:function(a){if(a===undefined){a=this.getUniqueId()}return a},isConnected:function(){return false},connect:Ext.emptyFn,disconnect:Ext.emptyFn});Ext.define("Ext.direct.JsonProvider",{extend:"Ext.direct.Provider",alias:"direct.jsonprovider",uses:["Ext.direct.ExceptionEvent"],parseResponse:function(a){if(!Ext.isEmpty(a.responseText)){if(Ext.isObject(a.responseText)){return a.responseText}return Ext.decode(a.responseText)}return null},createEvents:function(a){var g=null,c=[],b=0,f,d;try{g=this.parseResponse(a)}catch(h){d=Ext.create("Ext.direct.ExceptionEvent",{data:h,xhr:a,code:Ext.direct.Manager.exceptions.PARSE,message:"Error parsing json response: \n\n "+g});return[d]}if(Ext.isArray(g)){for(f=g.length;b<f;++b){c.push(this.createEvent(g[b]))}}else{c.push(this.createEvent(g))}return c},createEvent:function(a){return Ext.create("direct."+a.type,a)}});Ext.define("Ext.direct.PollingProvider",{extend:"Ext.direct.JsonProvider",alias:"direct.pollingprovider",uses:["Ext.direct.ExceptionEvent"],requires:["Ext.Ajax","Ext.util.DelayedTask"],config:{interval:3000,baseParams:null,url:null},isConnected:function(){return !!this.pollTask},connect:function(){var b=this,a=b.getUrl(),c=b.getBaseParams();if(a&&!b.pollTask){b.pollTask=setInterval(function(){if(b.fireEvent("beforepoll",b)!==false){if(Ext.isFunction(a)){a(c)}else{Ext.Ajax.request({url:a,callback:b.onData,scope:b,params:c})}}},b.getInterval());b.fireEvent("connect",b)}else{if(!a){}}},disconnect:function(){var a=this;if(a.pollTask){clearInterval(a.pollTask);delete a.pollTask;a.fireEvent("disconnect",a)}},onData:function(e,g,b){var f=this,d=0,a,c;if(g){c=f.createEvents(b);for(a=c.length;d<a;++d){f.fireEvent("data",f,c[d])}}else{f.fireEvent("data",f,Ext.create("Ext.direct.ExceptionEvent",{data:null,code:Ext.direct.Manager.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:b}))}}});Ext.define("Ext.fx.animation.Abstract",{extend:"Ext.Evented",isAnimation:true,requires:["Ext.fx.State"],config:{name:"",element:null,before:null,from:{},to:{},after:null,states:{},duration:300,easing:"linear",iteration:1,direction:"normal",delay:0,onBeforeStart:null,onEnd:null,onBeforeEnd:null,scope:null,reverse:null,preserveEndState:false,replacePrevious:true},STATE_FROM:"0%",STATE_TO:"100%",DIRECTION_UP:"up",DIRECTION_DOWN:"down",DIRECTION_LEFT:"left",DIRECTION_RIGHT:"right",stateNameRegex:/^(?:[\d\.]+)%$/,constructor:function(){this.states={};this.callParent(arguments);return this},applyElement:function(a){return Ext.get(a)},applyBefore:function(a,b){if(a){return Ext.factory(a,Ext.fx.State,b)}},applyAfter:function(b,a){if(b){return Ext.factory(b,Ext.fx.State,a)}},setFrom:function(a){return this.setState(this.STATE_FROM,a)},setTo:function(a){return this.setState(this.STATE_TO,a)},getFrom:function(){return this.getState(this.STATE_FROM)},getTo:function(){return this.getState(this.STATE_TO)},setStates:function(a){var c=this.stateNameRegex,b;for(b in a){if(c.test(b)){this.setState(b,a[b])}}return this},getStates:function(){return this.states},setState:function(b,d){var a=this.getStates(),c;c=Ext.factory(d,Ext.fx.State,a[b]);if(c){a[b]=c}return this},getState:function(a){return this.getStates()[a]},getData:function(){var k=this.getStates(),e={},g=this.getBefore(),c=this.getAfter(),h=k[this.STATE_FROM],i=k[this.STATE_TO],j=h.getData(),f=i.getData(),d,b,a;for(b in k){if(k.hasOwnProperty(b)){a=k[b];d=a.getData();e[b]=d}}if(Ext.os.is.Android2){e["0.0001%"]=j}return{before:g?g.getData():{},after:c?c.getData():{},states:e,from:j,to:f,duration:this.getDuration(),iteration:this.getIteration(),direction:this.getDirection(),easing:this.getEasing(),delay:this.getDelay(),onEnd:this.getOnEnd(),onBeforeEnd:this.getOnBeforeEnd(),onBeforeStart:this.getOnBeforeStart(),scope:this.getScope(),preserveEndState:this.getPreserveEndState(),replacePrevious:this.getReplacePrevious()}}});Ext.define("Ext.fx.animation.Cube",{extend:"Ext.fx.animation.Abstract",alias:"animation.cube",config:{before:{},after:{},direction:"right",out:false},getData:function(){var m=this.getTo(),n=this.getFrom(),k=this.getBefore(),a=this.getAfter(),e=this.getOut(),j=this.getDirection(),b=this.getElement(),g=b.getWidth(),c=b.getHeight(),l=e?"100% 100%":"0% 0%",i=1,d=1,f={rotateY:0,translateZ:0,},h={rotateY:0,translateZ:0};if(j=="left"||j=="right"){if(e){d=0.5;h.translateZ=g;h.rotateY=-90}else{i=0.5;f.translateZ=g;f.rotateY=90}}k["transform-origin"]=l;a["transform-origin"]=null;m.set("transform",h);n.set("transform",f);n.set("opacity",i);m.set("opacity",d);return this.callParent(arguments)}});Ext.define("Ext.fx.animation.Fade",{extend:"Ext.fx.animation.Abstract",alternateClassName:"Ext.fx.animation.FadeIn",alias:["animation.fade","animation.fadeIn"],config:{out:false,before:{display:null,opacity:0},after:{opacity:null},reverse:null},updateOut:function(a){var c=this.getTo(),b=this.getFrom();if(a){b.set("opacity",1);c.set("opacity",0)}else{b.set("opacity",0);c.set("opacity",1)}}});Ext.define("Ext.fx.animation.FadeOut",{extend:"Ext.fx.animation.Fade",alias:"animation.fadeOut",config:{out:true,before:{}}});Ext.define("Ext.fx.animation.Flip",{extend:"Ext.fx.animation.Abstract",alias:"animation.flip",config:{easing:"ease-in",direction:"right",half:false,out:null},getData:function(){var h=this.getFrom(),i=this.getTo(),g=this.getDirection(),b=this.getOut(),l=this.getHalf(),c=(l)?90:180,e=1,a=1,k=0,j=0,f=0,d=0;if(b){a=0.8}else{e=0.8}switch(g){case this.DIRECTION_UP:if(b){f=c}else{k=-c}break;case this.DIRECTION_DOWN:if(b){f=-c}else{k=c}break;case this.DIRECTION_RIGHT:if(b){d=-c}else{j=c}break;case this.DIRECTION_LEFT:if(b){d=-c}else{j=c}break}h.setTransform({rotateX:k,rotateY:j,scale:e});i.setTransform({rotateX:f,rotateY:d,scale:a});return this.callParent(arguments)}});Ext.define("Ext.fx.animation.Pop",{extend:"Ext.fx.animation.Abstract",alias:["animation.pop","animation.popIn"],alternateClassName:"Ext.fx.animation.PopIn",config:{out:false,before:{display:null,opacity:0},after:{opacity:null}},getData:function(){var c=this.getTo(),b=this.getFrom(),a=this.getOut();if(a){b.set("opacity",1);b.setTransform({scale:1});c.set("opacity",0);c.setTransform({scale:0})}else{b.set("opacity",0);b.setTransform({scale:0});c.set("opacity",1);c.setTransform({scale:1})}return this.callParent(arguments)}});Ext.define("Ext.fx.animation.PopOut",{extend:"Ext.fx.animation.Pop",alias:"animation.popOut",config:{out:true,before:{}}});Ext.define("Ext.fx.animation.Slide",{extend:"Ext.fx.animation.Abstract",alternateClassName:"Ext.fx.animation.SlideIn",alias:["animation.slide","animation.slideIn"],config:{direction:"left",out:false,offset:0,easing:"auto",containerBox:"auto",elementBox:"auto",isElementBoxFit:true,useCssTransform:true},reverseDirectionMap:{up:"down",down:"up",left:"right",right:"left"},applyEasing:function(a){if(a==="auto"){return"ease-"+((this.getOut())?"in":"out")}return a},getContainerBox:function(){var a=this._containerBox;if(a==="auto"){a=this.getElement().getParent().getPageBox()}return a},getElementBox:function(){var a=this._elementBox;if(this.getIsElementBoxFit()){return this.getContainerBox()}if(a==="auto"){a=this.getElement().getPageBox()}return a},getData:function(){var p=this.getElementBox(),c=this.getContainerBox(),g=p?p:c,n=this.getFrom(),o=this.getTo(),f=this.getOut(),e=this.getOffset(),m=this.getDirection(),b=this.getUseCssTransform(),h=this.getReverse(),d=0,a=0,l,j,k,i;if(h){m=this.reverseDirectionMap[m]}switch(m){case this.DIRECTION_UP:if(f){a=c.top-g.top-g.height-e}else{a=c.bottom-g.bottom+g.height+e}break;case this.DIRECTION_DOWN:if(f){a=c.bottom-g.bottom+g.height+e}else{a=c.top-g.height-g.top-e}break;case this.DIRECTION_RIGHT:if(f){d=c.right-g.right+g.width+e}else{d=c.left-g.left-g.width-e}break;case this.DIRECTION_LEFT:if(f){d=c.left-g.left-g.width-e}else{d=c.right-g.right+g.width+e}break}l=(f)?0:d;j=(f)?0:a;if(b){n.setTransform({translateX:l,translateY:j})}else{n.set("left",l);n.set("top",j)}k=(f)?d:0;i=(f)?a:0;if(b){o.setTransform({translateX:k,translateY:i})}else{o.set("left",k);o.set("top",i)}return this.callParent(arguments)}});Ext.define("Ext.fx.animation.SlideOut",{extend:"Ext.fx.animation.Slide",alias:["animation.slideOut"],config:{out:true}});Ext.define("Ext.fx.Animation",{requires:["Ext.fx.animation.Slide","Ext.fx.animation.SlideOut","Ext.fx.animation.Fade","Ext.fx.animation.FadeOut","Ext.fx.animation.Flip","Ext.fx.animation.Pop","Ext.fx.animation.PopOut","Ext.fx.animation.Cube"],constructor:function(b){var a=Ext.fx.animation.Abstract,c;if(typeof b=="string"){c=b;b={}}else{if(b&&b.type){c=b.type}}if(c){if(Ext.os.is.Android2){if(c=="pop"){c="fade"}if(c=="popIn"){c="fadeIn"}if(c=="popOut"){c="fadeOut"}}a=Ext.ClassManager.getByAlias("animation."+c)}return Ext.factory(b,a)}});Ext.define("Ext.fx.layout.card.Abstract",{extend:"Ext.Evented",isAnimation:true,config:{direction:"left",duration:null,reverse:null,layout:null},updateLayout:function(){this.enable()},enable:function(){var a=this.getLayout();if(a){a.onBefore("activeitemchange","onActiveItemChange",this)}},disable:function(){var a=this.getLayout();if(this.isAnimating){this.stopAnimation()}if(a){a.unBefore("activeitemchange","onActiveItemChange",this)}},onActiveItemChange:Ext.emptyFn,destroy:function(){var a=this.getLayout();if(this.isAnimating){this.stopAnimation()}if(a){a.unBefore("activeitemchange","onActiveItemChange",this)}this.setLayout(null)}});Ext.define("Ext.fx.layout.card.Scroll",{extend:"Ext.fx.layout.card.Abstract",requires:["Ext.fx.easing.Linear"],alias:"fx.layout.card.scroll",config:{duration:150},constructor:function(a){this.initConfig(a);this.doAnimationFrame=Ext.Function.bind(this.doAnimationFrame,this)},getEasing:function(){var a=this.easing;if(!a){this.easing=a=new Ext.fx.easing.Linear()}return a},updateDuration:function(a){this.getEasing().setDuration(a)},onActiveItemChange:function(a,d,l,m,c){var i=this.getDirection(),g=this.getEasing(),k,e,b,h,j,f;if(d&&l){if(this.isAnimating){this.stopAnimation()}k=this.getLayout().container.innerElement;h=k.getWidth();j=k.getHeight();e=d.renderElement;b=l.renderElement;this.oldItem=l;this.newItem=d;this.currentEventController=c;this.containerElement=k;this.isReverse=f=this.getReverse();d.show();if(i=="right"){i="left";this.isReverse=f=!f}else{if(i=="down"){i="up";this.isReverse=f=!f}}if(i=="left"){if(f){g.setConfig({startValue:h,endValue:0});k.dom.scrollLeft=h;b.setLeft(h)}else{g.setConfig({startValue:0,endValue:h});e.setLeft(h)}}else{if(f){g.setConfig({startValue:j,endValue:0});k.dom.scrollTop=j;b.setTop(j)}else{g.setConfig({startValue:0,endValue:j});e.setTop(j)}}this.startAnimation();c.pause()}},startAnimation:function(){this.isAnimating=true;this.getEasing().setStartTime(Date.now());this.timer=setInterval(this.doAnimationFrame,20);this.doAnimationFrame()},doAnimationFrame:function(){var d=this.getEasing(),c=this.getDirection(),a="scrollTop",b;if(c=="left"||c=="right"){a="scrollLeft"}if(d.isEnded){this.stopAnimation()}else{b=d.getValue();this.containerElement.dom[a]=b}},stopAnimation:function(){var b=this.getDirection(),a="setTop";if(b=="left"||b=="right"){a="setLeft"}this.currentEventController.resume();if(this.isReverse){this.oldItem.renderElement[a](null)}else{this.newItem.renderElement[a](null)}clearInterval(this.timer);this.isAnimating=false;this.fireEvent("animationend",this)}});Ext.define("Ext.fx.layout.card.Style",{extend:"Ext.fx.layout.card.Abstract",requires:["Ext.fx.Animation"],config:{inAnimation:{before:{visibility:null},preserveEndState:false,replacePrevious:true},outAnimation:{preserveEndState:false,replacePrevious:true}},constructor:function(b){var c,a;this.initConfig(b);this.endAnimationCounter=0;c=this.getInAnimation();a=this.getOutAnimation();c.on("animationend","incrementEnd",this);a.on("animationend","incrementEnd",this);c.setConfig(b);a.setConfig(b)},incrementEnd:function(){this.endAnimationCounter++;if(this.endAnimationCounter>1){this.endAnimationCounter=0;this.fireEvent("animationend",this)}},applyInAnimation:function(b,a){return Ext.factory(b,Ext.fx.Animation,a)},applyOutAnimation:function(b,a){return Ext.factory(b,Ext.fx.Animation,a)},updateInAnimation:function(a){a.setScope(this)},updateOutAnimation:function(a){a.setScope(this)},onActiveItemChange:function(a,e,h,i,d){var b=this.getInAnimation(),g=this.getOutAnimation(),f,c;if(e&&h&&h.isPainted()){f=e.renderElement;c=h.renderElement;b.setElement(f);g.setElement(c);g.setOnBeforeEnd(function(j,k){if(k||Ext.Animator.hasRunningAnimations(j)){d.firingArguments[1]=null;d.firingArguments[2]=null}});g.setOnEnd(function(){d.resume()});f.dom.style.setProperty("visibility","hidden","!important");e.show();Ext.Animator.run([g,b]);d.pause()}}});Ext.define("Ext.fx.layout.card.Cover",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.cover",config:{reverse:null,inAnimation:{before:{"z-index":100},after:{"z-index":0},type:"slide",easing:"ease-out"},outAnimation:{easing:"ease-out",from:{opacity:0.99},to:{opacity:1},out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.card.Cube",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.cube",config:{reverse:null,inAnimation:{type:"cube"},outAnimation:{type:"cube",out:true}}});Ext.define("Ext.fx.layout.card.Fade",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.fade",config:{reverse:null,inAnimation:{type:"fade",easing:"ease-out"},outAnimation:{type:"fade",easing:"ease-out",out:true}}});Ext.define("Ext.fx.layout.card.Flip",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.flip",config:{duration:500,inAnimation:{type:"flip",half:true,easing:"ease-out",before:{"backface-visibility":"hidden"},after:{"backface-visibility":null}},outAnimation:{type:"flip",half:true,easing:"ease-in",before:{"backface-visibility":"hidden"},after:{"backface-visibility":null},out:true}},updateDuration:function(d){var c=d/2,b=this.getInAnimation(),a=this.getOutAnimation();b.setDelay(c);b.setDuration(c);a.setDuration(c)}});Ext.define("Ext.fx.layout.card.Pop",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.pop",config:{duration:500,inAnimation:{type:"pop",easing:"ease-out"},outAnimation:{type:"pop",easing:"ease-in",out:true}},updateDuration:function(d){var c=d/2,b=this.getInAnimation(),a=this.getOutAnimation();b.setDelay(c);b.setDuration(c);a.setDuration(c)}});Ext.define("Ext.fx.layout.card.Reveal",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.reveal",config:{inAnimation:{easing:"ease-out",from:{opacity:0.99},to:{opacity:1}},outAnimation:{before:{"z-index":100},after:{"z-index":0},type:"slide",easing:"ease-out",out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.card.Slide",{extend:"Ext.fx.layout.card.Style",alias:"fx.layout.card.slide",config:{inAnimation:{type:"slide",easing:"ease-out"},outAnimation:{type:"slide",easing:"ease-out",out:true}},updateReverse:function(a){this.getInAnimation().setReverse(a);this.getOutAnimation().setReverse(a)}});Ext.define("Ext.fx.layout.Card",{requires:["Ext.fx.layout.card.Slide","Ext.fx.layout.card.Cover","Ext.fx.layout.card.Reveal","Ext.fx.layout.card.Fade","Ext.fx.layout.card.Flip","Ext.fx.layout.card.Pop","Ext.fx.layout.card.Cube","Ext.fx.layout.card.Scroll"],constructor:function(b){var a=Ext.fx.layout.card.Abstract,c;if(!b){return null}if(typeof b=="string"){c=b;b={}}else{if(b.type){c=b.type}}b.elementBox=false;if(c){if(Ext.os.is.Android2){if(c!="fade"){c="scroll"}}else{if(c==="slide"&&Ext.browser.is.ChromeMobile){c="scroll"}}a=Ext.ClassManager.getByAlias("fx.layout.card."+c)}return Ext.factory(b,a)}});Ext.define("Ext.fx.runner.Css",{extend:"Ext.Evented",requires:["Ext.fx.Animation"],prefixedProperties:{transform:true,"transform-origin":true,perspective:true,"transform-style":true,transition:true,"transition-property":true,"transition-duration":true,"transition-timing-function":true,"transition-delay":true,animation:true,"animation-name":true,"animation-duration":true,"animation-iteration-count":true,"animation-direction":true,"animation-timing-function":true,"animation-delay":true},lengthProperties:{top:true,right:true,bottom:true,left:true,width:true,height:true,"max-height":true,"max-width":true,"min-height":true,"min-width":true,"margin-bottom":true,"margin-left":true,"margin-right":true,"margin-top":true,"padding-bottom":true,"padding-left":true,"padding-right":true,"padding-top":true,"border-bottom-width":true,"border-left-width":true,"border-right-width":true,"border-spacing":true,"border-top-width":true,"border-width":true,"outline-width":true,"letter-spacing":true,"line-height":true,"text-indent":true,"word-spacing":true,"font-size":true,translate:true,translateX:true,translateY:true,translateZ:true,translate3d:true},durationProperties:{"transition-duration":true,"transition-delay":true,"animation-duration":true,"animation-delay":true},angleProperties:{rotate:true,rotateX:true,rotateY:true,rotateZ:true,skew:true,skewX:true,skewY:true},lengthUnitRegex:/([a-z%]*)$/,DEFAULT_UNIT_LENGTH:"px",DEFAULT_UNIT_ANGLE:"deg",DEFAULT_UNIT_DURATION:"ms",formattedNameCache:{},constructor:function(){var a=Ext.feature.has.Css3dTransforms;if(a){this.transformMethods=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","skewX","skewY","scaleX","scaleY","scaleZ"]}else{this.transformMethods=["translateX","translateY","rotate","skewX","skewY","scaleX","scaleY"]}this.vendorPrefix=Ext.browser.getStyleDashPrefix();this.ruleStylesCache={};return this},getStyleSheet:function(){var c=this.styleSheet,a,b;if(!c){a=document.createElement("style");a.type="text/css";(document.head||document.getElementsByTagName("head")[0]).appendChild(a);b=document.styleSheets;this.styleSheet=c=b[b.length-1]}return c},applyRules:function(i){var g=this.getStyleSheet(),k=this.ruleStylesCache,j=g.cssRules,c,e,h,b,d,a,f;for(c in i){e=i[c];h=k[c];if(h===undefined){d=j.length;g.insertRule(c+"{}",d);h=k[c]=j.item(d).style}b=h.$cache;if(!b){b=h.$cache={}}for(a in e){f=this.formatValue(e[a],a);a=this.formatName(a);if(b[a]!==f){b[a]=f;if(f===null){h.removeProperty(a)}else{h.setProperty(a,f,"important")}}}}return this},applyStyles:function(d){var g,c,f,b,a,e;for(g in d){c=document.getElementById(g);if(!c){return this}f=c.style;b=d[g];for(a in b){e=this.formatValue(b[a],a);a=this.formatName(a);if(e===null){f.removeProperty(a)}else{f.setProperty(a,e,"important")}}}return this},formatName:function(b){var a=this.formattedNameCache,c=a[b];if(!c){if(this.prefixedProperties[b]){c=this.vendorPrefix+b}else{c=b}a[b]=c}return c},formatValue:function(j,b){var g=typeof j,l=this.DEFAULT_UNIT_LENGTH,e,a,d,f,c,k,h;if(g=="string"){if(this.lengthProperties[b]){h=j.match(this.lengthUnitRegex)[1];if(h.length>0){}else{return j+l}}return j}else{if(g=="number"){if(j==0){return"0"}if(this.lengthProperties[b]){return j+l}if(this.angleProperties[b]){return j+this.DEFAULT_UNIT_ANGLE}if(this.durationProperties[b]){return j+this.DEFAULT_UNIT_DURATION}}else{if(b==="transform"){e=this.transformMethods;c=[];for(d=0,f=e.length;d<f;d++){a=e[d];c.push(a+"("+this.formatValue(j[a],a)+")")}return c.join(" ")}else{if(Ext.isArray(j)){k=[];for(d=0,f=j.length;d<f;d++){k.push(this.formatValue(j[d],b))}return(k.length>0)?k.join(", "):"none"}}}}return j}});Ext.define("Ext.fx.runner.CssTransition",{extend:"Ext.fx.runner.Css",listenersAttached:false,constructor:function(){this.runningAnimationsData={};return this.callParent(arguments)},attachListeners:function(){this.listenersAttached=true;this.getEventDispatcher().addListener("element","*","transitionend","onTransitionEnd",this)},onTransitionEnd:function(b){var a=b.target,c=a.id;if(c&&this.runningAnimationsData.hasOwnProperty(c)){this.refreshRunningAnimationsData(Ext.get(a),[b.browserEvent.propertyName])}},onAnimationEnd:function(g,f,d,j,n){var b=g.getId(),k=this.runningAnimationsData[b],c=k.nameMap,o={},m={},h,e,l,a;o[b]=m;if(f.onBeforeEnd){f.onBeforeEnd.call(f.scope||this,g,j)}d.fireEvent("animationbeforeend",d,g,j);this.fireEvent("animationbeforeend",this,d,g,j);if(n||(!j&&!f.preserveEndState)){h=f.toPropertyNames;for(e=0,l=h.length;e<l;e++){a=h[e];if(!c.hasOwnProperty(a)){m[a]=null}}}if(f.after){Ext.merge(m,f.after)}this.applyStyles(o);if(f.onEnd){f.onEnd.call(f.scope||this,g,j)}d.fireEvent("animationend",d,g,j);this.fireEvent("animationend",this,d,g,j)},onAllAnimationsEnd:function(b){var c=b.getId(),a={};delete this.runningAnimationsData[c];a[c]={"transition-property":null,"transition-duration":null,"transition-timing-function":null,"transition-delay":null};this.applyStyles(a);this.fireEvent("animationallend",this,b)},hasRunningAnimations:function(a){var c=a.getId(),b=this.runningAnimationsData;return b.hasOwnProperty(c)&&b[c].sessions.length>0},refreshRunningAnimationsData:function(d,k,t,p){var g=d.getId(),q=this.runningAnimationsData,a=q[g],m=a.nameMap,s=a.nameList,b=a.sessions,f,h,e,u,l,c,r,o,n=false;t=Boolean(t);p=Boolean(p);if(!b){return this}f=b.length;if(f===0){return this}if(p){a.nameMap={};s.length=0;for(l=0;l<f;l++){c=b[l];this.onAnimationEnd(d,c.data,c.animation,t,p)}b.length=0}else{for(l=0;l<f;l++){c=b[l];r=c.map;o=c.list;for(h=0,e=k.length;h<e;h++){u=k[h];if(r[u]){delete r[u];Ext.Array.remove(o,u);c.length--;if(--m[u]==0){delete m[u];Ext.Array.remove(s,u)}}}if(c.length==0){b.splice(l,1);l--;f--;n=true;this.onAnimationEnd(d,c.data,c.animation,t)}}}if(!p&&!t&&b.length==0&&n){this.onAllAnimationsEnd(d)}},getRunningData:function(b){var a=this.runningAnimationsData;if(!a.hasOwnProperty(b)){a[b]={nameMap:{},nameList:[],sessions:[]}}return a[b]},getTestElement:function(){var c=this.testElement,b,d,a;if(!c){b=document.createElement("iframe");a=b.style;a.setProperty("visibility","hidden","important");a.setProperty("width","0px","important");a.setProperty("height","0px","important");a.setProperty("position","absolute","important");a.setProperty("border","0px","important");a.setProperty("zIndex","-1000","important");document.body.appendChild(b);d=b.contentDocument;d.open();d.writeln("</body>");d.close();this.testElement=c=d.createElement("div");c.style.setProperty("position","absolute","!important");d.body.appendChild(c);this.testElementComputedStyle=window.getComputedStyle(c)}return c},getCssStyleValue:function(b,e){var d=this.getTestElement(),a=this.testElementComputedStyle,c=d.style;c.setProperty(b,e);e=a.getPropertyValue(b);c.removeProperty(b);return e},run:function(o){var E=this,h=this.lengthProperties,w={},D={},F={},d,r,x,e,t,H,u,p,q,a,z,y,n,A,l,s,g,B,G,k,f,v,m,c,C,b;if(!this.listenersAttached){this.attachListeners()}o=Ext.Array.from(o);for(z=0,n=o.length;z<n;z++){A=o[z];A=Ext.factory(A,Ext.fx.Animation);d=A.getElement();g=window.getComputedStyle(d.dom);r=d.getId();F=Ext.merge({},A.getData());if(A.onBeforeStart){A.onBeforeStart.call(A.scope||this,d);A.fireEvent("animationstart",A);this.fireEvent("animationstart",this,A)}F[r]=F;t=F.before;x=F.from;e=F.to;F.fromPropertyNames=H=[];F.toPropertyNames=u=[];for(G in e){if(e.hasOwnProperty(G)){e[G]=k=this.formatValue(e[G],G);B=this.formatName(G);m=h.hasOwnProperty(G);if(!m){k=this.getCssStyleValue(B,k)}if(x.hasOwnProperty(G)){x[G]=v=this.formatValue(x[G],G);if(!m){v=this.getCssStyleValue(B,v)}if(k!==v){H.push(B);u.push(B)}}else{f=g.getPropertyValue(B);if(k!==f){u.push(B)}}}}l=u.length;if(l===0){this.onAnimationEnd(d,F,A);continue}a=this.getRunningData(r);b=a.sessions;if(b.length>0){this.refreshRunningAnimationsData(d,Ext.Array.merge(H,u),true,F.replacePrevious)}c=a.nameMap;C=a.nameList;s={};for(y=0;y<l;y++){G=u[y];s[G]=true;if(!c.hasOwnProperty(G)){c[G]=1;C.push(G)}else{c[G]++}}b.push({element:d,map:s,list:u.slice(),length:l,data:F,animation:A});w[r]=x=Ext.apply(Ext.Object.chain(t),x);if(C.length>0){H=Ext.Array.difference(C,H);u=Ext.Array.merge(H,u);x["transition-property"]=H}D[r]=e=Ext.Object.chain(e);e["transition-property"]=u;e["transition-duration"]=F.duration;e["transition-timing-function"]=F.easing;e["transition-delay"]=F.delay;A.startTime=Date.now()}q=this.$className;this.applyStyles(w);p=function(i){if(i.data===q&&i.source===window){window.removeEventListener("message",p,false);E.applyStyles(D)}};window.addEventListener("message",p,false);window.postMessage(q,"*")}});Ext.define("Ext.fx.Runner",{requires:["Ext.fx.runner.CssTransition"],constructor:function(){return new Ext.fx.runner.CssTransition()}});(function(a){Ext.define("Ext.layout.Default",{extend:"Ext.Evented",alternateClassName:["Ext.layout.AutoContainerLayout","Ext.layout.ContainerLayout"],alias:["layout.auto","layout.default"],isLayout:true,hasDockedItemsCls:a+"hasdocked",centeredItemCls:a+"centered",floatingItemCls:a+"floating",dockingWrapperCls:a+"docking",dockingInnerCls:a+"docking-inner",maskCls:a+"mask",positionMap:{top:"start",left:"start",bottom:"end",right:"end"},positionDirectionMap:{top:"vertical",bottom:"vertical",left:"horizontal",right:"horizontal"},DIRECTION_VERTICAL:"vertical",DIRECTION_HORIZONTAL:"horizontal",POSITION_START:"start",POSITION_END:"end",config:{animation:null},constructor:function(b,c){this.container=b;this.innerItems=[];this.centeringWrappers={};this.initConfig(c)},reapply:Ext.emptyFn,unapply:Ext.emptyFn,onItemAdd:function(){this.doItemAdd.apply(this,arguments)},onItemRemove:function(){this.doItemRemove.apply(this,arguments)},onItemMove:function(){this.doItemMove.apply(this,arguments)},onItemCenteredChange:function(){this.doItemCenteredChange.apply(this,arguments)},onItemFloatingChange:function(){this.doItemFloatingChange.apply(this,arguments)},onItemDockedChange:function(){this.doItemDockedChange.apply(this,arguments)},doItemAdd:function(c,b){var d=c.getDocked();if(d!==null){this.dockItem(c,d)}else{if(c.isCentered()){this.centerItem(c,b)}else{this.insertItem(c,b)}}if(c.isFloating()){this.onItemFloatingChange(c,true)}},doItemRemove:function(b){if(b.isDocked()){this.undockItem(b)}else{if(b.isCentered()){this.uncenterItem(b)}}Ext.Array.remove(this.innerItems,b);this.container.innerElement.dom.removeChild(b.renderElement.dom)},doItemMove:function(c,d,b){if(c.isCentered()){c.setZIndex((d+1)*2)}else{if(c.isFloating()){c.setZIndex((d+1)*2)}this.insertItem(c,d)}},doItemCenteredChange:function(c,b){if(b){this.centerItem(c)}else{this.uncenterItem(c)}},doItemFloatingChange:function(d,e){var c=d.element,b=this.floatingItemCls;if(e){if(d.getZIndex()===null){d.setZIndex((this.container.indexOf(d)+1)*2)}c.addCls(b)}else{d.setZIndex(null);c.removeCls(b)}},doItemDockedChange:function(b,d,c){if(c){this.undockItem(b,c)}if(d){this.dockItem(b,d)}},centerItem:function(b){this.insertItem(b,0);if(b.getZIndex()===null){b.setZIndex((this.container.indexOf(b)+1)*2)}this.createCenteringWrapper(b);b.element.addCls(this.floatingItemCls)},uncenterItem:function(b){this.destroyCenteringWrapper(b);b.setZIndex(null);this.insertItem(b,this.container.indexOf(b));b.element.removeCls(this.floatingItemCls)},dockItem:function(f,b){var c=this.container,g=f.renderElement,e=f.element,d=this.dockingInnerElement;if(!d){c.setUseBodyElement(true);this.dockingInnerElement=d=c.bodyElement}this.getDockingWrapper(b);if(this.positionMap[b]===this.POSITION_START){g.insertBefore(d)}else{g.insertAfter(d)}e.addCls(a+"docked-"+b)},undockItem:function(b,c){this.insertItem(b,this.container.indexOf(b));b.element.removeCls(a+"docked-"+c)},getDockingWrapper:function(b){var e=this.currentDockingDirection,d=this.positionDirectionMap[b],c=this.dockingWrapper;if(e!==d){this.currentDockingDirection=d;this.dockingWrapper=c=this.createDockingWrapper(d)}return c},createDockingWrapper:function(b){return this.dockingInnerElement.wrap({classList:[this.dockingWrapperCls+"-"+b]},true)},createCenteringWrapper:function(c){var f=c.getId(),d=this.centeringWrappers,b=c.renderElement,e;d[f]=e=b.wrap({className:this.centeredItemCls});return e},destroyCenteringWrapper:function(c){var f=c.getId(),d=this.centeringWrappers,b=c.renderElement,e=d[f];b.unwrap();e.destroy();delete d[f];return this},insertItem:function(k,g){var d=this.container,j=d.getItems().items,e=this.innerItems,c=d.innerElement.dom,i=k.renderElement.dom,h,f,b;if(d.has(k)){Ext.Array.remove(e,k)}if(typeof g=="number"){h=j[g];if(h===k){h=j[++g]}while(h&&(h.isCentered()||h.isDocked())){h=j[++g]}if(h){b=e.indexOf(h);if(b!==-1){while(h&&(h.isCentered()||h.isDocked())){h=e[++b]}if(h){e.splice(b,0,k);f=h.renderElement.dom;c.insertBefore(i,f);return this}}}}e.push(k);c.appendChild(i);return this}})})(Ext.baseCSSPrefix);Ext.define("Ext.layout.AbstractBox",{extend:"Ext.layout.Default",config:{align:"stretch",pack:null},flexItemCls:Ext.baseCSSPrefix+"layout-box-item",positionMap:{middle:"center",left:"start",top:"start",right:"end",bottom:"end"},constructor:function(a){this.callParent(arguments);a.innerElement.addCls(this.cls);a.on(this.sizeChangeEventName,"onItemSizeChange",this,{delegate:"> component"})},reapply:function(){this.container.innerElement.addCls(this.cls);this.updatePack(this.getPack());this.updateAlign(this.getAlign())},unapply:function(){this.container.innerElement.removeCls(this.cls);this.updatePack(null);this.updateAlign(null)},doItemAdd:function(d,b){this.callParent(arguments);if(d.isInnerItem()){var c=d.getConfig(this.sizePropertyName),a=d.config;if(!c&&("flex" in a)){this.setItemFlex(d,a.flex)}}},doItemRemove:function(a){if(a.isInnerItem()){this.setItemFlex(a,null)}this.callParent(arguments)},onItemSizeChange:function(a){this.setItemFlex(a,null)},doItemCenteredChange:function(b,a){if(a){this.setItemFlex(b,null)}this.callParent(arguments)},doItemFloatingChange:function(a,b){if(b){this.setItemFlex(a,null)}this.callParent(arguments)},doItemDockedChange:function(a,b){if(b){this.setItemFlex(a,null)}this.callParent(arguments)},redrawContainer:function(){var a=this.container,b=a.renderElement.dom.parentNode;if(b&&b.nodeType!==11){a.innerElement.redraw()}},setItemFlex:function(c,a){var b=c.element,d=this.flexItemCls;if(a){b.addCls(d)}else{if(b.hasCls(d)){this.redrawContainer();b.removeCls(d)}}b.dom.style.webkitBoxFlex=a},convertPosition:function(a){if(this.positionMap.hasOwnProperty(a)){return this.positionMap[a]}return a},applyAlign:function(a){return this.convertPosition(a)},updateAlign:function(a){this.container.innerElement.dom.style.webkitBoxAlign=a},applyPack:function(a){return this.convertPosition(a)},updatePack:function(a){this.container.innerElement.dom.style.webkitBoxPack=a}});Ext.define("Ext.layout.Fit",{extend:"Ext.layout.Default",alternateClassName:"Ext.layout.FitLayout",alias:"layout.fit",cls:Ext.baseCSSPrefix+"layout-fit",itemCls:Ext.baseCSSPrefix+"layout-fit-item",constructor:function(a){this.callParent(arguments);this.apply()},apply:function(){this.container.innerElement.addCls(this.cls)},reapply:function(){this.apply()},unapply:function(){this.container.innerElement.removeCls(this.cls)},doItemAdd:function(b,a){if(b.isInnerItem()){b.addCls(this.itemCls)}this.callParent(arguments)},doItemRemove:function(a){if(a.isInnerItem()){a.removeCls(this.itemCls)}this.callParent(arguments)}});Ext.define("Ext.layout.Card",{extend:"Ext.layout.Fit",alternateClassName:"Ext.layout.CardLayout",isCard:true,requires:["Ext.fx.layout.Card"],alias:"layout.card",cls:Ext.baseCSSPrefix+"layout-card",itemCls:Ext.baseCSSPrefix+"layout-card-item",constructor:function(){this.callParent(arguments);this.container.onInitialized(this.onContainerInitialized,this)},applyAnimation:function(a){return new Ext.fx.layout.Card(a)},updateAnimation:function(b,a){if(b&&b.isAnimation){b.setLayout(this)}if(a){a.destroy()}},doItemAdd:function(b,a){if(b.isInnerItem()){b.hide()}this.callParent(arguments)},doItemRemove:function(c,a,b){this.callParent(arguments);if(!b&&c.isInnerItem()){c.show()}},onContainerInitialized:function(a){var b=a.getActiveItem();if(b){b.show()}a.on("activeitemchange","onContainerActiveItemChange",this)},onContainerActiveItemChange:function(a){this.relayEvent(arguments,"doActiveItemChange")},doActiveItemChange:function(b,c,a){if(a){a.hide()}if(c){c.show()}},doItemDockedChange:function(b,c){var a=b.element;if(c){a.removeCls(this.itemCls)}else{a.addCls(this.itemCls)}this.callParent(arguments)}});Ext.define("Ext.layout.HBox",{extend:"Ext.layout.AbstractBox",alternateClassName:"Ext.layout.HBoxLayout",alias:"layout.hbox",sizePropertyName:"width",sizeChangeEventName:"widthchange",cls:Ext.baseCSSPrefix+"layout-hbox"});Ext.define("Ext.layout.VBox",{extend:"Ext.layout.AbstractBox",alternateClassName:"Ext.layout.VBoxLayout",alias:"layout.vbox",sizePropertyName:"height",sizeChangeEventName:"heightchange",cls:Ext.baseCSSPrefix+"layout-vbox"});Ext.define("Ext.layout.Layout",{requires:["Ext.layout.Fit","Ext.layout.Card","Ext.layout.HBox","Ext.layout.VBox"],constructor:function(a,b){var c=Ext.layout.Default,d,e;if(typeof b=="string"){d=b;b={}}else{if("type" in b){d=b.type}}if(d){c=Ext.ClassManager.getByAlias("layout."+d)}return new c(a,b)}});Ext.define("Ext.mixin.Sortable",{extend:"Ext.mixin.Mixin",requires:["Ext.util.Sorter"],mixinConfig:{id:"sortable"},config:{sorters:null,defaultSortDirection:"ASC",sortRoot:null},dirtySortFn:false,sortFn:null,sorted:false,applySorters:function(a,b){if(!b){b=this.createSortersCollection()}b.clear();this.sorted=false;if(a){this.addSorters(a)}return b},createSortersCollection:function(){this._sorters=Ext.create("Ext.util.Collection",function(a){return a.getId()});return this._sorters},addSorter:function(b,a){this.addSorters([b],a)},addSorters:function(c,a){var b=this.getSorters();return this.insertSorters(b?b.length:0,c,a)},insertSorter:function(a,c,b){return this.insertSorters(a,[c],b)},insertSorters:function(e,h,a){if(!Ext.isArray(h)){h=[h]}var f=h.length,j=a||this.getDefaultSortDirection(),c=this.getSortRoot(),k=this.getSorters(),l=[],g,b,m,d;if(!k){k=this.createSortersCollection()}for(b=0;b<f;b++){m=h[b];g={direction:j,root:c};if(typeof m==="string"){d=k.get(m);if(!d){g.property=m}else{if(a!==undefined){d.setDirection(a)}else{d.toggle()}continue}}else{if(Ext.isFunction(m)){g.sorterFn=m}else{if(Ext.isObject(m)){if(!m.isSorter){if(m.fn){m.sorterFn=m.fn;delete m.fn}g=Ext.apply(g,m)}else{l.push(m);if(!m.getRoot()){m.setRoot(c)}continue}}}}m=Ext.create("Ext.util.Sorter",g);l.push(m)}for(b=0,f=l.length;b<f;b++){k.insert(e+b,l[b])}this.dirtySortFn=true;if(k.length){this.sorted=true}return k},removeSorter:function(a){return this.removeSorters([a])},removeSorters:function(d){if(!Ext.isArray(d)){d=[d]}var b=d.length,c=this.getSorters(),a,e;for(a=0;a<b;a++){e=d[a];if(typeof e==="string"){c.removeAtKey(e)}else{if(typeof e==="function"){c.each(function(f){if(f.getSorterFn()===e){c.remove(f)}})}else{if(e.isSorter){c.remove(e)}}}}if(!c.length){this.sorted=false}},updateSortFn:function(){var a=this.getSorters().items;this.sortFn=function(d,c){var f=a.length,b,e;for(e=0;e<f;e++){b=a[e].sort.call(this,d,c);if(b!==0){break}}return b};this.dirtySortFn=false;return this.sortFn},getSortFn:function(){if(this.dirtySortFn){return this.updateSortFn()}return this.sortFn},sort:function(a){Ext.Array.sort(a,this.getSortFn());return a},findInsertionIndex:function(b,e,g){var h=0,a=b.length-1,d=g||this.getSortFn(),c,f;while(h<=a){c=(h+a)>>1;f=d(e,b[c]);if(f>=0){h=c+1}else{if(f<0){a=c-1}}}return h}});Ext.define("Ext.util.AbstractMixedCollection",{requires:["Ext.util.Filter"],mixins:{observable:"Ext.util.Observable"},constructor:function(b,a){var c=this;c.items=[];c.map={};c.keys=[];c.length=0;c.allowFunctions=b===true;if(a){c.getKey=a}c.mixins.observable.constructor.call(c)},allowFunctions:false,add:function(b,e){var d=this,f=e,c=b,a;if(arguments.length==1){f=c;c=d.getKey(f)}if(typeof c!="undefined"&&c!==null){a=d.map[c];if(typeof a!="undefined"){return d.replace(c,f)}d.map[c]=f}d.length++;d.items.push(f);d.keys.push(c);d.fireEvent("add",d.length-1,f,c);return f},getKey:function(a){return a.id},replace:function(c,e){var d=this,a,b;if(arguments.length==1){e=arguments[0];c=d.getKey(e)}a=d.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return d.add(c,e)}b=d.indexOfKey(c);d.items[b]=e;d.map[c]=e;d.fireEvent("replace",c,a,e);return e},addAll:function(f){var e=this,d=0,b,a,c;if(arguments.length>1||Ext.isArray(f)){b=arguments.length>1?arguments:f;for(a=b.length;d<a;d++){e.add(b[d])}}else{for(c in f){if(f.hasOwnProperty(c)){if(e.allowFunctions||typeof f[c]!="function"){e.add(c,f[c])}}}}},each:function(e,d){var b=[].concat(this.items),c=0,a=b.length,f;for(;c<a;c++){f=b[c];if(e.call(d||f,f,c,a)===false){break}}},eachKey:function(e,d){var f=this.keys,b=this.items,c=0,a=f.length;for(;c<a;c++){e.call(d||window,f[c],b[c],c,a)}},findBy:function(e,d){var f=this.keys,b=this.items,c=0,a=b.length;for(;c<a;c++){if(e.call(d||window,b[c],f[c])){return b[c]}}return null},insert:function(a,b,e){var d=this,c=b,f=e;if(arguments.length==2){f=c;c=d.getKey(f)}if(d.containsKey(c)){d.suspendEvents();d.removeAtKey(c);d.resumeEvents()}if(a>=d.length){return d.add(c,f)}d.length++;Ext.Array.splice(d.items,a,0,f);if(typeof c!="undefined"&&c!==null){d.map[c]=f}Ext.Array.splice(d.keys,a,0,c);d.fireEvent("add",a,f,c);return f},remove:function(a){return this.removeAt(this.indexOf(a))},removeAll:function(a){Ext.each(a||[],function(b){this.remove(b)},this);return this},removeAt:function(a){var c=this,d,b;if(a<c.length&&a>=0){c.length--;d=c.items[a];Ext.Array.erase(c.items,a,1);b=c.keys[a];if(typeof b!="undefined"){delete c.map[b]}Ext.Array.erase(c.keys,a,1);c.fireEvent("remove",d,b);return d}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return Ext.Array.indexOf(this.items,a)},indexOfKey:function(a){return Ext.Array.indexOf(this.keys,a)},get:function(b){var d=this,a=d.map[b],c=a!==undefined?a:(typeof b=="number")?d.items[b]:undefined;return typeof c!="function"||d.allowFunctions?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(a){return Ext.Array.contains(this.items,a)},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){var a=this;a.length=0;a.items=[];a.keys=[];a.map={};a.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},sum:function(g,b,h,a){var c=this.extractValues(g,b),f=c.length,e=0,d;h=h||0;a=(a||a===0)?a:f-1;for(d=h;d<=a;d++){e+=c[d]}return e},collect:function(j,e,g){var k=this.extractValues(j,e),a=k.length,b={},c=[],h,f,d;for(d=0;d<a;d++){h=k[d];f=String(h);if((g||!Ext.isEmpty(h))&&!b[f]){b[f]=true;c.push(h)}}return c},extractValues:function(c,a){var b=this.items;if(a){b=Ext.Array.pluck(b,a)}return Ext.Array.pluck(b,c)},getRange:function(f,a){var e=this,c=e.items,b=[],d;if(c.length<1){return b}f=f||0;a=Math.min(typeof a=="undefined"?e.length-1:a,e.length-1);if(f<=a){for(d=f;d<=a;d++){b[b.length]=c[d]}}else{for(d=f;d>=a;d--){b[b.length]=c[d]}}return b},filter:function(d,c,f,a){var b=[],e;if(Ext.isString(d)){b.push(Ext.create("Ext.util.Filter",{property:d,value:c,anyMatch:f,caseSensitive:a}))}else{if(Ext.isArray(d)||d instanceof Ext.util.Filter){b=b.concat(d)}}e=function(g){var m=true,n=b.length,h;for(h=0;h<n;h++){var l=b[h],k=l.getFilterFn(),j=l.getScope();m=m&&k.call(j,g)}return m};return this.filterBy(e)},filterBy:function(e,d){var h=this,a=new this.self(),g=h.keys,b=h.items,f=b.length,c;a.getKey=h.getKey;for(c=0;c<f;c++){if(e.call(d||h,b[c],g[c])){a.add(g[c],b[c])}}return a},findIndex:function(c,b,e,d,a){if(Ext.isEmpty(b,false)){return -1}b=this.createValueMatcher(b,d,a);return this.findIndexBy(function(f){return f&&b.test(f[c])},null,e)},findIndexBy:function(e,d,h){var g=this,f=g.keys,b=g.items,c=h||0,a=b.length;for(;c<a;c++){if(e.call(d||g,b[c],f[c])){return c}}return -1},createValueMatcher:function(c,e,a,b){if(!c.exec){var d=Ext.String.escapeRegex;c=String(c);if(e===true){c=d(c)}else{c="^"+d(c);if(b===true){c+="$"}}c=new RegExp(c,a?"":"i")}return c},clone:function(){var e=this,f=new this.self(),d=e.keys,b=e.items,c=0,a=b.length;for(;c<a;c++){f.add(d[c],b[c])}f.getKey=e.getKey;return f}});Ext.define("Ext.util.Collection",{config:{autoFilter:true,autoSort:true},mixins:{sortable:"Ext.mixin.Sortable",filterable:"Ext.mixin.Filterable"},constructor:function(b,a){var c=this;c.all=[];c.items=[];c.keys=[];c.indices={};c.map={};c.length=0;if(b){c.getKey=b}this.initConfig(a)},updateAutoSort:function(a,b){if(b===false&&a&&this.items.length){this.sort()}},updateAutoFilter:function(b,a){if(a===false&&b&&this.all.length){this.runFilters()}},insertSorters:function(){this.mixins.sortable.insertSorters.apply(this,arguments);if(this.getAutoSort()&&this.items.length){this.sort()}return this},removeSorters:function(a){this.mixins.sortable.removeSorters.call(this,a);if(this.sorted&&this.getAutoSort()&&this.items.length){this.sort()}return this},applyFilters:function(a){var b=this.mixins.filterable.applyFilters.call(this,a);if(!a&&this.all.length&&this.getAutoFilter()){this.filter()}return b},addFilters:function(a){this.mixins.filterable.addFilters.call(this,a);if(this.items.length&&this.getAutoFilter()){this.runFilters()}return this},removeFilters:function(a){this.mixins.filterable.removeFilters.call(this,a);if(this.filtered&&this.all.length&&this.getAutoFilter()){this.filter()}return this},filter:function(c,b,d,a){if(c){if(Ext.isString(c)){this.addFilters({property:c,value:b,anyMatch:d,caseSensitive:a});return this.items}else{this.addFilters(c);return this.items}}this.items=this.mixins.filterable.filter.call(this,this.all.slice());this.updateAfterFilter();if(this.sorted&&this.getAutoSort()){this.sort()}},runFilters:function(){this.items=this.mixins.filterable.filter.call(this,this.items);this.updateAfterFilter()},updateAfterFilter:function(){var a=this.items,f=this.keys,g=this.indices={},e=a.length,c,d,b;f.length=0;for(c=0;c<e;c++){d=a[c];b=this.getKey(d);g[b]=c;f[c]=b}this.length=a.length;this.dirtyIndices=false},sort:function(e,a){var d=this.items,h=this.keys,g=this.indices,c=d.length,b,j,f;if(e){this.addSorters(e,a);return this.items}for(b=0;b<c;b++){d[b]._current_key=h[b]}this.handleSort(d);for(b=0;b<c;b++){j=d[b];f=j._current_key;h[b]=f;g[f]=b;delete j._current_key}this.dirtyIndices=true},handleSort:function(a){this.mixins.sortable.sort.call(this,a)},add:function(i,k){var g=this,d=this.filtered,e=this.sorted,h=this.all,f=this.items,l=this.keys,j=this.indices,a=this.mixins.filterable,b=f.length,c=b;if(arguments.length==1){k=i;i=g.getKey(k)}if(typeof i!="undefined"&&i!==null){if(typeof g.map[i]!="undefined"){return g.replace(i,k)}g.map[i]=k}h.push(k);if(d&&this.getAutoFilter()&&a.isFiltered.call(g,k)){return null}g.length++;if(e&&this.getAutoSort()){c=this.findInsertionIndex(f,k)}if(c!==b){this.dirtyIndices=true;Ext.Array.splice(l,c,0,i);Ext.Array.splice(f,c,0,k)}else{j[i]=b;l.push(i);f.push(k)}return k},getKey:function(a){return a.id},replace:function(d,m){var i=this,g=i.sorted,f=i.filtered,b=i.mixins.filterable,h=i.items,n=i.keys,k=i.all,c=i.map,l=null,a=h.length,o,e,j;if(arguments.length==1){m=d;d=j=i.getKey(m)}else{j=i.getKey(m)}o=c[d];if(typeof d=="undefined"||d===null||typeof o=="undefined"){return i.add(j,m)}i.map[j]=m;if(j!==d){delete i.map[d]}if(g&&i.getAutoSort()){Ext.Array.remove(h,o);Ext.Array.remove(n,d);Ext.Array.remove(k,o);k.push(m);i.dirtyIndices=true;if(f&&i.getAutoFilter()){if(b.isFiltered.call(i,m)){if(a!==h.length){i.length--}return null}else{if(a===h.length){i.length++;l=m}}}e=this.findInsertionIndex(h,m);Ext.Array.splice(n,e,0,j);Ext.Array.splice(h,e,0,m)}else{if(f){if(i.getAutoFilter()&&b.isFiltered.call(i,m)){if(h.indexOf(o)!==-1){Ext.Array.remove(h,o);Ext.Array.remove(n,d);i.length--;i.dirtyIndices=true}return null}else{if(h.indexOf(o)===-1){h.push(m);n.push(j);i.indices[j]=i.length;i.length++;return m}}}e=i.items.indexOf(o);n[e]=j;h[e]=m;this.dirtyIndices=true}return l},addAll:function(h){var q=this,e=q.filtered,a=q.sorted,b=q.all,k=q.items,j=q.keys,p=q.map,l=q.getAutoFilter(),m=q.getAutoSort(),r=[],f=[],c=q.mixins.filterable,d=[],g,s,n,o;if(Ext.isObject(h)){for(s in h){if(h.hasOwnProperty(s)){f.push(k[s]);r.push(s)}}}else{f=h;g=h.length;for(n=0;n<g;n++){r.push(q.getKey(h[n]))}}for(n=0;n<g;n++){s=r[n];o=f[n];if(typeof s!="undefined"&&s!==null){if(typeof p[s]!="undefined"){q.replace(s,o);continue}p[s]=o}b.push(o);if(e&&l&&c.isFiltered.call(q,o)){continue}q.length++;j.push(s);k.push(o);d.push(o)}if(d.length){q.dirtyIndices=true;if(a&&m){q.sort()}return d}return null},each:function(e,d){var b=this.items.slice(),c=0,a=b.length,f;for(;c<a;c++){f=b[c];if(e.call(d||f,f,c,a)===false){break}}},eachKey:function(d,c){var f=this.keys,a=this.items,e=f.length,b;for(b=0;b<e;b++){d.call(c||window,f[b],a[b],b,e)}},findBy:function(e,d){var f=this.keys,b=this.items,c=0,a=b.length;for(;c<a;c++){if(e.call(d||window,b[c],f[c])){return b[c]}}return null},filterBy:function(e,d){var h=this,c=new this.self(),g=h.keys,a=h.all,f=a.length,b;c.getKey=h.getKey;for(b=0;b<f;b++){if(e.call(d||h,a[b],g[b])){c.add(g[b],a[b])}}return c},insert:function(c,d,f){var e=this,a=this.sorted,b=this.filtered;if(arguments.length==2){f=d;d=e.getKey(f)}if(e.containsKey(d)){e.removeAtKey(d)}if(c>=e.length||(a&&e.getAutoSort())){return e.add(d,f)}this.all.push(f);if(typeof d!="undefined"&&d!==null){e.map[d]=f}if(b&&this.getAutoFilter()&&filterable.isFiltered.call(e,f)){return null}e.length++;Ext.Array.splice(e.items,c,0,f);Ext.Array.splice(e.keys,c,0,d);e.dirtyIndices=true;return f},insertAll:function(g,d){if(g>=this.items.length||(this.sorted&&this.getAutoSort())){return this.addAll(d)}var s=this,h=this.filtered,a=this.sorted,b=this.all,m=this.items,l=this.keys,r=this.map,n=this.getAutoFilter(),o=this.getAutoSort(),t=[],j=[],f=[],c=this.mixins.filterable,e=false,k,u,p,q;if(a&&this.getAutoSort()){}if(Ext.isObject(d)){for(u in d){if(d.hasOwnProperty(u)){j.push(m[u]);t.push(u)}}}else{j=d;k=d.length;for(p=0;p<k;p++){t.push(s.getKey(d[p]))}}for(p=0;p<k;p++){u=t[p];q=j[p];if(typeof u!="undefined"&&u!==null){if(s.containsKey(u)){s.removeAtKey(u)}r[u]=q}b.push(q);if(h&&n&&c.isFiltered.call(s,q)){continue}s.length++;Ext.Array.splice(m,g+p,0,q);Ext.Array.splice(l,g+p,0,u);e=true;f.push(q)}if(e){this.dirtyIndices=true;if(a&&o){this.sort()}return f}return null},remove:function(b){var a=this.items.indexOf(b);if(a===-1){Ext.Array.remove(this.all,b);return b}return this.removeAt(this.items.indexOf(b))},removeAll:function(a){if(a){var c=a.length,b;for(b=0;b<c;b++){this.remove(a[b])}}return this},removeAt:function(b){var g=this,a=g.items,f=g.keys,d=this.all,e,c;if(b<g.length&&b>=0){e=a[b];c=f[b];if(typeof c!="undefined"){delete g.map[c]}Ext.Array.erase(a,b,1);Ext.Array.erase(f,b,1);Ext.Array.remove(d,e);g.length--;this.dirtyIndices=true;return e}return false},removeAtKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(b){if(this.dirtyIndices){this.updateIndices()}var a=this.indices[this.getKey(b)];return(a===undefined)?-1:a},indexOfKey:function(b){if(this.dirtyIndices){this.updateIndices()}var a=this.indices[b];return(a===undefined)?-1:a},updateIndices:function(){var a=this.items,e=a.length,f=this.indices={},c,d,b;for(c=0;c<e;c++){d=a[c];b=this.getKey(d);f[b]=c}this.dirtyIndices=false},get:function(b){var d=this,a=d.map[b],c;if(a!==undefined){c=a}else{if(typeof b=="number"){c=d.items[b]}}return typeof c!="function"||d.getAllowFunctions()?c:null},getAt:function(a){return this.items[a]},getByKey:function(a){return this.map[a]},contains:function(b){var a=this.getKey(b);if(a){return this.containsKey(a)}else{return Ext.Array.contains(this.items,b)}},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){var a=this;a.length=0;a.items.length=0;a.keys.length=0;a.all.length=0;a.map={}},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},getRange:function(f,a){var e=this,c=e.items,b=[],d;if(c.length<1){return b}f=f||0;a=Math.min(typeof a=="undefined"?e.length-1:a,e.length-1);if(f<=a){for(d=f;d<=a;d++){b[b.length]=c[d]}}else{for(d=f;d>=a;d--){b[b.length]=c[d]}}return b},findIndexBy:function(d,c,h){var g=this,f=g.keys,a=g.items,b=h||0,e=a.length;for(;b<e;b++){if(d.call(c||g,a[b],f[b])){return b}}return -1},clone:function(){var e=this,f=new this.self(),d=e.keys,a=e.items,b=0,c=a.length;for(;b<c;b++){f.add(d[b],a[b])}f.getKey=e.getKey;return f}});Ext.define("Ext.data.StoreManager",{extend:"Ext.util.Collection",alternateClassName:["Ext.StoreMgr","Ext.data.StoreMgr","Ext.StoreManager"],singleton:true,uses:["Ext.data.ArrayStore"],register:function(){for(var a=0,b;(b=arguments[a]);a++){this.add(b)}},unregister:function(){for(var a=0,b;(b=arguments[a]);a++){this.remove(this.lookup(b))}},lookup:function(c){if(Ext.isArray(c)){var b=["field1"],e=!Ext.isArray(c[0]),f=c,d,a;if(e){f=[];for(d=0,a=c.length;d<a;++d){f.push([c[d]])}}else{for(d=2,a=c[0].length;d<=a;++d){b.push("field"+d)}}return Ext.create("Ext.data.ArrayStore",{data:f,fields:b,autoDestroy:true,autoCreated:true,expanded:e})}if(Ext.isString(c)){return this.get(c)}else{if(c instanceof Ext.data.Store){return c}else{return Ext.factory(c,Ext.data.Store,null,"store")}}},getKey:function(a){return a.getStoreId()}},function(){Ext.regStore=function(c,b){var a;if(Ext.isObject(c)){b=c}else{if(b instanceof Ext.data.Store){b.setStoreId(c)}else{b.storeId=c}}if(b instanceof Ext.data.Store){a=b}else{a=Ext.create("Ext.data.Store",b)}return Ext.data.StoreManager.register(a)};Ext.getStore=function(a){return Ext.data.StoreManager.lookup(a)}});Ext.define("Ext.direct.Manager",{singleton:true,mixins:{observable:"Ext.util.Observable"},requires:["Ext.util.Collection"],alternateClassName:"Ext.Direct",statics:{exceptions:{TRANSPORT:"xhr",PARSE:"parse",LOGIN:"login",SERVER:"exception"}},constructor:function(){var a=this;a.transactions=Ext.create("Ext.util.Collection",this.getKey);a.providers=Ext.create("Ext.util.Collection",this.getKey)},getKey:function(a){return a.getId()},addProvider:function(e){var d=this,a=Ext.toArray(arguments),b=0,c;if(a.length>1){for(c=a.length;b<c;++b){d.addProvider(a[b])}return}if(!e.isProvider){e=Ext.create("direct."+e.type+"provider",e)}d.providers.add(e);e.on("data",d.onProviderData,d);if(!e.isConnected()){e.connect()}return e},getProvider:function(a){return a.isProvider?a:this.providers.get(a)},removeProvider:function(c){var b=this,a=b.providers;c=c.isProvider?c:a.get(c);if(c){c.un("data",b.onProviderData,b);a.remove(c);return c}return null},addTransaction:function(a){this.transactions.add(a);return a},removeTransaction:function(a){a=this.getTransaction(a);this.transactions.remove(a);return a},getTransaction:function(a){return Ext.isObject(a)?a:this.transactions.get(a)},onProviderData:function(f,e){var d=this,b=0,c,a;if(Ext.isArray(e)){for(c=e.length;b<c;++b){d.onProviderData(f,e[b])}return}a=e.getName();if(a&&a!="event"&&a!="exception"){d.fireEvent(a,e)}else{if(e.getStatus()===false){d.fireEvent("exception",e)}}d.fireEvent("event",e,f)},parseMethod:function(b){if(Ext.isString(b)){var e=b.split("."),a=0,c=e.length,d=window;while(d&&a<c){d=d[e[a]];++a}b=Ext.isFunction(d)?d:null}return b||null}});Ext.define("Ext.data.proxy.Direct",{extend:"Ext.data.proxy.Server",alternateClassName:"Ext.data.DirectProxy",alias:"proxy.direct",requires:["Ext.direct.Manager"],config:{paramOrder:undefined,paramsAsHash:true,directFn:undefined,api:null,extraParams:null},paramOrderRe:/[\s,|]/,applyParamOrder:function(a){if(Ext.isString(a)){a=a.split(this.paramOrderRe)}return a},applyDirectFn:function(a){return Ext.direct.Manager.parseMethod(fn)},applyApi:function(b){var a;if(b&&Ext.isObject(b)){for(a in b){if(b.hasOwnProperty(a)){b[a]=Ext.direct.Manager.parseMethod(b[a])}}}return b},doRequest:function(d,j,k){var h=this,b=h.getWriter(),e=h.buildRequest(d,j,k),f=h.getApi(),i=f&&f[e.getAction()]||h.getDirectFn(),c=e.getParams(),g=[],a;e=b.write(e);if(d.getAction()=="read"){a=i.directCfg.method;g=a.getArgs(c,h.getParamOrder(),h.getParamsAsHash())}else{g.push(e.getJsonData())}g.push(h.createRequestCallback(e,d,j,k),h);e.setConfig({args:g,directFn:i});i.apply(window,g)},applyEncoding:function(a){return a},createRequestCallback:function(d,a,e,b){var c=this;return function(g,f){c.processResponse(f.getStatus(),a,d,f,e,b)}},extractResponseData:function(b){var a=b.getResult();return Ext.isDefined(a)?a:b.getData()},setException:function(b,a){b.setException(a.getMessage())},buildUrl:function(){return""}});Ext.define("Ext.direct.Event",{alias:"direct.event",requires:["Ext.direct.Manager"],config:{status:true,data:null,name:"event",xhr:null,code:null,message:"",result:null,transaction:null},constructor:function(a){this.initConfig(a)}});Ext.define("Ext.direct.RemotingEvent",{extend:"Ext.direct.Event",alias:"direct.rpc",config:{name:"remoting",tid:null,transaction:null},getTransaction:function(){return this._transaction||Ext.direct.Manager.getTransaction(this.getTid())}});Ext.define("Ext.direct.ExceptionEvent",{extend:"Ext.direct.RemotingEvent",alias:"direct.exception",config:{status:false,name:"exception",error:null}});Ext.define("Ext.util.Format",{requires:["Ext.DateExtras"],singleton:true,defaultDateFormat:"m/d/Y",escapeRe:/('|\\)/g,trimRe:/^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+|[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]+$/g,formatRe:/\{(\d+)\}/g,escapeRegexRe:/([-.*+?^${}()|[\]\/\\])/g,dashesRe:/-/g,iso8601TestRe:/\d\dT\d\d/,iso8601SplitRe:/[- :T\.Z\+]/,ellipsis:function(c,a,d){if(c&&c.length>a){if(d){var e=c.substr(0,a-2),b=Math.max(e.lastIndexOf(" "),e.lastIndexOf("."),e.lastIndexOf("!"),e.lastIndexOf("?"));if(b!=-1&&b>=(a-15)){return e.substr(0,b)+"..."}}return c.substr(0,a-3)+"..."}return c},escapeRegex:function(a){return a.replace(Ext.util.Format.escapeRegexRe,"\\$1")},escape:function(a){return a.replace(Ext.util.Format.escapeRe,"\\$1")},toggle:function(b,c,a){return b==c?a:c},trim:function(a){return a.replace(Ext.util.Format.trimRe,"")},leftPad:function(d,b,c){var a=String(d);c=c||" ";while(a.length<b){a=c+a}return a},format:function(b){var a=Ext.toArray(arguments,1);return b.replace(Ext.util.Format.formatRe,function(c,d){return a[d]})},htmlEncode:function(a){return !a?a:String(a).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/"/g,"&quot;")},htmlDecode:function(a){return !a?a:String(a).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&amp;/g,"&")},date:function(b,c){var a=b;if(!b){return""}if(!Ext.isDate(b)){a=new Date(Date.parse(b));if(isNaN(a)){if(this.iso8601TestRe.test(b)){a=b.split(this.iso8601SplitRe);a=new Date(a[0],a[1]-1,a[2],a[3],a[4],a[5])}if(isNaN(a)){a=new Date(Date.parse(b.replace(this.dashesRe,"/")))}}b=a}return Ext.Date.format(b,c||Ext.util.Format.defaultDateFormat)}});Ext.define("Ext.Template",{requires:["Ext.dom.Helper","Ext.util.Format"],inheritableStatics:{from:function(b,a){b=Ext.getDom(b);return new this(b.value||b.innerHTML,a||"")}},constructor:function(d){var f=this,b=arguments,a=[],c=0,e=b.length,g;f.initialConfig={};if(e>1){for(;c<e;c++){g=b[c];if(typeof g=="object"){Ext.apply(f.initialConfig,g);Ext.apply(f,g)}else{a.push(g)}}d=a.join("")}else{if(Ext.isArray(d)){a.push(d.join(""))}else{a.push(d)}}f.html=a.join("");if(f.compiled){f.compile()}},isTemplate:true,disableFormats:false,re:/\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,apply:function(a){var g=this,d=g.disableFormats!==true,f=Ext.util.Format,c=g,b;if(g.compiled){return g.compiled(a).join("")}function e(h,j,k,i){if(k&&d){if(i){i=[a[j]].concat(Ext.functionFactory("return ["+i+"];")())}else{i=[a[j]]}if(k.substr(0,5)=="this."){return c[k.substr(5)].apply(c,i)}else{return f[k].apply(f,i)}}else{return a[j]!==undefined?a[j]:""}}b=g.html.replace(g.re,e);return b},applyOut:function(a,b){var c=this;if(c.compiled){b.push.apply(b,c.compiled(a))}else{b.push(c.apply(a))}return b},applyTemplate:function(){return this.apply.apply(this,arguments)},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},compileARe:/\\/g,compileBRe:/(\r\n|\n)/g,compileCRe:/'/g,compile:function(){var me=this,fm=Ext.util.Format,useFormat=me.disableFormats!==true,body,bodyReturn;function fn(m,name,format,args){if(format&&useFormat){args=args?","+args:"";if(format.substr(0,5)!="this."){format="fm."+format+"("}else{format="this."+format.substr(5)+"("}}else{args="";format="(values['"+name+"'] == undefined ? '' : "}return"',"+format+"values['"+name+"']"+args+") ,'"}bodyReturn=me.html.replace(me.compileARe,"\\\\").replace(me.compileBRe,"\\n").replace(me.compileCRe,"\\'").replace(me.re,fn);body="this.compiled = function(values){ return ['"+bodyReturn+"'];};";eval(body);return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.apply(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.apply(a);return c?Ext.get(b.firstChild,true):b.firstChild}});Ext.define("Ext.XTemplate",{extend:"Ext.Template",requires:"Ext.XTemplateCompiler",apply:function(a){return this.applyOut(a,[]).join("")},applyOut:function(a,b){var d=this,c;if(!d.fn){c=new Ext.XTemplateCompiler({useFormat:d.disableFormats!==true});d.fn=c.compile(d.html)}try{d.fn.call(d,b,a,{},1,1)}catch(f){}return b},compile:function(){return this},statics:{getTpl:function(a,c){var b=a[c],d;if(b&&!b.isTemplate){b=Ext.ClassManager.dynInstantiate("Ext.XTemplate",b);if(a.hasOwnProperty(c)){a[c]=b}else{for(d=a.self.prototype;d;d=d.superclass){if(d.hasOwnProperty(c)){d[c]=b;break}}}}return b||null}}});Ext.define("Ext.util.GeoLocation",{extend:"Ext.Evented",config:{autoUpdate:true,latitude:null,longitude:null,accuracy:null,altitude:null,altitudeAccuracy:null,heading:null,speed:null,timestamp:null,allowHighAccuracy:false,timeout:Infinity,maximumAge:0,provider:undefined},updateMaximumAge:function(){if(this.watchOperation){this.updateWatchOperation()}},updateTimeout:function(){if(this.watchOperation){this.updateWatchOperation()}},updateAllowHighAccuracy:function(){if(this.watchOperation){this.updateWatchOperation()}},applyProvider:function(a){if(Ext.feature.has.Geolocation){if(!a){if(navigator&&navigator.geolocation){a=navigator.geolocation}else{if(window.google){a=google.gears.factory.create("beta.geolocation")}}}}else{this.fireEvent("locationerror",this,false,false,true,"This device does not support Geolocation.")}return a},updateAutoUpdate:function(a,b){var c=this,f=c.getProvider();if(b&&f){clearInterval(c.watchOperationId);c.watchOperationId=null}if(a){if(!f){c.fireEvent("locationerror",c,false,false,true,null);return}try{c.updateWatchOperation()}catch(d){c.fireEvent("locationerror",c,false,false,true,d.message)}}},updateWatchOperation:function(){var a=this,b=a.getProvider();if(a.watchOperationId){clearInterval(a.watchOperationId)}function c(){b.getCurrentPosition(Ext.bind(a.fireUpdate,a),Ext.bind(a.fireError,a),a.parseOptions())}c();a.watchOperationId=setInterval(c,10000)},updateLocation:function(h,a,c){var b=this,g=b.getProvider();var f=function(i,e){if(e){b.fireError(e)}else{b.fireEvent("locationerror",b,false,false,true,i)}if(h){h.call(a||b,null,b)}};if(!g){f(null);return}try{g.getCurrentPosition(function(e){b.fireUpdate(e);if(h){h.call(a||b,b,b)}},function(e){f(null,e)},c||b.parseOptions())}catch(d){f(d.message)}},fireUpdate:function(a){var b=this,c=a.coords;b.setConfig({timestamp:a.timestamp,latitude:c.latitude,longitude:c.longitude,accuracy:c.accuracy,altitude:c.altitude,altitudeAccuracy:c.altitudeAccuracy,heading:c.heading,speed:c.speed});b.fireEvent("locationupdate",b)},fireError:function(a){var b=a.code;this.fireEvent("locationerror",this,b==a.TIMEOUT,b==a.PERMISSION_DENIED,b==a.POSITION_UNAVAILABLE,a.message==undefined?null:a.message)},parseOptions:function(){var b=this.getTimeout(),a={maximumAge:this.getMaximumAge(),allowHighAccuracy:this.getAllowHighAccuracy()};if(b!==Infinity){a.timeout=b}return a},destroy:function(){this.updateAutoUpdate(null)}});Ext.define("Ext.util.Grouper",{extend:"Ext.util.Sorter",isGrouper:true,config:{groupFn:null,sortProperty:null,sorterFn:function(d,c){var e=this.getSortProperty(),g,b,f,a;g=this.getGroupFn();b=g.call(this,d);f=g.call(this,c);if(e){if(b!==f){return this.defaultSortFn.call(this,d,c)}else{return 0}}return(b>f)?1:((b<f)?-1:0)}},defaultSortFn:function(e,c){var g=this,f=g._transform,b=g._root,d,a,h=g._sortProperty;if(b!==null){e=e[b];c=c[b]}d=e[h];a=c[h];if(f){d=f(d);a=f(a)}return d>a?1:(d<a?-1:0)},updateProperty:function(a){this.setGroupFn(this.standardGroupFn)},standardGroupFn:function(b){var a=this.getRoot(),d=this.getProperty(),c=b;if(a){c=b[a]}return c[d]},getGroupString:function(a){var b=this.getGroupFn().call(this,a);return typeof b!="undefined"?b.toString():""}});Ext.define("Ext.util.HashMap",{mixins:{observable:"Ext.util.Observable"},constructor:function(a){this.callParent();this.mixins.observable.constructor.call(this);this.clear(true)},getCount:function(){return this.length},getData:function(a,b){if(b===undefined){b=a;a=this.getKey(b)}return[a,b]},getKey:function(a){return a.id},add:function(a,d){var b=this,c;if(b.containsKey(a)){throw new Error("This key already exists in the HashMap")}c=this.getData(a,d);a=c[0];d=c[1];b.map[a]=d;++b.length;b.fireEvent("add",b,a,d);return d},replace:function(b,d){var c=this,e=c.map,a;if(!c.containsKey(b)){c.add(b,d)}a=e[b];e[b]=d;c.fireEvent("replace",c,b,d,a);return d},remove:function(b){var a=this.findKey(b);if(a!==undefined){return this.removeByKey(a)}return false},removeByKey:function(a){var b=this,c;if(b.containsKey(a)){c=b.map[a];delete b.map[a];--b.length;b.fireEvent("remove",b,a,c);return true}return false},get:function(a){return this.map[a]},clear:function(a){var b=this;b.map={};b.length=0;if(a!==true){b.fireEvent("clear",b)}return b},containsKey:function(a){return this.map[a]!==undefined},contains:function(a){return this.containsKey(this.findKey(a))},getKeys:function(){return this.getArray(true)},getValues:function(){return this.getArray(false)},getArray:function(d){var a=[],b,c=this.map;for(b in c){if(c.hasOwnProperty(b)){a.push(d?b:c[b])}}return a},each:function(d,c){var a=Ext.apply({},this.map),b,e=this.length;c=c||this;for(b in a){if(a.hasOwnProperty(b)){if(d.call(c,b,a[b],e)===false){break}}}return this},clone:function(){var c=new Ext.util.HashMap(),b=this.map,a;c.suspendEvents();for(a in b){if(b.hasOwnProperty(a)){c.add(a,b[a])}}c.resumeEvents();return c},findKey:function(b){var a,c=this.map;for(a in c){if(c.hasOwnProperty(a)&&c[a]===b){return a}}return undefined}});Ext.define("Ext.AbstractManager",{requires:["Ext.util.HashMap"],typeName:"type",constructor:function(a){Ext.apply(this,a||{});this.all=Ext.create("Ext.util.HashMap");this.types={}},get:function(a){return this.all.get(a)},register:function(a){this.all.add(a)},unregister:function(a){this.all.remove(a)},registerType:function(b,a){this.types[b]=a;a[this.typeName]=b},isRegistered:function(a){return this.types[a]!==undefined},create:function(a,d){var b=a[this.typeName]||a.type||d,c=this.types[b];return new c(a)},onAvailable:function(e,c,b){var a=this.all,d;if(a.containsKey(e)){d=a.get(e);c.call(b||d,d)}else{a.on("add",function(h,f,g){if(f==e){c.call(b||g,g);a.un("add",c,b)}})}},each:function(b,a){this.all.each(b,a||this)},getCount:function(){return this.all.getCount()}});Ext.define("Ext.data.ModelManager",{extend:"Ext.AbstractManager",alternateClassName:["Ext.ModelMgr","Ext.ModelManager"],singleton:true,modelNamespace:null,registerType:function(c,b){var d=b.prototype,a;if(d&&d.isModel){a=b}else{b={extend:b.extend||"Ext.data.Model",config:b};a=Ext.define(c,b)}this.types[c]=a;return a},onModelDefined:Ext.emptyFn,getModel:function(b){var a=b;if(typeof a=="string"){a=this.types[a];if(!a&&this.modelNamespace){a=this.types[this.modelNamespace+"."+a]}}return a},create:function(c,b,d){var a=typeof b=="function"?b:this.types[b||c.name];return new a(c,d)}},function(){Ext.regModel=function(){return this.ModelManager.registerType.apply(this.ModelManager,arguments)}});Ext.define("Ext.data.NodeInterface",{requires:["Ext.data.Field","Ext.data.ModelManager"],alternateClassName:"Ext.data.Node",statics:{decorate:function(d){if(!d.isNode){var g=Ext.data.ModelManager,c=d.modelName,e=g.getModel(c),b=[],f,h,a;e.override(this.getPrototypeBody());b=this.applyFields(e,[{name:"parentId",type:"string",defaultValue:null},{name:"index",type:"int",defaultValue:0},{name:"depth",type:"int",defaultValue:0},{name:"expanded",type:"bool",defaultValue:false,persist:false},{name:"expandable",type:"bool",defaultValue:true,persist:false},{name:"checked",type:"auto",defaultValue:null},{name:"leaf",type:"bool",defaultValue:false,persist:false},{name:"cls",type:"string",defaultValue:null,persist:false},{name:"iconCls",type:"string",defaultValue:null,persist:false},{name:"root",type:"boolean",defaultValue:false,persist:false},{name:"isLast",type:"boolean",defaultValue:false,persist:false},{name:"isFirst",type:"boolean",defaultValue:false,persist:false},{name:"allowDrop",type:"boolean",defaultValue:true,persist:false},{name:"allowDrag",type:"boolean",defaultValue:true,persist:false},{name:"loaded",type:"boolean",defaultValue:false,persist:false},{name:"loading",type:"boolean",defaultValue:false,persist:false},{name:"href",type:"string",defaultValue:null,persist:false},{name:"hrefTarget",type:"string",defaultValue:null,persist:false},{name:"qtip",type:"string",defaultValue:null,persist:false},{name:"qtitle",type:"string",defaultValue:null,persist:false}]);a=b.length;e.getFields().isDirty=true;for(f=0;f<a;++f){h=b[f];if(d.get(h.getName())===undefined){d.data[h.getName()]=h.getDefaultValue()}}}if(!d.isDecorated){d.isDecorated=true;Ext.applyIf(d,{firstChild:null,lastChild:null,parentNode:null,previousSibling:null,nextSibling:null,childNodes:[]});d.enableBubble(["append","remove","move","insert","beforeappend","beforeremove","beforemove","beforeinsert","expand","collapse","beforeexpand","beforecollapse","sort","load"])}return d},applyFields:function(g,h){var b=g.prototype,d=b.fields,j=d.keys,f=h.length,a,c,e=[];for(c=0;c<f;c++){a=h[c];if(!Ext.Array.contains(j,a.name)){a=Ext.create("Ext.data.Field",a);e.push(a);d.add(a)}}return e},getPrototypeBody:function(){return{isNode:true,createNode:function(a){if(Ext.isObject(a)&&!a.isModel){a=Ext.data.ModelManager.create(a,this.modelName)}return Ext.data.NodeInterface.decorate(a)},isLeaf:function(){return this.get("leaf")===true},setFirstChild:function(a){this.firstChild=a},setLastChild:function(a){this.lastChild=a},updateInfo:function(g){var j=this,f=j.parentNode,b=(!f?true:f.firstChild==j),e=(!f?true:f.lastChild==j),d=0,k=j,a=j.childNodes,h=a.length,c;while(k.parentNode){++d;k=k.parentNode}j.beginEdit();j.set({isFirst:b,isLast:e,depth:d,index:f?f.indexOf(j):0,parentId:f?f.getId():null});j.endEdit(g);if(g){j.commit(g)}for(c=0;c<h;c++){a[c].updateInfo(g)}},isLast:function(){return this.get("isLast")},isFirst:function(){return this.get("isFirst")},hasChildNodes:function(){return !this.isLeaf()&&this.childNodes.length>0},isExpandable:function(){var a=this;if(a.get("expandable")){return !(a.isLeaf()||(a.isLoaded()&&!a.hasChildNodes()))}return false},appendChild:function(b,j,h){var f=this,c,e,d,g,a;if(Ext.isArray(b)){for(c=0,e=b.length;c<e;c++){f.appendChild(b[c])}}else{b=f.createNode(b);if(j!==true&&f.fireEvent("beforeappend",f,b)===false){return false}d=f.childNodes.length;g=b.parentNode;if(g){if(j!==true&&b.fireEvent("beforemove",b,g,f,d)===false){return false}g.removeChild(b,null,false,true)}d=f.childNodes.length;if(d===0){f.setFirstChild(b)}f.childNodes.push(b);b.parentNode=f;b.nextSibling=null;f.setLastChild(b);a=f.childNodes[d-1];if(a){b.previousSibling=a;a.nextSibling=b;a.updateInfo(h)}else{b.previousSibling=null}b.updateInfo(h);if(!f.isLoaded()){f.set("loaded",true)}else{if(f.childNodes.length===1){f.set("loaded",f.isLoaded())}}if(j!==true){f.fireEvent("append",f,b,d);if(g){b.fireEvent("move",b,g,f,d)}}return b}},getBubbleTarget:function(){return this.parentNode},removeChild:function(e,b,c,f){var d=this,a=d.indexOf(e);if(a==-1||(c!==true&&d.fireEvent("beforeremove",d,e)===false)){return false}Ext.Array.erase(d.childNodes,a,1);if(d.firstChild==e){d.setFirstChild(e.nextSibling)}if(d.lastChild==e){d.setLastChild(e.previousSibling)}if(c!==true){d.fireEvent("remove",d,e)}if(e.previousSibling){e.previousSibling.nextSibling=e.nextSibling;e.previousSibling.updateInfo(f)}if(e.nextSibling){e.nextSibling.previousSibling=e.previousSibling;e.nextSibling.updateInfo(f)}if(!d.childNodes.length){d.set("loaded",d.isLoaded())}if(b){e.destroy(true)}else{e.clear()}return e},copy:function(d,c){var f=this,b=f.callOverridden(arguments),a=f.childNodes?f.childNodes.length:0,e;if(c){for(e=0;e<a;e++){b.appendChild(f.childNodes[e].copy(true))}}return b},clear:function(a){var b=this;b.parentNode=b.previousSibling=b.nextSibling=null;if(a){b.firstChild=b.lastChild=null}},destroy:function(a){var c=this,b=c.destroyOptions;if(a===true){c.clear(true);Ext.each(c.childNodes,function(d){d.destroy(true)});c.childNodes=null;delete c.destroyOptions;c.callOverridden([b])}else{c.destroyOptions=a;c.remove(true)}},insertBefore:function(f,a,d){var e=this,b=e.indexOf(a),c=f.parentNode,g=b,h;if(!a){return e.appendChild(f)}if(f==a){return false}f=e.createNode(f);if(d!==true&&e.fireEvent("beforeinsert",e,f,a)===false){return false}if(c==e&&e.indexOf(f)<b){g--}if(c){if(d!==true&&f.fireEvent("beforemove",f,c,e,b,a)===false){return false}c.removeChild(f)}if(g===0){e.setFirstChild(f)}Ext.Array.splice(e.childNodes,g,0,f);f.parentNode=e;f.nextSibling=a;a.previousSibling=f;h=e.childNodes[g-1];if(h){f.previousSibling=h;h.nextSibling=f;h.updateInfo()}else{f.previousSibling=null}f.updateInfo();if(!e.isLoaded()){e.set("loaded",true)}else{if(e.childNodes.length===1){e.set("loaded",e.isLoaded())}}if(d!==true){e.fireEvent("insert",e,f,a);if(c){f.fireEvent("move",f,c,e,g,a)}}return f},insertChild:function(a,c){var b=this.childNodes[a];if(b){return this.insertBefore(c,b)}else{return this.appendChild(c)}},remove:function(b,c){var a=this.parentNode;if(a){a.removeChild(this,b,c,true)}return this},removeAll:function(a,b){var d=this.childNodes,c;while((c=d[0])){this.removeChild(c,a,b)}return this},getChildAt:function(a){return this.childNodes[a]},replaceChild:function(a,d,c){var b=d?d.nextSibling:null;this.removeChild(d,c);this.insertBefore(a,b,c);return d},indexOf:function(a){return Ext.Array.indexOf(this.childNodes,a)},getPath:function(d,c){d=d||this.idProperty;c=c||"/";var b=[this.get(d)],a=this.parentNode;while(a){b.unshift(a.get(d));a=a.parentNode}return c+b.join(c)},getDepth:function(){return this.get("depth")},bubble:function(c,b,a){var d=this;while(d){if(c.apply(b||d,a||[d])===false){break}d=d.parentNode}},cascadeBy:function(d,c,a){if(d.apply(c||this,a||[this])!==false){var f=this.childNodes,e=f.length,b;for(b=0;b<e;b++){f[b].cascadeBy(d,c,a)}}},eachChild:function(d,c,a){var f=this.childNodes,e=f.length,b;for(b=0;b<e;b++){if(d.apply(c||this,a||[f[b]])===false){break}}},findChild:function(b,c,a){return this.findChildBy(function(){return this.get(b)==c},null,a)},findChildBy:function(g,f,b){var e=this.childNodes,a=e.length,d=0,h,c;for(;d<a;d++){h=e[d];if(g.call(f||h,h)===true){return h}else{if(b){c=h.findChildBy(g,f,b);if(c!==null){return c}}}}return null},contains:function(a){return a.isAncestor(this)},isAncestor:function(a){var b=this.parentNode;while(b){if(b==a){return true}b=b.parentNode}return false},sort:function(f,b,a){var d=this.childNodes,e=d.length,c,g;if(e>0){Ext.Array.sort(d,f);for(c=0;c<e;c++){g=d[c];g.previousSibling=d[c-1];g.nextSibling=d[c+1];if(c===0){this.setFirstChild(g)}if(c==e-1){this.setLastChild(g)}g.updateInfo(a);if(b&&!g.isLeaf()){g.sort(f,true,true)}}this.notifyStores("afterEdit",["sorted"],{sorted:"sorted"});if(a!==true){this.fireEvent("sort",this,d)}}},isExpanded:function(){return this.get("expanded")},isLoaded:function(){return this.get("loaded")},isLoading:function(){return this.get("loading")},isRoot:function(){return !this.parentNode},isVisible:function(){var a=this.parentNode;while(a){if(!a.isExpanded()){return false}a=a.parentNode}return true},expand:function(a,d,b){var c=this;if(!c.isLeaf()){if(c.isLoading()){c.on("expand",function(){c.expand(a,d,b)},c,{single:true})}else{if(!c.isExpanded()){c.fireAction("expand",[this],function(){c.set("expanded",true);Ext.callback(d,b||c,[c.childNodes])})}else{Ext.callback(d,b||c,[c.childNodes])}}}else{Ext.callback(d,b||c)}},collapse:function(a,d,b){var c=this;if(!c.isLeaf()&&c.isExpanded()){this.fireAction("collapse",[c],function(){c.set("expanded",false);Ext.callback(d,b||c,[c.childNodes])})}else{Ext.callback(d,b||c,[c.childNodes])}}}}}});Ext.define("Ext.data.association.Association",{alternateClassName:"Ext.data.Association",requires:["Ext.data.ModelManager"],config:{ownerModel:null,ownerName:undefined,associatedModel:null,associatedName:undefined,associationKey:undefined,primaryKey:"id",reader:null,type:null,name:undefined},statics:{create:function(a){if(!a.isAssociation){if(Ext.isString(a)){a={type:a}}a.type=a.type.toLowerCase();return Ext.factory(a,Ext.data.association.Association,null,"association")}return a}},constructor:function(a){this.initConfig(a)},applyName:function(a){if(!a){a=this.getAssociatedName()}return a},applyOwnerModel:function(a){var b=Ext.data.ModelManager.getModel(a);if(b===undefined){Ext.Logger.error("The configured ownerModel was not valid (you tried "+a+")")}return b},applyOwnerName:function(a){if(!a){a=this.getOwnerModel().modelName}a=a.slice(a.lastIndexOf(".")+1);return a},updateOwnerModel:function(a){this.setOwnerName(a.modelName)},applyAssociatedModel:function(a){var b=Ext.data.ModelManager.types[a];if(b===undefined){Ext.Logger.error("The configured associatedModel was not valid (you tried "+a+")")}return b},applyAssociatedName:function(a){if(!a){a=this.getAssociatedModel().modelName}a=a.slice(a.lastIndexOf(".")+1);return a},updateAssociatedModel:function(a){this.setAssociatedName(a.modelName)},applyReader:function(a){if(a){if(Ext.isString(a)){a={type:a}}if(!a.isReader){Ext.applyIf(a,{type:"json"})}}return Ext.factory(a,Ext.data.Reader,this.getReader(),"reader")},updateReader:function(a){a.setModel(this.getAssociatedModel())}});Ext.define("Ext.data.association.BelongsTo",{extend:"Ext.data.association.Association",alternateClassName:"Ext.data.BelongsToAssociation",alias:"association.belongsto",config:{foreignKey:undefined,getterName:undefined,setterName:undefined,instanceName:undefined},applyForeignKey:function(a){if(!a){a=this.getAssociatedName().toLowerCase()+"_id"}return a},updateForeignKey:function(b,d){var a=this.getOwnerModel().getFields(),c=a.get(b);if(!c){c=new Ext.data.Field({name:b});a.add(c);a.isDirty=true}if(d){c=a.get(d);if(c){a.isDirty=true;a.remove(c)}}},applyInstanceName:function(a){if(!a){a=this.getAssociatedName()+"BelongsToInstance"}return a},applyAssociationKey:function(a){if(!a){var b=this.getAssociatedName();a=b[0].toLowerCase()+b.slice(1)}return a},applyGetterName:function(a){if(!a){a="get"+this.getAssociatedName()}return a},applySetterName:function(a){if(!a){a="set"+this.getAssociatedName()}return a},updateGetterName:function(b,c){var a=this.getOwnerModel().prototype;if(c){delete a[c]}if(b){a[b]=this.createGetter()}},updateSetterName:function(b,c){var a=this.getOwnerModel().prototype;if(c){delete a[c]}if(b){a[b]=this.createSetter()}},createSetter:function(){var b=this,a=b.getForeignKey();return function(e,c,d){if(e&&e.isModel){e=e.getId()}this.set(a,e);if(Ext.isFunction(c)){c={callback:c,scope:d||this}}if(Ext.isObject(c)){return this.save(c)}}},createGetter:function(){var c=this,d=c.getAssociatedModel(),b=c.getForeignKey(),a=c.getInstanceName();return function(h,i){h=h||{};var g=this,j=g.get(b),k,e,f;if(h.reload===true||g[a]===undefined){if(typeof h=="function"){h={callback:h,scope:i||g}}k=h.success;h.success=function(l){g[a]=l;if(k){k.call(this,arguments)}};d.load(j,h)}else{e=g[a];f=[e];i=i||g;Ext.callback(h,i,f);Ext.callback(h.success,i,f);Ext.callback(h.failure,i,f);Ext.callback(h.callback,i,f);return e}}},read:function(b,a,c){b[this.getInstanceName()]=a.read([c]).getRecords()[0]}});Ext.define("Ext.data.association.HasMany",{extend:"Ext.data.association.Association",alternateClassName:"Ext.data.HasManyAssociation",requires:["Ext.util.Inflector"],alias:"association.hasmany",config:{foreignKey:undefined,store:undefined,storeName:undefined,filterProperty:null,autoLoad:false},constructor:function(a){a=a||{};if(a.storeConfig){a.store=a.storeConfig;delete a.storeConfig}this.callParent([a])},applyName:function(a){if(!a){a=Ext.util.Inflector.pluralize(this.getAssociatedName().toLowerCase())}return a},applyStoreName:function(a){if(!a){a=this.getName()+"Store"}return a},applyForeignKey:function(a){if(!a){a=this.getOwnerName().toLowerCase()+"_id"}return a},applyAssociationKey:function(a){if(!a){var b=this.getAssociatedName();a=Ext.util.Inflector.pluralize(b[0].toLowerCase()+b.slice(1))}return a},updateForeignKey:function(b,d){var a=this.getAssociatedModel().getFields(),c=a.get(b);if(!c){c=new Ext.data.Field({name:b});a.add(c);a.isDirty=true}if(d){c=a.get(d);if(c){a.remove(c);a.isDirty=true}}},applyStore:function(a){var e=this,c=e,i=e.getAssociatedModel(),f=e.getStoreName(),d=e.getForeignKey(),h=e.getPrimaryKey(),g=e.getFilterProperty(),b=e.getAutoLoad();return function(){var m=this,k,l,j={};if(m[f]===undefined){if(g){l={property:g,value:m.get(g),exactMatch:true}}else{l={property:d,value:m.get(h),exactMatch:true}}j[d]=m.get(h);k=Ext.apply({},a,{model:i,filters:[l],remoteFilter:true,modelDefaults:j});m[f]=Ext.create("Ext.data.Store",k);if(b){m[f].load(function(o,n){c.updateInverseInstances(m)})}}return m[f]}},updateStore:function(a){this.getOwnerModel().prototype[this.getName()]=a},read:function(c,a,f){var e=c[this.getName()](),d=a.read(f).getRecords(),b;e.add(d);this.updateInverseInstances(c)},updateInverseInstances:function(a){var b=a[this.getName()]();inverse=this.getAssociatedModel().associations.findBy(function(c){return c.getType()==="belongsTo"&&c.getAssociatedModel().$className===a.$className});if(inverse){b.each(function(c){c[inverse.getInstanceName()]=a})}}});Ext.define("Ext.data.association.HasOne",{extend:"Ext.data.association.Association",alternateClassName:"Ext.data.HasOneAssociation",alias:"association.hasone",config:{foreignKey:undefined,getterName:undefined,setterName:undefined,instanceName:undefined},applyForeignKey:function(a){if(!a){a=this.getAssociatedName().toLowerCase()+"_id"}return a},updateForeignKey:function(b,d){var a=this.getAssociatedModel().getFields(),c=a.get(b);if(!c){c=new Ext.data.Field({name:b});a.add(c);a.isDirty=true}if(d){c=a.get(d);if(c){a.remove(c);a.isDirty=true}}},applyInstanceName:function(a){if(!a){a=this.getAssociatedName()+"BelongsToInstance"}return a},applyAssociationKey:function(a){if(!a){var b=this.getAssociatedName();a=b[0].toLowerCase()+b.slice(1)}return a},applyGetterName:function(a){if(!a){a="get"+this.getAssociatedName()}return a},applySetterName:function(a){if(!a){a="set"+this.getAssociatedName()}return a},updateGetterName:function(b,c){var a=this.getOwnerModel().prototype;if(c){delete a[c]}if(b){a[b]=this.createGetter()}},updateSetterName:function(b,c){var a=this.getOwnerModel().prototype;if(c){delete a[c]}if(b){a[b]=this.createSetter()}},createSetter:function(){var c=this,b=c.getForeignKey(),a=c.getInstanceName(),d=c.getAssociatedModel();return function(h,f,g){var i=Ext.data.Model,e;if(h&&h.isModel){h=h.getId()}this.set(b,h);e=i.cache.get(i.generateCacheId(d.modelName,h));if(e){this[a]=e}if(Ext.isFunction(f)){f={callback:f,scope:g||this}}if(Ext.isObject(f)){return this.save(f)}}},createGetter:function(){var c=this,d=c.getAssociatedModel(),b=c.getForeignKey(),a=c.getInstanceName();return function(h,i){h=h||{};var g=this,j=g.get(b),k,e,f;if(h.reload===true||g[a]===undefined){if(typeof h=="function"){h={callback:h,scope:i||g}}k=h.success;h.success=function(l){g[a]=l;if(k){k.call(this,arguments)}};d.load(j,h)}else{e=g[a];f=[e];i=i||g;Ext.callback(h,i,f);Ext.callback(h.success,i,f);Ext.callback(h.failure,i,f);Ext.callback(h.callback,i,f);return e}}},read:function(c,a,e){var b=this.getAssociatedModel().associations.findBy(function(f){return f.getType()==="belongsTo"&&f.getAssociatedName()===c.$className}),d=a.read([e]).getRecords()[0];c[this.getInstanceName()]=d;if(b){d[b.getInstanceName()]=c}}});Ext.define("Ext.util.LineSegment",{requires:["Ext.util.Point"],constructor:function(b,a){var c=Ext.util.Point;this.point1=c.from(b);this.point2=c.from(a)},intersects:function(l){var o=this.point1,m=this.point2,i=l.point1,f=l.point2,c=o.x,b=m.x,a=i.x,q=f.x,p=o.y,n=m.y,k=i.y,h=f.y,g=(c-b)*(k-h)-(p-n)*(a-q),j,e;if(g==0){return null}j=((a-q)*(c*n-p*b)-(c-b)*(a*h-k*q))/g;e=((k-h)*(c*n-p*b)-(p-n)*(a*h-k*q))/g;if(j<Math.min(c,b)||j>Math.max(c,b)||j<Math.min(a,q)||j>Math.max(a,q)||e<Math.min(p,n)||e>Math.max(p,n)||e<Math.min(k,h)||e>Math.max(k,h)){return null}return new Ext.util.Point(j,e)},toString:function(){return this.point1.toString()+" "+this.point2.toString()}});Ext.define("Ext.util.SizeMonitor",{extend:"Ext.Evented",config:{element:null,detectorCls:Ext.baseCSSPrefix+"size-change-detector",callback:Ext.emptyFn,scope:null,args:[]},constructor:function(d){this.initConfig(d);this.doFireSizeChangeEvent=Ext.Function.bind(this.doFireSizeChangeEvent,this);var g=this,e=this.getElement().dom,b=this.getDetectorCls(),c=Ext.Element.create({classList:[b,b+"-expand"],children:[{}]},true),h=Ext.Element.create({classList:[b,b+"-shrink"],children:[{}]},true),a=function(i){g.onDetectorScroll("expand",i)},f=function(i){g.onDetectorScroll("shrink",i)};e.appendChild(c);e.appendChild(h);c.addEventListener("scroll",a,true);h.addEventListener("scroll",f,true);this.detectors={expand:c,shrink:h};this.position={expand:{left:0,top:0},shrink:{left:0,top:0}};this.listeners={expand:a,shrink:f};this.refresh()},applyElement:function(a){if(a){return Ext.get(a)}},refreshPosition:function(b){var e=this.detectors[b],a=this.position[b],d,c;a.left=d=e.scrollWidth-e.offsetWidth;a.top=c=e.scrollHeight-e.offsetHeight;e.scrollLeft=d;e.scrollTop=c},refresh:function(){this.refreshPosition("expand");this.refreshPosition("shrink")},onDetectorScroll:function(b){var c=this.detectors[b],a=this.position[b];if(c.scrollLeft!==a.left||c.scrollTop!==a.top){this.refresh();this.fireSizeChangeEvent()}},fireSizeChangeEvent:function(){clearTimeout(this.sizeChangeThrottleTimer);this.sizeChangeThrottleTimer=setTimeout(this.doFireSizeChangeEvent,1)},doFireSizeChangeEvent:function(){this.getCallback().apply(this.getScope(),this.getArgs())},destroyDetector:function(a){var c=this.detectors[a],b=this.listeners[a];c.removeEventListener("scroll",b,true);Ext.removeNode(c)},destroy:function(){this.callParent(arguments);this.destroyDetector("expand");this.destroyDetector("shrink");delete this.listeners;delete this.detectors}});Ext.define("Ext.event.publisher.ComponentSize",{extend:"Ext.event.publisher.Publisher",requires:["Ext.ComponentManager","Ext.util.SizeMonitor"],targetType:"component",handledEvents:["resize"],constructor:function(){this.callParent(arguments);this.sizeMonitors={}},subscribe:function(g){var c=g.match(this.idSelectorRegex),f=this.subscribers,a=this.sizeMonitors,d=this.dispatcher,e=this.targetType,b;if(!c){return false}if(!f.hasOwnProperty(g)){f[g]=0;d.addListener(e,g,"painted","onComponentPainted",this,null,"before");b=Ext.ComponentManager.get(c[1]);a[g]=new Ext.util.SizeMonitor({element:b.element,callback:this.onComponentSizeChange,scope:this,args:[this,g]})}f[g]++;return true},unsubscribe:function(h,b,e){var c=h.match(this.idSelectorRegex),g=this.subscribers,d=this.dispatcher,f=this.targetType,a=this.sizeMonitors;if(!c){return false}if(!g.hasOwnProperty(h)||(!e&&--g[h]>0)){return true}a[h].destroy();delete a[h];d.removeListener(f,h,"painted","onComponentPainted",this,"before");delete g[h];return true},onComponentPainted:function(b){var c=b.getObservableId(),a=this.sizeMonitors[c];a.refresh()},onComponentSizeChange:function(a,b){this.dispatcher.doDispatchEvent(this.targetType,b,"resize",[a])}});Ext.define("Ext.util.Sortable",{isSortable:true,defaultSortDirection:"ASC",requires:["Ext.util.Sorter"],initSortable:function(){var a=this,b=a.sorters;a.sorters=Ext.create("Ext.util.AbstractMixedCollection",false,function(c){return c.id||c.property});if(b){a.sorters.addAll(a.decodeSorters(b))}},sort:function(g,f,c,e){var d=this,h,b,a;if(Ext.isArray(g)){e=c;c=f;a=g}else{if(Ext.isObject(g)){e=c;c=f;a=[g]}else{if(Ext.isString(g)){h=d.sorters.get(g);if(!h){h={property:g,direction:f};a=[h]}else{if(f===undefined){h.toggle()}else{h.setDirection(f)}}}}}if(a&&a.length){a=d.decodeSorters(a);if(Ext.isString(c)){if(c==="prepend"){g=d.sorters.clone().items;d.sorters.clear();d.sorters.addAll(a);d.sorters.addAll(g)}else{d.sorters.addAll(a)}}else{d.sorters.clear();d.sorters.addAll(a)}if(e!==false){d.onBeforeSort(a)}}if(e!==false){g=d.sorters.items;if(g.length){b=function(l,k){var j=g[0].sort(l,k),n=g.length,m;for(m=1;m<n;m++){j=j||g[m].sort.call(this,l,k)}return j};d.doSort(b)}}return g},onBeforeSort:Ext.emptyFn,decodeSorters:function(f){if(!Ext.isArray(f)){if(f===undefined){f=[]}else{f=[f]}}var d=f.length,g=Ext.util.Sorter,a=this.model?this.model.prototype.fields:null,e,b,c;for(c=0;c<d;c++){b=f[c];if(!(b instanceof g)){if(Ext.isString(b)){b={property:b}}Ext.applyIf(b,{root:this.sortRoot,direction:"ASC"});if(b.fn){b.sorterFn=b.fn}if(typeof b=="function"){b={sorterFn:b}}if(a&&!b.transform){e=a.get(b.property);b.transform=e?e.sortType:undefined}f[c]=Ext.create("Ext.util.Sorter",b)}}return f},getSorters:function(){return this.sorters.items}});Ext.define("Ext.util.MixedCollection",{extend:"Ext.util.AbstractMixedCollection",mixins:{sortable:"Ext.util.Sortable"},constructor:function(){var a=this;a.callParent(arguments);a.mixins.sortable.initSortable.call(a)},doSort:function(a){this.sortBy(a)},_sort:function(k,a,j){var h=this,d,e,b=String(a).toUpperCase()=="DESC"?-1:1,g=[],l=h.keys,f=h.items;j=j||function(i,c){return i-c};for(d=0,e=f.length;d<e;d++){g[g.length]={key:l[d],value:f[d],index:d}}Ext.Array.sort(g,function(i,c){var m=j(i[k],c[k])*b;if(m===0){m=(i.index<c.index?-1:1)}return m});for(d=0,e=g.length;d<e;d++){f[d]=g[d].value;l[d]=g[d].key}h.fireEvent("sort",h)},sortBy:function(c){var g=this,b=g.items,f=g.keys,e=b.length,a=[],d;for(d=0;d<e;d++){a[d]={key:f[d],value:b[d],index:d}}Ext.Array.sort(a,function(i,h){var j=c(i.value,h.value);if(j===0){j=(i.index<h.index?-1:1)}return j});for(d=0;d<e;d++){b[d]=a[d].value;f[d]=a[d].key}g.fireEvent("sort",g,b,f)},reorder:function(d){var g=this,b=g.items,c=0,f=b.length,a=[],e=[],h;g.suspendEvents();for(h in d){a[d[h]]=b[h]}for(c=0;c<f;c++){if(d[c]==undefined){e.push(b[c])}}for(c=0;c<f;c++){if(a[c]==undefined){a[c]=e.shift()}}g.clear();g.addAll(a);g.resumeEvents();g.fireEvent("sort",g)},sortByKey:function(a,b){this._sort("key",a,b||function(d,c){var f=String(d).toUpperCase(),e=String(c).toUpperCase();return f>e?1:(f<e?-1:0)})}});Ext.define("Ext.ItemCollection",{extend:"Ext.util.MixedCollection",getKey:function(a){return a.getItemId()},has:function(a){return this.map.hasOwnProperty(a.getId())}});Ext.define("Ext.data.Error",{extend:"Ext.util.MixedCollection",config:{field:null,message:""},constructor:function(a){this.initConfig(a)}});Ext.define("Ext.data.Errors",{extend:"Ext.util.Collection",requires:"Ext.data.Error",isValid:function(){return this.length===0},getByField:function(d){var c=[],a,b;for(b=0;b<this.length;b++){a=this.items[b];if(a.getField()==d){c.push(a)}}return c},add:function(){var a=arguments.length==1?arguments[0]:arguments[1];if(!(a instanceof Ext.data.Error)){a=Ext.create("Ext.data.Error",{field:a.field||a.name,message:a.error||a.message})}return this.callParent([a])}});Ext.define("Ext.data.proxy.Ajax",{extend:"Ext.data.proxy.Server",requires:["Ext.util.MixedCollection","Ext.Ajax"],alias:"proxy.ajax",alternateClassName:["Ext.data.HttpProxy","Ext.data.AjaxProxy"],config:{actionMethods:{create:"POST",read:"GET",update:"POST",destroy:"POST"},headers:{},withCredentials:false},doRequest:function(a,e,b){var d=this.getWriter(),c=this.buildRequest(a);c.setConfig({headers:this.getHeaders(),timeout:this.getTimeout(),method:this.getMethod(c),callback:this.createRequestCallback(c,a,e,b),scope:this});if(a.getWithCredentials()||this.getWithCredentials()){c.setWithCredentials(true)}c=d.write(c);Ext.Ajax.request(c.getCurrentConfig());return c},getMethod:function(a){return this.getActionMethods()[a.getAction()]},createRequestCallback:function(d,a,e,b){var c=this;return function(g,h,f){c.processResponse(h,a,d,f,e,b)}}});Ext.define("Ext.data.Model",{alternateClassName:"Ext.data.Record",mixins:{observable:"Ext.mixin.Observable"},isModel:true,requires:["Ext.util.Collection","Ext.data.Field","Ext.data.identifier.Simple","Ext.data.ModelManager","Ext.data.proxy.Ajax","Ext.data.association.HasMany","Ext.data.association.BelongsTo","Ext.data.association.HasOne","Ext.data.Errors"],config:{idProperty:"id",data:null,fields:undefined,validations:null,associations:null,hasMany:null,hasOne:null,belongsTo:null,proxy:null,identifier:{type:"simple"},clientIdProperty:"clientId",isErased:false},staticConfigs:["idProperty","fields","validations","associations","hasMany","hasOne","belongsTo","clientIdProperty","identifier","proxy"],statics:{EDIT:"edit",REJECT:"reject",COMMIT:"commit",generateProxyMethod:function(a){return function(){var b=this.prototype;return b[a].apply(b,arguments)}},generateCacheId:function(b,c){var a;if(b&&b.isModel){a=b.modelName;if(c===undefined){c=b.getId()}}else{a=b}return a.replace(/\./g,"-").toLowerCase()+"-"+c}},inheritableStatics:{load:function(a,b,h){var f=this.getProxy(),i=this.getIdProperty(),e=null,d={},g,c;h=h||(b&&b.scope)||this;if(Ext.isFunction(b)){b={callback:b,scope:h}}d[i]=a;b=Ext.apply({},b);b=Ext.applyIf(b,{action:"read",params:d,model:this});c=Ext.create("Ext.data.Operation",b);if(!f){Ext.Logger.error("You are trying to load a model that doesn't have a Proxy specified")}g=function(j){if(j.wasSuccessful()){e=j.getRecords()[0];Ext.callback(b.success,h,[e,j])}else{Ext.callback(b.failure,h,[e,j])}Ext.callback(b.callback,h,[e,j])};f.read(c,g,this)}},editing:false,dirty:false,phantom:false,constructor:function(e,g,b,f){var d=this,c=null,a=this.getIdProperty();d.modified={};d.raw=b||e||{};d.stores=[];e=e||f||{};if(g||g===0){e[a]=d.internalId=g}g=d.data[a];if(g||g===0){c=Ext.data.Model.cache.get(Ext.data.Model.generateCacheId(this,g));if(c){return c.mergeData(f||e||{})}}if(f){d.setConvertedData(e)}else{d.setData(e)}g=d.data[a];if(!g&&g!==0){d.data[a]=d.internalId=d.id=d.getIdentifier().generate(d);d.phantom=true;if(this.associations.length){this.handleInlineAssociationData(e)}}else{d.id=d.getIdentifier().generate(d)}Ext.data.Model.cache.add(d);if(this.init&&typeof this.init=="function"){this.init()}},mergeData:function(a){var g=this,d=g.getFields().items,e=d.length,b=g.data,c,h,k,j,f;for(c=0;c<e;c++){h=d[c];k=h.getName();f=h.getConvert();j=a[k];if(j!==undefined&&!g.isModified(k)){if(f){j=f.call(h,j,g)}b[k]=j}}return this},setData:function(a){var g=this.fields.items,h=g.length,f=Ext.isArray(a),d=this._data=this.data={},e,k,b,l,j,c;if(!a){return this}for(e=0;e<h;e++){k=g[e];b=k.getName();j=k.getConvert();if(f){l=a[e]}else{l=a[b];if(typeof l=="undefined"){l=k.getDefaultValue()}}if(j){l=j.call(k,l,this)}d[b]=l}c=this.getId();if(this.associations.length&&(c||c===0)){this.handleInlineAssociationData(a)}return this},handleInlineAssociationData:function(f){var e=this.associations.items,k=e.length,a=this.raw,g,d,c,h,j,b;for(g=0;g<k;g++){d=e[g];b=d.getAssociationKey();c=f[b];if(!c){c=a[b]}if(c){h=d.getReader();if(!h){j=d.getAssociatedModel().getProxy();if(j){h=j.getReader()}else{h=new Ext.data.JsonReader({model:d.getAssociatedModel()})}}d.read(this,h,c)}}},setId:function(b){var a=this.getId();this.set(this.getIdProperty(),b);this.internalId=b;Ext.data.Model.cache.replace(a,this)},getId:function(){return this.get(this.getIdProperty())},setConvertedData:function(a){this._data=this.data=a;return this},get:function(a){return this.data[a]},set:function(p,l){var j=this,b=j.fields.map,o=j.modified,a=!j.editing,c=j.associations.items,f=0,d=[],k,n,e,m,g,h;if(arguments.length==1){for(n in p){if(p.hasOwnProperty(n)){k=b[n];if(k&&k.hasCustomConvert()){d.push(n);continue}if(!f&&a){j.beginEdit()}++f;j.set(n,p[n])}}g=d.length;if(g){if(!f&&a){j.beginEdit()}f+=g;for(e=0;e<g;e++){k=d[e];j.set(k,p[k])}}if(a&&f){j.endEdit(false,d)}}else{k=b[p];h=k&&k.getConvert();if(h){l=h.call(k,l,j)}m=j.data[p];j.data[p]=l;if(k&&!j.isEqual(m,l)){if(o.hasOwnProperty(p)){if(j.isEqual(o[p],l)){delete o[p];j.dirty=false;for(n in o){if(o.hasOwnProperty(n)){j.dirty=true;break}}}}else{j.dirty=true;o[p]=m}}if(a){j.afterEdit([p],o)}}},isEqual:function(d,c){if(Ext.isDate(d)&&Ext.isDate(c)){return d.getTime()===c.getTime()}return d===c},beginEdit:function(){var a=this;if(!a.editing){a.editing=true;a.dirtySave=a.dirty;a.dataSave=Ext.apply({},a.data);a.modifiedSave=Ext.apply({},a.modified)}},cancelEdit:function(){var a=this;if(a.editing){a.editing=false;a.modified=a.modifiedSave;a.data=a.dataSave;a.dirty=a.dirtySave;delete a.modifiedSave;delete a.dataSave;delete a.dirtySave}},endEdit:function(a,c){var b=this;if(b.editing){b.editing=false;if(a!==true&&(b.changedWhileEditing())){b.afterEdit(c||Ext.Object.getKeys(this.modified),this.modified)}delete b.modifiedSave;delete b.dataSave;delete b.dirtySave}},changedWhileEditing:function(){var c=this,b=c.dataSave,d=c.data,a;for(a in d){if(d.hasOwnProperty(a)){if(!c.isEqual(d[a],b[a])){return true}}}return false},getChanges:function(){var a=this.modified,b={},c;for(c in a){if(a.hasOwnProperty(c)){b[c]=this.get(c)}}return b},isModified:function(a){return this.modified.hasOwnProperty(a)},save:function(b,d){var e=this,f=e.phantom?"create":"update",c=e.getProxy(),a,g;if(!c){Ext.Logger.error("You are trying to save a model instance that doesn't have a Proxy specified")}b=b||{};d=d||e;if(Ext.isFunction(b)){b={callback:b,scope:d}}Ext.applyIf(b,{records:[e],action:f,model:e.self});a=Ext.create("Ext.data.Operation",b);g=function(h){if(h.wasSuccessful()){Ext.callback(b.success,d,[e,h])}else{Ext.callback(b.failure,d,[e,h])}Ext.callback(b.callback,d,[e,h])};c[f](a,g,e);return e},erase:function(b,d){var e=this,c=this.getProxy(),a,f;if(!c){Ext.Logger.error("You are trying to erase a model instance that doesn't have a Proxy specified")}b=b||{};d=d||e;if(Ext.isFunction(b)){b={callback:b,scope:d}}Ext.applyIf(b,{records:[e],action:"destroy",model:this.self});a=Ext.create("Ext.data.Operation",b);f=function(g){if(g.wasSuccessful()){Ext.callback(b.success,d,[e,g])}else{Ext.callback(b.failure,d,[e,g])}Ext.callback(b.callback,d,[e,g])};c.destroy(a,f,e);return e},reject:function(a){var c=this,b=c.modified,d;for(d in b){if(b.hasOwnProperty(d)){if(typeof b[d]!="function"){c.data[d]=b[d]}}}c.dirty=false;c.editing=false;c.modified={};if(a!==true){c.afterReject()}},commit:function(a){var c=this,b=this.modified;c.phantom=c.dirty=c.editing=false;c.modified={};if(a!==true){c.afterCommit(b)}},afterEdit:function(b,a){this.notifyStores("afterEdit",b,a)},afterReject:function(){this.notifyStores("afterReject")},afterCommit:function(a){this.notifyStores("afterCommit",Ext.Object.getKeys(a||{}),a)},notifyStores:function(e){var c=Ext.Array.clone(arguments),a=this.stores,f=a.length,d,b;c[0]=this;for(d=0;d<f;++d){b=a[d];if(b!==undefined&&typeof b[e]=="function"){b[e].apply(b,c)}}},copy:function(c){var d=this,b=d.getIdProperty(),a=Ext.apply({},d.raw),e=Ext.apply({},d.data);delete a[b];delete e[b];return new d.self(null,c,a,e)},getData:function(a){var b=this.data;if(a===true){Ext.apply(b,this.getAssociatedData())}return b},getAssociatedData:function(){return this.prepareAssociatedData(this,[],null)},prepareAssociatedData:function(o,a,n){var h=o.associations.items,l=h.length,e={},f,s,g,q,r,d,c,m,k,p,b;for(m=0;m<l;m++){d=h[m];s=d.getName();p=d.getType();b=true;if(n){b=p==n}if(b&&p.toLowerCase()=="hasmany"){f=o[d.getStoreName()];e[s]=[];if(f&&f.getCount()>0){g=f.data.items;r=g.length;for(k=0;k<r;k++){q=g[k];c=q.id;if(Ext.Array.indexOf(a,c)==-1){a.push(c);e[s][k]=q.getData();Ext.apply(e[s][k],this.prepareAssociatedData(q,a,p))}}}}else{if(b&&(p.toLowerCase()=="belongsto"||p.toLowerCase()=="hasone")){q=o[d.getInstanceName()];if(q!==undefined){c=q.id;if(Ext.Array.indexOf(a,c)===-1){a.push(c);e[s]=q.getData();Ext.apply(e[s],this.prepareAssociatedData(q,a,p))}}}}}return e},join:function(a){Ext.Array.include(this.stores,a)},unjoin:function(a){Ext.Array.remove(this.stores,a)},setDirty:function(){var b=this,a;b.dirty=true;b.fields.each(function(c){if(c.getPersist()){a=c.getName();b.modified[a]=b.get(a)}})},validate:function(){var j=Ext.create("Ext.data.Errors"),c=this.getValidations().items,e=Ext.data.Validations,b,d,h,a,g,f;if(c){b=c.length;for(f=0;f<b;f++){d=c[f];h=d.field||d.name;g=d.type;a=e[g](d,this.get(h));if(!a){j.add(Ext.create("Ext.data.Error",{field:h,message:d.message||e.getMessage(g)}))}}}return j},isValid:function(){return this.validate().isValid()},toUrl:function(){var b=this.$className.split("."),a=b[b.length-1].toLowerCase();return a+"/"+this.getId()},destroy:function(){var a=this;a.notifyStores("afterErase",a);Ext.data.Model.cache.remove(a);a.data=a._data=a.raw=a.stores=a.modified=null;a.callParent(arguments)},applyProxy:function(b,a){return Ext.factory(b,Ext.data.Proxy,a,"proxy")},updateProxy:function(a){if(a){a.setModel(this.self)}},applyAssociations:function(a){if(a){this.addAssociations(a,"hasMany")}},applyBelongsTo:function(a){if(a){this.addAssociations(a,"belongsTo")}},applyHasMany:function(a){if(a){this.addAssociations(a,"hasMany")}},applyHasOne:function(a){if(a){this.addAssociations(a,"hasOne")}},addAssociations:function(e,h){var f,d,b,c=this.self.modelName,g=this.self.associations,a;e=Ext.Array.from(e);for(d=0,f=e.length;d<f;d++){b=e[d];if(!Ext.isObject(b)){b={model:b}}Ext.applyIf(b,{type:h,ownerModel:c,associatedModel:b.model});delete b.model;a=Ext.Function.bind(function(i){g.add(Ext.data.association.Association.create(this))},b);Ext.ClassManager.onCreated(a,this,(typeof b.associatedModel==="string")?b.associatedModel:Ext.getClassName(b.associatedModel))}},applyValidations:function(a){if(a){if(!Ext.isArray(a)){a=[a]}this.addValidations(a)}},addValidations:function(a){this.self.validations.addAll(a)},applyFields:function(a){var b=this.superclass.fields;if(b){a=b.items.concat(a||[])}return a||[]},updateFields:function(c){var d=c.length,e=this,h=e.self.prototype,j=this.getIdProperty(),a,f,g,b;f=e._fields=e.fields=new Ext.util.Collection(h.getFieldName);for(b=0;b<d;b++){g=c[b];if(!g.isField){g=new Ext.data.Field(c[b])}f.add(g)}a=f.get(j);if(!a){f.add(new Ext.data.Field(j))}else{a.setType("auto")}f.addSorter(h.sortConvertFields)},applyIdentifier:function(a){if(typeof a==="string"){a={type:a}}return Ext.factory(a,Ext.data.identifier.Simple,this.getIdentifier(),"data.identifier")},getFieldName:function(a){return a.getName()},sortConvertFields:function(a,d){var c=a.hasCustomConvert(),b=d.hasCustomConvert();if(c&&!b){return 1}if(!c&&b){return -1}return 0},onClassExtended:function(k,d,j){var f=j.onBeforeCreated,b=this,h=b.prototype,e=Ext.Class.configNameCache,g=h.staticConfigs.concat(d.staticConfigs||[]),c=h.config,a=d.config||{},i;d.config=a;j.onBeforeCreated=function(A,t){var v=[],x=A.prototype,w={},m=x.config,n=g.length,q=["set","get"],s=q.length,o=m.associations||[],l=Ext.getClassName(A),z,y,r,p,u;for(r=0;r<n;r++){z=g[r];for(p=0;p<s;p++){y=e[z][q[p]];if(y in x){w[y]=b.generateProxyMethod(y)}}}A.addStatics(w);A.modelName=l;x.modelName=l;if(m.belongsTo){v.push("association.belongsto")}if(m.hasMany){v.push("association.hasmany")}if(m.hasOne){v.push("association.hasone")}for(r=0,u=o.length;r<u;++r){v.push("association."+o[r].type.toLowerCase())}if(m.proxy){if(typeof m.proxy==="string"){v.push("proxy."+m.proxy)}else{if(typeof m.proxy.type==="string"){v.push("proxy."+m.proxy.type)}}}if(m.validations){v.push("Ext.data.Validations")}Ext.require(v,function(){Ext.Function.interceptBefore(j,"onCreated",function(){Ext.data.ModelManager.registerType(l,A);var B=A.prototype.superclass;A.prototype.associations=A.associations=A.prototype._associations=(B&&B.associations)?B.associations.clone():new Ext.util.Collection(function(C){return C.getName()});A.prototype.validations=A.validations=A.prototype._validations=(B&&B.validations)?B.validations.clone():new Ext.util.Collection(function(C){return C.field||C.name});A.prototype=Ext.Object.chain(A.prototype);A.prototype.initConfig.call(A.prototype,m);delete A.prototype.initConfig});f.call(b,A,t,j)})}}},function(){this.cache=new Ext.util.Collection(this.generateCacheId)});Ext.define("Ext.data.Store",{alias:"store.store",extend:"Ext.Evented",requires:["Ext.util.Collection","Ext.data.Operation","Ext.data.proxy.Memory","Ext.data.Model","Ext.data.StoreManager","Ext.util.Grouper"],statics:{create:function(a){if(!a.isStore){if(!a.type){a.type="store"}a=Ext.createByAlias("store."+a.type,a)}return a}},isStore:true,config:{storeId:undefined,data:null,autoLoad:null,autoSync:false,model:undefined,proxy:undefined,fields:null,remoteSort:false,remoteFilter:false,remoteGroup:false,filters:null,sorters:null,grouper:null,groupField:null,groupDir:null,getGroupString:null,pageSize:25,totalCount:null,clearOnPageLoad:true,modelDefaults:{},autoDestroy:false,syncRemovedRecords:true},currentPage:1,constructor:function(a){a=a||{};this.data=this._data=this.createDataCollection();this.data.setSortRoot("data");this.data.setFilterRoot("data");this.removed=[];if(a.id&&!a.storeId){a.storeId=a.id;delete a.id}this.initConfig(a)},createDataCollection:function(){return new Ext.util.Collection(function(a){return a.getId()})},applyStoreId:function(a){if(a===undefined||a===null){a=this.getUniqueId()}return a},updateStoreId:function(a,b){if(b){Ext.data.StoreManager.unregister(this)}if(a){Ext.data.StoreManager.register(this)}},applyModel:function(b){if(typeof b=="string"){var d=Ext.data.ModelManager.getModel(b);if(!d){Ext.Logger.error('Model with name "'+b+'" does not exist.')}b=d}if(b&&!b.prototype.isModel&&Ext.isObject(b)){b=Ext.data.ModelManager.registerType(b.storeId||b.id||Ext.id(),b)}if(!b){var a=this.getFields(),c=this.config.data;if(!a&&c&&c.length){a=Ext.Object.getKeys(c[0])}if(a){b=Ext.define("Ext.data.Store.ImplicitModel-"+(this.getStoreId()||Ext.id()),{extend:"Ext.data.Model",config:{fields:a,proxy:this.getProxy()}});this.implicitModel=true}}if(!b&&this.getProxy()){b=this.getProxy().getModel()}return b},updateModel:function(a){var b=this.getProxy();if(b&&!b.getModel()){b.setModel(a)}},applyProxy:function(b,a){b=Ext.factory(b,Ext.data.Proxy,a,"proxy");if(!b&&this.getModel()){b=this.getModel().getProxy();if(!b){b=new Ext.data.proxy.Memory({model:this.getModel()})}}return b},updateProxy:function(a){if(a){if(!a.getModel()){a.setModel(this.getModel())}a.on("metachange",this.onMetaChange,this)}},applyData:function(c){var b=this,a;if(c){a=b.getProxy();if(a instanceof Ext.data.proxy.Memory){a.setData(c);b.load()}else{b.removeAll(true);b.fireEvent("clear",b);b.suspendEvents();b.add(c);b.resumeEvents();b.dataLoaded=true}}else{b.removeAll(true);b.fireEvent("clear",b)}b.fireEvent("refresh",b,b.data)},clearData:function(){this.setData(null)},addData:function(d){var a=this.getProxy().getReader(),c=a.read(d),b=c.getRecords();this.add(b)},updateAutoLoad:function(a){var b=this.getProxy();if(a&&(b&&!b.isMemoryProxy)){this.load(Ext.isObject(a)?a:null)}},isAutoLoading:function(){var a=this.getProxy();return(this.getAutoLoad()||(a&&a.isMemoryProxy)||this.dataLoaded)},updateGroupField:function(a){var b=this.getGrouper();if(a){if(!b){this.setGrouper({property:a,direction:this.getGroupDir()||"ASC"})}else{b.setProperty(a)}}else{if(b){this.setGrouper(null)}}},updateGroupDir:function(a){var b=this.getGrouper();if(b){b.setDirection(a)}},applyGetGroupString:function(b){var a=this.getGrouper();if(b){if(a){a.setGroupFn(b)}else{this.setGrouper({groupFn:b})}}else{if(a){this.setGrouper(null)}}},applyGrouper:function(a){if(typeof a=="string"){a={property:a}}else{if(typeof a=="function"){a={groupFn:a}}}a=Ext.factory(a,Ext.util.Grouper,this.getGrouper());return a},updateGrouper:function(b,a){var c=this.data;if(a){c.removeSorter(a);if(!b){c.getSorters().removeSorter("isGrouper")}}if(b){c.insertSorter(0,b);if(!a){c.getSorters().addSorter({direction:"DESC",property:"isGrouper",transform:function(d){return(d===true)?1:-1}})}}},isGrouped:function(){return !!this.getGrouped()},updateSorters:function(d){var b=this.getGrouper(),c=this.data,a=c.getAutoSort();c.setAutoSort(false);c.setSorters(d);if(b){c.insertSorter(0,b)}this.updateSortTypes();c.setAutoSort(a)},updateSortTypes:function(){var b=this.getModel(),a=b&&b.getFields(),c=this.data;if(a){c.getSorters().each(function(f){var d=f.getProperty(),e;if(!f.isGrouper&&d&&!f.getTransform()){e=a.get(d);if(e){f.setTransform(e.getSortType())}}})}},updateFilters:function(a){this.data.setFilters(a)},add:function(a){if(!Ext.isArray(a)){a=Array.prototype.slice.apply(arguments)}return this.insert(this.data.length,a)},insert:function(e,b){if(!Ext.isArray(b)){b=Array.prototype.slice.call(arguments,1)}var h=this,k=false,f=b.length,a=this.getModel(),g=h.getModelDefaults(),c,d,j=false;b=b.slice();for(c=0;c<f;c++){d=b[c];if(!d.isModel){d=new a(d)}else{if(this.removed.indexOf(d)!=-1){Ext.Array.remove(this.removed,d)}}d.set(g);b[c]=d;d.join(h);k=k||(d.phantom===true)}if(f===1){j=this.data.insert(e,b[0]);if(j){j=[j]}}else{j=this.data.insertAll(e,b)}if(j){h.fireEvent("addrecords",h,j)}if(h.getAutoSync()&&k){h.sync()}return b},remove:function(b){if(b.isModel){b=[b]}var l=this,m=false,d=0,a=this.getAutoSync(),k=b.length,o=[],g=[],n,h=l.data.items,e,f,c;for(;d<k;d++){e=b[d];if(l.data.contains(e)){n=(e.phantom===true);f=h.indexOf(e);if(f!==-1){g.push(e);o.push(f)}if(!n&&l.getSyncRemovedRecords()){l.removed.push(e)}e.unjoin(l);l.data.remove(e);m=m||!n}}l.fireEvent("removerecords",l,g,o);if(a&&m){l.sync()}},removeAt:function(b){var a=this.getAt(b);if(a){this.remove(a)}},removeAll:function(a){if(a!==true){this.fireAction("clear",[this],"doRemoveAll")}else{this.doRemoveAll.call(this,true)}},doRemoveAll:function(a){var b=this;b.data.each(function(c){c.unjoin(b)});if(b.getSyncRemovedRecords()){b.removed=b.removed.concat(b.data.items)}b.data.clear();if(a!==true){b.fireEvent("refresh",b,b.data)}if(b.getAutoSync()){this.sync()}},each:function(b,a){this.data.each(b,a)},getCount:function(){return this.data.length||0},getAt:function(a){return this.data.getAt(a)},getRange:function(b,a){return this.data.getRange(b,a)},getById:function(a){return this.data.findBy(function(b){return b.getId()==a})},indexOf:function(a){return this.data.indexOf(a)},indexOfId:function(a){return this.data.indexOfKey(a)},afterEdit:function(c,g,d){var f=this,h=f.data,a=d[c.getIdProperty()]||c.getId(),b=h.keys.indexOf(a),e;if(b===-1&&h.map[a]===undefined){return}if(f.getAutoSync()){f.sync()}if(a!==c.getId()){h.replace(a,c)}else{h.replace(c)}e=h.indexOf(c);if(b===-1&&e!==-1){f.fireEvent("addrecords",f,[c])}else{if(b!==-1&&e===-1){f.fireEvent("removerecords",f,[c],[b])}else{if(e!==-1){f.fireEvent("updaterecord",f,c,e,b,g,d)}}}},afterReject:function(a){var b=this.data.indexOf(a);this.fireEvent("updaterecord",this,a,b,b,[],{})},afterCommit:function(c,g,d){var f=this,h=f.data,a=d[c.getIdProperty()]||c.getId(),b=h.keys.indexOf(a),e;if(b===-1&&h.map[a]===undefined){return}if(a!==c.getId()){h.replace(a,c)}else{h.replace(c)}e=h.indexOf(c);if(b===-1&&e!==-1){f.fireEvent("addrecords",f,[c])}else{if(b!==-1&&e===-1){f.fireEvent("removerecords",f,[c],[b])}else{if(e!==-1){f.fireEvent("updaterecord",f,c,e,b,g,d)}}}},afterErase:function(a){var c=this,d=c.data,b=d.indexOf(a);if(b!==-1){d.remove(a);c.fireEvent("removerecords",c,[a],[b])}},updateRemoteFilter:function(a){this.data.setAutoFilter(!a)},updateRemoteSort:function(a){this.data.setAutoSort(!a)},sort:function(f,d,c){var e=this.data,b=this.getGrouper(),a=e.getAutoSort();if(f){e.setAutoSort(false);if(typeof c==="string"){if(c=="prepend"){e.insertSorters(b?1:0,f,d)}else{e.addSorters(f,d)}}else{e.setSorters(null);if(b){e.addSorters(b)}e.addSorters(f,d)}this.updateSortTypes();e.setAutoSort(a)}if(!this.getRemoteSort()){if(!f){this.data.sort()}this.fireEvent("sort",this,this.data,this.data.getSorters());if(e.length){this.fireEvent("refresh",this,this.data)}}},filter:function(e,d,f,a){var c=this.data,b=c.length;if(this.getRemoteFilter()){if(e){if(Ext.isString(e)){c.addFilters({property:e,value:d,anyMatch:f,caseSensitive:a})}else{if(Ext.isArray(e)||e.isFilter){c.addFilters(e)}}}}else{c.filter(e,d);this.fireEvent("filter",this,c,c.getFilters());if(c.length!==b){this.fireEvent("refresh",this,c)}}},filterBy:function(b,a){var d=this,e=d.data,c=e.length;e.filter({filterFn:b,scope:a});this.fireEvent("filter",this,e,e.getFilters());if(e.length!==c){this.fireEvent("refresh",this,e)}},queryBy:function(b,a){return this.data.filterBy(b,a||this)},clearFilter:function(a){var b=this.data.length;if(a){this.suspendEvents()}this.data.setFilters(null);if(a){this.resumeEvents()}else{if(b!==this.data.length){this.fireEvent("refresh",this,this.data)}}},isFiltered:function(){return this.data.filtered},getSorters:function(){var a=this.data.getSorters();return(a)?a.items:[]},getFilters:function(){var a=this.data.getFilters();return(a)?a.items:[]},getGroups:function(c){var e=this.data.items,b=e.length,a=this.getGrouper(),d=[],k={},g,h,j,f;for(f=0;f<b;f++){g=e[f];h=a.getGroupString(g);j=k[h];if(j===undefined){j={name:h,children:[]};d.push(j);k[h]=j}j.children.push(g)}return c?k[c]:d},getGroupString:function(a){var b=this.getGrouper();if(b){return b.getGroupString(a)}return null},find:function(g,d,e,f,a,c){var b=Ext.create("Ext.util.Filter",{property:g,value:d,anyMatch:f,caseSensitive:a,exactMatch:c,root:"data"});return this.data.findIndexBy(b.getFilterFn(),null,e)},findRecord:function(){var b=this,a=b.find.apply(b,arguments);return a!==-1?b.getAt(a):null},findExact:function(c,a,b){return this.data.findIndexBy(function(d){return d.get(c)===a},this,b)},findBy:function(b,a,c){return this.data.findIndexBy(b,a,c)},load:function(c,e){var f=this,b,d=f.currentPage,a=f.getPageSize();c=c||{};if(Ext.isFunction(c)){c={callback:c,scope:e||this}}if(f.getRemoteSort()){c.sorters=c.sorters||this.getSorters()}if(f.getRemoteFilter()){c.filters=c.filters||this.getFilters()}if(f.getRemoteGroup()){c.grouper=c.grouper||this.getGrouper()}Ext.applyIf(c,{page:d,start:(d-1)*a,limit:a,addRecords:false,action:"read",model:this.getModel()});b=Ext.create("Ext.data.Operation",c);if(f.fireEvent("beforeload",f,b)!==false){f.loading=true;f.getProxy().read(b,f.onProxyLoad,f)}return f},isLoading:function(){return Boolean(this.loading)},isLoaded:function(){return Boolean(this.loaded)},sync:function(){var d=this,b={},e=d.getNewRecords(),c=d.getUpdatedRecords(),a=d.getRemovedRecords(),f=false;if(e.length>0){b.create=e;f=true}if(c.length>0){b.update=c;f=true}if(a.length>0){b.destroy=a;f=true}if(f&&d.fireEvent("beforesync",this,b)!==false){d.getProxy().batch({operations:b,listeners:d.getBatchListeners()})}return{added:e,updated:c,removed:a}},first:function(){return this.data.first()},last:function(){return this.data.last()},sum:function(e){var d=0,c=0,b=this.data.items,a=b.length;for(;c<a;++c){d+=b[c].get(e)}return d},min:function(f){var d=1,b=this.data.items,a=b.length,e,c;if(a>0){c=b[0].get(f)}for(;d<a;++d){e=b[d].get(f);if(e<c){c=e}}return c},max:function(f){var d=1,c=this.data.items,b=c.length,e,a;if(b>0){a=c[0].get(f)}for(;d<b;++d){e=c[d].get(f);if(e>a){a=e}}return a},average:function(e){var c=0,b=this.data.items,a=b.length,d=0;if(b.length>0){for(;c<a;++c){d+=b[c].get(e)}return d/a}return 0},getBatchListeners:function(){return{scope:this,exception:this.onBatchException,complete:this.onBatchComplete}},onBatchComplete:function(b){var e=this,a=b.operations,d=a.length,c;for(c=0;c<d;c++){e.onProxyWrite(a[c])}},onBatchException:function(b,a){},onProxyLoad:function(b){var d=this,a=b.getRecords(),c=b.getResultSet(),e=b.wasSuccessful();if(c){d.setTotalCount(c.getTotal())}if(e){if(b.getAddRecords()!==true){d.data.each(function(f){f.unjoin(d)});d.data.clear();d.fireEvent("clear",this)}if(a&&a.length){d.suspendEvents();d.add(a);d.resumeEvents()}d.fireEvent("refresh",this,this.data)}d.loaded=true;d.loading=false;d.fireEvent("load",this,a,e);Ext.callback(b.getCallback(),b.getScope()||d,[a,b,e])},onProxyWrite:function(b){var c=this,d=b.wasSuccessful(),a=b.getRecords();switch(b.getAction()){case"create":c.onCreateRecords(a,b,d);break;case"update":c.onUpdateRecords(a,b,d);break;case"destroy":c.onDestroyRecords(a,b,d);break}if(d){c.fireEvent("write",c,b)}Ext.callback(b.getCallback(),b.getScope()||c,[a,b,d])},onCreateRecords:function(b,a,c){},onUpdateRecords:function(b,a,c){},onDestroyRecords:function(b,a,c){this.removed=[]},onMetaChange:function(b){var a=this.getProxy().getModel();if(!this.getModel()&&a){this.setModel(a)}this.fireEvent("metachange",this,b)},getNewRecords:function(){return this.data.filterBy(function(a){return a.phantom===true&&a.isValid()}).items},getUpdatedRecords:function(){return this.data.filterBy(function(a){return a.dirty===true&&a.phantom!==true&&a.isValid()}).items},getRemovedRecords:function(){return this.removed},loadPage:function(f,c,d){if(typeof c==="function"){c={callback:c,scope:d||this}}var e=this,b=e.getPageSize(),a=e.getClearOnPageLoad();c=Ext.apply({},c);e.currentPage=f;e.load(Ext.applyIf(c,{page:f,start:(f-1)*b,limit:b,addRecords:!a}))},nextPage:function(a){this.loadPage(this.currentPage+1,a)},previousPage:function(a){this.loadPage(this.currentPage-1,a)}});Ext.define("Ext.data.ArrayStore",{extend:"Ext.data.Store",alias:"store.array",uses:["Ext.data.reader.Array"],config:{proxy:{type:"memory",reader:"array"}},loadData:function(b,a){this.callParent([b,a])}},function(){Ext.data.SimpleStore=Ext.data.ArrayStore});Ext.define("Ext.data.DirectStore",{extend:"Ext.data.Store",alias:"store.direct",requires:["Ext.data.proxy.Direct"],config:{proxy:{type:"direct",reader:{type:"json"}}}});Ext.define("Ext.data.JsonStore",{extend:"Ext.data.Store",alias:"store.json",config:{proxy:{type:"ajax",reader:"json",writer:"json"}}});Ext.define("Ext.data.NodeStore",{extend:"Ext.data.Store",alias:"store.node",requires:["Ext.data.NodeInterface"],config:{node:null,recursive:false,rootVisible:false,sorters:undefined,filters:undefined,folderSort:false},afterEdit:function(a,b){if(b){if(b.indexOf("loaded")!==-1){return this.add(this.retrieveChildNodes(a))}if(b.indexOf("expanded")!==-1){return this.filter()}if(b.indexOf("sorted")!==-1){return this.sort()}}this.callParent(arguments)},onNodeAppend:function(a,b){this.add([b].concat(this.retrieveChildNodes(b)))},onNodeInsert:function(a,b){this.add([b].concat(this.retrieveChildNodes(b)))},onNodeRemove:function(a,b){this.remove([b].concat(this.retrieveChildNodes(b)))},onNodeSort:function(){this.sort()},updateFolderSort:function(a){if(a){this.setGrouper(function(b){if(b.isLeaf()){return 1}return 0})}else{this.setGrouper(null)}},createDataCollection:function(){var a=this.callParent();a.handleSort=Ext.Function.bind(this.handleTreeSort,this,[a],true);a.findInsertionIndex=Ext.Function.bind(this.handleTreeInsertionIndex,this,[a,a.findInsertionIndex],true);return a},handleTreeInsertionIndex:function(a,b,d,c){return c.call(d,a,b,this.treeSortFn)},handleTreeSort:function(a){Ext.Array.sort(a,this.treeSortFn);return a},treeSortFn:function(c,a){if(c.parentNode===a.parentNode){return(c.data.index<a.data.index)?-1:1}var f=0,e=0,d=c,b=a;while(d){f+=(Math.pow(10,(d.data.depth+1)*-4)*(d.data.index+1));d=d.parentNode}while(b){e+=(Math.pow(10,(b.data.depth+1)*-4)*(b.data.index+1));b=b.parentNode}if(f>e){return 1}else{if(f<e){return -1}}return(c.data.index>a.data.index)?1:-1},applyFilters:function(b){var a=this;return function(c){return a.isVisible(c)}},applyProxy:function(a){},applyNode:function(a){if(a){a=Ext.data.NodeInterface.decorate(a)}return a},updateNode:function(a,c){if(c){c.un({append:"onNodeAppend",insert:"onNodeInsert",remove:"onNodeRemove",load:"onNodeLoad",scope:this});c.unjoin(this)}if(a){a.on({scope:this,append:"onNodeAppend",insert:"onNodeInsert",remove:"onNodeRemove",load:"onNodeLoad"});a.join(this);var b=[];if(a.childNodes.length){b=b.concat(this.retrieveChildNodes(a))}if(this.getRootVisible()){b.push(a)}else{if(a.isLoaded()||a.isLoading()){a.set("expanded",true)}}this.data.clear();this.fireEvent("clear",this);this.suspendEvents();this.add(b);this.resumeEvents();this.fireEvent("refresh",this,this.data)}},retrieveChildNodes:function(a){var d=this.getNode(),b=this.getRecursive(),c=[],e=a;if(!a.childNodes.length||(!b&&a!==d)){return c}if(!b){return a.childNodes}while(e){if(e._added){delete e._added;if(e===a){break}else{e=e.nextSibling||e.parentNode}}else{if(e!==a){c.push(e)}if(e.firstChild){e._added=true;e=e.firstChild}else{e=e.nextSibling||e.parentNode}}}return c},isVisible:function(b){var a=b.parentNode;while(a){if(!a.isExpanded()){return false}if(a===this.getNode()){break}a=a.parentNode}return true}});Ext.define("Ext.data.TreeStore",{extend:"Ext.data.NodeStore",alias:"store.tree",config:{root:undefined,clearOnLoad:true,nodeParam:"node",defaultRootId:"root",defaultRootProperty:"children",recursive:true},applyProxy:function(){return Ext.data.Store.prototype.applyProxy.apply(this,arguments)},applyRoot:function(a){var b=this;a=a||{};a=Ext.apply({},a);if(!a.isModel){Ext.applyIf(a,{id:b.getDefaultRootId(),text:"Root",allowDrag:false});a=Ext.data.ModelManager.create(a,b.getModel())}Ext.data.NodeInterface.decorate(a);a.set(a.raw);return a},handleTreeInsertionIndex:function(a,b,d,c){if(b.parentNode){b.parentNode.sort(d.getSortFn(),true,true)}return this.callParent(arguments)},handleTreeSort:function(a,b){if(this._sorting){return a}this._sorting=true;this.getNode().sort(b.getSortFn(),true,true);delete this._sorting;return this.callParent(arguments)},updateRoot:function(a,b){if(b){b.unBefore({expand:"onNodeBeforeExpand",scope:this});b.unjoin(this)}a.onBefore({expand:"onNodeBeforeExpand",scope:this});this.onNodeAppend(null,a);this.setNode(a);if(!a.isLoaded()&&!a.isLoading()&&a.isExpanded()){this.load({node:a})}this.fireEvent("rootchange",this,a,b)},getNodeById:function(a){return this.data.getByKey(a)},onNodeBeforeExpand:function(b,a,c){if(b.isLoading()){c.pause();this.on("load",function(){c.resume()},this,{single:true})}else{if(!b.isLoaded()){c.pause();this.load({node:b,callback:function(){c.resume()}})}}},onNodeAppend:function(l,b){var j=this.getProxy(),g=j.getReader(),e=b.raw,c=[],a=g.getRootProperty(),k,f,d,h;if(!b.isLeaf()){k=g.getRoot(e);if(k){f=g.extractData(k);for(d=0,h=f.length;d<h;d++){if(f[d].node[a]){f[d].data[a]=f[d].node[a]}c.push(f[d].data)}if(c.length){this.fillNode(b,c)}delete e[a]}}},updateAutoLoad:function(b){if(b){var a=this.getRoot();if(!a.isLoaded()&&!a.isLoading()){this.load({node:a})}}},load:function(a){a=a||{};a.params=a.params||{};var c=this,b=a.node=a.node||c.getRoot();a.params[c.getNodeParam()]=b.getId();if(c.getClearOnLoad()){b.removeAll(true)}b.set("loading",true);return c.callParent([a])},updateProxy:function(b){this.callParent(arguments);var a=b.getReader();if(!a.getRootProperty()){a.setRootProperty(this.getDefaultRootProperty());a.buildExtractors()}},removeAll:function(){this.getRootNode().removeAll(true);this.callParent(arguments)},onProxyLoad:function(b){var d=this,a=b.getRecords(),e=b.wasSuccessful(),c=b.getNode();c.beginEdit();c.set("loading",false);if(e){a=d.fillNode(c,a)}c.endEdit();c.fireEvent("load",c,a,e);d.loading=false;d.fireEvent("load",this,a,e);Ext.callback(b.getCallback(),b.getScope()||d,[a,b,e])},fillNode:function(d,a){var c=a?a.length:0,b,e;for(b=0;b<c;b++){e=d.appendChild(a[b],true,true);this.onNodeAppend(d,e)}d.set("loaded",true);return a}});Ext.define("Ext.data.proxy.Rest",{extend:"Ext.data.proxy.Ajax",alternateClassName:"Ext.data.RestProxy",alias:"proxy.rest",config:{appendId:true,format:null,batchActions:false,actionMethods:{create:"POST",read:"GET",update:"PUT",destroy:"DELETE"}},buildUrl:function(f){var i=this,e=f.getOperation(),c=e.getRecords()||[],h=c[0],g=i.getModel(),k=g.getIdProperty(),j=i.getFormat(),a=i.getUrl(f),d=f.getParams()||{},b=(h&&!h.phantom)?h.getId():d[k];if(i.getAppendId()&&b){if(!a.match(/\/$/)){a+="/"}a+=b;delete d[k]}if(j){if(!a.match(/\.$/)){a+="."}a+=j}f.setUrl(a);return i.callParent([f])}});Ext.define("Ext.direct.RemotingProvider",{alias:"direct.remotingprovider",extend:"Ext.direct.JsonProvider",requires:["Ext.util.MixedCollection","Ext.util.DelayedTask","Ext.direct.Transaction","Ext.direct.RemotingMethod"],config:{namespace:undefined,url:null,enableUrlEncode:null,enableBuffer:10,maxRetries:1,timeout:undefined,actions:{}},constructor:function(a){var b=this;b.callParent(arguments);b.transactions=Ext.create("Ext.util.Collection",function(c){return c.getId()});b.callBuffer=[]},applyNamespace:function(a){if(Ext.isString(a)){return Ext.ns(a)}return a||window},initAPI:function(){var g=this.getActions(),d=this.getNamespace(),f,a,b,c,e,h;for(f in g){if(g.hasOwnProperty(f)){a=d[f];if(!a){a=d[f]={}}b=g[f];for(c=0,e=b.length;c<e;++c){h=Ext.create("Ext.direct.RemotingMethod",b[c]);a[h.getName()]=this.createHandler(f,h)}}}},createHandler:function(c,d){var b=this,a;if(!d.getFormHandler()){a=function(){b.configureRequest(c,d,Array.prototype.slice.call(arguments,0))}}else{a=function(f,g,e){b.configureFormRequest(c,d,f,g,e)}}a.directCfg={action:c,method:d};return a},isConnected:function(){return !!this.connected},connect:function(){var a=this;if(a.getUrl()){a.initAPI();a.connected=true;a.fireEvent("connect",a)}else{}},disconnect:function(){var a=this;if(a.connected){a.connected=false;a.fireEvent("disconnect",a)}},runCallback:function(e,b){var d=!!b.getStatus(),c=d?"success":"failure",f=e&&e.getCallback(),a;if(f){a=b.getResult();if(Ext.isFunction(f)){f(a,b,d)}else{Ext.callback(f[c],f.scope,[a,b,d]);Ext.callback(f.callback,f.scope,[a,b,d])}}},onData:function(k,h,c){var f=this,d=0,e,j,a,b,g;if(h){j=f.createEvents(c);for(e=j.length;d<e;++d){a=j[d];b=f.getTransaction(a);f.fireEvent("data",f,a);if(b){f.runCallback(b,a,true);Ext.direct.Manager.removeTransaction(b)}}}else{g=[].concat(k.transaction);for(e=g.length;d<e;++d){b=f.getTransaction(g[d]);if(b&&b.getRetryCount()<f.getMaxRetries()){b.retry()}else{a=Ext.create("Ext.direct.ExceptionEvent",{data:null,transaction:b,code:Ext.direct.Manager.exceptions.TRANSPORT,message:"Unable to connect to the server.",xhr:c});f.fireEvent("data",f,a);if(b){f.runCallback(b,a,false);Ext.direct.Manager.removeTransaction(b)}}}}},getTransaction:function(a){return a&&a.getTid()?Ext.direct.Manager.getTransaction(a.getTid()):null},configureRequest:function(d,a,f){var g=this,c=a.getCallData(f),e=c.data,h=c.callback,i=c.scope,b;b=Ext.create("Ext.direct.Transaction",{provider:g,args:f,action:d,method:a.getName(),data:e,callback:i&&Ext.isFunction(h)?Ext.Function.bind(h,i):h});if(g.fireEvent("beforecall",g,b,a)!==false){Ext.direct.Manager.addTransaction(b);g.queueTransaction(b);g.fireEvent("call",g,b,a)}},getCallData:function(a){return{action:a.getAction(),method:a.getMethod(),data:a.getData(),type:"rpc",tid:a.getId()}},sendRequest:function(g){var f=this,e={url:f.getUrl(),callback:f.onData,scope:f,transaction:g,timeout:f.getTimeout()},a,c=f.getEnableUrlEncode(),b=0,d,h;if(Ext.isArray(g)){a=[];for(d=g.length;b<d;++b){a.push(f.getCallData(g[b]))}}else{a=f.getCallData(g)}if(c){h={};h[Ext.isString(c)?c:"data"]=Ext.encode(a);e.params=h}else{e.jsonData=a}Ext.Ajax.request(e)},queueTransaction:function(c){var b=this,a=b.getEnableBuffer();if(c.getForm()){b.sendFormRequest(c);return}b.callBuffer.push(c);if(a){if(!b.callTask){b.callTask=Ext.create("Ext.util.DelayedTask",b.combineAndSend,b)}b.callTask.delay(Ext.isNumber(a)?a:10)}else{b.combineAndSend()}},combineAndSend:function(){var a=this.callBuffer,b=a.length;if(b>0){this.sendRequest(b==1?a[0]:a);this.callBuffer=[]}}});Ext.define("Ext.util.TapRepeater",{requires:["Ext.DateExtras"],mixins:{observable:"Ext.mixin.Observable"},config:{el:null,accelerate:true,interval:10,delay:250,preventDefault:true,stopDefault:false,timer:0,pressCls:null},constructor:function(a){var b=this;b.initConfig(a)},updateEl:function(c,b){var a={touchstart:"onTouchStart",touchend:"onTouchEnd",tap:"eventOptions",scope:this};if(b){b.un(a)}c.on(a)},eventOptions:function(a){if(this.getPreventDefault()){a.preventDefault()}if(this.getStopDefault()){a.stopEvent()}},destroy:function(){this.clearListeners();Ext.destroy(this.el)},onTouchStart:function(c){var b=this,a=b.getPressCls();clearTimeout(b.getTimer());if(a){b.getEl().addCls(a)}b.tapStartTime=new Date();b.fireEvent("touchstart",b,c);b.fireEvent("tap",b,c);if(b.getAccelerate()){b.delay=400}b.setTimer(Ext.defer(b.tap,b.getDelay()||b.getInterval(),b,[c]))},tap:function(b){var a=this;a.fireEvent("tap",a,b);a.setTimer(Ext.defer(a.tap,a.getAccelerate()?a.easeOutExpo(Ext.Date.getElapsed(a.tapStartTime),400,-390,12000):a.getInterval(),a,[b]))},easeOutExpo:function(e,a,g,f){return(e==f)?a+g:g*(-Math.pow(2,-10*e/f)+1)+a},onTouchEnd:function(b){var a=this;clearTimeout(a.getTimer());a.getEl().removeCls(a.getPressCls());a.fireEvent("touchend",a,b)}});Ext.define("Ext.util.translatable.Abstract",{extend:"Ext.Evented",requires:["Ext.fx.easing.Linear"],config:{element:null,easing:null,easingX:null,easingY:null,fps:60},constructor:function(a){var b;this.doAnimationFrame=Ext.Function.bind(this.doAnimationFrame,this);this.x=0;this.y=0;this.activeEasingX=null;this.activeEasingY=null;this.initialConfig=a;if(a&&a.element){b=a.element;this.setElement(b)}},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(a){this.initConfig(this.initialConfig);this.refresh()},factoryEasing:function(a){return Ext.factory(a,Ext.fx.easing.Linear,null,"easing")},applyEasing:function(a){if(!this.getEasingX()){this.setEasingX(this.factoryEasing(a))}if(!this.getEasingY()){this.setEasingY(this.factoryEasing(a))}},applyEasingX:function(a){return this.factoryEasing(a)},applyEasingY:function(a){return this.factoryEasing(a)},updateFps:function(a){this.animationInterval=1000/a},doTranslate:function(a,b){if(typeof a=="number"){this.x=a}if(typeof b=="number"){this.y=b}return this},translate:function(a,c,b){if(Ext.isObject(a)){throw new Error()}this.stopAnimation();if(b!==undefined){return this.translateAnimated(a,c,b)}return this.doTranslate(a,c)},animate:function(b,a){this.activeEasingX=b;this.activeEasingY=a;this.isAnimating=true;this.animationTimer=setInterval(this.doAnimationFrame,this.animationInterval);this.fireEvent("animationstart",this,this.x,this.y);return this},translateAnimated:function(b,g,e){if(Ext.isObject(b)){throw new Error()}if(!Ext.isObject(e)){e={}}var d=Ext.Date.now(),f=e.easing,c=(typeof b=="number")?(e.easingX||this.getEasingX()||f||true):null,a=(typeof g=="number")?(e.easingY||this.getEasingY()||f||true):null;if(c){c=this.factoryEasing(c);c.setStartTime(d);c.setStartValue(this.x);c.setEndValue(b);if("duration" in e){c.setDuration(e.duration)}}if(a){a=this.factoryEasing(a);a.setStartTime(d);a.setStartValue(this.y);a.setEndValue(g);if("duration" in e){a.setDuration(e.duration)}}return this.animate(c,a)},doAnimationFrame:function(){if(!this.isAnimating){return}var c=this.activeEasingX,b=this.activeEasingY,a,d;if(c===null&&b===null){this.stopAnimation();return}if(c!==null){this.x=a=Math.round(c.getValue());if(c.isEnded){this.activeEasingX=null;this.fireEvent("axisanimationend",this,"x",a)}}else{a=this.x}if(b!==null){this.y=d=Math.round(b.getValue());if(b.isEnded){this.activeEasingY=null;this.fireEvent("axisanimationend",this,"y",d)}}else{d=this.y}this.doTranslate(a,d);this.fireEvent("animationframe",this,a,d)},stopAnimation:function(){if(!this.isAnimating){return}this.activeEasingX=null;this.activeEasingY=null;this.isAnimating=false;clearInterval(this.animationTimer);this.fireEvent("animationend",this,this.x,this.y)},refresh:function(){this.translate(this.x,this.y)}});Ext.define("Ext.util.translatable.CssTransform",{extend:"Ext.util.translatable.Abstract",doTranslate:function(a,c){var b=this.getElement().dom.style;if(typeof a!="number"){a=this.x}if(typeof c!="number"){c=this.y}b.webkitTransform="translate3d("+a+"px, "+c+"px, 0px)";return this.callParent(arguments)},destroy:function(){var a=this.getElement();if(a&&!a.isDestroyed){a.dom.style.webkitTransform=null}this.callParent(arguments)}});Ext.define("Ext.util.translatable.ScrollPosition",{extend:"Ext.util.translatable.Abstract",wrapperWidth:0,wrapperHeight:0,baseCls:"x-translatable",config:{useWrapper:true},getWrapper:function(){var e=this.wrapper,c=this.baseCls,b=this.getElement(),d,a;if(!e){a=b.getParent();if(!a){return null}if(this.getUseWrapper()){e=b.wrap({className:c+"-wrapper"},true)}else{e=a.dom}e.appendChild(Ext.Element.create({className:c+"-stretcher"},true));this.nestedStretcher=d=Ext.Element.create({className:c+"-nested-stretcher"},true);b.appendChild(d);b.addCls(c);a.addCls(c+"-container");this.container=a;this.wrapper=e;this.refresh()}return e},doTranslate:function(a,c){var b=this.getWrapper();if(b){if(typeof a=="number"){b.scrollLeft=this.wrapperWidth-a}if(typeof c=="number"){b.scrollTop=this.wrapperHeight-c}}return this.callParent(arguments)},refresh:function(){var a=this.getWrapper();if(a){this.wrapperWidth=a.offsetWidth;this.wrapperHeight=a.offsetHeight;this.callParent(arguments)}},destroy:function(){var b=this.getElement(),a=this.baseCls;if(this.wrapper){if(this.getUseWrapper()){b.unwrap()}this.container.removeCls(a+"-container");b.removeCls(a);b.removeChild(this.nestedStretcher)}this.callParent(arguments)}});Ext.define("Ext.util.Translatable",{requires:["Ext.util.translatable.CssTransform","Ext.util.translatable.ScrollPosition"],constructor:function(a){var c=Ext.util.translatable,e=c.CssTransform,d=c.ScrollPosition,b;if(typeof a=="object"&&"translationMethod" in a){if(a.translationMethod==="scrollposition"){b=d}else{if(a.translationMethod==="csstransform"){b=e}}}if(!b){if(Ext.os.is.Android2||Ext.browser.is.ChromeMobile){b=d}else{b=e}}return new b(a)}});Ext.define("Ext.behavior.Translatable",{extend:"Ext.behavior.Behavior",requires:["Ext.util.Translatable"],constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.translatable.refresh()},setConfig:function(c){var a=this.translatable,b=this.component;if(c){if(!a){this.translatable=a=new Ext.util.Translatable(c);a.setElement(b.renderElement);a.on("destroy","onTranslatableDestroy",this);if(b.isPainted()){this.onComponentPainted(b)}b.on(this.listeners)}else{if(Ext.isObject(c)){a.setConfig(c)}}}else{if(a){a.destroy()}}return this},getTranslatable:function(){return this.translatable},onTranslatableDestroy:function(){var a=this.component;delete this.translatable;a.un(this.listeners)},onComponentDestroy:function(){var a=this.translatable;if(a){a.destroy()}}});Ext.define("Ext.scroll.Scroller",{extend:"Ext.Evented",requires:["Ext.fx.easing.BoundMomentum","Ext.fx.easing.EaseOut","Ext.util.SizeMonitor","Ext.util.Translatable"],config:{element:null,direction:"auto",translationMethod:"auto",fps:"auto",disabled:null,directionLock:false,momentumEasing:{momentum:{acceleration:30,friction:0.5},bounce:{acceleration:30,springTension:0.3},minVelocity:1},bounceEasing:{duration:400},outOfBoundRestrictFactor:0.5,startMomentumResetTime:300,maxAbsoluteVelocity:6,containerSize:"auto",containerScrollSize:"auto",size:"auto",autoRefresh:true,initialOffset:{x:0,y:0},slotSnapSize:{x:0,y:0},slotSnapOffset:{x:0,y:0},slotSnapEasing:{duration:150}},cls:Ext.baseCSSPrefix+"scroll-scroller",containerCls:Ext.baseCSSPrefix+"scroll-container",dragStartTime:0,dragEndTime:0,isDragging:false,isAnimating:false,constructor:function(a){var b=a&&a.element;this.doAnimationFrame=Ext.Function.bind(this.doAnimationFrame,this);this.stopAnimation=Ext.Function.bind(this.stopAnimation,this);this.listeners={scope:this,touchstart:"onTouchStart",touchend:"onTouchEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd"};this.minPosition={x:0,y:0};this.startPosition={x:0,y:0};this.size={x:0,y:0};this.position={x:0,y:0};this.velocity={x:0,y:0};this.isAxisEnabledFlags={x:false,y:false};this.flickStartPosition={x:0,y:0};this.flickStartTime={x:0,y:0};this.lastDragPosition={x:0,y:0};this.dragDirection={x:0,y:0};this.initialConfig=a;if(b){this.setElement(b)}return this},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(a){this.initialize();a.addCls(this.cls);if(!this.getDisabled()){this.attachListeneners()}this.onConfigUpdate(["containerSize","size"],"refreshMaxPosition");this.on("maxpositionchange","snapToBoundary");this.on("minpositionchange","snapToBoundary");return this},getTranslatable:function(){if(!this.hasOwnProperty("translatable")){var a=this.getBounceEasing();this.translatable=new Ext.util.Translatable({translationMethod:this.getTranslationMethod(),element:this.getElement(),easingX:a.x,easingY:a.y,useWrapper:false,listeners:{animationframe:"onAnimationFrame",animationend:"onAnimationEnd",axisanimationend:"onAxisAnimationEnd",scope:this}})}return this.translatable},updateFps:function(a){if(a!=="auto"){this.getTranslatable().setFps(a)}},attachListeneners:function(){this.getContainer().on(this.listeners)},detachListeners:function(){this.getContainer().un(this.listeners)},updateDisabled:function(a){if(a){this.detachListeners()}else{this.attachListeneners()}},updateInitialOffset:function(c){if(typeof c=="number"){c={x:c,y:c}}var b=this.position,a,d;b.x=a=c.x;b.y=d=c.y;this.getTranslatable().doTranslate(-a,-d)},applyDirection:function(a){var e=this.getMinPosition(),d=this.getMaxPosition(),c,b;this.givenDirection=a;if(a==="auto"){c=d.x>e.x;b=d.y>e.y;if(c&&b){a="both"}else{if(c){a="horizontal"}else{a="vertical"}}}return a},updateDirection:function(b){var a=this.isAxisEnabledFlags;a.x=(b==="both"||b==="horizontal");a.y=(b==="both"||b==="vertical")},isAxisEnabled:function(a){this.getDirection();return this.isAxisEnabledFlags[a]},applyMomentumEasing:function(b){var a=Ext.fx.easing.BoundMomentum;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},applyBounceEasing:function(b){var a=Ext.fx.easing.EaseOut;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},applySlotSnapEasing:function(b){var a=Ext.fx.easing.EaseOut;return{x:Ext.factory(b,a),y:Ext.factory(b,a)}},getMinPosition:function(){var a=this.minPosition;if(!a){this.minPosition=a={x:0,y:0};this.fireEvent("minpositionchange",this,a)}return a},getMaxPosition:function(){var c=this.maxPosition,a,b;if(!c){a=this.getSize();b=this.getContainerSize();this.maxPosition=c={x:Math.max(0,a.x-b.x),y:Math.max(0,a.y-b.y)};this.fireEvent("maxpositionchange",this,c)}return c},refreshMaxPosition:function(){this.maxPosition=null;this.getMaxPosition()},applyContainerSize:function(b){var c,a,d;this.givenContainerSize=b;if(b==="auto"){c=this.getContainer().dom;a=c.offsetWidth;d=c.offsetHeight}else{a=b.x;d=b.y}return{x:a,y:d}},applySize:function(b){var c,a,d;this.givenSize=b;if(b==="auto"){c=this.getElement().dom;a=c.offsetWidth;d=c.offsetHeight}else{a=b.x;d=b.y}return{x:a,y:d}},applyContainerScrollSize:function(b){var c,a,d;this.givenContainerScrollSize=b;if(b==="auto"){c=this.getContainer().dom;a=c.scrollWidth;d=c.scrollHeight}else{a=b.x;d=b.y}return{x:a,y:d}},updateAutoRefresh:function(b){var c=Ext.util.SizeMonitor,a;if(b){this.sizeMonitors={element:new c({element:this.getElement(),callback:this.doRefresh,scope:this}),container:new c({element:this.getContainer(),callback:this.doRefresh,scope:this})}}else{a=this.sizeMonitors;if(a){a.element.destroy();a.container.destroy()}}},applySlotSnapSize:function(a){if(typeof a=="number"){return{x:a,y:a}}return a},applySlotSnapOffset:function(a){if(typeof a=="number"){return{x:a,y:a}}return a},getContainer:function(){var a=this.container;if(!a){this.container=a=this.getElement().getParent();a.addCls(this.containerCls)}return a},doRefresh:function(){this.stopAnimation();this.getTranslatable().refresh();this.setSize(this.givenSize);this.setContainerSize(this.givenContainerSize);this.setContainerScrollSize(this.givenContainerScrollSize);this.setDirection(this.givenDirection);this.fireEvent("refresh",this)},refresh:function(){var a=this.sizeMonitors;if(a){a.element.refresh();a.container.refresh()}this.doRefresh();return this},scrollTo:function(c,h,g){var b=this.getTranslatable(),a=this.position,d=false,f,e;if(this.isAxisEnabled("x")){if(typeof c!="number"){c=a.x}else{if(a.x!==c){a.x=c;d=true}}f=-c}if(this.isAxisEnabled("y")){if(typeof h!="number"){h=a.y}else{if(a.y!==h){a.y=h;d=true}}e=-h}if(d){if(g!==undefined){b.translateAnimated(f,e,g)}else{this.fireEvent("scroll",this,a.x,a.y);b.doTranslate(f,e)}}return this},scrollToTop:function(b){var a=this.getInitialOffset();return this.scrollTo(a.x,a.y,b)},scrollToEnd:function(a){return this.scrollTo(0,this.getSize().y-this.getContainerSize().y,a)},scrollBy:function(b,d,c){var a=this.position;b=(typeof b=="number")?b+a.x:null;d=(typeof d=="number")?d+a.y:null;return this.scrollTo(b,d,c)},onTouchStart:function(){this.isTouching=true;this.stopAnimation()},onTouchEnd:function(){var a=this.position;this.isTouching=false;if(!this.isDragging&&this.snapToSlot()){this.fireEvent("scrollstart",this,a.x,a.y)}},onDragStart:function(l){var o=this.getDirection(),g=l.absDeltaX,f=l.absDeltaY,j=this.getDirectionLock(),i=this.startPosition,d=this.flickStartPosition,k=this.flickStartTime,h=this.lastDragPosition,c=this.position,b=this.dragDirection,n=c.x,m=c.y,a=Ext.Date.now();this.isDragging=true;if(j&&o!=="both"){if((o==="horizontal"&&g>f)||(o==="vertical"&&f>g)){l.stopPropagation()}else{this.isDragging=false;return}}h.x=n;h.y=m;d.x=n;d.y=m;i.x=n;i.y=m;k.x=a;k.y=a;b.x=0;b.y=0;this.dragStartTime=a;this.isDragging=true;this.fireEvent("scrollstart",this,n,m)},onAxisDrag:function(i,q){if(!this.isAxisEnabled(i)){return}var h=this.flickStartPosition,l=this.flickStartTime,j=this.lastDragPosition,e=this.dragDirection,g=this.position[i],k=this.getMinPosition()[i],o=this.getMaxPosition()[i],d=this.startPosition[i],p=j[i],n=d-q,c=e[i],m=this.getOutOfBoundRestrictFactor(),f=this.getStartMomentumResetTime(),b=Ext.Date.now(),a;if(n<k){n*=m}else{if(n>o){a=n-o;n=o+a*m}}if(n>p){e[i]=1}else{if(n<p){e[i]=-1}}if((c!==0&&(e[i]!==c))||(b-l[i])>f){h[i]=g;l[i]=b}j[i]=n},onDrag:function(b){if(!this.isDragging){return}var a=this.lastDragPosition;this.onAxisDrag("x",b.deltaX);this.onAxisDrag("y",b.deltaY);this.scrollTo(a.x,a.y)},onDragEnd:function(c){var b,a;if(!this.isDragging){return}this.dragEndTime=Ext.Date.now();this.onDrag(c);this.isDragging=false;b=this.getAnimationEasing("x");a=this.getAnimationEasing("y");if(b||a){this.getTranslatable().animate(b,a)}else{this.onScrollEnd()}},getAnimationEasing:function(g){if(!this.isAxisEnabled(g)){return null}var e=this.position[g],f=this.flickStartPosition[g],k=this.flickStartTime[g],c=this.getMinPosition()[g],j=this.getMaxPosition()[g],a=this.getMaxAbsoluteVelocity(),d=null,b=this.dragEndTime,l,i,h;if(e<c){d=c}else{if(e>j){d=j}}if(d!==null){l=this.getBounceEasing()[g];l.setConfig({startTime:b,startValue:-e,endValue:-d});return l}h=b-k;if(h===0){return null}i=(e-f)/(b-k);if(i===0){return null}if(i<-a){i=-a}else{if(i>a){i=a}}l=this.getMomentumEasing()[g];l.setConfig({startTime:b,startValue:-e,startVelocity:-i,minMomentumValue:-j,maxMomentumValue:0});return l},onAnimationFrame:function(c,b,d){var a=this.position;a.x=-b;a.y=-d;this.fireEvent("scroll",this,a.x,a.y)},onAxisAnimationEnd:function(a){},onAnimationEnd:function(){this.snapToBoundary();this.onScrollEnd()},stopAnimation:function(){this.getTranslatable().stopAnimation()},onScrollEnd:function(){var a=this.position;if(this.isTouching||!this.snapToSlot()){this.fireEvent("scrollend",this,a.x,a.y)}},snapToSlot:function(){var b=this.getSnapPosition("x"),a=this.getSnapPosition("y"),c=this.getSlotSnapEasing();if(b!==null||a!==null){this.scrollTo(b,a,{easingX:c.x,easingY:c.y});return true}return false},getSnapPosition:function(c){var g=this.getSlotSnapSize()[c],d=null,a,f,e,b;if(g!==0&&this.isAxisEnabled(c)){a=this.position[c];f=this.getSlotSnapOffset()[c];e=this.getMaxPosition()[c];b=(a-f)%g;if(b!==0){if(Math.abs(b)>g/2){d=a+((b>0)?g-b:b-g);if(d>e){d=a-b}}else{d=a-b}}}return d},snapToBoundary:function(){var g=this.position,c=this.getMinPosition(),f=this.getMaxPosition(),e=c.x,d=c.y,b=f.x,a=f.y,i=Math.round(g.x),h=Math.round(g.y);if(i<e){i=e}else{if(i>b){i=b}}if(h<d){h=d}else{if(h>a){h=a}}this.scrollTo(i,h)},destroy:function(){var b=this.getElement(),a=this.sizeMonitors;if(a){a.element.destroy();a.container.destroy()}if(b&&!b.isDestroyed){b.removeCls(this.cls);this.getContainer().removeCls(this.containerCls)}Ext.destroy(this.translatable);this.callParent(arguments)}},function(){});Ext.define("Ext.util.Draggable",{isDraggable:true,mixins:["Ext.mixin.Observable"],requires:["Ext.util.SizeMonitor","Ext.util.Translatable"],config:{cls:Ext.baseCSSPrefix+"draggable",draggingCls:Ext.baseCSSPrefix+"dragging",element:null,constraint:"container",disabled:null,direction:"both",translatable:{}},DIRECTION_BOTH:"both",DIRECTION_VERTICAL:"vertical",DIRECTION_HORIZONTAL:"horizontal",constructor:function(a){var b;this.sizeMonitors={};this.extraConstraint={};this.initialConfig=a;this.offset={x:0,y:0};this.listeners={dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",scope:this};if(a&&a.element){b=a.element;delete a.element;this.setElement(b)}return this},applyElement:function(a){if(!a){return}return Ext.get(a)},updateElement:function(a){a.on(this.listeners);this.sizeMonitors.element=new Ext.util.SizeMonitor({element:a,callback:this.doRefresh,scope:this});this.initConfig(this.initialConfig)},updateCls:function(a){this.getElement().addCls(a)},applyTranslatable:function(a,b){a=Ext.factory(a,Ext.util.Translatable,b);a.setElement(this.getElement());return a},setExtraConstraint:function(a){this.extraConstraint=a||{};this.refreshConstraint();return this},addExtraConstraint:function(a){Ext.merge(this.extraConstraint,a);this.refreshConstraint();return this},applyConstraint:function(b,a){this.currentConstraint=b;if(b==="container"){return Ext.merge(this.getContainerConstraint(),this.extraConstraint)}return Ext.merge({},this.extraConstraint,b)},updateConstraint:function(){this.refreshOffset()},getContainerConstraint:function(){var b=this.getContainer();if(!b){return{min:{x:-Infinity,y:-Infinity},max:{x:Infinity,y:Infinity}}}var g=this.getElement().dom,f=b.dom,c=g.offsetWidth,a=g.offsetHeight,e=f.offsetWidth,d=f.offsetHeight;return{min:{x:0,y:0},max:{x:e-c,y:d-a}}},getContainer:function(){var a=this.container;if(!a){a=this.getElement().getParent();if(a){this.sizeMonitors.container=new Ext.util.SizeMonitor({element:a,callback:this.doRefresh,scope:this});this.container=a}}return a},detachListeners:function(){this.getElement().un(this.listeners)},isAxisEnabled:function(a){var b=this.getDirection();if(a==="x"){return(b===this.DIRECTION_BOTH||b===this.DIRECTION_HORIZONTAL)}return(b===this.DIRECTION_BOTH||b===this.DIRECTION_VERTICAL)},onDragStart:function(a){if(this.getDisabled()){return false}var b=this.offset;this.fireAction("dragstart",[this,a,b.x,b.y],this.initDragStart)},initDragStart:function(b,c,a,d){this.dragStartOffset={x:a,y:d};this.isDragging=true;this.getElement().addCls(this.getDraggingCls())},onDrag:function(b){if(!this.isDragging){return}var a=this.dragStartOffset;this.fireAction("drag",[this,b,a.x+b.deltaX,a.y+b.deltaY],this.doDrag)},doDrag:function(b,c,a,d){b.setOffset(a,d)},onDragEnd:function(a){if(!this.isDragging){return}this.onDrag(a);this.isDragging=false;this.getElement().removeCls(this.getDraggingCls());this.fireEvent("dragend",this,a,this.offset.x,this.offset.y)},setOffset:function(i,h,b){var f=this.offset,a=this.getConstraint(),e=a.min,c=a.max,d=Math.min,g=Math.max;if(this.isAxisEnabled("x")&&typeof i=="number"){i=d(g(i,e.x),c.x)}else{i=f.x}if(this.isAxisEnabled("y")&&typeof h=="number"){h=d(g(h,e.y),c.y)}else{h=f.y}f.x=i;f.y=h;this.getTranslatable().translate(i,h,b)},getOffset:function(){return this.offset},refreshConstraint:function(){this.setConstraint(this.currentConstraint)},refreshOffset:function(){var a=this.offset;this.setOffset(a.x,a.y)},doRefresh:function(){this.refreshConstraint();this.getTranslatable().refresh();this.refreshOffset()},refresh:function(){var a=this.sizeMonitors;if(a.element){a.element.refresh()}if(a.container){a.container.refresh()}this.doRefresh()},enable:function(){return this.setDisabled(false)},disable:function(){return this.setDisabled(true)},destroy:function(){var b=this.sizeMonitors,a=this.getTranslatable();if(b.element){b.element.destroy()}if(b.container){b.container.destroy()}var c=this.getElement();if(c&&!c.isDestroyed){c.removeCls(this.getCls())}this.detachListeners();if(a){a.destroy()}}},function(){});Ext.define("Ext.behavior.Draggable",{extend:"Ext.behavior.Behavior",requires:["Ext.util.Draggable"],constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.draggable.refresh()},setConfig:function(c){var a=this.draggable,b=this.component;if(c){if(!a){b.setTranslatable(true);this.draggable=a=new Ext.util.Draggable(c);a.setTranslatable(b.getTranslatable());a.setElement(b.renderElement);a.on("destroy","onDraggableDestroy",this);if(b.isPainted()){this.onComponentPainted(b)}b.on(this.listeners)}else{if(Ext.isObject(c)){a.setConfig(c)}}}else{if(a){a.destroy()}}return this},getDraggable:function(){return this.draggable},onDraggableDestroy:function(){var a=this.component;delete this.draggable;a.un(this.listeners)},onComponentDestroy:function(){var a=this.draggable;if(a){a.destroy()}}});(function(a){Ext.define("Ext.Component",{extend:"Ext.AbstractComponent",alternateClassName:"Ext.lib.Component",mixins:["Ext.mixin.Traversable"],requires:["Ext.ComponentManager","Ext.XTemplate","Ext.dom.Element","Ext.behavior.Translatable","Ext.behavior.Draggable"],xtype:"component",observableType:"component",cachedConfig:{baseCls:null,cls:null,floatingCls:null,hiddenCls:a+"item-hidden",ui:null,margin:null,padding:null,border:null,styleHtmlCls:a+"html",styleHtmlContent:null},eventedConfig:{left:null,top:null,right:null,bottom:null,width:null,height:null,minWidth:null,minHeight:null,maxWidth:null,maxHeight:null,docked:null,centered:null,hidden:null,disabled:null},config:{style:null,html:null,draggable:null,translatable:null,renderTo:null,zIndex:null,tpl:null,enterAnimation:null,exitAnimation:null,showAnimation:null,hideAnimation:null,tplWriteMode:"overwrite",data:null,disabledCls:a+"item-disabled",contentEl:null,itemId:undefined,record:null,plugins:null},listenerOptionsRegex:/^(?:delegate|single|delay|buffer|args|prepend|element)$/,alignmentRegex:/^([a-z]+)-([a-z]+)(\?)?$/,isComponent:true,floating:false,rendered:false,dockPositions:{top:true,right:true,bottom:true,left:true},innerElement:null,element:null,template:[],constructor:function(c){var d=this,b=d.config,e;d.onInitializedListeners=[];d.initialConfig=c;if(c!==undefined&&"id" in c){e=c.id}else{if("id" in b){e=b.id}else{e=d.getId()}}d.id=e;d.setId(e);Ext.ComponentManager.register(d);d.initElement();d.initConfig(d.initialConfig);d.initialize();d.triggerInitialized();if("fullscreen" in d.config){d.fireEvent("fullscreen",d)}d.fireEvent("initialize",d)},beforeInitConfig:function(b){this.beforeInitialize.apply(this,arguments)},beforeInitialize:Ext.emptyFn,initialize:Ext.emptyFn,getTemplate:function(){return this.template},getElementConfig:function(){return{reference:"element",children:this.getTemplate()}},triggerInitialized:function(){var c=this.onInitializedListeners,d=c.length,e,b;if(!this.initialized){this.initialized=true;if(d>0){for(b=0;b<d;b++){e=c[b];e.fn.call(e.scope,this)}c.length=0}}},onInitialized:function(d,c){var b=this.onInitializedListeners;if(!c){c=this}if(this.initialized){d.call(c,this)}else{b.push({fn:d,scope:c})}},renderTo:function(b,d){var f=this.renderElement.dom,e=Ext.getDom(b),c=Ext.getDom(d);if(e){if(c){e.insertBefore(f,c)}else{e.appendChild(f)}this.setRendered(Boolean(f.offsetParent))}},setParent:function(c){var b=this.parent;if(c&&b&&b!==c){b.remove(this,false)}this.parent=c;return this},applyPlugins:function(b){var d,c,e;if(!b){return b}b=[].concat(b);for(c=0,d=b.length;c<d;c++){e=b[c];b[c]=Ext.factory(e,"Ext.plugin.Plugin",null,"plugin")}return b},updatePlugins:function(e,b){var d,c;if(e){for(c=0,d=e.length;c<d;c++){e[c].init(this)}}if(b){for(c=0,d=b.length;c<d;c++){Ext.destroy(b[c])}}},updateRenderTo:function(b){this.renderTo(b)},updateStyle:function(b){this.element.dom.style.cssText+=b},updateBorder:function(b){this.element.setBorder(b)},updatePadding:function(b){this.innerElement.setPadding(b)},updateMargin:function(b){this.element.setMargin(b)},updateUi:function(b,d){var c=this.getBaseCls();if(c){if(d){this.element.removeCls(d,c)}if(b){this.element.addCls(b,c)}}},applyBaseCls:function(b){return b||a+this.xtype},updateBaseCls:function(b,c){var d=this,e=d.getUi();if(b){this.element.addCls(b);if(e){this.element.addCls(b,null,e)}}if(c){this.element.removeCls(c);if(e){this.element.removeCls(c,null,e)}}},addCls:function(b,h,j){var e=this.getCls(),g=(e)?e.slice():[],f,d,c;h=h||"";j=j||"";if(typeof b=="string"){b=[b]}f=b.length;if(!g.length&&h===""&&j===""){g=b}else{for(d=0;d<f;d++){c=h+b[d]+j;if(g.indexOf(c)==-1){g.push(c)}}}this.setCls(g)},removeCls:function(b,g,h){var d=this.getCls(),f=(d)?d.slice():[],e,c;g=g||"";h=h||"";if(typeof b=="string"){f=Ext.Array.remove(f,g+b+h)}else{e=b.length;for(c=0;c<e;c++){f=Ext.Array.remove(f,g+b[c]+h)}}this.setCls(f)},replaceCls:function(e,j,d,h){var k=this.getCls(),f=(k)?k.slice():[],g,c,b;d=d||"";h=h||"";if(typeof e=="string"){f=Ext.Array.remove(f,d+e+h)}else{if(e){g=e.length;for(c=0;c<g;c++){f=Ext.Array.remove(f,d+e[c]+h)}}}if(typeof j=="string"){f.push(d+j+h)}else{if(j){g=j.length;if(!f.length&&d===""&&h===""){f=j}else{for(c=0;c<g;c++){b=d+j[c]+h;if(f.indexOf(b)==-1){f.push(b)}}}}}this.setCls(f)},applyCls:function(b){if(typeof b=="string"){b=[b]}if(!b||!b.length){b=null}return b},updateCls:function(c,b){this.element.replaceCls(b,c)},updateStyleHtmlCls:function(d,b){var e=this.innerHtmlElement,c=this.innerElement;if(this.getStyleHtmlContent()&&b){if(e){e.replaceCls(b,d)}else{c.replaceCls(b,d)}}},applyStyleHtmlContent:function(b){return Boolean(b)},updateStyleHtmlContent:function(d){var b=this.getStyleHtmlCls(),c=this.innerElement,e=this.innerHtmlElement;if(d){if(e){e.addCls(b)}else{c.addCls(b)}}else{if(e){e.removeCls(b)}else{c.addCls(b)}}},applyContentEl:function(b){if(b){return Ext.get(b)}},updateContentEl:function(b,c){if(c){c.hide();Ext.getBody().append(c)}if(b){this.setHtml(b.dom);b.show()}},getSize:function(){return{width:this.getWidth(),height:this.getHeight()}},isCentered:function(){return Boolean(this.getCentered())},isFloating:function(){return this.floating},isDocked:function(){return Boolean(this.getDocked())},isInnerItem:function(){var b=this;return !b.isCentered()&&!b.isFloating()&&!b.isDocked()},filterPositionValue:function(b){if(b===""||b==="auto"){b=null}return b},applyTop:function(b){return this.filterPositionValue(b)},applyRight:function(b){return this.filterPositionValue(b)},applyBottom:function(b){return this.filterPositionValue(b)},applyLeft:function(b){return this.filterPositionValue(b)},doSetTop:function(b){this.updateFloating();this.element.setTop(b)},doSetRight:function(b){this.updateFloating();this.element.setRight(b)},doSetBottom:function(b){this.updateFloating();this.element.setBottom(b)},doSetLeft:function(b){this.updateFloating();this.element.setLeft(b)},doSetWidth:function(b){this.element.setWidth(b)},doSetHeight:function(b){this.element.setHeight(b)},doSetMinWidth:function(b){this.element.setMinWidth(b)},doSetMinHeight:function(b){this.element.setMinHeight(b)},doSetMaxWidth:function(b){this.element.setMaxWidth(b)},doSetMaxHeight:function(b){this.element.setMaxHeight(b)},applyCentered:function(b){b=Boolean(b);if(b){if(this.isFloating()){this.resetFloating()}if(this.isDocked()){this.setDocked(false)}}return b},doSetCentered:Ext.emptyFn,applyDocked:function(b){if(b){if(!this.dockPositions[b]){return}if(this.isFloating()){this.resetFloating()}if(this.isCentered()){this.setCentered(false)}}return b},doSetDocked:Ext.emptyFn,resetFloating:function(){this.setTop(null);this.setRight(null);this.setBottom(null);this.setLeft(null)},updateFloating:function(){var c=true,b=this.getFloatingCls();if(this.getTop()===null&&this.getBottom()===null&&this.getRight()===null&&this.getLeft()===null){c=false}if(c!==this.floating){if(c){if(this.isCentered()){this.setCentered(false)}if(this.isDocked()){this.setDocked(false)}if(b){this.addCls(b)}}else{if(b){this.removeCls(b)}}this.floating=c;this.fireEvent("floatingchange",this,c)}},updateFloatingCls:function(b,c){if(this.isFloating()){this.replaceCls(c,b)}},applyDisabled:function(b){return Boolean(b)},doSetDisabled:function(b){this.element[b?"addCls":"removeCls"](this.getDisabledCls())},updateDisabledCls:function(b,c){if(this.isDisabled()){this.element.replaceCls(c,b)}},disable:function(){this.setDisabled(true)},enable:function(){this.setDisabled(false)},isDisabled:function(){return this.getDisabled()},applyZIndex:function(b){if(b!==null){b=Number(b);if(isNaN(b)){b=null}}return b},updateZIndex:function(c){var b=this.element.dom.style;if(c!==null){b.setProperty("z-index",c,"important")}else{b.removeProperty("z-index")}},getInnerHtmlElement:function(){var b=this.innerHtmlElement,c=this.getStyleHtmlCls();if(!b||!b.dom||!b.dom.parentNode){this.innerHtmlElement=b=this.innerElement.createChild({cls:"x-innerhtml "});if(this.getStyleHtmlContent()){this.innerHtmlElement.addCls(c);this.innerElement.removeCls(c)}}return b},updateHtml:function(b){var c=this.getInnerHtmlElement();if(Ext.isElement(b)){c.setHtml("");c.append(b)}else{c.setHtml(b)}},applyHidden:function(b){return Boolean(b)},doSetHidden:function(c){var b=this.renderElement;if(c){b.hide()}else{b.show()}if(this.element){this.element[c?"addCls":"removeCls"](this.getHiddenCls())}this.fireEvent(c?"hide":"show",this)},updateHiddenCls:function(b,c){if(this.isHidden()){this.element.replaceCls(c,b)}},isHidden:function(){return this.getHidden()},hide:function(b){if(!this.getHidden()){if(b===undefined||(b&&b.isComponent)){b=this.getHideAnimation()}if(b){if(b===true){b="fadeOut"}this.onBefore({hiddenchange:"animateFn",scope:this,single:true,args:[b]})}this.setHidden(true)}return this},show:function(c){var b=this.getHidden();if(b||b===null){if(c===undefined||(c&&!c.isComponent)){c=this.getShowAnimation()}if(c){if(c===true){c="fadeIn"}this.onBefore({hiddenchange:"animateFn",scope:this,single:true,args:[c]})}this.setHidden(false)}return this},animateFn:function(g,e,h,d,c,b){if(g){var f=new Ext.fx.Animation(g);f.setElement(e.element);if(h){f.setOnEnd(function(){b.resume()});b.pause()}Ext.Animator.run(f)}},setVisibility:function(b){this.renderElement.setVisibility(b)},isRendered:function(){return this.rendered},isPainted:function(){return this.renderElement.isPainted()},applyTpl:function(b){return(Ext.isObject(b)&&b.isTemplate)?b:new Ext.XTemplate(b)},applyData:function(b){if(Ext.isObject(b)){return Ext.apply({},b)}return b},updateData:function(d){var e=this;if(d){var c=e.getTpl(),b=e.getTplWriteMode();if(c){c[b](e.getInnerHtmlElement(),d)}this.fireEvent("updatedata",e,d)}},applyRecord:function(b){if(b&&Ext.isObject(b)&&b.isModel){return b}return null},updateRecord:function(c,b){var d=this;if(b){b.unjoin(d)}if(!c){d.updateData("")}else{c.join(d);d.updateData(c.getData(true))}},afterEdit:function(){this.updateRecord(this.getRecord())},afterErase:function(){this.setRecord(null)},applyItemId:function(b){return b||this.getId()},isXType:function(c,b){if(b){return this.xtypes.indexOf(c)!=-1}return Boolean(this.xtypesMap[c])},getXTypes:function(){return this.xtypesChain.join("/")},getDraggableBehavior:function(){var b=this.draggableBehavior;if(!b){b=this.draggableBehavior=new Ext.behavior.Draggable(this)}return b},applyDraggable:function(b){this.getDraggableBehavior().setConfig(b)},getDraggable:function(){return this.getDraggableBehavior().getDraggable()},getTranslatableBehavior:function(){var b=this.translatableBehavior;if(!b){b=this.translatableBehavior=new Ext.behavior.Translatable(this)}return b},applyTranslatable:function(b){this.getTranslatableBehavior().setConfig(b)},getTranslatable:function(){return this.getTranslatableBehavior().getTranslatable()},translateAxis:function(c,e,d){var b,f;if(c==="x"){b=e}else{f=e}return this.translate(b,f,d)},translate:function(){var b=this.getTranslatable();if(!b){this.setTranslatable(true);b=this.getTranslatable()}b.translate.apply(b,arguments)},setRendered:function(c){var b=this.rendered;if(c!==b){this.rendered=c;return true}return false},setSize:function(c,b){if(c!=undefined){this.setWidth(c)}if(b!=undefined){this.setHeight(b)}},doAddListener:function(d,f,e,c,b){if(c&&"element" in c){this[c.element].doAddListener(d,f,e||this,c,b)}return this.callParent(arguments)},doRemoveListener:function(d,f,e,c,b){if(c&&"element" in c){this[c.element].doRemoveListener(d,f,e||this,c,b)}return this.callParent(arguments)},showBy:function(d,f){var c=Ext.Array.from(arguments);var b=Ext.Viewport,e=this.getParent();this.setVisibility(false);if(e!==b){b.add(this)}this.show();this.on("erased","onShowByErased",this,{single:true});b.on("resize","refreshShowBy",this,{args:[d,f]});this.currentShowByArgs=c;this.alignTo(d,f);this.setVisibility(true)},refreshShowBy:function(b,c){this.alignTo(b,c)},onShowByErased:function(){Ext.Viewport.un("resize","refreshShowBy",this)},alignTo:function(o,j){var f=o.isComponent?o.renderElement:o,c=this.renderElement,q=f.getPageBox(),B=this.getParent().element.getPageBox(),n=c.getPageBox(),y=q.height,p=q.width,t=n.height,v=n.width;B.bottom-=5;B.height-=10;B.left+=5;B.right-=5;B.top+=5;B.width-=10;if(!j||j==="auto"){if(B.bottom-q.bottom<t){if(q.top-B.top<t){if(q.left-B.left<v){j="cl-cr?"}else{j="cr-cl?"}}else{j="bc-tc?"}}else{j="tc-bc?"}}var b=j.match(this.alignmentRegex);var w=b[1].split(""),d=b[2].split(""),z=(b[3]==="?"),i=w[0],u=w[1]||i,m=d[0],l=d[1]||m,r=q.top,e=q.left,k=y/2,g=p/2,h=v/2,s=t/2,x,A;switch(i){case"t":switch(m){case"c":r+=k;break;case"b":r+=y}break;case"b":switch(m){case"c":r-=(t-k);break;case"t":r-=t;break;case"b":r-=t-y}break;case"c":switch(m){case"t":r-=s;break;case"c":r-=(s-k);break;case"b":r-=(s-y)}break}switch(u){case"l":switch(l){case"c":e+=k;break;case"r":e+=p}break;case"r":switch(l){case"r":e-=(v-p);break;case"c":e-=(v-h);break;case"l":e-=v}break;case"c":switch(l){case"l":e-=h;break;case"c":e-=(h-g);break;case"r":e-=(h-p)}break}if(z){x=(B.left+B.width)-v;A=(B.top+B.height)-t;e=Math.max(B.left,Math.min(x,e));r=Math.max(B.top,Math.min(A,r))}this.setLeft(e);this.setTop(r)},up:function(c){var b=this.parent;if(c){for(;b;b=b.parent){if(Ext.ComponentQuery.is(b,c)){return b}}}return b},getBubbleTarget:function(){return this.getParent()},destroy:function(){this.destroy=Ext.emptyFn;var e=this.getParent(),c=this.referenceList,d,f,b;if(e){e.remove(this,false)}for(d=0,f=c.length;d<f;d++){b=c[d];this[b].destroy();delete this[b]}this.setRecord(null);Ext.destroy(this.innerHtmlElement,this.getTranslatable());Ext.ComponentManager.unregister(this);this.callParent()}},function(){})})(Ext.baseCSSPrefix);Ext.define("Ext.Button",{extend:"Ext.Component",xtype:"button",cachedConfig:{pressedCls:Ext.baseCSSPrefix+"button-pressing",badgeCls:Ext.baseCSSPrefix+"badge",hasBadgeCls:Ext.baseCSSPrefix+"hasbadge",labelCls:Ext.baseCSSPrefix+"button-label",iconMaskCls:Ext.baseCSSPrefix+"icon-mask"},config:{badgeText:null,text:null,iconCls:null,icon:null,iconAlign:"left",pressedDelay:0,iconMask:null,handler:null,scope:null,autoEvent:null,ui:"normal",baseCls:Ext.baseCSSPrefix+"button"},template:[{tag:"span",reference:"badgeElement",hidden:true},{tag:"span",className:Ext.baseCSSPrefix+"button-icon",reference:"iconElement",hidden:true},{tag:"span",reference:"textElement",hidden:true}],initialize:function(){this.callParent();this.element.on({scope:this,tap:"onTap",touchstart:"onPress",touchmove:"onTouchMove",touchend:"onRelease"})},updateBadgeText:function(c){var a=this.element,b=this.badgeElement;if(c){b.show();b.setText(c)}else{b.hide()}a[(c)?"addCls":"removeCls"](this.getHasBadgeCls())},updateText:function(b){var a=this.textElement;if(b){a.show();a.setHtml(b)}else{a.hide()}},updateHtml:function(b){var a=this.textElement;if(b){a.show();a.setHtml(b)}else{a.hide()}},updateBadgeCls:function(b,a){this.badgeElement.replaceCls(a,b)},updateHasBadgeCls:function(b,c){var a=this.element;if(a.hasCls(c)){a.replaceCls(c,b)}},updateLabelCls:function(b,a){this.textElement.replaceCls(a,b)},updatePressedCls:function(b,c){var a=this.element;if(a.hasCls(c)){a.replaceCls(c,b)}},updateIcon:function(b){var c=this,a=c.iconElement;if(b){c.showIconElement();a.setStyle("background-image",b?"url("+b+")":"");c.refreshIconAlign();c.refreshIconMask()}else{c.hideIconElement();c.setIconAlign(false)}},updateIconCls:function(c,a){var d=this,b=d.iconElement;if(c){d.showIconElement();b.replaceCls(a,c);d.refreshIconAlign();d.refreshIconMask()}else{d.hideIconElement();d.setIconAlign(false)}},updateIconAlign:function(d,c){var b=this.element,a=Ext.baseCSSPrefix+"iconalign-";if(!this.getText()){d="center"}b.removeCls(a+"center");b.removeCls(a+c);if(this.getIcon()||this.getIconCls()){b.addCls(a+d)}},refreshIconAlign:function(){this.updateIconAlign(this.getIconAlign())},updateIconMaskCls:function(c,b){var a=this.iconElement;if(this.getIconMask()){a.replaceCls(b,c)}},updateIconMask:function(a){this.iconElement[a?"addCls":"removeCls"](this.getIconMaskCls())},refreshIconMask:function(){this.updateIconMask(this.getIconMask())},applyAutoEvent:function(b){var a=this;if(typeof b=="string"){b={name:b,scope:a.scope||a}}return b},updateAutoEvent:function(c){var a=c.name,b=c.scope;this.setHandler(function(){b.fireEvent(a,b,this)});this.setScope(b)},hideIconElement:function(){this.iconElement.hide()},showIconElement:function(){this.iconElement.show()},applyUi:function(a){if(a&&Ext.isString(a)){var b=a.split("-");if(b&&(b[1]=="back"||b[1]=="forward")){return b}}return a},getUi:function(){var a=this._ui;if(Ext.isArray(a)){return a.join("-")}return a},applyPressedDelay:function(a){if(Ext.isNumber(a)){return a}return(a)?100:0},onPress:function(){var a=this.element,c=this.getPressedDelay(),b=this.getPressedCls();if(!this.getDisabled()){this.isPressed=true;if(this.hasOwnProperty("releasedTimeout")){clearTimeout(this.releasedTimeout);delete this.releasedTimeout}if(c>0){this.pressedTimeout=setTimeout(function(){if(a){a.addCls(b)}},c)}else{a.addCls(b)}}},onTouchMove:function(a){return},onRelease:function(a){this.fireAction("release",[this,a],"doRelease")},doRelease:function(a,b){if(!a.isPressed){return}a.isPressed=false;if(a.hasOwnProperty("pressedTimeout")){clearTimeout(a.pressedTimeout);delete a.pressedTimeout}a.releasedTimeout=setTimeout(function(){if(a&&a.element){a.element.removeCls(a.getPressedCls())}},10)},onTap:function(a){if(this.getDisabled()){return false}this.fireAction("tap",[this,a],"doTap")},doTap:function(c,d){var b=c.getHandler(),a=c.getScope()||c;if(!b){return}if(typeof b=="string"){b=a[b]}d.preventDefault();b.apply(a,arguments)}},function(){});Ext.define("Ext.Decorator",{extend:"Ext.Component",isDecorator:true,config:{component:{}},statics:{generateProxySetter:function(a){return function(c){var b=this.getComponent();b[a].call(b,c);return this}},generateProxyGetter:function(a){return function(){var b=this.getComponent();return b[a].call(b)}}},onClassExtended:function(c,e){if(!e.hasOwnProperty("proxyConfig")){return}var f=Ext.Class,i=e.proxyConfig,d=e.config;e.config=(d)?Ext.applyIf(d,i):i;var b,h,g,a;for(b in i){if(i.hasOwnProperty(b)){h=f.getConfigNameMap(b);g=h.set;a=h.get;e[g]=this.generateProxySetter(g);e[a]=this.generateProxyGetter(a)}}},applyComponent:function(a){return Ext.factory(a,Ext.Component)},updateComponent:function(a,b){if(b){if(this.isRendered()&&b.setRendered(false)){b.fireAction("renderedchange",[this,b,false],"doUnsetComponent",this,{args:[b]})}else{this.doUnsetComponent(b)}}if(a){if(this.isRendered()&&a.setRendered(true)){a.fireAction("renderedchange",[this,a,true],"doSetComponent",this,{args:[a]})}else{this.doSetComponent(a)}}},doUnsetComponent:function(a){if(a.renderElement.dom){this.innerElement.dom.removeChild(a.renderElement.dom)}},doSetComponent:function(a){if(a.renderElement.dom){this.innerElement.dom.appendChild(a.renderElement.dom)}},setRendered:function(b){var a;if(this.callParent(arguments)){a=this.getComponent();if(a){a.setRendered(b)}return true}return false},setDisabled:function(a){this.callParent(arguments);this.getComponent().setDisabled(a)},destroy:function(){Ext.destroy(this.getComponent());this.callParent()}});Ext.define("Ext.Img",{extend:"Ext.Component",xtype:["image","img"],config:{src:null,baseCls:Ext.baseCSSPrefix+"img",mode:"background"},beforeInitialize:function(){var a=this;a.onLoad=Ext.Function.bind(a.onLoad,a);a.onError=Ext.Function.bind(a.onError,a)},initialize:function(){var a=this;a.callParent();a.relayEvents(a.renderElement,"*");a.element.on({tap:"onTap",scope:a})},hide:function(){this.callParent();this.hiddenSrc=this.hiddenSrc||this.getSrc();this.setSrc(null)},show:function(){this.callParent();if(this.hiddenSrc){this.setSrc(this.hiddenSrc);delete this.hiddenSrc}},updateMode:function(a){if(a==="background"){if(this.imageElement){this.imageElement.destroy();delete this.imageElement;this.updateSrc(this.getSrc())}}else{this.imageElement=this.element.createChild({tag:"img"})}},onTap:function(a){this.fireEvent("tap",this,a)},onAfterRender:function(){this.updateSrc(this.getSrc())},updateSrc:function(a){var b=this,c;if(b.getMode()==="background"){c=this.imageObject||new Image()}else{c=b.imageElement.dom}this.imageObject=c;c.setAttribute("src",Ext.isString(a)?a:"");c.addEventListener("load",b.onLoad,false);c.addEventListener("error",b.onError,false)},detachListeners:function(){var a=this.imageObject;if(a){a.removeEventListener("load",this.onLoad,false);a.removeEventListener("error",this.onError,false)}},onLoad:function(a){this.detachListeners();if(this.getMode()==="background"){this.element.dom.style.backgroundImage='url("'+this.imageObject.src+'")'}this.fireEvent("load",this,a)},onError:function(a){this.detachListeners();this.fireEvent("error",this,a)},doSetWidth:function(b){var a=(this.getMode()==="background")?this.element:this.imageElement;a.setWidth(b);this.callParent(arguments)},doSetHeight:function(b){var a=(this.getMode()==="background")?this.element:this.imageElement;a.setHeight(b);this.callParent(arguments)},destroy:function(){this.detachListeners();Ext.destroy(this.imageObject);delete this.imageObject;this.callParent()}});Ext.define("Ext.Label",{extend:"Ext.Component",xtype:"label",config:{}});Ext.define("Ext.Map",{extend:"Ext.Component",xtype:"map",requires:["Ext.util.GeoLocation"],isMap:true,config:{baseCls:Ext.baseCSSPrefix+"map",useCurrentLocation:false,map:null,geo:null,mapOptions:{}},constructor:function(){this.callParent(arguments);this.options={};this.element.setVisibilityMode(Ext.Element.OFFSETS);if(!(window.google||{}).maps){this.setHtml("Google Maps API is required")}},initialize:function(){this.callParent();this.on({painted:"doResize",scope:this});this.element.on("touchstart","onTouchStart",this)},onTouchStart:function(a){a.makeUnpreventable()},applyMapOptions:function(a){return Ext.merge({},this.options,a)},updateMapOptions:function(c){var b=(window.google||{}).maps,a=this.getMap();if(b&&a){a.setOptions(c)}},getMapOptions:function(){return Ext.merge({},this.options)},updateUseCurrentLocation:function(a){this.setGeo(a);if(!a){this.renderMap()}},applyGeo:function(a){return Ext.factory(a,Ext.util.GeoLocation,this.getGeo())},updateGeo:function(b,a){var c={locationupdate:"onGeoUpdate",locationerror:"onGeoError",scope:this};if(a){a.un(c)}if(b){b.on(c);b.updateLocation()}},doResize:function(){var b=(window.google||{}).maps,a=this.getMap();if(b&&a){b.event.trigger(a,"resize")}},renderMap:function(){var d=this,f=(window.google||{}).maps,b=d.element,a=d.getMapOptions(),e=d.getMap(),c;if(f){if(Ext.os.is.iPad){Ext.merge({navigationControlOptions:{style:f.NavigationControlStyle.ZOOM_PAN}},a)}a=Ext.merge({zoom:12,mapTypeId:f.MapTypeId.ROADMAP},a);if(!a.hasOwnProperty("center")){a.center=new f.LatLng(37.381592,-122.135672)}if(b.dom.firstChild){Ext.fly(b.dom.firstChild).destroy()}if(e){f.event.clearInstanceListeners(e)}d.setMap(new f.Map(b.dom,a));e=d.getMap();c=f.event;c.addListener(e,"zoom_changed",Ext.bind(d.onZoomChange,d));c.addListener(e,"maptypeid_changed",Ext.bind(d.onTypeChange,d));c.addListener(e,"center_changed",Ext.bind(d.onCenterChange,d));d.fireEvent("maprender",d,e)}},onGeoUpdate:function(a){if(a){this.setMapCenter(new google.maps.LatLng(a.getLatitude(),a.getLongitude()))}},onGeoError:Ext.emptyFn,setMapCenter:function(d){var a=this,c=a.getMap(),b=(window.google||{}).maps;if(b){if(!a.isPainted()){a.un("painted","setMapCenter",this);a.on("painted","setMapCenter",this,{single:true,args:[d]});return}d=d||new b.LatLng(37.381592,-122.135672);if(d&&!(d instanceof b.LatLng)&&"longitude" in d){d=new b.LatLng(d.latitude,d.longitude)}if(!c){a.renderMap();c=a.getMap()}if(c&&d instanceof b.LatLng){c.panTo(d)}else{this.options=Ext.apply(this.getMapOptions(),{center:d})}}},onZoomChange:function(){var a=this.getMapOptions(),c=this.getMap(),b;b=(c&&c.getZoom)?c.getZoom():a.zoom||10;this.options=Ext.apply(a,{zoom:b});this.fireEvent("zoomchange",this,c,b)},onTypeChange:function(){var b=this.getMapOptions(),c=this.getMap(),a;a=(c&&c.getMapTypeId)?c.getMapTypeId():b.mapTypeId;this.options=Ext.apply(b,{mapTypeId:a});this.fireEvent("typechange",this,c,a)},onCenterChange:function(){var b=this.getMapOptions(),c=this.getMap(),a;a=(c&&c.getCenter)?c.getCenter():b.center;this.options=Ext.apply(b,{center:a});this.fireEvent("centerchange",this,c,a)},destroy:function(){Ext.destroy(this.getGeo());var a=this.getMap();if(a&&(window.google||{}).maps){google.maps.event.clearInstanceListeners(a)}this.callParent()}},function(){});Ext.define("Ext.Mask",{extend:"Ext.Component",xtype:"mask",config:{baseCls:Ext.baseCSSPrefix+"mask",transparent:false,top:0,left:0,right:0,bottom:0},initialize:function(){this.callParent();this.on({painted:"onPainted",erased:"onErased"})},onPainted:function(){this.element.on("*","onEvent",this)},onErased:function(){this.element.un("*","onEvent",this)},onEvent:function(b){var a=arguments[arguments.length-1];if(a.info.eventName==="tap"){this.fireEvent("tap",this,b);return false}if(b&&b.stopEvent){b.stopEvent()}return false},updateTransparent:function(a){this[a?"addCls":"removeCls"](this.getBaseCls()+"-transparent")}});Ext.define("Ext.LoadMask",{extend:"Ext.Mask",xtype:"loadmask",config:{message:"Loading...",messageCls:Ext.baseCSSPrefix+"mask-message",indicator:true,listeners:{painted:"onPainted",erased:"onErased"}},getTemplate:function(){var a=Ext.baseCSSPrefix;return[{reference:"innerElement",cls:a+"mask-inner",children:[{reference:"indicatorElement",cls:a+"loading-spinner-outer",children:[{cls:a+"loading-spinner",children:[{tag:"span",cls:a+"loading-top"},{tag:"span",cls:a+"loading-right"},{tag:"span",cls:a+"loading-bottom"},{tag:"span",cls:a+"loading-left"}]}]},{reference:"messageElement"}]}]},updateMessage:function(a){this.messageElement.setHtml(a)},updateMessageCls:function(b,a){this.messageElement.replaceCls(a,b)},updateIndicator:function(a){this[a?"removeCls":"addCls"](Ext.baseCSSPrefix+"indicator-hidden")},onPainted:function(){this.getParent().on({scope:this,resize:this.refreshPosition});this.refreshPosition()},onErased:function(){this.getParent().un({scope:this,resize:this.refreshPosition})},refreshPosition:function(){var c=this.getParent(),d=c.getScrollable(),a=(d)?d.getScroller():null,f=(a)?a.position:{x:0,y:0},e=c.element.getSize(),b=this.element.getSize();this.innerElement.setStyle({marginTop:Math.round(e.height-b.height+(f.y*2))+"px",marginLeft:Math.round(e.width-b.width+f.x)+"px"})}},function(){});Ext.define("Ext.Media",{extend:"Ext.Component",xtype:"media",config:{url:"",enableControls:Ext.os.is.Android?false:true,autoResume:false,autoPause:true,preload:true,loop:false,media:null,playing:false,volume:1,muted:false},initialize:function(){var a=this;a.callParent();a.on({scope:a,activate:a.onActivate,deactivate:a.onDeactivate});a.addMediaListener({play:"onPlay",pause:"onPause",ended:"onEnd",volumechange:"onVolumeChange",timeupdate:"onTimeUpdate"})},addMediaListener:function(d,b){var c=this,e=c.media.dom,f=Ext.Function.bind;if(!Ext.isObject(d)){var a=d;d={};d[a]=b}Ext.Object.each(d,function(h,g){if(typeof g!=="function"){g=c[g]}if(typeof g=="function"){g=f(g,c);e.addEventListener(h,g)}})},onPlay:function(){this.fireEvent("play",this)},onPause:function(){this.fireEvent("pause",this,this.getCurrentTime())},onEnd:function(){this.fireEvent("ended",this,this.getCurrentTime())},onVolumeChange:function(){this.fireEvent("volumechange",this,this.media.dom.volume)},onTimeUpdate:function(){this.fireEvent("timeupdate",this,this.getCurrentTime())},isPlaying:function(){return this.getPlaying()},onActivate:function(){var a=this;if(a.getAutoResume()&&!a.isPlaying()){a.play()}},onDeactivate:function(){var a=this;if(a.getAutoResume()&&a.isPlaying()){a.pause()}},updateUrl:function(a){var b=this.media.dom;b.src=a;b.load();if(this.getPlaying()){this.play()}},updateEnableControls:function(a){this.media.dom.controls=a?"controls":false},updateLoop:function(a){this.media.dom.loop=a?"loop":false},play:function(){this.media.dom.play();this.setPlaying(true)},pause:function(){this.media.dom.pause();this.setPlaying(false)},toggle:function(){if(this.isPlaying()){this.pause()}else{this.play()}},stop:function(){var a=this;a.setCurrentTime(0);a.fireEvent("stop",a);a.pause()},updateVolume:function(a){this.media.dom.volume=a},updateMuted:function(a){this.fireEvent("mutedchange",this,a);this.media.dom.muted=a},getCurrentTime:function(){return this.media.dom.currentTime},setCurrentTime:function(a){this.media.dom.currentTime=a;return a},getDuration:function(){return this.media.dom.duration},destroy:function(){var a=this;Ext.Object.each(event,function(c,b){if(typeof b!=="function"){b=a[b]}if(typeof b=="function"){b=bind(b,a);dom.removeEventListener(c,b)}})}});Ext.define("Ext.Audio",{extend:"Ext.Media",xtype:"audio",config:{cls:Ext.baseCSSPrefix+"audio"},onActivate:function(){var a=this;a.callParent();if(Ext.os.is.Phone){a.element.show()}},onDeactivate:function(){var a=this;a.callParent();if(Ext.os.is.Phone){a.element.hide()}},template:[{reference:"media",preload:"auto",tag:"audio",cls:Ext.baseCSSPrefix+"component"}]});Ext.define("Ext.Spacer",{extend:"Ext.Component",alias:"widget.spacer",config:{},constructor:function(a){a=a||{};if(!a.width){a.flex=1}this.callParent([a])}});Ext.define("Ext.Title",{extend:"Ext.Component",xtype:"title",config:{baseCls:"x-title",title:""},updateTitle:function(a){this.setHtml(a)}});Ext.define("Ext.Video",{extend:"Ext.Media",xtype:"video",config:{posterUrl:null,cls:Ext.baseCSSPrefix+"video"},template:[{reference:"ghost",classList:[Ext.baseCSSPrefix+"video-ghost"]},{tag:"video",reference:"media",classList:[Ext.baseCSSPrefix+"media"]}],initialize:function(){var a=this;a.callParent();a.media.hide();a.onBefore({erased:"onErased",scope:a});a.ghost.on({tap:"onGhostTap",scope:a});a.media.on({pause:"onPause",scope:a});if(Ext.os.is.Android4||Ext.os.is.iPad){this.isInlineVideo=true}},applyUrl:function(a){return[].concat(a)},updateUrl:function(f){var c=this,e=c.media,g=f.length,d=e.query("source"),b=d.length,a;for(a=0;a<b;a++){Ext.fly(d[a]).destroy()}for(a=0;a<g;a++){e.appendChild(Ext.Element.create({tag:"source",src:f[a]}))}if(c.getPlaying()){c.play()}},onErased:function(){this.pause();this.media.setTop(-2000);this.ghost.show()},onGhostTap:function(){var a=this,c=this.media,b=this.ghost;c.show();if(Ext.os.is.Android2){setTimeout(function(){a.play();setTimeout(function(){c.hide()},10)},10)}else{b.hide();a.play();setTimeout(function(){a.play()},10)}},onPause:function(){this.callParent(arguments);if(!this.isInlineVideo){this.media.setTop(-2000);this.ghost.show()}},onPlay:function(){this.callParent(arguments);this.media.setTop(0)},updatePosterUrl:function(b){var a=this.ghost;if(a){a.setStyle("background-image","url("+b+")")}}});Ext.define("Ext.carousel.Indicator",{extend:"Ext.Component",xtype:"carouselindicator",alternateClassName:"Ext.Carousel.Indicator",config:{baseCls:Ext.baseCSSPrefix+"carousel-indicator",direction:"horizontal"},initialize:function(){this.callParent();this.indicators=[];this.element.on({tap:"onTap",scope:this})},updateDirection:function(a,c){var b=this.getBaseCls();this.element.replaceCls(c,a,b);if(a==="horizontal"){this.setBottom(0);this.setRight(null)}else{this.setRight(0);this.setBottom(null)}},addIndicator:function(){this.indicators.push(this.element.createChild({tag:"span"}))},removeIndicator:function(){var a=this.indicators;if(a.length>0){a.pop().destroy()}},setActiveIndex:function(b){var e=this.indicators,d=this.activeIndex,a=e[d],f=e[b],c=this.getBaseCls();if(a){a.removeCls(c,null,"active")}if(f){f.addCls(c,null,"active")}this.activeIndex=b;return this},onTap:function(f){var g=f.touch,a=this.element.getPageBox(),d=a.left+(a.width/2),b=a.top+(a.height/2),c=this.getDirection();if((c==="horizontal"&&g.pageX>=d)||(c==="vertical"&&g.pageY>=b)){this.fireEvent("next",this)}else{this.fireEvent("previous",this)}},destroy:function(){var d=this.indicators,b,c,a;for(b=0,c=d.length;b<c;b++){a=d[b];a.destroy()}d.length=0;this.callParent()}});Ext.define("Ext.carousel.Item",{extend:"Ext.Decorator",config:{baseCls:"x-carousel-item",component:null,translatable:true}});Ext.define("Ext.dataview.IndexBar",{extend:"Ext.Component",alternateClassName:"Ext.IndexBar",config:{baseCls:Ext.baseCSSPrefix+"indexbar",direction:"vertical",letters:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ui:"alphabet",listPrefix:null},itemCls:Ext.baseCSSPrefix+"",updateDirection:function(a,c){var b=this.getBaseCls();this.element.replaceCls(b+"-"+c,b+"-"+a)},getElementConfig:function(){return{reference:"wrapper",classList:["x-centered","x-indexbar-wrapper"],children:[this.callParent()]}},updateLetters:function(c){this.innerElement.setHtml("");if(c){var b=c.length,a;for(a=0;a<b;a++){this.innerElement.createChild({html:c[a]})}}},updateListPrefix:function(a){if(a&&a.length){this.innerElement.createChild({html:a},0)}},initialize:function(){this.callParent();this.innerElement.on({touchstart:this.onTouchStart,touchend:this.onTouchEnd,touchmove:this.onTouchMove,scope:this})},onTouchStart:function(b,a){b.stopPropagation();this.innerElement.addCls(this.getBaseCls()+"-pressed");this.pageBox=this.innerElement.getPageBox();this.onTouchMove(b)},onTouchEnd:function(b,a){this.innerElement.removeCls(this.getBaseCls()+"-pressed")},onTouchMove:function(c){var a=Ext.util.Point.fromEvent(c),b,d=this.pageBox;if(!d){d=this.pageBox=this.el.getPageBox()}if(this.getDirection()==="vertical"){if(a.y>d.bottom||a.y<d.top){return}b=Ext.Element.fromPoint(d.left+(d.width/2),a.y)}else{if(a.x>d.right||a.x<d.left){return}b=Ext.Element.fromPoint(a.x,d.top+(d.height/2))}if(b){this.fireEvent("index",this,b.dom.innerHTML,b)}},destroy:function(){var c=this,d=Array.prototype.slice.call(c.innerElement.dom.childNodes),b=d.length,a=0;for(;a<b;a++){Ext.removeNode(d[a])}this.callParent()}},function(){});Ext.define("Ext.dataview.ListItemHeader",{extend:"Ext.Component",xtype:"listitemheader",config:{baseCls:Ext.baseCSSPrefix+"list-header",docked:"top"}});Ext.define("Ext.dataview.element.Container",{extend:"Ext.Component",doInitialize:function(){this.element.on({touchstart:"onItemTouchStart",touchend:"onItemTouchEnd",tap:"onItemTap",taphold:"onItemTapHold",touchmove:"onItemTouchMove",doubletap:"onItemDoubleTap",swipe:"onItemSwipe",delegate:"> div",scope:this})},initialize:function(){this.callParent();this.doInitialize()},updateBaseCls:function(a,b){var c=this;c.callParent([a+"-container",b])},onItemTouchStart:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);Ext.get(c).on({touchmove:"onItemTouchMove",scope:b,single:true});b.fireEvent("itemtouchstart",b,Ext.get(c),a,d)},onItemTouchEnd:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);Ext.get(c).un({touchmove:"onItemTouchMove",scope:b});b.fireEvent("itemtouchend",b,Ext.get(c),a,d)},onItemTouchMove:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtouchmove",b,Ext.get(c),a,d)},onItemTap:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtap",b,Ext.get(c),a,d)},onItemTapHold:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemtaphold",b,Ext.get(c),a,d)},onItemDoubleTap:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemdoubletap",b,Ext.get(c),a,d)},onItemSwipe:function(d){var b=this,c=d.getTarget(),a=b.getViewItems().indexOf(c);b.fireEvent("itemswipe",b,Ext.get(c),a,d)},updateListItem:function(b,d){var c=this,a=c.dataview,e=a.prepareData(b.getData(true),a.getStore().indexOf(b),b);d.innerHTML=c.dataview.getItemTpl().apply(e)},addListItem:function(e,c){var h=this,d=h.dataview,a=d.prepareData(c.getData(true),d.getStore().indexOf(c),c),b=h.element,i=b.dom.childNodes,g=i.length,f;f=Ext.Element.create(this.getItemElementConfig(e,a));if(!g||e==g){f.appendTo(b)}else{f.insertBefore(i[e])}},getItemElementConfig:function(c,e){var b=this.dataview,d=b.getItemCls(),a=b.getBaseCls()+"-item";if(d){a+=" "+d}return{cls:a,html:b.getItemTpl().apply(e)}},doRemoveItemCls:function(a){var d=this.getViewItems(),c=d.length,b=0;for(;b<c;b++){Ext.fly(d[b]).removeCls(a)}},doAddItemCls:function(a){var d=this.getViewItems(),c=d.length,b=0;for(;b<c;b++){Ext.fly(d[b]).addCls(a)}},moveItemsToCache:function(f,e){var d=this,a=d.getViewItems(),b=e-f,c;for(;b>=0;b--){c=a[f+b];c.parentNode.removeChild(c)}if(d.getViewItems().length==0){this.dataview.showEmptyText()}},moveItemsFromCache:function(d){var g=this,b=g.dataview,c=b.getStore(),f=d.length,e,a;if(f){b.hideEmptyText()}for(e=0;e<f;e++){d[e]._tmpIndex=c.indexOf(d[e])}Ext.Array.sort(d,function(i,h){return i._tmpIndex>h._tmpIndex?1:-1});for(e=0;e<f;e++){a=d[e];g.addListItem(a._tmpIndex,a);delete a._tmpIndex}},getViewItems:function(){return Array.prototype.slice.call(this.element.dom.childNodes)},destroy:function(){var c=this.getViewItems(),b=c.length,a=0;for(;a<b;a++){Ext.removeNode(c[a])}this.callParent()}});Ext.define("Ext.dataview.element.List",{extend:"Ext.dataview.element.Container",updateBaseCls:function(a){var b=this;b.itemClsShortCache=a+"-item";b.headerClsShortCache=a+"-header";b.headerClsCache="."+b.headerClsShortCache;b.headerItemClsShortCache=a+"-header-item";b.footerClsShortCache=a+"-footer-item";b.footerClsCache="."+b.footerClsShortCache;b.labelClsShortCache=a+"-item-label";b.labelClsCache="."+b.labelClsShortCache;b.disclosureClsShortCache=a+"-disclosure";b.disclosureClsCache="."+b.disclosureClsShortCache;b.iconClsShortCache=a+"-icon";b.iconClsCache="."+b.iconClsShortCache;this.callParent(arguments)},hiddenDisplayCache:Ext.baseCSSPrefix+"hidden-display",getItemElementConfig:function(e,h){var f=this,c=f.dataview,g=c.getItemCls(),b=f.itemClsShortCache,d,a;if(g){b+=" "+g}d={cls:b,children:[{cls:f.labelClsShortCache,html:c.getItemTpl().apply(h)}]};if(c.getIcon()){a=h.iconSrc;d.children.push({cls:f.iconClsShortCache,style:"background-image: "+a?'url("'+newSrc+'")':""})}if(c.getOnItemDisclosure()){d.children.push({cls:f.disclosureClsShortCache+((h.disclosure===false)?f.hiddenDisplayCache:"")})}return d},updateListItem:function(b,j){var g=this,c=g.dataview,i=Ext.fly(j),f=i.down(g.labelClsCache,true),a=b.data,d=a&&a.hasOwnProperty("disclosure"),k=a&&a.hasOwnProperty("iconSrc"),e,h;f.innerHTML=c.getItemTpl().apply(a);if(d&&c.getOnItemDisclosure()){e=i.down(g.disclosureClsCache);e[d?"removeCls":"addCls"](g.hiddenDisplayCache)}if(c.getIcon()){h=i.down(g.iconClsCache,true);h.style.backgroundImage=k?'url("'+k+'")':""}},doRemoveHeaders:function(){var e=this,a=e.headerItemClsShortCache,b=e.element.query(e.headerClsCache),f=b.length,c=0,d;for(;c<f;c++){d=b[c];Ext.fly(d.parentNode).removeCls(a);Ext.removeNode(d)}},doRemoveFooterCls:function(){var d=this,c=d.footerClsShortCache,a=d.element.query(d.footerClsCache),e=a.length,b=0;for(;b<e;b++){Ext.fly(a[b]).removeCls(c)}},doAddHeader:function(b,a){b=Ext.fly(b);b.insertFirst(Ext.Element.create({cls:this.headerClsShortCache,html:a}));b.addCls(this.headerItemClsShortCache)},destroy:function(){this.doRemoveHeaders();this.callParent()}});Ext.define("Ext.event.publisher.ComponentDelegation",{extend:"Ext.event.publisher.Publisher",requires:["Ext.Component","Ext.ComponentQuery"],targetType:"component",optimizedSelectorRegex:/^#([\w\-]+)((?:[\s]*)>(?:[\s]*)|(?:\s*))([\w\-]+)$/i,handledEvents:["*"],getSubscribers:function(b,a){var d=this.subscribers,c=d[b];if(!c&&a){c=d[b]={type:{$length:0},selector:[],$length:0}}return c},subscribe:function(g,f){if(this.idSelectorRegex.test(g)){return false}var e=g.match(this.optimizedSelectorRegex),a=this.getSubscribers(f,true),k=a.type,c=a.selector,d,i,j,b,h;if(e!==null){d=e[1];i=e[2].indexOf(">")===-1;j=e[3];b=k[j];if(!b){k[j]=b={descendents:{$length:0},children:{$length:0},$length:0}}h=i?b.descendents:b.children;if(h.hasOwnProperty(d)){h[d]++;return true}h[d]=1;h.$length++;b.$length++;k.$length++}else{if(c.hasOwnProperty(g)){c[g]++;return true}c[g]=1;c.push(g)}a.$length++;return true},unsubscribe:function(g,f,k){var a=this.getSubscribers(f);if(!a){return false}var e=g.match(this.optimizedSelectorRegex),l=a.type,c=a.selector,d,i,j,b,h;k=Boolean(k);if(e!==null){d=e[1];i=e[2].indexOf(">")===-1;j=e[3];b=l[j];if(!b){return true}h=i?b.descendents:b.children;if(!h.hasOwnProperty(d)||(!k&&--h[d]>0)){return true}delete h[d];h.$length--;b.$length--;l.$length--}else{if(!c.hasOwnProperty(g)||(!k&&--c[g]>0)){return true}delete c[g];Ext.Array.remove(c,g)}if(--a.$length===0){delete this.subscribers[f]}return true},notify:function(d,a){var c=this.getSubscribers(a),e,b;if(!c||c.$length===0){return false}e=d.substr(1);b=Ext.ComponentManager.get(e);if(b){this.dispatcher.doAddListener(this.targetType,d,a,"publish",this,{args:[a,b]},"before")}},matchesSelector:function(b,a){return Ext.ComponentQuery.is(b,a)},dispatch:function(d,b,c,a){this.dispatcher.doDispatchEvent(this.targetType,d,b,c,null,a)},publish:function(g,k){var e=this.getSubscribers(g);if(!e){return}var p=arguments[arguments.length-1],o=e.type,b=e.selector,d=Array.prototype.slice.call(arguments,2,-2),l=k.xtypesChain,s,n,t,a,m,v,r,u,h,f,q,c;for(u=0,h=l.length;u<h;u++){f=l[u];e=o[f];if(e&&e.$length>0){s=e.descendents;if(s.$length>0){if(!a){a=k.getAncestorIds()}for(q=0,c=a.length;q<c;q++){m=a[q];if(s.hasOwnProperty(m)){this.dispatch("#"+m+" "+f,g,d,p)}}}n=e.children;if(n.$length>0){if(!t){if(a){t=a[0]}else{v=k.getParent();if(v){t=v.getId()}}}if(t){if(n.hasOwnProperty(t)){this.dispatch("#"+t+" > "+f,g,d,p)}}}}}h=b.length;if(h>0){for(u=0;u<h;u++){r=b[u];if(this.matchesSelector(k,r)){this.dispatch(r,g,d,p)}}}}});Ext.define("Ext.field.Input",{extend:"Ext.Component",xtype:"input",tag:"input",cachedConfig:{cls:Ext.baseCSSPrefix+"form-field",focusCls:Ext.baseCSSPrefix+"field-focus",maskCls:Ext.baseCSSPrefix+"field-mask",useMask:"auto",type:"text",checked:false},config:{baseCls:Ext.baseCSSPrefix+"field-input",name:null,value:null,isFocused:false,tabIndex:null,placeHolder:null,minValue:null,maxValue:null,stepValue:null,maxLength:null,autoComplete:null,autoCapitalize:null,autoCorrect:null,readOnly:null,maxRows:null,startValue:false},getTemplate:function(){var a=[{reference:"input",tag:this.tag},{reference:"clearIcon",cls:"x-clear-icon"}];a.push({reference:"mask",classList:[this.config.maskCls]});return a},initElement:function(){var a=this;a.callParent();a.input.on({scope:a,keyup:"onKeyUp",focus:"onFocus",blur:"onBlur",paste:"onPaste"});a.mask.on({tap:"onMaskTap",scope:a});if(a.clearIcon){a.clearIcon.on({tap:"onClearIconTap",scope:a})}},applyUseMask:function(a){if(a==="auto"){a=Ext.os.is.iOS&&Ext.os.version.lt("5")}return Boolean(a)},updateUseMask:function(a){this.mask[a?"show":"hide"]()},updateFieldAttribute:function(b,c){var a=this.input;if(c){a.dom.setAttribute(b,c)}else{a.dom.removeAttribute(b)}},updateCls:function(b,a){this.input.addCls(Ext.baseCSSPrefix+"input-el");this.input.replaceCls(a,b)},updateType:function(a,c){var b=Ext.baseCSSPrefix+"input-";this.input.replaceCls(b+c,b+a);this.updateFieldAttribute("type",a)},updateName:function(a){this.updateFieldAttribute("name",a)},getValue:function(){var a=this.input;if(a){this._value=a.dom.value}return this._value},applyValue:function(a){return(Ext.isEmpty(a))?"":a},updateValue:function(b){var a=this.input;if(a){a.dom.value=b}},setValue:function(a){this.updateValue(this.applyValue(a));return this},updateTabIndex:function(a){this.updateFieldAttribute("tabIndex",a)},testAutoFn:function(a){return[true,"on"].indexOf(a)!==-1},updateMaxLength:function(a){this.updateFieldAttribute("maxlength",a)},updatePlaceHolder:function(a){this.updateFieldAttribute("placeholder",a)},applyAutoComplete:function(a){return this.testAutoFn(a)},updateAutoComplete:function(a){var b=a?"on":"off";this.updateFieldAttribute("autocomplete",b)},applyAutoCapitalize:function(a){return this.testAutoFn(a)},updateAutoCapitalize:function(b){var a=b?"on":"off";this.updateFieldAttribute("autocapitalize",a)},applyAutoCorrect:function(a){return this.testAutoFn(a)},updateAutoCorrect:function(a){var b=a?"on":"off";this.updateFieldAttribute("autocorrect",b)},updateMinValue:function(a){this.updateFieldAttribute("min",a)},updateMaxValue:function(a){this.updateFieldAttribute("max",a)},updateStepValue:function(a){this.updateFieldAttribute("step",a)},checkedRe:/^(true|1|on)/i,getChecked:function(){var a=this.input,b;if(a){b=a.dom.checked;this._checked=b}return b},applyChecked:function(a){return !!this.checkedRe.test(String(a))},setChecked:function(a){this.updateChecked(this.applyChecked(a));this._checked=a},updateChecked:function(a){this.input.dom.checked=a},updateReadOnly:function(a){this.updateFieldAttribute("readonly",a)},updateMaxRows:function(a){this.updateFieldAttribute("rows",a)},doSetDisabled:function(a){this.callParent(arguments);this.input.dom.disabled=a;if(!a){this.blur()}},isDirty:function(){if(this.getDisabled()){return false}return String(this.getValue())!==String(this.originalValue)},reset:function(){this.setValue(this.originalValue)},onMaskTap:function(a){this.fireAction("masktap",[this,a],"doMaskTap")},doMaskTap:function(a,b){if(a.getDisabled()){return false}a.maskCorrectionTimer=Ext.defer(a.showMask,1000,a);a.hideMask()},showMask:function(a){if(this.mask){this.mask.setStyle("display","block")}},hideMask:function(a){if(this.mask){this.mask.setStyle("display","none")}},focus:function(){var b=this,a=b.input;if(a&&a.dom.focus){a.dom.focus()}return b},blur:function(){var b=this,a=this.input;if(a&&a.dom.blur){a.dom.blur()}return b},select:function(){var b=this,a=b.input;if(a&&a.dom.setSelectionRange){a.dom.setSelectionRange(0,9999)}return b},onFocus:function(a){this.fireAction("focus",[a],"doFocus")},doFocus:function(b){var a=this;if(a.mask){if(a.maskCorrectionTimer){clearTimeout(a.maskCorrectionTimer)}a.hideMask()}if(!a.getIsFocused()){a.setIsFocused(true);a.setStartValue(a.getValue())}},onBlur:function(a){this.fireAction("blur",[a],"doBlur")},doBlur:function(d){var b=this,c=b.getValue(),a=b.getStartValue();b.setIsFocused(false);if(String(c)!=String(a)){b.onChange(b,c,a)}b.showMask()},onClearIconTap:function(c){var a=this.getValue(),b;this.fireEvent("clearicontap",this,c);b=this.getValue();if(String(b)!=String(a)){this.onChange(this,b,a)}if(Ext.os.is.Android){this.focus()}},onClick:function(a){this.fireEvent("click",a)},onChange:function(b,c,a){this.fireEvent("change",b,c,a)},onKeyUp:function(a){this.fireEvent("keyup",a)},onPaste:function(a){this.fireEvent("paste",a)},onMouseDown:function(a){this.fireEvent("mousedown",a)}});Ext.define("Ext.field.Field",{extend:"Ext.Decorator",alternateClassName:"Ext.form.Field",xtype:"field",requires:["Ext.field.Input"],isField:true,isFormField:true,config:{baseCls:Ext.baseCSSPrefix+"field",label:null,labelAlign:"left",labelWidth:"30%",clearIcon:null,required:false,inputType:null,name:null,value:null,tabIndex:null},cachedConfig:{labelCls:null,requiredCls:Ext.baseCSSPrefix+"field-required",inputCls:null},getElementConfig:function(){var a=Ext.baseCSSPrefix;return{reference:"element",className:"x-container",children:[{reference:"label",cls:a+"form-label",children:[{reference:"labelspan",tag:"span"}]},{reference:"innerElement",cls:a+"component-outer"}]}},updateLabel:function(b,d){var a=this.renderElement,c=Ext.baseCSSPrefix;if(b){this.labelspan.setHtml(b);a.addCls(c+"field-labeled")}else{a.removeCls(c+"field-labeled")}},updateLabelAlign:function(b,c){var a=this.renderElement,d=Ext.baseCSSPrefix;if(b){a.addCls(d+"label-align-"+b);if(b=="top"){this.label.setWidth("100%")}else{this.updateLabelWidth(this.getLabelWidth())}}if(c){a.removeCls(d+"label-align-"+c)}},updateLabelCls:function(a,b){if(a){this.label.addCls(a)}if(b){this.label.removeCls(b)}},updateLabelWidth:function(a){if(a){if(this.getLabelAlign()=="top"){this.label.setWidth("100%")}else{this.label.setWidth(a)}}},updateRequired:function(a){this.renderElement[a?"addCls":"removeCls"](this.getRequiredCls())},updateRequiredCls:function(a,b){if(this.getRequired()){this.renderElement.replaceCls(b,a)}},initialize:function(){var a=this;a.callParent();a.doInitValue()},doInitValue:function(){this.originalValue=this.getInitialConfig().value},reset:function(){this.setValue(this.originalValue);return this},isDirty:function(){return false}},function(){});Ext.define("Ext.field.Checkbox",{extend:"Ext.field.Field",alternateClassName:"Ext.form.Checkbox",xtype:"checkboxfield",qsaLeftRe:/[\[]/g,qsaRightRe:/[\]]/g,isCheckbox:true,config:{ui:"checkbox",value:"",checked:false,tabIndex:-1,component:{xtype:"input",type:"checkbox",useMask:true,cls:Ext.baseCSSPrefix+"input-checkbox"}},initialize:function(){var a=this;a.callParent();a.getComponent().on({scope:a,order:"before",masktap:"onMaskTap"})},doInitValue:function(){var a=this,b=a.getInitialConfig();if(b.hasOwnProperty("value")){a.originalState=b.value}if(b.hasOwnProperty("checked")){a.originalState=b.checked}a.callParent(arguments)},updateInputType:function(a){var b=this.getComponent();if(b){b.setType(a)}},updateName:function(a){var b=this.getComponent();if(b){b.setName(a)}},getChecked:function(){this._checked=this.getComponent().getChecked();return this._checked},getValue:function(){return this.getChecked()},setValue:function(a){return this.setChecked(a)},setChecked:function(a){this.updateChecked(a);this._checked=a},updateChecked:function(a){this.getComponent().setChecked(a)},onMaskTap:function(a,c){var b=this,d=a.input.dom;if(b.getDisabled()){return false}d.checked=!d.checked;if(b.getChecked()){b.fireEvent("check",b,c)}else{b.fireEvent("uncheck",b,c)}return false},doChecked:Ext.emptyFn,doUnChecked:Ext.emptyFn,isChecked:function(){return this.getChecked()},check:function(){return this.setChecked(true)},uncheck:function(){return this.setChecked(false)},getSameGroupFields:function(){var j=this.up("formpanel")||this.up("fieldset"),b=this.getName(),g=this.qsaLeftRe,c=this.qsaRightRe,f=[],a,d,e,h;if(!j){return null}b=b.replace(g,"\\[");b=b.replace(c,"\\]");a=Ext.query("[name="+b+"]",j.element.dom);h=a.length;for(e=0;e<h;e++){d=a[e];d=Ext.fly(d).up(".x-field-"+d.getAttribute("type"));if(d&&d.id){f.push(Ext.getCmp(d.id))}}return f},getGroupValues:function(){var a=[];this.getSameGroupFields().forEach(function(b){if(b.getChecked()){a.push(b.getValue())}});return a},setGroupValues:function(a){this.getSameGroupFields().forEach(function(b){b.setChecked((a.indexOf(b.getValue())!==-1))});return this},resetGroupValues:function(){this.getSameGroupFields().forEach(function(a){a.setChecked(a.originalState)});return this},reset:function(){this.setChecked(this.originalState);return this}});Ext.define("Ext.field.Hidden",{extend:"Ext.field.Field",alternateClassName:"Ext.form.Hidden",xtype:"hiddenfield",config:{component:{xtype:"input",type:"hidden"},ui:"hidden",hidden:true,tabIndex:-1}});Ext.define("Ext.field.Radio",{extend:"Ext.field.Checkbox",xtype:"radiofield",alternateClassName:"Ext.form.Radio",isRadio:true,config:{ui:"radio",component:{type:"radio",cls:Ext.baseCSSPrefix+"input-radio"}},getValue:function(){return this._value},setValue:function(a){this._value=a;return this},getGroupValue:function(){var a=this.getSameGroupFields(),c=a.length,b=0,d;for(;b<c;b++){d=a[b];if(d.getChecked()){return d.getValue()}}return null},setGroupValue:function(d){var a=this.getSameGroupFields(),c=a.length,b=0,e;for(;b<c;b++){e=a[b];if(e.getValue()===d){e.setChecked(true);return e}}}});Ext.define("Ext.field.Text",{extend:"Ext.field.Field",xtype:"textfield",alternateClassName:"Ext.form.Text",config:{ui:"text",clearIcon:true,placeHolder:null,maxLength:null,autoComplete:null,autoCapitalize:null,autoCorrect:null,readOnly:null,component:{xtype:"input",type:"text"}},initialize:function(){var a=this;a.callParent();a.getComponent().on({scope:this,keyup:"onKeyUp",change:"onChange",focus:"onFocus",blur:"onBlur",paste:"onPaste",mousedown:"onMouseDown",clearicontap:"onClearIconTap"});a.originalValue=a.originalValue||"";a.getComponent().originalValue=a.originalValue;a.syncEmptyCls()},syncEmptyCls:function(){var b=(this._value)?this._value.length:false,a=Ext.baseCSSPrefix+"empty";if(b){this.removeCls(a)}else{this.addCls(a)}},updateValue:function(b){var a=this.getComponent();if(a){a.setValue(b)}this[b?"showClearIcon":"hideClearIcon"]();this.syncEmptyCls()},getValue:function(){var a=this;a._value=a.getComponent().getValue();a.syncEmptyCls();return a._value},updatePlaceHolder:function(a){this.getComponent().setPlaceHolder(a)},updateMaxLength:function(a){this.getComponent().setMaxLength(a)},updateAutoComplete:function(a){this.getComponent().setAutoComplete(a)},updateAutoCapitalize:function(a){this.getComponent().setAutoCapitalize(a)},updateAutoCorrect:function(a){this.getComponent().setAutoCorrect(a)},updateReadOnly:function(a){if(a){this.hideClearIcon()}else{this.showClearIcon()}this.getComponent().setReadOnly(a)},updateInputType:function(a){var b=this.getComponent();if(b){b.setType(a)}},updateName:function(a){var b=this.getComponent();if(b){b.setName(a)}},updateTabIndex:function(b){var a=this.getComponent();if(a){a.setTabIndex(b)}},updateInputCls:function(a,b){var c=this.getComponent();if(c){c.replaceCls(b,a)}},doSetDisabled:function(b){var c=this;c.callParent(arguments);var a=c.getComponent();if(a){a.setDisabled(b)}if(b){c.hideClearIcon()}else{c.showClearIcon()}},showClearIcon:function(){var a=this;if(!a.getDisabled()&&!a.getReadOnly()&&a.getValue()&&a.getClearIcon()){a.element.addCls(Ext.baseCSSPrefix+"field-clearable")}return a},hideClearIcon:function(){if(this.getClearIcon()){this.element.removeCls(Ext.baseCSSPrefix+"field-clearable")}},onKeyUp:function(a){this.fireAction("keyup",[this,a],"doKeyUp")},doKeyUp:function(a,c){var b=a.getValue();a[b?"showClearIcon":"hideClearIcon"]();if(c.browserEvent.keyCode===13){a.fireAction("action",[a,c],"doAction")}},doAction:function(){this.blur()},onClearIconTap:function(a){this.fireAction("clearicontap",[this,a],"doClearIconTap")},doClearIconTap:function(a,b){a.setValue("");a.getValue()},onChange:function(b,c,a){b.fireEvent("change",this,c,a)},onFocus:function(a){this.isFocused=true;this.fireEvent("focus",this,a)},onBlur:function(b){var a=this;this.isFocused=false;a.fireEvent("blur",a,b);setTimeout(function(){a.isFocused=false},50)},onPaste:function(a){this.fireEvent("paste",this,a)},onMouseDown:function(a){this.fireEvent("mousedown",this,a)},focus:function(){this.getComponent().focus();return this},blur:function(){this.getComponent().blur();return this},select:function(){this.getComponent().select();return this},reset:function(){this.getComponent().reset();this.getValue();this[this._value?"showClearIcon":"hideClearIcon"]()},isDirty:function(){var a=this.getComponent();if(a){return a.isDirty()}return false}});Ext.define("Ext.field.Email",{extend:"Ext.field.Text",alternateClassName:"Ext.form.Email",xtype:"emailfield",config:{component:{type:"email"},autoCapitalize:false}});Ext.define("Ext.field.Number",{extend:"Ext.field.Text",xtype:"numberfield",alternateClassName:"Ext.form.Number",config:{component:{type:"number"},ui:"number"},proxyConfig:{minValue:null,maxValue:null,stepValue:null},applyValue:function(b){var a=this.getMinValue(),c=this.getMaxValue();if(Ext.isNumber(a)){b=Math.max(b,a)}if(Ext.isNumber(c)){b=Math.min(b,c)}return parseFloat(b)},getValue:function(){var a=this.callParent();return parseFloat(a||0)},doClearIconTap:function(a,b){a.setValue(0)}});Ext.define("Ext.field.Password",{extend:"Ext.field.Text",xtype:"passwordfield",alternateClassName:"Ext.form.Password",config:{autoCapitalize:false,component:{type:"password"}}});Ext.define("Ext.field.Search",{extend:"Ext.field.Text",xtype:"searchfield",alternateClassName:"Ext.form.Search",config:{component:{type:"search"},ui:"search"}});Ext.define("Ext.field.Spinner",{extend:"Ext.field.Number",xtype:"spinnerfield",alternateClassName:"Ext.form.Spinner",requires:["Ext.util.TapRepeater"],config:{cls:Ext.baseCSSPrefix+"spinner",minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,increment:0.1,accelerateOnTapHold:true,cycle:false,clearIcon:false,defaultValue:0,tabIndex:-1,component:{disabled:true}},constructor:function(){this.callParent(arguments);if(!this.getValue()){this.setValue(this.getDefaultValue())}},syncEmptyCls:Ext.emptyFn,updateComponent:function(c){this.callParent(arguments);var b=this.innerElement,a=this.getCls();if(c){this.spinDownButton=Ext.Element.create({cls:a+"-button "+a+"-button-down",html:"-"});b.insertFirst(this.spinDownButton);this.spinUpButton=Ext.Element.create({cls:a+"-button "+a+"-button-up",html:"+"});b.appendChild(this.spinUpButton);this.downRepeater=this.createRepeater(this.spinDownButton,this.onSpinDown);this.upRepeater=this.createRepeater(this.spinUpButton,this.onSpinUp)}},applyValue:function(a){a=parseFloat(a);if(isNaN(a)||a===null){a=this.getDefaultValue()}a=Math.round(a*10)/10;return this.callParent([a])},createRepeater:function(c,b){var d=this,a=Ext.create("Ext.util.TapRepeater",{el:c,accelerate:d.getAccelerateOnTapHold()});a.on({tap:b,touchstart:"onTouchStart",touchend:"onTouchEnd",scope:d});return a},onSpinDown:function(){if(!this.getDisabled()){this.spin(true)}},onSpinUp:function(){if(!this.getDisabled()){this.spin(false)}},onTouchStart:function(a){if(!this.getDisabled()){a.getEl().addCls(Ext.baseCSSPrefix+"button-pressed")}},onTouchEnd:function(a){a.getEl().removeCls(Ext.baseCSSPrefix+"button-pressed")},spin:function(h){var c=this,b=c.getValue(),a=c.getIncrement(),g=h?"down":"up",e=c.getMinValue(),f=c.getMaxValue(),d;if(h){d=b-a}else{d=b+a}if(c.getCycle()){if(b==e&&d<e){d=f}if(b==f&&d>f){d=e}}c.setValue(d);d=c.getValue();c.fireEvent("spin",c,d,g);c.fireEvent("spin"+g,c,d)},doSetDisabled:function(a){Ext.Component.prototype.doSetDisabled.apply(this,arguments)},setDisabled:function(){Ext.Component.prototype.setDisabled.apply(this,arguments)},reset:function(){this.setValue(this.getDefaultValue())},destroy:function(){var a=this;Ext.destroy(a.downRepeater,a.upRepeater,a.spinDownButton,a.spinUpButton);a.callParent(arguments)}},function(){});Ext.define("Ext.field.TextAreaInput",{extend:"Ext.field.Input",xtype:"textareainput",tag:"textarea"});Ext.define("Ext.field.TextArea",{extend:"Ext.field.Text",xtype:"textareafield",requires:["Ext.field.TextAreaInput"],alternateClassName:"Ext.form.TextArea",config:{ui:"textarea",autoCapitalize:false,component:{xtype:"textareainput"},maxRows:null},updateMaxRows:function(a){this.getComponent().setMaxRows(a)},doSetHeight:function(a){this.callParent(arguments);var b=this.getComponent();b.input.setHeight(a)},doSetWidth:function(b){this.callParent(arguments);var a=this.getComponent();a.input.setWidth(b)},doKeyUp:function(a){var b=a.getValue();a[b?"showClearIcon":"hideClearIcon"]()}});Ext.define("Ext.field.Url",{extend:"Ext.field.Text",xtype:"urlfield",alternateClassName:"Ext.form.Url",config:{autoCapitalize:false,component:{type:"url"}}});Ext.define("Ext.plugin.ListPaging",{extend:"Ext.Component",alias:"plugin.listpaging",config:{autoPaging:false,loadMoreText:"Load More...",noMoreRecordsText:"No More Records",loadTpl:['<div class="{cssPrefix}loading-spinner" style="font-size: 180%; margin: 10px auto;">','<span class="{cssPrefix}loading-top"></span>','<span class="{cssPrefix}loading-right"></span>','<span class="{cssPrefix}loading-bottom"></span>','<span class="{cssPrefix}loading-left"></span>',"</div>",'<div class="{cssPrefix}list-paging-msg">{message}</div>'].join(""),loadMoreCmp:{xtype:"component",baseCls:Ext.baseCSSPrefix+"list-paging"},loadMoreCmpAdded:false,loadingCls:Ext.baseCSSPrefix+"loading",list:null,scroller:null,loading:false},init:function(c){var a=c.getScrollable().getScroller(),b=c.getStore();this.setList(c);this.setScroller(a);this.bindStore(c.getStore());if(b){this.disableDataViewMask(b)}c.updateStore=Ext.Function.createInterceptor(c.updateStore,this.bindStore,this);if(this.getAutoPaging()){a.on({scrollend:this.onScrollEnd,scope:this})}},bindStore:function(a,b){if(b){b.un({load:this.onStoreLoad,beforeload:this.onStoreBeforeLoad,scope:this})}if(a){a.on({load:this.onStoreLoad,beforeload:this.onStoreBeforeLoad,scope:this})}},disableDataViewMask:function(a){var b=this.getList();if(a.isAutoLoading()){b.setLoadingText(null)}else{a.on({load:{single:true,fn:function(){b.setLoadingText(null)}}})}},applyLoadTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},applyLoadMoreCmp:function(a){a=Ext.merge(a,{html:this.getLoadTpl().apply({cssPrefix:Ext.baseCSSPrefix,message:this.getLoadMoreText()}),listeners:{tap:{fn:this.loadNextPage,scope:this,element:"element"}}});return Ext.factory(a,Ext.Component,this.getLoadMoreCmp())},onScrollEnd:function(b,a,c){if(!this.getLoading()&&c>=b.maxPosition.y){if(!this.storeFullyLoaded()){this.loadNextPage()}}},updateLoading:function(a){var b=this.getLoadMoreCmp(),c=this.getLoadingCls();if(a){b.addCls(c)}else{b.removeCls(c)}},onStoreBeforeLoad:function(a){if(a.getCount()===0){this.getLoadMoreCmp().hide()}},onStoreLoad:function(a){var d=this.addLoadMoreCmp(),b=this.getLoadTpl(),c=this.storeFullyLoaded()?this.getNoMoreRecordsText():this.getLoadMoreText();this.getLoadMoreCmp().show();this.setLoading(false);if(this.scrollY){this.getScroller().scrollTo(null,this.scrollY);delete this.scrollY}d.setHtml(b.apply({cssPrefix:Ext.baseCSSPrefix,message:c}))},addLoadMoreCmp:function(){var b=this.getList(),a=this.getLoadMoreCmp();if(!this.getLoadMoreCmpAdded()){b.add(a);this.setLoadMoreCmpAdded(true)}return a},storeFullyLoaded:function(){var a=this.getList().getStore(),b=a.getTotalCount();return b!==null?a.getTotalCount()<=(a.currentPage*a.getPageSize()):false},loadNextPage:function(){var a=this.getList().getStore();this.setLoading(true);this.scrollY=this.getScroller().position.y;a.nextPage({addRecords:true})}});Ext.define("Ext.plugin.PullRefresh",{extend:"Ext.Component",alias:"plugin.pullrefresh",requires:["Ext.DateExtras"],config:{list:null,pullRefreshText:"Pull down to refresh...",releaseRefreshText:"Release to refresh...",loadingText:"Loading...",snappingAnimationDuration:150,refreshFn:null,pullTpl:['<div class="x-list-pullrefresh">','<div class="x-list-pullrefresh-arrow"></div>','<div class="x-loading-spinner">','<span class="x-loading-top"></span>','<span class="x-loading-right"></span>','<span class="x-loading-bottom"></span>','<span class="x-loading-left"></span>',"</div>",'<div class="x-list-pullrefresh-wrap">','<h3 class="x-list-pullrefresh-message">{message}</h3>','<div class="x-list-pullrefresh-updated">Last Updated: <span>{lastUpdated:date("m/d/Y h:iA")}</span></div>',"</div>","</div>"].join("")},isRefreshing:false,currentViewState:"",initialize:function(){this.callParent();this.on({painted:"onPainted",scope:this})},init:function(f){var d=this,b=f.getStore(),e=d.getPullTpl(),c=d.element,a=f.getScrollable().getScroller();d.setList(f);d.lastUpdated=new Date();f.insert(0,d);if(b){if(b.isAutoLoading()){f.setLoadingText(null)}else{b.on({load:{single:true,fn:function(){f.setLoadingText(null)}}})}}e.overwrite(c,{message:d.getPullRefreshText(),lastUpdated:d.lastUpdated},true);d.loadingElement=c.getFirstChild();d.messageEl=c.down(".x-list-pullrefresh-message");d.updatedEl=c.down(".x-list-pullrefresh-updated > span");d.maxScroller=a.getMaxPosition();a.on({maxpositionchange:d.setMaxScroller,scroll:d.onScrollChange,scope:d})},fetchLatest:function(){var b=this.getList().getStore(),c=b.getProxy(),a;a=Ext.create("Ext.data.Operation",{page:1,start:0,model:b.getModel(),limit:b.getPageSize(),action:"read",filters:b.getRemoteFilter()?b.getFilters():[]});c.read(a,this.onLatestFetched,this)},onLatestFetched:function(d){var j=this.getList().getStore(),b=j.getData(),c=d.getRecords(),a=c.length,g=[],h,f,e;for(e=0;e<a;e++){h=c[e];f=b.getByKey(h.getId());if(f){f.set(h.getData())}else{g.push(h)}f=undefined}j.insert(0,g)},onPainted:function(){this.pullHeight=this.loadingElement.getHeight()},setMaxScroller:function(b,a){this.maxScroller=a},onScrollChange:function(b,a,c){if(c<0){this.onBounceTop(c)}if(c>this.maxScroller.y){this.onBounceBottom(c)}},applyPullTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},onBounceTop:function(d){var b=this,c=b.getList(),a=c.getScrollable().getScroller();if(!b.isReleased){if(!b.isRefreshing&&-d>=b.pullHeight+10){b.isRefreshing=true;b.setViewState("release");a.getContainer().onBefore({dragend:"onScrollerDragEnd",single:true,scope:b})}else{if(b.isRefreshing&&-d<b.pullHeight+10){b.isRefreshing=false;b.setViewState("pull")}}}},onScrollerDragEnd:function(){var b=this;if(b.isRefreshing){var c=b.getList(),a=c.getScrollable().getScroller();a.minPosition.y=-b.pullHeight;a.on({scrollend:"loadStore",single:true,scope:b});b.isReleased=true}},loadStore:function(){var b=this,c=b.getList(),a=c.getScrollable().getScroller();b.setViewState("loading");b.isReleased=false;Ext.defer(function(){a.on({scrollend:function(){if(b.getRefreshFn()){b.getRefreshFn().call(b,b)}else{b.fetchLatest()}b.resetRefreshState()},delay:100,single:true,scope:b});a.minPosition.y=0;a.scrollTo(null,0,true)},500,b)},onBounceBottom:Ext.emptyFn,setViewState:function(d){var b=this,c=Ext.baseCSSPrefix,e=b.messageEl,a=b.loadingElement;if(d===b.currentViewState){return b}b.currentViewState=d;if(e&&a){switch(d){case"pull":e.setHtml(b.getPullRefreshText());a.removeCls([c+"list-pullrefresh-release",c+"list-pullrefresh-loading"]);break;case"release":e.setHtml(b.getReleaseRefreshText());a.addCls(c+"list-pullrefresh-release");break;case"loading":e.setHtml(b.getLoadingText());a.addCls(c+"list-pullrefresh-loading");break}}return b},resetRefreshState:function(){var a=this;a.isRefreshing=false;a.lastUpdated=new Date();a.setViewState("pull");a.updatedEl.setHtml(Ext.util.Format.date(a.lastUpdated,"m/d/Y h:iA"))}});Ext.define("Ext.scroll.indicator.Abstract",{extend:"Ext.Component",config:{baseCls:"x-scroll-indicator",axis:"x",value:0,length:null,hidden:true,ui:"dark"},cachedConfig:{ratio:1,barCls:"x-scroll-bar",active:true},barElement:null,barLength:0,gapLength:0,getElementConfig:function(){return{reference:"barElement",children:[this.callParent()]}},applyRatio:function(a){if(isNaN(a)){a=1}return a},refresh:function(){var f=this.barElement,e=f.dom,c=this.getRatio(),b=this.getAxis(),a=(b==="x")?e.offsetWidth:e.offsetHeight,d=a*c;this.barLength=a;this.gapLength=a-d;this.setLength(d);this.updateValue(this.getValue())},updateBarCls:function(a){this.barElement.addCls(a)},updateAxis:function(a){this.element.addCls(this.getBaseCls(),null,a);this.barElement.addCls(this.getBarCls(),null,a)},updateValue:function(a){this.setOffset(this.gapLength*a)},updateActive:function(a){this.barElement[a?"addCls":"removeCls"]("active")},doSetHidden:function(a){var b=this.element.dom.style;if(a){b.opacity="0"}else{b.opacity=""}},updateLength:function(c){var b=this.getAxis(),a=this.element;if(b==="x"){a.setWidth(c)}else{a.setHeight(c)}},setOffset:function(c){var b=this.getAxis(),a=this.element;if(b==="x"){a.setLeft(c)}else{a.setTop(c)}}});Ext.define("Ext.scroll.indicator.CssTransform",{extend:"Ext.scroll.indicator.Abstract",config:{cls:"csstransform"},getElementConfig:function(){var a=this.callParent();a.children[0].children=[{reference:"startElement"},{reference:"middleElement"},{reference:"endElement"}];return a},refresh:function(){var d=this.getAxis(),c=this.startElement.dom,a=this.endElement.dom,e=this.middleElement,b,f;if(d==="x"){b=c.offsetWidth;f=a.offsetWidth;e.setLeft(b)}else{b=c.offsetHeight;f=a.offsetHeight;e.setTop(b)}this.startElementLength=b;this.endElementLength=f;this.minLength=b+f;this.callParent()},applyLength:function(a){return Math.round(Math.max(this.minLength,a))},updateLength:function(c){var b=this.getAxis(),a=this.endElement.dom.style,e=this.middleElement.dom.style,d=this.endElementLength,g=c-d,f=g-this.startElementLength;if(b==="x"){a.webkitTransform="translate3d("+g+"px, 0, 0)";e.webkitTransform="translate3d(0, 0, 0) scaleX("+f+")"}else{a.webkitTransform="translate3d(0, "+g+"px, 0)";e.webkitTransform="translate3d(0, 0, 0) scaleY("+f+")"}},updateValue:function(f){var b=this.barLength,c=this.gapLength,d=this.getLength(),e,g,a;if(f<=0){g=0;this.updateLength(this.applyLength(d+f*b))}else{if(f>=1){a=Math.round((f-1)*b);e=this.applyLength(d-a);a=d-e;this.updateLength(e);g=c+a}else{g=c*f}}this.setOffset(g)},setOffset:function(c){var a=this.getAxis(),b=this.element.dom.style;c=Math.round(c);if(a==="x"){b.webkitTransform="translate3d("+c+"px, 0, 0)"}else{b.webkitTransform="translate3d(0, "+c+"px, 0)"}}});Ext.define("Ext.scroll.indicator.Default",{extend:"Ext.scroll.indicator.Abstract",config:{cls:"default"},setOffset:function(c){var b=this.getAxis(),a=this.element.dom.style;if(b==="x"){a.webkitTransform="translate3d("+c+"px, 0, 0)"}else{a.webkitTransform="translate3d(0, "+c+"px, 0)"}},applyLength:function(a){return Math.round(Math.max(0,a))},updateValue:function(f){var b=this.barLength,c=this.gapLength,d=this.getLength(),e,g,a;if(f<=0){g=0;this.updateLength(this.applyLength(d+f*b))}else{if(f>=1){a=Math.round((f-1)*b);e=this.applyLength(d-a);a=d-e;this.updateLength(e);g=c+a}else{g=c*f}}this.setOffset(g)}});Ext.define("Ext.scroll.indicator.ScrollPosition",{extend:"Ext.scroll.indicator.Abstract",config:{cls:"scrollposition"},getElementConfig:function(){var a=this.callParent(arguments);a.children.unshift({className:"x-scroll-bar-stretcher"});return a},updateValue:function(a){if(this.gapLength===0){if(a>1){a=a-1}this.setOffset(this.barLength*a)}else{this.setOffset(this.gapLength*a)}},setLength:function(e){var c=this.getAxis(),a=this.barLength,d=this.barElement.dom,b=this.element;this.callParent(arguments);if(c==="x"){d.scrollLeft=a;b.setLeft(a)}else{d.scrollTop=a;b.setTop(a)}},setOffset:function(d){var b=this.getAxis(),a=this.barLength,c=this.barElement.dom;d=a-d;if(b==="x"){c.scrollLeft=d}else{c.scrollTop=d}}});Ext.define("Ext.scroll.Indicator",{requires:["Ext.scroll.indicator.Default","Ext.scroll.indicator.ScrollPosition","Ext.scroll.indicator.CssTransform"],alternateClassName:"Ext.util.Indicator",constructor:function(a){if(Ext.os.is.Android2||Ext.browser.is.ChromeMobile){return new Ext.scroll.indicator.ScrollPosition(a)}else{if(Ext.os.is.iOS){return new Ext.scroll.indicator.CssTransform(a)}else{return new Ext.scroll.indicator.Default(a)}}}});Ext.define("Ext.scroll.View",{extend:"Ext.Evented",alternateClassName:"Ext.util.ScrollView",requires:["Ext.scroll.Scroller","Ext.scroll.Indicator"],config:{indicatorsUi:"dark",element:null,scroller:{},indicators:{x:{axis:"x"},y:{axis:"y"}},indicatorsHidingDelay:100,cls:Ext.baseCSSPrefix+"scroll-view"},processConfig:function(c){if(!c){return null}if(typeof c=="string"){c={direction:c}}c=Ext.merge({},c);var a=c.scroller,b;if(!a){c.scroller=a={}}for(b in c){if(c.hasOwnProperty(b)){if(!this.hasConfig(b)){a[b]=c[b];delete c[b]}}}return c},constructor:function(a){a=this.processConfig(a);this.useIndicators={x:true,y:true};this.doHideIndicators=Ext.Function.bind(this.doHideIndicators,this);this.initConfig(a)},setConfig:function(a){return this.callParent([this.processConfig(a)])},updateIndicatorsUi:function(a){var b=this.getIndicators();b.x.setUi(a);b.y.setUi(a)},applyScroller:function(a,b){return Ext.factory(a,Ext.scroll.Scroller,b)},applyIndicators:function(b,d){var a=Ext.scroll.Indicator,c=this.useIndicators;if(!b){b={}}if(!b.x){c.x=false;b.x={}}if(!b.y){c.y=false;b.y={}}return{x:Ext.factory(b.x,a,d&&d.x),y:Ext.factory(b.y,a,d&&d.y)}},updateIndicators:function(a){this.indicatorsGrid=Ext.Element.create({className:"x-scroll-bar-grid-wrapper",children:[{className:"x-scroll-bar-grid",children:[{children:[{},{children:[a.y.barElement]}]},{children:[{children:[a.x.barElement]},{}]}]}]})},updateScroller:function(a){a.on({scope:this,scrollstart:"onScrollStart",scroll:"onScroll",scrollend:"onScrollEnd",refresh:"refreshIndicators"})},isAxisEnabled:function(a){return this.getScroller().isAxisEnabled(a)&&this.useIndicators[a]},applyElement:function(a){if(a){return Ext.get(a)}},updateElement:function(c){var b=c.getFirstChild().getFirstChild(),a=this.getScroller();c.addCls(this.getCls());c.insertFirst(this.indicatorsGrid);a.setElement(b);this.refreshIndicators();return this},showIndicators:function(){var a=this.getIndicators();if(this.hasOwnProperty("indicatorsHidingTimer")){clearTimeout(this.indicatorsHidingTimer);delete this.indicatorsHidingTimer}if(this.isAxisEnabled("x")){a.x.show()}if(this.isAxisEnabled("y")){a.y.show()}},hideIndicators:function(){var a=this.getIndicatorsHidingDelay();if(a>0){this.indicatorsHidingTimer=setTimeout(this.doHideIndicators,a)}else{this.doHideIndicators()}},doHideIndicators:function(){var a=this.getIndicators();if(this.isAxisEnabled("x")){a.x.hide()}if(this.isAxisEnabled("y")){a.y.hide()}},onScrollStart:function(){this.onScroll.apply(this,arguments);this.showIndicators()},onScrollEnd:function(){this.hideIndicators()},onScroll:function(b,a,c){this.setIndicatorValue("x",a);this.setIndicatorValue("y",c)},setIndicatorValue:function(b,f){if(!this.isAxisEnabled(b)){return this}var a=this.getScroller(),c=a.getMaxPosition()[b],e=a.getContainerSize()[b],d;if(c===0){d=f/e;if(f>=0){d+=1}}else{if(f>c){d=1+((f-c)/e)}else{if(f<0){d=f/e}else{d=f/c}}}this.getIndicators()[b].setValue(d)},refreshIndicator:function(d){if(!this.isAxisEnabled(d)){return this}var a=this.getScroller(),b=this.getIndicators()[d],e=a.getContainerSize()[d],f=a.getSize()[d],c=e/f;b.setRatio(c);b.refresh()},refresh:function(){return this.getScroller().refresh()},refreshIndicators:function(){var a=this.getIndicators();a.x.setActive(this.isAxisEnabled("x"));a.y.setActive(this.isAxisEnabled("y"));this.refreshIndicator("x");this.refreshIndicator("y")},destroy:function(){var a=this.getElement(),b=this.getIndicators();if(a&&!a.isDestroyed){a.removeCls(this.getCls())}b.x.destroy();b.y.destroy();Ext.destroy(this.getScroller(),this.indicatorsGrid);delete this.indicatorsGrid;this.callParent(arguments)}});Ext.define("Ext.behavior.Scrollable",{extend:"Ext.behavior.Behavior",requires:["Ext.scroll.View"],constructor:function(){this.listeners={painted:"onComponentPainted",scope:this};this.callParent(arguments)},onComponentPainted:function(){this.scrollView.refresh()},setConfig:function(d){var b=this.scrollView,c=this.component,f,e,a;if(d){if(!b){this.scrollView=b=new Ext.scroll.View(d);b.on("destroy","onScrollViewDestroy",this);c.setUseBodyElement(true);this.scrollerElement=a=c.innerElement;this.scrollContainer=e=a.wrap();this.scrollViewElement=f=c.bodyElement;b.setElement(f);if(c.isPainted()){this.onComponentPainted(c)}c.on(this.listeners)}else{if(Ext.isObject(d)){b.setConfig(d)}}}else{if(b){b.destroy()}}return this},getScrollView:function(){return this.scrollView},onScrollViewDestroy:function(){var b=this.component,a=this.scrollerElement;if(!a.isDestroyed){this.scrollerElement.unwrap()}this.scrollContainer.destroy();b.un(this.listeners);delete this.scrollerElement;delete this.scrollView;delete this.scrollContainer},onComponentDestroy:function(){var a=this.scrollView;if(a){a.destroy()}}});Ext.define("Ext.Container",{extend:"Ext.Component",alternateClassName:"Ext.lib.Container",requires:["Ext.layout.Layout","Ext.ItemCollection","Ext.behavior.Scrollable","Ext.Mask"],xtype:"container",eventedConfig:{activeItem:0},config:{layout:null,control:{},defaults:null,items:null,autoDestroy:true,defaultType:null,scrollable:null,useBodyElement:null,masked:null,modal:null,hideOnMaskTap:null},isContainer:true,delegateListeners:{delegate:"> component",centeredchange:"onItemCenteredChange",dockedchange:"onItemDockedChange",floatingchange:"onItemFloatingChange"},constructor:function(a){var b=this;b._items=b.items=new Ext.ItemCollection();b.innerItems=[];b.onItemAdd=b.onFirstItemAdd;b.callParent(arguments)},getElementConfig:function(){return{reference:"element",className:"x-container",children:[{reference:"innerElement",className:"x-inner"}]}},applyMasked:function(a,b){b=Ext.factory(a,Ext.Mask,b);if(b){this.add(b)}return b},mask:function(a){this.setMasked(a||true)},unmask:function(){this.setMasked(false)},applyModal:function(a,b){if(!a&&!b){return}return Ext.factory(a,Ext.Mask,b)},updateModal:function(c,a){var b={painted:"refreshModalMask",erased:"destroyModalMask"};if(c){this.on(b);c.on("destroy","onModalDestroy",this);if(this.getTop()===null&&this.getBottom()===null&&this.getRight()===null&&this.getLeft()===null&&!this.getCentered()){this.setTop(0);this.setLeft(0)}if(this.isPainted()){this.refreshModalMask()}}else{if(a){a.un("destroy","onModalDestroy",this);this.un(b)}}},onModalDestroy:function(){this.setModal(null)},refreshModalMask:function(){var b=this.getModal(),a=this.getParent();if(!this.painted){this.painted=true;if(b){a.insertBefore(b,this);b.setZIndex(this.getZIndex()-1)}}},destroyModalMask:function(){var b=this.getModal(),a=this.getParent();if(this.painted){this.painted=false;if(b){a.remove(b,false)}}},updateZIndex:function(b){var a=this.getModal();this.callParent(arguments);if(a){a.setZIndex(b-1)}},updateHideOnMaskTap:function(b){var a=this.getModal();if(a){a[b?"on":"un"].call(a,"tap","hide",this)}},updateBaseCls:function(a,b){var c=this,d=c.getUi();if(a){this.element.addCls(a);this.innerElement.addCls(a,null,"inner");if(d){this.element.addCls(a,null,d)}}if(b){this.element.removeCls(b);this.innerElement.removeCls(a,null,"inner");if(d){this.element.removeCls(b,null,d)}}},updateUseBodyElement:function(a){if(a){this.bodyElement=this.innerElement.wrap({cls:"x-body"});this.referenceList.push("bodyElement")}},applyItems:function(a,b){if(a){this.getDefaultType();this.getDefaults();if(this.initialized&&b.length>0){this.removeAll()}this.add(a)}},applyControl:function(c){var a,b,e,d;for(a in c){d=c[a];for(b in d){e=d[b];if(Ext.isObject(e)){e.delegate=a}}d.delegate=a;this.addListener(d)}return c},onFirstItemAdd:function(){delete this.onItemAdd;this.setLayout(new Ext.layout.Layout(this,this.getLayout()||"default"));if(this.innerHtmlElement&&!this.getHtml()){this.innerHtmlElement.destroy();delete this.innerHtmlElement}this.on(this.delegateListeners);return this.onItemAdd.apply(this,arguments)},updateDefaultType:function(a){this.defaultItemClass=Ext.ClassManager.getByAlias("widget."+a)},applyDefaults:function(a){if(a){this.factoryItem=this.factoryItemWithDefaults;return a}},factoryItem:function(a){return Ext.factory(a,this.defaultItemClass)},factoryItemWithDefaults:function(c){var b=this,d=b.getDefaults(),a;if(!d){return Ext.factory(c,b.defaultItemClass)}if(c.isComponent){a=c;if(d&&c.isInnerItem()&&!b.has(a)){a.setConfig(d,true)}}else{if(d&&!c.ignoreDefaults){if(!(c.hasOwnProperty("left")&&c.hasOwnProperty("right")&&c.hasOwnProperty("top")&&c.hasOwnProperty("bottom")&&c.hasOwnProperty("docked")&&c.hasOwnProperty("centered"))){c=Ext.mergeIf({},c,d)}}a=Ext.factory(c,b.defaultItemClass)}return a},add:function(a){var e=this,b,d,c,f;a=Ext.Array.from(a);d=a.length;for(b=0;b<d;b++){c=e.factoryItem(a[b]);this.doAdd(c);if(!f&&!this.getActiveItem()&&this.innerItems.length>0&&c.isInnerItem()){f=c}}if(f){this.setActiveItem(f)}return c},doAdd:function(d){var c=this,a=c.getItems(),b;if(!a.has(d)){b=a.length;a.add(d);if(d.isInnerItem()){c.insertInner(d)}d.setParent(c);c.onItemAdd(d,b)}},remove:function(d,b){var c=this,a=c.indexOf(d),e=this.getInnerItems(),f;if(b===undefined){b=c.getAutoDestroy()}if(a!==-1){if(!this.removingAll&&e.length>1&&d===this.getActiveItem()){this.on({activeitemchange:"doRemove",scope:this,single:true,order:"after",args:[d,a,b]});f=e.indexOf(d);if(f===0){this.setActiveItem(1)}else{this.setActiveItem(0)}}else{this.doRemove(d,a,b)}}return c},doRemove:function(d,a,b){var c=this;c.items.remove(d);if(d.isInnerItem()){c.removeInner(d)}c.onItemRemove(d,a,b);d.setParent(null);if(b){d.destroy()}},removeAll:function(c,f){var a=this.items,e=a.length,b=0,d;if(c===undefined){c=this.getAutoDestroy()}f=Boolean(f);this.removingAll=true;for(;b<e;b++){d=a.getAt(b);if(d&&(f||d.isInnerItem())){this.doRemove(d,b,c);b--;e--}}this.removingAll=false;return this},getAt:function(a){return this.items.getAt(a)},removeAt:function(a){var b=this.getAt(a);if(b){this.remove(b)}return this},removeInnerAt:function(a){var b=this.getInnerItems()[a];if(b){this.remove(b)}return this},has:function(a){return this.getItems().indexOf(a)!=-1},hasInnerItem:function(a){return this.innerItems.indexOf(a)!=-1},indexOf:function(a){return this.getItems().indexOf(a)},insertInner:function(d,b){var a=this.getItems().items,f=this.innerItems,g=f.indexOf(d),c=-1,e;if(g!==-1){f.splice(g,1)}if(typeof b=="number"){do{e=a[++b]}while(e&&!e.isInnerItem());if(e){c=f.indexOf(e);f.splice(c,0,d)}}if(c===-1){f.push(d);c=f.length-1}if(g!==-1){this.onInnerItemMove(d,c,g)}return this},onInnerItemMove:Ext.emptyFn,removeInner:function(a){Ext.Array.remove(this.innerItems,a);return this},insert:function(a,d){var c=this,b;if(Ext.isArray(d)){for(b=d.length-1;b>=0;b--){c.insert(a,d[b])}return c}d=this.factoryItem(d);this.doInsert(a,d);return d},doInsert:function(d,f){var e=this,b=e.items,c=b.length,a,g;g=f.isInnerItem();if(d>c){d=c}if(b[d-1]===f){return e}a=e.indexOf(f);if(a!==-1){if(a<d){d-=1}b.removeAt(a)}else{f.setParent(e)}b.insert(d,f);if(g){e.insertInner(f,d)}if(a!==-1){e.onItemMove(f,d,a)}else{e.onItemAdd(f,d)}},insertFirst:function(a){return this.insert(0,a)},insertLast:function(a){return this.insert(this.getItems().length,a)},insertBefore:function(c,a){var b=this.indexOf(a);if(b!==-1){this.insert(b,c)}return this},insertAfter:function(c,a){var b=this.indexOf(a);if(b!==-1){this.insert(b+1,c)}return this},onItemAdd:function(b,a){this.doItemLayoutAdd(b,a);if(this.initialized){this.fireEvent("add",this,b,a)}},doItemLayoutAdd:function(c,a){var b=this.getLayout();if(this.isRendered()&&c.setRendered(true)){c.fireAction("renderedchange",[this,c,true],"onItemAdd",b,{args:[c,a]})}else{b.onItemAdd(c,a)}},onItemRemove:function(b,a){this.doItemLayoutRemove(b,a);this.fireEvent("remove",this,b,a)},doItemLayoutRemove:function(c,a){var b=this.getLayout();if(this.isRendered()&&c.setRendered(false)){c.fireAction("renderedchange",[this,c,false],"onItemRemove",b,{args:[c,a]})}else{b.onItemRemove(c,a)}},onItemMove:function(b,c,a){if(b.isDocked()){b.setDocked(null)}this.doItemLayoutMove(b,c,a);this.fireEvent("move",this,b,c,a)},doItemLayoutMove:function(b,c,a){this.getLayout().onItemMove(b,c,a)},onItemCenteredChange:function(b,a){if(!b.isFloating()&&!b.isDocked()){if(a){this.removeInner(b)}else{this.insertInner(b,this.indexOf(b))}}this.getLayout().onItemCenteredChange(b,a)},onItemFloatingChange:function(a,b){if(!a.isCentered()&&!a.isDocked()){if(b){this.removeInner(a)}else{this.insertInner(a,this.indexOf(a))}}this.getLayout().onItemFloatingChange(a,b)},onItemDockedChange:function(a,c,b){if(!a.isCentered()&&!a.isFloating()){if(c){this.removeInner(a)}else{this.insertInner(a,this.indexOf(a))}}this.getLayout().onItemDockedChange(a,c,b)},getInnerItems:function(){return this.innerItems},getDockedItems:function(){var a=this.getItems().items,c=[],e=a.length,d,b;for(b=0;b<e;b++){d=a[b];if(d.isDocked()){c.push(d)}}return c},applyActiveItem:function(c,a){var b=this.getInnerItems();this.getItems();if(typeof c=="number"){c=Math.max(0,Math.min(c,b.length-1));c=b[c];if(c){return c}else{if(a){return null}}}else{if(c){if(!c.isComponent){c=this.factoryItem(c)}if(!this.has(c)){this.add(c)}return c}}},animateActiveItem:function(d,c){var b=this.getLayout(),a;if(this.activeItemAnimation){this.activeItemAnimation.destroy()}this.activeItemAnimation=c=new Ext.fx.layout.Card(c);if(c&&b.isCard){c.setLayout(b);a=b.getAnimation();if(a){a.disable();c.on("animationend",function(){a.enable();c.destroy()},this)}}return this.setActiveItem(d)},doSetActiveItem:function(b,a){if(a){a.fireEvent("deactivate",a,this,b)}if(b){b.fireEvent("activate",b,this,a)}},setRendered:function(d){if(this.callParent(arguments)){var a=this.items.items,b,c;for(b=0,c=a.length;b<c;b++){a[b].setRendered(d)}return true}return false},getScrollableBehavior:function(){var a=this.scrollableBehavior;if(!a){a=this.scrollableBehavior=new Ext.behavior.Scrollable(this)}return a},applyScrollable:function(a){this.getScrollableBehavior().setConfig(a)},getScrollable:function(){return this.getScrollableBehavior().getScrollView()},getRefItems:function(a){var b=this.getItems().items.slice(),e=b.length,c,d;if(a){for(c=0;c<e;c++){d=b[c];if(d.getRefItems){b=b.concat(d.getRefItems(true))}}}return b},getComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}return this.getItems().get(a)},getDockedComponent:function(a){if(Ext.isObject(a)){a=a.getItemId()}var c=this.getDockedItems(),e=c.length,d,b;if(Ext.isNumber(a)){return c[a]}for(b=0;b<e;b++){d=c[b];if(d.id==a){return d}}return false},query:function(a){return Ext.ComponentQuery.query(a,this)},child:function(a){return this.query("> "+a)[0]||null},down:function(a){return this.query(a)[0]||null},destroy:function(){var a=this.getModal();if(a){a.destroy()}this.removeAll(true,true);Ext.destroy(this.getScrollable(),this.bodyElement);this.callParent()}},function(){this.addMember("defaultItemClass",this)});Ext.define("Ext.Panel",{extend:"Ext.Container",requires:["Ext.util.LineSegment"],alternateClassName:"Ext.lib.Panel",xtype:"panel",isPanel:true,config:{baseCls:Ext.baseCSSPrefix+"panel",bodyPadding:null,bodyMargin:null,bodyBorder:null},getElementConfig:function(){var a=this.callParent();a.children.push({reference:"tipElement",className:"x-anchor",hidden:true});return a},applyBodyPadding:function(a){if(a===true){a=5}a=Ext.dom.Element.unitizeBox(a);return a},updateBodyPadding:function(a){this.element.setStyle("padding",a)},applyBodyMargin:function(a){if(a===true){a=5}a=Ext.dom.Element.unitizeBox(a);return a},updateBodyMargin:function(a){this.element.setStyle("margin",a)},applyBodyBorder:function(a){if(a===true){a=1}a=Ext.dom.Element.unitizeBox(a);return a},updateBodyBorder:function(a){this.element.setStyle("border-width",a)},alignTo:function(m){var w=this.tipElement;w.hide();if(this.currentTipPosition){w.removeCls("x-anchor-"+this.currentTipPosition)}this.callParent(arguments);var f=Ext.util.LineSegment,d=m.isComponent?m.renderElement:m,a=this.renderElement,n=d.getPageBox(),k=a.getPageBox(),b=k.left,t=k.top,C=k.right,h=k.bottom,j=b+(k.width/2),i=t+(k.height/2),o={x:b,y:t},l={x:C,y:t},B={x:b,y:h},D={x:C,y:h},y={x:j,y:i},s=n.left+(n.width/2),q=n.top+(n.height/2),v={x:s,y:q},c=new f(y,v),g=0,A=0,e,z,r,p,x,u;w.setVisibility(false);w.show();e=w.getSize();z=e.width;r=e.height;if(c.intersects(new f(o,l))){x=Math.min(Math.max(s,b),C-(z/2));u=t;A=r+10;p="top"}else{if(c.intersects(new f(o,B))){x=b;u=Math.min(Math.max(q+(z/2),t),h);g=r+10;p="left"}else{if(c.intersects(new f(B,D))){x=Math.min(Math.max(s,b),C-(z/2));u=h;A=-r-10;p="bottom"}else{if(c.intersects(new f(l,D))){x=C;u=Math.min(Math.max(q-(z/2),t),h);g=-r-10;p="right"}}}}if(x||u){this.currentTipPosition=p;w.addCls("x-anchor-"+p);w.setLeft(x-b);w.setTop(u-t);w.setVisibility(true);this.setLeft(this.getLeft()+g);this.setTop(this.getTop()+A)}}});Ext.define("Ext.SegmentedButton",{extend:"Ext.Container",xtype:"segmentedbutton",requires:["Ext.Button"],config:{baseCls:Ext.baseCSSPrefix+"segmentedbutton",pressedCls:Ext.baseCSSPrefix+"button-pressed",allowMultiple:false,allowDepress:null,pressedButtons:null,layout:{type:"hbox",align:"stretch"},defaultType:"button"},initialize:function(){var a=this;a.callParent();a.on({delegate:"> button",scope:a,tap:"onButtonRelease"});a.onAfter({delegate:"> button",scope:a,hiddenchange:"onButtonHiddenChange"})},updateAllowMultiple:function(){if(!this.initialized&&!this.getInitialConfig().hasOwnProperty("allowDepress")){this.setAllowDepress(true)}},applyItems:function(){var e=this,f=[],d,b,c,a;e.callParent(arguments);a=this.getItems();d=a.length;for(b=0;b<d;b++){c=a.items[b];if(c.getInitialConfig("pressed")){f.push(a.items[b])}}e.updateFirstAndLastCls(a);e.setPressedButtons(f)},onButtonRelease:function(a){var d=this,e=d.getPressedButtons(),c=[],b;if(!d.getDisabled()&&!a.getDisabled()){if(d.getAllowMultiple()){c=e.concat(c)}b=(c.indexOf(a)!==-1)||(e.indexOf(a)!==-1);if(b&&d.getAllowDepress()){Ext.Array.remove(c,a)}else{if(!b||!d.getAllowDepress()){c.push(a)}}d.setPressedButtons(c);Ext.defer(function(){d.fireEvent("toggle",d,a,d.isPressed(a))},50)}},onButtonHiddenChange:function(){this.updateFirstAndLastCls(this.getItems())},updateFirstAndLastCls:function(a){var d=a.length,e=Ext.baseCSSPrefix,c,b;for(b=0;b<d;b++){c=a.items[b];if(!c.isHidden()){c.addCls(e+"first");break}}for(b=d-1;b>=0;b--){c=a.items[b];if(!c.isHidden()){c.addCls(e+"last");break}}},applyPressedButtons:function(a){var e=this,f=[],c,d,b;if(Ext.isArray(a)){d=a.length;for(b=0;b<d;b++){c=e.getComponent(a[b]);if(c&&f.indexOf(c)===-1){f.push(c)}}}else{c=e.getComponent(a);if(c&&f.indexOf(c)===-1){f.push(c)}}return f},updatePressedButtons:function(a){var h=this,b=h.getItems(),g=h.getPressedCls(),f,d,e,c;e=b.length;for(c=0;c<e;c++){f=b.items[c];f.removeCls([g,f.getPressedCls()])}e=a.length;for(c=0;c<e;c++){d=a[c];d.addCls(g)}},isPressed:function(a){var b=this.getPressedButtons();return b.indexOf(a)!=-1},doSetDisabled:function(a){var b=this;b.items.each(function(c){c.setDisabled(a)},b);b.callParent(arguments)}},function(){});Ext.define("Ext.Sheet",{extend:"Ext.Panel",xtype:"sheet",requires:["Ext.fx.Animation"],config:{baseCls:Ext.baseCSSPrefix+"sheet",hidden:true,modal:true,centered:true,stretchX:null,stretchY:null,enter:"bottom",exit:"bottom",showAnimation:!Ext.os.is.Android2?{type:"slideIn",duration:250,easing:"ease-out"}:null,hideAnimation:!Ext.os.is.Android2?{type:"slideOut",duration:250,easing:"ease-in"}:null},applyHideAnimation:function(b){var a=this.getExit(),d=a;if(a===null){return null}if(b===true){b={type:"slideOut"}}if(Ext.isString(b)){b={type:b}}var c=Ext.factory(b,Ext.fx.Animation);if(c){if(a=="bottom"){d="down"}if(a=="top"){d="up"}c.setDirection(d)}return c},applyShowAnimation:function(a){var d=this.getEnter(),c=d;if(d===null){return null}if(a===true){a={type:"slideIn"}}if(Ext.isString(a)){a={type:a}}var b=Ext.factory(a,Ext.fx.Animation);if(b){if(d=="bottom"){c="down"}if(d=="top"){c="up"}b.setBefore({display:null});b.setReverse(true);b.setDirection(c)}return b},updateStretchX:function(a){this.getLeft();this.getRight();if(a){this.setLeft(0);this.setRight(0)}},updateStretchY:function(a){this.getTop();this.getBottom();if(a){this.setTop(0);this.setBottom(0)}}});Ext.define("Ext.ActionSheet",{extend:"Ext.Sheet",alias:"widget.actionsheet",requires:["Ext.Button"],config:{baseCls:Ext.baseCSSPrefix+"sheet-action",left:0,right:0,bottom:0,centered:false,height:"auto",defaultType:"button"}});Ext.define("Ext.TitleBar",{extend:"Ext.Container",xtype:"titlebar",requires:["Ext.Button","Ext.Title","Ext.Spacer","Ext.util.SizeMonitor"],isToolbar:true,config:{baseCls:Ext.baseCSSPrefix+"toolbar",cls:Ext.baseCSSPrefix+"navigation-bar",ui:"dark",title:null,defaultType:"button",layout:{type:"hbox"},items:[]},maxButtonWidth:"40%",constructor:function(){this.refreshTitlePosition=Ext.Function.createThrottled(this.refreshTitlePosition,50,this);this.callParent(arguments)},beforeInitialize:function(){this.applyItems=this.applyInitialItems},initialize:function(){delete this.applyItems;this.doAdd=this.doBoxAdd;this.remove=this.doBoxRemove;this.doInsert=this.doBoxInsert;this.add(this.initialItems);delete this.initialItems;this.on({painted:"onPainted",erased:"onErased"})},applyInitialItems:function(c){var e=Ext.util.SizeMonitor,f=this.getDefaults()||{},a,b,d;this.initialItems=c;this.leftBox=a=this.add({xtype:"container",style:"position: relative",layout:{type:"hbox",align:"center"}});this.spacer=d=this.add({xtype:"component",style:"position: relative",flex:1});this.rightBox=b=this.add({xtype:"container",style:"position: relative",layout:{type:"hbox",align:"center"}});this.titleComponent=this.add({xtype:"title",hidden:f.hidden,centered:true});this.sizeMonitors={leftBox:new e({element:a.renderElement,callback:this.refreshTitlePosition,scope:this}),spacer:new e({element:d.renderElement,callback:this.refreshTitlePosition,scope:this}),rightBox:new e({element:b.renderElement,callback:this.refreshTitlePosition,scope:this})}},doBoxAdd:function(a){if(a.config.align=="right"){this.rightBox.add(a)}else{this.leftBox.add(a)}if(this.painted){this.refreshTitlePosition()}},doBoxRemove:function(a){if(a.config.align=="right"){this.rightBox.remove(a)}else{this.leftBox.remove(a)}if(this.painted){this.refreshTitlePosition()}},doBoxInsert:function(a,b){if(b.config.align=="right"){this.rightBox.add(b)}else{this.leftBox.add(b)}},onPainted:function(){var a=this.sizeMonitors;this.painted=true;this.refreshTitlePosition();a.leftBox.refresh();a.spacer.refresh();a.rightBox.refresh()},onErased:function(){this.painted=false},getMaxButtonWidth:function(){var a=this.maxButtonWidth;if(Ext.isString(this.maxButtonWidth)){a=parseInt(a.replace("%",""),10);a=Math.round((this.element.getWidth()/100)*a)}return a},refreshTitlePosition:function(){var f=this.titleComponent.renderElement;f.setWidth(null);f.setLeft(null);var a=this.leftBox,c=a.down("button"),h,m;if(c){c.renderElement.setWidth("auto");h=a.renderElement.getWidth();m=this.getMaxButtonWidth();if(h>m){c.renderElement.setWidth(m)}}var j=this.spacer.renderElement.getPageBox(),k=f.getPageBox(),g=k.width-j.width,d=k.left,i=k.right,b,l,e;if(g>0){f.setWidth(j.width);b=g/2;d+=b;i-=b}l=j.left-d;e=i-j.right;if(l>0){f.setLeft(l)}else{if(e>0){f.setLeft(-e)}}f.repaint()},updateTitle:function(a){this.titleComponent.setTitle(a);this.titleBox=null;if(this.painted){this.refreshTitlePosition()}},destroy:function(){this.callParent();var a=this.sizeMonitors;a.leftBox.destroy();a.spacer.destroy();a.rightBox.destroy()}});Ext.define("Ext.Toolbar",{extend:"Ext.Container",xtype:"toolbar",requires:["Ext.Button","Ext.Title","Ext.Spacer"],isToolbar:true,config:{baseCls:Ext.baseCSSPrefix+"toolbar",ui:"dark",title:null,defaultType:"button",layout:{type:"hbox",align:"center"}},constructor:function(a){a=a||{};if(a.docked=="left"||a.docked=="right"){a.layout={type:"vbox",align:"stretch"}}this.callParent([a])},applyTitle:function(a){if(typeof a=="string"){a={title:a,centered:true}}return Ext.factory(a,Ext.Title,this.getTitle())},updateTitle:function(b,a){if(b){this.add(b);this.getLayout().setItemFlex(b,1)}if(a){a.destroy()}},showTitle:function(){var a=this.getTitle();if(a){a.show()}},hideTitle:function(){var a=this.getTitle();if(a){a.hide()}}},function(){});Ext.define("Ext.MessageBox",{extend:"Ext.Sheet",requires:["Ext.Toolbar","Ext.field.Text","Ext.field.TextArea"],config:{ui:"dark",baseCls:Ext.baseCSSPrefix+"msgbox",iconCls:null,showAnimation:{type:"popIn",duration:250,easing:"ease-out"},hideAnimation:{type:"popOut",duration:250,easing:"ease-out"},zIndex:10,defaultTextHeight:75,title:null,buttons:null,message:null,prompt:null,layout:{type:"vbox",pack:"center"}},statics:{OK:{text:"OK",itemId:"ok",ui:"action"},YES:{text:"Yes",itemId:"yes",ui:"action"},NO:{text:"No",itemId:"no"},CANCEL:{text:"Cancel",itemId:"cancel"},INFO:Ext.baseCSSPrefix+"msgbox-info",WARNING:Ext.baseCSSPrefix+"msgbox-warning",QUESTION:Ext.baseCSSPrefix+"msgbox-question",ERROR:Ext.baseCSSPrefix+"msgbox-error",OKCANCEL:[{text:"Cancel",itemId:"cancel"},{text:"OK",itemId:"ok",ui:"action"}],YESNOCANCEL:[{text:"Cancel",itemId:"cancel"},{text:"No",itemId:"no"},{text:"Yes",itemId:"yes",ui:"action"}],YESNO:[{text:"No",itemId:"no"},{text:"Yes",itemId:"yes",ui:"action"}]},constructor:function(a){a=a||{};if(a.hasOwnProperty("promptConfig")){Ext.applyIf(a,{prompt:a.promptConfig});delete a.promptConfig}if(a.hasOwnProperty("multiline")||a.hasOwnProperty("multiLine")){a.prompt=a.prompt||{};Ext.applyIf(a.prompt,{multiLine:a.multiline||a.multiLine});delete a.multiline;delete a.multiLine}this.callParent([a])},applyTitle:function(a){if(typeof a=="string"){a={title:a}}Ext.applyIf(a,{docked:"top",cls:this.getBaseCls()+"-title"});return Ext.factory(a,Ext.Toolbar,this.getTitle())},updateTitle:function(a){if(a){this.add(a)}},updateButtons:function(a){var b=this;if(a){if(b.buttonsToolbar){b.buttonsToolbar.removeAll();b.buttonsToolbar.setItems(a)}else{b.buttonsToolbar=Ext.create("Ext.Toolbar",{docked:"bottom",defaultType:"button",layout:{type:"hbox",pack:"center"},ui:b.getUi(),cls:b.getBaseCls()+"-buttons",items:a});b.add(b.buttonsToolbar)}}},applyMessage:function(a){a={html:a,cls:this.getBaseCls()+"-text"};return Ext.factory(a,Ext.Component,this._message)},updateMessage:function(a){if(a){this.add(a)}},getMessage:function(){if(this._message){return this._message.getHtml()}return null},applyIconCls:function(a){a={xtype:"component",docked:"left",width:40,height:40,baseCls:Ext.baseCSSPrefix+"icon",hidden:(a)?false:true,cls:a};return Ext.factory(a,Ext.Component,this._iconCls)},updateIconCls:function(a,b){var c=this;this.getTitle();this.getButtons();if(a&&!b){this.add(a)}else{this.remove(b)}},getIconCls:function(){var b=this._iconCls,a;if(b){a=b.getCls();return(a)?a[0]:null}return null},applyPrompt:function(a){if(a){var b={label:false};if(Ext.isObject(a)){Ext.apply(b,a)}if(b.multiLine){b.height=Ext.isNumber(b.multiLine)?parseFloat(b.multiLine):this.getDefaultTextHeight();return Ext.factory(b,Ext.field.TextArea,this.getPrompt())}else{return Ext.factory(b,Ext.field.Text,this.getPrompt())}}return a},updatePrompt:function(a,b){if(a){this.add(a)}if(b){this.remove(b)}},onClick:function(c){if(c){var b=c.config.userConfig||{},d=c.getInitialConfig(),a=this.getPrompt();if(typeof b.fn=="function"){this.on({hiddenchange:function(){b.fn.call(b.scope||null,d.itemId||d.text,a?a.getValue():null,b)},single:true,scope:this})}if(b.cls){this.el.removeCls(b.cls)}if(b.input){b.input.dom.blur()}}this.hide()},show:function(f){if(!this.getParent()&&Ext.Viewport){Ext.Viewport.add(this)}if(!f){return this.callParent()}var b=Ext.Object.merge({},{value:""},f);var e=f.buttons||Ext.MessageBox.OK||[],d=[],c=f;Ext.each(e,function(g){if(!g){return}d.push(Ext.apply({userConfig:c,scope:this,handler:"onClick"},g))},this);b.buttons=d;if(b.promptConfig){}b.prompt=(b.promptConfig||b.prompt)||null;if(b.multiLine){b.prompt=b.prompt||{};b.prompt.multiLine=b.multiLine;delete b.multiLine}this.setConfig(b);var a=this.getPrompt();if(a){a.setValue(f.value||"")}this.callParent();return this},alert:function(d,c,b,a){return this.show({title:d,message:c,buttons:Ext.MessageBox.OK,promptConfig:false,fn:function(e){if(b){b.call(a,e)}},scope:a})},confirm:function(d,c,b,a){return this.show({title:d,message:c,buttons:Ext.MessageBox.YESNO,promptConfig:false,scope:a,fn:function(e){if(b){b.call(a,e)}}})},prompt:function(g,d,c,b,f,e,a){return this.show({title:g,message:d,buttons:Ext.MessageBox.OKCANCEL,scope:b,prompt:a||true,multiLine:f,value:e,fn:function(i,h){if(c){c.call(b,i,h)}}})}},function(a){Ext.onSetup(function(){Ext.Msg=new a})});Ext.define("Ext.carousel.Carousel",{extend:"Ext.Container",alternateClassName:"Ext.Carousel",xtype:"carousel",requires:["Ext.fx.easing.EaseOut","Ext.carousel.Item","Ext.carousel.Indicator"],config:{baseCls:"x-carousel",direction:"horizontal",directionLock:false,animation:{duration:250,easing:{type:"ease-out"}},indicator:true,ui:"dark",itemConfig:{},bufferSize:1,itemLength:null},itemLength:0,offset:0,flickStartOffset:0,flickStartTime:0,dragDirection:0,count:0,painted:false,activeIndex:-1,beforeInitialize:function(){this.animationListeners={animationframe:"onActiveItemAnimationFrame",animationend:"onActiveItemAnimationEnd",scope:this};this.element.on({dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",scope:this});this.on({painted:"onPainted",erased:"onErased",resize:"onSizeChange"});this.carouselItems=[];this.orderedCarouselItems=[];this.inactiveCarouselItems=[];this.hiddenTranslation=0},updateBufferSize:function(n){var l=Ext.carousel.Item,h=n*2+1,m=this.isRendered(),c=this.innerElement,g=this.carouselItems,f=g.length,e=this.getItemConfig(),d=this.getItemLength(),j=this.getDirection(),b=j==="horizontal"?"setWidth":"setHeight",a,k;for(a=f;a<h;a++){k=Ext.factory(e,l);if(d){k[b].call(k,d)}g.push(k);c.append(k.renderElement);if(m&&k.setRendered(true)){k.fireEvent("renderedchange",this,k,true)}}},getActiveCarouselItem:function(){return this.orderedCarouselItems[this.getBufferSize()]},setRendered:function(g){var a=this.rendered;if(g!==a){this.rendered=g;var b=this.items.items,d=this.carouselItems,c,f,e;for(c=0,f=b.length;c<f;c++){e=b[c];if(!e.isInnerItem()){e.setRendered(g)}}for(c=0,f=d.length;c<f;c++){d[c].setRendered(g)}return true}return false},onPainted:function(){this.painted=true;this.refresh();this.refreshCarouselItems()},onErased:function(){this.painted=false},onSizeChange:function(){this.refreshSizing();this.refreshCarouselItems();this.refreshOffset()},onItemAdd:function(c,b){this.callParent(arguments);var d=this.getInnerItems().indexOf(c),a=this.getIndicator();if(a&&c.isInnerItem()){a.addIndicator()}if(d<=this.getActiveIndex()){this.refreshActiveIndex()}if(this.painted&&this.isIndexDirty(d)){this.refreshActiveItem()}},doItemLayoutAdd:function(a){if(a.isInnerItem()){return}this.callParent(arguments)},onItemRemove:function(f,b){this.callParent(arguments);var h=this.getInnerItems().indexOf(f),a=this.getIndicator(),d=this.carouselItems,c,e,g;if(f.isInnerItem()&&a){a.removeIndicator()}if(h<=this.getActiveIndex()){this.refreshActiveIndex()}if(this.isIndexDirty(h)){for(c=0,e=d.length;c<e;c++){g=d[c];if(g.getComponent()===f){g.setComponent(null)}}if(this.painted){this.refreshActiveItem()}}},doItemLayoutRemove:function(a){if(a.isInnerItem()){return}this.callParent(arguments)},onInnerItemMove:function(b,c,a){if(this.painted&&(this.isIndexDirty(c)||this.isIndexDirty(a))){this.refreshActiveItem()}},doItemLayoutMove:function(a){if(a.isInnerItem()){return}this.callParent(arguments)},isIndexDirty:function(b){var a=this.getActiveIndex(),c=this.getBufferSize();return(b>=a-c&&b<=a+c)},onDragStart:function(f){var d=this.getDirection(),b=f.absDeltaX,a=f.absDeltaY,c=this.getDirectionLock();this.isDragging=true;if(c){if((d==="horizontal"&&b>a)||(d==="vertical"&&a>b)){f.stopPropagation()}else{this.isDragging=false;return}}if(this.isAnimating){this.getActiveCarouselItem().getTranslatable().stopAnimation()}this.dragStartOffset=this.offset;this.dragDirection=0},onDrag:function(j){if(!this.isDragging){return}var k=this.dragStartOffset,l=this.getDirection(),m=l==="horizontal"?j.deltaX:j.deltaY,a=this.offset,i=this.flickStartTime,c=this.dragDirection,b=Ext.Date.now(),h=this.getActiveIndex(),f=this.getMaxItemIndex(),d=c,g;if((h===0&&m>0)||(h===f&&m<0)){m*=0.5}g=k+m;if(g>a){c=1}else{if(g<a){c=-1}}if(c!==d||(b-i)>300){this.flickStartOffset=a;this.flickStartTime=b}this.dragDirection=c;this.setOffset(g)},onDragEnd:function(j){if(!this.isDragging){return}this.onDrag(j);this.isDragging=false;var a=Ext.Date.now(),i=this.itemLength,g=i/2,f=this.offset,m=this.getActiveIndex(),c=this.getMaxItemIndex(),h=0,l=f-this.flickStartOffset,b=a-this.flickStartTime,k=this.getIndicator(),d;if(b>0&&Math.abs(l)>=10){d=l/b;if(Math.abs(d)>=1){if(d<0&&m<c){h=-1}else{if(d>0&&m>0){h=1}}}}if(h===0){if(m<c&&f<-g){h=-1}else{if(m>0&&f>g){h=1}}}if(k){k.setActiveIndex(m-h)}this.animationDirection=h;this.setOffsetAnimated(h*i)},applyAnimation:function(a){a.easing=Ext.factory(a.easing,Ext.fx.easing.EaseOut);return a},updateDirection:function(b){var a=this.getIndicator();this.currentAxis=(b==="horizontal")?"x":"y";if(a){a.setDirection(b)}},setOffset:function(e){var k=this.orderedCarouselItems,c=this.getBufferSize(),g=k[c],j=this.itemLength,d=this.currentAxis,a,h,b,f;this.offset=e;e+=this.itemOffset;if(g){g.translateAxis(d,e);for(f=1,b=0;f<=c;f++){h=k[c-f];if(h){b+=j;h.translateAxis(d,e-b)}}for(f=1,b=0;f<=c;f++){a=k[c+f];if(a){b+=j;a.translateAxis(d,e+b)}}}return this},setOffsetAnimated:function(c){var b=this.orderedCarouselItems[this.getBufferSize()],a=this.getIndicator();if(a){a.setActiveIndex(this.getActiveIndex()-this.animationDirection)}this.offset=c;c+=this.itemOffset;if(b){this.isAnimating=true;b.getTranslatable().on(this.animationListeners);b.translateAxis(this.currentAxis,c,this.getAnimation())}return this},onActiveItemAnimationFrame:function(k){var j=this.orderedCarouselItems,c=this.getBufferSize(),h=this.itemLength,d=this.currentAxis,e=k[d],g,a,f,b;for(f=1,b=0;f<=c;f++){g=j[c-f];if(g){b+=h;g.translateAxis(d,e-b)}}for(f=1,b=0;f<=c;f++){a=j[c+f];if(a){b+=h;a.translateAxis(d,e+b)}}},onActiveItemAnimationEnd:function(b){var c=this.getActiveIndex(),a=this.animationDirection,e=this.currentAxis,f=b[e],d=this.itemLength,g;this.isAnimating=false;b.un(this.animationListeners);if(a===-1){g=d+f}else{if(a===1){g=f-d}else{g=f}}g-=this.itemOffset;this.offset=g;this.setActiveItem(c-a)},refresh:function(){this.refreshSizing();this.refreshActiveItem()},refreshSizing:function(){var a=this.element,b=this.getItemLength(),c,d;if(this.getDirection()==="horizontal"){d=a.getWidth()}else{d=a.getHeight()}this.hiddenTranslation=-d;if(b===null){b=d;c=0}else{c=(d-b)/2}this.itemLength=b;this.itemOffset=c},refreshOffset:function(){this.setOffset(this.offset)},refreshActiveItem:function(){this.doSetActiveItem(this.getActiveItem())},getActiveIndex:function(){return this.activeIndex},refreshActiveIndex:function(){this.activeIndex=this.getInnerItemIndex(this.getActiveItem())},refreshCarouselItems:function(){var a=this.carouselItems,b,d,c;for(b=0,d=a.length;b<d;b++){c=a[b];c.getTranslatable().refresh()}this.refreshInactiveCarouselItems()},refreshInactiveCarouselItems:function(){var a=this.inactiveCarouselItems,f=this.hiddenTranslation,c=this.currentAxis,b,e,d;for(b=0,e=a.length;b<e;b++){d=a[b];d.translateAxis(c,f)}},getMaxItemIndex:function(){return this.innerItems.length-1},getInnerItemIndex:function(a){return this.innerItems.indexOf(a)},getInnerItemAt:function(a){return this.innerItems[a]},applyActiveItem:function(){var b=this.callParent(arguments),a;if(b){a=this.getInnerItemIndex(b);if(a!==-1){this.activeIndex=a;return b}}},doSetActiveItem:function(g){var q=this.getActiveIndex(),e=this.getMaxItemIndex(),m=this.getIndicator(),c=this.getBufferSize(),k=this.carouselItems.slice(),n=this.orderedCarouselItems,p={},o={},a,l,b,f,h,j,d;if(k.length===0){return}this.callParent(arguments);n.length=0;if(g){b=g.getId();o[b]=g;p[b]=c;if(q>0){for(f=1;f<=c;f++){h=q-f;if(h>=0){a=this.getInnerItemAt(h);b=a.getId();o[b]=a;p[b]=c-f}else{break}}}if(q<e){for(f=1;f<=c;f++){h=q+f;if(h<=e){a=this.getInnerItemAt(h);b=a.getId();o[b]=a;p[b]=c+f}else{break}}}for(f=0,j=k.length;f<j;f++){d=k[f];l=d.getComponent();if(l){b=l.getId();if(p.hasOwnProperty(b)){k.splice(f,1);f--;j--;delete o[b];n[p[b]]=d}}}for(b in o){if(o.hasOwnProperty(b)){a=o[b];d=k.pop();d.setComponent(a);n[p[b]]=d}}}this.inactiveCarouselItems.length=0;this.inactiveCarouselItems=k;this.refreshOffset();this.refreshInactiveCarouselItems();if(m){m.setActiveIndex(q)}},next:function(){if(this.isAnimating){this.getActiveCarouselItem().getTranslatable().stopAnimation();this.setOffset(0)}if(this.activeIndex===this.getMaxItemIndex()){return this}this.animationDirection=-1;this.setOffsetAnimated(-this.itemLength);return this},previous:function(){if(this.isAnimating){this.getActiveCarouselItem().getTranslatable().stopAnimation();this.setOffset(0)}if(this.activeIndex===0){return this}this.animationDirection=1;this.setOffsetAnimated(this.itemLength);return this},applyIndicator:function(a,b){return Ext.factory(a,Ext.carousel.Indicator,b)},updateIndicator:function(a){if(a){this.insertFirst(a);a.setUi(this.getUi());a.on({next:"next",previous:"previous",scope:this})}},destroy:function(){var a=this.carouselItems.slice();this.carouselItems.length=0;Ext.destroy(a,this.getIndicator());this.callParent();delete this.carouselItems}},function(){});Ext.define("Ext.carousel.Infinite",{extend:"Ext.carousel.Carousel",config:{indicator:null,maxItemIndex:Infinity,innerItemConfig:{}},applyIndicator:function(a){return},updateBufferSize:function(b){this.callParent(arguments);var e=b*2+1,d=this.innerItems.length,c=this.getInnerItemConfig(),a;for(a=d;a<e;a++){this.doAdd(this.factoryItem(c))}this.rebuildInnerIndexes();this.refreshActiveItem()},updateMaxItemIndex:function(b,c){if(c!==undefined){var a=this.getActiveIndex();if(a>b){this.setActiveItem(b)}else{this.rebuildInnerIndexes(a);this.refreshActiveItem()}}},rebuildInnerIndexes:function(n){var c=this.innerIndexToItem,g=this.innerIdToIndex,j=this.innerItems.slice(),h=j.length,b=this.getBufferSize(),d=this.getMaxItemIndex(),l=[],e,k,f,a,m;if(n===undefined){this.innerIndexToItem=c={};this.innerIdToIndex=g={};for(e=0;e<h;e++){m=j[e];a=m.getId();g[a]=e;c[e]=m;this.fireEvent("itemindexchange",this,m,e,-1)}}else{for(e=n-b;e<=n+b;e++){if(e>=0&&e<=d){if(c.hasOwnProperty(e)){Ext.Array.remove(j,c[e]);continue}l.push(e)}}for(e=0,h=l.length;e<h;e++){m=j[e];a=m.getId();f=l[e];k=g[a];delete c[k];g[a]=f;c[f]=m;this.fireEvent("itemindexchange",this,m,f,k)}}},reset:function(){this.rebuildInnerIndexes();this.setActiveItem(0)},refreshItems:function(){var a=this.innerItems,f=this.innerIdToIndex,b,e,c,d;for(c=0,d=a.length;c<d;c++){e=a[c];b=f[e.getId()];this.fireEvent("itemindexchange",this,e,b,-1)}},getInnerItemIndex:function(b){var a=this.innerIdToIndex[b.getId()];return(typeof a=="number")?a:-1},getInnerItemAt:function(a){return this.innerIndexToItem[a]},applyActiveItem:function(c){this.getItems();this.getBufferSize();var b=this.getMaxItemIndex(),a=this.getActiveIndex();if(typeof c=="number"){c=Math.max(0,Math.min(c,b));if(c===a){return}this.activeIndex=c;this.rebuildInnerIndexes(c);c=this.getInnerItemAt(c)}if(c){return this.callParent([c])}}});Ext.define("Ext.dataview.component.DataItem",{extend:"Ext.Container",xtype:"dataitem",config:{baseCls:Ext.baseCSSPrefix+"data-item",defaultType:"component",record:null,itemCls:null,dataMap:{},items:[{xtype:"component"}]},updateBaseCls:function(a,b){var c=this;c.callParent(arguments)},updateItemCls:function(b,a){if(a){this.removeCls(a)}if(b){this.addCls(b)}},updateRecord:function(d){if(!d){return}var h=this,c=h.config.dataview,b=c.prepareData(d.getData(true),c.getStore().indexOf(d),d),e=h.getItems(),k=e.first(),i=h.getDataMap(),f,j,g,a;if(!k){return}for(f in i){g=i[f];j=h[f]();if(j){for(a in g){if(j[a]){j[a](b[g[a]])}}}}h.fireEvent("updatedata",h,b);k.updateData(b)}});Ext.define("Ext.dataview.component.Container",{extend:"Ext.Container",requires:["Ext.dataview.component.DataItem"],constructor:function(){this.itemCache=[];this.callParent(arguments)},doInitialize:function(){this.innerElement.on({touchstart:"onItemTouchStart",touchend:"onItemTouchEnd",tap:"onItemTap",touchmove:"onItemTouchMove",doubletap:"onItemDoubleTap",swipe:"onItemSwipe",delegate:"> ."+Ext.baseCSSPrefix+"data-item",scope:this})},initialize:function(){this.callParent();this.doInitialize()},onItemTouchStart:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);a.on({touchmove:"onItemTouchMove",scope:b,single:true});b.fireEvent("itemtouchstart",b,a,b.indexOf(a),d)},onItemTouchMove:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtouchmove",b,a,b.indexOf(a),d)},onItemTouchEnd:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);a.un({touchmove:"onItemTouchMove",scope:b});b.fireEvent("itemtouchend",b,a,b.indexOf(a),d)},onItemTap:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtap",b,a,b.indexOf(a),d)},onItemTapHold:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemtaphold",b,a,b.indexOf(a),d)},onItemDoubleTap:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemdoubletap",b,a,b.indexOf(a),d)},onItemSwipe:function(d){var b=this,c=d.getTarget(),a=Ext.getCmp(c.id);b.fireEvent("itemswipe",b,a,b.indexOf(a),d)},moveItemsToCache:function(j,k){var h=this,c=h.dataview,a=c.getMaxItemCache(),g=h.getViewItems(),f=h.itemCache,e=f.length,l=c.getPressedCls(),d=c.getSelectedCls(),b=k-j,m;for(;b>=0;b--){m=g[j+b];if(e!==a){h.remove(m,false);m.removeCls([l,d]);f.push(m);e++}else{m.destroy()}}if(h.getViewItems().length==0){this.dataview.showEmptyText()}},moveItemsFromCache:function(b){var l=this,e=l.dataview,m=e.getStore(),k=b.length,a=e.getDefaultType(),h=e.getItemConfig(),g=l.itemCache,f=g.length,j=[],c,n,d;if(k){e.hideEmptyText()}for(c=0;c<k;c++){b[c]._tmpIndex=m.indexOf(b[c])}Ext.Array.sort(b,function(o,i){return o._tmpIndex>i._tmpIndex?1:-1});for(c=0;c<k;c++){d=b[c];if(f){f--;n=g.pop();this.updateListItem(d,n)}else{n=l.getDataItemConfig(a,d,h)}this.insert(d._tmpIndex,n);delete d._tmpIndex}return j},getViewItems:function(){return this.getInnerItems()},updateListItem:function(a,b){if(b.updateRecord){b.updateRecord(a)}},getDataItemConfig:function(d,b,c){var a=this.dataview;return{xtype:d,record:b,dataview:a,itemCls:a.getItemCls(),defaults:c}},doRemoveItemCls:function(a){var b=this.getViewItems(),d=b.length,c=0;for(;c<d;c++){b[c].removeCls(a)}},doAddItemCls:function(a){var b=this.getViewItems(),d=b.length,c=0;for(;c<d;c++){b[c].addCls(a)}},destroy:function(){var d=this,b=d.itemCache,c=b.length,a=0;for(;a<c;a++){b[a].destroy()}this.callParent()}});Ext.define("Ext.dataview.DataView",{extend:"Ext.Container",alternateClassName:"Ext.DataView",mixins:["Ext.mixin.Selectable"],xtype:"dataview",requires:["Ext.LoadMask","Ext.data.StoreManager","Ext.dataview.component.Container","Ext.dataview.element.Container"],config:{store:null,baseCls:Ext.baseCSSPrefix+"dataview",emptyText:null,deferEmptyText:true,itemTpl:"<div>{text}</div>",pressedCls:"x-item-pressed",itemCls:null,selectedCls:"x-item-selected",triggerEvent:"itemtap",triggerCtEvent:"tap",deselectOnContainerClick:true,scrollable:true,inline:null,pressedDelay:100,loadingText:"Loading...",useComponents:null,itemConfig:{},maxItemCache:20,defaultType:"dataitem",scrollToTopOnRefresh:true},constructor:function(a){var b=this;b.hasLoadedStore=false;b.mixins.selectable.constructor.apply(b,arguments);b.callParent(arguments)},updateItemCls:function(c,b){var a=this.container;if(a){if(b){a.doRemoveItemCls(b)}if(c){a.doAddItemCls(c)}}},storeEventHooks:{beforeload:"onBeforeLoad",load:"onLoad",refresh:"refresh",addrecords:"onStoreAdd",removerecords:"onStoreRemove",updaterecord:"onStoreUpdate"},initialize:function(){this.callParent();var b=this,a;b.on(b.getTriggerCtEvent(),b.onContainerTrigger,b);a=b.container=this.add(new Ext.dataview[b.getUseComponents()?"component":"element"].Container({baseCls:this.getBaseCls()}));a.dataview=b;b.on(b.getTriggerEvent(),b.onItemTrigger,b);a.on({itemtouchstart:"onItemTouchStart",itemtouchend:"onItemTouchEnd",itemtap:"onItemTap",itemtaphold:"onItemTapHold",itemtouchmove:"onItemTouchMove",itemdoubletap:"onItemDoubleTap",itemswipe:"onItemSwipe",scope:b});if(this.getStore()){this.refresh()}},applyInline:function(a){if(Ext.isObject(a)){a=Ext.apply({},a)}return a},updateInline:function(c,b){var a=this.getBaseCls();if(b){this.removeCls([a+"-inlineblock",a+"-nowrap"])}if(c){this.addCls(a+"-inlineblock");if(Ext.isObject(c)&&c.wrap===false){this.addCls(a+"-nowrap")}else{this.removeCls(a+"-nowrap")}}},prepareData:function(c,b,a){return c},onContainerTrigger:function(b){var a=this;if(b.target!=a.element.dom){return}if(a.getDeselectOnContainerClick()&&a.getStore()){a.deselectAll()}},onItemTrigger:function(b,a){this.selectWithEvent(this.getStore().getAt(a))},doAddPressedCls:function(a){var c=this,b=c.container.getViewItems()[c.getStore().indexOf(a)];if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.addCls(c.getPressedCls())}},onItemTouchStart:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireAction("itemtouchstart",[f,d,h,a,g],"doItemTouchStart")},doItemTouchStart:function(c,b,e,a){var d=c.getPressedDelay();if(a){if(d>0){c.pressedTimeout=Ext.defer(c.doAddPressedCls,d,c,[a])}else{c.doAddPressedCls(a)}}},onItemTouchEnd:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);if(this.hasOwnProperty("pressedTimeout")){clearTimeout(this.pressedTimeout);delete this.pressedTimeout}if(a&&h){h.removeCls(f.getPressedCls())}f.fireEvent("itemtouchend",f,d,h,a,g)},onItemTouchMove:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);if(f.hasOwnProperty("pressedTimeout")){clearTimeout(f.pressedTimeout);delete f.pressedTimeout}if(a&&h){h.removeCls(f.getPressedCls())}f.fireEvent("itemtouchmove",f,d,h,a,g)},onItemTap:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemtap",f,d,h,a,g)},onItemTapHold:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemtaphold",f,d,h,a,g)},onItemDoubleTap:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemdoubletap",f,d,h,a,g)},onItemSwipe:function(b,h,d,g){var f=this,c=f.getStore(),a=c&&c.getAt(d);f.fireEvent("itemswipe",f,d,h,a,g)},onItemSelect:function(a,b){var c=this;if(b){c.doItemSelect(c,a)}else{c.fireAction("select",[c,a],"doItemSelect")}},doItemSelect:function(c,a){if(c.container){var b=c.container.getViewItems()[c.getStore().indexOf(a)];if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.removeCls(c.getPressedCls());b.addCls(c.getSelectedCls())}}},onItemDeselect:function(a,b){var c=this;if(c.container){if(b){c.doItemDeselect(c,a)}else{c.fireAction("deselect",[c,a,b],"doItemDeselect")}}},doItemDeselect:function(c,a){var b=c.container.getViewItems()[c.getStore().indexOf(a)];if(Ext.isElement(b)){b=Ext.get(b)}if(b){b.removeCls([c.getPressedCls(),c.getSelectedCls()])}},updateData:function(b){var a=this.getStore();if(!a){this.setStore(Ext.create("Ext.data.Store",{data:b}))}else{a.add(b)}},applyStore:function(b){var d=this,e=Ext.apply({},d.storeEventHooks,{scope:d}),c,a;if(b){b=Ext.data.StoreManager.lookup(b);if(b&&Ext.isObject(b)&&b.isStore){b.on(e);c=b.getProxy();if(c){a=c.getReader();if(a){a.on("exception","handleException",this)}}}}return b},handleException:function(){this.setMasked(false)},updateStore:function(b,e){var d=this,f=Ext.apply({},d.storeEventHooks,{scope:d}),c,a;if(e&&Ext.isObject(e)&&e.isStore){if(e.autoDestroy){e.destroy()}else{e.un(f);c=e.getProxy();if(c){a=c.getReader();if(a){a.un("exception","handleException",this)}}}}if(b){if(b.isLoaded()){this.hasLoadedStore=true}if(b.isLoading()){d.onBeforeLoad()}if(d.container){d.refresh()}}},onBeforeLoad:function(){var b=this.getScrollable();if(b){b.getScroller().stopAnimation()}var a=this.getLoadingText();if(a){this.setMasked({xtype:"loadmask",message:a});if(b){b.getScroller().setDisabled(true)}}this.hideEmptyText()},updateEmptyText:function(b){var a=this;if(b){a.emptyTextCmp=a.add({xtype:"component",cls:a.getBaseCls()+"-emptytext",html:b,hidden:true})}else{if(a.emptyTextCmp){a.remove(a.emptyTextCmp,true);delete a.emptyTextCmp}}},onLoad:function(a){var b=this.getScrollable();this.hasLoadedStore=true;this.setMasked(false);if(b){b.getScroller().setDisabled(false)}if(!a.getCount()){this.showEmptyText()}},refresh:function(){var b=this,a=b.container;if(!b.getStore()){if(!b.hasLoadedStore&&!b.getDeferEmptyText()){b.showEmptyText()}return}if(a){b.fireAction("refresh",[b],"doRefresh")}},applyItemTpl:function(a){return(Ext.isObject(a)&&a.isTemplate)?a:new Ext.XTemplate(a)},onAfterRender:function(){var a=this;a.callParent(arguments);a.updateStore(a.getStore())},getViewItems:function(){return this.container.getViewItems()},doRefresh:function(f){var a=f.container,j=f.getStore(),b=j.getRange(),e=a.getViewItems(),h=b.length,l=e.length,c=h-l,g=f.getScrollable(),d,k;if(this.getScrollToTopOnRefresh()&&g){g.getScroller().scrollToTop()}if(h<1){f.onStoreClear();return}if(c<0){a.moveItemsToCache(l+c,l-1);e=a.getViewItems();l=e.length}else{if(c>0){a.moveItemsFromCache(j.getRange(l))}}for(d=0;d<l;d++){k=e[d];a.updateListItem(b[d],k)}},showEmptyText:function(){if(this.hasLoadedStore&&this.getEmptyText()){this.emptyTextCmp.show()}},hideEmptyText:function(){if(this.getEmptyText()){this.emptyTextCmp.hide()}},onStoreClear:function(){var c=this,a=c.container,b=a.getViewItems();a.moveItemsToCache(0,b.length-1);this.showEmptyText()},onStoreAdd:function(b,a){if(a){this.container.moveItemsFromCache(a)}},onStoreRemove:function(c,b,f){var a=this.container,e=b.length,d;for(d=0;d<e;d++){a.moveItemsToCache(f[d],f[d])}},onStoreUpdate:function(c,b,d,f){var e=this,a=e.container;f=(typeof f==="undefined")?d:f;if(f!==d){a.moveItemsToCache(f,f);a.moveItemsFromCache([b])}else{a.updateListItem(b,a.getViewItems()[d])}}});Ext.define("Ext.dataview.List",{alternateClassName:"Ext.List",extend:"Ext.dataview.DataView",xtype:"list",requires:["Ext.dataview.element.List","Ext.dataview.IndexBar","Ext.dataview.ListItemHeader"],config:{indexBar:false,icon:null,preventSelectionOnDisclose:true,baseCls:Ext.baseCSSPrefix+"list",pinHeaders:true,grouped:false,onItemDisclosure:null,ui:"normal"},constructor:function(){this.translateHeader=(Ext.os.is.Android2)?this.translateHeaderCssPosition:this.translateHeaderTransform;this.callParent(arguments)},onItemTrigger:function(c,b,f,a,d){if(!(this.getPreventSelectionOnDisclose()&&Ext.fly(d.target).hasCls(this.getBaseCls()+"-disclosure"))){this.callParent(arguments)}},initialize:function(){var b=this,a;b.on(b.getTriggerCtEvent(),b.onContainerTrigger,b);a=b.container=this.add(new Ext.dataview.element.List({baseCls:this.getBaseCls()}));a.dataview=b;b.on(b.getTriggerEvent(),b.onItemTrigger,b);a.element.on({delegate:"."+this.getBaseCls()+"-disclosure",tap:"handleItemDisclosure",scope:b});a.on({itemtouchstart:"onItemTouchStart",itemtouchend:"onItemTouchEnd",itemtap:"onItemTap",itemtaphold:"onItemTapHold",itemtouchmove:"onItemTouchMove",itemdoubletap:"onItemDoubleTap",itemswipe:"onItemSwipe",scope:b});if(this.getStore()){this.refresh()}},updateInline:function(a){this.callParent(arguments);if(a){this.setOnItemDisclosure(false);this.setIndexBar(false);this.setGrouped(false)}},applyIndexBar:function(a){return Ext.factory(a,Ext.dataview.IndexBar,this.getIndexBar())},updateIndexBar:function(a){if(a&&this.getScrollable()){this.indexBarElement=this.getScrollableBehavior().getScrollView().getElement().appendChild(a.renderElement);a.on({index:"onIndex",scope:this});this.element.addCls(this.getBaseCls()+"-indexed")}},updateGrouped:function(c){var b=this.getBaseCls(),a=b+"-grouped",d=b+"-ungrouped";if(c){this.addCls(a);this.removeCls(d);this.doRefreshHeaders();this.updatePinHeaders(this.getPinHeaders())}else{this.addCls(d);this.removeCls(a);if(this.container){this.container.doRemoveHeaders()}this.updatePinHeaders(null)}},updatePinHeaders:function(b){var c=this.getScrollable(),a;if(c){a=c.getScroller()}if(!c){return}if(b&&this.getGrouped()){a.on({refresh:"doRefreshHeaders",scroll:"onScroll",scope:this});if(!this.header||!this.header.renderElement.dom){this.createHeader()}}else{a.un({refresh:"doRefreshHeaders",scroll:"onScroll",scope:this});if(this.header){this.header.destroy()}}},createHeader:function(){var e,d=this.getScrollable(),a,b,c;if(d){a=d.getScroller();b=this.getScrollableBehavior().getScrollView();c=b.getElement()}else{return}this.header=e=Ext.create("Ext.dataview.ListItemHeader",{html:" ",cls:"x-list-header-swap"});c.dom.insertBefore(e.element.dom,a.getContainer().dom.nextSibling);this.translateHeader(1000)},refresh:function(){this.callParent();this.doRefreshHeaders()},onStoreAdd:function(){this.callParent(arguments);this.doRefreshHeaders()},onStoreRemove:function(){this.callParent(arguments);this.doRefreshHeaders()},onStoreUpdate:function(){this.callParent(arguments);this.doRefreshHeaders()},onStoreClear:function(){this.callParent();if(this.header){this.header.destroy()}this.doRefreshHeaders()},getClosestGroups:function(){var a=this.pinHeaderInfo.offsets,e=this.getScrollable(),d=a.length,b=0,h,g,f,c;if(e){h=e.getScroller().position}else{return{current:0,next:0}}for(;b<d;b++){g=a[b];if(g.offset>h.y){c=g;break}f=g}return{current:f,next:c}},doRefreshHeaders:function(){if(!this.getGrouped()||!this.container){return false}var l=this.findGroupHeaderIndices(),f=l.length,g=this.container.getViewItems(),j=this.pinHeaderInfo={offsets:[]},a=j.offsets,h=this.getScrollable(),e,k,b,d,c;if(f){for(b=0;b<f;b++){d=g[l[b]];if(d){c=this.getItemHeader(d);a.push({header:c,offset:d.offsetTop})}}j.closest=this.getClosestGroups();this.setActiveGroup(j.closest.current);if(c){j.headerHeight=Ext.fly(c).getHeight()}if(h){e=h.getScroller();k=e.position;this.onScroll(e,k.x,k.y)}}},getItemHeader:function(a){return a.childNodes[0]},onScroll:function(e,j,h){var g=this,i=g.pinHeaderInfo,a=i.closest,b=g.activeGroup,c=i.headerHeight,d,f;if(!a){return}d=a.next;f=a.current;if(!this.header||!this.header.renderElement.dom){this.createHeader()}if(h<=0){if(b){g.setActiveGroup(false);a.next=f}this.translateHeader(1000);return}else{if((d&&h>d.offset)||(f&&h<f.offset)){a=i.closest=this.getClosestGroups();d=a.next;f=a.current;this.setActiveGroup(f)}}if(d&&h>0&&d.offset-h<=c){var k=c-(d.offset-h);this.translateHeader(k)}else{this.translateHeader(null)}},translateHeaderTransform:function(a){this.header.renderElement.dom.style.webkitTransform=(a===null)?null:"translate3d(0px, -"+a+"px, 0px)"},translateHeaderCssPosition:function(a){this.header.renderElement.dom.style.top=(a===null)?null:"-"+Math.round(a)+"px"},setActiveGroup:function(b){var a=this,c=a.header;if(c){if(b){if(!a.activeGroup||a.activeGroup.header!=b.header){c.show();if(c.element){c.setHtml(b.header.innerHTML)}}}else{if(c&&c.dom){c.hide()}}}this.activeGroup=b},onIndex:function(o,c){var r=this,s=c.toLowerCase(),b=r.getStore(),q=b.getGroups(),f=q.length,h=r.getScrollable(),n,e,m,g,k,p;if(h){n=r.getScrollable().getScroller()}else{return}for(m=0;m<f;m++){e=q[m];k=e.name.toLowerCase();if(k==s||k>s){g=e;break}else{g=e}}if(h&&g){p=r.container.getViewItems()[b.indexOf(g.children[0])];n.stopAnimation();var l=n.getContainerSize().y,j=n.getSize().y,d=j-l,a=(p.offsetTop>d)?d:p.offsetTop;n.scrollTo(0,a)}},applyOnItemDisclosure:function(a){if(Ext.isFunction(a)){return{scope:this,handler:a}}return a},handleItemDisclosure:function(f){var d=this,c=f.getTarget().parentNode,b=d.container.getViewItems().indexOf(c),a=d.getStore().getAt(b);d.fireAction("disclose",[d,a,c,b,f],"doDisclose")},doDisclose:function(f,a,d,c,g){var b=f.getOnItemDisclosure();if(b&&b.handler){b.handler.call(f,a,d,c,g)}},findGroupHeaderIndices:function(){if(!this.getGrouped()){return[]}var h=this,k=h.getStore();if(!k){return[]}var b=h.container,d=k.getGroups(),m=d.length,g=b.getViewItems(),c=[],l=b.footerClsShortCache,e,a,f,n,j;b.doRemoveHeaders();b.doRemoveFooterCls();if(g.length){for(e=0;e<m;e++){a=d[e].children[0];f=k.indexOf(a);n=g[f];b.doAddHeader(n,k.getGroupString(a));if(e){Ext.fly(n.previousSibling).addCls(l)}c.push(f)}j=d[--e].children;Ext.fly(g[k.indexOf(j[j.length-1])]).addCls(l)}return c},destroy:function(){Ext.destroy(this.getIndexBar(),this.indexBarElement,this.header);this.callParent()}});Ext.define("Ext.dataview.NestedList",{alternateClassName:"Ext.NestedList",extend:"Ext.Container",xtype:"nestedlist",requires:["Ext.List","Ext.Toolbar","Ext.Button","Ext.XTemplate","Ext.data.StoreManager","Ext.data.NodeStore","Ext.data.TreeStore"],config:{cls:Ext.baseCSSPrefix+"nested-list",backText:"Back",useTitleAsBackText:true,updateTitleText:true,displayField:"text",loadingText:"Loading...",emptyText:"No items available.",onItemDisclosure:false,allowDeselect:false,useToolbar:null,toolbar:{docked:"top",xtype:"titlebar",ui:"light",inline:true},title:"",layout:{type:"card",animation:{type:"slide",duration:250,direction:"left"}},store:null,detailContainer:undefined,detailCard:null,backButton:{ui:"back",hidden:true},listConfig:null,lastNode:null,lastActiveList:null},constructor:function(a){if(Ext.isObject(a)){if(a.getTitleTextTpl){this.getTitleTextTpl=a.getTitleTextTpl}if(a.getItemTextTpl){this.getItemTextTpl=a.getItemTextTpl}}this.callParent(arguments)},onItemInteraction:function(){if(this.isGoingTo){return false}},applyDetailContainer:function(a){if(!a){a=this}return a},updateDetailContainer:function(a,b){a.onBefore("activeitemchange","onBeforeDetailContainerChange",this);a.onAfter("activeitemchange","onDetailContainerChange",this)},onBeforeDetailContainerChange:function(){this.isGoingTo=true},onDetailContainerChange:function(){this.isGoingTo=false},onItemTap:function(g,c,i,a,h){var f=this,b=g.getStore(),d=b.getAt(c);f.fireEvent("itemtap",this,g,c,i,a,h);if(d.isLeaf()){f.fireEvent("leafitemtap",this,g,c,i,a,h);f.goToLeaf(d)}else{this.goToNode(d)}},onBeforeSelect:function(){this.fireEvent("beforeselect",[this,Array.prototype.slice.call(arguments)])},onContainerTap:function(){this.fireEvent("containertap",[this,Array.prototype.slice.call(arguments)])},onSelectionChange:function(){this.fireEvent("selectionchange",[this,Array.prototype.slice.call(arguments)])},onItemDoubleTap:function(){this.fireEvent("itemdoubletap",[this,Array.prototype.slice.call(arguments)])},onStoreBeforeLoad:function(){var a=this.getLoadingText(),b=this.getScrollable();if(a){this.setMasked({xtype:"loadmask",message:a});if(b){b.getScroller().setDisabled(true)}}this.fireEvent("beforeload",[this,Array.prototype.slice.call(arguments)])},onStoreLoad:function(){this.setMasked(false);this.fireEvent("load",[this,Array.prototype.slice.call(arguments)])},onBackTap:function(){var d=this,c=d.getLastNode(),e=d.getDetailCard(),a=e&&d.getActiveItem()==e,b=d.getLastActiveList();this.fireAction("back",[this,c,b,a],"doBack")},doBack:function(e,d,c,a){var b=e.getLayout(),f=(b)?b.getAnimation():null;if(a&&c){if(f){f.setReverse(true)}e.setActiveItem(c);e.setLastNode(d.parentNode);e.syncToolbar()}else{this.goToNode(d.parentNode)}},updateData:function(a){if(!this.getStore()){this.setStore(new Ext.data.TreeStore({root:a}))}},applyStore:function(a){if(a){a=Ext.data.StoreManager.lookup(a);if(a&&Ext.isObject(a)&&a.isStore){a.on({scope:this,load:"onStoreLoad",beforeload:"onStoreBeforeLoad"})}}return a},updateStore:function(a,c){var b=this;if(c&&Ext.isObject(c)&&c.isStore){if(c.autoDestroy){c.destroy()}c.un({rootchange:"onStoreRootChange",scope:this})}if(a){b.goToNode(a.getRoot());a.on({rootchange:"onStoreRootChange",scope:this})}},onStoreRootChange:function(a,b){this.goToNode(b)},applyBackButton:function(a){return Ext.factory(a,Ext.Button,this.getBackButton())},applyDetailCard:function(a){return this.factoryItem(a)},updateBackButton:function(b,a){if(b){var c=this;b.on("tap",c.onBackTap,c);b.setText(c.getBackText());c.getToolbar().insert(0,b)}else{if(a){a.destroy()}}},applyToolbar:function(a){return Ext.factory(a,Ext.TitleBar,this.getToolbar())},updateToolbar:function(a,b){var c=this;if(a){a.setTitle(c.getTitle());if(!a.getParent()){c.add(a)}}else{if(b){b.destroy()}}},updateUseToolbar:function(a,b){if(!a){this.setToolbar(false)}},updateTitle:function(c){var b=this,a=b.getToolbar();if(a){if(b.getUpdateTitleText()){a.setTitle(c)}}},getItemTextTpl:function(a){return"{"+this.getDisplayField()+"}"},getTitleTextTpl:function(a){return"{"+this.getDisplayField()+"}"},renderTitleText:function(b,c){if(!b.titleTpl){b.titleTpl=Ext.create("Ext.XTemplate",this.getTitleTextTpl(b))}if(b.isRoot()){var a=this.getInitialConfig("title");return(c&&a==="")?this.getInitialConfig("backText"):a}return b.titleTpl.applyTemplate(b.data)},goToNode:function(a){if(!a){return}var i=this,d=i.getActiveItem(),k=i.getDetailCard(),j=k&&i.getActiveItem()==k,h=i.goToNodeReverseAnimation(a),c=i.firstList,e=i.secondList,f=i.getLayout(),b=(f)?f.getAnimation():null,g;if(a.isLeaf()){throw new Error("goToNode: passed a node which is a leaf.")}if(a==i.getLastNode()&&!j){return}if(j){if(b){b.setReverse(true)}i.setActiveItem(i.getLastActiveList())}else{if(c&&e){d=i.getActiveItem();i.setLastActiveList(d);g=(d==c)?e:c;g.getStore().setNode(a);a.expand();if(b){b.setReverse(h)}i.setActiveItem(g);g.deselectAll()}else{if(c){i.setLastActiveList(i.getActiveItem());i.setActiveItem(i.getList(a));i.secondList=i.getActiveItem()}else{i.setActiveItem(i.getList(a));i.firstList=i.getActiveItem()}}}i.fireEvent("listchange",this,i.getActiveItem());i.setLastNode(a);i.syncToolbar()},goToLeaf:function(f){if(!f.isLeaf()){throw new Error("goToLeaf: passed a node which is not a leaf.")}var e=this,c=e.getDetailCard(f),b=e.getDetailContainer(),a=b==this,d=e.getLayout(),g=(d)?d.getAnimation():false;if(c){if(b.getItems().indexOf(c)===-1){b.add(c)}if(a){if(e.getActiveItem() instanceof Ext.dataview.List){e.setLastActiveList(e.getActiveItem())}e.setLastNode(f)}if(g){g.setReverse(false)}b.setActiveItem(c);e.syncToolbar()}},syncToolbar:function(g){var e=this,f=e.getDetailCard(),d=e.getLastNode(),b=g||(f&&(e.getActiveItem()==f)),a=(b)?d:d.parentNode,c=e.getBackButton();if(c){c[a?"show":"hide"]();if(a&&e.getUseTitleAsBackText()){c.setText(e.renderTitleText(d.parentNode,true))}}if(d){e.setTitle(e.renderTitleText(d))}},updateBackText:function(a){this.getBackButton().setText(a)},goToNodeReverseAnimation:function(c){var b=this,a=b.getLastNode();if(!a){return false}return(!a.contains(c)&&a.isAncestor(c))?true:false},getList:function(b){var a=this,c=Ext.create("Ext.data.NodeStore",{recursive:false,node:b,rootVisible:false,model:a.getStore().getModel()});b.expand();return Ext.Object.merge({xtype:"list",pressedDelay:250,autoDestroy:true,store:c,onItemDisclosure:a.getOnItemDisclosure(),allowDeselect:a.getAllowDeselect(),listeners:[{event:"itemdoubletap",fn:"onItemDoubleTap",scope:a},{event:"itemtap",fn:"onItemInteraction",scope:a,order:"before"},{event:"itemtouchstart",fn:"onItemInteraction",scope:a,order:"before"},{event:"itemtap",fn:"onItemTap",scope:a},{event:"beforeselect",fn:"onBeforeSelect",scope:a},{event:"containertap",fn:"onContainerTap",scope:a},{event:"selectionchange",fn:"onSelectionChange",scope:a}],itemTpl:'<span<tpl if="leaf == true"> class="x-list-item-leaf"</tpl>>'+a.getItemTextTpl(b)+"</span>"},this.getListConfig())}},function(){});Ext.define("Ext.form.FieldSet",{extend:"Ext.Container",alias:"widget.fieldset",requires:["Ext.Title"],config:{baseCls:Ext.baseCSSPrefix+"form-fieldset",title:null,instructions:null},applyTitle:function(a){if(typeof a=="string"){a={title:a}}Ext.applyIf(a,{docked:"top",baseCls:this.getBaseCls()+"-title"});return Ext.factory(a,Ext.Title,this.getTitle())},updateTitle:function(b,a){if(b){this.add(b)}if(a){this.remove(a)}},applyInstructions:function(a){if(typeof a=="string"){a={title:a}}Ext.applyIf(a,{docked:"bottom",baseCls:this.getBaseCls()+"-instructions"});return Ext.factory(a,Ext.Title,this.getInstructions())},updateInstructions:function(b,a){if(b){this.add(b)}if(a){this.remove(a)}}});Ext.define("Ext.form.Panel",{alternateClassName:"Ext.form.FormPanel",extend:"Ext.Panel",xtype:"formpanel",requires:["Ext.XTemplate","Ext.field.Checkbox","Ext.Ajax"],config:{baseCls:Ext.baseCSSPrefix+"form",standardSubmit:false,url:null,baseParams:null,submitOnAction:true,record:null,method:"post",scrollable:{translationMethod:"scrollposition"}},getElementConfig:function(){var a=this.callParent();a.tag="form";return a},initialize:function(){var a=this;a.callParent();a.on({action:"onFieldAction",scope:a});a.element.on({submit:"onSubmit",scope:a})},updateRecord:function(c){var a,b,d;if(c&&(a=c.fields)){b=this.getValues();for(d in b){if(b.hasOwnProperty(d)&&a.containsKey(d)){c.set(d,b[d])}}}return this},setRecord:function(a){var b=this;if(a&&a.data){b.setValues(a.data)}b._record=a;return this},onSubmit:function(b){var a=this;if(b&&!a.getStandardSubmit()){b.stopEvent()}a.fireAction("submit",[a,a.getValues(true),b],"doSubmit")},doSubmit:function(b,a,c){if(c){c.stopEvent()}},onFieldAction:function(a){if(this.getSubmitOnAction()){a.blur();this.submit()}},submit:function(a){var c=this,b=c.element.dom||{},d;a=Ext.apply({url:c.getUrl()||b.action,submit:false,method:c.getMethod()||b.method||"post",autoAbort:false,params:null,waitMsg:null,headers:null,success:null,failure:null},a||{});d=c.getValues(c.getStandardSubmit()||!a.submitDisabled);return c.fireAction("beforesubmit",[c,d,a],"doBeforeSubmit")},doBeforeSubmit:function(c,d,a){var b=c.element.dom||{};if(c.getStandardSubmit()){if(a.url&&Ext.isEmpty(b.action)){b.action=a.url}b.method=(a.method||b.method).toLowerCase();b.submit()}else{if(a.waitMsg){c.setMasked(a.waitMsg)}return Ext.Ajax.request({url:a.url,method:a.method,rawData:Ext.urlEncode(Ext.apply(Ext.apply({},c.getBaseParams()||{}),a.params||{},d)),autoAbort:a.autoAbort,headers:Ext.apply({"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},a.headers||{}),scope:c,callback:function(e,j,f){var h=this,i=f.responseText,g;h.setMasked(false);g=function(){if(Ext.isFunction(a.failure)){a.failure.call(a.scope||h,h,f,i)}h.fireEvent("exception",h,f)};if(j){f=Ext.decode(i);j=!!f.success;if(j){if(Ext.isFunction(a.success)){a.success.call(a.scope||h,h,f,i)}h.fireEvent("submit",h,f)}else{g()}}else{g()}}})}},setValues:function(b){var a=this.getFields(),c,e,d;b=b||{};for(c in b){if(b.hasOwnProperty(c)){e=a[c];d=b[c];if(e){if(Ext.isArray(e)){e.forEach(function(g){if(g.isRadio){g.setGroupValue(d)}else{if(Ext.isArray(b[c])){g.setChecked((d.indexOf(g.getValue())!=-1))}else{g.setChecked((d==g.getValue()))}}})}else{if(e.setChecked){e.setChecked(d)}else{e.setValue(d)}}}}}return this},getValues:function(d){var a=this.getFields(),b={},g,c,f,e;for(c in a){if(a.hasOwnProperty(c)){if(Ext.isArray(a[c])){b[c]=[];f=a[c].length;for(e=0;e<f;e++){g=a[c][e];if(!g.getChecked){b[c]=g.getValue();break}if(!(d&&g.getDisabled())){if(g.isRadio){b[c]=g.getGroupValue()}else{b[c].push(g.getValue())}}}}else{g=a[c];if(!(d&&g.getDisabled())){if(g.isCheckbox){b[c]=(g.getChecked())?g.getValue():null}else{b[c]=g.getValue()}}}}}return b},reset:function(){this.getFieldsAsArray().forEach(function(a){a.reset()});return this},enable:function(){this.getFieldsAsArray().forEach(function(a){a.enable()});return this},disable:function(){this.getFieldsAsArray().forEach(function(a){a.disable()});return this},getFieldsAsArray:function(){var a=[],b=function(c){if(c.isField){a.push(c)}if(c.isContainer){c.getItems().each(b)}};this.getItems().each(b);return a},getFields:function(b){var a={},d;var c=function(e){if(e.isField){d=e.getName();if((b&&d==b)||typeof b=="undefined"){if(a.hasOwnProperty(d)){if(!Ext.isArray(a[d])){a[d]=[a[d]]}a[d].push(e)}else{a[d]=e}}}if(e.isContainer){e.items.each(c)}};this.getItems().each(c);return(b)?(a[b]||[]):a},getFieldsArray:function(){var a=[];var b=function(c){if(c.isField){a.push(c)}if(c.isContainer){c.items.each(b)}};this.items.each(b);return a},getFieldsFromItem:Ext.emptyFn,showMask:function(a,b){a=Ext.isObject(a)?a.message:a;if(a){this.setMasked({xtype:"loadmask",message:a})}else{this.setMasked(true)}return this},hideMask:function(){this.setMasked(false);return this},getFocusedField:function(){var a=this.getFieldsArray(),c=a.length,d,b;for(b=0;b<c;b++){d=a[b];if(d.isFocused){return d}}return null},getNextField:function(){var a=this.getFieldsArray(),c=this.getFocusedField(),d=a.length,b;if(c){b=a.indexOf(c);if(b!==a.length-1){b++;return a[b]}}return false},focusNextField:function(){var a=this.getNextField();if(a){a.focus();return a}return false},getPreviousField:function(){var a=this.getFieldsArray(),c=this.getFocusedField(),d=a.length,b;if(c){b=a.indexOf(c);if(b!==0){b--;return a[b]}}return false},focusPreviousField:function(){var a=this.getPreviousField();if(a){a.focus();return a}return false}},function(){});Ext.define("Ext.navigation.Bar",{extend:"Ext.Container",requires:["Ext.Button","Ext.TitleBar","Ext.Spacer","Ext.util.SizeMonitor"],isToolbar:true,config:{baseCls:Ext.baseCSSPrefix+"toolbar",cls:Ext.baseCSSPrefix+"navigation-bar",ui:"dark",title:null,defaultType:"button",layout:{type:"hbox"},defaultBackButtonText:"Back",animation:{duration:300},useTitleForBackButtonText:null,view:null,backButton:{align:"left",ui:"back",hidden:true}},minBackButtonWidth:80,constructor:function(a){a=a||{};if(!a.items){a.items=[]}this.callParent([a])},beforeInitialize:function(){this.backButtonStack=[];this.lastAnimationProperties={};this.animating=false;this.onSizeMonitorChange=Ext.Function.createThrottled(this.onSizeMonitorChange,50,this)},initialize:function(){var a=this;a.on({painted:"onPainted",erased:"onErased"});a.onSizeMonitorChange()},updateView:function(f,a){var c=this.getBackButton(),e,b,d;this.getItems();if(f){this.backButtonStack=[];e=f.getInnerItems();for(b=0;b<e.length;b++){this.backButtonStack.push(e[b].config.title||"&nbsp;")}this.titleComponent.setTitle(this.getTitleText());d=this.getBackButtonText();if(d){c.setText(this.getBackButtonText());c.show()}}},onViewAdd:function(a,c,b){var d=a.getLayout().getAnimation();this.endAnimation();this.backButtonStack.push(c.config.title||"&nbsp;");this.refreshNavigationBarProxy();if(d&&d.isAnimation&&a.isPainted()){if(this.backButtonStack.length>1){this.pushBackButtonAnimated(this.getBackButtonText())}this.pushTitleAnimated(this.getTitleText())}else{if(this.backButtonStack.length>1){this.pushBackButton(this.getBackButtonText())}this.pushTitle(this.getTitleText())}},onViewRemove:function(a,c,b){var d=a.getLayout().getAnimation();this.endAnimation();this.backButtonStack.pop();this.refreshNavigationBarProxy();if(d&&d.isAnimation&&a.isPainted()){this.popBackButtonAnimated(this.getBackButtonText());this.popTitleAnimated(this.getTitleText())}else{this.popBackButton(this.getBackButtonText());this.popTitle(this.getTitleText())}},endAnimation:function(){var c=this.lastAnimationProperties,d,b,a;if(c){for(d in c){b=Ext.get(d);for(a in c[d].to){b.setStyle(a,c[d][a])}if(c[d].onEnd){c[d].onEnd.call(this)}}}},applyBackButton:function(a){return Ext.factory(a,Ext.Button,this.getBackButton())},updateBackButton:function(a,b){if(b){this.remove(b)}if(a){this.add(a);a.on({scope:this,tap:this.onBackButtonTap})}},onBackButtonTap:function(){this.fireEvent("back",this)},updateUseTitleForBackButtonText:function(a){var b=this.getBackButton();if(b){b.setText(this.getBackButtonText())}this.onSizeMonitorChange()},onPainted:function(){this.painted=true;this.sizeMonitor.refresh();this.onSizeMonitorChange()},onErased:function(){this.painted=false},applyItems:function(c){var e=this;if(!e.initialized){var f=e.getDefaults()||{},a,b,d;e.leftBox=a=e.add({xtype:"container",style:"position: relative",layout:{type:"hbox",align:"center"}});e.spacer=d=e.add({xtype:"component",style:"position: relative",flex:1});e.rightBox=b=e.add({xtype:"container",style:"position: relative",layout:{type:"hbox",align:"center"}});e.titleComponent=e.add({xtype:"title",hidden:f.hidden,centered:true});e.sizeMonitor=new Ext.util.SizeMonitor({element:e.element,callback:e.onSizeMonitorChange,scope:e});e.doAdd=e.doBoxAdd;e.doInsert=e.doBoxInsert}e.callParent(arguments)},doBoxAdd:function(a){if(a.config.align=="right"){this.rightBox.add(a)}else{this.leftBox.add(a)}},doBoxInsert:function(a,b){if(b.config.align=="right"){this.rightBox.add(b)}else{this.leftBox.add(b)}},onSizeMonitorChange:function(){if(!this.rendered){return}var c=this.getBackButton(),a=this.titleComponent;if(c&&c.rendered){c.setWidth(null)}this.refreshNavigationBarProxy();var b=this.getNavigationBarProxyProperties();if(c&&c.rendered){c.setWidth(b.backButton.width)}a.setStyle("-webkit-transform",null);a.setWidth(b.title.width);a.element.setLeft(b.title.left)},getBackButtonAnimationProperties:function(){var c=this,b=c.element,h=c.getBackButton().element,e=c.titleComponent.element,g=Math.min(b.getWidth()/3,200),a=this.getNavigationBarProxyProperties(),d,f;d=e.getX()-b.getX();f=b.getX()-h.getX()-h.getWidth();d=Math.min(d,g);return{element:{from:{left:d,width:a.backButton.width,opacity:0},to:{left:0,width:a.backButton.width,opacity:1}},ghost:{from:null,to:{left:f,opacity:0}}}},getBackButtonAnimationReverseProperties:function(){var d=this,c=d.element,h=d.getBackButton().element,f=d.titleComponent.element,b=Math.min(c.getWidth()/3,200),a=this.getNavigationBarProxyProperties(),e,g;e=c.getX()-h.getX()-h.getWidth();g=f.getX()-h.getWidth();g=Math.min(g,b);return{element:{from:{left:e,width:a.backButton.width,opacity:0},to:{left:0,width:a.backButton.width,opacity:1}},ghost:{from:null,to:{left:g,opacity:0}}}},getTitleAnimationProperties:function(){var c=this,b=c.element,e=c.titleComponent.element,a=this.getNavigationBarProxyProperties(),d,f;d=b.getWidth()-e.getX();f=b.getX()-e.getX()+a.backButton.width;if((a.backButton.left+e.getWidth())>e.getX()){f=b.getX()-e.getX()-e.getWidth()}return{element:{from:{left:d,width:a.title.width,opacity:0},to:{left:a.title.left,width:a.title.width,opacity:1}},ghost:{from:e.getLeft(),to:{left:f,opacity:0}}}},getTitleAnimationReverseProperties:function(){var d=this,c=d.element,f=d.titleComponent.element,a=this.getNavigationBarProxyProperties(),b=0,e,g;b=f.getLeft();f.setLeft(0);e=c.getX()-f.getX()+a.backButton.width;g=c.getX()+c.getWidth();if((a.backButton.left+f.getWidth())>f.getX()){e=c.getX()-f.getX()-f.getWidth()}return{element:{from:{left:e,width:a.title.width,opacity:0},to:{left:a.title.left,width:a.title.width,opacity:1}},ghost:{from:b,to:{left:g,opacity:0}}}},animate:function(c,d,h,g,b){var e=this,a={element:d,easing:"ease-in-out",duration:this.getAnimation().duration,replacePrevious:true,preserveEndState:true},f;this.lastAnimationProperties[d.id]={to:g,onEnd:b};d.setLeft(0);if(Ext.os.is.Android){if(h){a.from={left:h.left,opacity:h.opacity};if(h.width){a.from.width=h.width}}if(g){a.to={left:g.left,opacity:g.opacity};if(g.width){a.to.width=g.width}}}else{if(h){a.from={transform:{translateX:h.left},opacity:h.opacity};if(h.width){a.from.width=h.width}}if(g){a.to={transform:{translateX:g.left},opacity:g.opacity};if(g.width){a.to.width=g.width}}}fn=function(){if(b){b.call(e)}if(c&&Ext.isNumber(g.width)){c.setWidth(g.width)}e.lastAnimationProperties={}};f=new Ext.fx.Animation(a);f.on("animationend",fn,this);Ext.Animator.run(f)},getBackButtonText:function(){var b=this.backButtonStack[this.backButtonStack.length-2],a=this.getUseTitleForBackButtonText();if(!a){if(b){b=this.getDefaultBackButtonText()}}return b},getTitleText:function(){return this.backButtonStack[this.backButtonStack.length-1]},pushBackButton:function(c){var b=this.getBackButton();b.setText(c);b.show();var a=this.getBackButtonAnimationProperties(),d=a.element.to;if(d.left){b.setLeft(d.left)}if(d.width){b.setWidth(d.width)}},pushBackButtonAnimated:function(f){var e=this;var d=e.getBackButton(),b=d.getText(),g=d.element,c=e.getBackButtonAnimationProperties(),a;if(b){a=e.createProxy(d)}d.setText(this.getBackButtonText());d.show();e.animate(d,g,c.element.from,c.element.to,function(){e.animating=false});if(a){e.animate(null,a,c.ghost.from,c.ghost.to,function(){a.destroy()})}},popBackButton:function(c){var b=this.getBackButton();b.setText(null);if(c){b.setText(this.getBackButtonText())}else{b.hide()}var a=this.getBackButtonAnimationReverseProperties(),d=a.element.to;if(d.left){b.setLeft(d.left)}if(d.width){b.setWidth(d.width)}},popBackButtonAnimated:function(f){var e=this;var d=e.getBackButton(),b=d.getText(),g=d.element,c=e.getBackButtonAnimationReverseProperties(),a;if(b){a=e.createProxy(d)}if(f&&e.backButtonStack.length){d.setText(this.getBackButtonText());d.show();e.animate(d,g,c.element.from,c.element.to)}else{d.hide()}if(a){e.animate(null,a,c.ghost.from,c.ghost.to,function(){a.destroy();if(!f){d.setText(null)}})}},pushTitle:function(e){var c=this.titleComponent,b=c.element,a=this.getTitleAnimationProperties(),d=a.element.to;c.setTitle(e);if(d.left){b.setLeft(d.left)}if(d.width){c.setWidth(d.width)}},pushTitleAnimated:function(h){var e=this;var d=e.getBackButton(),b=(d)?d.getText():null,g=e.titleComponent,f=g.element,c,a;if(b){a=e.createProxy(g,true)}g.setTitle(h);c=e.getTitleAnimationProperties();e.animate(g,f,c.element.from,c.element.to);if(a){e.animate(null,a,c.ghost.from,c.ghost.to,function(){a.destroy()})}},popTitle:function(e){var c=this.titleComponent,b=c.element,a=this.getTitleAnimationReverseProperties(),d=a.element.to;c.setTitle(e);if(d.left){b.setLeft(d.left)}if(d.width){c.setWidth(d.width)}},popTitleAnimated:function(h){var e=this;var d=e.getBackButton(),b=e.titleComponent.getTitle(),g=e.titleComponent,f=g.element,c=e.getTitleAnimationReverseProperties(),a;if(b){a=e.createProxy(g,true)}g.setTitle(h||"");e.animate(g,f,c.element.from,c.element.to,function(){e.animating=false});if(a){e.animate(null,a,c.ghost.from,c.ghost.to,function(){a.destroy()})}},createNavigationBarProxy:function(){var a=this.proxy;if(a){return}this.proxy=a=Ext.create("Ext.TitleBar",{items:[{xtype:"button",ui:"back",text:""}],title:this.backButtonStack[0]});a.backButton=a.down("button[ui=back]");Ext.getBody().appendChild(a.element);a.element.setStyle("position","absolute");a.element.setStyle("visibility","hidden");a.element.setX(0);a.element.setY(-1000)},getNavigationBarProxyProperties:function(){return{title:{left:this.proxy.titleComponent.element.getLeft(),width:this.proxy.titleComponent.element.getWidth()},backButton:{left:this.proxy.backButton.element.getLeft(),width:this.proxy.backButton.element.getWidth()}}},refreshNavigationBarProxy:function(){var c=this.proxy,b=this.element,a=this.backButtonStack,e=a[a.length-1],d=this.getBackButtonText();if(!c){this.createNavigationBarProxy();c=this.proxy}c.element.setWidth(b.getWidth());c.element.setHeight(b.getHeight());c.setTitle(e);if(d){c.backButton.setText(d);c.backButton.show()}else{c.backButton.hide()}c.refreshTitlePosition()},onBeforePop:function(b){b--;for(var a=0;a<b;a++){this.backButtonStack.pop()}},doSetHidden:function(a){if(!a){this.element.setStyle({position:"relative",top:"auto",left:"auto",width:"auto"})}else{this.element.setStyle({position:"absolute",top:"-1000px",left:"-1000px",width:this.element.getWidth()+"px"})}},createProxy:function(b,a){var c=(a)?b.element.getParent():b.element,d=Ext.get(c.id+"-proxy");if(!d){d=c.dom.cloneNode(true);d.id=c.id+"-proxy";c.getParent().dom.appendChild(d);d=Ext.get(d);d.setStyle("position","absolute");d.setY(c.getY());d.setX(c.getX())}return d}});Ext.define("Ext.navigation.View",{extend:"Ext.Container",alternateClassName:"Ext.NavigationView",xtype:"navigationview",requires:["Ext.navigation.Bar"],config:{baseCls:Ext.baseCSSPrefix+"navigationview",navigationBar:{docked:"top"},defaultBackButtonText:"Back",useTitleForBackButtonText:false,layout:{type:"card",animation:{duration:300,easing:"ease-out",type:"slide",direction:"left"}}},initialize:function(){this.getNavigationBar().on({scope:this,back:this.onBackButtonTap});this.relayEvents(this,{add:"push",remove:"pop"})},applyLayout:function(a){a=a||{};if(Ext.os.is.Android){a.animation=false}return a},onBackButtonTap:function(){this.pop();this.fireEvent("back",this)},push:function(a){return this.add(a)},pop:function(a){if(this.onBeforePop(a)){return this.doPop()}},onBeforePop:function(f){var e=this,g=this.getInnerItems(),d=g.length,b,c,a;if(!Ext.isNumber(f)||f<1){f=1}f=Math.min(f,d-1);if(f){e.getNavigationBar().onBeforePop(f);b=g.splice(-f,f-1);for(a=0;a<b.length;a++){this.remove(b[a])}return true}return false},doPop:function(a){var c=this,e=this.getInnerItems(),b=c.getLayout(),d=b.getAnimation();c.remove(e[e.length-1]);return this.getActiveItem()},getPreviousItem:function(){var a=this.getInnerItems();return a[a.length-2]},updateUseTitleForBackButtonText:function(b){var a=this.getNavigationBar();if(a){a.setUseTitleForBackButtonText(b)}},applyNavigationBar:function(a){if(!a){a={hidden:true,docked:"top"}}if(a.title){delete a.title}a.view=this;return Ext.factory(a,Ext.navigation.Bar,this.getNavigationBar())},updateNavigationBar:function(a,c){if(c){this.remove(c)}if(a){var b=this.getLayout(),d=(b&&b.isLayout)?b.getAnimation():false;if(d&&d.isAnimation){a.setAnimation(d.config)}this.add(a)}},applyActiveItem:function(c,a){var b=this.getInnerItems();this.getItems();if(!this.initialized){c=b.length-1}if(typeof c=="number"){c=Math.max(0,Math.min(c,b.length-1));c=b[c];if(c){return c}else{if(a){return null}}}else{if(c){if(!c.isComponent){c=this.factoryItem(c)}if(!this.has(c)){this.add(c)}return c}}},remove:function(d,b){var c=this,a=c.indexOf(d),f=this.getInnerItems(),e=this.getLayout().getAnimation(),g;if(b===undefined){b=c.getAutoDestroy()}if(a!==-1){if(!this.removingAll&&f.length>1&&d===this.getActiveItem()){this.on({activeitemchange:"doRemove",scope:this,single:true,order:"after",args:[d,a,b]});g=f.indexOf(d);if(g>0){if(e&&e.isAnimation){e.setReverse(true)}this.setActiveItem(g-1);this.getNavigationBar().onViewRemove(this,f[g],g)}}else{this.doRemove(d,a,b)}}return c},doRemove:function(){var a=this.getLayout().getAnimation();if(a&&a.isAnimation){a.setReverse(false)}this.callParent(arguments)},onItemAdd:function(b,a){this.doItemLayoutAdd(b,a);if(!this.isItemsInitializing&&b.isInnerItem()){this.setActiveItem(b);this.getNavigationBar().onViewAdd(this,b,a)}if(this.initialized){this.fireEvent("add",this,b,a)}},reset:function(){this.pop(this.getInnerItems().length)}});Ext.define("Ext.picker.Slot",{extend:"Ext.DataView",xtype:"pickerslot",alternateClassName:"Ext.Picker.Slot",requires:["Ext.XTemplate","Ext.data.Store","Ext.Component","Ext.data.StoreManager"],isSlot:true,config:{title:null,showTitle:true,cls:Ext.baseCSSPrefix+"picker-slot",name:null,value:null,flex:1,align:"left",displayField:"text",valueField:"value",scrollable:{direction:"vertical",indicators:false,momentumEasing:{minVelocity:2},slotSnapEasing:{duration:100}}},constructor:function(){this.selectedIndex=0;this.callParent(arguments)},applyTitle:function(a){if(a){a=Ext.create("Ext.Component",{cls:Ext.baseCSSPrefix+"picker-slot-title",docked:"top",html:a})}return a},updateTitle:function(b,a){if(b){this.add(b);this.setupBar()}if(a){this.remove(a)}},updateShowTitle:function(a){var b=this.getTitle();if(b){b[a?"show":"hide"]();this.setupBar()}},updateDisplayField:function(a){this.setItemTpl('<div class="'+Ext.baseCSSPrefix+'picker-item {cls} <tpl if="extra">'+Ext.baseCSSPrefix+'picker-invalid</tpl>">{'+a+"}</div>")},updateAlign:function(a,c){var b=this.element;b.addCls(Ext.baseCSSPrefix+"picker-"+a);b.removeCls(Ext.baseCSSPrefix+"picker-"+c)},applyData:function(d){var f=[],c=d&&d.length,a,b,e;if(d&&Ext.isArray(d)&&c){for(a=0;a<c;a++){b=d[a];e={};if(Ext.isArray(b)){e[this.valueField]=b[0];e[this.displayField]=b[1]}else{if(Ext.isString(b)){e[this.valueField]=b;e[this.displayField]=b}else{if(Ext.isObject(b)){e=b}}}f.push(e)}}return d},updateData:function(a){this.setStore(Ext.create("Ext.data.Store",{model:"x-textvalue",data:a}))},initialize:function(){this.callParent();var a=this.getScrollable().getScroller();this.on({scope:this,painted:"onPainted",itemtap:"doItemTap"});a.on({scope:this,scrollend:"onScrollEnd"})},onPainted:function(){this.setupBar()},getPicker:function(){if(!this.picker){this.picker=this.getParent()}return this.picker},setupBar:function(){if(!this.rendered){return}var b=this.element,g=this.innerElement,h=this.getPicker(),i=h.bar,m=this.getValue(),c=this.getShowTitle(),l=this.getTitle(),j=this.getScrollable(),f=j.getScroller(),e=0,o,d,n,k,a;o=i.getY();d=b.getY();if(c&&l){d+=l.element.getHeight()}n=i.getHeight();if(c&&l){e=l.element.getHeight()}k=Math.ceil((b.getHeight()-e-n)/2);this.slotPadding=k;g.setStyle({padding:k+"px 0 "+(k)+"px"});f.refresh();f.setSlotSnapSize(n);this.setValue(m)},doItemTap:function(d,a,c,f){var b=this;b.selectedIndex=a;b.selectedNode=c;b.scrollToItem(c,true);b.fireEvent("slotpick",b,b.getValue(),b.selectedNode)},scrollToItem:function(e,d){var h=e.getY(),c=e.parent(),f=c.getY(),b=this.getScrollable(),a=b.getScroller(),g;g=h-f;a.scrollTo(0,g,d)},onScrollEnd:function(b,a,g){var f=this,d=Math.round(g/f.picker.bar.getHeight()),c=f.getViewItems(),e=c[d];if(e){f.selectedIndex=d;f.selectedNode=e;f.fireEvent("slotpick",f,f.getValue(),f.selectedNode)}},getValue:function(){var b=this.getStore(),a,c;if(!b){return}if(this._value===false){return null}a=b.getAt(this.selectedIndex);c=a?a.get(this.getValueField()):null;this._value=c;return c},setValue:function(f){if(!Ext.isDefined(f)){return}if(!this.rendered||!f){this._value=f;return}var b=this.getStore(),a=this.getViewItems(),d=this.getValueField(),c,e;c=b.find(d,f);if(c!=-1){e=Ext.get(a[c]);this.selectedIndex=c;this.scrollToItem(e);this._value=f}},setValueAnimated:function(f){if(!f){return}if(!this.rendered){this._value=f;return}var b=this.getStore(),a=this.getViewItems(),d=this.getValueField(),c,e;c=b.find(d,f);if(c!=-1){e=Ext.get(a[c]);this.selectedIndex=c;this.scrollToItem(e,{duration:100});this._value=f}}});Ext.define("Ext.picker.Picker",{extend:"Ext.Sheet",alias:"widget.picker",alternateClassName:"Ext.Picker",requires:["Ext.picker.Slot","Ext.Toolbar","Ext.data.Model"],isPicker:true,config:{cls:Ext.baseCSSPrefix+"picker",doneButton:true,cancelButton:true,useTitles:false,slots:null,value:null,height:220,layout:{type:"hbox",align:"stretch"},centered:false,left:0,right:0,bottom:0,defaultType:"pickerslot",toolbar:true},initElement:function(){this.callParent(arguments);var b=this,a=Ext.baseCSSPrefix,c=this.innerElement;this.mask=c.createChild({cls:a+"picker-mask"});this.bar=this.mask.createChild({cls:a+"picker-bar"});b.on({scope:this,delegate:"pickerslot",slotpick:"onSlotPick"});b.on({scope:this,show:"onShow"})},applyToolbar:function(a){if(a===true){a={}}Ext.applyIf(a,{docked:"top"});return Ext.factory(a,"Ext.TitleBar",this.getToolbar())},updateToolbar:function(a,b){if(a){this.add(a)}if(b){this.remove(b)}},applyDoneButton:function(a){if(a){if(Ext.isBoolean(a)){a={}}if(typeof a=="string"){a={text:a}}Ext.applyIf(a,{ui:"action",align:"right",text:"Done"})}return Ext.factory(a,"Ext.Button",this.getDoneButton())},updateDoneButton:function(c,a){var b=this.getToolbar();if(c){b.add(c);c.on("tap",this.onDoneButtonTap,this)}else{if(a){b.remove(a)}}},applyCancelButton:function(a){if(a){if(Ext.isBoolean(a)){a={}}if(typeof a=="string"){a={text:a}}Ext.applyIf(a,{align:"left",text:"Cancel"})}return Ext.factory(a,"Ext.Button",this.getCancelButton())},updateCancelButton:function(b,a){var c=this.getToolbar();if(b){c.add(b);b.on("tap",this.onCancelButtonTap,this)}else{if(a){c.remove(a)}}},updateUseTitles:function(d){var f=this.getInnerItems(),e=f.length,a=Ext.baseCSSPrefix+"use-titles",c,b;if(d){this.addCls(a)}else{this.removeCls(a)}for(c=0;c<e;c++){b=f[c];if(b.isSlot){b.setShowTitle(d)}}},applySlots:function(b){if(b){var c=b.length,a;for(a=0;a<c;a++){b[a].picker=this}}return b},updateSlots:function(a){this.removeAll();if(a){this.add(a)}this.updateUseTitles(this.getUseTitles())},onDoneButtonTap:function(){this.fireEvent("change",this,this.getValue());this.hide()},onCancelButtonTap:function(){this.fireEvent("cancel",this);this.hide()},onSlotPick:function(c,b,a){this.fireEvent("pick",this,this.getValue(),c)},onShow:function(){if(!this.isHidden()){this.setValue(this._value)}},setValue:function(j,a){var f=this,d=f.getInnerItems(),e=d.length,h,g,c,b;if(!j){j={};for(b=0;b<e;b++){j[d[b].config.name]=false}}for(h in j){value=j[h];for(b=0;b<d.length;b++){c=d[b];if(c.config.name==h){g=c;break}}if(g){if(a){g.setValueAnimated(value)}else{g.setValue(value)}}}f._value=j;f._values=j;return f},setValueAnimated:function(a){this.setValue(a,true)},getValue:function(){var d=this.getParent(),b={},a=this.getItems().items,f=a.length,e,c;if(d){for(c=0;c<f;c++){e=a[c];if(e&&e.isSlot){b[e.getName()]=e.getValue()}}this._values=b}return this._values},getValues:function(){return this.getValue()},destroy:function(){this.callParent();Ext.destroy(this.mask,this.bar)}},function(){Ext.define("x-textvalue",{extend:"Ext.data.Model",config:{fields:["text","value"]}})});Ext.define("Ext.field.Select",{extend:"Ext.field.Text",xtype:"selectfield",alternateClassName:"Ext.form.Select",requires:["Ext.Panel","Ext.picker.Picker","Ext.data.Store","Ext.data.StoreManager","Ext.List"],config:{ui:"select",valueField:"value",displayField:"text",store:null,options:null,hiddenName:null,component:{useMask:true},clearIcon:false,usePicker:"auto",defaultPhonePickerConfig:null,defaultTabletPickerConfig:null},constructor:function(a){a=a||{};if(!a.store){a.store=true}this.callParent([a])},initialize:function(){var b=this,a=b.getComponent();b.callParent();a.on({scope:b,masktap:"onMaskTap"});a.input.dom.disabled=true},updateDefaultPhonePickerConfig:function(b){var a=this.picker;if(a){a.setConfig(b)}},updateDefaultTabletPickerConfig:function(a){var b=this.listPanel;if(b){b.setConfig(a)}},applyUsePicker:function(a){if(a=="auto"){a=(Ext.os.deviceType=="Phone")}return Boolean(a)},syncEmptyCls:Ext.emptyFn,applyValue:function(c){var a=c,b;this.getOptions();if(!(c instanceof Ext.data.Model)){b=this.getStore().find(this.getValueField(),c,null,null,null,true);if(b==-1){b=this.getStore().find(this.getDisplayField(),c,null,null,null,true)}a=this.getStore().getAt(b)}return a},updateValue:function(b,a){this.previousRecord=a;this.record=b;this.callParent([b?b.get(this.getDisplayField()):""]);if(a!==b){this.fireEvent("change",this,b,a)}},getValue:function(){var a=this.record;return(a)?a.get(this.getValueField()):null},getRecord:function(){return this.record},getPhonePicker:function(){var a=this.getDefaultPhonePickerConfig();if(!this.picker){this.picker=Ext.create("Ext.picker.Picker",Ext.apply({slots:[{align:"center",name:this.getName(),valueField:this.getValueField(),displayField:this.getDisplayField(),value:this.getValue(),store:this.getStore()}],listeners:{change:this.onPickerChange,scope:this}},a))}return this.picker},getTabletPicker:function(){var a=this.getDefaultTabletPickerConfig();if(!this.listPanel){this.listPanel=Ext.create("Ext.Panel",Ext.apply({centered:true,modal:true,cls:Ext.baseCSSPrefix+"select-overlay",layout:"fit",hideOnMaskTap:true,items:{xtype:"list",store:this.getStore(),itemTpl:'<span class="x-list-label">{'+this.getDisplayField()+"}</span>",listeners:{select:this.onListSelect,itemtap:this.onListTap,scope:this}}},a))}return this.listPanel},onMaskTap:function(){if(this.getDisabled()){return false}this.showPicker();return false},showPicker:function(){if(this.getStore().getCount()===0){return}if(this.getReadOnly()){return}this.isFocused=true;if(this.getUsePicker()){var e=this.getPhonePicker(),d=this.getName(),h={};h[d]=this.record.get(this.getValueField());e.setValue(h);if(!e.getParent()){Ext.Viewport.add(e)}e.show()}else{var f=this.getTabletPicker(),g=f.down("list"),b=g.getStore(),c=b.find(this.getValueField(),this.getValue(),null,null,null,true),a=b.getAt((c==-1)?0:c);if(!f.getParent()){Ext.Viewport.add(f)}f.showBy(this.getComponent());g.select(a,null,true)}},onListSelect:function(c,a){var b=this;if(a){b.setValue(a)}},onListTap:function(){this.listPanel.hide({type:"fade",out:true,scope:this})},onPickerChange:function(d,f){var e=this,g=f[e.getName()],b=e.getStore(),c=b.find(e.getValueField(),g,null,null,null,true),a=b.getAt(c);e.setValue(a)},updateOptions:function(b){var a=this.getStore();if(!b){a.clearData()}else{a.setData(b);this.onStoreDataChanged(a)}},applyStore:function(a){if(a===true){a=Ext.create("Ext.data.Store",{fields:[this.getValueField(),this.getDisplayField()]})}if(a){a=Ext.data.StoreManager.lookup(a);a.on({scope:this,addrecords:this.onStoreDataChanged,removerecords:this.onStoreDataChanged,updaterecord:this.onStoreDataChanged,refresh:this.onStoreDataChanged})}return a},updateStore:function(a){if(a){this.onStoreDataChanged(a)}},onStoreDataChanged:function(a){var c=this.getInitialConfig(),b=this.getValue();if(Ext.isDefined(b)){this.updateValue(this.applyValue(b))}if(this.getValue()===null){if(c.hasOwnProperty("value")){this.setValue(c.value)}if(this.getValue()===null){if(a.getCount()>0){this.setValue(a.getAt(0))}}}},doSetDisabled:function(a){Ext.Component.prototype.doSetDisabled.apply(this,arguments)},setDisabled:function(){Ext.Component.prototype.setDisabled.apply(this,arguments)},reset:function(){var b=this.getStore(),a=(this.originalValue)?this.originalValue:b.getAt(0);if(b&&a){this.setValue(a)}return this},onFocus:function(a){this.fireEvent("focus",this,a);this.isFocused=true;this.showPicker()},destroy:function(){this.callParent(arguments);Ext.destroy(this.listPanel,this.picker,this.hiddenField)}});Ext.define("Ext.picker.Date",{extend:"Ext.picker.Picker",xtype:"datepicker",alternateClassName:"Ext.DatePicker",requires:["Ext.DateExtras"],config:{yearFrom:1980,yearTo:new Date().getFullYear(),monthText:"Month",dayText:"Day",yearText:"Year",slotOrder:["month","day","year"]},initialize:function(){this.callParent();this.on({scope:this,delegate:"> slot",slotpick:this.onSlotPick})},setValue:function(b,a){if(Ext.isDate(b)){b={day:b.getDate(),month:b.getMonth()+1,year:b.getFullYear()}}this.callParent([b,a])},getValue:function(){var h={},a,g,c,f,e=this.getItems().items,d=e.length,j,b;for(b=0;b<d;b++){j=e[b];if(j instanceof Ext.picker.Slot){h[j.getName()]=j.getValue()}}if(h.year===null&&h.month===null&&h.day===null){return null}f=Ext.isNumber(h.year)?h.year:1;c=Ext.isNumber(h.month)?h.month:1;g=Ext.isNumber(h.day)?h.day:1;if(c&&f&&c&&g){a=this.getDaysInMonth(c,f)}g=(a)?Math.min(g,a):g;return new Date(f,c-1,g)},updateYearFrom:function(){if(this.initialized){this.createSlots()}},updateYearTo:function(){if(this.initialized){this.createSlots()}},updateMonthText:function(a,b){var f=this.getInnerItems,e=f.length,d,c;if(this.initialized){for(c=0;c<e;c++){d=f[c];if((typeof d.title=="string"&&d.title==b)||(d.title.html==b)){d.setTitle(a)}}}},updateDayText:function(a,c){var f=this.getInnerItems,e=f.length,d,b;if(this.initialized){for(b=0;b<e;b++){d=f[b];if((typeof d.title=="string"&&d.title==c)||(d.title.html==c)){d.setTitle(a)}}}},updateYearText:function(e){var d=this.getInnerItems,c=d.length,b,a;if(this.initialized){for(a=0;a<c;a++){b=d[a];if(b.title==this.yearText){b.setTitle(e)}}}},constructor:function(){this.callParent(arguments);this.createSlots()},createSlots:function(){var k=this,c=this.getSlotOrder(),m=k.getYearFrom(),f=k.getYearTo(),g=[],l=[],b=[],j,e,d,a;if(m>f){e=m;m=f;f=e}for(d=m;d<=f;d++){g.push({text:d,value:d})}a=this.getDaysInMonth(1,new Date().getFullYear());for(d=0;d<a;d++){l.push({text:d+1,value:d+1})}for(d=0,j=Ext.Date.monthNames.length;d<j;d++){b.push({text:Ext.Date.monthNames[d],value:d+1})}var h=[];c.forEach(function(i){h.push(this.createSlot(i,l,b,g))},this);k.setSlots(h)},createSlot:function(b,d,a,c){switch(b){case"year":return{name:"year",align:"center",data:c,title:this.getYearText(),flex:3};case"month":return{name:b,align:"right",data:a,title:this.getMonthText(),flex:4};case"day":return{name:"day",align:"center",data:d,title:this.getDayText(),flex:2}}},onSlotPick:function(){var j=this.getValue(),h=this.getDaySlot(),f=j.getFullYear(),e=j.getMonth(),k=[],b=h,a,c;if(!j||!Ext.isDate(j)||!h){return}a=this.getDaysInMonth(e+1,f);for(c=0;c<a;c++){k.push({text:c+1,value:c+1})}if(h.getData().length==k.length){return}var g=h.getStore(),n=h.getViewItems(),m=h.getValueField(),d,l;h.setData(k);d=g.find(m,j.getDate());if(d==-1){return}l=Ext.get(n[d]);h.selectedIndex=d;h.scrollToItem(l);h._value=j},getDaySlot:function(){var c=this.getInnerItems(),b=c.length,a,d;if(this.daySlot){return this.daySlot}for(a=0;a<b;a++){d=c[a];if(d.isSlot&&d.getName()=="day"){this.daySlot=d;return d}}return null},getDaysInMonth:function(c,b){var a=[31,28,31,30,31,30,31,31,30,31,30,31];return c==2&&this.isLeapYear(b)?29:a[c-1]},isLeapYear:function(a){return !!((a&3)===0&&(a%100||(a%400===0&&a)))}});Ext.define("Ext.field.DatePicker",{extend:"Ext.field.Text",alternateClassName:"Ext.form.DatePicker",xtype:"datepickerfield",requires:["Ext.picker.Date","Ext.DateExtras"],config:{ui:"select",picker:true,clearIcon:false,destroyPickerOnHide:false,dateFormat:null,component:{useMask:true}},initialize:function(){this.callParent();this.getComponent().on({scope:this,masktap:"onMaskTap"});this.getComponent().input.dom.disabled=true},syncEmptyCls:Ext.emptyFn,applyValue:function(a){if(!Ext.isDate(a)&&!Ext.isObject(a)){a=null}if(Ext.isObject(a)){a=new Date(a.year,a.month-1,a.day)}return a},updateValue:function(b){var a=this._picker;if(a&&a.isPicker){a.setValue(b)}if(b!==null){this.getComponent().setValue(Ext.Date.format(b,this.getDateFormat()||Ext.util.Format.defaultDateFormat))}else{this.getComponent().setValue("")}if(this._picker&&this._picker instanceof Ext.picker.Date){this._picker.setValue(b)}},updateDateFormat:function(c,a){var b=this.getValue();if(c!=a&&Ext.isDate(b)&&this._picker&&this._picker instanceof Ext.picker.Date){this.getComponent().setValue(Ext.Date.format(b,c||Ext.util.Format.defaultDateFormat))}},getValue:function(){if(this._picker&&this._picker instanceof Ext.picker.Date){return this._picker.getValue()}return this._value},getFormattedValue:function(b){var a=this.getValue();return(Ext.isDate(a))?Ext.Date.format(a,b||this.getDateFormat()||Ext.util.Format.defaultDateFormat):a},applyPicker:function(b,a){if(a&&a.isPicker){b=a.setConfig(b)}return b},getPicker:function(){var a=this._picker;if(a&&!a.isPicker){a=Ext.factory(a,Ext.picker.Date);a.on({scope:this,change:"onPickerChange",hide:"onPickerHide"});a.hide();a.setValue(this.getValue());Ext.Viewport.add(a);this._picker=a}return a},onMaskTap:function(){if(this.getDisabled()){return false}if(this.getReadOnly()){return false}this.getPicker().show();return false},onPickerChange:function(a,c){var b=this;b.setValue(c);b.fireEvent("change",b,b.getValue())},onPickerHide:function(){var a=this.getPicker();if(this.getDestroyPickerOnHide()&&a){a.destroy();this.setPicker(null)}},reset:function(){this.setValue(this.originalValue)},destroy:function(){var a=this.getPicker();if(a){a.destroy()}this.callParent(arguments)}});Ext.define("Ext.slider.Thumb",{extend:"Ext.Component",xtype:"thumb",config:{baseCls:Ext.baseCSSPrefix+"thumb",draggable:{direction:"horizontal"}},elementWidth:0,initialize:function(){this.callParent();this.getDraggable().onBefore({dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",scope:this});this.on("painted","onPainted")},onDragStart:function(){if(this.isDisabled()){return false}this.relayEvent(arguments)},onDrag:function(){if(this.isDisabled()){return false}this.relayEvent(arguments)},onDragEnd:function(){if(this.isDisabled()){return false}this.relayEvent(arguments)},onPainted:function(){this.elementWidth=this.element.dom.offsetWidth},getElementWidth:function(){return this.elementWidth}});Ext.define("Ext.slider.Slider",{extend:"Ext.Container",xtype:"slider",requires:["Ext.slider.Thumb","Ext.fx.easing.EaseOut"],config:{baseCls:"x-slider",thumbConfig:{draggable:{translatable:{easingX:{duration:300,type:"ease-out"}}}},value:0,minValue:0,maxValue:100,increment:1,allowThumbsOverlapping:false,animation:true},elementWidth:0,offsetValueRatio:0,activeThumb:null,constructor:function(a){a=a||{};if(a.hasOwnProperty("values")){a.value=a.values}this.callParent([a])},initialize:function(){var a=this.element;this.callParent();a.on({scope:this,tap:"onTap"});this.on({scope:this,delegate:"> thumb",dragstart:"onThumbDragStart",drag:"onThumbDrag",dragend:"onThumbDragEnd"});this.on({painted:"refresh",resize:"refresh"})},factoryThumb:function(){return Ext.factory(this.getThumbConfig(),Ext.slider.Thumb)},getThumbs:function(){return this.innerItems},getThumb:function(a){if(typeof a!="number"){a=0}return this.innerItems[a]},refreshOffsetValueRatio:function(){var b=this.getMaxValue()-this.getMinValue(),a=this.elementWidth-this.thumbWidth;this.offsetValueRatio=a/b},refreshElementWidth:function(){this.elementWidth=this.element.dom.offsetWidth;this.thumbWidth=this.getThumb(0).getElementWidth()},refresh:function(){this.refreshElementWidth();this.refreshValue()},setActiveThumb:function(b){var a=this.activeThumb;if(a&&a!==b){a.setZIndex(null)}this.activeThumb=b;b.setZIndex(2);return this},onThumbDragStart:function(a,b){if(b.absDeltaX<=b.absDeltaY){return false}else{b.stopPropagation()}if(this.getAllowThumbsOverlapping()){this.setActiveThumb(a)}this.dragStartValue=this.getValue()[this.getThumbIndex(a)];this.fireEvent("dragstart",this,a,this.dragStartValue,b)},onThumbDrag:function(c,g,a){var d=this.getThumbIndex(c),f=this.offsetValueRatio,b=this.constrainValue(a/f);g.stopPropagation();this.setIndexValue(d,b);this.fireEvent("drag",this,c,this.getValue(),g);return false},setIndexValue:function(d,g,f){var c=this.getThumb(d),b=this.getValue(),e=this.offsetValueRatio,a=c.getDraggable();a.setOffset(g*e,null,f);b[d]=this.constrainValue(a.getOffset().x/e)},onThumbDragEnd:function(a,f){this.refreshThumbConstraints(a);var c=this.getThumbIndex(a),d=this.getValue()[c],b=this.dragStartValue;this.fireEvent("dragend",this,a,this.getValue(),f);if(b!==d){this.fireEvent("change",this,a,d,b)}},getThumbIndex:function(a){return this.getThumbs().indexOf(a)},refreshThumbConstraints:function(d){var b=this.getAllowThumbsOverlapping(),a=d.getDraggable().getOffset().x,c=this.getThumbs(),e=this.getThumbIndex(d),g=c[e-1],h=c[e+1],f=this.thumbWidth;if(g){g.getDraggable().addExtraConstraint({max:{x:a-((b)?0:f)}})}if(h){h.getDraggable().addExtraConstraint({min:{x:a+((b)?0:f)}})}},onTap:function(j){if(this.isDisabled()){return}var k=Ext.get(j.target);if(!k||k.hasCls("x-thumb")){return}var n=j.touch.point.x,h=this.element,c=h.getX(),d=n-c-(this.thumbWidth/2),o=this.constrainValue(d/this.offsetValueRatio),r=this.getValue(),q=Infinity,m=r.length,g,f,l,p,b,a;if(m===1){p=0}else{for(g=0;g<m;g++){l=r[g];f=Math.abs(l-o);if(f<q){q=f;p=g}}}b=r[p];a=this.getThumb(p);this.setIndexValue(p,o,this.getAnimation());this.refreshThumbConstraints(a);if(b!==o){this.fireEvent("change",this,a,o,b)}},updateThumbs:function(a){this.add(a)},applyValue:function(g){var d=Ext.Array.from(g||0),b=[],c=this.getMinValue(),a,e,f;for(e=0,f=d.length;e<f;e++){a=this.constrainValue(d[e]);if(a<c){a=c}b.push(a);c=a}return b},updateValue:function(e,b){var a=this.getThumbs(),d=e.length,c;this.setThumbsCount(d);for(c=0;c<d;c++){a[c].getDraggable().setExtraConstraint(null).setOffset(e[c]*this.offsetValueRatio)}for(c=0;c<d;c++){this.refreshThumbConstraints(a[c])}},refreshValue:function(){this.refreshOffsetValueRatio();this.setValue(this.getValue())},constrainValue:function(e){var b=this,d=b.getMinValue(),f=b.getMaxValue(),a=b.getIncrement(),c;e=parseFloat(e);if(isNaN(e)){e=d}c=e%a;e-=c;if(Math.abs(c)>=(a/2)){e+=(c>0)?a:-a}e=Math.max(d,e);e=Math.min(f,e);return e},setThumbsCount:function(e){var a=this.getThumbs(),f=a.length,c,d,b;if(f>e){for(c=0,d=f-e;c<d;c++){b=a[a.length-1];b.destroy()}}else{if(f<e){for(c=0,d=e-f;c<d;c++){this.add(this.factoryThumb())}}}return this},setValues:function(a){this.setValue(a)},getValues:function(){return this.getValue()},applyIncrement:function(a){if(a===0){a=1}return Math.abs(a)},updateAllowThumbsOverlapping:function(b,a){if(typeof a!="undefined"){this.refreshValue()}},updateMinValue:function(b,a){if(typeof a!="undefined"){this.refreshValue()}},updateMaxValue:function(b,a){if(typeof a!="undefined"){this.refreshValue()}},updateIncrement:function(b,a){if(typeof a!="undefined"){this.refreshValue()}},doSetDisabled:function(c){this.callParent(arguments);var a=this.getItems().items,d=a.length,b;for(b=0;b<d;b++){a[b].setDisabled(c)}}},function(){});Ext.define("Ext.field.Slider",{extend:"Ext.field.Field",xtype:"sliderfield",requires:["Ext.slider.Slider"],alternateClassName:"Ext.form.Slider",config:{cls:Ext.baseCSSPrefix+"slider-field",tabIndex:-1},proxyConfig:{value:0,minValue:0,maxValue:100,increment:1},constructor:function(a){a=a||{};if(a.hasOwnProperty("values")){a.value=a.values}this.callParent([a])},initialize:function(){this.callParent();this.getComponent().on({scope:this,change:"onSliderChange"})},applyComponent:function(a){return Ext.factory(a,Ext.slider.Slider)},onSliderChange:function(c,a,d,b){this.fireEvent("change",this,a,d,b)},setValues:function(a){this.setValue(a)},getValues:function(){return this.getValue()},reset:function(){var b=this.config,a=(this.config.hasOwnProperty("values"))?b.values:b.value;this.setValue(a)},doSetDisabled:function(a){this.callParent(arguments);this.getComponent().setDisabled(a)}});Ext.define("Ext.slider.Toggle",{extend:"Ext.slider.Slider",config:{baseCls:"x-toggle",minValueCls:"x-toggle-off",maxValueCls:"x-toggle-on"},initialize:function(){this.callParent();this.on({change:"onChange"})},applyMinValue:function(){return 0},applyMaxValue:function(){return 1},applyIncrement:function(){return 1},setValue:function(b,a){this.callParent(arguments);this.onChange(this,this.getThumbs()[0],b,a)},onChange:function(d,a,f,c){var g=f>0,b=d.getMaxValueCls(),e=d.getMinValueCls();this.element.addCls(g?b:e);this.element.removeCls(g?e:b)}});Ext.define("Ext.field.Toggle",{extend:"Ext.field.Slider",xtype:"togglefield",alternateClassName:"Ext.form.Toggle",requires:["Ext.slider.Toggle"],config:{cls:"x-toggle-field"},proxyConfig:{minValueCls:"x-toggle-off",maxValueCls:"x-toggle-on"},applyComponent:function(a){return Ext.factory(a,Ext.slider.Toggle)},setValue:function(a){if(a===true){a=1}this.getComponent().setValue(a);return this},toggle:function(){var a=this.getValue();this.setValue((a==1)?0:1);return this}});Ext.define("Ext.tab.Tab",{extend:"Ext.Button",xtype:"tab",alternateClassName:"Ext.Tab",isTab:true,config:{baseCls:Ext.baseCSSPrefix+"tab",pressedCls:Ext.baseCSSPrefix+"tab-pressed",activeCls:Ext.baseCSSPrefix+"tab-active",active:false,title:"&nbsp;"},template:[{tag:"span",reference:"badgeElement",hidden:true},{tag:"span",className:Ext.baseCSSPrefix+"button-icon",reference:"iconElement",style:"visibility: hidden !important"},{tag:"span",reference:"textElement",hidden:true}],updateTitle:function(a){this.setText(a)},hideIconElement:function(){this.iconElement.dom.style.setProperty("visibility","hidden","!important")},showIconElement:function(){this.iconElement.dom.style.setProperty("visibility","visible","!important")},updateActive:function(c,b){var a=this.getActiveCls();if(c&&!b){this.element.addCls(a);this.fireEvent("activate",this)}else{if(b){this.element.removeCls(a);this.fireEvent("deactivate",this)}}}},function(){this.override({activate:function(){this.setActive(true)},deactivate:function(){this.setActive(false)}})});Ext.define("Ext.tab.Bar",{extend:"Ext.Toolbar",alternateClassName:"Ext.TabBar",xtype:"tabbar",requires:["Ext.tab.Tab"],config:{baseCls:Ext.baseCSSPrefix+"tabbar",defaultType:"tab",layout:{type:"hbox",align:"middle"}},eventedConfig:{activeTab:null},initialize:function(){var a=this;a.callParent();a.on({tap:"onTabTap",delegate:"> tab",scope:a})},onTabTap:function(a){this.setActiveTab(a)},applyActiveTab:function(a,c){if(!a&&a!==0){return}var b=this.parseActiveTab(a);if(!b){return}return b},doSetDocked:function(a){var c=this.getLayout(),b=a=="bottom"?"center":"left";if(c.isLayout){c.setPack(b)}else{c.pack=(c&&c.pack)?c.pack:b}},doSetActiveTab:function(b,a){if(b){b.setActive(true)}if(a){a.setActive(false)}},parseActiveTab:function(a){if(typeof a=="number"){return this.getInnerItems()[a]}else{if(typeof a=="string"){a=Ext.getCmp(a)}}return a}});Ext.define("Ext.tab.Panel",{extend:"Ext.Container",xtype:"tabpanel",alternateClassName:"Ext.TabPanel",requires:["Ext.tab.Bar"],config:{ui:"dark",tabBar:true,tabBarPosition:"top",layout:{type:"card",animation:{type:"slide",direction:"left"}},cls:Ext.baseCSSPrefix+"tabpanel"},delegateListeners:{delegate:"> component",centeredchange:"onItemCenteredChange",dockedchange:"onItemDockedChange",floatingchange:"onItemFloatingChange",disabledchange:"onItemDisabledChange"},initialize:function(){this.callParent();this.on({order:"before",activetabchange:"doTabChange",delegate:"> tabbar",scope:this})},applyScrollable:function(){return false},updateUi:function(a,b){this.callParent(arguments);if(this.initialized){this.getTabBar().setUi(a)}},doSetActiveItem:function(d,j){if(d){var f=this.getInnerItems(),g=f.indexOf(j),i=f.indexOf(d),e=g>i,c=this.getLayout().getAnimation(),b=this.getTabBar(),h=b.parseActiveTab(g),a=b.parseActiveTab(i);if(c&&c.setReverse){c.setReverse(e)}this.callParent(arguments);if(i!=-1){this.getTabBar().setActiveTab(i);if(h){h.setActive(false)}if(a){a.setActive(true)}}}},doTabChange:function(a,b){this.setActiveItem(a.indexOf(b))},applyTabBar:function(a){if(a===true){a={}}if(a){Ext.applyIf(a,{ui:this.getUi(),docked:this.getTabBarPosition()})}return Ext.factory(a,Ext.tab.Bar,this.getTabBar())},updateTabBar:function(a){if(a){this.add(a);this.setTabBarPosition(a.getDocked())}},updateTabBarPosition:function(b){var a=this.getTabBar();if(a){a.setDocked(b)}},onItemAdd:function(e){var k=this;if(!e.isInnerItem()){return k.callParent(arguments)}var c=k.getTabBar(),o=e.getInitialConfig(),d=o.tab||{},g=o.title,i=o.iconCls,j=o.hidden,n=o.disabled,p=o.badgeText,b=k.getInnerItems(),h=b.indexOf(e),l=c.getItems(),a=k.getInnerItems(),m=(l.length>=a.length)&&l.getAt(h),f;if(g&&!d.title){d.title=g}if(i&&!d.iconCls){d.iconCls=i}if(j&&!d.hidden){d.hidden=j}if(n&&!d.disabled){d.disabled=n}if(p&&!d.badgeText){d.badgeText=p}f=Ext.factory(d,Ext.tab.Tab,m);if(!m){c.insert(h,f)}e.tab=f;k.callParent(arguments)},onItemDisabledChange:function(a,b){if(a&&a.tab){a.tab.setDisabled(b)}},onItemRemove:function(b,a){this.getTabBar().remove(b.tab,this.getAutoDestroy());this.callParent(arguments)}},function(){});Ext.define("Ext.table.Cell",{extend:"Ext.Container",xtype:"tablecell",config:{baseCls:"x-table-cell"},getElementConfig:function(){var a=this.callParent();a.children.length=0;return a}});Ext.define("Ext.table.Row",{extend:"Ext.table.Cell",xtype:"tablerow",config:{baseCls:"x-table-row",defaultType:"tablecell"}});Ext.define("Ext.table.Table",{extend:"Ext.Container",requires:["Ext.table.Row"],xtype:"table",config:{baseCls:"x-table",defaultType:"tablerow"},cachedConfig:{fixedLayout:false},fixedLayoutCls:"x-table-fixed",updateFixedLayout:function(a){this.innerElement[a?"addCls":"removeCls"](this.fixedLayoutCls)}});Ext.define("Ext.viewport.Default",{extend:"Ext.Container",xtype:"viewport",PORTRAIT:"portrait",LANDSCAPE:"landscape",requires:["Ext.LoadMask"],config:{autoMaximize:false,autoBlurInput:true,preventPanning:true,preventZooming:true,autoRender:true,layout:"card",width:"100%",height:"100%"},isReady:false,isViewport:true,isMaximizing:false,id:"ext-viewport",isInputRegex:/^(input|textarea|select|a)$/i,focusedElement:null,fullscreenItemCls:Ext.baseCSSPrefix+"fullscreen",constructor:function(a){var b=Ext.Function.bind;this.doPreventPanning=b(this.doPreventPanning,this);this.doPreventZooming=b(this.doPreventZooming,this);this.doBlurInput=b(this.doBlurInput,this);this.maximizeOnEvents=["ready","orientationchange"];this.orientation=this.determineOrientation();this.windowWidth=this.getWindowWidth();this.windowHeight=this.getWindowHeight();this.windowOuterHeight=this.getWindowOuterHeight();if(!this.stretchHeights){this.stretchHeights={}}this.callParent([a]);if(this.supportsOrientation()){this.addWindowListener("orientationchange",b(this.onOrientationChange,this))}else{this.addWindowListener("resize",b(this.onResize,this))}document.addEventListener("focus",b(this.onElementFocus,this),true);document.addEventListener("blur",b(this.onElementBlur,this),true);Ext.onDocumentReady(this.onDomReady,this);this.on("ready",this.onReady,this,{single:true});this.getEventDispatcher().addListener("component","*","fullscreen","onItemFullscreenChange",this);return this},onDomReady:function(){this.isReady=true;this.updateSize();this.fireEvent("ready",this)},onReady:function(){if(this.getAutoRender()){this.render()}},onElementFocus:function(a){this.focusedElement=a.target},onElementBlur:function(){this.focusedElement=null},render:function(){if(!this.rendered){var a=Ext.getBody(),b=Ext.baseCSSPrefix,h=[],d=Ext.os,g=d.name.toLowerCase(),f=Ext.browser.name.toLowerCase(),e=d.version.getMajor(),c=this.getOrientation();this.renderTo(a);h.push(b+d.deviceType.toLowerCase());if(d.is.iPad){h.push(b+"ipad")}h.push(b+g);h.push(b+f);if(e){h.push(b+g+"-"+e)}if(d.is.BlackBerry){h.push(b+"bb")}if(Ext.browser.is.Standalone){h.push(b+"standalone")}h.push(b+c);a.addCls(h)}},applyAutoBlurInput:function(a){var b=(Ext.feature.has.Touch)?"touchstart":"mousedown";if(a){this.addWindowListener(b,this.doBlurInput,false)}else{this.removeWindowListener(b,this.doBlurInput,false)}return a},applyAutoMaximize:function(a){if(a){this.on("ready","doAutoMaximizeOnReady",this,{single:true});this.on("orientationchange","doAutoMaximizeOnOrientationChange",this)}else{this.un("ready","doAutoMaximizeOnReady",this);this.un("orientationchange","doAutoMaximizeOnOrientationChange",this)}return a},applyPreventPanning:function(a){if(a){this.addWindowListener("touchmove",this.doPreventPanning,false)}else{this.removeWindowListener("touchmove",this.doPreventPanning,false)}return a},applyPreventZooming:function(a){var b=(Ext.feature.has.Touch)?"touchstart":"mousedown";if(a){this.addWindowListener(b,this.doPreventZooming,false)}else{this.removeWindowListener(b,this.doPreventZooming,false)}return a},doAutoMaximizeOnReady:function(){var a=arguments[arguments.length-1];a.pause();this.isMaximizing=true;this.on("maximize",function(){this.isMaximizing=false;this.updateSize();a.resume();this.fireEvent("ready",this)},this,{single:true});this.maximize()},doAutoMaximizeOnOrientationChange:function(){var a=arguments[arguments.length-1],b=a.firingArguments;a.pause();this.isMaximizing=true;this.on("maximize",function(){this.isMaximizing=false;this.updateSize();b[1]=this.windowWidth;b[2]=this.windowHeight;a.resume()},this,{single:true});this.maximize()},doBlurInput:function(b){var a=b.target,c=this.focusedElement;if(c&&!this.isInputRegex.test(a.tagName)){delete this.focusedElement;c.blur()}},doPreventPanning:function(a){a.preventDefault()},doPreventZooming:function(b){if("button" in b&&b.button!==0){return}var a=b.target;if(a&&a.nodeType===1&&!this.isInputRegex.test(a.tagName)){b.preventDefault()}},addWindowListener:function(b,c,a){window.addEventListener(b,c,Boolean(a))},removeWindowListener:function(b,c,a){window.removeEventListener(b,c,Boolean(a))},doAddListener:function(a,d,c,b){if(a==="ready"&&this.isReady&&!this.isMaximizing){d.call(c);return this}this.mixins.observable.doAddListener.apply(this,arguments)},supportsOrientation:function(){return Ext.feature.has.Orientation},onResize:function(){var c=this.windowWidth,f=this.windowHeight,e=this.getWindowWidth(),a=this.getWindowHeight(),d=this.getOrientation(),b=this.determineOrientation();if((c!==e||f!==a)&&d!==b){this.fireOrientationChangeEvent(b,d)}},onOrientationChange:function(){var b=this.getOrientation(),a=this.determineOrientation();if(a!==b){this.fireOrientationChangeEvent(a,b)}},fireOrientationChangeEvent:function(b,c){var a=Ext.baseCSSPrefix;Ext.getBody().replaceCls(a+c,a+b);this.orientation=b;this.updateSize();this.fireEvent("orientationchange",this,b,this.windowWidth,this.windowHeight)},updateSize:function(b,a){this.windowWidth=b!==undefined?b:this.getWindowWidth();this.windowHeight=a!==undefined?a:this.getWindowHeight();return this},waitUntil:function(h,e,g,a,f){if(!a){a=50}if(!f){f=2000}var c=this,b=0;setTimeout(function d(){b+=a;if(h.call(c)===true){if(e){e.call(c)}}else{if(b>=f){if(g){g.call(c)}}else{setTimeout(d,a)}}},a)},maximize:function(){this.fireMaximizeEvent()},fireMaximizeEvent:function(){this.updateSize();this.fireEvent("maximize",this)},doSetHeight:function(a){Ext.getBody().setHeight(a);this.callParent(arguments)},doSetWidth:function(a){Ext.getBody().setWidth(a);this.callParent(arguments)},scrollToTop:function(){window.scrollTo(0,-1)},getWindowWidth:function(){return window.innerWidth},getWindowHeight:function(){return window.innerHeight},getWindowOuterHeight:function(){return window.outerHeight},getWindowOrientation:function(){return window.orientation},getOrientation:function(){return this.orientation},getSize:function(){return{width:this.windowWidth,height:this.windowHeight}},determineOrientation:function(){var b=this.PORTRAIT,a=this.LANDSCAPE;if(this.supportsOrientation()){if(this.getWindowOrientation()%180===0){return b}return a}else{if(this.getWindowHeight()>=this.getWindowWidth()){return b}return a}},onItemFullscreenChange:function(a){a.addCls(this.fullscreenItemCls);this.add(a)}});Ext.define("Ext.viewport.Android",{extend:"Ext.viewport.Default",constructor:function(){this.on("orientationchange","doFireOrientationChangeEvent",this,{prepend:true});this.on("orientationchange","hideKeyboardIfNeeded",this,{prepend:true});return this.callParent(arguments)},getDummyInput:function(){var a=this.dummyInput,c=this.focusedElement,b=Ext.fly(c).getPageBox();if(!a){this.dummyInput=a=document.createElement("input");a.style.position="absolute";a.style.opacity="0";document.body.appendChild(a)}a.style.left=b.left+"px";a.style.top=b.top+"px";a.style.display="";return a},doBlurInput:function(c){var b=c.target,d=this.focusedElement,a;if(d&&!this.isInputRegex.test(b.tagName)){a=this.getDummyInput();delete this.focusedElement;a.focus();setTimeout(function(){a.style.display="none"},100)}},hideKeyboardIfNeeded:function(){var a=arguments[arguments.length-1],b=this.focusedElement;if(b){delete this.focusedElement;a.pause();if(Ext.os.version.lt("4")){b.style.display="none"}else{b.blur()}setTimeout(function(){b.style.display="";a.resume()},1000)}},doFireOrientationChangeEvent:function(){var a=arguments[arguments.length-1];this.orientationChanging=true;a.pause();this.waitUntil(function(){return this.getWindowOuterHeight()!==this.windowOuterHeight},function(){this.windowOuterHeight=this.getWindowOuterHeight();this.updateSize();a.firingArguments[1]=this.windowWidth;a.firingArguments[2]=this.windowHeight;a.resume();this.orientationChanging=false},function(){});return this},applyAutoMaximize:function(a){this.callParent(arguments);this.on("add","fixSize",this,{single:true});if(!a){this.on("ready","fixSize",this,{single:true});this.onAfter("orientationchange","doFixSize",this)}else{this.un("ready","fixSize",this);this.unAfter("orientationchange","doFixSize",this)}},fixSize:function(){this.doFixSize()},doFixSize:function(){this.setHeight(this.getWindowHeight())},getActualWindowOuterHeight:function(){return Math.round(this.getWindowOuterHeight()/window.devicePixelRatio)},maximize:function(){var c=this.stretchHeights,b=this.orientation,a;a=c[b];if(!a){c[b]=a=this.getActualWindowOuterHeight()}if(!this.addressBarHeight){this.addressBarHeight=a-this.getWindowHeight()}this.setHeight(a);var d=Ext.Function.bind(this.isHeightMaximized,this,[a]);this.scrollToTop();this.waitUntil(d,this.fireMaximizeEvent,this.fireMaximizeEvent)},isHeightMaximized:function(a){this.scrollToTop();return this.getWindowHeight()===a}},function(){if(!Ext.os.is.Android){return}var a=Ext.os.version,b=Ext.browser.userAgent,c=/(htc|desire|incredible|ADR6300)/i.test(b)&&a.lt("2.3");if(c){this.override({constructor:function(d){if(!d){d={}}d.autoMaximize=false;this.watchDogTick=Ext.Function.bind(this.watchDogTick,this);setInterval(this.watchDogTick,1000);return this.callParent([d])},watchDogTick:function(){this.watchDogLastTick=Ext.Date.now()},doPreventPanning:function(){var e=Ext.Date.now(),f=this.watchDogLastTick,d=e-f;if(d>=2000){return}return this.callParent(arguments)},doPreventZooming:function(){var e=Ext.Date.now(),f=this.watchDogLastTick,d=e-f;if(d>=2000){return}return this.callParent(arguments)}})}if(a.match("2")){this.override({onReady:function(){this.addWindowListener("resize",Ext.Function.bind(this.onWindowResize,this));this.callParent(arguments)},scrollToTop:function(){document.body.scrollTop=100},onWindowResize:function(){var e=this.windowWidth,g=this.windowHeight,f=this.getWindowWidth(),d=this.getWindowHeight();if(this.getAutoMaximize()&&!this.isMaximizing&&!this.orientationChanging&&window.scrollY===0&&e===f&&d<g&&((d>=g-this.addressBarHeight)||!this.focusedElement)){this.scrollToTop()}},fixSize:function(){var d=this.getOrientation(),f=window.outerHeight,g=window.outerWidth,e;if(d==="landscape"&&(f<g)||d==="portrait"&&(f>=g)){e=this.getActualWindowOuterHeight()}else{e=this.getWindowHeight()}this.waitUntil(function(){return e>this.getWindowHeight()},this.doFixSize,this.doFixSize,50,1000)}})}else{if(a.gtEq("3.1")){this.override({isHeightMaximized:function(d){this.scrollToTop();return this.getWindowHeight()===d-1}})}else{if(a.match("3")){this.override({isHeightMaximized:function(){this.scrollToTop();return true}})}}}if(a.gtEq("4")){this.override({doBlurInput:Ext.emptyFn})}});Ext.define("Ext.viewport.Ios",{extend:"Ext.viewport.Default",isFullscreen:function(){return this.isHomeScreen()},isHomeScreen:function(){return window.navigator.standalone===true},constructor:function(){this.callParent(arguments);if(this.getAutoMaximize()&&!this.isFullscreen()){this.addWindowListener("touchstart",Ext.Function.bind(this.onTouchStart,this))}},maximize:function(){if(this.isFullscreen()){return this.callParent()}var c=this.stretchHeights,b=this.orientation,d=this.getWindowHeight(),a=c[b];if(window.scrollY>0){this.scrollToTop();if(!a){c[b]=a=this.getWindowHeight()}this.setHeight(a);this.fireMaximizeEvent()}else{if(!a){a=this.getScreenHeight()}this.setHeight(a);this.waitUntil(function(){this.scrollToTop();return d!==this.getWindowHeight()},function(){if(!c[b]){a=c[b]=this.getWindowHeight();this.setHeight(a)}this.fireMaximizeEvent()},function(){a=c[b]=this.getWindowHeight();this.setHeight(a);this.fireMaximizeEvent()},50,1000)}},getScreenHeight:function(){return window.screen[this.orientation===this.PORTRAIT?"height":"width"]},onElementFocus:function(){if(this.getAutoMaximize()&&!this.isFullscreen()){clearTimeout(this.scrollToTopTimer)}this.callParent(arguments)},onElementBlur:function(){if(this.getAutoMaximize()&&!this.isFullscreen()){this.scrollToTopTimer=setTimeout(this.scrollToTop,500)}this.callParent(arguments)},onTouchStart:function(){if(this.focusedElement===null){this.scrollToTop()}},scrollToTop:function(){window.scrollTo(0,0)}},function(){if(!Ext.os.is.iOS){return}if(Ext.os.version.lt("3.2")){this.override({constructor:function(){var a=this.stretchHeights={};a[this.PORTRAIT]=416;a[this.LANDSCAPE]=268;return this.callOverridden(arguments)}})}if(Ext.os.version.lt("5")){this.override({fieldMaskClsTest:"-field-mask",doPreventZooming:function(b){var a=b.target;if(a&&a.nodeType===1&&!this.isInputRegex.test(a.tagName)&&a.className.indexOf(this.fieldMaskClsTest)==-1){b.preventDefault()}}})}if(Ext.os.is.iPad){this.override({isFullscreen:function(){return true}})}});Ext.define("Ext.viewport.Viewport",{requires:["Ext.viewport.Ios","Ext.viewport.Android"],constructor:function(b){var c=Ext.os.name,d,a;switch(c){case"Android":d="Android";break;case"iOS":d="Ios";break;default:d="Default"}a=Ext.create("Ext.viewport."+d,b);return a}});Ext.define("Ext.event.recognizer.Swipe",{extend:"Ext.event.recognizer.SingleTouch",handledEvents:["swipe"],inheritableStatics:{MAX_OFFSET_EXCEEDED:16,MAX_DURATION_EXCEEDED:17,DISTANCE_NOT_ENOUGH:18},config:{minDistance:80,maxOffset:35,maxDuration:1000},onTouchStart:function(a){if(this.callParent(arguments)===false){return false}var b=a.changedTouches[0];this.startTime=a.time;this.isHorizontal=true;this.isVertical=true;this.startX=b.pageX;this.startY=b.pageY},onTouchMove:function(f){var h=f.changedTouches[0],b=h.pageX,g=h.pageY,c=Math.abs(b-this.startX),a=Math.abs(g-this.startY),d=f.time;if(d-this.startTime>this.getMaxDuration()){return this.fail(this.self.MAX_DURATION_EXCEEDED)}if(this.isVertical&&c>this.getMaxOffset()){this.isVertical=false}if(this.isHorizontal&&a>this.getMaxOffset()){this.isHorizontal=false}if(!this.isHorizontal&&!this.isVertical){return this.fail(this.self.MAX_OFFSET_EXCEEDED)}},onTouchEnd:function(i){if(this.onTouchMove(i)===false){return false}var h=i.changedTouches[0],l=h.pageX,j=h.pageY,g=l-this.startX,f=j-this.startY,c=Math.abs(g),b=Math.abs(f),m=this.getMinDistance(),d=i.time-this.startTime,k,a;if(this.isVertical&&b<m){this.isVertical=false}if(this.isHorizontal&&c<m){this.isHorizontal=false}if(this.isHorizontal){k=(g<0)?"left":"right";a=c}else{if(this.isVertical){k=(f<0)?"up":"down";a=b}else{return this.fail(this.self.DISTANCE_NOT_ENOUGH)}}this.fire("swipe",i,[h],{touch:h,direction:k,distance:a,duration:d})}});Ext.define("Ext.event.recognizer.HorizontalSwipe",{extend:"Ext.event.recognizer.Swipe",handledEvents:["swipe"],onTouchStart:function(a){if(this.callParent(arguments)===false){return false}var b=a.changedTouches[0];this.startTime=a.time;this.startX=b.pageX;this.startY=b.pageY},onTouchMove:function(f){var h=f.changedTouches[0],g=h.pageY,a=Math.abs(g-this.startY),d=f.time,c=this.getMaxDuration(),b=this.getMaxOffset();if(d-this.startTime>c){return this.fail(this.self.MAX_DURATION_EXCEEDED)}if(a>b){return this.fail(this.self.MAX_OFFSET_EXCEEDED)}},onTouchEnd:function(f){if(this.onTouchMove(f)!==false){var i=f.changedTouches[0],a=i.pageX,b=a-this.startX,h=Math.abs(b),d=f.time-this.startTime,g=this.getMinDistance(),c;if(h<g){return this.fail(this.self.DISTANCE_NOT_ENOUGH)}c=(b<0)?"left":"right";this.fire("swipe",f,[i],{touch:i,direction:c,distance:h,duration:d})}}});
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/welcome.odt b/apps/files_odfviewer/src/webodf/programs/touchui/welcome.odt
deleted file mode 100644
index 22e4d928241..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/welcome.odt
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/zoom-fit-best.png b/apps/files_odfviewer/src/webodf/programs/touchui/zoom-fit-best.png
deleted file mode 100644
index 623885a0229..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/zoom-fit-best.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/zoom-fit-height.png b/apps/files_odfviewer/src/webodf/programs/touchui/zoom-fit-height.png
deleted file mode 100644
index 7f8d1935c64..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/zoom-fit-height.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/programs/touchui/zoom-fit-width.png b/apps/files_odfviewer/src/webodf/programs/touchui/zoom-fit-width.png
deleted file mode 100644
index 5bd06de6979..00000000000
--- a/apps/files_odfviewer/src/webodf/programs/touchui/zoom-fit-width.png
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/simplerevisionserver/webdavserver.py b/apps/files_odfviewer/src/webodf/simplerevisionserver/webdavserver.py
deleted file mode 100755
index d9125699c8e..00000000000
--- a/apps/files_odfviewer/src/webodf/simplerevisionserver/webdavserver.py
+++ /dev/null
@@ -1,77 +0,0 @@
-#! /usr/bin/env python
-
-import BaseHTTPServer, SimpleHTTPServer, re, os, sys, xml.etree.ElementTree
-from xml.etree.ElementTree import Element
-from xml.etree.ElementTree import ElementTree
-from xml.etree.ElementTree import QName
-from xml.etree.ElementTree import SubElement
-
-class WebDAVRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
- def do_GET(self):
- # handle headers like Range: bytes=0-1023
- if 'Range' in self.headers:
- m = re.match('\s*bytes\s*=\s*(\d+)\s*-\s*(\d+)\s*',
- self.headers['Range'])
- if m:
- start = int(m.group(1))
- end = int(m.group(2))
- f = self.send_range_head(start, end)
- if f:
- self.copyfilerange(f, self.wfile, start,
- end)
- f.close()
- return
- return SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
-
- def do_PROPFIND(self):
- print 'PROPFIND ' + self.path
- for key in self.headers.keys():
- print key + '\t' + self.headers[key]
- req = self.parseinputxml()
- req = ElementTree(req)
- res = ElementTree(Element(QName("DAV:", 'multistatus')))
- self.addresponse('/', res.getroot(), 0)
-
- self.writeresponse(res)
-
- def do_OPTIONS(self):
- req = self.parseinputxml()
- print req
- self.send_response(200)
- self.send_header("DAV", "1");
- self.end_headers()
- self.wfile.close()
-
- def parseinputxml(self):
- try:
- contentlength = int(self.headers['content-length'])
- except:
- return None
- data = self.rfile.read(contentlength)
- print data
- return xml.etree.ElementTree.fromstring(data)
-
- def writeresponse(self, response):
- self.send_response(200)
- self.send_header("Content-Type", 'text/xml; charset="utf-8"')
- self.end_headers()
- response.write(self.wfile, 'utf-8')
-# response.write(sys.stdout, 'utf-8')
-# sys.stdout.flush()
- d = xml.etree.ElementTree.tostring(response.getroot(), 'utf-8')
- print d
- self.wfile.close()
-
- def addresponse(self, path, root, depth):
- e = SubElement(root, QName("DAV:", 'response'))
- href = SubElement(e, QName("DAV:", 'href'))
- href.text = path
- propstat = SubElement(e, QName("DAV:", 'propstat'))
- prop = SubElement(propstat, QName("DAV:", 'resourcetype'))
- if os.path.isdir(path):
- SubElement(prop, QName("DAV:", 'collection'))
-
-if __name__ == '__main__':
- server_address = ('', 8080)
- httpd = BaseHTTPServer.HTTPServer(server_address, WebDAVRequestHandler)
- httpd.serve_forever()
diff --git a/apps/files_odfviewer/src/webodf/webodf/APPNOTE.txt b/apps/files_odfviewer/src/webodf/webodf/APPNOTE.txt
deleted file mode 100644
index 45ef5bcd07e..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/APPNOTE.txt
+++ /dev/null
@@ -1,3218 +0,0 @@
-File: APPNOTE.TXT - .ZIP File Format Specification
-Version: 6.3.2
-Revised: September 28, 2007
-Copyright (c) 1989 - 2007 PKWARE Inc., All Rights Reserved.
-
-The use of certain technological aspects disclosed in the current
-APPNOTE is available pursuant to the below section entitled
-"Incorporating PKWARE Proprietary Technology into Your Product".
-
-I. Purpose
-----------
-
-This specification is intended to define a cross-platform,
-interoperable file storage and transfer format. Since its
-first publication in 1989, PKWARE has remained committed to
-ensuring the interoperability of the .ZIP file format through
-publication and maintenance of this specification. We trust that
-all .ZIP compatible vendors and application developers that have
-adopted and benefited from this format will share and support
-this commitment to interoperability.
-
-II. Contacting PKWARE
----------------------
-
- PKWARE, Inc.
- 648 N. Plankinton Avenue, Suite 220
- Milwaukee, WI 53203
- +1-414-289-9788
- +1-414-289-9789 FAX
- zipformat@pkware.com
-
-III. Disclaimer
----------------
-
-Although PKWARE will attempt to supply current and accurate
-information relating to its file formats, algorithms, and the
-subject programs, the possibility of error or omission cannot
-be eliminated. PKWARE therefore expressly disclaims any warranty
-that the information contained in the associated materials relating
-to the subject programs and/or the format of the files created or
-accessed by the subject programs and/or the algorithms used by
-the subject programs, or any other matter, is current, correct or
-accurate as delivered. Any risk of damage due to any possible
-inaccurate information is assumed by the user of the information.
-Furthermore, the information relating to the subject programs
-and/or the file formats created or accessed by the subject
-programs and/or the algorithms used by the subject programs is
-subject to change without notice.
-
-If the version of this file is marked as a NOTIFICATION OF CHANGE,
-the content defines an Early Feature Specification (EFS) change
-to the .ZIP file format that may be subject to modification prior
-to publication of the Final Feature Specification (FFS). This
-document may also contain information on Planned Feature
-Specifications (PFS) defining recognized future extensions.
-
-IV. Change Log
---------------
-
-Version Change Description Date
-------- ------------------ ----------
-5.2 -Single Password Symmetric Encryption 06/02/2003
- storage
-
-6.1.0 -Smartcard compatibility 01/20/2004
- -Documentation on certificate storage
-
-6.2.0 -Introduction of Central Directory 04/26/2004
- Encryption for encrypting metadata
- -Added OS/X to Version Made By values
-
-6.2.1 -Added Extra Field placeholder for 04/01/2005
- POSZIP using ID 0x4690
-
- -Clarified size field on
- "zip64 end of central directory record"
-
-6.2.2 -Documented Final Feature Specification 01/06/2006
- for Strong Encryption
-
- -Clarifications and typographical
- corrections
-
-6.3.0 -Added tape positioning storage 09/29/2006
- parameters
-
- -Expanded list of supported hash algorithms
-
- -Expanded list of supported compression
- algorithms
-
- -Expanded list of supported encryption
- algorithms
-
- -Added option for Unicode filename
- storage
-
- -Clarifications for consistent use
- of Data Descriptor records
-
- -Added additional "Extra Field"
- definitions
-
-6.3.1 -Corrected standard hash values for 04/11/2007
- SHA-256/384/512
-
-6.3.2 -Added compression method 97 09/28/2007
-
- -Documented InfoZIP "Extra Field"
- values for UTF-8 file name and
- file comment storage
-
-V. General Format of a .ZIP file
---------------------------------
-
- Files stored in arbitrary order. Large .ZIP files can span multiple
- volumes or be split into user-defined segment sizes. All values
- are stored in little-endian byte order unless otherwise specified.
-
- Overall .ZIP file format:
-
- [local file header 1]
- [file data 1]
- [data descriptor 1]
- .
- .
- .
- [local file header n]
- [file data n]
- [data descriptor n]
- [archive decryption header]
- [archive extra data record]
- [central directory]
- [zip64 end of central directory record]
- [zip64 end of central directory locator]
- [end of central directory record]
-
-
- A. Local file header:
-
- local file header signature 4 bytes (0x04034b50)
- version needed to extract 2 bytes
- general purpose bit flag 2 bytes
- compression method 2 bytes
- last mod file time 2 bytes
- last mod file date 2 bytes
- crc-32 4 bytes
- compressed size 4 bytes
- uncompressed size 4 bytes
- file name length 2 bytes
- extra field length 2 bytes
-
- file name (variable size)
- extra field (variable size)
-
- B. File data
-
- Immediately following the local header for a file
- is the compressed or stored data for the file.
- The series of [local file header][file data][data
- descriptor] repeats for each file in the .ZIP archive.
-
- C. Data descriptor:
-
- crc-32 4 bytes
- compressed size 4 bytes
- uncompressed size 4 bytes
-
- This descriptor exists only if bit 3 of the general
- purpose bit flag is set (see below). It is byte aligned
- and immediately follows the last byte of compressed data.
- This descriptor is used only when it was not possible to
- seek in the output .ZIP file, e.g., when the output .ZIP file
- was standard output or a non-seekable device. For ZIP64(tm) format
- archives, the compressed and uncompressed sizes are 8 bytes each.
-
- When compressing files, compressed and uncompressed sizes
- should be stored in ZIP64 format (as 8 byte values) when a
- files size exceeds 0xFFFFFFFF. However ZIP64 format may be
- used regardless of the size of a file. When extracting, if
- the zip64 extended information extra field is present for
- the file the compressed and uncompressed sizes will be 8
- byte values.
-
- Although not originally assigned a signature, the value
- 0x08074b50 has commonly been adopted as a signature value
- for the data descriptor record. Implementers should be
- aware that ZIP files may be encountered with or without this
- signature marking data descriptors and should account for
- either case when reading ZIP files to ensure compatibility.
- When writing ZIP files, it is recommended to include the
- signature value marking the data descriptor record. When
- the signature is used, the fields currently defined for
- the data descriptor record will immediately follow the
- signature.
-
- An extensible data descriptor will be released in a future
- version of this APPNOTE. This new record is intended to
- resolve conflicts with the use of this record going forward,
- and to provide better support for streamed file processing.
-
- When the Central Directory Encryption method is used, the data
- descriptor record is not required, but may be used. If present,
- and bit 3 of the general purpose bit field is set to indicate
- its presence, the values in fields of the data descriptor
- record should be set to binary zeros.
-
- D. Archive decryption header:
-
- The Archive Decryption Header is introduced in version 6.2
- of the ZIP format specification. This record exists in support
- of the Central Directory Encryption Feature implemented as part of
- the Strong Encryption Specification as described in this document.
- When the Central Directory Structure is encrypted, this decryption
- header will precede the encrypted data segment. The encrypted
- data segment will consist of the Archive extra data record (if
- present) and the encrypted Central Directory Structure data.
- The format of this data record is identical to the Decryption
- header record preceding compressed file data. If the central
- directory structure is encrypted, the location of the start of
- this data record is determined using the Start of Central Directory
- field in the Zip64 End of Central Directory record. Refer to the
- section on the Strong Encryption Specification for information
- on the fields used in the Archive Decryption Header record.
-
-
- E. Archive extra data record:
-
- archive extra data signature 4 bytes (0x08064b50)
- extra field length 4 bytes
- extra field data (variable size)
-
- The Archive Extra Data Record is introduced in version 6.2
- of the ZIP format specification. This record exists in support
- of the Central Directory Encryption Feature implemented as part of
- the Strong Encryption Specification as described in this document.
- When present, this record immediately precedes the central
- directory data structure. The size of this data record will be
- included in the Size of the Central Directory field in the
- End of Central Directory record. If the central directory structure
- is compressed, but not encrypted, the location of the start of
- this data record is determined using the Start of Central Directory
- field in the Zip64 End of Central Directory record.
-
-
- F. Central directory structure:
-
- [file header 1]
- .
- .
- .
- [file header n]
- [digital signature]
-
- File header:
-
- central file header signature 4 bytes (0x02014b50)
- version made by 2 bytes
- version needed to extract 2 bytes
- general purpose bit flag 2 bytes
- compression method 2 bytes
- last mod file time 2 bytes
- last mod file date 2 bytes
- crc-32 4 bytes
- compressed size 4 bytes
- uncompressed size 4 bytes
- file name length 2 bytes
- extra field length 2 bytes
- file comment length 2 bytes
- disk number start 2 bytes
- internal file attributes 2 bytes
- external file attributes 4 bytes
- relative offset of local header 4 bytes
-
- file name (variable size)
- extra field (variable size)
- file comment (variable size)
-
- Digital signature:
-
- header signature 4 bytes (0x05054b50)
- size of data 2 bytes
- signature data (variable size)
-
- With the introduction of the Central Directory Encryption
- feature in version 6.2 of this specification, the Central
- Directory Structure may be stored both compressed and encrypted.
- Although not required, it is assumed when encrypting the
- Central Directory Structure, that it will be compressed
- for greater storage efficiency. Information on the
- Central Directory Encryption feature can be found in the section
- describing the Strong Encryption Specification. The Digital
- Signature record will be neither compressed nor encrypted.
-
- G. Zip64 end of central directory record
-
- zip64 end of central dir
- signature 4 bytes (0x06064b50)
- size of zip64 end of central
- directory record 8 bytes
- version made by 2 bytes
- version needed to extract 2 bytes
- number of this disk 4 bytes
- number of the disk with the
- start of the central directory 4 bytes
- total number of entries in the
- central directory on this disk 8 bytes
- total number of entries in the
- central directory 8 bytes
- size of the central directory 8 bytes
- offset of start of central
- directory with respect to
- the starting disk number 8 bytes
- zip64 extensible data sector (variable size)
-
- The value stored into the "size of zip64 end of central
- directory record" should be the size of the remaining
- record and should not include the leading 12 bytes.
-
- Size = SizeOfFixedFields + SizeOfVariableData - 12.
-
- The above record structure defines Version 1 of the
- zip64 end of central directory record. Version 1 was
- implemented in versions of this specification preceding
- 6.2 in support of the ZIP64 large file feature. The
- introduction of the Central Directory Encryption feature
- implemented in version 6.2 as part of the Strong Encryption
- Specification defines Version 2 of this record structure.
- Refer to the section describing the Strong Encryption
- Specification for details on the version 2 format for
- this record.
-
- Special purpose data may reside in the zip64 extensible data
- sector field following either a V1 or V2 version of this
- record. To ensure identification of this special purpose data
- it must include an identifying header block consisting of the
- following:
-
- Header ID - 2 bytes
- Data Size - 4 bytes
-
- The Header ID field indicates the type of data that is in the
- data block that follows.
-
- Data Size identifies the number of bytes that follow for this
- data block type.
-
- Multiple special purpose data blocks may be present, but each
- must be preceded by a Header ID and Data Size field. Current
- mappings of Header ID values supported in this field are as
- defined in APPENDIX C.
-
- H. Zip64 end of central directory locator
-
- zip64 end of central dir locator
- signature 4 bytes (0x07064b50)
- number of the disk with the
- start of the zip64 end of
- central directory 4 bytes
- relative offset of the zip64
- end of central directory record 8 bytes
- total number of disks 4 bytes
-
- I. End of central directory record:
-
- end of central dir signature 4 bytes (0x06054b50)
- number of this disk 2 bytes
- number of the disk with the
- start of the central directory 2 bytes
- total number of entries in the
- central directory on this disk 2 bytes
- total number of entries in
- the central directory 2 bytes
- size of the central directory 4 bytes
- offset of start of central
- directory with respect to
- the starting disk number 4 bytes
- .ZIP file comment length 2 bytes
- .ZIP file comment (variable size)
-
- J. Explanation of fields:
-
- version made by (2 bytes)
-
- The upper byte indicates the compatibility of the file
- attribute information. If the external file attributes
- are compatible with MS-DOS and can be read by PKZIP for
- DOS version 2.04g then this value will be zero. If these
- attributes are not compatible, then this value will
- identify the host system on which the attributes are
- compatible. Software can use this information to determine
- the line record format for text files etc. The current
- mappings are:
-
- 0 - MS-DOS and OS/2 (FAT / VFAT / FAT32 file systems)
- 1 - Amiga 2 - OpenVMS
- 3 - UNIX 4 - VM/CMS
- 5 - Atari ST 6 - OS/2 H.P.F.S.
- 7 - Macintosh 8 - Z-System
- 9 - CP/M 10 - Windows NTFS
- 11 - MVS (OS/390 - Z/OS) 12 - VSE
- 13 - Acorn Risc 14 - VFAT
- 15 - alternate MVS 16 - BeOS
- 17 - Tandem 18 - OS/400
- 19 - OS/X (Darwin) 20 thru 255 - unused
-
- The lower byte indicates the ZIP specification version
- (the version of this document) supported by the software
- used to encode the file. The value/10 indicates the major
- version number, and the value mod 10 is the minor version
- number.
-
- version needed to extract (2 bytes)
-
- The minimum supported ZIP specification version needed to
- extract the file, mapped as above. This value is based on
- the specific format features a ZIP program must support to
- be able to extract the file. If multiple features are
- applied to a file, the minimum version should be set to the
- feature having the highest value. New features or feature
- changes affecting the published format specification will be
- implemented using higher version numbers than the last
- published value to avoid conflict.
-
- Current minimum feature versions are as defined below:
-
- 1.0 - Default value
- 1.1 - File is a volume label
- 2.0 - File is a folder (directory)
- 2.0 - File is compressed using Deflate compression
- 2.0 - File is encrypted using traditional PKWARE encryption
- 2.1 - File is compressed using Deflate64(tm)
- 2.5 - File is compressed using PKWARE DCL Implode
- 2.7 - File is a patch data set
- 4.5 - File uses ZIP64 format extensions
- 4.6 - File is compressed using BZIP2 compression*
- 5.0 - File is encrypted using DES
- 5.0 - File is encrypted using 3DES
- 5.0 - File is encrypted using original RC2 encryption
- 5.0 - File is encrypted using RC4 encryption
- 5.1 - File is encrypted using AES encryption
- 5.1 - File is encrypted using corrected RC2 encryption**
- 5.2 - File is encrypted using corrected RC2-64 encryption**
- 6.1 - File is encrypted using non-OAEP key wrapping***
- 6.2 - Central directory encryption
- 6.3 - File is compressed using LZMA
- 6.3 - File is compressed using PPMd+
- 6.3 - File is encrypted using Blowfish
- 6.3 - File is encrypted using Twofish
-
-
- * Early 7.x (pre-7.2) versions of PKZIP incorrectly set the
- version needed to extract for BZIP2 compression to be 50
- when it should have been 46.
-
- ** Refer to the section on Strong Encryption Specification
- for additional information regarding RC2 corrections.
-
- *** Certificate encryption using non-OAEP key wrapping is the
- intended mode of operation for all versions beginning with 6.1.
- Support for OAEP key wrapping should only be used for
- backward compatibility when sending ZIP files to be opened by
- versions of PKZIP older than 6.1 (5.0 or 6.0).
-
- + Files compressed using PPMd should set the version
- needed to extract field to 6.3, however, not all ZIP
- programs enforce this and may be unable to decompress
- data files compressed using PPMd if this value is set.
-
- When using ZIP64 extensions, the corresponding value in the
- zip64 end of central directory record should also be set.
- This field should be set appropriately to indicate whether
- Version 1 or Version 2 format is in use.
-
- general purpose bit flag: (2 bytes)
-
- Bit 0: If set, indicates that the file is encrypted.
-
- (For Method 6 - Imploding)
- Bit 1: If the compression method used was type 6,
- Imploding, then this bit, if set, indicates
- an 8K sliding dictionary was used. If clear,
- then a 4K sliding dictionary was used.
- Bit 2: If the compression method used was type 6,
- Imploding, then this bit, if set, indicates
- 3 Shannon-Fano trees were used to encode the
- sliding dictionary output. If clear, then 2
- Shannon-Fano trees were used.
-
- (For Methods 8 and 9 - Deflating)
- Bit 2 Bit 1
- 0 0 Normal (-en) compression option was used.
- 0 1 Maximum (-exx/-ex) compression option was used.
- 1 0 Fast (-ef) compression option was used.
- 1 1 Super Fast (-es) compression option was used.
-
- (For Method 14 - LZMA)
- Bit 1: If the compression method used was type 14,
- LZMA, then this bit, if set, indicates
- an end-of-stream (EOS) marker is used to
- mark the end of the compressed data stream.
- If clear, then an EOS marker is not present
- and the compressed data size must be known
- to extract.
-
- Note: Bits 1 and 2 are undefined if the compression
- method is any other.
-
- Bit 3: If this bit is set, the fields crc-32, compressed
- size and uncompressed size are set to zero in the
- local header. The correct values are put in the
- data descriptor immediately following the compressed
- data. (Note: PKZIP version 2.04g for DOS only
- recognizes this bit for method 8 compression, newer
- versions of PKZIP recognize this bit for any
- compression method.)
-
- Bit 4: Reserved for use with method 8, for enhanced
- deflating.
-
- Bit 5: If this bit is set, this indicates that the file is
- compressed patched data. (Note: Requires PKZIP
- version 2.70 or greater)
-
- Bit 6: Strong encryption. If this bit is set, you should
- set the version needed to extract value to at least
- 50 and you must also set bit 0. If AES encryption
- is used, the version needed to extract value must
- be at least 51.
-
- Bit 7: Currently unused.
-
- Bit 8: Currently unused.
-
- Bit 9: Currently unused.
-
- Bit 10: Currently unused.
-
- Bit 11: Language encoding flag (EFS). If this bit is set,
- the filename and comment fields for this file
- must be encoded using UTF-8. (see APPENDIX D)
-
- Bit 12: Reserved by PKWARE for enhanced compression.
-
- Bit 13: Used when encrypting the Central Directory to indicate
- selected data values in the Local Header are masked to
- hide their actual values. See the section describing
- the Strong Encryption Specification for details.
-
- Bit 14: Reserved by PKWARE.
-
- Bit 15: Reserved by PKWARE.
-
- compression method: (2 bytes)
-
- (see accompanying documentation for algorithm
- descriptions)
-
- 0 - The file is stored (no compression)
- 1 - The file is Shrunk
- 2 - The file is Reduced with compression factor 1
- 3 - The file is Reduced with compression factor 2
- 4 - The file is Reduced with compression factor 3
- 5 - The file is Reduced with compression factor 4
- 6 - The file is Imploded
- 7 - Reserved for Tokenizing compression algorithm
- 8 - The file is Deflated
- 9 - Enhanced Deflating using Deflate64(tm)
- 10 - PKWARE Data Compression Library Imploding (old IBM TERSE)
- 11 - Reserved by PKWARE
- 12 - File is compressed using BZIP2 algorithm
- 13 - Reserved by PKWARE
- 14 - LZMA (EFS)
- 15 - Reserved by PKWARE
- 16 - Reserved by PKWARE
- 17 - Reserved by PKWARE
- 18 - File is compressed using IBM TERSE (new)
- 19 - IBM LZ77 z Architecture (PFS)
- 97 - WavPack compressed data
- 98 - PPMd version I, Rev 1
-
- date and time fields: (2 bytes each)
-
- The date and time are encoded in standard MS-DOS format.
- If input came from standard input, the date and time are
- those at which compression was started for this data.
- If encrypting the central directory and general purpose bit
- flag 13 is set indicating masking, the value stored in the
- Local Header will be zero.
-
- CRC-32: (4 bytes)
-
- The CRC-32 algorithm was generously contributed by
- David Schwaderer and can be found in his excellent
- book "C Programmers Guide to NetBIOS" published by
- Howard W. Sams & Co. Inc. The 'magic number' for
- the CRC is 0xdebb20e3. The proper CRC pre and post
- conditioning is used, meaning that the CRC register
- is pre-conditioned with all ones (a starting value
- of 0xffffffff) and the value is post-conditioned by
- taking the one's complement of the CRC residual.
- If bit 3 of the general purpose flag is set, this
- field is set to zero in the local header and the correct
- value is put in the data descriptor and in the central
- directory. When encrypting the central directory, if the
- local header is not in ZIP64 format and general purpose
- bit flag 13 is set indicating masking, the value stored
- in the Local Header will be zero.
-
- compressed size: (4 bytes)
- uncompressed size: (4 bytes)
-
- The size of the file compressed and uncompressed,
- respectively. When a decryption header is present it will
- be placed in front of the file data and the value of the
- compressed file size will include the bytes of the decryption
- header. If bit 3 of the general purpose bit flag is set,
- these fields are set to zero in the local header and the
- correct values are put in the data descriptor and
- in the central directory. If an archive is in ZIP64 format
- and the value in this field is 0xFFFFFFFF, the size will be
- in the corresponding 8 byte ZIP64 extended information
- extra field. When encrypting the central directory, if the
- local header is not in ZIP64 format and general purpose bit
- flag 13 is set indicating masking, the value stored for the
- uncompressed size in the Local Header will be zero.
-
- file name length: (2 bytes)
- extra field length: (2 bytes)
- file comment length: (2 bytes)
-
- The length of the file name, extra field, and comment
- fields respectively. The combined length of any
- directory record and these three fields should not
- generally exceed 65,535 bytes. If input came from standard
- input, the file name length is set to zero.
-
- disk number start: (2 bytes)
-
- The number of the disk on which this file begins. If an
- archive is in ZIP64 format and the value in this field is
- 0xFFFF, the size will be in the corresponding 4 byte zip64
- extended information extra field.
-
- internal file attributes: (2 bytes)
-
- Bits 1 and 2 are reserved for use by PKWARE.
-
- The lowest bit of this field indicates, if set, that
- the file is apparently an ASCII or text file. If not
- set, that the file apparently contains binary data.
- The remaining bits are unused in version 1.0.
-
- The 0x0002 bit of this field indicates, if set, that a
- 4 byte variable record length control field precedes each
- logical record indicating the length of the record. The
- record length control field is stored in little-endian byte
- order. This flag is independent of text control characters,
- and if used in conjunction with text data, includes any
- control characters in the total length of the record. This
- value is provided for mainframe data transfer support.
-
- external file attributes: (4 bytes)
-
- The mapping of the external attributes is
- host-system dependent (see 'version made by'). For
- MS-DOS, the low order byte is the MS-DOS directory
- attribute byte. If input came from standard input, this
- field is set to zero.
-
- relative offset of local header: (4 bytes)
-
- This is the offset from the start of the first disk on
- which this file appears, to where the local header should
- be found. If an archive is in ZIP64 format and the value
- in this field is 0xFFFFFFFF, the size will be in the
- corresponding 8 byte zip64 extended information extra field.
-
- file name: (Variable)
-
- The name of the file, with optional relative path.
- The path stored should not contain a drive or
- device letter, or a leading slash. All slashes
- should be forward slashes '/' as opposed to
- backwards slashes '\' for compatibility with Amiga
- and UNIX file systems etc. If input came from standard
- input, there is no file name field. If encrypting
- the central directory and general purpose bit flag 13 is set
- indicating masking, the file name stored in the Local Header
- will not be the actual file name. A masking value consisting
- of a unique hexadecimal value will be stored. This value will
- be sequentially incremented for each file in the archive. See
- the section on the Strong Encryption Specification for details
- on retrieving the encrypted file name.
-
- extra field: (Variable)
-
- This is for expansion. If additional information
- needs to be stored for special needs or for specific
- platforms, it should be stored here. Earlier versions
- of the software can then safely skip this file, and
- find the next file or header. This field will be 0
- length in version 1.0.
-
- In order to allow different programs and different types
- of information to be stored in the 'extra' field in .ZIP
- files, the following structure should be used for all
- programs storing data in this field:
-
- header1+data1 + header2+data2 . . .
-
- Each header should consist of:
-
- Header ID - 2 bytes
- Data Size - 2 bytes
-
- Note: all fields stored in Intel low-byte/high-byte order.
-
- The Header ID field indicates the type of data that is in
- the following data block.
-
- Header ID's of 0 thru 31 are reserved for use by PKWARE.
- The remaining ID's can be used by third party vendors for
- proprietary usage.
-
- The current Header ID mappings defined by PKWARE are:
-
- 0x0001 Zip64 extended information extra field
- 0x0007 AV Info
- 0x0008 Reserved for extended language encoding data (PFS)
- (see APPENDIX D)
- 0x0009 OS/2
- 0x000a NTFS
- 0x000c OpenVMS
- 0x000d UNIX
- 0x000e Reserved for file stream and fork descriptors
- 0x000f Patch Descriptor
- 0x0014 PKCS#7 Store for X.509 Certificates
- 0x0015 X.509 Certificate ID and Signature for
- individual file
- 0x0016 X.509 Certificate ID for Central Directory
- 0x0017 Strong Encryption Header
- 0x0018 Record Management Controls
- 0x0019 PKCS#7 Encryption Recipient Certificate List
- 0x0065 IBM S/390 (Z390), AS/400 (I400) attributes
- - uncompressed
- 0x0066 Reserved for IBM S/390 (Z390), AS/400 (I400)
- attributes - compressed
- 0x4690 POSZIP 4690 (reserved)
-
- Third party mappings commonly used are:
-
-
- 0x07c8 Macintosh
- 0x2605 ZipIt Macintosh
- 0x2705 ZipIt Macintosh 1.3.5+
- 0x2805 ZipIt Macintosh 1.3.5+
- 0x334d Info-ZIP Macintosh
- 0x4341 Acorn/SparkFS
- 0x4453 Windows NT security descriptor (binary ACL)
- 0x4704 VM/CMS
- 0x470f MVS
- 0x4b46 FWKCS MD5 (see below)
- 0x4c41 OS/2 access control list (text ACL)
- 0x4d49 Info-ZIP OpenVMS
- 0x4f4c Xceed original location extra field
- 0x5356 AOS/VS (ACL)
- 0x5455 extended timestamp
- 0x554e Xceed unicode extra field
- 0x5855 Info-ZIP UNIX (original, also OS/2, NT, etc)
- 0x6375 Info-ZIP Unicode Comment Extra Field
- 0x6542 BeOS/BeBox
- 0x7075 Info-ZIP Unicode Path Extra Field
- 0x756e ASi UNIX
- 0x7855 Info-ZIP UNIX (new)
- 0xa220 Microsoft Open Packaging Growth Hint
- 0xfd4a SMS/QDOS
-
- Detailed descriptions of Extra Fields defined by third
- party mappings will be documented as information on
- these data structures is made available to PKWARE.
- PKWARE does not guarantee the accuracy of any published
- third party data.
-
- The Data Size field indicates the size of the following
- data block. Programs can use this value to skip to the
- next header block, passing over any data blocks that are
- not of interest.
-
- Note: As stated above, the size of the entire .ZIP file
- header, including the file name, comment, and extra
- field should not exceed 64K in size.
-
- In case two different programs should appropriate the same
- Header ID value, it is strongly recommended that each
- program place a unique signature of at least two bytes in
- size (and preferably 4 bytes or bigger) at the start of
- each data area. Every program should verify that its
- unique signature is present, in addition to the Header ID
- value being correct, before assuming that it is a block of
- known type.
-
- -Zip64 Extended Information Extra Field (0x0001):
-
- The following is the layout of the zip64 extended
- information "extra" block. If one of the size or
- offset fields in the Local or Central directory
- record is too small to hold the required data,
- a Zip64 extended information record is created.
- The order of the fields in the zip64 extended
- information record is fixed, but the fields will
- only appear if the corresponding Local or Central
- directory record field is set to 0xFFFF or 0xFFFFFFFF.
-
- Note: all fields stored in Intel low-byte/high-byte order.
-
- Value Size Description
- ----- ---- -----------
- (ZIP64) 0x0001 2 bytes Tag for this "extra" block type
- Size 2 bytes Size of this "extra" block
- Original
- Size 8 bytes Original uncompressed file size
- Compressed
- Size 8 bytes Size of compressed data
- Relative Header
- Offset 8 bytes Offset of local header record
- Disk Start
- Number 4 bytes Number of the disk on which
- this file starts
-
- This entry in the Local header must include BOTH original
- and compressed file size fields. If encrypting the
- central directory and bit 13 of the general purpose bit
- flag is set indicating masking, the value stored in the
- Local Header for the original file size will be zero.
-
-
- -OS/2 Extra Field (0x0009):
-
- The following is the layout of the OS/2 attributes "extra"
- block. (Last Revision 09/05/95)
-
- Note: all fields stored in Intel low-byte/high-byte order.
-
- Value Size Description
- ----- ---- -----------
- (OS/2) 0x0009 2 bytes Tag for this "extra" block type
- TSize 2 bytes Size for the following data block
- BSize 4 bytes Uncompressed Block Size
- CType 2 bytes Compression type
- EACRC 4 bytes CRC value for uncompress block
- (var) variable Compressed block
-
- The OS/2 extended attribute structure (FEA2LIST) is
- compressed and then stored in it's entirety within this
- structure. There will only ever be one "block" of data in
- VarFields[].
-
- -NTFS Extra Field (0x000a):
-
- The following is the layout of the NTFS attributes
- "extra" block. (Note: At this time the Mtime, Atime
- and Ctime values may be used on any WIN32 system.)
-
- Note: all fields stored in Intel low-byte/high-byte order.
-
- Value Size Description
- ----- ---- -----------
- (NTFS) 0x000a 2 bytes Tag for this "extra" block type
- TSize 2 bytes Size of the total "extra" block
- Reserved 4 bytes Reserved for future use
- Tag1 2 bytes NTFS attribute tag value #1
- Size1 2 bytes Size of attribute #1, in bytes
- (var.) Size1 Attribute #1 data
- .
- .
- .
- TagN 2 bytes NTFS attribute tag value #N
- SizeN 2 bytes Size of attribute #N, in bytes
- (var.) SizeN Attribute #N data
-
- For NTFS, values for Tag1 through TagN are as follows:
- (currently only one set of attributes is defined for NTFS)
-
- Tag Size Description
- ----- ---- -----------
- 0x0001 2 bytes Tag for attribute #1
- Size1 2 bytes Size of attribute #1, in bytes
- Mtime 8 bytes File last modification time
- Atime 8 bytes File last access time
- Ctime 8 bytes File creation time
-
- -OpenVMS Extra Field (0x000c):
-
- The following is the layout of the OpenVMS attributes
- "extra" block.
-
- Note: all fields stored in Intel low-byte/high-byte order.
-
- Value Size Description
- ----- ---- -----------
- (VMS) 0x000c 2 bytes Tag for this "extra" block type
- TSize 2 bytes Size of the total "extra" block
- CRC 4 bytes 32-bit CRC for remainder of the block
- Tag1 2 bytes OpenVMS attribute tag value #1
- Size1 2 bytes Size of attribute #1, in bytes
- (var.) Size1 Attribute #1 data
- .
- .
- .
- TagN 2 bytes OpenVMS attribute tag value #N
- SizeN 2 bytes Size of attribute #N, in bytes
- (var.) SizeN Attribute #N data
-
- Rules:
-
- 1. There will be one or more of attributes present, which
- will each be preceded by the above TagX & SizeX values.
- These values are identical to the ATR$C_XXXX and
- ATR$S_XXXX constants which are defined in ATR.H under
- OpenVMS C. Neither of these values will ever be zero.
-
- 2. No word alignment or padding is performed.
-
- 3. A well-behaved PKZIP/OpenVMS program should never produce
- more than one sub-block with the same TagX value. Also,
- there will never be more than one "extra" block of type
- 0x000c in a particular directory record.
-
- -UNIX Extra Field (0x000d):
-
- The following is the layout of the UNIX "extra" block.
- Note: all fields are stored in Intel low-byte/high-byte
- order.
-
- Value Size Description
- ----- ---- -----------
- (UNIX) 0x000d 2 bytes Tag for this "extra" block type
- TSize 2 bytes Size for the following data block
- Atime 4 bytes File last access time
- Mtime 4 bytes File last modification time
- Uid 2 bytes File user ID
- Gid 2 bytes File group ID
- (var) variable Variable length data field
-
- The variable length data field will contain file type
- specific data. Currently the only values allowed are
- the original "linked to" file names for hard or symbolic
- links, and the major and minor device node numbers for
- character and block device nodes. Since device nodes
- cannot be either symbolic or hard links, only one set of
- variable length data is stored. Link files will have the
- name of the original file stored. This name is NOT NULL
- terminated. Its size can be determined by checking TSize -
- 12. Device entries will have eight bytes stored as two 4
- byte entries (in little endian format). The first entry
- will be the major device number, and the second the minor
- device number.
-
- -PATCH Descriptor Extra Field (0x000f):
-
- The following is the layout of the Patch Descriptor "extra"
- block.
-
- Note: all fields stored in Intel low-byte/high-byte order.
-
- Value Size Description
- ----- ---- -----------
- (Patch) 0x000f 2 bytes Tag for this "extra" block type
- TSize 2 bytes Size of the total "extra" block
- Version 2 bytes Version of the descriptor
- Flags 4 bytes Actions and reactions (see below)
- OldSize 4 bytes Size of the file about to be patched
- OldCRC 4 bytes 32-bit CRC of the file to be patched
- NewSize 4 bytes Size of the resulting file
- NewCRC 4 bytes 32-bit CRC of the resulting file
-
- Actions and reactions
-
- Bits Description
- ---- ----------------
- 0 Use for auto detection
- 1 Treat as a self-patch
- 2-3 RESERVED
- 4-5 Action (see below)
- 6-7 RESERVED
- 8-9 Reaction (see below) to absent file
- 10-11 Reaction (see below) to newer file
- 12-13 Reaction (see below) to unknown file
- 14-15 RESERVED
- 16-31 RESERVED
-
- Actions
-
- Action Value
- ------ -----
- none 0
- add 1
- delete 2
- patch 3
-
- Reactions
-
- Reaction Value
- -------- -----
- ask 0
- skip 1
- ignore 2
- fail 3
-
- Patch support is provided by PKPatchMaker(tm) technology and is
- covered under U.S. Patents and Patents Pending. The use or
- implementation in a product of certain technological aspects set
- forth in the current APPNOTE, including those with regard to
- strong encryption, patching, or extended tape operations requires
- a license from PKWARE. Please contact PKWARE with regard to
- acquiring a license.
-
- -PKCS#7 Store for X.509 Certificates (0x0014):
-
- This field contains information about each of the certificates
- files may be signed with. When the Central Directory Encryption
- feature is enabled for a ZIP file, this record will appear in
- the Archive Extra Data Record, otherwise it will appear in the
- first central directory record and will be ignored in any
- other record.
-
- Note: all fields stored in Intel low-byte/high-byte order.
-
- Value Size Description
- ----- ---- -----------
- (Store) 0x0014 2 bytes Tag for this "extra" block type
- TSize 2 bytes Size of the store data
- TData TSize Data about the store
-
-
- -X.509 Certificate ID and Signature for individual file (0x0015):
-
- This field contains the information about which certificate in
- the PKCS#7 store was used to sign a particular file. It also
- contains the signature data. This field can appear multiple
- times, but can only appear once per certificate.
-
- Note: all fields stored in Intel low-byte/high-byte order.
-
- Value Size Description
- ----- ---- -----------
- (CID) 0x0015 2 bytes Tag for this "extra" block type
- TSize 2 bytes Size of data that follows
- TData TSize Signature Data
-
- -X.509 Certificate ID and Signature for central directory (0x0016):
-
- This field contains the information about which certificate in
- the PKCS#7 store was used to sign the central directory structure.
- When the Central Directory Encryption feature is enabled for a
- ZIP file, this record will appear in the Archive Extra Data Record,
- otherwise it will appear in the first central directory record.
-
- Note: all fields stored in Intel low-byte/high-byte order.
-
- Value Size Description
- ----- ---- -----------
- (CDID) 0x0016 2 bytes Tag for this "extra" block type
- TSize 2 bytes Size of data that follows
- TData TSize Data
-
- -Strong Encryption Header (0x0017):
-
- Value Size Description
- ----- ---- -----------
- 0x0017 2 bytes Tag for this "extra" block type
- TSize 2 bytes Size of data that follows
- Format 2 bytes Format definition for this record
- AlgID 2 bytes Encryption algorithm identifier
- Bitlen 2 bytes Bit length of encryption key
- Flags 2 bytes Processing flags
- CertData TSize-8 Certificate decryption extra field data
- (refer to the explanation for CertData
- in the section describing the
- Certificate Processing Method under
- the Strong Encryption Specification)
-
-
- -Record Management Controls (0x0018):
-
- Value Size Description
- ----- ---- -----------
-(Rec-CTL) 0x0018 2 bytes Tag for this "extra" block type
- CSize 2 bytes Size of total extra block data
- Tag1 2 bytes Record control attribute 1
- Size1 2 bytes Size of attribute 1, in bytes
- Data1 Size1 Attribute 1 data
- .
- .
- .
- TagN 2 bytes Record control attribute N
- SizeN 2 bytes Size of attribute N, in bytes
- DataN SizeN Attribute N data
-
-
- -PKCS#7 Encryption Recipient Certificate List (0x0019):
-
- This field contains information about each of the certificates
- used in encryption processing and it can be used to identify who is
- allowed to decrypt encrypted files. This field should only appear
- in the archive extra data record. This field is not required and
- serves only to aide archive modifications by preserving public
- encryption key data. Individual security requirements may dictate
- that this data be omitted to deter information exposure.
-
- Note: all fields stored in Intel low-byte/high-byte order.
-
- Value Size Description
- ----- ---- -----------
- (CStore) 0x0019 2 bytes Tag for this "extra" block type
- TSize 2 bytes Size of the store data
- TData TSize Data about the store
-
- TData:
-
- Value Size Description
- ----- ---- -----------
- Version 2 bytes Format version number - must 0x0001 at this time
- CStore (var) PKCS#7 data blob
-
-
- -MVS Extra Field (0x0065):
-
- The following is the layout of the MVS "extra" block.
- Note: Some fields are stored in Big Endian format.
- All text is in EBCDIC format unless otherwise specified.
-
- Value Size Description
- ----- ---- -----------
- (MVS) 0x0065 2 bytes Tag for this "extra" block type
- TSize 2 bytes Size for the following data block
- ID 4 bytes EBCDIC "Z390" 0xE9F3F9F0 or
- "T4MV" for TargetFour
- (var) TSize-4 Attribute data (see APPENDIX B)
-
-
- -OS/400 Extra Field (0x0065):
-
- The following is the layout of the OS/400 "extra" block.
- Note: Some fields are stored in Big Endian format.
- All text is in EBCDIC format unless otherwise specified.
-
- Value Size Description
- ----- ---- -----------
- (OS400) 0x0065 2 bytes Tag for this "extra" block type
- TSize 2 bytes Size for the following data block
- ID 4 bytes EBCDIC "I400" 0xC9F4F0F0 or
- "T4MV" for TargetFour
- (var) TSize-4 Attribute data (see APPENDIX A)
-
-
- Third-party Mappings:
-
- -ZipIt Macintosh Extra Field (long) (0x2605):
-
- The following is the layout of the ZipIt extra block
- for Macintosh. The local-header and central-header versions
- are identical. This block must be present if the file is
- stored MacBinary-encoded and it should not be used if the file
- is not stored MacBinary-encoded.
-
- Value Size Description
- ----- ---- -----------
- (Mac2) 0x2605 Short tag for this extra block type
- TSize Short total data size for this block
- "ZPIT" beLong extra-field signature
- FnLen Byte length of FileName
- FileName variable full Macintosh filename
- FileType Byte[4] four-byte Mac file type string
- Creator Byte[4] four-byte Mac creator string
-
-
- -ZipIt Macintosh Extra Field (short, for files) (0x2705):
-
- The following is the layout of a shortened variant of the
- ZipIt extra block for Macintosh (without "full name" entry).
- This variant is used by ZipIt 1.3.5 and newer for entries of
- files (not directories) that do not have a MacBinary encoded
- file. The local-header and central-header versions are identical.
-
- Value Size Description
- ----- ---- -----------
- (Mac2b) 0x2705 Short tag for this extra block type
- TSize Short total data size for this block (12)
- "ZPIT" beLong extra-field signature
- FileType Byte[4] four-byte Mac file type string
- Creator Byte[4] four-byte Mac creator string
- fdFlags beShort attributes from FInfo.frFlags,
- may be omitted
- 0x0000 beShort reserved, may be omitted
-
-
- -ZipIt Macintosh Extra Field (short, for directories) (0x2805):
-
- The following is the layout of a shortened variant of the
- ZipIt extra block for Macintosh used only for directory
- entries. This variant is used by ZipIt 1.3.5 and newer to
- save some optional Mac-specific information about directories.
- The local-header and central-header versions are identical.
-
- Value Size Description
- ----- ---- -----------
- (Mac2c) 0x2805 Short tag for this extra block type
- TSize Short total data size for this block (12)
- "ZPIT" beLong extra-field signature
- frFlags beShort attributes from DInfo.frFlags, may
- be omitted
- View beShort ZipIt view flag, may be omitted
-
-
- The View field specifies ZipIt-internal settings as follows:
-
- Bits of the Flags:
- bit 0 if set, the folder is shown expanded (open)
- when the archive contents are viewed in ZipIt.
- bits 1-15 reserved, zero;
-
-
- -FWKCS MD5 Extra Field (0x4b46):
-
- The FWKCS Contents_Signature System, used in
- automatically identifying files independent of file name,
- optionally adds and uses an extra field to support the
- rapid creation of an enhanced contents_signature:
-
- Header ID = 0x4b46
- Data Size = 0x0013
- Preface = 'M','D','5'
- followed by 16 bytes containing the uncompressed file's
- 128_bit MD5 hash(1), low byte first.
-
- When FWKCS revises a .ZIP file central directory to add
- this extra field for a file, it also replaces the
- central directory entry for that file's uncompressed
- file length with a measured value.
-
- FWKCS provides an option to strip this extra field, if
- present, from a .ZIP file central directory. In adding
- this extra field, FWKCS preserves .ZIP file Authenticity
- Verification; if stripping this extra field, FWKCS
- preserves all versions of AV through PKZIP version 2.04g.
-
- FWKCS, and FWKCS Contents_Signature System, are
- trademarks of Frederick W. Kantor.
-
- (1) R. Rivest, RFC1321.TXT, MIT Laboratory for Computer
- Science and RSA Data Security, Inc., April 1992.
- ll.76-77: "The MD5 algorithm is being placed in the
- public domain for review and possible adoption as a
- standard."
-
-
- -Info-ZIP Unicode Comment Extra Field (0x6375):
-
- Stores the UTF-8 version of the file comment as stored in the
- central directory header. (Last Revision 20070912)
-
- Value Size Description
- ----- ---- -----------
- (UCom) 0x6375 Short tag for this extra block type ("uc")
- TSize Short total data size for this block
- Version 1 byte version of this extra field, currently 1
- ComCRC32 4 bytes Comment Field CRC32 Checksum
- UnicodeCom Variable UTF-8 version of the entry comment
-
- Currently Version is set to the number 1. If there is a need
- to change this field, the version will be incremented. Changes
- may not be backward compatible so this extra field should not be
- used if the version is not recognized.
-
- The ComCRC32 is the standard zip CRC32 checksum of the File Comment
- field in the central directory header. This is used to verify that
- the comment field has not changed since the Unicode Comment extra field
- was created. This can happen if a utility changes the File Comment
- field but does not update the UTF-8 Comment extra field. If the CRC
- check fails, this Unicode Comment extra field should be ignored and
- the File Comment field in the header should be used instead.
-
- The UnicodeCom field is the UTF-8 version of the File Comment field
- in the header. As UnicodeCom is defined to be UTF-8, no UTF-8 byte
- order mark (BOM) is used. The length of this field is determined by
- subtracting the size of the previous fields from TSize. If both the
- File Name and Comment fields are UTF-8, the new General Purpose Bit
- Flag, bit 11 (Language encoding flag (EFS)), can be used to indicate
- both the header File Name and Comment fields are UTF-8 and, in this
- case, the Unicode Path and Unicode Comment extra fields are not
- needed and should not be created. Note that, for backward
- compatibility, bit 11 should only be used if the native character set
- of the paths and comments being zipped up are already in UTF-8. It is
- expected that the same file comment storage method, either general
- purpose bit 11 or extra fields, be used in both the Local and Central
- Directory Header for a file.
-
-
- -Info-ZIP Unicode Path Extra Field (0x7075):
-
- Stores the UTF-8 version of the file name field as stored in the
- local header and central directory header. (Last Revision 20070912)
-
- Value Size Description
- ----- ---- -----------
- (UPath) 0x7075 Short tag for this extra block type ("up")
- TSize Short total data size for this block
- Version 1 byte version of this extra field, currently 1
- NameCRC32 4 bytes File Name Field CRC32 Checksum
- UnicodeName Variable UTF-8 version of the entry File Name
-
- Currently Version is set to the number 1. If there is a need
- to change this field, the version will be incremented. Changes
- may not be backward compatible so this extra field should not be
- used if the version is not recognized.
-
- The NameCRC32 is the standard zip CRC32 checksum of the File Name
- field in the header. This is used to verify that the header
- File Name field has not changed since the Unicode Path extra field
- was created. This can happen if a utility renames the File Name but
- does not update the UTF-8 path extra field. If the CRC check fails,
- this UTF-8 Path Extra Field should be ignored and the File Name field
- in the header should be used instead.
-
- The UnicodeName is the UTF-8 version of the contents of the File Name
- field in the header. As UnicodeName is defined to be UTF-8, no UTF-8
- byte order mark (BOM) is used. The length of this field is determined
- by subtracting the size of the previous fields from TSize. If both
- the File Name and Comment fields are UTF-8, the new General Purpose
- Bit Flag, bit 11 (Language encoding flag (EFS)), can be used to
- indicate that both the header File Name and Comment fields are UTF-8
- and, in this case, the Unicode Path and Unicode Comment extra fields
- are not needed and should not be created. Note that, for backward
- compatibility, bit 11 should only be used if the native character set
- of the paths and comments being zipped up are already in UTF-8. It is
- expected that the same file name storage method, either general
- purpose bit 11 or extra fields, be used in both the Local and Central
- Directory Header for a file.
-
-
- -Microsoft Open Packaging Growth Hint (0xa220):
-
- Value Size Description
- ----- ---- -----------
- 0xa220 Short tag for this extra block type
- TSize Short size of Sig + PadVal + Padding
- Sig Short verification signature (A028)
- PadVal Short Initial padding value
- Padding variable filled with NULL characters
-
-
- file comment: (Variable)
-
- The comment for this file.
-
- number of this disk: (2 bytes)
-
- The number of this disk, which contains central
- directory end record. If an archive is in ZIP64 format
- and the value in this field is 0xFFFF, the size will
- be in the corresponding 4 byte zip64 end of central
- directory field.
-
-
- number of the disk with the start of the central
- directory: (2 bytes)
-
- The number of the disk on which the central
- directory starts. If an archive is in ZIP64 format
- and the value in this field is 0xFFFF, the size will
- be in the corresponding 4 byte zip64 end of central
- directory field.
-
- total number of entries in the central dir on
- this disk: (2 bytes)
-
- The number of central directory entries on this disk.
- If an archive is in ZIP64 format and the value in
- this field is 0xFFFF, the size will be in the
- corresponding 8 byte zip64 end of central
- directory field.
-
- total number of entries in the central dir: (2 bytes)
-
- The total number of files in the .ZIP file. If an
- archive is in ZIP64 format and the value in this field
- is 0xFFFF, the size will be in the corresponding 8 byte
- zip64 end of central directory field.
-
- size of the central directory: (4 bytes)
-
- The size (in bytes) of the entire central directory.
- If an archive is in ZIP64 format and the value in
- this field is 0xFFFFFFFF, the size will be in the
- corresponding 8 byte zip64 end of central
- directory field.
-
- offset of start of central directory with respect to
- the starting disk number: (4 bytes)
-
- Offset of the start of the central directory on the
- disk on which the central directory starts. If an
- archive is in ZIP64 format and the value in this
- field is 0xFFFFFFFF, the size will be in the
- corresponding 8 byte zip64 end of central
- directory field.
-
- .ZIP file comment length: (2 bytes)
-
- The length of the comment for this .ZIP file.
-
- .ZIP file comment: (Variable)
-
- The comment for this .ZIP file. ZIP file comment data
- is stored unsecured. No encryption or data authentication
- is applied to this area at this time. Confidential information
- should not be stored in this section.
-
- zip64 extensible data sector (variable size)
-
- (currently reserved for use by PKWARE)
-
-
- K. Splitting and Spanning ZIP files
-
- Spanning is the process of segmenting a ZIP file across
- multiple removable media. This support has typically only
- been provided for DOS formatted floppy diskettes.
-
- File splitting is a newer derivative of spanning.
- Splitting follows the same segmentation process as
- spanning, however, it does not require writing each
- segment to a unique removable medium and instead supports
- placing all pieces onto local or non-removable locations
- such as file systems, local drives, folders, etc...
-
- A key difference between spanned and split ZIP files is
- that all pieces of a spanned ZIP file have the same name.
- Since each piece is written to a separate volume, no name
- collisions occur and each segment can reuse the original
- .ZIP file name given to the archive.
-
- Sequence ordering for DOS spanned archives uses the DOS
- volume label to determine segment numbers. Volume labels
- for each segment are written using the form PKBACK#xxx,
- where xxx is the segment number written as a decimal
- value from 001 - nnn.
-
- Split ZIP files are typically written to the same location
- and are subject to name collisions if the spanned name
- format is used since each segment will reside on the same
- drive. To avoid name collisions, split archives are named
- as follows.
-
- Segment 1 = filename.z01
- Segment n-1 = filename.z(n-1)
- Segment n = filename.zip
-
- The .ZIP extension is used on the last segment to support
- quickly reading the central directory. The segment number
- n should be a decimal value.
-
- Spanned ZIP files may be PKSFX Self-extracting ZIP files.
- PKSFX files may also be split, however, in this case
- the first segment must be named filename.exe. The first
- segment of a split PKSFX archive must be large enough to
- include the entire executable program.
-
- Capacities for split archives are as follows.
-
- Maximum number of segments = 4,294,967,295 - 1
- Maximum .ZIP segment size = 4,294,967,295 bytes
- Minimum segment size = 64K
- Maximum PKSFX segment size = 2,147,483,647 bytes
-
- Segment sizes may be different however by convention, all
- segment sizes should be the same with the exception of the
- last, which may be smaller. Local and central directory
- header records must never be split across a segment boundary.
- When writing a header record, if the number of bytes remaining
- within a segment is less than the size of the header record,
- end the current segment and write the header at the start
- of the next segment. The central directory may span segment
- boundaries, but no single record in the central directory
- should be split across segments.
-
- Spanned/Split archives created using PKZIP for Windows
- (V2.50 or greater), PKZIP Command Line (V2.50 or greater),
- or PKZIP Explorer will include a special spanning
- signature as the first 4 bytes of the first segment of
- the archive. This signature (0x08074b50) will be
- followed immediately by the local header signature for
- the first file in the archive.
-
- A special spanning marker may also appear in spanned/split
- archives if the spanning or splitting process starts but
- only requires one segment. In this case the 0x08074b50
- signature will be replaced with the temporary spanning
- marker signature of 0x30304b50. Split archives can
- only be uncompressed by other versions of PKZIP that
- know how to create a split archive.
-
- The signature value 0x08074b50 is also used by some
- ZIP implementations as a marker for the Data Descriptor
- record. Conflict in this alternate assignment can be
- avoided by ensuring the position of the signature
- within the ZIP file to determine the use for which it
- is intended.
-
- L. General notes:
-
- 1) All fields unless otherwise noted are unsigned and stored
- in Intel low-byte:high-byte, low-word:high-word order.
-
- 2) String fields are not null terminated, since the
- length is given explicitly.
-
- 3) The entries in the central directory may not necessarily
- be in the same order that files appear in the .ZIP file.
-
- 4) If one of the fields in the end of central directory
- record is too small to hold required data, the field
- should be set to -1 (0xFFFF or 0xFFFFFFFF) and the
- ZIP64 format record should be created.
-
- 5) The end of central directory record and the
- Zip64 end of central directory locator record must
- reside on the same disk when splitting or spanning
- an archive.
-
-VI. Explanation of compression methods
---------------------------------------
-
-UnShrinking - Method 1
-----------------------
-
-Shrinking is a Dynamic Ziv-Lempel-Welch compression algorithm
-with partial clearing. The initial code size is 9 bits, and
-the maximum code size is 13 bits. Shrinking differs from
-conventional Dynamic Ziv-Lempel-Welch implementations in several
-respects:
-
-1) The code size is controlled by the compressor, and is not
- automatically increased when codes larger than the current
- code size are created (but not necessarily used). When
- the decompressor encounters the code sequence 256
- (decimal) followed by 1, it should increase the code size
- read from the input stream to the next bit size. No
- blocking of the codes is performed, so the next code at
- the increased size should be read from the input stream
- immediately after where the previous code at the smaller
- bit size was read. Again, the decompressor should not
- increase the code size used until the sequence 256,1 is
- encountered.
-
-2) When the table becomes full, total clearing is not
- performed. Rather, when the compressor emits the code
- sequence 256,2 (decimal), the decompressor should clear
- all leaf nodes from the Ziv-Lempel tree, and continue to
- use the current code size. The nodes that are cleared
- from the Ziv-Lempel tree are then re-used, with the lowest
- code value re-used first, and the highest code value
- re-used last. The compressor can emit the sequence 256,2
- at any time.
-
-Expanding - Methods 2-5
------------------------
-
-The Reducing algorithm is actually a combination of two
-distinct algorithms. The first algorithm compresses repeated
-byte sequences, and the second algorithm takes the compressed
-stream from the first algorithm and applies a probabilistic
-compression method.
-
-The probabilistic compression stores an array of 'follower
-sets' S(j), for j=0 to 255, corresponding to each possible
-ASCII character. Each set contains between 0 and 32
-characters, to be denoted as S(j)[0],...,S(j)[m], where m<32.
-The sets are stored at the beginning of the data area for a
-Reduced file, in reverse order, with S(255) first, and S(0)
-last.
-
-The sets are encoded as { N(j), S(j)[0],...,S(j)[N(j)-1] },
-where N(j) is the size of set S(j). N(j) can be 0, in which
-case the follower set for S(j) is empty. Each N(j) value is
-encoded in 6 bits, followed by N(j) eight bit character values
-corresponding to S(j)[0] to S(j)[N(j)-1] respectively. If
-N(j) is 0, then no values for S(j) are stored, and the value
-for N(j-1) immediately follows.
-
-Immediately after the follower sets, is the compressed data
-stream. The compressed data stream can be interpreted for the
-probabilistic decompression as follows:
-
-let Last-Character <- 0.
-loop until done
- if the follower set S(Last-Character) is empty then
- read 8 bits from the input stream, and copy this
- value to the output stream.
- otherwise if the follower set S(Last-Character) is non-empty then
- read 1 bit from the input stream.
- if this bit is not zero then
- read 8 bits from the input stream, and copy this
- value to the output stream.
- otherwise if this bit is zero then
- read B(N(Last-Character)) bits from the input
- stream, and assign this value to I.
- Copy the value of S(Last-Character)[I] to the
- output stream.
-
- assign the last value placed on the output stream to
- Last-Character.
-end loop
-
-B(N(j)) is defined as the minimal number of bits required to
-encode the value N(j)-1.
-
-The decompressed stream from above can then be expanded to
-re-create the original file as follows:
-
-let State <- 0.
-
-loop until done
- read 8 bits from the input stream into C.
- case State of
- 0: if C is not equal to DLE (144 decimal) then
- copy C to the output stream.
- otherwise if C is equal to DLE then
- let State <- 1.
-
- 1: if C is non-zero then
- let V <- C.
- let Len <- L(V)
- let State <- F(Len).
- otherwise if C is zero then
- copy the value 144 (decimal) to the output stream.
- let State <- 0
-
- 2: let Len <- Len + C
- let State <- 3.
-
- 3: move backwards D(V,C) bytes in the output stream
- (if this position is before the start of the output
- stream, then assume that all the data before the
- start of the output stream is filled with zeros).
- copy Len+3 bytes from this position to the output stream.
- let State <- 0.
- end case
-end loop
-
-The functions F,L, and D are dependent on the 'compression
-factor', 1 through 4, and are defined as follows:
-
-For compression factor 1:
- L(X) equals the lower 7 bits of X.
- F(X) equals 2 if X equals 127 otherwise F(X) equals 3.
- D(X,Y) equals the (upper 1 bit of X) * 256 + Y + 1.
-For compression factor 2:
- L(X) equals the lower 6 bits of X.
- F(X) equals 2 if X equals 63 otherwise F(X) equals 3.
- D(X,Y) equals the (upper 2 bits of X) * 256 + Y + 1.
-For compression factor 3:
- L(X) equals the lower 5 bits of X.
- F(X) equals 2 if X equals 31 otherwise F(X) equals 3.
- D(X,Y) equals the (upper 3 bits of X) * 256 + Y + 1.
-For compression factor 4:
- L(X) equals the lower 4 bits of X.
- F(X) equals 2 if X equals 15 otherwise F(X) equals 3.
- D(X,Y) equals the (upper 4 bits of X) * 256 + Y + 1.
-
-Imploding - Method 6
---------------------
-
-The Imploding algorithm is actually a combination of two distinct
-algorithms. The first algorithm compresses repeated byte
-sequences using a sliding dictionary. The second algorithm is
-used to compress the encoding of the sliding dictionary output,
-using multiple Shannon-Fano trees.
-
-The Imploding algorithm can use a 4K or 8K sliding dictionary
-size. The dictionary size used can be determined by bit 1 in the
-general purpose flag word; a 0 bit indicates a 4K dictionary
-while a 1 bit indicates an 8K dictionary.
-
-The Shannon-Fano trees are stored at the start of the compressed
-file. The number of trees stored is defined by bit 2 in the
-general purpose flag word; a 0 bit indicates two trees stored, a
-1 bit indicates three trees are stored. If 3 trees are stored,
-the first Shannon-Fano tree represents the encoding of the
-Literal characters, the second tree represents the encoding of
-the Length information, the third represents the encoding of the
-Distance information. When 2 Shannon-Fano trees are stored, the
-Length tree is stored first, followed by the Distance tree.
-
-The Literal Shannon-Fano tree, if present is used to represent
-the entire ASCII character set, and contains 256 values. This
-tree is used to compress any data not compressed by the sliding
-dictionary algorithm. When this tree is present, the Minimum
-Match Length for the sliding dictionary is 3. If this tree is
-not present, the Minimum Match Length is 2.
-
-The Length Shannon-Fano tree is used to compress the Length part
-of the (length,distance) pairs from the sliding dictionary
-output. The Length tree contains 64 values, ranging from the
-Minimum Match Length, to 63 plus the Minimum Match Length.
-
-The Distance Shannon-Fano tree is used to compress the Distance
-part of the (length,distance) pairs from the sliding dictionary
-output. The Distance tree contains 64 values, ranging from 0 to
-63, representing the upper 6 bits of the distance value. The
-distance values themselves will be between 0 and the sliding
-dictionary size, either 4K or 8K.
-
-The Shannon-Fano trees themselves are stored in a compressed
-format. The first byte of the tree data represents the number of
-bytes of data representing the (compressed) Shannon-Fano tree
-minus 1. The remaining bytes represent the Shannon-Fano tree
-data encoded as:
-
- High 4 bits: Number of values at this bit length + 1. (1 - 16)
- Low 4 bits: Bit Length needed to represent value + 1. (1 - 16)
-
-The Shannon-Fano codes can be constructed from the bit lengths
-using the following algorithm:
-
-1) Sort the Bit Lengths in ascending order, while retaining the
- order of the original lengths stored in the file.
-
-2) Generate the Shannon-Fano trees:
-
- Code <- 0
- CodeIncrement <- 0
- LastBitLength <- 0
- i <- number of Shannon-Fano codes - 1 (either 255 or 63)
-
- loop while i >= 0
- Code = Code + CodeIncrement
- if BitLength(i) <> LastBitLength then
- LastBitLength=BitLength(i)
- CodeIncrement = 1 shifted left (16 - LastBitLength)
- ShannonCode(i) = Code
- i <- i - 1
- end loop
-
-3) Reverse the order of all the bits in the above ShannonCode()
- vector, so that the most significant bit becomes the least
- significant bit. For example, the value 0x1234 (hex) would
- become 0x2C48 (hex).
-
-4) Restore the order of Shannon-Fano codes as originally stored
- within the file.
-
-Example:
-
- This example will show the encoding of a Shannon-Fano tree
- of size 8. Notice that the actual Shannon-Fano trees used
- for Imploding are either 64 or 256 entries in size.
-
-Example: 0x02, 0x42, 0x01, 0x13
-
- The first byte indicates 3 values in this table. Decoding the
- bytes:
- 0x42 = 5 codes of 3 bits long
- 0x01 = 1 code of 2 bits long
- 0x13 = 2 codes of 4 bits long
-
- This would generate the original bit length array of:
- (3, 3, 3, 3, 3, 2, 4, 4)
-
- There are 8 codes in this table for the values 0 thru 7. Using
- the algorithm to obtain the Shannon-Fano codes produces:
-
- Reversed Order Original
-Val Sorted Constructed Code Value Restored Length
---- ------ ----------------- -------- -------- ------
-0: 2 1100000000000000 11 101 3
-1: 3 1010000000000000 101 001 3
-2: 3 1000000000000000 001 110 3
-3: 3 0110000000000000 110 010 3
-4: 3 0100000000000000 010 100 3
-5: 3 0010000000000000 100 11 2
-6: 4 0001000000000000 1000 1000 4
-7: 4 0000000000000000 0000 0000 4
-
-The values in the Val, Order Restored and Original Length columns
-now represent the Shannon-Fano encoding tree that can be used for
-decoding the Shannon-Fano encoded data. How to parse the
-variable length Shannon-Fano values from the data stream is beyond
-the scope of this document. (See the references listed at the end of
-this document for more information.) However, traditional decoding
-schemes used for Huffman variable length decoding, such as the
-Greenlaw algorithm, can be successfully applied.
-
-The compressed data stream begins immediately after the
-compressed Shannon-Fano data. The compressed data stream can be
-interpreted as follows:
-
-loop until done
- read 1 bit from input stream.
-
- if this bit is non-zero then (encoded data is literal data)
- if Literal Shannon-Fano tree is present
- read and decode character using Literal Shannon-Fano tree.
- otherwise
- read 8 bits from input stream.
- copy character to the output stream.
- otherwise (encoded data is sliding dictionary match)
- if 8K dictionary size
- read 7 bits for offset Distance (lower 7 bits of offset).
- otherwise
- read 6 bits for offset Distance (lower 6 bits of offset).
-
- using the Distance Shannon-Fano tree, read and decode the
- upper 6 bits of the Distance value.
-
- using the Length Shannon-Fano tree, read and decode
- the Length value.
-
- Length <- Length + Minimum Match Length
-
- if Length = 63 + Minimum Match Length
- read 8 bits from the input stream,
- add this value to Length.
-
- move backwards Distance+1 bytes in the output stream, and
- copy Length characters from this position to the output
- stream. (if this position is before the start of the output
- stream, then assume that all the data before the start of
- the output stream is filled with zeros).
-end loop
-
-Tokenizing - Method 7
----------------------
-
-This method is not used by PKZIP.
-
-Deflating - Method 8
---------------------
-
-The Deflate algorithm is similar to the Implode algorithm using
-a sliding dictionary of up to 32K with secondary compression
-from Huffman/Shannon-Fano codes.
-
-The compressed data is stored in blocks with a header describing
-the block and the Huffman codes used in the data block. The header
-format is as follows:
-
- Bit 0: Last Block bit This bit is set to 1 if this is the last
- compressed block in the data.
- Bits 1-2: Block type
- 00 (0) - Block is stored - All stored data is byte aligned.
- Skip bits until next byte, then next word = block
- length, followed by the ones compliment of the block
- length word. Remaining data in block is the stored
- data.
-
- 01 (1) - Use fixed Huffman codes for literal and distance codes.
- Lit Code Bits Dist Code Bits
- --------- ---- --------- ----
- 0 - 143 8 0 - 31 5
- 144 - 255 9
- 256 - 279 7
- 280 - 287 8
-
- Literal codes 286-287 and distance codes 30-31 are
- never used but participate in the huffman construction.
-
- 10 (2) - Dynamic Huffman codes. (See expanding Huffman codes)
-
- 11 (3) - Reserved - Flag a "Error in compressed data" if seen.
-
-Expanding Huffman Codes
------------------------
-If the data block is stored with dynamic Huffman codes, the Huffman
-codes are sent in the following compressed format:
-
- 5 Bits: # of Literal codes sent - 256 (256 - 286)
- All other codes are never sent.
- 5 Bits: # of Dist codes - 1 (1 - 32)
- 4 Bits: # of Bit Length codes - 3 (3 - 19)
-
-The Huffman codes are sent as bit lengths and the codes are built as
-described in the implode algorithm. The bit lengths themselves are
-compressed with Huffman codes. There are 19 bit length codes:
-
- 0 - 15: Represent bit lengths of 0 - 15
- 16: Copy the previous bit length 3 - 6 times.
- The next 2 bits indicate repeat length (0 = 3, ... ,3 = 6)
- Example: Codes 8, 16 (+2 bits 11), 16 (+2 bits 10) will
- expand to 12 bit lengths of 8 (1 + 6 + 5)
- 17: Repeat a bit length of 0 for 3 - 10 times. (3 bits of length)
- 18: Repeat a bit length of 0 for 11 - 138 times (7 bits of length)
-
-The lengths of the bit length codes are sent packed 3 bits per value
-(0 - 7) in the following order:
-
- 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
-
-The Huffman codes should be built as described in the Implode algorithm
-except codes are assigned starting at the shortest bit length, i.e. the
-shortest code should be all 0's rather than all 1's. Also, codes with
-a bit length of zero do not participate in the tree construction. The
-codes are then used to decode the bit lengths for the literal and
-distance tables.
-
-The bit lengths for the literal tables are sent first with the number
-of entries sent described by the 5 bits sent earlier. There are up
-to 286 literal characters; the first 256 represent the respective 8
-bit character, code 256 represents the End-Of-Block code, the remaining
-29 codes represent copy lengths of 3 thru 258. There are up to 30
-distance codes representing distances from 1 thru 32k as described
-below.
-
- Length Codes
- ------------
- Extra Extra Extra Extra
- Code Bits Length Code Bits Lengths Code Bits Lengths Code Bits Length(s)
- ---- ---- ------ ---- ---- ------- ---- ---- ------- ---- ---- ---------
- 257 0 3 265 1 11,12 273 3 35-42 281 5 131-162
- 258 0 4 266 1 13,14 274 3 43-50 282 5 163-194
- 259 0 5 267 1 15,16 275 3 51-58 283 5 195-226
- 260 0 6 268 1 17,18 276 3 59-66 284 5 227-257
- 261 0 7 269 2 19-22 277 4 67-82 285 0 258
- 262 0 8 270 2 23-26 278 4 83-98
- 263 0 9 271 2 27-30 279 4 99-114
- 264 0 10 272 2 31-34 280 4 115-130
-
- Distance Codes
- --------------
- Extra Extra Extra Extra
- Code Bits Dist Code Bits Dist Code Bits Distance Code Bits Distance
- ---- ---- ---- ---- ---- ------ ---- ---- -------- ---- ---- --------
- 0 0 1 8 3 17-24 16 7 257-384 24 11 4097-6144
- 1 0 2 9 3 25-32 17 7 385-512 25 11 6145-8192
- 2 0 3 10 4 33-48 18 8 513-768 26 12 8193-12288
- 3 0 4 11 4 49-64 19 8 769-1024 27 12 12289-16384
- 4 1 5,6 12 5 65-96 20 9 1025-1536 28 13 16385-24576
- 5 1 7,8 13 5 97-128 21 9 1537-2048 29 13 24577-32768
- 6 2 9-12 14 6 129-192 22 10 2049-3072
- 7 2 13-16 15 6 193-256 23 10 3073-4096
-
-The compressed data stream begins immediately after the
-compressed header data. The compressed data stream can be
-interpreted as follows:
-
-do
- read header from input stream.
-
- if stored block
- skip bits until byte aligned
- read count and 1's compliment of count
- copy count bytes data block
- otherwise
- loop until end of block code sent
- decode literal character from input stream
- if literal < 256
- copy character to the output stream
- otherwise
- if literal = end of block
- break from loop
- otherwise
- decode distance from input stream
-
- move backwards distance bytes in the output stream, and
- copy length characters from this position to the output
- stream.
- end loop
-while not last block
-
-if data descriptor exists
- skip bits until byte aligned
- read crc and sizes
-endif
-
-Enhanced Deflating - Method 9
------------------------------
-
-The Enhanced Deflating algorithm is similar to Deflate but
-uses a sliding dictionary of up to 64K. Deflate64(tm) is supported
-by the Deflate extractor.
-
-BZIP2 - Method 12
------------------
-
-BZIP2 is an open-source data compression algorithm developed by
-Julian Seward. Information and source code for this algorithm
-can be found on the internet.
-
-LZMA - Method 14 (EFS)
-----------------------
-
-LZMA is a block-oriented, general purpose data compression algorithm
-developed and maintained by Igor Pavlov. It is a derivative of LZ77
-that utilizes Markov chains and a range coder. Information and
-source code for this algorithm can be found on the internet. Consult
-with the author of this algorithm for information on terms or
-restrictions on use.
-
-Support for LZMA within the ZIP format is defined as follows:
-
-The Compression method field within the ZIP Local and Central
-Header records will be set to the value 14 to indicate data was
-compressed using LZMA.
-
-The Version needed to extract field within the ZIP Local and
-Central Header records will be set to 6.3 to indicate the
-minimum ZIP format version supporting this feature.
-
-File data compressed using the LZMA algorithm must be placed
-immediately following the Local Header for the file. If a
-standard ZIP encryption header is required, it will follow
-the Local Header and will precede the LZMA compressed file
-data segment. The location of LZMA compressed data segment
-within the ZIP format will be as shown:
-
- [local header file 1]
- [encryption header file 1]
- [LZMA compressed data segment for file 1]
- [data descriptor 1]
- [local header file 2]
-
-The encryption header and data descriptor records may
-be conditionally present. The LZMA Compressed Data Segment
-will consist of an LZMA Properties Header followed by the
-LZMA Compressed Data as shown:
-
- [LZMA properties header for file 1]
- [LZMA compressed data for file 1]
-
-The LZMA Compressed Data will be stored as provided by the
-LZMA compression library. Compressed size, uncompressed
-size and other file characteristics about the file being
-compressed must be stored in standard ZIP storage format.
-
-The LZMA Properties Header will store specific data required to
-decompress the LZMA compressed Data. This data is set by the
-LZMA compression engine using the function WriteCoderProperties()
-as documented within the LZMA SDK.
-
-Storage fields for the property information within the LZMA
-Properties Header are as follows:
-
- LZMA Version Information 2 bytes
- LZMA Properties Size 2 bytes
- LZMA Properties Data variable, defined by "LZMA Properties Size"
-
-LZMA Version Information - this field identifies which version of
- the LZMA SDK was used to compress a file. The first byte will
- store the major version number of the LZMA SDK and the second
- byte will store the minor number.
-
-LZMA Properties Size - this field defines the size of the remaining
- property data. Typically this size should be determined by the
- version of the SDK. This size field is included as a convenience
- and to help avoid any ambiguity should it arise in the future due
- to changes in this compression algorithm.
-
-LZMA Property Data - this variable sized field records the required
- values for the decompressor as defined by the LZMA SDK. The
- data stored in this field should be obtained using the
- WriteCoderProperties() in the version of the SDK defined by
- the "LZMA Version Information" field.
-
-The layout of the "LZMA Properties Data" field is a function of the
-LZMA compression algorithm. It is possible that this layout may be
-changed by the author over time. The data layout in version 4.32
-of the LZMA SDK defines a 5 byte array that uses 4 bytes to store
-the dictionary size in little-endian order. This is preceded by a
-single packed byte as the first element of the array that contains
-the following fields:
-
- PosStateBits
- LiteralPosStateBits
- LiteralContextBits
-
-Refer to the LZMA documentation for a more detailed explanation of
-these fields.
-
-Data compressed with method 14, LZMA, may include an end-of-stream
-(EOS) marker ending the compressed data stream. This marker is not
-required, but its use is highly recommended to facilitate processing
-and implementers should include the EOS marker whenever possible.
-When the EOS marker is used, general purpose bit 1 must be set. If
-general purpose bit 1 is not set, the EOS marker is not present.
-
-WavPack - Method 97
--------------------
-
-Information describing the use of compression method 97 is
-provided by WinZIP International, LLC. This method relies on the
-open source WavPack audio compression utility developed by David Bryant.
-Information on WavPack is available at www.wavpack.com. Please consult
-with the author of this algorithm for information on terms and
-restrictions on use.
-
-WavPack data for a file begins immediately after the end of the
-local header data. This data is the output from WavPack compression
-routines. Within the ZIP file, the use of WavPack compression is
-indicated by setting the compression method field to a value of 97
-in both the local header and the central directory header. The Version
-needed to extract and version made by fields use the same values as are
-used for data compressed using the Deflate algorithm.
-
-An implementation note for storing digital sample data when using
-WavPack compression within ZIP files is that all of the bytes of
-the sample data should be compressed. This includes any unused
-bits up to the byte boundary. An example is a 2 byte sample that
-uses only 12 bits for the sample data with 4 unused bits. If only
-12 bits are passed as the sample size to the WavPack routines, the 4
-unused bits will be set to 0 on extraction regardless of their original
-state. To avoid this, the full 16 bits of the sample data size
-should be provided.
-
-PPMd - Method 98
-----------------
-
-PPMd is a data compression algorithm developed by Dmitry Shkarin
-which includes a carryless rangecoder developed by Dmitry Subbotin.
-This algorithm is based on predictive phrase matching on multiple
-order contexts. Information and source code for this algorithm
-can be found on the internet. Consult with the author of this
-algorithm for information on terms or restrictions on use.
-
-Support for PPMd within the ZIP format currently is provided only
-for version I, revision 1 of the algorithm. Storage requirements
-for using this algorithm are as follows:
-
-Parameters needed to control the algorithm are stored in the two
-bytes immediately preceding the compressed data. These bytes are
-used to store the following fields:
-
-Model order - sets the maximum model order, default is 8, possible
- values are from 2 to 16 inclusive
-
-Sub-allocator size - sets the size of sub-allocator in MB, default is 50,
- possible values are from 1MB to 256MB inclusive
-
-Model restoration method - sets the method used to restart context
- model at memory insufficiency, values are:
-
- 0 - restarts model from scratch - default
- 1 - cut off model - decreases performance by as much as 2x
- 2 - freeze context tree - not recommended
-
-An example for packing these fields into the 2 byte storage field is
-illustrated below. These values are stored in Intel low-byte/high-byte
-order.
-
-wPPMd = (Model order - 1) +
- ((Sub-allocator size - 1) << 4) +
- (Model restoration method << 12)
-
-
-VII. Traditional PKWARE Encryption
-----------------------------------
-
-The following information discusses the decryption steps
-required to support traditional PKWARE encryption. This
-form of encryption is considered weak by today's standards
-and its use is recommended only for situations with
-low security needs or for compatibility with older .ZIP
-applications.
-
-Decryption
-----------
-
-PKWARE is grateful to Mr. Roger Schlafly for his expert contribution
-towards the development of PKWARE's traditional encryption.
-
-PKZIP encrypts the compressed data stream. Encrypted files must
-be decrypted before they can be extracted.
-
-Each encrypted file has an extra 12 bytes stored at the start of
-the data area defining the encryption header for that file. The
-encryption header is originally set to random values, and then
-itself encrypted, using three, 32-bit keys. The key values are
-initialized using the supplied encryption password. After each byte
-is encrypted, the keys are then updated using pseudo-random number
-generation techniques in combination with the same CRC-32 algorithm
-used in PKZIP and described elsewhere in this document.
-
-The following is the basic steps required to decrypt a file:
-
-1) Initialize the three 32-bit keys with the password.
-2) Read and decrypt the 12-byte encryption header, further
- initializing the encryption keys.
-3) Read and decrypt the compressed data stream using the
- encryption keys.
-
-Step 1 - Initializing the encryption keys
------------------------------------------
-
-Key(0) <- 305419896
-Key(1) <- 591751049
-Key(2) <- 878082192
-
-loop for i <- 0 to length(password)-1
- update_keys(password(i))
-end loop
-
-Where update_keys() is defined as:
-
-update_keys(char):
- Key(0) <- crc32(key(0),char)
- Key(1) <- Key(1) + (Key(0) & 000000ffH)
- Key(1) <- Key(1) * 134775813 + 1
- Key(2) <- crc32(key(2),key(1) >> 24)
-end update_keys
-
-Where crc32(old_crc,char) is a routine that given a CRC value and a
-character, returns an updated CRC value after applying the CRC-32
-algorithm described elsewhere in this document.
-
-Step 2 - Decrypting the encryption header
------------------------------------------
-
-The purpose of this step is to further initialize the encryption
-keys, based on random data, to render a plaintext attack on the
-data ineffective.
-
-Read the 12-byte encryption header into Buffer, in locations
-Buffer(0) thru Buffer(11).
-
-loop for i <- 0 to 11
- C <- buffer(i) ^ decrypt_byte()
- update_keys(C)
- buffer(i) <- C
-end loop
-
-Where decrypt_byte() is defined as:
-
-unsigned char decrypt_byte()
- local unsigned short temp
- temp <- Key(2) | 2
- decrypt_byte <- (temp * (temp ^ 1)) >> 8
-end decrypt_byte
-
-After the header is decrypted, the last 1 or 2 bytes in Buffer
-should be the high-order word/byte of the CRC for the file being
-decrypted, stored in Intel low-byte/high-byte order. Versions of
-PKZIP prior to 2.0 used a 2 byte CRC check; a 1 byte CRC check is
-used on versions after 2.0. This can be used to test if the password
-supplied is correct or not.
-
-Step 3 - Decrypting the compressed data stream
-----------------------------------------------
-
-The compressed data stream can be decrypted as follows:
-
-loop until done
- read a character into C
- Temp <- C ^ decrypt_byte()
- update_keys(temp)
- output Temp
-end loop
-
-
-VIII. Strong Encryption Specification
--------------------------------------
-
-The Strong Encryption technology defined in this specification is
-covered under a pending patent application. The use or implementation
-in a product of certain technological aspects set forth in the current
-APPNOTE, including those with regard to strong encryption, patching,
-or extended tape operations requires a license from PKWARE. Portions
-of this Strong Encryption technology are available for use at no charge.
-Contact PKWARE for licensing terms and conditions. Refer to section II
-of this APPNOTE (Contacting PKWARE) for information on how to
-contact PKWARE.
-
-Version 5.x of this specification introduced support for strong
-encryption algorithms. These algorithms can be used with either
-a password or an X.509v3 digital certificate to encrypt each file.
-This format specification supports either password or certificate
-based encryption to meet the security needs of today, to enable
-interoperability between users within both PKI and non-PKI
-environments, and to ensure interoperability between different
-computing platforms that are running a ZIP program.
-
-Password based encryption is the most common form of encryption
-people are familiar with. However, inherent weaknesses with
-passwords (e.g. susceptibility to dictionary/brute force attack)
-as well as password management and support issues make certificate
-based encryption a more secure and scalable option. Industry
-efforts and support are defining and moving towards more advanced
-security solutions built around X.509v3 digital certificates and
-Public Key Infrastructures(PKI) because of the greater scalability,
-administrative options, and more robust security over traditional
-password based encryption.
-
-Most standard encryption algorithms are supported with this
-specification. Reference implementations for many of these
-algorithms are available from either commercial or open source
-distributors. Readily available cryptographic toolkits make
-implementation of the encryption features straight-forward.
-This document is not intended to provide a treatise on data
-encryption principles or theory. Its purpose is to document the
-data structures required for implementing interoperable data
-encryption within the .ZIP format. It is strongly recommended that
-you have a good understanding of data encryption before reading
-further.
-
-The algorithms introduced in Version 5.0 of this specification
-include:
-
- RC2 40 bit, 64 bit, and 128 bit
- RC4 40 bit, 64 bit, and 128 bit
- DES
- 3DES 112 bit and 168 bit
-
-Version 5.1 adds support for the following:
-
- AES 128 bit, 192 bit, and 256 bit
-
-
-Version 6.1 introduces encryption data changes to support
-interoperability with Smartcard and USB Token certificate storage
-methods which do not support the OAEP strengthening standard.
-
-Version 6.2 introduces support for encrypting metadata by compressing
-and encrypting the central directory data structure to reduce information
-leakage. Information leakage can occur in legacy ZIP applications
-through exposure of information about a file even though that file is
-stored encrypted. The information exposed consists of file
-characteristics stored within the records and fields defined by this
-specification. This includes data such as a files name, its original
-size, timestamp and CRC32 value.
-
-Version 6.3 introduces support for encrypting data using the Blowfish
-and Twofish algorithms. These are symmetric block ciphers developed
-by Bruce Schneier. Blowfish supports using a variable length key from
-32 to 448 bits. Block size is 64 bits. Implementations should use 16
-rounds and the only mode supported within ZIP files is CBC. Twofish
-supports key sizes 128, 192 and 256 bits. Block size is 128 bits.
-Implementations should use 16 rounds and the only mode supported within
-ZIP files is CBC. Information and source code for both Blowfish and
-Twofish algorithms can be found on the internet. Consult with the author
-of these algorithms for information on terms or restrictions on use.
-
-Central Directory Encryption provides greater protection against
-information leakage by encrypting the Central Directory structure and
-by masking key values that are replicated in the unencrypted Local
-Header. ZIP compatible programs that cannot interpret an encrypted
-Central Directory structure cannot rely on the data in the corresponding
-Local Header for decompression information.
-
-Extra Field records that may contain information about a file that should
-not be exposed should not be stored in the Local Header and should only
-be written to the Central Directory where they can be encrypted. This
-design currently does not support streaming. Information in the End of
-Central Directory record, the Zip64 End of Central Directory Locator,
-and the Zip64 End of Central Directory records are not encrypted. Access
-to view data on files within a ZIP file with an encrypted Central Directory
-requires the appropriate password or private key for decryption prior to
-viewing any files, or any information about the files, in the archive.
-
-Older ZIP compatible programs not familiar with the Central Directory
-Encryption feature will no longer be able to recognize the Central
-Directory and may assume the ZIP file is corrupt. Programs that
-attempt streaming access using Local Headers will see invalid
-information for each file. Central Directory Encryption need not be
-used for every ZIP file. Its use is recommended for greater security.
-ZIP files not using Central Directory Encryption should operate as
-in the past.
-
-This strong encryption feature specification is intended to provide for
-scalable, cross-platform encryption needs ranging from simple password
-encryption to authenticated public/private key encryption.
-
-Encryption provides data confidentiality and privacy. It is
-recommended that you combine X.509 digital signing with encryption
-to add authentication and non-repudiation.
-
-
-Single Password Symmetric Encryption Method:
--------------------------------------------
-
-The Single Password Symmetric Encryption Method using strong
-encryption algorithms operates similarly to the traditional
-PKWARE encryption defined in this format. Additional data
-structures are added to support the processing needs of the
-strong algorithms.
-
-The Strong Encryption data structures are:
-
-1. General Purpose Bits - Bits 0 and 6 of the General Purpose bit
-flag in both local and central header records. Both bits set
-indicates strong encryption. Bit 13, when set indicates the Central
-Directory is encrypted and that selected fields in the Local Header
-are masked to hide their actual value.
-
-
-2. Extra Field 0x0017 in central header only.
-
- Fields to consider in this record are:
-
- Format - the data format identifier for this record. The only
- value allowed at this time is the integer value 2.
-
- AlgId - integer identifier of the encryption algorithm from the
- following range
-
- 0x6601 - DES
- 0x6602 - RC2 (version needed to extract < 5.2)
- 0x6603 - 3DES 168
- 0x6609 - 3DES 112
- 0x660E - AES 128
- 0x660F - AES 192
- 0x6610 - AES 256
- 0x6702 - RC2 (version needed to extract >= 5.2)
- 0x6720 - Blowfish
- 0x6721 - Twofish
- 0x6801 - RC4
- 0xFFFF - Unknown algorithm
-
- Bitlen - Explicit bit length of key
-
- 32 - 448 bits
-
- Flags - Processing flags needed for decryption
-
- 0x0001 - Password is required to decrypt
- 0x0002 - Certificates only
- 0x0003 - Password or certificate required to decrypt
-
- Values > 0x0003 reserved for certificate processing
-
-
-3. Decryption header record preceding compressed file data.
-
- -Decryption Header:
-
- Value Size Description
- ----- ---- -----------
- IVSize 2 bytes Size of initialization vector (IV)
- IVData IVSize Initialization vector for this file
- Size 4 bytes Size of remaining decryption header data
- Format 2 bytes Format definition for this record
- AlgID 2 bytes Encryption algorithm identifier
- Bitlen 2 bytes Bit length of encryption key
- Flags 2 bytes Processing flags
- ErdSize 2 bytes Size of Encrypted Random Data
- ErdData ErdSize Encrypted Random Data
- Reserved1 4 bytes Reserved certificate processing data
- Reserved2 (var) Reserved for certificate processing data
- VSize 2 bytes Size of password validation data
- VData VSize-4 Password validation data
- VCRC32 4 bytes Standard ZIP CRC32 of password validation data
-
- IVData - The size of the IV should match the algorithm block size.
- The IVData can be completely random data. If the size of
- the randomly generated data does not match the block size
- it should be complemented with zero's or truncated as
- necessary. If IVSize is 0,then IV = CRC32 + Uncompressed
- File Size (as a 64 bit little-endian, unsigned integer value).
-
- Format - the data format identifier for this record. The only
- value allowed at this time is the integer value 3.
-
- AlgId - integer identifier of the encryption algorithm from the
- following range
-
- 0x6601 - DES
- 0x6602 - RC2 (version needed to extract < 5.2)
- 0x6603 - 3DES 168
- 0x6609 - 3DES 112
- 0x660E - AES 128
- 0x660F - AES 192
- 0x6610 - AES 256
- 0x6702 - RC2 (version needed to extract >= 5.2)
- 0x6720 - Blowfish
- 0x6721 - Twofish
- 0x6801 - RC4
- 0xFFFF - Unknown algorithm
-
- Bitlen - Explicit bit length of key
-
- 32 - 448 bits
-
- Flags - Processing flags needed for decryption
-
- 0x0001 - Password is required to decrypt
- 0x0002 - Certificates only
- 0x0003 - Password or certificate required to decrypt
-
- Values > 0x0003 reserved for certificate processing
-
- ErdData - Encrypted random data is used to store random data that
- is used to generate a file session key for encrypting
- each file. SHA1 is used to calculate hash data used to
- derive keys. File session keys are derived from a master
- session key generated from the user-supplied password.
- If the Flags field in the decryption header contains
- the value 0x4000, then the ErdData field must be
- decrypted using 3DES. If the value 0x4000 is not set,
- then the ErdData field must be decrypted using AlgId.
-
-
- Reserved1 - Reserved for certificate processing, if value is
- zero, then Reserved2 data is absent. See the explanation
- under the Certificate Processing Method for details on
- this data structure.
-
- Reserved2 - If present, the size of the Reserved2 data structure
- is located by skipping the first 4 bytes of this field
- and using the next 2 bytes as the remaining size. See
- the explanation under the Certificate Processing Method
- for details on this data structure.
-
- VSize - This size value will always include the 4 bytes of the
- VCRC32 data and will be greater than 4 bytes.
-
- VData - Random data for password validation. This data is VSize
- in length and VSize must be a multiple of the encryption
- block size. VCRC32 is a checksum value of VData.
- VData and VCRC32 are stored encrypted and start the
- stream of encrypted data for a file.
-
-
-4. Useful Tips
-
-Strong Encryption is always applied to a file after compression. The
-block oriented algorithms all operate in Cypher Block Chaining (CBC)
-mode. The block size used for AES encryption is 16. All other block
-algorithms use a block size of 8. Two ID's are defined for RC2 to
-account for a discrepancy found in the implementation of the RC2
-algorithm in the cryptographic library on Windows XP SP1 and all
-earlier versions of Windows. It is recommended that zero length files
-not be encrypted, however programs should be prepared to extract them
-if they are found within a ZIP file.
-
-A pseudo-code representation of the encryption process is as follows:
-
-Password = GetUserPassword()
-MasterSessionKey = DeriveKey(SHA1(Password))
-RD = CryptographicStrengthRandomData()
-For Each File
- IV = CryptographicStrengthRandomData()
- VData = CryptographicStrengthRandomData()
- VCRC32 = CRC32(VData)
- FileSessionKey = DeriveKey(SHA1(IV + RD)
- ErdData = Encrypt(RD,MasterSessionKey,IV)
- Encrypt(VData + VCRC32 + FileData, FileSessionKey,IV)
-Done
-
-The function names and parameter requirements will depend on
-the choice of the cryptographic toolkit selected. Almost any
-toolkit supporting the reference implementations for each
-algorithm can be used. The RSA BSAFE(r), OpenSSL, and Microsoft
-CryptoAPI libraries are all known to work well.
-
-
-Single Password - Central Directory Encryption:
------------------------------------------------
-
-Central Directory Encryption is achieved within the .ZIP format by
-encrypting the Central Directory structure. This encapsulates the metadata
-most often used for processing .ZIP files. Additional metadata is stored for
-redundancy in the Local Header for each file. The process of concealing
-metadata by encrypting the Central Directory does not protect the data within
-the Local Header. To avoid information leakage from the exposed metadata
-in the Local Header, the fields containing information about a file are masked.
-
-Local Header:
-
-Masking replaces the true content of the fields for a file in the Local
-Header with false information. When masked, the Local Header is not
-suitable for streaming access and the options for data recovery of damaged
-archives is reduced. Extra Data fields that may contain confidential
-data should not be stored within the Local Header. The value set into
-the Version needed to extract field should be the correct value needed to
-extract the file without regard to Central Directory Encryption. The fields
-within the Local Header targeted for masking when the Central Directory is
-encrypted are:
-
- Field Name Mask Value
- ------------------ ---------------------------
- compression method 0
- last mod file time 0
- last mod file date 0
- crc-32 0
- compressed size 0
- uncompressed size 0
- file name (variable size) Base 16 value from the
- range 1 - 0xFFFFFFFFFFFFFFFF
- represented as a string whose
- size will be set into the
- file name length field
-
-The Base 16 value assigned as a masked file name is simply a sequentially
-incremented value for each file starting with 1 for the first file.
-Modifications to a ZIP file may cause different values to be stored for
-each file. For compatibility, the file name field in the Local Header
-should never be left blank. As of Version 6.2 of this specification,
-the Compression Method and Compressed Size fields are not yet masked.
-Fields having a value of 0xFFFF or 0xFFFFFFFF for the ZIP64 format
-should not be masked.
-
-Encrypting the Central Directory:
-
-Encryption of the Central Directory does not include encryption of the
-Central Directory Signature data, the Zip64 End of Central Directory
-record, the Zip64 End of Central Directory Locator, or the End
-of Central Directory record. The ZIP file comment data is never
-encrypted.
-
-Before encrypting the Central Directory, it may optionally be compressed.
-Compression is not required, but for storage efficiency it is assumed
-this structure will be compressed before encrypting. Similarly, this
-specification supports compressing the Central Directory without
-requiring that it also be encrypted. Early implementations of this
-feature will assume the encryption method applied to files matches the
-encryption applied to the Central Directory.
-
-Encryption of the Central Directory is done in a manner similar to
-that of file encryption. The encrypted data is preceded by a
-decryption header. The decryption header is known as the Archive
-Decryption Header. The fields of this record are identical to
-the decryption header preceding each encrypted file. The location
-of the Archive Decryption Header is determined by the value in the
-Start of the Central Directory field in the Zip64 End of Central
-Directory record. When the Central Directory is encrypted, the
-Zip64 End of Central Directory record will always be present.
-
-The layout of the Zip64 End of Central Directory record for all
-versions starting with 6.2 of this specification will follow the
-Version 2 format. The Version 2 format is as follows:
-
-The leading fixed size fields within the Version 1 format for this
-record remain unchanged. The record signature for both Version 1
-and Version 2 will be 0x06064b50. Immediately following the last
-byte of the field known as the Offset of Start of Central
-Directory With Respect to the Starting Disk Number will begin the
-new fields defining Version 2 of this record.
-
-New fields for Version 2:
-
-Note: all fields stored in Intel low-byte/high-byte order.
-
- Value Size Description
- ----- ---- -----------
- Compression Method 2 bytes Method used to compress the
- Central Directory
- Compressed Size 8 bytes Size of the compressed data
- Original Size 8 bytes Original uncompressed size
- AlgId 2 bytes Encryption algorithm ID
- BitLen 2 bytes Encryption key length
- Flags 2 bytes Encryption flags
- HashID 2 bytes Hash algorithm identifier
- Hash Length 2 bytes Length of hash data
- Hash Data (variable) Hash data
-
-The Compression Method accepts the same range of values as the
-corresponding field in the Central Header.
-
-The Compressed Size and Original Size values will not include the
-data of the Central Directory Signature which is compressed or
-encrypted.
-
-The AlgId, BitLen, and Flags fields accept the same range of values
-the corresponding fields within the 0x0017 record.
-
-Hash ID identifies the algorithm used to hash the Central Directory
-data. This data does not have to be hashed, in which case the
-values for both the HashID and Hash Length will be 0. Possible
-values for HashID are:
-
- Value Algorithm
- ------ ---------
- 0x0000 none
- 0x0001 CRC32
- 0x8003 MD5
- 0x8004 SHA1
- 0x8007 RIPEMD160
- 0x800C SHA256
- 0x800D SHA384
- 0x800E SHA512
-
-When the Central Directory data is signed, the same hash algorithm
-used to hash the Central Directory for signing should be used.
-This is recommended for processing efficiency, however, it is
-permissible for any of the above algorithms to be used independent
-of the signing process.
-
-The Hash Data will contain the hash data for the Central Directory.
-The length of this data will vary depending on the algorithm used.
-
-The Version Needed to Extract should be set to 62.
-
-The value for the Total Number of Entries on the Current Disk will
-be 0. These records will no longer support random access when
-encrypting the Central Directory.
-
-When the Central Directory is compressed and/or encrypted, the
-End of Central Directory record will store the value 0xFFFFFFFF
-as the value for the Total Number of Entries in the Central
-Directory. The value stored in the Total Number of Entries in
-the Central Directory on this Disk field will be 0. The actual
-values will be stored in the equivalent fields of the Zip64
-End of Central Directory record.
-
-Decrypting and decompressing the Central Directory is accomplished
-in the same manner as decrypting and decompressing a file.
-
-Certificate Processing Method:
------------------------------
-
-The Certificate Processing Method of for ZIP file encryption
-defines the following additional data fields:
-
-1. Certificate Flag Values
-
-Additional processing flags that can be present in the Flags field of both
-the 0x0017 field of the central directory Extra Field and the Decryption
-header record preceding compressed file data are:
-
- 0x0007 - reserved for future use
- 0x000F - reserved for future use
- 0x0100 - Indicates non-OAEP key wrapping was used. If this
- this field is set, the version needed to extract must
- be at least 61. This means OAEP key wrapping is not
- used when generating a Master Session Key using
- ErdData.
- 0x4000 - ErdData must be decrypted using 3DES-168, otherwise use the
- same algorithm used for encrypting the file contents.
- 0x8000 - reserved for future use
-
-
-2. CertData - Extra Field 0x0017 record certificate data structure
-
-The data structure used to store certificate data within the section
-of the Extra Field defined by the CertData field of the 0x0017
-record are as shown:
-
- Value Size Description
- ----- ---- -----------
- RCount 4 bytes Number of recipients.
- HashAlg 2 bytes Hash algorithm identifier
- HSize 2 bytes Hash size
- SRList (var) Simple list of recipients hashed public keys
-
-
- RCount This defines the number intended recipients whose
- public keys were used for encryption. This identifies
- the number of elements in the SRList.
-
- HashAlg This defines the hash algorithm used to calculate
- the public key hash of each public key used
- for encryption. This field currently supports
- only the following value for SHA-1
-
- 0x8004 - SHA1
-
- HSize This defines the size of a hashed public key.
-
- SRList This is a variable length list of the hashed
- public keys for each intended recipient. Each
- element in this list is HSize. The total size of
- SRList is determined using RCount * HSize.
-
-
-3. Reserved1 - Certificate Decryption Header Reserved1 Data:
-
- Value Size Description
- ----- ---- -----------
- RCount 4 bytes Number of recipients.
-
- RCount This defines the number intended recipients whose
- public keys were used for encryption. This defines
- the number of elements in the REList field defined below.
-
-
-4. Reserved2 - Certificate Decryption Header Reserved2 Data Structures:
-
-
- Value Size Description
- ----- ---- -----------
- HashAlg 2 bytes Hash algorithm identifier
- HSize 2 bytes Hash size
- REList (var) List of recipient data elements
-
-
- HashAlg This defines the hash algorithm used to calculate
- the public key hash of each public key used
- for encryption. This field currently supports
- only the following value for SHA-1
-
- 0x8004 - SHA1
-
- HSize This defines the size of a hashed public key
- defined in REHData.
-
- REList This is a variable length of list of recipient data.
- Each element in this list consists of a Recipient
- Element data structure as follows:
-
-
- Recipient Element (REList) Data Structure:
-
- Value Size Description
- ----- ---- -----------
- RESize 2 bytes Size of REHData + REKData
- REHData HSize Hash of recipients public key
- REKData (var) Simple key blob
-
-
- RESize This defines the size of an individual REList
- element. This value is the combined size of the
- REHData field + REKData field. REHData is defined by
- HSize. REKData is variable and can be calculated
- for each REList element using RESize and HSize.
-
- REHData Hashed public key for this recipient.
-
- REKData Simple Key Blob. The format of this data structure
- is identical to that defined in the Microsoft
- CryptoAPI and generated using the CryptExportKey()
- function. The version of the Simple Key Blob
- supported at this time is 0x02 as defined by
- Microsoft.
-
-Certificate Processing - Central Directory Encryption:
-------------------------------------------------------
-
-Central Directory Encryption using Digital Certificates will
-operate in a manner similar to that of Single Password Central
-Directory Encryption. This record will only be present when there
-is data to place into it. Currently, data is placed into this
-record when digital certificates are used for either encrypting
-or signing the files within a ZIP file. When only password
-encryption is used with no certificate encryption or digital
-signing, this record is not currently needed. When present, this
-record will appear before the start of the actual Central Directory
-data structure and will be located immediately after the Archive
-Decryption Header if the Central Directory is encrypted.
-
-The Archive Extra Data record will be used to store the following
-information. Additional data may be added in future versions.
-
-Extra Data Fields:
-
-0x0014 - PKCS#7 Store for X.509 Certificates
-0x0016 - X.509 Certificate ID and Signature for central directory
-0x0019 - PKCS#7 Encryption Recipient Certificate List
-
-The 0x0014 and 0x0016 Extra Data records that otherwise would be
-located in the first record of the Central Directory for digital
-certificate processing. When encrypting or compressing the Central
-Directory, the 0x0014 and 0x0016 records must be located in the
-Archive Extra Data record and they should not remain in the first
-Central Directory record. The Archive Extra Data record will also
-be used to store the 0x0019 data.
-
-When present, the size of the Archive Extra Data record will be
-included in the size of the Central Directory. The data of the
-Archive Extra Data record will also be compressed and encrypted
-along with the Central Directory data structure.
-
-Certificate Processing Differences:
-
-The Certificate Processing Method of encryption differs from the
-Single Password Symmetric Encryption Method as follows. Instead
-of using a user-defined password to generate a master session key,
-cryptographically random data is used. The key material is then
-wrapped using standard key-wrapping techniques. This key material
-is wrapped using the public key of each recipient that will need
-to decrypt the file using their corresponding private key.
-
-This specification currently assumes digital certificates will follow
-the X.509 V3 format for 1024 bit and higher RSA format digital
-certificates. Implementation of this Certificate Processing Method
-requires supporting logic for key access and management. This logic
-is outside the scope of this specification.
-
-OAEP Processing with Certificate-based Encryption:
-
-OAEP stands for Optimal Asymmetric Encryption Padding. It is a
-strengthening technique used for small encoded items such as decryption
-keys. This is commonly applied in cryptographic key-wrapping techniques
-and is supported by PKCS #1. Versions 5.0 and 6.0 of this specification
-were designed to support OAEP key-wrapping for certificate-based
-decryption keys for additional security.
-
-Support for private keys stored on Smartcards or Tokens introduced
-a conflict with this OAEP logic. Most card and token products do
-not support the additional strengthening applied to OAEP key-wrapped
-data. In order to resolve this conflict, versions 6.1 and above of this
-specification will no longer support OAEP when encrypting using
-digital certificates.
-
-Versions of PKZIP available during initial development of the
-certificate processing method set a value of 61 into the
-version needed to extract field for a file. This indicates that
-non-OAEP key wrapping is used. This affects certificate encryption
-only, and password encryption functions should not be affected by
-this value. This means values of 61 may be found on files encrypted
-with certificates only, or on files encrypted with both password
-encryption and certificate encryption. Files encrypted with both
-methods can safely be decrypted using the password methods documented.
-
-IX. Change Process
-------------------
-
-In order for the .ZIP file format to remain a viable definition, this
-specification should be considered as open for periodic review and
-revision. Although this format was originally designed with a
-certain level of extensibility, not all changes in technology
-(present or future) were or will be necessarily considered in its
-design. If your application requires new definitions to the
-extensible sections in this format, or if you would like to
-submit new data structures, please forward your request to
-zipformat@pkware.com. All submissions will be reviewed by the
-ZIP File Specification Committee for possible inclusion into
-future versions of this specification. Periodic revisions
-to this specification will be published to ensure interoperability.
-We encourage comments and feedback that may help improve clarity
-or content.
-
-X. Incorporating PKWARE Proprietary Technology into Your Product
-----------------------------------------------------------------
-
-PKWARE is committed to the interoperability and advancement of the
-.ZIP format. PKWARE offers a free license for certain technological
-aspects described above under certain restrictions and conditions.
-However, the use or implementation in a product of certain technological
-aspects set forth in the current APPNOTE, including those with regard to
-strong encryption, patching, or extended tape operations requires a
-license from PKWARE. Please contact PKWARE with regard to acquiring
-a license.
-
-XI. Acknowledgements
----------------------
-
-In addition to the above mentioned contributors to PKZIP and PKUNZIP,
-I would like to extend special thanks to Robert Mahoney for suggesting
-the extension .ZIP for this software.
-
-XII. References
----------------
-
- Fiala, Edward R., and Greene, Daniel H., "Data compression with
- finite windows", Communications of the ACM, Volume 32, Number 4,
- April 1989, pages 490-505.
-
- Held, Gilbert, "Data Compression, Techniques and Applications,
- Hardware and Software Considerations", John Wiley & Sons, 1987.
-
- Huffman, D.A., "A method for the construction of minimum-redundancy
- codes", Proceedings of the IRE, Volume 40, Number 9, September 1952,
- pages 1098-1101.
-
- Nelson, Mark, "LZW Data Compression", Dr. Dobbs Journal, Volume 14,
- Number 10, October 1989, pages 29-37.
-
- Nelson, Mark, "The Data Compression Book", M&T Books, 1991.
-
- Storer, James A., "Data Compression, Methods and Theory",
- Computer Science Press, 1988
-
- Welch, Terry, "A Technique for High-Performance Data Compression",
- IEEE Computer, Volume 17, Number 6, June 1984, pages 8-19.
-
- Ziv, J. and Lempel, A., "A universal algorithm for sequential data
- compression", Communications of the ACM, Volume 30, Number 6,
- June 1987, pages 520-540.
-
- Ziv, J. and Lempel, A., "Compression of individual sequences via
- variable-rate coding", IEEE Transactions on Information Theory,
- Volume 24, Number 5, September 1978, pages 530-536.
-
-
-APPENDIX A - AS/400 Extra Field (0x0065) Attribute Definitions
---------------------------------------------------------------
-
-Field Definition Structure:
-
- a. field length including length 2 bytes
- b. field code 2 bytes
- c. data x bytes
-
-Field Code Description
- 4001 Source type i.e. CLP etc
- 4002 The text description of the library
- 4003 The text description of the file
- 4004 The text description of the member
- 4005 x'F0' or 0 is PF-DTA, x'F1' or 1 is PF_SRC
- 4007 Database Type Code 1 byte
- 4008 Database file and fields definition
- 4009 GZIP file type 2 bytes
- 400B IFS code page 2 bytes
- 400C IFS Creation Time 4 bytes
- 400D IFS Access Time 4 bytes
- 400E IFS Modification time 4 bytes
- 005C Length of the records in the file 2 bytes
- 0068 GZIP two words 8 bytes
-
-APPENDIX B - z/OS Extra Field (0x0065) Attribute Definitions
-------------------------------------------------------------
-
-Field Definition Structure:
-
- a. field length including length 2 bytes
- b. field code 2 bytes
- c. data x bytes
-
-Field Code Description
- 0001 File Type 2 bytes
- 0002 NonVSAM Record Format 1 byte
- 0003 Reserved
- 0004 NonVSAM Block Size 2 bytes Big Endian
- 0005 Primary Space Allocation 3 bytes Big Endian
- 0006 Secondary Space Allocation 3 bytes Big Endian
- 0007 Space Allocation Type1 byte flag
- 0008 Modification Date Retired with PKZIP 5.0 +
- 0009 Expiration Date Retired with PKZIP 5.0 +
- 000A PDS Directory Block Allocation 3 bytes Big Endian binary value
- 000B NonVSAM Volume List variable
- 000C UNIT Reference Retired with PKZIP 5.0 +
- 000D DF/SMS Management Class 8 bytes EBCDIC Text Value
- 000E DF/SMS Storage Class 8 bytes EBCDIC Text Value
- 000F DF/SMS Data Class 8 bytes EBCDIC Text Value
- 0010 PDS/PDSE Member Info. 30 bytes
- 0011 VSAM sub-filetype 2 bytes
- 0012 VSAM LRECL 13 bytes EBCDIC "(num_avg num_max)"
- 0013 VSAM Cluster Name Retired with PKZIP 5.0 +
- 0014 VSAM KSDS Key Information 13 bytes EBCDIC "(num_length num_position)"
- 0015 VSAM Average LRECL 5 bytes EBCDIC num_value padded with blanks
- 0016 VSAM Maximum LRECL 5 bytes EBCDIC num_value padded with blanks
- 0017 VSAM KSDS Key Length 5 bytes EBCDIC num_value padded with blanks
- 0018 VSAM KSDS Key Position 5 bytes EBCDIC num_value padded with blanks
- 0019 VSAM Data Name 1-44 bytes EBCDIC text string
- 001A VSAM KSDS Index Name 1-44 bytes EBCDIC text string
- 001B VSAM Catalog Name 1-44 bytes EBCDIC text string
- 001C VSAM Data Space Type 9 bytes EBCDIC text string
- 001D VSAM Data Space Primary 9 bytes EBCDIC num_value left-justified
- 001E VSAM Data Space Secondary 9 bytes EBCDIC num_value left-justified
- 001F VSAM Data Volume List variable EBCDIC text list of 6-character Volume IDs
- 0020 VSAM Data Buffer Space 8 bytes EBCDIC num_value left-justified
- 0021 VSAM Data CISIZE 5 bytes EBCDIC num_value left-justified
- 0022 VSAM Erase Flag 1 byte flag
- 0023 VSAM Free CI % 3 bytes EBCDIC num_value left-justified
- 0024 VSAM Free CA % 3 bytes EBCDIC num_value left-justified
- 0025 VSAM Index Volume List variable EBCDIC text list of 6-character Volume IDs
- 0026 VSAM Ordered Flag 1 byte flag
- 0027 VSAM REUSE Flag 1 byte flag
- 0028 VSAM SPANNED Flag 1 byte flag
- 0029 VSAM Recovery Flag 1 byte flag
- 002A VSAM WRITECHK Flag 1 byte flag
- 002B VSAM Cluster/Data SHROPTS 3 bytes EBCDIC "n,y"
- 002C VSAM Index SHROPTS 3 bytes EBCDIC "n,y"
- 002D VSAM Index Space Type 9 bytes EBCDIC text string
- 002E VSAM Index Space Primary 9 bytes EBCDIC num_value left-justified
- 002F VSAM Index Space Secondary 9 bytes EBCDIC num_value left-justified
- 0030 VSAM Index CISIZE 5 bytes EBCDIC num_value left-justified
- 0031 VSAM Index IMBED 1 byte flag
- 0032 VSAM Index Ordered Flag 1 byte flag
- 0033 VSAM REPLICATE Flag 1 byte flag
- 0034 VSAM Index REUSE Flag 1 byte flag
- 0035 VSAM Index WRITECHK Flag 1 byte flag Retired with PKZIP 5.0 +
- 0036 VSAM Owner 8 bytes EBCDIC text string
- 0037 VSAM Index Owner 8 bytes EBCDIC text string
- 0038 Reserved
- 0039 Reserved
- 003A Reserved
- 003B Reserved
- 003C Reserved
- 003D Reserved
- 003E Reserved
- 003F Reserved
- 0040 Reserved
- 0041 Reserved
- 0042 Reserved
- 0043 Reserved
- 0044 Reserved
- 0045 Reserved
- 0046 Reserved
- 0047 Reserved
- 0048 Reserved
- 0049 Reserved
- 004A Reserved
- 004B Reserved
- 004C Reserved
- 004D Reserved
- 004E Reserved
- 004F Reserved
- 0050 Reserved
- 0051 Reserved
- 0052 Reserved
- 0053 Reserved
- 0054 Reserved
- 0055 Reserved
- 0056 Reserved
- 0057 Reserved
- 0058 PDS/PDSE Member TTR Info. 6 bytes Big Endian
- 0059 PDS 1st LMOD Text TTR 3 bytes Big Endian
- 005A PDS LMOD EP Rec # 4 bytes Big Endian
- 005B Reserved
- 005C Max Length of records 2 bytes Big Endian
- 005D PDSE Flag 1 byte flag
- 005E Reserved
- 005F Reserved
- 0060 Reserved
- 0061 Reserved
- 0062 Reserved
- 0063 Reserved
- 0064 Reserved
- 0065 Last Date Referenced 4 bytes Packed Hex "yyyymmdd"
- 0066 Date Created 4 bytes Packed Hex "yyyymmdd"
- 0068 GZIP two words 8 bytes
- 0071 Extended NOTE Location 12 bytes Big Endian
- 0072 Archive device UNIT 6 bytes EBCDIC
- 0073 Archive 1st Volume 6 bytes EBCDIC
- 0074 Archive 1st VOL File Seq# 2 bytes Binary
-
-APPENDIX C - Zip64 Extensible Data Sector Mappings (EFS)
---------------------------------------------------------
-
- -Z390 Extra Field:
-
- The following is the general layout of the attributes for the
- ZIP 64 "extra" block for extended tape operations. Portions of
- this extended tape processing technology is covered under a
- pending patent application. The use or implementation in a
- product of certain technological aspects set forth in the
- current APPNOTE, including those with regard to strong encryption,
- patching or extended tape operations, requires a license from
- PKWARE. Please contact PKWARE with regard to acquiring a license.
-
-
- Note: some fields stored in Big Endian format. All text is
- in EBCDIC format unless otherwise specified.
-
- Value Size Description
- ----- ---- -----------
- (Z390) 0x0065 2 bytes Tag for this "extra" block type
- Size 4 bytes Size for the following data block
- Tag 4 bytes EBCDIC "Z390"
- Length71 2 bytes Big Endian
- Subcode71 2 bytes Enote type code
- FMEPos 1 byte
- Length72 2 bytes Big Endian
- Subcode72 2 bytes Unit type code
- Unit 1 byte Unit
- Length73 2 bytes Big Endian
- Subcode73 2 bytes Volume1 type code
- FirstVol 1 byte Volume
- Length74 2 bytes Big Endian
- Subcode74 2 bytes FirstVol file sequence
- FileSeq 2 bytes Sequence
-
-APPENDIX D - Language Encoding (EFS)
-------------------------------------
-
-The ZIP format has historically supported only the original IBM PC character
-encoding set, commonly referred to as IBM Code Page 437. This limits storing
-file name characters to only those within the original MS-DOS range of values
-and does not properly support file names in other character encodings, or
-languages. To address this limitation, this specification will support the
-following change.
-
-If general purpose bit 11 is unset, the file name and comment should conform
-to the original ZIP character encoding. If general purpose bit 11 is set, the
-filename and comment must support The Unicode Standard, Version 4.1.0 or
-greater using the character encoding form defined by the UTF-8 storage
-specification. The Unicode Standard is published by the The Unicode
-Consortium (www.unicode.org). UTF-8 encoded data stored within ZIP files
-is expected to not include a byte order mark (BOM).
-
-Applications may choose to supplement this file name storage through the use
-of the 0x0008 Extra Field. Storage for this optional field is currently
-undefined, however it will be used to allow storing extended information
-on source or target encoding that may further assist applications with file
-name, or file content encoding tasks. Please contact PKWARE with any
-requirements on how this field should be used.
-
-The 0x0008 Extra Field storage may be used with either setting for general
-purpose bit 11. Examples of the intended usage for this field is to store
-whether "modified-UTF-8" (JAVA) is used, or UTF-8-MAC. Similarly, other
-commonly used character encoding (code page) designations can be indicated
-through this field. Formalized values for use of the 0x0008 record remain
-undefined at this time. The definition for the layout of the 0x0008 field
-will be published when available. Use of the 0x0008 Extra Field provides
-for storing data within a ZIP file in an encoding other than IBM Code
-Page 437 or UTF-8.
-
-General purpose bit 11 will not imply any encoding of file content or
-password. Values defining character encoding for file content or
-password must be stored within the 0x0008 Extended Language Encoding
-Extra Field.
-
-Ed Gordon of the Info-ZIP group has defined a pair of "extra field" records
-that can be used to store UTF-8 file name and file comment fields. These
-records can be used for cases when the general purpose bit 11 method
-for storing UTF-8 data in the standard file name and comment fields is
-not desirable. A common case for this alternate method is if backward
-compatibility with older programs is required.
-
-Definitions for the record structure of these fields are included above
-in the section on 3rd party mappings for "extra field" records. These
-records are identified by Header ID's 0x6375 (Info-ZIP Unicode Comment
-Extra Field) and 0x7075 (Info-ZIP Unicode Path Extra Field).
-
-The choice of which storage method to use when writing a ZIP file is left
-to the implementation. Developers should expect that a ZIP file may
-contain either method and should provide support for reading data in
-either format. Use of general purpose bit 11 reduces storage requirements
-for file name data by not requiring additional "extra field" data for
-each file, but can result in older ZIP programs not being able to extract
-files. Use of the 0x6375 and 0x7075 records will result in a ZIP file
-that should always be readable by older ZIP programs, but requires more
-storage per file to write file name and/or file comment fields.
-
-
-
-
-
diff --git a/apps/files_odfviewer/src/webodf/webodf/CMakeLists.txt b/apps/files_odfviewer/src/webodf/webodf/CMakeLists.txt
deleted file mode 100644
index 247ff5c6258..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/CMakeLists.txt
+++ /dev/null
@@ -1,201 +0,0 @@
-string(COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}"
- WRONGCMAKEDIR)
-if(WRONGCMAKEDIR)
- message(FATAL_ERROR "You should point CMake to the parent directory.")
-endif(WRONGCMAKEDIR)
-
-set(TESTJSFILES tests/core/ZipTests.js
- tests/core/Base64Tests.js
- tests/core/CursorTests.js
- tests/core/PointWalkerTests.js
- tests/core/RuntimeTests.js
- tests/gui/CaretTests.js
- tests/gui/SelectionMoverTests.js
- tests/gui/XMLEditTests.js
- tests/xmldom/OperationalTransformDOMTests.js
- tests/xmldom/XPathTests.js
- tests/tests.js
-)
-
-add_custom_target(jslintcheck ALL
- COMMAND ${NODE} lib/runtime.js tools/runjslint.js
- ${LIBJSFILES} ${TESTJSFILES}
- DEPENDS NodeJS
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- SOURCES ${LIBJSFILES} ${TESTJSFILES}
-)
-
-if (Java_JAVA_EXECUTABLE)
- # nonStandardJsDocs is not used because we use @licstart @licend and @source
- set(SHARED_CLOSURE_ARGS --warning_level VERBOSE --jscomp_error accessControls --jscomp_error ambiguousFunctionDecl --jscomp_error checkRegExp --jscomp_error checkTypes --jscomp_error checkVars --jscomp_error constantProperty --jscomp_error deprecated --jscomp_error externsValidation --jscomp_error fileoverviewTags --jscomp_error globalThis --jscomp_error invalidCasts --jscomp_error missingProperties --jscomp_error strictModuleDepCheck --jscomp_error typeInvalidation --jscomp_error undefinedVars --jscomp_error unknownDefines --jscomp_error uselessCode --jscomp_error visibility --jscomp_off nonStandardJsDocs --summary_detail_level 3)
-
- foreach(JSFILE ${LIBJSFILES})
- set(LIB_CLOSURE_ARGS ${LIB_CLOSURE_ARGS}
- --js ${CMAKE_CURRENT_SOURCE_DIR}/${JSFILE})
- endforeach(JSFILE ${LIBJSFILES})
-
- foreach(JSFILE ${TESTJSFILES})
- set(TEST_CLOSURE_ARGS ${TEST_CLOSURE_ARGS}
- --js ${CMAKE_CURRENT_SOURCE_DIR}/${JSFILE})
- endforeach(JSFILE ${TESTJSFILES})
-
- add_custom_command(
- OUTPUT simplecompiled.js
- COMMAND ${Java_JAVA_EXECUTABLE}
- ARGS -jar ${CLOSURE_JAR}
- ${SHARED_CLOSURE_ARGS} ${LIB_CLOSURE_ARGS} ${TEST_CLOSURE_ARGS}
- --compilation_level WHITESPACE_ONLY
- --formatting PRETTY_PRINT
- --js_output_file simplecompiled.js
- DEPENDS ClosureCompiler ${LIBJSFILES} ${TESTJSFILES}
- )
-
- add_custom_command(
- OUTPUT compiled.js
- COMMAND ${Java_JAVA_EXECUTABLE}
- ARGS -jar ${CLOSURE_JAR}
- --define IS_COMPILED_CODE=true
- ${SHARED_CLOSURE_ARGS} ${LIB_CLOSURE_ARGS} ${TEST_CLOSURE_ARGS}
- --compilation_level ADVANCED_OPTIMIZATIONS
- --formatting PRETTY_PRINT
- --externs ${CMAKE_CURRENT_SOURCE_DIR}/tools/externs.js
- --js_output_file compiled.js
- DEPENDS ClosureCompiler ${LIBJSFILES} ${TESTJSFILES} tools/externs.js
- )
-
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/webodf.js
- COMMAND ${Java_JAVA_EXECUTABLE}
- ARGS -jar ${CLOSURE_JAR}
- --define IS_COMPILED_CODE=true
- ${SHARED_CLOSURE_ARGS} ${LIB_CLOSURE_ARGS}
- --compilation_level SIMPLE_OPTIMIZATIONS
- --formatting PRINT_INPUT_DELIMITER
- --externs ${CMAKE_CURRENT_SOURCE_DIR}/tools/externs.js
- --js_output_file ${CMAKE_CURRENT_BINARY_DIR}/webodf.js
- DEPENDS ClosureCompiler ${LIBJSFILES} tools/externs.js
- )
- add_custom_target(webodf.js
- SOURCES ${CMAKE_CURRENT_BINARY_DIR}/webodf.js
- )
-
- # too hardcore for now...
- # add_custom_command(
- # OUTPUT webodf-experimental.js
- # COMMAND ${Java_JAVA_EXECUTABLE}
- # ARGS -jar ${CLOSURE_JAR}
- # --define IS_COMPILED_CODE=true
- # ${SHARED_CLOSURE_ARGS} ${LIB_CLOSURE_ARGS}
- # --js ${CMAKE_CURRENT_SOURCE_DIR}/lib/export.js
- # --compilation_level ADVANCED_OPTIMIZATIONS
- # --formatting PRINT_INPUT_DELIMITER
- # --externs ${CMAKE_CURRENT_SOURCE_DIR}/tools/externs.js
- # --js_output_file webodf-experimental.js
- # DEPENDS ClosureCompiler ${LIBJSFILES} lib/export.js tools/externs.js
- # )
-
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/webodf-debug.js
- COMMAND ${Java_JAVA_EXECUTABLE}
- ARGS -jar ${CLOSURE_JAR}
- --define IS_COMPILED_CODE=true
- ${SHARED_CLOSURE_ARGS} ${LIB_CLOSURE_ARGS}
- --compilation_level WHITESPACE_ONLY
- --formatting PRETTY_PRINT
- --externs ${CMAKE_CURRENT_SOURCE_DIR}/tools/externs.js
- --js_output_file ${CMAKE_CURRENT_BINARY_DIR}/webodf-debug.js
- DEPENDS ClosureCompiler ${LIBJSFILES} tools/externs.js
- )
- add_custom_target(webodf-debug.js
- SOURCES ${CMAKE_CURRENT_BINARY_DIR}/webodf-debug.js
- )
-
- add_custom_command(
- OUTPUT odfedit.js
- COMMAND ${Java_JAVA_EXECUTABLE}
- ARGS -jar ${CLOSURE_JAR}
- --define IS_COMPILED_CODE=true
- ${SHARED_CLOSURE_ARGS} ${LIB_CLOSURE_ARGS}
- --js ${CMAKE_CURRENT_SOURCE_DIR}/odfedit.js
- --compilation_level ADVANCED_OPTIMIZATIONS
- --formatting PRETTY_PRINT
- --externs ${CMAKE_CURRENT_SOURCE_DIR}/tools/externs.js
- --externs ${CMAKE_CURRENT_SOURCE_DIR}/tools/extjsexterns.js
- --js_output_file odfedit.js
- DEPENDS ClosureCompiler ${LIBJSFILES} ${APPJSFILES} tools/externs.js tools/extjsexterns.js odfedit.js
- )
-
- add_custom_command(
- OUTPUT gui.js
- COMMAND ${Java_JAVA_EXECUTABLE}
- ARGS -jar ${CLOSURE_JAR}
- --define IS_COMPILED_CODE=true
- ${SHARED_CLOSURE_ARGS} ${LIB_CLOSURE_ARGS}
- --js ${CMAKE_CURRENT_SOURCE_DIR}/filelister.js
- --js ${CMAKE_CURRENT_SOURCE_DIR}/gui.js
- --compilation_level ADVANCED_OPTIMIZATIONS
- --formatting PRETTY_PRINT
- --externs ${CMAKE_CURRENT_SOURCE_DIR}/tools/externs.js
- --externs ${CMAKE_CURRENT_SOURCE_DIR}/tools/extjsexterns.js
- --js_output_file gui.js
- DEPENDS ClosureCompiler ${LIBJSFILES} ${APPJSFILES} tools/externs.js tools/extjsexterns.js filelister.js gui.js
- )
-
- add_custom_target(syntaxcheck ALL
- DEPENDS simplecompiled.js webodf.js webodf-debug.js compiled.js
- )
-
- add_custom_target(rhinotest
- COMMAND ${Java_JAVA_EXECUTABLE} -jar ${RHINO}
- -debug lib/runtime.js tests/tests.js
- DEPENDS Rhino
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- SOURCES ${LIBJSFILES}
- )
- add_custom_target(simplerhinotest
- COMMAND ${Java_JAVA_EXECUTABLE} -jar ${RHINO}
- ${CMAKE_CURRENT_BINARY_DIR}/simplecompiled.js
- DEPENDS Rhino simplecompiled.js
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests
- )
- add_custom_command(
- OUTPUT docs/index.html
- COMMAND ${Java_JAVA_EXECUTABLE}
- ARGS -jar ${JSDOCDIR}/jsrun.jar
- ${JSDOCDIR}/app/run.js -d=${CMAKE_CURRENT_BINARY_DIR}/docs
- -t=${JSDOCDIR}/templates/jsdoc ${LIBJSFILES}
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- DEPENDS ${LIBJSFILES} JsDoc
- )
- add_custom_target(doc DEPENDS docs/index.html)
- add_custom_target(simplenodetest ALL
- COMMAND ${NODE} ${CMAKE_CURRENT_BINARY_DIR}/simplecompiled.js
- DEPENDS NodeJS simplecompiled.js
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests
- )
-
-endif (Java_JAVA_EXECUTABLE)
-
-add_custom_target(nodetest ALL
- COMMAND ${NODE} lib/runtime.js tests/tests.js
- DEPENDS NodeJS
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- SOURCES ${LIBJSFILES}
-)
-if (QT4_FOUND)
- add_custom_target(qtjsruntimetest ALL
- COMMAND ${CMAKE_BINARY_DIR}/programs/qtjsruntime/qtjsruntime ../lib/runtime.js tests.js
- DEPENDS qtjsruntime jslintcheck
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests
- SOURCES ${LIBJSFILES}
- )
-endif (QT4_FOUND)
-add_custom_command(
- OUTPUT instrumented/index.html
- COMMAND ${JSCOVERAGE}
- ARGS --exclude=extjs --exclude=extjs/.git ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}/instrumented
- DEPENDS ${LIBJSFILES} jslintcheck JSCoverage
-)
-add_custom_target(instrumented ALL DEPENDS instrumented/index.html)
-# vim:expandtab
diff --git a/apps/files_odfviewer/src/webodf/webodf/README b/apps/files_odfviewer/src/webodf/webodf/README
deleted file mode 100644
index a4dde2fee79..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/README
+++ /dev/null
@@ -1,43 +0,0 @@
-This directory contains the javacript code to WebODF as well as applications that use it. The applications are browser applications, commandline applications and unit tests.
-
-lib/
-lib/core/ Parts of WebODF that also work on JavaScript runtimes without a
- document window.
-lib/gui/ Parts of WebODF that require a domtree
-
-The library should be able to run in a number of different runtimes. Currently these are:
- - a webbrowser
- - node.js
- - rhino
-A common API is implemented for these three environments in the files lib/browser.js, lib/node.js and lib/rhino.js respectively.
-
-
-
-Requirements on the code
-
-There are several requirements that need to met before code can be considered for inclusion in WebODF. Most requirements can be checked automatically, a few have to be checked by hand. A contribution must:
- - be contributed under the appropriate license
- - be javascript
- - not give any warnings in a JSLint check
- - be unchanged when passed through jsbeautifier
- - compile with the closure compiler
- - must pass all the unit tests that were passed before
- - as separate js files in the currenlty used Node.JS implementation
- - as a single compiled file in the currenlty used Node.JS implementation
- - as separate js files in the currenlty used Rhino implementation
- - as a single compiled file Rhino implementation
- - must have equal or greater code coverage for the each of the test runs
-
-The automatic checks can be performed by running a dedicated command that reports in an xml file. This report is compared to the previous report.
-
-runtests.js is the command that creates a report.
-
-
-
-
-
-
-
-
-
-
diff --git a/apps/files_odfviewer/src/webodf/webodf/compare.html b/apps/files_odfviewer/src/webodf/webodf/compare.html
deleted file mode 100644
index 0cf1cc80af7..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/compare.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
- <style type="text/css" media="screen">
- body, html, div {
- padding: 0px;
- margin: 0px;
- border: 0px;
- }
- body, html {
- height: 100%;
- text-align: center;
- }
- html > body {
- background: black;
- }
- </style>
- <link rel="stylesheet" type="text/css" href="webodf.css"/>
- <script src="lib/runtime.js" type="text/javascript" charset="utf-8"></script>
- <script src="compare.js" type="text/javascript" charset="utf-8"></script>
- <script type="text/javascript" charset="utf-8">
-window.setTimeout(function () {
- init(window, document);
-}, 0);
- </script>
- <title></title>
-</head>
-
-<body>
- <div id="odf"/>
-</body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/webodf/compare.js b/apps/files_odfviewer/src/webodf/webodf/compare.js
deleted file mode 100644
index 16bf5e333f5..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/compare.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/*global runtime: true, odf: true*/
-/*jslint white: false*/
-function getURIParameters(window) {
- "use strict";
- var params = {},
- query = window.location.search.substring(1),
- parms = query.split('&'),
- i,
- pos,
- key,
- val;
- for (i = 0; i < parms.length; i += 1) {
- pos = parms[i].indexOf('=');
- if (pos > 0) {
- key = parms[i].substring(0, pos);
- val = parms[i].substring(pos + 1);
- params[key] = val;
- }
- }
- return params;
-}
-function init(window, document) {
- "use strict";
- runtime.loadClass("odf.OdfCanvas");
- var params = getURIParameters(window),
- odfelement = document.getElementById("odf"),
- odfcanvas = new odf.OdfCanvas(odfelement);
- if (!params.odf) {
- return;
- }
- odfcanvas.addListener("statereadychange", function () {
- var s = odfelement.style,
- bgzoom = "100% auto",
- pos;
- s.backgroundImage = "url(" + params.bg + ")";
- s.backgroundRepeat = "no-repeat";
- if (params.bgzoom) {
- bgzoom = params.bgzoom + "% auto";
- }
- s.backgroundSize = bgzoom;
- pos = (params.x || "0") + "px " + (params.y || "0") + "px";
- s.backgroundPosition = pos;
- });
- odfcanvas.load(params.odf);
-}
diff --git a/apps/files_odfviewer/src/webodf/webodf/deflateinmozilla.txt b/apps/files_odfviewer/src/webodf/webodf/deflateinmozilla.txt
deleted file mode 100644
index 866b29de774..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/deflateinmozilla.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-Found this in a mozilla forum.
-http://forums.mozillazine.org/viewtopic.php?f=27&t=313496&start=0#
-
-Another implementation under MIT license can be found here:
-http://www.codeproject.com/KB/scripting/Javascript_binaryenc.aspx
-
- //listener for the converted data
- var listener =
- {
- onDataAvailable : function(request, context, inputStream, offset, count)
- {
- //write the data
- var output = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
-
- //outputFile is a file which will contain the gunzipped data
- if(!outputFile.exists())
- output.init(outputFile, 0x02 | 0x08, 0644, 0);
-
- else
- output.init(outputFile, 0x02 | 0x10, 0644, 0);
-
- var scriptable = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream);
- scriptable.init(inputStream);
-
- var data = scriptable.read(inputStream.available());
- output.write(data, data.length);
-
- output.close();
- },
-
- onStartRequest : function(request, context)
- {
- },
-
- onStopRequest : function(request, context)
- {
- }
- };
-
- //fake uri needed to create a channel
- var uri = Components.classes["@mozilla.org/network/simple-uri;1"].createInstance(Components.interfaces.nsIURI);
- uri.scheme = "http://gunzip";
-
- //fake channel needed to create a request
- var chan = Components.classes["@mozilla.org/network/input-stream-channel;1"].createInstance(Components.interfaces.nsIInputStreamChannel);
- chan.setURI(uri);
- chan.contentLength = decrypted.length;
- chan.contentType = "gzip";
- chan.contentStream = null;
-
- var request = chan.QueryInterface(Components.interfaces.nsIRequest);
-
- // Attempt to gunzip
- var conv = Components.classes["@mozilla.org/streamconv;1?from=gzip&to=uncompressed"].createInstance(Components.interfaces.nsIStreamConverter);
-
- conv.asyncConvertData("gzip", "uncompressed", listener, null);
-
- conv.onStartRequest(request, null);
-
- //input is an inputstream which contains the gzipped data
- var avail = input.available();
-
- //really do the conversion
- conv.onDataAvailable(request, null, input, 0, avail);
-
- var status = {};
- conv.onStopRequest(request, null, status);
-
- input.close();
diff --git a/apps/files_odfviewer/src/webodf/webodf/embedodf.html b/apps/files_odfviewer/src/webodf/webodf/embedodf.html
deleted file mode 100644
index 96bb25cc2be..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/embedodf.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<html><link rel='stylesheet' href='webodf.css'/><script src='webodf.js'/><div id='odf'>
-<!-- This html is used by applications that embed webodf such as nativeQtClient. You can replace webodf.js with lib/runtime.js when debugging. -->
diff --git a/apps/files_odfviewer/src/webodf/webodf/filelist.js b/apps/files_odfviewer/src/webodf/webodf/filelist.js
deleted file mode 100644
index 8f7b876b46a..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/filelist.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-var fileList = [
- 'kofficetests/odf/134010.ods',
- '../../../odfkit/odfkit/odfkit/LayoutTests/fast/odf/script-tests/hello-odf-2.odt',
- '../../../odfkit/odfkit/odfkit/LayoutTests/fast/odf/script-tests/hello-odf-1.odt',
- '../../../odfkit/odfkit/odfkit/LayoutTests/platform/mac/fast/loader/resources/mimeTypeExamples/example-ods.ods',
- '../../../odfkit/odfkit/lpod-python/test/samples/note.odt',
- '../../../odfkit/odfkit/lpod-python/test/samples/list.odt',
- '../../../odfkit/odfkit/lpod-python/test/samples/frame_image.odp',
- '../../../odfkit/odfkit/lpod-python/test/samples/bookmark.odt',
- '../../../odfkit/odfkit/lpod-python/test/samples/span_a.odt',
- '../../../odfkit/odfkit/lpod-python/test/samples/toc.odt',
- '../../../odfkit/odfkit/lpod-python/test/samples/meta.odt',
- '../../../odfkit/odfkit/lpod-python/test/samples/base_text.odt',
- '../../../odfkit/odfkit/lpod-python/test/samples/span_style.odt',
- '../../../odfkit/odfkit/lpod-python/test/samples/variable.odt',
- '../../../odfkit/odfkit/lpod-python/test/samples/example.odp',
- '../../../odfkit/odfkit/lpod-python/test/samples/base_shapes.odg',
- '../../../odfkit/odfkit/lpod-python/test/samples/simple_table.ods',
- '../../../odfkit/odfkit/lpod-python/test/samples/example.odt',
- '../../../odfkit/odfkit/lpod-python/test/samples/styled_table.ods',
- '../../../odfkit/odfkit/lpod-python/test/samples/tracked_changes.odt',
- '../../../odfkit/odfkit/lpod-python/templates/lpod_styles.odt',
- '../../../ictu/ictu/xsl-odt/z2.odt',
- '../../../ictu/ictu/xsl-odt/gerechtelijkeaankondigingen/input/stcrt-2010-8050.odt',
- '../../../ictu/ictu/odfquality/stcrt-2010-6505/stcrt-2010-6505.odt',
- '../../../ictu/ictu/odfquality/kst-31460-12/kst-31460-12.odt',
- '../../../ictu/ictu/odfquality/ah-tk-20092010-2140/ah-tk-20092010-2140.odt',
- '../../../ictu/ictu/odfquality/kv-tk-2010Z06142/kv-tk-2010Z06142.odt',
- '../../../ictu/ictu/odfquality/stb-2010-161/stb-2010-161.odt',
- 'kofficetests/odf/charts/Areacharts.odp',
- 'kofficetests/odf/xenophon.odt',
- 'kofficetests/odf/134010.ods',
- 'kofficetests/interoperability/kword/oowriter/oow_pic_flip_vertical.odt'
-];
diff --git a/apps/files_odfviewer/src/webodf/webodf/filelister.html b/apps/files_odfviewer/src/webodf/webodf/filelister.html
deleted file mode 100644
index 0caf7b599db..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/filelister.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>FileLister demo</title>
- <script src="filelister.js" type="text/javascript" charset="utf-8"></script>
- <script src="base64.js" type="text/javascript" charset="utf-8"></script>
- <script src="bytearray.js" type="text/javascript" charset="utf-8"></script>
- <script src="rawinflate.js" type="text/javascript" charset="utf-8"></script>
- <script src="zip.js" type="text/javascript" charset="utf-8"></script>
- <script type="text/javascript" charset="utf-8">
-function listFilesCallback(directories, files) {
- for (var i in files) {
- var e = document.createElement('p');
- var t = document.createTextNode(files[i]);
- var img = document.createElement('img');
- img.src = getThumbUrl(files[i]);
- e.appendChild(img);
- e.appendChild(t);
- document.body.appendChild(e);
- }
-}
-function getThumbUrl(url) {
- var data;
- try {
- var zip = new Zip(url);
- data = zip.load('Thumbnails/thumbnail.png');
- } catch (e) {
- return e;
- }
- if (data) {
- return 'data:;base64,' + Base64.toBase64(data);
- }
- return null;
-}
-function init() {
- listFiles('kofficetests/', /\.od[tps]$/i, listFilesCallback);
-}
- </script>
-</head>
-<body onload="init()">
-</body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/webodf/filelister.js b/apps/files_odfviewer/src/webodf/webodf/filelister.js
deleted file mode 100644
index 08f6cd3cb01..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/filelister.js
+++ /dev/null
@@ -1,200 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global XMLHttpRequest*/
-/*jslint regexp: true*/
-/** asynchroneous function that lists all files **/
-function listFiles(startdir, filepattern, fileCallback, doneCallback) {
- "use strict";
-
- var todoList = [],
- doneList = [],
- dirpattern = /\/$/,
- hasWEBDAV = false;
-
- function getHref(responseElement) {
- var n = responseElement.firstChild;
- while (n && !(n.namespaceURI === 'DAV:' && n.localName === 'href')) {
- n = n.nextSibling;
- }
- return n && n.firstChild && n.firstChild.nodeValue;
- }
-
- function isDirectory(responseElement) {
- var n = responseElement.firstChild;
- while (n &&
- !(n.namespaceURI === 'DAV:' && n.localName === 'propstat')) {
- n = n.nextSibling;
- }
- n = n && n.firstChild;
- while (n &&
- !(n.namespaceURI === 'DAV:' && n.localName === 'prop')) {
- n = n.nextSibling;
- }
- n = n && n.firstChild;
- while (n && !(n.namespaceURI === 'DAV:' &&
- n.localName === 'resourcetype')) {
- n = n.nextSibling;
- }
- n = n && n.firstChild;
- while (n &&
- !(n.namespaceURI === 'DAV:' && n.localName === 'collection')) {
- n = n.nextSibling;
- }
- return n;
- }
-
- function processWebDavResponse(xml) {
- if (!xml) {
- throw new Error('No proper XML response.');
- }
-
- var refs = xml.getElementsByTagNameNS('DAV:', 'response'),
- directories = [],
- files = [],
- i,
- d,
- href;
- if (refs.length === 0) {
- throw new Error('No proper XML response.');
- }
- for (i = 0; i < refs.length; i += 1) {
- href = getHref(refs[i]);
- if (isDirectory(refs[i])) {
- directories.push(href);
- } else if (filepattern.test(href)) {
- files.push(href);
- }
- }
- for (i = 0; i < directories.length; i += 1) {
- d = directories[i];
- if (doneList.indexOf(d) === -1 && todoList.indexOf(d) === -1) {
- todoList.push(d);
- }
- }
- fileCallback(directories, files);
- }
-
- function processIndexHtmlResponse(base, text) {
- // use regex because index.html is usually not valid xml
- var re = /href="([^\/\?"][^"]*)"/ig,
- matches,
- files = [],
- directories = [],
- name,
- d,
- i;
- while ((matches = re.exec(text)) !== null) {
- name = matches[1];
- if (dirpattern.test(name)) {
- directories.push(base + name);
- } else if (filepattern.test(name)) {
- files.push(base + name);
- }
- }
- for (i = 0; i < directories.length; i += 1) {
- d = directories[i];
- if (doneList.indexOf(d) === -1 && todoList.indexOf(d) === -1) {
- todoList.push(d);
- }
- }
- fileCallback(directories, files);
- }
-
- function getNextFileListWithIndexHtml() {
- var url = todoList.shift(),
- req;
- while (url && typeof url !== 'string') {
- url = todoList.shift();
- }
- if (!url) {
- if (doneCallback) {
- doneCallback();
- }
- return;
- }
- req = new XMLHttpRequest();
- req.open('GET', url, true);
- req.onreadystatechange = function (evt) {
- if (req.readyState !== 4) {
- return;
- }
- if (req.status >= 200 && req.status < 300) {
- processIndexHtmlResponse(url, req.responseText);
- }
- getNextFileListWithIndexHtml();
- };
- req.send(null);
-
- doneList.push(url);
- }
-
- function getNextFileListWithWebDav() {
- var url = todoList.shift(),
- req;
- if (!url) {
- if (doneCallback) {
- doneCallback();
- }
- return;
- }
-
- req = new XMLHttpRequest();
- req.open('PROPFIND', url, true);
- req.onreadystatechange = function (evt) {
- if (req.readyState !== 4) {
- return;
- }
- if (req.status >= 200 && req.status < 300) {
- try {
- processWebDavResponse(req.responseXML);
- hasWEBDAV = true;
- } catch (e) {
- }
- }
- if (hasWEBDAV) {
- getNextFileListWithWebDav();
- } else {
- todoList.push(url);
- doneList = [];
- getNextFileListWithIndexHtml();
- }
- };
- req.setRequestHeader('Depth', '1');
- req.send(null);
-
- doneList.push(url);
- }
-
- todoList.push(startdir);
- getNextFileListWithWebDav();
-}
diff --git a/apps/files_odfviewer/src/webodf/webodf/flashput/Makefile b/apps/files_odfviewer/src/webodf/webodf/flashput/Makefile
deleted file mode 100644
index 291eef04b68..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/flashput/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-all:
- /tmp/flex/bin/mxmlc PUT.as
diff --git a/apps/files_odfviewer/src/webodf/webodf/flashput/PUT.as b/apps/files_odfviewer/src/webodf/webodf/flashput/PUT.as
deleted file mode 100644
index 451d8a0fd0d..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/flashput/PUT.as
+++ /dev/null
@@ -1,18 +0,0 @@
-package {
- import flash.display.Sprite;
- import flash.display.LoaderInfo;
- import flash.external.ExternalInterface;
- public class PUT extends Sprite {
- public function PUT() {
- ExternalInterface.addCallback("put", this.put);
- var callback:String = LoaderInfo(root.loaderInfo).parameters["readyCallback"];
- ExternalInterface.call(callback);
- }
- public function put(host:String, port:uint, path:String,
- data:String, callbackFunctionName:String,
- callbackId:String):void {
- new Request(host, port, path, data,
- callbackFunctionName, callbackId);
- }
- }
-}
diff --git a/apps/files_odfviewer/src/webodf/webodf/flashput/PUT.swf b/apps/files_odfviewer/src/webodf/webodf/flashput/PUT.swf
deleted file mode 100644
index 466d0a1316e..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/flashput/PUT.swf
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/webodf/flashput/Request.as b/apps/files_odfviewer/src/webodf/webodf/flashput/Request.as
deleted file mode 100644
index 3217dde25d9..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/flashput/Request.as
+++ /dev/null
@@ -1,83 +0,0 @@
-package {
- import flash.events.*;
- import flash.external.ExternalInterface;
- import flash.net.Socket;
- import flash.utils.ByteArray;
- import mx.utils.Base64Decoder;
- import mx.utils.Base64Encoder;
- internal class Request {
- private var id:String;
- private var header:String;
- private var data:ByteArray;
- private var callbackName:String;
- private var socket:Socket;
- public function Request(host:String, port:uint, path:String,
- data:String, callbackName:String,
- callbackId:String) {
- var atob:Base64Decoder = new Base64Decoder();
- atob.decode(data);
- this.data = atob.toByteArray();
- this.header =
- "PUT " + path + " HTTP/1.1\r\n" +
- "Host: " + host + "\r\n" +
- "Content-Length: " + this.data.length + "\r\n" +
- "\r\n";
- this.callbackName = callbackName;
- this.id = callbackId;
- this.socket = new Socket();
- this.socket.timeout = 1000;
- this.socket.addEventListener(Event.CONNECT,
- connectHandler);
- this.socket.addEventListener(IOErrorEvent.IO_ERROR,
- ioErrorHandler);
- this.socket.addEventListener(
- SecurityErrorEvent.SECURITY_ERROR,
- securityErrorHandler);
- this.socket.addEventListener(Event.CLOSE, closeHandler);
- this.socket.addEventListener(ProgressEvent.SOCKET_DATA,
- dataHandler);
- this.socket.connect(host, port);
- }
- private function connectHandler(connect:Event):void {
- this.socket.writeBytes(toByteArray(this.header));
- this.socket.writeBytes(this.data);
- this.socket.flush();
- this.header = null;
- this.data.length = 0;
- }
- private function ioErrorHandler(ioError:IOErrorEvent):void {
- ExternalInterface.call(this.callbackName, this.id,
- null);
- this.socket.close();
- }
- private function securityErrorHandler(
- securityError:SecurityErrorEvent):void {
- ExternalInterface.call(this.callbackName, this.id,
- null);
- this.socket.close();
- }
- private function closeHandler(close:Event):void {
- ExternalInterface.call(this.callbackName, this.id,
- null);
- }
- private function dataHandler(data:ProgressEvent):void {
- // assume it went well, TODO: parse reply, handle error
- this.socket.readBytes(this.data);
- var btoa:Base64Encoder = new Base64Encoder();
- btoa.encodeBytes(this.data);
- ExternalInterface.call(this.callbackName, this.id,
- btoa.toString());
- this.data.length = 0;
- this.socket.close();
- }
- public function toByteArray(str:String):ByteArray {
- var length:uint = str.length;
- var i:uint = 0;
- var data:ByteArray = new ByteArray();
- for (i; i < length; i++) {
- data.writeByte(str.charCodeAt(i) & 0xff);
- }
- return data;
- }
- }
-}
diff --git a/apps/files_odfviewer/src/webodf/webodf/flashput/test.html b/apps/files_odfviewer/src/webodf/webodf/flashput/test.html
deleted file mode 100644
index 349f7680ba1..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/flashput/test.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<html>
- <head>
- <title>hi</title>
- </head>
- <body onload="init()">
- <script type="text/javascript">//<![CDATA[
-/**
- * @constuctor
- */
-function FlashPut(host, port, domelement) {
- if (port <= 0) {
- return;
- }
- var flashput = this,
- ready = false,
- id = "FlashPut" + String(Math.random()).substring(2),
- jobnumber = 0,
- queue = [],
- runningCalls = {},
- doc = domelement.ownerDocument,
- flash = doc.createElement("object"),
- param = doc.createElement("param");
- flash.setAttribute("data", "PUT.swf");
- flash.setAttribute("type", "application/x-shockwave-flash");
- flash.setAttribute("width", "1");
- flash.setAttribute("height", "1");
- param.setAttribute("name", "allowNetworking");
- param.setAttribute("value", "all");
- flash.appendChild(param);
- param = doc.createElement("param");
- param.setAttribute("name", "allowScriptAccess");
- param.setAttribute("value", "always");
- flash.appendChild(param);
- param.setAttribute("name", "FlashVars");
- param.setAttribute("value", "readyCallback=" + id);
- flash.appendChild(param);
- domelement.appendChild(flash);
-
- // function to be called when flash movie is ready
- window[id] = function () {
- window[id] = undefined;
- ready = true;
- var i, a;
- for (i = 0; i < queue.length; i += 1) {
- a = queue[i];
- put(a[0], a[1], a[2]);
- }
- queue = undefined;
- };
- function put(path, data, callback) {
- var id = Math.random();
- runningCalls[id] = callback;
- flash.put(host, port, path, data, "FlashPut.putCallback", id);
- }
- this.put = function (path, data, callback) {
- if (!ready) {
- queue.push([path, data, callback]);
- } else {
- put(path, data, callback);
- }
- }
- FlashPut.putCallback = function (id, result) {
- if (id in runningCalls) {
- runningCalls[id](result);
- runningCalls.remove(id);
- } else {
- console.log("running put call " + id + " was not found.");
- }
- }
-};
-
-function testFlash() {
- var i, l = 1000000, str = "", now = new Date();
- for (i = 0; i < l; i += 1) {
- str += String.fromCharCode(i & 0xff);
- }
- now = new Date();
- str = window.btoa(str);
- flashput.put("/zz", str, function (result) {
- alert("'" + result + "' " + now.toString() + " " + (new Date()).toString());
- var z = "hmm";
- try {
- z = window.atob(result);
- } catch (e) {
- }
- alert(z + " " + now.toString() + " " + (new Date()).toString());
- });
-}
-var flashput;
-function init() {
- flashput = new FlashPut("", 8123, document.body);
- testFlash();
-}
-//]]> </script>
- </body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/webodf/gui.js b/apps/files_odfviewer/src/webodf/webodf/gui.js
deleted file mode 100644
index 5fce22f51e8..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/gui.js
+++ /dev/null
@@ -1,263 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global Ext:true, runtime:true, core:true, listFiles:true*/
-runtime.loadClass("core.Zip");
-runtime.loadClass("core.Base64");
-
-/**
- * @param {Ext.data.Model} node
- * @return {undefined}
- */
-function addThumbnail(node) {
- "use strict";
- var url = node.get('id'), zip;
-/*
- zip = new core.Zip(url, function (err, zipobject) {
- zip = zipobject;
- if (err) {
- return;
- }
- zip.load('Thumbnails/thumbnail.png', function (err, data) {
- if (data === null) {
- return;
- }
- var url = 'data:;base64,' +
- (new core.Base64()).convertUTF8ArrayToBase64(data),
- el, spans, i, s;
- el = node.getUI().getEl();
- if (el) {
- spans = el.getElementsByTagName('span');
- for (i = 0; i < spans.length; i += 1) {
- s = spans.item(i);
- if (s.getAttribute('qtip')) {
- s.setAttribute('qtip', node.attributes.qtip);
- }
- }
- } else {
- node.attributes.qtip += '<br/><img src="' + url + '"/>';
- }
- });
- });
-*/
-}
-
-/**
- * @param {!string} url
- * @param {!Ext.tab.Panel} panel
- * @param {!string} title
- * @return {undefined}
- */
-function loadODF(url, panel, title) {
- "use strict";
- var tab = panel.items.findBy(function (item) {
- return item.url === url;
- }),
- newTab;
- if (tab) {
- panel.setActiveTab(tab);
- return;
- }
- newTab = Ext.create('Ext.container.Container', {
- title: title,
- tabTip: url,
- url: url,
- closable: true,
- autoEl: {
- tag: 'iframe',
- name: url,
- src: 'odf.html#' + url,
- frameBorder: 0,
- style: {
- border: '0 none'
- }
- },
- region: 'center'
- });
- panel.add(newTab);
- panel.setActiveTab(newTab);
-}
-
-Ext.onReady(function () {
- "use strict";
- var editButton, tabpanel, slider, tree, viewport;
-
- Ext.QuickTips.init();
-
- /**
- * @param {!Ext.Button} button
- * @param {!boolean} pressed
- * @return {undefined}
- */
- function editToggle(button, pressed) {
- var tab = tabpanel.getActiveTab(), o, odfcanvas = "odfcanvas";
- if (!tab) {
- return;
- }
- tab.el.dom.contentDocument[odfcanvas].setEditable(pressed);
- }
-
- /**
- * @param {!Object} slider
- * @param {!number} zoomlevel
- * @param {!Object} thumb
- * @return {undefined}
- */
- function setZoom(slider, zoomlevel, thumb) {
- var tab = tabpanel.getActiveTab(),
- body;
- if (!tab) {
- return;
- }
- body = tab.el.dom.contentDocument.body;
- zoomlevel = Math.pow(10, zoomlevel / 10.0);
- body.style.zoom = zoomlevel;
- body.style.MozTransform = 'scale(' + zoomlevel + ')';
- }
-
- /**
- * @param {!Ext.data.NodeInterface} root
- * @param {!string} uri
- * @return {!Ext.data.NodeInterface}
- */
- function getParentNode(root, uri) {
- var parts = uri.split('/'),
- node = root,
- id = parts[0],
- i,
- n;
- for (i = 1; i < parts.length - 1; i += 1) {
- n = node.findChild('text', parts[i], false);
- id += '/' + parts[i];
- if (!n) {
- n = {
- id: id,
- text: parts[i],
- qtip: uri,
- cls: 'folder'
- };
- n = node.appendChild(n);
- }
- node = n;
- }
- return node;
- }
-
- /**
- * @param {!Array.<!string>} directories
- * @param {!Array.<!string>} files
- * @return {undefined}
- */
- function listFilesCallback(directories, files) {
- var root = tree.getRootNode(),
- i,
- f,
- parentNode,
- qtip,
- node;
- for (i = 0; i < files.length; i += 1) {
- f = files[i];
- parentNode = getParentNode(root, f);
- qtip = f;
- node = parentNode.appendChild({
- id: f,
- qtip: qtip,
- text: f.substr(f.lastIndexOf('/') + 1),
- cls: 'file',
- leaf: true,
- editable: false
- });
- f = /**@type{!Ext.data.Model}*/(node);
- addThumbnail(f);
- }
- }
-
- /**
- * @return {undefined}
- */
- function listFilesDoneCallback() {
- }
-
- editButton = new Ext.Button({
- enableToggle: true,
- text: 'Editable',
- listeners: { toggle: { fn: editToggle } }
- });
-
- slider = new Ext.Slider({
- width: 300,
- minValue: -5,
- maxValue: 5,
- values: [0],
- listeners: { changecomplete: { fn: setZoom } }
- });
-
- tabpanel = Ext.create('Ext.tab.Panel', {
- tbar: [ 'Zoom: ', slider, editButton ],
- region: 'center'
- });
-
- tree = Ext.create('Ext.tree.Panel', {
- title: 'Documents',
- region: 'west',
- width: 200,
- split: true,
- autoScroll: true,
- collapsible: true,
- rootVisible: false,
- enableTabScroll: true,
- defaults: {autoScroll: true},
- listeners: {
- itemclick: function (view, rec) {
- if (rec.get('cls') === 'file') {
- loadODF(rec.get('id'), tabpanel, rec.get('text'));
- } else if (rec.get('cls') === 'folder') {
- if (rec.isExpanded()) {
- rec.collapse();
- } else {
- rec.expand();
- }
- }
- }
- },
- root: { nodeType: 'node' }
- });
-
- viewport = new Ext.Viewport({
- layout: 'border',
- items: [ tabpanel, tree ]
- });
-
- // put data in the tree
- listFiles('./demodocs/', /\.od[tps]$/i, listFilesCallback,
- listFilesDoneCallback);
-});
diff --git a/apps/files_odfviewer/src/webodf/webodf/httpserver.js b/apps/files_odfviewer/src/webodf/webodf/httpserver.js
deleted file mode 100644
index 245ce9f3f7f..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/httpserver.js
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global require: true, console: true, process: true, Buffer: true,
- unescape: true */
-/* A Node.JS http server*/
-var http = require("http"),
- url = require("url"),
- path = require("path"),
- fs = require("fs"),
- lookForIndexHtml = true,
- ipaddress = "127.0.0.1",
- //ipaddress = "192.168.1.105",
- port = 8124;
-
-function statFile(dir, filelist, position, callback) {
- "use strict";
- if (position >= filelist.length) {
- return callback(null, filelist);
- }
- fs.stat(dir + "/" + filelist[position], function (err, stats) {
- if (stats && stats.isDirectory()) {
- filelist[position] = filelist[position] + "/";
- }
- statFile(dir, filelist, position + 1, callback);
- });
-}
-
-function listFiles(dir, callback) {
- "use strict";
- fs.readdir(dir, function (err, files) {
- if (err) {
- return callback(err);
- }
- statFile(dir, files, 0, callback);
- });
-}
-
-http.createServer(function (request, response) {
- "use strict";
- var uri = unescape(url.parse(request.url).pathname),
- filename = path.join(process.cwd(), uri);
- if (uri !== '/favicon.ico') {
- console.log(request.method + " " + uri);
- }
- function put() {
- var contentlength = parseInt(request.headers["content-length"], 10),
- alldata = new Buffer(contentlength),
- sum = 0;
- request.on("data", function (data) {
- data.copy(alldata, sum, 0);
- sum += data.length;
- });
- request.on("end", function () {
- fs.writeFile(filename, alldata, "binary", function (err) {
- if (err) {
- response.writeHead(500);
- response.write(err);
- } else {
- response.writeHead(200);
- }
- response.end();
- });
- });
- }
- if (request.method === "PUT") {
- put(request, response);
- return;
- }
- if (request.method === "DELETE") {
- fs.unlink(filename, function (err) {
- if (err) {
- response.writeHead(500);
- } else {
- response.writeHead(200);
- }
- response.end();
- });
- return;
- }
- function handleStat(err, stats, lookForIndexHtml) {
- if (!err && stats.isFile()) {
- fs.readFile(filename, "binary", function (err, file) {
- if (err) {
- response.writeHead(500, {"Content-Type": "text/plain"});
- if (request.method !== "HEAD") {
- response.write(err + "\n");
- }
- response.end();
- return;
- }
- var head = {"Content-Length": stats.size};
- if (filename.substr(-3) === ".js") {
- head["Content-Type"] = "text/javascript";
- } else if (filename.substr(-4) === ".css") {
- head["Content-Type"] = "text/css";
- } else if (filename.substr(-4) === ".odt" ||
- filename.substr(-5) === ".fodt") {
- head["Content-Type"] = "application/vnd.oasis.opendocument.text";
- } else if (filename.substr(-4) === ".ods" ||
- filename.substr(-5) === ".fods") {
- head["Content-Type"] = "application/vnd.oasis.opendocument.presentation";
- } else if (filename.substr(-4) === ".odp" ||
- filename.substr(-5) === ".fodp") {
- head["Content-Type"] = "application/vnd.oasis.opendocument.spreadsheet";
- }
- response.writeHead(200, head);
- if (request.method !== "HEAD") {
- response.write(file, "binary");
- }
- response.end();
- });
- } else if (!err && stats.isDirectory()) {
- if (lookForIndexHtml) {
- fs.stat(filename + "/index.html", function (err, stats) {
- if (err) {
- fs.stat(filename, handleStat);
- } else {
- filename = filename + "/index.html";
- handleStat(err, stats);
- }
- });
- return;
- }
- if (uri.length === 0 || uri[uri.length - 1] !== "/") {
- response.writeHead(301, {"Content-Type": "text/plain",
- "Location": uri + "/"});
- if (request.method !== "HEAD") {
- response.write("Moved permanently\n");
- }
- response.end();
- return;
- }
- listFiles(filename, function (err, files) {
- if (err) {
- response.writeHead(500, {"Content-Type": "text/plain"});
- if (request.method !== "HEAD") {
- response.write(err + "\n");
- }
- response.end();
- return;
- }
- response.writeHead(200);
- if (request.method !== "HEAD") {
- files.sort();
- response.write("<html><head><title></title></head><body>");
- response.write("<table>");
- var i, l = files.length, file;
- for (i = 0; i < l; i += 1) {
- file = files[i];
- if (file.length > 0 && file[file.length - 1] === '/') {
- file = encodeURIComponent(file.slice(0, file.length - 1)) + "/";
- } else {
- file = encodeURIComponent(file);
- }
- response.write("<tr><td><a href=\"");
- response.write(file);
- response.write("\">");
- file = files[i].replace("&", "&amp;")
- .replace("<", "&gt;");
- response.write(file.replace("\"", "\\\""));
- response.write("</a></td></tr>\n");
- }
- response.write("</table></body></html>\n");
- }
- response.end();
- });
- } else {
- if (uri !== '/favicon.ico') {
- console.log("Not found: " + uri);
- }
- response.writeHead(404, {"Content-Type": "text/plain"});
- if (request.method !== "HEAD") {
- response.write("404 Not Found\n");
- }
- response.end();
- }
- }
- fs.stat(filename, function (err, stats) {
- handleStat(err, stats, lookForIndexHtml);
- });
-}).listen(port, ipaddress);
-
-console.log('Server running at ' + ipaddress + ':' + port + '/');
diff --git a/apps/files_odfviewer/src/webodf/webodf/index.html b/apps/files_odfviewer/src/webodf/webodf/index.html
deleted file mode 100644
index 027a8a9b23d..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/index.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
- <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css"/>
- <!-- requirements -->
- <script src="extjs/ext-all.js" type="text/javascript" charset="utf-8"></script>
- <script src="lib/runtime.js" type="text/javascript" charset="utf-8"></script>
- <script src="filelister.js" type="text/javascript" charset="utf-8"></script>
- <!-- application -->
- <script src="gui.js" type="text/javascript" charset="utf-8"></script>
-
- <title id="page-title">WebODF</title>
-</head>
-<body>
-</body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/core/Async.js b/apps/files_odfviewer/src/webodf/webodf/lib/core/Async.js
deleted file mode 100644
index 358a8feee04..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/core/Async.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global core*/
-
-/**
- * @constructor
- */
-core.Async = function Async() {
- "use strict";
- /**
- * @param {!Array.<*>} items
- * @param {function(*, !function(!string):undefined):undefined} f
- * @param {function(?string)} callback
- * @return {undefined}
- */
- this.forEach = function (items, f, callback) {
- var i, l = items.length, itemsDone = 0;
- function end(err) {
- if (itemsDone !== l) {
- if (err) {
- itemsDone = l;
- callback(err);
- } else {
- itemsDone += 1;
- if (itemsDone === l) {
- callback(null);
- }
- }
- }
- }
- for (i = 0; i < l; i += 1) {
- f(items[i], end);
- }
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/core/Base64.js b/apps/files_odfviewer/src/webodf/webodf/lib/core/Base64.js
deleted file mode 100644
index 736f5bb5314..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/core/Base64.js
+++ /dev/null
@@ -1,362 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*jslint bitwise: true, regexp: true*/
-/*global core: true, runtime: true*/
-/*
- * $Id: base64.js,v 0.9 2009/03/01 20:51:18 dankogai Exp dankogai $
- */
-/**
- * @namespace
- */
-core.Base64 = (function () {
- "use strict";
- var b64chars
- = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
-
- b64charcodes = (function () {
- var a = [], i,
- codeA = 'A'.charCodeAt(0),
- codea = 'a'.charCodeAt(0),
- code0 = '0'.charCodeAt(0);
- for (i = 0; i < 26; i += 1) {
- a.push(codeA + i);
- }
- for (i = 0; i < 26; i += 1) {
- a.push(codea + i);
- }
- for (i = 0; i < 10; i += 1) {
- a.push(code0 + i);
- }
- a.push('+'.charCodeAt(0));
- a.push('/'.charCodeAt(0));
- return a;
- }()),
-
- b64tab = (function (bin) {
- var t = {}, i, l;
- for (i = 0, l = bin.length; i < l; i += 1) {
- t[bin.charAt(i)] = i;
- }
- return t;
- }(b64chars)),
- convertUTF16StringToBase64,
- convertBase64ToUTF16String,
- btoa, atob;
-
- /**
- * @param {!string} s
- * @return {!Array}
- */
- function stringToArray(s) {
- var a = [], i, l = s.length;
- for (i = 0; i < l; i += 1) {
- a[i] = s.charCodeAt(i) & 0xff;
- }
- return a;
- }
-
- function convertUTF8ArrayToBase64(bin) {
- var n,
- b64 = "",
- i,
- l = bin.length - 2;
- for (i = 0; i < l; i += 3) {
- n = (bin[i] << 16) | (bin[i + 1] << 8) | bin[i + 2];
- b64 += b64chars[n >>> 18];
- b64 += b64chars[(n >>> 12) & 63];
- b64 += b64chars[(n >>> 6) & 63];
- b64 += b64chars[n & 63];
- }
- if (i === l + 1) { // 1 byte left
- n = bin[i] << 4;
- b64 += b64chars[n >>> 6];
- b64 += b64chars[n & 63];
- b64 += "==";
- } else if (i === l) { // 2 bytes left
- n = (bin[i] << 10) | (bin[i + 1] << 2);
- b64 += b64chars[n >>> 12];
- b64 += b64chars[(n >>> 6) & 63];
- b64 += b64chars[n & 63];
- b64 += "=";
- }
- return b64;
- }
-
- function convertBase64ToUTF8Array(b64) {
- b64 = b64.replace(/[^A-Za-z0-9+\/]+/g, '');
- var bin = [],
- padlen = b64.length % 4,
- i,
- l = b64.length,
- n;
- for (i = 0; i < l; i += 4) {
- n = ((b64tab[b64.charAt(i)] || 0) << 18) |
- ((b64tab[b64.charAt(i + 1)] || 0) << 12) |
- ((b64tab[b64.charAt(i + 2)] || 0) << 6) |
- ((b64tab[b64.charAt(i + 3)] || 0));
- bin.push(
- (n >> 16),
- ((n >> 8) & 0xff),
- (n & 0xff)
- );
- }
- bin.length -= [0, 0, 2, 1][padlen];
- return bin;
- }
-
- function convertUTF16ArrayToUTF8Array(uni) {
- var bin = [], i, l = uni.length, n;
- for (i = 0; i < l; i += 1) {
- n = uni[i];
- if (n < 0x80) {
- bin.push(n);
- } else if (n < 0x800) {
- bin.push(
- 0xc0 | (n >>> 6),
- 0x80 | (n & 0x3f)
- );
- } else {
- bin.push(
- 0xe0 | ((n >>> 12) & 0x0f),
- 0x80 | ((n >>> 6) & 0x3f),
- 0x80 | (n & 0x3f)
- );
- }
- }
- return bin;
- }
-
- function convertUTF8ArrayToUTF16Array(bin) {
- var uni = [], i, l = bin.length,
- c0, c1, c2;
- for (i = 0; i < l; i += 1) {
- c0 = bin[i];
- if (c0 < 0x80) {
- uni.push(c0);
- } else {
- i += 1;
- c1 = bin[i];
- if (c0 < 0xe0) {
- uni.push(((c0 & 0x1f) << 6) | (c1 & 0x3f));
- } else {
- i += 1;
- c2 = bin[i];
- uni.push(((c0 & 0x0f) << 12) | ((c1 & 0x3f) << 6) |
- (c2 & 0x3f)
- );
- }
- }
- }
- return uni;
- }
-
- function convertUTF8StringToBase64(bin) {
- return convertUTF8ArrayToBase64(stringToArray(bin));
- }
-
- function convertBase64ToUTF8String(b64) {
- return String.fromCharCode.apply(String, convertBase64ToUTF8Array(b64));
- }
-
- function convertUTF8StringToUTF16Array(bin) {
- return convertUTF8ArrayToUTF16Array(stringToArray(bin));
- }
-
- function convertUTF8ArrayToUTF16String(bin) {
- // this conversion is done in chunks to avoid a stack overflow in
- // apply()
- var b = convertUTF8ArrayToUTF16Array(bin),
- r = "",
- i = 0,
- chunksize = 45000;
- while (i < b.length) {
- r += String.fromCharCode.apply(String, b.slice(i, i + chunksize));
- i += chunksize;
- }
- return r;
- }
- /**
- * @param {!Array.<number>|!string} bin
- * @param {!number} i
- * @param {!number} end
- * @return {!string}
- */
- function convertUTF8StringToUTF16String_internal(bin, i, end) {
- var str = "", c0, c1, c2, j;
- for (j = i; j < end; j += 1) {
- c0 = bin.charCodeAt(j) & 0xff;
- if (c0 < 0x80) {
- str += String.fromCharCode(c0);
- } else {
- j += 1;
- c1 = bin.charCodeAt(j) & 0xff;
- if (c0 < 0xe0) {
- str += String.fromCharCode(((c0 & 0x1f) << 6) |
- (c1 & 0x3f));
- } else {
- j += 1;
- c2 = bin.charCodeAt(j) & 0xff;
- str += String.fromCharCode(((c0 & 0x0f) << 12) |
- ((c1 & 0x3f) << 6) | (c2 & 0x3f));
- }
- }
- }
- return str;
- }
-
- /**
- * Convert a utf-8 array into a utf-16 string.
- * The input array is treated as a list of values between 0 and 255.
- * This function works with a callback and splits the work up in parts
- * between which it yields to the main thread.
- * After each part the progress is reported with the callback function that
- * also passes a booleant that indicates if the job has finished.
- * If the conversion should stop, the callback should return false.
- *
- * @param {!Array.<number>|!string} bin
- * @param {!function(!string, boolean):boolean} callback
- * @return {undefined}
- */
- function convertUTF8StringToUTF16String(bin, callback) {
- var partsize = 100000,
- numparts = bin.length / partsize,
- str = "",
- pos = 0;
- if (bin.length < partsize) {
- callback(convertUTF8StringToUTF16String_internal(bin, 0,
- bin.length), true);
- return;
- }
- // make a local copy if the input is a string, to avoid modification
- if (typeof bin !== "string") {
- bin = bin.slice();
- }
- function f() {
- var end = pos + partsize;
- if (end > bin.length) {
- end = bin.length;
- }
- str += convertUTF8StringToUTF16String_internal(bin, pos, end);
- pos = end;
- end = pos === bin.length;
- if (callback(str, end) && !end) {
- runtime.setTimeout(f, 0);
- }
- }
- f();
- }
-
- function convertUTF16StringToUTF8Array(uni) {
- return convertUTF16ArrayToUTF8Array(stringToArray(uni));
- }
-
- function convertUTF16ArrayToUTF8String(uni) {
- return String.fromCharCode.apply(String,
- convertUTF16ArrayToUTF8Array(uni));
- }
-
- function convertUTF16StringToUTF8String(uni) {
- return String.fromCharCode.apply(String,
- convertUTF16ArrayToUTF8Array(stringToArray(uni)));
- }
-
- btoa = runtime.getWindow() && runtime.getWindow().btoa;
- if (btoa) {
- convertUTF16StringToBase64 = function (uni) {
- return btoa(convertUTF16StringToUTF8String(uni));
- };
- } else {
- btoa = convertUTF8StringToBase64;
- convertUTF16StringToBase64 = function (uni) {
- return convertUTF8ArrayToBase64(convertUTF16StringToUTF8Array(uni));
- };
- }
- atob = runtime.getWindow() && runtime.getWindow().atob;
- if (atob) {
- convertBase64ToUTF16String = function (b64) {
- var b = atob(b64);
- return convertUTF8StringToUTF16String_internal(b, 0, b.length);
- };
- } else {
- atob = convertBase64ToUTF8String;
- convertBase64ToUTF16String = function (b64) {
- return convertUTF8ArrayToUTF16String(convertBase64ToUTF8Array(b64));
- };
- }
-
- /**
- * @constructor
- */
- function Base64() {
- this.convertUTF8ArrayToBase64 = convertUTF8ArrayToBase64;
- this.convertByteArrayToBase64 = convertUTF8ArrayToBase64;
- this.convertBase64ToUTF8Array = convertBase64ToUTF8Array;
- this.convertBase64ToByteArray = convertBase64ToUTF8Array;
- this.convertUTF16ArrayToUTF8Array = convertUTF16ArrayToUTF8Array;
- this.convertUTF16ArrayToByteArray = convertUTF16ArrayToUTF8Array;
- this.convertUTF8ArrayToUTF16Array = convertUTF8ArrayToUTF16Array;
- this.convertByteArrayToUTF16Array = convertUTF8ArrayToUTF16Array;
- this.convertUTF8StringToBase64 = convertUTF8StringToBase64;
- this.convertBase64ToUTF8String = convertBase64ToUTF8String;
- this.convertUTF8StringToUTF16Array = convertUTF8StringToUTF16Array;
- this.convertUTF8ArrayToUTF16String = convertUTF8ArrayToUTF16String;
- this.convertByteArrayToUTF16String = convertUTF8ArrayToUTF16String;
- this.convertUTF8StringToUTF16String = convertUTF8StringToUTF16String;
- this.convertUTF16StringToUTF8Array = convertUTF16StringToUTF8Array;
- this.convertUTF16StringToByteArray = convertUTF16StringToUTF8Array;
- this.convertUTF16ArrayToUTF8String = convertUTF16ArrayToUTF8String;
- this.convertUTF16StringToUTF8String = convertUTF16StringToUTF8String;
- this.convertUTF16StringToBase64 = convertUTF16StringToBase64;
- this.convertBase64ToUTF16String = convertBase64ToUTF16String;
- this.fromBase64 = convertBase64ToUTF8String;
- this.toBase64 = convertUTF8StringToBase64;
- this.atob = atob;
- this.btoa = btoa;
- this.utob = convertUTF16StringToUTF8String;
- this.btou = convertUTF8StringToUTF16String;
- this.encode = convertUTF16StringToBase64;
- this.encodeURI = function (u) {
- return convertUTF16StringToBase64(u).replace(/[+\/]/g,
- function (m0) {
- return m0 === '+' ? '-' : '_';
- }).replace(/\\=+$/, '');
- };
- this.decode = function (a) {
- return convertBase64ToUTF16String(a.replace(/[\-_]/g,
- function (m0) {
- return m0 === '-' ? '+' : '/';
- }));
- };
- }
- return Base64;
-}());
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/core/ByteArray.js b/apps/files_odfviewer/src/webodf/webodf/lib/core/ByteArray.js
deleted file mode 100644
index d8a9ddd73d0..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/core/ByteArray.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global core*/
-/*jslint plusplus: true, bitwise: true */
-/**
- * @constructor
- * @param {!Runtime.ByteArray} data
- */
-core.ByteArray = function ByteArray(data) {
- "use strict";
- /**
- * @type {!number}
- */
- this.pos = 0;
- /**
- * @type {!Runtime.ByteArray}
- */
- this.data = data;
- /**
- * @return {number}
- */
- this.readUInt32LE = function () {
- var data = this.data,
- pos = (this.pos += 4);
- return (data[--pos] << 24) |
- (data[--pos] << 16) |
- (data[--pos] << 8) |
- data[--pos];
- };
- /**
- * @return {number}
- */
- this.readUInt16LE = function () {
- var data = this.data,
- pos = (this.pos += 2);
- return (data[--pos] << 8) | data[--pos];
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/core/ByteArrayWriter.js b/apps/files_odfviewer/src/webodf/webodf/lib/core/ByteArrayWriter.js
deleted file mode 100644
index a7838be3dc9..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/core/ByteArrayWriter.js
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, core: true*/
-/*jslint bitwise: true */
-/**
- * @constructor
- * @param {!string} encoding
- */
-core.ByteArrayWriter = function ByteArrayWriter(encoding) {
- "use strict";
- var self = this,
- data = new runtime.ByteArray(0);
-
- /**
- * @param {!core.ByteArrayWriter} writer
- * @return {undefined}
- */
- this.appendByteArrayWriter = function (writer) {
- data = runtime.concatByteArrays(data, writer.getByteArray());
- };
- /**
- * @param {!Runtime.ByteArray} array
- * @return {undefined}
- */
- this.appendByteArray = function (array) {
- data = runtime.concatByteArrays(data, array);
- };
- /**
- * @param {!Array.<!number>} array
- * @return {undefined}
- */
- this.appendArray = function (array) {
- data = runtime.concatByteArrays(data,
- runtime.byteArrayFromArray(array));
- };
- /**
- * @param {!number} value
- * @return {undefined}
- */
- this.appendUInt16LE = function (value) {
- self.appendArray([value & 0xff, (value >> 8) & 0xff]);
- };
- /**
- * @param {!number} value
- * @return {undefined}
- */
- this.appendUInt32LE = function (value) {
- self.appendArray([value & 0xff, (value >> 8) & 0xff,
- (value >> 16) & 0xff, (value >> 24) & 0xff]);
- };
- /**
- * @param {!string} string
- * @return {undefined}
- */
- this.appendString = function (string) {
- data = runtime.concatByteArrays(data,
- runtime.byteArrayFromString(string, encoding));
- };
- /**
- * @return {!number}
- */
- this.getLength = function () {
- return data.length;
- };
- /**
- * @return {!Runtime.ByteArray}
- */
- this.getByteArray = function () {
- return data;
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/core/Cursor.js b/apps/files_odfviewer/src/webodf/webodf/lib/core/Cursor.js
deleted file mode 100644
index d8f7965388c..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/core/Cursor.js
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global core: true, Node: true*/
-/**
- * @class
- * A cursor is a dom node that visually represents a cursor in a DOM tree.
- * It should stay synchronized with the selection in the document. When
- * there is only one collapsed selection range, a cursor should be shown at
- * that point.
- *
- * Putting the cursor in the DOM tree modifies the DOM, so care should be taken
- * to keep the selection consistent. If e.g. a selection is drawn over the
- * cursor, and the cursor is updated to the selection, the cursor is removed
- * from the DOM because the selection is not collapsed. This means that the
- * offsets of the selection may have to be changed.
- *
- * When the selection is collapsed, the cursor is placed after the point of the
- * selection and the selection will stay valid. However, if the cursor was
- * placed in the DOM tree and was counted in the offset, the offset in the
- * selection should be decreased by one.
- *
- * Even when the selection allows for a cursor, it might be desireable to hide
- * the cursor by not letting it be part of the DOM.
- *
- * @constructor
- * @param {Selection} selection The selection to which the cursor corresponds
- * @param {Document} document The document in which the cursor is placed
- */
-core.Cursor = function Cursor(selection, document) {
- "use strict";
- var cursorns,
- cursorNode;
- cursorns = 'urn:webodf:names:cursor';
- cursorNode = document.createElementNS(cursorns, 'cursor');
-
- function putCursorIntoTextNode(container, offset) {
- var len, ref, textnode, parent;
- parent = container.parentNode;
- if (offset === 0) {
- parent.insertBefore(cursorNode, container);
- } else if (offset === container.length) {
- parent.appendChild(cursorNode);
- } else {
- len = container.length;
- ref = container.nextSibling;
- textnode = document.createTextNode(
- container.substringData(offset, len)
- );
- container.deleteData(offset, len);
- if (ref) {
- parent.insertBefore(textnode, ref);
- } else {
- parent.appendChild(textnode);
- }
- parent.insertBefore(cursorNode, textnode);
- }
- }
- function putCursorIntoContainer(container, offset) {
- var node;
- node = container.firstChild;
- while (node && offset) {
- node = node.nextSibling;
- offset -= 1;
- }
- container.insertBefore(cursorNode, node);
- }
- function getPotentialParentOrNode(parent, node) {
- var n = node;
- while (n && n !== parent) {
- n = n.parentNode;
- }
- return n || node;
- }
- function removeCursorFromSelectionRange(range, cursorpos) {
- var cursorParent, start, end;
- cursorParent = cursorNode.parentNode;
- start = getPotentialParentOrNode(cursorNode, range.startContainer);
- end = getPotentialParentOrNode(cursorNode, range.endContainer);
- if (start === cursorNode) {
- range.setStart(cursorParent, cursorpos);
- } else if (start === cursorParent &&
- range.startOffset > cursorpos) {
- range.setStart(cursorParent, range.startOffset - 1);
- }
- if (range.endContainer === cursorNode) {
- range.setEnd(cursorParent, cursorpos);
- } else if (range.endContainer === cursorParent &&
- range.endOffset > cursorpos) {
- range.setEnd(cursorParent, range.endOffset - 1);
- }
- }
- function adaptRangeToMergedText(range, prev, textnodetomerge, cursorpos) {
- var diff = prev.length - textnodetomerge.length;
- if (range.startContainer === textnodetomerge) {
- range.setStart(prev, diff + range.startOffset);
- } else if (range.startContainer === prev.parentNode &&
- range.startOffset === cursorpos) {
- range.setStart(prev, diff);
- }
- if (range.endContainer === textnodetomerge) {
- range.setEnd(prev, diff + range.endOffset);
- } else if (range.endContainer === prev.parentNode &&
- range.endOffset === cursorpos) {
- range.setEnd(prev, diff);
- }
- }
- function removeCursor() {
- // if the cursor is part of a selection, the selection must be adapted
- var i, cursorpos, node, textnodetoremove, range;
- // if the cursor has no parent, it is already not part of the document
- // tree
- if (!cursorNode.parentNode) {
- return;
- }
- // find the position of the cursor in its parent
- cursorpos = 0;
- node = cursorNode.parentNode.firstChild;
- while (node && node !== cursorNode) {
- cursorpos += 1;
- node = node.nextSibling;
- }
- // Check if removing the node will result in a merge of texts.
- // This will happen if the cursor is between two text nodes.
- // The text of the text node after the cursor is put in the text node
- // before the cursor. The latter node is removed after the selection
- // has been adapted.
- if (cursorNode.previousSibling &&
- cursorNode.previousSibling.nodeType === 3 && // TEXT_NODE
- cursorNode.nextSibling &&
- cursorNode.nextSibling.nodeType === 3) { // TEXT_NODE
- textnodetoremove = cursorNode.nextSibling;
- cursorNode.previousSibling.appendData(textnodetoremove.nodeValue);
- }
- // remove the node from the selections
- for (i = 0; i < selection.rangeCount; i += 1) {
- removeCursorFromSelectionRange(selection.getRangeAt(i), cursorpos);
- }
- // merge the texts that surround the cursor
- if (textnodetoremove) {
- for (i = 0; i < selection.rangeCount; i += 1) {
- adaptRangeToMergedText(selection.getRangeAt(i),
- cursorNode.previousSibling, textnodetoremove, cursorpos);
- }
- textnodetoremove.parentNode.removeChild(textnodetoremove);
- }
- cursorNode.parentNode.removeChild(cursorNode);
- }
- // put the cursor at a particular position
- function putCursor(container, offset) {
- if (container.nodeType === 3) { // TEXT_NODE
- putCursorIntoTextNode(container, offset);
- } else if (container.nodeType !== 9) { // DOCUMENT_NODE
- putCursorIntoContainer(container, offset);
- }
- }
- /**
- * Obtain the node representing the cursor.
- * @return {Element}
- */
- this.getNode = function () {
- return cursorNode;
- };
- /**
- * Synchronize the cursor with the current selection.
- * If there is a single collapsed selection range, the cursor will be placed
- * there. If not, the cursor will be removed from the document tree.
- * @return {undefined}
- */
- this.updateToSelection = function () {
- var range;
- removeCursor();
- if (selection.focusNode) {
- putCursor(selection.focusNode, selection.focusOffset);
- }
- };
- /**
- * Remove the cursor from the document tree.
- * @return {undefined}
- */
- this.remove = function () {
- removeCursor();
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/core/JSLint.js b/apps/files_odfviewer/src/webodf/webodf/lib/core/JSLint.js
deleted file mode 100644
index b3e422ef59f..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/core/JSLint.js
+++ /dev/null
@@ -1,6403 +0,0 @@
-// jslint.js
-// 2012-04-15
-
-// Copyright (c) 2002 Douglas Crockford (www.JSLint.com)
-
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-
-// The Software shall be used for Good, not Evil.
-
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
-
-// WARNING: JSLint will hurt your feelings.
-
-// JSLINT is a global function. It takes two parameters.
-
-// var myResult = JSLINT(source, option);
-
-// The first parameter is either a string or an array of strings. If it is a
-// string, it will be split on '\n' or '\r'. If it is an array of strings, it
-// is assumed that each string represents one line. The source can be a
-// JavaScript text, or HTML text, or a JSON text, or a CSS text.
-
-// The second parameter is an optional object of options that control the
-// operation of JSLINT. Most of the options are booleans: They are all
-// optional and have a default value of false. One of the options, predef,
-// can be an array of names, which will be used to declare global variables,
-// or an object whose keys are used as global names, with a boolean value
-// that determines if they are assignable.
-
-// If it checks out, JSLINT returns true. Otherwise, it returns false.
-
-// If false, you can inspect JSLINT.errors to find out the problems.
-// JSLINT.errors is an array of objects containing these properties:
-
-// {
-// line : The line (relative to 0) at which the lint was found
-// character : The character (relative to 0) at which the lint was found
-// reason : The problem
-// evidence : The text line in which the problem occurred
-// raw : The raw message before the details were inserted
-// a : The first detail
-// b : The second detail
-// c : The third detail
-// d : The fourth detail
-// }
-
-// If a stopping error was found, a null will be the last element of the
-// JSLINT.errors array. A stopping error means that JSLint was not confident
-// enough to continue. It does not necessarily mean that the error was
-// especially heinous.
-
-// You can request a Function Report, which shows all of the functions
-// and the parameters and vars that they use. This can be used to find
-// implied global variables and other problems. The report is in HTML and
-// can be inserted in an HTML <body>.
-
-// var myReport = JSLINT.report(errors_only);
-
-// If errors_only is true, then the report will be limited to only errors.
-
-// You can request a data structure that contains JSLint's results.
-
-// var myData = JSLINT.data();
-
-// It returns a structure with this form:
-
-// {
-// errors: [
-// {
-// line: NUMBER,
-// character: NUMBER,
-// reason: STRING,
-// evidence: STRING
-// }
-// ],
-// functions: [
-// {
-// name: STRING,
-// line: NUMBER,
-// last: NUMBER,
-// params: [
-// {
-// string: STRING
-// }
-// ],
-// closure: [
-// STRING
-// ],
-// var: [
-// STRING
-// ],
-// exception: [
-// STRING
-// ],
-// outer: [
-// STRING
-// ],
-// unused: [
-// STRING
-// ],
-// undef: [
-// STRING
-// ],
-// global: [
-// STRING
-// ],
-// label: [
-// STRING
-// ]
-// }
-// ],
-// globals: [
-// STRING
-// ],
-// member: {
-// STRING: NUMBER
-// },
-// urls: [
-// STRING
-// ],
-// json: BOOLEAN
-// }
-
-// Empty arrays will not be included.
-
-// You can obtain the parse tree that JSLint constructed while parsing. The
-// latest tree is kept in JSLINT.tree. A nice stringication can be produced
-// with
-
-// JSON.stringify(JSLINT.tree, [
-// 'string', 'arity', 'name', 'first',
-// 'second', 'third', 'block', 'else'
-// ], 4));
-
-// JSLint provides three directives. They look like slashstar comments, and
-// allow for setting options, declaring global variables, and establishing a
-// set of allowed property names.
-
-// These directives respect function scope.
-
-// The jslint directive is a special comment that can set one or more options.
-// The current option set is
-
-// anon true, if the space may be omitted in anonymous function declarations
-// bitwise true, if bitwise operators should be allowed
-// browser true, if the standard browser globals should be predefined
-// cap true, if upper case HTML should be allowed
-// 'continue' true, if the continuation statement should be tolerated
-// css true, if CSS workarounds should be tolerated
-// debug true, if debugger statements should be allowed
-// devel true, if logging should be allowed (console, alert, etc.)
-// eqeq true, if == should be allowed
-// es5 true, if ES5 syntax should be allowed
-// evil true, if eval should be allowed
-// forin true, if for in statements need not filter
-// fragment true, if HTML fragments should be allowed
-// indent the indentation factor
-// maxerr the maximum number of errors to allow
-// maxlen the maximum length of a source line
-// newcap true, if constructor names capitalization is ignored
-// node true, if Node.js globals should be predefined
-// nomen true, if names may have dangling _
-// on true, if HTML event handlers should be allowed
-// passfail true, if the scan should stop on first error
-// plusplus true, if increment/decrement should be allowed
-// properties true, if all property names must be declared with /*properties*/
-// regexp true, if the . should be allowed in regexp literals
-// rhino true, if the Rhino environment globals should be predefined
-// undef true, if variables can be declared out of order
-// unparam true, if unused parameters should be tolerated
-// sloppy true, if the 'use strict'; pragma is optional
-// stupid true, if really stupid practices are tolerated
-// sub true, if all forms of subscript notation are tolerated
-// vars true, if multiple var statements per function should be allowed
-// white true, if sloppy whitespace is tolerated
-// widget true if the Yahoo Widgets globals should be predefined
-// windows true, if MS Windows-specific globals should be predefined
-
-// For example:
-
-/*jslint
- evil: true, nomen: true, regexp: true
-*/
-
-// The properties directive declares an exclusive list of property names.
-// Any properties named in the program that are not in the list will
-// produce a warning.
-
-// For example:
-
-/*properties
- '\b', '\t', '\n', '\f', '\r', '!', '!=', '!==', '"', '%', '\'',
- '(arguments)', '(begin)', '(breakage)', '(context)', '(error)',
- '(identifier)', '(line)', '(loopage)', '(name)', '(params)', '(scope)',
- '(token)', '(vars)', '(verb)', '*', '+', '-', '/', '<', '<=', '==',
- '===', '>', '>=', ADSAFE, Array, Date, Function, Object, '\\', a,
- a_label, a_not_allowed, a_not_defined, a_scope, abbr, acronym, address,
- adsafe, adsafe_a, adsafe_autocomplete, adsafe_bad_id, adsafe_div,
- adsafe_fragment, adsafe_go, adsafe_html, adsafe_id, adsafe_id_go, adsafe_lib,
- adsafe_lib_second, adsafe_missing_id, adsafe_name_a, adsafe_placement,
- adsafe_prefix_a, adsafe_script, adsafe_source, adsafe_subscript_a,
- adsafe_tag, all, already_defined, and, anon, applet, apply, approved, area,
- arity, article, aside, assign, assign_exception,
- assignment_function_expression, at, attribute_case_a, audio, autocomplete,
- avoid_a, b, background, 'background-attachment', 'background-color',
- 'background-image', 'background-position', 'background-repeat',
- bad_assignment, bad_color_a, bad_constructor, bad_entity, bad_html, bad_id_a,
- bad_in_a, bad_invocation, bad_name_a, bad_new, bad_number, bad_operand,
- bad_style, bad_type, bad_url_a, bad_wrap, base, bdo, big, bitwise, block,
- blockquote, body, border, 'border-bottom', 'border-bottom-color',
- 'border-bottom-left-radius', 'border-bottom-right-radius',
- 'border-bottom-style', 'border-bottom-width', 'border-collapse',
- 'border-color', 'border-left', 'border-left-color', 'border-left-style',
- 'border-left-width', 'border-radius', 'border-right', 'border-right-color',
- 'border-right-style', 'border-right-width', 'border-spacing', 'border-style',
- 'border-top', 'border-top-color', 'border-top-left-radius',
- 'border-top-right-radius', 'border-top-style', 'border-top-width',
- 'border-width', bottom, br, braille, browser, button, c, call, canvas, cap,
- caption, 'caption-side', center, charAt, charCodeAt, character, cite, clear,
- clip, closure, cm, code, col, colgroup, color, combine_var, command,
- conditional_assignment, confusing_a, confusing_regexp, constructor_name_a,
- content, continue, control_a, 'counter-increment', 'counter-reset', create,
- css, cursor, d, dangerous_comment, dangling_a, data, datalist, dd, debug,
- del, deleted, details, devel, dfn, dialog, dir, direction, display, disrupt,
- div, dl, dt, duplicate_a, edge, edition, else, em, embed, embossed, empty,
- 'empty-cells', empty_block, empty_case, empty_class, entityify, eqeq, errors,
- es5, eval, evidence, evil, ex, exception, exec, expected_a,
- expected_a_at_b_c, expected_a_b, expected_a_b_from_c_d, expected_at_a,
- expected_attribute_a, expected_attribute_value_a, expected_class_a,
- expected_fraction_a, expected_id_a, expected_identifier_a,
- expected_identifier_a_reserved, expected_lang_a, expected_linear_a,
- expected_media_a, expected_name_a, expected_nonstandard_style_attribute,
- expected_number_a, expected_operator_a, expected_percent_a,
- expected_positive_a, expected_pseudo_a, expected_selector_a,
- expected_small_a, expected_space_a_b, expected_string_a,
- expected_style_attribute, expected_style_pattern, expected_tagname_a,
- expected_type_a, f, fieldset, figure, filter, first, flag, float, floor,
- font, 'font-family', 'font-size', 'font-size-adjust', 'font-stretch',
- 'font-style', 'font-variant', 'font-weight', footer, forEach, for_if, forin,
- form, fragment, frame, frameset, from, fromCharCode, fud, funct, function,
- function_block, function_eval, function_loop, function_statement,
- function_strict, functions, global, globals, h1, h2, h3, h4, h5, h6,
- handheld, hasOwnProperty, head, header, height, hgroup, hr,
- 'hta:application', html, html_confusion_a, html_handlers, i, id, identifier,
- identifier_function, iframe, img, immed, implied_evil, in, indent, indexOf,
- infix_in, init, input, ins, insecure_a, isAlpha, isArray, isDigit, isNaN,
- join, jslint, json, kbd, keygen, keys, label, labeled, lang, lbp,
- leading_decimal_a, led, left, legend, length, 'letter-spacing', li, lib,
- line, 'line-height', link, 'list-style', 'list-style-image',
- 'list-style-position', 'list-style-type', map, margin, 'margin-bottom',
- 'margin-left', 'margin-right', 'margin-top', mark, 'marker-offset', match,
- 'max-height', 'max-width', maxerr, maxlen, member, menu, message, meta,
- meter, 'min-height', 'min-width', missing_a, missing_a_after_b,
- missing_option, missing_property, missing_space_a_b, missing_url,
- missing_use_strict, mixed, mm, mode, move_invocation, move_var, n, name,
- name_function, nav, nested_comment, newcap, node, noframes, nomen, noscript,
- not, not_a_constructor, not_a_defined, not_a_function, not_a_label,
- not_a_scope, not_greater, nud, number, object, octal_a, ol, on, opacity,
- open, optgroup, option, outer, outline, 'outline-color', 'outline-style',
- 'outline-width', output, overflow, 'overflow-x', 'overflow-y', p, padding,
- 'padding-bottom', 'padding-left', 'padding-right', 'padding-top',
- 'page-break-after', 'page-break-before', param, parameter_a_get_b,
- parameter_arguments_a, parameter_set_a, params, paren, parent, passfail, pc,
- plusplus, pop, position, postscript, pre, predef, print, progress,
- projection, properties, prototype, pt, push, px, q, quote, quotes, r, radix,
- range, raw, read_only, reason, redefinition_a, regexp, replace, report,
- reserved, reserved_a, rhino, right, rp, rt, ruby, safe, samp, scanned_a_b,
- screen, script, search, second, section, select, shift, slash_equal, slice,
- sloppy, small, sort, source, span, speech, split, src, statement_block,
- stopping, strange_loop, strict, string, strong, stupid, style, styleproperty,
- sub, subscript, substr, sup, supplant, sync_a, t, table, 'table-layout',
- tag_a_in_b, tbody, td, test, 'text-align', 'text-decoration', 'text-indent',
- 'text-shadow', 'text-transform', textarea, tfoot, th, thead, third, thru,
- time, title, toLowerCase, toString, toUpperCase, token, too_long, too_many,
- top, tr, trailing_decimal_a, tree, tt, tty, tv, type, u, ul, unclosed,
- unclosed_comment, unclosed_regexp, undef, undefined, unescaped_a,
- unexpected_a, unexpected_char_a_b, unexpected_comment, unexpected_else,
- unexpected_label_a, unexpected_property_a, unexpected_space_a_b,
- 'unicode-bidi', unnecessary_initialize, unnecessary_use, unparam,
- unreachable_a_b, unrecognized_style_attribute_a, unrecognized_tag_a, unsafe,
- unused, url, urls, use_array, use_braces, use_charAt, use_object, use_or,
- use_param, used_before_a, var, var_a_not, vars, 'vertical-align', video,
- visibility, was, weird_assignment, weird_condition, weird_new, weird_program,
- weird_relation, weird_ternary, white, 'white-space', widget, width, windows,
- 'word-spacing', 'word-wrap', wrap, wrap_immediate, wrap_regexp,
- write_is_wrong, writeable, 'z-index'
-*/
-
-// The global directive is used to declare global variables that can
-// be accessed by the program. If a declaration is true, then the variable
-// is writeable. Otherwise, it is read-only.
-
-// We build the application inside a function so that we produce only a single
-// global variable. That function will be invoked immediately, and its return
-// value is the JSLINT function itself. That function is also an object that
-// can contain data and other functions.
-
-var JSLINT = (function () {
- 'use strict';
-
- function array_to_object(array, value) {
-
-// Make an object from an array of keys and a common value.
-
- var i, length = array.length, object = {};
- for (i = 0; i < length; i += 1) {
- object[array[i]] = value;
- }
- return object;
- }
-
-
- var adsafe_id, // The widget's ADsafe id.
- adsafe_may, // The widget may load approved scripts.
- adsafe_top, // At the top of the widget script.
- adsafe_went, // ADSAFE.go has been called.
- allowed_option = {
- anon : true,
- bitwise : true,
- browser : true,
- cap : true,
- 'continue': true,
- css : true,
- debug : true,
- devel : true,
- eqeq : true,
- es5 : true,
- evil : true,
- forin : true,
- fragment : true,
- indent : 10,
- maxerr : 1000,
- maxlen : 256,
- newcap : true,
- node : true,
- nomen : true,
- on : true,
- passfail : true,
- plusplus : true,
- properties: true,
- regexp : true,
- rhino : true,
- undef : true,
- unparam : true,
- sloppy : true,
- stupid : true,
- sub : true,
- vars : true,
- white : true,
- widget : true,
- windows : true
- },
- anonname, // The guessed name for anonymous functions.
- approved, // ADsafe approved urls.
-
-// These are operators that should not be used with the ! operator.
-
- bang = {
- '<' : true,
- '<=' : true,
- '==' : true,
- '===': true,
- '!==': true,
- '!=' : true,
- '>' : true,
- '>=' : true,
- '+' : true,
- '-' : true,
- '*' : true,
- '/' : true,
- '%' : true
- },
-
-// These are property names that should not be permitted in the safe subset.
-
- banned = array_to_object([
- 'arguments', 'callee', 'caller', 'constructor', 'eval', 'prototype',
- 'stack', 'unwatch', 'valueOf', 'watch'
- ], true),
- begin, // The root token
-
-// browser contains a set of global names that are commonly provided by a
-// web browser environment.
-
- browser = array_to_object([
- 'clearInterval', 'clearTimeout', 'document', 'event', 'FormData',
- 'frames', 'history', 'Image', 'localStorage', 'location', 'name',
- 'navigator', 'Option', 'parent', 'screen', 'sessionStorage',
- 'setInterval', 'setTimeout', 'Storage', 'window', 'XMLHttpRequest'
- ], false),
-
-// bundle contains the text messages.
-
- bundle = {
- a_label: "'{a}' is a statement label.",
- a_not_allowed: "'{a}' is not allowed.",
- a_not_defined: "'{a}' is not defined.",
- a_scope: "'{a}' used out of scope.",
- adsafe_a: "ADsafe violation: '{a}'.",
- adsafe_autocomplete: "ADsafe autocomplete violation.",
- adsafe_bad_id: "ADSAFE violation: bad id.",
- adsafe_div: "ADsafe violation: Wrap the widget in a div.",
- adsafe_fragment: "ADSAFE: Use the fragment option.",
- adsafe_go: "ADsafe violation: Misformed ADSAFE.go.",
- adsafe_html: "Currently, ADsafe does not operate on whole HTML " +
- "documents. It operates on <div> fragments and .js files.",
- adsafe_id: "ADsafe violation: id does not match.",
- adsafe_id_go: "ADsafe violation: Missing ADSAFE.id or ADSAFE.go.",
- adsafe_lib: "ADsafe lib violation.",
- adsafe_lib_second: "ADsafe: The second argument to lib must be a function.",
- adsafe_missing_id: "ADSAFE violation: missing ID_.",
- adsafe_name_a: "ADsafe name violation: '{a}'.",
- adsafe_placement: "ADsafe script placement violation.",
- adsafe_prefix_a: "ADsafe violation: An id must have a '{a}' prefix",
- adsafe_script: "ADsafe script violation.",
- adsafe_source: "ADsafe unapproved script source.",
- adsafe_subscript_a: "ADsafe subscript '{a}'.",
- adsafe_tag: "ADsafe violation: Disallowed tag '{a}'.",
- already_defined: "'{a}' is already defined.",
- and: "The '&&' subexpression should be wrapped in parens.",
- assign_exception: "Do not assign to the exception parameter.",
- assignment_function_expression: "Expected an assignment or " +
- "function call and instead saw an expression.",
- attribute_case_a: "Attribute '{a}' not all lower case.",
- avoid_a: "Avoid '{a}'.",
- bad_assignment: "Bad assignment.",
- bad_color_a: "Bad hex color '{a}'.",
- bad_constructor: "Bad constructor.",
- bad_entity: "Bad entity.",
- bad_html: "Bad HTML string",
- bad_id_a: "Bad id: '{a}'.",
- bad_in_a: "Bad for in variable '{a}'.",
- bad_invocation: "Bad invocation.",
- bad_name_a: "Bad name: '{a}'.",
- bad_new: "Do not use 'new' for side effects.",
- bad_number: "Bad number '{a}'.",
- bad_operand: "Bad operand.",
- bad_style: "Bad style.",
- bad_type: "Bad type.",
- bad_url_a: "Bad url '{a}'.",
- bad_wrap: "Do not wrap function literals in parens unless they " +
- "are to be immediately invoked.",
- combine_var: "Combine this with the previous 'var' statement.",
- conditional_assignment: "Expected a conditional expression and " +
- "instead saw an assignment.",
- confusing_a: "Confusing use of '{a}'.",
- confusing_regexp: "Confusing regular expression.",
- constructor_name_a: "A constructor name '{a}' should start with " +
- "an uppercase letter.",
- control_a: "Unexpected control character '{a}'.",
- css: "A css file should begin with @charset 'UTF-8';",
- dangling_a: "Unexpected dangling '_' in '{a}'.",
- dangerous_comment: "Dangerous comment.",
- deleted: "Only properties should be deleted.",
- duplicate_a: "Duplicate '{a}'.",
- empty_block: "Empty block.",
- empty_case: "Empty case.",
- empty_class: "Empty class.",
- es5: "This is an ES5 feature.",
- evil: "eval is evil.",
- expected_a: "Expected '{a}'.",
- expected_a_b: "Expected '{a}' and instead saw '{b}'.",
- expected_a_b_from_c_d: "Expected '{a}' to match '{b}' from line " +
- "{c} and instead saw '{d}'.",
- expected_at_a: "Expected an at-rule, and instead saw @{a}.",
- expected_a_at_b_c: "Expected '{a}' at column {b}, not column {c}.",
- expected_attribute_a: "Expected an attribute, and instead saw [{a}].",
- expected_attribute_value_a: "Expected an attribute value and " +
- "instead saw '{a}'.",
- expected_class_a: "Expected a class, and instead saw .{a}.",
- expected_fraction_a: "Expected a number between 0 and 1 and " +
- "instead saw '{a}'",
- expected_id_a: "Expected an id, and instead saw #{a}.",
- expected_identifier_a: "Expected an identifier and instead saw '{a}'.",
- expected_identifier_a_reserved: "Expected an identifier and " +
- "instead saw '{a}' (a reserved word).",
- expected_linear_a: "Expected a linear unit and instead saw '{a}'.",
- expected_lang_a: "Expected a lang code, and instead saw :{a}.",
- expected_media_a: "Expected a CSS media type, and instead saw '{a}'.",
- expected_name_a: "Expected a name and instead saw '{a}'.",
- expected_nonstandard_style_attribute: "Expected a non-standard " +
- "style attribute and instead saw '{a}'.",
- expected_number_a: "Expected a number and instead saw '{a}'.",
- expected_operator_a: "Expected an operator and instead saw '{a}'.",
- expected_percent_a: "Expected a percentage and instead saw '{a}'",
- expected_positive_a: "Expected a positive number and instead saw '{a}'",
- expected_pseudo_a: "Expected a pseudo, and instead saw :{a}.",
- expected_selector_a: "Expected a CSS selector, and instead saw {a}.",
- expected_small_a: "Expected a small positive integer and instead saw '{a}'",
- expected_space_a_b: "Expected exactly one space between '{a}' and '{b}'.",
- expected_string_a: "Expected a string and instead saw {a}.",
- expected_style_attribute: "Excepted a style attribute, and instead saw '{a}'.",
- expected_style_pattern: "Expected a style pattern, and instead saw '{a}'.",
- expected_tagname_a: "Expected a tagName, and instead saw {a}.",
- expected_type_a: "Expected a type, and instead saw {a}.",
- for_if: "The body of a for in should be wrapped in an if " +
- "statement to filter unwanted properties from the prototype.",
- function_block: "Function statements should not be placed in blocks. " +
- "Use a function expression or move the statement to the top of " +
- "the outer function.",
- function_eval: "The Function constructor is eval.",
- function_loop: "Don't make functions within a loop.",
- function_statement: "Function statements are not invocable. " +
- "Wrap the whole function invocation in parens.",
- function_strict: "Use the function form of 'use strict'.",
- html_confusion_a: "HTML confusion in regular expression '<{a}'.",
- html_handlers: "Avoid HTML event handlers.",
- identifier_function: "Expected an identifier in an assignment " +
- "and instead saw a function invocation.",
- implied_evil: "Implied eval is evil. Pass a function instead of a string.",
- infix_in: "Unexpected 'in'. Compare with undefined, or use the " +
- "hasOwnProperty method instead.",
- insecure_a: "Insecure '{a}'.",
- isNaN: "Use the isNaN function to compare with NaN.",
- lang: "lang is deprecated.",
- leading_decimal_a: "A leading decimal point can be confused with a dot: '.{a}'.",
- missing_a: "Missing '{a}'.",
- missing_a_after_b: "Missing '{a}' after '{b}'.",
- missing_option: "Missing option value.",
- missing_property: "Missing property name.",
- missing_space_a_b: "Missing space between '{a}' and '{b}'.",
- missing_url: "Missing url.",
- missing_use_strict: "Missing 'use strict' statement.",
- mixed: "Mixed spaces and tabs.",
- move_invocation: "Move the invocation into the parens that " +
- "contain the function.",
- move_var: "Move 'var' declarations to the top of the function.",
- name_function: "Missing name in function statement.",
- nested_comment: "Nested comment.",
- not: "Nested not.",
- not_a_constructor: "Do not use {a} as a constructor.",
- not_a_defined: "'{a}' has not been fully defined yet.",
- not_a_function: "'{a}' is not a function.",
- not_a_label: "'{a}' is not a label.",
- not_a_scope: "'{a}' is out of scope.",
- not_greater: "'{a}' should not be greater than '{b}'.",
- octal_a: "Don't use octal: '{a}'. Use '\\u....' instead.",
- parameter_arguments_a: "Do not mutate parameter '{a}' when using 'arguments'.",
- parameter_a_get_b: "Unexpected parameter '{a}' in get {b} function.",
- parameter_set_a: "Expected parameter (value) in set {a} function.",
- radix: "Missing radix parameter.",
- read_only: "Read only.",
- redefinition_a: "Redefinition of '{a}'.",
- reserved_a: "Reserved name '{a}'.",
- scanned_a_b: "{a} ({b}% scanned).",
- slash_equal: "A regular expression literal can be confused with '/='.",
- statement_block: "Expected to see a statement and instead saw a block.",
- stopping: "Stopping. ",
- strange_loop: "Strange loop.",
- strict: "Strict violation.",
- subscript: "['{a}'] is better written in dot notation.",
- sync_a: "Unexpected sync method: '{a}'.",
- tag_a_in_b: "A '<{a}>' must be within '<{b}>'.",
- too_long: "Line too long.",
- too_many: "Too many errors.",
- trailing_decimal_a: "A trailing decimal point can be confused " +
- "with a dot: '.{a}'.",
- type: "type is unnecessary.",
- unclosed: "Unclosed string.",
- unclosed_comment: "Unclosed comment.",
- unclosed_regexp: "Unclosed regular expression.",
- unescaped_a: "Unescaped '{a}'.",
- unexpected_a: "Unexpected '{a}'.",
- unexpected_char_a_b: "Unexpected character '{a}' in {b}.",
- unexpected_comment: "Unexpected comment.",
- unexpected_else: "Unexpected 'else' after 'return'.",
- unexpected_label_a: "Unexpected label '{a}'.",
- unexpected_property_a: "Unexpected /*property*/ '{a}'.",
- unexpected_space_a_b: "Unexpected space between '{a}' and '{b}'.",
- unnecessary_initialize: "It is not necessary to initialize '{a}' " +
- "to 'undefined'.",
- unnecessary_use: "Unnecessary 'use strict'.",
- unreachable_a_b: "Unreachable '{a}' after '{b}'.",
- unrecognized_style_attribute_a: "Unrecognized style attribute '{a}'.",
- unrecognized_tag_a: "Unrecognized tag '<{a}>'.",
- unsafe: "Unsafe character.",
- url: "JavaScript URL.",
- use_array: "Use the array literal notation [].",
- use_braces: "Spaces are hard to count. Use {{a}}.",
- use_charAt: "Use the charAt method.",
- use_object: "Use the object literal notation {}.",
- use_or: "Use the || operator.",
- use_param: "Use a named parameter.",
- used_before_a: "'{a}' was used before it was defined.",
- var_a_not: "Variable {a} was not declared correctly.",
- weird_assignment: "Weird assignment.",
- weird_condition: "Weird condition.",
- weird_new: "Weird construction. Delete 'new'.",
- weird_program: "Weird program.",
- weird_relation: "Weird relation.",
- weird_ternary: "Weird ternary.",
- wrap_immediate: "Wrap an immediate function invocation in parentheses " +
- "to assist the reader in understanding that the expression " +
- "is the result of a function, and not the function itself.",
- wrap_regexp: "Wrap the /regexp/ literal in parens to " +
- "disambiguate the slash operator.",
- write_is_wrong: "document.write can be a form of eval."
- },
- comments_off,
- css_attribute_data,
- css_any,
-
- css_colorData = array_to_object([
- "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
- "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
- "burlywood", "cadetblue", "chartreuse", "chocolate", "coral",
- "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue",
- "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkkhaki",
- "darkmagenta", "darkolivegreen", "darkorange", "darkorchid",
- "darkred", "darksalmon", "darkseagreen", "darkslateblue",
- "darkslategray", "darkturquoise", "darkviolet", "deeppink",
- "deepskyblue", "dimgray", "dodgerblue", "firebrick", "floralwhite",
- "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold",
- "goldenrod", "gray", "green", "greenyellow", "honeydew", "hotpink",
- "indianred", "indigo", "ivory", "khaki", "lavender",
- "lavenderblush", "lawngreen", "lemonchiffon", "lightblue",
- "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgreen",
- "lightpink", "lightsalmon", "lightseagreen", "lightskyblue",
- "lightslategray", "lightsteelblue", "lightyellow", "lime",
- "limegreen", "linen", "magenta", "maroon", "mediumaquamarine",
- "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen",
- "mediumslateblue", "mediumspringgreen", "mediumturquoise",
- "mediumvioletred", "midnightblue", "mintcream", "mistyrose",
- "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab",
- "orange", "orangered", "orchid", "palegoldenrod", "palegreen",
- "paleturquoise", "palevioletred", "papayawhip", "peachpuff",
- "peru", "pink", "plum", "powderblue", "purple", "red", "rosybrown",
- "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen",
- "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray",
- "snow", "springgreen", "steelblue", "tan", "teal", "thistle",
- "tomato", "turquoise", "violet", "wheat", "white", "whitesmoke",
- "yellow", "yellowgreen",
-
- "activeborder", "activecaption", "appworkspace", "background",
- "buttonface", "buttonhighlight", "buttonshadow", "buttontext",
- "captiontext", "graytext", "highlight", "highlighttext",
- "inactiveborder", "inactivecaption", "inactivecaptiontext",
- "infobackground", "infotext", "menu", "menutext", "scrollbar",
- "threeddarkshadow", "threedface", "threedhighlight",
- "threedlightshadow", "threedshadow", "window", "windowframe",
- "windowtext"
- ], true),
-
- css_border_style,
- css_break,
-
- css_lengthData = {
- '%': true,
- 'cm': true,
- 'em': true,
- 'ex': true,
- 'in': true,
- 'mm': true,
- 'pc': true,
- 'pt': true,
- 'px': true
- },
-
- css_media,
- css_overflow,
-
- descapes = {
- 'b': '\b',
- 't': '\t',
- 'n': '\n',
- 'f': '\f',
- 'r': '\r',
- '"': '"',
- '/': '/',
- '\\': '\\',
- '!': '!'
- },
-
- devel = array_to_object([
- 'alert', 'confirm', 'console', 'Debug', 'opera', 'prompt', 'WSH'
- ], false),
- directive,
- escapes = {
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '\'': '\\\'',
- '"' : '\\"',
- '/' : '\\/',
- '\\': '\\\\'
- },
-
- funct, // The current function, including the labels used in
- // the function, as well as (breakage),
- // (context), (loopage), (name), (params), (token),
- // (vars), (verb)
-
- functionicity = [
- 'closure', 'exception', 'global', 'label', 'outer', 'undef',
- 'unused', 'var'
- ],
-
- functions, // All of the functions
- global_funct, // The global body
- global_scope, // The global scope
- html_tag = {
- a: {},
- abbr: {},
- acronym: {},
- address: {},
- applet: {},
- area: {empty: true, parent: ' map '},
- article: {},
- aside: {},
- audio: {},
- b: {},
- base: {empty: true, parent: ' head '},
- bdo: {},
- big: {},
- blockquote: {},
- body: {parent: ' html noframes '},
- br: {empty: true},
- button: {},
- canvas: {parent: ' body p div th td '},
- caption: {parent: ' table '},
- center: {},
- cite: {},
- code: {},
- col: {empty: true, parent: ' table colgroup '},
- colgroup: {parent: ' table '},
- command: {parent: ' menu '},
- datalist: {},
- dd: {parent: ' dl '},
- del: {},
- details: {},
- dialog: {},
- dfn: {},
- dir: {},
- div: {},
- dl: {},
- dt: {parent: ' dl '},
- em: {},
- embed: {},
- fieldset: {},
- figure: {},
- font: {},
- footer: {},
- form: {},
- frame: {empty: true, parent: ' frameset '},
- frameset: {parent: ' html frameset '},
- h1: {},
- h2: {},
- h3: {},
- h4: {},
- h5: {},
- h6: {},
- head: {parent: ' html '},
- header: {},
- hgroup: {},
- hr: {empty: true},
- 'hta:application':
- {empty: true, parent: ' head '},
- html: {parent: '*'},
- i: {},
- iframe: {},
- img: {empty: true},
- input: {empty: true},
- ins: {},
- kbd: {},
- keygen: {},
- label: {},
- legend: {parent: ' details fieldset figure '},
- li: {parent: ' dir menu ol ul '},
- link: {empty: true, parent: ' head '},
- map: {},
- mark: {},
- menu: {},
- meta: {empty: true, parent: ' head noframes noscript '},
- meter: {},
- nav: {},
- noframes: {parent: ' html body '},
- noscript: {parent: ' body head noframes '},
- object: {},
- ol: {},
- optgroup: {parent: ' select '},
- option: {parent: ' optgroup select '},
- output: {},
- p: {},
- param: {empty: true, parent: ' applet object '},
- pre: {},
- progress: {},
- q: {},
- rp: {},
- rt: {},
- ruby: {},
- samp: {},
- script: {empty: true, parent: ' body div frame head iframe p pre span '},
- section: {},
- select: {},
- small: {},
- span: {},
- source: {},
- strong: {},
- style: {parent: ' head ', empty: true},
- sub: {},
- sup: {},
- table: {},
- tbody: {parent: ' table '},
- td: {parent: ' tr '},
- textarea: {},
- tfoot: {parent: ' table '},
- th: {parent: ' tr '},
- thead: {parent: ' table '},
- time: {},
- title: {parent: ' head '},
- tr: {parent: ' table tbody thead tfoot '},
- tt: {},
- u: {},
- ul: {},
- 'var': {},
- video: {}
- },
-
- ids, // HTML ids
- in_block,
- indent,
- itself, // JSLint itself
- json_mode,
- lex, // the tokenizer
- lines,
- lookahead,
- node = array_to_object([
- 'Buffer', 'clearInterval', 'clearTimeout', 'console', 'exports',
- 'global', 'module', 'process', 'querystring', 'require',
- 'setInterval', 'setTimeout', '__dirname', '__filename'
- ], false),
- node_js,
- numbery = array_to_object(['indexOf', 'lastIndexOf', 'search'], true),
- next_token,
- option,
- predefined, // Global variables defined by option
- prereg,
- prev_token,
- property,
- regexp_flag = array_to_object(['g', 'i', 'm'], true),
- return_this = function return_this() {
- return this;
- },
- rhino = array_to_object([
- 'defineClass', 'deserialize', 'gc', 'help', 'load', 'loadClass',
- 'print', 'quit', 'readFile', 'readUrl', 'runCommand', 'seal',
- 'serialize', 'spawn', 'sync', 'toint32', 'version'
- ], false),
-
- scope, // An object containing an object for each variable in scope
- semicolon_coda = array_to_object([';', '"', '\'', ')'], true),
- src,
- stack,
-
-// standard contains the global names that are provided by the
-// ECMAScript standard.
-
- standard = array_to_object([
- 'Array', 'Boolean', 'Date', 'decodeURI', 'decodeURIComponent',
- 'encodeURI', 'encodeURIComponent', 'Error', 'eval', 'EvalError',
- 'Function', 'isFinite', 'isNaN', 'JSON', 'Math', 'Number',
- 'Object', 'parseInt', 'parseFloat', 'RangeError', 'ReferenceError',
- 'RegExp', 'String', 'SyntaxError', 'TypeError', 'URIError'
- ], false),
-
- strict_mode,
- syntax = {},
- tab,
- token,
- urls,
- var_mode,
- warnings,
-
-// widget contains the global names which are provided to a Yahoo
-// (fna Konfabulator) widget.
-
- widget = array_to_object([
- 'alert', 'animator', 'appleScript', 'beep', 'bytesToUIString',
- 'Canvas', 'chooseColor', 'chooseFile', 'chooseFolder',
- 'closeWidget', 'COM', 'convertPathToHFS', 'convertPathToPlatform',
- 'CustomAnimation', 'escape', 'FadeAnimation', 'filesystem', 'Flash',
- 'focusWidget', 'form', 'FormField', 'Frame', 'HotKey', 'Image',
- 'include', 'isApplicationRunning', 'iTunes', 'konfabulatorVersion',
- 'log', 'md5', 'MenuItem', 'MoveAnimation', 'openURL', 'play',
- 'Point', 'popupMenu', 'preferenceGroups', 'preferences', 'print',
- 'prompt', 'random', 'Rectangle', 'reloadWidget', 'ResizeAnimation',
- 'resolvePath', 'resumeUpdates', 'RotateAnimation', 'runCommand',
- 'runCommandInBg', 'saveAs', 'savePreferences', 'screen',
- 'ScrollBar', 'showWidgetPreferences', 'sleep', 'speak', 'Style',
- 'suppressUpdates', 'system', 'tellWidget', 'Text', 'TextArea',
- 'Timer', 'unescape', 'updateNow', 'URL', 'Web', 'widget', 'Window',
- 'XMLDOM', 'XMLHttpRequest', 'yahooCheckLogin', 'yahooLogin',
- 'yahooLogout'
- ], true),
-
- windows = array_to_object([
- 'ActiveXObject', 'CScript', 'Debug', 'Enumerator', 'System',
- 'VBArray', 'WScript', 'WSH'
- ], false),
-
-// xmode is used to adapt to the exceptions in html parsing.
-// It can have these states:
-// '' .js script file
-// 'html'
-// 'outer'
-// 'script'
-// 'style'
-// 'scriptstring'
-// 'styleproperty'
-
- xmode,
- xquote,
-
-// Regular expressions. Some of these are stupidly long.
-
-// unsafe comment or string
- ax = /@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i,
-// carriage return, carriage return linefeed, or linefeed
- crlfx = /\r\n?|\n/,
-// unsafe characters that are silently deleted by one or more browsers
- cx = /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,
-// query characters for ids
- dx = /[\[\]\/\\"'*<>.&:(){}+=#]/,
-// html token
- hx = /^\s*(['"=>\/&#]|<(?:\/|\!(?:--)?)?|[a-zA-Z][a-zA-Z0-9_\-:]*|[0-9]+|--)/,
-// identifier
- ix = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,
-// javascript url
- jx = /^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i,
-// star slash
- lx = /\*\/|\/\*/,
-// characters in strings that need escapement
- nx = /[\u0000-\u001f'\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
-// outer html token
- ox = /[>&]|<[\/!]?|--/,
-// attributes characters
- qx = /[^a-zA-Z0-9+\-_\/. ]/,
-// style
- sx = /^\s*([{}:#%.=,>+\[\]@()"';]|[*$\^~]=|[a-zA-Z_][a-zA-Z0-9_\-]*|[0-9]+|<\/|\/\*)/,
- ssx = /^\s*([@#!"'};:\-%.=,+\[\]()*_]|[a-zA-Z][a-zA-Z0-9._\-]*|\/\*?|\d+(?:\.\d+)?|<\/)/,
-// token
- tx = /^\s*([(){}\[\]\?.,:;'"~#@`]|={1,3}|\/(\*(jslint|properties|property|members?|globals?)?|=|\/)?|\*[\/=]?|\+(?:=|\++)?|-(?:=|-+)?|[\^%]=?|&[&=]?|\|[|=]?|>{1,3}=?|<(?:[\/=!]|\!(\[|--)?|<=?)?|\!={0,2}|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+(?:[xX][0-9a-fA-F]+|\.[0-9]*)?(?:[eE][+\-]?[0-9]+)?)/,
-// url badness
- ux = /&|\+|\u00AD|\.\.|\/\*|%[^;]|base64|url|expression|data|mailto|script/i,
-
- rx = {
- outer: hx,
- html: hx,
- style: sx,
- styleproperty: ssx
- };
-
-
- function F() {} // Used by Object.create
-
-// Provide critical ES5 functions to ES3.
-
- if (typeof Array.prototype.filter !== 'function') {
- Array.prototype.filter = function (f) {
- var i, length = this.length, result = [], value;
- for (i = 0; i < length; i += 1) {
- try {
- value = this[i];
- if (f(value)) {
- result.push(value);
- }
- } catch (ignore) {
- }
- }
- return result;
- };
- }
-
- if (typeof Array.prototype.forEach !== 'function') {
- Array.prototype.forEach = function (f) {
- var i, length = this.length;
- for (i = 0; i < length; i += 1) {
- try {
- f(this[i]);
- } catch (ignore) {
- }
- }
- };
- }
-
- if (typeof Array.isArray !== 'function') {
- Array.isArray = function (o) {
- return Object.prototype.toString.apply(o) === '[object Array]';
- };
- }
-
- if (!Object.prototype.hasOwnProperty.call(Object, 'create')) {
- Object.create = function (o) {
- F.prototype = o;
- return new F();
- };
- }
-
- if (typeof Object.keys !== 'function') {
- Object.keys = function (o) {
- var array = [], key;
- for (key in o) {
- if (Object.prototype.hasOwnProperty.call(o, key)) {
- array.push(key);
- }
- }
- return array;
- };
- }
-
- if (typeof String.prototype.entityify !== 'function') {
- String.prototype.entityify = function () {
- return this
- .replace(/&/g, '&amp;')
- .replace(/</g, '&lt;')
- .replace(/>/g, '&gt;');
- };
- }
-
- if (typeof String.prototype.isAlpha !== 'function') {
- String.prototype.isAlpha = function () {
- return (this >= 'a' && this <= 'z\uffff') ||
- (this >= 'A' && this <= 'Z\uffff');
- };
- }
-
- if (typeof String.prototype.isDigit !== 'function') {
- String.prototype.isDigit = function () {
- return (this >= '0' && this <= '9');
- };
- }
-
- if (typeof String.prototype.supplant !== 'function') {
- String.prototype.supplant = function (o) {
- return this.replace(/\{([^{}]*)\}/g, function (a, b) {
- var replacement = o[b];
- return typeof replacement === 'string' ||
- typeof replacement === 'number' ? replacement : a;
- });
- };
- }
-
-
- function sanitize(a) {
-
-// Escapify a troublesome character.
-
- return escapes[a] ||
- '\\u' + ('0000' + a.charCodeAt().toString(16)).slice(-4);
- }
-
-
- function add_to_predefined(group) {
- Object.keys(group).forEach(function (name) {
- predefined[name] = group[name];
- });
- }
-
-
- function assume() {
- if (!option.safe) {
- if (option.rhino) {
- add_to_predefined(rhino);
- option.rhino = false;
- }
- if (option.devel) {
- add_to_predefined(devel);
- option.devel = false;
- }
- if (option.browser) {
- add_to_predefined(browser);
- option.browser = false;
- }
- if (option.windows) {
- add_to_predefined(windows);
- option.windows = false;
- }
- if (option.node) {
- add_to_predefined(node);
- option.node = false;
- node_js = true;
- }
- if (option.widget) {
- add_to_predefined(widget);
- option.widget = false;
- }
- }
- }
-
-
-// Produce an error warning.
-
- function artifact(tok) {
- if (!tok) {
- tok = next_token;
- }
- return tok.number || tok.string;
- }
-
- function quit(message, line, character) {
- throw {
- name: 'JSLintError',
- line: line,
- character: character,
- message: bundle.scanned_a_b.supplant({
- a: message,
- b: Math.floor((line / lines.length) * 100)
- })
- };
- }
-
- function warn(message, offender, a, b, c, d) {
- var character, line, warning;
- offender = offender || next_token; // ~~
- line = offender.line || 0;
- character = offender.from || 0;
- warning = {
- id: '(error)',
- raw: bundle[message] || message,
- evidence: lines[line - 1] || '',
- line: line,
- character: character,
- a: a || (offender.id === '(number)'
- ? String(offender.number)
- : offender.string),
- b: b,
- c: c,
- d: d
- };
- warning.reason = warning.raw.supplant(warning);
- JSLINT.errors.push(warning);
- if (option.passfail) {
- quit(bundle.stopping, line, character);
- }
- warnings += 1;
- if (warnings >= option.maxerr) {
- quit(bundle.too_many, line, character);
- }
- return warning;
- }
-
- function warn_at(message, line, character, a, b, c, d) {
- return warn(message, {
- line: line,
- from: character
- }, a, b, c, d);
- }
-
- function stop(message, offender, a, b, c, d) {
- var warning = warn(message, offender, a, b, c, d);
- quit(bundle.stopping, warning.line, warning.character);
- }
-
- function stop_at(message, line, character, a, b, c, d) {
- return stop(message, {
- line: line,
- from: character
- }, a, b, c, d);
- }
-
- function expected_at(at) {
- if (!option.white && next_token.from !== at) {
- warn('expected_a_at_b_c', next_token, '', at,
- next_token.from);
- }
- }
-
- function aint(it, name, expected) {
- if (it[name] !== expected) {
- warn('expected_a_b', it, expected, it[name]);
- return true;
- }
- return false;
- }
-
-
-// lexical analysis and token construction
-
- lex = (function lex() {
- var character, c, from, length, line, pos, source_row;
-
-// Private lex methods
-
- function next_line() {
- var at;
- if (line >= lines.length) {
- return false;
- }
- character = 1;
- source_row = lines[line];
- line += 1;
- at = source_row.search(/ \t/);
- if (at >= 0) {
- warn_at('mixed', line, at + 1);
- }
- source_row = source_row.replace(/\t/g, tab);
- at = source_row.search(cx);
- if (at >= 0) {
- warn_at('unsafe', line, at);
- }
- if (option.maxlen && option.maxlen < source_row.length) {
- warn_at('too_long', line, source_row.length);
- }
- return true;
- }
-
-// Produce a token object. The token inherits from a syntax symbol.
-
- function it(type, value) {
- var id, the_token;
- if (type === '(string)' || type === '(range)') {
- if (jx.test(value)) {
- warn_at('url', line, from);
- }
- }
- the_token = Object.create(syntax[(
- type === '(punctuator)' || (type === '(identifier)' &&
- Object.prototype.hasOwnProperty.call(syntax, value))
- ? value
- : type
- )] || syntax['(error)']);
- if (type === '(identifier)') {
- the_token.identifier = true;
- if (value === '__iterator__' || value === '__proto__') {
- stop_at('reserved_a', line, from, value);
- } else if (!option.nomen &&
- (value.charAt(0) === '_' ||
- value.charAt(value.length - 1) === '_')) {
- warn_at('dangling_a', line, from, value);
- }
- }
- if (type === '(number)') {
- the_token.number = +value;
- } else if (value !== undefined) {
- the_token.string = String(value);
- }
- the_token.line = line;
- the_token.from = from;
- the_token.thru = character;
- id = the_token.id;
- prereg = id && (
- ('(,=:[!&|?{};'.indexOf(id.charAt(id.length - 1)) >= 0) ||
- id === 'return' || id === 'case'
- );
- return the_token;
- }
-
- function match(x) {
- var exec = x.exec(source_row), first;
- if (exec) {
- length = exec[0].length;
- first = exec[1];
- c = first.charAt(0);
- source_row = source_row.slice(length);
- from = character + length - first.length;
- character += length;
- return first;
- }
- }
-
- function string(x) {
- var c, pos = 0, r = '', result;
-
- function hex(n) {
- var i = parseInt(source_row.substr(pos + 1, n), 16);
- pos += n;
- if (i >= 32 && i <= 126 &&
- i !== 34 && i !== 92 && i !== 39) {
- warn_at('unexpected_a', line, character, '\\');
- }
- character += n;
- c = String.fromCharCode(i);
- }
-
- if (json_mode && x !== '"') {
- warn_at('expected_a', line, character, '"');
- }
-
- if (xquote === x || (xmode === 'scriptstring' && !xquote)) {
- return it('(punctuator)', x);
- }
-
- for (;;) {
- while (pos >= source_row.length) {
- pos = 0;
- if (xmode !== 'html' || !next_line()) {
- stop_at('unclosed', line, from);
- }
- }
- c = source_row.charAt(pos);
- if (c === x) {
- character += 1;
- source_row = source_row.slice(pos + 1);
- result = it('(string)', r);
- result.quote = x;
- return result;
- }
- if (c < ' ') {
- if (c === '\n' || c === '\r') {
- break;
- }
- warn_at('control_a', line, character + pos,
- source_row.slice(0, pos));
- } else if (c === xquote) {
- warn_at('bad_html', line, character + pos);
- } else if (c === '<') {
- if (option.safe && xmode === 'html') {
- warn_at('adsafe_a', line, character + pos, c);
- } else if (source_row.charAt(pos + 1) === '/' && (xmode || option.safe)) {
- warn_at('expected_a_b', line, character,
- '<\\/', '</');
- } else if (source_row.charAt(pos + 1) === '!' && (xmode || option.safe)) {
- warn_at('unexpected_a', line, character, '<!');
- }
- } else if (c === '\\') {
- if (xmode === 'html') {
- if (option.safe) {
- warn_at('adsafe_a', line, character + pos, c);
- }
- } else if (xmode === 'styleproperty') {
- pos += 1;
- character += 1;
- c = source_row.charAt(pos);
- if (c !== x) {
- warn_at('unexpected_a', line, character, '\\');
- }
- } else {
- pos += 1;
- character += 1;
- c = source_row.charAt(pos);
- switch (c) {
- case '':
- if (!option.es5) {
- warn_at('es5', line, character);
- }
- next_line();
- pos = -1;
- break;
- case xquote:
- warn_at('bad_html', line, character + pos);
- break;
- case '\'':
- if (json_mode) {
- warn_at('unexpected_a', line, character, '\\\'');
- }
- break;
- case 'u':
- hex(4);
- break;
- case 'v':
- if (json_mode) {
- warn_at('unexpected_a', line, character, '\\v');
- }
- c = '\v';
- break;
- case 'x':
- if (json_mode) {
- warn_at('unexpected_a', line, character, '\\x');
- }
- hex(2);
- break;
- default:
- if (typeof descapes[c] !== 'string') {
- warn_at(c >= '0' && c <= '7' ? 'octal_a' : 'unexpected_a',
- line, character, '\\' + c);
- } else {
- c = descapes[c];
- }
- }
- }
- }
- r += c;
- character += 1;
- pos += 1;
- }
- }
-
- function number(snippet) {
- var digit;
- if (xmode !== 'style' && xmode !== 'styleproperty' &&
- source_row.charAt(0).isAlpha()) {
- warn_at('expected_space_a_b',
- line, character, c, source_row.charAt(0));
- }
- if (c === '0') {
- digit = snippet.charAt(1);
- if (digit.isDigit()) {
- if (token.id !== '.' && xmode !== 'styleproperty') {
- warn_at('unexpected_a', line, character, snippet);
- }
- } else if (json_mode && (digit === 'x' || digit === 'X')) {
- warn_at('unexpected_a', line, character, '0x');
- }
- }
- if (snippet.slice(snippet.length - 1) === '.') {
- warn_at('trailing_decimal_a', line, character, snippet);
- }
- if (xmode !== 'style') {
- digit = +snippet;
- if (!isFinite(digit)) {
- warn_at('bad_number', line, character, snippet);
- }
- snippet = digit;
- }
- return it('(number)', snippet);
- }
-
- function comment(snippet) {
- if (comments_off || src || (xmode && xmode !== 'script' &&
- xmode !== 'style' && xmode !== 'styleproperty')) {
- warn_at('unexpected_comment', line, character);
- } else if (xmode === 'script' && /<\//i.test(source_row)) {
- warn_at('unexpected_a', line, character, '<\/');
- } else if (option.safe && ax.test(snippet)) {
- warn_at('dangerous_comment', line, character);
- }
- }
-
- function regexp() {
- var b,
- bit,
- captures = 0,
- depth = 0,
- flag = '',
- high,
- letter,
- length = 0,
- low,
- potential,
- quote,
- result;
- for (;;) {
- b = true;
- c = source_row.charAt(length);
- length += 1;
- switch (c) {
- case '':
- stop_at('unclosed_regexp', line, from);
- return;
- case '/':
- if (depth > 0) {
- warn_at('unescaped_a', line, from + length, '/');
- }
- c = source_row.slice(0, length - 1);
- potential = Object.create(regexp_flag);
- for (;;) {
- letter = source_row.charAt(length);
- if (potential[letter] !== true) {
- break;
- }
- potential[letter] = false;
- length += 1;
- flag += letter;
- }
- if (source_row.charAt(length).isAlpha()) {
- stop_at('unexpected_a', line, from, source_row.charAt(length));
- }
- character += length;
- source_row = source_row.slice(length);
- quote = source_row.charAt(0);
- if (quote === '/' || quote === '*') {
- stop_at('confusing_regexp', line, from);
- }
- result = it('(regexp)', c);
- result.flag = flag;
- return result;
- case '\\':
- c = source_row.charAt(length);
- if (c < ' ') {
- warn_at('control_a', line, from + length, String(c));
- } else if (c === '<') {
- warn_at(bundle.unexpected_a, line, from + length, '\\');
- }
- length += 1;
- break;
- case '(':
- depth += 1;
- b = false;
- if (source_row.charAt(length) === '?') {
- length += 1;
- switch (source_row.charAt(length)) {
- case ':':
- case '=':
- case '!':
- length += 1;
- break;
- default:
- warn_at(bundle.expected_a_b, line, from + length,
- ':', source_row.charAt(length));
- }
- } else {
- captures += 1;
- }
- break;
- case '|':
- b = false;
- break;
- case ')':
- if (depth === 0) {
- warn_at('unescaped_a', line, from + length, ')');
- } else {
- depth -= 1;
- }
- break;
- case ' ':
- pos = 1;
- while (source_row.charAt(length) === ' ') {
- length += 1;
- pos += 1;
- }
- if (pos > 1) {
- warn_at('use_braces', line, from + length, pos);
- }
- break;
- case '[':
- c = source_row.charAt(length);
- if (c === '^') {
- length += 1;
- if (!option.regexp) {
- warn_at('insecure_a', line, from + length, c);
- } else if (source_row.charAt(length) === ']') {
- stop_at('unescaped_a', line, from + length, '^');
- }
- }
- bit = false;
- if (c === ']') {
- warn_at('empty_class', line, from + length - 1);
- bit = true;
- }
-klass: do {
- c = source_row.charAt(length);
- length += 1;
- switch (c) {
- case '[':
- case '^':
- warn_at('unescaped_a', line, from + length, c);
- bit = true;
- break;
- case '-':
- if (bit) {
- bit = false;
- } else {
- warn_at('unescaped_a', line, from + length, '-');
- bit = true;
- }
- break;
- case ']':
- if (!bit) {
- warn_at('unescaped_a', line, from + length - 1, '-');
- }
- break klass;
- case '\\':
- c = source_row.charAt(length);
- if (c < ' ') {
- warn_at(bundle.control_a, line, from + length, String(c));
- } else if (c === '<') {
- warn_at(bundle.unexpected_a, line, from + length, '\\');
- }
- length += 1;
- bit = true;
- break;
- case '/':
- warn_at('unescaped_a', line, from + length - 1, '/');
- bit = true;
- break;
- case '<':
- if (xmode === 'script') {
- c = source_row.charAt(length);
- if (c === '!' || c === '/') {
- warn_at(bundle.html_confusion_a, line,
- from + length, c);
- }
- }
- bit = true;
- break;
- default:
- bit = true;
- }
- } while (c);
- break;
- case '.':
- if (!option.regexp) {
- warn_at('insecure_a', line, from + length, c);
- }
- break;
- case ']':
- case '?':
- case '{':
- case '}':
- case '+':
- case '*':
- warn_at('unescaped_a', line, from + length, c);
- break;
- case '<':
- if (xmode === 'script') {
- c = source_row.charAt(length);
- if (c === '!' || c === '/') {
- warn_at(bundle.html_confusion_a, line, from + length, c);
- }
- }
- break;
- }
- if (b) {
- switch (source_row.charAt(length)) {
- case '?':
- case '+':
- case '*':
- length += 1;
- if (source_row.charAt(length) === '?') {
- length += 1;
- }
- break;
- case '{':
- length += 1;
- c = source_row.charAt(length);
- if (c < '0' || c > '9') {
- warn_at(bundle.expected_number_a, line,
- from + length, c);
- }
- length += 1;
- low = +c;
- for (;;) {
- c = source_row.charAt(length);
- if (c < '0' || c > '9') {
- break;
- }
- length += 1;
- low = +c + (low * 10);
- }
- high = low;
- if (c === ',') {
- length += 1;
- high = Infinity;
- c = source_row.charAt(length);
- if (c >= '0' && c <= '9') {
- length += 1;
- high = +c;
- for (;;) {
- c = source_row.charAt(length);
- if (c < '0' || c > '9') {
- break;
- }
- length += 1;
- high = +c + (high * 10);
- }
- }
- }
- if (source_row.charAt(length) !== '}') {
- warn_at(bundle.expected_a_b, line, from + length,
- '}', c);
- } else {
- length += 1;
- }
- if (source_row.charAt(length) === '?') {
- length += 1;
- }
- if (low > high) {
- warn_at(bundle.not_greater, line, from + length,
- low, high);
- }
- break;
- }
- }
- }
- c = source_row.slice(0, length - 1);
- character += length;
- source_row = source_row.slice(length);
- return it('(regexp)', c);
- }
-
-// Public lex methods
-
- return {
- init: function (source) {
- if (typeof source === 'string') {
- lines = source.split(crlfx);
- } else {
- lines = source;
- }
- line = 0;
- next_line();
- from = 1;
- },
-
- range: function (begin, end) {
- var c, value = '';
- from = character;
- if (source_row.charAt(0) !== begin) {
- stop_at('expected_a_b', line, character, begin,
- source_row.charAt(0));
- }
- for (;;) {
- source_row = source_row.slice(1);
- character += 1;
- c = source_row.charAt(0);
- switch (c) {
- case '':
- stop_at('missing_a', line, character, c);
- break;
- case end:
- source_row = source_row.slice(1);
- character += 1;
- return it('(range)', value);
- case xquote:
- case '\\':
- warn_at('unexpected_a', line, character, c);
- break;
- }
- value += c;
- }
- },
-
-// token -- this is called by advance to get the next token.
-
- token: function () {
- var c, i, snippet;
-
- for (;;) {
- while (!source_row) {
- if (!next_line()) {
- return it('(end)');
- }
- }
- while (xmode === 'outer') {
- i = source_row.search(ox);
- if (i === 0) {
- break;
- } else if (i > 0) {
- character += 1;
- source_row = source_row.slice(i);
- break;
- } else {
- if (!next_line()) {
- return it('(end)', '');
- }
- }
- }
- snippet = match(rx[xmode] || tx);
- if (!snippet) {
- if (source_row) {
- if (source_row.charAt(0) === ' ') {
- if (!option.white) {
- warn_at('unexpected_a', line, character,
- '(space)');
- }
- character += 1;
- source_row = '';
- } else {
- stop_at('unexpected_a', line, character,
- source_row.charAt(0));
- }
- }
- } else {
-
-// identifier
-
- c = snippet.charAt(0);
- if (c.isAlpha() || c === '_' || c === '$') {
- return it('(identifier)', snippet);
- }
-
-// number
-
- if (c.isDigit()) {
- return number(snippet);
- }
- switch (snippet) {
-
-// string
-
- case '"':
- case "'":
- return string(snippet);
-
-// // comment
-
- case '//':
- comment(source_row);
- source_row = '';
- break;
-
-// /* comment
-
- case '/*':
- for (;;) {
- i = source_row.search(lx);
- if (i >= 0) {
- break;
- }
- comment(source_row);
- if (!next_line()) {
- stop_at('unclosed_comment', line, character);
- }
- }
- comment(source_row.slice(0, i));
- character += i + 2;
- if (source_row.charAt(i) === '/') {
- stop_at('nested_comment', line, character);
- }
- source_row = source_row.slice(i + 2);
- break;
-
- case '':
- break;
-// /
- case '/':
- if (token.id === '/=') {
- stop_at(
- bundle.slash_equal,
- line,
- from
- );
- }
- return prereg
- ? regexp()
- : it('(punctuator)', snippet);
-
-// punctuator
-
- case '<!--':
- length = line;
-// c = character;
- for (;;) {
- i = source_row.indexOf('--');
- if (i >= 0) {
- break;
- }
- i = source_row.indexOf('<!');
- if (i >= 0) {
- stop_at('nested_comment',
- line, character + i);
- }
- if (!next_line()) {
- stop_at('unclosed_comment', length, c);
- }
- }
- length = source_row.indexOf('<!');
- if (length >= 0 && length < i) {
- stop_at('nested_comment',
- line, character + length);
- }
- character += i;
- if (source_row.charAt(i + 2) !== '>') {
- stop_at('expected_a', line, character, '-->');
- }
- character += 3;
- source_row = source_row.slice(i + 3);
- break;
- case '#':
- if (xmode === 'html' || xmode === 'styleproperty') {
- for (;;) {
- c = source_row.charAt(0);
- if ((c < '0' || c > '9') &&
- (c < 'a' || c > 'f') &&
- (c < 'A' || c > 'F')) {
- break;
- }
- character += 1;
- source_row = source_row.slice(1);
- snippet += c;
- }
- if (snippet.length !== 4 && snippet.length !== 7) {
- warn_at('bad_color_a', line,
- from + length, snippet);
- }
- return it('(color)', snippet);
- }
- return it('(punctuator)', snippet);
-
- default:
- if (xmode === 'outer' && c === '&') {
- character += 1;
- source_row = source_row.slice(1);
- for (;;) {
- c = source_row.charAt(0);
- character += 1;
- source_row = source_row.slice(1);
- if (c === ';') {
- break;
- }
- if (!((c >= '0' && c <= '9') ||
- (c >= 'a' && c <= 'z') ||
- c === '#')) {
- stop_at('bad_entity', line, from + length,
- character);
- }
- }
- break;
- }
- return it('(punctuator)', snippet);
- }
- }
- }
- }
- };
- }());
-
-
- function add_label(token, kind, name) {
-
-// Define the symbol in the current function in the current scope.
-
- name = name || token.string;
-
-// Global variables cannot be created in the safe subset. If a global variable
-// already exists, do nothing. If it is predefined, define it.
-
- if (funct === global_funct) {
- if (option.safe) {
- warn('adsafe_a', token, name);
- }
- if (typeof global_funct[name] !== 'string') {
- token.writeable = typeof predefined[name] === 'boolean'
- ? predefined[name]
- : true;
- token.funct = funct;
- global_scope[name] = token;
- }
- if (kind === 'becoming') {
- kind = 'var';
- }
-
-// Ordinary variables.
-
- } else {
-
-// Warn if the variable already exists.
-
- if (typeof funct[name] === 'string') {
- if (funct[name] === 'undef') {
- if (!option.undef) {
- warn('used_before_a', token, name);
- }
- kind = 'var';
- } else {
- warn('already_defined', token, name);
- }
- } else {
-
-// Add the symbol to the current function.
-
- token.funct = funct;
- token.writeable = true;
- scope[name] = token;
- }
- }
- funct[name] = kind;
- }
-
-
- function peek(distance) {
-
-// Peek ahead to a future token. The distance is how far ahead to look. The
-// default is the next token.
-
- var found, slot = 0;
-
- distance = distance || 0;
- while (slot <= distance) {
- found = lookahead[slot];
- if (!found) {
- found = lookahead[slot] = lex.token();
- }
- slot += 1;
- }
- return found;
- }
-
-
- function advance(id, match) {
-
-// Produce the next token, also looking for programming errors.
-
- if (indent) {
-
-// If indentation checking was requested, then inspect all of the line breakings.
-// The var statement is tricky because the names might be aligned or not. We
-// look at the first line break after the var to determine the programmer's
-// intention.
-
- if (var_mode && next_token.line !== token.line) {
- if ((var_mode !== indent || !next_token.edge) &&
- next_token.from === indent.at -
- (next_token.edge ? option.indent : 0)) {
- var dent = indent;
- for (;;) {
- dent.at -= option.indent;
- if (dent === var_mode) {
- break;
- }
- dent = dent.was;
- }
- dent.open = false;
- }
- var_mode = null;
- }
- if (next_token.id === '?' && indent.mode === ':' &&
- token.line !== next_token.line) {
- indent.at -= option.indent;
- }
- if (indent.open) {
-
-// If the token is an edge.
-
- if (next_token.edge) {
- if (next_token.edge === 'label') {
- expected_at(1);
- } else if (next_token.edge === 'case' || indent.mode === 'statement') {
- expected_at(indent.at - option.indent);
- } else if (indent.mode !== 'array' || next_token.line !== token.line) {
- expected_at(indent.at);
- }
-
-// If the token is not an edge, but is the first token on the line.
-
- } else if (next_token.line !== token.line) {
- if (next_token.from < indent.at + (indent.mode ===
- 'expression' ? 0 : option.indent)) {
- expected_at(indent.at + option.indent);
- }
- indent.wrap = true;
- }
- } else if (next_token.line !== token.line) {
- if (next_token.edge) {
- expected_at(indent.at);
- } else {
- indent.wrap = true;
- if (indent.mode === 'statement' || indent.mode === 'var') {
- expected_at(indent.at + option.indent);
- } else if (next_token.from < indent.at + (indent.mode ===
- 'expression' ? 0 : option.indent)) {
- expected_at(indent.at + option.indent);
- }
- }
- }
- }
-
- switch (token.id) {
- case '(number)':
- if (next_token.id === '.') {
- warn('trailing_decimal_a');
- }
- break;
- case '-':
- if (next_token.id === '-' || next_token.id === '--') {
- warn('confusing_a');
- }
- break;
- case '+':
- if (next_token.id === '+' || next_token.id === '++') {
- warn('confusing_a');
- }
- break;
- }
- if (token.id === '(string)' || token.identifier) {
- anonname = token.string;
- }
-
- if (id && next_token.id !== id) {
- if (match) {
- warn('expected_a_b_from_c_d', next_token, id,
- match.id, match.line, artifact());
- } else if (!next_token.identifier || next_token.string !== id) {
- warn('expected_a_b', next_token, id, artifact());
- }
- }
- prev_token = token;
- token = next_token;
- next_token = lookahead.shift() || lex.token();
- }
-
-
- function advance_identifier(string) {
- if (next_token.identifier && next_token.string === string) {
- advance();
- } else {
- warn('expected_a_b', next_token, string, artifact());
- }
- }
-
-
- function do_safe() {
- if (option.adsafe) {
- option.safe = true;
- }
- if (option.safe) {
- option.browser =
- option['continue'] =
- option.css =
- option.debug =
- option.devel =
- option.evil =
- option.forin =
- option.newcap =
- option.nomen =
- option.on =
- option.rhino =
- option.sloppy =
- option.sub =
- option.undef =
- option.widget =
- option.windows = false;
-
-
- delete predefined.Array;
- delete predefined.Date;
- delete predefined.Function;
- delete predefined.Object;
- delete predefined['eval'];
-
- add_to_predefined({
- ADSAFE: false,
- lib: false
- });
- }
- }
-
-
- function do_globals() {
- var name, writeable;
- for (;;) {
- if (next_token.id !== '(string)' && !next_token.identifier) {
- return;
- }
- name = next_token.string;
- advance();
- writeable = false;
- if (next_token.id === ':') {
- advance(':');
- switch (next_token.id) {
- case 'true':
- writeable = predefined[name] !== false;
- advance('true');
- break;
- case 'false':
- advance('false');
- break;
- default:
- stop('unexpected_a');
- }
- }
- predefined[name] = writeable;
- if (next_token.id !== ',') {
- return;
- }
- advance(',');
- }
- }
-
-
- function do_jslint() {
- var name, value;
- while (next_token.id === '(string)' || next_token.identifier) {
- name = next_token.string;
- if (!allowed_option[name]) {
- stop('unexpected_a');
- }
- advance();
- if (next_token.id !== ':') {
- stop('expected_a_b', next_token, ':', artifact());
- }
- advance(':');
- if (typeof allowed_option[name] === 'number') {
- value = next_token.number;
- if (value > allowed_option[name] || value <= 0 ||
- Math.floor(value) !== value) {
- stop('expected_small_a');
- }
- option[name] = value;
- } else {
- if (next_token.id === 'true') {
- option[name] = true;
- } else if (next_token.id === 'false') {
- option[name] = false;
- } else {
- stop('unexpected_a');
- }
- }
- advance();
- if (next_token.id === ',') {
- advance(',');
- }
- }
- assume();
- }
-
-
- function do_properties() {
- var name;
- option.properties = true;
- for (;;) {
- if (next_token.id !== '(string)' && !next_token.identifier) {
- return;
- }
- name = next_token.string;
- advance();
- if (next_token.id === ':') {
- for (;;) {
- advance();
- if (next_token.id !== '(string)' && !next_token.identifier) {
- break;
- }
- }
- }
- property[name] = 0;
- if (next_token.id !== ',') {
- return;
- }
- advance(',');
- }
- }
-
-
- directive = function directive() {
- var command = this.id,
- old_comments_off = comments_off,
- old_indent = indent;
- comments_off = true;
- indent = null;
- if (next_token.line === token.line && next_token.from === token.thru) {
- warn('missing_space_a_b', next_token, artifact(token), artifact());
- }
- if (lookahead.length > 0) {
- warn('unexpected_a', this);
- }
- switch (command) {
- case '/*properties':
- case '/*property':
- case '/*members':
- case '/*member':
- do_properties();
- break;
- case '/*jslint':
- if (option.safe) {
- warn('adsafe_a', this);
- }
- do_jslint();
- break;
- case '/*globals':
- case '/*global':
- if (option.safe) {
- warn('adsafe_a', this);
- }
- do_globals();
- break;
- default:
- stop('unexpected_a', this);
- }
- comments_off = old_comments_off;
- advance('*/');
- indent = old_indent;
- };
-
-
-// Indentation intention
-
- function edge(mode) {
- next_token.edge = indent ? indent.open && (mode || 'edge') : '';
- }
-
-
- function step_in(mode) {
- var open;
- if (typeof mode === 'number') {
- indent = {
- at: +mode,
- open: true,
- was: indent
- };
- } else if (!indent) {
- indent = {
- at: 1,
- mode: 'statement',
- open: true
- };
- } else if (mode === 'statement') {
- indent = {
- at: indent.at,
- open: true,
- was: indent
- };
- } else {
- open = mode === 'var' || next_token.line !== token.line;
- indent = {
- at: (open || mode === 'control'
- ? indent.at + option.indent
- : indent.at) + (indent.wrap ? option.indent : 0),
- mode: mode,
- open: open,
- was: indent
- };
- if (mode === 'var' && open) {
- var_mode = indent;
- }
- }
- }
-
- function step_out(id, symbol) {
- if (id) {
- if (indent && indent.open) {
- indent.at -= option.indent;
- edge();
- }
- advance(id, symbol);
- }
- if (indent) {
- indent = indent.was;
- }
- }
-
-// Functions for conformance of whitespace.
-
- function one_space(left, right) {
- left = left || token;
- right = right || next_token;
- if (right.id !== '(end)' && !option.white &&
- (token.line !== right.line ||
- token.thru + 1 !== right.from)) {
- warn('expected_space_a_b', right, artifact(token), artifact(right));
- }
- }
-
- function one_space_only(left, right) {
- left = left || token;
- right = right || next_token;
- if (right.id !== '(end)' && (left.line !== right.line ||
- (!option.white && left.thru + 1 !== right.from))) {
- warn('expected_space_a_b', right, artifact(left), artifact(right));
- }
- }
-
- function no_space(left, right) {
- left = left || token;
- right = right || next_token;
- if ((!option.white || xmode === 'styleproperty' || xmode === 'style') &&
- left.thru !== right.from && left.line === right.line) {
- warn('unexpected_space_a_b', right, artifact(left), artifact(right));
- }
- }
-
- function no_space_only(left, right) {
- left = left || token;
- right = right || next_token;
- if (right.id !== '(end)' && (left.line !== right.line ||
- (!option.white && left.thru !== right.from))) {
- warn('unexpected_space_a_b', right, artifact(left), artifact(right));
- }
- }
-
- function spaces(left, right) {
- if (!option.white) {
- left = left || token;
- right = right || next_token;
- if (left.thru === right.from && left.line === right.line) {
- warn('missing_space_a_b', right, artifact(left), artifact(right));
- }
- }
- }
-
- function comma() {
- if (next_token.id !== ',') {
- warn_at('expected_a_b', token.line, token.thru, ',', artifact());
- } else {
- if (!option.white) {
- no_space_only();
- }
- advance(',');
- spaces();
- }
- }
-
-
- function semicolon() {
- if (next_token.id !== ';') {
- warn_at('expected_a_b', token.line, token.thru, ';', artifact());
- } else {
- if (!option.white) {
- no_space_only();
- }
- advance(';');
- if (semicolon_coda[next_token.id] !== true) {
- spaces();
- }
- }
- }
-
- function use_strict() {
- if (next_token.string === 'use strict') {
- if (strict_mode) {
- warn('unnecessary_use');
- }
- edge();
- advance();
- semicolon();
- strict_mode = true;
- option.undef = false;
- return true;
- }
- return false;
- }
-
-
- function are_similar(a, b) {
- if (a === b) {
- return true;
- }
- if (Array.isArray(a)) {
- if (Array.isArray(b) && a.length === b.length) {
- var i;
- for (i = 0; i < a.length; i += 1) {
- if (!are_similar(a[i], b[i])) {
- return false;
- }
- }
- return true;
- }
- return false;
- }
- if (Array.isArray(b)) {
- return false;
- }
- if (a.id === '(number)' && b.id === '(number)') {
- return a.number === b.number;
- }
- if (a.arity === b.arity && a.string === b.string) {
- switch (a.arity) {
- case 'prefix':
- case 'suffix':
- case undefined:
- return a.id === b.id && are_similar(a.first, b.first);
- case 'infix':
- return are_similar(a.first, b.first) &&
- are_similar(a.second, b.second);
- case 'ternary':
- return are_similar(a.first, b.first) &&
- are_similar(a.second, b.second) &&
- are_similar(a.third, b.third);
- case 'function':
- case 'regexp':
- return false;
- default:
- return true;
- }
- } else {
- if (a.id === '.' && b.id === '[' && b.arity === 'infix') {
- return a.second.string === b.second.string && b.second.id === '(string)';
- }
- if (a.id === '[' && a.arity === 'infix' && b.id === '.') {
- return a.second.string === b.second.string && a.second.id === '(string)';
- }
- }
- return false;
- }
-
-
-// This is the heart of JSLINT, the Pratt parser. In addition to parsing, it
-// is looking for ad hoc lint patterns. We add .fud to Pratt's model, which is
-// like .nud except that it is only used on the first token of a statement.
-// Having .fud makes it much easier to define statement-oriented languages like
-// JavaScript. I retained Pratt's nomenclature.
-
-// .nud Null denotation
-// .fud First null denotation
-// .led Left denotation
-// lbp Left binding power
-// rbp Right binding power
-
-// They are elements of the parsing method called Top Down Operator Precedence.
-
- function expression(rbp, initial) {
-
-// rbp is the right binding power.
-// initial indicates that this is the first expression of a statement.
-
- var left;
- if (next_token.id === '(end)') {
- stop('unexpected_a', token, next_token.id);
- }
- advance();
- if (option.safe && scope[token.string] &&
- scope[token.string] === global_scope[token.string] &&
- (next_token.id !== '(' && next_token.id !== '.')) {
- warn('adsafe_a', token);
- }
- if (initial) {
- anonname = 'anonymous';
- funct['(verb)'] = token.string;
- }
- if (initial === true && token.fud) {
- left = token.fud();
- } else {
- if (token.nud) {
- left = token.nud();
- } else {
- if (next_token.id === '(number)' && token.id === '.') {
- warn('leading_decimal_a', token, artifact());
- advance();
- return token;
- }
- stop('expected_identifier_a', token, token.id);
- }
- while (rbp < next_token.lbp) {
- advance();
- if (token.led) {
- left = token.led(left);
- } else {
- stop('expected_operator_a', token, token.id);
- }
- }
- }
- return left;
- }
-
-
-// Functional constructors for making the symbols that will be inherited by
-// tokens.
-
- function symbol(s, p) {
- var x = syntax[s];
- if (!x || typeof x !== 'object') {
- syntax[s] = x = {
- id: s,
- lbp: p || 0,
- string: s
- };
- }
- return x;
- }
-
- function postscript(x) {
- x.postscript = true;
- return x;
- }
-
- function ultimate(s) {
- var x = symbol(s, 0);
- x.from = 1;
- x.thru = 1;
- x.line = 0;
- x.edge = 'edge';
- s.string = s;
- return postscript(x);
- }
-
-
- function stmt(s, f) {
- var x = symbol(s);
- x.identifier = x.reserved = true;
- x.fud = f;
- return x;
- }
-
- function labeled_stmt(s, f) {
- var x = stmt(s, f);
- x.labeled = true;
- }
-
- function disrupt_stmt(s, f) {
- var x = stmt(s, f);
- x.disrupt = true;
- }
-
-
- function reserve_name(x) {
- var c = x.id.charAt(0);
- if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) {
- x.identifier = x.reserved = true;
- }
- return x;
- }
-
-
- function prefix(s, f) {
- var x = symbol(s, 150);
- reserve_name(x);
- x.nud = typeof f === 'function'
- ? f
- : function () {
- if (s === 'typeof') {
- one_space();
- } else {
- no_space_only();
- }
- this.first = expression(150);
- this.arity = 'prefix';
- if (this.id === '++' || this.id === '--') {
- if (!option.plusplus) {
- warn('unexpected_a', this);
- } else if ((!this.first.identifier || this.first.reserved) &&
- this.first.id !== '.' && this.first.id !== '[') {
- warn('bad_operand', this);
- }
- }
- return this;
- };
- return x;
- }
-
-
- function type(s, t, nud) {
- var x = symbol(s);
- x.arity = t;
- if (nud) {
- x.nud = nud;
- }
- return x;
- }
-
-
- function reserve(s, f) {
- var x = symbol(s);
- x.identifier = x.reserved = true;
- if (typeof f === 'function') {
- x.nud = f;
- }
- return x;
- }
-
-
- function constant(name) {
- var x = reserve(name);
- x.string = name;
- x.nud = return_this;
- return x;
- }
-
-
- function reservevar(s, v) {
- return reserve(s, function () {
- if (typeof v === 'function') {
- v(this);
- }
- return this;
- });
- }
-
-
- function infix(s, p, f, w) {
- var x = symbol(s, p);
- reserve_name(x);
- x.led = function (left) {
- this.arity = 'infix';
- if (!w) {
- spaces(prev_token, token);
- spaces();
- }
- if (!option.bitwise && this.bitwise) {
- warn('unexpected_a', this);
- }
- if (typeof f === 'function') {
- return f(left, this);
- }
- this.first = left;
- this.second = expression(p);
- return this;
- };
- return x;
- }
-
- function expected_relation(node, message) {
- if (node.assign) {
- warn(message || bundle.conditional_assignment, node);
- }
- return node;
- }
-
- function expected_condition(node, message) {
- switch (node.id) {
- case '[':
- case '-':
- if (node.arity !== 'infix') {
- warn(message || bundle.weird_condition, node);
- }
- break;
- case 'false':
- case 'function':
- case 'Infinity':
- case 'NaN':
- case 'null':
- case 'true':
- case 'undefined':
- case 'void':
- case '(number)':
- case '(regexp)':
- case '(string)':
- case '{':
- warn(message || bundle.weird_condition, node);
- break;
- case '(':
- if (node.first.id === '.' && numbery[node.first.second.string] === true) {
- warn(message || bundle.weird_condition, node);
- }
- break;
- }
- return node;
- }
-
- function check_relation(node) {
- switch (node.arity) {
- case 'prefix':
- switch (node.id) {
- case '{':
- case '[':
- warn('unexpected_a', node);
- break;
- case '!':
- warn('confusing_a', node);
- break;
- }
- break;
- case 'function':
- case 'regexp':
- warn('unexpected_a', node);
- break;
- default:
- if (node.id === 'NaN') {
- warn('isNaN', node);
- }
- }
- return node;
- }
-
-
- function relation(s, eqeq) {
- return infix(s, 100, function (left, that) {
- check_relation(left);
- if (eqeq && !option.eqeq) {
- warn('expected_a_b', that, eqeq, that.id);
- }
- var right = expression(100);
- if (are_similar(left, right) ||
- ((left.id === '(string)' || left.id === '(number)') &&
- (right.id === '(string)' || right.id === '(number)'))) {
- warn('weird_relation', that);
- }
- that.first = left;
- that.second = check_relation(right);
- return that;
- });
- }
-
-
- function assignop(s, op) {
- var x = infix(s, 20, function (left, that) {
- var l;
- that.first = left;
- if (left.identifier) {
- if (scope[left.string]) {
- if (scope[left.string].writeable === false) {
- warn('read_only', left);
- }
- } else {
- stop('read_only');
- }
- if (funct['(params)']) {
- funct['(params)'].forEach(function (value) {
- if (value.string === left.string) {
- value.assign = true;
- }
- });
- }
- } else if (option.safe) {
- l = left;
- do {
- if (typeof predefined[l.string] === 'boolean') {
- warn('adsafe_a', l);
- }
- l = l.first;
- } while (l);
- }
- if (left === syntax['function']) {
- warn('identifier_function', token);
- }
- if (left.id === '.' || left.id === '[') {
- if (!left.first || left.first.string === 'arguments') {
- warn('bad_assignment', that);
- }
- } else if (left.identifier) {
- if (!left.reserved && funct[left.string] === 'exception') {
- warn('assign_exception', left);
- }
- } else {
- warn('bad_assignment', that);
- }
- that.second = expression(19);
- if (that.id === '=' && are_similar(that.first, that.second)) {
- warn('weird_assignment', that);
- }
- return that;
- });
- x.assign = true;
- if (op) {
- if (syntax[op].bitwise) {
- x.bitwise = true;
- }
- }
- return x;
- }
-
-
- function bitwise(s, p) {
- var x = infix(s, p, 'number');
- x.bitwise = true;
- return x;
- }
-
-
- function suffix(s) {
- var x = symbol(s, 150);
- x.led = function (left) {
- no_space_only(prev_token, token);
- if (!option.plusplus) {
- warn('unexpected_a', this);
- } else if ((!left.identifier || left.reserved) &&
- left.id !== '.' && left.id !== '[') {
- warn('bad_operand', this);
- }
- this.first = left;
- this.arity = 'suffix';
- return this;
- };
- return x;
- }
-
-
- function optional_identifier() {
- if (next_token.identifier) {
- advance();
- if (option.safe && banned[token.string]) {
- warn('adsafe_a', token);
- } else if (token.reserved && !option.es5) {
- warn('expected_identifier_a_reserved', token);
- }
- return token.string;
- }
- }
-
-
- function identifier() {
- var i = optional_identifier();
- if (!i) {
- stop(token.id === 'function' && next_token.id === '('
- ? 'name_function'
- : 'expected_identifier_a');
- }
- return i;
- }
-
-
- function statement() {
-
- var label, old_scope = scope, the_statement;
-
-// We don't like the empty statement.
-
- if (next_token.id === ';') {
- warn('unexpected_a');
- semicolon();
- return;
- }
-
-// Is this a labeled statement?
-
- if (next_token.identifier && !next_token.reserved && peek().id === ':') {
- edge('label');
- label = next_token;
- advance();
- advance(':');
- scope = Object.create(old_scope);
- add_label(label, 'label');
- if (next_token.labeled !== true || funct === global_funct) {
- stop('unexpected_label_a', label);
- } else if (jx.test(label.string + ':')) {
- warn('url', label);
- }
- next_token.label = label;
- }
-
-// Parse the statement.
-
- if (token.id !== 'else') {
- edge();
- }
- step_in('statement');
- the_statement = expression(0, true);
- if (the_statement) {
-
-// Look for the final semicolon.
-
- if (the_statement.arity === 'statement') {
- if (the_statement.id === 'switch' ||
- (the_statement.block && the_statement.id !== 'do')) {
- spaces();
- } else {
- semicolon();
- }
- } else {
-
-// If this is an expression statement, determine if it is acceptable.
-// We do not like
-// new Blah();
-// statments. If it is to be used at all, new should only be used to make
-// objects, not side effects. The expression statements we do like do
-// assignment or invocation or delete.
-
- if (the_statement.id === '(') {
- if (the_statement.first.id === 'new') {
- warn('bad_new');
- }
- } else if (!the_statement.assign &&
- the_statement.id !== 'delete' &&
- the_statement.id !== '++' &&
- the_statement.id !== '--') {
- warn('assignment_function_expression', token);
- }
- semicolon();
- }
- }
- step_out();
- scope = old_scope;
- return the_statement;
- }
-
-
- function statements() {
- var array = [], disruptor, the_statement;
-
-// A disrupt statement may not be followed by any other statement.
-// If the last statement is disrupt, then the sequence is disrupt.
-
- while (next_token.postscript !== true) {
- if (next_token.id === ';') {
- warn('unexpected_a', next_token);
- semicolon();
- } else {
- if (next_token.string === 'use strict') {
- if ((!node_js && xmode !== 'script') || funct !== global_funct || array.length > 0) {
- warn('function_strict');
- }
- use_strict();
- }
- if (disruptor) {
- warn('unreachable_a_b', next_token, next_token.string,
- disruptor.string);
- disruptor = null;
- }
- the_statement = statement();
- if (the_statement) {
- array.push(the_statement);
- if (the_statement.disrupt) {
- disruptor = the_statement;
- array.disrupt = true;
- }
- }
- }
- }
- return array;
- }
-
-
- function block(ordinary) {
-
-// array block is array sequence of statements wrapped in braces.
-// ordinary is false for function bodies and try blocks.
-// ordinary is true for if statements, while, etc.
-
- var array,
- curly = next_token,
- old_in_block = in_block,
- old_scope = scope,
- old_strict_mode = strict_mode;
-
- in_block = ordinary;
- scope = Object.create(scope);
- spaces();
- if (next_token.id === '{') {
- advance('{');
- step_in();
- if (!ordinary && !use_strict() && !old_strict_mode &&
- !option.sloppy && funct['(context)'] === global_funct) {
- warn('missing_use_strict');
- }
- array = statements();
- strict_mode = old_strict_mode;
- step_out('}', curly);
- } else if (!ordinary) {
- stop('expected_a_b', next_token, '{', artifact());
- } else {
- warn('expected_a_b', next_token, '{', artifact());
- array = [statement()];
- array.disrupt = array[0].disrupt;
- }
- funct['(verb)'] = null;
- scope = old_scope;
- in_block = old_in_block;
- if (ordinary && array.length === 0) {
- warn('empty_block');
- }
- return array;
- }
-
-
- function tally_property(name) {
- if (option.properties && typeof property[name] !== 'number') {
- warn('unexpected_property_a', token, name);
- }
- if (typeof property[name] === 'number') {
- property[name] += 1;
- } else {
- property[name] = 1;
- }
- }
-
-
-// ECMAScript parser
-
- syntax['(identifier)'] = {
- id: '(identifier)',
- lbp: 0,
- identifier: true,
- nud: function () {
- var name = this.string,
- variable = scope[name],
- site,
- writeable;
-
-// If the variable is not in scope, then we may have an undeclared variable.
-// Check the predefined list. If it was predefined, create the global
-// variable.
-
- if (typeof variable !== 'object') {
- writeable = predefined[name];
- if (typeof writeable === 'boolean') {
- global_scope[name] = variable = {
- string: name,
- writeable: writeable,
- funct: global_funct
- };
- global_funct[name] = 'var';
-
-// But if the variable is not in scope, and is not predefined, and if we are not
-// in the global scope, then we have an undefined variable error.
-
- } else {
- if (!option.undef) {
- warn('used_before_a', token);
- }
- scope[name] = variable = {
- string: name,
- writeable: true,
- funct: funct
- };
- funct[name] = 'undef';
- }
-
- }
- site = variable.funct;
-
-// The name is in scope and defined in the current function.
-
- if (funct === site) {
-
-// Change 'unused' to 'var', and reject labels.
-
- switch (funct[name]) {
- case 'becoming':
- warn('unexpected_a', token);
- funct[name] = 'var';
- break;
- case 'unused':
- funct[name] = 'var';
- break;
- case 'unparam':
- funct[name] = 'parameter';
- break;
- case 'unction':
- funct[name] = 'function';
- break;
- case 'label':
- warn('a_label', token, name);
- break;
- }
-
-// If the name is already defined in the current
-// function, but not as outer, then there is a scope error.
-
- } else {
- switch (funct[name]) {
- case 'closure':
- case 'function':
- case 'var':
- case 'unused':
- warn('a_scope', token, name);
- break;
- case 'label':
- warn('a_label', token, name);
- break;
- case 'outer':
- case 'global':
- break;
- default:
-
-// If the name is defined in an outer function, make an outer entry, and if
-// it was unused, make it var.
-
- switch (site[name]) {
- case 'becoming':
- case 'closure':
- case 'function':
- case 'parameter':
- case 'unction':
- case 'unused':
- case 'var':
- site[name] = 'closure';
- funct[name] = site === global_funct
- ? 'global'
- : 'outer';
- break;
- case 'unparam':
- site[name] = 'parameter';
- funct[name] = 'outer';
- break;
- case 'undef':
- funct[name] = 'undef';
- break;
- case 'label':
- warn('a_label', token, name);
- break;
- }
- }
- }
- return this;
- },
- led: function () {
- stop('expected_operator_a');
- }
- };
-
-// Build the syntax table by declaring the syntactic elements.
-
- type('(array)', 'array');
- type('(color)', 'color');
- type('(function)', 'function');
- type('(number)', 'number', return_this);
- type('(object)', 'object');
- type('(string)', 'string', return_this);
- type('(boolean)', 'boolean', return_this);
- type('(range)', 'range');
- type('(regexp)', 'regexp', return_this);
-
- ultimate('(begin)');
- ultimate('(end)');
- ultimate('(error)');
- postscript(symbol('</'));
- symbol('<!');
- symbol('<!--');
- symbol('-->');
- postscript(symbol('}'));
- symbol(')');
- symbol(']');
- postscript(symbol('"'));
- postscript(symbol('\''));
- symbol(';');
- symbol(':');
- symbol(',');
- symbol('#');
- symbol('@');
- symbol('*/');
- postscript(reserve('case'));
- reserve('catch');
- postscript(reserve('default'));
- reserve('else');
- reserve('finally');
-
- reservevar('arguments', function (x) {
- if (strict_mode && funct === global_funct) {
- warn('strict', x);
- } else if (option.safe) {
- warn('adsafe_a', x);
- }
- funct['(arguments)'] = true;
- });
- reservevar('eval', function (x) {
- if (option.safe) {
- warn('adsafe_a', x);
- }
- });
- constant('false', 'boolean');
- constant('Infinity', 'number');
- constant('NaN', 'number');
- constant('null', '');
- reservevar('this', function (x) {
- if (option.safe) {
- warn('adsafe_a', x);
- } else if (strict_mode && funct['(token)'].arity === 'statement' &&
- funct['(name)'].charAt(0) > 'Z') {
- warn('strict', x);
- }
- });
- constant('true', 'boolean');
- constant('undefined', '');
-
- infix('?', 30, function (left, that) {
- step_in('?');
- that.first = expected_condition(expected_relation(left));
- that.second = expression(0);
- spaces();
- step_out();
- var colon = next_token;
- advance(':');
- step_in(':');
- spaces();
- that.third = expression(10);
- that.arity = 'ternary';
- if (are_similar(that.second, that.third)) {
- warn('weird_ternary', colon);
- } else if (are_similar(that.first, that.second)) {
- warn('use_or', that);
- }
- step_out();
- return that;
- });
-
- infix('||', 40, function (left, that) {
- function paren_check(that) {
- if (that.id === '&&' && !that.paren) {
- warn('and', that);
- }
- return that;
- }
-
- that.first = paren_check(expected_condition(expected_relation(left)));
- that.second = paren_check(expected_relation(expression(40)));
- if (are_similar(that.first, that.second)) {
- warn('weird_condition', that);
- }
- return that;
- });
-
- infix('&&', 50, function (left, that) {
- that.first = expected_condition(expected_relation(left));
- that.second = expected_relation(expression(50));
- if (are_similar(that.first, that.second)) {
- warn('weird_condition', that);
- }
- return that;
- });
-
- prefix('void', function () {
- this.first = expression(0);
- this.arity = 'prefix';
- if (option.es5) {
- warn('expected_a_b', this, 'undefined', 'void');
- } else if (this.first.number !== 0) {
- warn('expected_a_b', this.first, '0', artifact(this.first));
- }
- return this;
- });
-
- bitwise('|', 70);
- bitwise('^', 80);
- bitwise('&', 90);
-
- relation('==', '===');
- relation('===');
- relation('!=', '!==');
- relation('!==');
- relation('<');
- relation('>');
- relation('<=');
- relation('>=');
-
- bitwise('<<', 120);
- bitwise('>>', 120);
- bitwise('>>>', 120);
-
- infix('in', 120, function (left, that) {
- warn('infix_in', that);
- that.left = left;
- that.right = expression(130);
- return that;
- });
- infix('instanceof', 120);
- infix('+', 130, function (left, that) {
- if (left.id === '(number)') {
- if (left.number === 0) {
- warn('unexpected_a', left, '0');
- }
- } else if (left.id === '(string)') {
- if (left.string === '') {
- warn('expected_a_b', left, 'String', '\'\'');
- }
- }
- var right = expression(130);
- if (right.id === '(number)') {
- if (right.number === 0) {
- warn('unexpected_a', right, '0');
- }
- } else if (right.id === '(string)') {
- if (right.string === '') {
- warn('expected_a_b', right, 'String', '\'\'');
- }
- }
- if (left.id === right.id) {
- if (left.id === '(string)' || left.id === '(number)') {
- if (left.id === '(string)') {
- left.string += right.string;
- if (jx.test(left.string)) {
- warn('url', left);
- }
- } else {
- left.number += right.number;
- }
- left.thru = right.thru;
- return left;
- }
- }
- that.first = left;
- that.second = right;
- return that;
- });
- prefix('+', 'num');
- prefix('+++', function () {
- warn('confusing_a', token);
- this.first = expression(150);
- this.arity = 'prefix';
- return this;
- });
- infix('+++', 130, function (left) {
- warn('confusing_a', token);
- this.first = left;
- this.second = expression(130);
- return this;
- });
- infix('-', 130, function (left, that) {
- if ((left.id === '(number)' && left.number === 0) || left.id === '(string)') {
- warn('unexpected_a', left);
- }
- var right = expression(130);
- if ((right.id === '(number)' && right.number === 0) || right.id === '(string)') {
- warn('unexpected_a', right);
- }
- if (left.id === right.id && left.id === '(number)') {
- left.number -= right.number;
- left.thru = right.thru;
- return left;
- }
- that.first = left;
- that.second = right;
- return that;
- });
- prefix('-');
- prefix('---', function () {
- warn('confusing_a', token);
- this.first = expression(150);
- this.arity = 'prefix';
- return this;
- });
- infix('---', 130, function (left) {
- warn('confusing_a', token);
- this.first = left;
- this.second = expression(130);
- return this;
- });
- infix('*', 140, function (left, that) {
- if ((left.id === '(number)' && (left.number === 0 || left.number === 1)) || left.id === '(string)') {
- warn('unexpected_a', left);
- }
- var right = expression(140);
- if ((right.id === '(number)' && (right.number === 0 || right.number === 1)) || right.id === '(string)') {
- warn('unexpected_a', right);
- }
- if (left.id === right.id && left.id === '(number)') {
- left.number *= right.number;
- left.thru = right.thru;
- return left;
- }
- that.first = left;
- that.second = right;
- return that;
- });
- infix('/', 140, function (left, that) {
- if ((left.id === '(number)' && left.number === 0) || left.id === '(string)') {
- warn('unexpected_a', left);
- }
- var right = expression(140);
- if ((right.id === '(number)' && (right.number === 0 || right.number === 1)) || right.id === '(string)') {
- warn('unexpected_a', right);
- }
- if (left.id === right.id && left.id === '(number)') {
- left.number /= right.number;
- left.thru = right.thru;
- return left;
- }
- that.first = left;
- that.second = right;
- return that;
- });
- infix('%', 140, function (left, that) {
- if ((left.id === '(number)' && (left.number === 0 || left.number === 1)) || left.id === '(string)') {
- warn('unexpected_a', left);
- }
- var right = expression(140);
- if ((right.id === '(number)' && right.number === 0) || right.id === '(string)') {
- warn('unexpected_a', right);
- }
- if (left.id === right.id && left.id === '(number)') {
- left.number %= right.number;
- left.thru = right.thru;
- return left;
- }
- that.first = left;
- that.second = right;
- return that;
- });
-
- suffix('++');
- prefix('++');
-
- suffix('--');
- prefix('--');
- prefix('delete', function () {
- one_space();
- var p = expression(0);
- if (!p || (p.id !== '.' && p.id !== '[')) {
- warn('deleted');
- }
- this.first = p;
- return this;
- });
-
-
- prefix('~', function () {
- no_space_only();
- if (!option.bitwise) {
- warn('unexpected_a', this);
- }
- expression(150);
- return this;
- });
- prefix('!', function () {
- no_space_only();
- this.first = expected_condition(expression(150));
- this.arity = 'prefix';
- if (bang[this.first.id] === true || this.first.assign) {
- warn('confusing_a', this);
- }
- return this;
- });
- prefix('typeof', null);
- prefix('new', function () {
- one_space();
- var c = expression(160), n, p, v;
- this.first = c;
- if (c.id !== 'function') {
- if (c.identifier) {
- switch (c.string) {
- case 'Object':
- warn('use_object', token);
- break;
- case 'Array':
- if (next_token.id === '(') {
- p = next_token;
- p.first = this;
- advance('(');
- if (next_token.id !== ')') {
- n = expression(0);
- p.second = [n];
- if (n.id !== '(number)' || next_token.id === ',') {
- warn('use_array', p);
- }
- while (next_token.id === ',') {
- advance(',');
- p.second.push(expression(0));
- }
- } else {
- warn('use_array', token);
- }
- advance(')', p);
- return p;
- }
- warn('use_array', token);
- break;
- case 'Number':
- case 'String':
- case 'Boolean':
- case 'Math':
- case 'JSON':
- warn('not_a_constructor', c);
- break;
- case 'Function':
- if (!option.evil) {
- warn('function_eval');
- }
- break;
- case 'Date':
- case 'RegExp':
- case 'this':
- break;
- default:
- if (c.id !== 'function') {
- v = c.string.charAt(0);
- if (!option.newcap && (v < 'A' || v > 'Z')) {
- warn('constructor_name_a', token);
- }
- }
- }
- } else {
- if (c.id !== '.' && c.id !== '[' && c.id !== '(') {
- warn('bad_constructor', token);
- }
- }
- } else {
- warn('weird_new', this);
- }
- if (next_token.id !== '(') {
- warn('missing_a', next_token, '()');
- }
- return this;
- });
-
- infix('(', 160, function (left, that) {
- var p;
- if (indent && indent.mode === 'expression') {
- no_space(prev_token, token);
- } else {
- no_space_only(prev_token, token);
- }
- if (!left.immed && left.id === 'function') {
- warn('wrap_immediate');
- }
- p = [];
- if (left.identifier) {
- if (left.string.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)) {
- if (left.string !== 'Number' && left.string !== 'String' &&
- left.string !== 'Boolean' && left.string !== 'Date') {
- if (left.string === 'Math' || left.string === 'JSON') {
- warn('not_a_function', left);
- } else if (left.string === 'Object') {
- warn('use_object', token);
- } else if (left.string === 'Array' || !option.newcap) {
- warn('missing_a', left, 'new');
- }
- }
- }
- } else if (left.id === '.') {
- if (option.safe && left.first.string === 'Math' &&
- left.second === 'random') {
- warn('adsafe_a', left);
- } else if (left.second.string === 'split' &&
- left.first.id === '(string)') {
- warn('use_array', left.second);
- }
- }
- step_in();
- if (next_token.id !== ')') {
- no_space();
- for (;;) {
- edge();
- p.push(expression(10));
- if (next_token.id !== ',') {
- break;
- }
- comma();
- }
- }
- no_space();
- step_out(')', that);
- if (typeof left === 'object') {
- if (left.string === 'parseInt' && p.length === 1) {
- warn('radix', left);
- }
- if (!option.evil) {
- if (left.string === 'eval' || left.string === 'Function' ||
- left.string === 'execScript') {
- warn('evil', left);
- } else if (p[0] && p[0].id === '(string)' &&
- (left.string === 'setTimeout' ||
- left.string === 'setInterval')) {
- warn('implied_evil', left);
- }
- }
- if (!left.identifier && left.id !== '.' && left.id !== '[' &&
- left.id !== '(' && left.id !== '&&' && left.id !== '||' &&
- left.id !== '?') {
- warn('bad_invocation', left);
- }
- }
- that.first = left;
- that.second = p;
- return that;
- }, true);
-
- prefix('(', function () {
- step_in('expression');
- no_space();
- edge();
- if (next_token.id === 'function') {
- next_token.immed = true;
- }
- var value = expression(0);
- value.paren = true;
- no_space();
- step_out(')', this);
- if (value.id === 'function') {
- switch (next_token.id) {
- case '(':
- warn('move_invocation');
- break;
- case '.':
- case '[':
- warn('unexpected_a');
- break;
- default:
- warn('bad_wrap', this);
- }
- }
- return value;
- });
-
- infix('.', 170, function (left, that) {
- no_space(prev_token, token);
- no_space();
- var name = identifier();
- if (typeof name === 'string') {
- tally_property(name);
- }
- that.first = left;
- that.second = token;
- if (left && left.string === 'arguments' &&
- (name === 'callee' || name === 'caller')) {
- warn('avoid_a', left, 'arguments.' + name);
- } else if (!option.evil && left && left.string === 'document' &&
- (name === 'write' || name === 'writeln')) {
- warn('write_is_wrong', left);
- } else if (!option.stupid && name.indexOf('Sync') > 0) {
- warn('sync_a', token);
- } else if (option.adsafe) {
- if (!adsafe_top && left.string === 'ADSAFE') {
- if (name === 'id' || name === 'lib') {
- warn('adsafe_a', that);
- } else if (name === 'go') {
- if (xmode !== 'script') {
- warn('adsafe_a', that);
- } else if (adsafe_went || next_token.id !== '(' ||
- peek(0).id !== '(string)' ||
- peek(0).string !== adsafe_id ||
- peek(1).id !== ',') {
- stop('adsafe_a', that, 'go');
- }
- adsafe_went = true;
- adsafe_may = false;
- }
- }
- adsafe_top = false;
- }
- if (!option.evil && (name === 'eval' || name === 'execScript')) {
- warn('evil');
- } else if (option.safe) {
- for (;;) {
- if (banned[name] === true) {
- warn('adsafe_a', token, name);
- }
- if (typeof predefined[left.string] !== 'boolean' || //// check for writeable
- next_token.id === '(') {
- break;
- }
- if (next_token.id !== '.') {
- warn('adsafe_a', that);
- break;
- }
- advance('.');
- token.first = that;
- token.second = name;
- that = token;
- name = identifier();
- if (typeof name === 'string') {
- tally_property(name);
- }
- }
- }
- return that;
- }, true);
-
- infix('[', 170, function (left, that) {
- var e, s;
- no_space_only(prev_token, token);
- no_space();
- step_in();
- edge();
- e = expression(0);
- switch (e.id) {
- case '(number)':
- if (e.id === '(number)' && left.id === 'arguments') {
- warn('use_param', left);
- }
- break;
- case '(string)':
- if (option.safe && (banned[e.string] ||
- e.string.charAt(0) === '_' || e.string.slice(-1) === '_')) {
- warn('adsafe_subscript_a', e);
- } else if (!option.evil &&
- (e.string === 'eval' || e.string === 'execScript')) {
- warn('evil', e);
- } else if (!option.sub && ix.test(e.string)) {
- s = syntax[e.string];
- if (!s || !s.reserved) {
- warn('subscript', e);
- }
- }
- tally_property(e.string);
- break;
- default:
- if (option.safe) {
- warn('adsafe_subscript_a', e);
- }
- }
- step_out(']', that);
- no_space(prev_token, token);
- that.first = left;
- that.second = e;
- return that;
- }, true);
-
- prefix('[', function () {
- this.arity = 'prefix';
- this.first = [];
- step_in('array');
- while (next_token.id !== '(end)') {
- while (next_token.id === ',') {
- warn('unexpected_a', next_token);
- advance(',');
- }
- if (next_token.id === ']') {
- break;
- }
- indent.wrap = false;
- edge();
- this.first.push(expression(10));
- if (next_token.id === ',') {
- comma();
- if (next_token.id === ']' && !option.es5) {
- warn('unexpected_a', token);
- break;
- }
- } else {
- break;
- }
- }
- step_out(']', this);
- return this;
- }, 170);
-
-
- function property_name() {
- var id = optional_identifier(true);
- if (!id) {
- if (next_token.id === '(string)') {
- id = next_token.string;
- if (option.safe) {
- if (banned[id]) {
- warn('adsafe_a');
- } else if (id.charAt(0) === '_' ||
- id.charAt(id.length - 1) === '_') {
- warn('dangling_a');
- }
- }
- advance();
- } else if (next_token.id === '(number)') {
- id = next_token.number.toString();
- advance();
- }
- }
- return id;
- }
-
-
- function function_params() {
- var id, paren = next_token, params = [];
- advance('(');
- step_in();
- no_space();
- if (next_token.id === ')') {
- no_space();
- step_out(')', paren);
- return params;
- }
- for (;;) {
- edge();
- id = identifier();
- params.push(token);
- add_label(token, option.unparam ? 'parameter' : 'unparam');
- if (next_token.id === ',') {
- comma();
- } else {
- no_space();
- step_out(')', paren);
- return params;
- }
- }
- }
-
-
-
- function do_function(func, name) {
- var old_funct = funct,
- old_option = option,
- old_scope = scope;
- funct = {
- '(name)' : name || '\'' + (anonname || '').replace(nx, sanitize) + '\'',
- '(line)' : next_token.line,
- '(context)' : old_funct,
- '(breakage)' : 0,
- '(loopage)' : 0,
- '(scope)' : scope,
- '(token)' : func
- };
- option = Object.create(old_option);
- scope = Object.create(old_scope);
- functions.push(funct);
- func.name = name;
- if (name) {
- add_label(func, 'function', name);
- }
- func.writeable = false;
- func.first = funct['(params)'] = function_params();
- one_space();
- func.block = block(false);
- if (funct['(arguments)']) {
- func.first.forEach(function (value) {
- if (value.assign) {
- warn('parameter_arguments_a', value, value.string);
- }
- });
- }
- funct = old_funct;
- option = old_option;
- scope = old_scope;
- }
-
-
- assignop('=');
- assignop('+=', '+');
- assignop('-=', '-');
- assignop('*=', '*');
- assignop('/=', '/').nud = function () {
- stop('slash_equal');
- };
- assignop('%=', '%');
- assignop('&=', '&');
- assignop('|=', '|');
- assignop('^=', '^');
- assignop('<<=', '<<');
- assignop('>>=', '>>');
- assignop('>>>=', '>>>');
-
-
- prefix('{', function () {
- var get, i, j, name, p, set, seen = {};
- this.arity = 'prefix';
- this.first = [];
- step_in();
- while (next_token.id !== '}') {
- indent.wrap = false;
-
-// JSLint recognizes the ES5 extension for get/set in object literals,
-// but requires that they be used in pairs.
-
- edge();
- if (next_token.string === 'get' && peek().id !== ':') {
- if (!option.es5) {
- warn('es5');
- }
- get = next_token;
- advance('get');
- one_space_only();
- name = next_token;
- i = property_name();
- if (!i) {
- stop('missing_property');
- }
- get.string = '';
- do_function(get);
- if (funct['(loopage)']) {
- warn('function_loop', get);
- }
- p = get.first;
- if (p && p.length) {
- warn('parameter_a_get_b', p[0], p[0].string, i);
- }
- comma();
- set = next_token;
- spaces();
- edge();
- advance('set');
- set.string = '';
- one_space_only();
- j = property_name();
- if (i !== j) {
- stop('expected_a_b', token, i, j || next_token.string);
- }
- do_function(set);
- if (set.block.length === 0) {
- warn('missing_a', token, 'throw');
- }
- p = set.first;
- if (!p || p.length !== 1) {
- stop('parameter_set_a', set, 'value');
- } else if (p[0].string !== 'value') {
- stop('expected_a_b', p[0], 'value', p[0].string);
- }
- name.first = [get, set];
- } else {
- name = next_token;
- i = property_name();
- if (typeof i !== 'string') {
- stop('missing_property');
- }
- advance(':');
- spaces();
- name.first = expression(10);
- }
- this.first.push(name);
- if (seen[i] === true) {
- warn('duplicate_a', next_token, i);
- }
- seen[i] = true;
- tally_property(i);
- if (next_token.id !== ',') {
- break;
- }
- for (;;) {
- comma();
- if (next_token.id !== ',') {
- break;
- }
- warn('unexpected_a', next_token);
- }
- if (next_token.id === '}' && !option.es5) {
- warn('unexpected_a', token);
- }
- }
- step_out('}', this);
- return this;
- });
-
- stmt('{', function () {
- warn('statement_block');
- this.arity = 'statement';
- this.block = statements();
- this.disrupt = this.block.disrupt;
- advance('}', this);
- return this;
- });
-
- stmt('/*global', directive);
- stmt('/*globals', directive);
- stmt('/*jslint', directive);
- stmt('/*member', directive);
- stmt('/*members', directive);
- stmt('/*property', directive);
- stmt('/*properties', directive);
-
- stmt('var', function () {
-
-// JavaScript does not have block scope. It only has function scope. So,
-// declaring a variable in a block can have unexpected consequences.
-
-// var.first will contain an array, the array containing name tokens
-// and assignment tokens.
-
- var assign, id, name;
-
- if (funct['(vars)'] && !option.vars) {
- warn('combine_var');
- } else if (funct !== global_funct) {
- funct['(vars)'] = true;
- }
- this.arity = 'statement';
- this.first = [];
- step_in('var');
- for (;;) {
- name = next_token;
- id = identifier();
- add_label(name, 'becoming');
-
- if (next_token.id === '=') {
- assign = next_token;
- assign.first = name;
- spaces();
- advance('=');
- spaces();
- if (next_token.id === 'undefined') {
- warn('unnecessary_initialize', token, id);
- }
- if (peek(0).id === '=' && next_token.identifier) {
- stop('var_a_not');
- }
- assign.second = expression(0);
- assign.arity = 'infix';
- this.first.push(assign);
- } else {
- this.first.push(name);
- }
- if (funct[id] === 'becoming') {
- funct[id] = 'unused';
- }
- if (next_token.id !== ',') {
- break;
- }
- comma();
- indent.wrap = false;
- if (var_mode && next_token.line === token.line &&
- this.first.length === 1) {
- var_mode = null;
- indent.open = false;
- indent.at -= option.indent;
- }
- spaces();
- edge();
- }
- var_mode = null;
- step_out();
- return this;
- });
-
- stmt('function', function () {
- one_space();
- if (in_block) {
- warn('function_block', token);
- }
- var name = next_token, id = identifier();
- add_label(name, 'unction');
- no_space();
- this.arity = 'statement';
- do_function(this, id);
- if (next_token.id === '(' && next_token.line === token.line) {
- stop('function_statement');
- }
- return this;
- });
-
- prefix('function', function () {
- if (!option.anon) {
- one_space();
- }
- var id = optional_identifier();
- if (id) {
- no_space();
- } else {
- id = '';
- }
- do_function(this, id);
- if (funct['(loopage)']) {
- warn('function_loop');
- }
- switch (next_token.id) {
- case ';':
- case '(':
- case ')':
- case ',':
- case ']':
- case '}':
- case ':':
- break;
- case '.':
- if (peek().string !== 'bind' || peek(1).id !== '(') {
- warn('unexpected_a');
- }
- break;
- default:
- stop('unexpected_a');
- }
- this.arity = 'function';
- return this;
- });
-
- stmt('if', function () {
- var paren = next_token;
- one_space();
- advance('(');
- step_in('control');
- no_space();
- edge();
- this.arity = 'statement';
- this.first = expected_condition(expected_relation(expression(0)));
- no_space();
- step_out(')', paren);
- one_space();
- this.block = block(true);
- if (next_token.id === 'else') {
- one_space();
- advance('else');
- one_space();
- this['else'] = next_token.id === 'if' || next_token.id === 'switch'
- ? statement(true)
- : block(true);
- if (this['else'].disrupt && this.block.disrupt) {
- this.disrupt = true;
- }
- }
- return this;
- });
-
- stmt('try', function () {
-
-// try.first The catch variable
-// try.second The catch clause
-// try.third The finally clause
-// try.block The try block
-
- var exception_variable, old_scope, paren;
- if (option.adsafe) {
- warn('adsafe_a', this);
- }
- one_space();
- this.arity = 'statement';
- this.block = block(false);
- if (next_token.id === 'catch') {
- one_space();
- advance('catch');
- one_space();
- paren = next_token;
- advance('(');
- step_in('control');
- no_space();
- edge();
- old_scope = scope;
- scope = Object.create(old_scope);
- exception_variable = next_token.string;
- this.first = exception_variable;
- if (!next_token.identifier) {
- warn('expected_identifier_a', next_token);
- } else {
- add_label(next_token, 'exception');
- }
- advance();
- no_space();
- step_out(')', paren);
- one_space();
- this.second = block(false);
- scope = old_scope;
- }
- if (next_token.id === 'finally') {
- one_space();
- advance('finally');
- one_space();
- this.third = block(false);
- } else if (!this.second) {
- stop('expected_a_b', next_token, 'catch', artifact());
- }
- return this;
- });
-
- labeled_stmt('while', function () {
- one_space();
- var paren = next_token;
- funct['(breakage)'] += 1;
- funct['(loopage)'] += 1;
- advance('(');
- step_in('control');
- no_space();
- edge();
- this.arity = 'statement';
- this.first = expected_relation(expression(0));
- if (this.first.id !== 'true') {
- expected_condition(this.first, bundle.unexpected_a);
- }
- no_space();
- step_out(')', paren);
- one_space();
- this.block = block(true);
- if (this.block.disrupt) {
- warn('strange_loop', prev_token);
- }
- funct['(breakage)'] -= 1;
- funct['(loopage)'] -= 1;
- return this;
- });
-
- reserve('with');
-
- labeled_stmt('switch', function () {
-
-// switch.first the switch expression
-// switch.second the array of cases. A case is 'case' or 'default' token:
-// case.first the array of case expressions
-// case.second the array of statements
-// If all of the arrays of statements are disrupt, then the switch is disrupt.
-
- var cases = [],
- old_in_block = in_block,
- particular,
- the_case = next_token,
- unbroken = true;
-
- function find_duplicate_case(value) {
- if (are_similar(particular, value)) {
- warn('duplicate_a', value);
- }
- }
-
- funct['(breakage)'] += 1;
- one_space();
- advance('(');
- no_space();
- step_in();
- this.arity = 'statement';
- this.first = expected_condition(expected_relation(expression(0)));
- no_space();
- step_out(')', the_case);
- one_space();
- advance('{');
- step_in();
- in_block = true;
- this.second = [];
- while (next_token.id === 'case') {
- the_case = next_token;
- cases.forEach(find_duplicate_case);
- the_case.first = [];
- the_case.arity = 'case';
- spaces();
- edge('case');
- advance('case');
- for (;;) {
- one_space();
- particular = expression(0);
- cases.forEach(find_duplicate_case);
- cases.push(particular);
- the_case.first.push(particular);
- if (particular.id === 'NaN') {
- warn('unexpected_a', particular);
- }
- no_space_only();
- advance(':');
- if (next_token.id !== 'case') {
- break;
- }
- spaces();
- edge('case');
- advance('case');
- }
- spaces();
- the_case.second = statements();
- if (the_case.second && the_case.second.length > 0) {
- particular = the_case.second[the_case.second.length - 1];
- if (particular.disrupt) {
- if (particular.id === 'break') {
- unbroken = false;
- }
- } else {
- warn('missing_a_after_b', next_token, 'break', 'case');
- }
- } else {
- warn('empty_case');
- }
- this.second.push(the_case);
- }
- if (this.second.length === 0) {
- warn('missing_a', next_token, 'case');
- }
- if (next_token.id === 'default') {
- spaces();
- the_case = next_token;
- the_case.arity = 'case';
- edge('case');
- advance('default');
- no_space_only();
- advance(':');
- spaces();
- the_case.second = statements();
- if (the_case.second && the_case.second.length > 0) {
- particular = the_case.second[the_case.second.length - 1];
- if (unbroken && particular.disrupt && particular.id !== 'break') {
- this.disrupt = true;
- }
- }
- this.second.push(the_case);
- }
- funct['(breakage)'] -= 1;
- spaces();
- step_out('}', this);
- in_block = old_in_block;
- return this;
- });
-
- stmt('debugger', function () {
- if (!option.debug) {
- warn('unexpected_a', this);
- }
- this.arity = 'statement';
- return this;
- });
-
- labeled_stmt('do', function () {
- funct['(breakage)'] += 1;
- funct['(loopage)'] += 1;
- one_space();
- this.arity = 'statement';
- this.block = block(true);
- if (this.block.disrupt) {
- warn('strange_loop', prev_token);
- }
- one_space();
- advance('while');
- var paren = next_token;
- one_space();
- advance('(');
- step_in();
- no_space();
- edge();
- this.first = expected_condition(expected_relation(expression(0)), bundle.unexpected_a);
- no_space();
- step_out(')', paren);
- funct['(breakage)'] -= 1;
- funct['(loopage)'] -= 1;
- return this;
- });
-
- labeled_stmt('for', function () {
-
- var blok, filter, ok = false, paren = next_token, value;
- this.arity = 'statement';
- funct['(breakage)'] += 1;
- funct['(loopage)'] += 1;
- advance('(');
- if (next_token.id === ';') {
- no_space();
- advance(';');
- no_space();
- advance(';');
- no_space();
- advance(')');
- blok = block(true);
- } else {
- step_in('control');
- spaces(this, paren);
- no_space();
- if (next_token.id === 'var') {
- stop('move_var');
- }
- edge();
- if (peek(0).id === 'in') {
- this.forin = true;
- value = next_token;
- switch (funct[value.string]) {
- case 'unused':
- funct[value.string] = 'var';
- break;
- case 'closure':
- case 'var':
- break;
- default:
- warn('bad_in_a', value);
- }
- advance();
- advance('in');
- this.first = value;
- this.second = expression(20);
- step_out(')', paren);
- blok = block(true);
- if (!option.forin) {
- if (blok.length === 1 && typeof blok[0] === 'object' &&
- blok[0].string === 'if' && !blok[0]['else']) {
- filter = blok[0].first;
- while (filter.id === '&&') {
- filter = filter.first;
- }
- switch (filter.id) {
- case '===':
- case '!==':
- ok = filter.first.id === '['
- ? filter.first.first.string === this.second.string &&
- filter.first.second.string === this.first.string
- : filter.first.id === 'typeof' &&
- filter.first.first.id === '[' &&
- filter.first.first.first.string === this.second.string &&
- filter.first.first.second.string === this.first.string;
- break;
- case '(':
- ok = filter.first.id === '.' && ((
- filter.first.first.string === this.second.string &&
- filter.first.second.string === 'hasOwnProperty' &&
- filter.second[0].string === this.first.string
- ) || (
- filter.first.first.string === 'ADSAFE' &&
- filter.first.second.string === 'has' &&
- filter.second[0].string === this.second.string &&
- filter.second[1].string === this.first.string
- ) || (
- filter.first.first.id === '.' &&
- filter.first.first.first.id === '.' &&
- filter.first.first.first.first.string === 'Object' &&
- filter.first.first.first.second.string === 'prototype' &&
- filter.first.first.second.string === 'hasOwnProperty' &&
- filter.first.second.string === 'call' &&
- filter.second[0].string === this.second.string &&
- filter.second[1].string === this.first.string
- ));
- break;
- }
- }
- if (!ok) {
- warn('for_if', this);
- }
- }
- } else {
- edge();
- this.first = [];
- for (;;) {
- this.first.push(expression(0, 'for'));
- if (next_token.id !== ',') {
- break;
- }
- comma();
- }
- semicolon();
- edge();
- this.second = expected_relation(expression(0));
- if (this.second.id !== 'true') {
- expected_condition(this.second, bundle.unexpected_a);
- }
- semicolon(token);
- if (next_token.id === ';') {
- stop('expected_a_b', next_token, ')', ';');
- }
- this.third = [];
- edge();
- for (;;) {
- this.third.push(expression(0, 'for'));
- if (next_token.id !== ',') {
- break;
- }
- comma();
- }
- no_space();
- step_out(')', paren);
- one_space();
- blok = block(true);
- }
- }
- if (blok.disrupt) {
- warn('strange_loop', prev_token);
- }
- this.block = blok;
- funct['(breakage)'] -= 1;
- funct['(loopage)'] -= 1;
- return this;
- });
-
- disrupt_stmt('break', function () {
- var label = next_token.string;
- this.arity = 'statement';
- if (funct['(breakage)'] === 0) {
- warn('unexpected_a', this);
- }
- if (next_token.identifier && token.line === next_token.line) {
- one_space_only();
- if (funct[label] !== 'label') {
- warn('not_a_label', next_token);
- } else if (scope[label].funct !== funct) {
- warn('not_a_scope', next_token);
- }
- this.first = next_token;
- advance();
- }
- return this;
- });
-
- disrupt_stmt('continue', function () {
- if (!option['continue']) {
- warn('unexpected_a', this);
- }
- var label = next_token.string;
- this.arity = 'statement';
- if (funct['(breakage)'] === 0) {
- warn('unexpected_a', this);
- }
- if (next_token.identifier && token.line === next_token.line) {
- one_space_only();
- if (funct[label] !== 'label') {
- warn('not_a_label', next_token);
- } else if (scope[label].funct !== funct) {
- warn('not_a_scope', next_token);
- }
- this.first = next_token;
- advance();
- }
- return this;
- });
-
- disrupt_stmt('return', function () {
- if (funct === global_funct && xmode !== 'scriptstring') {
- warn('unexpected_a', this);
- }
- this.arity = 'statement';
- if (next_token.id !== ';' && next_token.line === token.line) {
- one_space_only();
- if (next_token.id === '/' || next_token.id === '(regexp)') {
- warn('wrap_regexp');
- }
- this.first = expression(20);
- }
- if (peek(0).id === '}' && peek(1).id === 'else') {
- warn('unexpected_else', this);
- }
- return this;
- });
-
- disrupt_stmt('throw', function () {
- this.arity = 'statement';
- one_space_only();
- this.first = expression(20);
- return this;
- });
-
-
-// Superfluous reserved words
-
- reserve('class');
- reserve('const');
- reserve('enum');
- reserve('export');
- reserve('extends');
- reserve('import');
- reserve('super');
-
-// Harmony reserved words
-
- reserve('implements');
- reserve('interface');
- reserve('let');
- reserve('package');
- reserve('private');
- reserve('protected');
- reserve('public');
- reserve('static');
- reserve('yield');
-
-
-// Parse JSON
-
- function json_value() {
-
- function json_object() {
- var brace = next_token, object = {};
- advance('{');
- if (next_token.id !== '}') {
- while (next_token.id !== '(end)') {
- while (next_token.id === ',') {
- warn('unexpected_a', next_token);
- advance(',');
- }
- if (next_token.id !== '(string)') {
- warn('expected_string_a');
- }
- if (object[next_token.string] === true) {
- warn('duplicate_a');
- } else if (next_token.string === '__proto__') {
- warn('dangling_a');
- } else {
- object[next_token.string] = true;
- }
- advance();
- advance(':');
- json_value();
- if (next_token.id !== ',') {
- break;
- }
- advance(',');
- if (next_token.id === '}') {
- warn('unexpected_a', token);
- break;
- }
- }
- }
- advance('}', brace);
- }
-
- function json_array() {
- var bracket = next_token;
- advance('[');
- if (next_token.id !== ']') {
- while (next_token.id !== '(end)') {
- while (next_token.id === ',') {
- warn('unexpected_a', next_token);
- advance(',');
- }
- json_value();
- if (next_token.id !== ',') {
- break;
- }
- advance(',');
- if (next_token.id === ']') {
- warn('unexpected_a', token);
- break;
- }
- }
- }
- advance(']', bracket);
- }
-
- switch (next_token.id) {
- case '{':
- json_object();
- break;
- case '[':
- json_array();
- break;
- case 'true':
- case 'false':
- case 'null':
- case '(number)':
- case '(string)':
- advance();
- break;
- case '-':
- advance('-');
- no_space_only();
- advance('(number)');
- break;
- default:
- stop('unexpected_a');
- }
- }
-
-
-// CSS parsing.
-
- function css_name() {
- if (next_token.identifier) {
- advance();
- return true;
- }
- }
-
-
- function css_number() {
- if (next_token.id === '-') {
- advance('-');
- no_space_only();
- }
- if (next_token.id === '(number)') {
- advance('(number)');
- return true;
- }
- }
-
-
- function css_string() {
- if (next_token.id === '(string)') {
- advance();
- return true;
- }
- }
-
- function css_color() {
- var i, number, paren, value;
- if (next_token.identifier) {
- value = next_token.string;
- if (value === 'rgb' || value === 'rgba') {
- advance();
- paren = next_token;
- advance('(');
- for (i = 0; i < 3; i += 1) {
- if (i) {
- comma();
- }
- number = next_token.number;
- if (next_token.id !== '(number)' || number < 0) {
- warn('expected_positive_a', next_token);
- advance();
- } else {
- advance();
- if (next_token.id === '%') {
- advance('%');
- if (number > 100) {
- warn('expected_percent_a', token, number);
- }
- } else {
- if (number > 255) {
- warn('expected_small_a', token, number);
- }
- }
- }
- }
- if (value === 'rgba') {
- comma();
- number = next_token.number;
- if (next_token.id !== '(number)' || number < 0 || number > 1) {
- warn('expected_fraction_a', next_token);
- }
- advance();
- if (next_token.id === '%') {
- warn('unexpected_a');
- advance('%');
- }
- }
- advance(')', paren);
- return true;
- }
- if (css_colorData[next_token.string] === true) {
- advance();
- return true;
- }
- } else if (next_token.id === '(color)') {
- advance();
- return true;
- }
- return false;
- }
-
-
- function css_length() {
- if (next_token.id === '-') {
- advance('-');
- no_space_only();
- }
- if (next_token.id === '(number)') {
- advance();
- if (next_token.id !== '(string)' &&
- css_lengthData[next_token.string] === true) {
- no_space_only();
- advance();
- } else if (+token.number !== 0) {
- warn('expected_linear_a');
- }
- return true;
- }
- return false;
- }
-
-
- function css_line_height() {
- if (next_token.id === '-') {
- advance('-');
- no_space_only();
- }
- if (next_token.id === '(number)') {
- advance();
- if (next_token.id !== '(string)' &&
- css_lengthData[next_token.string] === true) {
- no_space_only();
- advance();
- }
- return true;
- }
- return false;
- }
-
-
- function css_width() {
- if (next_token.identifier) {
- switch (next_token.string) {
- case 'thin':
- case 'medium':
- case 'thick':
- advance();
- return true;
- }
- } else {
- return css_length();
- }
- }
-
-
- function css_margin() {
- if (next_token.identifier) {
- if (next_token.string === 'auto') {
- advance();
- return true;
- }
- } else {
- return css_length();
- }
- }
-
- function css_attr() {
- if (next_token.identifier && next_token.string === 'attr') {
- advance();
- advance('(');
- if (!next_token.identifier) {
- warn('expected_name_a');
- }
- advance();
- advance(')');
- return true;
- }
- return false;
- }
-
-
- function css_comma_list() {
- while (next_token.id !== ';') {
- if (!css_name() && !css_string()) {
- warn('expected_name_a');
- }
- if (next_token.id !== ',') {
- return true;
- }
- comma();
- }
- }
-
-
- function css_counter() {
- if (next_token.identifier && next_token.string === 'counter') {
- advance();
- advance('(');
- advance();
- if (next_token.id === ',') {
- comma();
- if (next_token.id !== '(string)') {
- warn('expected_string_a');
- }
- advance();
- }
- advance(')');
- return true;
- }
- if (next_token.identifier && next_token.string === 'counters') {
- advance();
- advance('(');
- if (!next_token.identifier) {
- warn('expected_name_a');
- }
- advance();
- if (next_token.id === ',') {
- comma();
- if (next_token.id !== '(string)') {
- warn('expected_string_a');
- }
- advance();
- }
- if (next_token.id === ',') {
- comma();
- if (next_token.id !== '(string)') {
- warn('expected_string_a');
- }
- advance();
- }
- advance(')');
- return true;
- }
- return false;
- }
-
-
- function css_radius() {
- return css_length() && (next_token.id !== '(number)' || css_length());
- }
-
-
- function css_shape() {
- var i;
- if (next_token.identifier && next_token.string === 'rect') {
- advance();
- advance('(');
- for (i = 0; i < 4; i += 1) {
- if (!css_length()) {
- warn('expected_number_a');
- break;
- }
- }
- advance(')');
- return true;
- }
- return false;
- }
-
-
- function css_url() {
- var c, url;
- if (next_token.identifier && next_token.string === 'url') {
- next_token = lex.range('(', ')');
- url = next_token.string;
- c = url.charAt(0);
- if (c === '"' || c === '\'') {
- if (url.slice(-1) !== c) {
- warn('bad_url_a');
- } else {
- url = url.slice(1, -1);
- if (url.indexOf(c) >= 0) {
- warn('bad_url_a');
- }
- }
- }
- if (!url) {
- warn('missing_url');
- }
- if (ux.test(url)) {
- stop('bad_url_a');
- }
- urls.push(url);
- advance();
- return true;
- }
- return false;
- }
-
-
- css_any = [css_url, function () {
- for (;;) {
- if (next_token.identifier) {
- switch (next_token.string.toLowerCase()) {
- case 'url':
- css_url();
- break;
- case 'expression':
- warn('unexpected_a');
- advance();
- break;
- default:
- advance();
- }
- } else {
- if (next_token.id === ';' || next_token.id === '!' ||
- next_token.id === '(end)' || next_token.id === '}') {
- return true;
- }
- advance();
- }
- }
- }];
-
-
- function font_face() {
- advance_identifier('font-family');
- advance(':');
- if (!css_name() && !css_string()) {
- stop('expected_name_a');
- }
- semicolon();
- advance_identifier('src');
- advance(':');
- while (true) {
- if (next_token.string === 'local') {
- advance_identifier('local');
- advance('(');
- if (ux.test(next_token.string)) {
- stop('bad_url_a');
- }
-
- if (!css_name() && !css_string()) {
- stop('expected_name_a');
- }
- advance(')');
- } else if (!css_url()) {
- stop('expected_a_b', next_token, 'url', artifact());
- }
- if (next_token.id !== ',') {
- break;
- }
- comma();
- }
- semicolon();
- }
-
-
- css_border_style = [
- 'none', 'dashed', 'dotted', 'double', 'groove',
- 'hidden', 'inset', 'outset', 'ridge', 'solid'
- ];
-
- css_break = [
- 'auto', 'always', 'avoid', 'left', 'right'
- ];
-
- css_media = {
- 'all': true,
- 'braille': true,
- 'embossed': true,
- 'handheld': true,
- 'print': true,
- 'projection': true,
- 'screen': true,
- 'speech': true,
- 'tty': true,
- 'tv': true
- };
-
- css_overflow = [
- 'auto', 'hidden', 'scroll', 'visible'
- ];
-
- css_attribute_data = {
- background: [
- true, 'background-attachment', 'background-color',
- 'background-image', 'background-position', 'background-repeat'
- ],
- 'background-attachment': ['scroll', 'fixed'],
- 'background-color': ['transparent', css_color],
- 'background-image': ['none', css_url],
- 'background-position': [
- 2, [css_length, 'top', 'bottom', 'left', 'right', 'center']
- ],
- 'background-repeat': [
- 'repeat', 'repeat-x', 'repeat-y', 'no-repeat'
- ],
- 'border': [true, 'border-color', 'border-style', 'border-width'],
- 'border-bottom': [
- true, 'border-bottom-color', 'border-bottom-style',
- 'border-bottom-width'
- ],
- 'border-bottom-color': css_color,
- 'border-bottom-left-radius': css_radius,
- 'border-bottom-right-radius': css_radius,
- 'border-bottom-style': css_border_style,
- 'border-bottom-width': css_width,
- 'border-collapse': ['collapse', 'separate'],
- 'border-color': ['transparent', 4, css_color],
- 'border-left': [
- true, 'border-left-color', 'border-left-style', 'border-left-width'
- ],
- 'border-left-color': css_color,
- 'border-left-style': css_border_style,
- 'border-left-width': css_width,
- 'border-radius': function () {
- function count(separator) {
- var n = 1;
- if (separator) {
- advance(separator);
- }
- if (!css_length()) {
- return false;
- }
- while (next_token.id === '(number)') {
- if (!css_length()) {
- return false;
- }
- n += 1;
- }
- if (n > 4) {
- warn('bad_style');
- }
- return true;
- }
-
- return count() && (next_token.id !== '/' || count('/'));
- },
- 'border-right': [
- true, 'border-right-color', 'border-right-style',
- 'border-right-width'
- ],
- 'border-right-color': css_color,
- 'border-right-style': css_border_style,
- 'border-right-width': css_width,
- 'border-spacing': [2, css_length],
- 'border-style': [4, css_border_style],
- 'border-top': [
- true, 'border-top-color', 'border-top-style', 'border-top-width'
- ],
- 'border-top-color': css_color,
- 'border-top-left-radius': css_radius,
- 'border-top-right-radius': css_radius,
- 'border-top-style': css_border_style,
- 'border-top-width': css_width,
- 'border-width': [4, css_width],
- bottom: [css_length, 'auto'],
- 'caption-side' : ['bottom', 'left', 'right', 'top'],
- clear: ['both', 'left', 'none', 'right'],
- clip: [css_shape, 'auto'],
- color: css_color,
- content: [
- 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote',
- css_string, css_url, css_counter, css_attr
- ],
- 'counter-increment': [
- css_name, 'none'
- ],
- 'counter-reset': [
- css_name, 'none'
- ],
- cursor: [
- css_url, 'auto', 'crosshair', 'default', 'e-resize', 'help', 'move',
- 'n-resize', 'ne-resize', 'nw-resize', 'pointer', 's-resize',
- 'se-resize', 'sw-resize', 'w-resize', 'text', 'wait'
- ],
- direction: ['ltr', 'rtl'],
- display: [
- 'block', 'compact', 'inline', 'inline-block', 'inline-table',
- 'list-item', 'marker', 'none', 'run-in', 'table', 'table-caption',
- 'table-cell', 'table-column', 'table-column-group',
- 'table-footer-group', 'table-header-group', 'table-row',
- 'table-row-group'
- ],
- 'empty-cells': ['show', 'hide'],
- 'float': ['left', 'none', 'right'],
- font: [
- 'caption', 'icon', 'menu', 'message-box', 'small-caption',
- 'status-bar', true, 'font-size', 'font-style', 'font-weight',
- 'font-family'
- ],
- 'font-family': css_comma_list,
- 'font-size': [
- 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large',
- 'xx-large', 'larger', 'smaller', css_length
- ],
- 'font-size-adjust': ['none', css_number],
- 'font-stretch': [
- 'normal', 'wider', 'narrower', 'ultra-condensed',
- 'extra-condensed', 'condensed', 'semi-condensed',
- 'semi-expanded', 'expanded', 'extra-expanded'
- ],
- 'font-style': [
- 'normal', 'italic', 'oblique'
- ],
- 'font-variant': [
- 'normal', 'small-caps'
- ],
- 'font-weight': [
- 'normal', 'bold', 'bolder', 'lighter', css_number
- ],
- height: [css_length, 'auto'],
- left: [css_length, 'auto'],
- 'letter-spacing': ['normal', css_length],
- 'line-height': ['normal', css_line_height],
- 'list-style': [
- true, 'list-style-image', 'list-style-position', 'list-style-type'
- ],
- 'list-style-image': ['none', css_url],
- 'list-style-position': ['inside', 'outside'],
- 'list-style-type': [
- 'circle', 'disc', 'square', 'decimal', 'decimal-leading-zero',
- 'lower-roman', 'upper-roman', 'lower-greek', 'lower-alpha',
- 'lower-latin', 'upper-alpha', 'upper-latin', 'hebrew', 'katakana',
- 'hiragana-iroha', 'katakana-oroha', 'none'
- ],
- margin: [4, css_margin],
- 'margin-bottom': css_margin,
- 'margin-left': css_margin,
- 'margin-right': css_margin,
- 'margin-top': css_margin,
- 'marker-offset': [css_length, 'auto'],
- 'max-height': [css_length, 'none'],
- 'max-width': [css_length, 'none'],
- 'min-height': css_length,
- 'min-width': css_length,
- opacity: css_number,
- outline: [true, 'outline-color', 'outline-style', 'outline-width'],
- 'outline-color': ['invert', css_color],
- 'outline-style': [
- 'dashed', 'dotted', 'double', 'groove', 'inset', 'none',
- 'outset', 'ridge', 'solid'
- ],
- 'outline-width': css_width,
- overflow: css_overflow,
- 'overflow-x': css_overflow,
- 'overflow-y': css_overflow,
- padding: [4, css_length],
- 'padding-bottom': css_length,
- 'padding-left': css_length,
- 'padding-right': css_length,
- 'padding-top': css_length,
- 'page-break-after': css_break,
- 'page-break-before': css_break,
- position: ['absolute', 'fixed', 'relative', 'static'],
- quotes: [8, css_string],
- right: [css_length, 'auto'],
- 'table-layout': ['auto', 'fixed'],
- 'text-align': ['center', 'justify', 'left', 'right'],
- 'text-decoration': [
- 'none', 'underline', 'overline', 'line-through', 'blink'
- ],
- 'text-indent': css_length,
- 'text-shadow': ['none', 4, [css_color, css_length]],
- 'text-transform': ['capitalize', 'uppercase', 'lowercase', 'none'],
- top: [css_length, 'auto'],
- 'unicode-bidi': ['normal', 'embed', 'bidi-override'],
- 'vertical-align': [
- 'baseline', 'bottom', 'sub', 'super', 'top', 'text-top', 'middle',
- 'text-bottom', css_length
- ],
- visibility: ['visible', 'hidden', 'collapse'],
- 'white-space': [
- 'normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'inherit'
- ],
- width: [css_length, 'auto'],
- 'word-spacing': ['normal', css_length],
- 'word-wrap': ['break-word', 'normal'],
- 'z-index': ['auto', css_number]
- };
-
- function style_attribute() {
- var v;
- while (next_token.id === '*' || next_token.id === '#' ||
- next_token.string === '_') {
- if (!option.css) {
- warn('unexpected_a');
- }
- advance();
- }
- if (next_token.id === '-') {
- if (!option.css) {
- warn('unexpected_a');
- }
- advance('-');
- if (!next_token.identifier) {
- warn('expected_nonstandard_style_attribute');
- }
- advance();
- return css_any;
- }
- if (!next_token.identifier) {
- warn('expected_style_attribute');
- } else {
- if (Object.prototype.hasOwnProperty.call(css_attribute_data,
- next_token.string)) {
- v = css_attribute_data[next_token.string];
- } else {
- v = css_any;
- if (!option.css) {
- warn('unrecognized_style_attribute_a');
- }
- }
- }
- advance();
- return v;
- }
-
-
- function style_value(v) {
- var i = 0,
- n,
- once,
- match,
- round,
- start = 0,
- vi;
- switch (typeof v) {
- case 'function':
- return v();
- case 'string':
- if (next_token.identifier && next_token.string === v) {
- advance();
- return true;
- }
- return false;
- }
- for (;;) {
- if (i >= v.length) {
- return false;
- }
- vi = v[i];
- i += 1;
- if (typeof vi === 'boolean') {
- break;
- } else if (typeof vi === 'number') {
- n = vi;
- vi = v[i];
- i += 1;
- } else {
- n = 1;
- }
- match = false;
- while (n > 0) {
- if (style_value(vi)) {
- match = true;
- n -= 1;
- } else {
- break;
- }
- }
- if (match) {
- return true;
- }
- }
- start = i;
- once = [];
- for (;;) {
- round = false;
- for (i = start; i < v.length; i += 1) {
- if (!once[i]) {
- if (style_value(css_attribute_data[v[i]])) {
- match = true;
- round = true;
- once[i] = true;
- break;
- }
- }
- }
- if (!round) {
- return match;
- }
- }
- }
-
- function style_child() {
- if (next_token.id === '(number)') {
- advance();
- if (next_token.string === 'n' && next_token.identifier) {
- no_space_only();
- advance();
- if (next_token.id === '+') {
- no_space_only();
- advance('+');
- no_space_only();
- advance('(number)');
- }
- }
- return;
- }
- if (next_token.identifier &&
- (next_token.string === 'odd' || next_token.string === 'even')) {
- advance();
- return;
- }
- warn('unexpected_a');
- }
-
- function substyle() {
- var v;
- for (;;) {
- if (next_token.id === '}' || next_token.id === '(end)' ||
- (xquote && next_token.id === xquote)) {
- return;
- }
- v = style_attribute();
- advance(':');
- if (next_token.identifier && next_token.string === 'inherit') {
- advance();
- } else {
- if (!style_value(v)) {
- warn('unexpected_a');
- advance();
- }
- }
- if (next_token.id === '!') {
- advance('!');
- no_space_only();
- if (next_token.identifier && next_token.string === 'important') {
- advance();
- } else {
- warn('expected_a_b',
- next_token, 'important', artifact());
- }
- }
- if (next_token.id === '}' || next_token.id === xquote) {
- warn('expected_a_b', next_token, ';', artifact());
- } else {
- semicolon();
- }
- }
- }
-
- function style_selector() {
- if (next_token.identifier) {
- if (!Object.prototype.hasOwnProperty.call(html_tag, option.cap
- ? next_token.string.toLowerCase()
- : next_token.string)) {
- warn('expected_tagname_a');
- }
- advance();
- } else {
- switch (next_token.id) {
- case '>':
- case '+':
- advance();
- style_selector();
- break;
- case ':':
- advance(':');
- switch (next_token.string) {
- case 'active':
- case 'after':
- case 'before':
- case 'checked':
- case 'disabled':
- case 'empty':
- case 'enabled':
- case 'first-child':
- case 'first-letter':
- case 'first-line':
- case 'first-of-type':
- case 'focus':
- case 'hover':
- case 'last-child':
- case 'last-of-type':
- case 'link':
- case 'only-of-type':
- case 'root':
- case 'target':
- case 'visited':
- advance_identifier(next_token.string);
- break;
- case 'lang':
- advance_identifier('lang');
- advance('(');
- if (!next_token.identifier) {
- warn('expected_lang_a');
- }
- advance(')');
- break;
- case 'nth-child':
- case 'nth-last-child':
- case 'nth-last-of-type':
- case 'nth-of-type':
- advance_identifier(next_token.string);
- advance('(');
- style_child();
- advance(')');
- break;
- case 'not':
- advance_identifier('not');
- advance('(');
- if (next_token.id === ':' && peek(0).string === 'not') {
- warn('not');
- }
- style_selector();
- advance(')');
- break;
- default:
- warn('expected_pseudo_a');
- }
- break;
- case '#':
- advance('#');
- if (!next_token.identifier) {
- warn('expected_id_a');
- }
- advance();
- break;
- case '*':
- advance('*');
- break;
- case '.':
- advance('.');
- if (!next_token.identifier) {
- warn('expected_class_a');
- }
- advance();
- break;
- case '[':
- advance('[');
- if (!next_token.identifier) {
- warn('expected_attribute_a');
- }
- advance();
- if (next_token.id === '=' || next_token.string === '~=' ||
- next_token.string === '$=' ||
- next_token.string === '|=' ||
- next_token.id === '*=' ||
- next_token.id === '^=') {
- advance();
- if (next_token.id !== '(string)') {
- warn('expected_string_a');
- }
- advance();
- }
- advance(']');
- break;
- default:
- stop('expected_selector_a');
- }
- }
- }
-
- function style_pattern() {
- if (next_token.id === '{') {
- warn('expected_style_pattern');
- }
- for (;;) {
- style_selector();
- if (next_token.id === '</' || next_token.id === '{' ||
- next_token.id === '}' || next_token.id === '(end)') {
- return '';
- }
- if (next_token.id === ',') {
- comma();
- }
- }
- }
-
- function style_list() {
- while (next_token.id !== '}' && next_token.id !== '</' &&
- next_token.id !== '(end)') {
- style_pattern();
- xmode = 'styleproperty';
- if (next_token.id === ';') {
- semicolon();
- } else {
- advance('{');
- substyle();
- xmode = 'style';
- advance('}');
- }
- }
- }
-
- function styles() {
- var i;
- while (next_token.id === '@') {
- i = peek();
- advance('@');
- switch (next_token.string) {
- case 'import':
- advance_identifier('import');
- if (!css_url()) {
- warn('expected_a_b',
- next_token, 'url', artifact());
- advance();
- }
- semicolon();
- break;
- case 'media':
- advance_identifier('media');
- for (;;) {
- if (!next_token.identifier || css_media[next_token.string] !== true) {
- stop('expected_media_a');
- }
- advance();
- if (next_token.id !== ',') {
- break;
- }
- comma();
- }
- advance('{');
- style_list();
- advance('}');
- break;
- case 'font-face':
- advance_identifier('font-face');
- advance('{');
- font_face();
- advance('}');
- break;
- default:
- stop('expected_at_a');
- }
- }
- style_list();
- }
-
-
-// Parse HTML
-
- function do_begin(n) {
- if (n !== 'html' && !option.fragment) {
- if (n === 'div' && option.adsafe) {
- stop('adsafe_fragment');
- } else {
- stop('expected_a_b', token, 'html', n);
- }
- }
- if (option.adsafe) {
- if (n === 'html') {
- stop('adsafe_html', token);
- }
- if (option.fragment) {
- if (n !== 'div') {
- stop('adsafe_div', token);
- }
- } else {
- stop('adsafe_fragment', token);
- }
- }
- option.browser = true;
- }
-
- function do_attribute(a, v) {
- var u, x;
- if (a === 'id') {
- u = typeof v === 'string' ? v.toUpperCase() : '';
- if (ids[u] === true) {
- warn('duplicate_a', next_token, v);
- }
- if (!/^[A-Za-z][A-Za-z0-9._:\-]*$/.test(v)) {
- warn('bad_id_a', next_token, v);
- } else if (option.adsafe) {
- if (adsafe_id) {
- if (v.slice(0, adsafe_id.length) !== adsafe_id) {
- warn('adsafe_prefix_a', next_token, adsafe_id);
- } else if (!/^[A-Z]+_[A-Z]+$/.test(v)) {
- warn('adsafe_bad_id');
- }
- } else {
- adsafe_id = v;
- if (!/^[A-Z]+_$/.test(v)) {
- warn('adsafe_bad_id');
- }
- }
- }
- x = v.search(dx);
- if (x >= 0) {
- warn('unexpected_char_a_b', token, v.charAt(x), a);
- }
- ids[u] = true;
- } else if (a === 'class' || a === 'type' || a === 'name') {
- x = v.search(qx);
- if (x >= 0) {
- warn('unexpected_char_a_b', token, v.charAt(x), a);
- }
- ids[u] = true;
- } else if (a === 'href' || a === 'background' ||
- a === 'content' || a === 'data' ||
- a.indexOf('src') >= 0 || a.indexOf('url') >= 0) {
- if (option.safe && ux.test(v)) {
- stop('bad_url_a', next_token, v);
- }
- urls.push(v);
- } else if (a === 'for') {
- if (option.adsafe) {
- if (adsafe_id) {
- if (v.slice(0, adsafe_id.length) !== adsafe_id) {
- warn('adsafe_prefix_a', next_token, adsafe_id);
- } else if (!/^[A-Z]+_[A-Z]+$/.test(v)) {
- warn('adsafe_bad_id');
- }
- } else {
- warn('adsafe_bad_id');
- }
- }
- } else if (a === 'name') {
- if (option.adsafe && v.indexOf('_') >= 0) {
- warn('adsafe_name_a', next_token, v);
- }
- }
- }
-
- function do_tag(name, attribute) {
- var i, tag = html_tag[name], script, x;
- src = false;
- if (!tag) {
- stop(
- bundle.unrecognized_tag_a,
- next_token,
- name === name.toLowerCase()
- ? name
- : name + ' (capitalization error)'
- );
- }
- if (stack.length > 0) {
- if (name === 'html') {
- stop('unexpected_a', token, name);
- }
- x = tag.parent;
- if (x) {
- if (x.indexOf(' ' + stack[stack.length - 1].name + ' ') < 0) {
- stop('tag_a_in_b', token, name, x);
- }
- } else if (!option.adsafe && !option.fragment) {
- i = stack.length;
- do {
- if (i <= 0) {
- stop('tag_a_in_b', token, name, 'body');
- }
- i -= 1;
- } while (stack[i].name !== 'body');
- }
- }
- switch (name) {
- case 'div':
- if (option.adsafe && stack.length === 1 && !adsafe_id) {
- warn('adsafe_missing_id');
- }
- break;
- case 'script':
- xmode = 'script';
- advance('>');
- if (attribute.lang) {
- warn('lang', token);
- }
- if (option.adsafe && stack.length !== 1) {
- warn('adsafe_placement', token);
- }
- if (attribute.src) {
- if (option.adsafe && (!adsafe_may || !approved[attribute.src])) {
- warn('adsafe_source', token);
- }
- } else {
- step_in(next_token.from);
- edge();
- use_strict();
- adsafe_top = true;
- script = statements();
-
-// JSLint is also the static analyzer for ADsafe. See www.ADsafe.org.
-
- if (option.adsafe) {
- if (adsafe_went) {
- stop('adsafe_script', token);
- }
- if (script.length !== 1 ||
- aint(script[0], 'id', '(') ||
- aint(script[0].first, 'id', '.') ||
- aint(script[0].first.first, 'string', 'ADSAFE') ||
- aint(script[0].second[0], 'string', adsafe_id)) {
- stop('adsafe_id_go');
- }
- switch (script[0].first.second.string) {
- case 'id':
- if (adsafe_may || adsafe_went ||
- script[0].second.length !== 1) {
- stop('adsafe_id', next_token);
- }
- adsafe_may = true;
- break;
- case 'go':
- if (adsafe_went) {
- stop('adsafe_go');
- }
- if (script[0].second.length !== 2 ||
- aint(script[0].second[1], 'id', 'function') ||
- !script[0].second[1].first ||
- aint(script[0].second[1].first[0], 'string', 'dom') ||
- script[0].second[1].first.length > 2 ||
- (script[0].second[1].first.length === 2 &&
- aint(script[0].second[1].first[1], 'string', 'lib'))) {
- stop('adsafe_go', next_token);
- }
- adsafe_went = true;
- break;
- default:
- stop('adsafe_id_go');
- }
- }
- indent = null;
- }
- xmode = 'html';
- advance('</');
- advance_identifier('script');
- xmode = 'outer';
- break;
- case 'style':
- xmode = 'style';
- advance('>');
- styles();
- xmode = 'html';
- advance('</');
- advance_identifier('style');
- break;
- case 'input':
- switch (attribute.type) {
- case 'button':
- case 'checkbox':
- case 'radio':
- case 'reset':
- case 'submit':
- break;
- case 'file':
- case 'hidden':
- case 'image':
- case 'password':
- case 'text':
- if (option.adsafe && attribute.autocomplete !== 'off') {
- warn('adsafe_autocomplete');
- }
- break;
- default:
- warn('bad_type');
- }
- break;
- case 'applet':
- case 'body':
- case 'embed':
- case 'frame':
- case 'frameset':
- case 'head':
- case 'iframe':
- case 'noembed':
- case 'noframes':
- case 'object':
- case 'param':
- if (option.adsafe) {
- warn('adsafe_tag', next_token, name);
- }
- break;
- }
- }
-
-
- function closetag(name) {
- return '</' + name + '>';
- }
-
- function html() {
- var attribute, attributes, is_empty, name, old_white = option.white,
- quote, tag_name, tag, wmode;
- xmode = 'html';
- xquote = '';
- stack = null;
- for (;;) {
- switch (next_token.string) {
- case '<':
- xmode = 'html';
- advance('<');
- attributes = {};
- tag_name = next_token;
- name = tag_name.string;
- advance_identifier(name);
- if (option.cap) {
- name = name.toLowerCase();
- }
- tag_name.name = name;
- if (!stack) {
- stack = [];
- do_begin(name);
- }
- tag = html_tag[name];
- if (typeof tag !== 'object') {
- stop('unrecognized_tag_a', tag_name, name);
- }
- is_empty = tag.empty;
- tag_name.type = name;
- for (;;) {
- if (next_token.id === '/') {
- advance('/');
- if (next_token.id !== '>') {
- warn('expected_a_b', next_token, '>', artifact());
- }
- break;
- }
- if (next_token.id && next_token.id.charAt(0) === '>') {
- break;
- }
- if (!next_token.identifier) {
- if (next_token.id === '(end)' || next_token.id === '(error)') {
- warn('expected_a_b', next_token, '>', artifact());
- }
- warn('bad_name_a');
- }
- option.white = false;
- spaces();
- attribute = next_token.string;
- option.white = old_white;
- advance();
- if (!option.cap && attribute !== attribute.toLowerCase()) {
- warn('attribute_case_a', token);
- }
- attribute = attribute.toLowerCase();
- xquote = '';
- if (Object.prototype.hasOwnProperty.call(attributes, attribute)) {
- warn('duplicate_a', token, attribute);
- }
- if (attribute.slice(0, 2) === 'on') {
- if (!option.on) {
- warn('html_handlers');
- }
- xmode = 'scriptstring';
- advance('=');
- quote = next_token.id;
- if (quote !== '"' && quote !== '\'') {
- stop('expected_a_b', next_token, '"', artifact());
- }
- xquote = quote;
- wmode = option.white;
- option.white = true;
- advance(quote);
- use_strict();
- statements();
- option.white = wmode;
- if (next_token.id !== quote) {
- stop('expected_a_b', next_token, quote, artifact());
- }
- xmode = 'html';
- xquote = '';
- advance(quote);
- tag = false;
- } else if (attribute === 'style') {
- xmode = 'scriptstring';
- advance('=');
- quote = next_token.id;
- if (quote !== '"' && quote !== '\'') {
- stop('expected_a_b', next_token, '"', artifact());
- }
- xmode = 'styleproperty';
- xquote = quote;
- advance(quote);
- substyle();
- xmode = 'html';
- xquote = '';
- advance(quote);
- tag = false;
- } else {
- if (next_token.id === '=') {
- advance('=');
- tag = next_token.string;
- if (!next_token.identifier &&
- next_token.id !== '"' &&
- next_token.id !== '\'' &&
- next_token.id !== '(string)' &&
- next_token.id !== '(string)' &&
- next_token.id !== '(color)') {
- warn('expected_attribute_value_a', token, attribute);
- }
- advance();
- } else {
- tag = true;
- }
- }
- attributes[attribute] = tag;
- do_attribute(attribute, tag);
- }
- do_tag(name, attributes);
- if (!is_empty) {
- stack.push(tag_name);
- }
- xmode = 'outer';
- advance('>');
- break;
- case '</':
- xmode = 'html';
- advance('</');
- if (!next_token.identifier) {
- warn('bad_name_a');
- }
- name = next_token.string;
- if (option.cap) {
- name = name.toLowerCase();
- }
- advance();
- if (!stack) {
- stop('unexpected_a', next_token, closetag(name));
- }
- tag_name = stack.pop();
- if (!tag_name) {
- stop('unexpected_a', next_token, closetag(name));
- }
- if (tag_name.name !== name) {
- stop('expected_a_b',
- next_token, closetag(tag_name.name), closetag(name));
- }
- if (next_token.id !== '>') {
- stop('expected_a_b', next_token, '>', artifact());
- }
- xmode = 'outer';
- advance('>');
- break;
- case '<!':
- if (option.safe) {
- warn('adsafe_a');
- }
- xmode = 'html';
- for (;;) {
- advance();
- if (next_token.id === '>' || next_token.id === '(end)') {
- break;
- }
- if (next_token.string.indexOf('--') >= 0) {
- stop('unexpected_a', next_token, '--');
- }
- if (next_token.string.indexOf('<') >= 0) {
- stop('unexpected_a', next_token, '<');
- }
- if (next_token.string.indexOf('>') >= 0) {
- stop('unexpected_a', next_token, '>');
- }
- }
- xmode = 'outer';
- advance('>');
- break;
- case '(end)':
- if (stack.length !== 0) {
- warn('missing_a', next_token, '</' + stack.pop().string + '>');
- }
- return;
- default:
- if (next_token.id === '(end)') {
- stop('missing_a', next_token,
- '</' + stack[stack.length - 1].string + '>');
- } else {
- advance();
- }
- }
- if (stack && stack.length === 0 && (option.adsafe ||
- !option.fragment || next_token.id === '(end)')) {
- break;
- }
- }
- if (next_token.id !== '(end)') {
- stop('unexpected_a');
- }
- }
-
-
-// The actual JSLINT function itself.
-
- itself = function JSLint(the_source, the_option) {
-
- var i, predef, tree;
- JSLINT.errors = [];
- JSLINT.tree = '';
- begin = prev_token = token = next_token =
- Object.create(syntax['(begin)']);
- predefined = {};
- add_to_predefined(standard);
- property = {};
- if (the_option) {
- option = Object.create(the_option);
- predef = option.predef;
- if (predef) {
- if (Array.isArray(predef)) {
- for (i = 0; i < predef.length; i += 1) {
- predefined[predef[i]] = true;
- }
- } else if (typeof predef === 'object') {
- add_to_predefined(predef);
- }
- }
- do_safe();
- } else {
- option = {};
- }
- option.indent = +option.indent || 4;
- option.maxerr = +option.maxerr || 50;
- adsafe_id = '';
- adsafe_may = adsafe_top = adsafe_went = false;
- approved = {};
- if (option.approved) {
- for (i = 0; i < option.approved.length; i += 1) {
- approved[option.approved[i]] = option.approved[i];
- }
- } else {
- approved.test = 'test';
- }
- tab = '';
- for (i = 0; i < option.indent; i += 1) {
- tab += ' ';
- }
- global_scope = scope = {};
- global_funct = funct = {
- '(scope)': scope,
- '(breakage)': 0,
- '(loopage)': 0
- };
- functions = [funct];
-
- comments_off = false;
- ids = {};
- in_block = false;
- indent = null;
- json_mode = false;
- lookahead = [];
- node_js = false;
- prereg = true;
- src = false;
- stack = null;
- strict_mode = false;
- urls = [];
- var_mode = null;
- warnings = 0;
- xmode = '';
- lex.init(the_source);
-
- assume();
-
- try {
- advance();
- if (next_token.id === '(number)') {
- stop('unexpected_a');
- } else if (next_token.string.charAt(0) === '<') {
- html();
- if (option.adsafe && !adsafe_went) {
- warn('adsafe_go', this);
- }
- } else {
- switch (next_token.id) {
- case '{':
- case '[':
- json_mode = true;
- json_value();
- break;
- case '@':
- case '*':
- case '#':
- case '.':
- case ':':
- xmode = 'style';
- advance();
- if (token.id !== '@' || !next_token.identifier ||
- next_token.string !== 'charset' || token.line !== 1 ||
- token.from !== 1) {
- stop('css');
- }
- advance();
- if (next_token.id !== '(string)' &&
- next_token.string !== 'UTF-8') {
- stop('css');
- }
- advance();
- semicolon();
- styles();
- break;
-
- default:
- if (option.adsafe && option.fragment) {
- stop('expected_a_b',
- next_token, '<div>', artifact());
- }
-
-// If the first token is a semicolon, ignore it. This is sometimes used when
-// files are intended to be appended to files that may be sloppy. A sloppy
-// file may be depending on semicolon insertion on its last line.
-
- step_in(1);
- if (next_token.id === ';' && !node_js) {
- semicolon();
- }
- adsafe_top = true;
- tree = statements();
- begin.first = tree;
- JSLINT.tree = begin;
- // infer_types(tree);
- if (option.adsafe && (tree.length !== 1 ||
- aint(tree[0], 'id', '(') ||
- aint(tree[0].first, 'id', '.') ||
- aint(tree[0].first.first, 'string', 'ADSAFE') ||
- aint(tree[0].first.second, 'string', 'lib') ||
- tree[0].second.length !== 2 ||
- tree[0].second[0].id !== '(string)' ||
- aint(tree[0].second[1], 'id', 'function'))) {
- stop('adsafe_lib');
- }
- if (tree.disrupt) {
- warn('weird_program', prev_token);
- }
- }
- }
- indent = null;
- advance('(end)');
- } catch (e) {
- if (e) { // ~~
- JSLINT.errors.push({
- reason : e.message,
- line : e.line || next_token.line,
- character : e.character || next_token.from
- }, null);
- }
- }
- return JSLINT.errors.length === 0;
- };
-
-
-// Data summary.
-
- itself.data = function () {
- var data = {functions: []},
- function_data,
- globals,
- i,
- j,
- kind,
- members = [],
- name,
- the_function,
- undef = [],
- unused = [];
- if (itself.errors.length) {
- data.errors = itself.errors;
- }
-
- if (json_mode) {
- data.json = true;
- }
-
- if (urls.length > 0) {
- data.urls = urls;
- }
-
- globals = Object.keys(global_scope).filter(function (value) {
- return value.charAt(0) !== '(' && typeof standard[value] !== 'boolean';
- });
- if (globals.length > 0) {
- data.globals = globals;
- }
-
- for (i = 1; i < functions.length; i += 1) {
- the_function = functions[i];
- function_data = {};
- for (j = 0; j < functionicity.length; j += 1) {
- function_data[functionicity[j]] = [];
- }
- for (name in the_function) {
- if (Object.prototype.hasOwnProperty.call(the_function, name)) {
- if (name.charAt(0) !== '(') {
- kind = the_function[name];
- if (kind === 'unction' || kind === 'unparam') {
- kind = 'unused';
- }
- if (Array.isArray(function_data[kind])) {
- function_data[kind].push(name);
- if (kind === 'unused') {
- unused.push({
- name: name,
- line: the_function['(line)'],
- 'function': the_function['(name)']
- });
- } else if (kind === 'undef') {
- undef.push({
- name: name,
- line: the_function['(line)'],
- 'function': the_function['(name)']
- });
- }
- }
- }
- }
- }
- for (j = 0; j < functionicity.length; j += 1) {
- if (function_data[functionicity[j]].length === 0) {
- delete function_data[functionicity[j]];
- }
- }
- function_data.name = the_function['(name)'];
- function_data.params = the_function['(params)'];
- function_data.line = the_function['(line)'];
- data.functions.push(function_data);
- }
-
- if (unused.length > 0) {
- data.unused = unused;
- }
- if (undef.length > 0) {
- data['undefined'] = undef;
- }
-
- members = [];
- for (name in property) {
- if (typeof property[name] === 'number') {
- data.member = property;
- break;
- }
- }
-
- return data;
- };
-
-
- itself.report = function (errors_only) {
- var data = itself.data(), err, evidence, i, italics, j, key, keys,
- length, mem = '', name, names, not_first, output = [], snippets,
- the_function, warning;
-
- function detail(h, value) {
- var comma_needed, singularity;
- if (Array.isArray(value)) {
- output.push('<div><i>' + h + '</i> ');
- value.sort().forEach(function (item) {
- if (item !== singularity) {
- singularity = item;
- output.push((comma_needed ? ', ' : '') + singularity);
- comma_needed = true;
- }
- });
- output.push('</div>');
- } else if (value) {
- output.push('<div><i>' + h + '</i> ' + value + '</div>');
- }
- }
-
- if (data.errors || data.unused || data['undefined']) {
- err = true;
- output.push('<div id=errors><i>Error:</i>');
- if (data.errors) {
- for (i = 0; i < data.errors.length; i += 1) {
- warning = data.errors[i];
- if (warning) {
- evidence = warning.evidence || '';
- output.push('<p>Problem' + (isFinite(warning.line)
- ? ' at line ' + String(warning.line) +
- ' character ' + String(warning.character)
- : '') +
- ': ' + warning.reason.entityify() +
- '</p><p class=evidence>' +
- (evidence && (evidence.length > 80
- ? evidence.slice(0, 77) + '...'
- : evidence).entityify()) + '</p>');
- }
- }
- }
-
- if (data['undefined']) {
- snippets = [];
- for (i = 0; i < data['undefined'].length; i += 1) {
- snippets[i] = '<code><u>' + data['undefined'][i].name + '</u></code>&nbsp;<i>' +
- String(data['undefined'][i].line) + ' </i> <small>' +
- data['undefined'][i]['function'] + '</small>';
- }
- output.push('<p><i>Undefined variable:</i> ' + snippets.join(', ') + '</p>');
- }
- if (data.unused) {
- snippets = [];
- for (i = 0; i < data.unused.length; i += 1) {
- snippets[i] = '<code><u>' + data.unused[i].name + '</u></code>&nbsp;<i>' +
- String(data.unused[i].line) + ' </i> <small>' +
- data.unused[i]['function'] + '</small>';
- }
- output.push('<p><i>Unused variable:</i> ' + snippets.join(', ') + '</p>');
- }
- if (data.json) {
- output.push('<p>JSON: bad.</p>');
- }
- output.push('</div>');
- }
-
- if (!errors_only) {
-
- output.push('<br><div id=functions>');
-
- if (data.urls) {
- detail("URLs<br>", data.urls, '<br>');
- }
-
- if (xmode === 'style') {
- output.push('<p>CSS.</p>');
- } else if (data.json && !err) {
- output.push('<p>JSON: good.</p>');
- } else if (data.globals) {
- output.push('<div><i>Global</i> ' +
- data.globals.sort().join(', ') + '</div>');
- } else {
- output.push('<div><i>No new global variables introduced.</i></div>');
- }
-
- for (i = 0; i < data.functions.length; i += 1) {
- the_function = data.functions[i];
- names = [];
- if (the_function.params) {
- for (j = 0; j < the_function.params.length; j += 1) {
- names[j] = the_function.params[j].string;
- }
- }
- output.push('<br><div class=function><i>' +
- String(the_function.line) + '</i> ' +
- the_function.name.entityify() +
- '(' + names.join(', ') + ')</div>');
- detail('<big><b>Undefined</b></big>', the_function['undefined']);
- detail('<big><b>Unused</b></big>', the_function.unused);
- detail('Closure', the_function.closure);
- detail('Variable', the_function['var']);
- detail('Exception', the_function.exception);
- detail('Outer', the_function.outer);
- detail('Global', the_function.global);
- detail('Label', the_function.label);
- }
-
- if (data.member) {
- keys = Object.keys(data.member);
- if (keys.length) {
- keys = keys.sort();
- output.push('<br><pre id=properties>/*properties<br>');
- mem = ' ';
- italics = 0;
- j = 0;
- not_first = false;
- for (i = 0; i < keys.length; i += 1) {
- key = keys[i];
- if (data.member[key] > 0) {
- if (not_first) {
- mem += ', ';
- }
- name = ix.test(key)
- ? key
- : '\'' + key.entityify().replace(nx, sanitize) + '\'';
- length += name.length + 2;
- if (data.member[key] === 1) {
- name = '<i>' + name + '</i>';
- italics += 1;
- j = 1;
- }
- if (mem.length + name.length - (italics * 7) > 80) {
- output.push(mem + '<br>');
- mem = ' ';
- italics = j;
- }
- mem += name;
- j = 0;
- not_first = true;
- }
- }
- output.push(mem + '<br>*/</pre>');
- }
- output.push('</div>');
- }
- }
- return output.join('');
- };
- itself.jslint = itself;
-
- itself.edition = '2012-04-15';
-
- return itself;
-}());
-core.JSLint = function JSLint() {
- this.JSLINT = JSLINT;
-};
-
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/core/PointWalker.js b/apps/files_odfviewer/src/webodf/webodf/lib/core/PointWalker.js
deleted file mode 100644
index f3f0008f787..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/core/PointWalker.js
+++ /dev/null
@@ -1,197 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global core: true, Node: true*/
-/**
- * A simple walker that allows finegrained stepping through the DOM.
- * It does not support node filtering.
- * TODO: write a position walker that uses a treewalker
- * @constructor
- * @param {!Node} node
- */
-core.PointWalker = function PointWalker(node) {
- "use strict";
- var currentNode = node,
- before = null, // node before the point
- after = node && node.firstChild, // node after the point
- root = node,
- pos = 0;
-
- /**
- * @param {!Node} node
- * @return {!number}
- */
- function getPosition(node) {
- var /**@type{!number}*/ p = -1,
- /**@type{Node}*/ n = node;
- while (n) {
- n = n.previousSibling;
- p += 1;
- }
- return p;
- }
- /**
- * Move the walker to the point given by @p node and @p position.
- * @param {!Element} node must be the root of this walker or part of the
- * tree of this walker.
- * @param {!number} position must be a valid position in @node.
- **/
- this.setPoint = function (node, position) {
- currentNode = node;
- pos = position;
- if (currentNode.nodeType === 3) { // Node.TEXT_NODE
- after = null;
- before = null;
- } else {
- after = currentNode.firstChild;
- while (position) {
- position -= 1;
- after = after.nextSibling;
- }
- if (after) {
- before = after.previousSibling;
- } else {
- before = currentNode.lastChild;
- }
- }
- };
- /**
- * @return {!boolean}
- */
- this.stepForward = function () {
- var len;
- // if this is a text node, move to the next position in the text
- if (currentNode.nodeType === 3) { // TEXT_NODE
- if (typeof currentNode.nodeValue.length === "number") {
- len = currentNode.nodeValue.length;
- } else {
- len = currentNode.nodeValue.length();
- }
- if (pos < len) {
- pos += 1;
- return true;
- }
- }
- if (after) {
- if (after.nodeType === 1) { // ELEMENT_NODE
- currentNode = after;
- before = null;
- after = currentNode.firstChild;
- pos = 0;
- } else if (after.nodeType === 3) { // TEXT_NODE
- currentNode = after;
- before = null;
- after = null;
- pos = 0;
- } else {
- before = after;
- after = after.nextSibling;
- pos += 1;
- }
- return true;
- }
- if (currentNode !== root) {
- before = currentNode;
- after = before.nextSibling;
- currentNode = currentNode.parentNode;
- pos = getPosition(before) + 1;
- return true;
- }
- return false;
- };
- /**
- * @return {!boolean}
- */
- this.stepBackward = function () {
- // if this is a text node, move to the next position in the text
- if (currentNode.nodeType === 3) { // TEXT_NODE
- if (pos > 0) {
- pos -= 1;
- return true;
- }
- }
- if (before) {
- if (before.nodeType === 1) { // ELEMENT_NODE
- currentNode = before;
- before = currentNode.lastChild;
- after = null;
- pos = getPosition(before) + 1;
- } else if (before.nodeType === 3) { // TEXT_NODE
- currentNode = before;
- before = null;
- after = null;
- if (typeof currentNode.nodeValue.length === "number") {
- pos = currentNode.nodeValue.length;
- } else {
- pos = currentNode.nodeValue.length();
- }
- } else {
- after = before;
- before = before.previousSibling;
- pos -= 1;
- }
- return true;
- }
- if (currentNode !== root) {
- after = currentNode;
- before = after.previousSibling;
- currentNode = currentNode.parentNode;
- pos = getPosition(after);
- return true;
- }
- return false;
- };
- /**
- * @return {?Node}
- */
- this.node = function () {
- return currentNode;
- };
- /**
- * @return {!number}
- */
- this.position = function () {
- return pos;
- };
- /**
- * @return {?Node}
- */
- this.precedingSibling = function () {
- return before;
- };
- /**
- * @return {?Node}
- */
- this.followingSibling = function () {
- return after;
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/core/RawDeflate.js b/apps/files_odfviewer/src/webodf/webodf/lib/core/RawDeflate.js
deleted file mode 100644
index 5fdd2b02de7..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/core/RawDeflate.js
+++ /dev/null
@@ -1,1833 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global core, runtime*/
-/*jslint bitwise: true, white: false, plusplus: true, vars: true, continue: true*/
-/*
- * $Id: rawdeflate.js,v 0.3 2009/03/01 19:05:05 dankogai Exp dankogai $
- *
- * Original:
- * http://www.onicos.com/staff/iz/amuse/javascript/expert/deflate.txt
- */
-/**
- * @constructor
- */
-core.RawDeflate = function () {
- "use strict";
- /* Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp>
- * Version: 1.0.1
- * LastModified: Dec 25 1999
- */
-
- /* Interface:
- * data = zip_deflate(src);
- */
-
- /* constant parameters */
- var zip_WSIZE = 32768, // Sliding Window size
- zip_STORED_BLOCK = 0,
- zip_STATIC_TREES = 1,
- zip_DYN_TREES = 2,
-
- /* for deflate */
- zip_DEFAULT_LEVEL = 6,
- zip_FULL_SEARCH = true,
- zip_INBUFSIZ = 32768, // Input buffer size
- zip_INBUF_EXTRA = 64, // Extra buffer
- zip_OUTBUFSIZ = 1024 * 8,
- zip_window_size = 2 * zip_WSIZE,
- zip_MIN_MATCH = 3,
- zip_MAX_MATCH = 258,
- zip_BITS = 16,
- // for SMALL_MEM
- zip_LIT_BUFSIZE = 0x2000,
- zip_HASH_BITS = 13,
- // for MEDIUM_MEM
- // var zip_LIT_BUFSIZE = 0x4000;
- // var zip_HASH_BITS = 14;
- // for BIG_MEM
- // var zip_LIT_BUFSIZE = 0x8000;
- zip_DIST_BUFSIZE = zip_LIT_BUFSIZE,
- zip_HASH_SIZE = 1 << zip_HASH_BITS,
- zip_HASH_MASK = zip_HASH_SIZE - 1,
- zip_WMASK = zip_WSIZE - 1,
- zip_NIL = 0, // Tail of hash chains
- zip_TOO_FAR = 4096,
- zip_MIN_LOOKAHEAD = zip_MAX_MATCH + zip_MIN_MATCH + 1,
- zip_MAX_DIST = zip_WSIZE - zip_MIN_LOOKAHEAD,
- zip_SMALLEST = 1,
- zip_MAX_BITS = 15,
- zip_MAX_BL_BITS = 7,
- zip_LENGTH_CODES = 29,
- zip_LITERALS = 256,
- zip_END_BLOCK = 256,
- zip_L_CODES = zip_LITERALS + 1 + zip_LENGTH_CODES,
- zip_D_CODES = 30,
- zip_BL_CODES = 19,
- zip_REP_3_6 = 16,
- zip_REPZ_3_10 = 17,
- zip_REPZ_11_138 = 18,
- zip_HEAP_SIZE = 2 * zip_L_CODES + 1,
- zip_H_SHIFT = parseInt((zip_HASH_BITS + zip_MIN_MATCH - 1) /
- zip_MIN_MATCH, 10),
-
- /* variables */
- zip_free_queue,
- zip_qhead,
- zip_qtail,
- zip_initflag,
- zip_outbuf = null,
- zip_outcnt,
- zip_outoff,
- zip_complete,
- zip_window,
- zip_d_buf,
- zip_l_buf,
- zip_prev,
- zip_bi_buf,
- zip_bi_valid,
- zip_block_start,
- zip_ins_h,
- zip_hash_head,
- zip_prev_match,
- zip_match_available,
- zip_match_length,
- zip_prev_length,
- zip_strstart,
- zip_match_start,
- zip_eofile,
- zip_lookahead,
- zip_max_chain_length,
- zip_max_lazy_match,
- zip_compr_level,
- zip_good_match,
- zip_nice_match,
- zip_dyn_ltree,
- zip_dyn_dtree,
- zip_static_ltree,
- zip_static_dtree,
- zip_bl_tree,
- zip_l_desc,
- zip_d_desc,
- zip_bl_desc,
- zip_bl_count,
- zip_heap,
- zip_heap_len,
- zip_heap_max,
- zip_depth,
- zip_length_code,
- zip_dist_code,
- zip_base_length,
- zip_base_dist,
- zip_flag_buf,
- zip_last_lit,
- zip_last_dist,
- zip_last_flags,
- zip_flags,
- zip_flag_bit,
- zip_opt_len,
- zip_static_len,
- zip_deflate_data,
- zip_deflate_pos,
- // var zip_HASH_BITS = 15;
- /* constant tables */
- zip_extra_lbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0],
- zip_extra_dbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13],
- zip_extra_blbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7],
- zip_bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15],
- zip_configuration_table;
- if (zip_LIT_BUFSIZE > zip_INBUFSIZ) {
- runtime.log("error: zip_INBUFSIZ is too small");
- }
- if ((zip_WSIZE << 1) > (1 << zip_BITS)) {
- runtime.log("error: zip_WSIZE is too large");
- }
- if (zip_HASH_BITS > zip_BITS - 1) {
- runtime.log("error: zip_HASH_BITS is too large");
- }
- if (zip_HASH_BITS < 8 || zip_MAX_MATCH !== 258) {
- runtime.log("error: Code too clever");
- }
-
- /* objects (deflate) */
- /**
- * @constructor
- */
- function Zip_DeflateCT() {
- this.fc = 0; // frequency count or bit string
- this.dl = 0; // father node in Huffman tree or length of bit string
- }
- /**
- * @constructor
- */
- function Zip_DeflateTreeDesc() {
- this.dyn_tree = null; // the dynamic tree
- this.static_tree = null; // corresponding static tree or NULL
- this.extra_bits = null; // extra bits for each code or NULL
- this.extra_base = 0; // base index for extra_bits
- this.elems = 0; // max number of elements in the tree
- this.max_length = 0; // max bit length for the codes
- this.max_code = 0; // largest code with non zero frequency
- }
-
- /** Values for max_lazy_match, good_match and max_chain_length, depending on
- * the desired pack level (0..9). The values given below have been tuned to
- * exclude worst case performance for pathological files. Better values may be
- * found for specific files.
- * @constructor
- */
- function Zip_DeflateConfiguration(a, b, c, d) {
- this.good_length = a; // reduce lazy search above this match length
- this.max_lazy = b; // do not perform lazy search above this match length
- this.nice_length = c; // quit search above this match length
- this.max_chain = d;
- }
-
- /**
- * @constructor
- */
- function Zip_DeflateBuffer() {
- this.next = null;
- this.len = 0;
- this.ptr = [];
- this.ptr.length = zip_OUTBUFSIZ;
- this.off = 0;
- }
-
- /* constant tables */
- zip_configuration_table = [
- new Zip_DeflateConfiguration(0, 0, 0, 0),
- new Zip_DeflateConfiguration(4, 4, 8, 4),
- new Zip_DeflateConfiguration(4, 5, 16, 8),
- new Zip_DeflateConfiguration(4, 6, 32, 32),
- new Zip_DeflateConfiguration(4, 4, 16, 16),
- new Zip_DeflateConfiguration(8, 16, 32, 32),
- new Zip_DeflateConfiguration(8, 16, 128, 128),
- new Zip_DeflateConfiguration(8, 32, 128, 256),
- new Zip_DeflateConfiguration(32, 128, 258, 1024),
- new Zip_DeflateConfiguration(32, 258, 258, 4096)
- ];
-
-
- /* routines (deflate) */
-
- function zip_deflate_start(level) {
- var i;
-
- if (!level) {
- level = zip_DEFAULT_LEVEL;
- } else if (level < 1) {
- level = 1;
- } else if (level > 9) {
- level = 9;
- }
-
- zip_compr_level = level;
- zip_initflag = false;
- zip_eofile = false;
- if (zip_outbuf !== null) {
- return;
- }
-
- zip_free_queue = zip_qhead = zip_qtail = null;
- zip_outbuf = [];
- zip_outbuf.length = zip_OUTBUFSIZ;
- zip_window = [];
- zip_window.length = zip_window_size;
- zip_d_buf = [];
- zip_d_buf.length = zip_DIST_BUFSIZE;
- zip_l_buf = [];
- zip_l_buf.length = zip_INBUFSIZ + zip_INBUF_EXTRA;
- zip_prev = [];
- zip_prev.length = 1 << zip_BITS;
- zip_dyn_ltree = [];
- zip_dyn_ltree.length = zip_HEAP_SIZE;
- for (i = 0; i < zip_HEAP_SIZE; i++) {
- zip_dyn_ltree[i] = new Zip_DeflateCT();
- }
- zip_dyn_dtree = [];
- zip_dyn_dtree.length = 2 * zip_D_CODES + 1;
- for (i = 0; i < 2 * zip_D_CODES + 1; i++) {
- zip_dyn_dtree[i] = new Zip_DeflateCT();
- }
- zip_static_ltree = [];
- zip_static_ltree.length = zip_L_CODES + 2;
- for (i = 0; i < zip_L_CODES + 2; i++) {
- zip_static_ltree[i] = new Zip_DeflateCT();
- }
- zip_static_dtree = [];
- zip_static_dtree.length = zip_D_CODES;
- for (i = 0; i < zip_D_CODES; i++) {
- zip_static_dtree[i] = new Zip_DeflateCT();
- }
- zip_bl_tree = [];
- zip_bl_tree.length = 2 * zip_BL_CODES + 1;
- for (i = 0; i < 2 * zip_BL_CODES + 1; i++) {
- zip_bl_tree[i] = new Zip_DeflateCT();
- }
- zip_l_desc = new Zip_DeflateTreeDesc();
- zip_d_desc = new Zip_DeflateTreeDesc();
- zip_bl_desc = new Zip_DeflateTreeDesc();
- zip_bl_count = [];
- zip_bl_count.length = zip_MAX_BITS + 1;
- zip_heap = [];
- zip_heap.length = 2 * zip_L_CODES + 1;
- zip_depth = [];
- zip_depth.length = 2 * zip_L_CODES + 1;
- zip_length_code = [];
- zip_length_code.length = zip_MAX_MATCH - zip_MIN_MATCH + 1;
- zip_dist_code = [];
- zip_dist_code.length = 512;
- zip_base_length = [];
- zip_base_length.length = zip_LENGTH_CODES;
- zip_base_dist = [];
- zip_base_dist.length = zip_D_CODES;
- zip_flag_buf = [];
- zip_flag_buf.length = parseInt(zip_LIT_BUFSIZE / 8, 10);
- }
-
- var zip_deflate_end = function () {
- zip_free_queue = zip_qhead = zip_qtail = null;
- zip_outbuf = null;
- zip_window = null;
- zip_d_buf = null;
- zip_l_buf = null;
- zip_prev = null;
- zip_dyn_ltree = null;
- zip_dyn_dtree = null;
- zip_static_ltree = null;
- zip_static_dtree = null;
- zip_bl_tree = null;
- zip_l_desc = null;
- zip_d_desc = null;
- zip_bl_desc = null;
- zip_bl_count = null;
- zip_heap = null;
- zip_depth = null;
- zip_length_code = null;
- zip_dist_code = null;
- zip_base_length = null;
- zip_base_dist = null;
- zip_flag_buf = null;
- };
-
- var zip_reuse_queue = function (p) {
- p.next = zip_free_queue;
- zip_free_queue = p;
- };
-
- var zip_new_queue = function () {
- var p;
-
- if (zip_free_queue !== null) {
- p = zip_free_queue;
- zip_free_queue = zip_free_queue.next;
- } else {
- p = new Zip_DeflateBuffer();
- }
- p.next = null;
- p.len = p.off = 0;
-
- return p;
- };
-
- var zip_head1 = function (i) {
- return zip_prev[zip_WSIZE + i];
- };
-
- var zip_head2 = function (i, val) {
- zip_prev[zip_WSIZE + i] = val;
- return val;
- };
-
- var zip_qoutbuf = function () {
- var q, i;
- if (zip_outcnt !== 0) {
- q = zip_new_queue();
- if (zip_qhead === null) {
- zip_qhead = zip_qtail = q;
- } else {
- zip_qtail = zip_qtail.next = q;
- }
- q.len = zip_outcnt - zip_outoff;
- // System.arraycopy(zip_outbuf, zip_outoff, q.ptr, 0, q.len);
- for (i = 0; i < q.len; i++) {
- q.ptr[i] = zip_outbuf[zip_outoff + i];
- }
- zip_outcnt = zip_outoff = 0;
- }
- };
-
- /* put_byte is used for the compressed output, put_ubyte for the
- * uncompressed output. However unlzw() uses window for its
- * suffix table instead of its output buffer, so it does not use put_ubyte
- * (to be cleaned up).
- */
- var zip_put_byte = function (c) {
- zip_outbuf[zip_outoff + zip_outcnt++] = c;
- if (zip_outoff + zip_outcnt === zip_OUTBUFSIZ) {
- zip_qoutbuf();
- }
- };
-
- /* Output a 16 bit value, lsb first */
- var zip_put_short = function (w) {
- w &= 0xffff;
- if (zip_outoff + zip_outcnt < zip_OUTBUFSIZ - 2) {
- zip_outbuf[zip_outoff + zip_outcnt++] = (w & 0xff);
- zip_outbuf[zip_outoff + zip_outcnt++] = (w >>> 8);
- } else {
- zip_put_byte(w & 0xff);
- zip_put_byte(w >>> 8);
- }
- };
-
- /* ==========================================================================
- * Insert string s in the dictionary and set match_head to the previous head
- * of the hash chain (the most recent string with same hash key). Return
- * the previous length of the hash chain.
- * IN assertion: all calls to to INSERT_STRING are made with consecutive
- * input characters and the first MIN_MATCH bytes of s are valid
- * (except for the last MIN_MATCH-1 bytes of the input file).
- */
- var zip_INSERT_STRING = function () {
- zip_ins_h = ((zip_ins_h << zip_H_SHIFT)
- ^ (zip_window[zip_strstart + zip_MIN_MATCH - 1] & 0xff))
- & zip_HASH_MASK;
- zip_hash_head = zip_head1(zip_ins_h);
- zip_prev[zip_strstart & zip_WMASK] = zip_hash_head;
- zip_head2(zip_ins_h, zip_strstart);
- };
-
- /* ==========================================================================
- * Send a value on a given number of bits.
- * IN assertion: length <= 16 and value fits in length bits.
- */
- var zip_Buf_size = 16; // bit size of bi_buf
- var zip_send_bits = function (
- value, // value to send
- length
- ) { // number of bits
- /* If not enough room in bi_buf, use (valid) bits from bi_buf and
- * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid))
- * unused bits in value.
- */
- if (zip_bi_valid > zip_Buf_size - length) {
- zip_bi_buf |= (value << zip_bi_valid);
- zip_put_short(zip_bi_buf);
- zip_bi_buf = (value >> (zip_Buf_size - zip_bi_valid));
- zip_bi_valid += length - zip_Buf_size;
- } else {
- zip_bi_buf |= value << zip_bi_valid;
- zip_bi_valid += length;
- }
- };
-
- /* Send a code of the given tree. c and tree must not have side effects */
- var zip_SEND_CODE = function (c, tree) {
- zip_send_bits(tree[c].fc, tree[c].dl);
- };
-
- /* Mapping from a distance to a distance code. dist is the distance - 1 and
- * must not have side effects. dist_code[256] and dist_code[257] are never
- * used.
- */
- var zip_D_CODE = function (dist) {
- return (dist < 256 ? zip_dist_code[dist]
- : zip_dist_code[256 + (dist >> 7)]) & 0xff;
- };
-
- /* ==========================================================================
- * Compares to subtrees, using the tree depth as tie breaker when
- * the subtrees have equal frequency. This minimizes the worst case length.
- */
- var zip_SMALLER = function (tree, n, m) {
- return tree[n].fc < tree[m].fc ||
- (tree[n].fc === tree[m].fc && zip_depth[n] <= zip_depth[m]);
- };
-
- /* ==========================================================================
- * read string data
- */
- var zip_read_buff = function (buff, offset, n) {
- var i;
- for (i = 0; i < n && zip_deflate_pos < zip_deflate_data.length; i++) {
- buff[offset + i] =
- zip_deflate_data.charCodeAt(zip_deflate_pos++) & 0xff;
- }
- return i;
- };
-
- /* ==========================================================================
- * Fill the window when the lookahead becomes insufficient.
- * Updates strstart and lookahead, and sets eofile if end of input file.
- * IN assertion: lookahead < MIN_LOOKAHEAD && strstart + lookahead > 0
- * OUT assertions: at least one byte has been read, or eofile is set;
- * file reads are performed for at least two bytes (required for the
- * translate_eol option).
- */
- var zip_fill_window = function () {
- var n, m;
-
- // Amount of free space at the end of the window.
- var more = zip_window_size - zip_lookahead - zip_strstart;
-
- /* If the window is almost full and there is insufficient lookahead,
- * move the upper half to the lower one to make room in the upper half.
- */
- if (more === -1) {
- /* Very unlikely, but possible on 16 bit machine if strstart == 0
- * and lookahead == 1 (input done one byte at time)
- */
- more--;
- } else if (zip_strstart >= zip_WSIZE + zip_MAX_DIST) {
- /* By the IN assertion, the window is not empty so we can't confuse
- * more == 0 with more == 64K on a 16 bit machine.
- */
- // Assert(window_size == (ulg)2*WSIZE, "no sliding with BIG_MEM");
-
- // System.arraycopy(window, WSIZE, window, 0, WSIZE);
- for (n = 0; n < zip_WSIZE; n++) {
- zip_window[n] = zip_window[n + zip_WSIZE];
- }
-
- zip_match_start -= zip_WSIZE;
- zip_strstart -= zip_WSIZE; /* we now have strstart >= MAX_DIST: */
- zip_block_start -= zip_WSIZE;
-
- for (n = 0; n < zip_HASH_SIZE; n++) {
- m = zip_head1(n);
- zip_head2(n, m >= zip_WSIZE ? m - zip_WSIZE : zip_NIL);
- }
- for (n = 0; n < zip_WSIZE; n++) {
- /* If n is not on any hash chain, prev[n] is garbage but
- * its value will never be used.
- */
- m = zip_prev[n];
- zip_prev[n] = (m >= zip_WSIZE ? m - zip_WSIZE : zip_NIL);
- }
- more += zip_WSIZE;
- }
- // At this point, more >= 2
- if (!zip_eofile) {
- n = zip_read_buff(zip_window, zip_strstart + zip_lookahead, more);
- if (n <= 0) {
- zip_eofile = true;
- } else {
- zip_lookahead += n;
- }
- }
- };
-
-
- /* ==========================================================================
- * Initialize the "longest match" routines for a new file
- */
- var zip_lm_init = function () {
- var j;
-
- /* Initialize the hash table. */
- for (j = 0; j < zip_HASH_SIZE; j++) {
- // zip_head2(j, zip_NIL);
- zip_prev[zip_WSIZE + j] = 0;
- }
- /* prev will be initialized on the fly */
-
- /* Set the default configuration parameters:
- */
- zip_max_lazy_match = zip_configuration_table[zip_compr_level].max_lazy;
- zip_good_match = zip_configuration_table[zip_compr_level].good_length;
- if (!zip_FULL_SEARCH) {
- zip_nice_match = zip_configuration_table[zip_compr_level].nice_length;
- }
- zip_max_chain_length = zip_configuration_table[zip_compr_level].max_chain;
-
- zip_strstart = 0;
- zip_block_start = 0;
-
- zip_lookahead = zip_read_buff(zip_window, 0, 2 * zip_WSIZE);
- if (zip_lookahead <= 0) {
- zip_eofile = true;
- zip_lookahead = 0;
- return;
- }
- zip_eofile = false;
- /* Make sure that we always have enough lookahead. This is important
- * if input comes from a device such as a tty.
- */
- while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) {
- zip_fill_window();
- }
-
- /* If lookahead < MIN_MATCH, ins_h is garbage, but this is
- * not important since only literal bytes will be emitted.
- */
- zip_ins_h = 0;
- for (j = 0; j < zip_MIN_MATCH - 1; j++) {
- // UPDATE_HASH(ins_h, window[j]);
- zip_ins_h = ((zip_ins_h << zip_H_SHIFT) ^ (zip_window[j] & 0xff)) & zip_HASH_MASK;
- }
- };
-
- /* ==========================================================================
- * Set match_start to the longest match starting at the given string and
- * return its length. Matches shorter or equal to prev_length are discarded,
- * in which case the result is equal to prev_length and match_start is
- * garbage.
- * IN assertions: cur_match is the head of the hash chain for the current
- * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
- */
- var zip_longest_match = function (cur_match) {
- var chain_length = zip_max_chain_length; // max hash chain length
- var scanp = zip_strstart; // current string
- var matchp; // matched string
- var len; // length of current match
- var best_len = zip_prev_length; // best match length so far
-
- /* Stop when cur_match becomes <= limit. To simplify the code,
- * we prevent matches with the string of window index 0.
- */
- var limit = (zip_strstart > zip_MAX_DIST ? zip_strstart - zip_MAX_DIST : zip_NIL);
-
- var strendp = zip_strstart + zip_MAX_MATCH;
- var scan_end1 = zip_window[scanp + best_len - 1];
- var scan_end = zip_window[scanp + best_len];
-
- /* Do not waste too much time if we already have a good match: */
- if (zip_prev_length >= zip_good_match) {
- chain_length >>= 2;
- }
-
- // Assert(encoder->strstart <= window_size-MIN_LOOKAHEAD, "insufficient lookahead");
-
- do {
- // Assert(cur_match < encoder->strstart, "no future");
- matchp = cur_match;
-
- /* Skip to next match if the match length cannot increase
- * or if the match length is less than 2:
- */
- if (zip_window[matchp + best_len] !== scan_end ||
- zip_window[matchp + best_len - 1] !== scan_end1 ||
- zip_window[matchp] !== zip_window[scanp] ||
- zip_window[++matchp] !== zip_window[scanp + 1]) {
- continue;
- }
-
- /* The check at best_len-1 can be removed because it will be made
- * again later. (This heuristic is not always a win.)
- * It is not necessary to compare scan[2] and match[2] since they
- * are always equal when the other bytes match, given that
- * the hash keys are equal and that HASH_BITS >= 8.
- */
- scanp += 2;
- matchp++;
-
- /* We check for insufficient lookahead only every 8th comparison;
- * the 256th check will be made at strstart+258.
- */
- do {
- ++scanp;
- } while (zip_window[scanp] === zip_window[++matchp] &&
- zip_window[++scanp] === zip_window[++matchp] &&
- zip_window[++scanp] === zip_window[++matchp] &&
- zip_window[++scanp] === zip_window[++matchp] &&
- zip_window[++scanp] === zip_window[++matchp] &&
- zip_window[++scanp] === zip_window[++matchp] &&
- zip_window[++scanp] === zip_window[++matchp] &&
- zip_window[++scanp] === zip_window[++matchp] &&
- scanp < strendp);
-
- len = zip_MAX_MATCH - (strendp - scanp);
- scanp = strendp - zip_MAX_MATCH;
-
- if (len > best_len) {
- zip_match_start = cur_match;
- best_len = len;
- if (zip_FULL_SEARCH) {
- if (len >= zip_MAX_MATCH) {
- break;
- }
- } else {
- if (len >= zip_nice_match) {
- break;
- }
- }
-
- scan_end1 = zip_window[scanp + best_len - 1];
- scan_end = zip_window[scanp + best_len];
- }
- } while ((cur_match = zip_prev[cur_match & zip_WMASK]) > limit
- && --chain_length !== 0);
-
- return best_len;
- };
-
- /* ==========================================================================
- * Save the match info and tally the frequency counts. Return true if
- * the current block must be flushed.
- */
- var zip_ct_tally = function (
- dist, // distance of matched string
- lc
- ) { // match length-MIN_MATCH or unmatched char (if dist==0)
- zip_l_buf[zip_last_lit++] = lc;
- if (dist === 0) {
- // lc is the unmatched char
- zip_dyn_ltree[lc].fc++;
- } else {
- // Here, lc is the match length - MIN_MATCH
- dist--; // dist = match distance - 1
- // Assert((ush)dist < (ush)MAX_DIST &&
- // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
- // (ush)D_CODE(dist) < (ush)D_CODES, "ct_tally: bad match");
-
- zip_dyn_ltree[zip_length_code[lc] + zip_LITERALS + 1].fc++;
- zip_dyn_dtree[zip_D_CODE(dist)].fc++;
-
- zip_d_buf[zip_last_dist++] = dist;
- zip_flags |= zip_flag_bit;
- }
- zip_flag_bit <<= 1;
-
- // Output the flags if they fill a byte
- if ((zip_last_lit & 7) === 0) {
- zip_flag_buf[zip_last_flags++] = zip_flags;
- zip_flags = 0;
- zip_flag_bit = 1;
- }
- // Try to guess if it is profitable to stop the current block here
- if (zip_compr_level > 2 && (zip_last_lit & 0xfff) === 0) {
- // Compute an upper bound for the compressed length
- var out_length = zip_last_lit * 8;
- var in_length = zip_strstart - zip_block_start;
- var dcode;
-
- for (dcode = 0; dcode < zip_D_CODES; dcode++) {
- out_length += zip_dyn_dtree[dcode].fc * (5 + zip_extra_dbits[dcode]);
- }
- out_length >>= 3;
- // Trace((stderr,"\nlast_lit %u, last_dist %u, in %ld, out ~%ld(%ld%%) ",
- // encoder->last_lit, encoder->last_dist, in_length, out_length,
- // 100L - out_length*100L/in_length));
- if (zip_last_dist < parseInt(zip_last_lit / 2, 10) &&
- out_length < parseInt(in_length / 2, 10)) {
- return true;
- }
- }
- return (zip_last_lit === zip_LIT_BUFSIZE - 1 ||
- zip_last_dist === zip_DIST_BUFSIZE);
- /* We avoid equality with LIT_BUFSIZE because of wraparound at 64K
- * on 16 bit machines and because stored blocks are restricted to
- * 64K-1 bytes.
- */
- };
-
- /* ==========================================================================
- * Restore the heap property by moving down the tree starting at node k,
- * exchanging a node with the smallest of its two sons if necessary, stopping
- * when the heap property is re-established (each father smaller than its
- * two sons).
- */
- var zip_pqdownheap = function (
- tree, // the tree to restore
- k
- ) { // node to move down
- var v = zip_heap[k];
- var j = k << 1; // left son of k
-
- while (j <= zip_heap_len) {
- // Set j to the smallest of the two sons:
- if (j < zip_heap_len &&
- zip_SMALLER(tree, zip_heap[j + 1], zip_heap[j])) {
- j++;
- }
-
- // Exit if v is smaller than both sons
- if (zip_SMALLER(tree, v, zip_heap[j])) {
- break;
- }
-
- // Exchange v with the smallest son
- zip_heap[k] = zip_heap[j];
- k = j;
-
- // And continue down the tree, setting j to the left son of k
- j <<= 1;
- }
- zip_heap[k] = v;
- };
-
- /* ==========================================================================
- * Compute the optimal bit lengths for a tree and update the total bit length
- * for the current block.
- * IN assertion: the fields freq and dad are set, heap[heap_max] and
- * above are the tree nodes sorted by increasing frequency.
- * OUT assertions: the field len is set to the optimal bit length, the
- * array bl_count contains the frequencies for each bit length.
- * The length opt_len is updated; static_len is also updated if stree is
- * not null.
- */
- var zip_gen_bitlen = function (desc) { // the tree descriptor
- var tree = desc.dyn_tree;
- var extra = desc.extra_bits;
- var base = desc.extra_base;
- var max_code = desc.max_code;
- var max_length = desc.max_length;
- var stree = desc.static_tree;
- var h; // heap index
- var n, m; // iterate over the tree elements
- var bits; // bit length
- var xbits; // extra bits
- var f; // frequency
- var overflow = 0; // number of elements with bit length too large
-
- for (bits = 0; bits <= zip_MAX_BITS; bits++) {
- zip_bl_count[bits] = 0;
- }
-
- /* In a first pass, compute the optimal bit lengths (which may
- * overflow in the case of the bit length tree).
- */
- tree[zip_heap[zip_heap_max]].dl = 0; // root of the heap
-
- for (h = zip_heap_max + 1; h < zip_HEAP_SIZE; h++) {
- n = zip_heap[h];
- bits = tree[tree[n].dl].dl + 1;
- if (bits > max_length) {
- bits = max_length;
- overflow++;
- }
- tree[n].dl = bits;
- // We overwrite tree[n].dl which is no longer needed
-
- if (n > max_code) {
- continue; // not a leaf node
- }
-
- zip_bl_count[bits]++;
- xbits = 0;
- if (n >= base) {
- xbits = extra[n - base];
- }
- f = tree[n].fc;
- zip_opt_len += f * (bits + xbits);
- if (stree !== null) {
- zip_static_len += f * (stree[n].dl + xbits);
- }
- }
- if (overflow === 0) {
- return;
- }
-
- // This happens for example on obj2 and pic of the Calgary corpus
-
- // Find the first bit length which could increase:
- do {
- bits = max_length - 1;
- while (zip_bl_count[bits] === 0) {
- bits--;
- }
- zip_bl_count[bits]--; // move one leaf down the tree
- zip_bl_count[bits + 1] += 2; // move one overflow item as its brother
- zip_bl_count[max_length]--;
- /* The brother of the overflow item also moves one step up,
- * but this does not affect bl_count[max_length]
- */
- overflow -= 2;
- } while (overflow > 0);
-
- /* Now recompute all bit lengths, scanning in increasing frequency.
- * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
- * lengths instead of fixing only the wrong ones. This idea is taken
- * from 'ar' written by Haruhiko Okumura.)
- */
- for (bits = max_length; bits !== 0; bits--) {
- n = zip_bl_count[bits];
- while (n !== 0) {
- m = zip_heap[--h];
- if (m > max_code) {
- continue;
- }
- if (tree[m].dl !== bits) {
- zip_opt_len += (bits - tree[m].dl) * tree[m].fc;
- tree[m].fc = bits;
- }
- n--;
- }
- }
- };
-
- /* ==========================================================================
- * Reverse the first len bits of a code, using straightforward code (a faster
- * method would use a table)
- * IN assertion: 1 <= len <= 15
- */
- var zip_bi_reverse = function (
- code, // the value to invert
- len
- ) { // its bit length
- var res = 0;
- do {
- res |= code & 1;
- code >>= 1;
- res <<= 1;
- } while (--len > 0);
- return res >> 1;
- };
-
- /* ==========================================================================
- * Generate the codes for a given tree and bit counts (which need not be
- * optimal).
- * IN assertion: the array bl_count contains the bit length statistics for
- * the given tree and the field len is set for all tree elements.
- * OUT assertion: the field code is set for all tree elements of non
- * zero code length.
- */
- var zip_gen_codes = function (tree, // the tree to decorate
- max_code) { // largest code with non zero frequency
- var next_code = [];
- next_code.length = zip_MAX_BITS + 1; // next code value for each bit length
- var code = 0; // running code value
- var bits; // bit index
- var n; // code index
-
- /* The distribution counts are first used to generate the code values
- * without bit reversal.
- */
- for (bits = 1; bits <= zip_MAX_BITS; bits++) {
- code = ((code + zip_bl_count[bits - 1]) << 1);
- next_code[bits] = code;
- }
-
- /* Check that the bit counts in bl_count are consistent. The last code
- * must be all ones.
- */
- // Assert (code + encoder->bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
- // "inconsistent bit counts");
- // Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
-
- for (n = 0; n <= max_code; n++) {
- var len = tree[n].dl;
- if (len === 0) {
- continue;
- }
- // Now reverse the bits
- tree[n].fc = zip_bi_reverse(next_code[len]++, len);
-
- // Tracec(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
- // n, (isgraph(n) ? n : ' '), len, tree[n].fc, next_code[len]-1));
- }
- };
-
-
- /* ==========================================================================
- * Construct one Huffman tree and assigns the code bit strings and lengths.
- * Update the total bit length for the current block.
- * IN assertion: the field freq is set for all tree elements.
- * OUT assertions: the fields len and code are set to the optimal bit length
- * and corresponding code. The length opt_len is updated; static_len is
- * also updated if stree is not null. The field max_code is set.
- */
- var zip_build_tree = function (desc) { // the tree descriptor
- var tree = desc.dyn_tree;
- var stree = desc.static_tree;
- var elems = desc.elems;
- var n, m; // iterate over heap elements
- var max_code = -1; // largest code with non zero frequency
- var node = elems; // next internal node of the tree
-
- /* Construct the initial heap, with least frequent element in
- * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
- * heap[0] is not used.
- */
- zip_heap_len = 0;
- zip_heap_max = zip_HEAP_SIZE;
-
- for (n = 0; n < elems; n++) {
- if (tree[n].fc !== 0) {
- zip_heap[++zip_heap_len] = max_code = n;
- zip_depth[n] = 0;
- } else {
- tree[n].dl = 0;
- }
- }
-
- /* The pkzip format requires that at least one distance code exists,
- * and that at least one bit should be sent even if there is only one
- * possible code. So to avoid special checks later on we force at least
- * two codes of non zero frequency.
- */
- while (zip_heap_len < 2) {
- var xnew = zip_heap[++zip_heap_len] = (max_code < 2 ? ++max_code : 0);
- tree[xnew].fc = 1;
- zip_depth[xnew] = 0;
- zip_opt_len--;
- if (stree !== null) {
- zip_static_len -= stree[xnew].dl;
- }
- // new is 0 or 1 so it does not have extra bits
- }
- desc.max_code = max_code;
-
- /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
- * establish sub-heaps of increasing lengths:
- */
- for (n = zip_heap_len >> 1; n >= 1; n--) {
- zip_pqdownheap(tree, n);
- }
-
- /* Construct the Huffman tree by repeatedly combining the least two
- * frequent nodes.
- */
- do {
- n = zip_heap[zip_SMALLEST];
- zip_heap[zip_SMALLEST] = zip_heap[zip_heap_len--];
- zip_pqdownheap(tree, zip_SMALLEST);
-
- m = zip_heap[zip_SMALLEST]; // m = node of next least frequency
-
- // keep the nodes sorted by frequency
- zip_heap[--zip_heap_max] = n;
- zip_heap[--zip_heap_max] = m;
-
- // Create a new node father of n and m
- tree[node].fc = tree[n].fc + tree[m].fc;
- // depth[node] = (char)(MAX(depth[n], depth[m]) + 1);
- if (zip_depth[n] > zip_depth[m] + 1) {
- zip_depth[node] = zip_depth[n];
- } else {
- zip_depth[node] = zip_depth[m] + 1;
- }
- tree[n].dl = tree[m].dl = node;
-
- // and insert the new node in the heap
- zip_heap[zip_SMALLEST] = node++;
- zip_pqdownheap(tree, zip_SMALLEST);
-
- } while (zip_heap_len >= 2);
-
- zip_heap[--zip_heap_max] = zip_heap[zip_SMALLEST];
-
- /* At this point, the fields freq and dad are set. We can now
- * generate the bit lengths.
- */
- zip_gen_bitlen(desc);
-
- // The field len is now set, we can generate the bit codes
- zip_gen_codes(tree, max_code);
- };
-
- /* ==========================================================================
- * Scan a literal or distance tree to determine the frequencies of the codes
- * in the bit length tree. Updates opt_len to take into account the repeat
- * counts. (The contribution of the bit length codes will be added later
- * during the construction of bl_tree.)
- */
- var zip_scan_tree = function (tree,// the tree to be scanned
- max_code) { // and its largest code of non zero frequency
- var n; // iterates over all tree elements
- var prevlen = -1; // last emitted length
- var curlen; // length of current code
- var nextlen = tree[0].dl; // length of next code
- var count = 0; // repeat count of the current code
- var max_count = 7; // max repeat count
- var min_count = 4; // min repeat count
-
- if (nextlen === 0) {
- max_count = 138;
- min_count = 3;
- }
- tree[max_code + 1].dl = 0xffff; // guard
-
- for (n = 0; n <= max_code; n++) {
- curlen = nextlen;
- nextlen = tree[n + 1].dl;
- if (++count < max_count && curlen === nextlen) {
- continue;
- } else if (count < min_count) {
- zip_bl_tree[curlen].fc += count;
- } else if (curlen !== 0) {
- if (curlen !== prevlen) {
- zip_bl_tree[curlen].fc++;
- }
- zip_bl_tree[zip_REP_3_6].fc++;
- } else if (count <= 10) {
- zip_bl_tree[zip_REPZ_3_10].fc++;
- } else {
- zip_bl_tree[zip_REPZ_11_138].fc++;
- }
- count = 0;
- prevlen = curlen;
- if (nextlen === 0) {
- max_count = 138;
- min_count = 3;
- } else if (curlen === nextlen) {
- max_count = 6;
- min_count = 3;
- } else {
- max_count = 7;
- min_count = 4;
- }
- }
- };
-
-
- /* ==========================================================================
- * Construct the Huffman tree for the bit lengths and return the index in
- * bl_order of the last bit length code to send.
- */
- var zip_build_bl_tree = function () {
- var max_blindex; // index of last bit length code of non zero freq
-
- // Determine the bit length frequencies for literal and distance trees
- zip_scan_tree(zip_dyn_ltree, zip_l_desc.max_code);
- zip_scan_tree(zip_dyn_dtree, zip_d_desc.max_code);
-
- // Build the bit length tree:
- zip_build_tree(zip_bl_desc);
- /* opt_len now includes the length of the tree representations, except
- * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
- */
-
- /* Determine the number of bit length codes to send. The pkzip format
- * requires that at least 4 bit length codes be sent. (appnote.txt says
- * 3 but the actual value used is 4.)
- */
- for (max_blindex = zip_BL_CODES - 1; max_blindex >= 3; max_blindex--) {
- if (zip_bl_tree[zip_bl_order[max_blindex]].dl !== 0) {
- break;
- }
- }
- /* Update opt_len to include the bit length tree and counts */
- zip_opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;
- // Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
- // encoder->opt_len, encoder->static_len));
-
- return max_blindex;
- };
-
- /* ==========================================================================
- * Write out any remaining bits in an incomplete byte.
- */
- var zip_bi_windup = function () {
- if (zip_bi_valid > 8) {
- zip_put_short(zip_bi_buf);
- } else if (zip_bi_valid > 0) {
- zip_put_byte(zip_bi_buf);
- }
- zip_bi_buf = 0;
- zip_bi_valid = 0;
- };
-
- /* ==========================================================================
- * Send the block data compressed using the given Huffman trees
- */
- var zip_compress_block = function (
- ltree, // literal tree
- dtree
- ) { // distance tree
- var dist; // distance of matched string
- var lc; // match length or unmatched char (if dist == 0)
- var lx = 0; // running index in l_buf
- var dx = 0; // running index in d_buf
- var fx = 0; // running index in flag_buf
- var flag = 0; // current flags
- var code; // the code to send
- var extra; // number of extra bits to send
-
- if (zip_last_lit !== 0) {
- do {
- if ((lx & 7) === 0) {
- flag = zip_flag_buf[fx++];
- }
- lc = zip_l_buf[lx++] & 0xff;
- if ((flag & 1) === 0) {
- zip_SEND_CODE(lc, ltree); /* send a literal byte */
- // Tracecv(isgraph(lc), (stderr," '%c' ", lc));
- } else {
- // Here, lc is the match length - MIN_MATCH
- code = zip_length_code[lc];
- zip_SEND_CODE(code + zip_LITERALS + 1, ltree); // send the length code
- extra = zip_extra_lbits[code];
- if (extra !== 0) {
- lc -= zip_base_length[code];
- zip_send_bits(lc, extra); // send the extra length bits
- }
- dist = zip_d_buf[dx++];
- // Here, dist is the match distance - 1
- code = zip_D_CODE(dist);
- // Assert (code < D_CODES, "bad d_code");
-
- zip_SEND_CODE(code, dtree); // send the distance code
- extra = zip_extra_dbits[code];
- if (extra !== 0) {
- dist -= zip_base_dist[code];
- zip_send_bits(dist, extra); // send the extra distance bits
- }
- } // literal or match pair ?
- flag >>= 1;
- } while (lx < zip_last_lit);
- }
-
- zip_SEND_CODE(zip_END_BLOCK, ltree);
- };
-
- /* ==========================================================================
- * Send a literal or distance tree in compressed form, using the codes in
- * bl_tree.
- */
- var zip_send_tree = function (tree, // the tree to be scanned
- max_code) { // and its largest code of non zero frequency
- var n; // iterates over all tree elements
- var prevlen = -1; // last emitted length
- var curlen; // length of current code
- var nextlen = tree[0].dl; // length of next code
- var count = 0; // repeat count of the current code
- var max_count = 7; // max repeat count
- var min_count = 4; // min repeat count
-
- /* tree[max_code+1].dl = -1; */ /* guard already set */
- if (nextlen === 0) {
- max_count = 138;
- min_count = 3;
- }
-
- for (n = 0; n <= max_code; n++) {
- curlen = nextlen;
- nextlen = tree[n + 1].dl;
- if (++count < max_count && curlen === nextlen) {
- continue;
- } else if (count < min_count) {
- do {
- zip_SEND_CODE(curlen, zip_bl_tree);
- } while (--count !== 0);
- } else if (curlen !== 0) {
- if (curlen !== prevlen) {
- zip_SEND_CODE(curlen, zip_bl_tree);
- count--;
- }
- // Assert(count >= 3 && count <= 6, " 3_6?");
- zip_SEND_CODE(zip_REP_3_6, zip_bl_tree);
- zip_send_bits(count - 3, 2);
- } else if (count <= 10) {
- zip_SEND_CODE(zip_REPZ_3_10, zip_bl_tree);
- zip_send_bits(count - 3, 3);
- } else {
- zip_SEND_CODE(zip_REPZ_11_138, zip_bl_tree);
- zip_send_bits(count - 11, 7);
- }
- count = 0;
- prevlen = curlen;
- if (nextlen === 0) {
- max_count = 138;
- min_count = 3;
- } else if (curlen === nextlen) {
- max_count = 6;
- min_count = 3;
- } else {
- max_count = 7;
- min_count = 4;
- }
- }
- };
-
- /* ==========================================================================
- * Send the header for a block using dynamic Huffman trees: the counts, the
- * lengths of the bit length codes, the literal tree and the distance tree.
- * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
- */
- var zip_send_all_trees = function (lcodes, dcodes, blcodes) { // number of codes for each tree
- var rank; // index in bl_order
-
- // Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
- // Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
- // "too many codes");
- // Tracev((stderr, "\nbl counts: "));
- zip_send_bits(lcodes - 257, 5); // not +255 as stated in appnote.txt
- zip_send_bits(dcodes - 1, 5);
- zip_send_bits(blcodes - 4, 4); // not -3 as stated in appnote.txt
- for (rank = 0; rank < blcodes; rank++) {
- // Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
- zip_send_bits(zip_bl_tree[zip_bl_order[rank]].dl, 3);
- }
-
- // send the literal tree
- zip_send_tree(zip_dyn_ltree, lcodes - 1);
-
- // send the distance tree
- zip_send_tree(zip_dyn_dtree, dcodes - 1);
- };
-
- /* ==========================================================================
- * Initialize a new block.
- */
- var zip_init_block = function () {
- var n; // iterates over tree elements
-
- // Initialize the trees.
- for (n = 0; n < zip_L_CODES; n++) {
- zip_dyn_ltree[n].fc = 0;
- }
- for (n = 0; n < zip_D_CODES; n++) {
- zip_dyn_dtree[n].fc = 0;
- }
- for (n = 0; n < zip_BL_CODES; n++) {
- zip_bl_tree[n].fc = 0;
- }
-
- zip_dyn_ltree[zip_END_BLOCK].fc = 1;
- zip_opt_len = zip_static_len = 0;
- zip_last_lit = zip_last_dist = zip_last_flags = 0;
- zip_flags = 0;
- zip_flag_bit = 1;
- };
-
- /* ==========================================================================
- * Determine the best encoding for the current block: dynamic trees, static
- * trees or store, and output the encoded block to the zip file.
- */
- var zip_flush_block = function (eof) { // true if this is the last block for a file
- var opt_lenb, static_lenb; // opt_len and static_len in bytes
- var max_blindex; // index of last bit length code of non zero freq
- var stored_len; // length of input block
-
- stored_len = zip_strstart - zip_block_start;
- zip_flag_buf[zip_last_flags] = zip_flags; // Save the flags for the last 8 items
-
- // Construct the literal and distance trees
- zip_build_tree(zip_l_desc);
- // Tracev((stderr, "\nlit data: dyn %ld, stat %ld",
- // encoder->opt_len, encoder->static_len));
-
- zip_build_tree(zip_d_desc);
- // Tracev((stderr, "\ndist data: dyn %ld, stat %ld",
- // encoder->opt_len, encoder->static_len));
- /* At this point, opt_len and static_len are the total bit lengths of
- * the compressed block data, excluding the tree representations.
- */
-
- /* Build the bit length tree for the above two trees, and get the index
- * in bl_order of the last bit length code to send.
- */
- max_blindex = zip_build_bl_tree();
-
- // Determine the best encoding. Compute first the block length in bytes
- opt_lenb = (zip_opt_len + 3 + 7) >> 3;
- static_lenb = (zip_static_len + 3 + 7) >> 3;
-
- // Trace((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u dist %u ",
- // opt_lenb, encoder->opt_len,
- // static_lenb, encoder->static_len, stored_len,
- // encoder->last_lit, encoder->last_dist));
-
- if (static_lenb <= opt_lenb) {
- opt_lenb = static_lenb;
- }
- if (stored_len + 4 <= opt_lenb // 4: two words for the lengths
- && zip_block_start >= 0) {
- var i;
-
- /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
- * Otherwise we can't have processed more than WSIZE input bytes since
- * the last block flush, because compression would have been
- * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
- * transform a block into a stored block.
- */
- zip_send_bits((zip_STORED_BLOCK << 1) + eof, 3); /* send block type */
- zip_bi_windup(); /* align on byte boundary */
- zip_put_short(stored_len);
- zip_put_short(~stored_len);
-
- // copy block
- /*
- p = &window[block_start];
- for (i = 0; i < stored_len; i++)
- put_byte(p[i]);
- */
- for (i = 0; i < stored_len; i++) {
- zip_put_byte(zip_window[zip_block_start + i]);
- }
-
- } else if (static_lenb === opt_lenb) {
- zip_send_bits((zip_STATIC_TREES << 1) + eof, 3);
- zip_compress_block(zip_static_ltree, zip_static_dtree);
- } else {
- zip_send_bits((zip_DYN_TREES << 1) + eof, 3);
- zip_send_all_trees(zip_l_desc.max_code + 1,
- zip_d_desc.max_code + 1,
- max_blindex + 1);
- zip_compress_block(zip_dyn_ltree, zip_dyn_dtree);
- }
-
- zip_init_block();
-
- if (eof !== 0) {
- zip_bi_windup();
- }
- };
-
- /* ==========================================================================
- * Processes a new input file and return its compressed length. This
- * function does not perform lazy evaluationof matches and inserts
- * new strings in the dictionary only for unmatched strings or for short
- * matches. It is used only for the fast compression options.
- */
- var zip_deflate_fast = function () {
- while (zip_lookahead !== 0 && zip_qhead === null) {
- var flush; // set if current block must be flushed
-
- /* Insert the string window[strstart .. strstart+2] in the
- * dictionary, and set hash_head to the head of the hash chain:
- */
- zip_INSERT_STRING();
-
- /* Find the longest match, discarding those <= prev_length.
- * At this point we have always match_length < MIN_MATCH
- */
- if (zip_hash_head !== zip_NIL &&
- zip_strstart - zip_hash_head <= zip_MAX_DIST) {
- /* To simplify the code, we prevent matches with the string
- * of window index 0 (in particular we have to avoid a match
- * of the string with itself at the start of the input file).
- */
- zip_match_length = zip_longest_match(zip_hash_head);
- /* longest_match() sets match_start */
- if (zip_match_length > zip_lookahead) {
- zip_match_length = zip_lookahead;
- }
- }
- if (zip_match_length >= zip_MIN_MATCH) {
- // check_match(strstart, match_start, match_length);
-
- flush = zip_ct_tally(zip_strstart - zip_match_start,
- zip_match_length - zip_MIN_MATCH);
- zip_lookahead -= zip_match_length;
-
- /* Insert new strings in the hash table only if the match length
- * is not too large. This saves time but degrades compression.
- */
- if (zip_match_length <= zip_max_lazy_match) {
- zip_match_length--; // string at strstart already in hash table
- do {
- zip_strstart++;
- zip_INSERT_STRING();
- /* strstart never exceeds WSIZE-MAX_MATCH, so there are
- * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH
- * these bytes are garbage, but it does not matter since
- * the next lookahead bytes will be emitted as literals.
- */
- } while (--zip_match_length !== 0);
- zip_strstart++;
- } else {
- zip_strstart += zip_match_length;
- zip_match_length = 0;
- zip_ins_h = zip_window[zip_strstart] & 0xff;
- // UPDATE_HASH(ins_h, window[strstart + 1]);
- zip_ins_h = ((zip_ins_h << zip_H_SHIFT) ^ (zip_window[zip_strstart + 1] & 0xff)) & zip_HASH_MASK;
-
- //#if MIN_MATCH != 3
- // Call UPDATE_HASH() MIN_MATCH-3 more times
- //#endif
-
- }
- } else {
- /* No match, output a literal byte */
- flush = zip_ct_tally(0, zip_window[zip_strstart] & 0xff);
- zip_lookahead--;
- zip_strstart++;
- }
- if (flush) {
- zip_flush_block(0);
- zip_block_start = zip_strstart;
- }
-
- /* Make sure that we always have enough lookahead, except
- * at the end of the input file. We need MAX_MATCH bytes
- * for the next match, plus MIN_MATCH bytes to insert the
- * string following the next match.
- */
- while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) {
- zip_fill_window();
- }
- }
- };
-
- var zip_deflate_better = function () {
- /* Process the input block. */
- while (zip_lookahead !== 0 && zip_qhead === null) {
- /* Insert the string window[strstart .. strstart+2] in the
- * dictionary, and set hash_head to the head of the hash chain:
- */
- zip_INSERT_STRING();
-
- /* Find the longest match, discarding those <= prev_length.
- */
- zip_prev_length = zip_match_length;
- zip_prev_match = zip_match_start;
- zip_match_length = zip_MIN_MATCH - 1;
-
- if (zip_hash_head !== zip_NIL &&
- zip_prev_length < zip_max_lazy_match &&
- zip_strstart - zip_hash_head <= zip_MAX_DIST) {
- /* To simplify the code, we prevent matches with the string
- * of window index 0 (in particular we have to avoid a match
- * of the string with itself at the start of the input file).
- */
- zip_match_length = zip_longest_match(zip_hash_head);
- /* longest_match() sets match_start */
- if (zip_match_length > zip_lookahead) {
- zip_match_length = zip_lookahead;
- }
-
- /* Ignore a length 3 match if it is too distant: */
- if (zip_match_length === zip_MIN_MATCH &&
- zip_strstart - zip_match_start > zip_TOO_FAR) {
- /* If prev_match is also MIN_MATCH, match_start is garbage
- * but we will ignore the current match anyway.
- */
- zip_match_length--;
- }
- }
- /* If there was a match at the previous step and the current
- * match is not better, output the previous match:
- */
- if (zip_prev_length >= zip_MIN_MATCH &&
- zip_match_length <= zip_prev_length) {
- var flush; // set if current block must be flushed
-
- // check_match(strstart - 1, prev_match, prev_length);
- flush = zip_ct_tally(zip_strstart - 1 - zip_prev_match,
- zip_prev_length - zip_MIN_MATCH);
-
- /* Insert in hash table all strings up to the end of the match.
- * strstart-1 and strstart are already inserted.
- */
- zip_lookahead -= zip_prev_length - 1;
- zip_prev_length -= 2;
- do {
- zip_strstart++;
- zip_INSERT_STRING();
- /* strstart never exceeds WSIZE-MAX_MATCH, so there are
- * always MIN_MATCH bytes ahead. If lookahead < MIN_MATCH
- * these bytes are garbage, but it does not matter since the
- * next lookahead bytes will always be emitted as literals.
- */
- } while (--zip_prev_length !== 0);
- zip_match_available = 0;
- zip_match_length = zip_MIN_MATCH - 1;
- zip_strstart++;
- if (flush) {
- zip_flush_block(0);
- zip_block_start = zip_strstart;
- }
- } else if (zip_match_available !== 0) {
- /* If there was no match at the previous position, output a
- * single literal. If there was a match but the current match
- * is longer, truncate the previous match to a single literal.
- */
- if (zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff)) {
- zip_flush_block(0);
- zip_block_start = zip_strstart;
- }
- zip_strstart++;
- zip_lookahead--;
- } else {
- /* There is no previous match to compare with, wait for
- * the next step to decide.
- */
- zip_match_available = 1;
- zip_strstart++;
- zip_lookahead--;
- }
-
- /* Make sure that we always have enough lookahead, except
- * at the end of the input file. We need MAX_MATCH bytes
- * for the next match, plus MIN_MATCH bytes to insert the
- * string following the next match.
- */
- while (zip_lookahead < zip_MIN_LOOKAHEAD && !zip_eofile) {
- zip_fill_window();
- }
- }
- };
-
- /* ==========================================================================
- * Allocate the match buffer, initialize the various tables and save the
- * location of the internal file attribute (ascii/binary) and method
- * (DEFLATE/STORE).
- */
- var zip_ct_init = function () {
- var n; // iterates over tree elements
- var bits; // bit counter
- var length; // length value
- var code; // code value
- var dist; // distance index
-
- if (zip_static_dtree[0].dl !== 0) {
- return; // ct_init already called
- }
-
- zip_l_desc.dyn_tree = zip_dyn_ltree;
- zip_l_desc.static_tree = zip_static_ltree;
- zip_l_desc.extra_bits = zip_extra_lbits;
- zip_l_desc.extra_base = zip_LITERALS + 1;
- zip_l_desc.elems = zip_L_CODES;
- zip_l_desc.max_length = zip_MAX_BITS;
- zip_l_desc.max_code = 0;
-
- zip_d_desc.dyn_tree = zip_dyn_dtree;
- zip_d_desc.static_tree = zip_static_dtree;
- zip_d_desc.extra_bits = zip_extra_dbits;
- zip_d_desc.extra_base = 0;
- zip_d_desc.elems = zip_D_CODES;
- zip_d_desc.max_length = zip_MAX_BITS;
- zip_d_desc.max_code = 0;
-
- zip_bl_desc.dyn_tree = zip_bl_tree;
- zip_bl_desc.static_tree = null;
- zip_bl_desc.extra_bits = zip_extra_blbits;
- zip_bl_desc.extra_base = 0;
- zip_bl_desc.elems = zip_BL_CODES;
- zip_bl_desc.max_length = zip_MAX_BL_BITS;
- zip_bl_desc.max_code = 0;
-
- // Initialize the mapping length (0..255) -> length code (0..28)
- length = 0;
- for (code = 0; code < zip_LENGTH_CODES - 1; code++) {
- zip_base_length[code] = length;
- for (n = 0; n < (1 << zip_extra_lbits[code]); n++) {
- zip_length_code[length++] = code;
- }
- }
- // Assert (length == 256, "ct_init: length != 256");
-
- /* Note that the length 255 (match length 258) can be represented
- * in two different ways: code 284 + 5 bits or code 285, so we
- * overwrite length_code[255] to use the best encoding:
- */
- zip_length_code[length - 1] = code;
-
- /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
- dist = 0;
- for (code = 0; code < 16; code++) {
- zip_base_dist[code] = dist;
- for (n = 0; n < (1 << zip_extra_dbits[code]); n++) {
- zip_dist_code[dist++] = code;
- }
- }
- // Assert (dist == 256, "ct_init: dist != 256");
- dist >>= 7; // from now on, all distances are divided by 128
- n = code;
- for (code = n; code < zip_D_CODES; code++) {
- zip_base_dist[code] = dist << 7;
- for (n = 0; n < (1 << (zip_extra_dbits[code] - 7)); n++) {
- zip_dist_code[256 + dist++] = code;
- }
- }
- // Assert (dist == 256, "ct_init: 256+dist != 512");
-
- // Construct the codes of the static literal tree
- for (bits = 0; bits <= zip_MAX_BITS; bits++) {
- zip_bl_count[bits] = 0;
- }
- n = 0;
- while (n <= 143) {
- zip_static_ltree[n++].dl = 8;
- zip_bl_count[8]++;
- }
- while (n <= 255) {
- zip_static_ltree[n++].dl = 9;
- zip_bl_count[9]++;
- }
- while (n <= 279) {
- zip_static_ltree[n++].dl = 7;
- zip_bl_count[7]++;
- }
- while (n <= 287) {
- zip_static_ltree[n++].dl = 8;
- zip_bl_count[8]++;
- }
- /* Codes 286 and 287 do not exist, but we must include them in the
- * tree construction to get a canonical Huffman tree (longest code
- * all ones)
- */
- zip_gen_codes(zip_static_ltree, zip_L_CODES + 1);
-
- /* The static distance tree is trivial: */
- for (n = 0; n < zip_D_CODES; n++) {
- zip_static_dtree[n].dl = 5;
- zip_static_dtree[n].fc = zip_bi_reverse(n, 5);
- }
-
- // Initialize the first block of the first file:
- zip_init_block();
- };
-
-
- var zip_init_deflate = function () {
- if (zip_eofile) {
- return;
- }
- zip_bi_buf = 0;
- zip_bi_valid = 0;
- zip_ct_init();
- zip_lm_init();
-
- zip_qhead = null;
- zip_outcnt = 0;
- zip_outoff = 0;
-
- if (zip_compr_level <= 3) {
- zip_prev_length = zip_MIN_MATCH - 1;
- zip_match_length = 0;
- } else {
- zip_match_length = zip_MIN_MATCH - 1;
- zip_match_available = 0;
- }
-
- zip_complete = false;
- };
-
- var zip_qcopy = function (buff, off, buff_size) {
- var n, i, j;
-
- n = 0;
- while (zip_qhead !== null && n < buff_size) {
- i = buff_size - n;
- if (i > zip_qhead.len) {
- i = zip_qhead.len;
- }
- // System.arraycopy(qhead.ptr, qhead.off, buff, off + n, i);
- for (j = 0; j < i; j++) {
- buff[off + n + j] = zip_qhead.ptr[zip_qhead.off + j];
- }
-
- zip_qhead.off += i;
- zip_qhead.len -= i;
- n += i;
- if (zip_qhead.len === 0) {
- var p;
- p = zip_qhead;
- zip_qhead = zip_qhead.next;
- zip_reuse_queue(p);
- }
- }
-
- if (n === buff_size) {
- return n;
- }
-
- if (zip_outoff < zip_outcnt) {
- i = buff_size - n;
- if (i > zip_outcnt - zip_outoff) {
- i = zip_outcnt - zip_outoff;
- }
- // System.arraycopy(outbuf, outoff, buff, off + n, i);
- for (j = 0; j < i; j++) {
- buff[off + n + j] = zip_outbuf[zip_outoff + j];
- }
- zip_outoff += i;
- n += i;
- if (zip_outcnt === zip_outoff) {
- zip_outcnt = zip_outoff = 0;
- }
- }
- return n;
- };
-
- /* ==========================================================================
- * Same as above, but achieves better compression. We use a lazy
- * evaluation for matches: a match is finally adopted only if there is
- * no better match at the next window position.
- */
- var zip_deflate_internal = function (buff, off, buff_size) {
- var n;
-
- if (!zip_initflag) {
- zip_init_deflate();
- zip_initflag = true;
- if (zip_lookahead === 0) { // empty
- zip_complete = true;
- return 0;
- }
- }
-
- if ((n = zip_qcopy(buff, off, buff_size)) === buff_size) {
- return buff_size;
- }
-
- if (zip_complete) {
- return n;
- }
-
- if (zip_compr_level <= 3) { // optimized for speed
- zip_deflate_fast();
- } else {
- zip_deflate_better();
- }
- if (zip_lookahead === 0) {
- if (zip_match_available !== 0) {
- zip_ct_tally(0, zip_window[zip_strstart - 1] & 0xff);
- }
- zip_flush_block(1);
- zip_complete = true;
- }
- return n + zip_qcopy(buff, n + off, buff_size - n);
- };
-
- var zip_deflate = function (str, level) {
- var i, j;
-
- zip_deflate_data = str;
- zip_deflate_pos = 0;
- if (typeof level === "undefined") {
- level = zip_DEFAULT_LEVEL;
- }
- zip_deflate_start(level);
-
- var buff = new Array(1024);
- var aout = [];
- while ((i = zip_deflate_internal(buff, 0, buff.length)) > 0) {
- var cbuf = [];
- cbuf.length = i;
- for (j = 0; j < i; j++) {
- cbuf[j] = String.fromCharCode(buff[j]);
- }
- aout[aout.length] = cbuf.join("");
- }
- zip_deflate_data = null; // G.C.
- return aout.join("");
- };
-
- this.deflate = zip_deflate;
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/core/RawInflate.js b/apps/files_odfviewer/src/webodf/webodf/lib/core/RawInflate.js
deleted file mode 100644
index 0005ea56ead..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/core/RawInflate.js
+++ /dev/null
@@ -1,790 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global core*/
-/*
- * $Id: rawinflate.js,v 0.2 2009/03/01 18:32:24 dankogai Exp $
- *
- * original:
- * http://www.onicos.com/staff/iz/amuse/javascript/expert/inflate.txt
- */
-
-/**
- * @constructor
- */
-core.RawInflate = function RawInflate() {
-
-/* Copyright (C) 1999 Masanao Izumo <iz@onicos.co.jp>
- * Version: 1.0.0.1
- * LastModified: Dec 25 1999
- */
-
-/* Interface:
- * data = zip_inflate(src);
- */
-
-/* constant parameters */
-var zip_WSIZE = 32768; // Sliding Window size
-var zip_STORED_BLOCK = 0;
-var zip_STATIC_TREES = 1;
-var zip_DYN_TREES = 2;
-
-/* for inflate */
-var zip_lbits = 9; // bits in base literal/length lookup table
-var zip_dbits = 6; // bits in base distance lookup table
-var zip_INBUFSIZ = 32768; // Input buffer size
-var zip_INBUF_EXTRA = 64; // Extra buffer
-
-/* variables (inflate) */
-var zip_slide;
-var zip_wp; // current position in slide
-var zip_fixed_tl = null; // inflate static
-var zip_fixed_td; // inflate static
-var zip_fixed_bl, fixed_bd; // inflate static
-var zip_bit_buf; // bit buffer
-var zip_bit_len; // bits in bit buffer
-var zip_method;
-var zip_eof;
-var zip_copy_leng;
-var zip_copy_dist;
-var zip_tl, zip_td; // literal/length and distance decoder tables
-var zip_bl, zip_bd; // number of bits decoded by tl and td
-
-var zip_inflate_data;
-var zip_inflate_pos;
-
-
-/* constant tables (inflate) */
-var zip_MASK_BITS = new Array(
- 0x0000,
- 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
- 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff);
-// Tables for deflate from PKZIP's appnote.txt.
-var zip_cplens = new Array( // Copy lengths for literal codes 257..285
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
- 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0);
-/* note: see note #13 above about the 258 in this list. */
-var zip_cplext = new Array( // Extra bits for literal codes 257..285
- 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
- 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99); // 99==invalid
-var zip_cpdist = new Array( // Copy offsets for distance codes 0..29
- 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
- 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
- 8193, 12289, 16385, 24577);
-var zip_cpdext = new Array( // Extra bits for distance codes
- 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
- 7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
- 12, 12, 13, 13);
-var zip_border = new Array( // Order of the bit length code lengths
- 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15);
-/* objects (inflate) */
-
-/**
- * @constructor
- */
-var zip_HuftList = function() {
- this.next = null;
- this.list = null;
-}
-
-/**
- * @constructor
- */
-var zip_HuftNode = function() {
- this.e = 0; // number of extra bits or operation
- this.b = 0; // number of bits in this code or subcode
-
- // union
- this.n = 0; // literal, length base, or distance base
- this.t = null; // (zip_HuftNode) pointer to next level of table
-}
-
-/**
- * @constructor
- */
-var zip_HuftBuild = function(b, // code lengths in bits (all assumed <= BMAX)
- n, // number of codes (assumed <= N_MAX)
- s, // number of simple-valued codes (0..s-1)
- d, // list of base values for non-simple codes
- e, // list of extra bits for non-simple codes
- mm // maximum lookup bits
- ) {
- this.BMAX = 16; // maximum bit length of any code
- this.N_MAX = 288; // maximum number of codes in any set
- this.status = 0; // 0: success, 1: incomplete table, 2: bad input
- this.root = null; // (zip_HuftList) starting table
- this.m = 0; // maximum lookup bits, returns actual
-
-/* Given a list of code lengths and a maximum table size, make a set of
- tables to decode that set of codes. Return zero on success, one if
- the given code set is incomplete (the tables are still built in this
- case), two if the input is invalid (all zero length codes or an
- oversubscribed set of lengths), and three if not enough memory.
- The code with value 256 is special, and the tables are constructed
- so that no bits beyond that code are fetched when that code is
- decoded. */
- {
- var a; // counter for codes of length k
- var c = new Array(this.BMAX+1); // bit length count table
- var el; // length of EOB code (value 256)
- var f; // i repeats in table every f entries
- var g; // maximum code length
- var h; // table level
- var i; // counter, current code
- var j; // counter
- var k; // number of bits in current code
- var lx = new Array(this.BMAX+1); // stack of bits per table
- var p; // pointer into c[], b[], or v[]
- var pidx; // index of p
- var q; // (zip_HuftNode) points to current table
- var r = new zip_HuftNode(); // table entry for structure assignment
- var u = new Array(this.BMAX); // zip_HuftNode[BMAX][] table stack
- var v = new Array(this.N_MAX); // values in order of bit length
- var w;
- var x = new Array(this.BMAX+1);// bit offsets, then code stack
- var xp; // pointer into x or c
- var y; // number of dummy codes added
- var z; // number of entries in current table
- var o;
- var tail; // (zip_HuftList)
-
- tail = this.root = null;
- for(i = 0; i < c.length; i++)
- c[i] = 0;
- for(i = 0; i < lx.length; i++)
- lx[i] = 0;
- for(i = 0; i < u.length; i++)
- u[i] = null;
- for(i = 0; i < v.length; i++)
- v[i] = 0;
- for(i = 0; i < x.length; i++)
- x[i] = 0;
-
- // Generate counts for each bit length
- el = n > 256 ? b[256] : this.BMAX; // set length of EOB code, if any
- p = b; pidx = 0;
- i = n;
- do {
- c[p[pidx]]++; // assume all entries <= BMAX
- pidx++;
- } while(--i > 0);
- if(c[0] == n) { // null input--all zero length codes
- this.root = null;
- this.m = 0;
- this.status = 0;
- return;
- }
-
- // Find minimum and maximum length, bound *m by those
- for(j = 1; j <= this.BMAX; j++)
- if(c[j] != 0)
- break;
- k = j; // minimum code length
- if(mm < j)
- mm = j;
- for(i = this.BMAX; i != 0; i--)
- if(c[i] != 0)
- break;
- g = i; // maximum code length
- if(mm > i)
- mm = i;
-
- // Adjust last length count to fill out codes, if needed
- for(y = 1 << j; j < i; j++, y <<= 1)
- if((y -= c[j]) < 0) {
- this.status = 2; // bad input: more codes than bits
- this.m = mm;
- return;
- }
- if((y -= c[i]) < 0) {
- this.status = 2;
- this.m = mm;
- return;
- }
- c[i] += y;
-
- // Generate starting offsets into the value table for each length
- x[1] = j = 0;
- p = c;
- pidx = 1;
- xp = 2;
- while(--i > 0) // note that i == g from above
- x[xp++] = (j += p[pidx++]);
-
- // Make a table of values in order of bit lengths
- p = b; pidx = 0;
- i = 0;
- do {
- if((j = p[pidx++]) != 0)
- v[x[j]++] = i;
- } while(++i < n);
- n = x[g]; // set n to length of v
-
- // Generate the Huffman codes and for each, make the table entries
- x[0] = i = 0; // first Huffman code is zero
- p = v; pidx = 0; // grab values in bit order
- h = -1; // no tables yet--level -1
- w = lx[0] = 0; // no bits decoded yet
- q = null; // ditto
- z = 0; // ditto
-
- // go through the bit lengths (k already is bits in shortest code)
- for(; k <= g; k++) {
- a = c[k];
- while(a-- > 0) {
- // here i is the Huffman code of length k bits for value p[pidx]
- // make tables up to required level
- while(k > w + lx[1 + h]) {
- w += lx[1 + h]; // add bits already decoded
- h++;
-
- // compute minimum size table less than or equal to *m bits
- z = (z = g - w) > mm ? mm : z; // upper limit
- if((f = 1 << (j = k - w)) > a + 1) { // try a k-w bit table
- // too few codes for k-w bit table
- f -= a + 1; // deduct codes from patterns left
- xp = k;
- while(++j < z) { // try smaller tables up to z bits
- if((f <<= 1) <= c[++xp])
- break; // enough codes to use up j bits
- f -= c[xp]; // else deduct codes from patterns
- }
- }
- if(w + j > el && w < el)
- j = el - w; // make EOB code end at table
- z = 1 << j; // table entries for j-bit table
- lx[1 + h] = j; // set table size in stack
-
- // allocate and link in new table
- q = new Array(z);
- for(o = 0; o < z; o++) {
- q[o] = new zip_HuftNode();
- }
-
- if(tail == null)
- tail = this.root = new zip_HuftList();
- else
- tail = tail.next = new zip_HuftList();
- tail.next = null;
- tail.list = q;
- u[h] = q; // table starts after link
-
- /* connect to last table, if there is one */
- if(h > 0) {
- x[h] = i; // save pattern for backing up
- r.b = lx[h]; // bits to dump before this table
- r.e = 16 + j; // bits in this table
- r.t = q; // pointer to this table
- j = (i & ((1 << w) - 1)) >> (w - lx[h]);
- u[h-1][j].e = r.e;
- u[h-1][j].b = r.b;
- u[h-1][j].n = r.n;
- u[h-1][j].t = r.t;
- }
- }
-
- // set up table entry in r
- r.b = k - w;
- if(pidx >= n)
- r.e = 99; // out of values--invalid code
- else if(p[pidx] < s) {
- r.e = (p[pidx] < 256 ? 16 : 15); // 256 is end-of-block code
- r.n = p[pidx++]; // simple code is just the value
- } else {
- r.e = e[p[pidx] - s]; // non-simple--look up in lists
- r.n = d[p[pidx++] - s];
- }
-
- // fill code-like entries with r //
- f = 1 << (k - w);
- for(j = i >> w; j < z; j += f) {
- q[j].e = r.e;
- q[j].b = r.b;
- q[j].n = r.n;
- q[j].t = r.t;
- }
-
- // backwards increment the k-bit code i
- for(j = 1 << (k - 1); (i & j) != 0; j >>= 1)
- i ^= j;
- i ^= j;
-
- // backup over finished tables
- while((i & ((1 << w) - 1)) != x[h]) {
- w -= lx[h]; // don't need to update q
- h--;
- }
- }
- }
-
- /* return actual size of base table */
- this.m = lx[1];
-
- /* Return true (1) if we were given an incomplete table */
- this.status = ((y != 0 && g != 1) ? 1 : 0);
- } /* end of constructor */
-}
-
-
-/* routines (inflate) */
-
-var zip_GET_BYTE = function() {
- if(zip_inflate_data.length == zip_inflate_pos)
- return -1;
- return zip_inflate_data[zip_inflate_pos++];
-}
-
-var zip_NEEDBITS = function(n) {
- while(zip_bit_len < n) {
- zip_bit_buf |= zip_GET_BYTE() << zip_bit_len;
- zip_bit_len += 8;
- }
-}
-
-var zip_GETBITS = function(n) {
- return zip_bit_buf & zip_MASK_BITS[n];
-}
-
-var zip_DUMPBITS = function(n) {
- zip_bit_buf >>= n;
- zip_bit_len -= n;
-}
-
-var zip_inflate_codes = function(buff, off, size) {
- /* inflate (decompress) the codes in a deflated (compressed) block.
- Return an error code or zero if it all goes ok. */
- var e; // table entry flag/number of extra bits
- var t; // (zip_HuftNode) pointer to table entry
- var n;
-
- if(size == 0)
- return 0;
-
- // inflate the coded data
- n = 0;
- for(;;) { // do until end of block
- zip_NEEDBITS(zip_bl);
- t = zip_tl.list[zip_GETBITS(zip_bl)];
- e = t.e;
- while(e > 16) {
- if(e == 99)
- return -1;
- zip_DUMPBITS(t.b);
- e -= 16;
- zip_NEEDBITS(e);
- t = t.t[zip_GETBITS(e)];
- e = t.e;
- }
- zip_DUMPBITS(t.b);
-
- if(e == 16) { // then it's a literal
- zip_wp &= zip_WSIZE - 1;
- buff[off + n++] = zip_slide[zip_wp++] = t.n;
- if(n == size)
- return size;
- continue;
- }
-
- // exit if end of block
- if(e == 15)
- break;
-
- // it's an EOB or a length
-
- // get length of block to copy
- zip_NEEDBITS(e);
- zip_copy_leng = t.n + zip_GETBITS(e);
- zip_DUMPBITS(e);
-
- // decode distance of block to copy
- zip_NEEDBITS(zip_bd);
- t = zip_td.list[zip_GETBITS(zip_bd)];
- e = t.e;
-
- while(e > 16) {
- if(e == 99)
- return -1;
- zip_DUMPBITS(t.b);
- e -= 16;
- zip_NEEDBITS(e);
- t = t.t[zip_GETBITS(e)];
- e = t.e;
- }
- zip_DUMPBITS(t.b);
- zip_NEEDBITS(e);
- zip_copy_dist = zip_wp - t.n - zip_GETBITS(e);
- zip_DUMPBITS(e);
-
- // do the copy
- while(zip_copy_leng > 0 && n < size) {
- zip_copy_leng--;
- zip_copy_dist &= zip_WSIZE - 1;
- zip_wp &= zip_WSIZE - 1;
- buff[off + n++] = zip_slide[zip_wp++]
- = zip_slide[zip_copy_dist++];
- }
-
- if(n == size)
- return size;
- }
-
- zip_method = -1; // done
- return n;
-}
-
-var zip_inflate_stored = function(buff, off, size) {
- /* "decompress" an inflated type 0 (stored) block. */
- var n;
-
- // go to byte boundary
- n = zip_bit_len & 7;
- zip_DUMPBITS(n);
-
- // get the length and its complement
- zip_NEEDBITS(16);
- n = zip_GETBITS(16);
- zip_DUMPBITS(16);
- zip_NEEDBITS(16);
- if(n != ((~zip_bit_buf) & 0xffff))
- return -1; // error in compressed data
- zip_DUMPBITS(16);
-
- // read and output the compressed data
- zip_copy_leng = n;
-
- n = 0;
- while(zip_copy_leng > 0 && n < size) {
- zip_copy_leng--;
- zip_wp &= zip_WSIZE - 1;
- zip_NEEDBITS(8);
- buff[off + n++] = zip_slide[zip_wp++] =
- zip_GETBITS(8);
- zip_DUMPBITS(8);
- }
-
- if(zip_copy_leng == 0)
- zip_method = -1; // done
- return n;
-}
-
-var zip_fixed_bd;
-var zip_inflate_fixed = function(buff, off, size) {
- /* decompress an inflated type 1 (fixed Huffman codes) block. We should
- either replace this with a custom decoder, or at least precompute the
- Huffman tables. */
-
- // if first time, set up tables for fixed blocks
- if(zip_fixed_tl == null) {
- var i; // temporary variable
- var l = new Array(288); // length list for huft_build
- var h; // zip_HuftBuild
-
- // literal table
- for(i = 0; i < 144; i++)
- l[i] = 8;
- for(; i < 256; i++)
- l[i] = 9;
- for(; i < 280; i++)
- l[i] = 7;
- for(; i < 288; i++) // make a complete, but wrong code set
- l[i] = 8;
- zip_fixed_bl = 7;
-
- h = new zip_HuftBuild(l, 288, 257, zip_cplens, zip_cplext,
- zip_fixed_bl);
- if(h.status != 0) {
- alert("HufBuild error: "+h.status);
- return -1;
- }
- zip_fixed_tl = h.root;
- zip_fixed_bl = h.m;
-
- // distance table
- for(i = 0; i < 30; i++) // make an incomplete code set
- l[i] = 5;
- zip_fixed_bd = 5;
-
- h = new zip_HuftBuild(l, 30, 0, zip_cpdist, zip_cpdext, zip_fixed_bd);
- if(h.status > 1) {
- zip_fixed_tl = null;
- alert("HufBuild error: "+h.status);
- return -1;
- }
- zip_fixed_td = h.root;
- zip_fixed_bd = h.m;
- }
-
- zip_tl = zip_fixed_tl;
- zip_td = zip_fixed_td;
- zip_bl = zip_fixed_bl;
- zip_bd = zip_fixed_bd;
- return zip_inflate_codes(buff, off, size);
-}
-
-var zip_inflate_dynamic = function(buff, off, size) {
- // decompress an inflated type 2 (dynamic Huffman codes) block.
- var i; // temporary variables
- var j;
- var l; // last length
- var n; // number of lengths to get
- var t; // (zip_HuftNode) literal/length code table
- var nb; // number of bit length codes
- var nl; // number of literal/length codes
- var nd; // number of distance codes
- var ll = new Array(286+30); // literal/length and distance code lengths
- var h; // (zip_HuftBuild)
-
- for(i = 0; i < ll.length; i++)
- ll[i] = 0;
-
- // read in table lengths
- zip_NEEDBITS(5);
- nl = 257 + zip_GETBITS(5); // number of literal/length codes
- zip_DUMPBITS(5);
- zip_NEEDBITS(5);
- nd = 1 + zip_GETBITS(5); // number of distance codes
- zip_DUMPBITS(5);
- zip_NEEDBITS(4);
- nb = 4 + zip_GETBITS(4); // number of bit length codes
- zip_DUMPBITS(4);
- if(nl > 286 || nd > 30)
- return -1; // bad lengths
-
- // read in bit-length-code lengths
- for(j = 0; j < nb; j++)
- {
- zip_NEEDBITS(3);
- ll[zip_border[j]] = zip_GETBITS(3);
- zip_DUMPBITS(3);
- }
- for(; j < 19; j++)
- ll[zip_border[j]] = 0;
-
- // build decoding table for trees--single level, 7 bit lookup
- zip_bl = 7;
- h = new zip_HuftBuild(ll, 19, 19, null, null, zip_bl);
- if(h.status != 0)
- return -1; // incomplete code set
-
- zip_tl = h.root;
- zip_bl = h.m;
-
- // read in literal and distance code lengths
- n = nl + nd;
- i = l = 0;
- while(i < n) {
- zip_NEEDBITS(zip_bl);
- t = zip_tl.list[zip_GETBITS(zip_bl)];
- j = t.b;
- zip_DUMPBITS(j);
- j = t.n;
- if(j < 16) // length of code in bits (0..15)
- ll[i++] = l = j; // save last length in l
- else if(j == 16) { // repeat last length 3 to 6 times
- zip_NEEDBITS(2);
- j = 3 + zip_GETBITS(2);
- zip_DUMPBITS(2);
- if(i + j > n)
- return -1;
- while(j-- > 0)
- ll[i++] = l;
- } else if(j == 17) { // 3 to 10 zero length codes
- zip_NEEDBITS(3);
- j = 3 + zip_GETBITS(3);
- zip_DUMPBITS(3);
- if(i + j > n)
- return -1;
- while(j-- > 0)
- ll[i++] = 0;
- l = 0;
- } else { // j == 18: 11 to 138 zero length codes
- zip_NEEDBITS(7);
- j = 11 + zip_GETBITS(7);
- zip_DUMPBITS(7);
- if(i + j > n)
- return -1;
- while(j-- > 0)
- ll[i++] = 0;
- l = 0;
- }
- }
-
- // build the decoding tables for literal/length and distance codes
- zip_bl = zip_lbits;
- h = new zip_HuftBuild(ll, nl, 257, zip_cplens, zip_cplext, zip_bl);
- if(zip_bl == 0) // no literals or lengths
- h.status = 1;
- if(h.status != 0) {
- //if(h.status == 1)
- // ;// **incomplete literal tree**
- return -1; // incomplete code set
- }
- zip_tl = h.root;
- zip_bl = h.m;
-
- for(i = 0; i < nd; i++)
- ll[i] = ll[i + nl];
- zip_bd = zip_dbits;
- h = new zip_HuftBuild(ll, nd, 0, zip_cpdist, zip_cpdext, zip_bd);
- zip_td = h.root;
- zip_bd = h.m;
-
- if(zip_bd == 0 && nl > 257) { // lengths but no distances
- // **incomplete distance tree**
- return -1;
- }
-
- //if(h.status == 1) {
-// ;// **incomplete distance tree**
- //}
- if(h.status != 0)
- return -1;
-
- // decompress until an end-of-block code
- return zip_inflate_codes(buff, off, size);
-}
-
-var zip_inflate_start = function() {
- var i;
-
- if(zip_slide == null)
- zip_slide = new Array(2 * zip_WSIZE);
- zip_wp = 0;
- zip_bit_buf = 0;
- zip_bit_len = 0;
- zip_method = -1;
- zip_eof = false;
- zip_copy_leng = zip_copy_dist = 0;
- zip_tl = null;
-}
-
-var zip_inflate_internal = function(buff, off, size) {
- // decompress an inflated entry
- var n, i;
-
- n = 0;
- while(n < size) {
- if(zip_eof && zip_method == -1)
- return n;
-
- if(zip_copy_leng > 0) {
- if(zip_method != zip_STORED_BLOCK) {
- // STATIC_TREES or DYN_TREES
- while(zip_copy_leng > 0 && n < size) {
- zip_copy_leng--;
- zip_copy_dist &= zip_WSIZE - 1;
- zip_wp &= zip_WSIZE - 1;
- buff[off + n++] = zip_slide[zip_wp++] =
- zip_slide[zip_copy_dist++];
- }
- } else {
- while(zip_copy_leng > 0 && n < size) {
- zip_copy_leng--;
- zip_wp &= zip_WSIZE - 1;
- zip_NEEDBITS(8);
- buff[off + n++] = zip_slide[zip_wp++] = zip_GETBITS(8);
- zip_DUMPBITS(8);
- }
- if(zip_copy_leng == 0)
- zip_method = -1; // done
- }
- if(n == size)
- return n;
- }
-
- if(zip_method == -1) {
- if(zip_eof)
- break;
-
- // read in last block bit
- zip_NEEDBITS(1);
- if(zip_GETBITS(1) != 0)
- zip_eof = true;
- zip_DUMPBITS(1);
-
- // read in block type
- zip_NEEDBITS(2);
- zip_method = zip_GETBITS(2);
- zip_DUMPBITS(2);
- zip_tl = null;
- zip_copy_leng = 0;
- }
-
- switch(zip_method) {
- case 0: // zip_STORED_BLOCK
- i = zip_inflate_stored(buff, off + n, size - n);
- break;
-
- case 1: // zip_STATIC_TREES
- if(zip_tl != null)
- i = zip_inflate_codes(buff, off + n, size - n);
- else
- i = zip_inflate_fixed(buff, off + n, size - n);
- break;
-
- case 2: // zip_DYN_TREES
- if(zip_tl != null)
- i = zip_inflate_codes(buff, off + n, size - n);
- else
- i = zip_inflate_dynamic(buff, off + n, size - n);
- break;
-
- default: // error
- i = -1;
- break;
- }
-
- if(i == -1) {
- if(zip_eof)
- return 0;
- return -1;
- }
- n += i;
- }
- return n;
-}
-
-var zip_inflate = function(data, size) {
- var i, j;
-
- zip_inflate_start();
- zip_inflate_data = data;
- zip_inflate_pos = 0;
-
- var buff = new runtime.ByteArray(size);
- zip_inflate_internal(buff, 0, size);
- zip_inflate_data = null; // G.C.
- return buff;
-}
-
-this.inflate = zip_inflate;
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/core/UnitTester.js b/apps/files_odfviewer/src/webodf/webodf/lib/core/UnitTester.js
deleted file mode 100644
index 4dbe1fa2c05..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/core/UnitTester.js
+++ /dev/null
@@ -1,255 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, Runtime: true, core: true*/
-/*jslint evil: true*/
-/**
- * @interface
- */
-core.UnitTest = function UnitTest() {"use strict";};
-/**
- * @return {undefined}
- */
-core.UnitTest.prototype.setUp = function () {"use strict";};
-/**
- * @return {undefined}
- */
-core.UnitTest.prototype.tearDown = function () {"use strict";};
-/**
- * @return {!string}
- */
-core.UnitTest.prototype.description = function () {"use strict";};
-/**
- * @return {Array.<!function():undefined>}
- */
-core.UnitTest.prototype.tests = function () {"use strict";};
-/**
- * @return {Array.<!function(!function():undefined):undefined>}
- */
-core.UnitTest.prototype.asyncTests = function () {"use strict";};
-
-/**
- * @constructor
- */
-core.UnitTestRunner = function UnitTestRunner() {
- "use strict";
- var failedTests = 0;
- function debug(msg) {
- runtime.log(msg);
- }
- function testFailed(msg) {
- failedTests += 1;
- runtime.log("fail", msg);
- }
- function testPassed(msg) {
- runtime.log("pass", msg);
- }
- function areArraysEqual(a, b) {
- var i;
- try {
- if (a.length !== b.length) {
- return false;
- }
- for (i = 0; i < a.length; i += 1) {
- if (a[i] !== b[i]) {
- return false;
- }
- }
- } catch (ex) {
- return false;
- }
- return true;
- }
- function isResultCorrect(actual, expected) {
- if (expected === 0) {
- return actual === expected && (1 / actual) === (1 / expected);
- }
- if (actual === expected) {
- return true;
- }
- if (typeof expected === "number" && isNaN(expected)) {
- return typeof actual === "number" && isNaN(actual);
- }
- if (Object.prototype.toString.call(expected) ===
- Object.prototype.toString.call([])) {
- return areArraysEqual(actual, expected);
- }
- return false;
- }
- function stringify(v) {
- if (v === 0 && 1 / v < 0) {
- return "-0";
- }
- return String(v);
- }
- /**
- * @param {!Object} t
- * @param {!string} a
- * @param {!string} b
- * @return {undefined}
- */
- function shouldBe(t, a, b) {
- if (typeof a !== "string" || typeof b !== "string") {
- debug("WARN: shouldBe() expects string arguments");
- }
- var exception, av, bv;
- try {
- av = eval(a);
- } catch (e) {
- exception = e;
- }
- bv = eval(b);
-
- if (exception) {
- testFailed(a + " should be " + bv + ". Threw exception " +
- exception);
- } else if (isResultCorrect(av, bv)) {
- testPassed(a + " is " + b);
- } else if (typeof av === typeof bv) {
- testFailed(a + " should be " + bv + ". Was " + stringify(av) + ".");
- } else {
- testFailed(a + " should be " + bv + " (of type " + typeof bv +
- "). Was " + av + " (of type " + typeof av + ").");
- }
- }
- /**
- * @param {!Object} t context in which values to be tested are placed
- * @param {!string} a the value to be checked
- * @return {undefined}
- */
- function shouldBeNonNull(t, a) {
- var exception, av;
- try {
- av = eval(a);
- } catch (e) {
- exception = e;
- }
-
- if (exception) {
- testFailed(a + " should be non-null. Threw exception " + exception);
- } else if (av !== null) {
- testPassed(a + " is non-null.");
- } else {
- testFailed(a + " should be non-null. Was " + av);
- }
- }
- /**
- * @param {!Object} t context in which values to be tested are placed
- * @param {!string} a the value to be checked
- * @return {undefined}
- */
- function shouldBeNull(t, a) {
- shouldBe(t, a, "null");
- }
- this.shouldBeNull = shouldBeNull;
- this.shouldBeNonNull = shouldBeNonNull;
- this.shouldBe = shouldBe;
- this.countFailedTests = function () {
- return failedTests;
- };
-};
-
-/**
- * @constructor
- */
-core.UnitTester = function UnitTester() {
- "use strict";
- var failedTests = 0,
- results = {};
- /**
- * @param {Function} TestClass the constructor for the test class
- * @param {!function():undefined} callback
- * @return {undefined}
- */
- this.runTests = function (TestClass, callback) {
- var testName = Runtime.getFunctionName(TestClass),
- tname,
- runner = new core.UnitTestRunner(),
- test = new TestClass(runner),
- testResults = {},
- i,
- t,
- tests,
- lastFailCount;
-
- // check that this test has not been run or started yet
- if (testName.hasOwnProperty(results)) {
- runtime.log("Test " + testName + " has already run.");
- return;
- }
-
- runtime.log("Running " + testName + ": " + test.description());
- tests = test.tests();
- for (i = 0; i < tests.length; i += 1) {
- t = tests[i];
- tname = Runtime.getFunctionName(t);
- runtime.log("Running " + tname);
- lastFailCount = runner.countFailedTests();
- test.setUp();
- t();
- test.tearDown();
- testResults[tname] = lastFailCount === runner.countFailedTests();
- }
- function runAsyncTests(todo) {
- if (todo.length === 0) {
- results[testName] = testResults;
- failedTests += runner.countFailedTests();
- callback();
- return;
- }
- t = todo[0];
- var tname = Runtime.getFunctionName(t);
- runtime.log("Running " + tname);
- lastFailCount = runner.countFailedTests();
- test.setUp();
- t(function () {
- test.tearDown();
- testResults[tname] = lastFailCount ===
- runner.countFailedTests();
- runAsyncTests(todo.slice(1));
- });
- }
- runAsyncTests(test.asyncTests());
- };
- /**
- * @return {!number}
- **/
- this.countFailedTests = function () {
- return failedTests;
- };
- /**
- * @return {!Object}
- **/
- this.results = function () {
- return results;
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/core/Zip.js b/apps/files_odfviewer/src/webodf/webodf/lib/core/Zip.js
deleted file mode 100644
index 66f508ee396..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/core/Zip.js
+++ /dev/null
@@ -1,600 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime, core, DOMParser*/
-/*jslint bitwise: true*/
-/*
-* @preserve
-* WebODF
-* Copyright (c) 2010 Jos van den Oever
-* Licensed under the ... License:
-*
-* Project home: http://www.webodf.org/
-*/
-
-runtime.loadClass("core.RawInflate");
-runtime.loadClass("core.ByteArray");
-runtime.loadClass("core.ByteArrayWriter");
-runtime.loadClass("core.Base64");
-
-/**
- * @constructor
- * @param {!string} url path to zip file, should be readable by the runtime
- * @param {?function(?string, !core.Zip):undefined} entriesReadCallback callback
- * indicating the zip
- * has loaded this list of entries, the arguments are a string that
- * indicates error if present and the created object
- */
-core.Zip = function Zip(url, entriesReadCallback) {
- "use strict";
- var /**@type{Array.<!ZipEntry>}*/ entries,
- /**@type{number}*/ filesize,
- /**@type{number}*/ nEntries,
- /**@type{Function}*/ inflate = new core.RawInflate().inflate,
- /**@type{!core.Zip}*/ zip = this,
- base64 = new core.Base64();
-
- /**
- * @param {!Runtime.ByteArray} data
- * @return {!number}
- */
- function crc32(data) {
- // Calculate the crc32 polynomial of a string
- //
- // version: 1009.2513
- // discuss at: http:\/\/phpjs.org\/functions\/crc32
- // + original by: Webtoolkit.info (http:\/\/www.webtoolkit.info\/)
- // + improved by: T0bsn
- // - depends on: utf8_encode
- // * example 1: crc32('Kevin van Zonneveld');
- // * returns 1: 1249991249
- var /**@const@type{!Array.<!number>}*/table = [0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D],
- /**@type{!number}*/ crc = 0,
- /**@type{!number}*/ i,
- /**@const@type{!number}*/ iTop = data.length,
- /**@type{!number}*/ x = 0,
- /**@type{!number}*/ y = 0;
- crc = crc ^ (-1);
- for (i = 0; i < iTop; i += 1) {
- y = (crc ^ data[i]) & 0xFF;
- x = table[y];
- crc = (crc >>> 8) ^ x;
- }
- return crc ^ (-1);
- }
-
- /**
- * @param {!number} dostime
- * @return {!Date}
- */
- function dosTime2Date(dostime) {
- var /**@const@type{!number}*/ year = ((dostime >> 25) & 0x7f) + 1980,
- /**@const@type{!number}*/ month = ((dostime >> 21) & 0x0f) - 1,
- /**@const@type{!number}*/ mday = (dostime >> 16) & 0x1f,
- /**@const@type{!number}*/ hour = (dostime >> 11) & 0x0f,
- /**@const@type{!number}*/ min = (dostime >> 5) & 0x3f,
- /**@const@type{!number}*/ sec = (dostime & 0x1f) << 1,
- /**@const@type{!Date}*/ d
- = new Date(year, month, mday, hour, min, sec);
- return d;
- }
- /**
- * @param {!Date} date
- * @return {!number}
- */
- function date2DosTime(date) {
- var /**@const@type{!number}*/ y = date.getFullYear();
- return y < 1980 ? 0 :
- ((y - 1980) << 25) | ((date.getMonth() + 1) << 21) |
- (date.getDate() << 16) | (date.getHours() << 11) |
- (date.getMinutes() << 5) | (date.getSeconds() >> 1);
- }
- /**
- * Create a new ZipEntry.
- * If the stream is not provided, the object should be initialized
- * with ZipEntry.set()
- * @constructor
- * @param {!string} url
- * @param {!core.ByteArray=} stream
- */
- function ZipEntry(url, stream) {
- var /**@const@type{!number}*/ sig,
- /**@const@type{!number}*/ namelen,
- /**@const@type{!number}*/ extralen,
- /**@const@type{!number}*/ commentlen,
- /**@const@type{!number}*/ compressionMethod,
- /**@const@type{!number}*/ compressedSize,
- /**@const@type{!number}*/ uncompressedSize,
- /**@const@type{!number}*/ offset,
- /**@const@type{!number}*/ crc,
- /**@const@type{!ZipEntry}*/ entry = this;
-
- /**
- * @param {!Runtime.ByteArray} data
- * @param {!function(?string, ?Runtime.ByteArray)} callback
- * @return {undefined}
- */
- function handleEntryData(data, callback) {
- var /**@const@type{!core.ByteArray}*/ stream
- = new core.ByteArray(data),
- /**@const@type{!number}*/ sig = stream.readUInt32LE(),
- /**@const@type{!number}*/ filenamelen,
- /**@const@type{!number}*/ extralen;
- if (sig !== 0x04034b50) {
- callback('File entry signature is wrong.' + sig.toString() +
- ' ' + data.length.toString(), null);
- return;
- }
- stream.pos += 22;
- filenamelen = stream.readUInt16LE();
- extralen = stream.readUInt16LE();
- stream.pos += filenamelen + extralen;
- if (compressionMethod) {
- data = data.slice(stream.pos, stream.pos + compressedSize);
- if (compressedSize !== data.length) {
- callback("The amount of compressed bytes read was " +
- data.length.toString() + " instead of " +
- compressedSize.toString() + " for " + entry.filename +
- " in " + url + ".", null);
- return;
- }
- data = inflate(data, uncompressedSize);
- } else {
- data = data.slice(stream.pos, stream.pos + uncompressedSize);
- }
- if (uncompressedSize !== data.length) {
- callback("The amount of bytes read was " +
- data.length.toString() +
- " instead of " + uncompressedSize.toString() + " for " +
- entry.filename + " in " + url + ".", null);
- return;
- }
-/*
- * This check is disabled for performance reasons
- if (crc !== crc32(data)) {
- runtime.log("Warning: CRC32 for " + entry.filename +
- " is wrong.");
- }
-*/
- entry.data = data;
- callback(null, data);
- }
- /**
- * @param {!function(?string, ?Runtime.ByteArray)} callback
- * @return {undefined}
- */
- function load(callback) {
- // if data has already been downloaded, use that
- if (entry.data !== undefined) {
- callback(null, entry.data);
- return;
- }
- // the 256 at the end is security for when local extra field is
- // larger
- var /**@type{!number}*/ size
- = compressedSize + 34 + namelen + extralen + 256;
- if (size + offset > filesize) {
- size = filesize - offset;
- }
- runtime.read(url, offset, size, function (err, data) {
- if (err) {
- callback(err, data);
- } else {
- handleEntryData(data, callback);
- }
- });
- }
- this.load = load;
- /**
- * @param {!string} filename
- * @param {!Runtime.ByteArray} data
- * @param {!boolean} compressed
- * @param {!Date} date
- * @return {undefined}
- */
- function set(filename, data, compressed, date) {
- entry.filename = filename;
- entry.data = data;
- entry.compressed = compressed;
- entry.date = date;
- }
- this.set = set;
- /**
- * @type {?string}
- */
- this.error = null;
-
- if (!stream) {
- return;
- }
- sig = stream.readUInt32LE();
-
- if (sig !== 0x02014b50) {
- this.error =
- "Central directory entry has wrong signature at position " +
- (stream.pos - 4).toString() + ' for file "' + url + '": ' +
- stream.data.length.toString();
- return;
- }
- // stream should be positioned at the start of the CDS entry for the
- // file
- stream.pos += 6;
- compressionMethod = stream.readUInt16LE();
- this.date = dosTime2Date(stream.readUInt32LE());
- crc = stream.readUInt32LE();
- compressedSize = stream.readUInt32LE();
- uncompressedSize = stream.readUInt32LE();
- namelen = stream.readUInt16LE();
- extralen = stream.readUInt16LE();
- commentlen = stream.readUInt16LE();
- stream.pos += 8;
- offset = stream.readUInt32LE();
- this.filename = runtime.byteArrayToString(
- stream.data.slice(stream.pos, stream.pos + namelen), "utf8");
- stream.pos += namelen + extralen + commentlen;
- }
- /**
- * @param {!Runtime.ByteArray} data
- * @param {!function(?string, !core.Zip)} callback
- * @return {undefined}
- */
- function handleCentralDirectory(data, callback) {
- // parse the central directory
- var stream = new core.ByteArray(data), i, e;
- entries = [];
- for (i = 0; i < nEntries; i += 1) {
- e = new ZipEntry(url, stream);
- if (e.error) {
- callback(e.error, zip);
- return;
- }
- entries[entries.length] = e;
- }
- // report that entries are listed and no error occured
- callback(null, zip);
- }
- /**
- * @param {!Runtime.ByteArray} data
- * @param {!function(?string, !core.Zip)} callback
- * @return {undefined}
- */
- function handleCentralDirectoryEnd(data, callback) {
- if (data.length !== 22) {
- callback("Central directory length should be 22.", zip);
- return;
- }
- var stream = new core.ByteArray(data), sig, disk, cddisk, diskNEntries,
- cdsSize, cdsOffset;
- sig = stream.readUInt32LE();
- if (sig !== 0x06054b50) {
- callback('Central directory signature is wrong: ' + sig.toString(),
- zip);
- return;
- }
- disk = stream.readUInt16LE();
- if (disk !== 0) {
- callback('Zip files with non-zero disk numbers are not supported.',
- zip);
- return;
- }
- cddisk = stream.readUInt16LE();
- if (cddisk !== 0) {
- callback('Zip files with non-zero disk numbers are not supported.',
- zip);
- return;
- }
- diskNEntries = stream.readUInt16LE();
- nEntries = stream.readUInt16LE();
- if (diskNEntries !== nEntries) {
- callback('Number of entries is inconsistent.', zip);
- return;
- }
- cdsSize = stream.readUInt32LE();
- cdsOffset = stream.readUInt16LE();
- cdsOffset = filesize - 22 - cdsSize;
-
- // for some reason cdsOffset is not always equal to offset calculated
- // from the central directory size. The latter is reliable.
- runtime.read(url, cdsOffset, filesize - cdsOffset,
- function (err, data) {
- handleCentralDirectory(data, callback);
- });
- }
- /**
- * @param {!string} filename
- * @param {!function(?string, ?Runtime.ByteArray)} callback receiving err and data
- * @return {undefined}
- */
- function load(filename, callback) {
- var entry = null,
- end = filesize,
- e,
- i;
- for (i = 0; i < entries.length; i += 1) {
- e = entries[i];
- if (e.filename === filename) {
- entry = e;
- break;
- }
- }
- if (entry) {
- if (entry.data) {
- callback(null, entry.data);
- } else {
- entry.load(callback);
- }
- } else {
- callback(filename + " not found.", null);
- }
- }
- /**
- * @param {!string} filename
- * @param {!function(?string, ?string)} callback receiving err and data
- * @return {undefined}
- */
- function loadAsString(filename, callback) {
- // the javascript implementation simply reads the file and converts to
- // string
- load(filename, function (err, data) {
- if (err) {
- return callback(err, null);
- }
- data = runtime.byteArrayToString(data, "utf8");
- callback(null, data);
- });
- }
- /**
- * @param {!string} filename
- * @param {!Object} handler
- * @return {undefined}
- */
- function loadContentXmlAsFragments(filename, handler) {
- // the javascript implementation simply reads the file
- loadAsString(filename, function (err, data) {
- if (err) {
- return handler.rootElementReady(err);
- }
- handler.rootElementReady(null, data, true);
- });
- }
- function loadAsDataURL(filename, mimetype, callback) {
- load(filename, function (err, data) {
- if (err) {
- return callback(err, null);
- }
- var /**@const@type{!Runtime.ByteArray}*/p = data,
- chunksize = 45000, // must be multiple of 3 and less than 50000
- i = 0,
- url;
- if (!mimetype) {
- if (p[1] === 0x50 && p[2] === 0x4E && p[3] === 0x47) {
- mimetype = "image/png";
- } else if (p[0] === 0xFF && p[1] === 0xD8 && p[2] === 0xFF) {
- mimetype = "image/jpeg";
- } else if (p[0] === 0x47 && p[1] === 0x49 && p[2] === 0x46) {
- mimetype = "image/gif";
- } else {
- mimetype = "";
- }
- }
- url = 'data:' + mimetype + ';base64,';
- // to avoid exceptions, base64 encoding is done in chunks
- // it would make sense to move this to base64.toBase64
- while (i < data.length) {
- url += base64.convertUTF8ArrayToBase64(
- p.slice(i, Math.min(i + chunksize, p.length))
- );
- i += chunksize;
- }
- callback(null, url);
- });
- }
- function loadAsDOM(filename, callback) {
- loadAsString(filename, function (err, xmldata) {
- if (err) {
- callback(err, null);
- return;
- }
- var parser = new DOMParser();
- xmldata = parser.parseFromString(xmldata, "text/xml");
- callback(null, xmldata);
- });
- }
- /**
- * Add or replace an entry to the zip file.
- * This data is not stored to disk yet, and therefore, no callback is
- * necessary.
- * @param {!string} filename
- * @param {!Runtime.ByteArray} data
- * @param {!boolean} compressed
- * @param {!Date} date
- * @return {undefined}
- */
- function save(filename, data, compressed, date) {
- var i,
- entry;
- for (i = 0; i < entries.length; i += 1) {
- entry = entries[i];
- if (entry.filename === filename) {
- entry.set(filename, data, compressed, date);
- return;
- }
- }
- entry = new ZipEntry(url);
- entry.set(filename, data, compressed, date);
- entries.push(entry);
- }
- /**
- * @param {!ZipEntry} entry
- * @return {!core.ByteArrayWriter}
- */
- function writeEntry(entry) {
- // each entry is currently stored uncompressed
- var data = new core.ByteArrayWriter("utf8"),
- length = 0;
- data.appendArray([0x50, 0x4B, 0x03, 0x04, 0x14, 0, 0, 0, 0, 0]);
- if (entry.data) {
- length = entry.data.length;
- }
- data.appendUInt32LE(date2DosTime(entry.date));
- data.appendUInt32LE(crc32(entry.data));
- data.appendUInt32LE(length); // compressedSize
- data.appendUInt32LE(length); // uncompressedSize
- data.appendUInt16LE(entry.filename.length); // namelen
- data.appendUInt16LE(0); // extralen
- data.appendString(entry.filename);
- if (entry.data) {
- data.appendByteArray(entry.data);
- }
- return data;
- }
- /**
- * @param {!ZipEntry} entry
- * @param {!number} offset
- * @return {!core.ByteArrayWriter}
- */
- function writeCODEntry(entry, offset) {
- // each entry is currently stored uncompressed
- var data = new core.ByteArrayWriter("utf8"),
- length = 0;
- data.appendArray([0x50, 0x4B, 0x01, 0x02, 0x14, 0x00, 0x14, 0x00,
- 0, 0, 0, 0]);
- if (entry.data) {
- length = entry.data.length;
- }
- data.appendUInt32LE(date2DosTime(entry.date));
- data.appendUInt32LE(crc32(entry.data));
- data.appendUInt32LE(length); // compressedSize
- data.appendUInt32LE(length); // uncompressedSize
- data.appendUInt16LE(entry.filename.length); // namelen
- // extralen, commalen, diskno, file attributes
- data.appendArray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
- data.appendUInt32LE(offset);
- data.appendString(entry.filename);
- return data;
- }
- /**
- * @param {!number} position
- * @param {!function(?string):undefined} callback
- * @return {undefined}
- */
- function loadAllEntries(position, callback) {
- if (position === entries.length) {
- callback(null);
- return;
- }
- var entry = entries[position];
- if (entry.data !== undefined) {
- loadAllEntries(position + 1, callback);
- return;
- }
- entry.load(function (err) {
- if (err) {
- callback(err);
- return;
- }
- loadAllEntries(position + 1, callback);
- });
- }
- /**
- * Write the zipfile to the given path.
- * @param {!function(?string):undefined} callback receiving possible err
- * @return {undefined}
- */
- function write(callback) {
- // make sure all data is in memory, for each entry that has data
- // undefined, try to load the entry
- loadAllEntries(0, function (err) {
- if (err) {
- callback(err);
- return;
- }
- var data = new core.ByteArrayWriter("utf8"),
- i, e, codoffset, codsize,
- offsets = [0];
- // write entries
- for (i = 0; i < entries.length; i += 1) {
- data.appendByteArrayWriter(writeEntry(entries[i]));
- offsets.push(data.getLength());
- }
- // write central directory
- codoffset = data.getLength();
- for (i = 0; i < entries.length; i += 1) {
- e = entries[i];
- data.appendByteArrayWriter(writeCODEntry(e, offsets[i]));
- }
- codsize = data.getLength() - codoffset;
- data.appendArray([0x50, 0x4B, 0x05, 0x06, 0, 0, 0, 0]);
- data.appendUInt16LE(entries.length);
- data.appendUInt16LE(entries.length);
- data.appendUInt32LE(codsize);
- data.appendUInt32LE(codoffset);
- data.appendArray([0, 0]);
- runtime.writeFile(url, data.getByteArray(), callback);
- });
- }
-
- this.load = load;
- this.save = save;
- this.write = write;
- // a special function that makes faster odf loading possible
- this.loadContentXmlAsFragments = loadContentXmlAsFragments;
- this.loadAsString = loadAsString;
- this.loadAsDOM = loadAsDOM;
- this.loadAsDataURL = loadAsDataURL;
- this.getEntries = function () {
- return entries.slice();
- };
-
- // determine the file size
- filesize = -1;
- // if no callback is defined, this is a new file
- if (entriesReadCallback === null) {
- entries = [];
- return;
- }
- runtime.getFileSize(url, function (size) {
- filesize = size;
- if (filesize < 0) {
- entriesReadCallback("File '" + url + "' cannot be read.", zip);
- } else {
- runtime.read(url, filesize - 22, 22, function (err, data) {
- // todo: refactor entire zip class
- if (err || entriesReadCallback === null) {
- entriesReadCallback(err, zip);
- } else {
- handleCentralDirectoryEnd(data, entriesReadCallback);
- }
- });
- }
- });
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/core/dummyxmlmodel.js_ b/apps/files_odfviewer/src/webodf/webodf/lib/core/dummyxmlmodel.js_
deleted file mode 100644
index c14ec844110..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/core/dummyxmlmodel.js_
+++ /dev/null
@@ -1,21 +0,0 @@
-/*global exports require*/
-function createDummyXMLModel() {
- var that = {};
-
- function preserveWhitespace(node) {
- return true;
- }
-
- // return an array with child qnames or null for inserting text.
- // the dummy implementation allows text everywhere, but no new elements
- // "*" means all elements are allowed
- // ["#PCDATA", "*"] means any element and text is allowed
- function getAllowedChildren(node, position) {
- return [null];
- }
-
- that.getAllowedChildren = getAllowedChildren;
- that.preserveWhitespace = preserveWhitespace;
- return that;
-}
-exports.createDummyXMLModel = createDummyXMLModel;
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/export.js b/apps/files_odfviewer/src/webodf/webodf/lib/export.js
deleted file mode 100644
index 08982cd424e..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/export.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global window runtime odf*/
-/*jslint sub: true*/
-
-window["runtime"] = runtime;
-runtime["loadClass"] = runtime.loadClass;
-window["odf"] = odf;
-window["odf"]["OdfCanvas"] = odf.OdfCanvas;
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/gui/Caret.js b/apps/files_odfviewer/src/webodf/webodf/lib/gui/Caret.js
deleted file mode 100644
index 744b8b022ae..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/gui/Caret.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global gui*/
-/**
- * Class that represents a caret in a document. In text nodes, a native caret is
- * used via the HTML attribute contentEditable. Outside of text nodes, an empty
- * element representing the caret is used.
- * @constructor
- */
-gui.Caret = function Caret(selection, rootNode) {
- "use strict";
- var document = rootNode.ownerDocument,
- cursorns,
- cursorNode;
- cursorns = 'urn:webodf:names:cursor';
- cursorNode = document.createElementNS(cursorns, 'cursor');
- /**
- * Synchronize the cursor with the current selection.
- * If there is a single collapsed selection range, the cursor will be placed
- * there. If not, the cursor will be removed from the document tree.
- * @return {undefined}
- */
- this.updateToSelection = function () {
- var range;
-// removeCursor();
- if (selection.rangeCount === 1) {
- range = selection.getRangeAt(0);
-/*
- if (range.collapsed) {
- putCursor(range.startContainer, range.startOffset);
- }
-*/
- }
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/gui/PresenterUI.js b/apps/files_odfviewer/src/webodf/webodf/lib/gui/PresenterUI.js
deleted file mode 100644
index c6553cc3af8..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/gui/PresenterUI.js
+++ /dev/null
@@ -1,246 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH - Tobias Hintze
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-
-/*global runtime, gui, odf, core, xmldom, document, window*/
-runtime.loadClass("xmldom.XPath");
-runtime.loadClass("odf.Style2CSS");
-
-gui.PresenterUI = (function () {
- "use strict";
- var s2css = new odf.Style2CSS(),
- xpath = new xmldom.XPath(),
- nsResolver = s2css.namespaceResolver;
-
- return function PresenterUI(odf_element) {
- var self = this;
-
- self.setInitialSlideMode = function () {
- self.startSlideMode('single');
- };
-
- self.keyDownHandler = function (ev) {
- if (ev.target.isContentEditable) { return; }
- if (ev.target.nodeName === 'input') { return; }
- switch (ev.keyCode) {
- case 84: // t - hide/show toolbar
- self.toggleToolbar();
- break;
- case 37: // left
- case 8: // left
- self.prevSlide();
- break;
- case 39: // right
- case 32: // space
- self.nextSlide();
- break;
- case 36: // pos1
- self.firstSlide();
- break;
- case 35: // end
- self.lastSlide();
- break;
- }
- };
-
- self.root = function () { return self.odf_canvas.odfContainer().rootElement; };
-
- self.firstSlide = function () { self.slideChange(function (old, pc) { return 0; }); };
- self.lastSlide = function () { self.slideChange(function (old, pc) { return pc - 1; }); };
-
- self.nextSlide = function () {
- self.slideChange(function (old, pc) { return old + 1 < pc ? old + 1 : -1; });
- };
- self.prevSlide = function () {
- self.slideChange(function (old, pc) { return old < 1 ? -1 : old - 1; });
- };
- // indexChanger gets (idx,pagecount) as parameter and returns the new index
- self.slideChange = function (indexChanger) {
- var pages = self.getPages(self.odf_canvas.odfContainer().rootElement),
- last = -1,
- i = 0,
- newidx,
- pagelist;
- pages.forEach(function (tuple) {
- var name = tuple[0],
- node = tuple[1];
- if (node.hasAttribute('slide_current')) {
- last = i;
- node.removeAttribute('slide_current');
- }
- i += 1;
- });
- newidx = indexChanger(last, pages.length);
- if (newidx === -1) { newidx = last; }
- pages[newidx][1].setAttribute('slide_current', '1');
- pagelist = document.getElementById('pagelist');
- pagelist.selectedIndex = newidx;
- // FIXME this needs to become a sane callback/listener mechanism
- // (and the mode probably a class/instance..)
- if (self.slide_mode === 'cont') {
- window.scrollBy(0, pages[newidx][1].getBoundingClientRect().top - 30);
- }
- };
-
- self.selectSlide = function (idx) {
- self.slideChange(function (old, pc) {
- if (idx >= pc) { return -1; }
- if (idx < 0) { return -1; }
- return idx;
- });
- };
-
- // make one specific slide visible in cont-mode
- self.scrollIntoContView = function (idx) {
- var pages = self.getPages(self.odf_canvas.odfContainer().rootElement);
- if (pages.length === 0) { return; }
- /*
- if (false) {
- // works in chrome
- pages[idx][1].scrollIntoView();
- } else {
- */
- // works in ff
- window.scrollBy(0, pages[idx][1].getBoundingClientRect().top - 30);
- /*}*/
- };
-
- // return a list of tuples (pagename, pagenode)
- self.getPages = function (root) {
- var pagenodes = root.getElementsByTagNameNS(nsResolver('draw'), 'page'),
- pages = [],
- i;
- for (i = 0; i < pagenodes.length; i += 1) {
- pages.push([
- pagenodes[i].getAttribute('draw:name'),
- pagenodes[i]
- ]);
- }
- return pages;
- };
-
- // fill a html-select with options, one option per page in odf (odp)
- self.fillPageList = function (odfdom_root, html_select) {
- var pages = self.getPages(odfdom_root),
- i,
- html_option,
- res,
- page_denom;
-
- // empty the pagelist
- while (html_select.firstChild) {
- html_select.removeChild(html_select.firstChild);
- }
-
- // populate it
- for (i = 0; i < pages.length; i += 1) {
- html_option = document.createElement('option');
- res = xpath.getODFElementsWithXPath(pages[i][1],
- './draw:frame[@presentation:class="title"]//draw:text-box/text:p',
- xmldom.XPath);
- page_denom = (res.length > 0) ? res[0].textContent : pages[i][0];
- html_option.textContent = (i + 1) + ": " + page_denom;
- html_select.appendChild(html_option);
- }
- };
-
- self.startSlideMode = function (mode) {
- var pagelist = document.getElementById('pagelist'),
- css = self.odf_canvas.slidevisibilitycss().sheet;
- self.slide_mode = mode;
- while (css.cssRules.length > 0) { css.deleteRule(0); }
- // start on slide 0
- self.selectSlide(0);
- if (self.slide_mode === 'single') {
- css.insertRule("draw|page { position:fixed; left:0px;top:30px; z-index:1; }", 0);
- css.insertRule("draw|page[slide_current] { z-index:2;}", 1);
- css.insertRule("draw|page { -webkit-transform: scale(1);}", 2);
- self.fitToWindow();
- window.addEventListener('resize', self.fitToWindow, false);
-
- } else if (self.slide_mode === 'cont') {
- window.removeEventListener('resize', self.fitToWindow, false);
- }
-
- self.fillPageList(self.odf_canvas.odfContainer().rootElement, pagelist);
- };
-
- // toggle (show/hide) toolbar
- self.toggleToolbar = function () {
- var css, found, i;
- css = self.odf_canvas.slidevisibilitycss().sheet;
- found = -1;
- for (i = 0; i < css.cssRules.length; i += 1) {
- if (css.cssRules[i].cssText.substring(0, 8) === ".toolbar") {
- found = i;
- break;
- }
- }
- if (found > -1) {
- css.deleteRule(found);
- } else {
- css.insertRule(".toolbar { position:fixed; left:0px;top:-200px; z-index:0; }", 0);
- }
- };
-
- // adapt css-transform to window-size
- self.fitToWindow = function () {
- function ruleByFactor(f) {
- return "draw|page { \n" +
- "-moz-transform: scale(" + f + "); \n" +
- "-moz-transform-origin: 0% 0%; " +
- "-webkit-transform-origin: 0% 0%; -webkit-transform: scale(" + f + "); " +
- "-o-transform-origin: 0% 0%; -o-transform: scale(" + f + "); " +
- "-ms-transform-origin: 0% 0%; -ms-transform: scale(" + f + "); " +
- "}";
- }
- var pages = self.getPages(self.root()),
- factorVert = ((window.innerHeight - 40) / pages[0][1].clientHeight),
- factorHoriz = ((window.innerWidth - 10) / pages[0][1].clientWidth),
- factor = factorVert < factorHoriz ? factorVert : factorHoriz,
- css = self.odf_canvas.slidevisibilitycss().sheet;
- css.deleteRule(2);
- css.insertRule(ruleByFactor(factor), 2);
- };
-
- self.load = function (url) {
- self.odf_canvas.load(url);
- };
-
- self.odf_element = odf_element;
- self.odf_canvas = new odf.OdfCanvas(self.odf_element);
- self.odf_canvas.addListener("statereadychange", self.setInitialSlideMode);
- self.slide_mode = 'undefined';
- document.addEventListener('keydown', self.keyDownHandler, false);
- };
-}());
-
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/gui/SelectionMover.js b/apps/files_odfviewer/src/webodf/webodf/lib/gui/SelectionMover.js
deleted file mode 100644
index 2356c2c8c00..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/gui/SelectionMover.js
+++ /dev/null
@@ -1,217 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, core: true, gui: true*/
-runtime.loadClass("core.Cursor");
-/**
- * This class modifies the selection in different ways.
- * @constructor
- * @param {Selection} selection
- * @param {!core.PointWalker} pointWalker
- * @return {!gui.SelectionMover}
- */
-gui.SelectionMover = function SelectionMover(selection, pointWalker) {
- "use strict";
- var doc = pointWalker.node().ownerDocument,
- cursor = new core.Cursor(selection, doc);
- /**
- * Return the last range in the selection. Create one if the selection is
- * empty.
- */
- function getActiveRange(node) {
- var range;
- if (selection.rangeCount === 0) {
- selection.addRange(node.ownerDocument.createRange());
- }
- return selection.getRangeAt(selection.rangeCount - 1);
- }
- function setStart(node, offset) {
- // selection interface is cumbersome and in Chrome it is buggy
- // as a workaround all ranges are removed. The last one is updated and
- // all ranges are placed back
- var ranges = [], i, range;
- for (i = 0; i < selection.rangeCount; i += 1) {
- ranges[i] = selection.getRangeAt(i);
- }
- selection.removeAllRanges();
- if (ranges.length === 0) {
- ranges[0] = node.ownerDocument.createRange();
- }
- ranges[ranges.length - 1].setStart(pointWalker.node(),
- pointWalker.position());
- for (i = 0; i < ranges.length; i += 1) {
- selection.addRange(ranges[i]);
- }
- }
- function doMove(extend, move) {
- if (selection.rangeCount === 0) {
- return;
- }
- var range = selection.getRangeAt(0),
- /**@type{Element}*/ element;
- if (!range.startContainer || range.startContainer.nodeType !== 1) {
- return;
- }
- element = /**@type{!Element}*/(range.startContainer);
- pointWalker.setPoint(element, range.startOffset);
- move();
- setStart(pointWalker.node(), pointWalker.position());
- }
- function doMoveForward(extend, move) {
- if (selection.rangeCount === 0) {
- return;
- }
- move();
- var range = selection.getRangeAt(0),
- /**@type{Element}*/ element;
- if (!range.startContainer || range.startContainer.nodeType !== 1) {
- return;
- }
- element = /**@type{!Element}*/(range.startContainer);
- pointWalker.setPoint(element, range.startOffset);
- }
-/*
- function fallbackMoveLineUp() {
- // put an element at the current position and call
- // pointWalker.stepForward until the y position increases and x position
- // is comparable to the previous one
- cursor.updateToSelection();
- // retrieve cursor x and y position, then move selection/cursor left
- // until, y offset is less and x offset about equal
- var rect = cursor.getNode().getBoundingClientRect(),
- x = rect.left,
- y = rect.top,
- arrived = false,
- allowedSteps = 200;
- while (!arrived && allowedSteps) {
- allowedSteps -= 1;
- cursor.remove();
- pointWalker.setPoint(selection.focusNode, selection.focusOffset);
- pointWalker.stepForward();
- moveCursor(walker.node(), walker.position());
- moveCursorLeft();
- rect = cursor.getNode().getBoundingClientRect();
- arrived = rect.top !== y && rect.left < x;
- }
- }
-*/
- function moveCursor(node, offset, selectMode) {
- if (selectMode) {
- selection.extend(node, offset);
- } else {
- selection.collapse(node, offset);
- }
- cursor.updateToSelection();
- }
- function moveCursorLeft() {
- var /**@type{Element}*/ element;
- if (!selection.focusNode || selection.focusNode.nodeType !== 1) {
- return;
- }
- element = /**@type{!Element}*/(selection.focusNode);
- pointWalker.setPoint(element, selection.focusOffset);
- pointWalker.stepBackward();
- moveCursor(pointWalker.node(), pointWalker.position(), false);
- }
- function moveCursorRight() {
- cursor.remove();
- var /**@type{Element}*/ element;
- if (!selection.focusNode || selection.focusNode.nodeType !== 1) {
- return;
- }
- element = /**@type{!Element}*/(selection.focusNode);
- pointWalker.setPoint(element, selection.focusOffset);
- pointWalker.stepForward();
- moveCursor(pointWalker.node(), pointWalker.position(), false);
- }
- function moveCursorUp() {
- // retrieve cursor x and y position, then move selection/cursor left
- // until, y offset is less and x offset about equal
- var rect = cursor.getNode().getBoundingClientRect(),
- x = rect.left,
- y = rect.top,
- arrived = false,
- left = 200;
- while (!arrived && left) {
- left -= 1;
- moveCursorLeft();
- rect = cursor.getNode().getBoundingClientRect();
- arrived = rect.top !== y && rect.left < x;
- }
- }
- function moveCursorDown() {
- // retrieve cursor x and y position, then move selection/cursor right
- // until, x offset is less
- cursor.updateToSelection();
- var rect = cursor.getNode().getBoundingClientRect(),
- x = rect.left,
- y = rect.top,
- arrived = false,
- left = 200;
- while (!arrived) {
- left -= 1;
- moveCursorRight();
- rect = cursor.getNode().getBoundingClientRect();
- arrived = rect.top !== y && rect.left > x;
- }
-//alert(left + " " + y + " " + x + " " + rect.top + " " + rect.left);
- }
- /**
- * Move selection forward one point.
- * @param {boolean} extend true if range is to be expanded from the current
- * point
- * @return {undefined}
- **/
- this.movePointForward = function (extend) {
- doMove(extend, pointWalker.stepForward);
- };
- this.movePointBackward = function (extend) {
- doMove(extend, pointWalker.stepBackward);
- };
- this.moveLineForward = function (extend) {
- if (selection.modify) {
- // TODO add a way to
- selection.modify(extend ? "extend" : "move", "forward", "line");
- } else {
- doMove(extend, moveCursorDown);
- }
- };
- this.moveLineBackward = function (extend) {
- if (selection.modify) {
- selection.modify(extend ? "extend" : "move", "backward", "line");
- } else {
- doMove(extend, function () {
- });
- }
- };
- return this;
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/gui/XMLEdit.js b/apps/files_odfviewer/src/webodf/webodf/lib/gui/XMLEdit.js
deleted file mode 100644
index aee0bd5e7dd..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/gui/XMLEdit.js
+++ /dev/null
@@ -1,330 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, core: true, gui: true*/
-runtime.loadClass("core.PointWalker");
-runtime.loadClass("core.Cursor");
-//runtime.loadClass("gui.Caret");
-/**
- * @constructor
- */
-gui.XMLEdit = function XMLEdit(element, stylesheet) {
- "use strict";
- var simplecss,
- cssprefix,
- documentElement,
- customNS = "customns",
- walker = null;
-
- if (!element.id) {
- element.id = "xml" + String(Math.random()).substring(2);
- }
-// element.contentEditable = true;
- cssprefix = "#" + element.id + " ";
-
- function installHandlers() {
- }
-
- // generic css for doing xml formatting: color tags and do indentation
- simplecss = cssprefix + "*," + cssprefix + ":visited, " + cssprefix + ":link {display:block; margin: 0px; margin-left: 10px; font-size: medium; color: black; background: white; font-variant: normal; font-weight: normal; font-style: normal; font-family: sans-serif; text-decoration: none; white-space: pre-wrap; height: auto; width: auto}\n" +
- cssprefix + ":before {color: blue; content: '<' attr(customns_name) attr(customns_atts) '>';}\n" +
- cssprefix + ":after {color: blue; content: '</' attr(customns_name) '>';}\n" +
- cssprefix + "{overflow: auto;}\n";
-
- function listenEvent(eventTarget, eventType, eventHandler) {
- if (eventTarget.addEventListener) {
- eventTarget.addEventListener(eventType, eventHandler, false);
- } else if (eventTarget.attachEvent) {
- eventType = "on" + eventType;
- eventTarget.attachEvent(eventType, eventHandler);
- } else {
- eventTarget["on" + eventType] = eventHandler;
- }
- }
- function cancelEvent(event) {
- if (event.preventDefault) {
- event.preventDefault();
- } else {
- event.returnValue = false;
- }
- }
-
- function isCaretMoveCommand(charCode) {
- if (charCode >= 16 && charCode <= 20) {
- return true;
- }
- if (charCode >= 33 && charCode <= 40) { //arrows,home,end,pgup,pgdown
- return true;
- }
- return false;
- }
-
- function syncSelectionWithWalker() {
- var sel = element.ownerDocument.defaultView.getSelection(),
- r;
- if (!sel || sel.rangeCount <= 0 || !walker) {
- return;
- }
- r = sel.getRangeAt(0);
- walker.setPoint(r.startContainer, r.startOffset);
- }
-
- function syncWalkerWithSelection() {
- var sel = element.ownerDocument.defaultView.getSelection(),
- n, r;
- sel.removeAllRanges();
- if (!walker || !walker.node()) {
- return;
- }
- n = walker.node();
- r = n.ownerDocument.createRange();
- r.setStart(n, walker.position());
- r.collapse(true);
- sel.addRange(r);
- }
-
- function handleKeyDown(event) {
- var charCode = event.charCode || event.keyCode;
- // cursor movement
- walker = null;
- if (walker && charCode === 39) { // right arrow
- syncSelectionWithWalker();
- walker.stepForward();
- syncWalkerWithSelection();
- } else if (walker && charCode === 37) { //left arrow
- syncSelectionWithWalker();
- walker.stepBackward();
- syncWalkerWithSelection();
- } else if (isCaretMoveCommand(charCode)) {
- return;
- }
- cancelEvent(event);
- }
-
- function handleKeyPress(event) {
-// handleKeyDown(event);
- }
-
- function handleClick(event) {
-// alert(event.target.nodeName);
- var sel = element.ownerDocument.defaultView.getSelection(),
- r = sel.getRangeAt(0),
- n = r.startContainer;
- // if cursor is in customns node, move up to the top one
- /*
- if (n.parentNode.namespaceURI === customNS) {
- while (n.parentNode.namespaceURI === customNS) {
- n = n.parentNode;
- }
- r = n.ownerDocument.createRange();
- r.setStart(n.nextSibling, 0);
- r.collapse(true);
- sel.removeAllRanges();
- sel.addRange(r);
- }
-*/
-/*
- r = element.ownerDocument.createRange();
- r.setStart(event.target.nodeName, 0);
- r.collapse(true);
- sel.removeAllRanges();
- sel.addRange(r);
-*/
-//alert(sel.getRangeAt(0).startContainer.nodeName + " " + sel.getRangeAt(0).startOffset);
-
- cancelEvent(event);
- }
-
- function initElement(element) {
- listenEvent(element, "click", handleClick);
- listenEvent(element, "keydown", handleKeyDown);
- listenEvent(element, "keypress", handleKeyPress);
- //listenEvent(element, "mouseup", handleMouseUp);
- // ignore drop events, dragstart, drag, dragenter, dragover are ok for now
- listenEvent(element, "drop", cancelEvent);
- listenEvent(element, "dragend", cancelEvent);
- // pasting is also disallowed for now
- listenEvent(element, "beforepaste", cancelEvent);
- listenEvent(element, "paste", cancelEvent);
- }
-
- // remove all textnodes that contain only whitespace
- function cleanWhitespace(node) {
- var n = node.firstChild, p,
- re = /^\s*$/;
- while (n && n !== node) {
- p = n;
- n = n.nextSibling || n.parentNode;
- if (p.nodeType === 3 && re.test(p.nodeValue)) {
- p.parentNode.removeChild(p);
- }
- }
- }
- /**
- * @param {!Node} node
- * @return {undefined}
- */
- function setCssHelperAttributes(node) {
- var atts, attsv, a, i;
- // write all attributes in a string that is shown via the css
- atts = node.attributes;
- attsv = "";
- for (i = atts.length - 1; i >= 0; i -= 1) {
- a = atts.item(i);
- attsv = attsv + " " + a.nodeName + "=\"" + a.nodeValue + "\"";
- }
- node.setAttribute("customns_name", node.nodeName);
- node.setAttribute("customns_atts", attsv);
- }
- /**
- * @param {!Node} node
- * @return {undefined}
- */
- function addExplicitAttributes(node) {
- var n = node.firstChild;
- // recurse over the dom
- while (n && n !== node) {
- if (n.nodeType === 1) {
- addExplicitAttributes(n);
- }
- n = n.nextSibling || n.parentNode;
- }
- setCssHelperAttributes(node);
- cleanWhitespace(node);
- }
-
- function getNamespacePrefixes(node, prefixes) {
- var n = node.firstChild, atts, att, i;
- while (n && n !== node) {
- if (n.nodeType === 1) {
- getNamespacePrefixes(n, prefixes);
- atts = n.attributes;
- for (i = atts.length - 1; i >= 0; i -= 1) {
- att = atts.item(i);
- // record the prefix that the document uses for namespaces
- if (att.namespaceURI === "http://www.w3.org/2000/xmlns/") {
- if (!prefixes[att.nodeValue]) {
- prefixes[att.nodeValue] = att.localName;
- }
- }
- }
- }
- n = n.nextSibling || n.parentNode;
- }
- }
-
- /**
- * Give each namespace a unique prefix.
- * @param {Object.<?string,?string>} prefixes Map with namespace as key and
- * prefix as value
- * @return {undefined}
- */
- function generateUniquePrefixes(prefixes) {
- var taken = {},
- ns, p, n = 0;
- for (ns in prefixes) {
- if (prefixes.hasOwnProperty(ns) && ns) {
- p = prefixes[ns];
- if (!p || taken.hasOwnProperty(p) || p === "xmlns") {
- do {
- p = "ns" + n;
- n += 1;
- } while (taken.hasOwnProperty(p));
- prefixes[ns] = p;
- }
- taken[p] = true;
- }
- }
- }
-
- // the CSS neededed for the XML edit view depends on the prefixes
- function createCssFromXmlInstance(node) {
- // collect all prefixes and elements
- var prefixes = {}, // namespace prefixes as they occur in the XML
- css = "@namespace customns url(customns);\n",
- name, pre, ns, names, csssel;
- getNamespacePrefixes(node, prefixes);
- generateUniquePrefixes(prefixes);
-/*
- for (ns in prefixes) {
- if (ns) {
- css = css + "@namepace " + prefixes[ns] + " url(" + ns + ");\n";
- }
- }
- for (ns in prefixes) {
- if (ns) {
- pre = cssprefix + prefixes[ns] + "|";
- css = css + pre + ":before { content: '<" + prefixes[ns] +
- ":' attr(customns_name); }\n" +
- pre + ":after { content: '</" + prefixes[ns] +
- ":' attr(customns_name) '>'; }\n";
- }
- }
-*/
- return css;
- }
-
- // Adapt the CSS to the current settings.
- function updateCSS() {
- var css = element.ownerDocument.createElement("style"),
- text = createCssFromXmlInstance(element);
- css.type = "text/css";
- text = text + simplecss;
- css.appendChild(element.ownerDocument.createTextNode(text));
- stylesheet = stylesheet.parentNode.replaceChild(css, stylesheet);
- }
- function getXML() {
- return documentElement;
- }
- function setXML(xml) {
- var node = xml.documentElement || xml;
- node = element.ownerDocument.importNode(node, true);
- documentElement = node;
-
- addExplicitAttributes(node);
-
- while (element.lastChild) {
- element.removeChild(element.lastChild);
- }
- element.appendChild(node);
-
- updateCSS();
-
- walker = new core.PointWalker(node);
- }
-
- initElement(element);
-
- this.updateCSS = updateCSS;
- this.setXML = setXML;
- this.getXML = getXML;
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/manifest.js b/apps/files_odfviewer/src/webodf/webodf/lib/manifest.js
deleted file mode 100644
index 1a185b85b97..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/manifest.js
+++ /dev/null
@@ -1,34 +0,0 @@
-(function () {
- "use strict";
- return [
- "core/Async.js",
- "core/Base64.js",
- "core/ByteArray.js",
- "core/ByteArrayWriter.js",
- "core/Cursor.js",
- "core/JSLint.js",
- "core/PointWalker.js",
- "core/RawDeflate.js",
- "core/RawInflate.js",
- "core/UnitTester.js",
- "core/Zip.js",
- "gui/Caret.js",
- "gui/SelectionMover.js",
- "gui/XMLEdit.js",
- "gui/PresenterUI.js",
- "odf/FontLoader.js",
- "odf/Formatting.js",
- "odf/OdfCanvas.js",
- "odf/OdfContainer.js",
- "odf/Style2CSS.js",
- "odf/StyleInfo.js",
- "xmldom/LSSerializer.js",
- "xmldom/LSSerializerFilter.js",
- "xmldom/OperationalTransformDOM.js",
- "xmldom/OperationalTransformInterface.js",
- "xmldom/RelaxNG.js",
- "xmldom/RelaxNG2.js",
- "xmldom/RelaxNGParser.js",
- "xmldom/XPath.js"
- ];
-}());
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/odf/FontLoader.js b/apps/files_odfviewer/src/webodf/webodf/lib/odf/FontLoader.js
deleted file mode 100644
index f6d51f666a6..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/odf/FontLoader.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*jslint sub: true*/
-/*global runtime, odf, core, document, xmldom*/
-runtime.loadClass("core.Base64");
-runtime.loadClass("xmldom.XPath");
-runtime.loadClass("odf.Style2CSS");
-/**
- * This class loads embedded fonts into the CSS
- * @constructor
- **/
-odf.FontLoader = (function () {
- "use strict";
- var style2CSS = new odf.Style2CSS(),
- xpath = new xmldom.XPath(),
- base64 = new core.Base64();
- /**
- * @param {!Element} fontFaceDecls
- * @return {!Object.<string,Object>}
- */
- function getEmbeddedFontDeclarations(fontFaceDecls) {
- var decls = {},
- fonts,
- i, font, name, uris, href;
- if (!fontFaceDecls) {
- return decls;
- }
- fonts = xpath.getODFElementsWithXPath(fontFaceDecls,
- "style:font-face[svg:font-face-src]",
- style2CSS.namespaceResolver);
- for (i = 0; i < fonts.length; i += 1) {
- font = fonts[i];
- name = font.getAttributeNS(style2CSS.namespaces["style"], "name");
- uris = xpath.getODFElementsWithXPath(font,
- "svg:font-face-src/svg:font-face-uri",
- style2CSS.namespaceResolver);
- if (uris.length > 0) {
- href = uris[0].getAttributeNS(style2CSS.namespaces["xlink"],
- "href");
- decls[name] = {href: href};
- }
- }
- return decls;
- }
- function addFontToCSS(name, font, fontdata, stylesheet) {
- // hack: get the first stylesheet
- stylesheet = document.styleSheets[0];
- var rule = "@font-face { font-family: \"" + name + "\"; src: " +
- "url(data:application/x-font-ttf;charset=binary;base64," +
- base64.convertUTF8ArrayToBase64(fontdata) +
- ") format(\"truetype\"); }";
- try {
- stylesheet.insertRule(rule, stylesheet.cssRules.length);
- } catch (e) {
- runtime.log("Problem inserting rule in CSS: " + rule);
- }
- }
- function loadFontIntoCSS(embeddedFontDeclarations, zip, pos, stylesheet,
- callback) {
- var name, i = 0, n;
- for (n in embeddedFontDeclarations) {
- if (embeddedFontDeclarations.hasOwnProperty(n)) {
- if (i === pos) {
- name = n;
- }
- i += 1;
- }
- }
- if (!name) {
- return callback();
- }
- zip.load(embeddedFontDeclarations[name].href, function (err, fontdata) {
- if (err) {
- runtime.log(err);
- } else {
- addFontToCSS(name, embeddedFontDeclarations[name], fontdata,
- stylesheet);
- }
- return loadFontIntoCSS(embeddedFontDeclarations, zip, pos + 1,
- stylesheet, callback);
- });
- }
- function loadFontsIntoCSS(embeddedFontDeclarations, zip, stylesheet) {
- loadFontIntoCSS(embeddedFontDeclarations, zip, 0, stylesheet,
- function () {});
- }
- /**
- * @constructor
- */
- odf.FontLoader = function FontLoader() {
- var self = this;
- /**
- * @param {!Element} fontFaceDecls
- * @param {!core.Zip} zip
- * @param {!StyleSheet} stylesheet
- * @return {undefined}
- */
- this.loadFonts = function (fontFaceDecls, zip, stylesheet) {
- var embeddedFontDeclarations = getEmbeddedFontDeclarations(
- fontFaceDecls);
- loadFontsIntoCSS(embeddedFontDeclarations, zip, stylesheet);
- };
- };
- return odf.FontLoader;
-}());
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/odf/Formatting.js b/apps/files_odfviewer/src/webodf/webodf/lib/odf/Formatting.js
deleted file mode 100644
index cf42fcc50af..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/odf/Formatting.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global odf: true, runtime: true*/
-/**
- * @constructor
- */
-odf.Formatting = function Formatting() {
- "use strict";
- var /**@type{odf.OdfContainer}*/ odfContainer,
- /**@type{odf.StyleInfo}*/ styleInfo = new odf.StyleInfo();
-
- /**
- * Class that iterates over all elements that are part of the range.
- * @constructor
- * @param {!Range} range
- * @return {undefined}
- */
- function RangeElementIterator(range) {
- /**
- * @param {Node} parent
- * @param {!number} n
- * @return {Node}
- */
- function getNthChild(parent, n) {
- var c = parent && parent.firstChild;
- while (c && n) {
- c = c.nextSibling;
- n -= 1;
- }
- return c;
- }
- var start = getNthChild(range.startContainer, range.startOffset),
- end = getNthChild(range.endContainer, range.endOffset),
- current = start;
- /**
- * @return {Element|null}
- */
- this.next = function () {
- var c = current;
- if (c === null) {
- return c;
- }
- return null;
- };
- }
-
- /**
- * @param {!Element} element
- * @return {Element}
- */
- function getParentStyle(element) {
- var n = element.firstChild, e;
- if (n.nodeType === 1) { // Element
- e = /**@type{Element}*/(n);
- return e;
- }
- return null;
- }
- /**
- * @param {!Range} range
- * @return {!Array.<!Element>}
- */
- function getParagraphStyles(range) {
- var iter = new RangeElementIterator(range), e, styles = [];
- e = iter.next();
- while (e) {
- if (styleInfo.canElementHaveStyle("paragraph", e)) {
- styles.push(e);
- }
- }
- return styles;
- }
-
- /**
- * @param {!odf.OdfContainer} odfcontainer
- * @return {undefined}
- */
- this.setOdfContainer = function (odfcontainer) {
- odfContainer = odfcontainer;
- };
- /**
- * Return true if all parts of the selection are bold.
- * @param {!Array.<!Range>} selection
- * @return {!boolean}
- */
- this.isCompletelyBold = function (selection) {
- return false;
- };
- /**
- * Get the alignment or undefined if no uniform alignment is found
- * @param {!Array.<!Range>} selection
- * @return {!string|undefined}
- */
- this.getAlignment = function (selection) {
- var styles = this.getParagraphStyles(selection), i, l = styles.length;
- return undefined;
- };
- /**
- * Get the list of paragraph styles that covered by the current selection.
- * @param {!Array.<!Range>} selection
- * @return {!Array.<Element>}
- */
- this.getParagraphStyles = function (selection) {
- var i, j, s, styles = [];
- for (i = 0; i < selection.length; i += 0) {
- s = getParagraphStyles(selection[i]);
- for (j = 0; j < s.length; j += 1) {
- if (styles.indexOf(s[j]) === -1) {
- styles.push(s[j]);
- }
- }
- }
- return styles;
- };
- /**
- * Get the list of text styles that are covered by the current selection.
- * @param {!Array.<!Range>} selection
- * @return {!Array.<Element>}
- */
- this.getTextStyles = function (selection) {
- return [];
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/odf/OdfCanvas.js b/apps/files_odfviewer/src/webodf/webodf/lib/odf/OdfCanvas.js
deleted file mode 100644
index b8077f80939..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/odf/OdfCanvas.js
+++ /dev/null
@@ -1,912 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*jslint sub: true*/
-/*global runtime, odf, xmldom */
-runtime.loadClass("odf.OdfContainer");
-runtime.loadClass("odf.Formatting");
-runtime.loadClass("xmldom.XPath");
-/**
- * This class manages a loaded ODF document that is shown in an element.
- * It takes care of giving visual feedback on loading, ensures that the
- * stylesheets are loaded.
- * @constructor
- * @param {!Element} element Put and ODF Canvas inside this element.
- **/
-odf.OdfCanvas = (function () {
- "use strict";
- /**
- * A loading queue where various tasks related to loading can be placed
- * and will be run with 10 ms between them. This gives the ui a change to
- * to update.
- * @constructor
- */
- function LoadingQueue() {
- var queue = [],
- taskRunning = false;
- /**
- * @param {Function} task
- * @return {undefined}
- */
- function run(task) {
- taskRunning = true;
- runtime.setTimeout(function () {
- try {
- task();
- } catch (e) {
- runtime.log(e);
- }
- taskRunning = false;
- if (queue.length > 0) {
- run(queue.pop());
- }
- }, 10);
- }
- /**
- * @return {undefined}
- */
- this.clearQueue = function () {
- queue.length = 0;
- };
- /**
- * @param {Function} loadingTask
- * @return {undefined}
- */
- this.addToQueue = function (loadingTask) {
- if (queue.length === 0 && !taskRunning) {
- return run(loadingTask);
- }
- queue.push(loadingTask);
- };
- }
- /**
- * @constructor
- * @param css
- */
- function PageSwitcher(css) {
- var sheet = css.sheet,
- position = 1;
- function updateCSS() {
- while (sheet.cssRules.length > 0) {
- sheet.deleteRule(0);
- }
- sheet.insertRule('office|presentation draw|page {display:none;}', 0);
- sheet.insertRule("office|presentation draw|page:nth-child(" +
- position + ") {display:block;}", 1);
- }
- /**
- * @return {undefined}
- */
- this.showNextPage = function () {
- position += 1;
- updateCSS();
- };
- /**
- * @return {undefined}
- */
- this.showPreviousPage = function () {
- if (position > 1) {
- position -= 1;
- updateCSS();
- }
- };
- this.css = css;
- }
- /**
- * Register event listener on DOM element.
- * @param {!Element} eventTarget
- * @param {!string} eventType
- * @param {!Function} eventHandler
- * @return {undefined}
- */
- function listenEvent(eventTarget, eventType, eventHandler) {
- if (eventTarget.addEventListener) {
- eventTarget.addEventListener(eventType, eventHandler, false);
- } else if (eventTarget.attachEvent) {
- eventType = "on" + eventType;
- eventTarget.attachEvent(eventType, eventHandler);
- } else {
- eventTarget["on" + eventType] = eventHandler;
- }
- }
- /**
- * Class that listens to events and sends a signal if the selection changes.
- * @constructor
- * @param {!Element} element
- */
- function SelectionWatcher(element) {
- var selection = [], count = 0, listeners = [];
- /**
- * @param {!Element} ancestor
- * @param {Node} descendant
- * @return {!boolean}
- */
- function isAncestorOf(ancestor, descendant) {
- while (descendant) {
- if (descendant === ancestor) {
- return true;
- }
- descendant = descendant.parentNode;
- }
- return false;
- }
- /**
- * @param {!Element} element
- * @param {!Range} range
- * @return {!boolean}
- */
- function fallsWithin(element, range) {
- return isAncestorOf(element, range.startContainer) &&
- isAncestorOf(element, range.endContainer);
- }
- /**
- * @return {!Array.<!Range>}
- */
- function getCurrentSelection() {
- var s = [], selection = runtime.getWindow().getSelection(), i, r;
- for (i = 0; i < selection.rangeCount; i += 1) {
- r = selection.getRangeAt(i);
- // check if the nodes in the range fall completely within the
- // element
- if (r !== null && fallsWithin(element, r)) {
- s.push(r);
- }
- }
- return s;
- }
- /**
- * @param {Range} rangeA
- * @param {Range} rangeB
- * @return {!boolean}
- */
- function rangesNotEqual(rangeA, rangeB) {
- if (rangeA === rangeB) {
- return false;
- }
- if (rangeA === null || rangeB === null) {
- return true;
- }
- return rangeA.startContainer !== rangeB.startContainer ||
- rangeA.startOffset !== rangeB.startOffset ||
- rangeA.endContainer !== rangeB.endContainer ||
- rangeA.endOffset !== rangeB.endOffset;
- }
- /**
- * @return {undefined}
- */
- function emitNewSelection() {
- var i, l = listeners.length;
- for (i = 0; i < l; i += 1) {
- listeners[i](element, selection);
- }
- }
- /**
- * @param {!Array.<!Range>} selection
- * @return {!Array.<!Range>}
- */
- function copySelection(selection) {
- var s = [selection.length], i, oldr, r,
- doc = element.ownerDocument;
- for (i = 0; i < selection.length; i += 1) {
- oldr = selection[i];
- r = doc.createRange();
- r.setStart(oldr.startContainer, oldr.startOffset);
- r.setEnd(oldr.endContainer, oldr.endOffset);
- s[i] = r;
- }
- return s;
- }
- /**
- * @return {undefined}
- */
- function checkSelection() {
- var s = getCurrentSelection(), i;
- if (s.length === selection.length) {
- for (i = 0; i < s.length; i += 1) {
- if (rangesNotEqual(s[i], selection[i])) {
- break;
- }
- }
- if (i === s.length) {
- return; // no change
- }
- }
- selection = s;
- selection = copySelection(s);
- emitNewSelection();
- }
- /**
- * @param {!string} eventName
- * @param {!function(!Element, !Array.<!Range>)} handler
- * @return {undefined}
- */
- this.addListener = function (eventName, handler) {
- var i, l = listeners.length;
- for (i = 0; i < l; i += 1) {
- if (listeners[i] === handler) {
- return;
- }
- }
- listeners.push(handler);
- };
- listenEvent(element, "mouseup", checkSelection);
- listenEvent(element, "keyup", checkSelection);
- listenEvent(element, "keydown", checkSelection);
- }
- var style2CSS = new odf.Style2CSS(),
- namespaces = style2CSS.namespaces,
- drawns = namespaces.draw,
- fons = namespaces.fo,
- officens = namespaces.office,
- svgns = namespaces.svg,
- textns = namespaces.text,
- xlinkns = namespaces.xlink,
- window = runtime.getWindow(),
- xpath = new xmldom.XPath(),
- /**@const@type{!Object.<!string,!Array.<!Function>>}*/
- eventHandlers = {},
- editparagraph,
- loadingQueue = new LoadingQueue();
-
- /**
- * Register an event handler
- * @param {!string} eventType
- * @param {!Function} eventHandler
- * @return {undefined}
- */
- function addEventListener(eventType, eventHandler) {
- var handlers = eventHandlers[eventType];
- if (handlers === undefined) {
- handlers = eventHandlers[eventType] = [];
- }
- if (eventHandler && handlers.indexOf(eventHandler) === -1) {
- handlers.push(eventHandler);
- }
- }
- /**
- * Fire an event
- * @param {!string} eventType
- * @param {Array.<Object>=} args
- * @return {undefined}
- */
- function fireEvent(eventType, args) {
- if (!eventHandlers.hasOwnProperty(eventType)) {
- return;
- }
- var handlers = eventHandlers[eventType], i;
- for (i = 0; i < handlers.length; i += 1) {
- handlers[i](args);
- }
- }
- /**
- * @param {!Element} element
- * @return {undefined}
- */
- function clear(element) {
- while (element.firstChild) {
- element.removeChild(element.firstChild);
- }
- }
- /**
- * A new styles.xml has been loaded. Update the live document with it.
- * @param {!Element} odfelement
- * @param {!HTMLStyleElement} stylesxmlcss
- * @return {undefined}
- **/
- function handleStyles(odfelement, stylesxmlcss) {
- // update the css translation of the styles
- var style2css = new odf.Style2CSS();
- style2css.style2css(stylesxmlcss.sheet, odfelement.styles,
- odfelement.automaticStyles);
- }
- /**
- * @param {!string} id
- * @param {!Element} frame
- * @param {!StyleSheet} stylesheet
- * @return {undefined}
- **/
- function setFramePosition(id, frame, stylesheet) {
- frame.setAttribute('styleid', id);
- var rule,
- anchor = frame.getAttributeNS(textns, 'anchor-type'),
- x = frame.getAttributeNS(svgns, 'x'),
- y = frame.getAttributeNS(svgns, 'y'),
- width = frame.getAttributeNS(svgns, 'width'),
- height = frame.getAttributeNS(svgns, 'height'),
- minheight = frame.getAttributeNS(fons, 'min-height'),
- minwidth = frame.getAttributeNS(fons, 'min-width');
- if (anchor === "as-char") {
- rule = 'display: inline-block;';
- } else if (anchor || x || y) {
- rule = 'position: absolute;';
- } else if (width || height || minheight || minwidth) {
- rule = 'display: block;';
- }
- if (x) {
- rule += 'left: ' + x + ';';
- }
- if (y) {
- rule += 'top: ' + y + ';';
- }
- if (width) {
- rule += 'width: ' + width + ';';
- }
- if (height) {
- rule += 'height: ' + height + ';';
- }
- if (minheight) {
- rule += 'min-height: ' + minheight + ';';
- }
- if (minwidth) {
- rule += 'min-width: ' + minwidth + ';';
- }
- if (rule) {
- rule = 'draw|' + frame.localName + '[styleid="' + id + '"] {' +
- rule + '}';
- stylesheet.insertRule(rule, stylesheet.cssRules.length);
- }
- }
- /**
- * @param {!Element} image
- * @return {string}
- **/
- function getUrlFromBinaryDataElement(image) {
- var node = image.firstChild;
- while (node) {
- if (node.namespaceURI === officens &&
- node.localName === "binary-data") {
- // TODO: detect mime-type, assuming png for now
- return "data:image/png;base64," + node.textContent;
- }
- node = node.nextSibling;
- }
- return "";
- }
- /**
- * @param {!string} id
- * @param {!Object} container
- * @param {!Element} image
- * @param {!StyleSheet} stylesheet
- * @return {undefined}
- **/
- function setImage(id, container, image, stylesheet) {
- image.setAttribute('styleid', id);
- var url = image.getAttributeNS(xlinkns, 'href'),
- part,
- node;
- function callback(url) {
- var rule = "background-image: url(" + url + ");";
- rule = 'draw|image[styleid="' + id + '"] {' + rule + '}';
- stylesheet.insertRule(rule, stylesheet.cssRules.length);
- }
- // look for a office:binary-data
- if (url) {
- try {
- if (container.getPartUrl) {
- url = container.getPartUrl(url);
- callback(url);
- } else {
- part = container.getPart(url);
- part.onchange = function (part) {
- callback(part.url);
- };
- part.load();
- }
- } catch (e) {
- runtime.log('slight problem: ' + e);
- }
- } else {
- url = getUrlFromBinaryDataElement(image);
- callback(url);
- }
- }
- function formatParagraphAnchors(odfbody) {
- var runtimens = "urn:webodf",
- n,
- i,
- nodes = xpath.getODFElementsWithXPath(odfbody,
- ".//*[*[@text:anchor-type='paragraph']]",
- style2CSS.namespaceResolver);
- for (i = 0; i < nodes.length; i += 1) {
- n = nodes[i];
- if (n.setAttributeNS) {
- n.setAttributeNS(runtimens, "containsparagraphanchor", true);
- }
- }
- }
- /**
- * @param {!Object} container
- * @param {!Element} odfbody
- * @param {!StyleSheet} stylesheet
- * @return {undefined}
- **/
- function modifyImages(container, odfbody, stylesheet) {
- var node,
- frames,
- i,
- images;
- function namespaceResolver(prefix) {
- return namespaces[prefix];
- }
- // find all the frame elements
- frames = [];
- node = odfbody.firstChild;
- while (node && node !== odfbody) {
- if (node.namespaceURI === drawns) {
- frames[frames.length] = node;
- }
- if (node.firstChild) {
- node = node.firstChild;
- } else {
- while (node && node !== odfbody && !node.nextSibling) {
- node = node.parentNode;
- }
- if (node && node.nextSibling) {
- node = node.nextSibling;
- }
- }
- }
- // adjust all the frame positions
- for (i = 0; i < frames.length; i += 1) {
- node = frames[i];
- setFramePosition('frame' + String(i), node, stylesheet);
- }
- formatParagraphAnchors(odfbody);
- }
- /**
- * Load all the images that are inside an odf element.
- * @param {!Object} container
- * @param {!Element} odffragment
- * @param {!StyleSheet} stylesheet
- * @return {undefined}
- */
- function loadImages(container, odffragment, stylesheet) {
- var i,
- images,
- node;
- // do delayed loading for all the images
- function loadImage(name, container, node, stylesheet) {
- // load image with a small delay to give the html ui a chance to
- // update
- loadingQueue.addToQueue(function () {
- setImage(name, container, node, stylesheet);
- });
- }
- images = odffragment.getElementsByTagNameNS(drawns, 'image');
- for (i = 0; i < images.length; i += 1) {
- node = /**@type{!Element}*/(images.item(i));
- loadImage('image' + String(i), container, node, stylesheet);
- }
- }
- /**
- * @param {!string} id
- * @param {!Object} container
- * @param {!Element} plugin
- * @param {!StyleSheet} stylesheet
- * @return {undefined}
- **/
- function setVideo(id, container, plugin, stylesheet) {
- var video, source, url, videoType, doc = plugin.ownerDocument, part, node;
-
- url = plugin.getAttributeNS(xlinkns, 'href');
-
- function callback(url, mimetype) {
- // test for video mimetypes
- if (mimetype.substr(0, 6) === 'video/') {
- video = doc.createElementNS(doc.documentElement.namespaceURI, "video");
- video.setAttribute('controls', 'controls');
-
- source = doc.createElement('source');
- source.setAttribute('src', url);
- source.setAttribute('type', mimetype);
-
- video.appendChild(source);
- plugin.parentNode.appendChild(video);
- } else {
- plugin.innerHtml = 'Unrecognised Plugin';
- }
- }
- // look for a office:binary-data
- if (url) {
- try {
- if (container.getPartUrl) {
- url = container.getPartUrl(url);
- callback(url, 'video/mp4');
- } else {
- part = container.getPart(url);
- part.onchange = function (part) {
- callback(part.url, part.mimetype);
- };
- part.load();
- }
- } catch (e) {
- runtime.log('slight problem: ' + e);
- }
- } else {
- // this will fail atm - following function assumes PNG data]
- runtime.log('using MP4 data fallback');
- url = getUrlFromBinaryDataElement(plugin);
- callback(url, 'video/mp4');
- }
- }
- /**
- * Load all the video that are inside an odf element.
- * @param {!Object} container
- * @param {!Element} odffragment
- * @param {!StyleSheet} stylesheet
- * @return {undefined}
- */
- function loadVideos(container, odffragment, stylesheet) {
- var i,
- plugins,
- node;
- // do delayed loading for all the videos
- function loadVideo(name, container, node, stylesheet) {
- // load video with a small delay to give the html ui a chance to
- // update
- loadingQueue.addToQueue(function () {
- setVideo(name, container, node, stylesheet);
- });
- }
- // embedded video is stored in a draw:plugin element
- plugins = odffragment.getElementsByTagNameNS(drawns, 'plugin');
- runtime.log('Loading Videos:');
-
- for (i = 0; i < plugins.length; i += 1) {
- runtime.log('...Found a video.');
- node = /**@type{!Element}*/(plugins.item(i));
- loadVideo('video' + String(i), container, node, stylesheet);
- }
- }
- /**
- * @param {Document} document Put and ODF Canvas inside this element.
- */
- function addStyleSheet(document) {
- var styles = document.getElementsByTagName("style"),
- head = document.getElementsByTagName('head')[0],
- text = '',
- prefix,
- a = "",
- b;
- // use cloneNode on an exisiting HTMLStyleElement, because in
- // Chromium 12, document.createElement('style') does not give a
- // HTMLStyleElement
- if (styles && styles.length > 0) {
- styles = styles[0].cloneNode(false);
- } else {
- styles = document.createElement('style');
- }
- for (prefix in namespaces) {
- if (namespaces.hasOwnProperty(prefix) && prefix) {
- text += "@namespace " + prefix + " url(" + namespaces[prefix] +
- ");\n";
- }
- }
- styles.appendChild(document.createTextNode(text));
- head.appendChild(styles);
- return styles;
- }
- /**
- * @constructor
- * @param {!Element} element Put and ODF Canvas inside this element.
- */
- odf.OdfCanvas = function OdfCanvas(element) {
- var self = this,
- document = element.ownerDocument,
- /**@type{odf.OdfContainer}*/ odfcontainer,
- /**@type{!odf.Formatting}*/ formatting = new odf.Formatting(),
- selectionWatcher = new SelectionWatcher(element),
- slidecssindex = 0,
- pageSwitcher = new PageSwitcher(addStyleSheet(document)),
- stylesxmlcss = addStyleSheet(document),
- positioncss = addStyleSheet(document),
- editable = false,
- zoomLevel = 1;
-
- function fixContainerSize() {
- var sizer = element.firstChild,
- odfdoc = sizer.firstChild;
- if (!odfdoc) {
- return;
- }
- element.style.WebkitTransform = 'scale(' + zoomLevel + ')';
- element.style.WebkitTransformOrigin = 'left top';
- element.style.width = Math.round(zoomLevel * odfdoc.offsetWidth)
- + "px";
- element.style.height = Math.round(zoomLevel * odfdoc.offsetHeight)
- + "px";
- }
- /**
- * A new content.xml has been loaded. Update the live document with it.
- * @param {!Object} container
- * @param {!Element} odfnode
- * @return {undefined}
- **/
- function handleContent(container, odfnode) {
- var css = positioncss.sheet, sizer;
- modifyImages(container, odfnode.body, css);
-/*
- slidecssindex = css.insertRule(
- 'office|presentation draw|page:nth-child(1n) {display:block;}',
- css.cssRules.length
- );
-*/
- // FIXME: this is a hack to have a defined background now
- // should be removed as soon as we have sane background
- // handling for pages
- css.insertRule('draw|page { background-color:#fff; }',
- css.cssRules.length);
-
- // only append the content at the end
- clear(element);
- sizer = document.createElement('div');
- sizer.style.display = "inline-block";
- sizer.style.background = "white";
- sizer.appendChild(odfnode);
- element.appendChild(sizer);
- loadImages(container, odfnode.body, css);
- loadVideos(container, odfnode.body, css);
- fixContainerSize();
- }
- /**
- * @param {!odf.OdfContainer} container
- * @return {undefined}
- **/
- function refreshOdf(container) {
- if (odfcontainer !== container) {
- return;
- }
-
- // synchronize the object a window.odfcontainer with the view
- function callback() {
- clear(element);
- element.style.display = "inline-block";
- var odfnode = container.rootElement;
- element.ownerDocument.importNode(odfnode, true);
-
- formatting.setOdfContainer(container);
- handleStyles(odfnode, stylesxmlcss);
- // do content last, because otherwise the document is constantly
- // updated whenever the css changes
- handleContent(container, odfnode);
- fireEvent("statereadychange");
- }
-
- if (odfcontainer.state === odf.OdfContainer.DONE) {
- callback();
- } else {
- odfcontainer.onchange = callback;
- }
- }
-
- this.odfContainer = function () {
- return odfcontainer;
- };
- this.slidevisibilitycss = function () {
- return pageSwitcher.css;
- };
- /**
- * @param {!string} url
- * @return {undefined}
- */
- this["load"] = this.load = function (url) {
- loadingQueue.clearQueue();
- element.innerHTML = 'loading ' + url;
- // open the odf container
- odfcontainer = new odf.OdfContainer(url, function (container) {
- odfcontainer = container;
- refreshOdf(container);
- });
- odfcontainer.onstatereadychange = refreshOdf;
- };
-
- function stopEditing() {
- if (!editparagraph) {
- return;
- }
- var fragment = editparagraph.ownerDocument.createDocumentFragment();
- while (editparagraph.firstChild) {
- fragment.insertBefore(editparagraph.firstChild, null);
- }
- editparagraph.parentNode.replaceChild(fragment, editparagraph);
- }
-
- this.save = function (callback) {
- stopEditing();
- odfcontainer.save(callback);
- };
-
- function cancelPropagation(event) {
- if (event.stopPropagation) {
- event.stopPropagation();
- } else {
- event.cancelBubble = true;
- }
- }
-
- function cancelEvent(event) {
- if (event.preventDefault) {
- event.preventDefault();
- event.stopPropagation();
- } else {
- event.returnValue = false;
- event.cancelBubble = true;
- }
- }
-
- this.setEditable = function (iseditable) {
- editable = iseditable;
- if (!editable) {
- stopEditing();
- }
- };
-
- function processClick(evt) {
- evt = evt || window.event;
- // go up until we find a text:p, if we find it, wrap it in <p> and
- // make that editable
- var e = evt.target, selection = window.getSelection(),
- range = ((selection.rangeCount > 0)
- ? selection.getRangeAt(0) : null),
- startContainer = range && range.startContainer,
- startOffset = range && range.startOffset,
- endContainer = range && range.endContainer,
- endOffset = range && range.endOffset;
-
- while (e && !((e.localName === "p" || e.localName === "h") &&
- e.namespaceURI === textns)) {
- e = e.parentNode;
- }
- if (!editable) {
- return;
- }
- // test code for enabling editing
- if (!e || e.parentNode === editparagraph) {
- return;
- }
-
- if (!editparagraph) {
- editparagraph = e.ownerDocument.createElement("p");
- if (!editparagraph.style) {
- editparagraph = e.ownerDocument.createElementNS(
- "http://www.w3.org/1999/xhtml",
- "p"
- );
- }
- editparagraph.style.margin = "0px";
- editparagraph.style.padding = "0px";
- editparagraph.style.border = "0px";
- editparagraph.setAttribute("contenteditable", true);
- } else if (editparagraph.parentNode) {
- stopEditing();
- }
- e.parentNode.replaceChild(editparagraph, e);
- editparagraph.appendChild(e);
-
- // set the cursor or selection at the right position
- editparagraph.focus(); // needed in FF to show cursor in the paragraph
- if (range) {
- selection.removeAllRanges();
- range = e.ownerDocument.createRange();
- range.setStart(startContainer, startOffset);
- range.setEnd(endContainer, endOffset);
- selection.addRange(range);
- }
- cancelEvent(evt);
- }
-
- /**
- * @param {!string} eventName
- * @param {!function(*)} handler
- * @return {undefined}
- */
- this.addListener = function (eventName, handler) {
- if (eventName === "selectionchange") {
- selectionWatcher.addListener(eventName, handler);
- } else {
- addEventListener(eventName, handler);
- }
- };
- /**
- * @return {!odf.Formatting}
- */
- this.getFormatting = function () {
- return formatting;
- };
- /**
- * @param {!number} zoom
- * @return {undefined}
- */
- this.setZoomLevel = function (zoom) {
- zoomLevel = zoom;
- fixContainerSize();
- };
- /**
- * @return {!number}
- */
- this.getZoomLevel = function () {
- return zoomLevel;
- };
- /**
- * @param {!number} width
- * @param {!number} height
- * @return {undefined}
- */
- this.fitToContainingElement = function (width, height) {
- var realWidth = element.offsetWidth / zoomLevel,
- realHeight = element.offsetHeight / zoomLevel;
- zoomLevel = width / realWidth;
- if (height / realHeight < zoomLevel) {
- zoomLevel = height / realHeight;
- }
- fixContainerSize();
- };
- /**
- * @param {!number} width
- * @return {undefined}
- */
- this.fitToWidth = function (width) {
- var realWidth = element.offsetWidth / zoomLevel;
- zoomLevel = width / realWidth;
- fixContainerSize();
- };
- /**
- * @param {!number} height
- * @return {undefined}
- */
- this.fitToHeight = function (height) {
- var realHeight = element.offsetHeight / zoomLevel;
- zoomLevel = height / realHeight;
- fixContainerSize();
- };
- /**
- * @return {undefined}
- */
- this.showNextPage = function () {
- pageSwitcher.showNextPage();
- };
- /**
- * @return {undefined}
- */
- this.showPreviousPage = function () {
- pageSwitcher.showPreviousPage();
- };
- /**
- * @return {undefined}
- */
- this.showAllPages = function () {
- };
-
- listenEvent(element, "click", processClick);
- };
- return odf.OdfCanvas;
-}());
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/odf/OdfContainer.js b/apps/files_odfviewer/src/webodf/webodf/lib/odf/OdfContainer.js
deleted file mode 100644
index 709addbecd0..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/odf/OdfContainer.js
+++ /dev/null
@@ -1,672 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, core: true, xmldom: true, odf: true, DOMParser: true,
- document: true */
-runtime.loadClass("core.Base64");
-runtime.loadClass("core.Zip");
-runtime.loadClass("xmldom.LSSerializer");
-runtime.loadClass("odf.StyleInfo");
-runtime.loadClass("odf.Style2CSS");
-runtime.loadClass("odf.FontLoader");
-/**
- * The OdfContainer class manages the various parts that constitues an ODF
- * document.
- * @constructor
- * @param {!string} url
- * @param {!Function|null} onstatereadychange
- **/
-odf.OdfContainer = (function () {
- "use strict";
- var styleInfo = new odf.StyleInfo(),
- style2CSS = new odf.Style2CSS(),
- namespaces = style2CSS.namespaces,
- officens = "urn:oasis:names:tc:opendocument:xmlns:office:1.0",
- manifestns = "urn:oasis:names:tc:opendocument:xmlns:manifest:1.0",
- nodeorder = ['meta', 'settings', 'scripts', 'font-face-decls', 'styles',
- 'automatic-styles', 'master-styles', 'body'],
- base64 = new core.Base64(),
- fontLoader = new odf.FontLoader(),
- partMimetypes = {};
- /**
- * @param {?Node} node
- * @param {!string} ns
- * @param {!string} name
- * @return {?Node}
- */
- function getDirectChild(node, ns, name) {
- node = (node) ? node.firstChild : null;
- while (node) {
- if (node.localName === name && node.namespaceURI === ns) {
- return node;
- }
- node = node.nextSibling;
- }
- return null;
- }
- /**
- * Return the position the node should get according to the ODF flat format.
- * @param {!Node} child
- * @return {!number}
- */
- function getNodePosition(child) {
- var childpos = 0, i, l = nodeorder.length;
- for (i = 0; i < l; i += 1) {
- if (child.namespaceURI === officens &&
- child.localName === nodeorder[i]) {
- return i;
- }
- }
- return -1;
- }
- /**
- * Class that filters runtime specific nodes from the DOM.
- * @constructor
- * @implements {xmldom.LSSerializerFilter}
- * @param {!Element} odfroot
- * @param {!Element=} usedStylesElement
- */
- function OdfNodeFilter(odfroot, usedStylesElement) {
- var automaticStyles = odfroot.automaticStyles,
- usedKeysList;
- if (usedStylesElement) {
- usedKeysList = new styleInfo.UsedKeysList(usedStylesElement);
- }
- /**
- * @param {!Node} node
- * @return {!number}
- */
- this.acceptNode = function (node) {
- var styleName, styleFamily, result;
- if (node.namespaceURI === "http://www.w3.org/1999/xhtml") {
- result = 3; // FILTER_SKIP
- } else if (usedKeysList && node.parentNode === automaticStyles &&
- node.nodeType === 1) {
- if (usedKeysList.uses(node)) {
- result = 1; // FILTER_ACCEPT
- } else {
- result = 2; // FILTER_REJECT
- }
- } else {
- result = 1; // FILTER_ACCEPT
- }
- return result;
- };
- }
- /**
- * Put the element at the right position in the parent.
- * The right order is given by the value returned from getNodePosition.
- * @param {!Node} node
- * @param {?Node} child
- * @return {undefined}
- */
- function setChild(node, child) {
- if (!child) {
- return;
- }
- var childpos = getNodePosition(child),
- pos,
- c = node.firstChild;
- if (childpos === -1) {
- return;
- }
- while (c) {
- pos = getNodePosition(c);
- if (pos !== -1 && pos > childpos) {
- break;
- }
- c = c.nextSibling;
- }
- node.insertBefore(child, c);
- }
- /**
- * A DOM element that is part of and ODF part of a DOM.
- * @constructor
- * @extends {Element}
- */
- function ODFElement() {
- }
- /**
- * The root element of an ODF document.
- * @constructor
- * @extends {ODFElement}
- */
- function ODFDocumentElement(odfcontainer) {
- this.OdfContainer = odfcontainer;
- }
- ODFDocumentElement.prototype = new ODFElement();
- ODFDocumentElement.prototype.constructor = ODFDocumentElement;
- ODFDocumentElement.namespaceURI = officens;
- ODFDocumentElement.localName = 'document';
- // private constructor
- /**
- * @constructor
- * @param {!string} name
- * @param {!odf.OdfContainer} container
- * @param {!core.Zip} zip
- */
- function OdfPart(name, container, zip) {
- var self = this,
- privatedata;
-
- // declare public variables
- this.size = 0;
- this.type = null;
- this.name = name;
- this.container = container;
- this.url = null;
- this.mimetype = null;
- this.document = null;
- this.onreadystatechange = null;
- this.onchange = null;
- this.EMPTY = 0;
- this.LOADING = 1;
- this.DONE = 2;
- this.state = this.EMPTY;
-
- // private functions
- // public functions
- this.load = function () {
- var mimetype = partMimetypes[name];
- this.mimetype = mimetype;
- zip.loadAsDataURL(name, mimetype, function (err, url) {
- self.url = url;
- if (self.onchange) {
- self.onchange(self);
- }
- if (self.onstatereadychange) {
- self.onstatereadychange(self);
- }
- });
- };
- this.abort = function () {
- // TODO
- };
- }
- OdfPart.prototype.load = function () {
- };
- OdfPart.prototype.getUrl = function () {
- if (this.data) {
- return 'data:;base64,' + base64.toBase64(this.data);
- }
- return null;
- };
- /**
- * @constructor
- * @param {!odf.OdfContainer} odfcontainer
- */
- function OdfPartList(odfcontainer) {
- var self = this;
- // declare public variables
- this.length = 0;
- this.item = function (index) {
- };
- }
- /**
- * @constructor
- * @param {!string} url
- * @param {!Function|null} onstatereadychange
- */
- odf.OdfContainer = function OdfContainer(url, onstatereadychange) {
- var self = this,
- zip = null,
- contentXmlCompletelyLoaded = false;
-
- // NOTE each instance of OdfContainer has a copy of the private functions
- // it would be better to have a class OdfContainerPrivate where the
- // private functions can be defined via OdfContainerPrivate.prototype
- // without exposing them
-
- // declare public variables
- this.onstatereadychange = onstatereadychange;
- this.onchange = null;
- this.state = null;
- this.rootElement = null;
- this.parts = null;
-
- /**
- * @param {!Element} element
- * @return {undefined}
- */
- function removeProcessingInstructions(element) {
- var n = element.firstChild, next, e;
- while (n) {
- next = n.nextSibling;
- if (n.nodeType === 1) { // ELEMENT
- e = /**@type{!Element}*/(n);
- removeProcessingInstructions(e);
- } else if (n.nodeType === 7) { // PROCESSING_INSTRUCTION_NODE
- element.removeChild(n);
- }
- n = next;
- }
- }
-
- // private functions
- /**
- * Import the document elementnode into the DOM of OdfContainer.
- * Any processing instructions are removed, since importing them
- * gives an exception.
- * @param {!Document} xmldoc
- * @return {!Node}
- */
- function importRootNode(xmldoc) {
- var doc = self.rootElement.ownerDocument,
- node;
- // remove all processing instructions
- // TODO: replace cursor processing instruction with an element
- if (xmldoc) {
- removeProcessingInstructions(xmldoc.documentElement);
- try {
- node = doc.importNode(xmldoc.documentElement, true);
- } catch (e) {
- }
- }
- return node;
- }
- function setState(state) {
- self.state = state;
- if (self.onchange) {
- self.onchange(self);
- }
- if (self.onstatereadychange) {
- self.onstatereadychange(self);
- }
- }
- /**
- * @param {!Document} xmldoc
- * @return {undefined}
- */
- function handleFlatXml(xmldoc) {
- var root = importRootNode(xmldoc);
- if (!root || root.localName !== 'document' ||
- root.namespaceURI !== officens) {
- setState(OdfContainer.INVALID);
- return;
- }
- self.rootElement = root;
- root.fontFaceDecls = getDirectChild(root, officens, 'font-face-decls');
- root.styles = getDirectChild(root, officens, 'styles');
- root.automaticStyles = getDirectChild(root, officens,
- 'automatic-styles');
- root.masterStyles = getDirectChild(root, officens, 'master-styles');
- root.body = getDirectChild(root, officens, 'body');
- root.meta = getDirectChild(root, officens, 'meta');
- setState(OdfContainer.DONE);
- }
- /**
- * @param {!Document} xmldoc
- * @return {undefined}
- */
- function handleStylesXml(xmldoc) {
- var node = importRootNode(xmldoc),
- root = self.rootElement;
- if (!node || node.localName !== 'document-styles' ||
- node.namespaceURI !== officens) {
- setState(OdfContainer.INVALID);
- return;
- }
- root.fontFaceDecls = getDirectChild(node, officens, 'font-face-decls');
- setChild(root, root.fontFaceDecls);
- root.styles = getDirectChild(node, officens, 'styles');
- setChild(root, root.styles);
- root.automaticStyles = getDirectChild(node, officens,
- 'automatic-styles');
- setChild(root, root.automaticStyles);
- root.masterStyles = getDirectChild(node, officens, 'master-styles');
- setChild(root, root.masterStyles);
- //removeUnusedAutomaticStyles(root.automaticStyles,
- // root.masterStyles);
- fontLoader.loadFonts(root.fontFaceDecls, zip, null);
- }
- /**
- * @param {!Document} xmldoc
- * @return {undefined}
- */
- function handleContentXml(xmldoc) {
- var node = importRootNode(xmldoc),
- root,
- automaticStyles,
- fontFaceDecls,
- c;
- if (!node || node.localName !== 'document-content' ||
- node.namespaceURI !== officens) {
- setState(OdfContainer.INVALID);
- return;
- }
- root = self.rootElement;
- fontFaceDecls = getDirectChild(node, officens, 'font-face-decls');
- if (root.fontFaceDecls && fontFaceDecls) {
- c = fontFaceDecls.firstChild;
- while (c) {
- root.fontFaceDecls.appendChild(c);
- c = fontFaceDecls.firstChild;
- }
- } else if (fontFaceDecls) {
- root.fontFaceDecls = fontFaceDecls;
- setChild(root, fontFaceDecls);
- }
- automaticStyles = getDirectChild(node, officens, 'automatic-styles');
- if (root.automaticStyles && automaticStyles) {
- c = automaticStyles.firstChild;
- while (c) {
- root.automaticStyles.appendChild(c);
- c = automaticStyles.firstChild; // works because node c moved
- }
- } else if (automaticStyles) {
- root.automaticStyles = automaticStyles;
- setChild(root, automaticStyles);
- }
- root.body = getDirectChild(node, officens, 'body');
- setChild(root, root.body);
- }
- /**
- * @param {!Document} xmldoc
- * @return {undefined}
- */
- function handleMetaXml(xmldoc) {
- var node = importRootNode(xmldoc),
- root;
- if (!node || node.localName !== 'document-meta' ||
- node.namespaceURI !== officens) {
- return;
- }
- root = self.rootElement;
- root.meta = getDirectChild(node, officens, 'meta');
- setChild(root, root.meta);
- }
- /**
- * @param {!Document} xmldoc
- * @return {undefined}
- */
- function handleSettingsXml(xmldoc) {
- var node = importRootNode(xmldoc),
- root;
- if (!node || node.localName !== 'document-settings' ||
- node.namespaceURI !== officens) {
- return;
- }
- root = self.rootElement;
- root.settings = getDirectChild(node, officens, 'settings');
- setChild(root, root.settings);
- }
- /**
- * @param {!Document} xmldoc
- * @return {undefined}
- */
- function handleManifestXml(xmldoc) {
- var node = importRootNode(xmldoc),
- root,
- n;
- if (!node || node.localName !== 'manifest' ||
- node.namespaceURI !== manifestns) {
- return;
- }
- root = self.rootElement;
- root.manifest = node;
- n = root.manifest.firstChild;
- while (n) {
- if (n.nodeType === 1 && n.localName === "file-entry" &&
- n.namespaceURI === manifestns) {
- partMimetypes[n.getAttributeNS(manifestns, "full-path")] =
- n.getAttributeNS(manifestns, "media-type");
- }
- n = n.nextSibling;
- }
- }
- /**
- * @param {!function(?string,?Document)} callback
- * @return {undefined}
- */
- function getContentXmlNode(callback) {
- var handler = {
- rootElementReady: function (err, rootxml, done) {
- contentXmlCompletelyLoaded = err || done;
- if (err) {
- return callback(err, null);
- }
- var parser = new DOMParser();
- rootxml = parser.parseFromString(rootxml, "text/xml");
- callback(null, rootxml);
- },
- bodyChildElementsReady: function (err, nodes, done) {
- // TODO
- }
- };
- zip.loadContentXmlAsFragments("content.xml", handler);
- }
- /**
- * @param {!string} filepath
- * @param {!function(?string,?Document)} callback
- * @return {undefined}
- */
- function getXmlNode(filepath, callback) {
- zip.loadAsDOM(filepath, callback);
- }
- /**
- * @return {undefined}
- */
- function loadComponents() {
- // always load content.xml, meta.xml, styles.xml and settings.xml
- getXmlNode('styles.xml', function (err, xmldoc) {
- handleStylesXml(xmldoc);
- if (self.state === OdfContainer.INVALID) {
- return;
- }
- getXmlNode('content.xml', function (err, xmldoc) {
- handleContentXml(xmldoc);
- if (self.state === OdfContainer.INVALID) {
- return;
- }
- getXmlNode('meta.xml', function (err, xmldoc) {
- handleMetaXml(xmldoc);
- if (self.state === OdfContainer.INVALID) {
- return;
- }
- getXmlNode('settings.xml', function (err, xmldoc) {
- if (xmldoc) {
- handleSettingsXml(xmldoc);
- }
- getXmlNode('META-INF/manifest.xml', function (err,
- xmldoc) {
- if (xmldoc) {
- handleManifestXml(xmldoc);
- }
- if (self.state !== OdfContainer.INVALID) {
- setState(OdfContainer.DONE);
- }
- });
- });
- });
- });
- });
- }
- function documentElement(name, map) {
- var s = "", i;
- for (i in map) {
- if (map.hasOwnProperty(i)) {
- s += " xmlns:" + i + "=\"" + map[i] + "\"";
- }
- }
- return "<?xml version=\"1.0\" encoding=\"UTF-8\"?><office:" + name +
- " " + s + " office:version=\"1.2\">";
- }
- /**
- * @return {!string}
- */
- function serializeMetaXml() {
- var nsmap = style2CSS.namespaces,
- serializer = new xmldom.LSSerializer(),
- /**@type{!string}*/ s = documentElement("document-meta", nsmap);
- serializer.filter = new OdfNodeFilter(self.rootElement);
- s += serializer.writeToString(self.rootElement.meta, nsmap);
- s += "</office:document-meta>";
- return s;
- }
- /**
- * @return {!string}
- */
- function serializeSettingsXml() {
- var nsmap = style2CSS.namespaces,
- serializer = new xmldom.LSSerializer(),
- /**@type{!string}*/ s = documentElement("document-settings", nsmap);
- serializer.filter = new OdfNodeFilter(self.rootElement);
- s += serializer.writeToString(self.rootElement.settings, nsmap);
- s += "</office:document-settings>";
- return s;
- }
- /**
- * @return {!string}
- */
- function serializeStylesXml() {
- var nsmap = style2CSS.namespaces,
- serializer = new xmldom.LSSerializer(),
- /**@type{!string}*/ s = documentElement("document-styles", nsmap);
- serializer.filter = new OdfNodeFilter(self.rootElement,
- self.rootElement.masterStyles);
- s += serializer.writeToString(self.rootElement.fontFaceDecls, nsmap);
- s += serializer.writeToString(self.rootElement.styles, nsmap);
- s += serializer.writeToString(self.rootElement.automaticStyles, nsmap);
- s += serializer.writeToString(self.rootElement.masterStyles, nsmap);
- s += "</office:document-styles>";
- return s;
- }
- /**
- * @return {!string}
- */
- function serializeContentXml() {
- var nsmap = style2CSS.namespaces,
- serializer = new xmldom.LSSerializer(),
- /**@type{!string}*/ s = documentElement("document-content", nsmap);
- serializer.filter = new OdfNodeFilter(self.rootElement,
- self.rootElement.body);
- // Until there is code to determine if a font is referenced only
- // from all font declaratios will be stored in styles.xml
- s += serializer.writeToString(self.rootElement.automaticStyles, nsmap);
- s += serializer.writeToString(self.rootElement.body, nsmap);
- s += "</office:document-content>";
- return s;
- }
- function createElement(Type) {
- var original = document.createElementNS(
- Type.namespaceURI,
- Type.localName
- ),
- method,
- iface = new Type();
- for (method in iface) {
- if (iface.hasOwnProperty(method)) {
- original[method] = iface[method];
- }
- }
- return original;
- }
- function loadFromXML(url, callback) {
- runtime.loadXML(url, function (err, dom) {
- if (err) {
- callback(err);
- } else {
- handleFlatXml(dom);
- }
- });
- }
- // public functions
- /**
- * Open file and parse it. Return the XML Node. Return the root node of
- * the file or null if this is not possible.
- * For 'content.xml', 'styles.xml', 'meta.xml', and 'settings.xml', the
- * elements 'document-content', 'document-styles', 'document-meta', or
- * 'document-settings' will be returned respectively.
- * @param {!string} partname
- * @return {!OdfPart}
- **/
- this.getPart = function (partname) {
- return new OdfPart(partname, self, zip);
- };
- /**
- * @param {function(?string):undefined} callback
- * @return {undefined}
- */
- this.save = function (callback) {
- // the assumption so far is that all ODF parts are serialized
- // already, but meta, settings, styles and content should be
- // refreshed
- // update the zip entries with the data from the live ODF DOM
- var data;
- data = runtime.byteArrayFromString(serializeSettingsXml(), "utf8");
- zip.save("settings.xml", data, true, new Date());
- data = runtime.byteArrayFromString(serializeMetaXml(), "utf8");
- zip.save("meta.xml", data, true, new Date());
- data = runtime.byteArrayFromString(serializeStylesXml(), "utf8");
- zip.save("styles.xml", data, true, new Date());
- data = runtime.byteArrayFromString(serializeContentXml(), "utf8");
- zip.save("content.xml", data, true, new Date());
- zip.write(function (err) {
- callback(err);
- });
- };
-
- // initialize public variables
- this.state = OdfContainer.LOADING;
- this.rootElement = createElement(ODFDocumentElement);
- this.parts = new OdfPartList(this);
-
- // initialize private variables
- zip = new core.Zip(url, function (err, zipobject) {
- zip = zipobject;
- if (err) {
- loadFromXML(url, function (xmlerr) {
- if (err) {
- zip.error = err + "\n" + xmlerr;
- setState(OdfContainer.INVALID);
- }
- });
- } else {
- loadComponents();
- }
- });
- };
- odf.OdfContainer.EMPTY = 0;
- odf.OdfContainer.LOADING = 1;
- odf.OdfContainer.DONE = 2;
- odf.OdfContainer.INVALID = 3;
- odf.OdfContainer.SAVING = 4;
- odf.OdfContainer.MODIFIED = 5;
- /**
- * @param {!string} url
- * @return {!odf.OdfContainer}
- */
- odf.OdfContainer.getContainer = function (url) {
- return new odf.OdfContainer(url, null);
- };
- return odf.OdfContainer;
-}());
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/odf/Style2CSS.js b/apps/files_odfviewer/src/webodf/webodf/lib/odf/Style2CSS.js
deleted file mode 100644
index f33e3faef43..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/odf/Style2CSS.js
+++ /dev/null
@@ -1,632 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global odf: true, runtime: true*/
-/**
- * @constructor
- */
-odf.Style2CSS = function Style2CSS() {
- "use strict";
- // helper constants
- var xlinkns = 'http://www.w3.org/1999/xlink',
- drawns = "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0",
- fons = "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0",
- officens = "urn:oasis:names:tc:opendocument:xmlns:office:1.0",
- presentationns = "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0",
- stylens = "urn:oasis:names:tc:opendocument:xmlns:style:1.0",
- svgns = "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0",
- tablens = "urn:oasis:names:tc:opendocument:xmlns:table:1.0",
- textns = "urn:oasis:names:tc:opendocument:xmlns:text:1.0",
- namespaces = {
- "draw": drawns,
- "fo": fons,
- "office": officens,
- "presentation": presentationns,
- "style": stylens,
- "svg": svgns,
- "table": tablens,
- "text": textns,
- "xlink": xlinkns
- },
-
- familynamespaceprefixes = {
- 'graphic': 'draw',
- 'paragraph': 'text',
- 'presentation': 'presentation',
- 'ruby': 'text',
- 'section': 'text',
- 'table': 'table',
- 'table-cell': 'table',
- 'table-column': 'table',
- 'table-row': 'table',
- 'text': 'text',
- 'list': 'text'
- },
-
- familytagnames = {
- 'graphic': ['circle', 'connected', 'control', 'custom-shape',
- 'ellipse', 'frame', 'g', 'line', 'measure', 'page',
- 'page-thumbnail', 'path', 'polygon', 'polyline', 'rect',
- 'regular-polygon' ],
- 'paragraph': ['alphabetical-index-entry-template', 'h',
- 'illustration-index-entry-template', 'index-source-style',
- 'object-index-entry-template', 'p',
- 'table-index-entry-template', 'table-of-content-entry-template',
- 'user-index-entry-template'],
- 'presentation': ['caption', 'circle', 'connector', 'control',
- 'custom-shape', 'ellipse', 'frame', 'g', 'line', 'measure',
- 'page-thumbnail', 'path', 'polygon', 'polyline', 'rect',
- 'regular-polygon'],
- 'ruby': ['ruby', 'ruby-text'],
- 'section': ['alphabetical-index', 'bibliography',
- 'illustration-index', 'index-title', 'object-index', 'section',
- 'table-of-content', 'table-index', 'user-index'],
- 'table': ['background', 'table'],
- 'table-cell': ['body', 'covered-table-cell', 'even-columns',
- 'even-rows', 'first-column', 'first-row', 'last-column',
- 'last-row', 'odd-columns', 'odd-rows', 'table-cell'],
- 'table-column': ['table-column'],
- 'table-row': ['table-row'],
- 'text': ['a', 'index-entry-chapter', 'index-entry-link-end',
- 'index-entry-link-start', 'index-entry-page-number',
- 'index-entry-span', 'index-entry-tab-stop', 'index-entry-text',
- 'index-title-template', 'linenumbering-configuration',
- 'list-level-style-number', 'list-level-style-bullet',
- 'outline-level-style', 'span'],
- 'list': ['list-item']
- },
-
- textPropertySimpleMapping = [
- [ fons, 'color', 'color' ],
- // this sets the element background, not just the text background
- [ fons, 'background-color', 'background-color' ],
- [ fons, 'font-weight', 'font-weight' ],
- [ fons, 'font-style', 'font-style' ],
- [ fons, 'font-size', 'font-size' ]
- ],
-
- bgImageSimpleMapping = [
- [ stylens, 'repeat', 'background-repeat' ]
- ],
-
- paragraphPropertySimpleMapping = [
- [ fons, 'background-color', 'background-color' ],
- [ fons, 'text-align', 'text-align' ],
- [ fons, 'padding-left', 'padding-left' ],
- [ fons, 'padding-right', 'padding-right' ],
- [ fons, 'padding-top', 'padding-top' ],
- [ fons, 'padding-bottom', 'padding-bottom' ],
- [ fons, 'border-left', 'border-left' ],
- [ fons, 'border-right', 'border-right' ],
- [ fons, 'border-top', 'border-top' ],
- [ fons, 'border-bottom', 'border-bottom' ],
- [ fons, 'margin-left', 'margin-left' ],
- [ fons, 'margin-right', 'margin-right' ],
- [ fons, 'margin-top', 'margin-top' ],
- [ fons, 'margin-bottom', 'margin-bottom' ],
- [ fons, 'border', 'border' ]
- ],
-
- graphicPropertySimpleMapping = [
- [ drawns, 'fill-color', 'background-color' ],
- [ drawns, 'fill', 'background' ],
- [ fons, 'min-height', 'min-height' ],
- [ drawns, 'stroke', 'border' ],
- [ svgns, 'stroke-color', 'border-color' ]
- ],
-
- tablecellPropertySimpleMapping = [
- [ fons, 'background-color', 'background-color' ],
- [ fons, 'border-left', 'border-left' ],
- [ fons, 'border-right', 'border-right' ],
- [ fons, 'border-top', 'border-top' ],
- [ fons, 'border-bottom', 'border-bottom' ]
- ];
-
- // helper functions
- /**
- * @param {string} prefix
- * @return {string}
- */
- function namespaceResolver(prefix) {
- return namespaces[prefix] || null;
- }
- /**
- * @param {!Document} doc
- * @param {!Element} stylesnode
- * @return {!Object}
- */
- function getStyleMap(doc, stylesnode) {
- // put all style elements in a hash map by family and name
- var stylemap = {}, node, name, family, map;
- if (!stylesnode) {
- return stylemap;
- }
- node = stylesnode.firstChild;
- while (node) {
- if (node.namespaceURI === stylens && node.localName === 'style') {
- family = node.getAttributeNS(stylens, 'family');
- } else if (node.namespaceURI === textns &&
- node.localName === 'list-style') {
- family = "list";
- }
- name = family && node.getAttributeNS &&
- node.getAttributeNS(stylens, 'name');
- if (name) {
- if (!stylemap[family]) {
- stylemap[family] = {};
- }
- stylemap[family][name] = node;
- }
- node = node.nextSibling;
- }
- return stylemap;
- }
- /**
- * @param {?Object} stylestree
- * @param {?string} name
- * @return {?string}
- */
- function findStyle(stylestree, name) {
- if (!name || !stylestree) {
- return null;
- }
- if (stylestree[name]) {
- return stylestree[name];
- }
- var derivedStyles = stylestree.derivedStyles,
- n, style;
- for (n in stylestree) {
- if (stylestree.hasOwnProperty(n)) {
- style = findStyle(stylestree[n].derivedStyles, name);
- if (style) {
- return style;
- }
- }
- }
- return null;
- }
- /**
- * @param {!string} stylename
- * @param {!Object} stylesmap
- * @param {!Object} stylestree
- * @return {undefined}
- */
- function addStyleToStyleTree(stylename, stylesmap, stylestree) {
- var style = stylesmap[stylename], parentname, parentstyle;
- if (!style) {
- return;
- }
- parentname = style.getAttributeNS(stylens, 'parent-style-name');
- parentstyle = null;
- if (parentname) {
- parentstyle = findStyle(stylestree, parentname);
- if (!parentstyle && stylesmap[parentname]) {
- // parent style has not been handled yet, do that now
- addStyleToStyleTree(parentname, stylesmap, stylestree);
- parentstyle = stylesmap[parentname];
- stylesmap[parentname] = null;
- }
- }
- if (parentstyle) {
- if (!parentstyle.derivedStyles) {
- parentstyle.derivedStyles = {};
- }
- parentstyle.derivedStyles[stylename] = style;
- } else {
- // no parent so add the root
- stylestree[stylename] = style;
- }
- }
- /**
- * @param {!Object} stylesmap
- * @param {!Object} stylestree
- * @return {undefined}
- */
- function addStyleMapToStyleTree(stylesmap, stylestree) {
- var name;
- for (name in stylesmap) {
- if (stylesmap.hasOwnProperty(name)) {
- addStyleToStyleTree(name, stylesmap, stylestree);
- stylesmap[name] = null;
- }
- }
- }
- /**
- * @param {!string} family
- * @param {!string} name
- * @return {?string}
- */
- function createSelector(family, name) {
- var prefix = familynamespaceprefixes[family],
- namepart,
- selector = "",
- first = true;
- if (prefix === null) {
- return null;
- }
- namepart = '[' + prefix + '|style-name="' + name + '"]';
- if (prefix === 'presentation') {
- prefix = 'draw';
- namepart = '[presentation|style-name="' + name + '"]';
- }
- return prefix + '|' + familytagnames[family].join(
- namepart + ',' + prefix + '|') + namepart;
- }
- /**
- * @param {!string} family
- * @param {!string} name
- * @param {!Element} node
- * @return {!Array}
- */
- function getSelectors(family, name, node) {
- var selectors = [], n, ss, s;
- selectors.push(createSelector(family, name));
- for (n in node.derivedStyles) {
- if (node.derivedStyles.hasOwnProperty(n)) {
- ss = getSelectors(family, n, node.derivedStyles[n]);
- for (s in ss) {
- if (ss.hasOwnProperty(s)) {
- selectors.push(ss[s]);
- }
- }
- }
- }
- return selectors;
- }
- /**
- * @param {?Element} node
- * @param {!string} ns
- * @param {!string} name
- * @return {?Element}
- */
- function getDirectChild(node, ns, name) {
- if (!node) {
- return null;
- }
- var c = node.firstChild, e;
- while (c) {
- if (c.namespaceURI === ns && c.localName === name) {
- e = /**@type{Element}*/(c);
- return e;
- }
- c = c.nextSibling;
- }
- return null;
- }
- /**
- * @param {!Element} props
- * @param {!Object} mapping
- * @return {!string}
- */
- function applySimpleMapping(props, mapping) {
- var rule = '', r, value;
- for (r in mapping) {
- if (mapping.hasOwnProperty(r)) {
- r = mapping[r];
- value = props.getAttributeNS(r[0], r[1]);
- if (value) {
- rule += r[2] + ':' + value + ';';
- }
- }
- }
- return rule;
- }
- /**
- * @param {!string} name
- * @return {!string}
- */
- function getFontDeclaration(name) {
- return '"' + name + '"';
- }
- /**
- * @param {!Element} props
- * @return {!string}
- */
- function getTextProperties(props) {
- var rule = '', value;
- rule += applySimpleMapping(props, textPropertySimpleMapping);
- value = props.getAttributeNS(stylens, 'text-underline-style');
- if (value === 'solid') {
- rule += 'text-decoration: underline;';
- }
- value = props.getAttributeNS(stylens, 'font-name');
- if (value) {
- value = getFontDeclaration(value);
- if (value) {
- rule += 'font-family: ' + value + ';';
- }
- }
- return rule;
- }
- /**
- * @param {!Element} props
- * @return {!string}
- */
- function getParagraphProperties(props) {
- var rule = '', imageProps, url, element;
- rule += applySimpleMapping(props, paragraphPropertySimpleMapping);
- imageProps = props.getElementsByTagNameNS(stylens, 'background-image');
- if (imageProps.length > 0) {
- url = imageProps.item(0).getAttributeNS(xlinkns, 'href');
- if (url) {
- rule += "background-image: url('odfkit:" + url + "');";
- //rule += "background-repeat: repeat;"; //FIXME test
- element = /**@type{!Element}*/(imageProps.item(0));
- rule += applySimpleMapping(element, bgImageSimpleMapping);
- }
- }
- return rule;
- }
- /**
- * @param {!Element} props
- * @return {!string}
- */
- function getGraphicProperties(props) {
- var rule = '';
- rule += applySimpleMapping(props, graphicPropertySimpleMapping);
- return rule;
- }
- /**
- * @param {!Element} props
- * @return {!string}
- */
- function getTableCellProperties(props) {
- var rule = '';
- rule += applySimpleMapping(props, tablecellPropertySimpleMapping);
- return rule;
- }
- /**
- * @param {!StyleSheet} sheet
- * @param {!string} family
- * @param {!string} name
- * @param {!Element} node
- * @return {undefined}
- */
- function addStyleRule(sheet, family, name, node) {
- var selectors = getSelectors(family, name, node),
- selector = selectors.join(','),
- rule = '',
- properties = getDirectChild(node, stylens, 'text-properties');
- if (properties) {
- rule += getTextProperties(properties);
- }
- properties = getDirectChild(node, stylens, 'paragraph-properties');
- if (properties) {
- rule += getParagraphProperties(properties);
- }
- properties = getDirectChild(node, stylens, 'graphic-properties');
- if (properties) {
- rule += getGraphicProperties(properties);
- }
- properties = getDirectChild(node, stylens, 'table-cell-properties');
- if (properties) {
- rule += getTableCellProperties(properties);
- }
- if (rule.length === 0) {
- return;
- }
- rule = selector + '{' + rule + '}';
- try {
- sheet.insertRule(rule, sheet.cssRules.length);
- } catch (e) {
- throw e;
- }
- }
- /**
- * @param {!Element} node
- * @return {!string}
- */
- function getNumberRule(node) {
- var style = node.getAttributeNS(stylens, "num-format"),
- suffix = node.getAttributeNS(stylens, "num-suffix"),
- prefix = node.getAttributeNS(stylens, "num-prefix"),
- rule = "",
- stylemap = {'1': 'decimal', 'a': 'lower-latin', 'A': 'upper-latin',
- 'i': 'lower-roman', 'I': 'upper-roman'},
- content = "";
- content = prefix || "";
- if (stylemap.hasOwnProperty(style)) {
- content += " counter(list, " + stylemap[style] + ")";
- } else if (style) {
- content += "'" + style + "';";
- } else {
- content += " ''";
- }
- if (suffix) {
- content += " '" + suffix + "'";
- }
- rule = "content: " + content + ";";
- return rule;
- }
- /**
- * @param {!Element} node
- * @return {!string}
- */
- function getImageRule(node) {
- var rule = "content: none;";
- return rule;
- }
- /**
- * @param {!Element} node
- * @return {!string}
- */
- function getBulletRule(node) {
- var rule = "",
- bulletChar = node.getAttributeNS(textns, "bullet-char");
- return "content: '" + bulletChar + "';";
- }
- /**
- * @param {!StyleSheet} sheet
- * @param {!string} name
- * @param {!Element} node
- * @return {undefined}
- */
- function addListStyleRule(sheet, name, node, itemrule) {
- var selector = 'text|list[text|style-name="' + name +
- '"]',
- level = node.getAttributeNS(textns, "level"),
- rule = "";
- level = level && parseInt(level, 10);
- while (level > 1) {
- selector += " > text|list-item > text|list";
- level -= 1;
- }
- selector += " > list-item:before";
- rule = itemrule;
- rule = selector + '{' + rule + '}';
- try {
- sheet.insertRule(rule, sheet.cssRules.length);
- } catch (e) {
- throw e;
- }
- }
- /**
- * @param {!StyleSheet} sheet
- * @param {!string} name
- * @param {!Element} node
- * @return {undefined}
- */
- function addListStyleRules(sheet, name, node) {
- var n = node.firstChild, e, itemrule;
- while (n) {
- if (n.namespaceURI === textns) {
- e = /**@type{!Element}*/(n);
- if (n.localName === "list-level-style-number") {
- itemrule = getNumberRule(e);
- addListStyleRule(sheet, name, e, itemrule);
- } else if (n.localName === "list-level-style-image") {
- itemrule = getImageRule(e);
- addListStyleRule(sheet, name, e, itemrule);
- } else if (n.localName === "list-level-style-bullet") {
- itemrule = getBulletRule(e);
- addListStyleRule(sheet, name, e, itemrule);
- }
- }
- n = n.nextSibling;
- }
- }
- /**
- * @param {!StyleSheet} sheet
- * @param {!string} family
- * @param {!string} name
- * @param {!Element} node
- * @return {undefined}
- */
- function addRule(sheet, family, name, node) {
- if (family === "list") {
- addListStyleRules(sheet, name, node);
- } else {
- addStyleRule(sheet, family, name, node);
- }
- }
- /**
- * @param {!StyleSheet} sheet
- * @param {!string} family
- * @param {!string} name
- * @param {!Element} node
- * @return {undefined}
- */
- function addRules(sheet, family, name, node) {
- addRule(sheet, family, name, node);
- var n;
- for (n in node.derivedStyles) {
- if (node.derivedStyles.hasOwnProperty(n)) {
- addRules(sheet, family, n, node.derivedStyles[n]);
- }
- }
- }
-
- // css vs odf styles
- // ODF styles occur in families. A family is a group of odf elements to
- // which an element applies. ODF families can be mapped to a group of css
- // elements
-
- this.namespaces = namespaces;
- this.namespaceResolver = namespaceResolver;
- this.namespaceResolver.lookupNamespaceURI = this.namespaceResolver;
-
- /**
- * @param {!StyleSheet} stylesheet
- * @param {!Element} styles
- * @param {!Element} autostyles
- * @return {undefined}
- */
- this.style2css = function (stylesheet, styles, autostyles) {
- var doc, prefix, styletree, tree, name, rule, family,
- stylenodes, styleautonodes;
- // make stylesheet empty
- while (stylesheet.cssRules.length) {
- stylesheet.deleteRule(stylesheet.cssRules.length - 1);
- }
- doc = null;
- if (styles) {
- doc = styles.ownerDocument;
- }
- if (autostyles) {
- doc = autostyles.ownerDocument;
- }
- if (!doc) {
- return;
- }
- // add @namespace rules
- for (prefix in namespaces) {
- if (namespaces.hasOwnProperty(prefix)) {
- rule = '@namespace ' + prefix + ' url(' + namespaces[prefix] + ');';
- try {
- stylesheet.insertRule(rule, stylesheet.cssRules.length);
- } catch (e) {
- // WebKit can throw an exception here, but it will have
- // retained the namespace declarations anyway.
- }
- }
- }
-
- // add the various styles
- stylenodes = getStyleMap(doc, styles);
- styleautonodes = getStyleMap(doc, autostyles);
- styletree = {};
- for (family in familynamespaceprefixes) {
- if (familynamespaceprefixes.hasOwnProperty(family)) {
- tree = styletree[family] = {};
- addStyleMapToStyleTree(stylenodes[family], tree);
- addStyleMapToStyleTree(styleautonodes[family], tree);
-
- for (name in tree) {
- if (tree.hasOwnProperty(name)) {
- addRules(stylesheet, family, name, tree[name]);
- }
- }
- }
- }
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/odf/StyleInfo.js b/apps/files_odfviewer/src/webodf/webodf/lib/odf/StyleInfo.js
deleted file mode 100644
index 9b76d13bed9..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/odf/StyleInfo.js
+++ /dev/null
@@ -1,424 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global odf*/
-/**
- * @constructor
- */
-odf.StyleInfo = function StyleInfo() {
- "use strict";
- // helper constants
- var chartns = "urn:oasis:names:tc:opendocument:xmlns:chart:1.0",
- dbns = "urn:oasis:names:tc:opendocument:xmlns:database:1.0",
- dr3dns = "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0",
- drawns = "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0",
- fons = "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0",
- formns = "urn:oasis:names:tc:opendocument:xmlns:form:1.0",
- numberns = "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0",
- officens = "urn:oasis:names:tc:opendocument:xmlns:office:1.0",
- presentationns = "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0",
- stylens = "urn:oasis:names:tc:opendocument:xmlns:style:1.0",
- svgns = "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0",
- tablens = "urn:oasis:names:tc:opendocument:xmlns:table:1.0",
- textns = "urn:oasis:names:tc:opendocument:xmlns:text:1.0",
- elementstyles = {
- "text": [
- { ens: stylens, en: 'tab-stop', ans: stylens, a: 'leader-text-style'},
- { ens: stylens, en: 'drop-cap', ans: stylens, a: 'style-name'},
- { ens: textns, en: 'notes-configuration', ans: textns, a: 'citation-body-style-name'},
- { ens: textns, en: 'notes-configuration', ans: textns, a: 'citation-style-name'},
- { ens: textns, en: 'a', ans: textns, a: 'style-name'},
- { ens: textns, en: 'alphabetical-index', ans: textns, a: 'style-name'},
- { ens: textns, en: 'linenumbering-configuration', ans: textns, a: 'style-name'},
- { ens: textns, en: 'list-level-style-number', ans: textns, a: 'style-name'},
- { ens: textns, en: 'ruby-text', ans: textns, a: 'style-name'},
- { ens: textns, en: 'span', ans: textns, a: 'style-name'},
- { ens: textns, en: 'a', ans: textns, a: 'visited-style-name'},
- { ens: stylens, en: 'text-properties', ans: stylens, a: 'text-line-through-text-style'},
- { ens: textns, en: 'alphabetical-index-source', ans: textns, a: 'main-entry-style-name'},
- { ens: textns, en: 'index-entry-bibliography', ans: textns, a: 'style-name'},
- { ens: textns, en: 'index-entry-chapter', ans: textns, a: 'style-name'},
- { ens: textns, en: 'index-entry-link-end', ans: textns, a: 'style-name'},
- { ens: textns, en: 'index-entry-link-start', ans: textns, a: 'style-name'},
- { ens: textns, en: 'index-entry-page-number', ans: textns, a: 'style-name'},
- { ens: textns, en: 'index-entry-span', ans: textns, a: 'style-name'},
- { ens: textns, en: 'index-entry-tab-stop', ans: textns, a: 'style-name'},
- { ens: textns, en: 'index-entry-text', ans: textns, a: 'style-name'},
- { ens: textns, en: 'index-title-template', ans: textns, a: 'style-name'},
- { ens: textns, en: 'list-level-style-bullet', ans: textns, a: 'style-name'},
- { ens: textns, en: 'outline-level-style', ans: textns, a: 'style-name'}
- ],
- "paragraph": [
- { ens: drawns, en: 'caption', ans: drawns, a: 'text-style-name'},
- { ens: drawns, en: 'circle', ans: drawns, a: 'text-style-name'},
- { ens: drawns, en: 'connector', ans: drawns, a: 'text-style-name'},
- { ens: drawns, en: 'control', ans: drawns, a: 'text-style-name'},
- { ens: drawns, en: 'custom-shape', ans: drawns, a: 'text-style-name'},
- { ens: drawns, en: 'ellipse', ans: drawns, a: 'text-style-name'},
- { ens: drawns, en: 'frame', ans: drawns, a: 'text-style-name'},
- { ens: drawns, en: 'line', ans: drawns, a: 'text-style-name'},
- { ens: drawns, en: 'measure', ans: drawns, a: 'text-style-name'},
- { ens: drawns, en: 'path', ans: drawns, a: 'text-style-name'},
- { ens: drawns, en: 'polygon', ans: drawns, a: 'text-style-name'},
- { ens: drawns, en: 'polyline', ans: drawns, a: 'text-style-name'},
- { ens: drawns, en: 'rect', ans: drawns, a: 'text-style-name'},
- { ens: drawns, en: 'regular-polygon', ans: drawns, a: 'text-style-name'},
- { ens: officens, en: 'annotation', ans: drawns, a: 'text-style-name'},
- { ens: formns, en: 'column', ans: formns, a: 'text-style-name'},
- { ens: stylens, en: 'style', ans: stylens, a: 'next-style-name'},
- { ens: tablens, en: 'body', ans: tablens, a: 'paragraph-style-name'},
- { ens: tablens, en: 'even-columns', ans: tablens, a: 'paragraph-style-name'},
- { ens: tablens, en: 'even-rows', ans: tablens, a: 'paragraph-style-name'},
- { ens: tablens, en: 'first-column', ans: tablens, a: 'paragraph-style-name'},
- { ens: tablens, en: 'first-row', ans: tablens, a: 'paragraph-style-name'},
- { ens: tablens, en: 'last-column', ans: tablens, a: 'paragraph-style-name'},
- { ens: tablens, en: 'last-row', ans: tablens, a: 'paragraph-style-name'},
- { ens: tablens, en: 'odd-columns', ans: tablens, a: 'paragraph-style-name'},
- { ens: tablens, en: 'odd-rows', ans: tablens, a: 'paragraph-style-name'},
- { ens: textns, en: 'notes-configuration', ans: textns, a: 'default-style-name'},
- { ens: textns, en: 'alphabetical-index-entry-template', ans: textns, a: 'style-name'},
- { ens: textns, en: 'bibliography-entry-template', ans: textns, a: 'style-name'},
- { ens: textns, en: 'h', ans: textns, a: 'style-name'},
- { ens: textns, en: 'illustration-index-entry-template', ans: textns, a: 'style-name'},
- { ens: textns, en: 'index-source-style', ans: textns, a: 'style-name'},
- { ens: textns, en: 'object-index-entry-template', ans: textns, a: 'style-name'},
- { ens: textns, en: 'p', ans: textns, a: 'style-name'},
- { ens: textns, en: 'table-index-entry-template', ans: textns, a: 'style-name'},
- { ens: textns, en: 'table-of-content-entry-template', ans: textns, a: 'style-name'},
- { ens: textns, en: 'table-index-entry-template', ans: textns, a: 'style-name'},
- { ens: textns, en: 'user-index-entry-template', ans: textns, a: 'style-name'},
- { ens: stylens, en: 'page-layout-properties', ans: stylens, a: 'register-truth-ref-style-name'}
- ],
- "chart": [
- { ens: chartns, en: 'axis', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'chart', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'data-label', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'data-point', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'equation', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'error-indicator', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'floor', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'footer', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'grid', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'legend', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'mean-value', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'plot-area', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'regression-curve', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'series', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'stock-gain-marker', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'stock-loss-marker', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'stock-range-line', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'subtitle', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'title', ans: chartns, a: 'style-name'},
- { ens: chartns, en: 'wall', ans: chartns, a: 'style-name'}
- ],
- "section": [
- { ens: textns, en: 'alphabetical-index', ans: textns, a: 'style-name'},
- { ens: textns, en: 'bibliography', ans: textns, a: 'style-name'},
- { ens: textns, en: 'illustration-index', ans: textns, a: 'style-name'},
- { ens: textns, en: 'index-title', ans: textns, a: 'style-name'},
- { ens: textns, en: 'object-index', ans: textns, a: 'style-name'},
- { ens: textns, en: 'section', ans: textns, a: 'style-name'},
- { ens: textns, en: 'table-of-content', ans: textns, a: 'style-name'},
- { ens: textns, en: 'table-index', ans: textns, a: 'style-name'},
- { ens: textns, en: 'user-index', ans: textns, a: 'style-name'}
- ],
- "ruby": [
- { ens: textns, en: 'ruby', ans: textns, a: 'style-name'}
- ],
- "table": [
- { ens: dbns, en: 'query', ans: dbns, a: 'style-name'},
- { ens: dbns, en: 'table-representation', ans: dbns, a: 'style-name'},
- { ens: tablens, en: 'background', ans: tablens, a: 'style-name'},
- { ens: tablens, en: 'table', ans: tablens, a: 'style-name'}
- ],
- "table-column": [
- { ens: dbns, en: 'column', ans: dbns, a: 'style-name'},
- { ens: tablens, en: 'table-column', ans: tablens, a: 'style-name'}
- ],
- "table-row": [
- { ens: dbns, en: 'query', ans: dbns, a: 'default-row-style-name'},
- { ens: dbns, en: 'table-representation', ans: dbns, a: 'default-row-style-name'},
- { ens: tablens, en: 'table-row', ans: tablens, a: 'style-name'}
- ],
- "table-cell": [
- { ens: dbns, en: 'column', ans: dbns, a: 'default-cell-style-name'},
- { ens: tablens, en: 'table-column', ans: tablens, a: 'default-cell-style-name'},
- { ens: tablens, en: 'table-row', ans: tablens, a: 'default-cell-style-name'},
- { ens: tablens, en: 'body', ans: tablens, a: 'style-name'},
- { ens: tablens, en: 'covered-table-cell', ans: tablens, a: 'style-name'},
- { ens: tablens, en: 'even-columns', ans: tablens, a: 'style-name'},
- { ens: tablens, en: 'covered-table-cell', ans: tablens, a: 'style-name'},
- { ens: tablens, en: 'even-columns', ans: tablens, a: 'style-name'},
- { ens: tablens, en: 'even-rows', ans: tablens, a: 'style-name'},
- { ens: tablens, en: 'first-column', ans: tablens, a: 'style-name'},
- { ens: tablens, en: 'first-row', ans: tablens, a: 'style-name'},
- { ens: tablens, en: 'last-column', ans: tablens, a: 'style-name'},
- { ens: tablens, en: 'last-row', ans: tablens, a: 'style-name'},
- { ens: tablens, en: 'odd-columns', ans: tablens, a: 'style-name'},
- { ens: tablens, en: 'odd-rows', ans: tablens, a: 'style-name'},
- { ens: tablens, en: 'table-cell', ans: tablens, a: 'style-name'}
- ],
- "graphic": [
- { ens: dr3dns, en: 'cube', ans: drawns, a: 'style-name'},
- { ens: dr3dns, en: 'extrude', ans: drawns, a: 'style-name'},
- { ens: dr3dns, en: 'rotate', ans: drawns, a: 'style-name'},
- { ens: dr3dns, en: 'scene', ans: drawns, a: 'style-name'},
- { ens: dr3dns, en: 'sphere', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'caption', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'circle', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'connector', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'control', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'custom-shape', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'ellipse', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'frame', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'g', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'line', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'measure', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'page-thumbnail', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'path', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'polygon', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'polyline', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'rect', ans: drawns, a: 'style-name'},
- { ens: drawns, en: 'regular-polygon', ans: drawns, a: 'style-name'},
- { ens: officens, en: 'annotation', ans: drawns, a: 'style-name'}
- ],
- "presentation": [
- { ens: dr3dns, en: 'cube', ans: presentationns, a: 'style-name'},
- { ens: dr3dns, en: 'extrude', ans: presentationns, a: 'style-name'},
- { ens: dr3dns, en: 'rotate', ans: presentationns, a: 'style-name'},
- { ens: dr3dns, en: 'scene', ans: presentationns, a: 'style-name'},
- { ens: dr3dns, en: 'sphere', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'caption', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'circle', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'connector', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'control', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'custom-shape', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'ellipse', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'frame', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'g', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'line', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'measure', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'page-thumbnail', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'path', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'polygon', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'polyline', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'rect', ans: presentationns, a: 'style-name'},
- { ens: drawns, en: 'regular-polygon', ans: presentationns, a: 'style-name'},
- { ens: officens, en: 'annotation', ans: presentationns, a: 'style-name'}
- ],
- "drawing-page": [
- { ens: drawns, en: 'page', ans: drawns, a: 'style-name'},
- { ens: presentationns, en: 'notes', ans: drawns, a: 'style-name'},
- { ens: stylens, en: 'handout-master', ans: drawns, a: 'style-name'},
- { ens: stylens, en: 'master-page', ans: drawns, a: 'style-name'}
- ],
- "list-style": [
- { ens: textns, en: 'list', ans: textns, a: 'style-name'},
- { ens: textns, en: 'numbered-paragraph', ans: textns, a: 'style-name'},
- { ens: textns, en: 'list-item', ans: textns, a: 'style-override'},
- { ens: stylens, en: 'style', ans: stylens, a: 'list-style-name'},
- { ens: stylens, en: 'style', ans: stylens, a: 'data-style-name'},
- { ens: stylens, en: 'style', ans: stylens, a: 'percentage-data-style-name'},
- { ens: presentationns, en: 'date-time-decl', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'creation-date', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'creation-time', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'database-display', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'date', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'editing-duration', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'expression', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'meta-field', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'modification-date', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'modification-time', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'print-date', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'print-time', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'table-formula', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'time', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'user-defined', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'user-field-get', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'user-field-input', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'variable-get', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'variable-input', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'variable-set', ans: stylens, a: 'data-style-name'}
- ],
- "data": [
- { ens: stylens, en: 'style', ans: stylens, a: 'data-style-name'},
- { ens: stylens, en: 'style', ans: stylens, a: 'percentage-data-style-name'},
- { ens: presentationns, en: 'date-time-decl', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'creation-date', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'creation-time', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'database-display', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'date', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'editing-duration', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'expression', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'meta-field', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'modification-date', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'modification-time', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'print-date', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'print-time', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'table-formula', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'time', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'user-defined', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'user-field-get', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'user-field-input', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'variable-get', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'variable-input', ans: stylens, a: 'data-style-name'},
- { ens: textns, en: 'variable-set', ans: stylens, a: 'data-style-name'}
- ],
- "page-layout": [
- { ens: presentationns, en: 'notes', ans: stylens, a: 'page-layout-name'},
- { ens: stylens, en: 'handout-master', ans: stylens, a: 'page-layout-name'},
- { ens: stylens, en: 'master-page', ans: stylens, a: 'page-layout-name'}
- ]
- },
- elements;
-
- /**
- * Return if a particular element can have a style for a particular family.
- * @param {!string} family
- * @param {!Element} element
- * @return {!boolean}
- */
- function canElementHaveStyle(family, element) {
- var elname = elements[element.localName],
- elns = elname && elname[element.namespaceURI],
- length = elns ? elns.length : 0,
- i;
- return elns && elns.length > 0;
- }
-
- /**
- * @param {!string} family
- * @param {!Element} element
- * @return {{name:string,family:string}|null}
- */
- function getStyleRef(family, element) {
- var elname = elements[element.localName],
- elns = elname && elname[element.namespaceURI],
- length = elns ? elns.length : 0,
- i, attr;
- for (i = 0; i < length; i += 1) {
- attr = element.getAttributeNS(elns[i].ns, elns[i].localname);
-/*
- if (attr) { // a style has been found!
- return attr;
- }
-*/
- }
- return null;
- }
-
- /**
- * @param {!Element} element
- * @param {!Object.<string,Object.<string,number>>} keys
- * @return {undefined}
- */
- function getUsedStylesForAutomatic(element, keys) {
- var elname = elements[element.localName],
- elns = elname && elname[element.namespaceURI],
- length = elns ? elns.length : 0,
- i, attr, group, map, e;
- for (i = 0; i < length; i += 1) {
- attr = element.getAttributeNS(elns[i].ns, elns[i].localname);
- if (attr) { // a style has been found!
- group = elns[i].keygroup;
- map = keys[group];
- if (!map) {
- map = keys[group] = {};
- }
- map[attr] = 1;
- }
- }
- i = element.firstChild;
- while (i) {
- if (i.nodeType === 1) {
- e = /**@type{!Element}*/(i);
- getUsedStylesForAutomatic(e, keys);
- }
- i = i.nextSibling;
- }
- }
-
- /**
- * @param {!Object.<Array.<Object.<string,string>>>} elementstyles
- */
- function inverse(elementstyles) {
- var keyname, i, list, item, l, elements = {}, map, array;
- for (keyname in elementstyles) {
- if (elementstyles.hasOwnProperty(keyname)) {
- list = elementstyles[keyname];
- l = list.length;
- for (i = 0; i < l; i += 1) {
- item = list[i];
- map = elements[item.en] = elements[item.en] || {};
- array = map[item.ens] = map[item.ens] || [];
- array.push(
- {ns: item.ans, localname: item.a, keygroup: keyname});
- }
- }
- }
- return elements;
- }
-
- /**
- * @constructor
- * @param {!Element} element
- */
- this.UsedKeysList = function (element) {
- var usedKeys = {};
-
- /**
- * @param {!Element} element
- * @return {!boolean}
- */
- this.uses = function (element) {
- var localName = element.localName,
- name = element.getAttributeNS(drawns, "name") ||
- element.getAttributeNS(stylens, "name"),
- keyName, map;
- if (localName === "style") {
- keyName = element.getAttributeNS(stylens, "family");
- } else if (element.namespaceURI === numberns) {
- keyName = "data";
- } else {
- keyName = localName; // list-style or page-layout
- }
- map = usedKeys[keyName];
- return map ? (map[name] > 0) : false;
- };
-
- getUsedStylesForAutomatic(element, usedKeys);
- };
-
- this.canElementHaveStyle = canElementHaveStyle;
-
- elements = inverse(elementstyles);
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/packages.js b/apps/files_odfviewer/src/webodf/webodf/lib/packages.js
deleted file mode 100644
index 7277a833f91..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/packages.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * @license
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/**
- * @namespace The core package.
- */
-var core = {};
-/**
- * @namespace The gui package.
- */
-var gui = {};
-/**
- * @namespace The xmldom package.
- */
-var xmldom = {};
-/**
- * @namespace The ODF package.
- */
-var odf = {};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/runtime.js b/apps/files_odfviewer/src/webodf/webodf/lib/runtime.js
deleted file mode 100644
index 99ded6f1d3a..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/runtime.js
+++ /dev/null
@@ -1,1117 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*jslint nomen: true, evil: true, bitwise: true */
-/*global window: true, XMLHttpRequest: true, require: true, console: true,
- process: true, __dirname: true, setTimeout: true, Packages: true, print: true,
- readFile: true, quit: true, Buffer: true, ArrayBuffer: true, Uint8Array: true,
- navigator: true, VBArray: true */
-/**
- * Three implementations of a runtime for browser, node.js and rhino.
- */
-
-/**
- * Abstraction of the runtime environment.
- * @class
- * @interface
- */
-function Runtime() {"use strict"; }
-/**
- * Abstraction of byte arrays.
- * @constructor
- * @extends {Array}
- * @param {!number} size
- */
-Runtime.ByteArray = function (size) {"use strict"; };
-/**
- * @param {!number} start
- * @param {!number} end
- * @return {!Runtime.ByteArray}
- */
-Runtime.ByteArray.prototype.slice = function (start, end) {"use strict"; };
-/**
- * @param {!Array.<number>} array
- * @return {!Runtime.ByteArray}
- */
-Runtime.prototype.byteArrayFromArray = function (array) {"use strict"; };
-/**
- * @param {!string} string
- * @param {!string} encoding
- * @return {!Runtime.ByteArray}
- */
-Runtime.prototype.byteArrayFromString = function (string, encoding) {"use strict"; };
-/**
- * @param {!Runtime.ByteArray} bytearray
- * @param {!string} encoding
- * @return {!string}
- */
-Runtime.prototype.byteArrayToString = function (bytearray, encoding) {"use strict"; };
-/**
- * @param {!Runtime.ByteArray} bytearray1
- * @param {!Runtime.ByteArray} bytearray2
- * @return {!Runtime.ByteArray}
- */
-Runtime.prototype.concatByteArrays = function (bytearray1, bytearray2) {"use strict"; };
-/**
- * @param {!string} path
- * @param {!number} offset
- * @param {!number} length
- * @param {!function(string,Runtime.ByteArray):undefined} callback
- * @return {undefined}
- */
-Runtime.prototype.read = function (path, offset, length, callback) {"use strict"; };
-/**
- * Read the contents of a file. Returns the result via a callback. If the
- * encoding is 'binary', the result is returned as a Runtime.ByteArray,
- * otherwise, it is returned as a string.
- * @param {!string} path
- * @param {!string} encoding text encoding or 'binary'
- * @param {!function(string,(string|Runtime.ByteArray)):undefined} callback
- * @return {undefined}
- */
-Runtime.prototype.readFile = function (path, encoding, callback) {"use strict"; };
-/**
- * @param {!string} path
- * @param {!string} encoding text encoding or 'binary'
- * @return {!string}
- */
-Runtime.prototype.readFileSync = function (path, encoding) {"use strict"; };
-/**
- * @param {!string} path
- * @param {!function((string|Document)):undefined} callback
- * @return {undefined}
- */
-Runtime.prototype.loadXML = function (path, callback) {"use strict"; };
-/**
- * @param {!string} path
- * @param {!Runtime.ByteArray} data
- * @param {!function(?string):undefined} callback
- * @return {undefined}
- */
-Runtime.prototype.writeFile = function (path, data, callback) {"use strict"; };
-/**
- * @param {!string} path
- * @param {!function(boolean):undefined} callback
- * @return {undefined}
- */
-Runtime.prototype.isFile = function (path, callback) {"use strict"; };
-/**
- * @param {!string} path
- * @param {!function(number):undefined} callback
- * @return {undefined}
- */
-Runtime.prototype.getFileSize = function (path, callback) {"use strict"; };
-/**
- * @param {!string} path
- * @param {!function(?string):undefined} callback
- * @return {undefined}
- */
-Runtime.prototype.deleteFile = function (path, callback) {"use strict"; };
-/**
- * @param {!string} msgOrCategory
- * @param {!string=} msg
- * @return {undefined}
- */
-Runtime.prototype.log = function (msgOrCategory, msg) {"use strict"; };
-/**
- * @param {!function():undefined} callback
- * @param {!number} milliseconds
- * @return {undefined}
- */
-Runtime.prototype.setTimeout = function (callback, milliseconds) {"use strict"; };
-/**
- * @return {!Array.<string>}
- */
-Runtime.prototype.libraryPaths = function () {"use strict"; };
-/**
- * @return {string}
- */
-Runtime.prototype.type = function () {"use strict"; };
-/**
- * @return {?DOMImplementation}
- */
-Runtime.prototype.getDOMImplementation = function () {"use strict"; };
-/**
- * @return {?Window}
- */
-Runtime.prototype.getWindow = function () {"use strict"; };
-
-/** @define {boolean} */
-var IS_COMPILED_CODE = false;
-
-/**
- * @this {Runtime}
- * @param {!Runtime.ByteArray} bytearray
- * @param {!string} encoding
- * @return {!string}
- */
-Runtime.byteArrayToString = function (bytearray, encoding) {
- "use strict";
- function byteArrayToString(bytearray) {
- var s = "", i, l = bytearray.length;
- for (i = 0; i < l; i += 1) {
- s += String.fromCharCode(bytearray[i] & 0xff);
- }
- return s;
- }
- function utf8ByteArrayToString(bytearray) {
- var s = "", i, l = bytearray.length,
- c0, c1, c2;
- for (i = 0; i < l; i += 1) {
- c0 = bytearray[i];
- if (c0 < 0x80) {
- s += String.fromCharCode(c0);
- } else {
- i += 1;
- c1 = bytearray[i];
- if (c0 < 0xe0) {
- s += String.fromCharCode(((c0 & 0x1f) << 6) | (c1 & 0x3f));
- } else {
- i += 1;
- c2 = bytearray[i];
- s += String.fromCharCode(((c0 & 0x0f) << 12) |
- ((c1 & 0x3f) << 6) | (c2 & 0x3f));
- }
- }
- }
- return s;
- }
- var result;
- if (encoding === "utf8") {
- result = utf8ByteArrayToString(bytearray);
- } else {
- if (encoding !== "binary") {
- this.log("Unsupported encoding: " + encoding);
- }
- result = byteArrayToString(bytearray);
- }
- return result;
-};
-Runtime.getFunctionName = function getFunctionName(f) {
- "use strict";
- var m;
- if (f.name === undefined) {
- m = new RegExp("function\\s+(\\w+)").exec(f);
- return m && m[1];
- }
- return f.name;
-};
-/**
- * @class
- * @constructor
- * @augments Runtime
- * @implements {Runtime}
- * @param {Element} logoutput
- */
-function BrowserRuntime(logoutput) {
- "use strict";
- var self = this,
- cache = {},
- useNativeArray = window.ArrayBuffer && window.Uint8Array;
- /**
- * @constructor
- * @augments Runtime.ByteArray
- * @inner
- * @extends {Runtime.ByteArray}
- * @param {!number} size
- */
- this.ByteArray = (useNativeArray)
- // if Uint8Array is available, use that
- ? function ByteArray(size) {
- Uint8Array.prototype.slice = function (begin, end) {
- if (end === undefined) {
- if (begin === undefined) {
- begin = 0;
- }
- end = this.length;
- }
- var view = this.subarray(begin, end), array, i;
- end -= begin;
- array = new Uint8Array(new ArrayBuffer(end));
- for (i = 0; i < end; i += 1) {
- array[i] = view[i];
- }
- return array;
- };
- return new Uint8Array(new ArrayBuffer(size));
- }
- : function ByteArray(size) {
- var a = [];
- a.length = size;
- return a;
- };
- this.concatByteArrays = (useNativeArray)
- ? function (bytearray1, bytearray2) {
- var i, l1 = bytearray1.length, l2 = bytearray2.length,
- a = new this.ByteArray(l1 + l2);
- for (i = 0; i < l1; i += 1) {
- a[i] = bytearray1[i];
- }
- for (i = 0; i < l2; i += 1) {
- a[i + l1] = bytearray2[i];
- }
- return a;
- }
- : function (bytearray1, bytearray2) {
- return bytearray1.concat(bytearray2);
- };
- function utf8ByteArrayFromString(string) {
- var l = string.length, bytearray, i, n, j = 0;
- // first determine the length in bytes
- for (i = 0; i < l; i += 1) {
- n = string.charCodeAt(i);
- j += 1 + (n > 0x80) + (n > 0x800);
- }
- // allocate a buffer and convert to a utf8 array
- bytearray = new self.ByteArray(j);
- j = 0;
- for (i = 0; i < l; i += 1) {
- n = string.charCodeAt(i);
- if (n < 0x80) {
- bytearray[j] = n;
- j += 1;
- } else if (n < 0x800) {
- bytearray[j] = 0xc0 | (n >>> 6);
- bytearray[j + 1] = 0x80 | (n & 0x3f);
- j += 2;
- } else {
- bytearray[j] = 0xe0 | ((n >>> 12) & 0x0f);
- bytearray[j + 1] = 0x80 | ((n >>> 6) & 0x3f);
- bytearray[j + 2] = 0x80 | (n & 0x3f);
- j += 3;
- }
- }
- return bytearray;
- }
- function byteArrayFromString(string) {
- // ignore encoding for now
- var l = string.length,
- a = new self.ByteArray(l),
- i;
- for (i = 0; i < l; i += 1) {
- a[i] = string.charCodeAt(i) & 0xff;
- }
- return a;
- }
- this.byteArrayFromArray = function (array) {
- return array.slice();
- };
- this.byteArrayFromString = function (string, encoding) {
- var result;
- if (encoding === "utf8") {
- result = utf8ByteArrayFromString(string);
- } else {
- if (encoding !== "binary") {
- self.log("unknown encoding: " + encoding);
- }
- result = byteArrayFromString(string);
- }
- return result;
- };
- this.byteArrayToString = Runtime.byteArrayToString;
-
- /**
- * @param {!string} msgOrCategory
- * @param {string=} msg
- * @return {undefined}
- */
- function log(msgOrCategory, msg) {
- var node, doc, category;
- if (msg) {
- category = msgOrCategory;
- } else {
- msg = msgOrCategory;
- }
- if (logoutput) {
- doc = logoutput.ownerDocument;
- if (category) {
- node = doc.createElement("span");
- node.className = category;
- node.appendChild(doc.createTextNode(category));
- logoutput.appendChild(node);
- logoutput.appendChild(doc.createTextNode(" "));
- }
- node = doc.createElement("span");
- node.appendChild(doc.createTextNode(msg));
- logoutput.appendChild(node);
- logoutput.appendChild(doc.createElement("br"));
- } else if (console) {
- console.log(msg);
- }
- }
- function readFile(path, encoding, callback) {
- if (cache.hasOwnProperty(path)) {
- callback(null, cache[path]);
- return;
- }
- var xhr = new XMLHttpRequest();
- function handleResult() {
- var data;
- if (xhr.readyState === 4) {
- if (xhr.status === 0 && !xhr.responseText) {
- // for local files there is no difference between missing
- // and empty files, so empty files are considered as errors
- callback("File " + path + " is empty.");
- } else if (xhr.status === 200 || xhr.status === 0) {
- // report file
- if (encoding === "binary") {
- if (typeof VBArray !== "undefined") { // IE9
- data = new VBArray(xhr.responseBody).toArray();
- } else {
- data = self.byteArrayFromString(xhr.responseText,
- "binary");
- }
- } else {
- data = xhr.responseText;
- }
- cache[path] = data;
- callback(null, data);
- } else {
- // report error
- callback(xhr.responseText || xhr.statusText);
- }
- }
- }
- xhr.open('GET', path, true);
- xhr.onreadystatechange = handleResult;
- if (xhr.overrideMimeType) {
- if (encoding !== "binary") {
- xhr.overrideMimeType("text/plain; charset=" + encoding);
- } else {
- xhr.overrideMimeType("text/plain; charset=x-user-defined");
- }
- }
- try {
- xhr.send(null);
- } catch (e) {
- callback(e.message);
- }
- }
- function read(path, offset, length, callback) {
- if (cache.hasOwnProperty(path)) {
- callback(null, cache[path].slice(offset, offset + length));
- return;
- }
- var xhr = new XMLHttpRequest();
- function handleResult() {
- var data;
- if (xhr.readyState === 4) {
- if (xhr.status === 0 && !xhr.responseText) {
- // for local files there is no difference between missing
- // and empty files, so empty files are considered as errors
- callback("File " + path + " is empty.");
- } else if (xhr.status === 200 || xhr.status === 0) {
- // report file
- if (typeof VBArray !== "undefined") {
- data = new VBArray(xhr.responseBody).toArray();
- } else {
- data = self.byteArrayFromString(xhr.responseText, "binary");
- }
- cache[path] = data;
- callback(null, data.slice(offset, offset + length));
- } else {
- // report error
- callback(xhr.responseText || xhr.statusText);
- }
- }
- }
- xhr.open('GET', path, true);
- xhr.onreadystatechange = handleResult;
- if (xhr.overrideMimeType) {
- xhr.overrideMimeType("text/plain; charset=x-user-defined");
- }
- //xhr.setRequestHeader('Range', 'bytes=' + offset + '-' +
- // (offset + length - 1));
- try {
- xhr.send(null);
- } catch (e) {
- callback(e.message);
- }
- }
- function readFileSync(path, encoding) {
- var xhr = new XMLHttpRequest(),
- result;
- xhr.open('GET', path, false);
- if (xhr.overrideMimeType) {
- if (encoding !== "binary") {
- xhr.overrideMimeType("text/plain; charset=" + encoding);
- } else {
- xhr.overrideMimeType("text/plain; charset=x-user-defined");
- }
- }
- try {
- xhr.send(null);
- if (xhr.status === 200 || xhr.status === 0) {
- result = xhr.responseText;
- }
- } catch (e) {
- }
- return result;
- }
- function writeFile(path, data, callback) {
- cache[path] = data;
- var xhr = new XMLHttpRequest();
- function handleResult() {
- if (xhr.readyState === 4) {
- if (xhr.status === 0 && !xhr.responseText) {
- // for local files there is no difference between missing
- // and empty files, so empty files are considered as errors
- callback("File " + path + " is empty.");
- } else if ((xhr.status >= 200 && xhr.status < 300) ||
- xhr.status === 0) {
- // report success
- callback(null);
- } else {
- // report error
- callback("Status " + String(xhr.status) + ": " +
- xhr.responseText || xhr.statusText);
- }
- }
- }
- xhr.open('PUT', path, true);
- xhr.onreadystatechange = handleResult;
- // ArrayBufferView will have an ArrayBuffer property, in WebKit, XHR can send()
- // an ArrayBuffer, In Firefox, one must use sendAsBinary with a string
- if (data.buffer && !xhr.sendAsBinary) {
- data = data.buffer; // webkit supports sending an ArrayBuffer
- } else {
- // encode into a string, this works in FireFox >= 3
- data = self.byteArrayToString(data, "binary");
- }
- try {
- if (xhr.sendAsBinary) {
- xhr.sendAsBinary(data);
- } else {
- xhr.send(data);
- }
- } catch (e) {
- self.log("HUH? " + e + " " + data);
- callback(e.message);
- }
- }
- function deleteFile(path, callback) {
- var xhr = new XMLHttpRequest();
- xhr.open('DELETE', path, true);
- xhr.onreadystatechange = function () {
- if (xhr.readyState === 4) {
- if (xhr.status < 200 && xhr.status >= 300) {
- callback(xhr.responseText);
- } else {
- callback(null);
- }
- }
- };
- xhr.send(null);
- }
- function loadXML(path, callback) {
- var xhr = new XMLHttpRequest();
- function handleResult() {
- if (xhr.readyState === 4) {
- if (xhr.status === 0 && !xhr.responseText) {
- callback("File " + path + " is empty.");
- } else if (xhr.status === 200 || xhr.status === 0) {
- // report file
- callback(null, xhr.responseXML);
- } else {
- // report error
- callback(xhr.responseText);
- }
- }
- }
- xhr.open("GET", path, true);
- if (xhr.overrideMimeType) {
- xhr.overrideMimeType("text/xml");
- }
- xhr.onreadystatechange = handleResult;
- try {
- xhr.send(null);
- } catch (e) {
- callback(e.message);
- }
- }
- function isFile(path, callback) {
- self.getFileSize(path, function (size) {
- callback(size !== -1);
- });
- }
- function getFileSize(path, callback) {
- var xhr = new XMLHttpRequest();
- xhr.open("HEAD", path, true);
- xhr.onreadystatechange = function () {
- if (xhr.readyState !== 4) {
- return;
- }
- var cl = xhr.getResponseHeader("Content-Length");
- if (cl) {
- callback(parseInt(cl, 10));
- } else {
- callback(-1);
- }
- };
- xhr.send(null);
- }
- function wrap(nativeFunction, nargs) {
- if (!nativeFunction) {
- return null;
- }
- return function () {
- // clear cache
- cache = {};
- // assume the last argument is a callback function
- var callback = arguments[nargs],
- args = Array.prototype.slice.call(arguments, 0, nargs),
- callbackname = "callback" + String(Math.random()).substring(2);
- window[callbackname] = function () {
- delete window[callbackname];
- callback.apply(this, arguments);
- };
- args.push(callbackname);
- nativeFunction.apply(this, args);
- };
- }
- this.readFile = readFile;
- this.read = read;
- this.readFileSync = readFileSync;
- this.writeFile = writeFile;
- this.deleteFile = deleteFile;
- this.loadXML = loadXML;
- this.isFile = isFile;
- this.getFileSize = getFileSize;
- this.log = log;
- this.setTimeout = function (f, msec) {
- setTimeout(function () {
- f();
- }, msec);
- };
- this.libraryPaths = function () {
- return ["lib"]; // TODO: find a good solution
- // probably let html app specify it
- };
- this.setCurrentDirectory = function (dir) {
- };
- this.type = function () {
- return "BrowserRuntime";
- };
- this.getDOMImplementation = function () {
- return window.document.implementation;
- };
- this.exit = function (exitCode) {
- log("Calling exit with code " + String(exitCode) +
- ", but exit() is not implemented.");
- };
- this.getWindow = function () {
- return window;
- };
-}
-
-/**
- * @constructor
- * @implements {Runtime}
- */
-function NodeJSRuntime() {
- "use strict";
- var self = this,
- fs = require('fs'),
- currentDirectory = "";
-
- /**
- * @constructor
- * @extends {Runtime.ByteArray}
- * @param {!number} size
- */
- this.ByteArray = function (size) {
- return new Buffer(size);
- };
-
- this.byteArrayFromArray = function (array) {
- var ba = new Buffer(array.length),
- i,
- l = array.length;
- for (i = 0; i < l; i += 1) {
- ba[i] = array[i];
- }
- return ba;
- };
-
- this.concatByteArrays = function (a, b) {
- var ba = new Buffer(a.length + b.length);
- a.copy(ba, 0, 0);
- b.copy(ba, a.length, 0);
- return ba;
- };
-
- this.byteArrayFromString = function (string, encoding) {
- return new Buffer(string, encoding);
- };
-
- this.byteArrayToString = function (bytearray, encoding) {
- return bytearray.toString(encoding);
- };
-
- function isFile(path, callback) {
- if (currentDirectory) {
- path = currentDirectory + "/" + path;
- }
- fs.stat(path, function (err, stats) {
- callback(!err && stats.isFile());
- });
- }
- function loadXML(path, callback) {
- throw "Not implemented.";
- }
- this.readFile = function (path, encoding, callback) {
- if (encoding !== "binary") {
- fs.readFile(path, encoding, callback);
- } else {
- fs.readFile(path, null, callback);
-/*
- // we have to encode the returned buffer to a string
- // it would be nice if we would have a blob or buffer object
- fs.readFile(path, null, function (err, data) {
- if (err) {
- callback(err);
- return;
- }
- callback(null, data.toString("binary"));
- });
-*/
- }
- };
- this.writeFile = function (path, data, callback) {
- fs.writeFile(path, data, "binary", function (err) {
- callback(err || null);
- });
- };
- this.deleteFile = fs.unlink;
- this.read = function (path, offset, length, callback) {
- if (currentDirectory) {
- path = currentDirectory + "/" + path;
- }
- fs.open(path, "r+", 666, function (err, fd) {
- if (err) {
- callback(err);
- return;
- }
- var buffer = new Buffer(length);
- fs.read(fd, buffer, 0, length, offset, function (err, bytesRead) {
- fs.close(fd);
- callback(err, buffer);
- });
- });
- };
- this.readFileSync = function (path, encoding) {
- if (!encoding) {
- return "";
- }
- return fs.readFileSync(path, encoding);
- };
- this.loadXML = loadXML;
- this.isFile = isFile;
- this.getFileSize = function (path, callback) {
- if (currentDirectory) {
- path = currentDirectory + "/" + path;
- }
- fs.stat(path, function (err, stats) {
- if (err) {
- callback(-1);
- } else {
- callback(stats.size);
- }
- });
- };
- this.log = function (msg) {
- process.stderr.write(msg + '\n');
- };
- this.setTimeout = function (f, msec) {
- setTimeout(function () {
- f();
- }, msec);
- };
- this.libraryPaths = function () {
- return [__dirname];
- };
- this.setCurrentDirectory = function (dir) {
- currentDirectory = dir;
- };
- this.currentDirectory = function () {
- return currentDirectory;
- };
- this.type = function () {
- return "NodeJSRuntime";
- };
- this.getDOMImplementation = function () {
- return null;
- };
- this.exit = process.exit;
- this.getWindow = function () {
- return null;
- };
-}
-
-/**
- * @constructor
- * @implements {Runtime}
- */
-function RhinoRuntime() {
- "use strict";
- var self = this,
- dom = Packages.javax.xml.parsers.DocumentBuilderFactory.newInstance(),
- builder,
- entityresolver,
- currentDirectory = "";
- dom.setValidating(false);
- dom.setNamespaceAware(true);
- dom.setExpandEntityReferences(false);
- dom.setSchema(null);
- entityresolver = Packages.org.xml.sax.EntityResolver({
- resolveEntity: function (publicId, systemId) {
- var file, open = function (path) {
- var reader = new Packages.java.io.FileReader(path),
- source = new Packages.org.xml.sax.InputSource(reader);
- return source;
- };
- file = systemId;
- //file = /[^\/]*$/.exec(systemId); // what should this do?
- return open(file);
- }
- });
- //dom.setEntityResolver(entityresolver);
- builder = dom.newDocumentBuilder();
- builder.setEntityResolver(entityresolver);
-
- /**
- * @constructor
- * @param {!number} size
- */
- this.ByteArray = function ByteArray(size) {
- return [size];
- };
- this.byteArrayFromArray = function (array) {
- return array;
- };
- this.byteArrayFromString = function (string, encoding) {
- // ignore encoding for now
- var a = [], i, l = string.length;
- for (i = 0; i < l; i += 1) {
- a[i] = string.charCodeAt(i) & 0xff;
- }
- return a;
- };
- this.byteArrayToString = Runtime.byteArrayToString;
- this.concatByteArrays = function (bytearray1, bytearray2) {
- return bytearray1.concat(bytearray2);
- };
-
- function loadXML(path, callback) {
- var file = new Packages.java.io.File(path),
- document;
- try {
- document = builder.parse(file);
- } catch (err) {
- print(err);
- callback(err);
- return;
- }
- callback(null, document);
- }
- function runtimeReadFile(path, encoding, callback) {
- var file = new Packages.java.io.File(path),
- data,
- // read binary, seems hacky but works
- rhinoencoding = (encoding === "binary") ? "latin1" : encoding;
- if (!file.isFile()) {
- callback(path + " is not a file.");
- } else {
- data = readFile(path, rhinoencoding);
- if (encoding === "binary") {
- data = self.byteArrayFromString(data, "binary");
- }
- callback(null, data);
- }
- }
- /**
- * @param {!string} path
- * @param {!string} encoding
- * @return {?string}
- */
- function runtimeReadFileSync(path, encoding) {
- var file = new Packages.java.io.File(path), data, i;
- if (!file.isFile()) {
- return null;
- }
- if (encoding === "binary") {
- encoding = "latin1"; // read binary, seems hacky but works
- }
- return readFile(path, encoding);
- }
- function isFile(path, callback) {
- if (currentDirectory) {
- path = currentDirectory + "/" + path;
- }
- var file = new Packages.java.io.File(path);
- callback(file.isFile());
- }
- this.loadXML = loadXML;
- this.readFile = runtimeReadFile;
- this.writeFile = function (path, data, callback) {
- var out = new Packages.java.io.FileOutputStream(path),
- i,
- l = data.length;
- for (i = 0; i < l; i += 1) {
- out.write(data[i]);
- }
- out.close();
- callback(null);
- };
- this.deleteFile = function (path, callback) {
- var file = new Packages.java.io.File(path);
- if (file['delete']()) {
- callback(null);
- } else {
- callback("Could not delete " + path);
- }
- };
- this.read = function (path, offset, length, callback) {
- // TODO: adapt to read only a part instead of the whole file
- if (currentDirectory) {
- path = currentDirectory + "/" + path;
- }
- var data = runtimeReadFileSync(path, "binary");
- if (data) {
- callback(null, this.byteArrayFromString(
- data.substring(offset, offset + length),
- "binary"
- ));
- } else {
- callback("Cannot read " + path);
- }
- };
- this.readFileSync = function (path, encoding) {
- if (!encoding) {
- return "";
- }
- return readFile(path, encoding);
- };
- this.isFile = isFile;
- this.getFileSize = function (path, callback) {
- if (currentDirectory) {
- path = currentDirectory + "/" + path;
- }
- var file = new Packages.java.io.File(path);
- callback(file.length());
- };
- this.log = print;
- this.setTimeout = function (f, msec) {
- f();
- };
- this.libraryPaths = function () {
- return ["lib"];
- };
- this.setCurrentDirectory = function (dir) {
- currentDirectory = dir;
- };
- this.currentDirectory = function () {
- return currentDirectory;
- };
- this.type = function () {
- return "RhinoRuntime";
- };
- this.getDOMImplementation = function () {
- return builder.getDOMImplementation();
- };
- this.exit = quit;
- this.getWindow = function () {
- return null;
- };
-}
-
-/**
- * @const
- * @type {Runtime}
- */
-var runtime = (function () {
- "use strict";
- var result;
- if (typeof window !== "undefined") {
- result = new BrowserRuntime(window.document.getElementById("logoutput"));
- } else if (typeof require !== "undefined") {
- result = new NodeJSRuntime();
- } else {
- result = new RhinoRuntime();
- }
- return result;
-}());
-/*jslint sloppy: true*/
-(function () {
- var cache = {},
- dircontents = {};
- function getOrDefinePackage(packageNameComponents) {
- var topname = packageNameComponents[0],
- i,
- pkg;
- // ensure top level package exists
- pkg = eval("if (typeof " + topname + " === 'undefined') {" +
- "eval('" + topname + " = {};');}" + topname);
- for (i = 1; i < packageNameComponents.length - 1; i += 1) {
- if (!pkg.hasOwnProperty(packageNameComponents[i])) {
- pkg = pkg[packageNameComponents[i]] = {};
- }
- }
- return pkg[packageNameComponents[packageNameComponents.length - 1]];
- }
- /**
- * @param {string} classpath
- * @returns {undefined}
- */
- runtime.loadClass = function (classpath) {
- if (IS_COMPILED_CODE) {
- return;
- }
- if (cache.hasOwnProperty(classpath)) {
- return;
- }
- var names = classpath.split("."),
- impl;
- impl = getOrDefinePackage(names);
- if (impl) {
- cache[classpath] = true;
- return;
- }
- function getPathFromManifests(classpath) {
- var path = classpath.replace(".", "/") + ".js",
- dirs = runtime.libraryPaths(),
- i,
- dir,
- code;
- if (runtime.currentDirectory) {
- dirs.push(runtime.currentDirectory());
- }
- for (i = 0; i < dirs.length; i += 1) {
- dir = dirs[i];
- if (!dircontents.hasOwnProperty(dir)) {
- code = runtime.readFileSync(dirs[i] + "/manifest.js",
- "utf8");
- if (code && code.length) {
- try {
- dircontents[dir] = eval(code);
- } catch (e1) {
- dircontents[dir] = null;
- runtime.log("Cannot load manifest for " + dir +
- ".");
- }
- } else {
- dircontents[dir] = null;
- }
- }
- code = null;
- dir = dircontents[dir];
- if (dir && dir.indexOf && dir.indexOf(path) !== -1) {
- return dirs[i] + "/" + path;
- }
- }
- return null;
- }
- function load(classpath) {
- var code, path;
- path = getPathFromManifests(classpath);
- if (!path) {
- throw classpath + " is not listed in any manifest.js.";
- }
- try {
- code = runtime.readFileSync(path, "utf8");
- } catch (e2) {
- runtime.log("Error loading " + classpath + " " + e2);
- throw e2;
- }
- if (code === undefined) {
- throw "Cannot load class " + classpath;
- }
- try {
- code = eval(classpath + " = eval(code);");
- } catch (e4) {
- runtime.log("Error loading " + classpath + " " + e4);
- throw e4;
- }
- return code;
- }
- // check if the class in context already
- impl = load(classpath);
- if (!impl || Runtime.getFunctionName(impl) !==
- names[names.length - 1]) {
- runtime.log("Loaded code is not for " + names[names.length - 1]);
- throw "Loaded code is not for " + names[names.length - 1];
- }
- cache[classpath] = true;
- };
-}());
-(function (args) {
- args = Array.prototype.slice.call(args);
- function run(argv) {
- if (!argv.length) {
- return;
- }
- var script = argv[0];
- runtime.readFile(script, "utf8", function (err, code) {
- var path = "",
- paths = runtime.libraryPaths();
- if (script.indexOf("/") !== -1) {
- path = script.substring(0, script.indexOf("/"));
- }
- runtime.setCurrentDirectory(path);
- function run() {
- var script, path, paths, args, argv, result; // hide variables
- // execute script and make arguments available via argv
- result = eval(code);
- if (result) {
- runtime.exit(result);
- }
- return;
- }
- if (err) {
- runtime.log(err);
- runtime.exit(1);
- } else {
- // run the script with arguments bound to arguments parameter
- run.apply(null, argv);
- }
- });
- }
- // if rhino or node.js, run the scripts provided as arguments
- if (runtime.type() === "NodeJSRuntime") {
- run(process.argv.slice(2));
- } else if (runtime.type() === "RhinoRuntime") {
- run(args);
- } else {
- run(args.slice(1));
- }
-}(typeof arguments !== "undefined" && arguments));
-
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/LSSerializer.js b/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/LSSerializer.js
deleted file mode 100644
index 12b3219f812..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/LSSerializer.js
+++ /dev/null
@@ -1,197 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global xmldom*/
-/*jslint sub: true*/
-if (typeof Object.create !== 'function') {
- Object['create'] = function (o) {
- "use strict";
- /**
- * @constructor
- */
- var F = function () {};
- F.prototype = o;
- return new F();
- };
-}
-
-/**
- * Partial implementation of LSSerializer
- * @constructor
- */
-xmldom.LSSerializer = function LSSerializer() {
- "use strict";
- var /**@const@type{!LSSerializer}*/ self = this;
-
- /**
- * @param {!string} prefix
- * @param {!Attr} attr
- * @return {!string}
- */
- function serializeAttribute(prefix, attr) {
- var /**@type{!string}*/ s = prefix + attr.localName + "=\"" +
- attr.nodeValue + "\"";
- return s;
- }
- /**
- * @param {!Object.<string,string>} nsmap
- * @param {string} prefix
- * @param {string} ns
- * @return {!string}
- */
- function attributePrefix(nsmap, prefix, ns) {
- // TODO: check for double prefix definitions, this needs a special class
- if (nsmap.hasOwnProperty(ns)) {
- return nsmap[ns] + ":";
- }
- if (nsmap[ns] !== prefix) {
- nsmap[ns] = prefix;
- }
- return prefix + ":";
- }
- /**
- * @param {!Object.<string,string>} nsmap
- * @param {!Node} node
- * @return {!string}
- */
- function startNode(nsmap, node) {
- var /**@type{!string}*/ s = "",
- /**@const@type{!NamedNodeMap}*/ atts = node.attributes,
- /**@const@type{!number}*/ length,
- /**@type{!number}*/ i,
- /**@type{!Attr}*/ attr,
- /**@type{!string}*/ attstr = "",
- /**@type{!number}*/ accept,
- /**@type{!string}*/ prefix;
- if (atts) { // ELEMENT
- if (nsmap[node.namespaceURI] !== node.prefix) {
- nsmap[node.namespaceURI] = node.prefix;
- }
- s += "<" + node.nodeName;
- length = atts.length;
- for (i = 0; i < length; i += 1) {
- attr = /**@type{!Attr}*/(atts.item(i));
- if (attr.namespaceURI !== "http://www.w3.org/2000/xmlns/") {
- accept = (self.filter) ? self.filter.acceptNode(attr) : 1;
- if (accept === 1) {
- // xml attributes always need a prefix for a namespace
- if (attr.namespaceURI) {
- prefix = attributePrefix(nsmap, attr.prefix,
- attr.namespaceURI);
- } else {
- prefix = "";
- }
- attstr += " " + serializeAttribute(prefix, attr);
- }
- }
- }
- for (i in nsmap) {
- if (nsmap.hasOwnProperty(i)) {
- prefix = nsmap[i];
- if (!prefix) {
- s += " xmlns=\"" + i + "\"";
- } else if (prefix !== "xmlns") {
- s += " xmlns:" + nsmap[i] + "=\"" + i + "\"";
- }
- }
- }
- s += attstr + ">";
- }
- return s;
- }
- /**
- * @param {!Node} node
- * @return {!string}
- */
- function endNode(node) {
- var /**@type{!string}*/ s = "";
- if (node.nodeType === 1) { // ELEMENT
- s += "</" + node.nodeName + ">";
- }
- return s;
- }
- /**
- * @param {!Object.<string,string>} parentnsmap
- * @param {!Node} node
- * @return {!string}
- */
- function serializeNode(parentnsmap, node) {
- var /**@type{!string}*/ s = "",
- /**@const@type{!Object.<string,string>}*/ nsmap
- = Object.create(parentnsmap),
- /**@const@type{!number}*/ accept
- = (self.filter) ? self.filter.acceptNode(node) : 1,
- /**@type{Node}*/child;
- if (accept === 1) {
- s += startNode(nsmap, node);
- }
- if (accept === 1 || accept === 3) {
- child = node.firstChild;
- while (child) {
- s += serializeNode(nsmap, child);
- child = child.nextSibling;
- }
- if (node.nodeValue) {
- s += node.nodeValue;
- }
- }
- if (accept === 1) {
- s += endNode(node);
- }
- return s;
- }
- function invertMap(map) {
- var m = {}, i;
- for (i in map) {
- if (map.hasOwnProperty(i)) {
- m[map[i]] = i;
- }
- }
- return m;
- }
- /**
- * @type {xmldom.LSSerializerFilter}
- */
- this.filter = null;
- /**
- * @param {!Node} node
- * @param {!Object.<string,string>} nsmap
- * @return {!string}
- */
- this.writeToString = function (node, nsmap) {
- if (!node) {
- return "";
- }
- nsmap = nsmap ? invertMap(nsmap) : {};
- return serializeNode(nsmap, node);
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/LSSerializerFilter.js b/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/LSSerializerFilter.js
deleted file mode 100644
index 889428b8316..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/LSSerializerFilter.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global xmldom*/
-/**
- * Partial implementation of LSSerializerFilter
- * @interface
- */
-xmldom.LSSerializerFilter = function LSSerializerFilter() {
- "use strict";
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/OperationalTransformDOM.js b/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/OperationalTransformDOM.js
deleted file mode 100644
index 5e9f3abacf5..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/OperationalTransformDOM.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global xmldom*/
-/**
- * @class
- * @constructor
- * @augments xmldom.OperationalTransformInterface
- * @implements {xmldom.OperationalTransformInterface}
- * @param {Element} root
- * @param {xmldom.LSSerializer} serializer
- */
-xmldom.OperationalTransformDOM = function OperationalTransformDOM(root, serializer) {
- "use strict";
- var pos, length;
- /**
- * Skip in the document
- * @param {!number} amount
- * @return {undefined}
- */
- function retain(amount) {}
- /**
- * Insert characters
- * Can throw an exception if the current position does not allow insertion
- * of characters.
- * @param {!string} chars
- * @return {undefined}
- */
- function insertCharacters(chars) {}
- /**
- * Insert element start
- * @param {!string} tagname
- * @param {!Object} attributes
- * @return {undefined}
- */
- function insertElementStart(tagname, attributes) {}
- /**
- * Insert element end
- * @return {undefined}
- */
- function insertElementEnd() {}
- /**
- * Delete characters
- * @param {!number} amount
- * @return {undefined}
- */
- function deleteCharacters(amount) {}
- /**
- * Delete element start
- * @return {undefined}
- */
- function deleteElementStart() {}
- /**
- * Delete element end
- * @return {undefined}
- */
- function deleteElementEnd() {}
- /**
- * Replace attributes
- * @param {!Object} atts
- * @return {undefined}
- */
- function replaceAttributes(atts) {}
- /**
- * Update attributes
- * @param {!Object} atts
- * @return {undefined}
- */
- function updateAttributes(atts) {}
- /**
- * @return {!boolean}
- */
- function atEnd() {
- return pos === length;
- }
- this.retain = retain;
- this.insertCharacters = insertCharacters;
- this.insertElementStart = insertElementStart;
- this.insertElementEnd = insertElementEnd;
- this.deleteCharacters = deleteCharacters;
- this.deleteElementStart = deleteElementStart;
- this.deleteElementEnd = deleteElementEnd;
- this.replaceAttributes = replaceAttributes;
- this.updateAttributes = updateAttributes;
- this.atEnd = atEnd;
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/OperationalTransformInterface.js b/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/OperationalTransformInterface.js
deleted file mode 100644
index 03aab1232bf..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/OperationalTransformInterface.js
+++ /dev/null
@@ -1,97 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global xmldom*/
-/**
- * This interface allows a document to be modified by operational
- * transformations. The interface is modelled after Google Wave.
- * Manual editing of XML documents will also be done via this interface.
- *
- *
- * @class
- * @interface
- */
-xmldom.OperationalTransformInterface = function () {"use strict"; };
-/**
- * Skip in the document
- * @param {!number} amount
- * @return {undefined}
- */
-xmldom.OperationalTransformInterface.prototype.retain = function (amount) {"use strict"; };
-/**
- * Insert characters
- * Can throw an exception if the current position does not allow insertion of
- * characters.
- * @param {!string} chars
- * @return {undefined}
- */
-xmldom.OperationalTransformInterface.prototype.insertCharacters = function (chars) {"use strict"; };
-/**
- * Insert element start
- * @param {!string} tagname
- * @param {!Object} attributes
- * @return {undefined}
- */
-xmldom.OperationalTransformInterface.prototype.insertElementStart = function (tagname, attributes) {"use strict"; };
-/**
- * Insert element end
- * @return {undefined}
- */
-xmldom.OperationalTransformInterface.prototype.insertElementEnd = function () {"use strict"; };
-/**
- * Delete characters
- * @param {!number} amount
- * @return {undefined}
- */
-xmldom.OperationalTransformInterface.prototype.deleteCharacters = function (amount) {"use strict"; };
-/**
- * Delete element start
- * @return {undefined}
- */
-xmldom.OperationalTransformInterface.prototype.deleteElementStart = function () {"use strict"; };
-/**
- * Delete element end
- * @return {undefined}
- */
-xmldom.OperationalTransformInterface.prototype.deleteElementEnd = function () {"use strict"; };
-/**
- * Replace attributes
- * @param {!Object} atts
- * @return {undefined}
- */
-xmldom.OperationalTransformInterface.prototype.replaceAttributes = function (atts) {"use strict"; };
-/**
- * Update attributes
- * @param {!Object} atts
- * @return {undefined}
- */
-xmldom.OperationalTransformInterface.prototype.updateAttributes = function (atts) {"use strict"; };
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/RelaxNG.js b/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/RelaxNG.js
deleted file mode 100644
index e04c3c76117..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/RelaxNG.js
+++ /dev/null
@@ -1,691 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, xmldom: true*/
-
-/**
- * RelaxNG can check a DOM tree against a Relax NG schema
- * The RelaxNG implementation is currently not complete. Relax NG should not
- * report errors on valid DOM trees, but it will not check all constraints that
- * a Relax NG file can define. The current implementation does not load external
- * parts of a Relax NG file.
- * The main purpose of this Relax NG engine is to validate runtime ODF
- * documents. The DOM tree is traversed via a TreeWalker. A custom TreeWalker
- * implementation can hide parts of a DOM tree. This is useful in WebODF, where
- * special elements and attributes in the runtime DOM tree.
- *
- * implementation according to
- * http://www.thaiopensource.com/relaxng/derivative.html
- */
-runtime.loadClass("xmldom.RelaxNGParser");
-/**
- * @constructor
- */
-xmldom.RelaxNG = function RelaxNG() {
- "use strict";
- var xmlnsns = "http://www.w3.org/2000/xmlns/",
- createChoice,
- createInterleave,
- createGroup,
- createAfter,
- createOneOrMore,
- createValue,
- createAttribute,
- createNameClass,
- createData,
- makePattern,
- notAllowed = {
- type: "notAllowed",
- nullable: false,
- hash: "notAllowed",
- textDeriv: function () { return notAllowed; },
- startTagOpenDeriv: function () { return notAllowed; },
- attDeriv: function () { return notAllowed; },
- startTagCloseDeriv: function () { return notAllowed; },
- endTagDeriv: function () { return notAllowed; }
- },
- empty = {
- type: "empty",
- nullable: true,
- hash: "empty",
- textDeriv: function () { return notAllowed; },
- startTagOpenDeriv: function () { return notAllowed; },
- attDeriv: function (context, attribute) { return notAllowed; },
- startTagCloseDeriv: function () { return empty; },
- endTagDeriv: function () { return notAllowed; }
- },
- text = {
- type: "text",
- nullable: true,
- hash: "text",
- textDeriv: function () { return text; },
- startTagOpenDeriv: function () { return notAllowed; },
- attDeriv: function () { return notAllowed; },
- startTagCloseDeriv: function () { return text; },
- endTagDeriv: function () { return notAllowed; }
- },
- applyAfter,
- childDeriv,
- rootPattern;
-
- function memoize0arg(func) {
- return (function () {
- var cache;
- return function () {
- if (cache === undefined) {
- cache = func();
- }
- return cache;
- };
- }());
- }
- function memoize1arg(type, func) {
- return (function () {
- var cache = {}, cachecount = 0;
- return function (a) {
- var ahash = a.hash || a.toString(),
- v;
- v = cache[ahash];
- if (v !== undefined) {
- return v;
- }
- cache[ahash] = v = func(a);
- v.hash = type + cachecount.toString();
- cachecount += 1;
- return v;
- };
- }());
- }
- function memoizeNode(func) {
- return (function () {
- var cache = {};
- return function (node) {
- var v, m;
- m = cache[node.localName];
- if (m === undefined) {
- cache[node.localName] = m = {};
- } else {
- v = m[node.namespaceURI];
- if (v !== undefined) {
- return v;
- }
- }
- m[node.namespaceURI] = v = func(node);
- return v;
- };
- }());
- }
- function memoize2arg(type, fastfunc, func) {
- return (function () {
- var cache = {}, cachecount = 0;
- return function (a, b) {
- var v = fastfunc && fastfunc(a, b),
- ahash, bhash, m;
- if (v !== undefined) { return v; }
- ahash = a.hash || a.toString();
- bhash = b.hash || b.toString();
- m = cache[ahash];
- if (m === undefined) {
- cache[ahash] = m = {};
- } else {
- v = m[bhash];
- if (v !== undefined) {
- return v;
- }
- }
- m[bhash] = v = func(a, b);
- v.hash = type + cachecount.toString();
- cachecount += 1;
- return v;
- };
- }());
- }
- // this memoize function can be used for functions where the order of two
- // arguments is not important
- function unorderedMemoize2arg(type, fastfunc, func) {
- return (function () {
- var cache = {}, cachecount = 0;
- return function (a, b) {
- var v = fastfunc && fastfunc(a, b),
- ahash, bhash, m;
- if (v !== undefined) { return v; }
- ahash = a.hash || a.toString();
- bhash = b.hash || b.toString();
- if (ahash < bhash) {
- m = ahash; ahash = bhash; bhash = m;
- m = a; a = b; b = m;
- }
- m = cache[ahash];
- if (m === undefined) {
- cache[ahash] = m = {};
- } else {
- v = m[bhash];
- if (v !== undefined) {
- return v;
- }
- }
- m[bhash] = v = func(a, b);
- v.hash = type + cachecount.toString();
- cachecount += 1;
- return v;
- };
- }());
- }
- function getUniqueLeaves(leaves, pattern) {
- if (pattern.p1.type === "choice") {
- getUniqueLeaves(leaves, pattern.p1);
- } else {
- leaves[pattern.p1.hash] = pattern.p1;
- }
- if (pattern.p2.type === "choice") {
- getUniqueLeaves(leaves, pattern.p2);
- } else {
- leaves[pattern.p2.hash] = pattern.p2;
- }
- }
- createChoice = memoize2arg("choice", function (p1, p2) {
- if (p1 === notAllowed) { return p2; }
- if (p2 === notAllowed) { return p1; }
- if (p1 === p2) { return p1; }
- }, function (p1, p2) {
- function makeChoice(p1, p2) {
- return {
- type: "choice",
- p1: p1,
- p2: p2,
- nullable: p1.nullable || p2.nullable,
- textDeriv: function (context, text) {
- return createChoice(p1.textDeriv(context, text),
- p2.textDeriv(context, text));
- },
- startTagOpenDeriv: memoizeNode(function (node) {
- return createChoice(p1.startTagOpenDeriv(node),
- p2.startTagOpenDeriv(node));
- }),
- attDeriv: function (context, attribute) {
- return createChoice(p1.attDeriv(context, attribute),
- p2.attDeriv(context, attribute));
- },
- startTagCloseDeriv: memoize0arg(function () {
- return createChoice(p1.startTagCloseDeriv(),
- p2.startTagCloseDeriv());
- }),
- endTagDeriv: memoize0arg(function () {
- return createChoice(p1.endTagDeriv(), p2.endTagDeriv());
- })
- };
- }
- var leaves = {}, i;
- getUniqueLeaves(leaves, {p1: p1, p2: p2});
- p1 = undefined;
- p2 = undefined;
- for (i in leaves) {
- if (leaves.hasOwnProperty(i)) {
- if (p1 === undefined) {
- p1 = leaves[i];
- } else if (p2 === undefined) {
- p2 = leaves[i];
- } else {
- p2 = createChoice(p2, leaves[i]);
- }
- }
- }
- return makeChoice(p1, p2);
- });
- createInterleave = unorderedMemoize2arg("interleave", function (p1, p2) {
- if (p1 === notAllowed || p2 === notAllowed) { return notAllowed; }
- if (p1 === empty) { return p2; }
- if (p2 === empty) { return p1; }
- }, function (p1, p2) {
- return {
- type: "interleave",
- p1: p1,
- p2: p2,
- nullable: p1.nullable && p2.nullable,
- textDeriv: function (context, text) {
- return createChoice(
- createInterleave(p1.textDeriv(context, text), p2),
- createInterleave(p1, p2.textDeriv(context, text))
- );
- },
- startTagOpenDeriv: memoizeNode(function (node) {
- return createChoice(
- applyAfter(function (p) { return createInterleave(p, p2); },
- p1.startTagOpenDeriv(node)),
- applyAfter(function (p) { return createInterleave(p1, p); },
- p2.startTagOpenDeriv(node)));
- }),
- attDeriv: function (context, attribute) {
- return createChoice(
- createInterleave(p1.attDeriv(context, attribute), p2),
- createInterleave(p1, p2.attDeriv(context, attribute)));
- },
- startTagCloseDeriv: memoize0arg(function () {
- return createInterleave(p1.startTagCloseDeriv(),
- p2.startTagCloseDeriv());
- })
- };
- });
- createGroup = memoize2arg("group", function (p1, p2) {
- if (p1 === notAllowed || p2 === notAllowed) { return notAllowed; }
- if (p1 === empty) { return p2; }
- if (p2 === empty) { return p1; }
- }, function (p1, p2) {
- return {
- type: "group",
- p1: p1,
- p2: p2,
- nullable: p1.nullable && p2.nullable,
- textDeriv: function (context, text) {
- var p = createGroup(p1.textDeriv(context, text), p2);
- if (p1.nullable) {
- return createChoice(p, p2.textDeriv(context, text));
- }
- return p;
- },
- startTagOpenDeriv: function (node) {
- var x = applyAfter(function (p) { return createGroup(p, p2); },
- p1.startTagOpenDeriv(node));
- if (p1.nullable) {
- return createChoice(x, p2.startTagOpenDeriv(node));
- }
- return x;
- },
- attDeriv: function (context, attribute) {
- return createChoice(
- createGroup(p1.attDeriv(context, attribute), p2),
- createGroup(p1, p2.attDeriv(context, attribute)));
- },
- startTagCloseDeriv: memoize0arg(function () {
- return createGroup(p1.startTagCloseDeriv(),
- p2.startTagCloseDeriv());
- })
- };
- });
- createAfter = memoize2arg("after", function (p1, p2) {
- if (p1 === notAllowed || p2 === notAllowed) { return notAllowed; }
- }, function (p1, p2) {
- return {
- type: "after",
- p1: p1,
- p2: p2,
- nullable: false,
- textDeriv: function (context, text) {
- return createAfter(p1.textDeriv(context, text), p2);
- },
- startTagOpenDeriv: memoizeNode(function (node) {
- return applyAfter(function (p) { return createAfter(p, p2); },
- p1.startTagOpenDeriv(node));
- }),
- attDeriv: function (context, attribute) {
- return createAfter(p1.attDeriv(context, attribute), p2);
- },
- startTagCloseDeriv: memoize0arg(function () {
- return createAfter(p1.startTagCloseDeriv(), p2);
- }),
- endTagDeriv: memoize0arg(function () {
- return (p1.nullable) ? p2 : notAllowed;
- })
- };
- });
- createOneOrMore = memoize1arg("oneormore", function (p) {
- if (p === notAllowed) { return notAllowed; }
- return {
- type: "oneOrMore",
- p: p,
- nullable: p.nullable,
- textDeriv: function (context, text) {
- return createGroup(p.textDeriv(context, text),
- createChoice(this, empty));
- },
- startTagOpenDeriv: function (node) {
- var oneOrMore = this;
- return applyAfter(function (pf) {
- return createGroup(pf, createChoice(oneOrMore, empty));
- }, p.startTagOpenDeriv(node));
- },
- attDeriv: function (context, attribute) {
- var oneOrMore = this;
- return createGroup(p.attDeriv(context, attribute),
- createChoice(oneOrMore, empty));
- },
- startTagCloseDeriv: memoize0arg(function () {
- return createOneOrMore(p.startTagCloseDeriv());
- })
- };
- });
- function createElement(nc, p) {
- return {
- type: "element",
- nc: nc,
- nullable: false,
- textDeriv: function () { return notAllowed; },
- startTagOpenDeriv: function (node) {
- if (nc.contains(node)) {
- return createAfter(p, empty);
- }
- return notAllowed;
- },
- attDeriv: function (context, attribute) { return notAllowed; },
- startTagCloseDeriv: function () { return this; }
- };
- }
- function valueMatch(context, pattern, text) {
- return (pattern.nullable && /^\s+$/.test(text)) ||
- pattern.textDeriv(context, text).nullable;
- }
- createAttribute = memoize2arg("attribute", undefined, function (nc, p) {
- return {
- type: "attribute",
- nullable: false,
- nc: nc,
- p: p,
- attDeriv: function (context, attribute) {
- if (nc.contains(attribute) && valueMatch(context, p,
- attribute.nodeValue)) {
- return empty;
- }
- return notAllowed;
- },
- startTagCloseDeriv: function () { return notAllowed; }
- };
- });
- function createList() {
- return {
- type: "list",
- nullable: false,
- hash: "list",
- textDeriv: function (context, text) {
- return empty;
- }
- };
- }
- createValue = memoize1arg("value", function (value) {
- return {
- type: "value",
- nullable: false,
- value: value,
- textDeriv: function (context, text) {
- return (text === value) ? empty : notAllowed;
- },
- attDeriv: function () { return notAllowed; },
- startTagCloseDeriv: function () { return this; }
- };
- });
- createData = memoize1arg("data", function (type) {
- return {
- type: "data",
- nullable: false,
- dataType: type,
- textDeriv: function () { return empty; },
- attDeriv: function () { return notAllowed; },
- startTagCloseDeriv: function () { return this; }
- };
- });
- function createDataExcept() {
- return {
- type: "dataExcept",
- nullable: false,
- hash: "dataExcept"
- };
- }
- applyAfter = function applyAfter(f, p) {
- var result;
- if (p.type === "after") {
- result = createAfter(p.p1, f(p.p2));
- } else if (p.type === "choice") {
- result = createChoice(applyAfter(f, p.p1), applyAfter(f, p.p2));
- } else {
- result = p;
- }
- return result;
- };
- function attsDeriv(context, pattern, attributes, position) {
- if (pattern === notAllowed) {
- return notAllowed;
- }
- if (position >= attributes.length) {
- return pattern;
- }
- if (position === 0) {
- // TODO: loop over attributes to update namespace mapping
- position = 0;
- }
- var a = attributes.item(position);
- while (a.namespaceURI === xmlnsns) { // always ok
- position += 1;
- if (position >= attributes.length) {
- return pattern;
- }
- a = attributes.item(position);
- }
- a = attsDeriv(context, pattern.attDeriv(context,
- attributes.item(position)), attributes, position + 1);
- return a;
- }
- function childrenDeriv(context, pattern, walker) {
- var element = walker.currentNode,
- childNode = walker.firstChild(),
- numberOfTextNodes = 0,
- childNodes = [], i, p;
- // simple incomplete implementation: only use non-empty text nodes
- while (childNode) {
- if (childNode.nodeType === 1) {
- childNodes.push(childNode);
- } else if (childNode.nodeType === 3 &&
- !/^\s*$/.test(childNode.nodeValue)) {
- childNodes.push(childNode.nodeValue);
- numberOfTextNodes += 1;
- }
- childNode = walker.nextSibling();
- }
- // if there is no nodes at all, add an empty text node
- if (childNodes.length === 0) {
- childNodes = [""];
- }
- p = pattern;
- for (i = 0; p !== notAllowed && i < childNodes.length; i += 1) {
- childNode = childNodes[i];
- if (typeof childNode === "string") {
- if (/^\s*$/.test(childNode)) {
- p = createChoice(p, p.textDeriv(context, childNode));
- } else {
- p = p.textDeriv(context, childNode);
- }
- } else {
- walker.currentNode = childNode;
- p = childDeriv(context, p, walker);
- }
- }
- walker.currentNode = element;
- return p;
- }
- childDeriv = function childDeriv(context, pattern, walker) {
- var childNode = walker.currentNode, p;
- p = pattern.startTagOpenDeriv(childNode);
- p = attsDeriv(context, p, childNode.attributes, 0);
- p = p.startTagCloseDeriv();
- p = childrenDeriv(context, p, walker);
- p = p.endTagDeriv();
- return p;
- };
- function addNames(name, ns, pattern) {
- if (pattern.e[0].a) {
- name.push(pattern.e[0].text);
- ns.push(pattern.e[0].a.ns);
- } else {
- addNames(name, ns, pattern.e[0]);
- }
- if (pattern.e[1].a) {
- name.push(pattern.e[1].text);
- ns.push(pattern.e[1].a.ns);
- } else {
- addNames(name, ns, pattern.e[1]);
- }
- }
- createNameClass = function createNameClass(pattern) {
- var name, ns, hash, i, result;
- if (pattern.name === "name") {
- name = pattern.text;
- ns = pattern.a.ns;
- result = {
- name: name,
- ns: ns,
- hash: "{" + ns + "}" + name,
- contains: function (node) {
- return node.namespaceURI === ns && node.localName === name;
- }
- };
- } else if (pattern.name === "choice") {
- name = [];
- ns = [];
- addNames(name, ns, pattern);
- hash = "";
- for (i = 0; i < name.length; i += 1) {
- hash += "{" + ns[i] + "}" + name[i] + ",";
- }
- result = {
- hash: hash,
- contains: function (node) {
- var i;
- for (i = 0; i < name.length; i += 1) {
- if (name[i] === node.localName &&
- ns[i] === node.namespaceURI) {
- return true;
- }
- }
- return false;
- }
- };
- } else {
- result = {
- hash: "anyName",
- contains: function () { return true; }
- };
- }
- return result;
- };
- function resolveElement(pattern, elements) {
- var element, p, i, hash;
- // create an empty object in the store to enable circular
- // dependencies
- hash = "element" + pattern.id.toString();
- p = elements[pattern.id] = { hash: hash };
- element = createElement(createNameClass(pattern.e[0]),
- makePattern(pattern.e[1], elements));
- // copy the properties of the new object into the predefined one
- for (i in element) {
- if (element.hasOwnProperty(i)) {
- p[i] = element[i];
- }
- }
- return p;
- }
- makePattern = function makePattern(pattern, elements) {
- var p, i;
- if (pattern.name === "elementref") {
- p = pattern.id || 0;
- pattern = elements[p];
- if (pattern.name !== undefined) {
- return resolveElement(pattern, elements);
- }
- return pattern;
- }
- switch (pattern.name) {
- case 'empty':
- return empty;
- case 'notAllowed':
- return notAllowed;
- case 'text':
- return text;
- case 'choice':
- return createChoice(makePattern(pattern.e[0], elements),
- makePattern(pattern.e[1], elements));
- case 'interleave':
- p = makePattern(pattern.e[0], elements);
- for (i = 1; i < pattern.e.length; i += 1) {
- p = createInterleave(p, makePattern(pattern.e[i],
- elements));
- }
- return p;
- case 'group':
- return createGroup(makePattern(pattern.e[0], elements),
- makePattern(pattern.e[1], elements));
- case 'oneOrMore':
- return createOneOrMore(makePattern(pattern.e[0], elements));
- case 'attribute':
- return createAttribute(createNameClass(pattern.e[0]),
- makePattern(pattern.e[1], elements));
- case 'value':
- return createValue(pattern.text);
- case 'data':
- p = pattern.a && pattern.a.type;
- if (p === undefined) {
- p = "";
- }
- return createData(p);
- case 'list':
- return createList();
- }
- throw "No support for " + pattern.name;
- };
- this.makePattern = function (pattern, elements) {
- var copy = {}, i;
- for (i in elements) {
- if (elements.hasOwnProperty(i)) {
- copy[i] = elements[i];
- }
- }
- i = makePattern(pattern, copy);
- return i;
- };
- /**
- * Validate the elements pointed to by the TreeWalker
- * @param {!TreeWalker} walker
- * @param {!function(Array.<string>):undefined} callback
- * @return {undefined}
- */
- this.validate = function validate(walker, callback) {
- var errors;
- walker.currentNode = walker.root;
- errors = childDeriv(null, rootPattern, walker);
- if (!errors.nullable) {
- runtime.log("Error in Relax NG validation: " + errors);
- callback(["Error in Relax NG validation: " + errors]);
- } else {
- callback(null);
- }
- };
- this.init = function init(rootPattern1) {
- rootPattern = rootPattern1;
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/RelaxNG2.js b/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/RelaxNG2.js
deleted file mode 100644
index 185ef5236e8..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/RelaxNG2.js
+++ /dev/null
@@ -1,416 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, xmldom: true*/
-
-/**
- * RelaxNG can check a DOM tree against a Relax NG schema
- * The RelaxNG implementation is currently not complete. Relax NG should not
- * report errors on valid DOM trees, but it will not check all constraints that
- * a Relax NG file can define. The current implementation does not load external
- * parts of a Relax NG file.
- * The main purpose of this Relax NG engine is to validate runtime ODF
- * documents. The DOM tree is traversed via a TreeWalker. A custom TreeWalker
- * implementation can hide parts of a DOM tree. This is useful in WebODF, where
- * special elements and attributes in the runtime DOM tree.
- */
-runtime.loadClass("xmldom.RelaxNGParser");
-/**
- * @constructor
- */
-xmldom.RelaxNG2 = function RelaxNG2() {
- "use strict";
- var start,
- validateNonEmptyPattern,
- nsmap,
- depth = 0,
- p = " ";
-
- /**
- * @constructor
- * @param {!string} error
- * @param {Node=} context
- */
- function RelaxNGParseError(error, context) {
- this.message = function () {
- if (context) {
- error += (context.nodeType === 1) ? " Element " : " Node ";
- error += context.nodeName;
- if (context.nodeValue) {
- error += " with value '" + context.nodeValue + "'";
- }
- error += ".";
- }
- return error;
- };
-// runtime.log("[" + p.slice(0, depth) + this.message() + "]");
- }
- /**
- * @param elementdef
- * @param walker
- * @param {Element} element
- * @return {Array.<RelaxNGParseError>}
- */
- function validateOneOrMore(elementdef, walker, element) {
- // The list of definitions in the elements list should be completely
- // traversed at least once. If a second or later round fails, the walker
- // should go back to the start of the last successful traversal
- var node, i = 0, err;
- do {
- node = walker.currentNode;
- err = validateNonEmptyPattern(elementdef.e[0], walker, element);
- i += 1;
- } while (!err && node !== walker.currentNode);
- if (i > 1) { // at least one round was without error
- // set position back to position of before last failed round
- walker.currentNode = node;
- return null;
- }
- return err;
- }
- /**
- * @param {!Node} node
- * @return {!string}
- */
- function qName(node) {
- return nsmap[node.namespaceURI] + ":" + node.localName;
- }
- /**
- * @param {!Node} node
- * @return {!boolean}
- */
- function isWhitespace(node) {
- return node && node.nodeType === 3 && /^\s+$/.test(node.nodeValue);
- }
- /**
- * @param elementdef
- * @param walker
- * @param {Element} element
- * @param {string=} data
- * @return {Array.<RelaxNGParseError>}
- */
- function validatePattern(elementdef, walker, element, data) {
- if (elementdef.name === "empty") {
- return null;
- }
- return validateNonEmptyPattern(elementdef, walker, element, data);
- }
- /**
- * @param elementdef
- * @param walker
- * @param {Element} element
- * @return {Array.<RelaxNGParseError>}
- */
- function validateAttribute(elementdef, walker, element) {
- if (elementdef.e.length !== 2) {
- throw "Attribute with wrong # of elements: " + elementdef.e.length;
- }
- var att, a, l = elementdef.localnames.length, i;
- for (i = 0; i < l; i += 1) {
- a = element.getAttributeNS(elementdef.namespaces[i],
- elementdef.localnames[i]);
- // if an element is not present, getAttributeNS will return an empty
- // string but an empty string is possible attribute value, so an
- // extra check is needed
- if (a === "" && !element.hasAttributeNS(elementdef.namespaces[i],
- elementdef.localnames[i])) {
- a = undefined;
- }
- if (att !== undefined && a !== undefined) {
- return [new RelaxNGParseError("Attribute defined too often.",
- element)];
- }
- att = a;
- }
- if (att === undefined) {
- return [new RelaxNGParseError("Attribute not found: " +
- elementdef.names, element)];
- }
- return validatePattern(elementdef.e[1], walker, element, att);
- }
- /**
- * @param elementdef
- * @param walker
- * @param {Element} element
- * @return {Array.<RelaxNGParseError>}
- */
- function validateTop(elementdef, walker, element) {
- // notAllowed not implemented atm
- return validatePattern(elementdef, walker, element);
- }
- /**
- * Validate an element.
- * Function forwards the walker until an element is met.
- * If element if of the right type, it is entered and the validation
- * continues inside the element. After validation, regardless of whether an
- * error occurred, the walker is at the same depth in the dom tree.
- * @param elementdef
- * @param walker
- * @param {Element} element
- * @return {Array.<RelaxNGParseError>}
- */
- function validateElement(elementdef, walker, element) {
- if (elementdef.e.length !== 2) {
- throw "Element with wrong # of elements: " + elementdef.e.length;
- }
- depth += 1;
- // forward until an element is seen, then check the name
- var /**@type{Node}*/ node = walker.currentNode,
- /**@type{number}*/ type = node ? node.nodeType : 0,
- error = null;
- // find the next element, skip text nodes with only whitespace
- while (type > 1) {
- if (type !== 8 &&
- (type !== 3 ||
- !/^\s+$/.test(walker.currentNode.nodeValue))) {// TEXT_NODE
- depth -= 1;
- return [new RelaxNGParseError("Not allowed node of type " +
- type + ".")];
- }
- node = walker.nextSibling();
- type = node ? node.nodeType : 0;
- }
- if (!node) {
- depth -= 1;
- return [new RelaxNGParseError("Missing element " +
- elementdef.names)];
- }
- if (elementdef.names && elementdef.names.indexOf(qName(node)) === -1) {
- depth -= 1;
- return [new RelaxNGParseError("Found " + node.nodeName +
- " instead of " + elementdef.names + ".", node)];
- }
- // the right element was found, now parse the contents
- if (walker.firstChild()) {
- // currentNode now points to the first child node of this element
- error = validateTop(elementdef.e[1], walker, node);
- // there should be no content left
- while (walker.nextSibling()) {
- type = walker.currentNode.nodeType;
- if (!isWhitespace(walker.currentNode) && type !== 8) {
- depth -= 1;
- return [new RelaxNGParseError("Spurious content.",
- walker.currentNode)];
- }
- }
- if (walker.parentNode() !== node) {
- depth -= 1;
- return [new RelaxNGParseError("Implementation error.")];
- }
- } else {
- error = validateTop(elementdef.e[1], walker, node);
- }
- depth -= 1;
- // move to the next node
- node = walker.nextSibling();
- return error;
- }
- /**
- * @param elementdef
- * @param walker
- * @param {Element} element
- * @param {string=} data
- * @return {Array.<RelaxNGParseError>}
- */
- function validateChoice(elementdef, walker, element, data) {
- // loop through child definitions and return if a match is found
- if (elementdef.e.length !== 2) {
- throw "Choice with wrong # of options: " + elementdef.e.length;
- }
- var node = walker.currentNode, err;
- // if the first option is empty, just check the second one for debugging
- // but the total choice is alwasy ok
- if (elementdef.e[0].name === "empty") {
- err = validateNonEmptyPattern(elementdef.e[1], walker, element,
- data);
- if (err) {
- walker.currentNode = node;
- }
- return null;
- }
- err = validatePattern(elementdef.e[0], walker, element, data);
- if (err) {
- walker.currentNode = node;
- err = validateNonEmptyPattern(elementdef.e[1], walker, element,
- data);
- }
- return err;
- }
- /**
- * @param elementdef
- * @param walker
- * @param {Element} element
- * @return {Array.<RelaxNGParseError>}
- */
- function validateInterleave(elementdef, walker, element) {
- var l = elementdef.e.length, n = [l], err, i, todo = l,
- donethisround, node, subnode, e;
- // the interleave is done when all items are 'true' and no
- while (todo > 0) {
- donethisround = 0;
- node = walker.currentNode;
- for (i = 0; i < l; i += 1) {
- subnode = walker.currentNode;
- if (n[i] !== true && n[i] !== subnode) {
- e = elementdef.e[i];
- err = validateNonEmptyPattern(e, walker, element);
- if (err) {
- walker.currentNode = subnode;
- if (n[i] === undefined) {
- n[i] = false;
- }
- } else if (subnode === walker.currentNode ||
- // this is a bit dodgy, there should be a rule to
- // see if multiple elements are allowed
- e.name === "oneOrMore" ||
- (e.name === "choice" &&
- (e.e[0].name === "oneOrMore" ||
- e.e[1].name === "oneOrMore"))) {
- donethisround += 1;
- n[i] = subnode; // no error and try this one again later
- } else {
- donethisround += 1;
- n[i] = true; // no error and progress
- }
- }
- }
- if (node === walker.currentNode && donethisround === todo) {
- return null;
- }
- if (donethisround === 0) {
- for (i = 0; i < l; i += 1) {
- if (n[i] === false) {
- return [new RelaxNGParseError(
- "Interleave does not match.", element)];
- }
- }
- return null;
- }
- todo = 0;
- for (i = 0; i < l; i += 1) {
- if (n[i] !== true) {
- todo += 1;
- }
- }
- }
- return null;
- }
- /**
- * @param elementdef
- * @param walker
- * @param {Element} element
- * @return {Array.<RelaxNGParseError>}
- */
- function validateGroup(elementdef, walker, element) {
- if (elementdef.e.length !== 2) {
- throw "Group with wrong # of members: " + elementdef.e.length;
- }
- //runtime.log(elementdef.e[0].name + " " + elementdef.e[1].name);
- return validateNonEmptyPattern(elementdef.e[0], walker, element) ||
- validateNonEmptyPattern(elementdef.e[1], walker, element);
- }
- /**
- * @param elementdef
- * @param walker
- * @param {Element} element
- * @return {Array.<RelaxNGParseError>}
- */
- function validateText(elementdef, walker, element) {
- var /**@type{Node}*/ node = walker.currentNode,
- /**@type{number}*/ type = node ? node.nodeType : 0,
- error = null;
- // find the next element, skip text nodes with only whitespace
- while (node !== element && type !== 3) {
- if (type === 1) {
- return [new RelaxNGParseError(
- "Element not allowed here.", node)];
- }
- node = walker.nextSibling();
- type = node ? node.nodeType : 0;
- }
- walker.nextSibling();
- return null;
- }
- /**
- * @param elementdef
- * @param walker
- * @param {Element} element
- * @param {string=} data
- * @return {Array.<RelaxNGParseError>}
- */
- validateNonEmptyPattern = function validateNonEmptyPattern(elementdef,
- walker, element, data) {
- var name = elementdef.name, err = null;
- if (name === "text") {
- err = validateText(elementdef, walker, element);
- } else if (name === "data") {
- err = null; // data not implemented
- } else if (name === "value") {
- if (data !== elementdef.text) {
- err = [new RelaxNGParseError("Wrong value, should be '" +
- elementdef.text + "', not '" + data + "'", element)];
- }
- } else if (name === "list") {
- err = null; // list not implemented
- } else if (name === "attribute") {
- err = validateAttribute(elementdef, walker, element);
- } else if (name === "element") {
- err = validateElement(elementdef, walker, element);
- } else if (name === "oneOrMore") {
- err = validateOneOrMore(elementdef, walker, element);
- } else if (name === "choice") {
- err = validateChoice(elementdef, walker, element, data);
- } else if (name === "group") {
- err = validateGroup(elementdef, walker, element);
- } else if (name === "interleave") {
- err = validateInterleave(elementdef, walker, element);
- } else {
- throw name + " not allowed in nonEmptyPattern.";
- }
- return err;
- };
- /**
- * Validate the elements pointed to by the TreeWalker
- * @param {!TreeWalker} walker
- * @param {!function(Array.<RelaxNGParseError>):undefined} callback
- * @return {undefined}
- */
- this.validate = function validate(walker, callback) {
- walker.currentNode = walker.root;
- var errors = validatePattern(start.e[0], walker, walker.root);
- callback(errors);
- };
- this.init = function init(start1, nsmap1) {
- start = start1;
- nsmap = nsmap1;
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/RelaxNGParser.js b/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/RelaxNGParser.js
deleted file mode 100644
index 12e37278a06..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/RelaxNGParser.js
+++ /dev/null
@@ -1,452 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, xmldom: true*/
-
-/**
- * RelaxNG can check a DOM tree against a Relax NG schema
- * The RelaxNG implementation is currently not complete. Relax NG should not
- * report errors on valid DOM trees, but it will not check all constraints that
- * a Relax NG file can define. The current implementation does not load external
- * parts of a Relax NG file.
- * The main purpose of this Relax NG engine is to validate runtime ODF
- * documents. The DOM tree is traversed via a TreeWalker. A custom TreeWalker
- * implementation can hide parts of a DOM tree. This is useful in WebODF, where
- * special elements and attributes in the runtime DOM tree.
- * @constructor
- */
-xmldom.RelaxNGParser = function RelaxNGParser() {
- "use strict";
- var self = this,
- rngns = "http://relaxng.org/ns/structure/1.0",
- xmlnsns = "http://www.w3.org/2000/xmlns/",
- start,
- nsmap = { "http://www.w3.org/XML/1998/namespace": "xml" },
- parse;
-
- /**
- * @constructor
- * @param {!string} error
- * @param {Node=} context
- */
- function RelaxNGParseError(error, context) {
- /**
- * return {!string}
- */
- this.message = function () {
- if (context) {
- error += (context.nodeType === 1) ? " Element " : " Node ";
- error += context.nodeName;
- if (context.nodeValue) {
- error += " with value '" + context.nodeValue + "'";
- }
- error += ".";
- }
- return error;
- };
- }
- function splitToDuos(e) {
- if (e.e.length <= 2) {
- return e;
- }
- var o = { name: e.name, e: e.e.slice(0, 2) };
- return splitToDuos({
- name: e.name,
- e: [ o ].concat(e.e.slice(2))
- });
- }
- /**
- * @param {!string} name
- * @return {!Array.<string>}
- */
- function splitQName(name) {
- var r = name.split(":", 2),
- prefix = "", i;
- if (r.length === 1) {
- r = ["", r[0]];
- } else {
- prefix = r[0];
- }
- for (i in nsmap) {
- if (nsmap[i] === prefix) {
- r[0] = i;
- }
- }
- return r;
- }
-
- function splitQNames(def) {
- var i, l = (def.names) ? def.names.length : 0, name,
- localnames = def.localnames = [l],
- namespaces = def.namespaces = [l];
- for (i = 0; i < l; i += 1) {
- name = splitQName(def.names[i]);
- namespaces[i] = name[0];
- localnames[i] = name[1];
- }
- }
-
- /**
- * @param {!string} str
- * @return {!string}
- */
- function trim(str) {
- str = str.replace(/^\s\s*/, '');
- var ws = /\s/,
- i = str.length - 1;
- while (ws.test(str.charAt(i))) {
- i -= 1;
- }
- return str.slice(0, i + 1);
- }
-
- /**
- * @param {!Object.<string,string>} atts
- * @param {!string} name
- * @param {!Array.<string>} names
- * @return {!Object}
- */
- function copyAttributes(atts, name, names) {
- var a = {}, i, att;
- for (i = 0; i < atts.length; i += 1) {
- att = atts.item(i);
- if (!att.namespaceURI) {
- if (att.localName === "name" &&
- (name === "element" || name === "attribute")) {
- names.push(att.value);
- }
- if (att.localName === "name" || att.localName === "combine" ||
- att.localName === "type") {
- att.value = trim(att.value);
- }
- a[att.localName] = att.value;
- } else if (att.namespaceURI === xmlnsns) {
- nsmap[att.value] = att.localName;
- }
- }
- return a;
- }
-
- function parseChildren(c, e, elements, names) {
- var text = "", ce;
- while (c) {
- if (c.nodeType === 1 && c.namespaceURI === rngns) {
- ce = parse(c, elements, e);
- if (ce) {
- if (ce.name === "name") {
- names.push(nsmap[ce.a.ns] + ":" + ce.text);
- e.push(ce);
- } else if (ce.name === "choice" && ce.names &&
- ce.names.length) {
- names = names.concat(ce.names);
- delete ce.names;
- e.push(ce);
- } else {
- e.push(ce);
- }
- }
- } else if (c.nodeType === 3) {
- text += c.nodeValue;
- }
- c = c.nextSibling;
- }
- return text;
- }
-
- function combineDefines(combine, name, e, siblings) {
- // combineDefines is called often enough that there can only be one
- // other element with the same name
- var i, ce;
- for (i = 0; siblings && i < siblings.length; i += 1) {
- ce = siblings[i];
- if (ce.name === "define" && ce.a && ce.a.name === name) {
- ce.e = [ { name: combine, e: ce.e.concat(e) } ];
- return ce;
- }
- }
- return null;
- }
-
- parse = function parse(element, elements, siblings) {
- // parse all elements from the Relax NG namespace into JavaScript
- // objects
- var e = [],
- /**@type{Object}*/a,
- ce,
- i, text, name = element.localName, names = [];
- a = copyAttributes(element.attributes, name, names);
- a.combine = a.combine || undefined;
- text = parseChildren(element.firstChild, e, elements, names);
-
- // 4.2 strip leading and trailing whitespace
- if (name !== "value" && name !== "param") {
- text = /^\s*([\s\S]*\S)?\s*$/.exec(text)[1];
- }
- // 4.3 datatypeLibrary attribute
- // 4.4 type attribute of value element
- if (name === "value" && a.type === undefined) {
- a.type = "token";
- a.datatypeLibrary = "";
- }
- // 4.5 href attribute
- // 4.6 externalRef element
- // 4.7 include element
- // 4.8 name attribute of element and attribute elements
- if ((name === "attribute" || name === "element") &&
- a.name !== undefined) {
- i = splitQName(a.name);
- e = [{name: "name", text: i[1], a: {ns: i[0]}}].concat(e);
- delete a.name;
- }
- // 4.9 ns attribute
- if (name === "name" || name === "nsName" || name === "value") {
- if (a.ns === undefined) {
- a.ns = ""; // TODO
- }
- } else {
- delete a.ns;
- }
- // 4.10 QNames
- if (name === "name") {
- i = splitQName(text);
- a.ns = i[0];
- text = i[1];
- }
- // 4.11 div element
- // 4.12 Number of child elements
- if (e.length > 1 && (name === "define" || name === "oneOrMore" ||
- name === "zeroOrMore" || name === "optional" ||
- name === "list" || name === "mixed")) {
- e = [{name: "group", e: splitToDuos({name: "group", e: e}).e}];
- }
- if (e.length > 2 && name === "element") {
- e = [e[0]].concat(
- {name: "group", e: splitToDuos(
- {name: "group", e: e.slice(1)}).e});
- }
- if (e.length === 1 && name === "attribute") {
- e.push({name: "text", text: text});
- }
- // if node has only one child, replace node with child
- if (e.length === 1 && (name === "choice" || name === "group" ||
- name === "interleave")) {
- name = e[0].name;
- names = e[0].names;
- a = e[0].a;
- text = e[0].text;
- e = e[0].e;
- } else if (e.length > 2 && (name === "choice" || name === "group" ||
- name === "interleave")) {
- e = splitToDuos({name: name, e: e}).e;
- }
- // 4.13 mixed element
- if (name === "mixed") {
- name = "interleave";
- e = [ e[0], { name: "text" } ];
- }
- // 4.14 optional element
- if (name === "optional") {
- name = "choice";
- e = [ e[0], { name: "empty" } ];
- }
- // 4.15 zeroOrMore element
- if (name === "zeroOrMore") {
- name = "choice";
- e = [ {name: "oneOrMore", e: [ e[0] ] }, { name: "empty" } ];
- }
- // 4.17 combine attribute
- if (name === "define" && a.combine) {
- ce = combineDefines(a.combine, a.name, e, siblings);
- if (ce) {
- return;
- }
- }
-
- // create the definition
- ce = { name: name };
- if (e && e.length > 0) { ce.e = e; }
- for (i in a) {
- if (a.hasOwnProperty(i)) {
- ce.a = a;
- break;
- }
- }
- if (text !== undefined) { ce.text = text; }
- if (names && names.length > 0) { ce.names = names; }
-
- // part one of 4.19
- if (name === "element") {
- ce.id = elements.length;
- elements.push(ce);
- ce = { name: "elementref", id: ce.id };
- }
- return ce;
- };
-
- function resolveDefines(def, defines) {
- var i = 0, e, defs, end, name = def.name;
- while (def.e && i < def.e.length) {
- e = def.e[i];
- if (e.name === "ref") {
- defs = defines[e.a.name];
- if (!defs) {
- throw e.a.name + " was not defined.";
- }
- end = def.e.slice(i + 1);
- def.e = def.e.slice(0, i);
- def.e = def.e.concat(defs.e);
- def.e = def.e.concat(end);
- } else {
- i += 1;
- resolveDefines(e, defines);
- }
- }
- e = def.e;
- // 4.20 notAllowed element
- // 4.21 empty element
- if (name === "choice") {
- if (!e || !e[1] || e[1].name === "empty") {
- if (!e || !e[0] || e[0].name === "empty") {
- delete def.e;
- def.name = "empty";
- } else {
- e[1] = e[0];
- e[0] = { name: "empty" };
- }
- }
- }
- if (name === "group" || name === "interleave") {
- if (e[0].name === "empty") {
- if (e[1].name === "empty") {
- delete def.e;
- def.name = "empty";
- } else {
- name = def.name = e[1].name;
- def.names = e[1].names;
- e = def.e = e[1].e;
- }
- } else if (e[1].name === "empty") {
- name = def.name = e[0].name;
- def.names = e[0].names;
- e = def.e = e[0].e;
- }
- }
- if (name === "oneOrMore" && e[0].name === "empty") {
- delete def.e;
- def.name = "empty";
- }
- // for attributes we need to have the list of namespaces and
- // localnames readily available, so we split up the qnames
- if (name === "attribute") {
- splitQNames(def);
- }
- // for interleaving validation, it is convenient to join all
- // interleave elements that touch into one element
- if (name === "interleave") {
- // at this point the interleave will have two child elements,
- // but the child interleave elements may have a different number
- if (e[0].name === "interleave") {
- if (e[1].name === "interleave") {
- e = def.e = e[0].e.concat(e[1].e);
- } else {
- e = def.e = [e[1]].concat(e[0].e);
- }
- } else if (e[1].name === "interleave") {
- e = def.e = [e[0]].concat(e[1].e);
- }
- }
- }
-
- function resolveElements(def, elements) {
- var i = 0, e, name;
- while (def.e && i < def.e.length) {
- e = def.e[i];
- if (e.name === "elementref") {
- e.id = e.id || 0;
- def.e[i] = elements[e.id];
- } else if (e.name !== "element") {
- resolveElements(e, elements);
- }
- i += 1;
- }
- }
-
- /**
- * @param {!Document} dom
- * @param {!Function} callback
- * @return {?Array}
- */
- function main(dom, callback) {
- var elements = [],
- grammar = parse(dom && dom.documentElement, elements, undefined),
- i, e, defines = {};
-
- for (i = 0; i < grammar.e.length; i += 1) {
- e = grammar.e[i];
- if (e.name === "define") {
- defines[e.a.name] = e;
- } else if (e.name === "start") {
- start = e;
- }
- }
- if (!start) {
- return [new RelaxNGParseError(
- "No Relax NG start element was found.")];
- }
- resolveDefines(start, defines);
- for (i in defines) {
- if (defines.hasOwnProperty(i)) {
- resolveDefines(defines[i], defines);
- }
- }
- for (i = 0; i < elements.length; i += 1) {
- resolveDefines(elements[i], defines);
- }
- if (callback) {
- self.rootPattern = callback(start.e[0], elements);
- }
- resolveElements(start, elements);
- for (i = 0; i < elements.length; i += 1) {
- resolveElements(elements[i], elements);
- }
- self.start = start;
- self.elements = elements;
- self.nsmap = nsmap;
- return null;
- }
- /**
- * @param {!Document} dom
- * @param {!Function} callback
- * @return {?Array}
- */
- this.parseRelaxNGDOM = main;
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/XPath.js b/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/XPath.js
deleted file mode 100644
index 28466c21848..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/lib/xmldom/XPath.js
+++ /dev/null
@@ -1,383 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global xmldom, XPathResult, runtime*/
-/**
- * Wrapper for XPath functions
- * @constructor
- */
-xmldom.XPath = (function () {
- "use strict";
- var createXPathPathIterator,
- parsePredicates;
- /**
- * @param {!number} a
- * @param {!number} b
- * @param {!number} c
- * @return {!boolean}
- */
- function isSmallestPositive(a, b, c) {
- return a !== -1 && (a < b || b === -1) && (a < c || c === -1);
- }
- /**
- * Parse a subset of xpaths.
- * The xpath predicates may contain xpaths. The location may be equated to
- * a value. If a parsing error occurs, null is returned.
- * @param {!string} xpath
- * @param {!number} pos
- * @param {!number} end
- * @param {!Array} steps
- * @return {!number}
- */
- function parseXPathStep(xpath, pos, end, steps) {
- var location = "",
- predicates = [],
- value,
- brapos = xpath.indexOf('[', pos),
- slapos = xpath.indexOf('/', pos),
- eqpos = xpath.indexOf('=', pos),
- depth = 0,
- start = 0;
- // parse the location
- if (isSmallestPositive(slapos, brapos, eqpos)) {
- location = xpath.substring(pos, slapos);
- pos = slapos + 1;
- } else if (isSmallestPositive(brapos, slapos, eqpos)) {
- location = xpath.substring(pos, brapos);
- pos = parsePredicates(xpath, brapos, predicates);
- } else if (isSmallestPositive(eqpos, slapos, brapos)) {
- location = xpath.substring(pos, eqpos);
- pos = eqpos;
- } else {
- location = xpath.substring(pos, end);
- pos = end;
- }
- steps.push({location: location, predicates: predicates});
- return pos;
- }
- function parseXPath(xpath) {
- var steps = [],
- p = 0,
- end = xpath.length,
- value;
- while (p < end) {
- p = parseXPathStep(xpath, p, end, steps);
- if (p < end && xpath[p] === '=') {
- value = xpath.substring(p + 1, end);
- if (value.length > 2 &&
- (value[0] === '\'' || value[0] === '"')) {
- value = value.slice(1, value.length - 1);
- } else {
- try {
- value = parseInt(value, 10);
- } catch (e) {
- }
- }
- p = end;
- }
- }
- return {steps: steps, value: value};
- }
- parsePredicates = function parsePredicates(xpath, start, predicates) {
- var pos = start,
- l = xpath.length,
- selector,
- depth = 0;
- while (pos < l) {
- if (xpath[pos] === ']') {
- depth -= 1;
- if (depth <= 0) {
- predicates.push(parseXPath(xpath.substring(start, pos)));
- }
- } else if (xpath[pos] === '[') {
- if (depth <= 0) {
- start = pos + 1;
- }
- depth += 1;
- }
- pos += 1;
- }
- return pos;
- };
- /**
- * Iterator over nodes uses in the xpath implementation
- * @class
- * @interface
- */
- function XPathIterator() {}
- /**
- * @return {Node}
- */
- XPathIterator.prototype.next = function () {};
- /**
- * @return {undefined}
- */
- XPathIterator.prototype.reset = function () {};
- /**
- * @class
- * @constructor
- * @augments XPathIterator
- * @implements {XPathIterator}
- */
- function NodeIterator() {
- var node, done = false;
- this.setNode = function setNode(n) {
- node = n;
- };
- this.reset = function () {
- done = false;
- };
- this.next = function next() {
- var val = (done) ? null : node;
- done = true;
- return val;
- };
- }
- /**
- * @class
- * @constructor
- * @augments XPathIterator
- * @implements {XPathIterator}
- * @param {XPathIterator} it
- * @param {!string} namespace
- * @param {!string} localName
- */
- function AttributeIterator(it, namespace, localName) {
- this.reset = function reset() {
- it.reset();
- };
- this.next = function next() {
- var node = it.next(), attr;
- while (node) {
- node = node.getAttributeNodeNS(namespace, localName);
- if (node) {
- return node;
- }
- node = it.next();
- }
- return node;
- };
- }
- /**
- * @class
- * @constructor
- * @augments XPathIterator
- * @implements {XPathIterator}
- * @param {XPathIterator} it
- * @param {boolean} recurse
- */
- function AllChildElementIterator(it, recurse) {
- var root = it.next(),
- node = null;
- this.reset = function reset() {
- it.reset();
- root = it.next();
- node = null;
- };
- this.next = function next() {
- while (root) {
- if (node) {
- if (recurse && node.firstChild) {
- node = node.firstChild;
- } else {
- while (!node.nextSibling && node !== root) {
- node = node.parentNode;
- }
- if (node === root) {
- root = it.next();
- } else {
- node = node.nextSibling;
- }
- }
- } else {
- do {
-// node = (recurse) ?root :root.firstChild;
- node = root.firstChild;
- if (!node) {
- root = it.next();
- }
- } while (root && !node);
- }
- if (node && node.nodeType === 1) {
- return node;
- }
- }
- return null;
- };
- }
- /**
- * @class
- * @constructor
- * @augments XPathIterator
- * @implements {XPathIterator}
- * @param {XPathIterator} it
- * @param {function(Node):boolean} condition
- */
- function ConditionIterator(it, condition) {
- this.reset = function reset() {
- it.reset();
- };
- this.next = function next() {
- var n = it.next();
- while (n && !condition(n)) {
- n = it.next();
- }
- return n;
- };
- }
- /**
- * @param {XPathIterator} it
- * @param {string} name
- * @param {function(string):string} namespaceResolver
- * @return {!ConditionIterator}
- */
- function createNodenameFilter(it, name, namespaceResolver) {
- var s = name.split(':', 2),
- namespace = namespaceResolver(s[0]),
- localName = s[1];
- return new ConditionIterator(it, function (node) {
- return node.localName === localName &&
- node.namespaceURI === namespace;
- });
- }
- /**
- * @param {XPathIterator} it
- * @param {!Object} p
- * @param {function(string):string} namespaceResolver
- * @return {!ConditionIterator}
- */
- function createPredicateFilteredIterator(it, p, namespaceResolver) {
- var nit = new NodeIterator(),
- pit = createXPathPathIterator(nit, p, namespaceResolver),
- value = p.value;
- if (value === undefined) {
- return new ConditionIterator(it, function (node) {
- nit.setNode(node);
- pit.reset();
- return pit.next();
- });
- }
- return new ConditionIterator(it, function (node) {
- nit.setNode(node);
- pit.reset();
- var n = pit.next();
- // todo: distinuish between number and string
- return n && n.nodeValue === value;
- });
- }
- /**
- * @param {!XPathIterator} it
- * @param {!Object} xpath
- * @param {!Function} namespaceResolver
- * @return {!XPathIterator}
- */
- createXPathPathIterator = function createXPathPathIterator(it, xpath,
- namespaceResolver) {
- var i, j, step, location, namespace, localName, prefix, p;
- for (i = 0; i < xpath.steps.length; i += 1) {
- step = xpath.steps[i];
- location = step.location;
- if (location === "") {
- it = new AllChildElementIterator(it, false);
- } else if (location[0] === '@') {
- p = location.slice(1).split(":", 2);
- it = new AttributeIterator(it, namespaceResolver(p[0]), p[1]);
- } else if (location !== ".") {
- it = new AllChildElementIterator(it, false);
- if (location.indexOf(":") !== -1) {
- it = createNodenameFilter(it, location, namespaceResolver);
- }
- }
- for (j = 0; j < step.predicates.length; j += 1) {
- p = step.predicates[j];
- it = createPredicateFilteredIterator(it, p, namespaceResolver);
- }
- }
- return it;
- };
- /**
- * @param {!Element} node
- * @param {!string} xpath
- * @param {!Function} namespaceResolver
- * @return {!Array.<Element>}
- */
- function fallback(node, xpath, namespaceResolver) {
- var it = new NodeIterator(),
- i,
- nodelist,
- parsedXPath,
- pos;
- it.setNode(node);
- parsedXPath = parseXPath(xpath);
- it = createXPathPathIterator(it, parsedXPath, namespaceResolver);
- nodelist = [];
- i = it.next();
- while (i) {
- nodelist.push(i);
- i = it.next();
- }
- return nodelist;
- }
- /**
- * @param {!Element} node
- * @param {!string} xpath
- * @param {!Function} namespaceResolver
- * @return {!Array.<Element>}
- */
- function getODFElementsWithXPath(node, xpath, namespaceResolver) {
- var doc = node.ownerDocument,
- nodes,
- elements = [],
- n = null;
- if (!doc || !doc.evaluate || !n) {
- elements = fallback(node, xpath, namespaceResolver);
- } else {
- nodes = doc.evaluate(xpath, node, namespaceResolver,
- XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null);
- n = nodes.iterateNext();
- while (n !== null) {
- if (n.nodeType === 1) {
- elements.push(n);
- }
- n = nodes.iterateNext();
- }
- }
- return elements;
- }
- /**
- * @constructor
- */
- xmldom.XPath = function XPath() {
- this.getODFElementsWithXPath = getODFElementsWithXPath;
- };
- return xmldom.XPath;
-}());
diff --git a/apps/files_odfviewer/src/webodf/webodf/misctests/carettest.html b/apps/files_odfviewer/src/webodf/webodf/misctests/carettest.html
deleted file mode 100644
index fc7f84c9266..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/misctests/carettest.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<html>
- <head>
- <title></title>
- </head>
- <body onload="test()">
- <script>
-function init() {
- var p = document.createElement("p");
- p.appendChild(document.createTextNode("MMMMM MMMMM MMMMM MMMMM MMMMM"));
- p.style.width = "5em";
- p.style.border = "1px solid black";
-// p.contentEditable = true;
- document.body.insertBefore(p, null);
- return p;
-}
-function listenEvent(eventTarget, eventType, eventHandler) {
- if (eventTarget.addEventListener) {
- eventTarget.addEventListener(eventType, eventHandler, false);
- } else if (eventTarget.attachEvent) {
- eventType = "on" + eventType;
- eventTarget.attachEvent(eventType, eventHandler);
- } else {
- eventTarget["on" + eventType] = eventHandler;
- }
-}
-function simulateKeyEvent(target, type, keyCode) {
- var customEvent = null,
- bubbles = true,
- cancelable = true,
- view = window,
- ctrlKey = false,
- altKey = false,
- shiftKey = false,
- metaKey = false,
- charCode = keyCode;
- if (document.createEvent) {
- try {
- customEvent = document.createEvent("KeyEvents");
- customEvent.initKeyEvent(type, bubbles, cancelable, view, ctrlKey,
- altKey, shiftKey, metaKey, keyCode, charCode);
- } catch (ex) {
- try {
- customEvent = document.createEvent("Events");
- } catch (uierror) {
- customEvent = document.createEvent("UIEvents");
- } finally {
- customEvent.initEvent(type, bubbles, cancelable);
- customEvent.view = view;
- customEvent.altKey = altKey;
- customEvent.ctrlKey = ctrlKey;
- customEvent.shiftKey = shiftKey;
- customEvent.metaKey = metaKey;
- customEvent.keyCode = keyCode;
- customEvent.charCode = charCode;
- }
- }
- target.dispatchEvent(customEvent);
- } else {
- alert('ze problem');
- }
-}
-function moveDown(target) {
- var evt;// = document.createEvent("KeyboardEvent");
-// evt.initKeyEvent("keypress", true, true, null, false, false, false, false, 40, 0);
-// target.dispatchEvent(evt);
-/*
- evt = document.createEvent("KeyboardEvent");
- //evt = document.createEvent("KeyEvents");
- evt.initKeyEvent("keypress", true, true, target.ownerDocument.defaultView, false, false, false, false, 9, 0);
- target.dispatchEvent(evt);
-*/
- evt = document.createEvent("KeyboardEvent");
- evt.initKeyEvent("keypress", true, true, null, false, false, false, false, 0x23, 0);
- target.dispatchEvent(evt);
-
-}
-function moveDownOpera(target) {
- var evt = document.createEvent("UIEvents");
- evt.initUIEvent("keypress", true, true, window, 1);
- target.keyCode = 8;
- target.charCode = 0;
- target.dispatchEvent(evt);
-alert(evt);
-}
-
-function mouseclick() {
- var selection = window.getSelection(),
- r = selection.getRangeAt(0);
- alert(r.startOffset);
-}
-
-function test() {
- var p = init(),
- selection = window.getSelection(),
- range;
-
- // put caret at the start of the document
- selection.removeAllRanges();
- range = p.ownerDocument.createRange();
- range.setStart(p.firstChild, 8);
- range.collapse(true);
- selection.addRange(range);
-
- listenEvent(document, "keydown", show);
- listenEvent(document, "mouseup", mouseclick);
-
- // move the caret down
- if (selection.modify) {
- selection.modify("move", "forward", "line");
- } else {
-// moveDown(p);
- moveDownOpera(p);
-// simulateKeyEvent(p, "keypress", 40);
-// simulateKeyEvent(p, "keypress", 39);
-// simulateKeyEvent(p, "keypress", 69);
-var t = "";
-for (var i in selection) {
- t += i + " ";
-}
-//alert(t);
- }
- alert("'" + selection.getRangeAt(0).startOffset + "' ");
-
-}
-function show(e) {
-var t = "";
-for (var i in e) {
- t += i + " ";
-}
-//alert(t);
- alert("code: " + e.charCode + " key: " + e.keyCode + ' ');
-}
- </script>
- </body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/webodf/misctests/selection.html b/apps/files_odfviewer/src/webodf/webodf/misctests/selection.html
deleted file mode 100644
index d758237f396..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/misctests/selection.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<html>
- <head><title></title>
-<script>
-window.onload = function () {
- var selection = window.getSelection(),
- p = document.createElement("p"),
- textnode = document.createTextNode("hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello hello "),
- range;
-
- document.body.appendChild(p);
- p.appendChild(textnode);
- selection.removeAllRanges();
- range = document.createRange();
- range.setStart(textnode, 1);
- selection.removeAllRanges();
- selection.addRange(range);
-
-selection.modify("move", "forward", "line");
-
-alert(selection.rangeCount + " " + selection.getRangeAt(0).startOffset);
-}
-</script>
- </head>
- <body>
- </body>
-</html>
-
diff --git a/apps/files_odfviewer/src/webodf/webodf/misctests/testselection.html b/apps/files_odfviewer/src/webodf/webodf/misctests/testselection.html
deleted file mode 100644
index 28ff15889b0..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/misctests/testselection.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head><title></title>
-<script>
-function log(message) {
- document.body.appendChild(document.createTextNode(message));
-}
-
-window.onload = function () {
- if (!document.createElementNS) {
- log("Error: there is no function 'document.createElementNS'.");
- return;
- }
- if (!window.getSelection) {
- log("Error: there is no function 'window.getSelection'.");
- return;
- }
- var testarea = document.getElementById("testarea"),
- selection = window.getSelection(),
- p = document.createElementNS("http://www.w3.org/1999/xhtml", "p"),
- text = document.createTextNode("hello");
- testarea.appendChild(p);
- p.appendChild(text);
- selection.removeAllRanges();
- if (selection.rangeCount !== 0) {
- log("Error: not all ranges were removed.");
- return;
- }
-
- var range = document.createRange();
- range.setStart(p, 0);
- range.setEnd(p, 0);
- if (range.startContainer !== p) {
- log("Error: the start of the range was not correct.");
- return;
- }
- selection.addRange(range);
-
- if (selection.rangeCount === 0) {
- log("Error: no range was added to the selection.");
- return;
- }
- if (selection.rangeCount > 1) {
- log("Error: there are too many ranges in the selection.");
- return;
- }
- if (selection.getRangeAt(0).startContainer !== p) {
- log("Error: the start of the selection is not the right element." +
- "It is " + selection.getRangeAt(0).startContainer.nodeName +
- " instead of " + p.nodeName + ".");
- return;
- }
- log("Success: selection test worked without error.");
-}
-</script>
- </head>
- <body>
-<div id="testarea"></div>
- </body>
-</html>
-
diff --git a/apps/files_odfviewer/src/webodf/webodf/misctests/testzip.js b/apps/files_odfviewer/src/webodf/webodf/misctests/testzip.js
deleted file mode 100644
index bd57807bf52..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/misctests/testzip.js
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime core*/
-runtime.loadClass("core.Zip");
-runtime.loadClass("core.Async");
-
-var async = new core.Async();
-
-/**
- * @param {!core.Zip.ZipEntry} entry
- * @param {!core.Zip} zip
- * @param {function(?string):undefined} callback
- * @return {undefined}
- */
-function copyEntry(entry, zip, callback) {
- entry.load(function (err, data) {
- if (err) {
- callback(err);
- } else {
- zip.save(entry.filename, data, false, entry.date);
- callback(null);
- }
- });
-}
-
-/**
- * @param {!core.Zip} zipa
- * @param {!core.Zip} zipb
- * @param {function(?string):undefined} callback
- * @return {undefined}
- */
-function compareZips(zipa, zipb, callback) {
- var entriesa = zipa.getEntries(),
- l = entriesa.length,
- entriesb = zipb.getEntries(),
- i,
- j,
- entrya,
- entryb;
- // compare the number of entries
- if (entriesb.length !== l) {
- callback("Number of entries is not equal.");
- return;
- }
- // compare the meta data of the entries
- for (i = 0; i < l; i += 1) {
- entrya = entriesa[i];
- for (j = 0; j < l; j += 1) {
- entryb = entriesb[j];
- if (entrya.filename === entryb.filename) {
- break;
- }
- }
- if (j === l) {
- callback("Entry " + entrya.filename + " is not present in the " +
- "second zip file.");
- return;
- }
- if (entrya.date.valueOf() !== entryb.date.valueOf()) {
- callback("Dates for entry " + entrya.filename + " is not equal: " +
- entrya.date + " vs " + entryb.date);
- return;
- }
- }
- // compare the data in the entries
- async.forEach(entriesa, function (entry, callback) {
- entry.load(function (err, dataa) {
- if (err) {
- callback(err);
- return;
- }
- zipb.load(entry.filename, function (err, datab) {
- if (err) {
- callback(err);
- return;
- }
- var i = 0, l = dataa.length;
- if (dataa !== datab) {
- for (i = 0; i < l && dataa[i] === datab[i];) {
- i += 1;
- }
- callback("Data is not equal for " + entry.filename +
- " at position " + i + ": " + dataa.charCodeAt(i) +
- " vs " + datab.charCodeAt(i) + ".");
- } else {
- callback(null);
- }
- });
- });
- }, function (err) {
- callback(err);
- });
-}
-
-function testZip(filepatha, callback) {
- var zipa = new core.Zip(filepatha, function (err, zipa) {
- if (err) {
- runtime.log(err);
- runtime.exit(1);
- return;
- }
- // open a new zip file and copy all entries from zipa to zipb
- var filepathb = "tmp323.zip",
- zipb = new core.Zip(filepathb, null),
- entries = zipa.getEntries(),
- i,
- entriesDone = 0;
- async.forEach(entries, function (entry, callback) {
- copyEntry(entry, zipb, callback);
- }, function (err) {
- if (err) {
- callback(err);
- return;
- }
- zipb.write(function (err) {
- if (err) {
- callback(err);
- return;
- }
- zipb = new core.Zip(filepathb, function (err, zipb) {
- if (err) {
- callback(err);
- return;
- }
- compareZips(zipa, zipb, callback);
- });
- });
- });
- });
-}
-
-var args = arguments;
-// open the arguments one by one, save them to a file, then open again and see
-// if the contents matches
-function doit(i) {
- if (i >= args.length) {
- return;
- }
- testZip(args[i], function (err) {
- runtime.log(args[i]);
- if (err) {
- runtime.log(err);
- return;
- }
- i += 1;
- if (i < args.length) {
- doit(i);
- }
- });
-}
-doit(1);
diff --git a/apps/files_odfviewer/src/webodf/webodf/misctests/writetest.zip b/apps/files_odfviewer/src/webodf/webodf/misctests/writetest.zip
deleted file mode 100644
index 69a14abc26f..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/misctests/writetest.zip
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/webodf/notes b/apps/files_odfviewer/src/webodf/webodf/notes
deleted file mode 100644
index f21a7c3fdd5..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/notes
+++ /dev/null
@@ -1,137 +0,0 @@
-XMLModel:
- - list of all possible QNames
- - list of valid attributes for each QName
- - node walker positions
- - knowledge about where whitespace is meaningfull
-
-
-
-
-xmledit
- - receives mouse and keyboard events
- - simple editing
- - inputs that might be interpreted higher up
-
-Tools:
-
-Features we want:
- - ability to run code from Rhine, Node.JS and browsers
- - type checking
- - sanity checking
- - javascript compilation
- - unit tests
- - unit test code coverage
-
-
-Closure seems a nice compiler. It should be optional.
-Unit testing should be as simple as doing a reload in a browser or calling a single command from the command-line.
-
-The only fundamental problem is the method of resolving dependencies. Closure does not understand require() commands that load modules. However, Node.JS needs this command to load modules.
-
-If require("mypackage.MyClass") would return just the class if it was already loaded, that would be perfect. Using eval() would solve this:
- function require(module) {
- var m;
- try {
- m = eval(module);
- } catch (e) {
- }
- if (m === undefined) {
- // load the module
- }
- }
-
-But then how to adapt the code in the modules themselves? Currenlty, no global objects are defined, but symbols are added to the exports variable.
-Suppose that ideal javascript modules each define one class, then the code for class a.b.Class would be stored in the file a/b/Class.js and would look like this:
-====
-a.b.Class = function () {
-};
-====
-If this code should be loaded as a module, it should be executed with eval(). The environment in which the code is executed should already have 'package' a.b.
-
-function runModuleCode(modulename, code) {
- var names = modulename.split("."),
- evalcode;
- if (!eval("typeof " + names[0] + " === 'undefined'")) {
- }
- evalcode = "if (typeof " + names[0] + " === 'undefined') {" +
-
- if
-}
-
-function loadClass(modulename) {
- // test if class already exists
- var names = modulename.split("."),
- evalcode, constructor;
- evalcode = "(typeof " + names[0] + " !== 'undefined' ")
-
-
-var code = "";
-if (typeof a === "undefined") {
- code = code + "var a = {};";
- if (!eval(
-
-
-Node does not have global context in eval() it seems.
-
-
-
-Running unit tests should be possible in a number of ways:
- - single tests in
- * browser
- * browser with code coverage
- * browser from js compiled with Closure Compiler
- * node.js
- * rhino
- -
-
-
----
-
-
-Caret should work like a cursor.
-It should use the contentEditable property to advance the cursor within one text node.
-
-Isn't the current cursor sufficient? All that is missing is to use the native display when it is a text node.
-
-Using the contentEditable means that the cursor code can be simplified quite a bit if you want to
-
-
-If the caret is in a text node, moving should be done by passing a move signal to the system.
-After the move it should be checked if the move made sense, i.e. if the caret is in an allowed position. If it is not, the position should be corrected manually.
-
-Determining if a caret is in a legal position is done with a special class.
-
-The current players:
- - core.Cursor : insert a caret in the text if the selection calls for it
- - gui.XMLEdit :
- - ...: moving of the cursor, taking into account skipping over/ignoring the cursor itself and also taking into account that the caret in an editable text must be moved by the browser
-
-move the cursor in a simple document with a wrapped text
-
-
-Contenteditable is perhaps not strictly necessary. It does not work well across browsers anyway. The only reason to use it would be to have a nice way to move the cursor up or down a line.
-
-To move the cursor or selection, a special class is needed for determining how to modify the selection upon different inputs. The visualization of the cursor is handled by the cursor class.
-
-stepForward
-stepBackward
-setPoint
-
-----
-
-Cursor and selection:
- - cursor is foreign element of height but with no width
- - handle mouse event to move or place the cursor at the right position
- - handle key events to move the cursor
-
-webkit has nice functions for manipulating the selection
-selection/cursor position is the 'real' thing, the cursor (visible or not) is just the visualization
-
-The cursor must appear invisible to the normal dom functions, this is tricky because a cursor may split a text. This is however a separate concern.
-
-So there should be an event handler that translates mouse and key events into api calls. There already is moving of the cursor/selection on mouse events in Firefox and WebKit so only keyboard events need to be handled. So core.Cursor.updateToSelection should work ok for mouse events.
-
-Should we re-evaluate the use of JQuery? NO! first add editing functions to WebODF.
-
-So current top priorities: moving the cursor and saving.
-And not in the general xml editor, but in the odf editor.
diff --git a/apps/files_odfviewer/src/webodf/webodf/odf.html b/apps/files_odfviewer/src/webodf/webodf/odf.html
deleted file mode 100644
index 3abbf96ff74..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/odf.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
- <style type="text/css" media="screen">
- body, html, div {
- padding: 0px;
- margin: 0px;
- border: 0px;
- }
- body, html {
- height: 100%;
- text-align: center;
- }
- html > body {
- background: black;
- }
- </style>
- <link rel="stylesheet" type="text/css" href="webodf.css"/>
- <script src="lib/runtime.js" type="text/javascript" charset="utf-8"></script>
- <script type="text/javascript" charset="utf-8">
-function init() {
- runtime.loadClass("odf.OdfCanvas");
- // if the url has a fragment (#...), try to load the file it represents
- var location = String(document.location),
- pos = location.indexOf('#'),
- odfelement = document.getElementById("odf");
- document.odfcanvas = new odf.OdfCanvas(odfelement);
- if (pos === -1 || !window) {
- return;
- }
- location = location.substr(pos + 1);
- document.odfcanvas.load(location);
-}
-window.setTimeout(init, 1);
- </script>
- <title></title>
-</head>
-
-<body>
- <div id="odf"/>
-</body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/webodf/odfedit.html b/apps/files_odfviewer/src/webodf/webodf/odfedit.html
deleted file mode 100644
index d4a5b53870d..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/odfedit.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
- <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css"/>
- <style type="text/css" media="screen">
- body { background: #dddddd;}
- div#odf { margin: 10px; padding; 10px; border: 1px solid black; }
- span { border: 1px solid black; }
- body > div > span { cursor: pointer; }
- body > div > span:hover { background: white; }
- body > div > span:active { background: #dddddd; }
- </style>
- <!-- requirements -->
- <script src="extjs/adapter/ext/ext-base.js" type="text/javascript" charset="utf-8"></script>
- <script src="extjs/ext-all-debug.js" type="text/javascript" charset="utf-8"></script>
- <script src="lib/runtime.js" type="text/javascript" charset="utf-8"></script>
- <!-- application -->
- <script src="odfedit.js" type="text/javascript" charset="utf-8"></script>
-
- <title id="page-title">WebODF</title>
- <link rel="stylesheet" type="text/css" href="webodf.css"/>
-</head>
-<body>
-</body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/webodf/odfedit.js b/apps/files_odfviewer/src/webodf/webodf/odfedit.js
deleted file mode 100644
index 6dfc1cddac3..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/odfedit.js
+++ /dev/null
@@ -1,314 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, document: true, odf: true, window: true, Ext: true*/
-/**
- * @type {odf.OdfCanvas}
- */
-var odfcanvas;
-
-/**
- * @return {undefined}
- */
-function fixExtJSCSS() {
- "use strict";
- // look through all stylesheets to change the selector
- // ".x-viewport, .x-viewport body"
- // to
- // ".x-viewport, .x-viewport > body"
- // The normal selector os not specific enough, office|body is also affected
- // by it. To avoid this, the selector is changed so that is only applies to
- // a director parent child relationship with '>'
- var i, cssRules, j, rule;
- for (i = 0; i < document.styleSheets.length; i += 1) {
- cssRules = document.styleSheets[i].cssRules;
- for (j = 0; j < cssRules.length; j += 1) {
- rule = cssRules[j];
- if (rule.selectorText === ".x-viewport, .x-viewport body") {
- rule = rule.cssText.replace(".x-viewport, .x-viewport body",
- ".x-viewport, .x-viewport > body");
- document.styleSheets[i].deleteRule(j);
- document.styleSheets[i].insertRule(rule, j);
- return;
- }
- }
- }
-}
-/**
- * @return {undefined}
- */
-function updateStyleComboBox() {
- "use strict";
- var paragraphStylesBox = document.getElementById("paragraphStyleBox");
-}
-/**
- * @param {!Element} odfelement
- * @return {undefined}
- */
-function initCanvas(odfelement) {
- "use strict";
- runtime.loadClass("odf.OdfCanvas");
- // if the url has a fragment (#...), try to load the file it represents
- var location = String(document.location),
- pos = location.indexOf('#');
-// odfelement.style.overflow = 'auto';
- odfelement.style.height = '100%';
- odfcanvas = new odf.OdfCanvas(odfelement);
- if (pos === -1 || !window) {
- return;
- }
- location = location.substr(pos + 1);
- odfcanvas.onstatereadychange = function () {
- /*
- updateStyleComboBox();
- odfcanvas.save(function (err) {
- alert(err);
- });
- */
- };
- odfcanvas.load(location);
- odfcanvas.addListener("selectionchange", function (element, selection) {
- var formatting = odfcanvas.getFormatting(),
- completelyBold = formatting.isCompletelyBold(selection),
- alignment = formatting.getAlignment(selection);
- runtime.log("selection changed " + completelyBold + " " + alignment);
- });
-}
-/**
- * @return {undefined}
- */
-function save() {
- "use strict";
- odfcanvas.odfContainer().save(function (err) {
- if (err) {
- runtime.log(err);
- }
- });
-}
-Ext.ODFEditor = Ext.extend(Ext.component.Component, {
- buttonTips : {
- bold : {
- title: 'Bold (Ctrl+B)',
- text: 'Make the selected text bold.',
- cls: 'x-html-editor-tip'
- },
- italic : {
- title: 'Italic (Ctrl+I)',
- text: 'Make the selected text italic.',
- cls: 'x-html-editor-tip'
- },
- underline : {
- title: 'Underline (Ctrl+U)',
- text: 'Underline the selected text.',
- cls: 'x-html-editor-tip'
- },
- increasefontsize : {
- title: 'Grow Text',
- text: 'Increase the font size.',
- cls: 'x-html-editor-tip'
- },
- decreasefontsize : {
- title: 'Shrink Text',
- text: 'Decrease the font size.',
- cls: 'x-html-editor-tip'
- },
- backcolor : {
- title: 'Text Highlight Color',
- text: 'Change the background color of the selected text.',
- cls: 'x-html-editor-tip'
- },
- forecolor : {
- title: 'Font Color',
- text: 'Change the color of the selected text.',
- cls: 'x-html-editor-tip'
- },
- justifyleft : {
- title: 'Align Text Left',
- text: 'Align text to the left.',
- cls: 'x-html-editor-tip'
- },
- justifycenter : {
- title: 'Center Text',
- text: 'Center text in the editor.',
- cls: 'x-html-editor-tip'
- },
- justifyright : {
- title: 'Align Text Right',
- text: 'Align text to the right.',
- cls: 'x-html-editor-tip'
- },
- insertunorderedlist : {
- title: 'Bullet List',
- text: 'Start a bulleted list.',
- cls: 'x-html-editor-tip'
- },
- insertorderedlist : {
- title: 'Numbered List',
- text: 'Start a numbered list.',
- cls: 'x-html-editor-tip'
- },
- createlink : {
- title: 'Hyperlink',
- text: 'Make the selected text a hyperlink.',
- cls: 'x-html-editor-tip'
- },
- sourceedit : {
- title: 'Source Edit',
- text: 'Switch to source editing mode.',
- cls: 'x-html-editor-tip'
- },
- save : {
- title: 'Save (Ctrl+S)',
- text: 'Save the document.',
- cls: 'x-html-editor-tip'
- }
- }
-});
-
-
-var ODFEditor = Ext.extend(Ext.Panel, {
- initComponent: function () {
- "use strict";
- var me = this,
- statusMessage = new Ext.Toolbar.TextItem('');
- function buttonHandler(button, event) {
- }
- me.defaults = {
- };
- me.initialConfig = Ext.apply({
- }, me.initialConfig);
- me.items = [{
- xtype: 'box',
- id: 'canvas',
- autoEl: {
- tag: 'div',
- frameBorder: 0,
- style: {
- border: '0 none'
- }
- },
- autoScroll: true,
- scroll: true
- }];
- me.tbar = {
- xtype: 'toolbar',
- items: [{
- xtype: 'button',
- icon: 'extjs/examples/shared/icons/save.gif',
- handler: buttonHandler,
- cls: 'x-btn-icon'
- }, {
- xtype: 'tbseparator'
- }, {
- tag: 'select',
- //html: this.createFontOptions()
- cls: 'x-font-select'
- }, {
- xtype: 'buttongroup',
- cls: 'x-html-editor-tb',
- frame: false,
- items: [{
- xtype: 'button',
- iconCls: 'x-edit-bold',
- cls: 'x-btn-icon'
- }, {
- xtype: 'button',
- iconCls: 'x-edit-italic',
- cls: 'x-btn-icon'
- }, {
- xtype: 'button',
- iconCls: 'x-edit-underline',
- cls: 'x-btn-icon'
- }, {
- itemId: 'forecolor',
- cls: 'x-btn-icon',
- iconCls: 'x-edit-forecolor',
- menu: { xtype: 'colormenu' }
- }, {
- itemId: 'backcolor',
- cls: 'x-btn-icon',
- iconCls: 'x-edit-backcolor',
- menu: { xtype: 'colormenu' }
- }, {
- xtype: 'button',
- iconCls: 'x-edit-justifyleft',
- cls: 'x-btn-icon'
- }, {
- xtype: 'button',
- iconCls: 'x-edit-justifycenter',
- cls: 'x-btn-icon'
- }, {
- xtype: 'button',
- iconCls: 'x-edit-justifyright',
- cls: 'x-btn-icon'
- }, {
- xtype: 'button',
- iconCls: 'x-edit-insertorderedlist',
- cls: 'x-btn-icon'
- }, {
- xtype: 'button',
- iconCls: 'x-edit-insertunorderedlist',
- cls: 'x-btn-icon'
- }]
- }, {
- xtype: 'tbfill'
- },
- statusMessage
- ]
- };
-/*
- me.bbar = {
- xtype: 'toolbar',
- items: [ {xtype: "tbfill" }, statusMessage ]
- };
-*/
- ODFEditor.superclass.initComponent.call(this);
- }
-});
-Ext.onReady(function () {
- "use strict";
- var canvas, viewport;
-
- Ext.QuickTips.init();
-
- canvas = new ODFEditor({
- region: 'center'
- });
-
- viewport = new Ext.Viewport({
- layout: 'border',
- items: [ canvas ]
- });
-
- fixExtJSCSS();
- initCanvas(Ext.getCmp('canvas').el.dom);
-});
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngToCPP.js b/apps/files_odfviewer/src/webodf/webodf/relaxngToCPP.js
deleted file mode 100644
index 064fe61b792..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngToCPP.js
+++ /dev/null
@@ -1,463 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, xmldom: true*/
-runtime.loadClass("xmldom.RelaxNGParser");
-
-var nsmap = {
- "http://purl.org/dc/elements/1.1/": "purl",
- "http://www.w3.org/1998/Math/MathML": "mathml",
- "http://www.w3.org/1999/xhtml": "xhtml",
- "http://www.w3.org/1999/xlink": "xlink",
- "http://www.w3.org/2002/xforms": "xforms",
- "http://www.w3.org/2003/g/data-view#": "dv",
- "http://www.w3.org/XML/1998/namespace": "xmlns",
- "urn:oasis:names:tc:opendocument:xmlns:animation:1.0": "animation",
- "urn:oasis:names:tc:opendocument:xmlns:chart:1.0": "chart",
- "urn:oasis:names:tc:opendocument:xmlns:config:1.0": "config",
- "urn:oasis:names:tc:opendocument:xmlns:database:1.0": "database",
- "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0": "datastyle",
- "urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0": "dr3d",
- "urn:oasis:names:tc:opendocument:xmlns:drawing:1.0": "drawing",
- "urn:oasis:names:tc:opendocument:xmlns:form:1.0": "form",
- "urn:oasis:names:tc:opendocument:xmlns:meta:1.0": "meta",
- "urn:oasis:names:tc:opendocument:xmlns:office:1.0": "office",
- "urn:oasis:names:tc:opendocument:xmlns:presentation:1.0": "presentation",
- "urn:oasis:names:tc:opendocument:xmlns:script:1.0": "script",
- "urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0": "smilc",
- "urn:oasis:names:tc:opendocument:xmlns:style:1.0": "style",
- "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0": "svgc",
- "urn:oasis:names:tc:opendocument:xmlns:table:1.0": "table",
- "urn:oasis:names:tc:opendocument:xmlns:text:1.0": "text",
- "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0": "xslfoc"
- },
- typemap = {
- "string": "const QString&",
- "NCName": "const QString&",
- "date": "const QString&",
- "time": "const QString&",
- "dateTime": "const QString&",
- "duration": "const QString&",
- "anyURI": "const QString&",
- "ID": "const QString&",
- "IDREF": "const QString&",
- "IDREFS": "const QString&",
- "QName": "const QString&",
- "token": "const QString&",
- "language": "const QString&",
- "positiveInteger": "quint32",
- "nonNegativeInteger": "quint32",
- "integer": "qint32",
- "decimal": "double"
- },
- args = arguments,
- relaxngurl = args[1],
- parser = new xmldom.RelaxNGParser(relaxngurl);
-
-function out(string) {
- "use strict";
- runtime.log(string);
-}
-function toCamelCase(s) {
- "use strict";
- var str = "", i, up = true;
- for (i = 0; i < s.length; i += 1) {
- if (up) {
- str += s.substr(i, 1).toUpperCase();
- } else {
- str += s.substr(i, 1);
- }
- up = false;
- while (/\W/.test(s.substr(i + 1, 1))) {
- up = true;
- i += 1;
- }
- }
- return str;
-}
-function getName(e) {
- "use strict";
- return toCamelCase(nsmap[e.a.ns]) + toCamelCase(e.text);
-}
-function getNames(e, names) {
- "use strict";
- if (e.name === "name") {
- names.push(e);
- } else if (e.name === "choice") {
- getNames(e.e[0], names);
- getNames(e.e[1], names);
- }
-}
-function parseAttributes(e, att) {
- "use strict";
- var i, name;
- if (e.name === "choice" || e.name === "interleave"
- || e.name === "group") {
- for (i = 0; i < e.e.length; i += 1) {
- parseAttributes(e.e[i], att);
- }
- } else if (e.name === "value") {
- att.values.push(e.text);
- } else if (e.name === "data") {
- att.types.push(e.a.type);
- } else if (e.name === "list") {
- name = null; // todo
- } else if (e.name === "empty") {
- att.empty = true;
- } else {
- runtime.log("OOPS " + e.name);
- throw null;
- }
-}
-function writeAttributeSetter(name, type, a) {
- "use strict";
- var i, s = "";
- out(" /**");
- if (a.optional) {
- out(" * Set optional attribute " + a.nsname + ".");
- } else {
- out(" * Set required attribute " + a.nsname + ".");
- }
- if (a.values.length > 0) {
- s = "Choose one of these values: '" + a.values[0] + "'";
- for (i = 1; i < a.values.length; i += 1) {
- s += ", '" + a.values[i] + "'";
- }
- out(" * " + s + ".");
- }
- out(" */");
- out(" inline void write" + name + "(" + type + " value) {");
- out(" xml->addAttribute(\"" + a.nsname + "\", value);");
- out(" }");
-}
-function writeAttribute(name, a) {
- "use strict";
- if (!a.optional) {
- return;
- }
- var i, type, done = {}, needfallback = true;
- for (i = 0; i < a.types.length; i += 1) {
- needfallback = false;
- type = typemap[a.types[i]] || a.types[i];
- if (!done.hasOwnProperty(type)) {
- done[type] = 1;
- writeAttributeSetter(name, type, a);
- }
- }
- if (a.values.indexOf("true") !== -1 && a.values.indexOf("false") !== -1 &&
- done.hasOwnProperty("bool")) {
- needfallback = false;
- writeAttributeSetter(name, "bool", a);
- }
- if (needfallback) {
- writeAttributeSetter(name, "const QString&", a);
- }
-}
-function writeOptionalAttributes(atts) {
- "use strict";
- var name;
- for (name in atts) {
- if (atts.hasOwnProperty(name)) {
- writeAttribute(name, atts[name]);
- }
- }
-}
-function writeFixedRequiredAttributes(atts) {
- "use strict";
- var name, a;
- for (name in atts) {
- if (atts.hasOwnProperty(name)) {
- a = atts[name];
- if (!a.optional && a.types.length === 0 && a.values.length === 1) {
- out(" xml->addAttribute(\"" + a.nsname + "\", \"" +
- a.values[0] + "\");");
- }
- }
- }
-}
-function getRequiredAttributeArguments(atts) {
- "use strict";
- var name, a, s = "", type;
- for (name in atts) {
- if (atts.hasOwnProperty(name)) {
- a = atts[name];
- if (!a.optional && (a.types.length > 0 || a.values.length !== 1)) {
- type = typemap[a.types[0]] || a.types[0] || "const QString&";
- if (s) {
- s += ", ";
- }
- s += type + " " + name.toLowerCase();
- }
- }
- }
- return s;
-}
-function getRequiredAttributeCall(atts) {
- "use strict";
- var name, a, s = "";
- for (name in atts) {
- if (atts.hasOwnProperty(name)) {
- a = atts[name];
- if (!a.optional && (a.types.length > 0 || a.values.length !== 1)) {
- if (s) {
- s += ", ";
- }
- s += name.toLowerCase();
- }
- }
- }
- return s;
-}
-function writeRequiredAttributesSetters(atts) {
- "use strict";
- var name, a;
- for (name in atts) {
- if (atts.hasOwnProperty(name)) {
- a = atts[name];
- if (!a.optional && (a.types.length > 0 || a.values.length !== 1)) {
- out(" xml->addAttribute(\"" + a.nsname + "\", " +
- name.toLowerCase() + ");");
- }
- }
- }
-}
-function writeMembers(e, atts, optional) {
- "use strict";
- var ne, nsname, i, name, names;
- if (e.name === "element") {
- name = null;
- } else if (e.name === "attribute") {
- names = [];
- getNames(e.e[0], names);
- for (i = 0; i < names.length; i += 1) {
- ne = names[i];
- name = getName(ne);
- if (!atts.hasOwnProperty(name)) {
- nsname = nsmap[ne.a.ns] + ":" + ne.text;
- atts[name] = {
- nsname: nsname,
- values: [],
- types: [],
- optional: optional,
- empty: false
- };
- }
- parseAttributes(e.e[1], atts[name]);
- }
- } else if (e.name === "choice") {
- for (i = 0; i < e.e.length; i += 1) {
- writeMembers(e.e[i], atts, true);
- }
- } else if (e.name === "interleave" || e.name === "group") {
- for (i = 0; i < e.e.length; i += 1) {
- writeMembers(e.e[i], atts, optional);
- }
- } else if (e.name === "oneOrMore") {
- writeMembers(e.e[0], atts, optional);
- } else if (e.name === "value") {
- name = null; // todo
- } else if (e.name === "data") {
- name = null; // todo
- } else if (e.name === "text") {
- out(" void addTextNode(const QString& str) { xml->addTextNode(str); }");
- } else if (e.name === "empty") {
- name = null; // todo
- } else {
- runtime.log("OOPS " + e.name);
- throw null;
- }
-}
-function defineClass(e, parents, children) {
- "use strict";
- var c, p, i,
- ne = e.e[0],
- nsname = nsmap[ne.a.ns] + ":" + ne.text,
- name = ne.cppname, atts = {};
- out("/**");
- out(" * Serialize a <" + nsname + "> element.");
- out(" */");
- out("class " + name + "Writer {");
- for (c in children) {
- if (children.hasOwnProperty(c) && c !== name) {
- out("friend class " + c + "Writer;");
- }
- }
- out("public:");
- writeMembers(e.e[1], atts, false);
- writeOptionalAttributes(atts);
- e.requiredAttributes = getRequiredAttributeArguments(atts);
- e.requiredAttributeCall = getRequiredAttributeCall(atts);
- out("private:");
- out(" inline void start(" + e.requiredAttributes + ") {");
- out(" xml->startElement(\"" + nsname + "\");");
- if (e.requiredAttributes) {
- e.requiredAttributes = ", " + e.requiredAttributes;
- }
- writeFixedRequiredAttributes(atts);
- writeRequiredAttributesSetters(atts);
- out(" }");
- out("public:");
- out(" KoXmlWriter* const xml;");
- for (p in parents) {
- if (parents.hasOwnProperty(p)) {
- out(" inline explicit " + name + "Writer(const " + p +
- "Writer& p" + e.requiredAttributes + ");");
- }
- }
- out(" inline explicit " + name + "Writer(KoXmlWriter* xml_" +
- e.requiredAttributes +
- ") :xml(xml_) { start(" + e.requiredAttributeCall + "); }");
- out(" void end() { xml->endElement(); }");
- out(" void operator=(const " + name + "Writer&) { }");
- out("};");
-}
-function defineConstructors(e, parents) {
- "use strict";
- var p,
- ne = e.e[0],
- nsname = nsmap[ne.a.ns] + ":" + ne.text,
- name = ne.cppname;
- for (p in parents) {
- if (parents.hasOwnProperty(p)) {
- out(name + "Writer::" + name + "Writer(const " + p +
- "Writer& p" + e.requiredAttributes +
- ") :xml(p.xml) { start(" + e.requiredAttributeCall + "); }");
- }
- }
-}
-function getChildren(e, children) {
- "use strict";
- var name, i, names;
- if (e.name === "element") {
- names = [];
- getNames(e.e[0], names);
- for (i = 0; i < names.length; i += 1) {
- children[names[i].cppname] = 1;
- }
- } else if (e.name === "choice" || e.name === "interleave"
- || e.name === "group") {
- for (i = 0; i < e.e.length; i += 1) {
- getChildren(e.e[i], children);
- }
- } else if (e.name === "oneOrMore") {
- getChildren(e.e[0], children);
- } else if (e.name === "attribute" || e.name === "value" ||
- e.name === "data" || e.name === "text" || e.name === "empty") {
- name = null; // ignore
- } else {
- runtime.log("OOPS " + e.name);
- throw null;
- }
-}
-function childrenToParents(childrenmap) {
- "use strict";
- var p, children, c, parents = {};
- for (p in childrenmap) {
- if (childrenmap.hasOwnProperty(p)) {
- children = childrenmap[p];
- for (c in children) {
- if (children.hasOwnProperty(c)) {
- if (!parents.hasOwnProperty(c)) {
- parents[c] = {};
- }
- parents[c][p] = 1;
- }
- }
- }
- }
- return parents;
-}
-function toCPP(elements) {
- "use strict";
- out("#include <KoXmlWriter.h>");
-
- // first get a mapping for all the parents
- var children = {}, parents = {}, i, j, ce, ec, name, names, c,
- elementMap = {}, sortedElementNames = [];
- for (i = 0; i < elements.length; i += 1) {
- ce = elements[i];
- if (ce.name !== "element") {
- runtime.log("Error in parsed data.");
- return;
- }
- names = [];
- getNames(ce.e[0], names);
- for (j = 0; j < names.length; j += 1) {
- name = getName(names[j]);
- while (elementMap.hasOwnProperty(name)) {
- name = name + "_";
- }
- names[j].cppname = name;
- ec = {e: [names[j], ce.e[1]]};
- elementMap[name] = ec;
- sortedElementNames.push(name);
- }
- }
- sortedElementNames.sort();
-
- for (i = 0; i < sortedElementNames.length; i += 1) {
- name = sortedElementNames[i];
- c = {};
- getChildren(elementMap[name].e[1], c);
- children[name] = c;
- }
- parents = childrenToParents(children);
-
- for (i = 0; i < sortedElementNames.length; i += 1) {
- name = sortedElementNames[i];
- out("class " + name + "Writer;");
- }
- for (i = 0; i < sortedElementNames.length; i += 1) {
- name = sortedElementNames[i];
- defineClass(elementMap[name], parents[name], children[name]);
- }
- for (i = 0; i < sortedElementNames.length; i += 1) {
- name = sortedElementNames[i];
- defineConstructors(elementMap[name], parents[name]);
- }
-}
-
-// load and parse the Relax NG
-runtime.loadXML(relaxngurl, function (err, dom) {
- "use strict";
- var parser = new xmldom.RelaxNGParser();
- if (err) {
- runtime.log(err);
- } else {
- err = parser.parseRelaxNGDOM(dom);
- if (err) {
- runtime.log(err);
- } else {
- toCPP(parser.elements);
- }
- }
-});
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test01.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test01.rng
deleted file mode 100644
index 0c4e4baa8dd..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test01.rng
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
-
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
->
- <start>
- <ref name="office-document-content"/>
- </start>
- <define name="office-document-content">
- <element name="office:document-content">
- <ref name="office-document-common-attrs"/>
- <ref name="office-scripts"/>
- <ref name="office-body"/>
- </element>
- </define>
- <define name="office-document-common-attrs">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- </define>
- <define name="office-scripts">
- <optional>
- <element name="office:scripts">
- <empty/>
- </element>
- </optional>
- </define>
- <define name="office-body">
- <element name="office:body">
- <element name="office:text">
- <empty/>
- </element>
- </element>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test01.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test01.xml
deleted file mode 100644
index 71712e11e51..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test01.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.2">
- <office:scripts/>
- <!--comment-->
- <office:body>
- <office:text/>
- </office:body>
-</office:document-content>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test02.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test02.rng
deleted file mode 100644
index ed37e255fda..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test02.rng
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
-
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
->
- <start>
- <ref name="office-document-content"/>
- </start>
- <define name="office-document-content">
- <element name="office:document-content">
- <ref name="office-document-common-attrs"/>
- <ref name="office-scripts"/>
- <ref name="office-automatic-styles"/>
- <ref name="office-body"/>
- </element>
- </define>
- <define name="office-automatic-styles">
- <optional>
- <element name="office:automatic-styles">
- <zeroOrMore>
- <element name="style:style">
- <attribute name="style:name"><value>NamespaceTable</value></attribute>
- <ref name="style-style-content"/>
- </element>
- </zeroOrMore>
- </element>
- </optional>
- </define>
- <define name="office-document-common-attrs">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- </define>
- <define name="office-scripts">
- <optional>
- <element name="office:scripts">
- <empty/>
- </element>
- </optional>
- </define>
- <define name="office-body">
- <element name="office:body">
- <element name="office:text">
- <empty/>
- </element>
- </element>
- </define>
- <define name="style-table-properties">
- <element name="style:table-properties">
- <empty/>
- </element>
- </define>
- <define name="style-chart-properties">
- <element name="style:chart-properties">
- <empty/>
- </element>
- </define>
- <define name="style-style-content">
- <choice>
- <group>
- <attribute name="style:family">
- <value>chart</value>
- </attribute>
- <optional>
- <ref name="style-chart-properties"/>
- </optional>
- </group>
- <group>
- <attribute name="style:family">
- <value>table</value>
- </attribute>
- <optional>
- <ref name="style-table-properties"/>
- </optional>
- </group>
- </choice>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test02.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test02.xml
deleted file mode 100644
index 7e70255ed40..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test02.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" office:version="1.2">
- <office:automatic-styles>
- <style:style style:name="NamespaceTable" style:family="table">
- <style:table-properties/>
- </style:style>
- </office:automatic-styles>
- <office:body>
- <office:text>
- </office:text>
- </office:body>
-</office:document-content>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test03.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test03.rng
deleted file mode 100644
index 8803f528986..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test03.rng
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
->
- <start>
- <element name="office:a">
- <interleave>
- <text/>
- <element name="office:b">
- <empty/>
- </element>
- </interleave>
- </element>
- </start>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test03.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test03.xml
deleted file mode 100644
index a6255e802e9..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test03.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:a xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0">
- hello
- <office:b/>
- hi
-</office:a>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test04.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test04.rng
deleted file mode 100644
index 511b297efaa..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test04.rng
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
->
- <start>
- <element name="office:document-content">
- <interleave>
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- </interleave>
- <element name="office:body">
- <empty/>
- </element>
- </element>
- </start>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test04.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test04.xml
deleted file mode 100644
index 21ceee55b13..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test04.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" office:version="1.2">
- <office:body>
- </office:body>
-</office:document-content>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test05.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test05.rng
deleted file mode 100644
index c0c73052f26..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test05.rng
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
->
- <start>
- <ref name="office-document-content"/>
- </start>
- <define name="office-document-content">
- <element name="office:document-content">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <ref name="office-body"/>
- </element>
- </define>
- <define name="office-body">
- <element name="office:body">
- <element name="office:text">
- <zeroOrMore>
- <ref name="text-p"/>
- </zeroOrMore>
- </element>
- </element>
- </define>
- <define name="text-p">
- <element name="text:p">
- <zeroOrMore>
- <ref name="paragraph-content"/>
- </zeroOrMore>
- </element>
- </define>
- <define name="paragraph-content">
- <choice>
- <text/>
- <element name="text:s">
- <empty/>
- </element>
- </choice>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test05.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test05.xml
deleted file mode 100644
index 38cb418bde9..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test05.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document-content xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.2">
- <office:body>
- <office:text>
- <text:p>
- </text:p>
- </office:text>
- </office:body>
-</office:document-content>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test06.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test06.rng
deleted file mode 100644
index c744850f98e..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test06.rng
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
->
- <start>
- <element name="office:a">
- <text/>
- </element>
- </start>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test06.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test06.xml
deleted file mode 100644
index a9c24656ea1..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test06.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:a xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0">
- hello
-</office:a>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test07.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test07.rng
deleted file mode 100644
index fb37cf82755..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test07.rng
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
->
- <start>
- <element name="office:document">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <attribute name="office:mimetype">
- <ref name="string"/>
- </attribute>
- <ref name="office-settings"/>
- <ref name="office-body"/>
- </element>
- </start>
- <define name="office-body">
- <element name="office:body">
- <element name="office:text">
- <empty/>
- </element>
- </element>
- </define>
- <define name="office-settings">
- <element name="office:settings">
- <element name="config:config-item-set">
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
- <element name="config:config-item">
- <interleave>
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
- <attribute name="config:type">
- <choice>
- <value>boolean</value>
- <value>short</value>
- </choice>
- </attribute>
- </interleave>
- <text/>
- </element>
- </element>
- </element>
- </define>
- <define name="string">
- <data type="string"/>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test07.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test07.xml
deleted file mode 100644
index a5361bf1558..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test07.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
- office:version="1.2"
- office:mimetype="application/vnd.oasis.opendocument.text">
- <office:settings>
- <config:config-item-set config:name="ooo:configuration-settings">
- <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
- </config:config-item-set>
- </office:settings>
- <office:body>
- <office:text/>
- </office:body>
-</office:document>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test08.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test08.rng
deleted file mode 100644
index 82c2de66c57..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test08.rng
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
->
- <start>
- <element name="office:document">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <attribute name="office:mimetype">
- <ref name="string"/>
- </attribute>
- <ref name="office-settings"/>
- <ref name="office-body"/>
- </element>
- </start>
- <define name="office-body">
- <element name="office:body">
- <element name="office:text">
- <empty/>
- </element>
- </element>
- </define>
- <define name="office-settings">
- <element name="office:settings">
- <element name="config:config-item-set">
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
- <element name="config:config-item">
- <interleave>
- <attribute name="config:name">
- <ref name="string"/>
- </attribute>
- <attribute name="config:type">
- <choice>
- <value>boolean</value>
- <value>string</value>
- </choice>
- </attribute>
- </interleave>
- <text/>
- </element>
- </element>
- </element>
- </define>
- <define name="string">
- <data type="string"/>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test08.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test08.xml
deleted file mode 100644
index 71af08046cb..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test08.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
- office:version="1.2"
- office:mimetype="application/vnd.oasis.opendocument.text">
- <office:settings>
- <config:config-item-set config:name="ooo:configuration-settings">
- <config:config-item config:name="PrintFaxName" config:type="string"/>
- </config:config-item-set>
- </office:settings>
- <office:body>
- <office:text/>
- </office:body>
-</office:document>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test09.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test09.rng
deleted file mode 100644
index 17269968979..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test09.rng
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
->
- <start>
- <element name="office:document">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <attribute name="office:mimetype">
- <data type="string"/>
- </attribute>
- <element name="office:body">
- <element name="office:text">
- <element name="text:p">
- <choice>
- <text/>
- <element name="draw:frame">
- <empty/>
- </element>
- </choice>
- </element>
- </element>
- </element>
- </element>
- </start>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test09.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test09.xml
deleted file mode 100644
index a54dd99e4b3..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test09.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
- office:version="1.2"
- office:mimetype="application/vnd.oasis.opendocument.text">
- <office:body>
- <office:text>
- <text:p>
- <draw:frame/>
- </text:p>
- </office:text>
- </office:body>
-</office:document>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test10.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test10.rng
deleted file mode 100644
index 5e271a43890..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test10.rng
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
->
- <start>
- <element name="office:document">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <attribute name="office:mimetype">
- <data type="string"/>
- </attribute>
- <element name="office:styles">
- <interleave>
- <choice>
- <empty/>
- <oneOrMore>
- <ref name="style-style"/>
- </oneOrMore>
- </choice>
- <element name="style:default-style">
- <ref name="style-style-content"/>
- </element>
- </interleave>
- </element>
- <element name="office:body">
- <element name="office:text">
- <empty/>
- </element>
- </element>
- </element>
- </start>
- <define name="style-style">
- <element name="style:style">
- <attribute name="style:name">
- <data type="NCName"/>
- </attribute>
- <ref name="style-style-content"/>
- </element>
- </define>
- <define name="style-style-content">
- <attribute name="style:family">
- <value>text</value>
- </attribute>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test10.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test10.xml
deleted file mode 100644
index f4087a89768..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test10.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- office:version="1.2"
- office:mimetype="application/vnd.oasis.opendocument.text">
- <office:styles>
- <style:default-style style:family="text"/>
- <style:style style:name="Standard" style:family="text"/>
- </office:styles>
- <office:body>
- <office:text/>
- </office:body>
-</office:document>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test11.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test11.rng
deleted file mode 100644
index 2df604b5b8f..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test11.rng
+++ /dev/null
@@ -1,75 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
->
- <start>
- <element name="office:document">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <attribute name="office:mimetype">
- <data type="string"/>
- </attribute>
- <element name="office:font-face-decls">
- <choice>
- <empty/>
- <oneOrMore>
- <ref name="style-font-face"/>
- </oneOrMore>
- </choice>
- </element>
- <element name="office:body">
- <element name="office:text">
- <empty/>
- </element>
- </element>
- </element>
- </start>
- <define name="style-font-face">
- <element name="style:font-face">
- <ref name="style-font-face-attlist"/>
- </element>
- </define>
- <define name="style-font-face-attlist">
- <interleave>
- <optional>
- <attribute name="svg:ascent">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:descent">
- <ref name="integer"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:widths">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:bbox">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="svg:ideographic">
- <ref name="integer"/>
- </attribute>
- </optional>
- <attribute name="style:name">
- <ref name="string"/>
- </attribute>
- </interleave>
- </define>
- <define name="string">
- <data type="string"/>
- </define>
- <define name="integer">
- <data type="integer"/>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test11.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test11.xml
deleted file mode 100644
index d272fd4e3e9..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test11.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- office:version="1.2"
- office:mimetype="application/vnd.oasis.opendocument.text">
- <office:font-face-decls>
- <style:font-face style:name="LucidaSans"/>
- </office:font-face-decls>
- <office:body>
- <office:text/>
- </office:body>
-</office:document>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test12.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test12.rng
deleted file mode 100644
index a0e79a356e8..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test12.rng
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
->
- <start>
- <element name="office:document">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <attribute name="office:mimetype">
- <data type="string"/>
- </attribute>
- <element name="office:styles">
- <interleave>
- <element name="style:default-style">
- <ref name="style-style-content"/>
- </element>
- </interleave>
- </element>
- <element name="office:body">
- <element name="office:text">
- <empty/>
- </element>
- </element>
- </element>
- </start>
- <define name="style-style-content">
- <group>
- <attribute name="style:family">
- <value>text</value>
- </attribute>
- <element name="style:text-properties">
- <ref name="style-text-properties-attlist"/>
- </element>
- </group>
- </define>
- <define name="style-text-properties-attlist">
- <interleave>
- <optional>
- <attribute name="style:text-line-through-text">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-name-asian">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-name-complex">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="fo:font-family">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-asian">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-family-complex">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-name">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-name-asian">
- <ref name="string"/>
- </attribute>
- </optional>
- <optional>
- <attribute name="style:font-style-name-complex">
- <ref name="string"/>
- </attribute>
- </optional>
- </interleave>
- </define>
- <define name="string">
- <data type="string"/>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test12.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test12.xml
deleted file mode 100644
index a3f2a5d7255..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test12.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- office:version="1.2"
- office:mimetype="application/vnd.oasis.opendocument.text">
- <office:styles>
- <style:default-style style:family="text">
- <style:text-properties>
- </style:text-properties>
- </style:default-style>
- </office:styles>
- <office:body>
- <office:text/>
- </office:body>
-</office:document>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test13.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test13.rng
deleted file mode 100644
index 47a2161ed9a..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test13.rng
+++ /dev/null
@@ -1,71 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
->
- <start>
- <element name="office:document">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <attribute name="office:mimetype">
- <data type="string"/>
- </attribute>
- <ref name="office-styles"/>
- <element name="office:body">
- <element name="office:text">
- <empty/>
- </element>
- </element>
- </element>
- </start>
- <define name="office-styles">
- <element name="office:styles">
- <interleave>
- <interleave>
- <ref name="style-style"/>
- <ref name="text-list-style"/>
- </interleave>
- <ref name="text-outline-style"/>
- </interleave>
- </element>
- </define>
- <define name="style-style">
- <element name="style:style">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
- <attribute name="style:family">
- <value>text</value>
- </attribute>
- </element>
- </define>
- <define name="text-list-style">
- <element name="text:list-style">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
- </element>
- </define>
- <define name="text-outline-style">
- <element name="text:outline-style">
- <attribute name="style:name">
- <ref name="styleName"/>
- </attribute>
- <element name="text:outline-level-style">
- <attribute name="text:level">
- <data type="positiveInteger"/>
- </attribute>
- </element>
- </element>
- </define>
- <define name="string">
- <data type="string"/>
- </define>
- <define name="styleName">
- <data type="NCName"/>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test13.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test13.xml
deleted file mode 100644
index 8f46daa4ce1..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test13.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- office:version="1.2"
- office:mimetype="application/vnd.oasis.opendocument.text">
- <office:styles>
- <style:style style:name="Formula" style:family="text"/>
- <text:outline-style style:name="Outline">
- <text:outline-level-style text:level="1"/>
- </text:outline-style>
- <text:list-style style:name="Numbering_20_1"/>
- </office:styles>
- <office:body>
- <office:text/>
- </office:body>
-</office:document>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test14.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test14.rng
deleted file mode 100644
index 61a8c9e2b43..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test14.rng
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
->
- <start>
- <element name="office:document">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <attribute name="office:mimetype">
- <data type="string"/>
- </attribute>
- <ref name="office-automatic-styles"/>
- <element name="office:body">
- <element name="office:text">
- <empty/>
- </element>
- </element>
- </element>
- </start>
- <define name="office-automatic-styles">
- <element name="office:automatic-styles">
- <interleave>
- <element name="style:style">
- <attribute name="style:name">
- <data type="NCName"/>
- </attribute>
- <attribute name="style:family">
- <value>table</value>
- </attribute>
- </element>
- <choice>
- <empty/>
- <element name="text:list-style">
- <empty/>
- </element>
- </choice>
- </interleave>
- </element>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test14.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test14.xml
deleted file mode 100644
index 6c16a1d6142..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test14.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- office:version="1.2"
- office:mimetype="application/vnd.oasis.opendocument.text">
- <office:automatic-styles>
- <style:style style:name="NamespaceTable" style:family="table"/>
- </office:automatic-styles>
- <office:body>
- <office:text/>
- </office:body>
-</office:document>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test15.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test15.rng
deleted file mode 100644
index 63557c6e2bc..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test15.rng
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
->
- <start>
- <element name="office:document">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <attribute name="office:mimetype">
- <data type="string"/>
- </attribute>
- <ref name="office-automatic-styles"/>
- <element name="office:body">
- <element name="office:text">
- <empty/>
- </element>
- </element>
- </element>
- </start>
- <define name="office-automatic-styles">
- <element name="office:automatic-styles">
- <interleave>
- <oneOrMore>
- <choice>
- <empty/>
- <element name="number:boolean-style">
- <attribute name="style:name">
- <data type="NCName"/>
- </attribute>
- </element>
- </choice>
- </oneOrMore>
- <element name="number:text-style">
- <attribute name="style:name">
- <data type="NCName"/>
- </attribute>
- </element>
- </interleave>
- </element>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test15.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test15.xml
deleted file mode 100644
index 4d8361aaa69..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test15.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
- office:version="1.2"
- office:mimetype="application/vnd.oasis.opendocument.text">
- <office:automatic-styles>
- <number:boolean-style style:name="N99">
- </number:boolean-style>
- <number:text-style style:name="N100">
- </number:text-style>
- <number:boolean-style style:name="N5099">
- </number:boolean-style>
- </office:automatic-styles>
- <office:body>
- <office:text/>
- </office:body>
-</office:document>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test16.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test16.rng
deleted file mode 100644
index 32c6cb8e2c0..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test16.rng
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
->
- <start>
- <element name="office:document">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <attribute name="office:mimetype">
- <data type="string"/>
- </attribute>
- <element name="office:automatic-styles">
- <ref name="styles"/>
- </element>
- <element name="office:body">
- <element name="office:text">
- <empty/>
- </element>
- </element>
- </element>
- </start>
- <define name="styles">
- <interleave>
- <choice>
- <empty/>
- <oneOrMore>
- <element name="number:boolean-style">
- <attribute name="style:name">
- <data type="NCName"/>
- </attribute>
- </element>
- </oneOrMore>
- </choice>
- <element name="number:text-style">
- <attribute name="style:name">
- <data type="NCName"/>
- </attribute>
- </element>
- </interleave>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test16.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test16.xml
deleted file mode 100644
index 4d8361aaa69..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test16.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
- office:version="1.2"
- office:mimetype="application/vnd.oasis.opendocument.text">
- <office:automatic-styles>
- <number:boolean-style style:name="N99">
- </number:boolean-style>
- <number:text-style style:name="N100">
- </number:text-style>
- <number:boolean-style style:name="N5099">
- </number:boolean-style>
- </office:automatic-styles>
- <office:body>
- <office:text/>
- </office:body>
-</office:document>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test17.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test17.rng
deleted file mode 100644
index ffcd9bd4f9b..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test17.rng
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
->
- <start>
- <element name="office:document">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <attribute name="office:mimetype">
- <data type="string"/>
- </attribute>
- <ref name="office-body"/>
- </element>
- </start>
- <define name="office-body">
- <element name="office:body">
- <element name="office:text">
- <element name="text:p">
- <zeroOrMore>
- <ref name="paragraph-content"/>
- </zeroOrMore>
- </element>
- </element>
- </element>
- </define>
- <define name="paragraph-content">
- <choice>
- <text/>
- <element name="text:conditional-text">
- <ref name="text-conditional-text-attlist"/>
- <text/>
- </element>
- </choice>
- </define>
- <define name="text-conditional-text-attlist">
- <interleave>
- <attribute name="text:condition">
- <data type="string"/>
- </attribute>
- <attribute name="text:string-value-if-true">
- <data type="string"/>
- </attribute>
- <attribute name="text:string-value-if-false">
- <data type="string"/>
- </attribute>
- </interleave>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test17.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test17.xml
deleted file mode 100644
index 0947bff2b19..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test17.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- office:version="1.2"
- office:mimetype="application/vnd.oasis.opendocument.text">
- <office:body>
- <office:text>
- <text:p>
- <text:conditional-text text:condition="test"
- text:string-value-if-true="a"
- text:string-value-if-false="" />
- 03
- </text:p>
- </office:text>
- </office:body>
-</office:document>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test18.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test18.rng
deleted file mode 100644
index 9ddbb9baafb..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test18.rng
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
- xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0"
->
- <start>
- <element name="manifest:manifest">
- <attribute name="manifest:version">
- <value>1.2</value>
- </attribute>
- <oneOrMore>
- <element name="manifest:file-entry">
- <interleave>
- <attribute name="manifest:full-path">
- <data type="string"/>
- </attribute>
- <attribute name="manifest:media-type">
- <data type="string"/>
- </attribute>
- </interleave>
- </element>
- </oneOrMore>
- </element>
- </start>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test18.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test18.xml
deleted file mode 100644
index cc6ab027614..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test18.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.2" >
- <manifest:file-entry manifest:media-type="a" manifest:full-path="a"/>
- <manifest:file-entry manifest:media-type="a" manifest:full-path="a"/>
- <manifest:file-entry manifest:media-type="a" manifest:full-path="a"/>
-</manifest:manifest>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test19.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test19.rng
deleted file mode 100644
index ac676d982d4..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test19.rng
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
->
- <start>
- <element name="office:document">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <attribute name="office:mimetype">
- <data type="string"/>
- </attribute>
- <ref name="office-body"/>
- </element>
- </start>
- <define name="office-body">
- <element name="office:body">
- <element name="office:text">
- <element name="text:p">
- <oneOrMore>
- <ref name="paragraph-content"/>
- </oneOrMore>
- </element>
- </element>
- </element>
- </define>
- <define name="paragraph-content">
- <choice>
- <element>
- <choice>
- <name>text:reference-ref</name>
- <name>text:bookmark-ref</name>
- </choice>
- <empty/>
- </element>
- <element name="text:span">
- <empty/>
- </element>
- </choice>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test19.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test19.xml
deleted file mode 100644
index c562015a377..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test19.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- office:version="1.2"
- office:mimetype="application/vnd.oasis.opendocument.text">
- <office:body>
- <office:text>
- <text:p><text:reference-ref/><text:span/></text:p>
- </office:text>
- </office:body>
-</office:document>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test20.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test20.rng
deleted file mode 100644
index bd6b4e0f05d..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test20.rng
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
->
- <start>
- <element name="office:document-content">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <ref name="office-body"/>
- </element>
- </start>
- <define name="office-body">
- <element name="office:body">
- <element name="office:text">
- <element name="text:p">
- <zeroOrMore>
- <choice>
- <text/>
- <element name="text:s">
- <empty/>
- </element>
- </choice>
- </zeroOrMore>
- </element>
- </element>
- </element>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test20.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test20.xml
deleted file mode 100644
index e28b855386f..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test20.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document-content
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- office:version="1.2">
- <office:body>
- <office:text>
- <text:p>,<text:s/>,</text:p>
- </office:text>
- </office:body>
-</office:document-content>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test21.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test21.rng
deleted file mode 100644
index 032886009d4..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test21.rng
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
->
- <start>
- <element name="office:document-content">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <ref name="office-body"/>
- </element>
- </start>
- <define name="office-body">
- <element name="office:body">
- <element name="office:text">
- <element name="text:p">
- <zeroOrMore>
- <ref name="paragraph-content"/>
- </zeroOrMore>
- </element>
- </element>
- </element>
- </define>
- <define name="paragraph-content">
- <choice>
- <text/>
- <element name="text:bibliography-mark">
- <attribute name="text:bibliography-type">
- <value>misc</value>
- </attribute>
- <zeroOrMore>
- <attribute>
- <choice>
- <name>text:url</name>
- <name>text:custom5</name>
- <name>text:year</name>
- </choice>
- <data type="string"/>
- </attribute>
- </zeroOrMore>
- <text/>
- </element>
- </choice>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test21.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test21.xml
deleted file mode 100644
index fec92948f98..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test21.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document-content
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- office:version="1.2">
- <office:body>
- <office:text>
- <text:p><text:bibliography-mark text:bibliography-type="misc" text:year="F" text:url="h" text:custom5="i"/></text:p>
- </office:text>
- </office:body>
-</office:document-content>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test22.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test22.rng
deleted file mode 100644
index 154c810975b..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test22.rng
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
->
- <start>
- <element name="office:document">
- <attribute name="office:version">
- <value>1.2</value>
- </attribute>
- <attribute name="office:mimetype">
- <data type="string"/>
- </attribute>
- <ref name="office-body"/>
- </element>
- </start>
- <define name="office-body">
- <element name="office:body">
- <element name="office:text">
- <element name="text:list">
- <optional>
- <attribute name="xml:id">
- <data type="ID"/>
- </attribute>
- </optional>
- </element>
- </element>
- </element>
- </define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test22.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test22.xml
deleted file mode 100644
index dd84419d668..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test22.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- office:version="1.2"
- office:mimetype="application/vnd.oasis.opendocument.text">
- <office:body>
- <office:text>
- <text:list xml:id="l"/>
- </office:text>
- </office:body>
-</office:document>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test23.rng b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test23.rng
deleted file mode 100644
index 1a02206d043..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test23.rng
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar
- xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
- xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0">
-<define name="manifest">
- <element name="manifest:manifest">
- <oneOrMore>
- <ref name="file-entry"/>
- </oneOrMore>
- </element>
-</define>
-<start>
- <choice>
- <ref name="manifest"/>
- </choice>
-</start>
-<define name="file-entry">
- <element name="manifest:file-entry">
- <ref name="file-entry-attlist"/>
- </element>
-</define>
-<define name="file-entry-attlist" combine="interleave">
- <attribute name="manifest:full-path">
- <data type="string"/>
- </attribute>
-</define>
-<define name="file-entry-attlist" combine="interleave">
- <attribute name="manifest:media-type">
- <data type="string"/>
- </attribute>
-</define>
-</grammar>
diff --git a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test23.xml b/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test23.xml
deleted file mode 100644
index b622196b05b..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/relaxngtests/test23.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0">
- <manifest:file-entry manifest:media-type="text/xml" manifest:full-path="settings.xml"/>
-</manifest:manifest>
diff --git a/apps/files_odfviewer/src/webodf/webodf/roundtripodf.js b/apps/files_odfviewer/src/webodf/webodf/roundtripodf.js
deleted file mode 100644
index 6d16d1b2a34..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/roundtripodf.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, core: true, odf: true*/
-runtime.loadClass("odf.OdfContainer");
-
-/**
- * If the state of the OdfContainer is invalid, exit with an error message.
- */
-function exitOnInvalid(odffilepath, odfcontainer) {
- "use strict";
- if (odfcontainer.state === odf.OdfContainer.INVALID) {
- runtime.log("Document " + odffilepath + " is invalid.");
- runtime.exit(1);
- }
- if (odfcontainer.state === odf.OdfContainer.DONE) {
- odfcontainer.save(function (err) {
- if (err) {
- runtime.log(err);
- runtime.exit(1);
- }
- });
- }
-}
-
-/**
- * Load an ODF document. Report an error if there is a problem.
- */
-function loadODF(odffilepath) {
- "use strict";
- var odfcontainer = new odf.OdfContainer(odffilepath);
- odfcontainer.onstatereadychange = function () {
- exitOnInvalid(odffilepath, odfcontainer);
- };
- exitOnInvalid(odffilepath, odfcontainer);
-}
-
-// loop over arguments to load ODF
-var i;
-for (i = 1; i < arguments.length; i += 1) {
- loadODF(arguments[i]);
-}
diff --git a/apps/files_odfviewer/src/webodf/webodf/roundtripzip.js b/apps/files_odfviewer/src/webodf/webodf/roundtripzip.js
deleted file mode 100644
index d3fe17fc81a..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/roundtripzip.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, core: true*/
-runtime.loadClass("core.Zip");
-
-/**
- * Load an ODF document. Report an error if there is a problem.
- */
-function roundTripZip(zipfilepath) {
- "use strict";
- var zip = new core.Zip(zipfilepath, function (err, zip) {
- if (err) {
- runtime.log(err);
- runtime.exit(1);
- }
- // the TOC of the zip is loaded at this point
- // now we want to load all parts in memory so we can save them again
- zip.write(function (err) {
- if (err) {
- runtime.log(err);
- runtime.exit(1);
- }
- // at this point a zip file should have been written with the same
- // contents as the one that was read
- runtime.exit(0);
- });
- });
-}
-
-// loop over arguments to load ODF
-var i;
-for (i = 1; i < arguments.length; i += 1) {
- roundTripZip(arguments[i]);
-}
diff --git a/apps/files_odfviewer/src/webodf/webodf/styleNameRef b/apps/files_odfviewer/src/webodf/webodf/styleNameRef
deleted file mode 100644
index 39b29147461..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/styleNameRef
+++ /dev/null
@@ -1,272 +0,0 @@
-# cat styles.xml|xmlstarlet sel -N style=urn:oasis:names:tc:opendocument:xmlns:style:1.0 -t -m "//*[@style:family='graphic']/@style:name" -v . -
-
-gradient
- draw:fill-gradient-name style:drawing-page-properties
- draw:fill-gradient-name style:graphic-properties
-
-hatch
- draw:fill-hatch-name style:drawing-page-properties
- draw:fill-hatch-name style:graphic-properties
-
-fill-image
- draw:fill-image-name style:drawing-page-properties
- draw:fill-image-name style:graphic-properties
-
-marker
- draw:marker-end style:graphic-properties
- draw:marker-start style:graphic-properties
-
-dash
- draw:stroke-dash style:graphic-properties
-
-opacity
- draw:opacity-name style:drawing-page-properties
- draw:opacity-name style:graphic-properties
-
-master page
- draw:master-page-name draw:page
- style:master-page-name style:style
- style:next-style-name style:master-page
- text:master-page-name text:notes-configuration
- text:master-page-name text:page
-
-presentation-page-layout
- presentation:presentation-page-layout-name draw:page
- presentation:presentation-page-layout-name draw:handout-master
-
-page-layout
- style:page-layout-name presentation:notes
- style:page-layout-name style:handout-master
- style:page-layout-name style:master-page
-
-list
- text:style-name text:list
- text:style-name text:numbered-paragraph
- text:style-override text:list-item
- style:list-style-name style:style
-
-data
- style:data-style-name style:style
- style:percentage-data-style-name style:style
- style:data-style-name presentation:date-time-decl
- style:data-style-name text:creation-date
- style:data-style-name text:creation-time
- style:data-style-name text:database-display
- style:data-style-name text:date
- style:data-style-name text:editing-duration
- style:data-style-name text:expression
- style:data-style-name text:meta-field
- style:data-style-name text:modification-date
- style:data-style-name text:modification-time
- style:data-style-name text:print-date
- style:data-style-name text:print-time
- style:data-style-name text:table-formula
- style:data-style-name text:time
- style:data-style-name text:user-defined
- style:data-style-name text:user-field-get
- style:data-style-name text:user-field-input
- style:data-style-name text:variable-get
- style:data-style-name text:variable-input
- style:data-style-name text:variable-set
-
-chart
- chart:style-name chart:axis
- chart:style-name chart:chart
- chart:style-name chart:data-label
- chart:style-name chart:data-point
- chart:style-name chart:equation
- chart:style-name chart:error-indicator
- chart:style-name chart:floor
- chart:style-name chart:footer
- chart:style-name chart:grid
- chart:style-name chart:legend
- chart:style-name chart:mean-value
- chart:style-name chart:plot-area
- chart:style-name chart:regression-curve
- chart:style-name chart:series
- chart:style-name chart:stock-gain-marker
- chart:style-name chart:stock-loss-marker
- chart:style-name chart:stock-range-line
- chart:style-name chart:subtitle
- chart:style-name chart:title
- chart:style-name chart:wall
-
-----
-
-drawing-page
- draw:style-name draw:page
- draw:style-name presentation:notes
- draw:style-name style:handout-master
- draw:style-name style:master-page
-
-graphic
- draw:style-name dr3d:cube
- draw:style-name dr3d:extrude
- draw:style-name dr3d:rotate
- draw:style-name dr3d:scene
- draw:style-name dr3d:sphere
- draw:style-name draw:caption
- draw:style-name draw:circle
- draw:style-name draw:connector
- draw:style-name draw:control
- draw:style-name draw:custom-shape
- draw:style-name draw:ellipse
- draw:style-name draw:frame
- draw:style-name draw:g
- draw:style-name draw:line
- draw:style-name draw:measure
- draw:style-name draw:page-thumbnail
- draw:style-name draw:path
- draw:style-name draw:polygon
- draw:style-name draw:polyline
- draw:style-name draw:rect
- draw:style-name draw:regular-polygon
- draw:style-name office:annotation
-
-paragraph
- draw:text-style-name draw:caption
- draw:text-style-name draw:circle
- draw:text-style-name draw:connector
- draw:text-style-name draw:control
- draw:text-style-name draw:custom-shape
- draw:text-style-name draw:ellipse
- draw:text-style-name draw:frame
- draw:text-style-name draw:line
- draw:text-style-name draw:measure
- draw:text-style-name draw:path
- draw:text-style-name draw:polygon
- draw:text-style-name draw:polyline
- draw:text-style-name draw:rect
- draw:text-style-name draw:regular-polygon
- draw:text-style-name office:annotation
- form:text-style-name form:column
- style:next-style-name style:style
- table:paragraph-style-name table:body
- table:paragraph-style-name table:even-columns
- table:paragraph-style-name table:even-rows
- table:paragraph-style-name table:first-column
- table:paragraph-style-name table:first-row
- table:paragraph-style-name table:last-column
- table:paragraph-style-name table:last-row
- table:paragraph-style-name table:odd-columns
- table:paragraph-style-name table:odd-rows
- text:default-style-name text:notes-configuration
- text:style-name text:alphabetical-index-entry-template
- text:style-name text:bibliography-entry-template
- text:style-name text:h
- text:style-name text:illustration-index-entry-template
- text:style-name text:index-source-style
- text:style-name text:object-index-entry-template
- text:style-name text:p
- text:style-name text:table-index-entry-template
- text:style-name text:table-of-content-entry-template
- text:style-name text:table-index-entry-template
- text:style-name text:user-index-entry-template
- style:register-truth-ref-style-name style:page-layout-properties
-
-presentation
- presentation:style-name dr3d:cube
- presentation:style-name dr3d:extrude
- presentation:style-name dr3d:rotate
- presentation:style-name dr3d:scene
- presentation:style-name dr3d:sphere
- presentation:style-name draw:caption
- presentation:style-name draw:circle
- presentation:style-name draw:connector
- presentation:style-name draw:control
- presentation:style-name draw:custom-shape
- presentation:style-name draw:ellipse
- presentation:style-name draw:frame
- presentation:style-name draw:g
- presentation:style-name draw:line
- presentation:style-name draw:measure
- presentation:style-name draw:page-thumbnail
- presentation:style-name draw:path
- presentation:style-name draw:polygon
- presentation:style-name draw:polyline
- presentation:style-name draw:rect
- presentation:style-name draw:regular-polygon
- presentation:style-name office:annotation
-
-ruby
- text:style-name text:ruby
-
-section
- text:style-name text:alphabetical-index
- text:style-name text:bibliography
- text:style-name text:illustration-index
- text:style-name text:index-title
- text:style-name text:object-index
- text:style-name text:section
- text:style-name text:table-of-content
- text:style-name text:table-index
- text:style-name text:user-index
-
-table-cell
- db:default-cell-style-name db:column
- table:default-cell-style-name table:table-column
- table:default-cell-style-name table:table-row
- table:style-name table:body
- table:style-name table:covered-table-cell
- table:style-name table:even-columns
- table:style-name table:covered-table-cell
- table:style-name table:even-columns
- table:style-name table:even-rows
- table:style-name table:first-column
- table:style-name table:first-row
- table:style-name table:last-column
- table:style-name table:last-row
- table:style-name table:odd-columns
- table:style-name table:odd-rows
- table:style-name table:table-cell
-
-table-row
- db:default-row-style-name db:query
- db:default-row-style-name db:table-representation
- table:style-name table:table-row
-
-table-column
- db:style-name db:column
- table:style-name table:table-column
-
-table
- db:style-name db:query
- db:style-name db:table-representation
- table:style-name table:background
- table:style-name table:table
-
-text
- style:leader-text-style style:tab-stop
- style:style-name style:drop-cap
- text:citation-body-style-name text:notes-configuration
- text:citation-style-name text:notes-configuration
- text:style-name text:a
- text:style-name text:alphabetical-index
- text:style-name text:linenumbering-configuration
- text:style-name text:list-level-style-number
- text:style-name text:ruby-text
- text:style-name text:span
- text:visited-style-name text:a
- style:text-line-through-text-style style:text-properties
- text:main-entry-style-name text:alphabetical-index-source
- text:style-name text:index-entry-bibliography
- text:style-name text:index-entry-chapter
- text:style-name text:index-entry-link-end
- text:style-name text:index-entry-link-start
- text:style-name text:index-entry-page-number
- text:style-name text:index-entry-span
- text:style-name text:index-entry-tab-stop
- text:style-name text:index-entry-text
- text:style-name text:index-title-template
- text:style-name text:list-level-style-bullet
- text:style-name text:outline-level-style
-
-
----
-
-conditional style
- text:cond-style-name text:h
- text:cond-style-name text:p
-
-style:apply-style-name # complicated!
-style:parent-style-name # complicated!
diff --git a/apps/files_odfviewer/src/webodf/webodf/styleNameRefs b/apps/files_odfviewer/src/webodf/webodf/styleNameRefs
deleted file mode 100644
index e63e3562df4..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/styleNameRefs
+++ /dev/null
@@ -1,57 +0,0 @@
-dash
- draw:stroke-dash-names style:graphic-properties
-
-graphic
- draw:class-names dr3d:cube
- draw:class-names dr3d:extrude
- draw:class-names dr3d:rotate
- draw:class-names dr3d:scene
- draw:class-names dr3d:sphere
- draw:class-names draw:caption
- draw:class-names draw:circle
- draw:class-names draw:connector
- draw:class-names draw:control
- draw:class-names draw:custom-shape
- draw:class-names draw:ellipse
- draw:class-names draw:frame
- draw:class-names draw:g
- draw:class-names draw:line
- draw:class-names draw:measure
- draw:class-names draw:page-thumbnail
- draw:class-names draw:path
- draw:class-names draw:polygon
- draw:class-names draw:polyline
- draw:class-names draw:rect
- draw:class-names draw:regular-polygon
- draw:class-names office:annotation
-
-paragraph
- text:class-names text:h
- text:class-names text:p
-
-presentation
- presentation:class-names dr3d:cube
- presentation:class-names dr3d:extrude
- presentation:class-names dr3d:rotate
- presentation:class-names dr3d:scene
- presentation:class-names dr3d:sphere
- presentation:class-names draw:caption
- presentation:class-names draw:circle
- presentation:class-names draw:connector
- presentation:class-names draw:control
- presentation:class-names draw:custom-shape
- presentation:class-names draw:ellipse
- presentation:class-names draw:frame
- presentation:class-names draw:g
- presentation:class-names draw:line
- presentation:class-names draw:measure
- presentation:class-names draw:page-thumbnail
- presentation:class-names draw:path
- presentation:class-names draw:polygon
- presentation:class-names draw:polyline
- presentation:class-names draw:rect
- presentation:class-names draw:regular-polygon
- presentation:class-names office:annotation
-
-text
- text:class-names text:span
diff --git a/apps/files_odfviewer/src/webodf/webodf/testrelaxng.js b/apps/files_odfviewer/src/webodf/webodf/testrelaxng.js
deleted file mode 100644
index 875faa9de8d..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/testrelaxng.js
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, xmldom: true*/
-runtime.loadClass("xmldom.RelaxNG");
-runtime.loadClass("xmldom.RelaxNG2");
-
-function validate(relaxng, relaxng2, url) {
- "use strict";
- runtime.loadXML(url, function (err, dom) {
- var walker;
- if (err) {
- runtime.log("Could not read " + url + ": " + err);
- } else {
- walker = dom.createTreeWalker(dom.firstChild, 0xFFFFFFFF);
- relaxng.validate(walker, function (err) {
- if (err) {
- var i;
- runtime.log("Found " + String(err.length) +
- " error validating " + url + ":");
- for (i = 0; i < err.length; i += 1) {
- runtime.log(err[i].message());
- }
- }
- });
- relaxng2.validate(walker, function (err) {
- if (err) {
- var i;
- runtime.log("Found " + String(err.length) +
- " error validating " + url + ":");
- for (i = 0; i < err.length; i += 1) {
- runtime.log(err[i].message());
- }
- }
- });
- }
- });
-}
-
-var args = arguments,
- relaxngurl = args[1];
-
-// load and parse the Relax NG
-runtime.loadXML(relaxngurl, function (err, dom) {
- "use strict";
- var parser, i, relaxng, relaxng2;
- if (err) {
- return;
- }
- parser = new xmldom.RelaxNGParser();
- relaxng = new xmldom.RelaxNG();
- relaxng2 = new xmldom.RelaxNG2();
- err = parser.parseRelaxNGDOM(dom, relaxng.makePattern);
- relaxng.init(parser.rootPattern);
- relaxng2.init(parser.start, parser.nsmap);
-
- // loop over arguments to load ODF
- for (i = 2; i < args.length; i += 1) {
- runtime.log("Validating " + args[i] + " from " + relaxngurl);
- validate(relaxng, relaxng2, args[i]);
- }
-});
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/core/Base64Tests.js b/apps/files_odfviewer/src/webodf/webodf/tests/core/Base64Tests.js
deleted file mode 100644
index 10156a1dc4d..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/core/Base64Tests.js
+++ /dev/null
@@ -1,105 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global core: true, runtime: true*/
-runtime.loadClass("core.Base64");
-/**
- * @constructor
- * @param runner {UnitTestRunner}
- * @implements {core.UnitTest}
- */
-core.Base64Tests = function Base64Tests(runner) {
- "use strict";
- var t, r = runner, base64 = new core.Base64();
-
- function testConvertByteArrayToBase64() {
- t.encoded = base64.convertByteArrayToBase64([65]);
- r.shouldBe(t, "t.encoded", "'QQ=='");
- t.encoded = base64.convertByteArrayToBase64([65, 65]);
- r.shouldBe(t, "t.encoded", "'QUE='");
- t.encoded = base64.convertByteArrayToBase64([65, 65, 65]);
- r.shouldBe(t, "t.encoded", "'QUFB'");
- }
-
- function testToBase64() {
- t.encoded = base64.toBase64("A");
- r.shouldBe(t, "t.encoded", "'QQ=='");
- t.encoded = base64.toBase64("AA");
- r.shouldBe(t, "t.encoded", "'QUE='");
- t.encoded = base64.toBase64("AAA");
- r.shouldBe(t, "t.encoded", "'QUFB'");
- }
-
- function testConvertUTF8StringToUTF16String(callback) {
- var bin = "1234567890";
- while (bin.length < 100000) {
- bin += bin;
- }
- t.numcallbacks = 0;
- base64.convertUTF8StringToUTF16String(bin, function (str, done) {
- t.numcallbacks += 1;
- t.done = done;
- if (t.numcallbacks === 1) {
- r.shouldBe(t, "t.done", "false");
- } else {
- r.shouldBe(t, "t.done", "true");
- }
- if (done) {
- r.shouldBe(t, "t.numcallbacks", "2");
- t.str = str;
- t.bin = bin;
- r.shouldBe(t, "t.str.length", "t.bin.length");
- callback();
- }
- return true;
- });
- }
-
- this.setUp = function () {
- t = {};
- };
- this.tearDown = function () {
- t = {};
- };
- this.tests = function () {
- return [
- testConvertByteArrayToBase64,
- testToBase64
- ];
- };
- this.asyncTests = function () {
- return [ testConvertUTF8StringToUTF16String ];
- };
- this.description = function () {
- return "Test the Base64 class.";
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/core/CursorTests.js b/apps/files_odfviewer/src/webodf/webodf/tests/core/CursorTests.js
deleted file mode 100644
index c9f7be78a6f..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/core/CursorTests.js
+++ /dev/null
@@ -1,238 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global core: true, runtime: true*/
-runtime.loadClass("core.Cursor");
-
-/**
- * @constructor
- * @param {core.UnitTestRunner} runner
- * @implements {core.UnitTest}
- */
-core.CursorTests = function CursorTests(runner) {
- "use strict";
- var r = runner, tests, t = {},
- maindoc = runtime.getWindow().document,
- testarea = maindoc.getElementById("testarea");
- /**
- * @param {Selection} selection
- * @param {Node} startnode
- * @param {number} startoffset
- * @param {Node=} endnode
- * @param {number=} endoffset
- * @return {undefined}
- */
- function setSelection(selection, startnode, startoffset, endnode,
- endoffset) {
- // call createRange() on the document, even if startnode is the document
- var range = (startnode.ownerDocument || startnode).createRange();
- selection.removeAllRanges();
- range.setStart(startnode, startoffset);
- if (endnode) {
- range.setEnd(endnode, endoffset);
- } else {
- range.setEnd(startnode, startoffset);
- }
- selection.addRange(range);
- if (range.startContainer !== startnode) {
- runtime.log("EVIL");
- }
- }
-
- function setupEmptyRootNode() {
- var selection = runtime.getWindow().getSelection(),
- root = maindoc.createElementNS("", "p"),
- cursor = new core.Cursor(selection, maindoc);
- testarea.appendChild(root);
- t = { selection: selection, root: root, cursor: cursor };
- runner.shouldBeNonNull(t, "t.selection");
- }
-
- function setupSimpleTextDoc() {
- setupEmptyRootNode();
- t.textnode = maindoc.createTextNode("abc");
- t.root.appendChild(t.textnode);
- }
-
- tests = [
- // create a document, add a cursor and check that the cursor is present
- function testOnEmptyNode1() {
- // if the document is the container of the selection, the cursor
- // can not be in the DOM
- setupEmptyRootNode();
- setSelection(t.selection, t.root, 0);
- t.cursor.updateToSelection();
- //r.shouldBeNull(t, "t.cursor.getNode().parentNode");
- },
- function testOnEmptyNode2() {
- setupEmptyRootNode();
- setSelection(t.selection, t.root, 0);
- // t.selection.focusNode = r.root;
- var range = t.selection.getRangeAt(0);
- t.cursor.updateToSelection();
- r.shouldBeNonNull(t, "t.cursor.getNode().parentNode");
- r.shouldBeNull(t, "t.cursor.getNode().previousSibling");
- r.shouldBeNull(t, "t.cursor.getNode().nextSibling");
- },
- function testOnSimpleText() {
- setupSimpleTextDoc();
- // put the cursor at the start of the text node
- setSelection(t.selection, t.textnode, 0);
- t.cursor.updateToSelection();
- r.shouldBeNonNull(t, "t.cursor.getNode().parentNode");
- r.shouldBeNull(t, "t.cursor.getNode().previousSibling");
- r.shouldBe(t, "t.cursor.getNode().nextSibling.nodeValue", "'abc'");
- },
- function testOnSimpleText2() {
- setupSimpleTextDoc();
- // put the cursor in the middle of the text node
- setSelection(t.selection, t.textnode, 1);
- t.cursor.updateToSelection();
- r.shouldBeNonNull(t, "t.cursor.getNode().parentNode");
- r.shouldBe(t, "t.cursor.getNode().previousSibling.nodeValue", "'a'");
- r.shouldBe(t, "t.cursor.getNode().nextSibling.nodeValue", "'bc'");
- },
- function testOnSimpleText3() {
- setupSimpleTextDoc();
- // put the cursor at the end of the text node
- setSelection(t.selection, t.textnode, 3);
- t.cursor.updateToSelection();
- r.shouldBeNonNull("t.cursor.getNode().parentNode");
- r.shouldBe(t, "t.cursor.getNode().previousSibling.nodeValue", "'abc'");
- r.shouldBeNull(t, "t.cursor.getNode().nextSibling");
- },
- function testOnSimpleText4() {
- var textnode2;
- setupSimpleTextDoc();
- // put the cursor between 'a' and 'b', then change the selection to
- // be between 'b' and 'c' and update the cursor
- setSelection(t.selection, t.textnode, 1);
- t.cursor.updateToSelection();
- textnode2 = t.cursor.getNode().nextSibling;
- setSelection(t.selection, textnode2, 1);
- t.cursor.updateToSelection();
- r.shouldBeNonNull(t, "t.cursor.getNode().parentNode");
- r.shouldBe(t, "t.cursor.getNode().previousSibling.nodeValue", "'ab'");
- r.shouldBe(t, "t.cursor.getNode().nextSibling.nodeValue", "'c'");
- },
- function testOnSimpleText5() {
- var textnode2;
- setupSimpleTextDoc();
- // put the cursor between 'a' and 'b', then change the selection to
- // span the entire text and update the cursor
- setSelection(t.selection, t.textnode, 1);
- t.cursor.updateToSelection();
- textnode2 = t.cursor.getNode().nextSibling;
- setSelection(t.selection, t.textnode, 0, textnode2, 2);
- t.cursor.updateToSelection();
- r.shouldBe(t, "t.selection.rangeCount", "1");
-// only null if working on a separate document
-// r.shouldBeNull(t, "t.cursor.getNode().parentNode");
- t.range = t.selection.getRangeAt(0);
- r.shouldBe(t, "t.range.startContainer", "t.textnode");
- r.shouldBe(t, "t.range.startOffset", "0");
- r.shouldBe(t, "t.range.endContainer", "t.textnode");
- r.shouldBe(t, "t.range.endOffset", "3");
- },
- function testOnSimpleText5b() {
- var textnode2;
- setupSimpleTextDoc();
- setSelection(t.selection, t.textnode, 1);
- t.cursor.updateToSelection();
- textnode2 = t.cursor.getNode().nextSibling;
- setSelection(t.selection, t.textnode.parentNode, 1, textnode2, 2);
- t.cursor.updateToSelection();
- r.shouldBe(t, "t.selection.rangeCount", "1");
-// only null if working on a separate document
-// r.shouldBeNull(t, "t.cursor.getNode().parentNode");
- t.range = t.selection.getRangeAt(0);
- r.shouldBe(t, "t.range.startContainer", "t.textnode");
- r.shouldBe(t, "t.range.startOffset", "1");
- r.shouldBe(t, "t.range.endContainer", "t.textnode");
- r.shouldBe(t, "t.range.endOffset", "3");
- },
- function testOnSimpleText6() {
- var somenode, textnode2;
- setupSimpleTextDoc();
- // add a child node to the cursor
- somenode = maindoc.createElement("p");
- t.cursor.getNode().appendChild(somenode);
- // select a single position so the cursor is put in the document
- setSelection(t.selection, t.textnode, 1);
- t.cursor.updateToSelection();
- r.shouldBeNonNull(t, "t.cursor.getNode().parentNode");
- textnode2 = t.cursor.getNode().nextSibling;
- // select a range starting at the node in the cursor, but extends
- // out of the the cursor
- // this should have the result that the cursor is removed from the
- // document and that the text nodes around the cursor are
- // merged
- setSelection(t.selection, somenode, 0, textnode2, 2);
- t.cursor.updateToSelection();
-// only null if working on a separate document
-// r.shouldBeNull(t, "t.cursor.getNode().parentNode");
- t.range = t.selection.getRangeAt(0);
- r.shouldBe(t, "t.range.startContainer", "t.textnode");
- r.shouldBe(t, "t.range.startOffset", "1");
- r.shouldBe(t, "t.range.endContainer", "t.textnode");
- r.shouldBe(t, "t.range.endOffset", "3");
- r.shouldBe(t, "t.range.collapsed", "false");
- }
- ];
- this.setUp = function () {
- t = {};
- while (testarea.firstChild) {
- testarea.removeChild(testarea.firstChild);
- }
- };
- this.tearDown = function () {
- t = {};
- while (testarea.firstChild) {
- testarea.removeChild(testarea.firstChild);
- }
- };
- this.tests = function () {
- return tests;
- };
- this.asyncTests = function () {
- return [];
- };
-};
-core.CursorTests.name = "CursorTests";
-core.CursorTests.prototype.description = function () {
- "use strict";
- return "Test the Cursor class.";
-};
-(function () {
- "use strict";
- return core.CursorTests;
-}());
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/core/PointWalkerTests.js b/apps/files_odfviewer/src/webodf/webodf/tests/core/PointWalkerTests.js
deleted file mode 100644
index dbb690f77ed..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/core/PointWalkerTests.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global core: true, runtime: true*/
-runtime.loadClass("core.PointWalker");
-
-/**
- * @constructor
- * @param runner {UnitTestRunner}
- * @implements {core.UnitTest}
- */
-core.PointWalkerTests = function PointWalkerTests(runner) {
- "use strict";
- var t, r = runner;
-
- function checkWalker(node, count, endpos) {
- t = {};
- t.node = node;
- t.walker = new core.PointWalker(node);
- t.count = count;
- t.countForward = 0;
- t.countBackward = 0;
- t.endpos = endpos;
- t.walker.setPoint(t.node, 0);
- while (t.walker.stepForward()) {
- t.countForward += 1;
- }
- r.shouldBe(t, "t.countForward", "t.count");
- r.shouldBe(t, "t.walker.precedingSibling()", "t.node.lastChild");
- r.shouldBe(t, "t.walker.followingSibling()", "null");
- if (endpos !== null) {
- r.shouldBe(t, "t.walker.position()", "t.endpos");
- }
- t.walker.setPoint(t.node, endpos);
- while (t.walker.stepBackward()) {
- t.countBackward += 1;
- }
- r.shouldBe(t, "t.countBackward", "t.count");
- r.shouldBe(t, "t.walker.precedingSibling()", "null");
- r.shouldBe(t, "t.walker.followingSibling()", "t.node.firstChild");
- r.shouldBe(t, "t.walker.position()", "0");
- }
-
- function testEmptyDocument() {
- var doc = runtime.getDOMImplementation().createDocument("", "p", null),
- p = doc.firstChild,
- textnode1,
- textnode2,
- textnode3,
- em;
-
- checkWalker(doc, 2, 1);
- checkWalker(p, 0, 0);
-
- t = {};
- t.doc = doc;
- t.walker = new core.PointWalker(t.doc);
- r.shouldBe(t, "t.walker.position()", "0");
- r.shouldBe(t, "t.walker.stepForward()", "true");
- r.shouldBe(t, "t.walker.position()", "0");
- r.shouldBe(t, "t.walker.stepForward()", "true");
- r.shouldBe(t, "t.walker.position()", "1");
- r.shouldBe(t, "t.walker.stepForward()", "false");
- r.shouldBe(t, "t.walker.position()", "1");
- r.shouldBe(t, "t.walker.stepBackward()", "true");
- r.shouldBe(t, "t.walker.position()", "0");
- r.shouldBe(t, "t.walker.stepBackward()", "true");
- r.shouldBe(t, "t.walker.position()", "0");
- r.shouldBe(t, "t.walker.stepBackward()", "false");
- r.shouldBe(t, "t.walker.position()", "0");
-
- textnode1 = doc.createTextNode("hello, ");
- textnode2 = doc.createTextNode("big ");
- textnode3 = doc.createTextNode("world.");
- em = doc.createElement('em');
- p.appendChild(textnode1);
- p.appendChild(em);
- em.appendChild(textnode2);
- p.appendChild(textnode3);
-
- checkWalker(textnode1, 7, 7);
- checkWalker(textnode2, 4, 4);
- checkWalker(textnode3, 6, 6);
- checkWalker(em, 6, 1);
- checkWalker(p, 25, 3);
- checkWalker(doc, 27, 1);
- }
-
- this.setUp = function () {
- t = {};
- };
- this.tearDown = function () {
- t = {};
- };
- this.tests = function () {
- return [
- testEmptyDocument
- ];
- };
- this.asyncTests = function () {
- return [];
- };
- this.description = function () {
- return "Test the PointWalker class.";
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/core/RuntimeTests.js b/apps/files_odfviewer/src/webodf/webodf/tests/core/RuntimeTests.js
deleted file mode 100644
index d3f7c2dfa2a..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/core/RuntimeTests.js
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global core: true, runtime: true*/
-/*jslint bitwise: true*/
-
-/**
- * @constructor
- * @param runner {UnitTestRunner}
- * @implements {core.UnitTest}
- */
-core.RuntimeTests = function RuntimeTests(runner) {
- "use strict";
- var t, r = runner;
-
- function testRead(callback) {
- runtime.read("tests.js", 2, 6, function (err, data) {
- t.err = err;
- r.shouldBeNull(t, "t.err");
- t.data = runtime.byteArrayToString(data, "utf8");
- r.shouldBe(t, "t.data", "'global'");
- callback();
- });
- }
-
- /**
- * Test writing a binary file and reading it back.
- */
- function testWrite(callback) {
- var content = new core.ByteArrayWriter("utf8"),
- i, max = 1024, filename, clean;
- for (i = 0; i < max; i += 1) {
- content.appendArray([i]);
- }
- content = content.getByteArray();
- filename = "tmp" + Math.random();
- clean = new core.ByteArrayWriter("utf8");
- for (i = 0; i < max; i += 1) {
- clean.appendArray([content[i] & 0xff]);
- }
- clean = clean.getByteArray();
- // now content has content different from what is on the server
- runtime.writeFile(filename, content, function (err) {
- t.err = err;
- r.shouldBeNull(t, "t.err");
- runtime.readFile(filename, "binary", function (err, data) {
- t.err = err;
- r.shouldBeNull(t, "t.err");
- t.data = data;
- t.clean = clean;
- r.shouldBe(t, "t.data.length", "t.clean.length");
- i = 0;
- while (i < max && data[i] === clean[i]) {
- i += 1;
- }
- if (i !== max) {
- runtime.log("at " + String(i) + " " + data[i] + " vs " +
- clean[i]);
- }
- t.i = i;
- t.max = max;
- r.shouldBe(t, "t.i", "t.max");
- // cleanup
- runtime.deleteFile(filename, function (err) {
- callback();
- });
- });
- });
- }
-
- this.setUp = function () {
- t = {};
- };
- this.tearDown = function () {
- t = {};
- };
- this.tests = function () {
- return [
- ];
- };
- this.asyncTests = function () {
- return [
- testRead,
- testWrite
- ];
- };
- this.description = function () {
- return "Test the runtime.";
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/core/ZipTests.js b/apps/files_odfviewer/src/webodf/webodf/tests/core/ZipTests.js
deleted file mode 100644
index ad2ece55ad6..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/core/ZipTests.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global core: true, runtime: true*/
-runtime.loadClass("core.Zip");
-
-/**
- * @constructor
- * @param {core.UnitTestRunner} runner
- * @implements {core.UnitTest}
- */
-core.ZipTests = function ZipTests(runner) {
- "use strict";
- var r = runner,
- t;
-
- function testNonExistingFile(callback) {
- var zip = new core.Zip("whatever", function (err) {
- t.err = err;
- r.shouldBeNonNull(t, "t.err");
- callback();
- });
- }
-
- function testNonZipFile(callback) {
- var path = "core/ZipTests.js";
- // check that file exists
- runtime.isFile(path, function (exists) {
- t.exists = exists;
- r.shouldBe(t, "t.exists", "true");
- // check that zip file opening returns an error
- var zip = new core.Zip("core/ZipTests.js", function (err) {
- t.err = err;
- r.shouldBeNonNull(t, "t.err");
- callback();
- });
- });
- }
-
- function testHi(path, callback) {
- var zip = new core.Zip(path, function (err, zip) {
- t.err = err;
- t.zip = zip;
- r.shouldBeNull(t, "t.err");
- zip.load("hello", function (err, data) {
- t.err = err;
- r.shouldBeNull(t, "t.err");
- t.data = runtime.byteArrayToString(data, "utf8");
- r.shouldBe(t, "t.data.length", "16");
- r.shouldBe(t, "t.data", "'bonjour\\nbonjour\\n'");
- callback();
- });
- });
- }
-
- function testHiUncompressed(callback) {
- testHi("core/hi-uncompressed.zip", callback);
- }
-
- function testHiCompressed(callback) {
- testHi("core/hi-compressed.zip", callback);
- }
-
- function testCreateZip(callback) {
- var filename = "writetest.zip",
- zip = new core.Zip(filename, null),
- data = runtime.byteArrayFromString(
- "application/vnd.oasis.opendocument.text", "utf8");
- zip.save("mimetype", data, false, new Date());
- zip.load("mimetype", function (err, newdata) {
- t.err = err;
- r.shouldBeNull(t, "t.err");
- t.data = data;
- t.newdata = newdata;
- r.shouldBe(t, "t.data", "t.newdata");
- zip.write(function (err) {
- t.err = err;
- r.shouldBeNull(t, "t.err");
- runtime.deleteFile(filename, function (err) {
- callback();
- });
- });
- });
- }
-
- this.setUp = function () {
- t = {};
- };
- this.tearDown = function () {
- t = {};
- };
- this.tests = function () {
- return [];
- };
- this.asyncTests = function () {
- return [
- testNonExistingFile,
- testNonZipFile,
- testHiUncompressed,
- testHiCompressed,
- testCreateZip
- ];
- };
-};
-core.ZipTests.prototype.description = function () {
- "use strict";
- return "Test the Zip class.";
-};
-(function () {
- "use strict";
- return core.ZipTests;
-}());
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/core/hi-compressed.zip b/apps/files_odfviewer/src/webodf/webodf/tests/core/hi-compressed.zip
deleted file mode 100644
index ff6d86c158a..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/core/hi-compressed.zip
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/core/hi-uncompressed.zip b/apps/files_odfviewer/src/webodf/webodf/tests/core/hi-uncompressed.zip
deleted file mode 100644
index 2eafff7ab92..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/core/hi-uncompressed.zip
+++ /dev/null
Binary files differ
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/gui/CaretTests.js b/apps/files_odfviewer/src/webodf/webodf/tests/gui/CaretTests.js
deleted file mode 100644
index 05f1b9bcc56..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/gui/CaretTests.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, core: true, gui: true*/
-runtime.loadClass("gui.Caret");
-
-/**
- * @constructor
- * @param {core.UnitTestRunner} runner
- * @implements {core.UnitTest}
- */
-gui.CaretTests = function CaretTests(runner) {
- "use strict";
- var r = runner,
- t;
-
- function setupEmptyDoc() {
- var selection = runtime.getWindow().getSelection(),
- doc = runtime.getDOMImplementation().createDocument("", "p", null),
- caret = new gui.Caret(selection, doc);
- t = { selection: selection, doc: doc }; //, cursor: cursor };
- runner.shouldBeNonNull(t, "t.selection");
- }
- function setupSimpleTextDoc() {
- setupEmptyDoc();
- t.textnode = t.doc.createTextNode("abc");
- t.doc.documentElement.appendChild(t.textnode);
- }
- function testOnUpDownTraversal() {
- }
-
- this.setUp = function () {
- t = {};
- };
- this.tearDown = function () {
- t = {};
- };
- this.tests = function () {
- return [];
- };
- this.asyncTests = function () {
- return [
- ];
- };
-};
-gui.CaretTests.prototype.description = function () {
- "use strict";
- return "Test the Caret class.";
-};
-(function () {
- "use strict";
- return gui.CaretTests;
-}());
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/gui/SelectionMoverTests.js b/apps/files_odfviewer/src/webodf/webodf/tests/gui/SelectionMoverTests.js
deleted file mode 100644
index 8b8275bcb8f..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/gui/SelectionMoverTests.js
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, core: true, gui: true*/
-runtime.loadClass("gui.SelectionMover");
-
-/**
- * @constructor
- * @param {core.UnitTestRunner} runner
- * @implements {core.UnitTest}
- */
-gui.SelectionMoverTests = function SelectionMoverTests(runner) {
- "use strict";
- var r = runner,
- t, testarea = runtime.getWindow().document.getElementById("testarea");
-
- function setupDoc() {
- var doc = testarea.ownerDocument,
- selection = runtime.getWindow().getSelection(),
- p = doc.createElement("p"),
- walker = new core.PointWalker(p),
- mover = new gui.SelectionMover(selection, walker);
- testarea.appendChild(p);
- p.appendChild(doc.createTextNode("MMMMM MMMMM MMMMM MMMMM MMMMM"));
- p.style.width = "5em";// break line after each 'MMMMM'
- selection.removeAllRanges();
- selection.addRange(doc.createRange());
- t = { doc: doc, p: p, selection: selection, mover: mover };
- }
- function testUpDownTraversal() {
- setupDoc();
- r.shouldBe(t, "t.selection.rangeCount", "1");
- t.r = t.selection.getRangeAt(0);
- r.shouldBeNonNull(t, "t.r");
- t.r.setStart(t.p.firstChild, 0);
- r.shouldBe(t, "t.r.startContainer", "t.p.firstChild");
- r.shouldBe(t, "t.r.startOffset", "0");
- t.mover.movePointForward();
- t.r = t.selection.getRangeAt(0);
- r.shouldBe(t, "t.r.startContainer", "t.p.firstChild");
- r.shouldBe(t, "t.r.startOffset", "1");
- t.mover.movePointBackward();
- t.r = t.selection.getRangeAt(0);
- r.shouldBe(t, "t.r.startContainer", "t.p.firstChild");
- r.shouldBe(t, "t.r.startOffset", "0");
- t.mover.moveLineForward();
-// t.selection.modify("move", "forward", "line");
- t.r = t.selection.getRangeAt(0);
- r.shouldBe(t, "t.r.startContainer", "t.p.firstChild");
- r.shouldBe(t, "t.r.startOffset", "6");
- }
-
- this.setUp = function () {
- t = {};
- while (testarea.firstChild) {
- testarea.removeChild(testarea.firstChild);
- }
- };
- this.tearDown = function () {
- t = {};
- while (testarea.firstChild) {
- testarea.removeChild(testarea.firstChild);
- }
- };
- this.tests = function () {
- return [ testUpDownTraversal ];
- };
- this.asyncTests = function () {
- return [
- ];
- };
-};
-gui.SelectionMoverTests.prototype.description = function () {
- "use strict";
- return "Test the SelectionMover class.";
-};
-(function () {
- "use strict";
- return gui.SelectionMoverTests;
-}());
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/gui/XMLEditTests.js b/apps/files_odfviewer/src/webodf/webodf/tests/gui/XMLEditTests.js
deleted file mode 100644
index e253a72fea8..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/gui/XMLEditTests.js
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global document: true, core: true, gui: true, runtime: true*/
-runtime.loadClass("core.PointWalker");
-runtime.loadClass("gui.XMLEdit");
-
-/**
- * @constructor
- * @param runner {core.UnitTestRunner}
- * @implements {core.UnitTest}
- */
-gui.XMLEditTests = function XMLEditTests(runner) {
- "use strict";
- var t, r = runner, tests;
-
- function checkWalker(node, count, endpos) {
- t = {};
- t.node = node;
- t.walker = new core.PointWalker(node);
- t.count = count;
- t.countForward = 0;
- t.countBackward = 0;
- t.endpos = endpos;
- t.walker.setPoint(t.node, 0);
- while (t.walker.stepForward()) {
- t.countForward += 1;
- }
- r.shouldBe("t.countForward", "t.count");
- r.shouldBe("t.walker.precedingSibling()", "t.node.lastChild");
- r.shouldBe("t.walker.followingSibling()", "null");
- if (endpos !== null) {
- r.shouldBe("t.walker.position()", "t.endpos");
- }
- t.walker.setPoint(t.node, endpos);
- while (t.walker.stepBackward()) {
- t.countBackward += 1;
- }
- r.shouldBe("t.countBackward", "t.count");
- r.shouldBe("t.walker.precedingSibling()", "null");
- r.shouldBe("t.walker.followingSibling()", "t.node.firstChild");
- r.shouldBe("t.walker.position()", "0");
- }
-
- function testSimpleDocument(xmledit) {
- var maindoc = xmledit.ownerDocument,
- doc = maindoc.implementation.createDocument(null, "p", null),
- p = doc.firstChild,
- textnode1,
- textnode2,
- textnode3,
- em;
-
- xmledit.setXML(doc);
-
- checkWalker(doc, 2, 1);
- checkWalker(p, 0, 0);
-
- t = {};
- t.doc = doc;
- t.walker = new core.PointWalker(t.doc);
- r.shouldBe("t.walker.position()", "0");
- r.shouldBe("t.walker.stepForward()", "true");
- r.shouldBe("t.walker.position()", "0");
- r.shouldBe("t.walker.stepForward()", "true");
- r.shouldBe("t.walker.position()", "1");
- r.shouldBe("t.walker.stepForward()", "false");
- r.shouldBe("t.walker.position()", "1");
- r.shouldBe("t.walker.stepBackward()", "true");
- r.shouldBe("t.walker.position()", "0");
- r.shouldBe("t.walker.stepBackward()", "true");
- r.shouldBe("t.walker.position()", "0");
- r.shouldBe("t.walker.stepBackward()", "false");
- r.shouldBe("t.walker.position()", "0");
-
- textnode1 = doc.createTextNode("hello, ");
- textnode2 = doc.createTextNode("big ");
- textnode3 = doc.createTextNode("world.");
- em = doc.createElement('em');
- p.appendChild(textnode1);
- p.appendChild(em);
- em.appendChild(textnode2);
- p.appendChild(textnode3);
-
- checkWalker(textnode1, 7, 7);
- checkWalker(textnode2, 4, 4);
- checkWalker(textnode3, 6, 6);
- checkWalker(em, 6, 1);
- checkWalker(p, 25, 3);
- checkWalker(doc, 27, 1);
- }
-
- function testXmlEdit(document) {
- var head = document.getElementsByTagName("head")[0],
- css = document.createElement("style"),
- testarea = document.createElement("div"),
- xmledit;
-
- // the xml edit requires an element to put the content and a sheet to put
- // the style
- css.type = "text/css";
- head.appendChild(css);
- document.body.appendChild(testarea);
- xmledit = new gui.XMLEdit(testarea, css);
-
- testSimpleDocument(xmledit);
-
- css.parentNode.removeChild(css);
- testarea.parentNode.removeChild(testarea);
- }
-
- this.setUp = function () {
- t = {};
- };
- this.tearDown = function () {
- t = {};
- };
- this.tests = function () {
- return [ testSimpleDocument ];
- };
- this.asyncTests = function () {
- return [];
- };
- this.description = function () {
- return "Test the XML editor class.";
- };
-};
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/manifest.js b/apps/files_odfviewer/src/webodf/webodf/tests/manifest.js
deleted file mode 100644
index 6d4f151bc09..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/manifest.js
+++ /dev/null
@@ -1,16 +0,0 @@
-(function () {
- "use strict";
-return [
- "core/Base64Tests.js",
- "core/CursorTests.js",
- "core/PointWalkerTests.js",
- "core/RuntimeTests.js",
- "core/ZipTests.js",
- "gui/CaretTests.js",
- "gui/SelectionMoverTests.js",
- "gui/XMLEditTests.js",
- "tests.js",
- "xmldom/OperationalTransformDOMTests.js",
- "xmldom/XPathTests.js"
- ];
-}());
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/resources/js-test-style.css b/apps/files_odfviewer/src/webodf/webodf/tests/resources/js-test-style.css
deleted file mode 100644
index f12147ca432..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/resources/js-test-style.css
+++ /dev/null
@@ -1,12 +0,0 @@
-.pass {
- font-weight: bold;
- color: green;
-}
-.fail {
- font-weight: bold;
- color: red;
-}
-#console {
- white-space: pre-wrap;
- font-family: monospace;
-}
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/tests.html b/apps/files_odfviewer/src/webodf/webodf/tests/tests.html
deleted file mode 100644
index 572db60554e..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/tests.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<html>
- <head>
- <title>WebODF unit tests</title>
- <link rel="stylesheet" href="resources/js-test-style.css"></link>
- </head>
- <body>
- <p id="description"></p>
- <div id="console"></div>
- <div id="testarea"></div>
- <div id="logoutput"></div>
- <script src="../lib/runtime.js"></script>
-<script type="text/javascript" charset="utf-8">
-runtime.libraryPaths = (function () {
- return function () {
- return ["../lib", "."];
- }
-}());
-</script>
- <script src="tests.js"></script>
- </body>
-</html>
-
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/tests.js b/apps/files_odfviewer/src/webodf/webodf/tests/tests.js
deleted file mode 100644
index 5570733de58..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/tests.js
+++ /dev/null
@@ -1,94 +0,0 @@
-/*global window: true, runtime: true, Runtime: true, core: true, gui: true,
- xmldom: true, RuntimeTests: true*/
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-runtime.loadClass("core.RuntimeTests");
-runtime.loadClass("core.UnitTester");
-runtime.loadClass("core.PointWalkerTests");
-runtime.loadClass("core.CursorTests");
-runtime.loadClass("core.ZipTests");
-runtime.loadClass("core.Base64Tests");
-runtime.loadClass("xmldom.OperationalTransformDOMTests");
-runtime.loadClass("xmldom.XPathTests");
-runtime.loadClass("gui.CaretTests");
-runtime.loadClass("gui.XMLEditTests");
-
-var tests = [
- core.RuntimeTests, // temporarily disabled, enable at next commit!
- core.ZipTests,
- core.Base64Tests
-];
-if (runtime.type() !== "NodeJSRuntime") {
- tests.push(core.PointWalkerTests);
-}
-if (runtime.type() === "BrowserRuntime") {
- tests.push(core.PointWalkerTests);
-// tests.push(core.CursorTests);
- tests.push(xmldom.OperationalTransformDOMTests);
- tests.push(gui.CaretTests);
- tests.push(xmldom.XPathTests);
-// tests.push(gui.XMLEditTests);
-}
-var tester = new core.UnitTester();
-/**
- * @param {!Array.<Function>} tests
- * @return {undefined}
- */
-function runNextTest(tests) {
- "use strict";
- if (tests.length === 0) {
- //runtime.log(JSON.stringify(tester.results()));
- runtime.log("Number of failed tests: " +
- String(tester.countFailedTests()));
- runtime.exit(tester.countFailedTests());
- return;
- }
- var test = tests[0];
- if (typeof test !== "function") {
- runtime.log("Tests contain a non-function object of type " +
- typeof(test) + ".");
- runtime.exit(1);
- return;
- }
- runtime.log("Running test '" + Runtime.getFunctionName(test) + "'.");
- try {
- tester.runTests(test, function () {
- runNextTest(tests.slice(1));
- });
- } catch (e) {
- runtime.log(e);
- runtime.exit(1);
- throw e;
- }
-}
-runNextTest(tests);
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/xmldom/OperationalTransformDOMTests.js b/apps/files_odfviewer/src/webodf/webodf/tests/xmldom/OperationalTransformDOMTests.js
deleted file mode 100644
index 3866a537080..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/xmldom/OperationalTransformDOMTests.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, core: true, xmldom: true*/
-runtime.loadClass("xmldom.OperationalTransformDOM");
-
-/**
- * @constructor
- * @param {core.UnitTestRunner} runner
- * @implements {core.UnitTest}
- */
-xmldom.OperationalTransformDOMTests = function OperationalTransformDOMTests(runner) {
- "use strict";
- var r = runner,
- t;
-
- function setupEmptyDoc() {
- var doc = runtime.getDOMImplementation().createDocument("", "p", null);
- t = { doc: doc };
- }
- function setupSimpleTextDoc() {
- setupEmptyDoc();
- t.textnode = t.doc.createTextNode("abc");
- t.doc.documentElement.appendChild(t.textnode);
- }
- function testSkip() {
- setupEmptyDoc();
- }
- this.setUp = function () {
- t = {};
- };
- this.tearDown = function () {
- t = {};
- };
- this.tests = function () {
- return [ testSkip ];
- };
- this.asyncTests = function () {
- return [
- ];
- };
-};
-xmldom.OperationalTransformDOMTests.prototype.description = function () {
- "use strict";
- return "Test the OperationalTransformDOM class.";
-};
-(function () {
- "use strict";
- return xmldom.OperationalTransformDOMTests;
-}());
diff --git a/apps/files_odfviewer/src/webodf/webodf/tests/xmldom/XPathTests.js b/apps/files_odfviewer/src/webodf/webodf/tests/xmldom/XPathTests.js
deleted file mode 100644
index 91ebba99c61..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tests/xmldom/XPathTests.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, core: true, xmldom: true, odf: true, XMLSerializer*/
-runtime.loadClass("xmldom.XPath");
-runtime.loadClass("odf.Style2CSS");
-
-/**
- * @constructor
- * @param {core.UnitTestRunner} runner
- * @implements {core.UnitTest}
- */
-xmldom.XPathTests = function XPathTests(runner) {
- "use strict";
- var r = runner,
- style2CSS = new odf.Style2CSS(),
- t;
-
- function setupDoc() {
- var stylens = style2CSS.namespaceResolver("style"),
- svgns = style2CSS.namespaceResolver("svg"),
- drawns = style2CSS.namespaceResolver("draw"),
- presentationns = style2CSS.namespaceResolver("presentation"),
- textns = style2CSS.namespaceResolver("text"),
- doc = runtime.getDOMImplementation().createDocument("", "a", null),
- r = doc.documentElement,
- fontFace = doc.createElementNS(stylens, "font-face"),
- fontFaceSrc = doc.createElementNS(svgns, "font-face-src"),
- drawFrame = doc.createElementNS(drawns, "frame"),
- p = doc.createElementNS(textns, "p");
- r.appendChild(p);
- r.appendChild(fontFace);
- fontFace = doc.createElementNS(stylens, "font-face");
- fontFace.appendChild(fontFaceSrc);
- fontFaceSrc.setAttributeNS(textns, "anchor-type", "paragraph");
- r.appendChild(fontFace);
- r.appendChild(drawFrame);
- drawFrame = doc.createElementNS(drawns, "frame");
- drawFrame.setAttributeNS(presentationns, "class", "title");
- r.appendChild(drawFrame);
-
- t = { doc: doc, fontFace: fontFace, drawFrame: drawFrame };
- }
- function test1() {
- setupDoc();
- var xpath = new xmldom.XPath(),
- xpaths = {
- "style:font-face[svg:font-face-src]": "t.fontFace",
- ".//*[*[@text:anchor-type='paragraph']]": "t.fontFace",
- "./draw:frame[@presentation:class='title']": "t.drawFrame"
- },
- x;
- for (x in xpaths) {
- if (xpaths.hasOwnProperty(x)) {
- t.result = xpath.getODFElementsWithXPath(t.doc.documentElement,
- x, style2CSS.namespaceResolver);
- r.shouldBe(t, "t.result.length", "1");
- r.shouldBe(t, "t.result[0]", xpaths[x]);
- }
- }
- }
- this.setUp = function () {
- t = {};
- };
- this.tearDown = function () {
- t = {};
- };
- this.tests = function () {
- return [ test1 ];
- };
- this.asyncTests = function () {
- return [
- ];
- };
-};
-xmldom.XPathTests.prototype.description = function () {
- "use strict";
- return "Test the XPath class.";
-};
-(function () {
- "use strict";
- return xmldom.XPathTests;
-}());
diff --git a/apps/files_odfviewer/src/webodf/webodf/tools/clippingTestImage.html b/apps/files_odfviewer/src/webodf/webodf/tools/clippingTestImage.html
deleted file mode 100644
index 67cc7477374..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tools/clippingTestImage.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<html>
- <head>
- <script type="application/javascript">//<![CDATA[
-function draw() {
- var canvas = document.getElementById("canvas"),
- ctx = canvas.getContext("2d"),
- size = canvas.width / 2,
- link = document.createElement("a");
- ctx.translate(size, size);
- for (i = 0; i < 4; i += 1) {
- ctx.save();
- ctx.rotate(i * Math.PI / 2);
- ctx.translate(0, -size);
- drawPattern(ctx, size);
- ctx.restore();
- }
- document.body.appendChild(document.createElement("br"));
- link.appendChild(document.createTextNode("download image"));
- link.setAttribute("href", canvas.toDataURL());
- document.body.appendChild(link);
-}
-function drawPattern(ctx, size) {
- var i = 0,
- step = 2;
- while (i < size) {
- ctx.fillStyle = "rgb(0,0,0)";
- ctx.fillRect (i, i, size - i, step);
- ctx.fillRect (i, i, step, size - i);
- i += 2 * step;
- }
-}
-//]]></script>
- </head>
- <body onload="draw()">
-<p>This image can be used to find clipping problems. If the sides of the image are clipped asymetrically, it will obvious visually.</p>
- <canvas id="canvas" width="136" height="136"></canvas>
-<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIgAAACIAQMAAAAGdDERAAAABlBMVEUAAAAAAAClZ7nPAAAAAXRSTlMAQObYZgAAAXFJREFUSMd91EGKwzAMhWFBtjmMIQfw1XUAgQ6TrUGzGD0TW8/NaviGv69N3Irl5ZGXnGUIrrPcpSriQ7eqit6+VVVi2FZVkdu2qojHMF2qKio37sdRIobZUlURuc2WqohHDMP8QVTkxgM6SUQMw/xBROS2nD+IZ6WzqqJZ+ayqRFY2qyqSlc2qiM9Ks6qis/KsqsSsLKsqMivLqoh/KhWhop/KI6jEpzIRKvKpLIKJL5UKE10qDyaxVCZMZKksiPhWKRHdKicSW2VEnrz6/LWp8qa0XLiIXFv1EomteojIVjGJd6kuJpjP6mUSsVQPE8xnRSVyvuU4E8z3HGcSOd9ynAnme44ziZxvOc4E8z3HmeTr/VcPF/zR8S8ieMGGCSKY73irRPABGz4yEcx33DoiuOENj4AI5jseJREcgIYjQQTzHUeLCA5kwxElgvmOo04EX5CGrwwRzPc4C76w7ToL5vt7FvyAtOcsuPoPQfWe5Q+etqGXQp0CUgAAAABJRU5ErkJggg==" alt="pregenerated"/>
- </body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/webodf/tools/externs.js b/apps/files_odfviewer/src/webodf/webodf/tools/externs.js
deleted file mode 100644
index 9862befe48b..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tools/externs.js
+++ /dev/null
@@ -1,348 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global Packages HTMLStyleElement window XMLHttpRequest HTMLStyleElement Document*/
-/*jslint nomen: false */
-/**
- * @constructor
- */
-function NodeJSObject() {}
-/**
- * @param {!string} path
- * @param {function(...)} callback
- * @return {undefined}
- */
-NodeJSObject.prototype.stat = function (path, callback) {};
-/**
- * @param {!string} path
- * @param {?string} encoding
- * @param {function(...)} callback
- * @return {?string}
- */
-NodeJSObject.prototype.readFile = function (path, encoding, callback) {};
-/**
- * @param {!string} path
- * @param {?string} encoding
- * @return {?string}
- */
-NodeJSObject.prototype.readFileSync = function (path, encoding) {};
-/**
- * @param {!string} path
- * @param {!string} flags
- * @param {!number} mode
- * @param {!function(string, !number):undefined} callback
- * @return {undefined}
- */
-NodeJSObject.prototype.open = function (path, flags, mode, callback) {};
-/**
- * @param {!number} fd
- * @param {!Buffer} buffer
- * @param {!number} offset
- * @param {!number} length
- * @param {!number} position
- * @param {function(string, !number)} callback
- * @return {undefined}
- */
-NodeJSObject.prototype.read = function (fd, buffer, offset, length, position,
- callback) {};
-/**
- * @param {!string} path
- * @param {!string} data
- * @param {!string} encoding
- * @param {!function(?string):undefined} callback
- * @return {undefined}
- */
-NodeJSObject.prototype.writeFile = function (path, data, encoding, callback) {};
-/**
- * @param {!string} path
- * @param {!function(?string):undefined} callback
- * @return {undefined}
- */
-NodeJSObject.prototype.unlink = function (path, callback) {};
-/**
- * @param {!number} fd
- * @param {function(!string)} callback
- * @return {undefined}
- */
-NodeJSObject.prototype.close = function (fd, callback) {};
-/**
- * @param {!string} className
- * @return {!NodeJSObject}
- */
-function require(className) {}
-/**
- * @constructor
- */
-function NodeJSConsole() {}
-/**
- * @param {!string} msg
- * @return {undefined}
- */
-NodeJSConsole.prototype.log = function (msg) {};
-/**
- * @type {!NodeJSConsole}
- */
-var console;
-/**
- * @constructor
- */
-function NodeJSProcess() {}
-/**
- * @param {!number} exitCode
- * @return {undefined}
- */
-NodeJSProcess.prototype.exit = function (exitCode) {};
-/**
- * @type {!Array}
- */
-NodeJSProcess.prototype.argv = [];
-/**
- * @type {!Object}
- */
-NodeJSProcess.prototype.stderr = {};
-/**
- * @type {!NodeJSProcess}
- */
-var process;
-/**
- * @type {!string}
- */
-var __dirname;
-/**
- * @constructor
- * @param {!number|!Array.<!number>|!string} arg1
- * @param {!string=} encoding
- */
-function Buffer(arg1, encoding) {}
-/**
- * @param {!string} msg
- * @return {undefined}
- */
-function print(msg) {}
-/**
- * @param {!string} path
- * @param {!string=} encoding
- * @return {?string}
- */
-function readFile(path, encoding) {}
-/**
- * @param {!number} exitCode
- * @return {undefined}
- */
-function quit(exitCode) {}
-/**
- * @namespace
- */
-Packages.javax = {};
-/**
- * @namespace
- */
-Packages.javax.xml = {};
-/**
- * @namespace
- */
-Packages.javax.xml.validation = {};
-/**
- * @constructor
- */
-Packages.javax.xml.validation.Schema = function () {};
-/**
- * @namespace
- */
-Packages.javax.xml.parsers = {};
-/**
- * @constructor
- */
-Packages.javax.xml.parsers.DocumentBuilder = function () {};
-/**
- * @param {!Object} entityresolver
- * @return {undefined}
- */
-Packages.javax.xml.parsers.DocumentBuilder.prototype.setEntityResolver =
- function (entityresolver) {};
-/**
- * @param {!Packages.org.xml.sax.InputSource} source
- * @return {Document}
- */
-Packages.javax.xml.parsers.DocumentBuilder.prototype.parse =
- function (source) {};
-/**
- * @return {DOMImplementation}
- */
-Packages.javax.xml.parsers.DocumentBuilder.prototype.getDOMImplementation =
- function () {};
-/**
- * @constructor
- */
-Packages.javax.xml.parsers.DocumentBuilderFactory = function () {};
-/**
- * @return {!Packages.javax.xml.parsers.DocumentBuilderFactory}
- */
-Packages.javax.xml.parsers.DocumentBuilderFactory.newInstance = function () {};
-/**
- * @param {!boolean} value
- */
-Packages.javax.xml.parsers.DocumentBuilderFactory.prototype.setValidating =
- function (value) {};
-/**
- * @param {!boolean} value
- */
-Packages.javax.xml.parsers.DocumentBuilderFactory.prototype.setNamespaceAware =
- function (value) {};
-/**
- * @param {!boolean} value
- */
-Packages.javax.xml.parsers.DocumentBuilderFactory.prototype
- .setExpandEntityReferences = function (value) {};
-/**
- * @param {?Packages.javax.xml.validation.Schema} schema
- */
-Packages.javax.xml.parsers.DocumentBuilderFactory.prototype.setSchema =
- function (schema) {};
-/**
- * @return {!Packages.javax.xml.parsers.DocumentBuilder}
- */
-Packages.javax.xml.parsers.DocumentBuilderFactory.prototype.newDocumentBuilder =
- function () {};
-/**
- * @namespace
- */
-Packages.org = {};
-/**
- * @namespace
- */
-Packages.org.xml.sax = {};
-/**
- * @param {!Object} definition
- * @return {!Object}
- */
-Packages.org.xml.sax.EntityResolver = function (definition) {};
-/**
- * @namespace
- */
-Packages.java.io = {};
-/**
- * @constructor
- * @param {!string} path
- */
-Packages.java.io.FileReader = function (path) {};
-/**
- * @constructor
- * @param {!string} path
- */
-Packages.java.io.FileOutputStream = function (path) {};
-/**
- * @param {!number} b
- * @return {undefined}
- */
-Packages.java.io.FileOutputStream.prototype.write = function (b) {};
-/**
- * @return {undefined}
- */
-Packages.java.io.FileOutputStream.prototype.close = function () {};
-/**
- * @constructor
- * @param {!Packages.java.io.FileReader} reader
- */
-Packages.org.xml.sax.InputSource = function (reader) {};
-/**
- * @type {!StyleSheet}
- */
-HTMLStyleElement.prototype.sheet;
-XMLHttpRequest.prototype.sendAsBinary = function (data) {};
-/**
- * @const@type{!string}
- */
-XMLHttpRequest.prototype.responseBody;
-window.nativeio = {};
-var VBArray = {};
-VBArray.prototype.toArray = function () {};
-/**
- * @interface
- */
-function TreeWalker() {}
-/**
- * @const@type{!Node}
- */
-TreeWalker.prototype.root;
-/**
- * @const@type{number}
- */
-TreeWalker.prototype.whatToShow;
-/**
- * @const@type{NodeFilter}
- */
-TreeWalker.prototype.filter;
-/**
- * @const@type{boolean}
- */
-TreeWalker.prototype.expandEntityReferences;
-/**
- * @type{Node}
- */
-TreeWalker.prototype.currentNode;
-/**
- * @return {Node}
- */
-TreeWalker.prototype.parentNode = function () {};
-/**
- * @return {Node}
- */
-TreeWalker.prototype.firstChild = function () {};
-/**
- * @return {Node}
- */
-TreeWalker.prototype.lastChild = function () {};
-/**
- * @return {Node}
- */
-TreeWalker.prototype.previousSibling = function () {};
-/**
- * @return {Node}
- */
-TreeWalker.prototype.nextSibling = function () {};
-/**
- * @return {Node}
- */
-TreeWalker.prototype.previousNode = function () {};
-/**
- * @return {Node}
- */
-TreeWalker.prototype.nextNode = function () {};
-/**
- * @param {!Node} root
- * @param {!number} whatToShow
- * @param {NodeFilter=} filter
- * @param {boolean=} entityReferenceExpansion
- * @return {!TreeWalker}
- */
-Document.prototype.createTreeWalker = function (root, whatToShow, filter, entityReferenceExpansion) {};
diff --git a/apps/files_odfviewer/src/webodf/webodf/tools/extjsexterns.js b/apps/files_odfviewer/src/webodf/webodf/tools/extjsexterns.js
deleted file mode 100644
index f65d0c5cdb8..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tools/extjsexterns.js
+++ /dev/null
@@ -1,171 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global Packages HTMLStyleElement window XMLHttpRequest HTMLStyleElement Document*/
-/*jslint nomen: false */
-var Ext = {};
-Ext.data = {};
-/**
- * @constructor
- */
-Ext.data.Model = function (settings) {};
-/**
- * @param {!string} fieldName
- * @return {!string}
- */
-Ext.data.Model.prototype.get = function (fieldName) {};
-/**
- * @return {!boolean}
- */
-Ext.data.Model.isExpanded = function () {};
-/**
- * @constructor
- */
-Ext.data.NodeInterface = function () {};
-/**
- * @param {!string} attribute
- * @param {*} value
- * @param {boolean=} deep
- * @return {Ext.data.NodeInterface}
- */
-Ext.data.NodeInterface.prototype.findChild = function (attribute, value, deep) {};
-/**
- * @param {!Ext.data.NodeInterface|!Object} node
- * @return {!Ext.data.NodeInterface}
- */
-Ext.data.NodeInterface.prototype.appendChild = function (node) {};
-/**
- * @param {!string} id
- * @return {Ext.Component}
- */
-Ext.getCmp = function (id) {};
-Ext.tree = {};
-/**
- * @constructor
- */
-Ext.tree.Panel = function (settings) {};
-/**
- * @return {!Ext.data.NodeInterface}
- */
-Ext.tree.Panel.prototype.getRootNode = function () {};
-Ext.component = {};
-/**
- * @constructor
- * @extends {Ext.Component}
- */
-Ext.component.Component = function (settings) {};
-/**
- * @return {!Ext.Element}
- */
-Ext.component.Component.prototype.getEl = function () {};
-/**
- * @constructor
- */
-Ext.Button = function (settings) {};
-/**
- * @constructor
- */
-Ext.Component = function (settings) {};
-/**
- * @type {Object}
- */
-Ext.Component.prototype.superclass = {};
-/**
- * @type {!Ext.Element}
- */
-Ext.Component.prototype.el;
-/**
- * @constructor
- */
-Ext.Element = function (settings) {};
-/**
- * @constructor
- */
-Ext.Panel = function (settings) {};
-/**
- * @type {!Element}
- */
-Ext.Element.prototype.dom;
-Ext.QuickTips = {};
-/**
- * @return {undefined}
- */
-Ext.QuickTips.init = function () {};
-/**
- * @constructor
- */
-Ext.Slider = function (settings) {};
-Ext.util = {};
-/**
- * @constructor
- */
-Ext.util.MixedCollection = function () {};
-/**
- * @param {!Function} f
- */
-Ext.util.MixedCollection.prototype.findBy = function (f) {};
-Ext.tab = {};
-/**
- * @constructor
- */
-Ext.tab.Panel = function (settings) {};
-/**
- * @param {!Object} component
- * @return {undefined}
- */
-Ext.tab.Panel.prototype.add = function (component) {};
-/**
- * @return {!Ext.Component}
- */
-Ext.tab.Panel.prototype.getActiveTab = function () {};
-/**
- * @param {!Ext.Component} tab
- * @return {undefined}
- */
-Ext.tab.Panel.prototype.setActiveTab = function (tab) {};
-/**
- * @type {!Ext.util.MixedCollection}
- */
-Ext.tab.Panel.prototype.items;
-/**
- * @constructor
- */
-Ext.Toolbar = function (settings) {};
-/**
- * @constructor
- */
-Ext.Toolbar.TextItem = function (text) {};
-/**
- * @constructor
- */
-Ext.Viewport = function (settings) {};
-Ext.onReady = function (callback) {};
diff --git a/apps/files_odfviewer/src/webodf/webodf/tools/fixLicenses.py b/apps/files_odfviewer/src/webodf/webodf/tools/fixLicenses.py
deleted file mode 100755
index a81c9b55c6d..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tools/fixLicenses.py
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/python -Qwarnall
-# -*- coding: utf-8 -*-
-#
-# This script checks if all files have licenses and fixes them if needed.
-# The script should be run from the root directory of the webodf project.
-import os, os.path
-
-# read the license text from the source file
-# the license starts at the line ' * @licstart' and ends at ' */'
-def readLicense(path):
- file = open(path, "rU")
- licensetext = []
- started = False
- for line in file:
- if line.rstrip() == ' * @licstart':
- started = True
- if started:
- licensetext.append(line)
- if line.rstrip() == ' */':
- break
- return licensetext
-
-def writeLicense(file, license, defaultcopyright):
- if defaultcopyright:
- file.write(defaultcopyright)
- file.writelines(license)
-
-def fixLicense(path, license, defaultcopyright):
- # read the file
- file = open(path, "rU")
- lines = file.readlines()
- file.close()
- # does the file have any copyright statement already?
- hasLicense = False
- hasCopyright = False
- for line in lines:
- if line.rstrip() == ' * @licstart':
- hasLicense = True
- if line[:17] == ' * Copyright (C) ':
- hasCopyright = True
- if hasCopyright:
- defaultcopyright = None
- wroteLicense = False
- skip = False
- # write the file with the new slice
- file = open(path, "w")
- for line in lines:
- if not wroteLicense:
- if not hasLicense:
- file.write("/**\n")
- writeLicense(file, license, defaultcopyright)
- wroteLicense = True
- elif line.rstrip() == ' * @licstart':
- writeLicense(file, license, defaultcopyright)
- wroteLicense = True
- skip = True
- if skip:
- if line.rstrip() == ' */':
- skip = False
- else:
- file.write(line)
- file.close()
-
-# get list of *.js files
-jsfiles = []
-for root, directories, files in os.walk("."):
- while "extjs" in directories:
- directories.remove("extjs")
- for f in files:
- if f[-3:] == ".js":
- jsfiles.append(os.path.abspath(os.path.join(root, f)))
-
-# remove webodf/lib/packackages.js since it is the source for the licenses
-sourcefilepath = os.path.join(os.getcwd(), "webodf/lib/packages.js")
-jsfiles.remove(sourcefilepath)
-
-licensetext = readLicense(sourcefilepath)
-defaultcopyright = " * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>\n"
-
-for f in jsfiles:
- fixLicense(f, licensetext, defaultcopyright)
diff --git a/apps/files_odfviewer/src/webodf/webodf/tools/refcheck/bootstrap.xsl b/apps/files_odfviewer/src/webodf/webodf/tools/refcheck/bootstrap.xsl
deleted file mode 100644
index 747e3e605b4..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tools/refcheck/bootstrap.xsl
+++ /dev/null
@@ -1,193 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
- xmlns:o="urn:odfkeys" xmlns:x="dummy" exclude-result-prefixes="o">
- <xsl:output method="xml" indent="yes"/>
- <xsl:namespace-alias stylesheet-prefix="x" result-prefix="xsl"/>
-
- <xsl:template name="join" >
- <xsl:param name="values"/>
- <xsl:param name="separator"/>
- <xsl:for-each select="$values">
- <xsl:choose>
- <xsl:when test="position() = 1">
- <xsl:value-of select="."/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat($separator, .) "/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template name="getdefs">
- <xsl:param name="name"/>
- <xsl:param name="separator"/>
- <xsl:variable name="key" select="../o:key[@name=$name]"/>
- <xsl:if test="$key/@extends">
- <xsl:call-template name="getdefs">
- <xsl:with-param name="name" select="$key/@extends"/>
- <xsl:with-param name="separator" select="$separator"/>
- </xsl:call-template>
- <xsl:text>|</xsl:text>
- </xsl:if>
- <xsl:call-template name="join">
- <xsl:with-param name="values" select="$key/o:def"/>
- <xsl:with-param name="separator" select="$separator"/>
- </xsl:call-template>
- </xsl:template>
-
- <xsl:template match="o:key" mode="define">
- <xsl:variable name="def">
- <xsl:call-template name="getdefs">
- <xsl:with-param name="name" select="@name"/>
- <xsl:with-param name="separator" select="'|'"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:variable name="ref">
- <xsl:call-template name="join">
- <xsl:with-param name="values" select="o:ref"/>
- <xsl:with-param name="separator" select="'|'"/>
- </xsl:call-template>
- </xsl:variable>
- <x:template name="check{@name}">
- <x:param name="stylesfontfaces" />
- <x:param name="fontfaces" />
- <x:param name="officestyles" />
- <x:param name="stylesautostyles" />
- <x:param name="contentautostyles" />
- <x:param name="masterstyles" />
- <x:param name="body" />
- <x:call-template name="checkReferences">
- <x:with-param name="name" select="'{@name}'"/>
- <x:with-param name="definitions" select="{$def}"/>
- <x:with-param name="references" select="{$ref}"/>
- </x:call-template>
- </x:template>
- </xsl:template>
-
- <xsl:template match="o:key" mode="call">
- <x:call-template name="check{@name}">
- <x:with-param name="stylesfontfaces" select="$stylesfontfaces"/>
- <x:with-param name="fontfaces" select="$fontfaces"/>
- <x:with-param name="officestyles" select="$officestyles"/>
- <x:with-param name="stylesautostyles" select="$stylesautostyles"/>
- <x:with-param name="contentautostyles" select="$contentautostyles"/>
- <x:with-param name="masterstyles" select="$masterstyles"/>
- <x:with-param name="body" select="$body"/>
- </x:call-template>
- </xsl:template>
-
- <xsl:template match="/o:keys">
- <x:stylesheet version="1.0">
- <xsl:for-each select="namespace::*"><xsl:copy/></xsl:for-each>
-
- <xsl:apply-templates select="o:key" mode="define"/>
-
- <x:template name="check">
- <x:param name="stylesfontfaces" />
- <x:param name="fontfaces" />
- <x:param name="officestyles" />
- <x:param name="stylesautostyles" />
- <x:param name="contentautostyles" />
- <x:param name="masterstyles" />
- <x:param name="body" />
- <xsl:apply-templates select="o:key" mode="call"/>
- </x:template>
-
- <x:template name="checkuniqueitem">
- <x:param name="listname"/>
- <x:param name="list"/>
- <x:param name="item"/>
- <x:if test="count($list[.=$item])!=1">
- <x:message>
- <x:value-of select="concat('The key with value &quot;', $item, '&quot; is used more than once in ', $listname, '.')"/>
- </x:message>
- </x:if>
- </x:template>
-
- <x:template name="checkunique">
- <x:param name="listname"/>
- <x:param name="list"/>
- <x:variable name="count">
- </x:variable>
- <x:for-each select="$list">
- <x:call-template name="checkuniqueitem">
- <x:with-param name="listname" select="$listname"/>
- <x:with-param name="list" select="$list"/>
- <x:with-param name="item" select="."/>
- </x:call-template>
- </x:for-each>
- </x:template>
-
- <x:template name="verifyOccurance">
- <x:param name="name"/>
- <x:param name="definitions"/>
- <x:param name="reference"/>
- <x:if test="count($definitions[.=$reference])=0">
- <x:message>
- <x:value-of select="concat('There is no key with value &quot;', $reference, '&quot; in the key list ', $name, '.')"/>
- </x:message>
- </x:if>
- </x:template>
-
- <x:template name="checkReferences">
- <x:param name="name"/>
- <x:param name="definitions"/>
- <x:param name="references"/>
-
- <x:call-template name="checkunique">
- <x:with-param name="listname" select="$name"/>
- <x:with-param name="list" select="$definitions"/>
- </x:call-template>
-
- <x:for-each select="$references">
- <x:call-template name="verifyOccurance">
- <x:with-param name="name" select="$name"/>
- <x:with-param name="definitions" select="$definitions"/>
- <x:with-param name="reference" select="."/>
- </x:call-template>
- </x:for-each>
- </x:template>
-
- <x:template match="/office:document">
- <x:call-template name="check">
- <x:with-param name="stylesfontfaces" select="office:font-face-decls"/>
- <x:with-param name="fontfaces" select="office:font-face-decls"/>
- <x:with-param name="officestyles" select="office:styles"/>
- <x:with-param name="stylesautostyles" select="office:automatic-styles"/>
- <x:with-param name="contentautostyles" select="office:automatic-styles"/>
- <x:with-param name="masterstyles" select="office:master-styles"/>
- <x:with-param name="body" select="office:body"/>
- </x:call-template>
- </x:template>
-
- <x:template match="/office:document-styles">
- <x:call-template name="check">
- <x:with-param name="stylesfontfaces" select="office:font-face-decls"/>
- <x:with-param name="fontfaces" select="office:font-face-decls"/>
- <x:with-param name="officestyles" select="office:styles"/>
- <x:with-param name="stylesautostyles" select="office:automatic-styles"/>
- <x:with-param name="contentautostyles" select="not-available"/>
- <x:with-param name="masterstyles" select="office:master-styles"/>
- <x:with-param name="body" select="not-available"/>
- </x:call-template>
- </x:template>
-
- <x:template match="/office:document-content">
- <x:variable name="stylesxml" select="document('styles.xml', .)/office:document-styles" />
- <x:variable name="stylesfontfaces" select="$stylesxml/office:font-face-decls" />
- <x:call-template name="check">
- <x:with-param name="stylesfontfaces" select="$stylesfontfaces"/>
- <x:with-param name="fontfaces" select="$stylesfontfaces|office:font-face-decls"/>
- <x:with-param name="officestyles" select="$stylesxml/office:styles"/>
- <x:with-param name="stylesautostyles" select="$stylesxml/office:automatic-styles"/>
- <x:with-param name="contentautostyles" select="office:automatic-styles"/>
- <x:with-param name="masterstyles" select="$stylesxml/office:master-styles"/>
- <x:with-param name="body" select="office:body"/>
- </x:call-template>
- </x:template>
- </x:stylesheet>
- </xsl:template>
-
-</xsl:stylesheet>
diff --git a/apps/files_odfviewer/src/webodf/webodf/tools/refcheck/odfkeys.xml b/apps/files_odfviewer/src/webodf/webodf/tools/refcheck/odfkeys.xml
deleted file mode 100644
index e2ad06941ce..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tools/refcheck/odfkeys.xml
+++ /dev/null
@@ -1,455 +0,0 @@
-<keys xmlns="urn:odfkeys"
- xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
- xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
- xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
- xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0"
- xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
- xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
- xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
- xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
- >
- <doc>
- <h2>ODF reference checker</h2>
- <p>ODF documents use string keys and references to link different parts of the document. There are quite a few different groups of keys. The description of how these keys work in the specification is not trivial to implement, because not keys behave differently depending on the context in which they are defined. E.g. a style has a family. If the family is 'text', then only certain attributes on certain elements in certain parts of the ODF document may refer to that style.</p>
- <p>For a beginning and even intermediate ODF developer or document producer, this is quite complicated. Also, there is not currently an easy way to check if all the references are correct. This document aims to make it easier to figure out what groups of keys exist and from which elements they may be linked.</p>
- <p>The document consists of one &lt;key> element for each group of keys. Each group has a name and is defined by one or more XPath expressions in &lt;def> elements. Any string that matches the XPath expression in a particular document is part of the set of keys of that group. Each key in a set must be unique.</p>
- <p>In addition, each &lt;key> has a number of &lt;ref> elements that define the positions in the document where a key may be referenced. Each reference must exist in the set of keys that are found via the &lt;def> elements.</p>
- <p>The format of this document is designed to be easy to read but also to make it easy to use in a reference checker. This document comes with checked implemented in XSL. The XSL is called bootstrap.xsl and is used in two transformation steps. Here is shown how to run the check with <tt>xsltproc</tt>:</p>
- <pre>xsltproc bootstrap.xsl odfkeys.xml > checkkeys.xsl</pre>
- <pre>xsltproc checkkeys.xsl content.xml</pre>
- <p>The check can be run on content.xml files, on styles.xml files and on flat ODF files.</p>
- <h2>Definitions</h2>
- <dl>
- <dt>$stylesfontfaces</dt>
- <dd>This variable refers to the subset of font face definitions that are available to the style elements. Styles.xml may not refer to font faces defined in content.xml.</dd>
- <dt>$fontfaces</dt>
- <dd>This variable refers to all font face definitions.</dd>
- <dt>$officestyles</dt>
- <dd>This variable refers to the element office:styles.</dd>
- <dt>$stylesautostyles</dt>
- <dd>This variable refers to the element office:automatic-styles in styles.xml.</dd>
- <dt>$contentautostyles</dt>
- <dd>This variable refers to the element office:automatic-styles in content.xml. When evaluating a styles.xml document, it is an empty set.</dd>
- <dt>$masterstyles</dt>
- <dd>This variable refers to the office:master-styles element.</dd>
- <dt>$body</dt>
- <dd>This variable refers to the office:body element. When evaluating a styles.xml document, it is an empty set.</dd>
- </dl>
- <h2>TODO</h2>
- <ul>
- <li>implement &lt;refs/> to check refs of type styleNameRefs</li>
- <li>check for unused automatic styles</li>
- <li>check that there are no circular dependencies in style inheritance</li>
- </ul>
- </doc>
- <key name="gradient">
- <def>$officestyles/draw:gradient/@draw:name</def>
- <def>$officestyles/svg:linearGradient/@draw:name</def>
- <def>$officestyles/svg:radialGradient/@draw:name</def>
- <ref>$officestyles//@draw:fill-gradient-name</ref>
- <ref>$stylesautostyles//@draw:fill-gradient-name</ref>
- <ref>$contentautostyles//@draw:fill-gradient-name</ref>
- </key>
- <key name="hatch">
- <def>$officestyles/draw:hatch/@draw:name</def>
- <ref>$officestyles//@draw:fill-hatch-name</ref>
- <ref>$stylesautostyles//@draw:fill-hatch-name</ref>
- <ref>$contentautostyles//@draw:fill-hatch-name</ref>
- </key>
- <key name="fill-image">
- <def>$officestyles/draw:fill-image/@draw:name</def>
- <ref>$officestyles//@draw:fill-image-name</ref>
- <ref>$stylesautostyles//@draw:fill-image-name</ref>
- <ref>$contentautostyles//@draw:fill-image-name</ref>
- </key>
- <key name="marker">
- <def>$officestyles/draw:marker/@draw:name</def>
- <ref>$officestyles//@draw:marker-start</ref>
- <ref>$officestyles//@draw:marker-end</ref>
- <ref>$stylesautostyles//@draw:marker-start</ref>
- <ref>$stylesautostyles//@draw:marker-end</ref>
- <ref>$contentautostyles//@draw:marker-start</ref>
- <ref>$contentautostyles//@draw:marker-end</ref>
- </key>
- <key name="stroke-dash">
- <def>$officestyles/draw:stroke-dash/@draw:name</def>
- <ref>$officestyles//@draw:stroke-dash</ref>
- <ref>$stylesautostyles//@draw:stroke-dash</ref>
- <ref>$contentautostyles//@draw:stroke-dash</ref>
- <refs>$officestyles//@draw:stroke-dash-names</refs>
- <refs>$stylesautostyles//@draw:stroke-dash-names</refs>
- <refs>$contentautostyles//@draw:stroke-dash-names</refs>
- </key>
- <key name="opacity">
- <def>$officestyles/draw:opacity/@draw:name</def>
- <ref>$officestyles//@draw:opacity-name</ref>
- <ref>$stylesautostyles//@draw:opacity-name</ref>
- <ref>$contentautostyles//@draw:opacity-name</ref>
- </key>
- <key name="styles-font-face">
- <def>$stylesfontfaces/style:font-face/@style:name</def>
- <ref>$officestyles//style:text-properties/@style:font-name</ref>
- <ref>$officestyles//style:text-properties/@style:font-name-asian</ref>
- <ref>$officestyles//style:text-properties/@style:font-name-complex</ref>
- <ref>$officestyles//style:list-level-properties/@style:font-name</ref>
- <ref>$stylesautostyles//style:text-properties/@style:font-name</ref>
- <ref>$stylesautostyles//style:text-properties/@style:font-name-asian</ref>
- <ref>$stylesautostyles//style:text-properties/@style:font-name-complex</ref>
- <ref>$stylesautostyles//style:list-level-properties/@style:font-name</ref>
- </key>
- <key name="font-face">
- <def>$fontfaces/style:font-face/@style:name</def>
- <ref>$contentautostyles//style:text-properties/@style:font-name</ref>
- <ref>$contentautostyles//style:text-properties/@style:font-name-asian</ref>
- <ref>$contentautostyles//style:text-properties/@style:font-name-complex</ref>
- <ref>$contentautostyles//style:list-level-properties/@style:font-name</ref>
- </key>
- <key name="master-page">
- <def>$masterstyles/style:master-page/@style:name</def>
- <!--draw:master-page-name-->
- <ref>$body/office:drawing/draw:page/@draw:master-page-name</ref>
- <ref>$body/office:presentation/draw:page/@draw:master-page-name</ref>
- <!--style:master-page-name-->
- <ref>$officestyles/style:style[@style:family='paragraph']/@style:master-page-name</ref>
- <ref>$officestyles/style:style[@style:family='table']/@style:master-page-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='paragraph']/@style:master-page-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='table']/@style:master-page-name</ref>
- <ref>$contentautostyles/style:style[@style:family='paragraph']/@style:master-page-name</ref>
- <ref>$contentautostyles/style:style[@style:family='table']/@style:master-page-name</ref>
- <!--style:next-style-name-->
- <ref>$masterstyles/style:master-page/@style:next-style-name</ref>
- <!--text:master-page-name-->
- <ref>$officestyles/text:notes-configuration/@text:master-page-name</ref>
- <ref>$officestyles/style:default-style[@style:family='section']/style:section-properties/text:notes-configuration/@text:master-page-name</ref>
- <ref>$officestyles/style:style[@style:family='section']/style:section-properties/text:notes-configuration/@text:master-page-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='section']/style:section-properties/text:notes-configuration/@text:master-page-name</ref>
- <ref>$contentautostyles/style:style[@style:family='section']/style:section-properties/text:notes-configuration/@text:master-page-name</ref>
- <ref>$body/office:text/text:page-sequence/text:page/@text:master-page-name</ref>
- <!--style:parent-style-name: not handled: likely an error in the specification -->
- </key>
- <key name="presentation-page-layout">
- <def>$officestyles/style:presentation-page-layout/@style:name</def>
- <ref>$masterstyles/style:handout-master/@presentation:presentation-page-layout-name</ref>
- <ref>$body/office:drawing/draw:page/@presentation:presentation-page-layout-name</ref>
- <ref>$body/office:presentation/draw:page/@presentation:presentation-page-layout-name</ref>
- </key>
- <key name="styles-page-layout">
- <def>$stylesautostyles/style:page-layout/@style:name</def>
- <ref>$masterstyles/style:master-page/@style:page-layout-name</ref>
- <ref>$masterstyles/style:master-page/presentation:notes/@style:page-layout-name</ref>
- <ref>$masterstyles/style:handout-master/@style:page-layout-name</ref>
- </key>
- <key name="content-page-layout">
- <def>$contentautostyles/style:page-layout/@style:name</def>
- <ref>$body/office:presentation/draw:page/presentation:notes/@style:page-layout-name</ref>
- </key>
- <key name="common-list-styles">
- <def>$officestyles/text:list-style/@style:name</def>
- <def>$officestyles//style:graphic-properties/text:list-style/@style:name</def>
- <ref emptyok="true">$officestyles/style:style/@style:list-style-name</ref>
- </key>
- <key name="styles-list-styles" extends="common-list-styles">
- <def>$stylesautostyles/text:list-style/@style:name</def>
- <def>$stylesautostyles//style:graphic-properties/text:list-style/@style:name</def>
- <ref emptyok="true">$stylesautostyles/style:style/@style:list-style-name</ref>
- <ref>$masterstyles//text:list/@text:style-name</ref>
- <ref>$masterstyles//text:numbered-paragraphs/@text:style-name</ref>
- <ref>$masterstyles//text:list-item/@text:style-override</ref>
- </key>
- <key name="content-list-styles" extends="common-list-styles">
- <def>$contentautostyles/text:list-style/@style:name</def>
- <def>$contentautostyles//style:graphic-properties/text:list-style/@style:name</def>
- <ref emptyok="true">$contentautostyles/style:style/@style:list-style-name</ref>
- <ref>$body//text:list/@text:style-name</ref>
- <ref>$body//text:numbered-paragraphs/@text:style-name</ref>
- <ref>$body//text:list-item/@text:style-override</ref>
- </key>
- <key name="common-data-styles">
- <def>$officestyles/number:number-style/@style:name</def>
- <def>$officestyles/number:currency-style/@style:name</def>
- <def>$officestyles/number:percentage-style/@style:name</def>
- <def>$officestyles/number:date-style/@style:name</def>
- <def>$officestyles/number:time-style/@style:name</def>
- <def>$officestyles/number:boolean-style/@style:name</def>
- <def>$officestyles/number:text-style/@style:name</def>
- <ref>$officestyles/style:style/@style:data-style-name</ref>
- <ref>$officestyles/style:style/@style:percentage-data-style-name</ref>
- </key>
- <key name="styles-data-styles" extends="common-data-styles">
- <def>$stylesautostyles/number:number-style/@style:name</def>
- <def>$stylesautostyles/number:currency-style/@style:name</def>
- <def>$stylesautostyles/number:percentage-style/@style:name</def>
- <def>$stylesautostyles/number:date-style/@style:name</def>
- <def>$stylesautostyles/number:time-style/@style:name</def>
- <def>$stylesautostyles/number:boolean-style/@style:name</def>
- <def>$stylesautostyles/number:text-style/@style:name</def>
- <ref>$stylesautostyles/style:style/@style:data-style-name</ref>
- <ref>$stylesautostyles/style:style/@style:percentage-data-style-name</ref>
- <ref>$masterstyles//text:creation-date/@style:data-style-name</ref>
- <ref>$masterstyles//text:creation-time/@style:data-style-name</ref>
- <ref>$masterstyles//text:database-display/@style:data-style-name</ref>
- <ref>$masterstyles//text:date/@style:data-style-name</ref>
- <ref>$masterstyles//text:editing-duration/@style:data-style-name</ref>
- <ref>$masterstyles//text:expression/@style:data-style-name</ref>
- <ref>$masterstyles//text:meta-field/@style:data-style-name</ref>
- <ref>$masterstyles//text:modification-date/@style:data-style-name</ref>
- <ref>$masterstyles//text:modification-time/@style:data-style-name</ref>
- <ref>$masterstyles//text:print-date/@style:data-style-name</ref>
- <ref>$masterstyles//text:print-time/@style:data-style-name</ref>
- <ref>$masterstyles//text:table-formula/@style:data-style-name</ref>
- <ref>$masterstyles//text:time/@style:data-style-name</ref>
- <ref>$masterstyles//text:user-defined/@style:data-style-name</ref>
- <ref>$masterstyles//text:user-field-get/@style:data-style-name</ref>
- <ref>$masterstyles//text:user-field-input/@style:data-style-name</ref>
- <ref>$masterstyles//text:variable-get/@style:data-style-name</ref>
- <ref>$masterstyles//text:variable-input/@style:data-style-name</ref>
- <ref>$masterstyles//text:variable-set/@style:data-style-name</ref>
- </key>
- <key name="content-data-styles" extends="common-data-styles">
- <def>$contentautostyles/number:number-style/@style:name</def>
- <def>$contentautostyles/number:currency-style/@style:name</def>
- <def>$contentautostyles/number:percentage-style/@style:name</def>
- <def>$contentautostyles/number:date-style/@style:name</def>
- <def>$contentautostyles/number:time-style/@style:name</def>
- <def>$contentautostyles/number:boolean-style/@style:name</def>
- <def>$contentautostyles/number:text-style/@style:name</def>
- <ref>$contentautostyles/style:style/@style:data-style-name</ref>
- <ref>$contentautostyles/style:style/@style:percentage-data-style-name</ref>
- <ref>$body/office:presentation/presentation:date-time-decl/@style:data-style-name</ref>
- <ref>$body//text:creation-date/@style:data-style-name</ref>
- <ref>$body//text:creation-time/@style:data-style-name</ref>
- <ref>$body//text:database-display/@style:data-style-name</ref>
- <ref>$body//text:date/@style:data-style-name</ref>
- <ref>$body//text:editing-duration/@style:data-style-name</ref>
- <ref>$body//text:expression/@style:data-style-name</ref>
- <ref>$body//text:meta-field/@style:data-style-name</ref>
- <ref>$body//text:modification-date/@style:data-style-name</ref>
- <ref>$body//text:modification-time/@style:data-style-name</ref>
- <ref>$body//text:print-date/@style:data-style-name</ref>
- <ref>$body//text:print-time/@style:data-style-name</ref>
- <ref>$body//text:table-formula/@style:data-style-name</ref>
- <ref>$body//text:time/@style:data-style-name</ref>
- <ref>$body//text:user-defined/@style:data-style-name</ref>
- <ref>$body//text:user-field-get/@style:data-style-name</ref>
- <ref>$body//text:user-field-input/@style:data-style-name</ref>
- <ref>$body//text:variable-get/@style:data-style-name</ref>
- <ref>$body//text:variable-input/@style:data-style-name</ref>
- <ref>$body//text:variable-set/@style:data-style-name</ref>
- </key>
- <key name="common-chart-style">
- <def>$officestyles/style:style[@style:family='chart']/@style:name</def>
- <ref>$officestyles/style:style[@style:family='chart']/@style:parent-style-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='chart']/@style:parent-style-name</ref>
- <ref>$contentautostyles/style:style[@style:family='chart']/@style:parent-style-name</ref>
- </key>
- <key name="styles-chart-style" extends="common-chart-style">
- <def>$stylesautostyles/style:style[@style:family='chart']/@style:name</def>
- <ref>$masterstyles//chart:axis/@chart:style-name</ref>
- <ref>$masterstyles//chart:chart/@chart:style-name</ref>
- <ref>$masterstyles//chart:data-label/@chart:style-name</ref>
- <ref>$masterstyles//chart:data-point/@chart:style-name</ref>
- <ref>$masterstyles//chart:equation/@chart:style-name</ref>
- <ref>$masterstyles//chart:error-indicator/@chart:style-name</ref>
- <ref>$masterstyles//chart:floor/@chart:style-name</ref>
- <ref>$masterstyles//chart:footer/@chart:style-name</ref>
- <ref>$masterstyles//chart:grid/@chart:style-name</ref>
- <ref>$masterstyles//chart:legend/@chart:style-name</ref>
- <ref>$masterstyles//chart:mean-value/@chart:style-name</ref>
- <ref>$masterstyles//chart:plot-area/@chart:style-name</ref>
- <ref>$masterstyles//chart:regression-curve/@chart:style-name</ref>
- <ref>$masterstyles//chart:series/@chart:style-name</ref>
- <ref>$masterstyles//chart:stock-gain-marker/@chart:style-name</ref>
- <ref>$masterstyles//chart:stock-loss-marker/@chart:style-name</ref>
- <ref>$masterstyles//chart:stock-range-line/@chart:style-name</ref>
- <ref>$masterstyles//chart:subtitle/@chart:style-name</ref>
- <ref>$masterstyles//chart:title/@chart:style-name</ref>
- <ref>$masterstyles//chart:wall/@chart:style-name</ref>
- </key>
- <key name="content-chart-style" extends="common-chart-style">
- <def>$contentautostyles/style:style[@style:family='chart']/@style:name</def>
- <ref>$body//chart:axis/@chart:style-name</ref>
- <ref>$body//chart:chart/@chart:style-name</ref>
- <ref>$body//chart:data-label/@chart:style-name</ref>
- <ref>$body//chart:data-point/@chart:style-name</ref>
- <ref>$body//chart:equation/@chart:style-name</ref>
- <ref>$body//chart:error-indicator/@chart:style-name</ref>
- <ref>$body//chart:floor/@chart:style-name</ref>
- <ref>$body//chart:footer/@chart:style-name</ref>
- <ref>$body//chart:grid/@chart:style-name</ref>
- <ref>$body//chart:legend/@chart:style-name</ref>
- <ref>$body//chart:mean-value/@chart:style-name</ref>
- <ref>$body//chart:plot-area/@chart:style-name</ref>
- <ref>$body//chart:regression-curve/@chart:style-name</ref>
- <ref>$body//chart:series/@chart:style-name</ref>
- <ref>$body//chart:stock-gain-marker/@chart:style-name</ref>
- <ref>$body//chart:stock-loss-marker/@chart:style-name</ref>
- <ref>$body//chart:stock-range-line/@chart:style-name</ref>
- <ref>$body//chart:subtitle/@chart:style-name</ref>
- <ref>$body//chart:title/@chart:style-name</ref>
- <ref>$body//chart:wall/@chart:style-name</ref>
- </key>
- <key name="common-ruby-style">
- <def>$officestyles/style:style[@style:family='ruby']/@style:name</def>
- <ref>$officestyles/style:style[@style:family='ruby']/@style:parent-style-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='ruby']/@style:parent-style-name</ref>
- <ref>$contentautostyles/style:style[@style:family='ruby']/@style:parent-style-name</ref>
- </key>
- <key name="styles-ruby-style" extends="common-ruby-style">
- <def>$stylesautostyles/style:style[@style:family='ruby']/@style:name</def>
- <ref>$masterstyles//text:ruby/@text:style-name</ref>
- </key>
- <key name="content-ruby-style" extends="common-ruby-style">
- <def>$contentautostyles/style:style[@style:family='ruby']/@style:name</def>
- <ref>$body//text:ruby/@text:style-name</ref>
- </key>
-<!-- clearly unfinished below here: more refs needed -->
- <key name="common-text-style">
- <def>$officestyles/style:style[@style:family='text']/@style:name</def>
- <ref>$officestyles/style:style[@style:family='text']/@style:parent-style-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='text']/@style:parent-style-name</ref>
- <ref>$contentautostyles/style:style[@style:family='text']/@style:parent-style-name</ref>
- </key>
- <key name="styles-text-style" extends="common-text-style">
- <def>$stylesautostyles/style:style[@style:family='text']/@style:name</def>
- <ref>$masterstyles//text:span/@text:style-name</ref>
- </key>
- <key name="content-text-style" extends="common-text-style">
- <def>$contentautostyles/style:style[@style:family='text']/@style:name</def>
- <ref>$body//text:span/@text:style-name</ref>
- </key>
- <key name="common-paragraph-style">
- <def>$officestyles/style:style[@style:family='paragraph']/@style:name</def>
- <ref>$officestyles/style:style[@style:family='paragraph']/@style:parent-style-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='paragraph']/@style:parent-style-name</ref>
- <ref>$contentautostyles/style:style[@style:family='paragraph']/@style:parent-style-name</ref>
- </key>
- <key name="styles-paragraph-style" extends="common-paragraph-style">
- <def>$stylesautostyles/style:style[@style:family='paragraph']/@style:name</def>
- <ref>$masterstyles//text:p/@text:style-name</ref>
- </key>
- <key name="content-paragraph-style" extends="common-paragraph-style">
- <def>$contentautostyles/style:style[@style:family='paragraph']/@style:name</def>
- <ref>$body//text:p/@text:style-name</ref>
- </key>
- <key name="common-section-style">
- <def>$officestyles/style:style[@style:family='section']/@style:name</def>
- <ref>$officestyles/style:style[@style:family='section']/@style:parent-style-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='section']/@style:parent-style-name</ref>
- <ref>$contentautostyles/style:style[@style:family='section']/@style:parent-style-name</ref>
- </key>
- <key name="styles-section-style" extends="common-section-style">
- <def>$stylesautostyles/style:style[@style:family='section']/@style:name</def>
- <ref>$masterstyles//text:alphabetical-index/@text:style-name</ref>
- </key>
- <key name="content-section-style" extends="common-section-style">
- <def>$contentautostyles/style:style[@style:family='section']/@style:name</def>
- <ref>$body//text:alphabetical-index/@text:style-name</ref>
- </key>
-
- <key name="common-table-style">
- <def>$officestyles/style:style[@style:family='table']/@style:name</def>
- <ref>$officestyles/style:style[@style:family='table']/@style:parent-style-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='table']/@style:parent-style-name</ref>
- <ref>$contentautostyles/style:style[@style:family='table']/@style:parent-style-name</ref>
- </key>
- <key name="styles-table-style" extends="common-table-style">
- <def>$stylesautostyles/style:style[@style:family='table']/@style:name</def>
- <ref>$masterstyles//table:table/@table:style-name</ref>
- </key>
- <key name="content-table-style" extends="common-table-style">
- <def>$contentautostyles/style:style[@style:family='table']/@style:name</def>
- <ref>$body//table:table/@table:style-name</ref>
- </key>
-
- <key name="common-table-column-style">
- <def>$officestyles/style:style[@style:family='table-column']/@style:name</def>
- <ref>$officestyles/style:style[@style:family='table-column']/@style:parent-style-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='table-column']/@style:parent-style-name</ref>
- <ref>$contentautostyles/style:style[@style:family='table-column']/@style:parent-style-name</ref>
- </key>
- <key name="styles-table-column-style" extends="common-table-column-style">
- <def>$stylesautostyles/style:style[@style:family='table-column']/@style:name</def>
- <ref>$masterstyles//table:table-column/@table:style-name</ref>
- </key>
- <key name="content-table-column-style" extends="common-table-column-style">
- <def>$contentautostyles/style:style[@style:family='table-column']/@style:name</def>
- <ref>$body//table:table-column/@table:style-name</ref>
- </key>
-
- <key name="common-table-row-style">
- <def>$officestyles/style:style[@style:family='table-row']/@style:name</def>
- <ref>$officestyles/style:style[@style:family='table-row']/@style:parent-style-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='table-row']/@style:parent-style-name</ref>
- <ref>$contentautostyles/style:style[@style:family='table-row']/@style:parent-style-name</ref>
- </key>
- <key name="styles-table-row-style" extends="common-table-row-style">
- <def>$stylesautostyles/style:style[@style:family='table-row']/@style:name</def>
- <ref>$masterstyles//table:table-row/@table:style-name</ref>
- </key>
- <key name="content-table-row-style" extends="common-table-row-style">
- <def>$contentautostyles/style:style[@style:family='table-row']/@style:name</def>
- <ref>$body//table:table-row/@table:style-name</ref>
- </key>
-
- <key name="common-table-cell-style">
- <def>$officestyles/style:style[@style:family='table-cell']/@style:name</def>
- <ref>$officestyles/style:style[@style:family='table-cell']/@style:parent-style-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='table-cell']/@style:parent-style-name</ref>
- <ref>$contentautostyles/style:style[@style:family='table-cell']/@style:parent-style-name</ref>
- </key>
- <key name="styles-table-cell-style" extends="common-table-cell-style">
- <def>$stylesautostyles/style:style[@style:family='table-cell']/@style:name</def>
- <ref>$masterstyles//table:table-cell/@table:style-name</ref>
- </key>
- <key name="content-table-cell-style" extends="common-table-cell-style">
- <def>$contentautostyles/style:style[@style:family='table-cell']/@style:name</def>
- <ref>$body//table:table-cell/@table:style-name</ref>
- </key>
-
- <key name="common-graphic-style">
- <def>$officestyles/style:style[@style:family='graphic']/@style:name</def>
- <ref>$officestyles/style:style[@style:family='graphic']/@style:parent-style-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='graphic']/@style:parent-style-name</ref>
- <ref>$contentautostyles/style:style[@style:family='graphic']/@style:parent-style-name</ref>
- </key>
- <key name="styles-graphic-style" extends="common-graphic-style">
- <def>$stylesautostyles/style:style[@style:family='graphic']/@style:name</def>
- <ref>$masterstyles//draw:rect/@draw:style-name</ref>
- </key>
- <key name="content-graphic-style" extends="common-graphic-style">
- <def>$contentautostyles/style:style[@style:family='graphic']/@style:name</def>
- <ref>$body//draw:rect/@draw:style-name</ref>
- </key>
-
- <key name="common-presentation-style">
- <def>$officestyles/style:style[@style:family='presentation']/@style:name</def>
- <ref>$officestyles/style:style[@style:family='presentation']/@style:parent-style-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='presentation']/@style:parent-style-name</ref>
- <ref>$contentautostyles/style:style[@style:family='presentation']/@style:parent-style-name</ref>
- </key>
- <key name="styles-presentation-style" extends="common-presentation-style">
- <def>$stylesautostyles/style:style[@style:family='presentation']/@style:name</def>
- <ref>$masterstyles//draw:rect/@presentation:style-name</ref>
- </key>
- <key name="content-presentation-style" extends="common-presentation-style">
- <def>$contentautostyles/style:style[@style:family='presentation']/@style:name</def>
- <ref>$body//draw:rect/@presentation:style-name</ref>
- </key>
-
- <key name="common-drawing-page-style">
- <def>$officestyles/style:style[@style:family='drawing-page']/@style:name</def>
- <ref>$officestyles/style:style[@style:family='drawing-page']/@style:parent-style-name</ref>
- <ref>$stylesautostyles/style:style[@style:family='drawing-page']/@style:parent-style-name</ref>
- <ref>$contentautostyles/style:style[@style:family='drawing-page']/@style:parent-style-name</ref>
- </key>
- <key name="styles-drawing-page-style" extends="common-drawing-page-style">
- <def>$stylesautostyles/style:style[@style:family='drawing-page']/@style:name</def>
- <ref>$masterstyles/style:handout-master/@draw:style-name</ref>
- </key>
- <key name="content-drawing-page-style" extends="common-drawing-page-style">
- <def>$contentautostyles/style:style[@style:family='drawing-page']/@style:name</def>
- <ref>$body/office:drawing/draw:page/@draw:style-name</ref>
- <ref>$body/office:presentation/draw:page/@draw:style-name</ref>
- </key>
-
-</keys>
diff --git a/apps/files_odfviewer/src/webodf/webodf/tools/runjslint.js b/apps/files_odfviewer/src/webodf/webodf/tools/runjslint.js
deleted file mode 100644
index c0d28dc77df..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/tools/runjslint.js
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global runtime: true, core: true*/
-runtime.loadClass("core.JSLint");
-
-function checkWithJSLINT(file) {
- "use strict";
- var i, jslint = new core.JSLint().JSLINT,
- jslintconfig = {
- anon: false, // true, if the space may be omitted in anonymous function declarations
- bitwise: false, // if bitwise operators should be allowed
- browser: false, // if the standard browser globals should be predefined
- cap: false, // if upper case HTML should be allowed
- 'continue': false, // if the continuation statement should be tolerated
- css: false, // if CSS workarounds should be tolerated
- debug: false, // if debugger statements should be allowed
- devel: false, // if logging should be allowed (console, alert, etc.)
- eqeq: false, // if == should be allowed
- es5: false, // if ES5 syntax should be allowed
- evil: false, // if eval should be allowed
- forin: false, // if for in statements need not filter
- fragment: false, // if HTML fragments should be allowed
- indent: 4, // the indentation factor
- maxerr: 10, // the maximum number of errors to allow
- //maxlen: 300, // the maximum length of a source line
- newcap: false, // if constructor names capitalization is ignored
- node: false, // if Node.js globals should be predefined
- nomen: false, // if names may have dangling _
- on: false, // if HTML event handlers should be allowed
- passfail: true, // if the scan should stop on first error
- plusplus: false, // if increment/decrement should be allowed
- properties: false, // if all property names must be declared with /*properties*/
- regexp: false, // if the . should be allowed in regexp literals
- rhino: false, // if the Rhino environment globals should be predefined
- undef: false, // if variables can be declared out of order
- unparam: false, // if unused parameters should be tolerated
- safe: false, // if use of some browser features should be restricted
- sloppy: false, // if the 'use strict'; pragma is optional
- stupid: true, // true if stupid practices are tolerated
- sub: false, // if all forms of subscript notation are tolerated
- vars: false, // if multiple var statements per function should be allowed
- white: true, // if sloppy whitespace is tolerated
- widget: false, // if the Yahoo Widgets globals should be predefined
- windows: false // if MS Windows-specific globals should be predefined
- },
- data, result, err;
-
- // these files are an exception for now
- if (file === "lib/core/RawInflate.js") {
- return;
- }
-
- data = runtime.readFileSync(file, "utf-8");
- result = jslint(data, jslintconfig);
- if (!result) {
- for (i = 0; i < jslint.errors.length && jslint.errors[i]; i += 1) {
- err = jslint.errors[i];
- runtime.log(file + ":" + err.line + ":" + err.character +
- ": error: " + err.reason);
- }
- runtime.exit(1);
- }
-}
-
-var i;
-for (i = 0; i < arguments.length; i += 1) {
- checkWithJSLINT(arguments[i]);
-}
diff --git a/apps/files_odfviewer/src/webodf/webodf/webodf.css b/apps/files_odfviewer/src/webodf/webodf/webodf.css
deleted file mode 100644
index dbd6686a263..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/webodf.css
+++ /dev/null
@@ -1,200 +0,0 @@
-@namespace draw url(urn:oasis:names:tc:opendocument:xmlns:drawing:1.0);
-@namespace fo url(urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0);
-@namespace office url(urn:oasis:names:tc:opendocument:xmlns:office:1.0);
-@namespace presentation url(urn:oasis:names:tc:opendocument:xmlns:presentation:1.0);
-@namespace style url(urn:oasis:names:tc:opendocument:xmlns:style:1.0);
-@namespace svg url(urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0);
-@namespace table url(urn:oasis:names:tc:opendocument:xmlns:table:1.0);
-@namespace text url(urn:oasis:names:tc:opendocument:xmlns:text:1.0);
-@namespace runtimens url(urn:webodf); /* namespace for runtime only */
-
-office|document > *, office|document-content > * {
- display: none;
-}
-office|body, office|document {
- display: inline-block;
- position: relative;
-}
-
-text|p, text|h {
- display: block;
- padding: 3px 3px 3px 3px;
- margin: 5px 5px 5px 5px;
-}
-text|h {
- font-weight: bold;
-}
-*[runtimens|containsparagraphanchor] {
- position: relative;
-}
-text|s:before { /* this needs to be the number of spaces given by text:c */
- content: ' ';
-}
-text|tab:before {
- display: inline;
- content: ' ';
-}
-text|line-break {
- content: " ";
- display: block;
-}
-text|tracked-changes {
- /*Consumers that do not support change tracking, should ignore changes.*/
- display: none;
-}
-office|binary-data {
- display: none;
-}
-office|text {
- display: block;
- width: 216mm; /* default to A4 width */
- min-height: 279mm;
- padding-left: 32mm;
- padding-right: 32mm;
- padding-top: 25mm;
- padding-bottom: 13mm;
- margin: 2px;
- text-align: left;
- overflow: hidden;
-}
-office|spreadsheet {
- display: block;
- border-collapse: collapse;
- empty-cells: show;
- font-family: sans-serif;
- font-size: 10pt;
- text-align: left;
- page-break-inside: avoid;
- overflow: hidden;
-}
-office|presentation {
- display: inline-block;
- text-align: left;
-}
-draw|page {
- display: block;
- height: 21cm;
- width: 28cm;
- margin: 3px;
- position: relative;
- overflow: hidden;
-}
-presentation|notes {
- display: none;
-}
-@media print {
- draw|page {
- border: 1pt solid black;
- page-break-inside: avoid;
- }
- presentation|notes {
- /*TODO*/
- }
-}
-office|spreadsheet text|p {
- border: 0px;
- padding: 1px;
- margin: 0px;
-}
-office|spreadsheet table|table {
- margin: 3px;
-}
-office|spreadsheet table|table:after {
- /* show sheet name the end of the sheet */
- /*content: attr(table|name);*/ /* gives parsing error in opera */
-}
-office|spreadsheet table|table-row {
- counter-increment: row;
-}
-office|spreadsheet table|table-row:before {
- width: 3em;
- background: #cccccc;
- border: 1px solid black;
- text-align: center;
- content: counter(row);
-}
-office|spreadsheet table|table-cell {
- border: 1px solid #cccccc;
-}
-table|table {
- display: table;
-}
-draw|frame table|table {
- width: 100%;
- height: 100%;
- background: white;
-}
-table|table-row {
- display: table-row;
-}
-table|table-column {
- display: table-column;
-}
-table|table-cell {
- display: table-cell;
-}
-draw|frame {
- display: block;
-}
-draw|image {
- display: block;
- width: 100%;
- height: 100%;
- top: 0px;
- left: 0px;
- background-repeat: no-repeat;
- background-size: 100% 100%;
- -moz-background-size: 100% 100%;
-}
-/* only show the first image in frame */
-draw|frame > draw|image:nth-of-type(n+2) {
- display: none;
-}
-text|list {
- display: block;
- padding-left: 1.5em;
- counter-reset: list;
-}
-text|list-item {
- display: block;
-}
-text|list-item:before {
- display: inline-block;
- content: '•';
- counter-increment: list;
- width: 0.5em;
- margin-left: -0.5em;
- padding: 0px;
- border: 0px;
-}
-text|list-item > *:first-child {
- display: inline-block;
-}
-text|a {
- color: blue;
- text-decoration: underline;
-}
-text|note-citation {
- vertical-align: super;
- font-size: smaller;
-}
-text|note-body {
- display: none;
-}
-text|note:hover text|note-citation {
- background: #dddddd;
-}
-text|note:hover text|note-body {
- display: block;
- left:1em;
- max-width: 80%;
- position: absolute;
- background: #ffffaa;
-}
-svg|title, svg|desc {
- display: none;
-}
-video {
- width:100%;
- height:100%
-}
diff --git a/apps/files_odfviewer/src/webodf/webodf/xmledit/gui.js b/apps/files_odfviewer/src/webodf/webodf/xmledit/gui.js
deleted file mode 100644
index e38c286aaea..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/xmledit/gui.js
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * Copyright (C) 2011 KO GmbH <jos.van.den.oever@kogmbh.com>
- * @licstart
- * The JavaScript code in this page is free software: you can redistribute it
- * and/or modify it under the terms of the GNU Affero General Public License
- * (GNU AGPL) as published by the Free Software Foundation, either version 3 of
- * the License, or (at your option) any later version. The code is distributed
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU AGPL for more details.
- *
- * As additional permission under GNU AGPL version 3 section 7, you
- * may distribute non-source (e.g., minimized or compacted) forms of
- * that code without the copy of the GNU GPL normally required by
- * section 4, provided you include this license notice and a URL
- * through which recipients can access the Corresponding Source.
- *
- * As a special exception to the AGPL, any HTML file which merely makes function
- * calls to this code, and for that purpose includes it by reference shall be
- * deemed a separate work for copyright law purposes. In addition, the copyright
- * holders of this code give you permission to combine this code with free
- * software libraries that are released under the GNU LGPL. You may copy and
- * distribute such a system following the terms of the GNU AGPL for this code
- * and the LGPL for the libraries. If you modify this code, you may extend this
- * exception to your version of the code, but you are not obligated to do so.
- * If you do not wish to do so, delete this exception statement from your
- * version.
- *
- * This license applies to this entire compilation.
- * @licend
- * @source: http://www.webodf.org/
- * @source: http://gitorious.org/odfkit/webodf/
- */
-/*global Ext runtime gui*/
-runtime.loadClass("gui.XMLEdit");
-
-function createXMLEdit(element, url) {
- var head = element.ownerDocument.getElementsByTagName("head")[0],
- xmlcss = element.ownerDocument.createElement("style"),
- xmledt;
-
- xmlcss.type = "text/css";
- head.appendChild(xmlcss);
- xmledt = new gui.XMLEdit(element, xmlcss);
- runtime.loadXML(url, function (err, xml) {
- if (xml.documentElement) {
- xmledt.setXML(xml);
- }
- });
-}
-
-function loadXML(url, panel, title) {
- title = title || url;
- var tab = panel.find('url', url),
- newTab;
- if (tab.length) {
- panel.setActiveTab(tab[0]);
- return;
- }
- newTab = new Ext.BoxComponent({
- title: title,
- tabTip: url,
- url: url,
- closable: true,
- autoEl: {
- tag: 'div'
- },
- region: 'center'
- });
- panel.add(newTab);
- panel.setActiveTab(newTab);
-
- createXMLEdit(newTab.el.dom, url);
-}
-
-Ext.onReady(function () {
- var tabpanel, tree, viewport, attributeEditor;
-
- Ext.QuickTips.init();
-
- tabpanel = new Ext.TabPanel({
- tbar: [ ],
- region: 'center'
- });
-
- attributeEditor = new Ext.grid.PropertyGrid({
- title: 'Attributes',
- region: 'east',
- width: 200,
- split: true,
- autoScroll: true,
- collapsible: true,
- rootVisible: false,
- enableTabScroll: true,
- defaults: {autoScroll: true}
- });
-
- tree = new Ext.tree.TreePanel({
- title: 'Documents',
- region: 'west',
- width: 200,
- split: true,
- autoScroll: true,
- collapsible: true,
- rootVisible: false,
- enableTabScroll: true,
- defaults: {autoScroll: true},
- collapsed: true,
- root: { nodeType: 'node' }
- });
-
- viewport = new Ext.Viewport({
- layout: 'border',
- items: [ tabpanel, tree, attributeEditor ]
- });
-
- // load the xml
- loadXML('requirements.xml', tabpanel);
- loadXML('../content.xml', tabpanel);
-});
diff --git a/apps/files_odfviewer/src/webodf/webodf/xmledit/index.html b/apps/files_odfviewer/src/webodf/webodf/xmledit/index.html
deleted file mode 100644
index dd6ae4942e0..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/xmledit/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
- <link rel="stylesheet" type="text/css" href="../extjs/resources/css/ext-all.css"/>
- <!-- requirements -->
- <script src="../extjs/adapter/ext/ext-base.js" type="text/javascript" charset="utf-8"></script>
- <script src="../extjs/ext-all-debug.js" type="text/javascript" charset="utf-8"></script>
- <script src="../lib/runtime.js"></script>
- <!-- application -->
- <script src="gui.js" type="text/javascript" charset="utf-8"></script>
-
- <title>XMLEdit</title>
-</head>
-<body>
-</body>
-</html>
diff --git a/apps/files_odfviewer/src/webodf/webodf/xmledit/requirements.dtd b/apps/files_odfviewer/src/webodf/webodf/xmledit/requirements.dtd
deleted file mode 100644
index 82cb8deb8fb..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/xmledit/requirements.dtd
+++ /dev/null
@@ -1,12 +0,0 @@
-<!ELEMENT requirements (requirement*, dependency*)>
-<!ATTLIST desc>
-
-<!ELEMENT requirement (desc)>
-<!ATTLIST requirement id ID #REQUIRED>
-
-<!ELEMENT desc (#PCDATA)>
-<!ATTLIST desc>
-
-<!ELEMENT dependency EMPTY>
-<!ATTLIST dependency parent IDREF #REQUIRED
- child IDREF #REQUIRED>
diff --git a/apps/files_odfviewer/src/webodf/webodf/xmledit/requirements.xml b/apps/files_odfviewer/src/webodf/webodf/xmledit/requirements.xml
deleted file mode 100644
index cbeae4ce7ed..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/xmledit/requirements.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE requirements PUBLIC "WebODF requirements XML" "requirements.dtd">
-<!--
- Designing an XML editor
-
-requirements:
- - load xml document in a frame and visualize it with specified css
- - load xml document in another (underwater) frame and show it as XML
- - parse DTD of the document format into a JSON data structure
- - edit the text content/character of the XML document
-
--->
-
-<requirements xmlns="http://www.webodf.org/dtd/requirements" xmlns:hi="hello">
- <requirement id="r1">
- <desc>load xml document in a frame</desc>
- </requirement>
- <requirement id="r2">
- <desc>show xml in a frame with a specified css</desc>
- </requirement>
- <dependency parent="r1" child="r2"/>
-</requirements>
diff --git a/apps/files_odfviewer/src/webodf/webodf/xmledit/test.xml b/apps/files_odfviewer/src/webodf/webodf/xmledit/test.xml
deleted file mode 100644
index cad3f324707..00000000000
--- a/apps/files_odfviewer/src/webodf/webodf/xmledit/test.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE requirements PUBLIC "WebODF requirements XML" "requirements.dtd">
-<!--
- Designing an XML editor
-
-requirements:
- - load xml document in a frame and visualize it with specified css
- - load xml document in another (underwater) frame and show it as XML
- - parse DTD of the document format into a JSON data structure
- - edit the text content/character of the XML document
-
--->
-
-<requirements>
- <requirement id="r1">
- <desc>load xml document in a frame</desc>
- </requirement>
- <requirement id="r2">
- <desc>show xml in a frame with a specified css</desc>
- </requirement>
- <dependency parent="r1" child="r2"/>
-</requirements>