ソースを参照

【修改】配置更新

linfutong 3 年 前
コミット
0bc41feef5
共有100 個のファイルを変更した0 個の追加39282 個の削除を含む
  1. 0 5
      file-online-preview/.gitattributes
  2. 0 30
      file-online-preview/.gitignore
  3. 0 42
      file-online-preview/Dockerfile
  4. 0 201
      file-online-preview/LICENSE
  5. 0 166
      file-online-preview/README.en.md
  6. 0 238
      file-online-preview/README.md
  7. BIN
      file-online-preview/doc/KK开源技术交流2群群聊二维码.png
  8. BIN
      file-online-preview/doc/kk开源技术交流群聊二维码.png
  9. 0 0
      file-online-preview/fonts/.gitkeep
  10. 0 152
      file-online-preview/office-plugin/pom.xml
  11. 0 37
      file-online-preview/office-plugin/src/main/assembly/dist.xml
  12. 0 125
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/AbstractConversionTask.java
  13. 0 75
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/OfficeDocumentConverter.java
  14. 0 47
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/OfficeDocumentUtils.java
  15. 0 74
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/StandardConversionTask.java
  16. 0 126
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/cli/Convert.java
  17. 0 157
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/document/DefaultDocumentFormatRegistry.java
  18. 0 19
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/document/DocumentFamily.java
  19. 0 99
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/document/DocumentFormat.java
  20. 0 25
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/document/DocumentFormatRegistry.java
  21. 0 73
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/document/JsonDocumentFormatRegistry.java
  22. 0 65
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/document/SimpleDocumentFormatRegistry.java
  23. 0 223
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/DefaultOfficeManagerConfiguration.java
  24. 0 86
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/ExternalOfficeManager.java
  25. 0 47
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/ExternalOfficeManagerConfiguration.java
  26. 0 176
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/ManagedOfficeProcess.java
  27. 0 97
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/ManagedOfficeProcessSettings.java
  28. 0 43
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/NamedThreadFactory.java
  29. 0 117
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeConnection.java
  30. 0 25
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionEvent.java
  31. 0 23
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionEventListener.java
  32. 0 15
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionProtocol.java
  33. 0 19
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeContext.java
  34. 0 26
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeException.java
  35. 0 30
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeManager.java
  36. 0 209
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeProcess.java
  37. 0 19
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeTask.java
  38. 0 170
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeUtils.java
  39. 0 110
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/PooledOfficeManager.java
  40. 0 43
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/PooledOfficeManagerSettings.java
  41. 0 110
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/ProcessPoolOfficeManager.java
  42. 0 23
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/RetryTimeoutException.java
  43. 0 55
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/Retryable.java
  44. 0 59
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/SuspendableThreadPoolExecutor.java
  45. 0 32
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/TemporaryException.java
  46. 0 62
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/UnoUrl.java
  47. 0 82
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/process/LinuxProcessManager.java
  48. 0 32
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/process/ProcessManager.java
  49. 0 33
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/process/ProcessQuery.java
  50. 0 25
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/process/PureJavaProcessManager.java
  51. 0 71
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/process/SigarProcessManager.java
  52. 0 76
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/util/ConfigUtils.java
  53. 0 35
      file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/util/PlatformUtils.java
  54. 0 188
      file-online-preview/office-plugin/src/main/resources/document-formats.js
  55. 0 16481
      file-online-preview/office-plugin/windows-office/CREDITS.fodt
  56. 0 6787
      file-online-preview/office-plugin/windows-office/LICENSE.html
  57. 0 159
      file-online-preview/office-plugin/windows-office/NOTICE
  58. 0 100
      file-online-preview/office-plugin/windows-office/help/a11y-toggle.js
  59. 0 907
      file-online-preview/office-plugin/windows-office/help/default.css
  60. 0 608
      file-online-preview/office-plugin/windows-office/help/fuzzysort.js
  61. 0 46
      file-online-preview/office-plugin/windows-office/help/help.html
  62. 0 188
      file-online-preview/office-plugin/windows-office/help/help.js
  63. 0 266
      file-online-preview/office-plugin/windows-office/help/help2.js
  64. 0 8433
      file-online-preview/office-plugin/windows-office/help/hid2file.js
  65. 0 51
      file-online-preview/office-plugin/windows-office/help/idxcaption.xsl
  66. 0 131
      file-online-preview/office-plugin/windows-office/help/idxcontent.xsl
  67. 0 74
      file-online-preview/office-plugin/windows-office/help/index.html
  68. 0 1
      file-online-preview/office-plugin/windows-office/help/languages.js
  69. 0 933
      file-online-preview/office-plugin/windows-office/help/main_transform.xsl
  70. BIN
      file-online-preview/office-plugin/windows-office/help/media/files/scalc/functions_ifs.ods
  71. BIN
      file-online-preview/office-plugin/windows-office/help/media/files/scalc/imtrigon.ods
  72. BIN
      file-online-preview/office-plugin/windows-office/help/media/files/scalc/pivot.ods
  73. BIN
      file-online-preview/office-plugin/windows-office/help/media/files/scalc/trigon.ods
  74. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/area1.png
  75. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/area2.png
  76. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_1.png
  77. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_2.png
  78. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_3.png
  79. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_4.png
  80. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_5.png
  81. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_6.png
  82. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_7.png
  83. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_8.png
  84. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_9.png
  85. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_gray.png
  86. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_white.png
  87. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_1.png
  88. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_2.png
  89. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_3.png
  90. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_4.png
  91. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_5.png
  92. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_6.png
  93. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_7.png
  94. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_8.png
  95. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_9.png
  96. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/calcein.png
  97. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/calcnav.png
  98. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/copydata.png
  99. BIN
      file-online-preview/office-plugin/windows-office/help/media/helpimg/diatrans.png
  100. 0 0
      file-online-preview/office-plugin/windows-office/help/media/helpimg/dircurscent.png

+ 0 - 5
file-online-preview/.gitattributes

@@ -1,5 +0,0 @@
-*.css linguist-language=java
-*.less linguist-language=java
-*.js linguist-language=java
-*.html linguist-language=java
-*.* linguist-language=java

+ 0 - 30
file-online-preview/.gitignore

@@ -1,30 +0,0 @@
-target/
-!.mvn/wrapper/maven-wrapper.jar
-
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-
-### IntelliJ IDEA ###
-.idea
-*.iws
-*.iml
-*.ipr
-
-### NetBeans ###
-nbproject/private/
-nbbuild/
-dist/
-nbdist/
-.nb-gradle/
-/*.iml
-
-### VS Code ###
-.vscode/
-
-server/src/main/cache/
-server/src/main/file/

ファイルの差分が大きいため隠しています
+ 0 - 42
file-online-preview/Dockerfile


+ 0 - 201
file-online-preview/LICENSE

@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.

+ 0 - 166
file-online-preview/README.en.md

@@ -1,166 +0,0 @@
-# kkFileView
-
-[![GitHub license](https://img.shields.io/github/license/kekingcn/kkFileView.svg?style=flat-square)](https://github.com/kekingcn/kkFileView/blob/master/LICENSE)
-
-### Introduction
-
-This kekingcn kkFileView project is intended to be a solution for previewing documents online. At present,there are some similar paid products in the industry.
-Such as 【[永中office](http://dcs.yozosoft.com/)】,【[office365](http://www.officeweb365.com/)】,【[idocv](https://www.idocv.com/)】, etc...
-It is an open source implementation and released under the Apache License version 2.0. Finally,It is aimed to feedback the community after obtaining the consent of company executives, 
-special thanks to the supports of @唐老大 and the contributions of @端木详笑. 
-
-### Features
-- Build with the popular frame spring boot
-- Easy to build and deploy
-- Basically support online preview of mainstream office documents, such as Doc, docx, Excel, PDF, TXT, zip, rar, pictures, etc
-- REST API
-- Abstract file preview interface so that it is easy to extend more file extensions and develop this project on your own
-
-### Official website and DOCS
-
-URL:[https://kkfileview.keking.cn](https://kkfileview.keking.cn)
-
-### Live demo
-> Please treat public service kindly, or this would stop at any time.
-
-URL:[https://file.keking.cn](https://file.keking.cn)
-
-### Documentation
-1. Full wiki document:https://gitee.com/kekingcn/file-online-preview/wikis/pages
-1. 中文文档:https://gitee.com/kekingcn/file-online-preview/blob/master/README.md
-1. English document:https://gitee.com/kekingcn/file-online-preview/blob/master/README.en.md
-
-### Contact us && Join us
-> We will answer everyone's questions in use of this project.
-And please Google or Baidu first before asking a question, so that we can solve it efficiently. 
-Cherish life away from ineffective communication.
-
-![输入图片说明](https://gitee.com/uploads/images/2017/1219/173717_934cb068_492218.png "屏幕截图.png")
-QQ group:613025121
-
-### Pictures for some samples
-#### 1. Text Preview  
-It supports preview of all types of text documents. Because there are too many types of text documents, it is impossible to enumerate them. The default open types are as follows:  txt,html,htm,asp,jsp,xml,json,properties,md,gitignore,log,java,py,c,cpp,sql,sh,bat,m,bas,prg,cmd  
-The text preview effect is as follows    
-![text](https://kkfileview.keking.cn/img/preview/preview-text.png)      
-
-#### 2. Picture preview  
-Support jpg, jpeg, png, gif and other picture previews (flip, zoom, mirror). The preview effect is as follows   
-![image](https://kkfileview.keking.cn/img/preview/preview-image.png)  
-
-#### 3. Word document preview
-Doc and docx document previews are supported. There are two modes of word previews: one is that each page of word is converted to picture previews, the other is that the whole word document is converted to PDF, and then previews PDF. The applicable scenarios of the two modes are as follows  
-* Picture preview modes: the word file is large, and the whole PDF loaded in the foreground is too slow  
-* Pdf Preview modes: intranet access, loading PDF fast  
-The preview effect of picture preview mode is as follows  
-![word1](https://kkfileview.keking.cn/img/preview/preview-doc-image.png)  
-The preview effect of PDF preview mode is as follows  
-![word2](https://kkfileview.keking.cn/img/preview/preview-doc-pdf.png)  
-
-#### 4. PPT document preview  
-ppt and pptx document preview are supported. Like word documents, there are two preview modes  
-The preview effect of picture preview mode is as follows  
-![ppt1](https://kkfileview.keking.cn/img/preview/preview-ppt-image.png)  
-The preview effect of PDF preview mode is as follows 
-![ppt2](https://kkfileview.keking.cn/img/preview/preview-ppt-pdf.png)  
-
-#### 5. PDF document preview  
-Pdf document preview is supported. Like word document, there are two preview modes  
-The preview effect of picture preview mode is as follows    
-![pdf1](https://kkfileview.keking.cn/img/preview/preview-pdf-image.png)  
-The preview effect of PDF preview mode is as follows     
-![pdf2](https://kkfileview.keking.cn/img/preview/preview-pdf-pdf.png)    
-
-#### 6. EXCEL document preview  
-Support XLS, xlsx document preview, the preview effect is as follows  
-![excel](https://kkfileview.keking.cn/img/preview/preview-xls.png)  
-
-#### 7. Compressed file Preview  
-Support zip, rar, jar, tar, gzip and other compressed packages. The preview effect is as follows  
-![compress1](https://kkfileview.keking.cn/img/preview/preview-zip.png)  
-Click the file name in the compressed package to preview the file directly. The preview effect is as follows  
-![compress2](https://kkfileview.keking.cn/img/preview/preview-zip-inner.png)  
-
-#### 8. Multimedia file Preview  
-Theoretically, all video and audio files are supported. Since all file formats cannot be enumerated, the default open type is as follows  
-mp3,wav,mp4,flv  
-The video preview effect is as follows  
-![media1](https://kkfileview.keking.cn/img/preview/preview-video.png)  
-The audio preview effect is as follows    
-![media2](https://kkfileview.keking.cn/img/preview/preview-audio.png)  
-
-#### 9. CAD document preview 
-CAD DWG document preview is supported. Like word document, there are two preview modes  
-The preview effect of Picture preview mode is as follows  
-![cad1](https://kkfileview.keking.cn/img/preview/preview-cad-image.png)  
-The preview effect of PDF preview mode is as follows  
-![cad2](https://kkfileview.keking.cn/img/preview/preview-cad-pdf.png)  
-Considering space issues, the pictures of other types of documents will not be shown here.You can deploy it by yourself if you are interested in our project.There is a way to deploy it as below.
-
-### Quick Start
-> Technology stack
-- Spring boot: [spring boot Development Reference Guide](http://www.kailing.pub/PdfReader/web/viewer.html?file=springboot)
-- Freemarker
-- Redisson 
-- Jodconverter
-> Dependencies
-- Redis(Optional, Unnecessary by default)
-- OpenOffice or LibreOffice(Integrated on Windows, will be installed automatically on Linux, need to be manually installed on Mac OS)
-
-1. First step:`git pull https://github.com/kekingcn/file-online-preview.git`
-
-2. Third step:Run the main method of FilePreviewApplication.java.After starting,visit `http://localhost:8012/`.
-If everything is ok,you will see the picture below.
-![输入图片说明](https://gitee.com/uploads/images/2017/1213/100221_ea15202e_492218.png "屏幕截图.png")
-
-### Changelog
-> May 20th 2020 :
-1. Support for global watermark and dynamic change of watermark content through parameters
-2. Support for CAD file Preview
-3. Add configuration item base.url, support using nginx reverse proxy and set context-path
-4. All configuration items can be read from environment variables, which is convenient for docker image deployment and large-scale use in cluster
-5. Support the configuration of TrustHost  (only the file source from the trust site can be previewed), and protect the preview service from abuse
-6. Support configuration of customize cache cleanup time (cron expression)
-7. All recognizable plain text can be previewed directly without downloading, such as .md .java .py, etc
-8. Support configuration to limit PDF file download after conversion
-9. Optimize Maven packaging configuration to solve the problem of line break in .sh script
-10. Place all CDN dependencies on the front end locally for users without external network connection
-11. Comment Service on home page switched from Sohu ChangYan to gitalk
-12. Fixed preview exceptions that may be caused by special characters in the URL
-13. Fixed the addtask exception of the transformation file queue
-14. Fixed other known issues
-15. Official website build: [https://kkfileview.keking.cn](https://kkfileview.keking.cn)
-16. Official docker image repository build: [https://hub.docker.com/r/keking/kkfileview](https://hub.docker.com/r/keking/kkfileview)
-
-> June 18th 2019 :
-1. Support automatic cleaning of cache and preview files
-2. Support http/https stream url file preview
-3. Support FTP url file preview
-4. Add Docker build
-
-> April 8th 2019
-1. Cache and queue implementations abstract, providing JDK and REDIS implementations (REDIS becomes optional dependencies)
-2. Provides zip and tar.gz packages, and provides a one-click startup script
-
-> January 17th 2018
-
-1. Refined the project directory, abstract file preview interface, Easy to extend more file extensions and depoly this project on your own
-1. Added English documentation (@幻幻Fate,@汝辉) contribution
-1. Support for more image file extensions
-1. Fixed the issue that image carousel in zip file will always start from the first
-
-> January 12th 2018
-
-1. Support for multiple images preview 
-1. Support for images rotation preview in rar/zip
-
-> January 2nd 2018
-
-1. Fixed gibberish issue when preview a txt document caused by the file encoding problem 
-1. Fixed the issue that some module dependencies can not be found
-1. Add a spring boot profile, and support for Multi-environment configuration 
-1. Add `pdf.js` to preview the documents such as doc,etc.,support for generating doc headlines as pdf menu,support for mobile preview
-
-### Register Usage
-If this project is helpful for you, please register on 'https://gitee.com/kekingcn/file-online-preview/issues/IGSBV',
-If this project helps you to economize the service charge for preview of documents, as well as you are willing to support us, click 【donate】 below to donate a cup of coffee, we would appreciate it.

ファイルの差分が大きいため隠しています
+ 0 - 238
file-online-preview/README.md


BIN
file-online-preview/doc/KK开源技术交流2群群聊二维码.png


BIN
file-online-preview/doc/kk开源技术交流群聊二维码.png


+ 0 - 0
file-online-preview/fonts/.gitkeep


+ 0 - 152
file-online-preview/office-plugin/pom.xml

@@ -1,152 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <artifactId>kkFileView-parent</artifactId>
-        <groupId>cn.keking</groupId>
-        <version>4.1.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>office-plugin</artifactId>
-
-    <repositories>
-        <repository>
-            <!-- required for org.hyperic:sigar -->
-            <id>jboss-public-repository-group</id>
-            <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
-        </repository>
-    </repositories>
-
-    <dependencies>
-        <dependency>
-            <groupId>commons-io</groupId>
-            <artifactId>commons-io</artifactId>
-            <version>2.7</version>
-        </dependency>
-        <dependency>
-            <groupId>org.openoffice</groupId>
-            <artifactId>juh</artifactId>
-            <version>3.2.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.openoffice</groupId>
-            <artifactId>ridl</artifactId>
-            <version>3.2.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.openoffice</groupId>
-            <artifactId>unoil</artifactId>
-            <version>3.2.1</version>
-        </dependency>
-        <dependency>
-            <!-- for the command line tool -->
-            <groupId>commons-cli</groupId>
-            <artifactId>commons-cli</artifactId>
-            <version>1.1</version>
-            <optional>true</optional>
-        </dependency>
-        <dependency>
-            <groupId>org.hyperic</groupId>
-            <artifactId>sigar</artifactId>
-            <version>1.6.5.132</version>
-            <optional>true</optional>
-        </dependency>
-        <dependency>
-            <groupId>org.json</groupId>
-            <artifactId>json</artifactId>
-            <version>20090211</version>
-            <optional>true</optional>
-        </dependency>
-        <dependency>
-            <groupId>org.testng</groupId>
-            <artifactId>testng</artifactId>
-            <version>6.0.1</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <!--   要将源码放上去,需要加入这个插件    -->
-            <plugin>
-                <artifactId>maven-source-plugin</artifactId>
-                <version>2.1</version>
-                <configuration>
-                    <attach>true</attach>
-                </configuration>
-                <executions>
-                    <execution>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <version>2.7.2</version>
-                <configuration>
-                    <!-- don't run tests in parallel -->
-                    <perCoreThreadCount>false</perCoreThreadCount>
-                    <threadCount>1</threadCount>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <version>2.3.1</version>
-                <configuration>
-                    <archive>
-                        <manifest>
-                            <mainClass>org.artofsolving.jodconverter.cli.Convert</mainClass>
-                            <addClasspath>true</addClasspath>
-                        </manifest>
-                    </archive>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <version>2.2-beta-5</version>
-                <configuration>
-                    <descriptors>
-                        <descriptor>src/main/assembly/dist.xml</descriptor>
-                    </descriptors>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
-    <reporting>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <version>2.7</version>
-            </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>cobertura-maven-plugin</artifactId>
-                <version>2.4</version>
-            </plugin>
-        </plugins>
-    </reporting>
-    <!-- distribute目录 -->
-    <distributionManagement>
-        <repository>
-            <id>repo</id>
-            <name>User Project Releases</name>
-            <url>http://192.168.1.204:8081/nexus/content/repositories/releases</url>
-        </repository>
-        <snapshotRepository>
-            <id>repo</id>
-            <name>User Project SNAPSHOTS</name>
-            <url>http://192.168.1.204:8081/nexus/content/repositories/snapshots</url>
-        </snapshotRepository>
-    </distributionManagement>
-</project>

+ 0 - 37
file-online-preview/office-plugin/src/main/assembly/dist.xml

@@ -1,37 +0,0 @@
-<assembly>
-  <id>dist</id>
-  <formats>
-    <format>zip</format>
-  </formats>
-  <dependencySets>
-    <dependencySet>
-      <outputDirectory>lib</outputDirectory>
-      <excludes>
-        <exclude>org.hyperic:sigar</exclude>
-      </excludes>
-    </dependencySet>
-  </dependencySets>
-  <fileSets>
-    <fileSet>
-      <includes>
-        <include>LICENSE.txt</include>
-        <include>README.txt</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>target</directory>
-      <outputDirectory>/</outputDirectory>
-      <includes>
-        <include>${project.artifactId}-${project.version}-javadoc.jar</include>
-        <include>${project.artifactId}-${project.version}-sources.jar</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>src/main/resources</directory>
-      <outputDirectory>/conf</outputDirectory>
-      <includes>
-        <include>document-formats.js</include>
-      </includes>
-    </fileSet>
-  </fileSets>
-</assembly>

+ 0 - 125
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/AbstractConversionTask.java

@@ -1,125 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter;
-
-import static org.artofsolving.jodconverter.office.OfficeUtils.SERVICE_DESKTOP;
-import static org.artofsolving.jodconverter.office.OfficeUtils.cast;
-import static org.artofsolving.jodconverter.office.OfficeUtils.toUnoProperties;
-import static org.artofsolving.jodconverter.office.OfficeUtils.toUrl;
-
-import java.io.File;
-import java.util.Map;
-
-import org.artofsolving.jodconverter.office.OfficeContext;
-import org.artofsolving.jodconverter.office.OfficeException;
-import org.artofsolving.jodconverter.office.OfficeTask;
-
-import com.sun.star.frame.XComponentLoader;
-import com.sun.star.frame.XStorable;
-import com.sun.star.io.IOException;
-import com.sun.star.lang.IllegalArgumentException;
-import com.sun.star.lang.XComponent;
-import com.sun.star.task.ErrorCodeIOException;
-import com.sun.star.util.CloseVetoException;
-import com.sun.star.util.XCloseable;
-
-public abstract class AbstractConversionTask implements OfficeTask {
-
-    private final File inputFile;
-    private final File outputFile;
-
-    public AbstractConversionTask(File inputFile, File outputFile) {
-        this.inputFile = inputFile;
-        this.outputFile = outputFile;
-    }
-
-    protected abstract Map<String,?> getLoadProperties(File inputFile);
-
-    protected abstract Map<String,?> getStoreProperties(File outputFile, XComponent document);
-
-    public void execute(OfficeContext context) throws OfficeException {
-        XComponent document = null;
-        try {
-            document = loadDocument(context, inputFile);
-            modifyDocument(document);
-            storeDocument(document, outputFile);
-        } catch (OfficeException officeException) {
-            throw officeException;
-        } catch (Exception exception) {
-            throw new OfficeException("conversion failed", exception);
-        } finally {
-            if (document != null) {
-                XCloseable closeable = cast(XCloseable.class, document);
-                if (closeable != null) {
-                    try {
-                        closeable.close(true);
-                    } catch (CloseVetoException closeVetoException) {
-                        // whoever raised the veto should close the document
-                    }
-                } else {
-                    document.dispose();
-                }
-            }
-        }
-    }
-
-    private XComponent loadDocument(OfficeContext context, File inputFile) throws OfficeException {
-        if (!inputFile.exists()) {
-            throw new OfficeException("input document not found");
-        }
-        XComponentLoader loader = cast(XComponentLoader.class, context.getService(SERVICE_DESKTOP));
-        Map<String,?> loadProperties = getLoadProperties(inputFile);
-        XComponent document = null;
-        try {
-            document = loader.loadComponentFromURL(toUrl(inputFile), "_blank", 0, toUnoProperties(loadProperties));
-        } catch (IllegalArgumentException illegalArgumentException) {
-            throw new OfficeException("could not load document: " + inputFile.getName(), illegalArgumentException);
-        } catch (ErrorCodeIOException errorCodeIOException) {
-            throw new OfficeException("could not load document: "  + inputFile.getName() + "; errorCode: " + errorCodeIOException.ErrCode, errorCodeIOException);
-        } catch (IOException ioException) {
-            throw new OfficeException("could not load document: "  + inputFile.getName(), ioException);
-        }
-        if (document == null) {
-            throw new OfficeException("could not load document: "  + inputFile.getName());
-        }
-        return document;
-    }
-
-    /**
-     * Override to modify the document after it has been loaded and before it gets
-     * saved in the new format.
-     * <p>
-     * Does nothing by default.
-     * 
-     * @param document
-     * @throws OfficeException
-     */
-    protected void modifyDocument(XComponent document) throws OfficeException {
-    	// noop
-    }
-
-    private void storeDocument(XComponent document, File outputFile) throws OfficeException {
-        Map<String,?> storeProperties = getStoreProperties(outputFile, document);
-        if (storeProperties == null) {
-            throw new OfficeException("unsupported conversion");
-        }
-        try {
-            cast(XStorable.class, document).storeToURL(toUrl(outputFile), toUnoProperties(storeProperties));
-        } catch (ErrorCodeIOException errorCodeIOException) {
-            throw new OfficeException("could not store document: " + outputFile.getName() + "; errorCode: " + errorCodeIOException.ErrCode, errorCodeIOException);
-        } catch (IOException ioException) {
-            throw new OfficeException("could not store document: " + outputFile.getName(), ioException);
-        }
-    }
-
-}

+ 0 - 75
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/OfficeDocumentConverter.java

@@ -1,75 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.commons.io.FilenameUtils;
-import org.artofsolving.jodconverter.document.DefaultDocumentFormatRegistry;
-import org.artofsolving.jodconverter.document.DocumentFormat;
-import org.artofsolving.jodconverter.document.DocumentFormatRegistry;
-import org.artofsolving.jodconverter.office.OfficeException;
-import org.artofsolving.jodconverter.office.OfficeManager;
-
-import com.sun.star.document.UpdateDocMode;
-
-public class OfficeDocumentConverter {
-
-    private final OfficeManager officeManager;
-    private final DocumentFormatRegistry formatRegistry;
-
-    private Map<String,?> defaultLoadProperties = createDefaultLoadProperties();
-
-    public OfficeDocumentConverter(OfficeManager officeManager) {
-        this(officeManager, new DefaultDocumentFormatRegistry());
-    }
-
-    public OfficeDocumentConverter(OfficeManager officeManager, DocumentFormatRegistry formatRegistry) {
-        this.officeManager = officeManager;
-        this.formatRegistry = formatRegistry;
-    }
-
-    private Map<String,Object> createDefaultLoadProperties() {
-        Map<String,Object> loadProperties = new HashMap<String,Object>();
-        loadProperties.put("Hidden", true);
-        loadProperties.put("ReadOnly", true);
-        loadProperties.put("UpdateDocMode", UpdateDocMode.QUIET_UPDATE);
-        return loadProperties;
-    }
-
-    public void setDefaultLoadProperties(Map<String, ?> defaultLoadProperties) {
-        this.defaultLoadProperties = defaultLoadProperties;
-    }
-
-    public DocumentFormatRegistry getFormatRegistry() {
-        return formatRegistry;
-    }
-
-    public void convert(File inputFile, File outputFile) throws OfficeException {
-        String outputExtension = FilenameUtils.getExtension(outputFile.getName());
-        DocumentFormat outputFormat = formatRegistry.getFormatByExtension(outputExtension);
-        convert(inputFile, outputFile, outputFormat);
-    }
-
-    public void convert(File inputFile, File outputFile, DocumentFormat outputFormat) throws OfficeException {
-        String inputExtension = FilenameUtils.getExtension(inputFile.getName());
-        DocumentFormat inputFormat = formatRegistry.getFormatByExtension(inputExtension);
-        StandardConversionTask conversionTask = new StandardConversionTask(inputFile, outputFile, outputFormat);
-        conversionTask.setDefaultLoadProperties(defaultLoadProperties);
-        conversionTask.setInputFormat(inputFormat);
-        officeManager.execute(conversionTask);
-    }
-
-}

+ 0 - 47
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/OfficeDocumentUtils.java

@@ -1,47 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter;
-
-import static org.artofsolving.jodconverter.office.OfficeUtils.*;
-
-import org.artofsolving.jodconverter.document.DocumentFamily;
-import org.artofsolving.jodconverter.office.OfficeException;
-
-
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XServiceInfo;
-
-class OfficeDocumentUtils {
-
-    private OfficeDocumentUtils() {
-        throw new AssertionError("utility class must not be instantiated");
-    }
-
-    public static DocumentFamily getDocumentFamily(XComponent document) throws OfficeException {
-        XServiceInfo serviceInfo = cast(XServiceInfo.class, document);
-        if (serviceInfo.supportsService("com.sun.star.text.GenericTextDocument")) {
-            // NOTE: a GenericTextDocument is either a TextDocument, a WebDocument, or a GlobalDocument
-            // but this further distinction doesn't seem to matter for conversions
-            return DocumentFamily.TEXT;
-        } else if (serviceInfo.supportsService("com.sun.star.sheet.SpreadsheetDocument")) {
-            return DocumentFamily.SPREADSHEET;
-        } else if (serviceInfo.supportsService("com.sun.star.presentation.PresentationDocument")) {
-            return DocumentFamily.PRESENTATION;
-        } else if (serviceInfo.supportsService("com.sun.star.drawing.DrawingDocument")) {
-            return DocumentFamily.DRAWING;
-        } else {
-            throw new OfficeException("document of unknown family: " + serviceInfo.getImplementationName());
-        }
-    }
-
-}

+ 0 - 74
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/StandardConversionTask.java

@@ -1,74 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter;
-
-import static org.artofsolving.jodconverter.office.OfficeUtils.cast;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.artofsolving.jodconverter.document.DocumentFamily;
-import org.artofsolving.jodconverter.document.DocumentFormat;
-import org.artofsolving.jodconverter.office.OfficeException;
-
-import com.sun.star.lang.XComponent;
-import com.sun.star.util.XRefreshable;
-
-public class StandardConversionTask extends AbstractConversionTask {
-
-    private final DocumentFormat outputFormat;
-
-    private Map<String,?> defaultLoadProperties;
-    private DocumentFormat inputFormat;
-
-    public StandardConversionTask(File inputFile, File outputFile, DocumentFormat outputFormat) {
-        super(inputFile, outputFile);
-        this.outputFormat = outputFormat;
-    }
-
-    public void setDefaultLoadProperties(Map<String, ?> defaultLoadProperties) {
-        this.defaultLoadProperties = defaultLoadProperties;
-    }
-
-    public void setInputFormat(DocumentFormat inputFormat) {
-        this.inputFormat = inputFormat;
-    }
-
-    @Override
-    protected void modifyDocument(XComponent document) throws OfficeException {
-        XRefreshable refreshable = cast(XRefreshable.class, document);
-        if (refreshable != null) {
-            refreshable.refresh();
-        }
-    }
-
-    @Override
-    protected Map<String,?> getLoadProperties(File inputFile) {
-        Map<String,Object> loadProperties = new HashMap<String,Object>();
-        if (defaultLoadProperties != null) {
-            loadProperties.putAll(defaultLoadProperties);
-        }
-        if (inputFormat != null && inputFormat.getLoadProperties() != null) {
-            loadProperties.putAll(inputFormat.getLoadProperties());
-        }
-        return loadProperties;
-    }
-
-    @Override
-    protected Map<String,?> getStoreProperties(File outputFile, XComponent document) {
-        DocumentFamily family = OfficeDocumentUtils.getDocumentFamily(document);
-        return outputFormat.getStoreProperties(family);
-    }
-
-}

+ 0 - 126
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/cli/Convert.java

@@ -1,126 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.cli;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.ParseException;
-import org.apache.commons.cli.PosixParser;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.FilenameUtils;
-import org.artofsolving.jodconverter.OfficeDocumentConverter;
-import org.artofsolving.jodconverter.document.DefaultDocumentFormatRegistry;
-import org.artofsolving.jodconverter.document.DocumentFormatRegistry;
-import org.artofsolving.jodconverter.document.JsonDocumentFormatRegistry;
-import org.artofsolving.jodconverter.office.OfficeManager;
-import org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration;
-import org.json.JSONException;
-
-/**
- * Command line interface executable.
- */
-public class Convert {
-
-    public static final int STATUS_OK = 0;
-    public static final int STATUS_MISSING_INPUT_FILE = 1;
-    public static final int STATUS_INVALID_ARGUMENTS = 255;
-
-    private static final Option OPTION_OUTPUT_FORMAT = new Option("o", "output-format", true, "output format (e.g. pdf)");
-    private static final Option OPTION_PORT = new Option("p", "port", true, "office socket port (optional; defaults to 2002)");
-    private static final Option OPTION_REGISTRY = new Option("r", "registry", true, "document formats registry configuration file (optional)");
-    private static final Option OPTION_TIMEOUT = new Option("t", "timeout", true, "maximum conversion time in seconds (optional; defaults to 120)");
-    private static final Option OPTION_USER_PROFILE = new Option("u", "user-profile", true, "use settings from the given user installation dir (optional)");
-    private static final Options OPTIONS = initOptions();
-
-    private static final int DEFAULT_OFFICE_PORT = 2002;
-
-    private static Options initOptions() {
-        Options options = new Options();
-        options.addOption(OPTION_OUTPUT_FORMAT);
-        options.addOption(OPTION_PORT);
-        options.addOption(OPTION_REGISTRY);
-        options.addOption(OPTION_TIMEOUT);
-        options.addOption(OPTION_USER_PROFILE);
-        return options;
-    }
-
-    public static void main(String[] arguments) throws ParseException, JSONException, IOException {
-        CommandLineParser commandLineParser = new PosixParser();
-        CommandLine commandLine = commandLineParser.parse(OPTIONS, arguments);
-
-        String outputFormat = null;
-        if (commandLine.hasOption(OPTION_OUTPUT_FORMAT.getOpt())) {
-            outputFormat = commandLine.getOptionValue(OPTION_OUTPUT_FORMAT.getOpt());
-        }
-
-        int port = DEFAULT_OFFICE_PORT;
-        if (commandLine.hasOption(OPTION_PORT.getOpt())) {
-            port = Integer.parseInt(commandLine.getOptionValue(OPTION_PORT.getOpt()));
-        }
-
-        String[] fileNames = commandLine.getArgs();
-        if ((outputFormat == null && fileNames.length != 2) || fileNames.length < 1) {
-            String syntax = "java -jar jodconverter-core.jar [options] input-file output-file\n"
-                    + "or [options] -o output-format input-file [input-file...]";
-            HelpFormatter helpFormatter = new HelpFormatter();
-            helpFormatter.printHelp(syntax, OPTIONS);
-            System.exit(STATUS_INVALID_ARGUMENTS);
-        }
-
-        DocumentFormatRegistry registry;
-        if (commandLine.hasOption(OPTION_REGISTRY.getOpt())) {
-            File registryFile = new File(commandLine.getOptionValue(OPTION_REGISTRY.getOpt()));
-            registry = new JsonDocumentFormatRegistry(FileUtils.readFileToString(registryFile));
-        } else {
-            registry = new DefaultDocumentFormatRegistry();
-        }
-
-        DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration();
-        configuration.setPortNumber(port);
-        if (commandLine.hasOption(OPTION_TIMEOUT.getOpt())) {
-            int timeout = Integer.parseInt(commandLine.getOptionValue(OPTION_TIMEOUT.getOpt()));
-            configuration.setTaskExecutionTimeout(timeout * 1000);
-        }
-        if (commandLine.hasOption(OPTION_USER_PROFILE.getOpt())) {
-            String templateProfileDir = commandLine.getOptionValue(OPTION_USER_PROFILE.getOpt());
-            configuration.setTemplateProfileDir(new File(templateProfileDir));
-        }
-
-        OfficeManager officeManager = configuration.buildOfficeManager();
-        officeManager.start();
-        OfficeDocumentConverter converter = new OfficeDocumentConverter(officeManager, registry);
-        try {
-            if (outputFormat == null) {
-                File inputFile = new File(fileNames[0]);
-                File outputFile = new File(fileNames[1]);
-                converter.convert(inputFile, outputFile);
-            } else {
-                for (int i = 0; i < fileNames.length; i++) {
-                    File inputFile = new File(fileNames[i]);
-                    String outputName = FilenameUtils.getBaseName(fileNames[i]) + "." + outputFormat;
-                    File outputFile = new File(FilenameUtils.getFullPath(fileNames[i]) + outputName);
-                    converter.convert(inputFile, outputFile);
-                }
-            }
-        } finally {
-            officeManager.stop();
-        }
-    }
-    
-}

+ 0 - 157
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/document/DefaultDocumentFormatRegistry.java

@@ -1,157 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.document;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-public class DefaultDocumentFormatRegistry extends SimpleDocumentFormatRegistry {
-
-	public DefaultDocumentFormatRegistry() {
-		DocumentFormat pdf = new DocumentFormat("Portable Document Format", "pdf", "application/pdf");
-		pdf.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "writer_pdf_Export"));
-		pdf.setStoreProperties(DocumentFamily.SPREADSHEET, Collections.singletonMap("FilterName", "calc_pdf_Export"));
-		pdf.setStoreProperties(DocumentFamily.PRESENTATION, Collections.singletonMap("FilterName", "impress_pdf_Export"));
-		pdf.setStoreProperties(DocumentFamily.DRAWING, Collections.singletonMap("FilterName", "draw_pdf_Export"));
-		addFormat(pdf);
-		
-		DocumentFormat swf = new DocumentFormat("Macromedia Flash", "swf", "application/x-shockwave-flash");
-		swf.setStoreProperties(DocumentFamily.PRESENTATION, Collections.singletonMap("FilterName", "impress_flash_Export"));
-		swf.setStoreProperties(DocumentFamily.DRAWING, Collections.singletonMap("FilterName", "draw_flash_Export"));
-		addFormat(swf);
-		
-		// disabled because it's not always available
-		//DocumentFormat xhtml = new DocumentFormat("XHTML", "xhtml", "application/xhtml+xml");
-		//xhtml.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "XHTML Writer File"));
-		//xhtml.setStoreProperties(DocumentFamily.SPREADSHEET, Collections.singletonMap("FilterName", "XHTML Calc File"));
-		//xhtml.setStoreProperties(DocumentFamily.PRESENTATION, Collections.singletonMap("FilterName", "XHTML Impress File"));
-		//addFormat(xhtml);
-
-		DocumentFormat html = new DocumentFormat("HTML", "html", "text/html");
-        // HTML is treated as Text when supplied as input, but as an output it is also
-        // available for exporting Spreadsheet and Presentation formats
-		html.setInputFamily(DocumentFamily.TEXT);
-		html.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "HTML (StarWriter)"));
-		html.setStoreProperties(DocumentFamily.SPREADSHEET, Collections.singletonMap("FilterName", "HTML (StarCalc)"));
-		html.setStoreProperties(DocumentFamily.PRESENTATION, Collections.singletonMap("FilterName", "impress_html_Export"));
-		addFormat(html);
-		
-		DocumentFormat odt = new DocumentFormat("OpenDocument Text", "odt", "application/vnd.oasis.opendocument.text");
-		odt.setInputFamily(DocumentFamily.TEXT);
-		odt.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "writer8"));
-		addFormat(odt);
-
-		DocumentFormat sxw = new DocumentFormat("OpenOffice.org 1.0 Text Document", "sxw", "application/vnd.sun.xml.writer");
-		sxw.setInputFamily(DocumentFamily.TEXT);
-		sxw.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "StarOffice XML (Writer)"));
-		addFormat(sxw);
-
-		DocumentFormat doc = new DocumentFormat("Microsoft Word", "doc", "application/msword");
-		doc.setInputFamily(DocumentFamily.TEXT);
-		doc.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "MS Word 97"));
-		addFormat(doc);
-
-		DocumentFormat docx = new DocumentFormat("Microsoft Word 2007 XML", "docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
-		docx.setInputFamily(DocumentFamily.TEXT);
-        addFormat(docx);
-
-		DocumentFormat rtf = new DocumentFormat("Rich Text Format", "rtf", "text/rtf");
-		rtf.setInputFamily(DocumentFamily.TEXT);
-		rtf.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "Rich Text Format"));
-		addFormat(rtf);
-
-		DocumentFormat wpd = new DocumentFormat("WordPerfect", "wpd", "application/wordperfect");
-		wpd.setInputFamily(DocumentFamily.TEXT);
-		addFormat(wpd);
-
-		DocumentFormat txt = new DocumentFormat("Plain Text", "txt", "text/plain");
-		txt.setInputFamily(DocumentFamily.TEXT);
-		Map<String,Object> txtLoadAndStoreProperties = new LinkedHashMap<String,Object>();
-		txtLoadAndStoreProperties.put("FilterName", "Text (encoded)");
-		txtLoadAndStoreProperties.put("FilterOptions", "utf8");
-		txt.setLoadProperties(txtLoadAndStoreProperties);
-		txt.setStoreProperties(DocumentFamily.TEXT, txtLoadAndStoreProperties);
-		addFormat(txt);
-
-        DocumentFormat wikitext = new DocumentFormat("MediaWiki wikitext", "wiki", "text/x-wiki");
-        wikitext.setStoreProperties(DocumentFamily.TEXT, Collections.singletonMap("FilterName", "MediaWiki"));
-        //addFormat(wikitext);
-		
-		DocumentFormat ods = new DocumentFormat("OpenDocument Spreadsheet", "ods", "application/vnd.oasis.opendocument.spreadsheet");
-		ods.setInputFamily(DocumentFamily.SPREADSHEET);
-		ods.setStoreProperties(DocumentFamily.SPREADSHEET, Collections.singletonMap("FilterName", "calc8"));
-		addFormat(ods);
-
-		DocumentFormat sxc = new DocumentFormat("OpenOffice.org 1.0 Spreadsheet", "sxc", "application/vnd.sun.xml.calc");
-		sxc.setInputFamily(DocumentFamily.SPREADSHEET);
-		sxc.setStoreProperties(DocumentFamily.SPREADSHEET, Collections.singletonMap("FilterName", "StarOffice XML (Calc)"));
-		addFormat(sxc);
-
-		DocumentFormat xls = new DocumentFormat("Microsoft Excel", "xls", "application/vnd.ms-excel");
-		xls.setInputFamily(DocumentFamily.SPREADSHEET);
-		xls.setStoreProperties(DocumentFamily.SPREADSHEET, Collections.singletonMap("FilterName", "MS Excel 97"));
-		addFormat(xls);
-
-		DocumentFormat xlsx = new DocumentFormat("Microsoft Excel 2007 XML", "xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
-		xlsx.setInputFamily(DocumentFamily.SPREADSHEET);
-        addFormat(xlsx);
-
-        DocumentFormat csv = new DocumentFormat("Comma Separated Values", "csv", "text/csv");
-        csv.setInputFamily(DocumentFamily.SPREADSHEET);
-        Map<String,Object> csvLoadAndStoreProperties = new LinkedHashMap<String,Object>();
-        csvLoadAndStoreProperties.put("FilterName", "Text - txt - csv (StarCalc)");
-        csvLoadAndStoreProperties.put("FilterOptions", "44,34,0");  // Field Separator: ','; Text Delimiter: '"' 
-        csv.setLoadProperties(csvLoadAndStoreProperties);
-        csv.setStoreProperties(DocumentFamily.SPREADSHEET, csvLoadAndStoreProperties);
-        addFormat(csv);
-
-        DocumentFormat tsv = new DocumentFormat("Tab Separated Values", "tsv", "text/tab-separated-values");
-        tsv.setInputFamily(DocumentFamily.SPREADSHEET);
-        Map<String,Object> tsvLoadAndStoreProperties = new LinkedHashMap<String,Object>();
-        tsvLoadAndStoreProperties.put("FilterName", "Text - txt - csv (StarCalc)");
-        tsvLoadAndStoreProperties.put("FilterOptions", "9,34,0");  // Field Separator: '\t'; Text Delimiter: '"' 
-        tsv.setLoadProperties(tsvLoadAndStoreProperties);
-        tsv.setStoreProperties(DocumentFamily.SPREADSHEET, tsvLoadAndStoreProperties);
-        addFormat(tsv);
-
-		DocumentFormat odp = new DocumentFormat("OpenDocument Presentation", "odp", "application/vnd.oasis.opendocument.presentation");
-		odp.setInputFamily(DocumentFamily.PRESENTATION);
-		odp.setStoreProperties(DocumentFamily.PRESENTATION, Collections.singletonMap("FilterName", "impress8"));
-		addFormat(odp);
-
-		DocumentFormat sxi = new DocumentFormat("OpenOffice.org 1.0 Presentation", "sxi", "application/vnd.sun.xml.impress");
-		sxi.setInputFamily(DocumentFamily.PRESENTATION);
-		sxi.setStoreProperties(DocumentFamily.PRESENTATION, Collections.singletonMap("FilterName", "StarOffice XML (Impress)"));
-		addFormat(sxi);
-
-		DocumentFormat ppt = new DocumentFormat("Microsoft PowerPoint", "ppt", "application/vnd.ms-powerpoint");
-		ppt.setInputFamily(DocumentFamily.PRESENTATION);
-		ppt.setStoreProperties(DocumentFamily.PRESENTATION, Collections.singletonMap("FilterName", "MS PowerPoint 97"));
-		addFormat(ppt);
-
-		DocumentFormat pptx = new DocumentFormat("Microsoft PowerPoint 2007 XML", "pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation");
-		pptx.setInputFamily(DocumentFamily.PRESENTATION);
-        addFormat(pptx);
-        
-        DocumentFormat odg = new DocumentFormat("OpenDocument Drawing", "odg", "application/vnd.oasis.opendocument.graphics");
-        odg.setInputFamily(DocumentFamily.DRAWING);
-        odg.setStoreProperties(DocumentFamily.DRAWING, Collections.singletonMap("FilterName", "draw8"));
-        addFormat(odg);
-        
-        DocumentFormat svg = new DocumentFormat("Scalable Vector Graphics", "svg", "image/svg+xml");
-        svg.setStoreProperties(DocumentFamily.DRAWING, Collections.singletonMap("FilterName", "draw_svg_Export"));
-        addFormat(svg);
-  	}
-
-}

+ 0 - 19
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/document/DocumentFamily.java

@@ -1,19 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.document;
-
-public enum DocumentFamily {
-
-    TEXT, SPREADSHEET, PRESENTATION, DRAWING
-
-}

+ 0 - 99
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/document/DocumentFormat.java

@@ -1,99 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.document;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class DocumentFormat {
-
-    private String name;
-    private String extension;
-    private String mediaType;
-    private DocumentFamily inputFamily;
-    private Map<String,?> loadProperties;
-    private Map<DocumentFamily,Map<String,?>> storePropertiesByFamily;
-
-    public DocumentFormat() {
-        // default
-    }
-
-    public DocumentFormat(String name, String extension, String mediaType) {
-        this.name = name;
-        this.extension = extension;
-        this.mediaType = mediaType;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getExtension() {
-        return extension;
-    }
-
-    public void setExtension(String extension) {
-        this.extension = extension;
-    }
-
-    public String getMediaType() {
-        return mediaType;
-    }
-
-    public void setMediaType(String mediaType) {
-        this.mediaType = mediaType;
-    }
-
-    public DocumentFamily getInputFamily() {
-        return inputFamily;
-    }
-
-    public void setInputFamily(DocumentFamily documentFamily) {
-        this.inputFamily = documentFamily;
-    }
-
-    public Map<String, ?> getLoadProperties() {
-        return loadProperties;
-    }
-
-    public void setLoadProperties(Map<String,?> loadProperties) {
-        this.loadProperties = loadProperties;
-    }
-
-    public Map<DocumentFamily, Map<String, ?>> getStorePropertiesByFamily() {
-        return storePropertiesByFamily;
-    }
-
-    public void setStorePropertiesByFamily(Map<DocumentFamily, Map<String,?>> storePropertiesByFamily) {
-        this.storePropertiesByFamily = storePropertiesByFamily;
-    }
-
-    public void setStoreProperties(DocumentFamily family, Map<String,?> storeProperties) {
-        if (storePropertiesByFamily == null) {
-            storePropertiesByFamily = new HashMap<DocumentFamily,Map<String,?>>();
-        }
-        storePropertiesByFamily.put(family, storeProperties);
-    }
-
-    public Map<String,?> getStoreProperties(DocumentFamily family) {
-        if (storePropertiesByFamily == null) {
-            return null;
-        }
-        return storePropertiesByFamily.get(family);
-    }
-
-}

+ 0 - 25
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/document/DocumentFormatRegistry.java

@@ -1,25 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.document;
-
-import java.util.Set;
-
-public interface DocumentFormatRegistry {
-
-    public DocumentFormat getFormatByExtension(String extension);
-
-    public DocumentFormat getFormatByMediaType(String mediaType);
-
-    public Set<DocumentFormat> getOutputFormats(DocumentFamily family); 
-
-}

+ 0 - 73
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/document/JsonDocumentFormatRegistry.java

@@ -1,73 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.document;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.commons.io.IOUtils;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-public class JsonDocumentFormatRegistry extends SimpleDocumentFormatRegistry {
-
-    public JsonDocumentFormatRegistry(InputStream input) throws JSONException, IOException {
-        readJsonArray(IOUtils.toString(input));
-    }
-
-    public JsonDocumentFormatRegistry(String source) throws JSONException {
-        readJsonArray(source);
-    }
-
-    private void readJsonArray(String source) throws JSONException {
-        JSONArray array = new JSONArray(source);
-        for (int i = 0; i < array.length(); i++) {
-            JSONObject jsonFormat = array.getJSONObject(i);
-            DocumentFormat format = new DocumentFormat();
-            format.setName(jsonFormat.getString("name"));
-            format.setExtension(jsonFormat.getString("extension"));
-            format.setMediaType(jsonFormat.getString("mediaType"));
-            if (jsonFormat.has("inputFamily")) {
-                format.setInputFamily(DocumentFamily.valueOf(jsonFormat.getString("inputFamily")));
-            }
-            if (jsonFormat.has("loadProperties")) {
-                format.setLoadProperties(toJavaMap(jsonFormat.getJSONObject("loadProperties")));
-            }
-            if (jsonFormat.has("storePropertiesByFamily")) {
-                JSONObject jsonStorePropertiesByFamily = jsonFormat.getJSONObject("storePropertiesByFamily");
-                for (String key : JSONObject.getNames(jsonStorePropertiesByFamily)) {
-                    Map<String,?> storeProperties = toJavaMap(jsonStorePropertiesByFamily.getJSONObject(key));
-                    format.setStoreProperties(DocumentFamily.valueOf(key), storeProperties);
-                }
-            }
-            addFormat(format);
-        }
-    }
-
-    private Map<String,?> toJavaMap(JSONObject jsonMap) throws JSONException {
-        Map<String,Object> map = new HashMap<String,Object>();
-        for (String key : JSONObject.getNames(jsonMap)) {
-            Object value = jsonMap.get(key);
-            if (value instanceof JSONObject) {
-                map.put(key, toJavaMap((JSONObject) value));
-            } else {
-                map.put(key, value);
-            }
-        }
-        return map;
-    }
-
-}

+ 0 - 65
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/document/SimpleDocumentFormatRegistry.java

@@ -1,65 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.document;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-public class SimpleDocumentFormatRegistry implements DocumentFormatRegistry {
-
-	private List<DocumentFormat> documentFormats = new ArrayList<DocumentFormat>();
-
-	public void addFormat(DocumentFormat documentFormat) {
-		documentFormats.add(documentFormat);
-	}
-
-	public DocumentFormat getFormatByExtension(String extension) {
-        if (extension == null) {
-            return null;
-        }
-        String lowerExtension = extension.toLowerCase();
-        //TODO keep a documentByExtension map instead
-		for (DocumentFormat format : documentFormats) {
-			if (format.getExtension().equals(lowerExtension)) {
-				return format;
-			}
-		}
-		return null;
-	}
-
-	public DocumentFormat getFormatByMediaType(String mediaType) {
-        if (mediaType == null) {
-            return null;
-        }
-        //TODO keep a documentByMediaType map instead
-        for (DocumentFormat format : documentFormats) {
-            if (format.getMediaType().equals(mediaType)) {
-                return format;
-            }
-        }
-	    return null;
-	}
-
-	public Set<DocumentFormat> getOutputFormats(DocumentFamily family) {
-	    Set<DocumentFormat> formats = new HashSet<DocumentFormat>();
-        for (DocumentFormat format : documentFormats) {
-            if (format.getStoreProperties(family) != null) {
-                formats.add(format);
-            }
-        }
-	    return formats;
-	}
-
-}

+ 0 - 223
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/DefaultOfficeManagerConfiguration.java

@@ -1,223 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-import java.io.File;
-
-import org.artofsolving.jodconverter.process.ProcessManager;
-import org.artofsolving.jodconverter.process.PureJavaProcessManager;
-import org.artofsolving.jodconverter.process.LinuxProcessManager;
-import org.artofsolving.jodconverter.process.SigarProcessManager;
-import org.artofsolving.jodconverter.util.PlatformUtils;
-
-public class DefaultOfficeManagerConfiguration {
-
-    public static final long DEFAULT_RETRY_TIMEOUT = 120000L;
-
-    private File officeHome = OfficeUtils.getDefaultOfficeHome();
-    private OfficeConnectionProtocol connectionProtocol = OfficeConnectionProtocol.SOCKET;
-    private int[] portNumbers = new int[] { 2002 };
-    private String[] pipeNames = new String[] { "office" };
-    private String[] runAsArgs = null;
-    private File templateProfileDir = null;
-    private File workDir = new File(System.getProperty("java.io.tmpdir"));
-    private long taskQueueTimeout = 30000L;  // 30 seconds
-    private long taskExecutionTimeout = 120000L;  // 2 minutes
-    private int maxTasksPerProcess = 200;
-    private long retryTimeout = DEFAULT_RETRY_TIMEOUT;
-
-    private ProcessManager processManager = null;  // lazily initialised
-
-    public DefaultOfficeManagerConfiguration setOfficeHome(String officeHome) throws NullPointerException, IllegalArgumentException {
-        checkArgumentNotNull("officeHome", officeHome);
-        return setOfficeHome(new File(officeHome));
-    }
-
-    public DefaultOfficeManagerConfiguration setOfficeHome(File officeHome) throws NullPointerException, IllegalArgumentException  {
-        checkArgumentNotNull("officeHome", officeHome);
-        checkArgument("officeHome", officeHome.isDirectory(), "must exist and be a directory");
-        this.officeHome = officeHome;
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setConnectionProtocol(OfficeConnectionProtocol connectionProtocol) throws NullPointerException {
-        checkArgumentNotNull("connectionProtocol", connectionProtocol);
-        this.connectionProtocol = connectionProtocol;
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setPortNumber(int portNumber) {
-        this.portNumbers = new int[] { portNumber };
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setPortNumbers(int... portNumbers) throws NullPointerException, IllegalArgumentException {
-        checkArgumentNotNull("portNumbers", portNumbers);
-        checkArgument("portNumbers", portNumbers.length > 0, "must not be empty");
-        this.portNumbers = portNumbers;
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setPipeName(String pipeName) throws NullPointerException {
-        checkArgumentNotNull("pipeName", pipeName);
-        this.pipeNames = new String[] { pipeName };
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setPipeNames(String... pipeNames) throws NullPointerException, IllegalArgumentException {
-        checkArgumentNotNull("pipeNames", pipeNames);
-        checkArgument("pipeNames", pipeNames.length > 0, "must not be empty");
-        this.pipeNames = pipeNames;
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setRunAsArgs(String... runAsArgs) {
-		this.runAsArgs = runAsArgs;
-		return this;
-	}
-
-    public DefaultOfficeManagerConfiguration setTemplateProfileDir(File templateProfileDir) throws IllegalArgumentException {
-        if (templateProfileDir != null) {
-            checkArgument("templateProfileDir", templateProfileDir.isDirectory(), "must exist and be a directory");
-        }
-        this.templateProfileDir = templateProfileDir;
-        return this;
-    }
-
-    /**
-     * Sets the directory where temporary office profiles will be created.
-     * <p>
-     * Defaults to the system temporary directory as specified by the <code>java.io.tmpdir</code> system property.
-     * 
-     * @param workDir
-     * @return
-     */
-    public DefaultOfficeManagerConfiguration setWorkDir(File workDir) {
-        checkArgumentNotNull("workDir", workDir);
-        this.workDir = workDir;
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setTaskQueueTimeout(long taskQueueTimeout) {
-        this.taskQueueTimeout = taskQueueTimeout;
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setTaskExecutionTimeout(long taskExecutionTimeout) {
-        this.taskExecutionTimeout = taskExecutionTimeout;
-        return this;
-    }
-
-    public DefaultOfficeManagerConfiguration setMaxTasksPerProcess(int maxTasksPerProcess) {
-        this.maxTasksPerProcess = maxTasksPerProcess;
-        return this;
-    }
-
-    /**
-     * Provide a specific {@link ProcessManager} implementation
-     * <p>
-     * The default is to use {@link SigarProcessManager} if sigar.jar is
-     * available in the classpath, otherwise {@link LinuxProcessManager}
-     * on Linux and {@link PureJavaProcessManager} on other platforms.
-     * 
-     * @param processManager
-     * @return
-     * @throws NullPointerException
-     */
-    public DefaultOfficeManagerConfiguration setProcessManager(ProcessManager processManager) throws NullPointerException {
-        checkArgumentNotNull("processManager", processManager);
-        this.processManager = processManager;
-        return this;
-    }
-
-    /**
-     * Retry timeout set in milliseconds. Used for retrying office process calls.
-     * If not set, it defaults to 2 minutes
-     * 
-     * @param retryTimeout in milliseconds
-     * @return
-     */
-    public DefaultOfficeManagerConfiguration setRetryTimeout(long retryTimeout) {
-        this.retryTimeout = retryTimeout;
-        return this;
-    }
-
-    public OfficeManager buildOfficeManager() throws IllegalStateException {
-        if (officeHome == null) {
-            throw new IllegalStateException("officeHome not set and could not be auto-detected");
-        } else if (!officeHome.isDirectory()) {
-            throw new IllegalStateException("officeHome doesn't exist or is not a directory: " + officeHome);
-        } else if (!OfficeUtils.getOfficeExecutable(officeHome).isFile()) {
-            throw new IllegalStateException("invalid officeHome: it doesn't contain soffice.bin: " + officeHome);
-        }
-        if (templateProfileDir != null && !isValidProfileDir(templateProfileDir)) {
-            throw new IllegalStateException("templateProfileDir doesn't appear to contain a user profile: " + templateProfileDir);
-        }
-        if (!workDir.isDirectory()) {
-            throw new IllegalStateException("workDir doesn't exist or is not a directory: " + workDir);
-        }
-
-        if (processManager == null) {
-            processManager = findBestProcessManager();
-        }
-        
-        int numInstances = connectionProtocol == OfficeConnectionProtocol.PIPE ? pipeNames.length : portNumbers.length;
-        UnoUrl[] unoUrls = new UnoUrl[numInstances];
-        for (int i = 0; i < numInstances; i++) {
-            unoUrls[i] = (connectionProtocol == OfficeConnectionProtocol.PIPE) ? UnoUrl.pipe(pipeNames[i]) : UnoUrl.socket(portNumbers[i]);
-        }
-        return new ProcessPoolOfficeManager(officeHome, unoUrls, runAsArgs, templateProfileDir, workDir, retryTimeout, taskQueueTimeout, taskExecutionTimeout, maxTasksPerProcess, processManager);
-    }
-
-    private ProcessManager findBestProcessManager() {
-        if (isSigarAvailable()) {
-            return new SigarProcessManager();
-        } else if (PlatformUtils.isLinux()) {
-        	LinuxProcessManager processManager = new LinuxProcessManager();
-        	if (runAsArgs != null) {
-        		processManager.setRunAsArgs(runAsArgs);
-        	}
-        	return processManager;
-        } else {
-            // NOTE: UnixProcessManager can't be trusted to work on Solaris
-            // because of the 80-char limit on ps output there  
-            return new PureJavaProcessManager();
-        }
-    }
-
-    private boolean isSigarAvailable() {
-        try {
-            Class.forName("org.hyperic.sigar.Sigar", false, getClass().getClassLoader());
-            return true;
-        } catch (ClassNotFoundException classNotFoundException) {
-            return false;
-        }
-    }
-
-    private void checkArgumentNotNull(String argName, Object argValue) throws NullPointerException {
-        if (argValue == null) {
-            throw new NullPointerException(argName + " must not be null");
-        }
-    }
-
-    private void checkArgument(String argName, boolean condition, String message) throws IllegalArgumentException {
-        if (!condition) {
-            throw new IllegalArgumentException(argName + " " + message);
-        }
-    }
-
-    private boolean isValidProfileDir(File profileDir) {
-        return new File(profileDir, "user").isDirectory();
-    }
-
-}

+ 0 - 86
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/ExternalOfficeManager.java

@@ -1,86 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-import java.net.ConnectException;
-
-/**
- * {@link OfficeManager} implementation that connects to an external Office process.
- * <p>
- * The external Office process needs to be started manually, e.g. from the command line with
- * 
- * <pre>
- * soffice -accept="socket,host=127.0.0.1,port=2002;urp;"
- * </pre>
- * <p>
- * Since this implementation does not manage the Office process, it does not support auto-restarting the process if it exits unexpectedly.
- * <p>
- * It will however auto-reconnect to the external process if the latter is manually restarted.
- * <p>
- * This {@link OfficeManager} implementation basically provides the same behaviour as JODConverter 2.x, including using <em>synchronized</em> blocks for serialising office
- * operations.
- */
-class ExternalOfficeManager implements OfficeManager {
-
-	private final OfficeConnection connection;
-	private final boolean connectOnStart;
-
-	/**
-	 * @param unoUrl
-	 * @param connectOnStart
-	 *            should a connection be attempted on {@link #start()}? Default is <em>true</em>. If <em>false</em>, a connection will only be attempted the first time an
-	 *            {@link OfficeTask} is executed.
-	 */
-	public ExternalOfficeManager(UnoUrl unoUrl, boolean connectOnStart) {
-		connection = new OfficeConnection(unoUrl);
-		this.connectOnStart = connectOnStart;
-	}
-
-	public void start() throws OfficeException {
-		if (connectOnStart) {
-			synchronized (connection) {
-				connect();
-			}
-		}
-	}
-
-	public void stop() {
-		synchronized (connection) {
-			if (connection.isConnected()) {
-				connection.disconnect();
-			}
-		}
-	}
-
-	public void execute(OfficeTask task) throws OfficeException {
-		synchronized (connection) {
-			if (!connection.isConnected()) {
-				connect();
-			}
-			task.execute(connection);
-		}
-	}
-
-	private void connect() {
-		try {
-			connection.connect();
-		} catch (ConnectException connectException) {
-			throw new OfficeException("could not connect to external office process", connectException);
-		}
-	}
-
-	public boolean isRunning() {
-		return connection.isConnected();
-	}
-
-}

+ 0 - 47
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/ExternalOfficeManagerConfiguration.java

@@ -1,47 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-public class ExternalOfficeManagerConfiguration {
-
-    private OfficeConnectionProtocol connectionProtocol = OfficeConnectionProtocol.SOCKET;
-    private int portNumber = 2002;
-    private String pipeName = "office";
-    private boolean connectOnStart = true;
-
-    public ExternalOfficeManagerConfiguration setConnectionProtocol(OfficeConnectionProtocol connectionProtocol) {
-        this.connectionProtocol = connectionProtocol;
-        return this;
-    }
-
-    public ExternalOfficeManagerConfiguration setPortNumber(int portNumber) {
-        this.portNumber = portNumber;
-        return this;
-    }
-
-    public ExternalOfficeManagerConfiguration setPipeName(String pipeName) {
-        this.pipeName = pipeName;
-        return this;
-    }
-
-    public ExternalOfficeManagerConfiguration setConnectOnStart(boolean connectOnStart) {
-        this.connectOnStart = connectOnStart;
-        return this;
-    }
-
-    public OfficeManager buildOfficeManager() {
-        UnoUrl unoUrl = connectionProtocol == OfficeConnectionProtocol.SOCKET ? UnoUrl.socket(portNumber) : UnoUrl.pipe(pipeName);
-        return new ExternalOfficeManager(unoUrl, connectOnStart);
-    }
-
-}

+ 0 - 176
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/ManagedOfficeProcess.java

@@ -1,176 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-import java.net.ConnectException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import com.sun.star.frame.XDesktop;
-import com.sun.star.lang.DisposedException;
-
-class ManagedOfficeProcess {
-
-	private static final Integer EXIT_CODE_NEW_INSTALLATION = Integer.valueOf(81);
-
-	private final ManagedOfficeProcessSettings settings;
-
-	private final OfficeProcess process;
-	private final OfficeConnection connection;
-
-	private ExecutorService executor = Executors.newSingleThreadExecutor(new NamedThreadFactory("OfficeProcessThread"));
-
-	private final Logger logger = Logger.getLogger(getClass().getName());
-
-	public ManagedOfficeProcess(ManagedOfficeProcessSettings settings) throws OfficeException {
-		this.settings = settings;
-		process = new OfficeProcess(settings.getOfficeHome(), settings.getUnoUrl(), settings.getRunAsArgs(), settings.getTemplateProfileDir(), settings.getWorkDir(), settings
-				.getProcessManager());
-		connection = new OfficeConnection(settings.getUnoUrl());
-	}
-
-	public OfficeConnection getConnection() {
-		return connection;
-	}
-
-	public void startAndWait() throws OfficeException {
-		Future<?> future = executor.submit(new Runnable() {
-			public void run() {
-				doStartProcessAndConnect();
-			}
-		});
-		try {
-			future.get();
-		} catch (Exception exception) {
-			throw new OfficeException("failed to start and connect", exception);
-		}
-	}
-
-	public void stopAndWait() throws OfficeException {
-		Future<?> future = executor.submit(new Runnable() {
-			public void run() {
-				doStopProcess();
-			}
-		});
-		try {
-			future.get();
-		} catch (Exception exception) {
-			throw new OfficeException("failed to start and connect", exception);
-		}
-	}
-
-	public void restartAndWait() {
-		Future<?> future = executor.submit(new Runnable() {
-			public void run() {
-				doStopProcess();
-				doStartProcessAndConnect();
-			}
-		});
-		try {
-			future.get();
-		} catch (Exception exception) {
-			throw new OfficeException("failed to restart", exception);
-		}
-	}
-
-	public void restartDueToTaskTimeout() {
-		executor.execute(new Runnable() {
-			public void run() {
-				doTerminateProcess();
-				// will cause unexpected disconnection and subsequent restart
-			}
-		});
-	}
-
-	public void restartDueToLostConnection() {
-		executor.execute(new Runnable() {
-			public void run() {
-				try {
-					doEnsureProcessExited();
-					doStartProcessAndConnect();
-				} catch (OfficeException officeException) {
-					logger.log(Level.SEVERE, "could not restart process", officeException);
-				}
-			}
-		});
-	}
-
-	private void doStartProcessAndConnect() throws OfficeException {
-		try {
-			process.start();
-			new Retryable() {
-				protected void attempt() throws TemporaryException, Exception {
-					try {
-						connection.connect();
-					} catch (ConnectException connectException) {
-						Integer exitCode = process.getExitCode();
-						if (exitCode == null) {
-							// process is running; retry later
-							throw new TemporaryException(connectException);
-						} else if (exitCode.equals(EXIT_CODE_NEW_INSTALLATION)) {
-							// restart and retry later
-							// see http://code.google.com/p/jodconverter/issues/detail?id=84
-							logger.log(Level.WARNING, "office process died with exit code 81; restarting it");
-							process.start(true);
-							throw new TemporaryException(connectException);
-						} else {
-							throw new OfficeException("office process died with exit code " + exitCode);
-						}
-					}
-				}
-			}.execute(settings.getRetryInterval(), settings.getRetryTimeout());
-		} catch (Exception exception) {
-			throw new OfficeException("could not establish connection", exception);
-		}
-	}
-
-	private void doStopProcess() {
-		try {
-			XDesktop desktop = OfficeUtils.cast(XDesktop.class, connection.getService(OfficeUtils.SERVICE_DESKTOP));
-			desktop.terminate();
-		} catch (DisposedException disposedException) {
-			// expected
-		} catch (Exception exception) {
-			// in case we can't get hold of the desktop
-			doTerminateProcess();
-		}
-		doEnsureProcessExited();
-	}
-
-	private void doEnsureProcessExited() throws OfficeException {
-		try {
-			int exitCode = process.getExitCode(settings.getRetryInterval(), settings.getRetryTimeout());
-			logger.info("process exited with code " + exitCode);
-		} catch (RetryTimeoutException retryTimeoutException) {
-			doTerminateProcess();
-		}
-		process.deleteProfileDir();
-	}
-
-	private void doTerminateProcess() throws OfficeException {
-		try {
-			int exitCode = process.forciblyTerminate(settings.getRetryInterval(), settings.getRetryTimeout());
-			logger.info("process forcibly terminated with code " + exitCode);
-		} catch (Exception exception) {
-			throw new OfficeException("could not terminate process", exception);
-		}
-	}
-
-	boolean isConnected() {
-		return connection.isConnected();
-	}
-
-}

+ 0 - 97
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/ManagedOfficeProcessSettings.java

@@ -1,97 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-import java.io.File;
-
-import org.artofsolving.jodconverter.process.ProcessManager;
-import org.artofsolving.jodconverter.process.PureJavaProcessManager;
-
-class ManagedOfficeProcessSettings {
-
-    public static final long DEFAULT_RETRY_INTERVAL = 250L;
-
-    private final UnoUrl unoUrl;
-    private File officeHome = OfficeUtils.getDefaultOfficeHome();
-    private String[] runAsArgs;
-    private File templateProfileDir;
-    private File workDir = new File(System.getProperty("java.io.tmpdir"));
-    private ProcessManager processManager = new PureJavaProcessManager();
-    private long retryTimeout = DefaultOfficeManagerConfiguration.DEFAULT_RETRY_TIMEOUT;
-    private long retryInterval = DEFAULT_RETRY_INTERVAL;
-
-    public ManagedOfficeProcessSettings(UnoUrl unoUrl) {
-        this.unoUrl = unoUrl;
-    }
-
-    public UnoUrl getUnoUrl() {
-        return unoUrl;
-    }
-
-    public File getOfficeHome() {
-        return officeHome;
-    }
-
-    public void setOfficeHome(File officeHome) {
-        this.officeHome = officeHome;
-    }
-
-    public String[] getRunAsArgs() {
-		return runAsArgs;
-	}
-
-    public void setRunAsArgs(String[] runAsArgs) {
-		this.runAsArgs = runAsArgs;
-	}
-
-    public File getTemplateProfileDir() {
-        return templateProfileDir;
-    }
-
-    public void setTemplateProfileDir(File templateProfileDir) {
-        this.templateProfileDir = templateProfileDir;
-    }
-
-    public File getWorkDir() {
-        return workDir;
-    }
-
-    public void setWorkDir(File workDir) {
-        this.workDir = workDir;
-    }
-
-    public ProcessManager getProcessManager() {
-        return processManager;
-    }
-
-    public void setProcessManager(ProcessManager processManager) {
-        this.processManager = processManager;
-    }
-
-    public long getRetryTimeout() {
-        return retryTimeout;
-    }
-
-    public void setRetryTimeout(long retryTimeout) {
-        this.retryTimeout = retryTimeout;
-    }
-
-    public long getRetryInterval() {
-        return retryInterval;
-    }
-
-    public void setRetryInterval(long retryInterval) {
-        this.retryInterval = retryInterval;
-    }
-
-}

+ 0 - 43
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/NamedThreadFactory.java

@@ -1,43 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * A {@link ThreadFactory} that allows for custom thread names
- */
-class NamedThreadFactory implements ThreadFactory {
-
-    private static final AtomicInteger threadIndex = new AtomicInteger(0);
-
-    private final String baseName;
-    private final boolean daemon;
-
-    public NamedThreadFactory(String baseName) {
-        this(baseName, true);
-    }
-
-    public NamedThreadFactory(String baseName, boolean daemon) {
-        this.baseName = baseName;
-        this.daemon = daemon;
-    }
-
-    public Thread newThread(Runnable runnable) {
-        Thread thread = new Thread(runnable, baseName + "-" + threadIndex.getAndIncrement());
-        thread.setDaemon(daemon);
-        return thread;
-    }
-
-}

+ 0 - 117
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeConnection.java

@@ -1,117 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-import java.net.ConnectException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.logging.Logger;
-
-import com.sun.star.beans.XPropertySet;
-import com.sun.star.bridge.XBridge;
-import com.sun.star.bridge.XBridgeFactory;
-import com.sun.star.comp.helper.Bootstrap;
-import com.sun.star.connection.NoConnectException;
-import com.sun.star.connection.XConnection;
-import com.sun.star.connection.XConnector;
-import com.sun.star.lang.EventObject;
-import com.sun.star.lang.XComponent;
-import com.sun.star.lang.XEventListener;
-import com.sun.star.lang.XMultiComponentFactory;
-import com.sun.star.uno.XComponentContext;
-
-class OfficeConnection implements OfficeContext {
-
-    private static AtomicInteger bridgeIndex = new AtomicInteger();
-
-    private final UnoUrl unoUrl;
-
-    private XComponent bridgeComponent;
-    private XMultiComponentFactory serviceManager;
-    private XComponentContext componentContext;
-
-    private final List<OfficeConnectionEventListener> connectionEventListeners = new ArrayList<OfficeConnectionEventListener>();
-
-    private volatile boolean connected = false;
-
-    private XEventListener bridgeListener = new XEventListener() {
-        public void disposing(EventObject event) {
-            if (connected) {
-                connected = false;
-                logger.info(String.format("disconnected: '%s'", unoUrl));
-                OfficeConnectionEvent connectionEvent = new OfficeConnectionEvent(OfficeConnection.this);
-                for (OfficeConnectionEventListener listener : connectionEventListeners) {
-                    listener.disconnected(connectionEvent);
-                }
-            }
-            // else we tried to connect to a server that doesn't speak URP
-        }
-    };
-
-    private final Logger logger = Logger.getLogger(getClass().getName());
-
-    public OfficeConnection(UnoUrl unoUrl) {
-        this.unoUrl = unoUrl;
-    }
-
-    public void addConnectionEventListener(OfficeConnectionEventListener connectionEventListener) {
-        connectionEventListeners.add(connectionEventListener);
-    }
-
-    public void connect() throws ConnectException {
-        logger.fine(String.format("connecting with connectString '%s'", unoUrl));
-        try {
-            XComponentContext localContext = Bootstrap.createInitialComponentContext(null);
-            XMultiComponentFactory localServiceManager = localContext.getServiceManager();
-            XConnector connector = OfficeUtils.cast(XConnector.class, localServiceManager.createInstanceWithContext("com.sun.star.connection.Connector", localContext));
-            XConnection connection = connector.connect(unoUrl.getConnectString());
-            XBridgeFactory bridgeFactory = OfficeUtils.cast(XBridgeFactory.class, localServiceManager.createInstanceWithContext("com.sun.star.bridge.BridgeFactory", localContext));
-            String bridgeName = "jodconverter_" + bridgeIndex.getAndIncrement();
-            XBridge bridge = bridgeFactory.createBridge(bridgeName, "urp", connection, null);
-            bridgeComponent = OfficeUtils.cast(XComponent.class, bridge);
-            bridgeComponent.addEventListener(bridgeListener);
-            serviceManager = OfficeUtils.cast(XMultiComponentFactory.class, bridge.getInstance("StarOffice.ServiceManager"));
-            XPropertySet properties = OfficeUtils.cast(XPropertySet.class, serviceManager);
-            componentContext = OfficeUtils.cast(XComponentContext.class, properties.getPropertyValue("DefaultContext"));
-            connected = true;
-            logger.info(String.format("connected: '%s'", unoUrl));
-            OfficeConnectionEvent connectionEvent = new OfficeConnectionEvent(this);
-            for (OfficeConnectionEventListener listener : connectionEventListeners) {
-                listener.connected(connectionEvent);
-            }
-        } catch (NoConnectException connectException) {
-            throw new ConnectException(String.format("connection failed: '%s'; %s", unoUrl, connectException.getMessage()));
-        } catch (Exception exception) {
-            throw new OfficeException("connection failed: "+ unoUrl, exception);
-        }
-    }
-
-    public boolean isConnected() {
-        return connected;
-    }
-
-    public synchronized void disconnect() {
-        logger.fine(String.format("disconnecting: '%s'", unoUrl));
-        bridgeComponent.dispose();
-    }
-
-    public Object getService(String serviceName) {
-        try {
-            return serviceManager.createInstanceWithContext(serviceName, componentContext);
-        } catch (Exception exception) {
-            throw new OfficeException(String.format("failed to obtain service '%s'", serviceName), exception);
-        }
-    }
-
-}

+ 0 - 25
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionEvent.java

@@ -1,25 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-import java.util.EventObject;
-
-class OfficeConnectionEvent extends EventObject {
-
-    private static final long serialVersionUID = 2060652797570876077L;
-
-    public OfficeConnectionEvent(OfficeConnection source) {
-        super(source);
-    }
-
-}

+ 0 - 23
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionEventListener.java

@@ -1,23 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-import java.util.EventListener;
-
-interface OfficeConnectionEventListener extends EventListener {
-
-    void connected(OfficeConnectionEvent event);
-
-    void disconnected(OfficeConnectionEvent event);
-
-}

+ 0 - 15
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeConnectionProtocol.java

@@ -1,15 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-public enum OfficeConnectionProtocol { PIPE, SOCKET }

+ 0 - 19
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeContext.java

@@ -1,19 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-public interface OfficeContext {
-
-    Object getService(String serviceName);
-
-}

+ 0 - 26
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeException.java

@@ -1,26 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-public class OfficeException extends RuntimeException {
-
-    private static final long serialVersionUID = 1L;
-
-    public OfficeException(String message) {
-        super(message);
-    }
-
-    public OfficeException(String message, Throwable cause) {
-		super(message, cause);
-	}
-}

+ 0 - 30
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeManager.java

@@ -1,30 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-/**
- * An OfficeManager knows how to execute {@link OfficeTask}s.
- * <p>
- * An OfficeManager implementation will typically manage one or more
- * {@link OfficeConnection}s.
- */
-public interface OfficeManager {
-
-    void execute(OfficeTask task) throws OfficeException;
-
-    void start() throws OfficeException;
-
-    void stop() throws OfficeException;
-
-    boolean isRunning();
-}

+ 0 - 209
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeProcess.java

@@ -1,209 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-import static org.artofsolving.jodconverter.process.ProcessManager.PID_NOT_FOUND;
-import static org.artofsolving.jodconverter.process.ProcessManager.PID_UNKNOWN;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Logger;
-
-import org.apache.commons.io.FileUtils;
-import org.artofsolving.jodconverter.process.ProcessManager;
-import org.artofsolving.jodconverter.process.ProcessQuery;
-import org.artofsolving.jodconverter.util.PlatformUtils;
-
-class OfficeProcess {
-
-    private final File officeHome;
-    private final UnoUrl unoUrl;
-    private final String[] runAsArgs;
-    private final File templateProfileDir;
-    private final File instanceProfileDir;
-    private final ProcessManager processManager;
-
-    private Process process;
-    private long pid = PID_UNKNOWN;
-
-    private final Logger logger = Logger.getLogger(getClass().getName());
-
-    public OfficeProcess(File officeHome, UnoUrl unoUrl, String[] runAsArgs, File templateProfileDir, File workDir, ProcessManager processManager) {
-        this.officeHome = officeHome;
-        this.unoUrl = unoUrl;
-        this.runAsArgs = runAsArgs;
-        this.templateProfileDir = templateProfileDir;
-        this.instanceProfileDir = getInstanceProfileDir(workDir, unoUrl);
-        this.processManager = processManager;
-    }
-
-    public void start() throws IOException {
-        start(false);
-    }
-
-    public void start(boolean restart) throws IOException {
-        ProcessQuery processQuery = new ProcessQuery("soffice.bin", unoUrl.getAcceptString());
-        long existingPid = processManager.findPid(processQuery);
-    	if (!(existingPid == PID_NOT_FOUND || existingPid == PID_UNKNOWN)) {
-			throw new IllegalStateException(String.format("a process with acceptString '%s' is already running; pid %d",
-			        unoUrl.getAcceptString(), existingPid));
-        }
-    	if (!restart) {
-    	    prepareInstanceProfileDir();
-    	}
-        List<String> command = new ArrayList<String>();
-        File executable = OfficeUtils.getOfficeExecutable(officeHome);
-        if (runAsArgs != null) {
-        	command.addAll(Arrays.asList(runAsArgs));
-        }
-        command.add(executable.getAbsolutePath());
-        command.add("-accept=" + unoUrl.getAcceptString() + ";urp;");
-        command.add("-env:UserInstallation=" + OfficeUtils.toUrl(instanceProfileDir));
-        command.add("-headless");
-        command.add("-nocrashreport");
-        command.add("-nodefault");
-        command.add("-nofirststartwizard");
-        command.add("-nolockcheck");
-        command.add("-nologo");
-        command.add("-norestore");
-        ProcessBuilder processBuilder = new ProcessBuilder(command);
-        if (PlatformUtils.isWindows()) {
-            addBasisAndUrePaths(processBuilder);
-        }
-        logger.info(String.format("starting process with acceptString '%s' and profileDir '%s'", unoUrl, instanceProfileDir));
-        process = processBuilder.start();
-        pid = processManager.findPid(processQuery);
-        if (pid == PID_NOT_FOUND) {
-            throw new IllegalStateException(String.format("process with acceptString '%s' started but its pid could not be found",
-                    unoUrl.getAcceptString()));
-        }
-        logger.info("started process" + (pid != PID_UNKNOWN ? "; pid = " + pid : ""));
-    }
-
-    private File getInstanceProfileDir(File workDir, UnoUrl unoUrl) {
-        String dirName = ".jodconverter_" + unoUrl.getAcceptString().replace(',', '_').replace('=', '-');
-        return new File(workDir, dirName);
-    }
-
-    private void prepareInstanceProfileDir() throws OfficeException {
-        if (instanceProfileDir.exists()) {
-            logger.warning(String.format("profile dir '%s' already exists; deleting", instanceProfileDir));
-            deleteProfileDir();
-        }
-        if (templateProfileDir != null) {
-            try {
-                FileUtils.copyDirectory(templateProfileDir, instanceProfileDir);
-            } catch (IOException ioException) {
-                throw new OfficeException("failed to create profileDir", ioException);
-            }
-        }
-    }
-
-    public void deleteProfileDir() {
-        if (instanceProfileDir != null) {
-            try {
-                FileUtils.deleteDirectory(instanceProfileDir);
-            } catch (IOException ioException) {
-                File oldProfileDir = new File(instanceProfileDir.getParentFile(), instanceProfileDir.getName() + ".old." + System.currentTimeMillis());
-                if (instanceProfileDir.renameTo(oldProfileDir)) {
-                    logger.warning("could not delete profileDir: " + ioException.getMessage() + "; renamed it to " + oldProfileDir);
-                } else {
-                    logger.severe("could not delete profileDir: " + ioException.getMessage());
-                }
-            }
-        }
-    }
-
-    private void addBasisAndUrePaths(ProcessBuilder processBuilder) throws IOException {
-        // see http://wiki.services.openoffice.org/wiki/ODF_Toolkit/Efforts/Three-Layer_OOo
-        File basisLink = new File(officeHome, "basis-link");
-        if (!basisLink.isFile()) {
-            logger.fine("no %OFFICE_HOME%/basis-link found; assuming it's OOo 2.x and we don't need to append URE and Basic paths");
-            return;
-        }
-        String basisLinkText = FileUtils.readFileToString(basisLink).trim();
-        File basisHome = new File(officeHome, basisLinkText);
-        File basisProgram = new File(basisHome, "program");
-        File ureLink = new File(basisHome, "ure-link");
-        String ureLinkText = FileUtils.readFileToString(ureLink).trim();
-        File ureHome = new File(basisHome, ureLinkText);
-        File ureBin = new File(ureHome, "bin");
-        Map<String,String> environment = processBuilder.environment();
-        // Windows environment variables are case insensitive but Java maps are not :-/
-        // so let's make sure we modify the existing key
-        String pathKey = "PATH";
-        for (String key : environment.keySet()) {
-            if ("PATH".equalsIgnoreCase(key)) {
-                pathKey = key;
-            }
-        }
-        String path = environment.get(pathKey) + ";" + ureBin.getAbsolutePath() + ";" + basisProgram.getAbsolutePath();
-        logger.fine(String.format("setting %s to \"%s\"", pathKey, path));
-        environment.put(pathKey, path);
-    }
-
-    public boolean isRunning() {
-        if (process == null) {
-            return false;
-        }
-        return getExitCode() == null;
-    }
-
-    private class ExitCodeRetryable extends Retryable {
-        
-        private int exitCode;
-        
-        protected void attempt() throws TemporaryException, Exception {
-            try {
-                exitCode = process.exitValue();
-            } catch (IllegalThreadStateException illegalThreadStateException) {
-                throw new TemporaryException(illegalThreadStateException);
-            }
-        }
-        
-        public int getExitCode() {
-            return exitCode;
-        }
-
-    }
-
-    public Integer getExitCode() {
-        try {
-            return process.exitValue();
-        } catch (IllegalThreadStateException exception) {
-            return null;
-        }
-    }
-
-    public int getExitCode(long retryInterval, long retryTimeout) throws RetryTimeoutException {
-        try {
-            ExitCodeRetryable retryable = new ExitCodeRetryable();
-            retryable.execute(retryInterval, retryTimeout);
-            return retryable.getExitCode();
-        } catch (RetryTimeoutException retryTimeoutException) {
-            throw retryTimeoutException;
-        } catch (Exception exception) {
-            throw new OfficeException("could not get process exit code", exception);
-        }
-    }
-
-    public int forciblyTerminate(long retryInterval, long retryTimeout) throws IOException, RetryTimeoutException {
-        logger.info(String.format("trying to forcibly terminate process: '" + unoUrl + "'" + (pid != PID_UNKNOWN ? " (pid " + pid  + ")" : "")));
-        processManager.kill(process, pid);
-        return getExitCode(retryInterval, retryTimeout);
-    }
-
-}

+ 0 - 19
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeTask.java

@@ -1,19 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-public interface OfficeTask {
-
-    void execute(OfficeContext context) throws OfficeException;
-
-}

+ 0 - 170
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/OfficeUtils.java

@@ -1,170 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import org.artofsolving.jodconverter.util.ConfigUtils;
-import org.artofsolving.jodconverter.util.PlatformUtils;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.uno.UnoRuntime;
-
-public class OfficeUtils {
-
-    public static final String SERVICE_DESKTOP = "com.sun.star.frame.Desktop";
-    public static final String OFFICE_HOME_KEY = "office.home";
-    public static final String DEFAULT_OFFICE_HOME_VALUE = "default";
-
-    private OfficeUtils() {
-        throw new AssertionError("utility class must not be instantiated");
-    }
-
-    public static <T> T cast(Class<T> type, Object object) {
-        return (T) UnoRuntime.queryInterface(type, object);
-    }
-
-    public static PropertyValue property(String name, Object value) {
-        PropertyValue propertyValue = new PropertyValue();
-        propertyValue.Name = name;
-        propertyValue.Value = value;
-        return propertyValue;
-    }
-
-    @SuppressWarnings("unchecked")
-    public static PropertyValue[] toUnoProperties(Map<String,?> properties) {
-        PropertyValue[] propertyValues = new PropertyValue[properties.size()];
-        int i = 0;
-        for (Map.Entry<String,?> entry : properties.entrySet()) {
-            Object value = entry.getValue();
-            if (value instanceof Map) {
-                Map<String,Object> subProperties = (Map<String,Object>) value;
-                value = toUnoProperties(subProperties);
-            }
-            propertyValues[i++] = property(entry.getKey(), value);
-        }
-        return propertyValues;
-    }
-
-    public static String toUrl(File file) {
-        String path = file.toURI().getRawPath();
-        String url = path.startsWith("//") ? "file:" + path : "file://" + path;
-        return url.endsWith("/") ? url.substring(0, url.length() - 1) : url;
-    }
-
-    public static File getDefaultOfficeHome() {
-        Properties properties = new Properties();
-        String customizedConfigPath = ConfigUtils.getCustomizedConfigPath();
-        try {
-            BufferedReader bufferedReader = new BufferedReader(new FileReader(customizedConfigPath));
-            properties.load(bufferedReader);
-            restorePropertiesFromEnvFormat(properties);
-        } catch (Exception e) {}
-        String officeHome = properties.getProperty(OFFICE_HOME_KEY);
-        if (officeHome != null && !DEFAULT_OFFICE_HOME_VALUE.equals(officeHome)) {
-            return new File(officeHome);
-        }
-        if (PlatformUtils.isWindows()) {
-            // %ProgramFiles(x86)% on 64-bit machines; %ProgramFiles% on 32-bit ones
-            String  officePluginPath = ConfigUtils.getOfficePluginPath();
-            String programFiles = System.getenv("ProgramFiles(x86)");
-            if (programFiles == null) {
-                programFiles = System.getenv("ProgramFiles");
-            }
-            return findOfficeHome(
-                    officePluginPath + File.separator + "windows-office",
-                    programFiles + File.separator + "LibreOffice",
-                    programFiles + File.separator + "OpenOffice 4",
-                    programFiles + File.separator + "LibreOffice 4"
-            );
-        } else if (PlatformUtils.isMac()) {
-            return findOfficeHome(
-                "/Applications/OpenOffice.org.app/Contents",
-                "/Applications/OpenOffice.app/Contents",
-                "/Applications/LibreOffice.app/Contents"
-            );
-        } else {
-            // Linux or other *nix variants
-            return findOfficeHome(
-                "/opt/openoffice.org3",
-                "/opt/openoffice",
-                "/opt/libreoffice",
-                "/opt/libreoffice6.0",
-                "/opt/libreoffice6.1",
-                "/opt/libreoffice6.2",
-                "/opt/libreoffice6.3",
-                "/opt/libreoffice6.4",
-                "/opt/libreoffice7.0",
-                "/opt/libreoffice7.1",
-                "/opt/libreoffice7.2",
-                "/opt/openoffice4",
-                "/usr/lib/openoffice",
-                "/usr/lib/libreoffice"
-            );
-        }
-    }
-
-    private static File findOfficeHome(String... knownPaths) {
-        for (String path : knownPaths) {
-            File home = new File(path);
-            if (getOfficeExecutable(home).isFile()) {
-                return home;
-            }
-        }
-        return null;
-    }
-
-    public static File getOfficeExecutable(File officeHome) {
-        if (PlatformUtils.isMac()) {
-            return new File(officeHome, "MacOS/soffice");
-        } else {
-            return new File(officeHome, "program/soffice.bin");
-        }
-    }
-
-
-
-    /**
-     * SpringBoot application.properties 支持从环境变量获取值
-     * @param properties
-     */
-    public synchronized static void restorePropertiesFromEnvFormat(Properties properties) {
-        Iterator<Map.Entry<Object, Object>> iterator = properties.entrySet().iterator();
-        while (iterator.hasNext()) {
-            Map.Entry<Object, Object> entry = iterator.next();
-            String key = entry.getKey().toString();
-            String value = entry.getValue().toString();
-            if (value.trim().startsWith("${") && value.trim().endsWith("}")) {
-                int beginIndex = value.indexOf(":");
-                if (beginIndex < 0) {
-                    beginIndex = value.length() - 1;
-                }
-                int endIndex = value.length() - 1;
-                String envKey = value.substring(2, beginIndex);
-                String envValue = System.getenv(envKey);
-                if (envValue == null || "".equals(envValue.trim())) {
-                    value = value.substring(beginIndex + 1, endIndex);
-                } else {
-                    value = envValue;
-                }
-                properties.setProperty(key, value);
-            }
-        }
-    }
-
-}

+ 0 - 110
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/PooledOfficeManager.java

@@ -1,110 +0,0 @@
-//
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.logging.Logger;
-
-class PooledOfficeManager implements OfficeManager {
-
-    private final PooledOfficeManagerSettings settings;
-    private final ManagedOfficeProcess managedOfficeProcess;
-    private final SuspendableThreadPoolExecutor taskExecutor;
-
-    private volatile boolean stopping = false;
-    private int taskCount;
-    private Future<?> currentTask;
-
-    private final Logger logger = Logger.getLogger(getClass().getName());
-
-    private OfficeConnectionEventListener connectionEventListener = new OfficeConnectionEventListener() {
-        public void connected(OfficeConnectionEvent event) {
-            taskCount = 0;
-            taskExecutor.setAvailable(true);
-        }
-        public void disconnected(OfficeConnectionEvent event) {
-            taskExecutor.setAvailable(false);
-            if (stopping) {
-                // expected
-                stopping = false;
-            } else {
-                logger.warning("connection lost unexpectedly; attempting restart");
-                if (currentTask != null) {
-                    currentTask.cancel(true);
-                }
-                managedOfficeProcess.restartDueToLostConnection();
-            }
-        }
-    };
-
-    public PooledOfficeManager(UnoUrl unoUrl) {
-        this(new PooledOfficeManagerSettings(unoUrl));
-    }
-
-    public PooledOfficeManager(PooledOfficeManagerSettings settings) {
-        this.settings = settings;
-        managedOfficeProcess = new ManagedOfficeProcess(settings);
-        managedOfficeProcess.getConnection().addConnectionEventListener(connectionEventListener);
-        taskExecutor = new SuspendableThreadPoolExecutor(new NamedThreadFactory("OfficeTaskThread"));
-    }
-
-    public void execute(final OfficeTask task) throws OfficeException {
-        Future<?> futureTask = taskExecutor.submit(new Runnable() {
-            public void run() {
-                if (settings.getMaxTasksPerProcess() > 0 && ++taskCount == settings.getMaxTasksPerProcess() + 1) {
-                    logger.info(String.format("reached limit of %d maxTasksPerProcess: restarting", settings.getMaxTasksPerProcess()));
-                    taskExecutor.setAvailable(false);
-                    stopping = true;
-                    managedOfficeProcess.restartAndWait();
-                    //FIXME taskCount will be 0 rather than 1 at this point
-                }
-                task.execute(managedOfficeProcess.getConnection());
-             }
-         });
-         currentTask = futureTask;
-         try {
-             futureTask.get(settings.getTaskExecutionTimeout(), TimeUnit.MILLISECONDS);
-         } catch (TimeoutException timeoutException) {
-             managedOfficeProcess.restartDueToTaskTimeout();
-             throw new OfficeException("task did not complete within timeout", timeoutException);
-         } catch (ExecutionException executionException) {
-             if (executionException.getCause() instanceof OfficeException) {
-                 throw (OfficeException) executionException.getCause();
-             } else {
-                 throw new OfficeException("task failed", executionException.getCause());
-             }
-         } catch (Exception exception) {
-             throw new OfficeException("task failed", exception);
-         }
-    }
-
-    public void start() throws OfficeException {
-        managedOfficeProcess.startAndWait();
-    }
-
-    public void stop() throws OfficeException {
-        taskExecutor.setAvailable(false);
-        stopping = true;
-        taskExecutor.shutdownNow();
-        managedOfficeProcess.stopAndWait();
-    }
-
-	public boolean isRunning() {
-		return managedOfficeProcess.isConnected();
-	}
-
-}

+ 0 - 43
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/PooledOfficeManagerSettings.java

@@ -1,43 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-class PooledOfficeManagerSettings extends ManagedOfficeProcessSettings {
-
-    public static final long DEFAULT_TASK_EXECUTION_TIMEOUT = 120000L;
-    public static final int DEFAULT_MAX_TASKS_PER_PROCESS = 200;
-
-    private long taskExecutionTimeout = DEFAULT_TASK_EXECUTION_TIMEOUT;
-    private int maxTasksPerProcess = DEFAULT_MAX_TASKS_PER_PROCESS;
-
-    public PooledOfficeManagerSettings(UnoUrl unoUrl) {
-        super(unoUrl);
-    }
-
-    public long getTaskExecutionTimeout() {
-        return taskExecutionTimeout;
-    }
-
-    public void setTaskExecutionTimeout(long taskExecutionTimeout) {
-        this.taskExecutionTimeout = taskExecutionTimeout;
-    }
-
-    public int getMaxTasksPerProcess() {
-        return maxTasksPerProcess;
-    }
-
-    public void setMaxTasksPerProcess(int maxTasksPerProcess) {
-        this.maxTasksPerProcess = maxTasksPerProcess;
-    }
-
-}

+ 0 - 110
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/ProcessPoolOfficeManager.java

@@ -1,110 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-import java.io.File;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.TimeUnit;
-import java.util.logging.Logger;
-
-import org.artofsolving.jodconverter.process.ProcessManager;
-
-class ProcessPoolOfficeManager implements OfficeManager {
-
-    private final BlockingQueue<PooledOfficeManager> pool;
-    private final PooledOfficeManager[] pooledManagers;
-    private final long taskQueueTimeout;
-
-    private volatile boolean running = false;
-
-    private final Logger logger = Logger.getLogger(ProcessPoolOfficeManager.class.getName());
-
-    public ProcessPoolOfficeManager(File officeHome, UnoUrl[] unoUrls, String[] runAsArgs, File templateProfileDir, File workDir,
-            long retryTimeout, long taskQueueTimeout, long taskExecutionTimeout, int maxTasksPerProcess,
-            ProcessManager processManager) {
-		this.taskQueueTimeout = taskQueueTimeout;
-        pool = new ArrayBlockingQueue<PooledOfficeManager>(unoUrls.length);
-        pooledManagers = new PooledOfficeManager[unoUrls.length];
-        for (int i = 0; i < unoUrls.length; i++) {
-            PooledOfficeManagerSettings settings = new PooledOfficeManagerSettings(unoUrls[i]);
-            settings.setRunAsArgs(runAsArgs);
-            settings.setTemplateProfileDir(templateProfileDir);
-            settings.setWorkDir(workDir);
-            settings.setOfficeHome(officeHome);
-            settings.setRetryTimeout(retryTimeout);
-            settings.setTaskExecutionTimeout(taskExecutionTimeout);
-            settings.setMaxTasksPerProcess(maxTasksPerProcess);
-            settings.setProcessManager(processManager);
-            pooledManagers[i] = new PooledOfficeManager(settings);
-        }
-        logger.info("ProcessManager implementation is " + processManager.getClass().getSimpleName());
-    }
-
-    public synchronized void start() throws OfficeException {
-        for (int i = 0; i < pooledManagers.length; i++) {
-            pooledManagers[i].start();
-            releaseManager(pooledManagers[i]);
-        }
-        running = true;
-    }
-
-    public void execute(OfficeTask task) throws IllegalStateException, OfficeException {
-        if (!running) {
-            throw new IllegalStateException("this OfficeManager is currently stopped");
-        }
-        PooledOfficeManager manager = null;
-        try {
-            manager = acquireManager();
-            if (manager == null) {
-                throw new OfficeException("no office manager available");
-            }
-            manager.execute(task);
-        } finally {
-            if (manager != null) {
-                releaseManager(manager);
-            }
-        }
-    }
-
-    public synchronized void stop() throws OfficeException {
-        running = false;
-        logger.info("stopping");
-        pool.clear();
-        for (int i = 0; i < pooledManagers.length; i++) {
-            pooledManagers[i].stop();
-        }
-        logger.info("stopped");
-    }
-
-    private PooledOfficeManager acquireManager() {
-        try {
-            return pool.poll(taskQueueTimeout, TimeUnit.MILLISECONDS);
-        } catch (InterruptedException interruptedException) {
-            throw new OfficeException("interrupted", interruptedException);
-        }
-    }
-
-    private void releaseManager(PooledOfficeManager manager) {
-        try {
-            pool.put(manager);
-        } catch (InterruptedException interruptedException) {
-            throw new OfficeException("interrupted", interruptedException);
-        }
-    }
-
-	public boolean isRunning() {
-		return running;
-	}
-
-}

+ 0 - 23
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/RetryTimeoutException.java

@@ -1,23 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-class RetryTimeoutException extends Exception {
-
-    private static final long serialVersionUID = -3704437769955257514L;
-
-    public RetryTimeoutException(Throwable cause) {
-        super(cause);
-    }
-
-}

+ 0 - 55
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/Retryable.java

@@ -1,55 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-abstract class Retryable {
-
-    /**
-     * @throws TemporaryException for an error condition that can be temporary - i.e. retrying later could be successful
-     * @throws Exception for all other error conditions
-     */
-    protected abstract void attempt() throws TemporaryException, Exception;
-
-    public void execute(long interval, long timeout) throws RetryTimeoutException, Exception {
-        execute(0L, interval, timeout);
-    }
-
-    public void execute(long delay, long interval, long timeout) throws RetryTimeoutException, Exception {
-        long start = System.currentTimeMillis();
-        if (delay > 0L) {
-            sleep(delay);
-        }
-        while (true) {
-            try {
-                attempt();
-                return;
-            } catch (TemporaryException temporaryException) {
-                if (System.currentTimeMillis() - start < timeout) {
-                    sleep(interval);
-                    // continue
-                } else {
-                    throw new RetryTimeoutException(temporaryException.getCause());
-                }
-            }
-        }
-    }
-
-    private void sleep(long millis) {
-        try {
-            Thread.sleep(millis);
-        } catch (InterruptedException interruptedException) {
-            // continue
-        }
-    }
-
-}

+ 0 - 59
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/SuspendableThreadPoolExecutor.java

@@ -1,59 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.ReentrantLock;
-
-class SuspendableThreadPoolExecutor extends ThreadPoolExecutor {
-
-    private boolean available = false;
-    private ReentrantLock suspendLock = new ReentrantLock();
-    private Condition availableCondition = suspendLock.newCondition();
-
-    public SuspendableThreadPoolExecutor(ThreadFactory threadFactory) {
-        super(1, 1, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>(), threadFactory);
-    }
-
-    @Override
-    protected void beforeExecute(Thread thread, Runnable task) {
-        super.beforeExecute(thread, task);
-        suspendLock.lock();
-        try {
-            while (!available) {
-                availableCondition.await();
-            }
-        } catch (InterruptedException interruptedException) {
-            thread.interrupt();
-        } finally {
-            suspendLock.unlock();
-        }
-    }
-
-    public void setAvailable(boolean available) {
-        suspendLock.lock();
-        try {
-            this.available = available;
-            if (available) {
-                availableCondition.signalAll();
-            }
-        } finally {
-            suspendLock.unlock();
-        }
-    }
-
-}

+ 0 - 32
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/TemporaryException.java

@@ -1,32 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-import java.math.BigDecimal;
-
-/**
- * Represents an error condition that can be temporary, i.e. that could go
- * away by simply retrying the same operation after an interval.  
- */
-class TemporaryException extends Exception {
-
-    private static final long serialVersionUID = 7237380113208327295L;
-
-    public TemporaryException(Throwable cause) {
-        super(cause);
-    }
-
-    public static void main(String[] args) {
-        System.out.println(new BigDecimal("7412611111110.99"));
-    }
-}

+ 0 - 62
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/office/UnoUrl.java

@@ -1,62 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.office;
-
-/**
- * Encapsulates the UNO Interprocess Connection type and parameters.
- * <p>
- * OpenOffice.org supports two connection types: TCP sockets and named pipes.
- * Named pipes are marginally faster and do not take up a TCP port, but they
- * require native libraries, which means setting <em>java.library.path</em>
- * when starting Java. E.g. on Linux
- * <pre>
- * java -Djava.library.path=/opt/openoffice.org/ure/lib ...
- * </pre>
- * <p>
- * See <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Opening_a_Connection">Opening a Connection</a>
- * in the OpenOffice.org Developer's Guide for more details.
- */
-class UnoUrl {
-
-    private final String acceptString;
-    private final String connectString;
-
-    private UnoUrl(String acceptString, String connectString) {
-        this.acceptString = acceptString;
-        this.connectString = connectString;
-    }
-
-    public static UnoUrl socket(int port) {
-        String socketString = "socket,host=127.0.0.1,port=" + port;
-        return new UnoUrl(socketString, socketString + ",tcpNoDelay=1");
-    }
-
-    public static UnoUrl pipe(String pipeName) {
-        String pipeString = "pipe,name=" + pipeName;
-        return new UnoUrl(pipeString, pipeString);
-    }
-
-    public String getAcceptString() {
-        return acceptString;
-    }
-
-    public String getConnectString() {
-        return connectString;
-    }
-
-    @Override
-    public String toString() {
-        return connectString;
-    }
-
-}

+ 0 - 82
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/process/LinuxProcessManager.java

@@ -1,82 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.process;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.io.IOUtils;
-
-/**
- * {@link ProcessManager} implementation for Linux. Uses the <tt>ps</tt>
- * and <tt>kill</tt> commands.
- * <p>
- * Should Work on Solaris too, except that the command line string
- * returned by <tt>ps</tt> there is limited to 80 characters and this affects
- * {@link #findPid(String)}.
- */
-public class LinuxProcessManager implements ProcessManager {
-
-    private static final Pattern PS_OUTPUT_LINE = Pattern.compile("^\\s*(\\d+)\\s+(.*)$"); 
-
-    private String[] runAsArgs;
-
-    public void setRunAsArgs(String... runAsArgs) {
-		this.runAsArgs = runAsArgs;
-	}
-
-    protected String[] psCommand() {
-        return new String[] { "/bin/ps", "-e", "-o", "pid,args" };
-    }
-
-    public long findPid(ProcessQuery query) throws IOException {
-        String regex = Pattern.quote(query.getCommand()) + ".*" + Pattern.quote(query.getArgument());
-        Pattern commandPattern = Pattern.compile(regex);
-        for (String line : execute(psCommand())) {
-            Matcher lineMatcher = PS_OUTPUT_LINE.matcher(line);
-            if (lineMatcher.matches()) {
-                String command = lineMatcher.group(2);
-                Matcher commandMatcher = commandPattern.matcher(command);
-                if (commandMatcher.find()) {
-                    return Long.parseLong(lineMatcher.group(1));
-                }
-            }
-        }
-        return PID_NOT_FOUND;
-    }
-
-    public void kill(Process process, long pid) throws IOException {
-    	if (pid <= 0) {
-    		throw new IllegalArgumentException("invalid pid: " + pid);
-    	}
-        execute("/bin/kill", "-KILL", Long.toString(pid));
-    }
-
-    private List<String> execute(String... args) throws IOException {
-    	String[] command;
-    	if (runAsArgs != null) {
-    		command = new String[runAsArgs.length + args.length];
-    		System.arraycopy(runAsArgs, 0, command, 0, runAsArgs.length);
-    		System.arraycopy(args, 0, command, runAsArgs.length, args.length);
-    	} else {
-    		command = args;
-    	}
-        Process process = new ProcessBuilder(command).start();
-        @SuppressWarnings("unchecked")
-        List<String> lines = IOUtils.readLines(process.getInputStream());
-        return lines;
-    }
-
-}

+ 0 - 32
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/process/ProcessManager.java

@@ -1,32 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.process;
-
-import java.io.IOException;
-
-public interface ProcessManager {
-
-    public static final long PID_NOT_FOUND = -2;
-    public static final long PID_UNKNOWN = -1;
-
-    void kill(Process process, long pid) throws IOException;
-
-    /**
-     * @param query
-     * @return the pid if found, {@link #PID_NOT_FOUND} if not,
-     *   or {@link #PID_UNKNOWN} if this implementation is unable to find out
-     * @throws IOException
-     */
-    long findPid(ProcessQuery query) throws IOException;
-
-}

+ 0 - 33
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/process/ProcessQuery.java

@@ -1,33 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.process;
-
-public class ProcessQuery {
-
-    private final String command;
-    private final String argument;
-
-    public ProcessQuery(String command, String argument) {
-        this.command = command;
-        this.argument = argument;
-    }
-
-    public String getCommand() {
-        return command;
-    }
-
-    public String getArgument() {
-        return argument;
-    }
-
-}

+ 0 - 25
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/process/PureJavaProcessManager.java

@@ -1,25 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.process;
-
-public class PureJavaProcessManager implements ProcessManager {
-
-    public long findPid(ProcessQuery query) {
-        return PID_UNKNOWN;
-    }
-
-    public void kill(Process process, long pid) {
-        process.destroy();
-    }
-
-}

+ 0 - 71
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/process/SigarProcessManager.java

@@ -1,71 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.process;
-
-import java.io.IOException;
-
-import org.hyperic.sigar.Sigar;
-import org.hyperic.sigar.SigarException;
-import org.hyperic.sigar.ptql.ProcessFinder;
-
-/**
- * {@link ProcessManager} implementation that uses the SIGAR library.
- * <p>
- * Requires the sigar.jar in the classpath and the appropriate system-specific
- * native library (e.g. <tt>libsigar-x86-linux.so</tt> on Linux x86) available
- * in the <em>java.library.path</em>.
- * <p>
- * See the <a href="http://support.hyperic.com/display/SIGAR">SIGAR site</a>
- * for documentation and downloads.
- */
-public class SigarProcessManager implements ProcessManager {
-
-    public long findPid(ProcessQuery query) throws IOException {
-        Sigar sigar = new Sigar();
-        try {
-            long[] pids = ProcessFinder.find(sigar, "State.Name.eq=" + query.getCommand());
-            for (int i = 0; i < pids.length; i++) {
-                String[] arguments = sigar.getProcArgs(pids[i]);
-                if (arguments != null && argumentMatches(arguments, query.getArgument())) {
-                    return pids[i];
-                }
-            }
-            return PID_NOT_FOUND;
-        } catch (SigarException sigarException) {
-            throw new IOException("findPid failed", sigarException);
-        } finally {
-            sigar.close();
-        }
-    }
-
-    public void kill(Process process, long pid) throws IOException {
-        Sigar sigar = new Sigar();
-        try {
-            sigar.kill(pid, Sigar.getSigNum("KILL"));
-        } catch (SigarException sigarException) {
-            throw new IOException("kill failed", sigarException);
-        } finally {
-            sigar.close();
-        }
-    }
-
-    private boolean argumentMatches(String[] arguments, String expected) {
-        for (String argument : arguments) {
-            if (argument.contains(expected)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-}

+ 0 - 76
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/util/ConfigUtils.java

@@ -1,76 +0,0 @@
-package org.artofsolving.jodconverter.util;
-
-
-import java.io.File;
-
-/**
- * @author : kl
- **/
-public class ConfigUtils {
-
-    private static final String MAIN_DIRECTORY_NAME = "server";
-    private static final String OFFICE_PLUGIN_NAME = "office-plugin";
-
-    public static String getHomePath() {
-        String userDir = System.getenv("KKFILEVIEW_BIN_FOLDER");
-        if (userDir == null) {
-            userDir = System.getProperty("user.dir");
-        }
-        if (userDir.endsWith("bin")) {
-            userDir = userDir.substring(0, userDir.length() - 4);
-        } else {
-            String separator = File.separator;
-            if (userDir.contains(MAIN_DIRECTORY_NAME)) {
-                userDir = userDir + separator + "src" + separator +  "main";
-            } else {
-                userDir = userDir + separator + MAIN_DIRECTORY_NAME + separator + "src" + separator + "main";
-            }
-        }
-        return userDir;
-    }
-
-    // 获取环境变量,如果找不到则返回默认值
-    @SuppressWarnings("SameParameterValue")
-    private static String getEnvOrDefault(String key, String def) {
-        String value = System.getenv(key);
-        return value == null ? def : value;
-    }
-
-    // 返回参数列表中第一个真实存在的路径,或者 null
-    private static String firstExists(File... paths) {
-        for (File path : paths) {
-            if (path.exists()) {
-                return path.getAbsolutePath();
-            }
-        }
-        return null;
-    }
-
-    public static String getOfficePluginPath() {
-        String userDir = System.getProperty("user.dir");
-        String binFolder = getEnvOrDefault("KKFILEVIEW_BIN_FOLDER", userDir);
-
-        File pluginPath = new File(binFolder);
-
-        // 如果指定了 bin 或其父目录,则返回父目录
-        // 否则在当前目录和父目录中寻找 office-plugin
-        if (new File(pluginPath, "bin").exists()) {
-            return pluginPath.getAbsolutePath();
-
-        } else if (pluginPath.exists() && pluginPath.getName().equals("bin")) {
-            return pluginPath.getParentFile().getAbsolutePath();
-
-        } else {
-            return firstExists(
-                    new File(pluginPath, OFFICE_PLUGIN_NAME),
-                    new File(pluginPath.getParentFile(), OFFICE_PLUGIN_NAME)
-            );
-            }
-        }
-
-    public static String getCustomizedConfigPath() {
-        String homePath = getHomePath();
-        String separator = java.io.File.separator;
-        return homePath + separator + "config" + separator + "application.properties";
-    }
-}

+ 0 - 35
file-online-preview/office-plugin/src/main/java/org/artofsolving/jodconverter/util/PlatformUtils.java

@@ -1,35 +0,0 @@
-//
-// JODConverter - Java OpenDocument Converter
-// Copyright 2004-2012 Mirko Nasato and contributors
-//
-// JODConverter is Open Source software, you can redistribute it and/or
-// modify it under either (at your option) of the following licenses
-//
-// 1. The GNU Lesser General Public License v3 (or later)
-//    -> http://www.gnu.org/licenses/lgpl-3.0.txt
-// 2. The Apache License, Version 2.0
-//    -> http://www.apache.org/licenses/LICENSE-2.0.txt
-//
-package org.artofsolving.jodconverter.util;
-
-public class PlatformUtils {
-
-    private static final String OS_NAME = System.getProperty("os.name").toLowerCase();
-    
-    private PlatformUtils() {
-        throw new AssertionError("utility class must not be instantiated");
-    }
-
-    public static boolean isLinux() {
-        return OS_NAME.startsWith("linux");
-    }
-
-    public static boolean isMac() {
-        return OS_NAME.startsWith("mac");
-    }
-
-    public static boolean isWindows() {
-        return OS_NAME.startsWith("windows");
-    }
-
-}

+ 0 - 188
file-online-preview/office-plugin/src/main/resources/document-formats.js

@@ -1,188 +0,0 @@
-[
-  {
-    "name": "Portable Document Format",
-    "extension": "pdf",
-    "mediaType": "application/pdf",
-    "storePropertiesByFamily": {
-      "DRAWING": {"FilterName": "draw_pdf_Export"},
-      "SPREADSHEET": {"FilterName": "calc_pdf_Export"},
-      "PRESENTATION": {"FilterName": "impress_pdf_Export"},
-      "TEXT": {"FilterName": "writer_pdf_Export"}
-    }
-  },
-  {
-    "name": "Macromedia Flash",
-    "extension": "swf",
-    "mediaType": "application/x-shockwave-flash",
-    "storePropertiesByFamily": {
-      "DRAWING": {"FilterName": "draw_flash_Export"},
-      "PRESENTATION": {"FilterName": "impress_flash_Export"}
-    }
-  },
-  {
-    "name": "HTML",
-    "extension": "html",
-    "mediaType": "text/html",
-    "inputFamily": "TEXT",
-    "storePropertiesByFamily": {
-      "SPREADSHEET": {"FilterName": "HTML (StarCalc)"},
-      "PRESENTATION": {"FilterName": "impress_html_Export"},
-      "TEXT": {"FilterName": "HTML (StarWriter)"}
-    }
-  },
-  {
-    "name": "OpenDocument Text",
-    "extension": "odt",
-    "mediaType": "application/vnd.oasis.opendocument.text",
-    "inputFamily": "TEXT",
-    "storePropertiesByFamily": {"TEXT": {"FilterName": "writer8"}}
-  },
-  {
-    "name": "OpenOffice.org 1.0 Text Document",
-    "extension": "sxw",
-    "mediaType": "application/vnd.sun.xml.writer",
-    "inputFamily": "TEXT",
-    "storePropertiesByFamily": {"TEXT": {"FilterName": "StarOffice XML (Writer)"}}
-  },
-  {
-    "name": "Microsoft Word",
-    "extension": "doc",
-    "mediaType": "application/msword",
-    "inputFamily": "TEXT",
-    "storePropertiesByFamily": {"TEXT": {"FilterName": "MS Word 97"}}
-  },
-  {
-    "name": "Microsoft Word 2007 XML",
-    "extension": "docx",
-    "mediaType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
-    "inputFamily": "TEXT"
-  },
-  {
-    "name": "Rich Text Format",
-    "extension": "rtf",
-    "mediaType": "text/rtf",
-    "inputFamily": "TEXT",
-    "storePropertiesByFamily": {"TEXT": {"FilterName": "Rich Text Format"}}
-  },
-  {
-    "name": "WordPerfect",
-    "extension": "wpd",
-    "mediaType": "application/wordperfect",
-    "inputFamily": "TEXT"
-  },
-  {
-    "name": "Plain Text",
-    "extension": "txt",
-    "mediaType": "text/plain",
-    "inputFamily": "TEXT",
-    "loadProperties": {
-      "FilterName": "Text (encoded)",
-      "FilterOptions": "utf8"
-    },
-    "storePropertiesByFamily": {"TEXT": {
-      "FilterName": "Text (encoded)",
-      "FilterOptions": "utf8"
-    }}
-  },
-  {
-    "name": "MediaWiki wikitext",
-    "extension": "wiki",
-    "mediaType": "text/x-wiki",
-    "storePropertiesByFamily": {"TEXT": {"FilterName": "MediaWiki"}}
-  },
-  {
-    "name": "OpenDocument Spreadsheet",
-    "extension": "ods",
-    "mediaType": "application/vnd.oasis.opendocument.spreadsheet",
-    "inputFamily": "SPREADSHEET",
-    "storePropertiesByFamily": {"SPREADSHEET": {"FilterName": "calc8"}}
-  },
-  {
-    "name": "OpenOffice.org 1.0 Spreadsheet",
-    "extension": "sxc",
-    "mediaType": "application/vnd.sun.xml.calc",
-    "inputFamily": "SPREADSHEET",
-    "storePropertiesByFamily": {"SPREADSHEET": {"FilterName": "StarOffice XML (Calc)"}}
-  },
-  {
-    "name": "Microsoft Excel",
-    "extension": "xls",
-    "mediaType": "application/vnd.ms-excel",
-    "inputFamily": "SPREADSHEET",
-    "storePropertiesByFamily": {"SPREADSHEET": {"FilterName": "MS Excel 97"}}
-  },
-  {
-    "name": "Microsoft Excel 2007 XML",
-    "extension": "xlsx",
-    "mediaType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
-    "inputFamily": "SPREADSHEET"
-  },
-  {
-    "name": "Comma Separated Values",
-    "extension": "csv",
-    "mediaType": "text/csv",
-    "inputFamily": "SPREADSHEET",
-    "loadProperties": {
-      "FilterName": "Text - txt - csv (StarCalc)",
-      "FilterOptions": "44,34,0"
-    },
-    "storePropertiesByFamily": {"SPREADSHEET": {
-      "FilterName": "Text - txt - csv (StarCalc)",
-      "FilterOptions": "44,34,0"
-    }}
-  },
-  {
-    "name": "Tab Separated Values",
-    "extension": "tsv",
-    "mediaType": "text/tab-separated-values",
-    "inputFamily": "SPREADSHEET",
-    "loadProperties": {
-      "FilterName": "Text - txt - csv (StarCalc)",
-      "FilterOptions": "9,34,0"
-    },
-    "storePropertiesByFamily": {"SPREADSHEET": {
-      "FilterName": "Text - txt - csv (StarCalc)",
-      "FilterOptions": "9,34,0"
-    }}
-  },
-  {
-    "name": "OpenDocument Presentation",
-    "extension": "odp",
-    "mediaType": "application/vnd.oasis.opendocument.presentation",
-    "inputFamily": "PRESENTATION",
-    "storePropertiesByFamily": {"PRESENTATION": {"FilterName": "impress8"}}
-  },
-  {
-    "name": "OpenOffice.org 1.0 Presentation",
-    "extension": "sxi",
-    "mediaType": "application/vnd.sun.xml.impress",
-    "inputFamily": "PRESENTATION",
-    "storePropertiesByFamily": {"PRESENTATION": {"FilterName": "StarOffice XML (Impress)"}}
-  },
-  {
-    "name": "Microsoft PowerPoint",
-    "extension": "ppt",
-    "mediaType": "application/vnd.ms-powerpoint",
-    "inputFamily": "PRESENTATION",
-    "storePropertiesByFamily": {"PRESENTATION": {"FilterName": "MS PowerPoint 97"}}
-  },
-  {
-    "name": "Microsoft PowerPoint 2007 XML",
-    "extension": "pptx",
-    "mediaType": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
-    "inputFamily": "PRESENTATION"
-  },
-  {
-    "name": "OpenDocument Drawing",
-    "extension": "odg",
-    "mediaType": "application/vnd.oasis.opendocument.graphics",
-    "inputFamily": "DRAWING",
-    "storePropertiesByFamily": {"DRAWING": {"FilterName": "draw8"}}
-  },
-  {
-    "name": "Scalable Vector Graphics",
-    "extension": "svg",
-    "mediaType": "image/svg+xml",
-    "storePropertiesByFamily": {"DRAWING": {"FilterName": "draw_svg_Export"}}
-  }
-]

ファイルの差分が大きいため隠しています
+ 0 - 16481
file-online-preview/office-plugin/windows-office/CREDITS.fodt


ファイルの差分が大きいため隠しています
+ 0 - 6787
file-online-preview/office-plugin/windows-office/LICENSE.html


+ 0 - 159
file-online-preview/office-plugin/windows-office/NOTICE

@@ -1,159 +0,0 @@
-Portions of LibreOffice may include work under the Apache License v2.0
-requiring this NOTICE file to be provided.
-
-For a more complete license statement please see the associated
-documentation
-____
-
-Apache OpenOffice (http://www.openoffice.org)
-Copyright 2011, 2014 The Apache Software Foundation
-
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
-
-____
-
-
-Portions of this software copyright (c) 2000-2011, Oracle and/or its affiliates  <http://www.oracle.com/>.
-
-Portions of this software (C) Copyright IBM Corporation 2003, 2012.  All Rights Reserved.
-
-____
-
-As part of the base system this product also includes code from the following
-Apache projects:
-- Apache Lucene
-- Apache Portable Runtime
-- Apache Portable Runtime Utility Library
-- Apache Commons - used by MediaWiki Publisher extension
-- Apache Jakarta HttpClient - used by MediaWiki Publisher extension
-- Apache Tomcat - used by MediaWiki Publisher extension
-
-The notices from these projects are following:
-
-Apache Lucene
-Copyright 2006 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-The snowball stemmers in
-  contrib/snowball/src/java/net/sf/snowball
-were developed by Martin Porter and Richard Boulton.
-The full snowball package is available from
-  http://snowball.tartarus.org/
-
-
-Apache Portable Runtime
-Copyright (c) 2011 The Apache Software Foundation.
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-Portions of this software were developed at the National Center
-for Supercomputing Applications (NCSA) at the University of
-Illinois at Urbana-Champaign.
-
-This software contains code derived from the RSA Data Security
-Inc. MD5 Message-Digest Algorithm.
-
-This software contains code derived from UNIX V7, Copyright(C)
-Caldera International Inc.
-
-
-Apache Portable Runtime Utility Library
-Copyright (c) 2011 The Apache Software Foundation.
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-Portions of this software were developed at the National Center
-for Supercomputing Applications (NCSA) at the University of
-Illinois at Urbana-Champaign.
-
-This software contains code derived from the RSA Data Security
-Inc. MD5 Message-Digest Algorithm, including various
-modifications by Spyglass Inc., Carnegie Mellon University, and
-Bell Communications Research, Inc (Bellcore).
-
-
-Apache Commons Codec
-Copyright 2002-2012 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-src/test/org/apache/commons/codec/language/DoubleMetaphoneTest.java contains
-test data from http://aspell.sourceforge.net/test/batch0.tab.
-
-Copyright (C) 2002 Kevin Atkinson (kevina@gnu.org). Verbatim copying
-and distribution of this entire article is permitted in any medium,
-provided this notice is preserved.
-
-Apache Jakarta HttpClient
-Copyright 1999-2007 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-Apache Commons Lang
-Copyright 2001-2012 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-This product includes software from the Spring Framework,
-under the Apache License 2.0 (see: StringUtils.containsWhitespace())
-
-
-Apache Commons Logging
-Copyright 2003-2007 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-
-Apache Tomcat
-Copyright 1999-2012 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-Java Management Extensions (JMX) support is provided by
-the MX4J package, which is open source software.  The
-original software and related information is available
-at http://mx4j.sourceforge.net/.
-
-Java compilation software for JSP pages is provided by Eclipse, 
-which is open source software.  The original software and 
-related information is available at
-http://www.eclipse.org/.
-
-____
-
-As part of the base system this product may also includes code from the following
-projects which are licensed under the Apache license:
-- serf
-- redland
-- Apache BeanShell Scripting for Java
-
-The notices from these projects are following:
-
-serf
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-redland
-This product includes Redland software (http://librdf.org/)
-developed at the Institute for Learning and Research Technology,
-University of Bristol, UK (http://www.bristol.ac.uk/).
-
-Apache BeanShell Scripting for Java
-Copyright 1997-2012 Patrick Niemeyer
-Granted to the Apache Software Foundation 2012
-Licensed under the Apache License, Version 2.0.
-____
-
-This product includes software developed by the OpenSSL Project
-for use in the OpenSSL Toolkit. (http://www.openssl.org/)
-

+ 0 - 100
file-online-preview/office-plugin/windows-office/help/a11y-toggle.js

@@ -1,100 +0,0 @@
-/*
-MIT License
-
-Copyright (c) 2016 Edenspiekermann
-
-*/
-
-(function () {
-  'use strict';
-
-  var internalId = 0;
-  var togglesMap = {};
-  var targetsMap = {};
-
-  function $ (selector, context) {
-    return Array.prototype.slice.call(
-      (context || document).querySelectorAll(selector)
-    );
-  }
-
-  function getClosestToggle (element) {
-    if (element.closest) {
-      return element.closest('[data-a11y-toggle]');
-    }
-
-    while (element) {
-      if (element.nodeType === 1 && element.hasAttribute('data-a11y-toggle')) {
-        return element;
-      }
-
-      element = element.parentNode;
-    }
-
-    return null;
-  }
-
-  function handleToggle (toggle) {
-    var target = toggle && targetsMap[toggle.getAttribute('aria-controls')];
-
-    if (!target) {
-      return false;
-    }
-
-    var toggles = togglesMap['#' + target.id];
-    var isExpanded = target.getAttribute('aria-hidden') === 'false';
-
-    target.setAttribute('aria-hidden', isExpanded);
-    toggles.forEach(function (toggle) {
-      toggle.setAttribute('aria-expanded', !isExpanded);
-    });
-  }
-
-  var initA11yToggle = function (context) {
-    togglesMap = $('[data-a11y-toggle]', context).reduce(function (acc, toggle) {
-      var selector = '#' + toggle.getAttribute('data-a11y-toggle');
-      acc[selector] = acc[selector] || [];
-      acc[selector].push(toggle);
-      return acc;
-    }, togglesMap);
-
-    var targets = Object.keys(togglesMap);
-    targets.length && $(targets).forEach(function (target) {
-      var toggles = togglesMap['#' + target.id];
-      var isExpanded = target.hasAttribute('data-a11y-toggle-open');
-      var labelledby = [];
-
-      toggles.forEach(function (toggle) {
-        toggle.id || toggle.setAttribute('id', 'a11y-toggle-' + internalId++);
-        toggle.setAttribute('aria-controls', target.id);
-        toggle.setAttribute('aria-expanded', isExpanded);
-        labelledby.push(toggle.id);
-      });
-
-      target.setAttribute('aria-hidden', !isExpanded);
-      target.hasAttribute('aria-labelledby') || target.setAttribute('aria-labelledby', labelledby.join(' '));
-
-      targetsMap[target.id] = target;
-    });
-  };
-
-  document.addEventListener('DOMContentLoaded', function () {
-    initA11yToggle();
-  });
-
-  document.addEventListener('click', function (event) {
-    var toggle = getClosestToggle(event.target);
-    handleToggle(toggle);
-  });
-
-  document.addEventListener('keyup', function (event) {
-    if (event.which === 13 || event.which === 32) {
-      var toggle = getClosestToggle(event.target);
-      if (toggle && toggle.getAttribute('role') === 'button') {
-        handleToggle(toggle);
-      }
-    }
-  });
-
-  window && (window.a11yToggle = initA11yToggle);
-})();

+ 0 - 907
file-online-preview/office-plugin/windows-office/help/default.css

@@ -1,907 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-/*
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-+                     LIBREOFFICE HELP IN BROWSER                   +
-+                          DEFAULT STYLESHEET                       +
-+                           WESTERN LANGUAGES                       +
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-We use px as the unit for navigation elements and fonts because we do
-not want them to scale with browser-set font size.
-We use rem as the unit for article and footer contents because they
-do not break anything related to layout by scaling.
-
-*/
-
-body,
-p,
-h1,
-h2,
-h3,
-h4,
-h5,
-h6,
-.listitem,
-.listitemintable,
-.tablecontent {
-    font-family: -apple-system, system-ui, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "DejaVu Sans", "Lucida Grande", "Helvetica Neue", Helvetica, Arial, sans-serif, FreeSerif, NanumGothic, "Noto Sans Tibetan", Taprom;
-}
-.input {
-    background-color: rgba(0,0,0,0.04);
-    transition-property: background-color;
-    transition-duration: 150ms;
-    border-bottom: 1px dashed rgba(0,0,0,0.1);
-    font-family: Menlo, Consolas, "DejaVu Sans Mono", "Nimbus Mono L", "Lucida Sans Typewriter", "Courier New", Courier, Monaco, monospace;
-}
-[data-tooltip]{
-  position:relative;
-}
-[data-tooltip]::before {
-    content: "";
-    position: absolute;
-    top:-6px;
-    left:50%;
-    transform: translateX(-50%);
-    border-width: 4px 6px 0 6px;
-    border-style: solid;
-    border-color: rgba(0,0,0,0.7) transparent transparent transparent;
-    z-index: 100;
-    opacity: 0;
-    pointer-events: none;
-}
-[data-tooltip]::after {
-    content: attr(data-tooltip);
-    position: absolute;
-    left:50%;
-    top:-6px;
-    transform: translateX(-50%)   translateY(-100%);
-    background: rgba(0,0,0,0.7);
-    text-align: center;
-    color: #fff;
-    padding:4px 2px;
-    font-size: 12px;
-    min-width: 80px;
-    border-radius: 5px;
-    opacity: 0;
-    pointer-events: none;
-}
-[data-tooltip]:hover:before, [data-tooltip]:hover:after {
-    opacity: 1;
-    pointer-events: auto;
-}
-body {
-    background-color: #F7F8F7;
-    margin: 0;
-    line-height: normal;
-}
-::selection {
-    background: #FFEB9F;
-}
-a {
-    text-decoration-color: rgba(0,0,0,0.15);
-    color: #0461e0;
-}
-a:hover {
-    text-decoration: underline;
-    color: #023a86;
-}
-a:visited {
-    color: #633363;
-}
-pre,
-.code,
-.codeintable,
-.example,
-.exampleintable,
-.literal,
-.literalintable,
-.path,
-.pathintable {
-    background-color: rgba(0,0,0,0.04);
-    border-radius: 2px;
-    display: inline;
-    padding: 1px 3px;
-    font-family: Menlo, Consolas, "DejaVu Sans Mono", "Nimbus Mono L", "Lucida Sans Typewriter", "Courier New", Courier, Monaco, monospace;
-}
-.smathcode {
-    border-radius: 2px;
-    padding: 1px 3px;
-    font-family: Menlo, Consolas, "DejaVu Sans Mono", "Nimbus Mono L", "Lucida Sans Typewriter", "Courier New", Courier, Monaco, monospace;
-}
-.acronym {
-    font-weight: bold;
-}
-.related {
-    font-weight: bold;
-    margin-top: 1.67rem;
-    border-top: 1px solid black;
-}
-.emph,
-.menuitem {
-    font-weight: bold;
-}
-.keycode {
-    font-family: Menlo, Consolas, "DejaVu Sans Mono", "Nimbus Mono L", "Lucida Sans Typewriter", "Courier New", Courier, Monaco, monospace;
-}
-.widget{
-    padding: 1px 10px;
-    background: #f0f0f0;
-    background: linear-gradient(to bottom,#f0f0f0,#fcfcfc);
-    border-radius: 3px;
-    color: #303030;
-    border: 1px solid #a0a0a0;
-    border-bottom-width: 2px;
-    white-space: nowrap;
-}
-/* div's for warning, tip and note */
-.note,
-.tip,
-.warning {
-    display:flex;
-    align-items: center;
-    border-radius: 2px;
-    box-shadow: 0 2px 5px -3px rgb(0 0 0 / 10%);
-    padding: 0.2em;
-    margin-top: 15px;
-}
-.note {
-    border-left: 2px solid #309048;
-    background-color: #d9f1dd;
-}
-.tip {
-    border-left: 2px solid #0063b1;
-    background-color: #cde5f7;
-}
-.warning {
-    border-left: 2px solid #ed8733;
-    background-color: #f6f1d2;
-}
-.noteicon, .notetext {
-    padding:0.3em;
-}
-
-/* Table related classes */
-
-/* Special case of table with one cell*/
-.onecell{
-    box-shadow: rgba(0,0,0,0.1) 0px 1px 3px 0px;
-    border-bottom: 1px solid #E8E8E8;
-}
-/* Special case of icon table*/
-.icontable {
-    display:flex;
-    align-items:center;
-}
-.iconcell {
-    padding:0.3em;
-}
-
-table {
-    background: #FEFEFE;
-    box-shadow: rgba(0,0,0,0.08) 0 1px 5px 0;
-    border-collapse: collapse;
-    margin-left: auto;
-    margin-right: auto;
-}
-table, th, td {
-    border-top: 0;
-    border-bottom: 1px solid #E8E8E8;
-    border-left: 0;
-    border-right: 0;
-    padding: 0.3em;
-}
-.tablehead,
-.tableheadintable {
-    font-weight: bold;
-    margin-top: 0px;
-}
-.tableheadcell {
-    color: white;
-    vertical-align:top;
-}
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
-    margin-bottom: 0.67rem;
-    color: #148603;
-}
-p,
-ol,
-td {
-    font-size: 1.15rem;
-    margin: 2px 0 2px 0;
-}
-h1 {
-    font-size: 1.83rem;
-    font-weight: 300;
-    border-bottom: 2px solid #148603;
-    margin-bottom: 1.67rem;
-}
-h1 a {
-    text-decoration: none;
-}
-h2 {
-    font-size: 1.55rem;
-}
-h3 {
-    font-size: 1.33rem;
-}
-h4,
-h5,
-h6 {
-    font-size: 1.17rem;
-}
-.relatedtopics {
-    font-weight: normal;
-}
-.howtoget {
-    background: #EBE7E9;
-    border-left: 2px solid #4E4B55;
-    border-radius: 2px;
-    box-shadow: 0 2px 5px -3px rgb(0 0 0 / 10%);
-    padding: 0.2em;
-    display: flex;
-    flex-direction: column;
-}
-.howtogetheader {
-    background: #FFF;
-    border-radius: 2px;
-    box-shadow: 0 2px 2px -2px rgba(0,0,0,0.2);
-    display: inline-block;
-    font-weight: bold;
-    padding: 0.1em 0.3em;
-}
-.howtogetbody {
-    padding: 0 0.3em;
-}
-.samplefilesection{
-}
-.wide {
-    width: 100%;
-}
-.bug {
-    color: red;
-}
-.debug {
-    border: 1px solid black;
-    padding: 3px;
-    display: none;
-    background-color: #222;
-    color: red;
-    text-align: left;
-}
-
-.pycode,
-.bascode {
-    border: solid 5px transparent;
-    margin-top: 15px;
-    margin-bottom: 15px;
-}
-
-#DisplayArea {
-    background-color: #FCFCFC;
-    overflow: auto;
-    padding: 10px 10px 40px 10px;
-    grid-area: main;
-}
-#DisplayArea > p {
-    margin-bottom: 10px;
-}
-.mediabutton {
-    background-color: cyan;
-}
-.mediadiv{
-    padding-bottom:5%;
-    height:0;
-    display:inline-block;
-    border:none;
-}
-.screenshot, .genericimage {
-    border: .5px solid rgba(0,0,0,.1);
-    border-radius: 3px;
-    margin-left: auto;
-    margin-right: auto;
-    margin-top: 2em;
-    margin-bottom: 2em;
-    display:block;
-    box-shadow: rgba(0,0,0,0.08) 0 1px 5px 0;
-}
-.iconimage {}
-
-.switch,
-.switchinline {}
-
-.embedded {}
-#TopLeftHeader {
-    grid-area: header;
-    position: sticky;
-    top: 0px;
-    color: #fff;
-    display: flex;
-    flex-wrap: wrap;
-    justify-content: flex-start;
-    z-index: 100;
-}
-.dropdowns {
-    /* allow for scrolling */
-    overflow-x: auto;
-    overflow-y: hidden;
-    /* make it smooth on iOS */
-    -webkit-overflow-scrolling: touch;
-    grid-area: dropdowns;
-    display: flex;
-    justify-content: space-between;
-    flex-direction: column;
-}
-.symbol, .logo, .logo:hover, .logo:visited {
-    color: #fff;
-    text-decoration: none;
-}
-.logo p {
-    font-size: 24px;
-}
-.symbol {
-    grid-area: symbol;
-    padding: 8px 8px 8px 20px;
-}
-.symbol div {
-    background-image: url(media/navigation/libo-symbol-white.svg);
-    background-repeat: no-repeat;
-    background-size: contain;
-    width: 52px;
-    height: 60px;
-}
-
-[data-a11y-toggle]:not([aria-controls]) {
-  display: none;
-}
-
-#langs-nav:not([aria-hidden='true']), #modules-nav:not([aria-hidden='true']) {
-    z-index: 100;
-    /* line them up horizontally */
-    display: flex;
-    flex-direction: row;
-    /* allow for scrolling */
-    overflow-x: auto;
-    overflow-y: hidden;
-    /* make it smooth on iOS */
-    -webkit-overflow-scrolling: touch;
-}
-#langs-nav a, #modules-nav a {
-    color: #fff;
-    background-color: #233336;
-    display: block;
-    line-height: 1.5;
-    padding: 3px 6px;
-    text-decoration: none;
-    font-size: 24px;
-    flex-shrink: 0;
-    z-index: 100;
-    white-space: nowrap;
-}
-footer {
-    padding: 30px 20px;
-}
-footer p {
-    font-size: 0.98rem;
-}
-.contents-treeview input[type=checkbox], aside input[type=checkbox] {
-    /* from .visuallyhidden class of html5-boilerplate */
-    border: 0;
-    clip: rect(0 0 0 0);
-    height: 1px;
-    margin: -1px;
-    overflow: hidden;
-    padding: 0;
-    position: absolute;
-    width: 1px;
-    white-space: nowrap;
-}
-label[for=accordion-1] {
-    color: #233336;
-    display: block;
-    padding: 10px 0 10px 20px;
-    font-size: 22px;
-    line-height: .6;
-}
-label[for=accordion-1]:after {
-    font-size: 44px;
-    content:"⌄";
-}
-aside input[type=checkbox] ~ .contents-treeview {
-    display: none;
-}
-aside input[type=checkbox]:checked ~ .contents-treeview {
-    color: #333;
-    z-index: 6;
-    display: block;
-    margin: 0 20px 0 20px;
-}
-.index-label {
-    font-size: 22px;
-    color: #233336;
-    padding-left: 20px;
-    margin: 20px 0 0 0;
-}
-#Index, .index {
-    margin-top: 10px;
-}
-.index {
-    padding-left: 15px;
-}
-.index a {
-    font-size: 15px;
-    display: block;
-}
-.index .hidden {
-    display: none;
-}
-#Bookmarks {
-    padding: 0 20px;
-}
-#Bookmarks p {
-    font-size: 22px;
-    font-weight: bold;
-    color: #148603;
-}
-#WRITER::before {
-    content: "WRITER";
-    display: block;
-    font-size: 22px;
-    font-weight: bold;
-    color: #0369a3;
-}
-#CALC::before {
-    content: "CALC";
-    display: block;
-    font-size: 22px;
-    font-weight: bold;
-    color: #43c330;
-}
-#IMPRESS::before {
-    content: "IMPRESS";
-    display: block;
-    font-size: 22px;
-    font-weight: bold;
-    color: #a33e03;
-}
-#DRAW::before {
-    content: "DRAW";
-    display: block;
-    font-size: 22px;
-    font-weight: bold;
-    color: #c99c00;
-}
-#BASE::before {
-    content: "BASE";
-    display: block;
-    font-size: 22px;
-    font-weight: bold;
-    color: #8e03a3;
-}
-#MATH::before {
-    content: "MATH";
-    display: block;
-    font-size: 22px;
-    font-weight: bold;
-    color: darkslategray;
-}
-#CHART::before {
-    content: "CHART";
-    display: block;
-    font-size: 22px;
-    font-weight: bold;
-    color: darkcyan;
-}
-#BASIC::before {
-    content: "BASIC";
-    display: block;
-    font-size: 22px;
-    font-weight: bold;
-    color: black;
-}
-#SHARED::before {
-    content: "GLOBAL";
-    display: block;
-    font-size: 22px;
-    font-weight: bold;
-    color: gray;
-}
-.pagination-container {
-    text-align: center;
-    margin-left: -40px; /* The normalizer fails to account for this */
-}
-.pagination li {
-    display: inline-block;
-    padding: 0 5px;
-}
-.pagination a {
-    text-decoration: none;
-}
-li.active {
-    background-color: #023a86;
-}
-li.active a {
-    color: #fff;
-}
-li.disabled a {
-    opacity: 0.4;
-    pointer-events: none;
-}
-#search-bar, input {
-    border: 1px solid #CCC;
-    box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
-    box-sizing: border-box;
-    line-height: 1.5em;
-    margin-top: 10px;
-    outline: none;
-    padding: 0 .25em;
-    transition: all 0.30s ease-in-out;
-}
-#search-bar:focus, input:focus {
-    border: 1px solid #0EA5FB;
-}
-#search-bar {
-    width: 100%;
-}
-#search-bar::placeholder {
-    font-style: italic;
-}
-.xapian-donation {
-    border-top: 2px solid #148603;
-    background-color: #FCFCFC;
-    box-shadow: 0 2px 8px 0 rgba(0,0,0,.05);
-}
-#DonationFrame {
-    background: #18A303;
-    position: sticky;
-    top: 0px;
-}
-.donation{
-    border: 1px solid #f1c62a;
-    border-radius: 2px;
-    padding: 5px 10px;
-    margin: auto;
-    max-width: 200px;
-    color: #ffffff;
-}
-.donation:hover {
-    background: linear-gradient(90deg, #1c71d8 0%, #30c877 100%);
-}
-.donation a {
-    color: white;
-    text-decoration: none;
-}
-.donation p {
-    font-size:1rem;
-    text-align: center;
-}
-#SearchFrame {
-    background: #18A303;
-    top: 0px;
-    position: sticky;
-}
-.xapian-omega-search {
-    margin: auto;
-}
-.modules {
-    border-bottom: 2px solid #f3f3f3;
-    background-color: #233336;
-    z-index: 100;
-}
-#modules:after, #langs:after {
-    font-size: 30px;
-    color: #fff;
-    content:"⌄";
-}
-.lang {
-    background-color: #233336;
-}
-#langs, #modules {
-    display: none;
-}
-#modules-nav div {
-    background-repeat: no-repeat;
-    background-size: contain;
-    float: left;
-    display: none;
-}
-
-.calc-icon,
-.chart-icon,
-.writer-icon,
-.impress-icon,
-.draw-icon,
-.math-icon,
-.basic-icon,
-.base-icon {
-    width: 21.5px;
-    height: 26px;
-    position: relative;
-    margin-right: 5px;
-}
-.calc-icon {
-    background-image: url(media/navigation/libo-calc.svg);
-}
-.writer-icon {
-    background-image: url(media/navigation/libo-writer.svg);
-}
-.impress-icon {
-    background-image: url(media/navigation/libo-impress.svg);
-}
-.draw-icon {
-    background-image: url(media/navigation/libo-draw.svg);
-}
-.math-icon {
-    background-image: url(media/navigation/libo-math.svg);
-}
-.base-icon {
-    background-image: url(media/navigation/libo-base.svg);
-}
-.chart-icon {
-    background-image: url(media/navigation/libo-chart.svg);
-}
-.basic-icon {
-    background-image: url(media/navigation/libo-basic.svg);
-}
-/* tree view */
-
-.contents-treeview ul,
-.contents-treeview li {
-    padding: 0;
-    margin: 0;
-    list-style: none;
-    font-size: 15px;
-}
-.contents-treeview {
-    -moz-user-select: none;
-    -webkit-user-select: none;
-    user-select: none;
-}
-.contents-treeview a, .index a {
-    text-decoration: none;
-    line-height: 1.4;
-}
-.contents-treeview a:hover, .index a:hover {
-    border-left: 2px solid rgba(0,0,0,0.05);
-    margin-left: -12px;
-    padding-left: 10px;
-}
-.contents-treeview input + label + ul {
-    margin: 0 0 0 22px;
-}
-.contents-treeview input ~ ul {
-    display: none;
-}
-.contents-treeview label,
-.contents-treeview label:before {
-    cursor: pointer;
-    color: #111;
-}
-.contents-treeview input:disabled + label {
-    cursor: default;
-    opacity: .6;
-}
-.contents-treeview input:checked:not(:disabled) ~ ul {
-    display: block;
-}
-.contents-treeview label,
-.contents-treeview a,
-.contents-treeview label::before {
-    display: block;
-    vertical-align: middle;
-}
-.contents-treeview label:before {
-    content: "⊞";
-    color: #0461e0;
-    width: 16px;
-    margin: 0 5px 0 0;
-    display: inline-block;
-}
-.contents-treeview input:checked + label::before {
-    content: "⊟";
-}
-.contents-current {
-    background: rgba(0,0,0,0.1);
-    border-left: 2px solid #6E7487;
-    margin-left: -12px;
-    padding-left: 10px;
-}
-/* webkit adjacent element selector bugfix */
-
-@media screen and (-webkit-min-device-pixel-ratio: 0) {
-    .contents-treeview {
-        -webkit-animation: webkit-adjacent-element-selector-bugfix infinite 1s;
-    }
-    @-webkit-keyframes webkit-adjacent-element-selector-bugfix {
-        from {
-            padding: 0;
-        }
-        to {
-            padding: 0;
-        }
-    }
-}
-@media screen and (min-width: 960px) {
-    .dropdowns {
-        flex-direction: row;
-        overflow-y: auto;
-        overflow-x: hidden;
-    }
-    #langs-nav, #modules-nav {
-        display: none;
-    }
-    #langs-nav a {
-        font-size: 19px;
-        white-space: normal;
-    }
-    /* these are buttons, so also reset some default stylings */
-    #langs, #modules {
-        cursor: pointer;
-        color: #fff;
-        font-size: 19px;
-        display: block;
-        background: transparent;
-        border: none;
-        text-transform: none;
-        padding: 0;
-        line-height: normal;
-    }
-
-    /* change the menu direction to stacked */
-    #langs-nav:not([aria-hidden='true']), #modules-nav:not([aria-hidden='true']) {
-        display: flex;
-        flex-direction: column;
-        overflow-y: auto;
-        overflow-x: hidden;
-        max-width: 120px;
-        max-height: 480px;
-        position: absolute;
-    }
-    #modules-nav {
-        background-color: #101820;
-        text-align: left;
-    }
-    #modules-nav div {
-        display: block;
-    }
-    #modules-nav a {
-        font-size: 19px;
-    }
-    aside {
-        float: left;
-        width: 320px;
-    }
-    .leftside {
-        grid-area: leftside;
-    }
-    .rightside {
-        grid-area: rightside;
-    }
-    #DonationFrame {
-        grid-area: donation;
-    }
-    #SearchFrame {
-        grid-area: search;
-    }
-    footer {
-        grid-area: footer;
-    }
-    .lang {
-        background-color: transparent;
-    }
-    .modules {
-        border: none;
-        background-color: transparent;
-    }
-    #DisplayArea {
-        box-shadow: 0 2px 8px 0 rgba(0,0,0,.05);
-        padding: 10px 50px 40px 50px;
-    }
-    .xapian-omega-search {
-        width: 100%;
-    }
-    .xapian-omega-search form {
-        display: flex;
-        justify-content: center;
-    }
-    .omega-autofocus {
-        max-width: 200px;
-        width: 100%
-    }
-}
-@media screen and (min-width: 1440px) {
-    #Contents {
-        color: #333;
-        z-index: 6;
-        display: block;
-        margin: 0 20px 0 20px;
-    }
-    label[for=accordion-1] {
-        background-color: transparent;
-        text-decoration: none;
-    }
-     label[for=accordion-1]:hover {
-        background-color: transparent;
-    }
-     label[for=accordion-1]:after {
-        content: "";
-    }
-    .omega-autofocus {
-        max-width: 400px;
-    }
-}
-/* Use @supports to sneak these rules past IE */
-@supports (grid-area: auto) {
-    @media screen and (min-width: 960px) {
-        #TopLeftHeader {
-            display: grid;
-            align-items: end;
-            grid-template-columns: auto auto;
-            grid-template-rows: auto auto;
-            grid-template-areas: "symbol logo"
-                                "symbol dropdowns"
-        }
-        #SearchFrame {
-            grid-area: search;
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-        }
-        #DonationFrame {
-            grid-area: donation;
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-        }
-        body {
-            display: grid;
-            grid-template-columns: 320px 100px 300px 1fr;
-            grid-template-rows: minmax(1em, auto) minmax(1em, auto) 1fr minmax(1em, auto);
-            grid-template-areas: "header header search donation"
-                                 "rightside main main main"
-                                 "leftside main main main"
-                                 ". footer footer footer"
-        }
-        html {
-            scroll-padding-top: 64px;
-        }
-    }
-    @media screen and (min-width: 1440px) {
-        body {
-            display: grid;
-            grid-template-columns: 360px 100px 400px 400px 1fr;
-            grid-template-rows: 1fr minmax(1em, auto) minmax(1em, auto);
-            grid-template-areas: "header header search search donation"
-                                 "leftside main main main rightside"
-                                 ". footer footer footer ."
-        }
-        .donation {
-            max-width: 300px;
-        }
-        .rightside {
-            width: auto;
-            border-right: none;
-        }
-    }
-}

ファイルの差分が大きいため隠しています
+ 0 - 608
file-online-preview/office-plugin/windows-office/help/fuzzysort.js


+ 0 - 46
file-online-preview/office-plugin/windows-office/help/help.html

@@ -1,46 +0,0 @@
-<!DOCTYPE html>
-<!--
-* This file is part of the LibreOffice project.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this
-* file, You can obtain one at http://mozilla.org/MPL/2.0/.
--->
-<html>
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-    <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' piwik.documentfoundation.org"/>
-</head>
-<body>
-<script type="text/javascript">
-    function getParameterByName(name, url) {
-        if (!url) {
-            url = window.location.href;
-        }
-        name = name.replace(/[\[\]]/g, "\\$&");
-        var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)");
-        var results = regex.exec(url);
-        if (!results) {
-            return null;
-        }
-        if (!results[2]) {
-            return '';
-        }
-        return decodeURIComponent(results[2].replace(/\+/g, " "));
-    }
-
-    var url = window.location.href;
-    var n = url.indexOf('?');
-    if (n != -1) {
-        // the URL came from LibreOffice help (F1)
-        var version = getParameterByName("Version", url);
-        var query = url.substr(n + 1, url.length);
-        var newURL = version + '/index.html?' + query;
-        window.location.replace(newURL);
-    } else {
-        window.location.replace('latest/index.html');
-    }
-</script>
-</body>
-</html>
-

+ 0 - 188
file-online-preview/office-plugin/windows-office/help/help.js

@@ -1,188 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-// Pagination and fuzzy search
-var url = window.location.pathname;
-var moduleRegex = new RegExp('text\\/(\\w+)\\/');
-var regexArray = moduleRegex.exec(url);
-var modules = ['CALC', 'WRITER', 'IMPRESS', 'DRAW', 'BASE', 'MATH', 'CHART', 'BASIC', 'SHARED'];
-var indexEl = document.getElementsByClassName("index")[0];
-var fullLinks = fullLinkify(indexEl, bookmarks, modules, currentModule());
-var search = document.getElementById('search-bar');
-search.addEventListener('keyup', debounce(filter, 100, indexEl));
-// Preserve search input value during the session
-search.value = sessionStorage.getItem('searchsave');
-if (search.value !== undefined) {
-    filter(indexEl);
-}
-window.addEventListener('unload', function(event) {
-    sessionStorage.setItem('searchsave', search.value);
-});
-// render the unfiltered index list on page load
-fillIndex(indexEl, fullLinks, modules);
-
-function currentModule() {
-    var module = '';
-    // get the module name from the URL and remove the first character,
-    // but first deal with snowflake Base
-    if(url.indexOf('explorer/database/') !== -1) {
-        module = 'BASE';
-    } else {
-        if (null === regexArray){// comes from search or elsewhere, no defined module in URL
-            module = 'HARED'
-        } else {
-            module = regexArray[1].toUpperCase().substring(1);
-        }
-    }
-    return module;
-};
-function fullLinkify(indexEl, bookmarks, modules, currentModule) {
-    var fullLinkified = '';
-    // if user is not on a shared category page, limit the index to the current module + shared
-    if(currentModule !== 'HARED') {
-        bookmarks = bookmarks.filter(function(obj) {
-            return obj['app'] === currentModule || obj['app'] === 'SHARED';
-        });
-    }
-    bookmarks.forEach(function(obj) {
-        fullLinkified += '<a href="' + obj['url'] + '" class="' + obj['app'] + '">' + obj['text'] + '</a>';
-    });
-    return fullLinkified;
-}
-function fillIndex(indexEl, content, modules) {
-    indexEl.innerHTML = content;
-    var indexKids = indexEl.children;
-    for (var i = 0, len = indexKids.length; i < len; i++) {
-        indexKids[i].removeAttribute("id");
-    }
-    modules.forEach(function(module) {
-        var moduleHeader = indexEl.getElementsByClassName(module)[0];
-        if (typeof moduleHeader !== 'undefined') {
-            // let's wrap the header in a span, so the ::before element will not become a link
-            moduleHeader.outerHTML = '<span id="' + module + '" class="' + module + '">' + moduleHeader.outerHTML + '</span>';
-        }
-    });
-    Paginator(indexEl);
-}
-// filter the index list based on search field input
-function filter(indexList) {
-    var results = null;
-    var target = search.value.trim();
-    var filtered = '';
-    if (target.length < 1) {
-        fillIndex(indexEl, fullLinks, modules);
-        return;
-    }
-    results = fuzzysort.go(target, bookmarks, {threshold: -15000, key:'text'});
-
-    results.forEach(function(result) {
-        filtered += '<a href="' + result.obj['url'] + '" class="' + result.obj['app'] + '">' + fuzzysort.highlight(result) + '</a>';
-    });
-    fillIndex(indexList, filtered, modules);
-
-};
-// delay the rendering of the filtered results while user is typing
-function debounce(fn, wait, indexList) {
-    var timeout;
-    return function() {
-        clearTimeout(timeout);
-        timeout = setTimeout(function() {
-            fn.call(this, indexList);
-        }, (wait || 150));
-    };
-}
-
-// copy pycode and bascode to clipboard on mouse click
-// Show border when copy is done
-divcopyable(document.getElementsByClassName("bascode"));
-divcopyable(document.getElementsByClassName("pycode"));
-
-function divcopyable(itemcopyable){
-for (var i = 0, len = itemcopyable.length; i < len; i++) {
-    (function() {
-        var item = itemcopyable[i];
-
-        function changeBorder(item, color) {
-            var saveBorder  = item.style.border;
-            item.style.borderColor = color;
-
-            setTimeout(function() {
-                item.style.border = saveBorder;
-            }, 150);
-        }
-        item.onclick = function() {
-            document.execCommand("copy");
-            changeBorder(item, "#18A303");
-        };
-        item.addEventListener("copy", function(event) {
-            event.preventDefault();
-            if (event.clipboardData) {
-                event.clipboardData.setData("text/plain", item.textContent);
-            }
-        });
-    }());
-}
-}
-
-// copy useful content to clipboard on mouse click
-var copyable = document.getElementsByClassName("input");
-for (var i = 0, len = copyable.length; i < len; i++) {
-    (function() {
-        var item = copyable[i];
-
-        function changeColor(item, color, colorToChangeBackTo) {
-            item.style.backgroundColor = color;
-            setTimeout(function() {
-                item.style.backgroundColor = colorToChangeBackTo;
-            }, 150);
-        }
-        item.onclick = function() {
-            document.execCommand("copy");
-            changeColor(item, "#18A303", "transparent");
-        };
-        item.addEventListener("copy", function(event) {
-            event.preventDefault();
-            if (event.clipboardData) {
-                event.clipboardData.setData("text/plain", item.textContent);
-            }
-        });
-    }());
-}
-// auto-expand contents per subitem
-var pathname = window.location.pathname;
-var pathRegex = /text\/.*\.html$/;
-var linkIndex = 0;
-var contentMatch = pathname.match(pathRegex);
-function linksMatch(content) {
-    var linkMatch = new RegExp(content);
-    var links = document.getElementById("Contents").getElementsByTagName("a");
-    for (var i = 0, len = links.length; i < len; i++) {
-        if (links[i].href.match(linkMatch)) {
-            return i;
-        }
-    }
-}
-linkIndex = linksMatch(contentMatch);
-if (typeof linkIndex !== "undefined") {
-    var current = document.getElementById("Contents").getElementsByTagName("a")[linkIndex];
-    var cItem = current.parentElement;
-    var parents = [];
-    while (cItem.parentElement && !cItem.parentElement.matches("#Contents") && parents.indexOf(cItem.parentElement) == -1) {
-        parents.push(cItem = cItem.parentElement);
-    }
-    var liParents = [].filter.call(parents, function(item) {
-        return item.matches("li");
-    });
-    for (var i = 0, len = liParents.length; i < len; i++) {
-        var input = liParents[i].querySelectorAll(':scope > input');
-        document.getElementById(input[0].id).checked = true;
-    }
-    current.classList.add('contents-current');
-}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */

+ 0 - 266
file-online-preview/office-plugin/windows-office/help/help2.js

@@ -1,266 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-// Used to set Application in caseinline=APP
-function setApplSpan(spanZ) {
-    var module = getParameterByName("DbPAR");
-    if (module === null) {
-        module = "WRITER";
-    }
-    var y = spanZ.getElementsByTagName("SPAN");
-    var n = y.length;
-    var foundAppl = false;
-    for (i = 0; i < n; i++) {
-        if (y[i].getAttribute("id") === null){
-            continue;
-        }
-        else if( y[i].getAttribute("id").startsWith(module)){
-            y[i].removeAttribute("hidden");
-            foundAppl=true;
-        }
-    }
-    for (i = 0; i < n; i++) {
-        if (y[i].getAttribute("id") === null){
-            continue;
-        }
-        else if( y[i].getAttribute("id").startsWith("default")){
-            if(!foundAppl){
-                y[i].removeAttribute("hidden");
-            }
-        }
-    }
-}
-// Used to set system in case, caseinline=SYSTEM
-function setSystemSpan(spanZ) {
-    // if no System in URL, get browser system
-    var system = getParameterByName("System");
-    if (system === null) {
-        system = getSystem();
-    }
-    var y = spanZ.getElementsByTagName("SPAN");
-    var n = y.length;
-    var foundSystem = false;
-    for (i = 0; i < n; i++) {
-        if (y[i].getAttribute("id") === null){
-            continue;
-        }
-        else if( y[i].getAttribute("id").startsWith(system)){
-            y[i].removeAttribute("hidden");
-            foundSystem=true;
-        }
-    }
-    for (i = 0; i < n; i++) {
-        if (y[i].getAttribute("id") === null){
-            continue;
-        }
-        else if( y[i].getAttribute("id").startsWith("default")){
-            if(!foundSystem){
-                y[i].removeAttribute("hidden");
-            }
-        }
-    }
-}
-
-// paint headers and headings with appl color
-
-function moduleColor (module) {
-    switch (module){
-        case "WRITER" : {color="#0369A3"; break;}
-        case "CALC"   : {color="#43C330"; break;}
-        case "CHART"  : {color="darkcyan"; break;}
-        case "IMPRESS": {color="#A33E03"; break;}
-        case "DRAW"   : {color="#C99C00"; break;}
-        case "BASE"   : {color="#8E03A3"; break;}
-        case "BASIC"  : {color="black"; break;}
-        case "MATH"   : {color="darkslategray"; break;}
-        case "SHARED" : {color="gray"; break;}
-        default : {color="#18A303"; break;}
-    }
-    document.getElementById("TopLeftHeader").style.background = color;
-    document.getElementById("SearchFrame").style.background = color;
-    document.getElementById("DonationFrame").style.background = color;
-    var cols = document.getElementsByClassName('tableheadcell');
-    for(i = 0; i < cols.length; i++) {cols[i].style.backgroundColor = color;};
-    for (j of [1,2,3,4,5,6]) {
-        var hh = document.getElementsByTagName("H" + j);
-        for(i = 0; i < hh.length; i++) {
-            hh[i].style.color = color;
-            hh[i].style.borderBottomColor = color;
-        }
-    }
-}
-
-// Find spans that need the switch treatment and give it to them
-var spans = document.querySelectorAll("[class^=switch]");
-var n = spans.length;
-for (z = 0; z < n; z++) {
-    var id = spans[z].getAttribute("id");
-    if (id === null) {
-        continue;
-    }
-    else if (id.startsWith("swlnsys")) {
-        setSystemSpan(spans[z]);
-    } else {
-        setApplSpan(spans[z]);
-    }
-}
-/* add &DbPAR= and &System= to the links in DisplayArea div */
-/* skip for object files */
-function fixURL(module, system) {
-    if ((DisplayArea = document.getElementById("DisplayArea")) === null) return;
-    var itemlink = DisplayArea.getElementsByTagName("a");
-    var pSystem = (system === null) ? getSystem() : system;
-    var pAppl = (module === null) ? "WRITER" : module;
-    var n = itemlink.length;
-    for (var i = 0; i < n; i++) {
-        if (itemlink[i].getAttribute("class") != "objectfiles") {
-            setURLParam(itemlink[i], pSystem, pAppl);
-        }
-    }
-}
-//Set the params inside URL
-function setURLParam(itemlink, pSystem, pAppl) {
-    var href = itemlink.getAttribute("href");
-    if (href !== null) {
-        // skip external links
-        if (!href.startsWith("http")) {
-            // handle bookmark.
-            if (href.lastIndexOf('#') != -1) {
-                var postf = href.substring(href.lastIndexOf('#'), href.length);
-                var pref = href.substring(0, href.lastIndexOf('#'));
-                itemlink.setAttribute("href", pref + "?" + '&DbPAR=' + pAppl + '&System=' + pSystem + postf);
-            } else {
-                itemlink.setAttribute("href", href + "?" + '&DbPAR=' + pAppl + '&System=' + pSystem);
-            }
-        }
-    }
-}
-
-function getSystem() {
-    var system = "Unknown OS";
-    if (navigator.appVersion.indexOf("Win") != -1) system = "WIN";
-    if (navigator.appVersion.indexOf("Mac") != -1) system = "MAC";
-    if (navigator.appVersion.indexOf("X11") != -1) system = "UNIX";
-    if (navigator.appVersion.indexOf("Linux") != -1) system = "UNIX";
-    return system;
-}
-
-function getParameterByName(name, url) {
-    if (!url) {
-        url = window.location.href;
-    }
-    name = name.replace(/[\[\]]/g, "\\$&");
-    var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)");
-    var results = regex.exec(url);
-    if (!results) {
-        return null;
-    }
-    if (!results[2]) {
-        return '';
-    }
-    return decodeURIComponent(results[2].replace(/\+/g, " "));
-}
-
-function existingLang(lang) {
-    if (lang === undefined) {
-        return 'en-US';
-    }
-
-    if (languagesSet.has(lang)) {
-        return lang;
-    }
-
-    lang = lang.replace(/[-_].*/, '');
-    if (languagesSet.has(lang)) {
-        return lang;
-    }
-
-    return 'en-US';
-}
-
-function setupModules(lang) {
-    var modulesNav = document.getElementById('modules-nav');
-    if (!modulesNav.classList.contains('loaded')) {
-        var html =
-            '<a href="' + lang + '/text/swriter/main0000.html?DbPAR=WRITER"><div class="writer-icon"></div>Writer</a>' +
-            '<a href="' + lang + '/text/scalc/main0000.html?DbPAR=CALC"><div class="calc-icon"></div>Calc</a>' +
-            '<a href="' + lang + '/text/simpress/main0000.html?DbPAR=IMPRESS"><div class="impress-icon"></div>Impress</a>' +
-            '<a href="' + lang + '/text/sdraw/main0000.html?DbPAR=DRAW"><div class="draw-icon"></div>Draw</a>' +
-            '<a href="' + lang + '/text/sdatabase/main.html?DbPAR=BASE"><div class="base-icon"></div>Base</a>' +
-            '<a href="' + lang + '/text/smath/main0000.html?DbPAR=MATH"><div class="math-icon"></div>Math</a>' +
-            '<a href="' + lang + '/text/schart/main0000.html?DbPAR=CHART"><div class="chart-icon"></div>Chart</a>' +
-            '<a href="' + lang + '/text/sbasic/shared/main0601.html?DbPAR=BASIC"><div class="basic-icon"></div>Basic</a>';
-        modulesNav.innerHTML = html;
-        modulesNav.classList.add('loaded');
-    }
-}
-
-function setupLanguages(page) {
-    var langNav = document.getElementById('langs-nav');
-    if (!langNav.classList.contains('loaded')) {
-        var html = '';
-        languagesSet.forEach(function(lang) {
-            html += '<a href="' + lang + page + '">' + ((lang in languageNames)? languageNames[lang]: lang) + '</a>';
-        });
-        langNav.innerHTML = html;
-        langNav.classList.add('loaded');
-    }
-}
-
-// Test, if we are online
-if (document.body.getElementsByTagName('meta')) {
-    var _paq = _paq || [];
-    /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
-    _paq.push(['disableCookies']);
-    _paq.push(['trackPageView']);
-    _paq.push(['enableLinkTracking']);
-    (function() {
-    var u="//piwik.documentfoundation.org/";
-    _paq.push(['setTrackerUrl', u+'piwik.php']);
-    _paq.push(['setSiteId', '68']);
-    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
-    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
-    })();
-    var system = getParameterByName("System");
-} else {
-    var system = getSystem();
-}
-
-var module = getParameterByName("DbPAR");
-fixURL(module,system);
-moduleColor(module);
-var helpID = getParameterByName("HID");
-// only used in xhp pages with <help-id-missing/> tags
-var missingElement = document.getElementById("bm_HID2");
-if(missingElement != null){missingElement.innerHTML = helpID;}
-
-function debugInfo(dbg) {
-    if (dbg == null) return;
-    document.getElementById("DEBUG").style.display = "block";
-    document.getElementById("bm_module").innerHTML = "Module is: "+module;
-    document.getElementById("bm_system").innerHTML = "System is: "+system;
-    document.getElementById("bm_HID").innerHTML = "HID is: "+helpID;
-}
-
-debugInfo(getParameterByName("Debug"));
-
-// Mobile devices need the modules and langs on page load
-if (Math.max(document.documentElement.clientWidth, window.innerWidth || 0) < 960) {
-    var e = new Event('click');
-    var modulesBtn = document.getElementById('modules');
-    var langsBtn = document.getElementById('langs');
-    var modules = document.getElementById('modules-nav');
-    var langs = document.getElementById('langs-nav');
-    modules.setAttribute('data-a11y-toggle-open', '');
-    modulesBtn.dispatchEvent(e);
-    if (langs) {
-        langs.setAttribute('data-a11y-toggle-open', '');
-        langsBtn.dispatchEvent(e);
-    }
-}
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */

ファイルの差分が大きいため隠しています
+ 0 - 8433
file-online-preview/office-plugin/windows-office/help/hid2file.js


+ 0 - 51
file-online-preview/office-plugin/windows-office/help/idxcaption.xsl

@@ -1,51 +0,0 @@
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<xsl:stylesheet version="1.0" encoding="UTF-8"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:office="http://openoffice.org/2000/office"
-    xmlns:style="http://openoffice.org/2000/style"
-    xmlns:table="http://openoffice.org/2000/table"
-    xmlns:draw="http://openoffice.org/2000/drawing"
-    xmlns:fo="http://www.w3.org/1999/XSL/Format"
-    xmlns:xlink="http://www.w3.org/1999/xlink"
-    xmlns:dc="http://purl.org/dc/elements/1.1/"
-    xmlns:meta="http://openoffice.org/2000/meta"
-    xmlns:number="http://openoffice.org/2000/datastyle"
-    xmlns:svg="http://www.w3.org/2000/svg"
-    xmlns:chart="http://openoffice.org/2000/chart"
-    xmlns:help="http://openoffice.org/2000/help"
-    xmlns:index="http://sun.com/2000/XMLSearch"
-    xmlns:text="http://openoffice.org/2000/text">
-
-<xsl:param name="Language" select="'en-US'"/>
-<xsl:output method="text" encoding="UTF-8"/>
-
-<xsl:template match="/">
-    <xsl:apply-templates select="//title" mode="include"/>
-    <xsl:apply-templates select="//paragraph[@role='heading']" mode="include"/>
-</xsl:template>
-
-<xsl:template match="*" mode="include">
-    <xsl:value-of select="."/>
-    <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="*"/>
-
-</xsl:stylesheet>
-

+ 0 - 131
file-online-preview/office-plugin/windows-office/help/idxcontent.xsl

@@ -1,131 +0,0 @@
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<xsl:stylesheet version="1.0" encoding="UTF-8"
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:office="http://openoffice.org/2000/office"
-    xmlns:style="http://openoffice.org/2000/style"
-    xmlns:table="http://openoffice.org/2000/table"
-    xmlns:draw="http://openoffice.org/2000/drawing"
-    xmlns:fo="http://www.w3.org/1999/XSL/Format"
-    xmlns:xlink="http://www.w3.org/1999/xlink"
-    xmlns:dc="http://purl.org/dc/elements/1.1/"
-    xmlns:meta="http://openoffice.org/2000/meta"
-    xmlns:number="http://openoffice.org/2000/datastyle"
-    xmlns:svg="http://www.w3.org/2000/svg"
-    xmlns:chart="http://openoffice.org/2000/chart"
-    xmlns:help="http://openoffice.org/2000/help"
-    xmlns:index="http://sun.com/2000/XMLSearch"
-    xmlns:text="http://openoffice.org/2000/text">
-
-<xsl:param name="Language" select="'en-US'"/>
-<xsl:output method="text" encoding="UTF-8"/>
-
-<xsl:template match="helpdocument|body">
-  <xsl:choose>
-    <xsl:when test="meta/topic[@indexer='exclude']"/>
-    <xsl:otherwise>
-      <xsl:apply-templates/>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-
-<xsl:template match="title">
-  <xsl:value-of select="."/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="table">
-  <xsl:apply-templates/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="tablecell">
-  <xsl:apply-templates/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="tablerow">
-  <xsl:apply-templates/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="list">
-  <xsl:apply-templates/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="listitem">
-  <xsl:apply-templates/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="item">
-  <xsl:apply-templates/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="emph">
-  <xsl:apply-templates/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="sub">
-  <xsl:apply-templates/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="sup">
-  <xsl:apply-templates/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="paragraph">
-  <xsl:value-of select="."/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="section">
-  <xsl:apply-templates/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="bookmark">
-  <xsl:apply-templates/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="bookmark_value">
-  <xsl:apply-templates/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="link">
-  <xsl:apply-templates/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="ahelp[@visibility='visible']">
-  <xsl:value-of select="."/>
-  <xsl:text>&#xA;</xsl:text>
-</xsl:template>
-
-<xsl:template match="*"/>
-
-</xsl:stylesheet>
-
-

+ 0 - 74
file-online-preview/office-plugin/windows-office/help/index.html

@@ -1,74 +0,0 @@
-<!DOCTYPE html>
-<!--
-* This file is part of the LibreOffice project.
-*
-* This Source Code Form is subject to the terms of the Mozilla Public
-* License, v. 2.0. If a copy of the MPL was not distributed with this
-* file, You can obtain one at http://mozilla.org/MPL/2.0/.
--->
-<html>
-<head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-    <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval' piwik.documentfoundation.org"/>
-    <script type="text/javascript" src="polyfills.js"></script>
-    <script type="text/javascript" src="hid2file.js"></script>
-    <script type="text/javascript" src="languages.js"></script>
-    <script type="text/javascript" src="help2.js" defer></script>
-</head>
-<body>
-<script type="text/javascript">
-    // We have to wait until both the deferred help2.js and the document have loaded
-    window.addEventListener('DOMContentLoaded', function() {
-        var url = window.location.href;
-        var n = url.indexOf('index.html?');
-        if (n != -1) {
-            // the URL came from LibreOffice help (F1)
-            var target = getParameterByName("Target",url);
-            var lang = existingLang(getParameterByName("Language", url));
-            var system = getParameterByName("System", url);
-            var module;
-            var defaultFile;
-            var smodule = target.substr(0, target.indexOf('/'));
-            switch (smodule) {
-                case "swriter":   {defaultFile='text/swriter/main0000.html';module="WRITER";break;}
-                case "scalc":     {defaultFile='text/scalc/main0000.html';module="CALC";break;}
-                case "schart":    {defaultFile='text/schart/main0000.html';module="CHART";break;}
-                case "simpress":  {defaultFile='text/simpress/main0000.html';module="IMPRESS";break;}
-                case "sdraw":     {defaultFile='text/sdraw/main0000.html';module="DRAW";break;}
-                case "smath":     {defaultFile='text/smath/main0000.html';module="MATH";break;}
-                case "sdatabase": {defaultFile='text/sdatabase/main.html';module="BASE";break;}
-                case "sbasic":    {defaultFile='text/sbasic/shared/main0601.html';module="BASIC";break;}
-                default:          {defaultFile='text/shared/05/new_help.html';module="WRITER";break;}
-            }
-            //Special case of application F1 or menu  Help -> LibreOffice Help
-            if (target.indexOf('.uno:HelpIndex') != -1) {
-                window.location.replace(lang + '/' + defaultFile + '?System=' + system + '&DbPAR=' + module);
-            }
-            var bookmark = target.slice(target.indexOf('/') + 1, target.length);
-            var file = hid2fileMap[bookmark];
-            // check first if a root bookmark @@nowidget@@ can be used
-            if (file === undefined) {
-                var b2 = bookmark.substring(0, bookmark.lastIndexOf("/")) + '/@@nowidget@@';
-                file = hid2fileMap[b2];
-            }
-            // rebuild URL
-            if (file === undefined) {
-                var newURL = lang + '/text/shared/05/err_html.html?System=' + system + '&DbPAR=' + module + '&HID=' + bookmark ;
-            } else {
-                var indx = file.indexOf('#');
-                var bm = file.substr(indx,file.length);
-                file = file.substr(0,indx);
-                var newURL = lang + '/' + file + '?System=' + system + '&DbPAR=' + module + '&HID=' + bookmark + bm;
-            }
-            window.location.replace(newURL);
-        } else {
-            // URL came from elsewhere, direct access to webroot, we redirect to main Help page
-            var system = 'WIN';
-            if (navigator.userAgent.indexOf("Mac") != -1) system = 'MAC';
-            if (navigator.userAgent.indexOf("Linux") != -1) system = 'UNIX';
-            window.location.replace(existingLang(navigator.language) + '/text/shared/05/new_help.html?&DbPAR=WRITER&System=' + system);
-        }
-    });
-</script>
-</body>
-</html>

+ 0 - 1
file-online-preview/office-plugin/windows-office/help/languages.js

@@ -1 +0,0 @@
-var languagesSet = new Set(['en-US', 'am', 'ar', 'ast', 'bg', 'bn', 'bn-IN', 'bo', 'bs', 'ca', 'ca-valencia', 'cs', 'da', 'de', 'dz', 'el', 'en-GB', 'en-ZA', 'eo', 'es', 'et', 'eu', 'fi', 'fr', 'gl', 'gu', 'he', 'hi', 'hr', 'hu', 'id', 'is', 'it', 'ja', 'ka', 'km', 'ko', 'lo', 'lt', 'lv', 'mk', 'nb', 'ne', 'nl', 'nn', 'om', 'pl', 'pt', 'pt-BR', 'ro', 'ru', 'si', 'sid', 'sk', 'sl', 'sq', 'sv', 'ta', 'tg', 'tr', 'ug', 'uk', 'vi', 'zh-CN', 'zh-TW']);

+ 0 - 933
file-online-preview/office-plugin/windows-office/help/main_transform.xsl

@@ -1,933 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--***********************************************************************
-  This is the main transformation style sheet for transforming.
-  For use with LibreOffice 4.0+
-  =========================================================================
-  Changes Log
-    May 24 2004 Created
-    Aug 24 2004 Fixed for help2 CWS
-    Aug 27 2004 Added css link, fixed missing embed-mode for variable
-                Removed width/height for images
-    Sep 03 2004 Modularized xsl, added some embedded modes
-    Oct 08 2004 Fixed bug wrong mode "embedded" for links
-                Added embedded modes for embed and embedvar (for cascaded embeds)
-                Added <p> tags around falsely embedded pars and vars
-    Dec 08 2004 #i38483#, fixed wrong handling of web links
-                #i37377#, fixed missing usage of Database parameter for switching
-    Jan 04 2005 #i38905#, fixed buggy branding replacement template
-    Mar 17 2005 #i43972#, added language info to image URL, evaluate Language parameter
-                evaluate new localize attribute in images
-    May 10 2005 #i48785#, fixed wrong setting of distrib variable
-    Aug 16 2005 workaround for #i53365#
-    Aug 19 2005 fixed missing list processing in embedded sections
-    Aug 19 2005 #i53535#, fixed wrong handling of Database parameter
-    Oct 17 2006 #i70462#, disabled sorting to avoid output of error messages to console
-    Jun 15 2009 #i101799#, fixed wrong handling of http URLs with anchors
-***********************************************************************//-->
-
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
-<xsl:output indent="yes" method="html"/>
-
-<!--
-############################
-# Variables and Parameters #
-############################
-//-->
-
-<!-- General Usage -->
-<xsl:variable name="am" select="'&amp;'"/>
-<xsl:variable name="sl" select="'/'"/>
-<xsl:variable name="qt" select="'&quot;'"/>
-
-<!-- generic Icon alt text -->
-<xsl:variable name="alttext" select="'text/shared/00/icon_alt.xhp'"/>
-
-<!-- For calculating pixel sizes -->
-<xsl:variable name="dpi" select="'96'"/>
-<xsl:variable name="dpcm" select="'38'"/>
-
-<!-- Product brand variables used in the help files -->
-<xsl:variable name="brand1" select="'$[officename]'"/>
-<xsl:variable name="brand2" select="'$[officeversion]'"/>
-<xsl:variable name="brand3" select="'%PRODUCTNAME'"/>
-<xsl:variable name="brand4" select="'%PRODUCTVERSION'"/>
-
-<!-- meta data variables from the help file -->
-<xsl:variable name="filename" select="/helpdocument/meta/topic/filename"/>
-<xsl:variable name="title" select="/helpdocument/meta/topic/title"/>
-
-<!-- Module and the corresponding switching values-->
-<xsl:param name="Database" select="'swriter'"/>
-<xsl:variable name="module" select="$Database"/>
-<xsl:variable name="appl">
-    <xsl:choose>
-        <xsl:when test="$module = 'swriter'"><xsl:value-of select="'WRITER'"/></xsl:when>
-        <xsl:when test="$module = 'scalc'"><xsl:value-of select="'CALC'"/></xsl:when>
-        <xsl:when test="$module = 'sdraw'"><xsl:value-of select="'DRAW'"/></xsl:when>
-        <xsl:when test="$module = 'simpress'"><xsl:value-of select="'IMPRESS'"/></xsl:when>
-        <xsl:when test="$module = 'schart'"><xsl:value-of select="'CHART'"/></xsl:when>
-        <xsl:when test="$module = 'sbasic'"><xsl:value-of select="'BASIC'"/></xsl:when>
-        <xsl:when test="$module = 'smath'"><xsl:value-of select="'MATH'"/></xsl:when>
-    </xsl:choose>
-</xsl:variable>
-
-  <!-- the other parameters given by the help caller -->
-<xsl:param name="System" select="'WIN'"/>
-<xsl:param name="productname" select="'Office'"/>
-<xsl:param name="productversion" select="''"/>
-<xsl:variable name="pversion">
-    <xsl:value-of select="translate($productversion,' ','')"/>
-</xsl:variable>
-<!-- this is were the images are -->
-<xsl:param name="imgtheme" select="''"/>
-<xsl:param name="Id" />
-<xsl:param name="Language" select="'en-US'"/>
-<xsl:variable name="lang" select="$Language"/>
-
-<xsl:param name="ExtensionId" select="''"/>
-<xsl:param name="ExtensionPath" select="''"/>
-
-
-  <!-- parts of help and image urls -->
-<xsl:variable name="help_url_prefix" select="'vnd.sun.star.help://'"/>
-<xsl:variable name="img_url_prefix" select="concat('vnd.libreoffice.image://',$imgtheme,'/')"/>
-<xsl:variable name="img_url_internal" select="'vnd.libreoffice.image://helpimg/'"/>
-<xsl:variable name="urlpost" select="concat('?Language=',$lang,$am,'System=',$System,$am,'UseDB=no')"/>
-<xsl:variable name="urlpre" select="$help_url_prefix" />
-<xsl:variable name="linkprefix" select="$urlpre"/>
-<xsl:variable name="linkpostfix" select="$urlpost"/>
-
-<xsl:variable name="css" select="'default.css'"/>
-
-<!-- images for notes, tips and warnings -->
-<xsl:variable name="note_img" select="concat($img_url_internal,'media/helpimg/note.png')"/>
-<xsl:variable name="tip_img" select="concat($img_url_internal,'media/helpimg/tip.png')"/>
-<xsl:variable name="warning_img" select="concat($img_url_internal,'media/helpimg/warning.png')"/>
-
-<!--
-#############
-# Templates #
-#############
-//-->
-
-<!-- Create the document skeleton -->
-<xsl:template match="/">
-    <xsl:variable name="csslink" select="concat($urlpre,'/',$urlpost)"/>
-    <html>
-        <head>
-            <title><xsl:value-of select="$title"/></title>
-            <link href="{$csslink}" rel="Stylesheet" type="text/css" /> <!-- stylesheet link -->
-        <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
-        </head>
-        <body lang="{$lang}">
-            <xsl:apply-templates select="/helpdocument/body"/>
-        </body>
-    </html>
-</xsl:template>
-
-<!-- AHELP -->
-<xsl:template match="ahelp">
-    <xsl:if test="not(@visibility='hidden')"><span class="avis"><xsl:apply-templates /></span></xsl:if>
-</xsl:template>
-
-<!-- ALT -->
-<xsl:template match="alt"/>
-
-<!-- BOOKMARK -->
-<xsl:template match="bookmark">
-    <a name="{@id}"></a>
-    <xsl:choose>
-        <xsl:when test="starts-with(@branch,'hid')" />
-        <xsl:otherwise><xsl:apply-templates /></xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-<xsl:template match="bookmark" mode="embedded" />
-
-<!-- BOOKMARK_VALUE -->
-<xsl:template match="bookmark_value" />
-
-<!-- BR -->
-<xsl:template match="br"><br /></xsl:template>
-
-<!-- CAPTION -->
-<xsl:template match="caption" />
-
-<!-- CASE -->
-<xsl:template match="case"><xsl:call-template name="insertcase" /></xsl:template>
-<xsl:template match="case" mode="embedded">
-    <xsl:call-template name="insertcase">
-        <xsl:with-param name="embedded" select="'yes'"/>
-    </xsl:call-template>
-</xsl:template>
-
-<!-- CASEINLINE -->
-<xsl:template match="caseinline"><xsl:call-template name="insertcase" /></xsl:template>
-<xsl:template match="caseinline" mode="embedded">
-    <xsl:call-template name="insertcase">
-        <xsl:with-param name="embedded" select="'yes'"/>
-    </xsl:call-template>
-</xsl:template>
-
-<!-- COMMENT -->
-<xsl:template match="comment" />
-<xsl:template match="comment" mode="embedded"/>
-
-<!-- CREATED -->
-<xsl:template match="created" />
-
-<!-- DEFAULT -->
-<xsl:template match="default"><xsl:call-template name="insertdefault" /></xsl:template>
-<xsl:template match="default" mode="embedded">
-    <xsl:call-template name="insertdefault">
-        <xsl:with-param name="embedded" select="'yes'"/>
-    </xsl:call-template>
-</xsl:template>
-
-<!-- DEFAULTINLINE -->
-<xsl:template match="defaultinline"><xsl:call-template name="insertdefault" /></xsl:template>
-<xsl:template match="defaultinline" mode="embedded">
-    <xsl:call-template name="insertdefault">
-        <xsl:with-param name="embedded" select="'yes'"/>
-    </xsl:call-template>
-</xsl:template>
-
-<!-- EMBED -->
-<xsl:template match="embed"><xsl:call-template name="resolveembed"/></xsl:template>
-<xsl:template match="embed" mode="embedded"><xsl:call-template name="resolveembed"/></xsl:template>
-
-<!-- EMBEDVAR -->
-<xsl:template match="embedvar"><xsl:call-template name="resolveembedvar"/></xsl:template>
-<xsl:template match="embedvar" mode="embedded"><xsl:call-template name="resolveembedvar"/></xsl:template>
-
-<!-- EMPH -->
-<xsl:template match="emph">
-    <span class="emph"><xsl:apply-templates /></span>
-</xsl:template>
-<xsl:template match="emph" mode="embedded">
-    <span class="emph"><xsl:apply-templates /></span>
-</xsl:template>
-
-<!-- SUB -->
-<xsl:template match="sub">
-    <sub><xsl:apply-templates /></sub>
-</xsl:template>
-<xsl:template match="sub" mode="embedded">
-    <sub><xsl:apply-templates /></sub>
-</xsl:template>
-
-<!-- SUP -->
-<xsl:template match="sup">
-    <sup><xsl:apply-templates /></sup>
-</xsl:template>
-<xsl:template match="sup" mode="embedded">
-    <sup><xsl:apply-templates /></sup>
-</xsl:template>
-
-<!-- FILENAME -->
-<xsl:template match="filename" />
-
-<!-- HISTORY -->
-<xsl:template match="history" />
-
-<!-- IMAGE -->
-<xsl:template match="image"><xsl:call-template name="insertimage"/></xsl:template>
-<xsl:template match="image" mode="embedded"><xsl:call-template name="insertimage"/></xsl:template>
-
-<!-- ITEM -->
-<xsl:template match="item"><span class="{@type}"><xsl:apply-templates /></span></xsl:template>
-<xsl:template match="item" mode="embedded"><span class="{@type}"><xsl:apply-templates /></span></xsl:template>
-
-<!-- LINK -->
-<xsl:template match="link">
-    <xsl:choose> <!-- don't insert the heading link to itself -->
-        <xsl:when test="(concat('/',@href) = /helpdocument/meta/topic/filename) or (@href = /helpdocument/meta/topic/filename)">
-            <xsl:apply-templates />
-        </xsl:when>
-        <xsl:when test="contains(child::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
-            <xsl:call-template name="insert_howtoget">
-                <xsl:with-param name="linkhref" select="@href"/>
-            </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-            <xsl:call-template name="createlink" />
-        </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-<xsl:template match="link" mode="embedded">
-    <xsl:call-template name="createlink"/>
-</xsl:template>
-
-<!-- LIST -->
-<xsl:template match="list">
-    <xsl:choose>
-        <xsl:when test="@type='ordered'">
-            <ol>
-                <xsl:if test="@startwith">
-                    <xsl:attribute name="start"><xsl:value-of select="@startwith"/></xsl:attribute>
-                </xsl:if>
-                <xsl:apply-templates />
-            </ol>
-        </xsl:when>
-        <xsl:otherwise>
-            <ul><xsl:apply-templates /></ul>
-        </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<xsl:template match="list" mode="embedded">
-    <xsl:choose>
-        <xsl:when test="@type='ordered'">
-            <ol>
-                <xsl:if test="@startwith">
-                    <xsl:attribute name="start"><xsl:value-of select="@startwith"/></xsl:attribute>
-                </xsl:if>
-                <xsl:apply-templates mode="embedded"/>
-            </ol>
-        </xsl:when>
-        <xsl:otherwise>
-            <ul><xsl:apply-templates mode="embedded"/></ul>
-        </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<!-- LISTITEM -->
-<xsl:template match="listitem">
-    <li><xsl:apply-templates /></li>
-</xsl:template>
-
-<xsl:template match="listitem" mode="embedded">
-    <li><xsl:apply-templates mode="embedded"/></li>
-</xsl:template>
-
-<!-- META, SEE HEADER -->
-<xsl:template match="meta" />
-
-<!-- OBJECT (UNUSED) -->
-<xsl:template match="object" />
-
-<!-- PARAGRAPH -->
-<xsl:template match="paragraph">
-    <xsl:choose>
-
-        <xsl:when test="@role='heading'">
-            <xsl:call-template name="insertheading">
-                <xsl:with-param name="level" select="@level"/>
-            </xsl:call-template>
-        </xsl:when>
-
-        <xsl:when test="contains(' note warning tip ',@role)">
-            <xsl:call-template name="insertnote">
-                <xsl:with-param name="type" select="@role" />
-            </xsl:call-template>
-        </xsl:when>
-
-        <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
-            <xsl:apply-templates />
-        </xsl:when>
-
-        <xsl:when test="@role='bascode'">
-            <xsl:call-template name="insertbascode" />
-        </xsl:when>
-
-        <xsl:when test="@role='logocode'">
-            <xsl:call-template name="insertlogocode" />
-        </xsl:when>
-
-        <xsl:otherwise>
-            <xsl:call-template name="insertpara" />
-        </xsl:otherwise>
-
-    </xsl:choose>
-</xsl:template>
-
-<xsl:template match="paragraph" mode="embedded">
-        <xsl:choose>
-
-        <xsl:when test="@role='heading'">   <!-- increase the level of headings that are embedded -->
-        <!--
-           The internal sablotron processor does not seem to support the number function.
-             Therefore, we need a workaround for
-             <xsl:variable name="level"><xsl:value-of select="number(@level)+1"/></xsl:variable>
-        -->
-            <xsl:variable name="newlevel">
-                <xsl:choose>
-                    <xsl:when test="@level='1'"><xsl:value-of select="'2'"/></xsl:when>
-                    <xsl:when test="@level='2'"><xsl:value-of select="'2'"/></xsl:when>
-                    <xsl:when test="@level='3'"><xsl:value-of select="'3'"/></xsl:when>
-                    <xsl:when test="@level='4'"><xsl:value-of select="'4'"/></xsl:when>
-                    <xsl:when test="@level='5'"><xsl:value-of select="'5'"/></xsl:when>
-                </xsl:choose>
-            </xsl:variable>
-
-            <xsl:call-template name="insertheading">
-                <xsl:with-param name="level" select="$newlevel"/>
-                <xsl:with-param name="embedded" select="'yes'"/>
-            </xsl:call-template>
-        </xsl:when>
-
-        <xsl:when test="contains(' note warning tip ',@role)">
-            <xsl:call-template name="insertnote">
-                <xsl:with-param name="type" select="@role" />
-            </xsl:call-template>
-        </xsl:when>
-
-        <xsl:when test="contains(descendant::embedvar/@href,'/00/00000004.xhp#wie')"> <!-- special treatment of howtoget links -->
-            <xsl:apply-templates />
-        </xsl:when>
-
-        <xsl:otherwise>
-            <xsl:call-template name="insertpara" />
-        </xsl:otherwise>
-
-    </xsl:choose>
-</xsl:template>
-
-
-<!-- SECTION -->
-<xsl:template match="section">
-    <a name="{@id}"></a>
-
-        <xsl:choose>
-
-            <xsl:when test="@id='relatedtopics'">
-                <div class="relatedtopics">
-                    <xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable>
-                    <xsl:variable name="anchor"><xsl:value-of select="'related'"/></xsl:variable>
-                    <xsl:variable name="doc" select="document($href)"/>
-                    <p class="related">
-                        <xsl:apply-templates select="$doc//variable[@id=$anchor]"/>
-                    </p>
-                    <div class="relatedbody">
-                        <xsl:apply-templates />
-                    </div>
-                </div>
-            </xsl:when>
-
-            <xsl:when test="@id='howtoget'">
-                <xsl:call-template name="insert_howtoget" />
-            </xsl:when>
-
-            <xsl:otherwise>
-                        <xsl:apply-templates/>
-            </xsl:otherwise>
-
-        </xsl:choose>
-
-</xsl:template>
-
-
-<!-- SECTION -->
-<xsl:template match="section" mode="embedded">
-    <a name="{@id}"></a>
-    <xsl:apply-templates mode="embedded"/>
-</xsl:template>
-
-<!-- SORT -->
-<xsl:template match="sort" >
-    <xsl:apply-templates><xsl:sort select="descendant::paragraph"/></xsl:apply-templates>
-</xsl:template>
-<xsl:template match="sort" mode="embedded">
-    <xsl:apply-templates><xsl:sort select="descendant::paragraph"/></xsl:apply-templates>
-</xsl:template>
-
-<!-- SWITCH -->
-<xsl:template match="switch"><xsl:apply-templates /></xsl:template>
-<xsl:template match="switch" mode="embedded"><xsl:apply-templates /></xsl:template>
-
-<!-- SWITCHINLINE -->
-<xsl:template match="switchinline"><xsl:apply-templates /></xsl:template>
-<xsl:template match="switchinline" mode="embedded"><xsl:apply-templates mode="embedded"/></xsl:template>
-
-<!-- TABLE -->
-<xsl:template match="table"><xsl:call-template name="inserttable"/></xsl:template>
-<xsl:template match="table" mode="embedded"><xsl:call-template name="inserttable"/></xsl:template>
-
-<!-- TABLECELL -->
-<xsl:template match="tablecell"><td valign="top"><xsl:apply-templates /></td></xsl:template>
-<xsl:template match="tablecell" mode="icontable"><td valign="top"><xsl:apply-templates/></td></xsl:template>
-<xsl:template match="tablecell" mode="embedded"><td valign="top"><xsl:apply-templates mode="embedded"/></td></xsl:template>
-
-<!-- TABLEROW -->
-<xsl:template match="tablerow"><tr><xsl:apply-templates /></tr></xsl:template>
-<xsl:template match="tablerow" mode="icontable"><tr><xsl:apply-templates mode="icontable"/></tr></xsl:template>
-<xsl:template match="tablerow" mode="embedded"><tr><xsl:apply-templates mode="embedded"/></tr></xsl:template>
-
-<!-- TITLE -->
-<xsl:template match="title"/>
-
-<!-- TOPIC -->
-<xsl:template match="topic"/>
-
-<!-- VARIABLE -->
-<xsl:template match="variable"><a name="{@id}"></a><xsl:apply-templates /></xsl:template>
-<xsl:template match="variable" mode="embedded"><a name="{@id}"></a><xsl:apply-templates mode="embedded"/></xsl:template>
-
-<xsl:template match="text()">
-    <xsl:call-template name="brand">
-        <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
-    </xsl:call-template>
-</xsl:template>
-
-<xsl:template match="text()" mode="embedded">
-    <xsl:call-template name="brand">
-        <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
-    </xsl:call-template>
-</xsl:template>
-
-<!-- In case of missing help files -->
-<xsl:template match="help-id-missing"><xsl:value-of select="$Id"/></xsl:template>
-
-<!--
-###################
-# NAMED TEMPLATES #
-###################
-//-->
-
-<!-- Branding -->
-<xsl:template name="brand" >
-    <xsl:param name="string"/>
-
-    <xsl:choose>
-
-        <xsl:when test="contains($string,$brand1)">
-           <xsl:variable name="newstr">
-                <xsl:value-of select="substring-before($string,$brand1)"/>
-                <xsl:value-of select="$productname"/>
-                <xsl:value-of select="substring-after($string,$brand1)"/>
-           </xsl:variable>
-            <xsl:call-template name="brand">
-                <xsl:with-param name="string" select="$newstr"/>
-            </xsl:call-template>
-        </xsl:when>
-
-        <xsl:when test="contains($string,$brand2)">
-            <xsl:variable name="newstr">
-                <xsl:value-of select="substring-before($string,$brand2)"/>
-                <xsl:value-of select="$pversion"/>
-                <xsl:value-of select="substring-after($string,$brand2)"/>
-           </xsl:variable>
-            <xsl:call-template name="brand">
-                <xsl:with-param name="string" select="$newstr"/>
-            </xsl:call-template>
-        </xsl:when>
-
-        <xsl:when test="contains($string,$brand3)">
-            <xsl:variable name="newstr">
-                <xsl:value-of select="substring-before($string,$brand3)"/>
-                <xsl:value-of select="$productname"/>
-                <xsl:value-of select="substring-after($string,$brand3)"/>
-           </xsl:variable>
-            <xsl:call-template name="brand">
-                <xsl:with-param name="string" select="$newstr"/>
-            </xsl:call-template>
-        </xsl:when>
-
-        <xsl:when test="contains($string,$brand4)">
-                <xsl:variable name="newstr">
-                <xsl:value-of select="substring-before($string,$brand4)"/>
-                <xsl:value-of select="$pversion"/>
-                <xsl:value-of select="substring-after($string,$brand4)"/>
-           </xsl:variable>
-            <xsl:call-template name="brand">
-                <xsl:with-param name="string" select="$newstr"/>
-            </xsl:call-template>
-        </xsl:when>
-
-        <xsl:otherwise>
-            <xsl:value-of select="$string"/>
-        </xsl:otherwise>
-    </xsl:choose>
-
-</xsl:template>
-
-
-<!-- Insert Paragraph -->
-<xsl:template name="insertpara">
-    <xsl:variable name="role">
-        <xsl:choose>
-            <xsl:when test="ancestor::table">
-                <xsl:value-of select="concat(@role,'intable')"/>
-            </xsl:when>
-            <xsl:otherwise>
-                <xsl:value-of select="@role"/>
-            </xsl:otherwise>
-        </xsl:choose>
-    </xsl:variable>
-    <p class="{$role}"><xsl:apply-templates /></p>
-</xsl:template>
-
-<!-- Insert Basic code snippet  -->
-<xsl:template name="insertbascode">
-    <pre><xsl:apply-templates /></pre>
-</xsl:template>
-
-<!-- Insert Logo code snippet  -->
-<xsl:template name="insertlogocode">
-    <pre><xsl:apply-templates /></pre>
-</xsl:template>
-
-<!-- Insert "How to get Link" -->
-<xsl:template name="insert_howtoget">
-    <xsl:param name="linkhref" />
-    <xsl:variable name="archive" select="'shared'"/>
-    <xsl:variable name="tmp_href"><xsl:value-of select="concat($urlpre,'shared/text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable>
-    <xsl:variable name="tmp_doc" select="document($tmp_href)"/>
-    <table class="howtoget" width="100%" border="1" cellpadding="3" cellspacing="0">
-        <tr>
-            <td>
-                <p class="howtogetheader"><xsl:apply-templates select="$tmp_doc//variable[@id='wie']"/></p>
-                <div class="howtogetbody">
-                <xsl:choose>
-                    <xsl:when test="$linkhref = ''"> <!-- new style -->
-                        <xsl:apply-templates/>
-                    </xsl:when>
-                    <xsl:otherwise> <!-- old style -->
-                        <xsl:variable name="archive1"><xsl:value-of select="concat(substring-before(substring-after($linkhref,'text/'),'/'),'/')"/></xsl:variable>
-                        <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive1,substring-before($linkhref,'#'),$urlpost)"/></xsl:variable>
-                        <xsl:variable name="anc"><xsl:value-of select="substring-after($linkhref,'#')"/></xsl:variable>
-                        <xsl:variable name="docum" select="document($href)"/>
-
-                        <xsl:call-template name="insertembed">
-                            <xsl:with-param name="doc" select="$docum" />
-                            <xsl:with-param name="anchor" select="$anc" />
-                        </xsl:call-template>
-
-                    </xsl:otherwise>
-                </xsl:choose>
-                </div>
-            </td>
-        </tr>
-    </table>
-    <br/>
-</xsl:template>
-
-<!-- Create a link -->
-<xsl:template name="createlink">
-<xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
-<xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
-    <xsl:choose>
-        <xsl:when test="starts-with(@href,'http://') or starts-with(@href,'https://')">  <!-- web links -->
-            <a href="{@href}"><xsl:apply-templates /></a>
-        </xsl:when>
-        <xsl:when test="contains(@href,'#')">
-            <xsl:variable name="anchor"><xsl:value-of select="concat('#',substring-after(@href,'#'))"/></xsl:variable>
-            <xsl:variable name="href"><xsl:value-of select="concat($linkprefix,$archive,substring-before(@href,'#'),$linkpostfix,$dbpostfix,$anchor)"/></xsl:variable>
-            <a href="{$href}"><xsl:apply-templates /></a>
-        </xsl:when>
-        <xsl:otherwise>
-            <xsl:variable name="href"><xsl:value-of select="concat($linkprefix,$archive,@href,$linkpostfix,$dbpostfix)"/></xsl:variable>
-            <a href="{$href}"><xsl:apply-templates /></a>
-        </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<!-- Insert Note, Warning, or Tip -->
-<xsl:template name="insertnote">
-    <xsl:param name="type" /> <!-- note, tip, or warning -->
-    <xsl:variable name="imgsrc">
-        <xsl:choose>
-            <xsl:when test="$type='note'"><xsl:value-of select="$note_img"/></xsl:when>
-            <xsl:when test="$type='tip'"><xsl:value-of select="$tip_img"/></xsl:when>
-            <xsl:when test="$type='warning'"><xsl:value-of select="$warning_img"/></xsl:when>
-        </xsl:choose>
-    </xsl:variable>
-    <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="'shared'"/></xsl:call-template></xsl:variable>
-    <xsl:variable name="alt">
-        <xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/',$alttext,$urlpost,$dbpostfix)"/></xsl:variable>
-        <xsl:variable name="anchor"><xsl:value-of select="concat('alt_',$type)"/></xsl:variable>
-        <xsl:variable name="doc" select="document($href)"/>
-        <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
-    </xsl:variable>
-    <div class="{$type}">
-        <table border="0" class="{$type}" cellspacing="0" cellpadding="5">
-            <tr>
-                <td><img src="{$imgsrc}" alt="{$alt}" title="{$alt}"/></td>
-                <td><xsl:apply-templates /></td>
-            </tr>
-        </table>
-    </div>
-    <br/>
-</xsl:template>
-
-<!-- Insert a heading -->
-<xsl:template name="insertheading">
-    <xsl:param name="level" />
-    <xsl:param name="embedded" />
-    <xsl:text disable-output-escaping="yes">&lt;h</xsl:text><xsl:value-of select="$level"/><xsl:text disable-output-escaping="yes">&gt;</xsl:text>
-        <xsl:choose>
-            <xsl:when test="$embedded = 'yes'">
-                <xsl:apply-templates mode="embedded"/>
-            </xsl:when>
-            <xsl:otherwise>
-                <xsl:apply-templates />
-            </xsl:otherwise>
-        </xsl:choose>
-    <xsl:text disable-output-escaping="yes">&lt;/h</xsl:text><xsl:value-of select="$level"/><xsl:text disable-output-escaping="yes">&gt;</xsl:text>
-</xsl:template>
-
-<!-- Evaluate a case or caseinline switch -->
-<xsl:template name="insertcase">
-    <xsl:param name="embedded" />
-    <xsl:choose>
-        <xsl:when test="parent::switch[@select='sys'] or parent::switchinline[@select='sys']">
-            <xsl:if test="@select = $System">
-                <xsl:choose>
-                    <xsl:when test="$embedded = 'yes'">
-                        <xsl:apply-templates mode="embedded"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <xsl:apply-templates />
-                    </xsl:otherwise>
-                </xsl:choose>
-            </xsl:if>
-        </xsl:when>
-        <xsl:when test="parent::switch[@select='appl'] or parent::switchinline[@select='appl']">
-            <xsl:if test="@select = $appl">
-                <xsl:choose>
-                    <xsl:when test="$embedded = 'yes'">
-                        <xsl:apply-templates mode="embedded"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <xsl:apply-templates />
-                    </xsl:otherwise>
-                </xsl:choose>
-            </xsl:if>
-        </xsl:when>
-        <xsl:when test="parent::switch[@select='distrib'] or parent::switchinline[@select='distrib']">
-            <xsl:if test="@select = $distrib">
-                <xsl:choose>
-                    <xsl:when test="$embedded = 'yes'">
-                        <xsl:apply-templates mode="embedded"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <xsl:apply-templates />
-                    </xsl:otherwise>
-                </xsl:choose>
-            </xsl:if>
-        </xsl:when>
-    </xsl:choose>
-</xsl:template>
-
-<!-- Evaluate a default or defaultinline switch -->
-<xsl:template name="insertdefault">
-    <xsl:param name="embedded" />
-
-    <xsl:choose>
-        <xsl:when test="parent::switch[@select='sys'] or parent::switchinline[@select='sys']">
-            <xsl:if test="not(../child::case[@select=$System]) and not(../child::caseinline[@select=$System])">
-                <xsl:choose>
-                    <xsl:when test="$embedded = 'yes'">
-                        <xsl:apply-templates mode="embedded"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <xsl:apply-templates />
-                    </xsl:otherwise>
-                </xsl:choose>
-            </xsl:if>
-        </xsl:when>
-        <xsl:when test="parent::switch[@select='appl'] or parent::switchinline[@select='appl']">
-            <xsl:if test="not(../child::case[@select=$appl]) and not(../child::caseinline[@select=$appl])">
-                <xsl:choose>
-                    <xsl:when test="$embedded = 'yes'">
-                        <xsl:apply-templates mode="embedded"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <xsl:apply-templates />
-                    </xsl:otherwise>
-                </xsl:choose>
-            </xsl:if>
-        </xsl:when>
-        <xsl:when test="parent::switch[@select='distrib'] or parent::switchinline[@select='distrib']">
-            <xsl:if test="not(../child::case[@select=$distrib]) and not(../child::caseinline[@select=$distrib])">
-                <xsl:choose>
-                    <xsl:when test="$embedded = 'yes'">
-                        <xsl:apply-templates mode="embedded"/>
-                    </xsl:when>
-                    <xsl:otherwise>
-                        <xsl:apply-templates />
-                    </xsl:otherwise>
-                </xsl:choose>
-            </xsl:if>
-        </xsl:when>
-    </xsl:choose>
-</xsl:template>
-
-<!-- evaluate embeds -->
-<xsl:template name="insertembed">
-    <xsl:param name="doc" />
-    <xsl:param name="anchor" />
-    <!-- different embed targets (also falsely used embed instead embedvar) -->
-    <xsl:choose>
-        <xsl:when test="$doc//section[@id=$anchor]"> <!-- first test for a section of that name -->
-            <xsl:apply-templates select="$doc//section[@id=$anchor]" mode="embedded"/>
-        </xsl:when>
-        <xsl:when test="$doc//paragraph[@id=$anchor]"> <!-- then test for a para of that name -->
-            <p class="embedded">
-                <xsl:apply-templates select="$doc//paragraph[@id=$anchor]" mode="embedded"/>
-            </p>
-        </xsl:when>
-        <xsl:when test="$doc//variable[@id=$anchor]"> <!-- then test for a variable of that name -->
-            <p class="embedded">
-                <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
-            </p>
-        </xsl:when>
-        <xsl:otherwise> <!-- then give up -->
-            <p class="bug">D'oh! You found a bug (<xsl:value-of select="@href"/> not found).</p>
-        </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<!-- Insert an image -->
-<xsl:template name="insertimage">
-  <xsl:variable name="src">
-    <xsl:choose>
-      <xsl:when test="starts-with(@src,'media/')">
-        <xsl:value-of select="concat($img_url_internal,@src)"/>
-      </xsl:when>
-      <xsl:when test="not($ExtensionId='') and starts-with(@src,$ExtensionId)">
-        <xsl:value-of select="concat($ExtensionPath,'/',@src)"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:choose>
-          <xsl:when test="@localize='true'">
-            <xsl:value-of select="concat($img_url_prefix,@src,'?lang=',$lang)"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:value-of select="concat($img_url_prefix,@src)"/>
-          </xsl:otherwise>
-        </xsl:choose>
-      </xsl:otherwise>
-    </xsl:choose>
-  </xsl:variable>
-
-    <!--<xsl:variable name="src"><xsl:value-of select="concat($img_url_prefix,@src)"/></xsl:variable>-->
-    <xsl:variable name="alt"><xsl:value-of select="./alt"/></xsl:variable>
-    <xsl:variable name="width" select="''"/> <!-- Images don't all have the correct size -->
-    <xsl:variable name="height" select="''"/><!-- Image don't all have the correct size -->
-    <img src="{$src}" alt="{$alt}" title="{$alt}">
-        <xsl:if test="not($width='')"><xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute></xsl:if>
-        <xsl:if test="not($height='')"><xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute></xsl:if>
-    </img>
-</xsl:template>
-
-<!-- Insert a Table -->
-<xsl:template name="inserttable">
-    <xsl:variable name="imgsrc">    <!-- see if we are in an image table -->
-        <xsl:value-of select="tablerow/tablecell[1]/paragraph[1]/image/@src"/>
-    </xsl:variable>
-
-    <xsl:choose>
-
-        <xsl:when test="count(descendant::tablecell)=1">
-            <table border="0" class="onecell" cellpadding="0" cellspacing="0">
-                <xsl:apply-templates />
-         </table>
-        </xsl:when>
-
-        <xsl:when test="descendant::tablecell[1]/descendant::image">
-            <table border="0" class="icontable" cellpadding="5" cellspacing="0">
-                <xsl:apply-templates mode="icontable"/>
-         </table>
-        </xsl:when>
-
-        <xsl:when test="@class='wide'">
-            <table border="1" class="{@class}" cellpadding="0" cellspacing="0" width="100%" >
-                <xsl:apply-templates />
-         </table>
-        </xsl:when>
-
-        <xsl:when test="not(@class='')">
-            <table border="1" class="{@class}" cellpadding="0" cellspacing="0" >
-                <xsl:apply-templates />
-         </table>
-        </xsl:when>
-
-        <xsl:otherwise>
-            <table border="1" class="border" cellpadding="0" cellspacing="0" >
-                <xsl:apply-templates />
-         </table>
-        </xsl:otherwise>
-    </xsl:choose>
-
-    <br/>
-</xsl:template>
-
-<xsl:template name="resolveembed">
-    <div class="embedded">
-        <xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
-        <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
-        <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive,substring-before(@href,'#'),$urlpost,$dbpostfix)"/></xsl:variable>
-        <xsl:variable name="anc"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
-        <xsl:variable name="docum" select="document($href)"/>
-
-        <xsl:call-template name="insertembed">
-            <xsl:with-param name="doc" select="$docum" />
-            <xsl:with-param name="anchor" select="$anc" />
-        </xsl:call-template>
-
-    </div>
-</xsl:template>
-
-<xsl:template name="resolveembedvar">
-    <xsl:if test="not(@href='text/shared/00/00000004.xhp#wie')"> <!-- special treatment if howtoget links -->
-        <xsl:variable name="archive"><xsl:value-of select="concat(substring-before(substring-after(@href,'text/'),'/'),'/')"/></xsl:variable>
-        <xsl:variable name="dbpostfix"><xsl:call-template name="createDBpostfix"><xsl:with-param name="archive" select="$archive"/></xsl:call-template></xsl:variable>
-        <xsl:variable name="href"><xsl:value-of select="concat($urlpre,$archive,substring-before(@href,'#'),$urlpost,$dbpostfix)"/></xsl:variable>
-        <xsl:variable name="anchor"><xsl:value-of select="substring-after(@href,'#')"/></xsl:variable>
-        <xsl:variable name="doc" select="document($href)"/>
-        <xsl:choose>
-            <xsl:when test="$doc//variable[@id=$anchor]"> <!-- test for a variable of that name -->
-                <xsl:apply-templates select="$doc//variable[@id=$anchor]" mode="embedded"/>
-            </xsl:when>
-            <xsl:otherwise> <!-- or give up -->
-                <span class="bug">[<xsl:value-of select="@href"/> not found].</span>
-            </xsl:otherwise>
-        </xsl:choose>
-    </xsl:if>
-</xsl:template>
-
-<!-- Apply -->
-<xsl:template name="apply">
-    <xsl:param name="embedded" />
-    <xsl:choose>
-        <xsl:when test="$embedded = 'yes'">
-            <xsl:apply-templates mode="embedded"/>
-        </xsl:when>
-        <xsl:otherwise>
-            <xsl:apply-templates />
-        </xsl:otherwise>
-    </xsl:choose>
-</xsl:template>
-
-<xsl:template name="createDBpostfix">
-    <xsl:param name="archive"/>
-    <xsl:variable name="newDB">
-        <xsl:choose>
-            <xsl:when test="(substring($archive,1,6) = 'shared')"><xsl:value-of select="$Database"/></xsl:when>
-            <xsl:otherwise><xsl:value-of select="substring-before($archive,'/')"/></xsl:otherwise>
-        </xsl:choose>
-    </xsl:variable>
-    <xsl:value-of select="concat($am,'DbPAR=',$newDB)"/>
-</xsl:template>
-
-</xsl:stylesheet>

BIN
file-online-preview/office-plugin/windows-office/help/media/files/scalc/functions_ifs.ods


BIN
file-online-preview/office-plugin/windows-office/help/media/files/scalc/imtrigon.ods


BIN
file-online-preview/office-plugin/windows-office/help/media/files/scalc/pivot.ods


BIN
file-online-preview/office-plugin/windows-office/help/media/files/scalc/trigon.ods


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/area1.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/area2.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_1.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_2.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_3.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_4.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_5.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_6.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_7.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_8.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_9.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_gray.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_ca_white.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_1.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_2.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_3.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_4.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_5.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_6.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_7.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_8.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/border_wr_9.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/calcein.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/calcnav.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/copydata.png


BIN
file-online-preview/office-plugin/windows-office/help/media/helpimg/diatrans.png


+ 0 - 0
file-online-preview/office-plugin/windows-office/help/media/helpimg/dircurscent.png


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません