[Libreoffice-commits] online.git: 19 commits - bundled/include kit/ChildSession.cpp loleaflet/build loleaflet/css loleaflet/images loleaflet/js loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Nov 19 11:54:26 UTC 2018
bundled/include/LibreOfficeKit/LibreOfficeKit.h | 9
kit/ChildSession.cpp | 14
loleaflet/build/deps.js | 7
loleaflet/css/loleaflet.css | 43 +-
loleaflet/css/menubar.css | 24 -
loleaflet/css/toolbar.css | 5
loleaflet/images/copy.svg | 439 ----------------------
loleaflet/images/cut.svg | 419 ---------------------
loleaflet/images/lc_calloutshapes-black.svg | 6
loleaflet/images/lc_closedocmobile.svg | 24 +
loleaflet/images/lc_copy.svg | 6
loleaflet/images/lc_cut.svg | 6
loleaflet/images/lc_fullscreen.svg | 1
loleaflet/images/lc_paste.svg | 6
loleaflet/images/paste.svg | 464 ------------------------
loleaflet/js/toolbar.js | 258 +++++++++----
loleaflet/js/w2ui-1.5.rc1.js | 2
loleaflet/src/control/Control.ColumnHeader.js | 29 +
loleaflet/src/control/Control.ContextToolbar.js | 88 ++++
loleaflet/src/control/Control.Header.js | 28 +
loleaflet/src/control/Control.LokDialog.js | 46 +-
loleaflet/src/control/Control.Menubar.js | 23 -
loleaflet/src/control/Control.RowHeader.js | 27 +
loleaflet/src/control/Control.Tabs.js | 7
loleaflet/src/control/Parts.js | 17
loleaflet/src/core/LOUtil.js | 2
loleaflet/src/core/Util.js | 38 +
loleaflet/src/dom/PosAnimation.js | 2
loleaflet/src/layer/AnnotationManager.js | 127 ++++++
loleaflet/src/layer/marker/Annotation.js | 51 ++
loleaflet/src/layer/marker/ProgressOverlay.js | 2
loleaflet/src/layer/tile/TileLayer.js | 14
loleaflet/src/map/Map.js | 2
loleaflet/src/map/handler/Map.Tap.js | 26 +
34 files changed, 740 insertions(+), 1522 deletions(-)
New commits:
commit 9a26beae9cff1cb2e891e8ec28c03ef70519e74d
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Nov 16 15:20:33 2018 +0100
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:40:37 2018 +0200
mobile: Various fixes to the user list, particularly on mobile.
Change-Id: Iee294630c2af5240394a848bbce0156d691ef7a0
diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index b62b08a16..0b293580b 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -724,7 +724,16 @@ function initMobileToolbar(toolItems) {
{type: 'button', id: 'undo', img: 'undo', hint: _UNO('.uno:Undo'), uno: 'Undo', disabled: true},
{type: 'button', id: 'redo', img: 'redo', hint: _UNO('.uno:Redo'), uno: 'Redo', disabled: true},
{type: 'button', id: 'fullscreen', img: 'fullscreen', hint: _UNO('.uno:FullScreen', 'text')},
- {type: 'button', id: 'users', img: 'users'},
+ {type: 'drop', id: 'userlist', img: 'users', html: '<div id="userlist_container"><table id="userlist_table"><tbody></tbody></table>' +
+ '<hr><table class="loleaflet-font" id="editor-btn">' +
+ '<tr>' +
+ '<td><input type="checkbox" name="alwaysFollow" id="follow-checkbox" onclick="editorUpdate(event)"></td>' +
+ '<td>' + _('Always follow the editor') + '</td>' +
+ '</tr>' +
+ '</table>' +
+ '<p id="currently-msg">' + _('Current') + ' - <b><span id="current-editor"></span></b></p>' +
+ '</div>'
+ },
],
onClick: function (e) {
onClick(e, e.target);
@@ -1088,6 +1097,7 @@ function initNormalToolbar(toolItems) {
}
var userJoinedPopupMessage = '<div>' + _('%user has joined') + '</div>';
+var userLeftPopupMessage = '<div>' + _('%user has left') + '</div>';
var userPopupTimeout = null;
function localizeStateTableCell (text) {
@@ -2033,12 +2043,13 @@ function onUseritemClicked(e) { // eslint-disable-line no-unused-vars
selectUser(viewId);
}
+global.onUseritemClicked = onUseritemClicked;
+
function editorUpdate(e) { // eslint-disable-line no-unused-vars
var docLayer = map._docLayer;
if (e.target.checked) {
var editorId = docLayer._editorId;
- var userlistItem = w2ui['toolbar-down'].get('userlist');
docLayer._followUser = false;
docLayer._followEditor = true;
@@ -2047,9 +2058,12 @@ function editorUpdate(e) { // eslint-disable-line no-unused-vars
docLayer._followThis = editorId;
}
- $('.selected-user').removeClass('selected-user');
- if ($(userlistItem.html).find('.selected-user').length !== 0)
- userlistItem.html = $(userlistItem.html).find('.selected-user').removeClass('selected-user').parent().parent().parent()[0].outerHTML;
+ var userlistItem = w2ui['toolbar-down'].get('userlist');
+ if (userlistItem !== null) {
+ $('.selected-user').removeClass('selected-user');
+ if ($(userlistItem.html).find('.selected-user').length !== 0)
+ userlistItem.html = $(userlistItem.html).find('.selected-user').removeClass('selected-user').parent().parent().parent()[0].outerHTML;
+ }
}
else {
docLayer._followEditor = false;
@@ -2058,14 +2072,24 @@ function editorUpdate(e) { // eslint-disable-line no-unused-vars
$('#tb_toolbar-down_item_userlist').w2overlay('');
}
+global.editorUpdate = editorUpdate;
+
function selectUser(viewId) {
var userlistItem = w2ui['toolbar-down'].get('userlist');
+ if (userlistItem === null) {
+ return;
+ }
+
userlistItem.html = $(userlistItem.html).find('#user-' + viewId).addClass('selected-user').parent().parent().parent()[0].outerHTML;
$('#tb_toolbar-down_item_userlist').w2overlay('');
}
function deselectUser(viewId) {
var userlistItem = w2ui['toolbar-down'].get('userlist');
+ if (userlistItem === null) {
+ return;
+ }
+
userlistItem.html = $(userlistItem.html).find('#user-' + viewId).removeClass('selected-user').parent().parent().parent()[0].outerHTML;
}
@@ -2091,6 +2115,10 @@ function getUserItem(viewId, userName, extraInfo, color) {
function updateUserListCount() {
var userlistItem = w2ui['toolbar-down'].get('userlist');
+ if (userlistItem === null) {
+ return;
+ }
+
var count = $(userlistItem.html).find('#userlist_table tbody tr').length;
if (count > 1) {
userlistItem.text = nUsers.replace('%n', count);
@@ -2132,9 +2160,11 @@ function onAddView(e) {
}
var userlistItem = w2ui['toolbar-down'].get('userlist');
- var newhtml = $(userlistItem.html).find('#userlist_table tbody').append(getUserItem(e.viewId, username, e.extraInfo, color)).parent().parent()[0].outerHTML;
- userlistItem.html = newhtml;
- updateUserListCount();
+ if (userlistItem !== null) {
+ var newhtml = $(userlistItem.html).find('#userlist_table tbody').append(getUserItem(e.viewId, username, e.extraInfo, color)).parent().parent()[0].outerHTML;
+ userlistItem.html = newhtml;
+ updateUserListCount();
+ }
}
$(window).resize(function() {
@@ -2247,6 +2277,32 @@ function setupToolbar(e) {
}
});
+ map.on('removeview', function(e) {
+ $('#tb_toolbar-down_item_userlist')
+ .w2overlay({
+ class: 'loleaflet-font',
+ html: userLeftPopupMessage.replace('%user', e.username),
+ style: 'padding: 5px'
+ });
+ clearTimeout(userPopupTimeout);
+ userPopupTimeout = setTimeout(function() {
+ $('#tb_toolbar-down_item_userlist').w2overlay('');
+ clearTimeout(userPopupTimeout);
+ userPopupTimeout = null;
+ }, 3000);
+
+ if (e.viewId === map._docLayer._followThis) {
+ map._docLayer._followThis = -1;
+ map._docLayer._followUser = false;
+ }
+
+ var userlistItem = w2ui['toolbar-down'].get('userlist');
+ if (userlistItem !== null) {
+ userlistItem.html = $(userlistItem.html).find('#user-' + e.viewId).remove().end()[0].outerHTML;
+ updateUserListCount();
+ }
+ });
+
map.on('doclayerinit', onDocLayerInit);
map.on('wopiprops', onWopiProps);
map.on('addview', onAddView);
commit 58fd6beac8c98629d6b54af84638cbcd4a6c4d7b
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Nov 16 15:00:37 2018 +0100
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:40:28 2018 +0200
mobile: Get rid of the callout icon.
Change-Id: I6a040269a2a0d45e7b2db00c4c221ff6c86fdf1e
diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index be03c514d..daef2d11c 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -582,7 +582,6 @@ button.leaflet-control-search-next
.w2ui-icon.specialcharacter{ background: url('images/lc_insertsymbol.svg') no-repeat center !important; }
.w2ui-icon.insertobjectchart{ background: url('images/lc_drawchart.svg') no-repeat center !important; }
.w2ui-icon.users{ background: url('images/contacts-dark.svg') no-repeat center !important; }
-.w2ui-icon.callout{ background: url('images/lc_calloutshapes-black.svg') no-repeat center !important; }
.w2ui-icon.fullscreen{ background: url('images/lc_fullscreen.svg') no-repeat center !important; }
.w2ui-icon.closemobile{ background: url('images/lc_closedocmobile.svg') no-repeat center !important; }
diff --git a/loleaflet/images/lc_calloutshapes-black.svg b/loleaflet/images/lc_calloutshapes-black.svg
deleted file mode 100644
index bd085cd95..000000000
--- a/loleaflet/images/lc_calloutshapes-black.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
- <path
- style="fill:#4d4d4d"
- d="M 6 4 C 4.8920104 4 4 4.8920001 4 6 L 4 14 C 4 15.108 4.8920104 16 6 16 L 8 16 L 8 20 L 12 16 L 18 16 C 19.10799 16 20 15.108 20 14 L 20 6 C 20 4.8920001 19.10799 4 18 4 L 6 4 z "
- />
- </svg>
diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index e5488cbaf..b62b08a16 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -725,7 +725,6 @@ function initMobileToolbar(toolItems) {
{type: 'button', id: 'redo', img: 'redo', hint: _UNO('.uno:Redo'), uno: 'Redo', disabled: true},
{type: 'button', id: 'fullscreen', img: 'fullscreen', hint: _UNO('.uno:FullScreen', 'text')},
{type: 'button', id: 'users', img: 'users'},
- {type: 'button', id: 'callout', img: 'callout'},
],
onClick: function (e) {
onClick(e, e.target);
commit abede8cbe8812f239608e91bec10b26ed17b5521
Author: Marco Cecchetti <mrcekets at gmail.com>
AuthorDate: Tue Nov 13 10:23:42 2018 +0100
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:40:17 2018 +0200
loleaflet: mobile ux: get comments scaling on document zoom
On document zoom out the comments are shrunk.
We try to get the selected/edited comment always visible.
This is especially useful on small devices.
Change-Id: I0a43d32fe68364f681056c1643c36dc74ff3a66a
diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index b3c3e166d..f53adfbbd 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -201,7 +201,6 @@ body {
font-family: "Segoe UI", Tahoma, Arial, Helvetica, sans-serif !important;
font-size: 13px;
text-align: left;
- border-radius: 5px;
background-color: #efefef;
box-shadow: 0px 3px 6px rgba(0,0,0,0.2);
color: #222;
@@ -310,7 +309,7 @@ body {
}
.loleaflet-annotation-menu, .loleaflet-annotation-menu-redline {
- background: url('images/submenu.svg') no-repeat center !important;
+ background: url('images/submenu.svg') no-repeat center/contain !important;
}
.loleaflet-annotation-menu:hover, .loleaflet-annotation-menu-redline:hover, .loleaflet-redline-accept-button:hover, .loleaflet-redline-reject-button:hover {
diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js
index 6927eb32e..206f7ae71 100644
--- a/loleaflet/src/layer/AnnotationManager.js
+++ b/loleaflet/src/layer/AnnotationManager.js
@@ -3,6 +3,8 @@
* L.AnnotationManager
*/
+/* global $ */
+
L.AnnotationManager = L.Class.extend({
options: {
marginX: 40,
@@ -24,6 +26,8 @@ L.AnnotationManager = L.Class.extend({
this._map.on('AnnotationSave', this._onAnnotationSave, this);
this._map.on('RedlineAccept', this._onRedlineAccept, this);
this._map.on('RedlineReject', this._onRedlineReject, this);
+
+ this._scaleFactor = 1;
},
// Remove only text comments from the document (excluding change tracking comments)
@@ -240,13 +244,7 @@ L.AnnotationManager = L.Class.extend({
},
update: function () {
- if (this._selected) {
- var point;
- var docRight = this._map.project(this._map.options.docBounds.getNorthEast());
- point = this._map._docLayer._twipsToPixels(this._selected._data.anchorPos.min);
- this._arrow.setLatLngs([this._map.unproject(point), this._map.unproject(L.point(docRight.x, point.y))]);
- this._map.addLayer(this._arrow);
- } else {
+ if (!this._selected) {
this._map.removeLayer(this._arrow);
}
this.layout();
@@ -329,6 +327,7 @@ L.AnnotationManager = L.Class.extend({
},
doLayout: function (zoom) {
+ this._updateScaling();
var docRight = this._map.project(this._map.options.docBounds.getNorthEast());
var topRight = docRight.add(L.point(this.options.marginX, this.options.marginY));
var latlng, layoutBounds, point, idx;
@@ -338,7 +337,53 @@ L.AnnotationManager = L.Class.extend({
if (zoom) {
this._items[selectIndexFirst]._data.anchorPix = this._map._docLayer._twipsToPixels(this._items[selectIndexFirst]._data.anchorPos.min);
}
- latlng = this._map.unproject(L.point(docRight.x, this._items[selectIndexFirst]._data.anchorPix.y));
+
+ var posX = topRight.x;
+ var posY = this._items[selectIndexFirst]._data.anchorPix.y;
+ point = this._map._docLayer._twipsToPixels(this._items[selectIndexFirst]._data.anchorPos.min);
+
+ if (L.Browser.mobile) {
+ var mapBoundsPx = this._map.getPixelBounds();
+ var annotationBoundsPx = this._items[selectIndexFirst].getBounds();
+ var annotationSize = annotationBoundsPx.getSize();
+ var topLeftPoint = L.point(posX, posY);
+ annotationBoundsPx = L.bounds(topLeftPoint, topLeftPoint.add(annotationSize));
+
+ if (!mapBoundsPx.contains(annotationBoundsPx)) {
+ var scrollX = 0, scrollY = 0, spacing = 16;
+
+ if (annotationBoundsPx.min.x < mapBoundsPx.min.x) {
+ scrollX = annotationBoundsPx.min.x - mapBoundsPx.min.x - spacing;
+ } else if (annotationBoundsPx.max.x > mapBoundsPx.max.x) {
+ scrollX = annotationBoundsPx.max.x - mapBoundsPx.max.x + spacing;
+ }
+ if (annotationBoundsPx.min.y < mapBoundsPx.min.y) {
+ scrollY = annotationBoundsPx.min.y - mapBoundsPx.min.y + spacing;
+ } else if (annotationBoundsPx.max.y > mapBoundsPx.max.y) {
+ scrollY = annotationBoundsPx.max.y - mapBoundsPx.max.y - spacing;
+ }
+ scrollX = Math.round(scrollX);
+ scrollY = Math.round(scrollY);
+ posX -= scrollX;
+ if (posX < mapBoundsPx.min.x)
+ posX = Math.round(mapBoundsPx.min.x + spacing);
+ posY -= scrollY;
+ if (posY < mapBoundsPx.min.y)
+ posY = Math.round(mapBoundsPx.min.y + spacing);
+ if (posX < this._items[selectIndexFirst]._data.anchorPix.x + spacing) {
+ var anchorPosMax = this._map._docLayer._twipsToPixels(this._items[selectIndexFirst]._data.anchorPos.max);
+ var lineHeight = Math.round(anchorPosMax.y - this._items[selectIndexFirst]._data.anchorPix.y);
+ posY += 2 * lineHeight;
+ point.y += lineHeight;
+ }
+ }
+ }
+
+ // Draw arrow
+ this._arrow.setLatLngs([this._map.unproject(point), this._map.unproject(L.point(posX, posY))]);
+ this._map.addLayer(this._arrow);
+
+ latlng = this._map.unproject(L.point(posX, posY));
(new L.PosAnimation()).run(this._items[selectIndexFirst]._container, this._map.latLngToLayerPoint(latlng));
this._items[selectIndexFirst].setLatLng(latlng);
layoutBounds = this._items[selectIndexFirst].getBounds();
@@ -668,6 +713,72 @@ L.AnnotationManager = L.Class.extend({
_onAnnotationZoom: function () {
this._map.fire('updatemaxbounds', {sizeChanged: true});
this.layout(true);
+ },
+
+ _getScaleFactor: function () {
+ var scaleFactor = 1.0 / this._map.getZoomScale(this._map.options.zoom, this._map._zoom);
+ if (scaleFactor < 0.4)
+ scaleFactor = 0.4;
+ else if (scaleFactor < 0.6)
+ scaleFactor = 0.6 - (0.6 - scaleFactor) / 2.0;
+ else if (scaleFactor < 0.8)
+ scaleFactor = 0.8;
+ else if (scaleFactor <= 2)
+ scaleFactor = 1;
+ else if (scaleFactor > 2) {
+ scaleFactor = 1 + (scaleFactor - 1) / 10.0;
+ if (scaleFactor > 1.5)
+ scaleFactor = 1.5;
+ }
+ return scaleFactor;
+ },
+
+ _updateScaling: function () {
+ if (!L.Browser.mobile || this._items.length === 0)
+ return;
+
+ var initNeeded = (this._initialLayoutData === undefined);
+ var contentWrapperClass = $('.loleaflet-annotation-content-wrapper');
+ if (initNeeded && contentWrapperClass.length > 0) {
+ var userlineClass = $('.loleaflet-annotation-userline');
+ var contentAuthor = $('.loleaflet-annotation-content-author');
+ var dateClass = $('.loleaflet-annotation-date');
+
+ this._initialLayoutData = {
+ wrapperWidth: parseInt(contentWrapperClass.css('width')),
+ wrapperFontSize: parseInt(contentWrapperClass.css('font-size')),
+ authorLineWidth: parseInt(userlineClass.css('width')),
+ authorLineHeight: parseInt(userlineClass.css('height')),
+ authorContentHeight: parseInt(contentAuthor.css('height')),
+ dateFontSize: parseInt(dateClass.css('font-size')),
+ };
+ }
+
+ var menuClass = $('.loleaflet-annotation-menu');
+ if ((this._initialLayoutData.menuWidth === undefined) && menuClass.length > 0) {
+ this._initialLayoutData.menuWidth = parseInt(menuClass.css('width'));
+ this._initialLayoutData.menuHeight = parseInt(menuClass.css('height'));
+ }
+
+ var scaleFactor = this._getScaleFactor();
+ var idx;
+ if (this._selected) {
+ var selectIndexFirst = this.getRootIndexOf(this._selected._data.id);
+ var selectIndexLast = this.getLastChildIndexOf(this._selected._data.id);
+ for (idx = 0; idx < this._items.length; idx++) {
+ if (idx < selectIndexFirst || idx > selectIndexLast) {
+ this._items[idx]._updateScaling(scaleFactor, this._initialLayoutData);
+ }
+ else {
+ this._items[idx]._updateScaling(1, this._initialLayoutData);
+ }
+ }
+ }
+ else {
+ for (idx = 0; idx < this._items.length; idx++) {
+ this._items[idx]._updateScaling(scaleFactor, this._initialLayoutData);
+ }
+ }
}
});
diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js
index f39f6d7e1..99417b83a 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -124,6 +124,13 @@ L.Annotation = L.Layer.extend({
return this._data.id === comment._data.parent;
},
+ onZoom: function(scaleFactor) {
+ var authorImageWidth = Math.round(this.options.imgSize.x * scaleFactor);
+ var authorImageHeight = Math.round(this.options.imgSize.y * scaleFactor);
+ this._authorAvatarImg.setAttribute('width', authorImageWidth);
+ this._authorAvatarImg.setAttribute('height', authorImageHeight);
+ },
+
_checkBounds: function () {
if (!this._map || this._map.animatingZoom || !this._container.style || this._container.style.visibility !== '') {
return;
@@ -181,7 +188,7 @@ L.Annotation = L.Layer.extend({
imgAuthor.setAttribute('width', this.options.imgSize.x);
imgAuthor.setAttribute('height', this.options.imgSize.y);
this._authorAvatarImg = imgAuthor;
- L.DomUtil.create(tagDiv, 'loleaflet-annotation-userline', tdImg);
+ this._authorUserLine = L.DomUtil.create(tagDiv, 'loleaflet-annotation-userline', tdImg);
this._contentAuthor = L.DomUtil.create(tagDiv, 'loleaflet-annotation-content-author', tdAuthor);
this._contentDate = L.DomUtil.create(tagDiv, 'loleaflet-annotation-date', tdAuthor);
@@ -204,7 +211,7 @@ L.Annotation = L.Layer.extend({
if (this.options.noMenu !== true && this._map._permission !== 'readonly') {
var tdMenu = L.DomUtil.create(tagTd, 'loleaflet-annotation-menubar', tr);
- var divMenu = L.DomUtil.create(tagDiv, this._data.trackchange ? 'loleaflet-annotation-menu-redline' : 'loleaflet-annotation-menu', tdMenu);
+ var divMenu = this._menu = L.DomUtil.create(tagDiv, this._data.trackchange ? 'loleaflet-annotation-menu-redline' : 'loleaflet-annotation-menu', tdMenu);
divMenu.title = _('Open menu');
divMenu.annotation = this;
}
@@ -358,6 +365,35 @@ L.Annotation = L.Layer.extend({
L.DomUtil.setPosition(this._container, pos);
}
this._checkBounds();
+ },
+
+ _updateScaling: function (scaleFactor, initialLayoutData) {
+ if (!L.Browser.mobile)
+ return;
+
+ var wrapperWidth = Math.round(initialLayoutData.wrapperWidth * scaleFactor);
+ this._wrapper.style.width = wrapperWidth + 'px';
+ var wrapperFontSize = Math.round(initialLayoutData.wrapperFontSize * scaleFactor);
+ this._wrapper.style.fontSize = wrapperFontSize + 'px';
+ var authorLineWidth = Math.round(initialLayoutData.authorLineWidth * scaleFactor);
+ this._authorUserLine.style.width = authorLineWidth + 'px';
+ var authorLineHeight = Math.round(initialLayoutData.authorLineHeight * scaleFactor);
+ this._authorUserLine.style.height = authorLineHeight + 'px';
+ var contentAuthorHeight = Math.round(initialLayoutData.authorContentHeight * scaleFactor);
+ this._contentAuthor.style.height = contentAuthorHeight + 'px';
+ var dateFontSize = Math.round(initialLayoutData.dateFontSize * scaleFactor);
+ this._contentDate.style.fontSize = dateFontSize + 'px';
+ if (this._menu) {
+ var menuWidth = Math.round(initialLayoutData.menuWidth * scaleFactor);
+ this._menu.style.width = menuWidth + 'px';
+ var menuHeight = Math.round(initialLayoutData.menuHeight * scaleFactor);
+ this._menu.style.height = menuHeight + 'px';
+ }
+
+ var authorImageWidth = Math.round(this.options.imgSize.x * scaleFactor);
+ var authorImageHeight = Math.round(this.options.imgSize.y * scaleFactor);
+ this._authorAvatarImg.setAttribute('width', authorImageWidth);
+ this._authorAvatarImg.setAttribute('height', authorImageHeight);
}
});
commit 392e686eec1d5e5cf94fd808419158adfc45c077
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Tue Nov 13 12:07:15 2018 +0100
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:40:07 2018 +0200
hidpi: Provide hidpi slide previews when necessary.
Note that this will lead to sending previews in higher resolution even
to non-hi-dpi displays during updates; but even the hidpi previews are
just slightly larger than normal tiles, so probably it takes more time
to render the preview in both resolutions than just using hi-dpi
everywhere.
Change-Id: Ia478d4ceffe9a1433d50606bf6ff8ad91b46ae4c
diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index 25db4dc90..b3c3e166d 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -54,7 +54,7 @@ body {
top: 70px;
left: 0px;
bottom: 66px;
- max-width: 214px;
+ max-width: 218px;
border-top: 1px solid #b6b6b6;
display: block;
}
diff --git a/loleaflet/src/control/Parts.js b/loleaflet/src/control/Parts.js
index 2b2ac80f6..f14a8065f 100644
--- a/loleaflet/src/control/Parts.js
+++ b/loleaflet/src/control/Parts.js
@@ -82,10 +82,16 @@ L.Map.include({
else {
maxHeight = Math.round(tileHeight * maxWidth / tileWidth);
}
+
+ var dpiscale = L.getDpiScaleFactor();
+ if (forAllClients) {
+ dpiscale = 2; // some may be hidpi, and it is fine to send the hi-dpi slide preview to non-hpi clients
+ }
+
this._socket.sendMessage('tile ' +
'part=' + part + ' ' +
- 'width=' + maxWidth + ' ' +
- 'height=' + maxHeight + ' ' +
+ 'width=' + maxWidth * dpiscale + ' ' +
+ 'height=' + maxHeight * dpiscale + ' ' +
'tileposx=' + tilePosX + ' ' +
'tileposy=' + tilePosY + ' ' +
'tilewidth=' + tileWidth + ' ' +
@@ -103,10 +109,13 @@ L.Map.include({
var autoUpdate = options ? options.autoUpdate : false;
this._docPreviews[id] = {id: id, part: part, width: width, height: height, tilePosX: tilePosX,
tilePosY: tilePosY, tileWidth: tileWidth, tileHeight: tileHeight, autoUpdate: autoUpdate};
+
+ var dpiscale = L.getDpiScaleFactor();
+
this._socket.sendMessage('tile ' +
'part=' + part + ' ' +
- 'width=' + width + ' ' +
- 'height=' + height + ' ' +
+ 'width=' + width * dpiscale + ' ' +
+ 'height=' + height * dpiscale + ' ' +
'tileposx=' + tilePosX + ' ' +
'tileposy=' + tilePosY + ' ' +
'tilewidth=' + tileWidth + ' ' +
commit 7a5266b0ae4f08e8b14c50856b45bb01833e2838
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Thu Nov 8 11:05:22 2018 -0500
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:39:55 2018 +0200
leaflet: reduce some animation timeouts to avoid hammering cpu/browser
Change-Id: I4194db181f1cc0f89c906cbb87846c89df47e4ee
diff --git a/loleaflet/js/w2ui-1.5.rc1.js b/loleaflet/js/w2ui-1.5.rc1.js
index d272cca02..1bfb991c8 100644
--- a/loleaflet/js/w2ui-1.5.rc1.js
+++ b/loleaflet/js/w2ui-1.5.rc1.js
@@ -2094,7 +2094,7 @@ w2utils.event = {
hideTag();
return;
}
- if (!instant) setTimeout(checkIfMoved, 100);
+ if (!instant) setTimeout(checkIfMoved, 200);
// monitor if moved
var posClass = 'w2ui-tag-right';
var posLeft = parseInt(offset.left + el.offsetWidth + (options.left ? options.left : 0));
diff --git a/loleaflet/src/core/LOUtil.js b/loleaflet/src/core/LOUtil.js
index faed169dd..27025f3a9 100644
--- a/loleaflet/src/core/LOUtil.js
+++ b/loleaflet/src/core/LOUtil.js
@@ -39,7 +39,7 @@ L.LOUtil = {
context.beginPath();
context.arc(x, y, radius, 0, Math.PI * 1.3);
context.stroke();
- }, 1);
+ }, 30);
return spinnerInterval;
},
diff --git a/loleaflet/src/layer/marker/ProgressOverlay.js b/loleaflet/src/layer/marker/ProgressOverlay.js
index 5803a8523..93835c583 100644
--- a/loleaflet/src/layer/marker/ProgressOverlay.js
+++ b/loleaflet/src/layer/marker/ProgressOverlay.js
@@ -6,7 +6,7 @@
L.ProgressOverlay = L.Layer.extend({
options: {
- spinnerSpeed: 1.5
+ spinnerSpeed: 15
},
initialize: function (latlng, size) {
commit abf6e7edefee6034bc2d9637e2bd1ad7e7bb4251
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Thu Nov 8 11:04:48 2018 -0500
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:39:45 2018 +0200
leaflet: stop animating comment-box when reached dest
Change-Id: Ief573dcd5311974894be6a99f709db5f9a1a26d3
diff --git a/loleaflet/src/dom/PosAnimation.js b/loleaflet/src/dom/PosAnimation.js
index 19ad7d249..404fcd1a0 100644
--- a/loleaflet/src/dom/PosAnimation.js
+++ b/loleaflet/src/dom/PosAnimation.js
@@ -41,7 +41,7 @@ L.PosAnimation = L.Class.extend({
_onStep: function () {
var stepPos = this._getPos();
- if (!stepPos) {
+ if (!stepPos || (this._el._leaflet_pos.x == stepPos.x && this._el._leaflet_pos.y == stepPos.y)) {
this._onTransitionEnd();
return;
}
commit c269dc0bc74b10e44ba02532e61840fa33ff5092
Author: Marco Cecchetti <mrcekets at gmail.com>
AuthorDate: Thu Nov 8 11:10:49 2018 +0100
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:39:34 2018 +0200
loleaflet: mobile ux: get touch ui working with comments
This patch, simulates single clicks and prevents that pinch to zoom on
a comment area to cause a zoom of the whole application ui.
Change-Id: I5a7b9df426d7987b127b81e94d3bc7f08cd779ce
diff --git a/loleaflet/src/layer/marker/Annotation.js b/loleaflet/src/layer/marker/Annotation.js
index a665abf73..f39f6d7e1 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -233,12 +233,21 @@ L.Annotation = L.Layer.extend({
this._nodeModify.style.display = 'none';
this._nodeReply.style.display = 'none';
- var events = [click, 'dblclick', 'mousedown', 'mouseup', 'mouseover', 'mouseout', 'keydown', 'keypress', 'keyup'];
+ var events = [click, 'dblclick', 'mousedown', 'mouseup', 'mouseover', 'mouseout', 'keydown', 'keypress', 'keyup', 'touchstart', 'touchmove', 'touchend'];
L.DomEvent.on(container, click, this._onMouseClick, this);
L.DomEvent.on(container, 'mouseleave', this._onMouseLeave, this);
for (var it = 0; it < events.length; it++) {
L.DomEvent.on(container, events[it], L.DomEvent.stopPropagation, this);
}
+
+ L.DomEvent.on(container, 'touchstart',
+ function (e) {
+ if (e && e.touches.length > 1) {
+ L.DomEvent.preventDefault(e);
+ }
+ },
+ this);
+
},
_onCancelClick: function (e) {
diff --git a/loleaflet/src/map/handler/Map.Tap.js b/loleaflet/src/map/handler/Map.Tap.js
index 115733695..4d0d584fa 100644
--- a/loleaflet/src/map/handler/Map.Tap.js
+++ b/loleaflet/src/map/handler/Map.Tap.js
@@ -58,7 +58,9 @@ L.Map.Tap = L.Handler.extend({
this._toolbar.remove();
// simulate long hold but setting a timeout
+ this._fireClick = true;
this._holdTimeout = setTimeout(L.bind(function () {
+ this._fireClick = false;
if (this._isTapValid()) {
this._fireDblClick = true;
this._onUp(e);
@@ -85,6 +87,12 @@ L.Map.Tap = L.Handler.extend({
var first = e.changedTouches[0];
this._simulateEvent('mouseup', first);
+ if (this._fireClick) {
+ this._fireClick = false;
+ if (this._isTapValid()) {
+ this._simulateEvent('click', first);
+ }
+ }
if (this._fireDblClick) {
this._simulateEvent('dblclick', first);
this._fireDblClick = false;
commit ba7451e9b1442f83768db60e463e4757679bc53b
Author: Marco Cecchetti <mrcekets at gmail.com>
AuthorDate: Thu Nov 1 19:08:01 2018 +0100
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:39:21 2018 +0200
loleflet: mobile ui: removing the doc logo from up toolbar
Change-Id: I3f51b9b9871f58abeb4a7170fce6f026759a112b
diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index 36c8aa51d..25db4dc90 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -105,9 +105,6 @@ body {
#spreadsheet-row-column-frame.readonly {
top: 30px !important;
}
- #toolbar-logo {
- width: 32px;
- }
#toolbar-hamburger {
width: 41px;
}
commit c6b57e2049006135596341e4ba0fda995535b039
Author: Marco Cecchetti <mrcekets at gmail.com>
AuthorDate: Thu Nov 1 18:08:32 2018 +0100
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:39:10 2018 +0200
loleaflet: touch ui: pinch to zoom only when done in the document area
Change-Id: I4403ab078035a5289e26b84a02c5bddbbc378eb5
diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index d063a9398..e5488cbaf 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -719,7 +719,6 @@ function initMobileToolbar(toolItems) {
name: 'toolbar-down',
tooltip: 'bottom',
items: [
- {type: 'button', id: 'doclogo', img: 'doclogo'},
{type: 'button', id: 'close', img: 'closemobile'},
{type: 'spacer'},
{type: 'button', id: 'undo', img: 'undo', hint: _UNO('.uno:Undo'), uno: 'Undo', disabled: true},
@@ -733,8 +732,12 @@ function initMobileToolbar(toolItems) {
hideTooltip(this, e.target);
}
});
- toolbar.bind('touchstart', function() {
+ toolbar.bind('touchstart', function(e) {
w2ui['toolbar-down'].touchStarted = true;
+ var touchEvent = e.originalEvent;
+ if (touchEvent && touchEvent.touches.length > 1) {
+ L.DomEvent.preventDefault(e);
+ }
});
toolbar = $('#formulabar');
@@ -763,8 +766,12 @@ function initMobileToolbar(toolItems) {
$('#formulaInput').off('focus', onFormulaBarFocus).on('focus', onFormulaBarFocus);
}
});
- toolbar.bind('touchstart', function() {
+ toolbar.bind('touchstart', function(e) {
w2ui['formulabar'].touchStarted = true;
+ var touchEvent = e.originalEvent;
+ if (touchEvent && touchEvent.touches.length > 1) {
+ L.DomEvent.preventDefault(e);
+ }
});
$(w2ui.formulabar.box).find('.w2ui-scroll-left, .w2ui-scroll-right').hide();
@@ -788,8 +795,12 @@ function initMobileToolbar(toolItems) {
hideTooltip(this, e.target);
}
});
- toolbar.bind('touchstart', function() {
+ toolbar.bind('touchstart', function(e) {
w2ui['spreadsheet-toolbar'].touchStarted = true;
+ var touchEvent = e.originalEvent;
+ if (touchEvent && touchEvent.touches.length > 1) {
+ L.DomEvent.preventDefault(e);
+ }
});
toolbar = $('#presentation-toolbar');
@@ -845,8 +856,12 @@ function initMobileToolbar(toolItems) {
}
});
- toolbar.bind('touchstart', function() {
+ toolbar.bind('touchstart', function(e) {
w2ui['toolbar-up'].touchStarted = true;
+ var touchEvent = e.originalEvent;
+ if (touchEvent && touchEvent.touches.length > 1) {
+ L.DomEvent.preventDefault(e);
+ }
});
}
diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js
index f8fe19ec5..96539f3aa 100644
--- a/loleaflet/src/control/Control.ColumnHeader.js
+++ b/loleaflet/src/control/Control.ColumnHeader.js
@@ -49,6 +49,13 @@ L.Control.ColumnHeader = L.Control.Header.extend({
L.DomEvent.on(this._canvas, 'mouseout', this._onMouseOut, this);
L.DomEvent.on(this._canvas, 'click', this._onClick, this);
L.DomEvent.on(this._canvas, 'dblclick', this._onDoubleClick, this);
+ L.DomEvent.on(this._canvas, 'touchstart',
+ function (e) {
+ if (e && e.touches.length > 1) {
+ L.DomEvent.preventDefault(e);
+ }
+ },
+ this);
this._startHeaderIndex = 0;
this._startOffset = 0;
@@ -57,7 +64,6 @@ L.Control.ColumnHeader = L.Control.Header.extend({
L.DomEvent.on(this._cornerCanvas, 'contextmenu', L.DomEvent.preventDefault);
L.DomEvent.addListener(this._cornerCanvas, 'click', this._onCornerHeaderClick, this);
-
var colHeaderObj = this;
$.contextMenu({
selector: '.spreadsheet-header-columns',
diff --git a/loleaflet/src/control/Control.Header.js b/loleaflet/src/control/Control.Header.js
index 64de13d1c..c8beb0c78 100644
--- a/loleaflet/src/control/Control.Header.js
+++ b/loleaflet/src/control/Control.Header.js
@@ -37,6 +37,14 @@ L.Control.Header = L.Control.extend({
if (cornerHeader) {
this._cornerHeaderContainer = cornerHeader;
this._cornerCanvas = L.DomUtil.get('spreadsheet-header-corner');
+ L.DomEvent.on(this._cornerHeaderContainer, 'touchstart',
+ function (e) {
+ if (e && e.touches.length > 1) {
+ L.DomEvent.preventDefault(e);
+ }
+ },
+ this);
+
}
else {
var rowColumnFrame = L.DomUtil.get('spreadsheet-row-column-frame');
diff --git a/loleaflet/src/control/Control.RowHeader.js b/loleaflet/src/control/Control.RowHeader.js
index 37baaec10..93a99081b 100644
--- a/loleaflet/src/control/Control.RowHeader.js
+++ b/loleaflet/src/control/Control.RowHeader.js
@@ -49,6 +49,13 @@ L.Control.RowHeader = L.Control.Header.extend({
L.DomEvent.on(this._canvas, 'mouseout', this._onMouseOut, this);
L.DomEvent.on(this._canvas, 'click', this._onClick, this);
L.DomEvent.on(this._canvas, 'dblclick', this._onDoubleClick, this);
+ L.DomEvent.on(this._canvas, 'touchstart',
+ function (e) {
+ if (e && e.touches.length > 1) {
+ L.DomEvent.preventDefault(e);
+ }
+ },
+ this);
this._startHeaderIndex = 0;
this._startOffset = 0;
diff --git a/loleaflet/src/control/Control.Tabs.js b/loleaflet/src/control/Control.Tabs.js
index 53cf0a3ff..3c6895356 100644
--- a/loleaflet/src/control/Control.Tabs.js
+++ b/loleaflet/src/control/Control.Tabs.js
@@ -30,6 +30,13 @@ L.Control.Tabs = L.Control.extend({
var map = this._map;
var docContainer = map.options.documentContainer;
this._tabsCont = L.DomUtil.create('div', 'spreadsheet-tabs-container', docContainer.parentElement);
+ L.DomEvent.on(this._tabsCont, 'touchstart',
+ function (e) {
+ if (e && e.touches.length > 1) {
+ L.DomEvent.preventDefault(e);
+ }
+ },
+ this);
$.contextMenu({
selector: '.spreadsheet-tab',
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index 136f22bd1..2bc7ff561 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -703,6 +703,8 @@ L.Map = L.Evented.extend({
this._fileDownloader = L.DomUtil.create('iframe', '', container);
L.DomUtil.setStyle(this._fileDownloader, 'display', 'none');
+ this._resizeDetector.contentWindow.addEventListener('touchstart', L.DomEvent.preventDefault, {passive: false});
+
L.DomEvent.on(this._resizeDetector.contentWindow, 'contextmenu', L.DomEvent.preventDefault);
L.DomEvent.on(this._fileDownloader.contentWindow, 'contextmenu', L.DomEvent.preventDefault);
L.DomEvent.addListener(container, 'scroll', this._onScroll, this);
commit 6be30dac7f032ef6eea38d1dc388beb0ecae6a11
Author: Marco Cecchetti <mrcekets at gmail.com>
AuthorDate: Wed Oct 31 16:11:24 2018 +0100
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:38:59 2018 +0200
loleaflet: mobile ui: polish up-toolbar
Removed statistic data
Added a button for toggle full screen mode
Added a button for going bacj to the file browser view
Undo/Redo buttons are now working
Change-Id: Ib623fe1332a11e0f0ab1abf7f869b0763854090b
diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index a45d1a4e5..be03c514d 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -583,6 +583,8 @@ button.leaflet-control-search-next
.w2ui-icon.insertobjectchart{ background: url('images/lc_drawchart.svg') no-repeat center !important; }
.w2ui-icon.users{ background: url('images/contacts-dark.svg') no-repeat center !important; }
.w2ui-icon.callout{ background: url('images/lc_calloutshapes-black.svg') no-repeat center !important; }
+.w2ui-icon.fullscreen{ background: url('images/lc_fullscreen.svg') no-repeat center !important; }
+.w2ui-icon.closemobile{ background: url('images/lc_closedocmobile.svg') no-repeat center !important; }
.inserttable-pop {
z-index: 1000;
diff --git a/loleaflet/images/lc_closedocmobile.svg b/loleaflet/images/lc_closedocmobile.svg
new file mode 100644
index 000000000..94b0d1cf7
--- /dev/null
+++ b/loleaflet/images/lc_closedocmobile.svg
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="12px" height="20px" viewBox="0 0 12 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!-- Generator: Sketch 51.2 (57519) - http://www.bohemiancoding.com/sketch -->
+ <title>icon / angle left</title>
+ <desc>Created with Sketch.</desc>
+ <defs>
+ <path d="M18.0051546,9.00257732 C18.0051546,9.15893549 17.9450178,9.29725026 17.8247423,9.41752577 L16.9226804,10.3195876 C16.8024049,10.4398631 16.6640901,10.5 16.507732,10.5 C16.3513738,10.5 16.213059,10.4398631 16.0927835,10.3195876 L9.00257732,3.22938144 L1.91237113,10.3195876 C1.79209562,10.4398631 1.65378085,10.5 1.49742268,10.5 C1.34106451,10.5 1.20274974,10.4398631 1.08247423,10.3195876 L0.180412371,9.41752577 C0.0601368557,9.29725026 0,9.15893549 0,9.00257732 C0,8.84621915 0.0601368557,8.70790438 0.180412371,8.58762887 L8.58762887,0.180412371 C8.70790438,0.0601368557 8.84621915,0 9.00257732,0 C9.15893549,0 9.29725026,0.0601368557 9.41752577,0.180412371 L17.8247423,8.58762887 C17.9450178,8.70790438 18.0051546,8.84621915 18.0051546,9.00257732 Z" id="path-1"></path>
+ </defs>
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+ <g id="icons-Docs-" transform="translate(-1414.000000, -84.000000)">
+ <g id="icon-/-angle-up" transform="translate(1415.000000, 103.000000)">
+ <mask id="mask-2" fill="white">
+ <use xlink:href="#path-1"></use>
+ </mask>
+ <use id="angle-up" fill="#0078BF" xlink:href="#path-1" transform="rotate(-90)"></use>
+ <g id="Color/gray-1" mask="url(#mask-2)" fill="#333333" transform="rotate(-90)">
+ <g transform="translate(-3.000000, -7.000000)" id="Gray-1">
+ <rect x="0" y="0" width="24" height="24"></rect>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg>
\ No newline at end of file
diff --git a/loleaflet/images/lc_fullscreen.svg b/loleaflet/images/lc_fullscreen.svg
new file mode 100644
index 000000000..53c560444
--- /dev/null
+++ b/loleaflet/images/lc_fullscreen.svg
@@ -0,0 +1 @@
+<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><rect fill="#4D4D4D" height="20" ry="1" transform="rotate(90)" width="16" x="4" y="-22"/><path d="m5-21h14v18h-14z" fill="#fff" transform="rotate(90)"/><g fill="#4D4D4D" fill-rule="evenodd"><path d="m8.8516862 6.5133237c.1983055.199846.1976726.5223718-.00143.7214422l-3.6151934 3.6142691c-.3063808.30722-.8321661.117235-.8712983-.314836l-.3615198-3.9756962c-.0295972-.3186665.2376535-.5858492.5564018-.5562592l3.9767107.361427c.1197669.011134.2317749.064124.316329.1496531z"/><path d="m15.148318 6.5133247c-.198306.199846-.197673.5223718.0014.7214422l3.61522 3.6142681c.306381.307221.832165.117235.871297-.314836l.36152-3.9756952c.0296-.3186665-.237653-.5858492-.556402-.5562592l-3.976706.361427c-.119767.011134-.231775.064124-.316329.1496531z"/><path d="m8.8516862 17.486676c.1983055-.199846.1976726-.522372-.00143-.721442l-3.6151934-3.614269c-.3063808-.30722-.8321661-.117235-.8712983.314836l-.3615198 3.975696c-.029597.318666.2376535.
585849.5564018.556259l3.9767107-.361427c.1197669-.01113.2317749-.06412.316329-.149653z"/><path d="m15.148318 17.486675c-.198306-.199846-.197673-.522372.0014-.721442l3.61522-3.614268c.306381-.307221.832165-.117235.871297.314836l.36152 3.975695c.0296.318666-.237653.585849-.556402.556259l-3.976706-.361427c-.119767-.01113-.231775-.06412-.316329-.149653z"/></g></svg>
\ No newline at end of file
diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index 33ec6ff10..d063a9398 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -9,6 +9,10 @@
var map;
+function _useSimpleUI() {
+ return L.Browser.mobile && $('#main-menu').css('display') === 'none';
+}
+
function onDelete(e) {
if (e !== false) {
map.deletePage();
@@ -239,6 +243,15 @@ function onClick(e, id, item, subItem) {
else if (id === 'sign') {
map.signDocument();
}
+ else if (id === 'fullscreen') {
+ if (item.checked) {
+ toolbar.uncheck(id);
+ }
+ else {
+ toolbar.check(id);
+ }
+ L.toggleFullScreen();
+ }
}
function setBorders(left, right, bottom, top, horiz, vert) {
@@ -594,7 +607,7 @@ function hideTooltip(toolbar, id) {
if (toolbar.touchStarted) {
setTimeout(function() {
toolbar.tooltipHide(id, {});
- }, 5000)
+ }, 5000);
toolbar.touchStarted = false;
}
}
@@ -616,10 +629,10 @@ function createToolbar() {
]},
{type: 'button', id: 'save', img: 'save', hint: _UNO('.uno:Save')},
{type: 'break', id: 'savebreak'},
- {type: 'button', id: 'undo', img: 'undo', hint: _UNO('.uno:Undo'), uno: 'Undo', disabled: true},
- {type: 'button', id: 'redo', img: 'redo', hint: _UNO('.uno:Redo'), uno: 'Redo', disabled: true},
- {type: 'button', id: 'repair', img: 'repair', hint: _('Document repair'), disabled: true},
- {type: 'break'},
+ {type: 'button', id: 'undo', img: 'undo', hint: _UNO('.uno:Undo'), uno: 'Undo', disabled: true, mobile: false},
+ {type: 'button', id: 'redo', img: 'redo', hint: _UNO('.uno:Redo'), uno: 'Redo', disabled: true, mobile: false},
+ {type: 'button', id: 'repair', img: 'repair', hint: _('Document repair'), disabled: true, mobile: false},
+ {type: 'break', mobile: false},
{type: 'html', id: 'styles', html: '<select class="styles-select"></select>', mobile: false},
{type: 'html', id: 'fonts', html: '<select class="fonts-select"></select>', mobile: false},
{type: 'html', id: 'fontsizes', html: '<select class="fontsizes-select"></select>', mobile: false},
@@ -693,7 +706,7 @@ function createToolbar() {
{type: 'button', id: 'specialcharacter', img: 'specialcharacter', hint: _UNO('.uno:InsertSymbol', '', true), uno: '.uno:InsertSymbol'}
];
- if (L.Browser.mobile && $('#main-menu').css('display') === 'none') {
+ if (_useSimpleUI()) {
initMobileToolbar(toolItems);
} else {
initNormalToolbar(toolItems);
@@ -707,9 +720,11 @@ function initMobileToolbar(toolItems) {
tooltip: 'bottom',
items: [
{type: 'button', id: 'doclogo', img: 'doclogo'},
+ {type: 'button', id: 'close', img: 'closemobile'},
{type: 'spacer'},
{type: 'button', id: 'undo', img: 'undo', hint: _UNO('.uno:Undo'), uno: 'Undo', disabled: true},
{type: 'button', id: 'redo', img: 'redo', hint: _UNO('.uno:Redo'), uno: 'Redo', disabled: true},
+ {type: 'button', id: 'fullscreen', img: 'fullscreen', hint: _UNO('.uno:FullScreen', 'text')},
{type: 'button', id: 'users', img: 'users'},
{type: 'button', id: 'callout', img: 'callout'},
],
@@ -757,7 +772,7 @@ function initMobileToolbar(toolItems) {
e.isCancelled = true;
});
- toolbar = $('#spreadsheet-toolbar')
+ toolbar = $('#spreadsheet-toolbar');
toolbar.w2toolbar({
name: 'spreadsheet-toolbar',
tooltip: 'bottom',
@@ -1374,36 +1389,38 @@ function onDocLayerInit() {
switch (docType) {
case 'spreadsheet':
toolbarUp.remove('inserttable', 'styles', 'justifypara', 'defaultbullet', 'defaultnumbering', 'break-numbering');
- statusbar.insert('left', [
- {type: 'break', id:'break1'},
- {type: 'html', id: 'StatusDocPos',
- html: '<div id="StatusDocPos" class="loleaflet-font" title="'+_('Number of Sheets')+ '" style="padding: 5px 5px;">  </div>' },
- {type: 'break', id:'break2'},
- {type: 'html', id: 'RowColSelCount',
- html: '<div id="RowColSelCount" class="loleaflet-font" title="'+_('Selected range of cells')+ '" style="padding: 5px 5px;">  </div>' },
- {type: 'break', id:'break3'},
- {type: 'html', id: 'InsertMode', mobile: false,
- html: '<div id="InsertMode" class="loleaflet-font" title="'+_('Entering text mode')+ '" style="padding: 5px 5px;">  </div>' },
- {type: 'break', id:'break4'},
- {type: 'html', id: 'LanguageStatus', mobile: false,
- html: '<div id="LanguageStatus" class="loleaflet-font" title="'+_('Text Language')+ '" style="padding: 5px 5px;">  </div>' },
- {type: 'break', id:'break5'},
- {type: 'html', id: 'StatusSelectionMode', mobile: false,
- html: '<div id="StatusSelectionMode" class="loleaflet-font" title="'+_('Selection Mode')+ '" style="padding: 5px 5px;">  </div>' },
- {type: 'break', id:'break8', mobile: false},
- {type: 'html', id: 'StateTableCell', mobile:false,
- html: '<div id="StateTableCell" class="loleaflet-font" title="'+_('Choice of functions')+ '" style="padding: 5px 5px;">  </div>' },
- {type: 'menu-check', id: 'StateTableCellMenu', caption: '', selected: ['2', '512'], items: [
- { id: '2', text: _('Average')},
- { id: '8', text: _('CountA')},
- { id: '4', text: _('Count')},
- { id: '16', text: _('Maximum')},
- { id: '32', text: _('Minimum')},
- { id: '512', text: _('Sum')},
- { id: '8192', text: _('Selection count')},
- { id: '1', text: _('None')}
- ]}
- ]);
+ if (!_useSimpleUI()) {
+ statusbar.insert('left', [
+ {type: 'break', id:'break1'},
+ {type: 'html', id: 'StatusDocPos',
+ html: '<div id="StatusDocPos" class="loleaflet-font" title="'+_('Number of Sheets')+ '" style="padding: 5px 5px;">  </div>' },
+ {type: 'break', id:'break2'},
+ {type: 'html', id: 'RowColSelCount',
+ html: '<div id="RowColSelCount" class="loleaflet-font" title="'+_('Selected range of cells')+ '" style="padding: 5px 5px;">  </div>' },
+ {type: 'break', id:'break3'},
+ {type: 'html', id: 'InsertMode', mobile: false,
+ html: '<div id="InsertMode" class="loleaflet-font" title="'+_('Entering text mode')+ '" style="padding: 5px 5px;">  </div>' },
+ {type: 'break', id:'break4'},
+ {type: 'html', id: 'LanguageStatus', mobile: false,
+ html: '<div id="LanguageStatus" class="loleaflet-font" title="'+_('Text Language')+ '" style="padding: 5px 5px;">  </div>' },
+ {type: 'break', id:'break5'},
+ {type: 'html', id: 'StatusSelectionMode', mobile: false,
+ html: '<div id="StatusSelectionMode" class="loleaflet-font" title="'+_('Selection Mode')+ '" style="padding: 5px 5px;">  </div>' },
+ {type: 'break', id:'break8', mobile: false},
+ {type: 'html', id: 'StateTableCell', mobile:false,
+ html: '<div id="StateTableCell" class="loleaflet-font" title="'+_('Choice of functions')+ '" style="padding: 5px 5px;">  </div>' },
+ {type: 'menu-check', id: 'StateTableCellMenu', caption: '', selected: ['2', '512'], items: [
+ { id: '2', text: _('Average')},
+ { id: '8', text: _('CountA')},
+ { id: '4', text: _('Count')},
+ { id: '16', text: _('Maximum')},
+ { id: '32', text: _('Minimum')},
+ { id: '512', text: _('Sum')},
+ { id: '8192', text: _('Selection count')},
+ { id: '1', text: _('None')}
+ ]}
+ ]);
+ }
// Remove irrelevant toolbars
$('#presentation-toolbar').hide();
@@ -1411,23 +1428,25 @@ function onDocLayerInit() {
break;
case 'text':
toolbarUp.remove('wraptextseparator', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending', 'setborderstyle', 'conditionalformaticonset');
- statusbar.insert('left', [
- {type: 'break', id: 'break1'},
- {type: 'html', id: 'StatePageNumber',
- html: '<div id="StatePageNumber" class="loleaflet-font" title="'+_('Number of Pages')+ '" style="padding: 5px 5px;">  </div>' },
- {type: 'break', id:'break2'},
- {type: 'html', id: 'StateWordCount', mobile: false,
- html: '<div id="StateWordCount" class="loleaflet-font" title="'+_('Word Counter')+ '" style="padding: 5px 5px;">  </div>' },
- {type: 'break', id:'break5', mobile: false},
- {type: 'html', id: 'InsertMode', mobile: false,
- html: '<div id="InsertMode" class="loleaflet-font" title="'+_('Entering text mode')+ '" style="padding: 5px 5px;">  </div>' },
- {type: 'break', id:'break6', mobile:false},
- {type: 'html', id: 'StatusSelectionMode', mobile: false,
- html: '<div id="StatusSelectionMode" class="loleaflet-font" title="'+_('Selection Mode')+ '" style="padding: 5px 5px;">  </div>' },
- {type: 'break', id:'break7', mobile:false},
- {type: 'html', id: 'LanguageStatus', mobile: false,
- html: '<div id="LanguageStatus" class="loleaflet-font" title="'+_('Text Language')+ '" style="padding: 5px 5px;">  </div>' }
- ]);
+ if (!_useSimpleUI()) {
+ statusbar.insert('left', [
+ {type: 'break', id: 'break1'},
+ {type: 'html', id: 'StatePageNumber',
+ html: '<div id="StatePageNumber" class="loleaflet-font" title="'+_('Number of Pages')+ '" style="padding: 5px 5px;">  </div>' },
+ {type: 'break', id:'break2'},
+ {type: 'html', id: 'StateWordCount', mobile: false,
+ html: '<div id="StateWordCount" class="loleaflet-font" title="'+_('Word Counter')+ '" style="padding: 5px 5px;">  </div>' },
+ {type: 'break', id:'break5', mobile: false},
+ {type: 'html', id: 'InsertMode', mobile: false,
+ html: '<div id="InsertMode" class="loleaflet-font" title="'+_('Entering text mode')+ '" style="padding: 5px 5px;">  </div>' },
+ {type: 'break', id:'break6', mobile:false},
+ {type: 'html', id: 'StatusSelectionMode', mobile: false,
+ html: '<div id="StatusSelectionMode" class="loleaflet-font" title="'+_('Selection Mode')+ '" style="padding: 5px 5px;">  </div>' },
+ {type: 'break', id:'break7', mobile:false},
+ {type: 'html', id: 'LanguageStatus', mobile: false,
+ html: '<div id="LanguageStatus" class="loleaflet-font" title="'+_('Text Language')+ '" style="padding: 5px 5px;">  </div>' }
+ ]);
+ }
// Remove irrelevant toolbars
$('#formulabar').hide();
@@ -1442,14 +1461,20 @@ function onDocLayerInit() {
presentationToolbar.show('presentation', 'presentationbreak');
}
toolbarUp.remove('insertannotation', 'wraptextseparator', 'wraptext', 'togglemergecells', 'break-toggle', 'numberformatcurrency', 'numberformatpercent', 'numberformatdecimal', 'numberformatdate', 'numberformatincdecimals', 'numberformatdecdecimals', 'break-number', 'sortascending', 'sortdescending', 'setborderstyle', 'conditionalformaticonset');
- statusbar.insert('left', [
- {type: 'break', id:'break1'},
- {type: 'html', id: 'PageStatus',
- html: '<div id="PageStatus" class="loleaflet-font" title="'+_('Number of Slides')+ '" style="padding: 5px 5px;">  </div>' },
- {type: 'break', id:'break2', mobile:false},
- {type: 'html', id: 'LanguageStatus', mobile: false,
- html: '<div id="LanguageStatus" class="loleaflet-font" title="'+_('Text Language')+ '" style="padding: 5px 5px;">  </div>' }
- ]);
+ if (!_useSimpleUI()) {
+ statusbar.insert('left', [
+ {type: 'break', id: 'break1'},
+ {
+ type: 'html', id: 'PageStatus',
+ html: '<div id="PageStatus" class="loleaflet-font" title="' + _('Number of Slides') + '" style="padding: 5px 5px;">  </div>'
+ },
+ {type: 'break', id: 'break2', mobile: false},
+ {
+ type: 'html', id: 'LanguageStatus', mobile: false,
+ html: '<div id="LanguageStatus" class="loleaflet-font" title="' + _('Text Language') + '" style="padding: 5px 5px;">  </div>'
+ }
+ ]);
+ }
// Remove irrelevant toolbars
$('#formulabar').hide();
@@ -1676,11 +1701,15 @@ function onCommandStateChanged(e) {
// Change the toolbar button states if we are in editmode
// If in non-edit mode, will be taken care of when permission is changed to 'edit'
else if (map._permission === 'edit' && (state === 'enabled' || state === 'disabled')) {
+ var toolbarUp = toolbar;
+ if (_useSimpleUI()) {
+ toolbarUp = statusbar;
+ }
if (state === 'enabled') {
- toolbar.enable(id);
+ toolbarUp.enable(id);
} else {
- toolbar.uncheck(id);
- toolbar.disable(id);
+ toolbarUp.uncheck(id);
+ toolbarUp.disable(id);
}
}
}
diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js
index 4dbae71f5..a14603c13 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -706,28 +706,7 @@ L.Control.Menubar = L.Control.extend({
} else if (id === 'zoomreset') {
this._map.setZoom(this._map.options.zoom);
} else if (id === 'fullscreen') {
- if (!document.fullscreenElement &&
- !document.mozFullscreenElement &&
- !document.msFullscreenElement &&
- !document.webkitFullscreenElement) {
- if (document.documentElement.requestFullscreen) {
- document.documentElement.requestFullscreen();
- } else if (document.documentElement.msRequestFullscreen) {
- document.documentElement.msRequestFullscreen();
- } else if (document.documentElement.mozRequestFullScreen) {
- document.documentElement.mozRequestFullScreen();
- } else if (document.documentElement.webkitRequestFullscreen) {
- document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
- }
- } else if (document.exitFullscreen) {
- document.exitFullscreen();
- } else if (document.msExitFullscreen) {
- document.msExitFullscreen();
- } else if (document.mozCancelFullScreen) {
- document.mozCancelFullScreen();
- } else if (document.webkitExitFullscreen) {
- document.webkitExitFullscreen();
- }
+ L.toggleFullScreen();
} else if (id === 'fullscreen-presentation' && this._map.getDocType() === 'presentation') {
this._map.fire('fullscreen');
} else if (id === 'insertpage') {
diff --git a/loleaflet/src/core/Util.js b/loleaflet/src/core/Util.js
index ff36cc6cd..5d25f5ec5 100644
--- a/loleaflet/src/core/Util.js
+++ b/loleaflet/src/core/Util.js
@@ -166,6 +166,31 @@ L.Util = {
}
return dpiScale;
+ },
+
+ toggleFullScreen: function() {
+ if (!document.fullscreenElement &&
+ !document.mozFullscreenElement &&
+ !document.msFullscreenElement &&
+ !document.webkitFullscreenElement) {
+ if (document.documentElement.requestFullscreen) {
+ document.documentElement.requestFullscreen();
+ } else if (document.documentElement.msRequestFullscreen) {
+ document.documentElement.msRequestFullscreen();
+ } else if (document.documentElement.mozRequestFullScreen) {
+ document.documentElement.mozRequestFullScreen();
+ } else if (document.documentElement.webkitRequestFullscreen) {
+ document.documentElement.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
+ }
+ } else if (document.exitFullscreen) {
+ document.exitFullscreen();
+ } else if (document.msExitFullscreen) {
+ document.msExitFullscreen();
+ } else if (document.mozCancelFullScreen) {
+ document.mozCancelFullScreen();
+ } else if (document.webkitExitFullscreen) {
+ document.webkitExitFullscreen();
+ }
}
};
@@ -214,3 +239,4 @@ L.stamp = L.Util.stamp;
L.setOptions = L.Util.setOptions;
L.round = L.Util.round;
L.getDpiScaleFactor = L.Util.getDpiScaleFactor;
+L.toggleFullScreen = L.Util.toggleFullScreen;
commit f8c5310fff75eca6a4f1293434e000737525cfee
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Mon Oct 29 20:17:17 2018 +0100
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:38:47 2018 +0200
Disable the 'pull to reload' gesture.
Change-Id: I35b722c15386beae75975dffb39341e4aeb34b02
diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index c5124aae5..36c8aa51d 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -45,6 +45,7 @@
body {
margin: 0;
overflow: hidden;
+ overscroll-behavior-y: none; /* disable the pull to reload gesture */
}
#presentation-controls-wrapper {
commit d38e394d1062b05fe7bacaa3f506a1eb69aefb7f
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Oct 26 14:44:41 2018 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:38:37 2018 +0200
hidpi dialogs: Make them work now.
Change-Id: I4cc4772748aeee753e283a3f8ec8ef58809439a4
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 17363db0a..1f03ad3f7 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -66,14 +66,16 @@ L.Control.LokDialog = L.Control.extend({
if (!y)
y = 0;
- return [x, y, width, height].join(',');
+ // pre-multiplied by the scale factor
+ var dpiscale = L.getDpiScaleFactor();
+ return [x * dpiscale, y * dpiscale, width * dpiscale, height * dpiscale].join(',');
},
_sendPaintWindow: function(id, rectangle) {
if (rectangle)
rectangle = rectangle.replace(/ /g, '');
- var dpiscale = 2.0; //window.devicePixelRatio;
+ var dpiscale = L.getDpiScaleFactor();
console.log('_sendPaintWindow: rectangle: ' + rectangle + ', dpiscale: ' + dpiscale);
this._map._socket.sendMessage('paintwindow ' + id + (rectangle ? ' rectangle=' + rectangle + ' dpiscale=' + dpiscale : ''));
},
@@ -131,13 +133,21 @@ L.Control.LokDialog = L.Control.extend({
var parent = this._getParentDialog(e.id);
var rectangle = e.rectangle;
if (parent) { // this is a floating window
- rectangle = '0,0,' + this._dialogs[parent].childwidth + ',' + this._dialogs[parent].childheight;
- } else { // this is the actual dialog
- if (rectangle && !this._isRectangleValid(rectangle))
+ rectangle = this._createRectStr(null, 0, 0, this._dialogs[parent].childwidth, this._dialogs[parent].childheight);
+ } else if (rectangle) { // this is the actual dialog
+ if (this._isRectangleValid(rectangle)) {
+ rectangle = e.rectangle.split(',');
+ x = parseInt(rectangle[0]);
+ y = parseInt(rectangle[1]);
+ width = parseInt(rectangle[2]);
+ height = parseInt(rectangle[3]);
+
+ rectangle = this._createRectStr(null, x, y, width, height);
+ } else {
return;
-
- if (!rectangle)
- rectangle = '0,0,' + this._dialogs[e.id].width + ',' + this._dialogs[e.id].height;
+ }
+ } else {
+ rectangle = this._createRectStr(e.id);
}
this._sendPaintWindow(e.id, rectangle);
} else if (e.action === 'size_changed') {
@@ -235,6 +245,15 @@ L.Control.LokDialog = L.Control.extend({
this._dialogs[dlgId].input.focus();
},
+ _setCanvasWidthHeight: function(canvas, width, height) {
+ L.DomUtil.setStyle(canvas, 'width', width + 'px');
+ L.DomUtil.setStyle(canvas, 'height', height + 'px');
+
+ var scale = L.getDpiScaleFactor();
+ canvas.width = width * scale;
+ canvas.height = height * scale;
+ },
+
_launchDialog: function(strDlgId, leftTwips, topTwips, width, height, title) {
this.onCloseCurrentPopUp();
var dialogContainer = L.DomUtil.create('div', 'lokdialog', document.body);
@@ -243,8 +262,7 @@ L.Control.LokDialog = L.Control.extend({
dialogContainer.id = strDlgId;
var dialogCanvas = L.DomUtil.create('canvas', 'lokdialog_canvas', dialogContainer);
- dialogCanvas.width = width;
- dialogCanvas.height = height;
+ this._setCanvasWidthHeight(dialogCanvas, width, height);
dialogCanvas.id = strDlgId + '-canvas';
L.DomEvent.on(dialogCanvas, 'contextmenu', L.DomEvent.preventDefault);
@@ -419,10 +437,8 @@ L.Control.LokDialog = L.Control.extend({
if (!canvas)
return; // no floating window to paint to
- if (width !== canvas.width)
- canvas.width = width;
- if (height !== canvas.height)
- canvas.height = height;
+ this._setCanvasWidthHeight(canvas, width, height);
+
var ctx = canvas.getContext('2d');
img.onload = function() {
ctx.drawImage(img, 0, 0);
diff --git a/loleaflet/src/core/Util.js b/loleaflet/src/core/Util.js
index 18e7e4c89..ff36cc6cd 100644
--- a/loleaflet/src/core/Util.js
+++ b/loleaflet/src/core/Util.js
@@ -160,7 +160,12 @@ L.Util = {
emptyImageUrl: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=',
getDpiScaleFactor: function() {
- return window.devicePixelRatio ? Math.ceil(window.devicePixelRatio) : 1;
+ var dpiScale = window.devicePixelRatio ? Math.ceil(window.devicePixelRatio) : 1;
+ if (dpiScale == 1 && L.Browser.retina) {
+ dpiScale = 2;
+ }
+
+ return dpiScale;
}
};
commit 2a8626098801e2bd8a4307cf65ab7baa498e0b4a
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
AuthorDate: Tue Oct 23 15:42:12 2018 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:38:20 2018 +0200
hidpi dialogs: passing dpi scale value with the paintwindow msg
Change-Id: Icd0f48c98410af32e65bb44c413dfeb078ab8774
diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
index 27d968c4a..4409e62ec 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
@@ -347,6 +347,15 @@ struct _LibreOfficeKitDocumentClass
/// @see lok::Document::getSignatureState().
int (*getSignatureState) (LibreOfficeKitDocument* pThis);
+ /// Paints window with given id to the buffer with the give DPI scale
+ /// (every pixel is dpiscale-times larger).
+ /// @see lok::Document::paintWindow().
+ void (*paintWindowDPI) (LibreOfficeKitDocument* pThis, unsigned nWindowId,
+ unsigned char* pBuffer,
+ const int x, const int y,
+ const int width, const int height,
+ const double dpiscale);
+
#endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
};
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 9462e2adc..cff93a276 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -1045,6 +1045,7 @@ bool ChildSession::renderWindow(const char* /*buffer*/, int /*length*/, const st
int startX = 0, startY = 0;
int bufferWidth = 800, bufferHeight = 600;
+ double dpiScale = 1.0;
std::string paintRectangle;
if (tokens.size() > 2 && getTokenString(tokens[2], "rectangle", paintRectangle))
{
@@ -1053,6 +1054,14 @@ bool ChildSession::renderWindow(const char* /*buffer*/, int /*length*/, const st
startY = std::atoi(rectParts[1].c_str());
bufferWidth = std::atoi(rectParts[2].c_str());
bufferHeight = std::atoi(rectParts[3].c_str());
+
+ std::string dpiScaleString;
+ if (tokens.size() > 3 && getTokenString(tokens[3], "dpiscale", dpiScaleString))
+ {
+ dpiScale = std::stod(dpiScaleString);
+ if (dpiScale < 0.001)
+ dpiScale = 1.0;
+ }
}
else
LOG_WRN("windowpaint command doesn't specify a rectangle= attribute.");
@@ -1062,11 +1071,12 @@ bool ChildSession::renderWindow(const char* /*buffer*/, int /*length*/, const st
int width = bufferWidth, height = bufferHeight;
std::string response;
Timestamp timestamp;
- getLOKitDocument()->paintWindow(winId, pixmap.data(), startX, startY, width, height);
+ getLOKitDocument()->paintWindow(winId, pixmap.data(), startX, startY, width, height, dpiScale);
const double area = width * height;
LOG_TRC("paintWindow for " << winId << " returned " << width << "X" << height
<< "@(" << startX << "," << startY << ")"
- << "and rendered in " << (timestamp.elapsed()/1000.)
+ << " with dpi scale: " << dpiScale
+ << " and rendered in " << (timestamp.elapsed()/1000.)
<< "ms (" << area / (timestamp.elapsed()) << " MP/s).");
response = "windowpaint: id=" + tokens[1] +
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index 7f9c162ff..17363db0a 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -73,7 +73,9 @@ L.Control.LokDialog = L.Control.extend({
if (rectangle)
rectangle = rectangle.replace(/ /g, '');
- this._map._socket.sendMessage('paintwindow ' + id + (rectangle ? ' rectangle=' + rectangle : ''));
+ var dpiscale = 2.0; //window.devicePixelRatio;
+ console.log('_sendPaintWindow: rectangle: ' + rectangle + ', dpiscale: ' + dpiscale);
+ this._map._socket.sendMessage('paintwindow ' + id + (rectangle ? ' rectangle=' + rectangle + ' dpiscale=' + dpiscale : ''));
},
_sendCloseWindow: function(id) {
commit d85c601fc19d32715418051b672e98d1b3e9a72a
Author: Marco Cecchetti <marco.cecchetti at collabora.com>
AuthorDate: Wed Oct 24 11:05:30 2018 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:38:10 2018 +0200
calc: hidpi row/column headers
Change-Id: I1edb248ca344261dc55eddc28d2a621a3d1aa314
diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js
index e0d2134dd..f8fe19ec5 100644
--- a/loleaflet/src/control/Control.ColumnHeader.js
+++ b/loleaflet/src/control/Control.ColumnHeader.js
@@ -36,8 +36,12 @@ L.Control.ColumnHeader = L.Control.Header.extend({
this._canvasContext = this._canvas.getContext('2d');
this._setCanvasWidth();
this._setCanvasHeight();
- this._headerHeight = this._canvas.height;
- L.Control.Header.colHeaderHeight = this._canvas.height;
+
+ var scale = L.getDpiScaleFactor();
+ this._canvasContext.scale(scale, scale);
+
+ this._headerHeight = this._canvasHeight;
+ L.Control.Header.colHeaderHeight = this._canvasHeight;
L.DomUtil.setStyle(this._canvas, 'cursor', this._cursor);
@@ -194,7 +198,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({
var ctx = this._canvasContext;
var content = this._colIndexToAlpha(entry.index + this._startHeaderIndex);
- var startOrt = this._canvas.height - this._headerHeight;
+ var startOrt = this._canvasHeight - this._headerHeight;
var startPar = entry.pos - entry.size - this._startOffset;
var endPar = entry.pos - this._startOffset;
var width = endPar - startPar;
@@ -208,6 +212,8 @@ L.Control.ColumnHeader = L.Control.Header.extend({
return;
ctx.save();
+ var scale = L.getDpiScaleFactor();
+ ctx.scale(scale, scale);
ctx.translate(this._position + this._startOffset, 0);
// background gradient
var selectionBackgroundGradient = null;
@@ -219,7 +225,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({
}
// draw header/outline border separator
- if (this._headerHeight !== this._canvas.height) {
+ if (this._headerHeight !== this._canvasHeight) {
ctx.fillStyle = this._borderColor;
ctx.fillRect(startPar, startOrt - this._borderWidth, width, this._borderWidth);
}
@@ -261,6 +267,9 @@ L.Control.ColumnHeader = L.Control.Header.extend({
var height = group.endPos - group.startPos;
ctx.save();
+ var scale = L.getDpiScaleFactor();
+ ctx.scale(scale, scale);
+
ctx.translate(this._position + this._startOffset, 0);
// clip mask
ctx.beginPath();
@@ -415,7 +424,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({
if (this._groups) {
this.resize(this._computeOutlineWidth() + this._borderWidth + this._headerHeight);
}
- else if (this._canvas.height !== this._headerHeight) {
+ else if (this._canvasHeight !== this._headerHeight) {
this.resize(this._headerHeight);
}
@@ -645,7 +654,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({
var document = L.DomUtil.get('document-container');
this._setCornerCanvasHeight(height);
- var deltaTop = height - this._canvas.height;
+ var deltaTop = height - this._canvasHeight;
var rowHdrTop = parseInt(L.DomUtil.getStyle(rowHeader, 'top')) + deltaTop;
var docTop = parseInt(L.DomUtil.getStyle(document, 'top')) + deltaTop;
L.DomUtil.setStyle(rowHeader, 'top', rowHdrTop + 'px');
diff --git a/loleaflet/src/control/Control.Header.js b/loleaflet/src/control/Control.Header.js
index 61dc320a2..64de13d1c 100644
--- a/loleaflet/src/control/Control.Header.js
+++ b/loleaflet/src/control/Control.Header.js
@@ -14,6 +14,8 @@ L.Control.Header = L.Control.extend({
this.converter = null;
this._canvas = null;
+ this._canvasWidth = 0;
+ this._canvasHeight = 0;
this._clicks = 0;
this._current = -1;
this._selection = {start: -1, end: -1};
@@ -469,7 +471,16 @@ L.Control.Header = L.Control.extend({
else {
L.DomUtil.setStyle(container, property, value + 'px');
}
- canvas[property] = value;
+
+ var scale = L.getDpiScaleFactor();
+ if (property === 'width') {
+ canvas.width = value * scale;
+ this._canvasWidth = value;
+ }
+ else if (property === 'height') {
+ canvas.height = value * scale;
+ this._canvasHeight = value;
+ }
},
_setCanvasWidth: function (width) {
@@ -514,9 +525,9 @@ L.Control.Header = L.Control.extend({
getOutlineWidth: function () {
if (this._isColumn)
- return this._canvas.height - this._borderWidth - this._headerHeight;
+ return this._canvasHeight - this._borderWidth - this._headerHeight;
else
- return this._canvas.width - this._borderWidth - this._headerWidth;
+ return this._canvasWidth - this._borderWidth - this._headerWidth;
},
_collectGroupsData: function(groups) {
@@ -588,6 +599,9 @@ L.Control.Header = L.Control.extend({
return;
ctx.save();
+ var scale = L.getDpiScaleFactor();
+ ctx.scale(scale, scale);
+
ctx.fillStyle = this._borderColor;
if (this._isColumn) {
var startY = this._cornerCanvas.height - (L.Control.Header.colHeaderHeight + this._borderWidth);
diff --git a/loleaflet/src/control/Control.RowHeader.js b/loleaflet/src/control/Control.RowHeader.js
index 0475342b4..37baaec10 100644
--- a/loleaflet/src/control/Control.RowHeader.js
+++ b/loleaflet/src/control/Control.RowHeader.js
@@ -37,8 +37,11 @@ L.Control.RowHeader = L.Control.Header.extend({
this._canvasContext = this._canvas.getContext('2d');
this._setCanvasWidth();
this._setCanvasHeight();
- this._headerWidth = this._canvas.width;
- L.Control.Header.rowHeaderWidth = this._canvas.width;
+
+ var scale = L.getDpiScaleFactor();
+ this._canvasContext.scale(scale, scale);
+ this._headerWidth = this._canvasWidth;
+ L.Control.Header.rowHeaderWidth = this._canvasWidth;
L.DomUtil.setStyle(this._canvas, 'cursor', this._cursor);
@@ -187,7 +190,7 @@ L.Control.RowHeader = L.Control.Header.extend({
var ctx = this._canvasContext;
var content = entry.index + this._startHeaderIndex;
- var startOrt = this._canvas.width - this._headerWidth;
+ var startOrt = this._canvasWidth - this._headerWidth;
var startPar = entry.pos - entry.size - this._startOffset;
var endPar = entry.pos - this._startOffset;
var height = endPar - startPar;
@@ -201,6 +204,8 @@ L.Control.RowHeader = L.Control.Header.extend({
return;
ctx.save();
+ var scale = L.getDpiScaleFactor();
+ ctx.scale(scale, scale);
ctx.translate(0, this._position + this._startOffset);
// background gradient
var selectionBackgroundGradient = null;
@@ -212,7 +217,7 @@ L.Control.RowHeader = L.Control.Header.extend({
}
// draw header/outline border separator
- if (this._headerWidth !== this._canvas.width) {
+ if (this._headerWidth !== this._canvasWidth) {
ctx.fillStyle = this._borderColor;
ctx.fillRect(startOrt - this._borderWidth, startPar, this._borderWidth, height);
}
@@ -250,6 +255,9 @@ L.Control.RowHeader = L.Control.Header.extend({
var height = group.endPos - group.startPos;
ctx.save();
+ var scale = L.getDpiScaleFactor();
+ ctx.scale(scale, scale);
+
ctx.translate(0, this._position + this._startOffset);
// clip mask
ctx.beginPath();
@@ -404,7 +412,7 @@ L.Control.RowHeader = L.Control.Header.extend({
if (this._groups) {
this.resize(this._computeOutlineWidth() + this._borderWidth + this._headerWidth);
}
- else if (this._canvas.width !== this._headerWidth) {
+ else if (this._canvasWidth !== this._headerWidth) {
this.resize(this._headerWidth);
}
@@ -610,7 +618,7 @@ L.Control.RowHeader = L.Control.Header.extend({
this._setCornerCanvasWidth(width);
- var deltaLeft = width - this._canvas.width;
+ var deltaLeft = width - this._canvasWidth;
var colHdrLeft = parseInt(L.DomUtil.getStyle(columnHeader, 'left')) + deltaLeft;
var docLeft = parseInt(L.DomUtil.getStyle(document, 'left')) + deltaLeft;
L.DomUtil.setStyle(columnHeader, 'left', colHdrLeft + 'px');
diff --git a/loleaflet/src/core/Util.js b/loleaflet/src/core/Util.js
index b238cd41b..18e7e4c89 100644
--- a/loleaflet/src/core/Util.js
+++ b/loleaflet/src/core/Util.js
@@ -157,7 +157,11 @@ L.Util = {
},
// minimal image URI, set to an image when disposing to flush memory
- emptyImageUrl: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='
+ emptyImageUrl: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=',
+
+ getDpiScaleFactor: function() {
+ return window.devicePixelRatio ? Math.ceil(window.devicePixelRatio) : 1;
+ }
};
(function () {
@@ -204,3 +208,4 @@ L.bind = L.Util.bind;
L.stamp = L.Util.stamp;
L.setOptions = L.Util.setOptions;
L.round = L.Util.round;
+L.getDpiScaleFactor = L.Util.getDpiScaleFactor;
commit 13f1cafec2c0f666b2a0b0d912acfa54fa007ce3
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Thu Oct 25 15:22:54 2018 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:38:00 2018 +0200
Calc: Enable hidpi and zooming again.
Change-Id: Iada0efb81c71e0749814535855a0d9e4e1dcf1f1
diff --git a/loleaflet/js/toolbar.js b/loleaflet/js/toolbar.js
index 4c69cb027..33ec6ff10 100644
--- a/loleaflet/js/toolbar.js
+++ b/loleaflet/js/toolbar.js
@@ -1374,7 +1374,6 @@ function onDocLayerInit() {
switch (docType) {
case 'spreadsheet':
toolbarUp.remove('inserttable', 'styles', 'justifypara', 'defaultbullet', 'defaultnumbering', 'break-numbering');
- statusbar.disable('zoomreset', 'zoomout', 'zoomin', 'zoomlevel');
statusbar.insert('left', [
{type: 'break', id:'break1'},
{type: 'html', id: 'StatusDocPos',
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index cb989490e..bbd18f4e3 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -65,7 +65,7 @@ L.TileLayer = L.GridLayer.extend({
this._tileHeightPx = options.tileSize;
// detecting retina displays, adjusting tileWidthPx, tileHeightPx and zoom levels
- if (options.docType !== 'spreadsheet' && options.detectRetina && L.Browser.retina && options.maxZoom > 0) {
+ if (options.detectRetina && L.Browser.retina && options.maxZoom > 0) {
this._tileWidthPx *= 2;
this._tileHeightPx *= 2;
options.zoomOffset++;
commit dd79dbbe6a44b2a58d95e457af2854132dbb2aeb
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Oct 11 10:27:24 2018 -0400
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:37:51 2018 +0200
loleaflet: mobile: ensure to hide the document title
Change-Id: Ia5bd346ab96b98554bc5f2609d81399db1a17031
diff --git a/loleaflet/css/menubar.css b/loleaflet/css/menubar.css
index b34daa8cb..a20cb85c7 100644
--- a/loleaflet/css/menubar.css
+++ b/loleaflet/css/menubar.css
@@ -200,6 +200,10 @@
display: none;
}
+ .document-title {
+ display: none;
+ }
+
/* hide the menu in mobile view */
#main-menu-state:not(:checked) ~ #main-menu {
display: none;
commit 511c59108a74a7d600aaf20029aa80221339214d
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Tue Oct 9 21:54:44 2018 -0400
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Mon Nov 19 13:37:27 2018 +0200
loleaflet: mobile: add context toolbar
Change-Id: I8cf5d0043022efebc022da70e3a99edcc2f96cb7
diff --git a/loleaflet/build/deps.js b/loleaflet/build/deps.js
index 7bfa3e4bc..29a2b9e70 100644
--- a/loleaflet/build/deps.js
+++ b/loleaflet/build/deps.js
@@ -301,6 +301,13 @@ var deps = {
desc: 'Mobile Input'
},
+ ControlContextToolbar: {
+ src: ['control/Control.js',
+ 'control/Control.ContextToolbar.js'],
+ heading: 'Controls',
+ desc: 'Context Toolbar'
+ },
+
ControlRowHeader: {
src: ['control/Control.js',
'control/Control.RowHeader.js'],
diff --git a/loleaflet/css/loleaflet.css b/loleaflet/css/loleaflet.css
index 763dc656e..c5124aae5 100644
--- a/loleaflet/css/loleaflet.css
+++ b/loleaflet/css/loleaflet.css
@@ -149,17 +149,23 @@ body {
opacity: 0;
}
-.loleaflet-mobile-table {
- background-color: transparent;
+.loleaflet-context-table {
+ table-layout: fixed;
+ background-color: #efefef;
border-collapse: separate;
border-spacing: 0;
border: none;
+ width: 100%;
}
-.loleaflet-mobile-button {
+.loleaflet-context-button {
width: 40px;
height: 40px;
- display: inline-block;
+}
+
+.loleaflet-context-down {
+ border: 1px solid #aaaaaa;
+ background-color: #dddddd;
}
.loleaflet-mobile-input {
@@ -168,6 +174,12 @@ body {
border: 0px;
}
+.loleaflet-context-toolbar {
+ position: absolute;
+ float: none;
+ border: 1px solid #999;
+}
+
/* Important to override context-menu-icon's font-family here otherwise, jquery-contextmenu.css
* will try to load its own font file which is not available in dist/ */
.context-menu-icon::before {
@@ -287,16 +299,16 @@ body {
background: url('images/lc_rejecttrackedchange.svg') no-repeat center !important;
}
-.loleaflet-mobile-copy {
- background: url('images/copy.svg') no-repeat center !important;
+.loleaflet-context-copy {
+ background: url('images/lc_copy.svg') no-repeat center !important;
}
-.loleaflet-mobile-cut {
- background: url('images/cut.svg') no-repeat center !important;
+.loleaflet-context-cut {
+ background: url('images/lc_cut.svg') no-repeat center !important;
}
-.loleaflet-mobile-paste {
- background: url('images/paste.svg') no-repeat center !important;
+.loleaflet-context-paste {
+ background: url('images/lc_paste.svg') no-repeat center !important;
}
.loleaflet-annotation-menu, .loleaflet-annotation-menu-redline {
diff --git a/loleaflet/images/copy.svg b/loleaflet/images/copy.svg
deleted file mode 100644
index 1f34318f6..000000000
--- a/loleaflet/images/copy.svg
+++ /dev/null
@@ -1,439 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- id="svg5018"
- height="32"
- width="32"
- version="1.1">
- <defs
- id="defs5020">
- <linearGradient
- id="linearGradient4087">
- <stop
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1"
- id="stop4089" />
- <stop
- offset="0.51153916"
- style="stop-color:#ffffff;stop-opacity:0.23529412"
- id="stop4091" />
- <stop
- offset="0.58522105"
- style="stop-color:#ffffff;stop-opacity:0.15686275"
- id="stop4093" />
- <stop
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0.39215687"
- id="stop4095" />
- </linearGradient>
- <linearGradient
- gradientTransform="matrix(0.39222363,0,0,-0.36562471,4.8278194,25.163568)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient3242-7-3-8-0-4-58-06"
- id="linearGradient3162"
- y2="-1.1839229"
- x2="27.974298"
- y1="36.127529"
- x1="27.974298" />
- <radialGradient
- gradientTransform="matrix(-0.38351555,0,0,-0.25567694,22.275669,31.384178)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient8662"
- id="radialGradient3173"
- fy="36.421127"
- fx="24.837126"
- r="15.644737"
- cy="36.421127"
- cx="24.837126" />
- <linearGradient
- id="linearGradient8662">
- <stop
- offset="0"
- style="stop-color:#000000;stop-opacity:1"
- id="stop8664" />
- <stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop8666" />
- </linearGradient>
- <linearGradient
- gradientTransform="matrix(0.0352071,0,0,0.0082353,-0.724852,26.980547)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient5048-9"
- id="linearGradient3175"
- y2="609.50507"
- x2="302.85715"
- y1="366.64789"
- x1="302.85715" />
- <linearGradient
- id="linearGradient5048-9">
- <stop
- offset="0"
- style="stop-color:#000000;stop-opacity:0"
- id="stop5050-3" />
- <stop
- offset="0.5"
- style="stop-color:#000000;stop-opacity:1"
- id="stop5056-7" />
- <stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop5052-4" />
- </linearGradient>
- <radialGradient
- gradientTransform="matrix(-0.01204859,0,0,0.0082353,10.761206,26.980564)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient5060-2"
- id="radialGradient3177"
- fy="486.64789"
- fx="605.71429"
- r="117.14286"
- cy="486.64789"
- cx="605.71429" />
- <linearGradient
- id="linearGradient5060-2">
- <stop
- offset="0"
- style="stop-color:#000000;stop-opacity:1"
- id="stop5062-5" />
- <stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop5064-4" />
- </linearGradient>
- <radialGradient
- gradientTransform="matrix(0.01204859,0,0,0.0082353,13.238793,26.980564)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient5060-2"
- id="radialGradient3179"
- fy="486.64789"
- fx="605.71429"
- r="117.14286"
- cy="486.64789"
- cx="605.71429" />
- <linearGradient
- gradientTransform="matrix(0.48571543,0,0,0.45629666,0.3428289,8.3488617)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient3600-4-4"
- id="linearGradient3181"
- y2="47.013336"
- x2="25.132275"
- y1="0.98520643"
- x1="25.132275" />
- <linearGradient
- id="linearGradient3600-4-4">
- <stop
- offset="0"
- style="stop-color:#f4f4f4;stop-opacity:1"
- id="stop3602-7-3" />
- <stop
- offset="1"
- style="stop-color:#dbdbdb;stop-opacity:1"
- id="stop3604-6-0" />
- </linearGradient>
- <linearGradient
- gradientTransform="matrix(0.39221364,0,0,0.42702571,29.199296,7.8403287)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient3104-5-8"
- id="linearGradient3183"
- y2="2.9062471"
- x2="-51.786404"
- y1="50.786446"
- x1="-51.786404" />
- <linearGradient
- id="linearGradient3104-5-8">
- <stop
- offset="0"
- style="stop-color:#a0a0a0;stop-opacity:1"
- id="stop3106-6-6" />
- <stop
- offset="1"
- style="stop-color:#bebebe;stop-opacity:1"
- id="stop3108-9-8" />
- </linearGradient>
- <linearGradient
- gradientTransform="matrix(0.40540511,0,0,0.51351351,2.2696871,7.6756805)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient3977-8"
- id="linearGradient3185"
- y2="43"
- x2="23.99999"
- y1="5.5641499"
- x1="23.99999" />
- <linearGradient
- id="linearGradient3977-8">
- <stop
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1"
- id="stop3979-4" />
- <stop
- offset="0.03626217"
- style="stop-color:#ffffff;stop-opacity:0.23529412"
- id="stop3981-3" />
- <stop
- offset="0.95056331"
- style="stop-color:#ffffff;stop-opacity:0.15686275"
- id="stop3983-1" />
- <stop
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0.39215687"
- id="stop3985-4" />
- </linearGradient>
- <linearGradient
- gradientTransform="matrix(0.0352071,0,0,0.0082353,-0.724852,26.980547)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient5048-9-6"
- id="linearGradient3175-8"
- y2="609.50507"
- x2="302.85715"
- y1="366.64789"
- x1="302.85715" />
- <linearGradient
- id="linearGradient5048-9-6">
- <stop
- offset="0"
- style="stop-color:#000000;stop-opacity:0"
- id="stop5050-3-8" />
- <stop
- offset="0.5"
- style="stop-color:#000000;stop-opacity:1"
- id="stop5056-7-3" />
- <stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop5052-4-8" />
- </linearGradient>
- <radialGradient
- gradientTransform="matrix(-0.01204859,0,0,0.0082353,10.761206,26.980564)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient5060-2-3"
- id="radialGradient3177-3"
- fy="486.64789"
- fx="605.71429"
- r="117.14286"
- cy="486.64789"
- cx="605.71429" />
- <linearGradient
- id="linearGradient5060-2-3">
- <stop
- offset="0"
- style="stop-color:#000000;stop-opacity:1"
- id="stop5062-5-3" />
- <stop
- offset="1"
- style="stop-color:#000000;stop-opacity:0"
- id="stop5064-4-8" />
- </linearGradient>
- <radialGradient
- gradientTransform="matrix(0.01204859,0,0,0.0082353,13.238793,26.980564)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient5060-2-3"
- id="radialGradient3179-0"
- fy="486.64789"
- fx="605.71429"
- r="117.14286"
- cy="486.64789"
- cx="605.71429" />
- <linearGradient
- gradientTransform="matrix(0.48571543,0,0,0.45629666,0.3428289,8.3488617)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient3600-4-4-7"
- id="linearGradient3181-4"
- y2="47.013336"
- x2="25.132275"
- y1="0.98520643"
- x1="25.132275" />
- <linearGradient
- id="linearGradient3600-4-4-7">
- <stop
- offset="0"
- style="stop-color:#f4f4f4;stop-opacity:1"
- id="stop3602-7-3-6" />
- <stop
- offset="1"
- style="stop-color:#dbdbdb;stop-opacity:1"
- id="stop3604-6-0-8" />
- </linearGradient>
- <linearGradient
- gradientTransform="matrix(0.39221364,0,0,0.42702571,29.199296,7.8403287)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient3104-5-8-0"
- id="linearGradient3183-9"
- y2="2.9062471"
- x2="-51.786404"
- y1="50.786446"
- x1="-51.786404" />
- <linearGradient
- id="linearGradient3104-5-8-0">
- <stop
- offset="0"
- style="stop-color:#a0a0a0;stop-opacity:1"
- id="stop3106-6-6-6" />
- <stop
- offset="1"
- style="stop-color:#bebebe;stop-opacity:1"
- id="stop3108-9-8-8" />
- </linearGradient>
- <linearGradient
- id="linearGradient3977-8-9">
- <stop
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1"
- id="stop3979-4-0" />
- <stop
- offset="0.03626217"
- style="stop-color:#ffffff;stop-opacity:0.23529412"
- id="stop3981-3-3" />
- <stop
- offset="0.95056331"
- style="stop-color:#ffffff;stop-opacity:0.15686275"
- id="stop3983-1-3" />
- <stop
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0.39215687"
- id="stop3985-4-3" />
- </linearGradient>
- <linearGradient
- gradientTransform="matrix(0.40540511,0,0,0.51351351,2.2696871,7.6756805)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient3977-8-9"
- id="linearGradient5016"
- y2="43"
- x2="23.99999"
- y1="5.5641499"
- x1="23.99999" />
- <radialGradient
- cx="24.837126"
- cy="36.421127"
- r="15.644737"
- fx="24.837126"
- fy="36.421127"
- id="radialGradient3449"
- xlink:href="#linearGradient8662"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(-0.70660609,0,0,-0.47076982,-0.754985,39.964493)" />
- <linearGradient
- x1="38.940514"
- y1="15.991243"
- x2="20.576487"
- y2="15.991243"
- id="linearGradient3855"
- xlink:href="#linearGradient4087"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(0,-0.39571558,0.42801014,0,6.4033107,30.903618)" />
- <linearGradient
- id="linearGradient3242-7-3-8-0-4-58-06">
- <stop
- id="stop3244-5-8-5-6-4-3-8"
- style="stop-color:#cdf87e;stop-opacity:1"
- offset="0" />
- <stop
- id="stop3246-9-5-1-5-3-0-7"
- style="stop-color:#a2e34f;stop-opacity:1"
- offset="0.26238" />
- <stop
- id="stop3248-7-2-0-7-5-35-9"
- style="stop-color:#68b723;stop-opacity:1"
- offset="0.66093999" />
- <stop
- id="stop3250-8-2-8-5-6-40-4"
- style="stop-color:#1d7e0d;stop-opacity:1"
- offset="1" />
- </linearGradient>
- </defs>
- <metadata
- id="metadata5023">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- transform="translate(0,-6.999996)"
- id="layer1-8-7">
- <rect
- width="16.999998"
- height="2"
- x="3.5000007"
- y="30"
- id="rect2879-0-3"
- style="display:inline;overflow:visible;visibility:visible;opacity:0.15;fill:url(#linearGradient3175-8);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none" />
- <path
- d="m 3.4999999,30.000085 c 0,0 0,1.999891 0,1.999891 C 2.8795275,32.003776 2,31.551901 2,30.999901 2,30.447902 2.6924,30.000085 3.4999999,30.000085 Z"
- id="path2881-6-2"
- style="display:inline;overflow:visible;visibility:visible;opacity:0.15;fill:url(#radialGradient3177-3);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none" />
- <path
- d="m 20.5,30.000085 c 0,0 0,1.999891 0,1.999891 0.620472,0.0038 1.5,-0.448075 1.5,-1.000075 0,-0.551999 -0.692402,-0.999816 -1.5,-0.999816 z"
- id="path2883-8-6"
- style="display:inline;overflow:visible;visibility:visible;opacity:0.15;fill:url(#radialGradient3179-0);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none" />
- <path
- d="m 3.4999601,9.4999569 c 3.8955809,0 17.0000589,0.00136 17.0000589,0.00136 l 2.1e-5,20.9987161 c 0,0 -11.3333862,0 -17.0000799,0 0,-7.000018 0,-14.000035 0,-21.0000538 z"
- id="path4160-3-9-5"
- style="display:inline;fill:url(#linearGradient3181-4);fill-opacity:1;stroke:url(#linearGradient3183-9);stroke-width:0.99992186;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- <path
- d="m 19.5,29.5 -15.0000004,0 0,-19 L 19.5,10.5 Z"
- id="rect6741-1-2-2"
- style="fill:none;stroke:url(#linearGradient5016);stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- </g>
- <path
- d="m 10,6.0000003 c 2.520657,0 10.999987,0.0012 10.999987,0.0012 L 21,24.000003 c 0,0 -7.333334,0 -11,0 0,-5.999983 0,-11.999966 0,-17.9999507 z"
- id="path4160-3-9-6"
- style="display:inline;opacity:0.05;fill:#000000;fill-opacity:1;stroke:none" />
- <g
- transform="translate(8.0000004,-2)"
- id="layer1-8">
- <rect
- width="16.999998"
- height="2"
- x="3.5000007"
- y="30"
- id="rect2879-0"
- style="display:inline;overflow:visible;visibility:visible;opacity:0.15;fill:url(#linearGradient3175);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none" />
- <path
- d="m 3.4999999,30.000085 c 0,0 0,1.999891 0,1.999891 C 2.8795275,32.003776 2,31.551901 2,30.999901 2,30.447902 2.6924,30.000085 3.4999999,30.000085 Z"
- id="path2881-6"
- style="display:inline;overflow:visible;visibility:visible;opacity:0.15;fill:url(#radialGradient3177);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none" />
- <path
- d="m 20.5,30.000085 c 0,0 0,1.999891 0,1.999891 0.620472,0.0038 1.5,-0.448075 1.5,-1.000075 0,-0.551999 -0.692402,-0.999816 -1.5,-0.999816 z"
- id="path2883-8"
- style="display:inline;overflow:visible;visibility:visible;opacity:0.15;fill:url(#radialGradient3179);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none" />
- <path
- d="m 3.4999601,9.4999569 c 3.8955809,0 17.0000589,0.00136 17.0000589,0.00136 l 2.1e-5,20.9987161 c 0,0 -11.3333862,0 -17.0000799,0 0,-7.000018 0,-14.000035 0,-21.0000538 z"
- id="path4160-3-9"
- style="display:inline;fill:url(#linearGradient3181);fill-opacity:1;stroke:url(#linearGradient3183);stroke-width:0.99992186;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- <path
- d="m 19.5,29.5 -15.0000004,0 0,-19 L 19.5,10.5 Z"
- id="rect6741-1-2"
- style="fill:none;stroke:url(#linearGradient3185);stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
- </g>
- <path
- d="m 6.750245,22.072131 a 6,4.0000002 0 1 1 12,0 6,4.0000002 0 0 1 -12,0 z"
- id="path3501"
- style="display:inline;overflow:visible;visibility:visible;opacity:0.14117647;fill:url(#radialGradient3173);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none" />
- <path
- d="m 10.832248,11.017552 c -4.9802216,3.367056 -2.0511186,9.550728 3.5,9.5 l 0,3.000485 7,-5 -7,-5 0,2.976351 c -3.580248,0.139062 -5.5595156,-3.12742 -3,-5.476836 z"
- id="path3503"
- style="display:block;overflow:visible;visibility:visible;fill:url(#linearGradient3162);fill-opacity:1.0;fill-rule:nonzero;stroke:none;stroke-width:0.96392483;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:7;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none" />
- <path
- d="m 9.8755864,12.759279 c -1.756852,2.058862 -0.225017,7.434574 5.3950626,6.699241 l 0.0616,2.197396 4.369328,-3.137879 -4.369328,-3.064428 0,2.059765 C 9.1648074,17.842539 9.3507614,13.59157 9.8755874,12.759279 Z"
- id="path3505"
- style="display:block;overflow:visible;visibility:visible;opacity:0.8;fill:none;stroke:url(#linearGradient3855);stroke-width:0.96400005;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:7;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color:#000000;clip-rule:nonzero;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill-opacity:1;fill-rule:nonzero;filter-blend-mode:normal;filter-gaussianBlur-deviation:0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
- <path
- d="m -29.359717,22.818517 a 11.054667,7.3650752 0 1 1 22.109334,0 11.054667,7.3650752 0 0 1 -22.109334,0 z"
- id="path3501-0"
- style="display:inline;overflow:visible;visibility:visible;opacity:0.14117647;fill:url(#radialGradient3449);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none" />
- <path
- d="m 10.832248,11.017552 c -4.9802216,3.367056 -2.0511186,9.550728 3.5,9.5 l 0,3.000485 6.999999,-5 -6.999999,-5 0,2.976351 c -3.580248,0.139062 -5.5595156,-3.12742 -3,-5.476836 z"
- id="path3503-4"
- style="display:inline;overflow:visible;visibility:visible;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#0f5a00;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color:#000000;clip-rule:nonzero;opacity:0.5;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;filter-blend-mode:normal;filter-gaussianBlur-deviation:0;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
-</svg>
diff --git a/loleaflet/images/cut.svg b/loleaflet/images/cut.svg
deleted file mode 100644
index de044bb49..000000000
--- a/loleaflet/images/cut.svg
+++ /dev/null
@@ -1,419 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="32"
- height="32"
- id="svg4296"
- version="1.1"
- inkscape:version="0.48.4 r9939"
- sodipodi:docname="edit-cut.svg">
- <defs
- id="defs4298">
- <linearGradient
- id="linearGradient3810">
- <stop
- style="stop-color:#a60101;stop-opacity:1;"
- offset="0"
- id="stop3812" />
- <stop
- style="stop-color:#5f0101;stop-opacity:1;"
- offset="1"
- id="stop3814" />
- </linearGradient>
- <linearGradient
- id="linearGradient3774">
- <stop
- style="stop-color:#444444;stop-opacity:1;"
- offset="0"
- id="stop3776" />
- <stop
- style="stop-color:#9e9e9e;stop-opacity:1;"
- offset="1"
- id="stop3778" />
- </linearGradient>
- <linearGradient
- id="linearGradient3764">
- <stop
- style="stop-color:#d1d1d1;stop-opacity:1;"
- offset="0"
- id="stop3766" />
- <stop
- style="stop-color:#eaeaea;stop-opacity:1;"
- offset="1"
- id="stop3768" />
- </linearGradient>
- <linearGradient
- id="linearGradient2264">
- <stop
- id="stop2266"
- offset="0"
- style="stop-color:#d7e866;stop-opacity:1;" />
- <stop
- id="stop2268"
- offset="1"
- style="stop-color:#8cab2a;stop-opacity:1;" />
- </linearGradient>
- <linearGradient
- gradientTransform="matrix(0.5384199,0,0,0.5384199,-0.922077,-1.4604985)"
- gradientUnits="userSpaceOnUse"
- xlink:href="#linearGradient3781"
- id="linearGradient2494"
- y2="45.074459"
- x2="24.481066"
- y1="5.0808945"
- x1="24.481066" />
- <linearGradient
- id="linearGradient3781">
- <stop
- offset="0"
- style="stop-color:#ffffff;stop-opacity:1"
- id="stop3783" />
- <stop
- offset="1"
- style="stop-color:#ffffff;stop-opacity:0"
- id="stop3785" />
- </linearGradient>
- <linearGradient
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list