集成OpenOffice替换为LibreOffice
18
Dockerfile
@@ -17,15 +17,15 @@ RUN echo "deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe m
|
||||
tar -zxf /tmp/server-jre-8u251-linux-x64.tar.gz && mv /tmp/jdk1.8.0_251 /usr/local/ &&\
|
||||
|
||||
# 安装 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 &&\
|
||||
# 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://mirrors.cloud.tencent.com/libreoffice/libreoffice/stable/7.1.3/deb/x86_64/LibreOffice_7.1.3_Linux_x86-64_deb.tar.gz -cO libreoffice_deb.tar.gz &&\
|
||||
# tar -zxf /tmp/libreoffice_deb.tar.gz && cd /tmp/LibreOffice_7.1.3.2_Linux_x86-64_deb/DEBS &&\
|
||||
# dpkg -i *.deb &&\
|
||||
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 &&\
|
||||
@@ -37,5 +37,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.6.0/bin
|
||||
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider","-Dspring.config.location=/opt/kkFileView-3.6.0/config/application.properties","-jar","/opt/kkFileView-3.6.0/bin/kkFileView-3.6.0.jar"]
|
||||
ENV KKFILEVIEW_BIN_FOLDER /opt/kkFileView-4.0.0-SNAPSHOT/bin
|
||||
ENTRYPOINT ["java","-Dfile.encoding=UTF-8","-Dspring.config.location=/opt/kkFileView-4.0.0-SNAPSHOT/config/application.properties","-jar","/opt/kkFileView-4.0.0-SNAPSHOT/bin/kkFileView-4.0.0-SNAPSHOT.jar"]
|
||||
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<artifactId>filepreview</artifactId>
|
||||
<groupId>cn.keking</groupId>
|
||||
<version>3.6.0</version>
|
||||
<version>4.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>office-plugin</artifactId>
|
||||
|
||||
@@ -87,6 +87,7 @@ public class OfficeUtils {
|
||||
programFiles = System.getenv("ProgramFiles");
|
||||
}
|
||||
return findOfficeHome(
|
||||
programFiles + File.separator + "LibreOffice",
|
||||
programFiles + File.separator + "OpenOffice 4",
|
||||
programFiles + File.separator + "LibreOffice 4",
|
||||
officePluginPath + File.separator + "windows-office"
|
||||
@@ -103,6 +104,9 @@ public class OfficeUtils {
|
||||
"/opt/openoffice.org3",
|
||||
"/opt/openoffice",
|
||||
"/opt/libreoffice",
|
||||
"/opt/libreoffice6.1",
|
||||
"/opt/libreoffice7.0",
|
||||
"/opt/libreoffice7.1",
|
||||
"/opt/openoffice4",
|
||||
"/usr/lib/openoffice",
|
||||
"/usr/lib/libreoffice"
|
||||
|
||||
16481
office-plugin/windows-office/CREDITS.fodt
Normal file
6787
office-plugin/windows-office/LICENSE.html
Normal 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/).
|
||||
@@ -20,7 +27,7 @@ Apache projects:
|
||||
- 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/
|
||||
|
||||
___
|
||||
|
||||
100
office-plugin/windows-office/help/a11y-toggle.js
Normal 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);
|
||||
})();
|
||||
907
office-plugin/windows-office/help/default.css
Normal file
608
office-plugin/windows-office/help/fuzzysort.js
Normal file
46
office-plugin/windows-office/help/help.html
Normal 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>
|
||||
|
||||
188
office-plugin/windows-office/help/help.js
Normal 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: */
|
||||
266
office-plugin/windows-office/help/help2.js
Normal 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: */
|
||||
8433
office-plugin/windows-office/help/hid2file.js
Normal file
@@ -1,23 +1,20 @@
|
||||
<!--***********************************************************
|
||||
<!--
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* 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
|
||||
* 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/.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
***********************************************************-->
|
||||
* 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"
|
||||
|
||||
@@ -1,23 +1,20 @@
|
||||
<!--***********************************************************
|
||||
<!--
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* 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
|
||||
* 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/.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
***********************************************************-->
|
||||
* 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"
|
||||
@@ -87,6 +84,16 @@
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="sub">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="sup">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="paragraph">
|
||||
<xsl:value-of select="."/>
|
||||
<xsl:text>
</xsl:text>
|
||||
|
||||
74
office-plugin/windows-office/help/index.html
Normal 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>
|
||||
1
office-plugin/windows-office/help/languages.js
Normal 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']);
|
||||
@@ -1,10 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<!--***********************************************************************
|
||||
This is the main transformation style sheet for transforming.
|
||||
Only use with OOo 2.0
|
||||
Owner: fpe@openoffice.org
|
||||
For use with LibreOffice 4.0+
|
||||
=========================================================================
|
||||
Changes Log
|
||||
May 24 2004 Created
|
||||
@@ -28,26 +26,23 @@
|
||||
Jun 15 2009 #i101799#, fixed wrong handling of http URLs with anchors
|
||||
***********************************************************************//-->
|
||||
|
||||
<!--***********************************************************
|
||||
<!--
|
||||
* This file is part of the LibreOffice project.
|
||||
*
|
||||
* 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
|
||||
* 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/.
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* This file incorporates work covered by the following license notice:
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
***********************************************************-->
|
||||
* 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">
|
||||
|
||||
@@ -79,10 +74,7 @@
|
||||
|
||||
<!-- meta data variables from the help file -->
|
||||
<xsl:variable name="filename" select="/helpdocument/meta/topic/filename"/>
|
||||
<xsl:variable name="topic_id" select="/helpdocument/meta/topic/@id"/>
|
||||
<xsl:variable name="topic_status" select="/helpdocument/meta/topic/@status"/>
|
||||
<xsl:variable name="title" select="/helpdocument/meta/topic/title"/>
|
||||
<xsl:variable name="doclang" select="/helpdocument/meta/topic/title/@xml-lang"/>
|
||||
|
||||
<!-- Module and the corresponding switching values-->
|
||||
<xsl:param name="Database" select="'swriter'"/>
|
||||
@@ -107,19 +99,8 @@
|
||||
<xsl:value-of select="translate($productversion,' ','')"/>
|
||||
</xsl:variable>
|
||||
<!-- this is were the images are -->
|
||||
<xsl:param name="imgrepos" select="''"/>
|
||||
<xsl:param name="imgtheme" select="''"/>
|
||||
<xsl:param name="Id" />
|
||||
<!-- (lame) distinction between OS and Commercial -->
|
||||
<xsl:param name="distrib">
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with($productname,'OpenOffice')">
|
||||
<xsl:value-of select="'OpenSource'"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="'COMMERCIAL'"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:param>
|
||||
<xsl:param name="Language" select="'en-US'"/>
|
||||
<xsl:variable name="lang" select="$Language"/>
|
||||
|
||||
@@ -129,7 +110,8 @@
|
||||
|
||||
<!-- 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.sun.star.zip://',$imgrepos,'/')"/>
|
||||
<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"/>
|
||||
@@ -138,9 +120,9 @@
|
||||
<xsl:variable name="css" select="'default.css'"/>
|
||||
|
||||
<!-- images for notes, tips and warnings -->
|
||||
<xsl:variable name="note_img" select="concat($img_url_prefix,'res/helpimg/note.png')"/>
|
||||
<xsl:variable name="tip_img" select="concat($img_url_prefix,'res/helpimg/tip.png')"/>
|
||||
<xsl:variable name="warning_img" select="concat($img_url_prefix,'res/helpimg/warning.png')"/>
|
||||
<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')"/>
|
||||
|
||||
<!--
|
||||
#############
|
||||
@@ -245,6 +227,22 @@
|
||||
<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" />
|
||||
|
||||
@@ -259,9 +257,6 @@
|
||||
<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>
|
||||
|
||||
<!-- LASTEDITED -->
|
||||
<xsl:template match="lastedited" />
|
||||
|
||||
<!-- LINK -->
|
||||
<xsl:template match="link">
|
||||
<xsl:choose> <!-- don't insert the heading link to itself -->
|
||||
@@ -350,6 +345,14 @@
|
||||
<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>
|
||||
@@ -573,6 +576,16 @@
|
||||
<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" />
|
||||
@@ -786,31 +799,21 @@
|
||||
|
||||
<!-- Insert an image -->
|
||||
<xsl:template name="insertimage">
|
||||
|
||||
<xsl:variable name="fpath">
|
||||
<xsl:call-template name="getfpath">
|
||||
<xsl:with-param name="s"><xsl:value-of select="@src"/></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="fname">
|
||||
<xsl:call-template name="getfname">
|
||||
<xsl:with-param name="s"><xsl:value-of select="@src"/></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<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') and not($lang='en-US')">
|
||||
<xsl:value-of select="concat($img_url_prefix,$fpath,$lang,'/',$fname)"/>
|
||||
<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,$fpath,$fname)"/>
|
||||
<xsl:value-of select="concat($img_url_prefix,@src)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
@@ -916,36 +919,6 @@
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="getfpath">
|
||||
<xsl:param name="s"/>
|
||||
<xsl:param name="p"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($s,'/')">
|
||||
<xsl:call-template name="getfpath">
|
||||
<xsl:with-param name="p"><xsl:value-of select="concat($p,substring-before($s,'/'),'/')"/></xsl:with-param>
|
||||
<xsl:with-param name="s"><xsl:value-of select="substring-after($s,'/')"/></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$p"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="getfname">
|
||||
<xsl:param name="s"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($s,'/')">
|
||||
<xsl:call-template name="getfname">
|
||||
<xsl:with-param name="s"><xsl:value-of select="substring-after($s,'/')"/></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$s"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="createDBpostfix">
|
||||
<xsl:param name="archive"/>
|
||||
<xsl:variable name="newDB">
|
||||
|
||||
BIN
office-plugin/windows-office/help/media/files/scalc/imtrigon.ods
Normal file
BIN
office-plugin/windows-office/help/media/files/scalc/pivot.ods
Normal file
BIN
office-plugin/windows-office/help/media/files/scalc/trigon.ods
Normal file
BIN
office-plugin/windows-office/help/media/helpimg/area1.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
office-plugin/windows-office/help/media/helpimg/area2.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
office-plugin/windows-office/help/media/helpimg/border_ca_1.png
Normal file
|
After Width: | Height: | Size: 937 B |
BIN
office-plugin/windows-office/help/media/helpimg/border_ca_2.png
Normal file
|
After Width: | Height: | Size: 858 B |
BIN
office-plugin/windows-office/help/media/helpimg/border_ca_3.png
Normal file
|
After Width: | Height: | Size: 894 B |
BIN
office-plugin/windows-office/help/media/helpimg/border_ca_4.png
Normal file
|
After Width: | Height: | Size: 787 B |
BIN
office-plugin/windows-office/help/media/helpimg/border_ca_5.png
Normal file
|
After Width: | Height: | Size: 386 B |
BIN
office-plugin/windows-office/help/media/helpimg/border_ca_6.png
Normal file
|
After Width: | Height: | Size: 727 B |
BIN
office-plugin/windows-office/help/media/helpimg/border_ca_7.png
Normal file
|
After Width: | Height: | Size: 733 B |
BIN
office-plugin/windows-office/help/media/helpimg/border_ca_8.png
Normal file
|
After Width: | Height: | Size: 776 B |
BIN
office-plugin/windows-office/help/media/helpimg/border_ca_9.png
Normal file
|
After Width: | Height: | Size: 956 B |
|
After Width: | Height: | Size: 748 B |
|
After Width: | Height: | Size: 742 B |
BIN
office-plugin/windows-office/help/media/helpimg/border_wr_1.png
Normal file
|
After Width: | Height: | Size: 941 B |
BIN
office-plugin/windows-office/help/media/helpimg/border_wr_2.png
Normal file
|
After Width: | Height: | Size: 983 B |
BIN
office-plugin/windows-office/help/media/helpimg/border_wr_3.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
office-plugin/windows-office/help/media/helpimg/border_wr_4.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
office-plugin/windows-office/help/media/helpimg/border_wr_5.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
office-plugin/windows-office/help/media/helpimg/border_wr_6.png
Normal file
|
After Width: | Height: | Size: 466 B |
BIN
office-plugin/windows-office/help/media/helpimg/border_wr_7.png
Normal file
|
After Width: | Height: | Size: 572 B |
BIN
office-plugin/windows-office/help/media/helpimg/border_wr_8.png
Normal file
|
After Width: | Height: | Size: 464 B |
BIN
office-plugin/windows-office/help/media/helpimg/border_wr_9.png
Normal file
|
After Width: | Height: | Size: 508 B |
BIN
office-plugin/windows-office/help/media/helpimg/calcein.png
Normal file
|
After Width: | Height: | Size: 621 B |
BIN
office-plugin/windows-office/help/media/helpimg/calcnav.png
Normal file
|
After Width: | Height: | Size: 656 B |
BIN
office-plugin/windows-office/help/media/helpimg/copydata.png
Normal file
|
After Width: | Height: | Size: 315 B |
BIN
office-plugin/windows-office/help/media/helpimg/diatrans.png
Normal file
|
After Width: | Height: | Size: 98 B |
BIN
office-plugin/windows-office/help/media/helpimg/dircurscent.png
Normal file
|
After Width: | Height: | Size: 150 B |
BIN
office-plugin/windows-office/help/media/helpimg/dircursleft.png
Normal file
|
After Width: | Height: | Size: 130 B |