Compare commits

...

76 Commits

Author SHA1 Message Date
dependabot[bot]
35193c962f Bump xstream from 1.4.18 to 1.4.19 in /server
Bumps [xstream](https://github.com/x-stream/xstream) from 1.4.18 to 1.4.19.
- [Release notes](https://github.com/x-stream/xstream/releases)
- [Commits](https://github.com/x-stream/xstream/commits)

---
updated-dependencies:
- dependency-name: com.thoughtworks.xstream:xstream
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-01 01:06:03 +00:00
zhangzhen1979
6a2735ec3d tif图片预览。因无法下载jai_core包,所以去掉pom中geotoolkit仓库的设置 2021-12-20 17:31:18 +08:00
zhangzhen1979
8bc53f76eb tif图片预览。更新本地jai_core包的版本至1.1.3 2021-12-20 17:31:18 +08:00
zhangzhen1979
48f6a507dc tif图片预览。根据 @gaoxingzaq 反馈和帮助,修改tif文件的jpg、pdf模式预览功能,兼容多页tif的pdf转换、jpg转换,以及jpg在线多页预览功能。 2021-12-20 17:31:18 +08:00
BearBen
20f328906c 解压方案新版测试修复乱码Linux问题 2021-12-17 17:40:23 +08:00
gitchenjh
4d1e2eb9c6 Merge pull request #326 from gitchenjh/master
修复 #311
2021-12-17 17:38:58 +08:00
gitchenjh
97542b06fa Create maven.yml
add Github Action
2021-12-17 17:31:32 +08:00
陈精华
0c93c7e4b6 update README 2021-12-17 17:22:31 +08:00
陈精华
56d9906c74 修复ppt预览在改过context-path后出现异常 (#311) 2021-12-17 17:18:58 +08:00
gitchenjh
5cfe37433f Merge pull request #321 from gitchenjh/master
启动脚本版本更新为4.1.0-SNAPSHOT
2021-12-14 13:38:00 +08:00
陈精华
45ebef3b74 启动脚本版本更新为4.1.0-SNAPSHOT 2021-12-14 13:37:03 +08:00
gitchenjh
2ed294bd65 Merge pull request #317 from zzzhouuu/master
feat: 通过配置控制PDF.js viewer toolbar & secondaryToolbar功能按钮
2021-12-10 17:31:25 +08:00
zhangzhen1979
91f3348a2f * tif图片预览,根据反馈的意见,已经全部修改 2021-12-10 17:13:57 +08:00
zhangzhen1979
d424de5e9a * tif图片预览,根据反馈的意见,已经全部修改 2021-12-10 17:13:57 +08:00
zhangzhen1979
6387ac21c9 * tif图片预览,根据反馈的意见,已经全部修改
1、配置文件、配置项默认值已改回image、tif
2、去掉了静态工具类上的@component 注解
3、修改OnlinePreview处理,在切换image方式预览时url中加入参数previewType=image,加入对应的处理,兼容在pdf预览模式下切换到JPG方式预览
2021-12-10 17:13:57 +08:00
zhangzhen1979
6dce47e47f * tif图片预览,在application.properties中加入tif.preview.type = ${KK_TIF_PREVIEW_TYPE:tif},可以控制使用tif、jpg、pdf方式预览。
修改相应代码,加入必要的判断处理。
2021-12-10 17:13:57 +08:00
zhangzhen1979
b7760ab42a * tif图片预览,改为支持转换为jpg后预览(JAI支持);加入tif->jpg->pdf转换后,以pdf格式预览,此种模式可完美支持打印纸张自适应。 2021-12-10 17:13:57 +08:00
周游
e0405bc5f6 Merge remote-tracking branch 'upstream/master' 2021-12-09 09:32:34 +08:00
gitchenjh
14151a6c46 Merge pull request #315 from gitchenjh/master
4.1.0迭代开启
2021-12-07 16:13:01 +08:00
陈精华
00555d3544 4.1.0迭代开启 2021-12-07 16:11:50 +08:00
Nevan Chow
7b2adc3979 Merge branch 'master' into master 2021-11-30 17:53:24 +08:00
gitchenjh
0a5fc1e4a8 Merge pull request #301 from fangzhengjin/patch-1
fix: PDF/word图片模式预览时, 下翻图片时频繁请求图片资源
2021-11-28 17:05:39 +08:00
gitchenjh
304d974b38 Merge pull request #268 from kekingcn/dependabot/maven/server/org.apache.commons-commons-compress-1.21
Bump commons-compress from 1.19 to 1.21 in /server
2021-11-25 16:19:52 +08:00
gitchenjh
6792a7afa7 Merge pull request #282 from kekingcn/dependabot/maven/server/com.thoughtworks.xstream-xstream-1.4.18
Bump xstream from 1.4.17 to 1.4.18 in /server
2021-11-25 16:19:39 +08:00
gitchenjh
ded297de59 Merge pull request #310 from gitchenjh/master
修复文件名包含空格时不能预览 #294
2021-11-25 16:11:35 +08:00
陈精华
f616678d83 修复文件名包含空格时不能预览 #294 2021-11-25 16:10:33 +08:00
gitchenjh
e10273dcdd Merge pull request #289 from sanxiHsu/master
Update startup.sh
2021-11-25 15:48:06 +08:00
gitchenjh
343269670c Merge pull request #288 from sanxiHsu/patch-2
Update shutdown.sh
2021-11-25 15:47:53 +08:00
gitchenjh
8af157b848 Merge pull request #309 from gitchenjh/master
处理Issues
2021-11-25 14:07:33 +08:00
陈精华
9d65c999e5 增加配置,限制允许预览的本地文件夹 #304 2021-11-25 13:47:51 +08:00
陈精华
4fe0d0edc9 PDF.js版本更新,解决 #264 2021-11-25 10:48:56 +08:00
周游
b1aab27338 feat: 通过配置控制PDF.js viewer toolbar & secondaryToolbar功能按钮 2021-11-16 11:50:12 +08:00
ZhengJin Fang
727e9ae9ed fix: PDF/word图片模式预览时, 下翻图片时频繁请求图片资源 2021-11-10 16:27:55 +08:00
sanxiHsu
dc9df5d760 Update startup.sh
更新根据pid文件来识别后台进程是否处于运行状态,避免同时启动多个后台进程。
2021-09-18 06:10:57 +00:00
sanxiHsu
b7de791658 Update shutdown.sh
原脚本使用grep,但grep只能用于人工操作无法用于自动脚本,原因在于无论是否搜索到正确结果,都会返回该grep进程的ID号,这时候kill就报错了。
更改为pid文件方式也是业界较为稳妥的方式。
2021-09-18 05:13:30 +00:00
Yiding He
82c7b59650 在主页上添加输入URL地址来预览的表单 2021-09-13 16:00:38 +08:00
dependabot[bot]
e0b9d8f476 Bump xstream from 1.4.17 to 1.4.18 in /server
Bumps [xstream](https://github.com/x-stream/xstream) from 1.4.17 to 1.4.18.
- [Release notes](https://github.com/x-stream/xstream/releases)
- [Commits](https://github.com/x-stream/xstream/commits)

---
updated-dependencies:
- dependency-name: com.thoughtworks.xstream:xstream
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-25 15:56:05 +00:00
陈精华
db2ed3a555 修复某些版本LibreOffice本地安装了,但检测不到问题 2021-08-25 15:27:36 +08:00
xiaxiaxiaxia
6efc375066 Fix:修复install.sh安装脚本路径错误 2021-08-24 16:05:41 +08:00
Yiding He
9a4c864490 重命名 env() 2021-08-24 13:56:07 +08:00
Yiding He
a3081ef4a9 修复单元测试失败的问题 2021-08-24 13:56:07 +08:00
Yiding He
43374e02bd 让 office-plugin 项目的语言级别与父项目保持一致 2021-08-24 11:05:12 +08:00
gitchenjh
fb8a19469b Merge pull request #272 from jerrykcode/master
修复: 文件名含有特殊字符时无法预览
2021-08-21 14:19:40 +08:00
jerrykcode
f2d5f4a86c 为WebUtils.encodeUrlFileName方法添加测试用例 2021-08-20 14:15:42 +08:00
jerrykcode
2177aed64f 修复: 文件名含有特殊字符时无法预览 2021-08-19 20:26:37 +08:00
dependabot[bot]
d20ac8fafc Bump commons-compress from 1.19 to 1.21 in /server
Bumps commons-compress from 1.19 to 1.21.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-compress
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-02 17:25:07 +00:00
捏造的信仰
2395a489a3 Update startup.sh
Add `/usr/lib64/libreoffice` to search path list.
2021-07-21 15:42:11 +08:00
ypgsh
0b8eedf935 feat: add dxf file type in cad scope 2021-07-21 15:41:35 +08:00
gitchenjh
807ada0bf9 4.0.0版本
4.0.0版本
2021-07-06 11:43:11 +08:00
陈精华
216c35c0b8 4.0.0版本发布 2021-07-06 11:15:50 +08:00
陈精华
d98cd5d9a9 优化:启动Office进程改为同步执行,防止程序运行起来Office进程还没启动 2021-07-06 11:12:07 +08:00
陈精华
fb6adf316f 优化:Windows环境下没有配置office.home,查找Office组件,内置的优先 2021-07-06 09:44:49 +08:00
陈精华
0854317cc8 优化:增加Office进程关闭日志 2021-07-06 09:10:19 +08:00
陈精华
fcdefa450c 新功能点:首页文件上传功能可通过配置实时开启或禁用 2021-07-06 09:09:19 +08:00
陈精华
dc50a460e5 修复:PPT图片预览模式前端显示异常 2021-07-05 14:37:39 +08:00
陈精华
31187ccb69 修复:PPT预览使用PDF模式无效 2021-07-05 11:09:53 +08:00
陈精华
d4b72b06e9 Dockerfile 拼写错误更正 2021-06-25 10:43:01 +08:00
陈精华
922e1e6ac4 修复压缩文件目录穿越漏洞 2021-06-23 12:25:14 +08:00
陈精华
79341b2c8e 集成OpenOffice替换为LibreOffice 2021-06-23 10:26:22 +08:00
kl
8a1eebb9b0 v3.6.0 版本发布 2021-06-17 19:06:37 +08:00
kl
85e26c6d93 修复 ofd 预览功能影响 office 预览的问题 2021-06-17 18:13:31 +08:00
gaoxiong
0a1ff64d18 修复某些情况下txt文本乱码问题 2021-06-17 17:48:48 +08:00
gaoxiong
176f38070d 对txt、log内容太多文件实现html分页显示 2021-06-17 17:48:48 +08:00
gaoxiong
4f5b0f74fd 美化ppt图片显示 2021-06-17 17:48:48 +08:00
gaoxiong
c549508417 增加OFD功能 2021-06-17 17:48:48 +08:00
gaoxiong
b86515a926 增加OFD功能 2021-06-17 17:48:48 +08:00
dependabot[bot]
1ba8c31d2c Bump commons-io from 1.4 to 2.7 in /office-plugin
Bumps commons-io from 1.4 to 2.7.

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 17:43:54 +08:00
dependabot[bot]
06ff1d4e8f Bump pdfbox from 2.0.15 to 2.0.24 in /server
Bumps pdfbox from 2.0.15 to 2.0.24.

---
updated-dependencies:
- dependency-name: org.apache.pdfbox:pdfbox
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 17:43:44 +08:00
dependabot[bot]
b03a11f2b5 Bump xstream from 1.4.16 to 1.4.17 in /server
Bumps [xstream](https://github.com/x-stream/xstream) from 1.4.16 to 1.4.17.
- [Release notes](https://github.com/x-stream/xstream/releases)
- [Commits](https://github.com/x-stream/xstream/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-17 17:43:33 +08:00
gitchenjh
a362d21aa4 Merge pull request #249 from opkcloud/master
Dockerfile 中添加 openoffice / libreoffice 的配置,可动态切换部署
2021-05-28 17:19:23 +08:00
opkopk12333
cd33d80a8c Dockerfile 中添加 openoffice / libreoffice 的配置,可动态切换部署 2021-05-27 21:14:09 +08:00
dependabot[bot]
2bb0dd545d Bump xstream from 1.4.15 to 1.4.16 in /server
Bumps [xstream](https://github.com/x-stream/xstream) from 1.4.15 to 1.4.16.
- [Release notes](https://github.com/x-stream/xstream/releases)
- [Commits](https://github.com/x-stream/xstream/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-19 13:32:13 +08:00
youken9980
ac2115114c 修正Redis服务器没有设置密码,但客户端向其发送身份验证请求的问题 2021-04-19 13:31:50 +08:00
youken9980
831550d847 修正office.preview.switch.disabled引用了错误常量的问题 2021-04-19 13:31:50 +08:00
youken9980
1fa7b4a911 修正区分大小写的文件系统中,文件后缀名为大写时,系统提示该文件类型不支持的问题 2021-04-19 13:31:50 +08:00
zhangxiaoxiao9527
bcdb5ce0e6 集成视频格式转换功能1.0(基于javacv) 2021-04-19 13:29:25 +08:00
15059 changed files with 2299145 additions and 635982 deletions

24
.github/workflows/maven.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml

View File

@@ -1,11 +1,12 @@
FROM ubuntu:20.04
MAINTAINER chenjh "842761733@qq.com"
ADD server/target/kkFileView-*.tar.gz /opt/
COPY fonts/* /usr/share/fonts/chienes/
COPY fonts/* /usr/share/fonts/chinese/
RUN echo "deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse\ndeb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse\ndeb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse\ndeb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse\ndeb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse\ndeb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse\ndeb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse\ndeb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse\ndeb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse\ndeb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse" > /etc/apt/sources.list &&\
apt-get clean && apt-get update &&\
apt-get install -y locales && apt-get install -y language-pack-zh-hans &&\
localedef -i zh_CN -c -f UTF-8 -A /usr/share/locale/locale.alias zh_CN.UTF-8 && locale-gen zh_CN.UTF-8 &&\
export DEBIAN_FRONTEND=noninteractive &&\
apt-get install -y tzdata && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime &&\
apt-get install -y libxrender1 && apt-get install -y libxt6 && apt-get install -y libxext-dev && apt-get install -y libfreetype6-dev &&\
apt-get install -y wget && apt-get install -y ttf-mscorefonts-installer && apt-get install -y fontconfig &&\
@@ -14,12 +15,21 @@ RUN echo "deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe m
apt-get install xfonts-wqy &&\
cd /tmp &&\
wget https://kkfileview.keking.cn/server-jre-8u251-linux-x64.tar.gz &&\
wget https://kkfileview.keking.cn/Apache_OpenOffice_4.1.6_Linux_x86-64_install-deb_zh-CN.tar.gz -cO openoffice_deb.tar.gz &&\
tar -zxf /tmp/server-jre-8u251-linux-x64.tar.gz && mv /tmp/jdk1.8.0_251 /usr/local/ &&\
tar -zxf /tmp/openoffice_deb.tar.gz && cd /tmp/zh-CN/DEBS &&\
dpkg -i *.deb && dpkg -i desktop-integration/openoffice4.1-debian-menus_4.1.6-9790_all.deb &&\
# 安装 OpenOffice
# wget https://kkfileview.keking.cn/Apache_OpenOffice_4.1.6_Linux_x86-64_install-deb_zh-CN.tar.gz -cO openoffice_deb.tar.gz &&\
# tar -zxf /tmp/openoffice_deb.tar.gz && cd /tmp/zh-CN/DEBS &&\
# dpkg -i *.deb && dpkg -i desktop-integration/openoffice4.1-debian-menus_4.1.6-9790_all.deb &&\
# 安装 libreoffice
apt-get install -y libxinerama1 libcairo2 libcups2 libx11-xcb1 &&\
wget https://kkfileview.keking.cn/LibreOffice_7.1.4_Linux_x86-64_deb.tar.gz -cO libreoffice_deb.tar.gz &&\
tar -zxf /tmp/libreoffice_deb.tar.gz && cd /tmp/LibreOffice_7.1.4.2_Linux_x86-64_deb/DEBS &&\
dpkg -i *.deb &&\
rm -rf /tmp/* && rm -rf /var/lib/apt/lists/* &&\
cd /usr/share/fonts/chienes &&\
cd /usr/share/fonts/chinese &&\
mkfontscale &&\
mkfontdir &&\
fc-cache -fv
@@ -28,5 +38,5 @@ ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
ENV PATH $PATH:$JAVA_HOME/bin
ENV LANG zh_CN.UTF-8
ENV LC_ALL zh_CN.UTF-8
ENV KKFILEVIEW_BIN_FOLDER /opt/kkFileView-3.5.1/bin
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider","-Dspring.config.location=/opt/kkFileView-3.5.1/config/application.properties","-jar","/opt/kkFileView-3.5.1/bin/kkFileView-3.5.1.jar"]
ENV KKFILEVIEW_BIN_FOLDER /opt/kkFileView-4.1.0-SNAPSHOT/bin
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dspring.config.location=/opt/kkFileView-4.1.0-SNAPSHOT/config/application.properties","-jar","/opt/kkFileView-4.1.0-SNAPSHOT/bin/kkFileView-4.1.0-SNAPSHOT.jar"]

View File

@@ -1,4 +1,4 @@
# file-online-preview
# kkFileView
[![GitHub license](https://img.shields.io/github/license/kekingcn/kkFileView.svg?style=flat-square)](https://github.com/kekingcn/kkFileView/blob/master/LICENSE)

View File

@@ -1,4 +1,4 @@
# file-online-preview
# kkFileView
此项目为文件文档在线预览项目解决方案对标业内付费产品有[永中office](http://dcs.yozosoft.com/)】【[office365](http://www.officeweb365.com/)】【[idocv](https://www.idocv.com/)】等在取得公司高层同意后以Apache协议开源出来反哺社区在此特别感谢@唐老大的支持以及@端木详笑的贡献。该项目使用流行的spring boot搭建易上手和部署基本支持主流办公文档的在线预览如doc,docx,Excel,pdf,txt,zip,rar,图片等等
### 项目特性
@@ -110,6 +110,25 @@ pdf预览模式预览效果如下
### 历史更新记录
> 2021年7月6日v4.0.0 版本发布
1. 底层集成OpenOffice替换为LibreOfficeOffice文件兼容性增强预览效果提升
2. 修复压缩文件目录穿越漏洞
3. 修复PPT预览使用PDF模式无效
4. 修复PPT图片预览模式前端显示异常
5. 新增功能首页文件上传功能可通过配置实时开启或禁用
6. 优化增加Office进程关闭日志
7. 优化Windows环境下查找Office组件逻辑(内置的LibreOffice优先)
8. 优化启动Office进程改同步执行
> 2021年6月17日v3.6.0 版本发布
ofd 类型文件支持版本本次版本重要功能均由社区开发贡献感谢 @gaoxingzaq@zhangxiaoxiao9527 的代码贡献
1. 新增 ofd 类型文件预览支持ofd 是国产的类似 pdf 格式的文件
2. 新增了 ffmpeg 视频文件转码预览支持打开转码功能后理论上支持所有主流视频的预览 rmrmvbflv
3. 美化了 pptpptx 类型文件预览效果比之前版本好看太多
4. 更新了 pdfboxxstreamcommon-io 等依赖的版本
> 2021年1月28日
2020农历年最后一个版本发布主要包含了部分 UI 改进和解决了 QQ 群友 Issue 里反馈的 Bug 修复最最重要的是发个新版过个好年

View File

@@ -5,9 +5,9 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>filepreview</artifactId>
<artifactId>kkFileView-parent</artifactId>
<groupId>cn.keking</groupId>
<version>3.5.1</version>
<version>4.1.0-SNAPSHOT</version>
</parent>
<artifactId>office-plugin</artifactId>
@@ -24,7 +24,7 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
<version>2.7</version>
</dependency>
<dependency>
<groupId>org.openoffice</groupId>
@@ -86,16 +86,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>

View File

@@ -87,9 +87,10 @@ public class OfficeUtils {
programFiles = System.getenv("ProgramFiles");
}
return findOfficeHome(
programFiles + File.separator + "OpenOffice 4",
programFiles + File.separator + "LibreOffice 4",
officePluginPath + File.separator + "windows-office"
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(
@@ -103,6 +104,14 @@ public class OfficeUtils {
"/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"

View File

@@ -29,23 +29,45 @@ public class ConfigUtils {
return userDir;
}
// 获取环境变量,如果找不到则返回默认值
@SuppressWarnings("SameParameterValue")
private static String getEnvOrDefault(String key, String def) {
String value = System.getenv(key);
return value == null ? def : value;
}
public static String getOfficePluginPath() {
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(OFFICE_PLUGIN_NAME)) {
userDir = userDir + separator + OFFICE_PLUGIN_NAME;
// 返回参数列表中第一个真实存在的路径,或者 null
private static String firstExists(File... paths) {
for (File path : paths) {
if (path.exists()) {
return path.getAbsolutePath();
}
}
return userDir;
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;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,12 @@
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, 2018 The Apache Software Foundation
Copyright 2011, 2014 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
@@ -16,11 +23,11 @@ ____
As part of the base system this product also includes code from the following
Apache projects:
- Apache Lucene
- Apache Portable Runtime
- 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 Piblisher extension
- Apache Tomcat - used by MediaWiki Publisher extension
The notices from these projects are following:
@@ -117,12 +124,6 @@ the MX4J package, which is open source software. The
original software and related information is available
at http://mx4j.sourceforge.net/.
The Windows Installer is built with the Nullsoft
Scriptable Install System (NSIS), which is
open source software. The original software and
related information is available at
http://nsis.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
@@ -130,11 +131,11 @@ http://www.eclipse.org/.
____
As part of the base system this product also includes code from the following
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
- StAX
- Apache BeanShell Scripting for Java
The notices from these projects are following:
@@ -142,45 +143,17 @@ 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/).
StAX
[no notices]
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/)
___
Apache OpenOffice has some optional parts that only get included
when the configure option --enable-category-b has been requested.
When you used this option make sure to comply with the
distribution requirements of these parts by extending
this file with the notices recommended by them:
___
Notices for CoinMP libary:
The Computational Infrastructure for Operations Research COIN_OR
project developed the CoinMP library (a lightweight API and DLL
for CLP, CBC, and CGL).
It includes and depends on
- CoinUtils: COIN-OR utilities, utilities, data structures, and
linear algebra methods for COIN-OR projects
- CLP: COIN-OR Graph Classes, a collection of network representations
and algorithms
- CBC: COIN-OR Branch and Cut, an LP-based branch-and-cut library
- CGL: Cut Generator Library, a library of cutting-plane generators
The source code of these dependencies which are available under
license EPL can found at
http://www.coin-or.org/download/source/CoinMP/
___

View File

@@ -0,0 +1,100 @@
/*
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);
})();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,46 @@
<!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>

View File

@@ -0,0 +1,188 @@
/* -*- 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: */

View File

@@ -0,0 +1,266 @@
/* -*- 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: */

File diff suppressed because it is too large Load Diff

View File

@@ -1,51 +1,48 @@
<!--***********************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
***********************************************************-->
<!--
* This 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">
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: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:value-of select="."/>
<xsl:text>&#xA;</xsl:text>
</xsl:template>
<xsl:template match="*"/>

View File

@@ -1,39 +1,36 @@
<!--***********************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
***********************************************************-->
<!--
* This 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">
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"/>
@@ -87,6 +84,16 @@
<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>

View File

@@ -0,0 +1,74 @@
<!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>

View File

@@ -0,0 +1 @@
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']);

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 937 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 727 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 776 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 983 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 508 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 B

Some files were not shown because too many files have changed in this diff Show More