[Libreoffice-commits] online.git: bundled/include kit/DummyLibreOfficeKit.cpp kit/Watermark.hpp

2019-11-10 Thread mert (via logerrit)
 bundled/include/LibreOfficeKit/LibreOfficeKit.h |8 
 kit/DummyLibreOfficeKit.cpp |   23 +++
 kit/Watermark.hpp   |2 +-
 3 files changed, 32 insertions(+), 1 deletion(-)

New commits:
commit 2c598ba4ef8015e9fd2a5a6ffe9fa064dbbead4e
Author: mert 
AuthorDate: Thu Oct 24 12:13:46 2019 +0300
Commit: Ashod Nakashian 
CommitDate: Sun Nov 10 23:42:03 2019 +0100

Rotate Watermarks with 45 degree angle

Change-Id: I9b399a4e1daf52f536d4becae2cc6dc692e16f7a
Reviewed-on: https://gerrit.libreoffice.org/81436
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h 
b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
index 78f2b478e..2ca8631ed 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
@@ -262,6 +262,14 @@ struct _LibreOfficeKitDocumentClass
int* pFontWidth,
int* pFontHeight);
 
+/// @see lok::Document::renderFontOrientation().
+unsigned char* (*renderFontOrientation) (LibreOfficeKitDocument* pThis,
+   const char* pFontName,
+   const char* pChar,
+   int* pFontWidth,
+   int* pFontHeight,
+   int pOrientation);
+
 /// @see lok::Document::getPartHash().
 char* (*getPartHash) (LibreOfficeKitDocument* pThis,
   int nPart);
diff --git a/kit/DummyLibreOfficeKit.cpp b/kit/DummyLibreOfficeKit.cpp
index 1c70ce2ea..323da0e43 100644
--- a/kit/DummyLibreOfficeKit.cpp
+++ b/kit/DummyLibreOfficeKit.cpp
@@ -122,6 +122,12 @@ static unsigned char* 
doc_renderFont(LibreOfficeKitDocument* pThis,
   const char *pChar,
   int* pFontWidth,
   int* pFontHeight);
+static unsigned char* doc_renderFontOrientation(LibreOfficeKitDocument* pThis,
+  const char *pFontName,
+  const char *pChar,
+  int* pFontWidth,
+  int* pFontHeight,
+  int pOrientation);
 static char* doc_getPartHash(LibreOfficeKitDocument* pThis, int nPart);
 
 static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** 
pOutput);
@@ -170,6 +176,7 @@ LibLODocument_Impl::LibLODocument_Impl()
 m_pDocumentClass->getViewIds = doc_getViewIds;
 
 m_pDocumentClass->renderFont = doc_renderFont;
+m_pDocumentClass->renderFontOrientation = doc_renderFontOrientation;
 m_pDocumentClass->getPartHash = doc_getPartHash;
 
 m_pDocumentClass->renderShapeSelection = doc_renderShapeSelection;
@@ -527,6 +534,22 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* 
/*pThis*/,
 return nullptr;
 }
 
+unsigned char* doc_renderFontOrientation(LibreOfficeKitDocument* /*pThis*/,
+const char* pFontName,
+const char* pChar,
+int* pFontWidth,
+int* pFontHeight,
+int pOrientation)
+{
+(void) pFontName;
+(void) pChar;
+(void) pFontWidth;
+(void) pFontHeight;
+(void) pOrientation;
+
+return nullptr;
+}
+
 static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** 
pOutput)
 {
 (void) pThis;
diff --git a/kit/Watermark.hpp b/kit/Watermark.hpp
index 40d6c35d3..79fd5fb2c 100644
--- a/kit/Watermark.hpp
+++ b/kit/Watermark.hpp
@@ -114,7 +114,7 @@ private:
 // are always set to 0 (black) and the alpha level is 0 everywhere
 // except on the text area; the alpha level take into account of
 // performing anti-aliasing over the text edges.
-unsigned char* textPixels = _loKitDoc->renderFont(_font.c_str(), 
_text.c_str(), &_width, &_height);
+unsigned char* textPixels = _loKitDoc->renderFont(_font.c_str(), 
_text.c_str(), &_width, &_height, 450);
 
 if (!textPixels)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: test/Makefile.am test/UnitWOPIWatermark.cpp

2019-11-10 Thread mert (via logerrit)
 test/Makefile.am   |6 +
 test/UnitWOPIWatermark.cpp |  158 +
 2 files changed, 162 insertions(+), 2 deletions(-)

New commits:
commit e09b5f4226a6fb3d0a58e1d95a228656defc9ccc
Author: mert 
AuthorDate: Tue Oct 29 16:26:27 2019 +0300
Commit: Ashod Nakashian 
CommitDate: Sun Nov 10 23:42:47 2019 +0100

Added Unit Test for new Watermarking feature

Change-Id: Id30015731d7ea562bfeb63fc70ffc6813945e492
Reviewed-on: https://gerrit.libreoffice.org/81674
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/test/Makefile.am b/test/Makefile.am
index 4907ae898..f3d4fcf6f 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -20,7 +20,7 @@ noinst_LTLIBRARIES = \
unit-fuzz.la unit-oob.la unit-http.la unit-oauth.la \
unit-wopi.la unit-wopi-saveas.la \
unit-wopi-ownertermination.la unit-wopi-versionrestore.la \
-   unit-wopi-documentconflict.la unit_wopi_renamefile.la \
+   unit-wopi-documentconflict.la unit_wopi_renamefile.la 
unit_wopi_watermark.la \
unit-tiff-load.la \
unit-large-paste.la \
unit-paste.la \
@@ -122,6 +122,8 @@ unit_wopi_documentconflict_la_SOURCES = 
UnitWOPIDocumentConflict.cpp
 unit_wopi_documentconflict_la_LIBADD = $(CPPUNIT_LIBS)
 unit_wopi_renamefile_la_SOURCES = UnitWOPIRenameFile.cpp
 unit_wopi_renamefile_la_LIBADD = $(CPPUNIT_LIBS)
+unit_wopi_watermark_la_SOURCES = UnitWOPIWatermark.cpp
+unit_wopi_watermark_la_LIBADD = $(CPPUNIT_LIBS)
 unit_wopi_loadencoded_la_SOURCES = UnitWOPILoadEncoded.cpp
 unit_wopi_loadencoded_la_LIBADD = $(CPPUNIT_LIBS)
 unit_wopi_temp_la_SOURCES = UnitWOPITemplate.cpp
@@ -157,7 +159,7 @@ check-local:
 TESTS = unit-copy-paste.la unit-typing.la unit-convert.la unit-prefork.la 
unit-tilecache.la unit-timeout.la \
 unit-oauth.la unit-wopi.la unit-wopi-saveas.la \
 unit-wopi-ownertermination.la unit-wopi-versionrestore.la \
-unit-wopi-documentconflict.la unit_wopi_renamefile.la \
+unit-wopi-documentconflict.la unit_wopi_renamefile.la 
unit_wopi_watermark.la \
unit-http.la \
unit-tiff-load.la \
unit-large-paste.la \
diff --git a/test/UnitWOPIWatermark.cpp b/test/UnitWOPIWatermark.cpp
new file mode 100644
index 0..a5d244ee5
--- /dev/null
+++ b/test/UnitWOPIWatermark.cpp
@@ -0,0 +1,158 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+class UnitWOPIWatermark : public WopiTestServer
+{
+enum class Phase
+{
+Load,
+TileRequest,
+Polling
+} _phase;
+
+public:
+UnitWOPIWatermark() :
+_phase(Phase::Load)
+{
+}
+
+virtual bool handleHttpRequest(const Poco::Net::HTTPRequest& request, 
Poco::MemoryInputStream& /*message*/, std::shared_ptr& socket) 
override
+{
+Poco::URI uriReq(request.getURI());
+Poco::RegularExpression regInfo("/wopi/files/[0-9]");
+Poco::RegularExpression regContent("/wopi/files/[0-9]/contents");
+LOG_INF("Fake wopi host request: " << uriReq.toString());
+
+// CheckFileInfo
+if (request.getMethod() == "GET" && regInfo.match(uriReq.getPath()))
+{
+LOG_INF("Fake wopi host request, handling CheckFileInfo: " << 
uriReq.getPath());
+
+assertCheckFileInfoRequest(request);
+
+Poco::LocalDateTime now;
+const std::string fileName(uriReq.getPath() == "/wopi/files/3" ? 
"he%llo.txt" : "hello.txt");
+Poco::JSON::Object::Ptr fileInfo = new Poco::JSON::Object();
+fileInfo->set("BaseFileName", fileName);
+fileInfo->set("Size", getFileContent().size());
+fileInfo->set("Version", "1.0");
+fileInfo->set("OwnerId", "test");
+fileInfo->set("UserId", "test");
+fileInfo->set("UserFriendlyName", "test");
+fileInfo->set("UserCanWrite", "true");
+fileInfo->set("PostMessageOrigin", "localhost");
+fileInfo->set("LastModifiedTime", 
Util::getIso8601FracformatTime(getFileLastModifiedTime()));
+fileInfo->set("EnableOwnerTermination", "true");
+fileInfo->set("WatermarkText", "WatermarkTest");
+
+std::ostringstream jsonStream;
+fileInfo->stringify(jsonStream);
+std::string responseString = jsonStream.str();
+
+const std::string mimeType = "application/json; charset=utf-8";
+
+std::ostringstream oss;
+oss << "HTTP/1.1 200 OK\r\n"
+"Last-Modified: " << 

[Libreoffice-commits] online.git: wsd/TileCache.hpp

2019-11-10 Thread mert (via logerrit)
 wsd/TileCache.hpp |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit a8a11ef8f9a30d2d5507b58958ebd00ae632b782
Author: mert 
AuthorDate: Sun Nov 10 08:09:00 2019 +0300
Commit: Ashod Nakashian 
CommitDate: Sun Nov 10 23:46:09 2019 +0100

Fix mixed watermark texts

Change-Id: Id350d9dffc479350f240e82a4cc62ec97e5d68e1
Reviewed-on: https://gerrit.libreoffice.org/82372
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/wsd/TileCache.hpp b/wsd/TileCache.hpp
index bdf17e211..50303c895 100644
--- a/wsd/TileCache.hpp
+++ b/wsd/TileCache.hpp
@@ -39,7 +39,8 @@ public:
_tilePosX == other._tilePosX &&
_tilePosY == other._tilePosY &&
_tileWidth == other._tileWidth &&
-   _tileHeight == other._tileHeight;
+   _tileHeight == other._tileHeight &&
+   _normalizedViewId == other._normalizedViewId;
 }
 };
 
@@ -63,6 +64,7 @@ struct TileCacheDescHasher
 hash = (hash << 5) + hash + t.getTilePosY();
 hash = (hash << 5) + hash + t.getTileWidth();
 hash = (hash << 5) + hash + t.getTileHeight();
+hash = (hash << 5) + hash + t.getNormalizedViewId();
 
 return hash;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: loleaflet/src

2019-11-12 Thread mert (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit e0c6f3f80bdd7edcccb84e09b90d7a1b00840798
Author: mert 
AuthorDate: Thu Oct 31 15:30:20 2019 +0300
Commit: Ashod Nakashian 
CommitDate: Tue Nov 12 16:43:45 2019 +0100

Highlight searched text when found

Change-Id: I22fb5af8015f5114039d981d85b3ece8be77bf3e
Reviewed-on: https://gerrit.libreoffice.org/81845
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 92171c498..9a371ea25 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -200,8 +200,8 @@ L.TileLayer = L.GridLayer.extend({
this._selections = new L.LayerGroup();
this._references = new L.LayerGroup();
this._referencesAll = [];
+   map.addLayer(this._selections);
if (this.options.permission !== 'readonly') {
-   map.addLayer(this._selections);
map.addLayer(this._references);
}
 
@@ -1360,6 +1360,7 @@ L.TileLayer = L.GridLayer.extend({
this._searchResults = null;
this._searchTerm = null;
this._searchResultsLayer.clearLayers();
+   this._selections.clearLayers();
},
 
_drawSearchResults: function() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: loleaflet/src

2019-12-04 Thread mert (via logerrit)
 loleaflet/src/control/Control.JSDialogBuilder.js |   25 +++---
 loleaflet/src/control/Control.Toolbar.js |   41 +++
 loleaflet/src/layer/tile/CalcTileLayer.js|2 -
 loleaflet/src/layer/tile/ImpressTileLayer.js |4 +-
 loleaflet/src/layer/tile/WriterTileLayer.js  |4 +-
 5 files changed, 60 insertions(+), 16 deletions(-)

New commits:
commit 8af06d13fa62d1d5a539e4cab25967bb51853345
Author: mert 
AuthorDate: Wed Dec 4 13:55:34 2019 +0300
Commit: Mert Tümer 
CommitDate: Wed Dec 4 12:07:52 2019 +0100

Make quickbar color buttons open mobilewizard

Change-Id: I44f2f6d29b2d9830068cb37d6ab4975f8d971778
Reviewed-on: https://gerrit.libreoffice.org/84396
Reviewed-by: Mert Tümer 
Tested-by: Mert Tümer 

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 7de526461..66ec0eb26 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -82,7 +82,6 @@ L.Control.JSDialogBuilder = L.Control.extend({
_toolitemHandler: function(parentContainer, data, builder) {
if (data.command) {
var handler = builder._toolitemHandlers[data.command];
-
if (handler)
handler(parentContainer, data, builder);
else if (data.text) {
@@ -284,16 +283,21 @@ L.Control.JSDialogBuilder = L.Control.extend({
builder.build(contentDiv, [contentNode]);
builder._currentDepth--;
 
-   $(contentDiv).hide();
-   if (builder.wizard) {
-   $(sectionTitle).click(function() {
-   builder.wizard.goLevelDown(contentDiv);
-   if (contentNode.onshow)
-   contentNode.onshow();
-   });
-   } else {
-   console.debug('Builder used outside of mobile wizard: 
please implement the click handler');
+   if (!data.nosubmenu)
+   {
+   $(contentDiv).hide();
+   if (builder.wizard) {
+   $(sectionTitle).click(function() {
+   builder.wizard.goLevelDown(contentDiv);
+   if (contentNode.onshow)
+   contentNode.onshow();
+   });
+   } else {
+   console.debug('Builder used outside of mobile 
wizard: please implement the click handler');
+   }
}
+   else
+   $(sectionTitle).hide();
},
 
_calcFunctionEntry: function(parentContainer, data, contentNode, 
builder) {
@@ -1469,7 +1473,6 @@ L.Control.JSDialogBuilder = L.Control.extend({
var childObject = needsToCreateContainer ? 
L.DomUtil.createWithId('div', childData.id, parent) : parent;
 
var handler = this._controlHandlers[childType];
-
var twoPanelsAsChildren = childData.children
&& (childData.children.length == 4 || 
childData.children.length == 5)
&& childData.children[0] && 
childData.children[0].type == 'panel'
diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index 0426015c2..2f735f033 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -250,6 +250,12 @@ function onClick(e, id, item, subItem) {
else if (item.id === 'remotegraphic') {
map.fire('postMessage', {msgId: 'UI_InsertGraphic'});
}
+   else if (id === 'fontcolor' && typeof e.color === 'undefined') {
+   map.fire('mobilewizard', getColorPickerData('Font Color'));
+   }
+   else if (id === 'backcolor' && typeof e.color === 'undefined') {
+   map.fire('mobilewizard', getColorPickerData('Highlight Color'));
+   }
else if (id === 'fontcolor' && typeof e.color !== 'undefined') {
onColorPick(id, e.color);
}
@@ -684,6 +690,41 @@ function insertShapes(mobile) {
});
 }
 
+function getColorPickerData(type) {
+   var uno;
+   if (type === 'Font Color') {
+   if (map.getDocType() === 'spreadsheet')
+   uno = '.uno:Color';
+   else if (map.getDocType() === 'presentation')
+   uno = '.uno:Color';
+   else
+   uno = '.uno:FontColor';
+   } else if (type === 'Highlight Color') {
+   if (map.getDocType() === 'spreadsheet')
+   uno = '.uno:BacgroundColor';
+   else if 

[Libreoffice-commits] online.git: loleaflet/src

2019-12-09 Thread mert (via logerrit)
 loleaflet/src/control/Control.ContextMenu.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ba8efa4b328fc073b3e94a0af1a8c9f3d376bfc8
Author: mert 
AuthorDate: Mon Dec 9 16:33:33 2019 +0300
Commit: Michael Meeks 
CommitDate: Mon Dec 9 17:56:34 2019 +0100

Fix shape context menu brings dialogs on mobile

Change-Id: I0101242ebd2bf582093545e3f3abf88b01a043af
Reviewed-on: https://gerrit.libreoffice.org/84746
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/loleaflet/src/control/Control.ContextMenu.js 
b/loleaflet/src/control/Control.ContextMenu.js
index 6109a7171..137300e13 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -60,7 +60,7 @@ L.Control.ContextMenu = L.Control.extend({
// This black list contains those menu items which should be 
disabled on mobile even if they
// are allowed in general. We need to have only those items 
here which are also part
// of the whitelist, otherwise the menu items are not visible 
anyway.
-   mobileBlackList: ['SpellingAndGrammarDialog', 'FontDialog', 
'FontDialogForParagraph']
+   mobileBlackList: ['SpellingAndGrammarDialog', 'FontDialog', 
'FontDialogForParagraph', 'TransformDialog', 'FormatLine', 'FormatArea']
},
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: loleaflet/src

2019-12-17 Thread mert (via logerrit)
 loleaflet/src/layer/tile/CalcTileLayer.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7175ca2243232c5dac22d12cbd2e530a9b52dfba
Author: mert 
AuthorDate: Tue Dec 17 14:06:15 2019 +0300
Commit: Michael Meeks 
CommitDate: Tue Dec 17 12:21:09 2019 +0100

Include italic formatting on quickbar for calc

Change-Id: I8cd7309a1e214b62f289fc757eaae467eb152466
Reviewed-on: https://gerrit.libreoffice.org/85284
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js 
b/loleaflet/src/layer/tile/CalcTileLayer.js
index 511a5253e..0ed4fb4b8 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -75,7 +75,7 @@ L.CalcTileLayer = L.TileLayer.extend({
{type: 'button',  id: 'showsearchbar',  img: 'search', 
hint: _('Show the search bar')},
{type: 'break'},
{type: 'button',  id: 'bold',  img: 'bold', hint: 
_UNO('.uno:Bold'), uno: 'Bold'},
-// {type: 'button',  id: 'italic', img: 'italic', hint: 
_UNO('.uno:Italic'), uno: 'Italic'},
+   {type: 'button',  id: 'italic', img: 'italic', hint: 
_UNO('.uno:Italic'), uno: 'Italic'},
{type: 'button',  id: 'underline',  img: 'underline', 
hint: _UNO('.uno:Underline'), uno: 'Underline'},
{type: 'button',  id: 'strikeout', img: 'strikeout', 
hint: _UNO('.uno:Strikeout'), uno: 'Strikeout'},
{type: 'break'},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2019-12-17 Thread mert (via logerrit)
 loleaflet/src/control/Control.Menubar.js |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 553796c27712dddb57eb70f00137eb590cd65126
Author: mert 
AuthorDate: Tue Dec 17 13:56:16 2019 +0300
Commit: Michael Meeks 
CommitDate: Tue Dec 17 12:21:49 2019 +0100

Remove show ruler button for mobile

Change-Id: I1eac7a36edf631967056c4176c5765d910733cb9
Reviewed-on: https://gerrit.libreoffice.org/85283
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index d5d990095..327c6d53d 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -493,7 +493,6 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:NextTrackedChange'}
]},
{name: _UNO('.uno:ViewMenu', 'text'), id: 'view', type: 
'menu', menu: [
-   {name: _('Show Ruler'), id: 'showruler', type: 
'action'},
{uno: '.uno:ControlCodes'},
{name: _UNO('.uno:ShowResolvedAnnotations', 
'text'), id: 'showresolved', type: 'action'},
]
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-11 Thread mert (via logerrit)
 loleaflet/src/control/Toolbar.js |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 567c4c5ba790f7bdece8e26c7f47601800ceae04
Author: mert 
AuthorDate: Wed Dec 11 13:50:10 2019 +0300
Commit: Mert Tümer 
CommitDate: Wed Dec 11 16:22:59 2019 +0100

Fix closing hyperlink dialog doesn't focus

The document should have the focus after
closing the hyperlink dialog

Change-Id: I5f4cf4f2cabe92b97e60a4d118ba67255f598c0b
Reviewed-on: https://gerrit.libreoffice.org/84933
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tümer 
(cherry picked from commit 041b16202c35064df4e905115c69c3486f7cb717)
Reviewed-on: https://gerrit.libreoffice.org/84963
Tested-by: Mert Tümer 

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index e2289a748..1a353ff67 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -470,6 +470,7 @@ L.Map.include({
}
};
map.sendUnoCommand('.uno:SetHyperlink', 
command);
+   map.focus();
}
}
});
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - loleaflet/src

2019-12-11 Thread mert (via logerrit)
 loleaflet/src/control/Control.PartsPreview.js |1 +
 loleaflet/src/control/Toolbar.js  |1 +
 2 files changed, 2 insertions(+)

New commits:
commit 651a4f546aa07a42e0a5416af317ef46851c69b3
Author: mert 
AuthorDate: Wed Dec 11 14:10:03 2019 +0300
Commit: Mert Tümer 
CommitDate: Wed Dec 11 16:23:20 2019 +0100

fix Keyboard pops up when switching slides

Change-Id: I6b0953e4868867786a8c63c5ccbf132baa0d0324
Reviewed-on: https://gerrit.libreoffice.org/84935
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tümer 

diff --git a/loleaflet/src/control/Control.PartsPreview.js 
b/loleaflet/src/control/Control.PartsPreview.js
index ddc9c6041..12c5bab19 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -170,6 +170,7 @@ L.Control.PartsPreview = L.Control.extend({
.on(img, 'click', this._map.focus, this._map)
.on(img, 'click', function() {
this.partsFocused = true;
+   document.activeElement.blur();
}, this);
 
var topBound = this._previewContTop;
commit 041b16202c35064df4e905115c69c3486f7cb717
Author: mert 
AuthorDate: Wed Dec 11 13:50:10 2019 +0300
Commit: Mert Tümer 
CommitDate: Wed Dec 11 16:22:29 2019 +0100

Fix closing hyperlink dialog doesn't focus

The document should have the focus after
closing the hyperlink dialog

Change-Id: I5f4cf4f2cabe92b97e60a4d118ba67255f598c0b
Reviewed-on: https://gerrit.libreoffice.org/84933
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tümer 

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index e2289a748..1a353ff67 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -470,6 +470,7 @@ L.Map.include({
}
};
map.sendUnoCommand('.uno:SetHyperlink', 
command);
+   map.focus();
}
}
});
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-11 Thread mert (via logerrit)
 loleaflet/src/control/Control.PartsPreview.js |1 +
 1 file changed, 1 insertion(+)

New commits:
commit f8c800dba915cb8e6eefef515ccfd52304a70ca8
Author: mert 
AuthorDate: Wed Dec 11 14:10:03 2019 +0300
Commit: Mert Tümer 
CommitDate: Wed Dec 11 16:23:40 2019 +0100

fix Keyboard pops up when switching slides

Change-Id: I6b0953e4868867786a8c63c5ccbf132baa0d0324
Reviewed-on: https://gerrit.libreoffice.org/84935
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tümer 
(cherry picked from commit 651a4f546aa07a42e0a5416af317ef46851c69b3)
Reviewed-on: https://gerrit.libreoffice.org/84964
Tested-by: Mert Tümer 

diff --git a/loleaflet/src/control/Control.PartsPreview.js 
b/loleaflet/src/control/Control.PartsPreview.js
index ddc9c6041..12c5bab19 100644
--- a/loleaflet/src/control/Control.PartsPreview.js
+++ b/loleaflet/src/control/Control.PartsPreview.js
@@ -170,6 +170,7 @@ L.Control.PartsPreview = L.Control.extend({
.on(img, 'click', this._map.focus, this._map)
.on(img, 'click', function() {
this.partsFocused = true;
+   document.activeElement.blur();
}, this);
 
var topBound = this._previewContTop;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2019-12-11 Thread mert (via logerrit)
 loleaflet/src/control/Control.Menubar.js |   12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 4783b71920fb961daf028e02b9f28910bcfa5a4f
Author: mert 
AuthorDate: Tue Dec 10 20:20:59 2019 +0300
Commit: Mert Tümer 
CommitDate: Wed Dec 11 16:21:14 2019 +0100

Remove Find button for mobile

Change-Id: Icfffee63620cca3df52dd21a011cf2b2e30a834d
Reviewed-on: https://gerrit.libreoffice.org/84884
Reviewed-by: Mert Tümer 
Tested-by: Mert Tümer 

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 91b0b3eb2..2b8af4510 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -481,9 +481,7 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:Cut'), id: 'warn-copy-paste', 
 type: 'action', mobileappuno: '.uno:Cut'},
{name: _UNO('.uno:Copy'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Copy'},
{name: _UNO('.uno:Paste'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Paste'},
-   {uno: '.uno:SelectAll'},
-   {type: 'separator'},
-   {uno: '.uno:SearchDialog'}
+   {uno: '.uno:SelectAll'}
]},
{name: _UNO('.uno:ChangesMenu', 'text'), id: 
'changesmenu', type: 'menu', menu: [
{uno: '.uno:TrackChanges'},
@@ -525,9 +523,7 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:Cut'), id: 'warn-copy-paste', 
 type: 'action', mobileappuno: '.uno:Cut'},
{name: _UNO('.uno:Copy'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Copy'},
{name: _UNO('.uno:Paste'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Paste'},
-   {uno: '.uno:SelectAll'},
-   {type: 'separator'},
-   {uno: '.uno:SearchDialog'}
+   {uno: '.uno:SelectAll'}
]},
{name: _UNO('.uno:TableMenu', 'text'/*HACK should be 
'presentation', but not in xcu*/), type: 'menu', menu: [
{uno: '.uno:InsertRowsBefore'},
@@ -571,9 +567,7 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:Cut'), id: 'warn-copy-paste', 
 type: 'action', mobileappuno: '.uno:Cut'},
{name: _UNO('.uno:Copy'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Copy'},
{name: _UNO('.uno:Paste'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Paste'},
-   {uno: '.uno:SelectAll'},
-   {type: 'separator'},
-   {uno: '.uno:SearchDialog'}
+   {uno: '.uno:SelectAll'}
]},
{name: _UNO('.uno:SheetMenu', 'spreadsheet'), type: 
'menu', menu: [
{name: _UNO('.uno:InsertRowsMenu', 
'spreadsheet'), type: 'menu', menu: [
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-11 Thread mert (via logerrit)
 loleaflet/src/control/Control.Menubar.js |   12 +++-
 1 file changed, 3 insertions(+), 9 deletions(-)

New commits:
commit 3bfeb807bfa1caa69f67363fe04d76cdbe3c0eee
Author: mert 
AuthorDate: Tue Dec 10 20:20:59 2019 +0300
Commit: Mert Tümer 
CommitDate: Wed Dec 11 16:21:37 2019 +0100

Remove Find button for mobile

Change-Id: Icfffee63620cca3df52dd21a011cf2b2e30a834d
Reviewed-on: https://gerrit.libreoffice.org/84884
Reviewed-by: Mert Tümer 
Tested-by: Mert Tümer 
(cherry picked from commit 4783b71920fb961daf028e02b9f28910bcfa5a4f)
Reviewed-on: https://gerrit.libreoffice.org/84961

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 91b0b3eb2..2b8af4510 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -481,9 +481,7 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:Cut'), id: 'warn-copy-paste', 
 type: 'action', mobileappuno: '.uno:Cut'},
{name: _UNO('.uno:Copy'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Copy'},
{name: _UNO('.uno:Paste'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Paste'},
-   {uno: '.uno:SelectAll'},
-   {type: 'separator'},
-   {uno: '.uno:SearchDialog'}
+   {uno: '.uno:SelectAll'}
]},
{name: _UNO('.uno:ChangesMenu', 'text'), id: 
'changesmenu', type: 'menu', menu: [
{uno: '.uno:TrackChanges'},
@@ -525,9 +523,7 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:Cut'), id: 'warn-copy-paste', 
 type: 'action', mobileappuno: '.uno:Cut'},
{name: _UNO('.uno:Copy'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Copy'},
{name: _UNO('.uno:Paste'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Paste'},
-   {uno: '.uno:SelectAll'},
-   {type: 'separator'},
-   {uno: '.uno:SearchDialog'}
+   {uno: '.uno:SelectAll'}
]},
{name: _UNO('.uno:TableMenu', 'text'/*HACK should be 
'presentation', but not in xcu*/), type: 'menu', menu: [
{uno: '.uno:InsertRowsBefore'},
@@ -571,9 +567,7 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:Cut'), id: 'warn-copy-paste', 
 type: 'action', mobileappuno: '.uno:Cut'},
{name: _UNO('.uno:Copy'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Copy'},
{name: _UNO('.uno:Paste'), id: 
'warn-copy-paste',  type: 'action', mobileappuno: '.uno:Paste'},
-   {uno: '.uno:SelectAll'},
-   {type: 'separator'},
-   {uno: '.uno:SearchDialog'}
+   {uno: '.uno:SelectAll'}
]},
{name: _UNO('.uno:SheetMenu', 'spreadsheet'), type: 
'menu', menu: [
{name: _UNO('.uno:InsertRowsMenu', 
'spreadsheet'), type: 'menu', menu: [
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2019-12-05 Thread mert (via logerrit)
 loleaflet/src/layer/tile/CalcTileLayer.js|   13 ++---
 loleaflet/src/layer/tile/ImpressTileLayer.js |   22 ++
 loleaflet/src/layer/tile/WriterTileLayer.js  |   10 --
 3 files changed, 12 insertions(+), 33 deletions(-)

New commits:
commit c1788f94f899fe1473a03a5ed165a9215d4bcc02
Author: mert 
AuthorDate: Wed Dec 4 15:04:50 2019 +0300
Commit: Mert Tümer 
CommitDate: Thu Dec 5 19:49:21 2019 +0100

Remove buttons that open popup menu on quickbar

Change-Id: I7fc0a633d1ba7488469caa486ff5f12d800bd6e7
Reviewed-on: https://gerrit.libreoffice.org/84400
Reviewed-by: Mert Tümer 
Tested-by: Mert Tümer 

diff --git a/loleaflet/src/layer/tile/CalcTileLayer.js 
b/loleaflet/src/layer/tile/CalcTileLayer.js
index 2fabe44d2..abbcea8b3 100644
--- a/loleaflet/src/layer/tile/CalcTileLayer.js
+++ b/loleaflet/src/layer/tile/CalcTileLayer.js
@@ -83,13 +83,12 @@ L.CalcTileLayer = L.TileLayer.extend({
 // {type: 'color',  id: 'backcolor', img: 'backcolor', 
hint: _UNO('.uno:BackgroundColor')},
{type: 'button',  id: 'togglemergecells',  img: 
'togglemergecells', hint: _UNO('.uno:ToggleMergeCells', 'spreadsheet', true), 
uno: 'ToggleMergeCells', disabled: true},
 // {type: 'break', id: 'breakmergecells'},
-   {type: 'menu', id: 'textalign', img: 'alignblock', 
hint: _UNO('.uno:TextAlign'),
-   items: [
-   {id: 'alignleft', text: 
_UNO('.uno:AlignLeft', 'spreadsheet', true), icon: 'alignleft', uno: 
'AlignLeft'},
-   {id: 'alignhorizontalcenter', text: 
_UNO('.uno:AlignHorizontalCenter', 'spreadsheet', true), icon: 
'alignhorizontal', uno: 'AlignHorizontalCenter'},
-   {id: 'alignright', text: 
_UNO('.uno:AlignRight', 'spreadsheet', true), icon: 'alignright', uno: 
'AlignRight'},
-   {id: 'alignblock', text: 
_UNO('.uno:AlignBlock', 'spreadsheet', true), icon: 'alignblock', uno: 
'AlignBlock'},
-   ]},
+   {type: 'break'},
+   {type: 'button', id: 'alignleft', img: 'alignleft', 
hint: _UNO('.uno:AlignLeft', 'spreadsheet', true), uno: 'AlignLeft'},
+   {type: 'button', id: 'alignhorizontalcenter', img: 
'alignhorizontal', hint: _UNO('.uno:AlignHorizontalCenter', 'spreadsheet', 
true), uno: 'AlignHorizontalCenter'},
+   {type: 'button', id: 'alignright', img: 'alignright', 
hint: _UNO('.uno:AlignRight', 'spreadsheet', true), uno: 'AlignRight'},
+   {type: 'button', id: 'alignblock', img: 'alignblock', 
hint: _UNO('.uno:AlignBlock', 'spreadsheet', true), uno: 'AlignBlock'},
+   {type: 'break'},
{type: 'button',  id: 'wraptext',  img: 'wraptext', 
hint: _UNO('.uno:WrapText', 'spreadsheet', true), uno: 'WrapText', disabled: 
true},
{type: 'button',  id: 'insertrowsafter',  img: 
'insertrowsafter', hint: _UNO('.uno:InsertRowsAfter'), uno: 'InsertRowsAfter'},
{type: 'button',  id: 'insertcolumnsafter',  img: 
'insertcolumnsafter', hint: _UNO('.uno:InsertColumnsAfter'), uno: 
'InsertColumnsAfter'},
diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js 
b/loleaflet/src/layer/tile/ImpressTileLayer.js
index 70c109593..787411afb 100644
--- a/loleaflet/src/layer/tile/ImpressTileLayer.js
+++ b/loleaflet/src/layer/tile/ImpressTileLayer.js
@@ -122,22 +122,12 @@ L.ImpressTileLayer = L.TileLayer.extend({
{type: 'button',  id: 'strikeout', img: 'strikeout', 
hint: _UNO('.uno:Strikeout'), uno: 'Strikeout'},
{type: 'button',  id: 'fontcolor', img: 'textcolor', 
hint: _UNO('.uno:FontColor')},
{type: 'button',  id: 'backcolor', img: 'backcolor', 
hint: _UNO('.uno:BackgroundColor')},
-   {type: 'menu', id: 'textalign', img: 'alignblock', 
hint: _UNO('.uno:TextAlign'),
-   items: [
-   {id: 'leftpara',text: 
_UNO('.uno:LeftPara', '', true),icon: 'alignleft', uno: 'LeftPara'},
-   {id: 'centerpara',  text: 
_UNO('.uno:CenterPara', '', true),  icon: 'alignhorizontal', uno: 'CenterPara'},
-   {id: 'rightpara',   text: 
_UNO('.uno:RigthPara', '', true),   icon: 'alignright', uno: 'RightPara'},
-   {id: 'justifypara', text: 
_UNO('.uno:JustifyPara', '', true), icon: 'alignblock', uno: 'JustifyPara'},
-   ]},
-   {type: 'menu',  id: 'linespacing',  img: 'linespacing', 
hint: _UNO('.uno:FormatSpacingMenu'),
-   items: [
-   {id: 'spacepara1', 

[Libreoffice-commits] online.git: loleaflet/src

2019-12-10 Thread mert (via logerrit)
 loleaflet/src/control/Control.Toolbar.js |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 9cc80474a8d00fcbe21a532b43179c5440fc672e
Author: mert 
AuthorDate: Tue Dec 10 16:01:00 2019 +0300
Commit: Michael Meeks 
CommitDate: Tue Dec 10 18:37:06 2019 +0100

fix Selected language in the bottom status bar

disappears, also fixed language selection
does not work at all

Change-Id: I1349e6ccc786f4c17130f14ff95e44f4ea858550
Reviewed-on: https://gerrit.libreoffice.org/84845
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index 86474ddce..1fa5f333d 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1833,15 +1833,13 @@ function onCommandStateChanged(e) {
else if (commandName === '.uno:LanguageStatus') {
var code = state;
var language = _(state);
-
var split = code.split(';');
if (split.length > 1) {
language = _(split[0]);
code = split[1];
}
-   updateToolbarItem(statusbar, 'LanguageStatus', 
$('#LanguageStatus').html(language).parent().html());
w2ui['editbar'].set('languagecode', {text: code});
-   $('#tb_actionbar_item_LanguageStatus table table 
td:first-of-type').html(language+'');
+   w2ui['actionbar'].set('LanguageStatus', {text: language, 
selected: language});
}
else if (commandName === '.uno:ModifiedStatus') {
if (e.state === 'true') {
@@ -1962,7 +1960,9 @@ function onCommandValues(e) {
for (var lang in languages) {
translated = languages[lang].translated;
neutral = languages[lang].neutral;
-   toolbaritems.push({ id: neutral, text: translated, uno: 
constLang + encodeURIComponent('Default_' + neutral) });
+   var splitTranslated = translated.split(';');
+   var splitNeutral = neutral.split(';');
+   toolbaritems.push({ id: neutral, text: 
splitTranslated[0], uno: constLang + encodeURIComponent('Default_' + 
splitNeutral[0]) });
}
 
toolbaritems.push({ id: 'reset', text: resetLang, uno: 
constLang + constDefault });
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2019-12-10 Thread mert (via logerrit)
 loleaflet/src/control/Control.Toolbar.js |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit b8317170aad2d05b967d284935752c7a0939f7e8
Author: mert 
AuthorDate: Tue Dec 10 16:01:00 2019 +0300
Commit: Michael Meeks 
CommitDate: Tue Dec 10 18:37:23 2019 +0100

fix Selected language in the bottom status bar

disappears, also fixed language selection
does not work at all

Change-Id: I1349e6ccc786f4c17130f14ff95e44f4ea858550
Reviewed-on: https://gerrit.libreoffice.org/84845
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 
(cherry picked from commit 9cc80474a8d00fcbe21a532b43179c5440fc672e)
Reviewed-on: https://gerrit.libreoffice.org/84886
Tested-by: Michael Meeks 

diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index 5d9de3baf..1537062ce 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -1833,15 +1833,13 @@ function onCommandStateChanged(e) {
else if (commandName === '.uno:LanguageStatus') {
var code = state;
var language = _(state);
-
var split = code.split(';');
if (split.length > 1) {
language = _(split[0]);
code = split[1];
}
-   updateToolbarItem(statusbar, 'LanguageStatus', 
$('#LanguageStatus').html(language).parent().html());
w2ui['editbar'].set('languagecode', {text: code});
-   $('#tb_actionbar_item_LanguageStatus table table 
td:first-of-type').html(language+'');
+   w2ui['actionbar'].set('LanguageStatus', {text: language, 
selected: language});
}
else if (commandName === '.uno:ModifiedStatus') {
if (e.state === 'true') {
@@ -1962,7 +1960,9 @@ function onCommandValues(e) {
for (var lang in languages) {
translated = languages[lang].translated;
neutral = languages[lang].neutral;
-   toolbaritems.push({ id: neutral, text: translated, uno: 
constLang + encodeURIComponent('Default_' + neutral) });
+   var splitTranslated = translated.split(';');
+   var splitNeutral = neutral.split(';');
+   toolbaritems.push({ id: neutral, text: 
splitTranslated[0], uno: constLang + encodeURIComponent('Default_' + 
splitNeutral[0]) });
}
 
toolbaritems.push({ id: 'reset', text: resetLang, uno: 
constLang + constDefault });
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: kit/Watermark.hpp

2019-10-15 Thread mert (via logerrit)
 kit/Watermark.hpp |  179 ++
 1 file changed, 179 insertions(+)

New commits:
commit a1c58c04cc502addd4e1a07215867e44f075f48b
Author: mert 
AuthorDate: Tue Oct 15 20:25:26 2019 +0300
Commit: mert 
CommitDate: Tue Oct 15 20:25:26 2019 +0300

Added Watermark.hpp

Change-Id: I3619283031865f59f94157d5b8df14a94ac9327b

diff --git a/kit/Watermark.hpp b/kit/Watermark.hpp
new file mode 100644
index 0..830023f43
--- /dev/null
+++ b/kit/Watermark.hpp
@@ -0,0 +1,179 @@
+#ifndef INCLUDED_WATERMARK_HPP
+#define INCLUDED_WATERMARK_HPP
+
+#define LOK_USE_UNSTABLE_API
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include "ChildSession.hpp"
+
+class Watermark
+{
+public:
+Watermark(const std::shared_ptr& loKitDoc,
+  const std::shared_ptr & session)
+: _loKitDoc(loKitDoc)
+, _text(session->getWatermarkText())
+, _font("Liberation Sans")
+, _width(0)
+, _height(0)
+, _alphaLevel(session->getWatermarkOpacity())
+{
+}
+
+~Watermark()
+{
+}
+
+void blending(unsigned char* tilePixmap,
+   int offsetX, int offsetY,
+   int tilesPixmapWidth, int tilesPixmapHeight,
+   int tileWidth, int tileHeight,
+   LibreOfficeKitTileMode /*mode*/)
+{
+// set requested watermark size a little bit smaller than tile size
+int width = tileWidth * 0.9;
+int height = tileHeight * 0.9;
+
+const std::vector* pixmap = getPixmap(width, height);
+
+if (pixmap && tilePixmap)
+{
+// center watermark
+const int maxX = std::min(tileWidth, _width);
+const int maxY = std::min(tileHeight, _height);
+offsetX += (tileWidth - maxX) / 2;
+offsetY += (tileHeight - maxY) / 2;
+
+alphaBlend(*pixmap, _width, _height, offsetX, offsetY, tilePixmap, 
tilesPixmapWidth, tilesPixmapHeight);
+}
+}
+
+private:
+/// Alpha blend pixels from 'from' over the 'to'.
+void alphaBlend(const std::vector& from, int from_width, 
int from_height, int from_offset_x, int from_offset_y,
+unsigned char* to, int to_width, int to_height)
+{
+for (int to_y = from_offset_y, from_y = 0; (to_y < to_height) && 
(from_y < from_height) ; ++to_y, ++from_y)
+for (int to_x = from_offset_x, from_x = 0; (to_x < to_width) && 
(from_x < from_width); ++to_x, ++from_x)
+{
+const unsigned char* f = from.data() + 4 * (from_y * 
from_width + from_x);
+double src_r = f[0];
+double src_g = f[1];
+double src_b = f[2];
+double src_a = f[3] / 255.0;
+
+unsigned char* t = to + 4 * (to_y * to_width + to_x);
+double dst_r = t[0];
+double dst_g = t[1];
+double dst_b = t[2];
+double dst_a = t[3] / 255.0;
+
+double out_a = src_a + dst_a * (1.0 - src_a);
+unsigned char out_r = src_r + dst_r * (1.0 - src_a);
+unsigned char out_g = src_g + dst_g * (1.0 - src_a);
+unsigned char out_b = src_b + dst_b * (1.0 - src_a);
+
+t[0] = out_r;
+t[1] = out_g;
+t[2] = out_b;
+t[3] = static_cast(out_a * 255.0);
+}
+}
+
+/// Create bitmap that we later use as the watermark for every tile.
+const std::vector* getPixmap(int width, int height)
+{
+if (!_pixmap.empty() && width == _width && height == _height)
+return &_pixmap;
+
+_pixmap.clear();
+
+_width = width;
+_height = height;
+
+if (!_loKitDoc)
+{
+LOG_ERR("Watermark rendering requested without a valid document.");
+return nullptr;
+}
+
+// renderFont returns a buffer based on RGBA mode, where r, g, b
+// are always set to 0 (black) and the alpha level is 0 everywhere
+// except on the text area; the alpha level take into account of
+// performing anti-aliasing over the text edges.
+unsigned char* textPixels = _loKitDoc->renderFont(_font.c_str(), 
_text.c_str(), &_width, &_height);
+
+if (!textPixels)
+{
+LOG_ERR("Watermark: rendering failed.");
+}
+
+const unsigned int pixel_count = width * height * 4;
+
+std::vector text(textPixels, textPixels + pixel_count);
+// No longer needed.
+std::free(textPixels);
+
+_pixmap.reserve(pixel_count);
+
+// Create the white blurred background
+// Use box blur, it's enough for our purposes
+const int r = 2;
+const double weight = (r+1) * (r+1);
+for (int y = 0; y < height; ++y)
+{
+for (int x = 0; x < width; ++x)
+{
+ 

[Libreoffice-commits] online.git: 3 commits - common/Session.cpp common/Session.hpp kit/ChildSession.hpp kit/Kit.cpp loleaflet/src test/httpwstest.cpp test/TileCacheTests.cpp test/TileQueueTests.cpp t

2019-10-15 Thread mert (via logerrit)
 common/Session.cpp|   17 ++
 common/Session.hpp|   11 +
 kit/ChildSession.hpp  |3 
 kit/Kit.cpp   |  200 --
 loleaflet/src/control/Parts.js|2 
 loleaflet/src/core/Socket.js  |3 
 loleaflet/src/layer/tile/GridLayer.js |2 
 loleaflet/src/layer/tile/TileLayer.js |2 
 test/TileCacheTests.cpp   |   91 +++
 test/TileQueueTests.cpp   |   58 -
 test/UnitTyping.cpp   |4 
 test/WhiteBoxTests.cpp|   21 +--
 test/httpwstest.cpp   |6 -
 wsd/ClientSession.cpp |9 +
 wsd/DocumentBroker.cpp|   12 +-
 wsd/DocumentBroker.hpp|2 
 wsd/TileCache.cpp |   30 +++--
 wsd/TileCache.hpp |8 -
 wsd/TileDesc.hpp  |   45 +--
 19 files changed, 228 insertions(+), 298 deletions(-)

New commits:
commit a534cdc6e7289fc24b0557ba58d842168a2f
Author: mert 
AuthorDate: Tue Oct 15 16:41:33 2019 +0300
Commit: mert 
CommitDate: Tue Oct 15 18:13:03 2019 +0300

Added normalizedViewId to the tests with tilemsg

Change-Id: I479246a2c592b7e4f50b613a0fb0f96af761198c

diff --git a/test/TileCacheTests.cpp b/test/TileCacheTests.cpp
index ba02e8d93..0eba9e2d3 100644
--- a/test/TileCacheTests.cpp
+++ b/test/TileCacheTests.cpp
@@ -177,8 +177,8 @@ public:
 
 void TileCacheTests::testDesc()
 {
-TileCacheDesc descA = TileDesc(0, 256, 256, 0, 0, 3200, 3200, /* ignored 
in cache */ 0, 1234, 1, true);
-TileCacheDesc descB = TileDesc(0, 256, 256, 0, 0, 3200, 3200, /* ignored 
in cache */ 1, 1235, 2, false);
+TileCacheDesc descA = TileDesc(0, 0, 256, 256, 0, 0, 3200, 3200, /* 
ignored in cache */ 0, 1234, 1, true);
+TileCacheDesc descB = TileDesc(0, 0, 256, 256, 0, 0, 3200, 3200, /* 
ignored in cache */ 1, 1235, 2, false);
 
 CPPUNIT_ASSERT_MESSAGE("versions do match", descA.getVersion() != 
descB.getVersion());
 CPPUNIT_ASSERT_MESSAGE("Compare includes fields it should not", descA == 
descB);
@@ -196,6 +196,7 @@ void TileCacheTests::testSimple()
 // now, so it discards the cached data.
 TileCache tc("doc.ods", std::chrono::system_clock::time_point());
 
+int nviewid = 0;
 int part = 0;
 int width = 256;
 int height = 256;
@@ -203,7 +204,7 @@ void TileCacheTests::testSimple()
 int tilePosY = 0;
 int tileWidth = 3840;
 int tileHeight = 3840;
-TileDesc tile(part, width, height, tilePosX, tilePosY, tileWidth, 
tileHeight, -1, 0, -1, false);
+TileDesc tile(nviewid, part, width, height, tilePosX, tilePosY, tileWidth, 
tileHeight, -1, 0, -1, false);
 
 // No Cache
 TileCache::Tile tileData = tc.lookupTile(tile);
@@ -220,7 +221,7 @@ void TileCacheTests::testSimple()
 CPPUNIT_ASSERT_MESSAGE("cached tile corrupted", data == *tileData);
 
 // Invalidate Tiles
-tc.invalidateTiles("invalidatetiles: EMPTY");
+tc.invalidateTiles("invalidatetiles: EMPTY", nviewid);
 
 // No Cache
 tileData = tc.lookupTile(tile);
@@ -236,13 +237,13 @@ void TileCacheTests::testSimpleCombine()
 // First.
 std::shared_ptr socket1 = loadDocAndGetSocket(_uri, 
documentURL, "simpleCombine-1 ");
 
-sendTextFrame(socket1, "tilecombine part=0 width=256 height=256 
tileposx=0,3840 tileposy=0,0 tilewidth=3840 tileheight=3840");
+sendTextFrame(socket1, "tilecombine nviewid=0  part=0 width=256 height=256 
tileposx=0,3840 tileposy=0,0 tilewidth=3840 tileheight=3840");
 
 std::vector tile1a = getResponseMessage(socket1, "tile:", testname);
 CPPUNIT_ASSERT_MESSAGE("did not receive a tile: message as expected", 
!tile1a.empty());
 std::vector tile1b = getResponseMessage(socket1, "tile:", testname);
 CPPUNIT_ASSERT_MESSAGE("did not receive a tile: message as expected", 
!tile1b.empty());
-sendTextFrame(socket1, "tilecombine part=0 width=256 height=256 
tileposx=0,3840 tileposy=0,0 tilewidth=3840 tileheight=3840");
+sendTextFrame(socket1, "tilecombine nviewid=0 part=0 width=256 height=256 
tileposx=0,3840 tileposy=0,0 tilewidth=3840 tileheight=3840");
 
 tile1a = getResponseMessage(socket1, "tile:", testname);
 CPPUNIT_ASSERT_MESSAGE("did not receive a tile: message as expected", 
!tile1a.empty());
@@ -253,7 +254,7 @@ void TileCacheTests::testSimpleCombine()
 TST_LOG("Connecting second client.");
 std::shared_ptr socket2 = loadDocAndGetSocket(_uri, 
documentURL, "simpleCombine-2 ", true);
 
-sendTextFrame(socket2, "tilecombine part=0 width=256 height=256 
tileposx=0,3840 tileposy=0,0 tilewidth=3840 tileheight=3840");
+sendTextFrame(socket2, "tilecombine nviewid=0 part=0 width=256 height=256 
tileposx=0,3840 tileposy=0,0 tilewidth=3840 tileheight=3840");
 
 std::vector tile2a = getResponseMessage(socket2, "tile:", testname);
 CPPUNIT_ASSERT_MESSAGE("did not 

[Libreoffice-commits] online.git: 2 commits - kit/Watermark.hpp loleaflet/css

2019-11-26 Thread mert (via logerrit)
 kit/Watermark.hpp |2 +-
 loleaflet/css/toolbar.css |5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 247ef399155443ecd2eadf641873bd55f2b4abd9
Author: mert 
AuthorDate: Tue Nov 26 20:17:49 2019 +0300
Commit: Michael Meeks 
CommitDate: Wed Nov 27 05:34:39 2019 +0100

fix Insert shape dropdown is too narrow on desktop

Change-Id: Id128cd455e3efb34498511434a38c03efa93c602
Reviewed-on: https://gerrit.libreoffice.org/83814
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 9167625bb..5997dd077 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -760,9 +760,8 @@ button.leaflet-control-search-next
background: rgba(255, 255, 255, 0.5);
position: relative;
padding: 2px;
-   display: block;
-   overflow: auto; /* child margins otherwise don't expand *this* 
element (parent) */
-   width: 100%;
+   display: inline-block;
+   width:  350px;
height: 100%;
 }
 
commit ba423563307b9e7943723042dcfa8ccf029e9faf
Author: mert 
AuthorDate: Mon Nov 25 07:55:21 2019 +0300
Commit: Michael Meeks 
CommitDate: Wed Nov 27 05:34:27 2019 +0100

Fix minor comparison error

This patch is a follow-up for overflowing
watermarks patch

Change-Id: I8613736dc4fea49a22ae29aba209c95b1ea93557
Reviewed-on: https://gerrit.libreoffice.org/83635
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/kit/Watermark.hpp b/kit/Watermark.hpp
index 47aea5878..5fc0e5c3c 100644
--- a/kit/Watermark.hpp
+++ b/kit/Watermark.hpp
@@ -71,7 +71,7 @@ private:
 {
 unsigned char* t = to + 4 * (to_y * to_width + to_x);
 
-if (t[3] != 255.0)
+if (t[3] != 255)
 continue;
 
 double dst_r = t[0];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: loleaflet/src

2019-11-26 Thread mert (via logerrit)
 loleaflet/src/layer/tile/WriterTileLayer.js |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit d897a99ccc479ca8cae6c522f5862ea6702221ad
Author: mert 
AuthorDate: Tue Nov 26 22:48:19 2019 +0300
Commit: Michael Meeks 
CommitDate: Wed Nov 27 05:41:06 2019 +0100

Remove insert-table button on quickbar

Change-Id: Iede5b7bfa4dedc513738da62501b421ad17a9d65
Reviewed-on: https://gerrit.libreoffice.org/83826
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/loleaflet/src/layer/tile/WriterTileLayer.js 
b/loleaflet/src/layer/tile/WriterTileLayer.js
index 5fd7643e6..f8cdbd7fe 100644
--- a/loleaflet/src/layer/tile/WriterTileLayer.js
+++ b/loleaflet/src/layer/tile/WriterTileLayer.js
@@ -82,9 +82,6 @@ L.WriterTileLayer = L.TileLayer.extend({
{type: 'break', id: 'breakbullet', hidden: true},
{type: 'button',  id: 'incrementindent',  img: 
'incrementindent', hint: _UNO('.uno:IncrementIndent', '', true), uno: 
'IncrementIndent', disabled: true},
{type: 'button',  id: 'decrementindent',  img: 
'decrementindent', hint: _UNO('.uno:DecrementIndent', '', true), uno: 
'DecrementIndent', disabled: true},
-   {type: 'break', id: 'breakindent'},
-   {type: 'drop',  id: 'inserttable',  img: 'inserttable', 
hint: _('Insert table'), hidden: true, overlay: {onShow: window.insertTable},
-html: ''},
];
 
var toolbar = $('#toolbar-up');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: loolwsd.xml.in wsd/Storage.cpp

2019-11-25 Thread mert (via logerrit)
 loolwsd.xml.in  |1 +
 wsd/Storage.cpp |4 
 2 files changed, 5 insertions(+)

New commits:
commit 8ca7391f0593228ff7d41074bd5a5e09fe0a0918
Author: mert 
AuthorDate: Mon Nov 25 15:03:49 2019 +0300
Commit: Michael Meeks 
CommitDate: Mon Nov 25 13:10:05 2019 +0100

Added an option to override watermark texts

in loolwsd.xml. If set, watermarks will be the same
as entered for all the views instead of per view
watermarks sent in CheckFileInfo

Change-Id: I0943520423abc2567f44920f8679057b3cfbf01f
Reviewed-on: https://gerrit.libreoffice.org/83666
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index 79a930d7f..0ebe62e79 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -109,6 +109,7 @@
 
 
   
+  
 
 
 
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index 45198ad77..efe0fc130 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -672,6 +672,10 @@ std::unique_ptr 
WopiStorage::getWOPIFileInfo(const Au
 if (supportsLocks)
 lockCtx.initSupportsLocks();
 
+std::string overrideWatermarks = 
LOOLWSD::getConfigValue("watermark.text", "");
+if (!overrideWatermarks.empty())
+watermarkText = overrideWatermarks;
+
 return std::unique_ptr(new WOPIFileInfo(
 {userId, obfuscatedUserId, userName, userExtraInfo, watermarkText, 
templateSaveAs, templateSource,
  canWrite, postMessageOrigin, hidePrintOption, hideSaveOption, 
hideExportOption,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - 2 commits - loleaflet/admin loolwsd.xml.in wsd/Storage.cpp

2019-11-25 Thread mert (via logerrit)
 loleaflet/admin/admin.html |   11 ++-
 loleaflet/admin/src/AdminSocketBase.js |8 
 loolwsd.xml.in |1 +
 wsd/Storage.cpp|4 
 4 files changed, 19 insertions(+), 5 deletions(-)

New commits:
commit ccc289dc44e214fd301c71251b328538412e4e82
Author: mert 
AuthorDate: Mon Nov 25 15:03:49 2019 +0300
Commit: Michael Meeks 
CommitDate: Mon Nov 25 12:18:31 2019 +

Added an option to override watermark texts

in loolwsd.xml. If set, watermarks will be the same
as entered for all the views instead of per view
watermarks sent in CheckFileInfo

Change-Id: I0943520423abc2567f44920f8679057b3cfbf01f
Reviewed-on: https://gerrit.libreoffice.org/83666
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 
(cherry picked from commit 8ca7391f0593228ff7d41074bd5a5e09fe0a0918)

diff --git a/loolwsd.xml.in b/loolwsd.xml.in
index faf305e5e..719493bf0 100644
--- a/loolwsd.xml.in
+++ b/loolwsd.xml.in
@@ -108,6 +108,7 @@
 
 
   
+  
 
 
 
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index 9b41c0798..ce1d38b62 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -645,6 +645,10 @@ std::unique_ptr 
WopiStorage::getWOPIFileInfo(const Au
 const Poco::Timestamp modifiedTime = iso8601ToTimestamp(lastModifiedTime, 
"LastModifiedTime");
 setFileInfo(FileInfo({filename, ownerId, modifiedTime, size}));
 
+std::string overrideWatermarks = 
LOOLWSD::getConfigValue("watermark.text", "");
+if (!overrideWatermarks.empty())
+watermarkText = overrideWatermarks;
+
 return std::unique_ptr(new WOPIFileInfo(
 {userId, obfuscatedUserId, userName, userExtraInfo, watermarkText, 
templateSaveAs, templateSource,
  canWrite, postMessageOrigin, hidePrintOption, hideSaveOption, 
hideExportOption,
commit 80ddda2efeede72b523ad0bfbd899d5f907049d9
Author: Michael Meeks 
AuthorDate: Wed Nov 20 14:31:33 2019 +
Commit: Michael Meeks 
CommitDate: Mon Nov 25 12:18:31 2019 +

IE11 - adminconsole, polyfill and HTML cleanup.

Change-Id: I1cbc24aeb3c0398f399702ac9749a204b1b59a56

diff --git a/loleaflet/admin/admin.html b/loleaflet/admin/admin.html
index 23423f2ea..3f4c14708 100644
--- a/loleaflet/admin/admin.html
+++ b/loleaflet/admin/admin.html
@@ -1,12 +1,12 @@
 
 
   
-
-
-
+
+
+
 
-
-
+
+
 
 LibreOffice Online - Admin console
 
@@ -90,6 +90,7 @@
  
document.write(l10nstrings.strServerUptime)

  
+
 
   
   
diff --git a/loleaflet/admin/src/AdminSocketBase.js 
b/loleaflet/admin/src/AdminSocketBase.js
index 35480a388..a8c136d6d 100644
--- a/loleaflet/admin/src/AdminSocketBase.js
+++ b/loleaflet/admin/src/AdminSocketBase.js
@@ -4,6 +4,14 @@
 */
 
 /* global _ Util vex Base */
+
+// polyfill startsWith for IE11
+if (typeof String.prototype.startsWith !== 'function') {
+   String.prototype.startsWith = function (str) {
+   return this.slice(0, str.length) === str;
+   };
+}
+
 var AdminSocketBase = Base.extend({
socket: null,
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - bundled/include kit/DummyLibreOfficeKit.cpp kit/Watermark.hpp

2019-11-27 Thread mert (via logerrit)
 bundled/include/LibreOfficeKit/LibreOfficeKit.h |8 
 kit/DummyLibreOfficeKit.cpp |   23 +++
 kit/Watermark.hpp   |2 +-
 3 files changed, 32 insertions(+), 1 deletion(-)

New commits:
commit e70bdc3c9c44c0bb19aa241c7e81e339a84bb50b
Author: mert 
AuthorDate: Thu Oct 24 12:13:46 2019 +0300
Commit: Andras Timar 
CommitDate: Thu Nov 28 00:20:02 2019 +0100

Rotate Watermarks with 45 degree angle

Change-Id: I9b399a4e1daf52f536d4becae2cc6dc692e16f7a
Reviewed-on: https://gerrit.libreoffice.org/81436
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 2c598ba4ef8015e9fd2a5a6ffe9fa064dbbead4e)
Reviewed-on: https://gerrit.libreoffice.org/83934
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKit.h 
b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
index 78a452a84..681556690 100644
--- a/bundled/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/bundled/include/LibreOfficeKit/LibreOfficeKit.h
@@ -256,6 +256,14 @@ struct _LibreOfficeKitDocumentClass
int* pFontWidth,
int* pFontHeight);
 
+/// @see lok::Document::renderFontOrientation().
+unsigned char* (*renderFontOrientation) (LibreOfficeKitDocument* pThis,
+   const char* pFontName,
+   const char* pChar,
+   int* pFontWidth,
+   int* pFontHeight,
+   int pOrientation);
+
 /// @see lok::Document::getPartHash().
 char* (*getPartHash) (LibreOfficeKitDocument* pThis,
   int nPart);
diff --git a/kit/DummyLibreOfficeKit.cpp b/kit/DummyLibreOfficeKit.cpp
index edeb15d7d..15d410dba 100644
--- a/kit/DummyLibreOfficeKit.cpp
+++ b/kit/DummyLibreOfficeKit.cpp
@@ -118,6 +118,12 @@ static unsigned char* 
doc_renderFont(LibreOfficeKitDocument* pThis,
   const char *pChar,
   int* pFontWidth,
   int* pFontHeight);
+static unsigned char* doc_renderFontOrientation(LibreOfficeKitDocument* pThis,
+  const char *pFontName,
+  const char *pChar,
+  int* pFontWidth,
+  int* pFontHeight,
+  int pOrientation);
 static char* doc_getPartHash(LibreOfficeKitDocument* pThis, int nPart);
 
 static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** 
pOutput);
@@ -166,6 +172,7 @@ LibLODocument_Impl::LibLODocument_Impl()
 m_pDocumentClass->getViewIds = doc_getViewIds;
 
 m_pDocumentClass->renderFont = doc_renderFont;
+m_pDocumentClass->renderFontOrientation = doc_renderFontOrientation;
 m_pDocumentClass->getPartHash = doc_getPartHash;
 
 m_pDocumentClass->renderShapeSelection = doc_renderShapeSelection;
@@ -523,6 +530,22 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* 
/*pThis*/,
 return nullptr;
 }
 
+unsigned char* doc_renderFontOrientation(LibreOfficeKitDocument* /*pThis*/,
+const char* pFontName,
+const char* pChar,
+int* pFontWidth,
+int* pFontHeight,
+int pOrientation)
+{
+(void) pFontName;
+(void) pChar;
+(void) pFontWidth;
+(void) pFontHeight;
+(void) pOrientation;
+
+return nullptr;
+}
+
 static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** 
pOutput)
 {
 (void) pThis;
diff --git a/kit/Watermark.hpp b/kit/Watermark.hpp
index b9364f795..3223f0590 100644
--- a/kit/Watermark.hpp
+++ b/kit/Watermark.hpp
@@ -110,7 +110,7 @@ private:
 // are always set to 0 (black) and the alpha level is 0 everywhere
 // except on the text area; the alpha level take into account of
 // performing anti-aliasing over the text edges.
-unsigned char* textPixels = _loKitDoc->renderFont(_font.c_str(), 
_text.c_str(), &_width, &_height);
+unsigned char* textPixels = _loKitDoc->renderFont(_font.c_str(), 
_text.c_str(), &_width, &_height, 450);
 
 if (!textPixels)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - kit/Watermark.hpp

2019-11-22 Thread mert (via logerrit)
 kit/Watermark.hpp |   16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 778fb8d0ddaa9ff980a104f10f6c27f854c0de41
Author: mert 
AuthorDate: Mon Nov 18 14:15:11 2019 +0300
Commit: Michael Meeks 
CommitDate: Fri Nov 22 12:03:50 2019 +0100

Fix watermarks overflow the document area

Change-Id: Ia767d0b4f935bc28e0fb0ed0f8c2ddcfb8093734
Reviewed-on: https://gerrit.libreoffice.org/83441
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 
(cherry picked from commit ed2c34296baa16e6d84ae01cef750a239e0bed0f)
Reviewed-on: https://gerrit.libreoffice.org/83458
Tested-by: Jenkins CollaboraOffice 

diff --git a/kit/Watermark.hpp b/kit/Watermark.hpp
index 063db0385..b9364f795 100644
--- a/kit/Watermark.hpp
+++ b/kit/Watermark.hpp
@@ -61,18 +61,22 @@ private:
 for (int to_y = from_offset_y, from_y = 0; (to_y < to_height) && 
(from_y < from_height) ; ++to_y, ++from_y)
 for (int to_x = from_offset_x, from_x = 0; (to_x < to_width) && 
(from_x < from_width); ++to_x, ++from_x)
 {
-const unsigned char* f = from.data() + 4 * (from_y * 
from_width + from_x);
-double src_r = f[0];
-double src_g = f[1];
-double src_b = f[2];
-double src_a = f[3] / 255.0;
-
 unsigned char* t = to + 4 * (to_y * to_width + to_x);
+
+if (t[3] != 255.0)
+continue;
+
 double dst_r = t[0];
 double dst_g = t[1];
 double dst_b = t[2];
 double dst_a = t[3] / 255.0;
 
+const unsigned char* f = from.data() + 4 * (from_y * 
from_width + from_x);
+double src_r = f[0];
+double src_g = f[1];
+double src_b = f[2];
+double src_a = f[3] / 255.0;
+
 double out_a = src_a + dst_a * (1.0 - src_a);
 unsigned char out_r = src_r + dst_r * (1.0 - src_a);
 unsigned char out_g = src_g + dst_g * (1.0 - src_a);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: kit/Watermark.hpp

2019-11-22 Thread mert (via logerrit)
 kit/Watermark.hpp |   16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit ed2c34296baa16e6d84ae01cef750a239e0bed0f
Author: mert 
AuthorDate: Mon Nov 18 14:15:11 2019 +0300
Commit: Michael Meeks 
CommitDate: Fri Nov 22 11:15:56 2019 +0100

Fix watermarks overflow the document area

Change-Id: Ia767d0b4f935bc28e0fb0ed0f8c2ddcfb8093734
Reviewed-on: https://gerrit.libreoffice.org/83441
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/kit/Watermark.hpp b/kit/Watermark.hpp
index 79fd5fb2c..47aea5878 100644
--- a/kit/Watermark.hpp
+++ b/kit/Watermark.hpp
@@ -69,18 +69,22 @@ private:
 for (int to_y = from_offset_y, from_y = 0; (to_y < to_height) && 
(from_y < from_height) ; ++to_y, ++from_y)
 for (int to_x = from_offset_x, from_x = 0; (to_x < to_width) && 
(from_x < from_width); ++to_x, ++from_x)
 {
-const unsigned char* f = from.data() + 4 * (from_y * 
from_width + from_x);
-double src_r = f[0];
-double src_g = f[1];
-double src_b = f[2];
-double src_a = f[3] / 255.0;
-
 unsigned char* t = to + 4 * (to_y * to_width + to_x);
+
+if (t[3] != 255.0)
+continue;
+
 double dst_r = t[0];
 double dst_g = t[1];
 double dst_b = t[2];
 double dst_a = t[3] / 255.0;
 
+const unsigned char* f = from.data() + 4 * (from_y * 
from_width + from_x);
+double src_r = f[0];
+double src_g = f[1];
+double src_b = f[2];
+double src_a = f[3] / 255.0;
+
 double out_a = src_a + dst_a * (1.0 - src_a);
 unsigned char out_r = src_r + dst_r * (1.0 - src_a);
 unsigned char out_g = src_g + dst_g * (1.0 - src_a);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] online.git: android/app

2019-12-18 Thread mert (via logerrit)
 
android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
 |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 638b2c7eda0145df45a9398a4af30716eadcc1d0
Author: mert 
AuthorDate: Tue Dec 17 11:38:28 2019 +
Commit: Michael Meeks 
CommitDate: Wed Dec 18 15:14:20 2019 +0100

Preselect the new document textbox on creation

This way it is easier to delete the text
and enter a new one

Change-Id: I98c28ed8782f8546ceca464e0dae6b8a637db198
Reviewed-on: https://gerrit.libreoffice.org/85295
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
index 60273b622..2317d42ad 100644
--- 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
+++ 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
@@ -28,7 +28,6 @@ import android.net.Uri;
 import android.os.AsyncTask;
 import android.os.Build;
 import android.os.Bundle;
-import android.os.Handler;
 import android.preference.PreferenceManager;
 import android.provider.Settings;
 import android.text.Editable;
@@ -47,6 +46,7 @@ import android.view.ViewGroup;
 import android.view.animation.Animation;
 import android.view.animation.AnimationUtils;
 import android.view.animation.OvershootInterpolator;
+import android.view.inputmethod.InputMethodManager;
 import android.widget.Button;
 import android.widget.EditText;
 import android.widget.ImageView;
@@ -593,6 +593,10 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 // file name input
 final EditText input = (EditText)view.findViewById(R.id.fileName);
 input.setText(defaultFileName);
+input.setSelection(0, input.getText().toString().lastIndexOf('.'));
+input.requestFocus();
+InputMethodManager imm = (InputMethodManager) 
getSystemService(Context.INPUT_METHOD_SERVICE);
+imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
 
 // warning text to notify the user that such a file already exists
 final TextView warningText = 
(TextView)view.findViewById(R.id.overwriteWarning);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2019-12-18 Thread mert (via logerrit)
 loleaflet/src/control/Control.JSDialogBuilder.js |2 +-
 loleaflet/src/map/Clipboard.js   |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit fc04ba5502d331bde58d796000a787f98b6c87aa
Author: mert 
AuthorDate: Wed Dec 18 19:51:48 2019 +0300
Commit: Michael Meeks 
CommitDate: Wed Dec 18 19:29:18 2019 +0100

Clipboard improvements for online mobile

This patch allows me to copy content to clipboard
and paste it into another apps also it works
with images/shapes too. They are able to be copied into
clipboard.

Change-Id: If6660e1f0ee5821fccbb257d2baab45305b4c3fb
Reviewed-on: https://gerrit.libreoffice.org/85408
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index f031a13d8..617a8d9d0 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1444,7 +1444,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
// before close the wizard then execute the 
action
if (data.executionType === 'action') {

builder.map.menubar._executeAction(undefined, data.id);
-   } else {
+   } else if 
(!builder.map._clip.filterExecCopyPaste(data.command)) {
builder.map.sendUnoCommand(data.command)
}
});
diff --git a/loleaflet/src/map/Clipboard.js b/loleaflet/src/map/Clipboard.js
index 2808f2690..65ab6d1ab 100644
--- a/loleaflet/src/map/Clipboard.js
+++ b/loleaflet/src/map/Clipboard.js
@@ -469,7 +469,8 @@ L.Clipboard = L.Class.extend({
 
var plainText = this.stripHTML(text);
if (ev.clipboardData) { // Standard
-   ev.clipboardData.setData('text/plain', plainText);
+   // if copied content is graphical then plainText is 
null and it does not work on mobile.
+   ev.clipboardData.setData('text/plain', plainText ? 
plainText: ' ');
ev.clipboardData.setData('text/html', text);
console.log('Put "' + text + '" on the clipboard');
this._clipboardSerial++;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: android/lib

2020-02-24 Thread mert (via logerrit)
 android/lib/build.gradle |   16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 04dc25bfe09c52424d4a58073886353ecea14f08
Author: mert 
AuthorDate: Tue Feb 25 00:14:13 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Tue Feb 25 00:16:51 2020 +0100

android: reduce the dictionary files

we copy dictionary files more than necessary
only the required ones are included

Change-Id: I200a95b2593109ff10e7214476fe6ddd2e792ae5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89384
Tested-by: Jan Holesovsky 
Reviewed-by: Jan Holesovsky 

diff --git a/android/lib/build.gradle b/android/lib/build.gradle
index 46771f320..3f8a61d79 100644
--- a/android/lib/build.gradle
+++ b/android/lib/build.gradle
@@ -127,9 +127,21 @@ task copyUnpackAssets(type: Copy) {
 }
 into('share') {
 from "${liboInstdir}/share"
-// extensions - for the dictionaries for hunspell
 // liblangtag data is needed for locales like en-CH
-includes = ['extensions/dict-de/**', 'extensions/dict-en/**', 
'extensions/dict-es/**', 'extensions/dict-pt-BR/**', 'liblangtag/**']
+include 'liblangtag/**'
+}
+
+into('share') {
+from "${liboInstdir}/share"
+// extensions - for the dictionaries for hunspell
+includes = ['extensions/dict-de/**', 'extensions/dict-en/**', 
'extensions/dict-es/**', 'extensions/dict-pt-BR/**']
+exclude { FileTreeElement details ->
+!(details.file.isDirectory() ||
+details.file.name.endsWith('.xcu') ||
+details.file.name.endsWith('.dic') ||
+details.file.name.endsWith('.aff') ||
+details.file.name.endsWith('.xml'))
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-0' - loleaflet/src

2020-03-02 Thread mert (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit d2c1d60c34adab0ea50443cd5ef54c5f4571d640
Author: mert 
AuthorDate: Mon Mar 2 16:48:50 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Mar 2 21:28:34 2020 +0100

Fix hyperlinkclicked message is not properly parsed

$.inArray does not work because the parsed msg
is not an array
Change-Id: I68a8312da17b0832b09a88afeaf05ad75a2c6e2d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89833
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit 41d065af2a8e58d76f53c9b57ff55093e0210531)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89804

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index e9b5ed12b..9de7db98d 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1095,13 +1095,15 @@ L.TileLayer = L.GridLayer.extend({
_onHyperlinkClickedMsg: function (textMsg) {
var link = null;
var coords = null;
+   var hyperlinkMsgStart = 'hyperlinkclicked: ';
+   var coordinatesMsgStart = ' coordinates: ';
 
-   if ($.inArray('coordinates', textMsg) !== -1) {
-   var coordpos = textMsg.indexOf(' coordinates');
-   link = textMsg.substring(18, coordpos);
-   coords = textMsg.substring(coordpos+12);
+   if (textMsg.indexOf(coordinatesMsgStart) !== -1) {
+   var coordpos = textMsg.indexOf(coordinatesMsgStart);
+   link = textMsg.substring(hyperlinkMsgStart.length, 
coordpos);
+   coords = 
textMsg.substring(coordpos+coordinatesMsgStart.length);
} else
-   link = textMsg.substring(18);
+   link = textMsg.substring(hyperlinkMsgStart.length);
 
this._map.fire('hyperlinkclicked', {url: link, coordinates: 
coords});
},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2020-03-02 Thread mert (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 41d065af2a8e58d76f53c9b57ff55093e0210531
Author: mert 
AuthorDate: Mon Mar 2 16:48:50 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Mar 2 20:50:59 2020 +0100

Fix hyperlinkclicked message is not properly parsed

$.inArray does not work because the parsed msg
is not an array
Change-Id: I68a8312da17b0832b09a88afeaf05ad75a2c6e2d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89833
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index e9b5ed12b..9de7db98d 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1095,13 +1095,15 @@ L.TileLayer = L.GridLayer.extend({
_onHyperlinkClickedMsg: function (textMsg) {
var link = null;
var coords = null;
+   var hyperlinkMsgStart = 'hyperlinkclicked: ';
+   var coordinatesMsgStart = ' coordinates: ';
 
-   if ($.inArray('coordinates', textMsg) !== -1) {
-   var coordpos = textMsg.indexOf(' coordinates');
-   link = textMsg.substring(18, coordpos);
-   coords = textMsg.substring(coordpos+12);
+   if (textMsg.indexOf(coordinatesMsgStart) !== -1) {
+   var coordpos = textMsg.indexOf(coordinatesMsgStart);
+   link = textMsg.substring(hyperlinkMsgStart.length, 
coordpos);
+   coords = 
textMsg.substring(coordpos+coordinatesMsgStart.length);
} else
-   link = textMsg.substring(18);
+   link = textMsg.substring(hyperlinkMsgStart.length);
 
this._map.fire('hyperlinkclicked', {url: link, coordinates: 
coords});
},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2020-01-28 Thread mert (via logerrit)
 loleaflet/src/control/Control.Toolbar.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 78f3db04b52732732a381608dce5bcebee2967e7
Author: mert 
AuthorDate: Wed Jan 8 16:46:09 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Tue Jan 28 10:43:58 2020 +0100

Fix quickbar colorpicker display problem

Change-Id: I274ac457e58f9f109a46583a5e174a16d8eab766
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86432
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index c9bd08a6e..6af48dbad 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -738,7 +738,7 @@ function getColorPickerData(type) {
uno = '.uno:BackColor';
}
var data = {
-   id: 'box',
+   id: 'colorpicker',
type: 'window',
text: type,
enabled: 'true',
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2020-01-28 Thread mert (via logerrit)
 loleaflet/src/control/Control.MobileWizard.js |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 0c91e668186fa40b41c823c90cd53b467051495f
Author: mert 
AuthorDate: Tue Jan 28 15:19:03 2020 +0300
Commit: Michael Meeks 
CommitDate: Tue Jan 28 22:38:42 2020 +0100

mobilewizard: Fix character properties

This patch fixes non-showing character properties
on calc, also a bit improved the related function
in terms of performance.

Change-Id: Iba3f32ec535dd0d34bb56173151c52156564
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87610
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/loleaflet/src/control/Control.MobileWizard.js 
b/loleaflet/src/control/Control.MobileWizard.js
index f455ad2ea..02b90407b 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -344,10 +344,9 @@ L.Control.MobileWizard = L.Control.extend({
var textIdx = this._findIdxInParentById(deck, textName);
if (stylesIdx >= 0 && textIdx >= 0)
{
-   var moveContent = 
deck.children[stylesIdx].children;
-   deck.children.splice(stylesIdx, 1); // remove
-   textIdx = this._findIdxInParentById(deck, 
textName); // re-lookup
-   deck.children[textIdx].children = 
moveContent.concat(deck.children[textIdx].children);
+   var moveContent = 
deck.children[stylesIdx].children[0].children;
+   deck.children[textIdx].children[0].children = 
moveContent.concat(deck.children[textIdx].children[0].children);
+   deck.children.splice(stylesIdx, 1); //remove 
the styles property
}
this._removeItems(deck, ['cellbordertype', 
'borderlinestyle', 'borderlinecolor']);
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2020-01-28 Thread mert (via logerrit)
 loleaflet/src/control/Control.MobileWizard.js |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 227b11488ac2c2b00ea1f10f2008d28126114ed4
Author: mert 
AuthorDate: Thu Jan 23 20:19:52 2020 +0300
Commit: Michael Meeks 
CommitDate: Tue Jan 28 22:36:48 2020 +0100

mobilewizard: remove some problematic items

Under Cell Appearance properties, cellbordertype, borderlinestyle,
borderlinecolor items are removed due to not working properly.

Change-Id: I56fd71355051a0b1dc20f6dc86090e2f35520b3a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87608
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/loleaflet/src/control/Control.MobileWizard.js 
b/loleaflet/src/control/Control.MobileWizard.js
index ea7a7c557..f455ad2ea 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -349,6 +349,7 @@ L.Control.MobileWizard = L.Control.extend({
textIdx = this._findIdxInParentById(deck, 
textName); // re-lookup
deck.children[textIdx].children = 
moveContent.concat(deck.children[textIdx].children);
}
+   this._removeItems(deck, ['cellbordertype', 
'borderlinestyle', 'borderlinecolor']);
}
 
this._removeItems(data, ['editcontour']);
@@ -384,14 +385,12 @@ L.Control.MobileWizard = L.Control.extend({
if (data.children[i].id === items[j]) {
data.children.splice(i, 1);
childRemoved = true;
-   continue;
}
}
-   if (childRemoved === true) {
+   if (childRemoved && i > 0)
i = i - 1;
-   } else {
+   if (data.children[i])
this._removeItems(data.children[i], 
items);
-   }
}
}
},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: android/lib

2020-02-06 Thread mert (via logerrit)
 android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 176be0101210721204826aff1da6b58e2124
Author: mert 
AuthorDate: Thu Feb 6 11:58:46 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Thu Feb 6 10:06:37 2020 +0100

Destroy webview when LOActivity is destroyed

Chrome://inspect shows that webviews are not destroyed
even after closing the activity.

Change-Id: Ib0fb2f0b75b06ae349a37a11fb0c9cb35faf3ff5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88074
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git 
a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java 
b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
index 34fd8b1b2..acbd9cdf5 100644
--- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
+++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
@@ -441,6 +441,7 @@ public class LOActivity extends AppCompatActivity {
 super.onDestroy();
 Log.i(TAG, "onDestroy() - we know we are leaving the document");
 nativeLooper.quit();
+mWebView.destroy();
 postMobileMessageNative("BYE");
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: android/app android/lib

2020-02-03 Thread mert (via logerrit)
 android/app/src/main/java/org/libreoffice/androidapp/SettingsActivity.java  |  
  3 +++
 android/app/src/main/res/values/strings.xml |  
  2 ++
 android/app/src/main/res/xml/libreoffice_preferences.xml|  
  8 
 android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java|  
  3 ++-
 android/lib/src/main/java/org/libreoffice/androidlib/SlideShowActivity.java |  
  7 ++-
 5 files changed, 21 insertions(+), 2 deletions(-)

New commits:
commit 4122634c9b8ef217877b168f529e1147ea4a00db
Author: mert 
AuthorDate: Wed Jan 29 17:13:24 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Mon Feb 3 23:07:41 2020 +0100

Added the chrome debugging enablement into the settings

Change-Id: I24c97018b499517637f460ba663737ca781ee975
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87687
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git 
a/android/app/src/main/java/org/libreoffice/androidapp/SettingsActivity.java 
b/android/app/src/main/java/org/libreoffice/androidapp/SettingsActivity.java
index c51d098af..510979a7a 100644
--- a/android/app/src/main/java/org/libreoffice/androidapp/SettingsActivity.java
+++ b/android/app/src/main/java/org/libreoffice/androidapp/SettingsActivity.java
@@ -34,6 +34,9 @@ public class SettingsActivity extends AppCompatActivity {
 if (!BuildConfig.DEBUG) {
 findPreference("ENABLE_SHOW_DEBUG_INFO").setVisible(false);
 }
+else {
+findPreference("ENABLE_CHROME_DEBUGGING").setVisible(false);
+}
 }
 
 @Override
diff --git a/android/app/src/main/res/values/strings.xml 
b/android/app/src/main/res/values/strings.xml
index 12f65fc11..390ec274b 100644
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -27,6 +27,8 @@
 Set which file filter should be used by 
default.
 Show Debug Info
 Enable to show debug 
information in document viewer
+Chrome Debugging
+Enable to use Chrome\'s 
debugging tool in the document
 
 Show License
 Show Notice
diff --git a/android/app/src/main/res/xml/libreoffice_preferences.xml 
b/android/app/src/main/res/xml/libreoffice_preferences.xml
index 5f8389d45..a6da9e4ef 100644
--- a/android/app/src/main/res/xml/libreoffice_preferences.xml
+++ b/android/app/src/main/res/xml/libreoffice_preferences.xml
@@ -43,6 +43,14 @@
 android:summary="@string/pref_show_debug_info_summary"
 android:defaultValue="false"
 app:iconSpaceReserved="false" />
+
 
 
 
diff --git 
a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java 
b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
index 9c7729ef9..34fd8b1b2 100644
--- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
+++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
@@ -292,10 +292,11 @@ public class LOActivity extends AppCompatActivity {
 webSettings.setJavaScriptEnabled(true);
 mWebView.addJavascriptInterface(this, "LOOLMessageHandler");
 
+boolean isChromeDebugEnabled = 
sPrefs.getBoolean("ENABLE_CHROME_DEBUGGING", false);
 // allow debugging (when building the debug version); see details in
 // 
https://developers.google.com/web/tools/chrome-devtools/remote-debugging/webviews
 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
-if ((getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) 
!= 0) {
+if ((getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) 
!= 0 || isChromeDebugEnabled) {
 WebView.setWebContentsDebuggingEnabled(true);
 }
 }
diff --git 
a/android/lib/src/main/java/org/libreoffice/androidlib/SlideShowActivity.java 
b/android/lib/src/main/java/org/libreoffice/androidlib/SlideShowActivity.java
index 21b9f..761d73c07 100644
--- 
a/android/lib/src/main/java/org/libreoffice/androidlib/SlideShowActivity.java
+++ 
b/android/lib/src/main/java/org/libreoffice/androidlib/SlideShowActivity.java
@@ -12,9 +12,11 @@ package org.libreoffice.androidlib;
 import androidx.annotation.NonNull;
 import androidx.appcompat.app.AppCompatActivity;
 
+import android.content.SharedPreferences;
 import android.content.pm.ApplicationInfo;
 import android.graphics.Color;
 import android.os.Bundle;
+import android.preference.PreferenceManager;
 import android.util.Log;
 import android.view.View;
 import android.webkit.WebSettings;
@@ -39,7 +41,10 @@ public class SlideShowActivity extends AppCompatActivity {
 slidesSvgUri = savedInstanceState.getString(SVG_URI_KEY);
 }
 Log.d(TAG, "SlideShow Svg Uri "+slidesSvgUri);
-if ((getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 
0) {
+SharedPreferences sPrefs = 

[Libreoffice-commits] online.git: loleaflet/src

2020-01-28 Thread mert (via logerrit)
 loleaflet/src/control/Control.JSDialogBuilder.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit abac1fa536a0bd052a071f8f699c2867f83cb07d
Author: mert 
AuthorDate: Tue Jan 28 12:58:38 2020 +0300
Commit: Michael Meeks 
CommitDate: Tue Jan 28 15:21:05 2020 +0100

mobilewizard: Changed hit area for unoToolButton

only the image button was clickable which was
confusing where to tap on mobile. This patch
changes the hit area to surrounding div instead

Change-Id: Idfa2533b5daaa9df8f288eab5f9bb4b9e861d822
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87609
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 71c074103..a3dcdb844 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -1201,7 +1201,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
button.innerHTML = builder._cleanText(data.text);
}
 
-   $(button).click(function () {
+   $(div).click(function () {
builder.callback('toolbutton', 'click', button, 
data.command, builder);
});
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2020-02-17 Thread mert (via logerrit)
 loleaflet/src/control/Control.MobileWizard.js |9 +
 loleaflet/src/map/Map.js  |   16 ++--
 2 files changed, 23 insertions(+), 2 deletions(-)

New commits:
commit b783cb30e866b84a75b3ae7c3d08a39c42528b01
Author: mert 
AuthorDate: Fri Feb 7 15:48:58 2020 +0300
Commit: Michael Meeks 
CommitDate: Mon Feb 17 22:27:04 2020 +0100

mobilewizard: pan the document area to top on presentation

WHen opening the wizard on presentation, the document is chopped in half
and there are a lot of grey area on the top.

Change-Id: I46bd329adcf551c94734998b240a251e1cec4e8d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88190
Reviewed-by: Michael Meeks 
Reviewed-by: Henry Castro 
Tested-by: Jenkins CollaboraOffice 

diff --git a/loleaflet/src/control/Control.MobileWizard.js 
b/loleaflet/src/control/Control.MobileWizard.js
index 8c90f86f7..1dcf8a31b 100644
--- a/loleaflet/src/control/Control.MobileWizard.js
+++ b/loleaflet/src/control/Control.MobileWizard.js
@@ -109,6 +109,8 @@ L.Control.MobileWizard = L.Control.extend({
if (!this.map.hasFocus()) {
this.map.focus();
}
+
+   this._updateMapSize();
},
 
_hideKeyboard: function() {
@@ -268,6 +270,11 @@ L.Control.MobileWizard = L.Control.extend({
}, 400);
},
 
+   _updateMapSize: function() {
+   window.updateMapSizeForWizard = this._map.getDocType() === 
'presentation' && this._isActive;
+   this._map.invalidateSize();
+   },
+
_onMobileWizard: function(data) {
if (data) {
var isSidebar = (data.children && data.children.length 
>= 1 &&
@@ -333,6 +340,8 @@ L.Control.MobileWizard = L.Control.extend({
this._goToPath(currentPath);
this._scrollToPosition(lastScrollPosition);
}
+
+   this._updateMapSize();
}
},
 
diff --git a/loleaflet/src/map/Map.js b/loleaflet/src/map/Map.js
index ba848c2b2..cd2c8aad1 100644
--- a/loleaflet/src/map/Map.js
+++ b/loleaflet/src/map/Map.js
@@ -775,10 +775,22 @@ L.Map = L.Evented.extend({
},
 
getSize: function () {
+   var clientWidth = this._container.clientWidth;
+   var clientHeight = this._container.clientHeight;
+
+   if (window.updateMapSizeForWizard)
+   {
+   var wizardHeight = $('#mobile-wizard').height();
+   // the container has a bottom pixel set, it does not 
contain all the height
+   // we need it for calculating how much pixels the 
wizard covers on the map
+   var containerBottomPixels = 
parseInt($('#document-container').css('bottom'));
+   clientHeight -= wizardHeight - containerBottomPixels;
+   }
+
if (!this._size || this._sizeChanged) {
this._size = new L.Point(
-   this._container.clientWidth,
-   this._container.clientHeight);
+   clientWidth,
+   clientHeight);
 
this._sizeChanged = false;
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/css

2020-02-19 Thread mert (via logerrit)
 loleaflet/css/partsPreviewControl.css |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit d21a13e76e33d3c585e4929c5632796f689af2a2
Author: mert 
AuthorDate: Thu Feb 6 14:27:49 2020 +0300
Commit: Henry Castro 
CommitDate: Wed Feb 19 18:11:22 2020 +0100

Fix slide-sorter behaves like desktop on larger screen phones

Change-Id: Ief2a5278b901970378a84dc4a2f528f885e1cd06
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88093
Tested-by: Henry Castro 
Reviewed-by: Henry Castro 

diff --git a/loleaflet/css/partsPreviewControl.css 
b/loleaflet/css/partsPreviewControl.css
index 0d5227f0e..c4bb13b41 100644
--- a/loleaflet/css/partsPreviewControl.css
+++ b/loleaflet/css/partsPreviewControl.css
@@ -32,7 +32,8 @@
border: 2px solid #dfdfdf;
margin-left: 20px;
}
-@media (max-width: 767px) and (orientation: potrait),(max-device-height: 
767px) and (orientation: portrait), screen (max-width: 900px) and (orientation: 
potrait) and (any-pointer: coarse) and (hover: none), (max-height: 900px) and 
(orientation: portrait)  and (any-pointer: coarse)  and (hover: none){
+
+@media (max-width: 767px) and (orientation: potrait),(max-device-height: 
900px) and (orientation: portrait) {
#slide-sorter {
max-height: 60px;
}
@@ -49,7 +50,8 @@
padding-right: 1em;
}
 }
-@media (max-width: 767px) and (orientation: landscape),(max-device-height: 
767px) and (orientation: landscape), screen (max-width: 900px) and 
(orientation: landscape) and (any-pointer: coarse) and (hover: none), 
(max-height: 900px) and (orientation: landscape)  and (any-pointer: coarse)  
and (hover: none){
+
+@media (max-width: 767px) and (orientation: landscape),(max-device-height: 
900px) and (orientation: landscape) {
#slide-sorter {
max-width: 120px;
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2020-02-21 Thread mert (via logerrit)
 loleaflet/src/control/Control.JSDialogBuilder.js |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit e1338035ce1653e7fb7f2ba8360e5c4b51969804
Author: mert 
AuthorDate: Fri Feb 21 14:45:55 2020 +0300
Commit: Pedro Pinto da Silva 
CommitDate: Fri Feb 21 13:19:30 2020 +0100

mobilewizard: iconPath for panelHandler

Change-Id: I8ddcb18570cdd5b92a09dced2a219abf110ecbcf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89201
Tested-by: Pedro Pinto da Silva 
Reviewed-by: Pedro Pinto da Silva 

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 93297e126..809de4333 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -403,7 +403,14 @@ L.Control.JSDialogBuilder = L.Control.extend({
_panelHandler: function(parentContainer, data, builder) {
var contentNode = data.children[0];
 
-   builder._explorableEntry(parentContainer, data, contentNode, 
builder);
+   var entryId = contentNode.id;
+   var iconPath = null;
+
+   if (entryId && entryId.length) {
+   iconPath = builder._createIconPath(entryId);
+   }
+
+   builder._explorableEntry(parentContainer, data, contentNode, 
builder, null, iconPath);
 
return false;
},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: android/lib

2020-02-14 Thread mert (via logerrit)
 android/lib/build.gradle |2 
 android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java |   32 
--
 android/lib/src/main/res/layout/lolib_activity_main.xml  |   19 
+
 android/lib/src/main/res/values/strings.xml  |1 
 4 files changed, 50 insertions(+), 4 deletions(-)

New commits:
commit 1f04f155324989429eed3478825dbebd67fc3f75
Author: mert 
AuthorDate: Wed Feb 12 19:39:50 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Fri Feb 14 18:19:14 2020 +0100

android: show progressbar at first start of the document

Copying the assets takes some time at first install
so showing progressbar is a good idea for user to wait

Edit: ConstraintLayout implementation added in build.gradle

Change-Id: Ia38259cb3ae1b25983a4067fce500f2700c2c79f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88548
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/android/lib/build.gradle b/android/lib/build.gradle
index ea92be07f..480c4dcd7 100644
--- a/android/lib/build.gradle
+++ b/android/lib/build.gradle
@@ -63,6 +63,8 @@ dependencies {
 
 implementation 'androidx.appcompat:appcompat:1.0.2'
 implementation 'com.google.android.material:material:1.1.0-alpha04'
+implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
+
 }
 
 task copyUnpackAssets(type: Copy) {
diff --git 
a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java 
b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
index 7033707e5..9af5eb267 100644
--- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
+++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
@@ -22,6 +22,7 @@ import android.content.pm.PackageManager;
 import android.content.res.AssetFileDescriptor;
 import android.content.res.AssetManager;
 import android.net.Uri;
+import android.os.AsyncTask;
 import android.os.Build;
 import android.os.Bundle;
 import android.os.Environment;
@@ -42,6 +43,7 @@ import android.webkit.ValueCallback;
 import android.webkit.WebChromeClient;
 import android.webkit.WebSettings;
 import android.webkit.WebView;
+import android.widget.ProgressBar;
 import android.widget.TextView;
 import android.widget.Toast;
 
@@ -110,6 +112,7 @@ public class LOActivity extends AppCompatActivity {
 private Thread nativeMsgThread;
 private Handler nativeHandler;
 private Looper nativeLooper;
+private Bundle savedInstanceState;
 
 /** In case the mobile-wizard is visible, we have to intercept the 
Android's Back button. */
 private boolean mMobileWizardVisible = false;
@@ -142,7 +145,6 @@ public class LOActivity extends AppCompatActivity {
   String fromAssetPath, String 
targetDir) {
 try {
 String[] files = assetManager.list(fromAssetPath);
-
 boolean res = true;
 for (String file : files) {
 String[] dirOrFile = assetManager.list(fromAssetPath + "/" + 
file);
@@ -255,12 +257,33 @@ public class LOActivity extends AppCompatActivity {
 @Override
 protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
+this.savedInstanceState = savedInstanceState;
 getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
 sPrefs = 
PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
-updatePreferences();
-
 setContentView(R.layout.lolib_activity_main);
+init();
+}
+
+private void init() {
+new AsyncTask() {
+@Override
+protected Void doInBackground(Void... voids) {
+updatePreferences();
+return null;
+}
 
+@Override
+protected void onPostExecute(Void aVoid) {
+initUI();
+}
+}.execute();
+}
+
+private void initUI() {
+TextView assetsTextView = findViewById(R.id.assetsTextView);
+ProgressBar assetsProgressbar = findViewById(R.id.assetsProgressbar);
+assetsProgressbar.setVisibility(View.GONE);
+assetsTextView.setVisibility(View.GONE);
 isDocDebuggable = sPrefs.getBoolean(KEY_ENABLE_SHOW_DEBUG_INFO, false) 
&& BuildConfig.DEBUG;
 
 if (getIntent().getData() != null) {
@@ -482,7 +505,8 @@ public class LOActivity extends AppCompatActivity {
 Log.i(TAG, "onResume..");
 
 // check for config change
-updatePreferences();
+if (documentLoaded)
+updatePreferences();
 }
 
 @Override
diff --git a/android/lib/src/main/res/layout/lolib_activity_main.xml 
b/android/lib/src/main/res/layout/lolib_activity_main.xml
index 2810a9af9..9d9524dc5 100644
--- a/android/lib/src/main/res/layout/lolib_activity_main.xml
+++ 

[Libreoffice-commits] online.git: loleaflet/src

2020-02-21 Thread mert (via logerrit)
 loleaflet/src/control/Control.Toolbar.js |   20 +++-
 loleaflet/src/layer/tile/TileLayer.js|   13 +++--
 2 files changed, 30 insertions(+), 3 deletions(-)

New commits:
commit 864749bb1681e352f3c6e63548f31d3ede63422a
Author: mert 
AuthorDate: Thu Feb 20 18:36:09 2020 +0300
Commit: Michael Meeks 
CommitDate: Fri Feb 21 18:07:02 2020 +0100

mobile: implemented popup for hyperlinks on calc

Change-Id: I6d22cc1d6b7da8afbb9cce70c3445634455b34d8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89122
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index c627e49cd..6c47153f2 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -2609,7 +2609,25 @@ function setupToolbar(e) {
});
 
map.on('hyperlinkclicked', function (e) {
-   map.fire('warn', {url: e.url, map: map, cmd: 'openlink'});
+   if (e.url) {
+   if (e.coordinates) {
+   var strTwips = e.coordinates.match(/\d+/g);
+   var topLeftTwips = new 
L.Point(parseInt(strTwips[6]), parseInt(strTwips[1]));
+   var offset = new L.Point(parseInt(strTwips[2]), 
parseInt(strTwips[3]));
+   var bottomRightTwips = topLeftTwips.add(offset);
+   var cellCursor = new L.LatLngBounds(
+   
map._docLayer._twipsToLatLng(topLeftTwips, map.getZoom()),
+   
map._docLayer._twipsToLatLng(bottomRightTwips, map.getZoom()));
+   //click pos tweak
+   cellCursor._northEast.lng = 
cellCursor._southWest.lng;
+   map.hyperlinkPopup = new L.Popup({className: 
'hyperlink-popup', closeButton: false, closeOnClick: false})
+   .setContent('' + e.url + '')
+   .setLatLng(cellCursor._northEast)
+   .openOn(map);
+   } else {
+   map.fire('warn', {url: e.url, map: map, cmd: 
'openlink'});
+   }
+   }
});
 
map.on('zoomend', function () {
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 0939570e3..a0fff8280 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1093,8 +1093,17 @@ L.TileLayer = L.GridLayer.extend({
},
 
_onHyperlinkClickedMsg: function (textMsg) {
-   var link = textMsg.substring(18);
-   this._map.fire('hyperlinkclicked', {url: link});
+   var link = null;
+   var coords = null;
+
+   if (textMsg.includes('coordinates')) {
+   var coordpos = textMsg.indexOf(' coordinates');
+   link = textMsg.substring(18, coordpos);
+   coords = textMsg.substring(coordpos+12);
+   } else
+   link = textMsg.substring(18);
+
+   this._map.fire('hyperlinkclicked', {url: link, coordinates: 
coords});
},
 
_onInvalidateCursorMsg: function (textMsg) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: android/lib

2020-02-11 Thread mert (via logerrit)
 android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java |   49 
--
 android/lib/src/main/res/layout/lolib_dialog_loading.xml |3 
 android/lib/src/main/res/values/strings.xml  |1 
 3 files changed, 46 insertions(+), 7 deletions(-)

New commits:
commit 475c7cd42e37efab6c8e48e03efc32a3cf315171
Author: mert 
AuthorDate: Thu Feb 6 16:27:01 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Tue Feb 11 23:29:27 2020 +0100

android: Notify the user about saving the document on close

Change-Id: Ie96bd1918d2d166df096bec5e2c6489f819b6f13
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88102
Tested-by: Jan Holesovsky 
Reviewed-by: Jan Holesovsky 

diff --git 
a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java 
b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
index e3e479a4c..a964ad392 100644
--- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
+++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
@@ -33,12 +33,15 @@ import android.print.PrintDocumentAdapter;
 import android.print.PrintManager;
 import android.provider.DocumentsContract;
 import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
 import android.view.WindowManager;
 import android.webkit.JavascriptInterface;
 import android.webkit.ValueCallback;
 import android.webkit.WebChromeClient;
 import android.webkit.WebSettings;
 import android.webkit.WebView;
+import android.widget.TextView;
 import android.widget.Toast;
 
 import java.io.File;
@@ -458,6 +461,10 @@ public class LOActivity extends AppCompatActivity {
 Log.i(TAG, "onDestroy() - we know we are leaving the document");
 nativeLooper.quit();
 mWebView.destroy();
+
+// Most probably the native part has already got a 'BYE' from
+// finishWithProgress(), but it is actually better to send it twice
+// than never, so let's call it from here too anyway
 postMobileMessageNative("BYE");
 }
 
@@ -528,6 +535,38 @@ public class LOActivity extends AppCompatActivity {
 return null;
 }
 
+/** Show the Saving progress and finish the app. */
+private void finishWithProgress() {
+LayoutInflater inflater = this.getLayoutInflater();
+View loadingView = inflater.inflate(R.layout.lolib_dialog_loading, 
null);
+TextView loadingText = 
loadingView.findViewById(R.id.lolib_loading_dialog_text);
+loadingText.setText(getText(R.string.saving));
+final AlertDialog savingProgress = new 
AlertDialog.Builder(LOActivity.this)
+.setView(loadingView)
+.setCancelable(true)
+.create();
+
+savingProgress.show();
+
+// The 'BYE' takes a considerable amount of time, we need to post it
+// so that it starts after the saving progress is actually shown
+mainHandler.post(new Runnable() {
+@Override
+public void run() {
+postMobileMessageNative("BYE");
+
+runOnUiThread(new Runnable() {
+@Override
+public void run() {
+savingProgress.dismiss();
+}
+});
+
+finish();
+}
+});
+}
+
 @Override
 public void onBackPressed() {
 if (mMobileWizardVisible)
@@ -537,8 +576,7 @@ public class LOActivity extends AppCompatActivity {
 return;
 }
 
-postMobileMessageNative("BYE");
-super.onBackPressed();
+finishWithProgress();
 }
 
 private void loadDocument() {
@@ -600,10 +638,6 @@ public class LOActivity extends AppCompatActivity {
 postMobileMessageNative(message);
 afterMessageFromWebView(messageAndParameterArray);
 }
-
-// Going back to document browser on BYE (called when pressing the top 
left exit button)
-if (message.equals("BYE"))
-finish();
 }
 
 /**
@@ -647,6 +681,9 @@ public class LOActivity extends AppCompatActivity {
  */
 private boolean beforeMessageFromWebView(String[] messageAndParam) {
 switch (messageAndParam[0]) {
+case "BYE":
+finishWithProgress();
+return false;
 case "PRINT":
 mainHandler.post(new Runnable() {
 @Override
diff --git a/android/lib/src/main/res/layout/lolib_dialog_loading.xml 
b/android/lib/src/main/res/layout/lolib_dialog_loading.xml
index f4dc98443..db4825bb7 100644
--- a/android/lib/src/main/res/layout/lolib_dialog_loading.xml
+++ b/android/lib/src/main/res/layout/lolib_dialog_loading.xml
@@ -10,9 +10,10 @@
 android:layout_weight="1" />
 
 
-
\ No newline at end of file
+
diff --git a/android/lib/src/main/res/values/strings.xml 
b/android/lib/src/main/res/values/strings.xml
index 

[Libreoffice-commits] online.git: loleaflet/src

2020-01-16 Thread mert (via logerrit)
 loleaflet/src/control/Control.Menubar.js |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 0cc4977abdbb0225c8c1a5f59b5bc00891463775
Author: mert 
AuthorDate: Mon Dec 23 15:25:29 2019 +0300
Commit: Michael Meeks 
CommitDate: Thu Jan 16 19:34:47 2020 +0100

Disable insert comment on spreadsheet for mobile

Change-Id: Iff7cedd989452b44ad1eee3bc0fc4cb55f84a3ba
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/85752
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 78caff051..89f6328b7 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -659,7 +659,6 @@ L.Control.Menubar = L.Control.extend({
{name: _('Local Image...'), id: 
'insertgraphic', type: 'action'},
{name: _UNO('.uno:InsertGraphic', 
'spreadsheet'), id: 'insertgraphicremote', type: 'action'},
{uno: '.uno:InsertObjectChart'},
-   {name: _UNO('.uno:InsertAnnotation', 
'spreadsheet'), id: 'insertcomment', type: 'action'},
{type: 'separator'},
{name: _UNO('.uno:HyperlinkDialog'), 
id: 'inserthyperlink', type: 'action'},
{name: _UNO('.uno:ShapesMenu'), id: 
'insertshape', type: 'action'},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/css

2020-01-08 Thread mert (via logerrit)
 loleaflet/css/toolbar.css |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 026500b3a5d60e90e2d34c10fb82ffeef0eeb68c
Author: mert 
AuthorDate: Mon Dec 23 13:09:17 2019 +0300
Commit: Tor Lillqvist 
CommitDate: Wed Jan 8 17:49:19 2020 +0100

Fix insertshapes display problem

Insert Shapes dialog opens on the right
side of the screen and can be too
narrow on desktop

Change-Id: I8f9fe8f00989b504d05282fcd5332bf1a1b94ad0
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/85747
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 95d7eae00..47ad32e4e 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -764,6 +764,7 @@ button.leaflet-control-search-next
position: relative;
padding: 2px;
display: inline-block;
+   min-width: 350px;
width:  100%;
height: 100%;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-2' - android/app

2020-04-10 Thread mert (via logerrit)
 
android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java 
|4 
 1 file changed, 4 insertions(+)

New commits:
commit 0ccfa0ecc98b38fef59ce733842844246e54c77e
Author: mert 
AuthorDate: Fri Apr 10 12:39:35 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Fri Apr 10 13:45:51 2020 +0200

android: Blind fix for an exception of getContentResolver

Change-Id: Iec24f014a2c82b8f4d4c134b9817651f558ecedb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92005
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 
(cherry picked from commit 93bf06a2078ade47db7c8a45ba448c3cc66aa96c)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92011

diff --git 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
index 380b4a64f..cf69e690e 100644
--- 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
+++ 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
@@ -76,6 +76,8 @@ class RecentFilesAdapter extends 
RecyclerView.Adapterhttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: android/app

2020-04-10 Thread mert (via logerrit)
 
android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java 
|4 
 1 file changed, 4 insertions(+)

New commits:
commit 93bf06a2078ade47db7c8a45ba448c3cc66aa96c
Author: mert 
AuthorDate: Fri Apr 10 12:39:35 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Fri Apr 10 12:59:11 2020 +0200

android: Blind fix for an exception of getContentResolver

Change-Id: Iec24f014a2c82b8f4d4c134b9817651f558ecedb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92005
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
index 380b4a64f..cf69e690e 100644
--- 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
+++ 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
@@ -76,6 +76,8 @@ class RecentFilesAdapter extends 
RecyclerView.Adapterhttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-2' - loleaflet/src

2020-04-15 Thread mert (via logerrit)
 loleaflet/src/control/Control.JSDialogBuilder.js |  113 ++-
 1 file changed, 89 insertions(+), 24 deletions(-)

New commits:
commit a87c98688f173b12b6259a756e2bb4028cfb4a77
Author: mert 
AuthorDate: Tue Apr 14 18:10:47 2020 +0300
Commit: Andras Timar 
CommitDate: Thu Apr 16 06:52:47 2020 +0200

mobilewizard: fix inconsistent state of items on Number Format

implemented listbox updates for numberformatcombobox and
fontsizecombobox to apply changes without reopening the
mobile wizard. This patch also fixes the update problem of
the checkbox items on number format page

Change-Id: Ib330531f766e5d1ff0744585f324a235f5ae3121
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92204
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit db26ae326c0ba5c2cddcb1585ff7af1b139be842)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92295

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 8727e065c..8162c5283 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -242,6 +242,46 @@ L.Control.JSDialogBuilder = L.Control.extend({
return true;
},
 
+   _getListBoxUpdateType: function(id) {
+   if (id) {
+   if (id === 'numberformatcombobox')
+   return 'index';
+   else if (id === 'fontsizecombobox')
+   return 'value';
+   }
+   return false;
+   },
+
+   _updateListBox: function(builder, contentDiv, contentNode, 
sectionTitle, data, state) {
+   if ($(sectionTitle).find('.entry-value')[0])
+   sectionTitle = 
$($(sectionTitle).find('.entry-value')).get(0);
+   else
+   sectionTitle = 
$(sectionTitle).find('.ui-header-left').find('span')[0];
+
+   if (!sectionTitle)
+   return;
+
+   $(contentDiv).find('.selected').removeClass('selected');
+
+   var hasChildren = $(contentDiv).children().length > 0 && 
contentNode.children && contentNode.children.length > 0;
+   var updateBy = builder._getListBoxUpdateType(data.id);
+   if (updateBy === 'index') {
+   sectionTitle.innerHTML = data.entries[state];
+   data.selectedEntries[0] = state;
+   contentDiv.title = data.entries[state];
+   if (hasChildren) {
+   
$($(contentDiv).children().get(state)).addClass('selected');
+   }
+   } else if (updateBy === 'value') {
+   sectionTitle.innerHTML = state;
+   if (hasChildren) {
+   $(contentDiv).find('p').filter(function() {
+   return $(this).text() === state;
+   }).addClass('selected');
+   }
+   }
+   },
+
_explorableEntry: function(parentContainer, data, contentNode, builder, 
valueNode, iconPath, updateCallback) {
var sectionTitle = L.DomUtil.create('div', 'ui-header level-' + 
builder._currentDepth + ' mobile-wizard ui-widget', parentContainer);
$(sectionTitle).css('justify-content', 'space-between');
@@ -270,28 +310,6 @@ L.Control.JSDialogBuilder = L.Control.extend({
var arrowSpan = L.DomUtil.create('span', 'sub-menu-arrow', 
rightDiv);
arrowSpan.innerHTML = '>';
 
-   var updateFunction = function(titleSpan) {
-   var state = null;
-   if (data.id)
-   state = builder._getUnoStateForItemId(data.id, 
builder);
-
-   if (state) {
-   titleSpan.innerHTML = state;
-   } else {
-   titleSpan.innerHTML = data.text;
-   }
-   };
-
-   updateCallback ? updateCallback(titleSpan) : 
updateFunction(titleSpan);
-
-   builder.map.on('commandstatechanged', function(e) {
-   if (e.commandName === data.command || e.commandName === 
builder._mapWindowIdToUnoCommand(data.id))
-   if (updateCallback)
-   updateCallback(titleSpan);
-   else
-   updateFunction(titleSpan);
-   }, this);
-
var contentDiv = L.DomUtil.create('div', 'ui-content level-' + 
builder._currentDepth + ' mobile-wizard', parentContainer);
contentDiv.title = data.text;
 
@@ -314,6 +332,33 @@ L.Control.JSDialogBuilder = 

[Libreoffice-commits] online.git: loleaflet/src

2020-04-15 Thread mert (via logerrit)
 loleaflet/src/control/Control.JSDialogBuilder.js |  113 ++-
 1 file changed, 89 insertions(+), 24 deletions(-)

New commits:
commit db26ae326c0ba5c2cddcb1585ff7af1b139be842
Author: mert 
AuthorDate: Tue Apr 14 18:10:47 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Apr 15 23:38:22 2020 +0200

mobilewizard: fix inconsistent state of items on Number Format

implemented listbox updates for numberformatcombobox and
fontsizecombobox to apply changes without reopening the
mobile wizard. This patch also fixes the update problem of
the checkbox items on number format page

Change-Id: Ib330531f766e5d1ff0744585f324a235f5ae3121
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92204
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 7ff08ce86..6d54c071f 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -242,6 +242,46 @@ L.Control.JSDialogBuilder = L.Control.extend({
return true;
},
 
+   _getListBoxUpdateType: function(id) {
+   if (id) {
+   if (id === 'numberformatcombobox')
+   return 'index';
+   else if (id === 'fontsizecombobox')
+   return 'value';
+   }
+   return false;
+   },
+
+   _updateListBox: function(builder, contentDiv, contentNode, 
sectionTitle, data, state) {
+   if ($(sectionTitle).find('.entry-value')[0])
+   sectionTitle = 
$($(sectionTitle).find('.entry-value')).get(0);
+   else
+   sectionTitle = 
$(sectionTitle).find('.ui-header-left').find('span')[0];
+
+   if (!sectionTitle)
+   return;
+
+   $(contentDiv).find('.selected').removeClass('selected');
+
+   var hasChildren = $(contentDiv).children().length > 0 && 
contentNode.children && contentNode.children.length > 0;
+   var updateBy = builder._getListBoxUpdateType(data.id);
+   if (updateBy === 'index') {
+   sectionTitle.innerHTML = data.entries[state];
+   data.selectedEntries[0] = state;
+   contentDiv.title = data.entries[state];
+   if (hasChildren) {
+   
$($(contentDiv).children().get(state)).addClass('selected');
+   }
+   } else if (updateBy === 'value') {
+   sectionTitle.innerHTML = state;
+   if (hasChildren) {
+   $(contentDiv).find('p').filter(function() {
+   return $(this).text() === state;
+   }).addClass('selected');
+   }
+   }
+   },
+
_explorableEntry: function(parentContainer, data, contentNode, builder, 
valueNode, iconPath, updateCallback) {
var sectionTitle = L.DomUtil.create('div', 'ui-header level-' + 
builder._currentDepth + ' mobile-wizard ui-widget', parentContainer);
$(sectionTitle).css('justify-content', 'space-between');
@@ -270,28 +310,6 @@ L.Control.JSDialogBuilder = L.Control.extend({
var arrowSpan = L.DomUtil.create('span', 'sub-menu-arrow', 
rightDiv);
arrowSpan.innerHTML = '>';
 
-   var updateFunction = function(titleSpan) {
-   var state = null;
-   if (data.id)
-   state = builder._getUnoStateForItemId(data.id, 
builder);
-
-   if (state) {
-   titleSpan.innerHTML = state;
-   } else {
-   titleSpan.innerHTML = data.text;
-   }
-   };
-
-   updateCallback ? updateCallback(titleSpan) : 
updateFunction(titleSpan);
-
-   builder.map.on('commandstatechanged', function(e) {
-   if (e.commandName === data.command || e.commandName === 
builder._mapWindowIdToUnoCommand(data.id))
-   if (updateCallback)
-   updateCallback(titleSpan);
-   else
-   updateFunction(titleSpan);
-   }, this);
-
var contentDiv = L.DomUtil.create('div', 'ui-content level-' + 
builder._currentDepth + ' mobile-wizard', parentContainer);
contentDiv.title = data.text;
 
@@ -314,6 +332,33 @@ L.Control.JSDialogBuilder = L.Control.extend({
}
else
$(sectionTitle).hide();
+
+   var updateFunction = 

[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-2' - loleaflet/src

2020-04-07 Thread mert (via logerrit)
 loleaflet/src/control/Control.Menubar.js |8 
 loleaflet/src/control/Control.Toolbar.js |8 +---
 loleaflet/src/main.js|2 +-
 3 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit b7de8a91dc79afd999411e491cb5dead19a83ec3
Author: mert 
AuthorDate: Wed Mar 25 23:15:10 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Tue Apr 7 21:20:38 2020 +0200

mobile: Add search in the readonly mode

Change-Id: I059b0337096f9eed21031724dbec22f29807a979
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91072
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 
(cherry picked from commit f634264d89896be25f2853952241afe4e9d4c45c)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91722
Tested-by: Jan Holesovsky 

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index e2396faf5..f7aa69111 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -489,6 +489,7 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:Paste'},
{uno: '.uno:SelectAll'}
]},
+   {name: _('Search'), id: 'searchdialog', type: 'action'},
{name: _UNO('.uno:ChangesMenu', 'text'), id: 
'changesmenu', type: 'menu', menu: [
{uno: '.uno:TrackChanges'},
{uno: '.uno:ShowTrackedChanges'},
@@ -535,6 +536,7 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:Paste'},
{uno: '.uno:SelectAll'}
]},
+   {name: _('Search'), id: 'searchdialog', type: 'action'},
{name: _UNO('.uno:TableMenu', 'text'/*HACK should be 
'presentation', but not in xcu*/), id: 'tablemenu', type: 'menu', menu: [
{uno: '.uno:InsertRowsBefore'},
{uno: '.uno:InsertRowsAfter'},
@@ -580,6 +582,7 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:Paste'},
{uno: '.uno:SelectAll'}
]},
+   {name: _('Search'), id: 'searchdialog', type: 'action'},
{name: _UNO('.uno:SheetMenu', 'spreadsheet'), id: 
'sheetmenu', type: 'menu', menu: [
{name: _UNO('.uno:InsertRowsMenu', 
'spreadsheet'), id: 'insertrowsmenu', type: 'menu', menu: [
{uno: '.uno:InsertRowsBefore'},
@@ -1194,6 +1197,11 @@ L.Control.Menubar = L.Control.extend({
}
} else if (id === 'repair') {
this._map._socket.sendMessage('commandvalues 
command=.uno:DocumentRepair');
+   } else if (id === 'searchdialog') {
+   $('#toolbar-down').hide();
+   $('#toolbar-search').show();
+   $('#mobile-edit-button').hide();
+   L.DomUtil.get('search-input').focus();
}
// Inform the host if asked
if (postmessage)
diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index 6a61894df..21a434d56 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -186,7 +186,11 @@ function onClick(e, id, item, subItem) {
}
else if (id === 'hidesearchbar') {
$('#toolbar-search').hide();
-   $('#toolbar-down').show();
+   if (map._permission === 'edit')
+   $('#toolbar-down').show();
+   /** show edit button if only we are able to edit but in 
readonly mode */
+   if (window.docPermission  === 'edit' && map._permission === 
'readonly')
+   $('#mobile-edit-button').show();
}
else if (id === 'searchprev') {
map.search(L.DomUtil.get('search-input').value, true);
@@ -2304,7 +2308,6 @@ function onUpdatePermission(e) {
toolbar.enable(id);
});
}
-   $('#search-input').prop('disabled', false);
 
if (window.mode.isMobile()) {
$('#toolbar-down').show();
@@ -2347,7 +2350,6 @@ function onUpdatePermission(e) {
toolbar.disable(id);
});
}
-   $('#search-input').prop('disabled', true);
 
if (window.mode.isMobile()) {
$('#toolbar-down').hide();
diff --git a/loleaflet/src/main.js b/loleaflet/src/main.js
index 7fdbee43d..5b2799df6 100644
--- a/loleaflet/src/main.js
+++ b/loleaflet/src/main.js
@@ -49,7 +49,6 @@ if 

[Libreoffice-commits] online.git: loleaflet/src

2020-04-07 Thread mert (via logerrit)
 loleaflet/src/control/Control.Menubar.js |8 
 loleaflet/src/control/Control.Toolbar.js |8 +---
 loleaflet/src/main.js|2 +-
 3 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit f634264d89896be25f2853952241afe4e9d4c45c
Author: mert 
AuthorDate: Wed Mar 25 23:15:10 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Tue Apr 7 20:28:40 2020 +0200

mobile: Add search in the readonly mode

Change-Id: I059b0337096f9eed21031724dbec22f29807a979
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91072
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index e2396faf5..f7aa69111 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -489,6 +489,7 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:Paste'},
{uno: '.uno:SelectAll'}
]},
+   {name: _('Search'), id: 'searchdialog', type: 'action'},
{name: _UNO('.uno:ChangesMenu', 'text'), id: 
'changesmenu', type: 'menu', menu: [
{uno: '.uno:TrackChanges'},
{uno: '.uno:ShowTrackedChanges'},
@@ -535,6 +536,7 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:Paste'},
{uno: '.uno:SelectAll'}
]},
+   {name: _('Search'), id: 'searchdialog', type: 'action'},
{name: _UNO('.uno:TableMenu', 'text'/*HACK should be 
'presentation', but not in xcu*/), id: 'tablemenu', type: 'menu', menu: [
{uno: '.uno:InsertRowsBefore'},
{uno: '.uno:InsertRowsAfter'},
@@ -580,6 +582,7 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:Paste'},
{uno: '.uno:SelectAll'}
]},
+   {name: _('Search'), id: 'searchdialog', type: 'action'},
{name: _UNO('.uno:SheetMenu', 'spreadsheet'), id: 
'sheetmenu', type: 'menu', menu: [
{name: _UNO('.uno:InsertRowsMenu', 
'spreadsheet'), id: 'insertrowsmenu', type: 'menu', menu: [
{uno: '.uno:InsertRowsBefore'},
@@ -1194,6 +1197,11 @@ L.Control.Menubar = L.Control.extend({
}
} else if (id === 'repair') {
this._map._socket.sendMessage('commandvalues 
command=.uno:DocumentRepair');
+   } else if (id === 'searchdialog') {
+   $('#toolbar-down').hide();
+   $('#toolbar-search').show();
+   $('#mobile-edit-button').hide();
+   L.DomUtil.get('search-input').focus();
}
// Inform the host if asked
if (postmessage)
diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index 6a61894df..21a434d56 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -186,7 +186,11 @@ function onClick(e, id, item, subItem) {
}
else if (id === 'hidesearchbar') {
$('#toolbar-search').hide();
-   $('#toolbar-down').show();
+   if (map._permission === 'edit')
+   $('#toolbar-down').show();
+   /** show edit button if only we are able to edit but in 
readonly mode */
+   if (window.docPermission  === 'edit' && map._permission === 
'readonly')
+   $('#mobile-edit-button').show();
}
else if (id === 'searchprev') {
map.search(L.DomUtil.get('search-input').value, true);
@@ -2304,7 +2308,6 @@ function onUpdatePermission(e) {
toolbar.enable(id);
});
}
-   $('#search-input').prop('disabled', false);
 
if (window.mode.isMobile()) {
$('#toolbar-down').show();
@@ -2347,7 +2350,6 @@ function onUpdatePermission(e) {
toolbar.disable(id);
});
}
-   $('#search-input').prop('disabled', true);
 
if (window.mode.isMobile()) {
$('#toolbar-down').hide();
diff --git a/loleaflet/src/main.js b/loleaflet/src/main.js
index 7fdbee43d..5b2799df6 100644
--- a/loleaflet/src/main.js
+++ b/loleaflet/src/main.js
@@ -49,7 +49,6 @@ if (wopiSrc != '') {
 }
 
 var notWopiButIframe = getParameterByName('NotWOPIButIframe') != '';
-
 var map = L.map('map', {
server: host,
doc: docURL,
@@ -90,6 

[Libreoffice-commits] online.git: cypress_test/integration_tests

2020-04-15 Thread mert (via logerrit)
 cypress_test/integration_tests/mobile/calc/number_format_spec.js |   16 
+-
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 744b1ced2a90d319474d198a9a4eed5e821be912
Author: mert 
AuthorDate: Wed Apr 15 15:08:30 2020 +0300
Commit: Tamás Zolnai 
CommitDate: Wed Apr 15 14:32:51 2020 +0200

fix cypress failure due to id change of element

Change-Id: I1df07e10c4b3c5bdc88417eb785dc711fc6dd0e2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92265
Tested-by: Tamás Zolnai 
Reviewed-by: Tamás Zolnai 

diff --git a/cypress_test/integration_tests/mobile/calc/number_format_spec.js 
b/cypress_test/integration_tests/mobile/calc/number_format_spec.js
index 79cb17cc0..dbf8f7ddc 100644
--- a/cypress_test/integration_tests/mobile/calc/number_format_spec.js
+++ b/cypress_test/integration_tests/mobile/calc/number_format_spec.js
@@ -22,7 +22,7 @@ describe('Apply number formatting.', function() {
cy.get('#ScNumberFormatPropertyPanel')
.click();
 
-   cy.get('#category')
+   cy.get('#numberformatcombobox')
.should('be.visible');
});
 
@@ -32,14 +32,14 @@ describe('Apply number formatting.', function() {
 
function selectFormatting(formattingString) {
// Select formatting list
-   cy.get('#category')
+   cy.get('#numberformatcombobox')
.click();
 
cy.contains('.mobile-wizard.ui-combobox-text', formattingString)
.click();
 
// Combobox entry contains the selected format
-   cy.get('#category .ui-header-left')
+   cy.get('#numberformatcombobox .ui-header-left')
.should('have.text', formattingString);
}
 
@@ -82,7 +82,7 @@ describe('Apply number formatting.', function() {
.should('have.class', 'selected');
 
// TODO: combobox entry is not updated
-   //cy.get('#category .ui-header-left')
+   //cy.get('#numberformatcombobox .ui-header-left')
//  .should('have.text', 'Percent');
 
// Decimal and leading zeros are changed.
@@ -140,7 +140,7 @@ describe('Apply number formatting.', function() {
.should('have.class', 'selected');
 
// TODO: combobox entry is not updated
-   //cy.get('#category .ui-header-left')
+   //cy.get('#numberformatcombobox .ui-header-left')
//  .should('have.text', 'Currency');
 
// Decimal and leading zeros are changed.
@@ -207,7 +207,7 @@ describe('Apply number formatting.', function() {
//  .should('have.class', 'selected');
 
// TODO: combobox entry is not updated
-   //cy.get('#category .ui-header-left')
+   //cy.get('#numberformatcombobox .ui-header-left')
//  .should('have.text', 'Number');
 
calcHelper.copyContentToClipboard();
@@ -218,14 +218,14 @@ describe('Apply number formatting.', function() {
 
it('Select date format from list.', function() {
// Change to date
-   cy.get('#category')
+   cy.get('#numberformatcombobox')
.click();
 
cy.contains('.mobile-wizard.ui-combobox-text', 'Date')
.click();
 
// Combobox entry contains the selected format
-   cy.get('#category .ui-header-left')
+   cy.get('#numberformatcombobox .ui-header-left')
.should('have.text', 'Date ');
 
// Decimal and leading zeros are changed.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: android/app

2020-04-16 Thread mert (via logerrit)
 
android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java 
|8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 6c1f49d404663dcd305503083f6f4c5500a77800
Author: mert 
AuthorDate: Tue Apr 14 20:01:05 2020 +0300
Commit: Mert Tümer 
CommitDate: Fri Apr 17 07:56:23 2020 +0200

Android: fix tapping on file name doesn't open files anymore.

Change-Id: Ic5e34a1ee484fedc888d8fae58354241a3cd7beb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92212
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tümer 

diff --git 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
index cf69e690e..f7a1b9151 100644
--- 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
+++ 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
@@ -115,12 +115,16 @@ class RecentFilesAdapter extends 
RecyclerView.Adapterhttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-2' - android/app

2020-04-17 Thread mert (via logerrit)
 
android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java 
|8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 9dd6cb3983090148aa28b401d29b435384a6827e
Author: mert 
AuthorDate: Tue Apr 14 20:01:05 2020 +0300
Commit: Mert Tümer 
CommitDate: Fri Apr 17 14:19:06 2020 +0200

Android: fix tapping on file name doesn't open files anymore.

Change-Id: Ic5e34a1ee484fedc888d8fae58354241a3cd7beb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92212
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tümer 
(cherry picked from commit 6c1f49d404663dcd305503083f6f4c5500a77800)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92305

diff --git 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
index cf69e690e..f7a1b9151 100644
--- 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
+++ 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
@@ -115,12 +115,16 @@ class RecentFilesAdapter extends 
RecyclerView.Adapterhttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: android/app

2020-03-16 Thread mert (via logerrit)
 
android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
 |   11 +
 
android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java 
   |   57 +++---
 2 files changed, 54 insertions(+), 14 deletions(-)

New commits:
commit 10c695cfbbb8a9072388f5f0a03f557aa51955cf
Author: mert 
AuthorDate: Tue Mar 10 19:08:11 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Mar 16 15:50:05 2020 +0100

android: fix crash on removed/renamed file on recent files

Change-Id: Iedeaba896ecca17c0c7e5c038b1c370b72484c68
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90290
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tümer 

diff --git 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
index 1ef2acc45..bd9116c94 100644
--- 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
+++ 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
@@ -113,7 +113,7 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 public static final String EXPLORER_VIEW_TYPE_KEY = "EXPLORER_VIEW_TYPE";
 public static final String EXPLORER_PREFS_KEY = "EXPLORER_PREFS";
 public static final String SORT_MODE_KEY = "SORT_MODE";
-private static final String RECENT_DOCUMENTS_KEY = "RECENT_DOCUMENTS_LIST";
+public static final String RECENT_DOCUMENTS_KEY = "RECENT_DOCUMENTS_LIST";
 private static final String ENABLE_SHOW_HIDDEN_FILES_KEY = 
"ENABLE_SHOW_HIDDEN_FILES";
 
 public static final String NEW_FILE_PATH_KEY = "NEW_FILE_PATH_KEY";
@@ -208,6 +208,12 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 recentRecyclerView.setAdapter(new RecentFilesAdapter(this, 
recentUris));
 }
 
+/** access shared preferences from the activity instance */
+public SharedPreferences getPrefs()
+{
+return prefs;
+}
+
 /** Create the Navigation menu and set up the actions and everything 
there. */
 public void setupNavigationDrawer() {
 drawerLayout = findViewById(R.id.drawer_layout);
@@ -986,6 +992,9 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 Uri shortcutUri = Uri.parse(pathString);
 String filename = RecentFilesAdapter.getUriFilename(this, 
shortcutUri);
 
+if (filename == null)
+continue;
+
 Intent intent = getIntentToEdit(shortcutUri);
 ShortcutInfo.Builder builder = new ShortcutInfo.Builder(this, 
filename)
 .setShortLabel(filename)
diff --git 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
index 4a06899a9..371b7ab03 100644
--- 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
+++ 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java
@@ -22,6 +22,7 @@ import android.widget.TextView;
 import org.libreoffice.androidapp.R;
 
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -34,11 +35,11 @@ class RecentFilesAdapter extends 
RecyclerView.Adapter recentUris;
+private ArrayList recentFiles;
 
 RecentFilesAdapter(LibreOfficeUIActivity activity, List recentUris) {
 this.mActivity = activity;
-this.recentUris = recentUris;
+initRecentFiles(recentUris);
 }
 
 @Override
@@ -47,6 +48,26 @@ class RecentFilesAdapter extends 
RecyclerView.Adapter recentUris) {
+this.recentFiles = new ArrayList<>();
+boolean invalidUriFound = false;
+String joined = "";
+for (Uri u: recentUris) {
+String filename = getUriFilename(mActivity, u);
+if (null != filename) {
+long length = getUriFileLength(mActivity, u);
+recentFiles.add(new RecentFile(u, filename, length));
+joined = joined.concat(u.toString()+"\n");
+}
+else
+invalidUriFound = true;
+}
+if (invalidUriFound) {
+
mActivity.getPrefs().edit().putString(mActivity.RECENT_DOCUMENTS_KEY, 
joined).apply();
+}
+}
+
 /** Return the filename of the given Uri. */
 public static String getUriFilename(Activity activity, Uri uri) {
 String filename = "";
@@ -60,11 +81,8 @@ class RecentFilesAdapter extends 
RecyclerView.Adapter segments = uri.getPathSegments();
-if (segments.size() > 0)
-filename = segments.get(segments.size() - 1);
-}
+if (filename.isEmpty())
+return null;
 
 return filename;
 }
@@ -91,17 +109,18 @@ class 

[Libreoffice-commits] online.git: loleaflet/src

2020-03-16 Thread mert (via logerrit)
 loleaflet/src/control/Control.Toolbar.js  |6 +---
 loleaflet/src/layer/tile/TileLayer.js |   33 +++---
 loleaflet/src/map/handler/Map.TouchGesture.js |6 ++--
 3 files changed, 25 insertions(+), 20 deletions(-)

New commits:
commit 2462bf7a19daa56fe2fea9681587c22e6503c360
Author: mert 
AuthorDate: Wed Feb 26 16:58:30 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Mar 16 15:57:57 2020 +0100

hyperlink popup clean up

hyperlink popups shouldnt contain href for links
also we shouldnt show popup for internal links
core must handle it

Change-Id: Ice5535890a6c45cea7a3d9f70b21ad5f9e66f2eb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89550
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index 9e8d87d8c..79d392563 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -2626,10 +2626,8 @@ function setupToolbar(e) {

map._docLayer._twipsToLatLng(bottomRightTwips, map.getZoom()));
//click pos tweak
cellCursor._northEast.lng = 
cellCursor._southWest.lng;
-   map.hyperlinkPopup = new L.Popup({className: 
'hyperlink-popup', closeButton: false, closeOnClick: false})
-   .setContent('' + e.url + '')
-   .setLatLng(cellCursor._northEast)
-   .openOn(map);
+   map._docLayer._closeURLPopUp();
+   
map._docLayer._showURLPopUp(cellCursor._northEast, e.url);
} else {
map.fire('warn', {url: e.url, map: map, cmd: 
'openlink'});
}
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 52660885a..d302dccc4 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1112,6 +1112,21 @@ L.TileLayer = L.GridLayer.extend({
}
},
 
+   _showURLPopUp: function(position, url) {
+   // # for internal links
+   if (!url.startsWith('#')) {
+   this._map.hyperlinkPopup = new L.Popup({className: 
'hyperlink-popup', closeButton: false, closeOnClick: false})
+   .setContent(''+url+'')
+   .setLatLng(position)
+   .openOn(this._map);
+   }
+   },
+
+   _closeURLPopUp: function() {
+   this._map.closePopup(this._map.hyperlinkPopup);
+   this._map.hyperlinkPopup = null;
+   },
+
_onHyperlinkClickedMsg: function (textMsg) {
var link = null;
var coords = null;
@@ -1148,13 +1163,9 @@ L.TileLayer = L.GridLayer.extend({
this._map.lastActionByUser = false;
 
this._map.hyperlinkUnderCursor = obj.hyperlink;
-   this._map.closePopup(this._map.hyperlinkPopup);
-   this._map.hyperlinkPopup = null;
+   this._closeURLPopUp();
if (obj.hyperlink && obj.hyperlink.link) {
-   this._map.hyperlinkPopup = new L.Popup({className: 
'hyperlink-popup', closeButton: false, closeOnClick: false})
-   .setContent('' + obj.hyperlink.link + '')
-   .setLatLng(cursorPos)
-   .openOn(this._map);
+   this._showURLPopUp(cursorPos, obj.hyperlink.link);
}
 
if (!this._map.editorHasFocus() && (modifierViewId === 
this._viewId) && (this._map._permission === 'edit')) {
@@ -2915,19 +2926,15 @@ L.TileLayer = L.GridLayer.extend({
targetURL = targetURL.split('"').join('');
targetURL = this._map.makeURLFromStr(targetURL);
 
-   this._map.closePopup(this._map.hyperlinkPopup);
-   this._map.hyperlinkPopup = null;
+   this._closeURLPopUp();
if (targetURL) {
-   this._map.hyperlinkPopup = new 
L.Popup({className: 'hyperlink-popup', closeButton: false, closeOnClick: false})
-   .setContent('' + targetURL + '')
-   
.setLatLng(this._cellCursorMarker._bounds._northEast)
-   .openOn(this._map);
+   
this._showURLPopUp(this._cellCursorMarker._bounds._northEast, targetURL);
}
 
}
else if (this._map.hyperlinkPopup)
{
-   this._map.closePopup(this._map.hyperlinkPopup);
+

[Libreoffice-commits] online.git: android/app

2020-03-27 Thread mert (via logerrit)
 
android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
 |   93 +-
 
android/app/src/main/java/org/libreoffice/androidapp/ui/RecentFilesAdapter.java 
   |   12 +
 android/app/src/main/res/drawable/ic_more_vert_black_24dp.xml  
|9 
 android/app/src/main/res/layout/file_explorer_grid_item.xml
|   49 +++--
 android/app/src/main/res/layout/file_list_item.xml 
|9 
 android/app/src/main/res/menu/context_menu.xml 
|2 
 android/app/src/main/res/values/strings.xml
|2 
 7 files changed, 119 insertions(+), 57 deletions(-)

New commits:
commit c07f4fb97492a5b833d44e2750c4fc5ca6879c7a
Author: mert 
AuthorDate: Tue Mar 24 01:31:32 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Mar 27 15:32:59 2020 +0100

android: added context menu for the files

Change-Id: Iab18379797917ce2e8ab25ed428f6a806f5f4e7e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90944
Reviewed-by: Jan Holesovsky 
Tested-by: Jenkins CollaboraOffice 

diff --git 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
index bd9116c94..c1d9df818 100644
--- 
a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
+++ 
b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
@@ -10,7 +10,6 @@
 package org.libreoffice.androidapp.ui;
 
 import android.Manifest;
-import android.app.AlertDialog;
 import android.content.ActivityNotFoundException;
 import android.content.BroadcastReceiver;
 import android.content.ComponentName;
@@ -22,6 +21,7 @@ import android.content.SharedPreferences;
 import android.content.pm.PackageManager;
 import android.content.pm.ShortcutInfo;
 import android.content.pm.ShortcutManager;
+import android.database.Cursor;
 import android.graphics.drawable.Icon;
 import android.hardware.usb.UsbManager;
 import android.net.Uri;
@@ -29,6 +29,8 @@ import android.os.Build;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
 import android.provider.DocumentsContract;
+import android.provider.MediaStore;
+import android.provider.OpenableColumns;
 import android.provider.Settings;
 import android.text.Editable;
 import android.text.TextUtils;
@@ -77,6 +79,7 @@ import java.util.List;
 import androidx.annotation.NonNull;
 import androidx.appcompat.app.ActionBar;
 import androidx.appcompat.app.ActionBarDrawerToggle;
+import androidx.appcompat.app.AlertDialog;
 import androidx.appcompat.app.AppCompatActivity;
 import androidx.appcompat.widget.Toolbar;
 import androidx.core.app.ActivityCompat;
@@ -102,7 +105,7 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 
 FileFilter fileFilter;
 FilenameFilter filenameFilter;
-private int currentlySelectedFile;
+private Uri currentlySelectedFile;
 
 /** The document that is being edited - to know what to save back to 
cloud. */
 //private IFile mCurrentDocument;
@@ -386,8 +389,8 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 
 updateRecentFiles();
 
-// TODO allow context menu for the various files - for Open and Share
-//registerForContextMenu(fileRecyclerView);
+// allow context menu for the various files - for Open and Share
+registerForContextMenu(recentRecyclerView);
 
 setupNavigationDrawer();
 }
@@ -510,11 +513,25 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 case R.id.context_menu_share:
 share(currentlySelectedFile);
 return true;
+case R.id.context_menu_remove_from_list:
+removeFromList(currentlySelectedFile);
+return true;
 default:
 return super.onContextItemSelected(item);
 }
 }
 
+public void openContextMenu(View view, Uri uri) {
+
+this.currentlySelectedFile = uri;
+
+if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+view.showContextMenu(view.getPivotX(), view.getPivotY());
+}
+else
+view.showContextMenu();
+}
+
 public boolean isViewModeList() {
 return prefs.getString(EXPLORER_VIEW_TYPE_KEY, 
GRID_VIEW).equals(LIST_VIEW);
 }
@@ -614,44 +631,42 @@ public class LibreOfficeUIActivity extends 
AppCompatActivity implements Settings
 }
 
 /** Context menu item handling. */
-private void share(int position) {
-/*
-new AsyncTask() {
-@Override
-protected File doInBackground(IFile... document) {
-// this operation may imply network access and must be run in
-// a different thread
-   

[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-1' - loleaflet/src

2020-03-27 Thread mert (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |2 +-
 loleaflet/src/map/handler/Map.TouchGesture.js |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 8228a56544160f34d876aa4d4b1a56691226bd9a
Author: mert 
AuthorDate: Fri Mar 27 19:24:17 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Mar 27 19:36:20 2020 +0100

Fix url popups can't be clicked on browsers

Change-Id: I3c2008e06370b4b48a93b68e58ad1e45a4f75d27
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91230
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit 272715a96d5f9b040a9f2e87414dfcef2c4972d6)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91180
Tested-by: Andras Timar 

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 2e560233e..17521d449 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1119,7 +1119,7 @@ L.TileLayer = L.GridLayer.extend({
// # for internal links
if (!url.startsWith('#')) {
this._map.hyperlinkPopup = new L.Popup({className: 
'hyperlink-popup', closeButton: false, closeOnClick: false})
-   .setContent(''+url+'')
+   .setContent('' + 
url + '')
.setLatLng(position)
.openOn(this._map);
}
diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js 
b/loleaflet/src/map/handler/Map.TouchGesture.js
index 20143958f..470851455 100644
--- a/loleaflet/src/map/handler/Map.TouchGesture.js
+++ b/loleaflet/src/map/handler/Map.TouchGesture.js
@@ -326,9 +326,9 @@ L.Map.TouchGesture = L.Handler.extend({
this._toolbar.remove();
 
// clicked a hyperlink popup - not really designed for this.
-   if (this._map.hyperlinkPopup && e.target && e.target.id === 
'hyperlinkpopup' &&
+   if (this._map.hyperlinkPopup && e.target &&
this._map.hyperlinkPopup._contentNode == 
e.target.parentNode)
-   this._map.fire('hyperlinkclicked', {url: 
e.target.innerHTML});
+   this._map.fire('hyperlinkclicked', {url: 
e.target.href});
 
this._map.fire('closepopups');
this._map.fire('closemobilewizard');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Changes to 'refs/tags/cp-4.2.1-2'

2020-03-27 Thread mert (via logerrit)
Tag 'cp-4.2.1-2' created by Andras Timar  at 
2020-03-27 18:37 +

cp-4.2.1-2

Changes since CP-Android-4.2.1-fix1-23:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Changes to 'refs/tags/CODE-4.2.1-2'

2020-03-27 Thread mert (via logerrit)
Tag 'CODE-4.2.1-2' created by Andras Timar  at 
2020-03-27 18:38 +

CODE-4.2.1-2

Changes since CP-Android-4.2.1-fix1-23:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/css loleaflet/src

2020-03-31 Thread mert (via logerrit)
 loleaflet/css/mobilewizard.css   |   13 ++
 loleaflet/src/control/Control.JSDialogBuilder.js |   29 ++-
 2 files changed, 41 insertions(+), 1 deletion(-)

New commits:
commit 4dad970c01ef85b4874bf753e5c6c3169fd256d8
Author: mert 
AuthorDate: Mon Mar 30 17:39:23 2020 +0300
Commit: Andras Timar 
CommitDate: Tue Mar 31 17:51:39 2020 +0200

mobilewizard: style clear direct formatting button

Change-Id: If34aad5035270d542b49d07c3aa7fe100184ce19
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91418
Reviewed-by: Andras Timar 
Tested-by: Jenkins CollaboraOffice 

diff --git a/loleaflet/css/mobilewizard.css b/loleaflet/css/mobilewizard.css
index 0110d5cef..eb1933445 100644
--- a/loleaflet/css/mobilewizard.css
+++ b/loleaflet/css/mobilewizard.css
@@ -317,6 +317,19 @@
background-color: #eee;
}
 
+   .ui-header.mobile-wizard-widebutton {
+   width: 100%;
+   height: 56px !important;
+   font-size: 11pt !important;
+   margin: 0px;
+   padding: 0px;
+   border: solid 1px #fff;
+   display: flex;
+   flex-direction: row;
+   align-items: center;
+   background-color: #fff;
+   }
+
.ui-content .unobutton {
width: 32px;
height: 32px;
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index a7394813f..08d5552fb 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -4,7 +4,7 @@
  * from the JSON description provided by the server.
  */
 
-/* global $ _ */
+/* global $ _ _UNO */
 
 L.Control.JSDialogBuilder = L.Control.extend({
 
@@ -71,6 +71,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
this._toolitemHandlers['.uno:FrameLineColor'] = 
this._colorControl;
this._toolitemHandlers['.uno:Color'] = this._colorControl;
this._toolitemHandlers['.uno:FillColor'] = this._colorControl;
+   this._toolitemHandlers['.uno:ResetAttributes'] = 
this._clearFormattingControl;
 
this._currentDepth = 0;
},
@@ -1389,6 +1390,32 @@ L.Control.JSDialogBuilder = L.Control.extend({
return selectedColor;
},
 
+   _clearFormattingControl: function(parentContainer, data, builder) {
+   var iconPath = builder._createIconPath(data.command);
+   var sectionTitle = L.DomUtil.create('div', 'ui-header level-' + 
builder._currentDepth + ' mobile-wizard-widebutton ui-widget', parentContainer);
+   $(sectionTitle).css('justify-content', 'space-between');
+
+   if (data && data.id)
+   sectionTitle.id = data.id;
+
+   var leftDiv = L.DomUtil.create('div', 'ui-header-left', 
sectionTitle);
+   var titleClass = '';
+   if (iconPath) {
+   var icon = L.DomUtil.create('img', 'menu-entry-icon', 
leftDiv);
+   icon.src = iconPath;
+   icon.alt = '';
+   titleClass = 'menu-entry-with-icon';
+   }
+   var titleSpan = L.DomUtil.create('span', titleClass, leftDiv);
+   titleSpan.innerHTML =  builder._cleanText(_UNO(data.command));
+
+   $(sectionTitle).click(function () {
+   builder.callback('toolbutton', 'click', sectionTitle, 
data.command, builder);
+   });
+
+   return false;
+   },
+
_colorControl: function(parentContainer, data, builder) {
var titleOverride = builder._getTitleForControlWithId(data.id);
if (titleOverride)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2020-03-30 Thread mert (via logerrit)
 loleaflet/src/control/Toolbar.js  |2 ++
 loleaflet/src/layer/tile/TileLayer.js |7 +++
 loleaflet/src/map/handler/Map.TouchGesture.js |6 +-
 3 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit c4f9e4bda711489548d8d7610f9dfea61d84ce47
Author: mert 
AuthorDate: Mon Mar 30 12:03:12 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Mar 30 21:51:48 2020 +0200

mobile: fix hyperlink on selected text

Insert hyperlink dialog does not have the selected text in the Text field.
So when you select something and want to make it a hyperlink,
you have to type the text again.
Also fixed tapping on hyperlink popup changes cursor position making editing
the link unable to edit

Change-Id: I0d00c4cf001de0f297cc2ed7e5b0f8576e1dab01
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91349
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index e6316188a..d1e4bdafd 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -442,6 +442,8 @@ L.Map.include({
link = this.hyperlinkUnderCursor.link;
} else if (this._clip && this._clip._selectionType == 'text') {
text = 
this.extractContent(this._clip._selectionContent);
+   } else if (this._docLayer._selectedTextContent) {
+   text = 
this.extractContent(this._docLayer._selectedTextContent);
}
 
vex.dialog.open({
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 6ce377988..5245d085f 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -194,6 +194,7 @@ L.TileLayer = L.GridLayer.extend({
this._editorId = -1;
this._followUser = false;
this._followEditor = false;
+   this._selectedTextContent = '';
},
 
onAdd: function (map) {
@@ -619,6 +620,9 @@ L.TileLayer = L.GridLayer.extend({
else if (textMsg.startsWith('textselectioncontent:')) {
if (this._map._clip)

this._map._clip.setTextSelectionHTML(textMsg.substr(22));
+   else
+   // hack for ios and android to get selected 
text into hyperlink insertion dialog
+   this._selectedTextContent = textMsg.substr(22);
}
else if (textMsg.startsWith('textselectionend:')) {
this._onTextSelectionEndMsg(textMsg);
@@ -1991,6 +1995,8 @@ L.TileLayer = L.GridLayer.extend({
this._onUpdateCellCursor();
if (this._map._clip)
this._map._clip.clearSelection();
+   else
+   this._selectedTextContent = '';
},
 
containsSelection: function (latlng) {
@@ -3081,6 +3087,7 @@ L.TileLayer = L.GridLayer.extend({
else {
this._textSelectionStart = null;
this._textSelectionEnd = null;
+   this._selectedTextContent = '';
for (key in this._selectionHandles) {

this._map.removeLayer(this._selectionHandles[key]);
this._selectionHandles[key].isDragged = false;
diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js 
b/loleaflet/src/map/handler/Map.TouchGesture.js
index cf0041d53..95c2eb25e 100644
--- a/loleaflet/src/map/handler/Map.TouchGesture.js
+++ b/loleaflet/src/map/handler/Map.TouchGesture.js
@@ -302,8 +302,12 @@ L.Map.TouchGesture = L.Handler.extend({
 
// clicked a hyperlink popup - not really designed for this.
if (this._map.hyperlinkPopup && e.target &&
-   this._map.hyperlinkPopup._contentNode == 
e.target.parentNode)
+   this._map.hyperlinkPopup._contentNode == 
e.target.parentNode) {
this._map.fire('hyperlinkclicked', {url: 
e.target.href});
+   // not forward mouse events to core if the user tap on 
a hyperlink popup box
+   // for instance on Writer that causes the text cursor 
to be moved
+   return;
+   }
 
this._map.fire('closepopups');
this._map.fire('closemobilewizard');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2020-03-27 Thread mert (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |2 +-
 loleaflet/src/map/handler/Map.TouchGesture.js |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 272715a96d5f9b040a9f2e87414dfcef2c4972d6
Author: mert 
AuthorDate: Fri Mar 27 19:24:17 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Mar 27 18:01:27 2020 +0100

Fix url popups can't be clicked on browsers

Change-Id: I3c2008e06370b4b48a93b68e58ad1e45a4f75d27
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91230
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index dfe755b64..6ce377988 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1119,7 +1119,7 @@ L.TileLayer = L.GridLayer.extend({
// # for internal links
if (!url.startsWith('#')) {
this._map.hyperlinkPopup = new L.Popup({className: 
'hyperlink-popup', closeButton: false, closeOnClick: false})
-   .setContent(''+url+'')
+   .setContent('' + 
url + '')
.setLatLng(position)
.openOn(this._map);
}
diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js 
b/loleaflet/src/map/handler/Map.TouchGesture.js
index 004d423ba..cf0041d53 100644
--- a/loleaflet/src/map/handler/Map.TouchGesture.js
+++ b/loleaflet/src/map/handler/Map.TouchGesture.js
@@ -301,9 +301,9 @@ L.Map.TouchGesture = L.Handler.extend({
mousePos = this._map._docLayer._latLngToTwips(latlng);
 
// clicked a hyperlink popup - not really designed for this.
-   if (this._map.hyperlinkPopup && e.target && e.target.id === 
'hyperlinkpopup' &&
+   if (this._map.hyperlinkPopup && e.target &&
this._map.hyperlinkPopup._contentNode == 
e.target.parentNode)
-   this._map.fire('hyperlinkclicked', {url: 
e.target.innerHTML});
+   this._map.fire('hyperlinkclicked', {url: 
e.target.href});
 
this._map.fire('closepopups');
this._map.fire('closemobilewizard');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2020-04-23 Thread mert (via logerrit)
 loleaflet/src/control/Control.JSDialogBuilder.js |   89 +++
 loleaflet/src/control/Control.MobileWizard.js|   23 -
 2 files changed, 62 insertions(+), 50 deletions(-)

New commits:
commit d9cbd9d6f673dc70bcaa873a51dd30a9e4f5be4e
Author: mert 
AuthorDate: Thu Apr 23 14:56:26 2020 +0300
Commit: Andras Timar 
CommitDate: Thu Apr 23 19:35:06 2020 +0200

mobilewizard: fix number format doesn't update properly

Change-Id: I852dd79d9658f676e86b22cb1cb145264c9de2fe
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92762
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 4deb8e296..97f416d25 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -252,33 +252,20 @@ L.Control.JSDialogBuilder = L.Control.extend({
return false;
},
 
-   _updateListBox: function(builder, contentDiv, contentNode, 
sectionTitle, data, state) {
-   if ($(sectionTitle).find('.entry-value')[0])
-   sectionTitle = 
$($(sectionTitle).find('.entry-value')).get(0);
-   else
-   sectionTitle = 
$(sectionTitle).find('.ui-header-left').find('span')[0];
-
+   _updateListBox: function(builder, sectionTitle, data, state) {
if (!sectionTitle)
return;
 
-   $(contentDiv).find('.selected').removeClass('selected');
-
-   var hasChildren = $(contentDiv).children().length > 0 && 
contentNode.children && contentNode.children.length > 0;
var updateBy = builder._getListBoxUpdateType(data.id);
-   if (updateBy === 'index') {
+
+   if (updateBy === 'index')
sectionTitle.innerHTML = data.entries[state];
-   data.selectedEntries[0] = state;
-   contentDiv.title = data.entries[state];
-   if (hasChildren) {
-   
$($(contentDiv).children().get(state)).addClass('selected');
-   }
-   } else if (updateBy === 'value') {
+   else if (updateBy === 'value')
sectionTitle.innerHTML = state;
-   if (hasChildren) {
-   $(contentDiv).find('p').filter(function() {
-   return $(this).text() === state;
-   }).addClass('selected');
-   }
+
+   if (builder.refreshSidebar) {
+   builder.wizard._refreshSidebar(0);
+   builder.refreshSidebar = false;
}
},
 
@@ -301,6 +288,13 @@ L.Control.JSDialogBuilder = L.Control.extend({
}
var titleSpan = L.DomUtil.create('span', titleClass, leftDiv);
 
+   if (!valueNode && data.command) {
+   var items = builder.map['stateChangeHandler'];
+   var val = items.getItemValue(data.command);
+   if (val)
+   valueNode = L.DomUtil.create('div', '', null);
+   }
+
var rightDiv = L.DomUtil.create('div', 'ui-header-right', 
sectionTitle);
if (valueNode) {
var valueDiv = L.DomUtil.create('div', 'entry-value', 
rightDiv);
@@ -310,36 +304,14 @@ L.Control.JSDialogBuilder = L.Control.extend({
var arrowSpan = L.DomUtil.create('span', 'sub-menu-arrow', 
rightDiv);
arrowSpan.innerHTML = '>';
 
-   var contentDiv = L.DomUtil.create('div', 'ui-content level-' + 
builder._currentDepth + ' mobile-wizard', parentContainer);
-   contentDiv.title = data.text;
-
-   builder._currentDepth++;
-   builder.build(contentDiv, [contentNode]);
-   builder._currentDepth--;
-
-   if (!data.nosubmenu)
-   {
-   $(contentDiv).hide();
-   if (builder.wizard) {
-   $(sectionTitle).click(function(event, data) {
-   builder.wizard.goLevelDown(contentDiv, 
data);
-   if (contentNode.onshow)
-   contentNode.onshow();
-   });
-   } else {
-   console.debug('Builder used outside of mobile 
wizard: please implement the click handler');
-   }
-   }
-   else
-   $(sectionTitle).hide();
-
var updateFunction = function(titleSpan) {
var state = null;
if (data.id)

[Libreoffice-commits] online.git: Changes to 'refs/tags/cp-4.2.3-1'

2020-05-06 Thread mert (via logerrit)
Tag 'cp-4.2.3-1' created by Andras Timar  at 
2020-05-07 05:26 +

cp-4.2.3-1

Changes since co-4-2-0-branch-point-1498:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-3' - loleaflet/images loleaflet/src

2020-05-06 Thread mert (via logerrit)
 loleaflet/images/lc_pageheight.svg   |   13 +
 loleaflet/images/lc_pagewidth.svg|1 +
 loleaflet/images/lc_paperheight.svg  |   13 +
 loleaflet/images/lc_paperwidth.svg   |1 +
 loleaflet/src/control/Control.JSDialogBuilder.js |   16 +++-
 loleaflet/src/control/Control.Menubar.js |   16 ++--
 loleaflet/src/control/Control.MobileWizard.js|4 
 loleaflet/src/layer/tile/TileLayer.js|2 +-
 8 files changed, 54 insertions(+), 12 deletions(-)

New commits:
commit a5d14f2f72bee5c8ff5918ca1f6385a5655d2d25
Author: mert 
AuthorDate: Wed Apr 29 17:30:35 2020 +0300
Commit: Andras Timar 
CommitDate: Thu May 7 07:26:25 2020 +0200

mobile: sidebar page deck for Page Settings as mobilewizard

Change-Id: I67cc40cb4fca4b9607e2c42d83ce66cc9bdd1eb8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93170
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit 89526f85e3768a30f7d8f3c5050e64cd05c018af)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93536

diff --git a/loleaflet/images/lc_pageheight.svg 
b/loleaflet/images/lc_pageheight.svg
new file mode 100644
index 0..9441c1bc3
--- /dev/null
+++ b/loleaflet/images/lc_pageheight.svg
@@ -0,0 +1,13 @@
+http://www.w3.org/2000/svg;>
+ 
+ 
+ 
+ 
+ 
+  
+  
+  
+  
+  
+ 
+
diff --git a/loleaflet/images/lc_pagewidth.svg 
b/loleaflet/images/lc_pagewidth.svg
new file mode 100644
index 0..606f02d19
--- /dev/null
+++ b/loleaflet/images/lc_pagewidth.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg;>
\ No newline at end of file
diff --git a/loleaflet/images/lc_paperheight.svg 
b/loleaflet/images/lc_paperheight.svg
new file mode 100644
index 0..9441c1bc3
--- /dev/null
+++ b/loleaflet/images/lc_paperheight.svg
@@ -0,0 +1,13 @@
+http://www.w3.org/2000/svg;>
+ 
+ 
+ 
+ 
+ 
+  
+  
+  
+  
+  
+ 
+
diff --git a/loleaflet/images/lc_paperwidth.svg 
b/loleaflet/images/lc_paperwidth.svg
new file mode 100644
index 0..606f02d19
--- /dev/null
+++ b/loleaflet/images/lc_paperwidth.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg;>
\ No newline at end of file
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 2390d11e1..b4179fa60 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -141,6 +141,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
this._controlHandlers['calcfuncpanel'] = 
this._calcFuncListPanelHandler;
this._controlHandlers['tabcontrol'] = this._tabsControlHandler;
this._controlHandlers['paneltabs'] = this._panelTabsHandler;
+   this._controlHandlers['singlepanel'] = this._singlePanelHandler;
this._controlHandlers['container'] = this._containerHandler;
this._controlHandlers['window'] = this._containerHandler;
this._controlHandlers['borderwindow'] = this._containerHandler;
@@ -739,6 +740,15 @@ L.Control.JSDialogBuilder = L.Control.extend({
return false;
},
 
+   _singlePanelHandler: function(parentContainer, data, builder) {
+   var item = data[0];
+   if (item.children) {
+   var child = item.children[0];
+   builder.build(parentContainer, [child]);
+   }
+   return false;
+   },
+
_radiobuttonControl: function(parentContainer, data, builder) {
var radiobutton = L.DomUtil.createWithId('input', data.id, 
parentContainer);
radiobutton.type = 'radio';
@@ -2068,7 +2078,11 @@ L.Control.JSDialogBuilder = L.Control.extend({
&& childData.children[0] && 
childData.children[0].type == 'panel'
&& childData.children[1] && 
childData.children[1].type == 'panel';
 
-   if (twoPanelsAsChildren) {
+   if (childData.children && childData.children.length == 1
+   && childData.children[0] && 
childData.children[0].type == 'panel') {
+   handler = this._controlHandlers['singlepanel'];
+   processChildren = handler(childObject, 
childData.children, this);
+   } else if (twoPanelsAsChildren) {
handler = this._controlHandlers['paneltabs'];
processChildren = handler(childObject, 
childData.children, this);
} else {
diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 9649055af..d2ef6b36d 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -514,10 +514,7 @@ L.Control.Menubar = 

[Libreoffice-commits] online.git: loleaflet/images loleaflet/src

2020-05-06 Thread mert (via logerrit)
 loleaflet/images/lc_pageheight.svg   |   13 +
 loleaflet/images/lc_pagewidth.svg|1 +
 loleaflet/images/lc_paperheight.svg  |   13 +
 loleaflet/images/lc_paperwidth.svg   |1 +
 loleaflet/src/control/Control.JSDialogBuilder.js |   16 +++-
 loleaflet/src/control/Control.Menubar.js |   16 ++--
 loleaflet/src/control/Control.MobileWizard.js|4 
 loleaflet/src/layer/tile/TileLayer.js|2 +-
 8 files changed, 54 insertions(+), 12 deletions(-)

New commits:
commit 89526f85e3768a30f7d8f3c5050e64cd05c018af
Author: mert 
AuthorDate: Wed Apr 29 17:30:35 2020 +0300
Commit: Andras Timar 
CommitDate: Thu May 7 07:06:58 2020 +0200

mobile: sidebar page deck for Page Settings as mobilewizard

Change-Id: I67cc40cb4fca4b9607e2c42d83ce66cc9bdd1eb8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93170
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/images/lc_pageheight.svg 
b/loleaflet/images/lc_pageheight.svg
new file mode 100644
index 0..9441c1bc3
--- /dev/null
+++ b/loleaflet/images/lc_pageheight.svg
@@ -0,0 +1,13 @@
+http://www.w3.org/2000/svg;>
+ 
+ 
+ 
+ 
+ 
+  
+  
+  
+  
+  
+ 
+
diff --git a/loleaflet/images/lc_pagewidth.svg 
b/loleaflet/images/lc_pagewidth.svg
new file mode 100644
index 0..606f02d19
--- /dev/null
+++ b/loleaflet/images/lc_pagewidth.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg;>
\ No newline at end of file
diff --git a/loleaflet/images/lc_paperheight.svg 
b/loleaflet/images/lc_paperheight.svg
new file mode 100644
index 0..9441c1bc3
--- /dev/null
+++ b/loleaflet/images/lc_paperheight.svg
@@ -0,0 +1,13 @@
+http://www.w3.org/2000/svg;>
+ 
+ 
+ 
+ 
+ 
+  
+  
+  
+  
+  
+ 
+
diff --git a/loleaflet/images/lc_paperwidth.svg 
b/loleaflet/images/lc_paperwidth.svg
new file mode 100644
index 0..606f02d19
--- /dev/null
+++ b/loleaflet/images/lc_paperwidth.svg
@@ -0,0 +1 @@
+http://www.w3.org/2000/svg;>
\ No newline at end of file
diff --git a/loleaflet/src/control/Control.JSDialogBuilder.js 
b/loleaflet/src/control/Control.JSDialogBuilder.js
index 2390d11e1..b4179fa60 100644
--- a/loleaflet/src/control/Control.JSDialogBuilder.js
+++ b/loleaflet/src/control/Control.JSDialogBuilder.js
@@ -141,6 +141,7 @@ L.Control.JSDialogBuilder = L.Control.extend({
this._controlHandlers['calcfuncpanel'] = 
this._calcFuncListPanelHandler;
this._controlHandlers['tabcontrol'] = this._tabsControlHandler;
this._controlHandlers['paneltabs'] = this._panelTabsHandler;
+   this._controlHandlers['singlepanel'] = this._singlePanelHandler;
this._controlHandlers['container'] = this._containerHandler;
this._controlHandlers['window'] = this._containerHandler;
this._controlHandlers['borderwindow'] = this._containerHandler;
@@ -739,6 +740,15 @@ L.Control.JSDialogBuilder = L.Control.extend({
return false;
},
 
+   _singlePanelHandler: function(parentContainer, data, builder) {
+   var item = data[0];
+   if (item.children) {
+   var child = item.children[0];
+   builder.build(parentContainer, [child]);
+   }
+   return false;
+   },
+
_radiobuttonControl: function(parentContainer, data, builder) {
var radiobutton = L.DomUtil.createWithId('input', data.id, 
parentContainer);
radiobutton.type = 'radio';
@@ -2068,7 +2078,11 @@ L.Control.JSDialogBuilder = L.Control.extend({
&& childData.children[0] && 
childData.children[0].type == 'panel'
&& childData.children[1] && 
childData.children[1].type == 'panel';
 
-   if (twoPanelsAsChildren) {
+   if (childData.children && childData.children.length == 1
+   && childData.children[0] && 
childData.children[0].type == 'panel') {
+   handler = this._controlHandlers['singlepanel'];
+   processChildren = handler(childObject, 
childData.children, this);
+   } else if (twoPanelsAsChildren) {
handler = this._controlHandlers['paneltabs'];
processChildren = handler(childObject, 
childData.children, this);
} else {
diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index 9649055af..d2ef6b36d 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -514,10 +514,7 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:PreviousTrackedChange'},
{uno: 

[Libreoffice-commits] online.git: Changes to 'refs/tags/CODE-4.2.3-1'

2020-05-06 Thread mert (via logerrit)
Tag 'CODE-4.2.3-1' created by Andras Timar  at 
2020-05-07 05:27 +

CODE-4.2.3-1

Changes since co-4-2-0-branch-point-1498:
---
 0 files changed
---
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: android/lib configure.ac

2020-03-17 Thread mert (via logerrit)
 android/lib/build.gradle|  
  2 
 android/lib/libSettings.gradle.in   |  
  1 
 android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java|  
 57 ++
 android/lib/src/main/java/org/libreoffice/androidlib/RateAppController.java |  
 86 ++
 android/lib/src/main/res/layout/rate_app_layout.xml |  
 28 +++
 android/lib/src/main/res/values/strings.xml |  
  3 
 configure.ac|  
 10 +
 7 files changed, 186 insertions(+), 1 deletion(-)

New commits:
commit 76f4c6de3be7c8e70c29afcadd9a1b10ab6a34bd
Author: mert 
AuthorDate: Fri Mar 13 21:21:14 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Wed Mar 18 00:36:05 2020 +0100

android: added a rating dialog

Change-Id: If1fed5bff1f7b607027d01a69d09de997fae8473
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90479
Tested-by: Jan Holesovsky 
Reviewed-by: Jan Holesovsky 

diff --git a/android/lib/build.gradle b/android/lib/build.gradle
index 8af6e8a2a..ceac6b811 100644
--- a/android/lib/build.gradle
+++ b/android/lib/build.gradle
@@ -25,6 +25,7 @@ android {
 buildTypes {
 debug {
 buildConfigField "String", "GIT_COMMIT", "\"${liboGitFullCommit}\""
+buildConfigField "boolean", "GOOGLE_PLAY_ENABLED", 
"${liboGooglePlay}"
 ndk {
 abiFilters = []
 abiFilters.addAll("${liboAndroidAbi}".split(' ').collect{it as 
String})
@@ -33,6 +34,7 @@ android {
 }
 release {
 buildConfigField "String", "GIT_COMMIT", "\"${liboGitFullCommit}\""
+buildConfigField "boolean", "GOOGLE_PLAY_ENABLED", 
"${liboGooglePlay}"
 ndk {
 abiFilters = []
 abiFilters.addAll("${liboAndroidAbi}".split(' ').collect{it as 
String})
diff --git a/android/lib/libSettings.gradle.in 
b/android/lib/libSettings.gradle.in
index d492e0389..3b6208fb7 100644
--- a/android/lib/libSettings.gradle.in
+++ b/android/lib/libSettings.gradle.in
@@ -10,4 +10,5 @@ ext {
 liboGitFullCommit   = '@LOOLWSD_VERSION_HASH@'
 liboApplicationId   = '@ANDROID_PACKAGE_NAME@'
 liboAndroidAbi  = '@ANDROID_ABI@'
+liboGooglePlay  = '@APP_GOOGLE_PLAY@'
 }
diff --git 
a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java 
b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
index 0459b8db2..de3f5da3b 100644
--- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
+++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
@@ -10,11 +10,13 @@
 package org.libreoffice.androidlib;
 
 import android.Manifest;
+import android.app.AlertDialog;
 import android.content.ClipData;
 import android.content.ClipDescription;
 import android.content.ClipboardManager;
 import android.content.ActivityNotFoundException;
 import android.content.ContentResolver;
+import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.SharedPreferences;
 import android.content.pm.ApplicationInfo;
@@ -43,6 +45,7 @@ import android.webkit.ValueCallback;
 import android.webkit.WebChromeClient;
 import android.webkit.WebSettings;
 import android.webkit.WebView;
+import android.widget.RatingBar;
 import android.widget.TextView;
 import android.widget.Toast;
 
@@ -65,7 +68,6 @@ import java.util.Map;
 
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
-import androidx.appcompat.app.AlertDialog;
 import androidx.appcompat.app.AppCompatActivity;
 import androidx.core.app.ActivityCompat;
 import androidx.core.content.ContextCompat;
@@ -101,6 +103,7 @@ public class LOActivity extends AppCompatActivity {
 private WebView mWebView;
 private SharedPreferences sPrefs;
 private Handler mMainHandler = null;
+private RateAppController rateAppController;
 
 private boolean isDocEditable = false;
 private boolean isDocDebuggable = BuildConfig.DEBUG;
@@ -263,6 +266,10 @@ public class LOActivity extends AppCompatActivity {
 
 setContentView(R.layout.lolib_activity_main);
 mProgressDialog = new ProgressDialog(this);
+if (BuildConfig.GOOGLE_PLAY_ENABLED)
+this.rateAppController = new RateAppController(this);
+else
+this.rateAppController = null;
 
 init();
 }
@@ -403,6 +410,25 @@ public class LOActivity extends AppCompatActivity {
 }
 }
 
+/** opens up the app page on Google Play */
+private void openInGooglePlay() {
+String marketUri = String.format("market://details?id=%1$s", 
getPackageName());
+String webUri = 
String.format("https://play.google.com/store/apps/details?id=%1$s;, 
getPackageName());
+
+Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(marketUri));
+if 

[Libreoffice-commits] online.git: loleaflet/src

2020-03-16 Thread mert (via logerrit)
 loleaflet/src/layer/tile/TileLayer.js |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit c34ca443b2037b4cf200a17013481c1cc75090a4
Author: mert 
AuthorDate: Mon Mar 16 12:34:00 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Mar 16 18:09:20 2020 +0100

mobile: fix hyperlink popup does not disappear.

popups dont disapper on impress also other types of documents
when tapping on graphics

Change-Id: I3b6c64f3347e6ea6aa52c9568bec3233b748d932
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90555
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index d302dccc4..4937e7c31 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -919,6 +919,9 @@ L.TileLayer = L.GridLayer.extend({
},
 
_onGraphicSelectionMsg: function (textMsg) {
+   if (this._map.hyperlinkPopup !== null) {
+   this._closeURLPopUp();
+   }
if (textMsg.match('EMPTY')) {
this._resetSelectionRanges();
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/html loleaflet/js loleaflet/src

2020-05-20 Thread mert (via logerrit)
 loleaflet/html/loleaflet.html.m4 |1 +
 loleaflet/js/global.js   |1 +
 loleaflet/src/control/Toolbar.js |3 +++
 3 files changed, 5 insertions(+)

New commits:
commit 8fa5d48a360ceddc09754a508866a91b85c63e9c
Author: mert 
AuthorDate: Wed May 20 17:17:44 2020 +0300
Commit: Andras Timar 
CommitDate: Wed May 20 16:40:12 2020 +0200

Add "Slow Proxy" string in About

Change-Id: I1c04ef295bdecf782e41d8e299adc67df4f87390
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94581
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/html/loleaflet.html.m4 b/loleaflet/html/loleaflet.html.m4
index 3b63c87ff..547c603c5 100644
--- a/loleaflet/html/loleaflet.html.m4
+++ b/loleaflet/html/loleaflet.html.m4
@@ -223,6 +223,7 @@ m4_ifelse(MOBILEAPP,[true],
   LOKit
   
   m4_ifelse(MOBILEAPP,[],[])
+  
   Copyright © _YEAR_, VENDOR.
 
 
diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js
index 279f2b7c9..c867d28ff 100644
--- a/loleaflet/js/global.js
+++ b/loleaflet/js/global.js
@@ -426,6 +426,7 @@
 
global.createWebSocket = function(uri) {
if (global.socketProxy) {
+   window.socketProxy = true;
return new global.ProxySocket(uri);
} else {
return new WebSocket(uri);
diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 8736ed0af..e01cef418 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -489,6 +489,9 @@ L.Map.include({
productNameWithURL = productName;

content.find('#product-string').html(productString.replace('%productName', 
productNameWithURL));
 
+   if (window.socketProxy)
+   content.find('#slow-proxy').text(_('"Slow Proxy"'));
+
var w;
var iw = window.innerWidth;
if (iw < 768) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: android/app

2020-05-03 Thread mert (via logerrit)
 android/app/appSettings.gradle.in 
|3 +++
 android/app/build.gradle  
|4 
 android/app/src/main/java/org/libreoffice/androidapp/AboutDialogFragment.java 
|9 ++---
 android/app/src/main/res/values/strings.xml   
|2 +-
 4 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit 30a01c0b215209a0fc8bef7fc4c102e17b6754f0
Author: mert 
AuthorDate: Thu Apr 9 11:19:10 2020 +0300
Commit: Andras Timar 
CommitDate: Sun May 3 08:49:33 2020 +0200

tdf#131567 android: added version number in about dialog

also included git-hashes

Change-Id: Ia1d7f7f14b4c560ad7e47fd7a2f459e0da60e3d1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91951
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/android/app/appSettings.gradle.in 
b/android/app/appSettings.gradle.in
index cbef6f786..611a9e48a 100644
--- a/android/app/appSettings.gradle.in
+++ b/android/app/appSettings.gradle.in
@@ -8,6 +8,9 @@ ext {
 liboHasBranding = '@APP_HAS_BRANDING@'
 liboBrandingDir = '@APP_BRANDING_DIR@'
 liboAndroidAbi  = '@ANDROID_ABI@'
+liboOVersionHash= '@LOOLWSD_VERSION_HASH@'
+liboCoreVersionHash = '@CORE_VERSION_HASH@'
+
 }
 android.defaultConfig {
 applicationId '@ANDROID_PACKAGE_NAME@'
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 9d45689bb..1b4848bd0 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -22,6 +22,8 @@ android {
 resValue "string", "app_name", "${liboAppName} Debug"
 resValue "string", "vendor", "${liboVendor}"
 resValue "string", "info_url", "${liboInfoURL}"
+resValue "string", "online_version_hash", "${liboOVersionHash}"
+resValue "string", "core_version_hash", "${liboCoreVersionHash}"
 resValue "string", "image_draw_header", "@drawable/drawer_header"
 manifestPlaceholders = [ appIcon: "${liboLauncherIcon}" ]
 buildConfigField "boolean", "APP_HAS_BRANDING", 
"${liboHasBranding}"
@@ -37,6 +39,8 @@ android {
 resValue "string", "app_name", "${liboAppName}"
 resValue "string", "vendor", "${liboVendor}"
 resValue "string", "info_url", "${liboInfoURL}"
+resValue "string", "online_version_hash", "${liboOVersionHash}"
+resValue "string", "core_version_hash", "${liboCoreVersionHash}"
 if 
(file("src/main/res/drawable/drawer_header_brand.png").exists()) {
 resValue "string", "image_draw_header", 
"@drawable/drawer_header_brand"
 } else {
diff --git 
a/android/app/src/main/java/org/libreoffice/androidapp/AboutDialogFragment.java 
b/android/app/src/main/java/org/libreoffice/androidapp/AboutDialogFragment.java
index 0afad916a..b348cd58d 100644
--- 
a/android/app/src/main/java/org/libreoffice/androidapp/AboutDialogFragment.java
+++ 
b/android/app/src/main/java/org/libreoffice/androidapp/AboutDialogFragment.java
@@ -52,11 +52,14 @@ public class AboutDialogFragment extends DialogFragment {
 {
 String versionName = getActivity().getPackageManager()
 .getPackageInfo(getActivity().getPackageName(), 
0).versionName;
-String[] tokens = versionName.split("/");
-if (tokens.length >= 2)
+String onlineVersionHash = getString(R.string.online_version_hash);
+String coreVersionHash = getString(R.string.core_version_hash);
+
+if (!onlineVersionHash.isEmpty() && !coreVersionHash.isEmpty() && 
!versionName.isEmpty())
 {
 String version = 
String.format(versionView.getText().toString().replace("\n", ""),
-tokens[0], "https://hub.libreoffice.org/git-online/; + tokens[1] + "\">" + tokens[1] 
+ "");
+versionName, "https://hub.libreoffice.org/git-online/; + onlineVersionHash + "\">" + 
onlineVersionHash + "",
+"https://hub.libreoffice.org/git-core/; + 
coreVersionHash + "\">" + coreVersionHash + "");
 @SuppressWarnings("deprecation") // since 24 with additional 
option parameter
 Spanned versionString = Html.fromHtml(version);
 versionView.setText(versionString);
diff --git a/android/app/src/main/res/values/strings.xml 
b/android/app/src/main/res/values/strings.xml
index 8368c33fc..d9db90079 100644
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -2,7 +2,7 @@
 
 
 Settings
-Version: %1$s, Build ID: %2$s
+Version: %1$s\nonline git-hash: %2$s\ncore 
git-hash: %3$s
 $APP_NAME is a modern, easy-to-use, open 
source productivity suite for word processing, spreadsheets, presentations and 
more.
 This release was supplied by $VENDOR.
 

[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - android/lib common/Session.hpp loleaflet/src wsd/ClientSession.cpp

2020-09-10 Thread mert (via logerrit)
 android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java |4 +++
 common/Session.hpp   |4 +++
 loleaflet/src/core/Socket.js |3 ++
 wsd/ClientSession.cpp|   13 
++
 4 files changed, 24 insertions(+)

New commits:
commit 2500b10564bc37140b45ffc7abe641841fc6ec72
Author: mert 
AuthorDate: Thu Sep 10 17:04:36 2020 +0300
Commit: Andras Timar 
CommitDate: Thu Sep 10 21:57:55 2020 +0200

Fix unable to open password protected documents on mobile

Change-Id: Ifd67cb6f3640784176abfe483f0364c1dfe4b5d9
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102388
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git 
a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java 
b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
index 88b1fdafd..2066a1fd6 100644
--- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
+++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
@@ -943,6 +943,10 @@ public class LOActivity extends AppCompatActivity {
 }
 return false;
 }
+case "loadwithpassword": {
+mProgressDialog.determinate(R.string.loading);
+return true;
+}
 }
 return true;
 }
diff --git a/common/Session.hpp b/common/Session.hpp
index 34a566b3c..523b45b12 100644
--- a/common/Session.hpp
+++ b/common/Session.hpp
@@ -180,6 +180,10 @@ public:
 
 bool getHaveDocPassword() const { return _haveDocPassword; }
 
+void setHaveDocPassword(const bool val) { _haveDocPassword = val; }
+
+void setDocPassword(const std::string& password) { _docPassword = 
password; }
+
 const std::string& getDocPassword() const { return _docPassword; }
 
 const std::string& getUserExtraInfo() const { return _userExtraInfo; }
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 32a601aca..ce834a21f 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -683,6 +683,9 @@ L.Socket = L.Class.extend({
callback: L.bind(function(data) {
if (data) {
this._map._docPassword 
= data.password;
+   if 
(window.ThisIsAMobileApp) {
+   
window.postMobileMessage('loadwithpassword password=' + data.password);
+   }

this._map.loadDocument();
} else if (passwordType === 
'to-modify') {
this._map._docPassword 
= '';
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index b24f9b655..c00c7dbea 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -392,6 +392,19 @@ bool ClientSession::_handleInput(const char *buffer, int 
length)
 
 return loadDocument(buffer, length, tokens, docBroker);
 }
+else if (tokens.equals(0, "loadwithpassword"))
+{
+std::string docPassword;
+if (tokens.size() > 1 && getTokenString(tokens[1], "password", 
docPassword))
+{
+if (!docPassword.empty())
+{
+setHaveDocPassword(true);
+setDocPassword(tokens[1]);
+}
+}
+return loadDocument(buffer, length, tokens, docBroker);
+}
 else if (tokens[0] != "canceltiles" &&
  tokens[0] != "tileprocessed" &&
  tokens[0] != "clientzoom" &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: android/lib loleaflet/css loleaflet/src

2020-09-15 Thread mert (via logerrit)
 android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java |   15 
+++
 loleaflet/css/toolbar.css|1 
 loleaflet/src/control/Control.MobileTopBar.js|2 
 loleaflet/src/control/Control.Toolbar.js |8 +++
 loleaflet/src/control/Control.UIManager.js   |   21 
+-
 loleaflet/src/control/Permission.js  |7 +++
 loleaflet/src/map/Map.js |5 ++
 7 files changed, 56 insertions(+), 3 deletions(-)

New commits:
commit 4cd1baa02d0b36e68a7194c77fdeb68c5af59f8a
Author: mert 
AuthorDate: Wed Feb 12 20:53:34 2020 +0300
Commit: Mert Tumer 
CommitDate: Tue Sep 15 12:22:10 2020 +0200

android: back button switches to readonly mode instead of closing

Currently pressing back button on edit mode closes the document,
this patch may prevent unintentional touches

Change-Id: Ic7061186fa8794203fd4614c07a11b219d3a10d9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100666
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tumer 
Reviewed-by: Jan Holesovsky 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88555

diff --git 
a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java 
b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
index 77f9e0e68..88b1fdafd 100644
--- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
+++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
@@ -122,6 +122,7 @@ public class LOActivity extends AppCompatActivity {
 
 /** In case the mobile-wizard is visible, we have to intercept the 
Android's Back button. */
 private boolean mMobileWizardVisible = false;
+private boolean mIsEditModeActive = false;
 
 private ValueCallback valueCallback;
 
@@ -697,6 +698,9 @@ public class LOActivity extends AppCompatActivity {
 // just return one level up in the mobile-wizard (or close it)
 callFakeWebsocketOnMessage("'mobile: mobilewizardback'");
 return;
+} else if (mIsEditModeActive) {
+callFakeWebsocketOnMessage("'mobile: readonlymode'");
+return;
 }
 
 finishWithProgress();
@@ -928,6 +932,17 @@ public class LOActivity extends AppCompatActivity {
 startActivity(intent);
 return false;
 }
+case "EDITMODE": {
+switch (messageAndParam[1]) {
+case "on":
+mIsEditModeActive = true;
+break;
+case "off":
+mIsEditModeActive = false;
+break;
+}
+return false;
+}
 }
 return true;
 }
diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 343ebd8d6..a994cd4b2 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -753,6 +753,7 @@ button.leaflet-control-search-next
 .w2ui-icon.users{ background: url('images/contacts-dark.svg') no-repeat 
center; }
 .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; }
+.w2ui-icon.editmode { background: url('images/lc_listitem-selected.svg') 
no-repeat center / 28px !important; }
 .w2ui-icon.closetoolbar{ background: url('images/close_toolbar.svg') no-repeat 
center !important; }
 .w2ui-icon.sidebar_modify_page{ background: 
url('images/lc_formproperties.svg') no-repeat center !important; }
 .w2ui-icon.sidebar_slide_change{ background: 
url('images/sidebar-transition-large.svg') no-repeat center !important; }
diff --git a/loleaflet/src/control/Control.MobileTopBar.js 
b/loleaflet/src/control/Control.MobileTopBar.js
index 05fd7c7ed..b562c0153 100644
--- a/loleaflet/src/control/Control.MobileTopBar.js
+++ b/loleaflet/src/control/Control.MobileTopBar.js
@@ -193,6 +193,7 @@ L.Control.MobileTopBar = L.Control.extend({
toolbarDownButtons.forEach(function(id) {
toolbar.enable(id);
});
+   toolbar.set('closemobile', {img: 'editmode'});
}
} else {
toolbar = w2ui['actionbar'];
@@ -200,6 +201,7 @@ L.Control.MobileTopBar = L.Control.extend({
toolbarDownButtons.forEach(function(id) {
toolbar.disable(id);
});
+   toolbar.set('closemobile', {img: 
'closemobile'});
}
}
},
diff --git a/loleaflet/src/control/Control.Toolbar.js 

[Libreoffice-commits] online.git: android/lib common/Session.hpp loleaflet/src wsd/ClientSession.cpp

2020-09-15 Thread mert (via logerrit)
 android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java |4 +++
 common/Session.hpp   |4 +++
 loleaflet/src/core/Socket.js |3 ++
 wsd/ClientSession.cpp|   13 
++
 4 files changed, 24 insertions(+)

New commits:
commit 115bb1b652dc931344c4a19f0bafd7363115914b
Author: mert 
AuthorDate: Thu Sep 10 17:04:36 2020 +0300
Commit: Mert Tumer 
CommitDate: Tue Sep 15 15:14:40 2020 +0200

Fix unable to open password protected documents on mobile

Change-Id: Ifd67cb6f3640784176abfe483f0364c1dfe4b5d9
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102388
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102729

diff --git 
a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java 
b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
index 88b1fdafd..2066a1fd6 100644
--- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
+++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
@@ -943,6 +943,10 @@ public class LOActivity extends AppCompatActivity {
 }
 return false;
 }
+case "loadwithpassword": {
+mProgressDialog.determinate(R.string.loading);
+return true;
+}
 }
 return true;
 }
diff --git a/common/Session.hpp b/common/Session.hpp
index e88a59d89..61e35ff42 100644
--- a/common/Session.hpp
+++ b/common/Session.hpp
@@ -193,6 +193,10 @@ public:
 
 bool getHaveDocPassword() const { return _haveDocPassword; }
 
+void setHaveDocPassword(const bool val) { _haveDocPassword = val; }
+
+void setDocPassword(const std::string& password) { _docPassword = 
password; }
+
 const std::string& getDocPassword() const { return _docPassword; }
 
 const std::string& getUserExtraInfo() const { return _userExtraInfo; }
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index 8a22e0c8d..750e98bd6 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -696,6 +696,9 @@ L.Socket = L.Class.extend({
callback: L.bind(function(data) {
if (data) {
this._map._docPassword 
= data.password;
+   if 
(window.ThisIsAMobileApp) {
+   
window.postMobileMessage('loadwithpassword password=' + data.password);
+   }

this._map.loadDocument();
} else if (passwordType === 
'to-modify') {
this._map._docPassword 
= '';
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 60733a0c5..44b3f0271 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -395,6 +395,19 @@ bool ClientSession::_handleInput(const char *buffer, int 
length)
 
 return loadDocument(buffer, length, tokens, docBroker);
 }
+else if (tokens.equals(0, "loadwithpassword"))
+{
+std::string docPassword;
+if (tokens.size() > 1 && getTokenString(tokens[1], "password", 
docPassword))
+{
+if (!docPassword.empty())
+{
+setHaveDocPassword(true);
+setDocPassword(docPassword);
+}
+}
+return loadDocument(buffer, length, tokens, docBroker);
+}
 else if (getDocURL().empty())
 {
 sendTextFrameAndLogError("error: cmd=" + tokens[0] + " 
kind=nodocloaded");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src

2020-09-16 Thread mert (via logerrit)
 loleaflet/src/layer/marker/Annotation.js  |6 +--
 loleaflet/src/map/handler/Map.TouchGesture.js |   45 --
 2 files changed, 38 insertions(+), 13 deletions(-)

New commits:
commit 94e461f8248341f9a24de2b2dc7cc48a755a
Author: mert 
AuthorDate: Fri Sep 11 17:05:30 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Sep 16 09:51:44 2020 +0200

Fix annotation kebab menu brings up keyboard on mobile

Also fixed other weirdnesses on touch event with
annotation box. It was sending click events to
LOK even if we click on annotation box, which is not
wanted.

Change-Id: Ia43a879c72c22276c482e463fa725ce1c76df911
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102468
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/layer/marker/Annotation.js 
b/loleaflet/src/layer/marker/Annotation.js
index b5c7f3069..bcf3ab74d 100644
--- a/loleaflet/src/layer/marker/Annotation.js
+++ b/loleaflet/src/layer/marker/Annotation.js
@@ -203,7 +203,7 @@ L.Annotation = L.Layer.extend({
var tr = L.DomUtil.create('tr', empty, tbody);
var tdImg = L.DomUtil.create(tagTd, 'loleaflet-annotation-img', 
tr);
var tdAuthor = L.DomUtil.create(tagTd, 
'loleaflet-annotation-author', tr);
-   var imgAuthor = L.DomUtil.create('img', 'avatar-img', tdImg);
+   var imgAuthor = L.DomUtil.create('img', 'avatar-img 
loleaflet-annotation-avatar-img', tdImg);
imgAuthor.setAttribute('src', L.LOUtil.getImageURL('user.svg'));
imgAuthor.setAttribute('width', this.options.imgSize.x);
imgAuthor.setAttribute('height', this.options.imgSize.y);
@@ -238,12 +238,12 @@ L.Annotation = L.Layer.extend({
}
if (this._data.trackchange) {
this._captionNode = L.DomUtil.create(tagDiv, 
'loleaflet-annotation-caption', wrapper);
-   this._captionText = L.DomUtil.create(tagDiv, empty, 
this._captionNode);
+   this._captionText = L.DomUtil.create(tagDiv, 
'loleaflet-annotation-caption-text', this._captionNode);
}
this._contentNode = L.DomUtil.create(tagDiv, 
'loleaflet-annotation-content loleaflet-dont-break', wrapper);
this._nodeModify = L.DomUtil.create(tagDiv, classEdit, wrapper);
this._nodeModifyText = L.DomUtil.create(tagTextArea, 
classTextArea, this._nodeModify);
-   this._contentText = L.DomUtil.create(tagDiv, empty, 
this._contentNode);
+   this._contentText = L.DomUtil.create(tagDiv, 
'loleaflet-annotation-content-text', this._contentNode);
this._nodeReply = L.DomUtil.create(tagDiv, classEdit, wrapper);
this._nodeReplyText = L.DomUtil.create(tagTextArea, 
classTextArea, this._nodeReply);
 
diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js 
b/loleaflet/src/map/handler/Map.TouchGesture.js
index 4257c0212..677d15dec 100644
--- a/loleaflet/src/map/handler/Map.TouchGesture.js
+++ b/loleaflet/src/map/handler/Map.TouchGesture.js
@@ -320,20 +320,27 @@ L.Map.TouchGesture = L.Handler.extend({
}
 
this._map.fire('closepopups');
-   this._map.fire('editorgotfocus');
 
var docLayer = this._map._docLayer;
-   // unselect if anything is selected already
-   if (docLayer && docLayer._annotations && 
docLayer._annotations.unselect) {
-   docLayer._annotations.unselect();
-   var pointPx = docLayer._twipsToPixels(mousePos);
-   var bounds = docLayer._annotations.getBounds();
-   if (bounds && bounds.contains(pointPx)) {
-   // not forward mouse events to core if the user 
tap on a comment box
-   // for instance on Writer that causes the text 
cursor to be moved
-   return;
+   if (docLayer && docLayer._annotations) {
+   var annotationClicked = false;
+   if (e.target) {
+   var className = e.target.className;
+   if (className && typeof className === 'string') 
{
+   if (className.indexOf('annotation') >= 
0) {
+   annotationClicked = true;
+   return;
+   }
+   }
+   }
+   // unselect if anything is selected already
+   if (!annotationClicked && 
docLayer._annotations.unselect) {
+   docLayer._annotations.unselect();
}
}
+
+   

[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - android/lib

2020-08-26 Thread mert (via logerrit)
 android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java |4 

 1 file changed, 4 insertions(+)

New commits:
commit e527603c3b863294babec82a9098768d54375cac
Author: mert 
AuthorDate: Tue Aug 25 22:44:12 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Aug 26 09:19:45 2020 +0200

Fix insert image dialog only opens once

Change-Id: I5a184feadcf25e22829f80ad4da20d25e04d3f27
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101348
Tested-by: Jenkins
Reviewed-by: Andras Timar 
(cherry picked from commit 851bdeb949d28dd5ee5d451b85b121eecb160a6f)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101355
Tested-by: Andras Timar 

diff --git 
a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java 
b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
index c131a983f..88b1fdafd 100644
--- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
+++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
@@ -578,6 +578,10 @@ public class LOActivity extends AppCompatActivity {
 @Override
 public void onActivityResult(int requestCode, int resultCode, Intent 
intent) {
 if (resultCode != RESULT_OK) {
+if (requestCode == REQUEST_SELECT_IMAGE_FILE) {
+valueCallback.onReceiveValue(null);
+valueCallback = null;
+}
 return;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: android/lib

2020-08-26 Thread mert (via logerrit)
 android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java |4 

 1 file changed, 4 insertions(+)

New commits:
commit 851bdeb949d28dd5ee5d451b85b121eecb160a6f
Author: mert 
AuthorDate: Tue Aug 25 22:44:12 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Aug 26 09:19:04 2020 +0200

Fix insert image dialog only opens once

Change-Id: I5a184feadcf25e22829f80ad4da20d25e04d3f27
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/101348
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git 
a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java 
b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
index 24319e215..77f9e0e68 100644
--- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
+++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
@@ -577,6 +577,10 @@ public class LOActivity extends AppCompatActivity {
 @Override
 public void onActivityResult(int requestCode, int resultCode, Intent 
intent) {
 if (resultCode != RESULT_OK) {
+if (requestCode == REQUEST_SELECT_IMAGE_FILE) {
+valueCallback.onReceiveValue(null);
+valueCallback = null;
+}
 return;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - android/lib loleaflet/css loleaflet/src

2020-08-14 Thread mert (via logerrit)
 android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java |   15 
+++
 loleaflet/css/toolbar.css|1 
 loleaflet/src/control/Control.MobileTopBar.js|2 
 loleaflet/src/control/Control.Toolbar.js |8 +++
 loleaflet/src/control/Control.UIManager.js   |   21 
+-
 loleaflet/src/control/Permission.js  |6 ++
 loleaflet/src/map/Map.js |5 ++
 7 files changed, 55 insertions(+), 3 deletions(-)

New commits:
commit 2e591af0322535e08bd4c2f3ad459e4e471f772a
Author: mert 
AuthorDate: Wed Feb 12 20:53:34 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Fri Aug 14 21:53:46 2020 +0200

android: back button switches to readonly mode instead of closing

Currently pressing back button on edit mode closes the document,
this patch may prevent unintentional touches

Change-Id: Ic7061186fa8794203fd4614c07a11b219d3a10d9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/100666
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tumer 
Reviewed-by: Jan Holesovsky 

diff --git 
a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java 
b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
index 24319e215..c131a983f 100644
--- a/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
+++ b/android/lib/src/main/java/org/libreoffice/androidlib/LOActivity.java
@@ -122,6 +122,7 @@ public class LOActivity extends AppCompatActivity {
 
 /** In case the mobile-wizard is visible, we have to intercept the 
Android's Back button. */
 private boolean mMobileWizardVisible = false;
+private boolean mIsEditModeActive = false;
 
 private ValueCallback valueCallback;
 
@@ -693,6 +694,9 @@ public class LOActivity extends AppCompatActivity {
 // just return one level up in the mobile-wizard (or close it)
 callFakeWebsocketOnMessage("'mobile: mobilewizardback'");
 return;
+} else if (mIsEditModeActive) {
+callFakeWebsocketOnMessage("'mobile: readonlymode'");
+return;
 }
 
 finishWithProgress();
@@ -924,6 +928,17 @@ public class LOActivity extends AppCompatActivity {
 startActivity(intent);
 return false;
 }
+case "EDITMODE": {
+switch (messageAndParam[1]) {
+case "on":
+mIsEditModeActive = true;
+break;
+case "off":
+mIsEditModeActive = false;
+break;
+}
+return false;
+}
 }
 return true;
 }
diff --git a/loleaflet/css/toolbar.css b/loleaflet/css/toolbar.css
index 604120e54..aed7e7e2b 100644
--- a/loleaflet/css/toolbar.css
+++ b/loleaflet/css/toolbar.css
@@ -710,6 +710,7 @@ button.leaflet-control-search-next
 .w2ui-icon.users{ background: url('images/contacts-dark.svg') no-repeat 
center; }
 .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; }
+.w2ui-icon.editmode { background: url("images/lc_listitem-selected.svg") 
no-repeat center / 28px !important; }
 .w2ui-icon.closetoolbar{ background: url('images/close_toolbar.svg') no-repeat 
center !important; }
 .w2ui-icon.sidebar_modify_page{ background: 
url('images/lc_formproperties.svg') no-repeat center !important; }
 .w2ui-icon.sidebar_slide_change{ background: 
url('images/sidebar-transition-large.svg') no-repeat center !important; }
diff --git a/loleaflet/src/control/Control.MobileTopBar.js 
b/loleaflet/src/control/Control.MobileTopBar.js
index d754f0a19..d7f259893 100644
--- a/loleaflet/src/control/Control.MobileTopBar.js
+++ b/loleaflet/src/control/Control.MobileTopBar.js
@@ -193,6 +193,7 @@ L.Control.MobileTopBar = L.Control.extend({
toolbarDownButtons.forEach(function(id) {
toolbar.enable(id);
});
+   toolbar.set('closemobile', {img: 'editmode'});
}
} else {
toolbar = w2ui['actionbar'];
@@ -200,6 +201,7 @@ L.Control.MobileTopBar = L.Control.extend({
toolbarDownButtons.forEach(function(id) {
toolbar.disable(id);
});
+   toolbar.set('closemobile', {img: 
'closemobile'});
}
}
},
diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index 

[Libreoffice-commits] online.git: android/app

2020-09-28 Thread mert (via logerrit)
 android/app/build.gradle   
|2 
 android/app/src/main/AndroidManifest.xml   
|2 
 android/app/src/main/java/org/libreoffice/androidapp/SettingsActivity.java 
|   70 +-
 
android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java
 |   14 +-
 android/app/src/main/res/drawable/ic_folder_black_24dp.xml 
|3 
 android/app/src/main/res/layout/activity_document_browser.xml  
|   21 +--
 android/app/src/main/res/layout/file_explorer_grid_item.xml
|3 
 android/app/src/main/res/layout/file_list_item.xml 
|4 
 android/app/src/main/res/layout/theme_selection.xml
|   44 ++
 android/app/src/main/res/values/strings.xml
|7 +
 android/app/src/main/res/values/themes.xml 
|7 -
 android/app/src/main/res/xml/libreoffice_preferences.xml   
|   13 +
 12 files changed, 167 insertions(+), 23 deletions(-)

New commits:
commit 5c023938a366f44bbe922214fb8727146d18e127
Author: mert 
AuthorDate: Wed May 6 15:15:32 2020 +0300
Commit: Mert Tumer 
CommitDate: Mon Sep 28 14:12:41 2020 +0200

android: enable Dark Theme for Dark Mode changes

Change-Id: I631d31558ae9afac9585d12d66237bc04a761555
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93563
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mert Tumer 

diff --git a/android/app/build.gradle b/android/app/build.gradle
index 627ac6ca9..aa8f5ca16 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -67,7 +67,7 @@ android {
 
 dependencies {
 implementation fileTree(dir: 'libs', include: ['*.jar'])
-implementation 'androidx.appcompat:appcompat:1.0.2'
+implementation 'androidx.appcompat:appcompat:1.1.0'
 implementation 'androidx.core:core:1.0.2'
 implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
 implementation 'androidx.recyclerview:recyclerview:1.0.0'
diff --git a/android/app/src/main/AndroidManifest.xml 
b/android/app/src/main/AndroidManifest.xml
index 4e8723706..a3262 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -32,7 +32,7 @@
 
 
 
 
diff --git 
a/android/app/src/main/java/org/libreoffice/androidapp/SettingsActivity.java 
b/android/app/src/main/java/org/libreoffice/androidapp/SettingsActivity.java
index c51d098af..701ae8350 100644
--- a/android/app/src/main/java/org/libreoffice/androidapp/SettingsActivity.java
+++ b/android/app/src/main/java/org/libreoffice/androidapp/SettingsActivity.java
@@ -11,29 +11,97 @@ package org.libreoffice.androidapp;
 
 import android.content.SharedPreferences;
 import android.os.Bundle;
-
+import android.view.View;
+import android.widget.RadioGroup;
+import androidx.appcompat.app.AlertDialog;
 import androidx.appcompat.app.AppCompatActivity;
+import androidx.appcompat.app.AppCompatDelegate;
+import androidx.preference.Preference;
 import androidx.preference.PreferenceFragmentCompat;
+import org.libreoffice.androidapp.ui.LibreOfficeUIActivity;
 
 public class SettingsActivity extends AppCompatActivity {
+
+private static SharedPreferences prefs;
+
 @Override
 protected void onCreate(Bundle savedInstanceState) {
+setTheme(R.style.LibreOfficeTheme_Base);
 super.onCreate(savedInstanceState);
 
 // Display the fragment as the main content.
 getSupportFragmentManager().beginTransaction()
 .replace(android.R.id.content, new SettingsFragment())
 .commit();
+prefs = getSharedPreferences(LibreOfficeUIActivity.EXPLORER_PREFS_KEY, 
MODE_PRIVATE);
 }
 
 public static class SettingsFragment extends PreferenceFragmentCompat 
implements SharedPreferences.OnSharedPreferenceChangeListener {
 
+int dayNightMode;
+int selectedThemeBtnId;
 @Override
 public void onCreatePreferences(Bundle savedInstanceState, String 
rootKey) {
 addPreferencesFromResource(R.xml.libreoffice_preferences);
 if (!BuildConfig.DEBUG) {
 findPreference("ENABLE_SHOW_DEBUG_INFO").setVisible(false);
 }
+Preference themePreference = findPreference("THEME_SELECTION");
+
+dayNightMode = AppCompatDelegate.getDefaultNightMode();
+selectedThemeBtnId = R.id.radioBtn_default;
+switch (dayNightMode) {
+case AppCompatDelegate.MODE_NIGHT_YES:
+themePreference.setSummary(R.string.theme_dark);
+selectedThemeBtnId = R.id.radioBtn_dark;
+break;
+case AppCompatDelegate.MODE_NIGHT_NO:
+

[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src

2020-09-21 Thread mert (via logerrit)
 loleaflet/src/map/handler/Map.TouchGesture.js |   15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 49447ec08c5d3904028e77a0f8f596571ab8a05b
Author: mert 
AuthorDate: Wed Sep 16 17:31:46 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Sep 21 20:29:08 2020 +0200

Fix pinch gesture causes hammer to stuck on Mobile

Change-Id: If0ae311346ae9c9935ebacde3bc5ea874833
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102873
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit c43aeb3e35a99c2f35bb817037d2451dc8731ae5)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/103057

diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js 
b/loleaflet/src/map/handler/Map.TouchGesture.js
index 677d15dec..cd22175a5 100644
--- a/loleaflet/src/map/handler/Map.TouchGesture.js
+++ b/loleaflet/src/map/handler/Map.TouchGesture.js
@@ -53,9 +53,20 @@ L.Map.TouchGesture = L.Handler.extend({
var tripleTap = new Hammer.Tap({event: 'tripletap', 
taps: 3, posThreshold: posThreshold });
this._hammer.add(tripleTap);
tripleTap.recognizeWith([doubleTap, singleTap]);
-
+   var hammer = this._hammer;
if (L.Browser.touch) {
-   L.DomEvent.on(this._map._mapPane, 'touchstart 
touchmove touchend touchcancel', L.DomEvent.preventDefault);
+   L.DomEvent.on(this._map._mapPane, 'touchstart 
touchmove touchcancel', L.DomEvent.preventDefault);
+   L.DomEvent.on(this._map._mapPane, 'touchend', 
function(e) {
+   // sometimes inputs get stuck in hammer 
and further events get mixed with the old ones
+   // this causes to a failure to use all 
the gestures properly.
+   // This is a workaround until it is 
fixed by hammer.js
+   if (hammer.input) {
+   if (hammer.input.store)  {
+   hammer.input.store = [];
+   }
+   }
+   L.DomEvent.preventDefault(e);
+   });
}
 
if (Hammer.prefixed(window, 'PointerEvent') !== 
undefined) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2020-09-21 Thread mert (via logerrit)
 loleaflet/src/map/handler/Map.TouchGesture.js |   15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

New commits:
commit c43aeb3e35a99c2f35bb817037d2451dc8731ae5
Author: mert 
AuthorDate: Wed Sep 16 17:31:46 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Sep 21 17:20:06 2020 +0200

Fix pinch gesture causes hammer to stuck on Mobile

Change-Id: If0ae311346ae9c9935ebacde3bc5ea874833
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102873
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/map/handler/Map.TouchGesture.js 
b/loleaflet/src/map/handler/Map.TouchGesture.js
index 689e9104f..ce3ca184e 100644
--- a/loleaflet/src/map/handler/Map.TouchGesture.js
+++ b/loleaflet/src/map/handler/Map.TouchGesture.js
@@ -53,9 +53,20 @@ L.Map.TouchGesture = L.Handler.extend({
var tripleTap = new Hammer.Tap({event: 'tripletap', 
taps: 3, posThreshold: posThreshold });
this._hammer.add(tripleTap);
tripleTap.recognizeWith([doubleTap, singleTap]);
-
+   var hammer = this._hammer;
if (L.Browser.touch) {
-   L.DomEvent.on(this._map._mapPane, 'touchstart 
touchmove touchend touchcancel', L.DomEvent.preventDefault);
+   L.DomEvent.on(this._map._mapPane, 'touchstart 
touchmove touchcancel', L.DomEvent.preventDefault);
+   L.DomEvent.on(this._map._mapPane, 'touchend', 
function(e) {
+   // sometimes inputs get stuck in hammer 
and further events get mixed with the old ones
+   // this causes to a failure to use all 
the gestures properly.
+   // This is a workaround until it is 
fixed by hammer.js
+   if (hammer.input) {
+   if (hammer.input.store)  {
+   hammer.input.store = [];
+   }
+   }
+   L.DomEvent.preventDefault(e);
+   });
}
 
if (Hammer.prefixed(window, 'PointerEvent') !== 
undefined) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - wsd/ClientSession.cpp

2020-09-17 Thread mert (via logerrit)
 wsd/ClientSession.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e4c65866cccbbd87a68f52d791cd0e2973580928
Author: mert 
AuthorDate: Thu Sep 17 11:51:16 2020 +0300
Commit: Andras Timar 
CommitDate: Thu Sep 17 11:40:36 2020 +0200

fix loadwithpassword parsing password token on mobile

Change-Id: Ia3ca58f9fb08b9d1568feb2655cd03e17bf92b5a
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102905
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index c00c7dbea..9b5ed4998 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -400,7 +400,7 @@ bool ClientSession::_handleInput(const char *buffer, int 
length)
 if (!docPassword.empty())
 {
 setHaveDocPassword(true);
-setDocPassword(tokens[1]);
+setDocPassword(docPassword);
 }
 }
 return loadDocument(buffer, length, tokens, docBroker);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: 2 commits - loleaflet/html loleaflet/src Makefile.am test/Makefile.am test/WhiteBoxTests.cpp wsd/FileServer.cpp wsd/FileServer.hpp wsd/FileServerUtil.cpp wsd/referenc

2020-09-28 Thread mert (via logerrit)
 Makefile.am|1 
 loleaflet/html/loleaflet.html.m4   |6 +
 loleaflet/src/control/Control.Menubar.js   |   13 +++
 loleaflet/src/control/Control.StatusBar.js |   12 +++
 loleaflet/src/control/Control.UIManager.js |   39 ++
 loleaflet/src/control/Ruler.js |9 ++
 test/Makefile.am   |1 
 test/WhiteBoxTests.cpp |   15 
 wsd/FileServer.cpp |3 
 wsd/FileServer.hpp |8 ++
 wsd/FileServerUtil.cpp |  104 +
 wsd/reference.md   |   21 +
 12 files changed, 226 insertions(+), 6 deletions(-)

New commits:
commit 2e28b9bb655ac7ebc5b580fabb5636b629dd7f85
Author: mert 
AuthorDate: Wed Jun 3 21:16:31 2020 +0300
Commit: Mert Tumer 
CommitDate: Mon Sep 28 11:53:23 2020 +0200

Change Show/Hide Ruler & Statusbar by default on first load

Change-Id: If0bcf08f005b8461ed559d197b49dc11448344d3
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96489
Tested-by: Jenkins CollaboraOffice 

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index e53958f14..d3e3988a7 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -64,6 +64,7 @@ L.Control.Menubar = L.Control.extend({
{name: _UNO('.uno:ZoomMinus', 'text'), id: 
'zoomout', type: 'action',},
{name: _('Reset zoom'), id: 'zoomreset', type: 
'action'},
{name: _('Show Ruler'), id: 'showruler', type: 
'action'},
+   {name: _('Show Status Bar'), id: 
'showstatusbar', type: 'action'},
{type: 'separator'},
]).concat([
{uno: '.uno:ControlCodes'},
@@ -294,7 +295,8 @@ L.Control.Menubar = L.Control.extend({
{uno: '.uno:CustomAnimation', drawing: false},
{uno: '.uno:MasterSlidesPanel', drawing: false},
{type: 'separator', drawing: false},
-   {uno: '.uno:Sidebar', drawing: false}]
+   {uno: '.uno:Sidebar', drawing: false},
+   {name: _('Show Status Bar'), id: 
'showstatusbar', type: 'action'}]
},
{name: _UNO('.uno:InsertMenu', 'presentation'), id: 
'insert', type: 'menu', menu: [
{name: _('Local Image...'), id: 
'insertgraphic', type: 'action'},
@@ -1082,6 +1084,13 @@ L.Control.Menubar = L.Control.extend({

$(aItem).removeClass(constChecked);
}
 
+   } else if (id === 'showstatusbar') {
+   if 
(self._map.uiManager.isStatusBarVisible()) {
+   
$(aItem).addClass(constChecked);
+   } else {
+   
$(aItem).removeClass(constChecked);
+   }
+
} else if (self._map.getDocType() === 
'presentation' && (id === 'deletepage' || id === 'insertpage' || id === 
'duplicatepage')) {
if (id === 'deletepage') {
itemState = 
self._map['stateChangeHandler'].getItemValue('.uno:DeletePage');
@@ -1215,6 +1224,8 @@ L.Control.Menubar = L.Control.extend({
L.toggleFullScreen();
} else if (id === 'showruler') {
this._map.uiManager.toggleRuler();
+   } else if (id === 'showstatusbar') {
+   this._map.uiManager.toggleStatusBar();
} else if (id === 'fullscreen-presentation' && 
this._map.getDocType() === 'presentation') {
this._map.fire('fullscreen');
} else if (id === 'presentation-currentslide' && 
this._map.getDocType() === 'presentation') {
diff --git a/loleaflet/src/control/Control.StatusBar.js 
b/loleaflet/src/control/Control.StatusBar.js
index 29a844e9f..62f368403 100644
--- a/loleaflet/src/control/Control.StatusBar.js
+++ b/loleaflet/src/control/Control.StatusBar.js
@@ -240,7 +240,6 @@ L.Control.StatusBar = L.Control.extend({
});
if (window.mode.isDesktop())
toolbar.tooltip();
-   toolbar.show();
}
 
toolbar.bind('touchstart', function() {
@@ -397,6 +396,17 @@ 

[Libreoffice-commits] online.git: loleaflet/src

2020-09-28 Thread mert (via logerrit)
 loleaflet/src/control/Control.LokDialog.js |7 +
 loleaflet/src/control/Control.Menubar.js   |6 
 loleaflet/src/control/Control.StatusBar.js |7 -
 loleaflet/src/control/Control.Toolbar.js   |4 +++
 loleaflet/src/control/Control.UIManager.js |   38 +++--
 loleaflet/src/map/Map.js   |7 +++--
 6 files changed, 54 insertions(+), 15 deletions(-)

New commits:
commit f7f4464b3c835ccaacf5519ad7ef9ef0bc98d668
Author: mert 
AuthorDate: Tue Jun 9 20:23:48 2020 +0300
Commit: Mert Tumer 
CommitDate: Mon Sep 28 11:53:34 2020 +0200

Save and restore UI element states via localStorage

Also handle Show/Hide sidebar with localstorage

Change-Id: I2e6f8b7480d7d55173a3324b819f6e4e829e512f
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96511
Tested-by: Jenkins CollaboraOffice 

diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index 23fe890cd..87b97e9cf 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -1092,6 +1092,9 @@ L.Control.LokDialog = L.Control.extend({
else
$(panel).parent().hide();
 
+   if (window.initSidebarState)
+   
this._map.uiManager.setSavedState('ShowSidebar', width > 1);
+
// Render window.
this._sendPaintWindowRect(id);
} else {
@@ -1141,6 +1144,8 @@ L.Control.LokDialog = L.Control.extend({
this._createDialogCursor(strId);
 
this._postLaunch(id, panelContainer, panelCanvas);
+   if (window.initSidebarState)
+   this._map.uiManager.setSavedState('ShowSidebar', true);
},
 
_postLaunch: function(id, panelContainer, panelCanvas) {
@@ -1409,6 +1414,8 @@ L.Control.LokDialog = L.Control.extend({
this._map.focus();
}
$('#document-container').addClass('sidebar-closed');
+   if (window.initSidebarState)
+   this._map.uiManager.setSavedState('ShowSidebar', false);
},
 
_onCalcInputBarClose: function(dialogId) {
diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index d3e3988a7..2dd0a6979 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -1309,6 +1309,12 @@ L.Control.Menubar = L.Control.extend({
return;
}
 
+   if (unoCommand.startsWith('.uno:Sidebar') || 
unoCommand.startsWith('.uno:SlideMasterPage') ||
+   unoCommand.startsWith('.uno:ModifyPage') || 
unoCommand.startsWith('.uno:SlideChangeWindow') ||
+   unoCommand.startsWith('.uno:CustomAnimation') || 
unoCommand.startsWith('.uno:MasterSlidesPanel')) {
+   window.initSidebarState = true;
+   }
+
this._map.sendUnoCommand(unoCommand);
},
 
diff --git a/loleaflet/src/control/Control.StatusBar.js 
b/loleaflet/src/control/Control.StatusBar.js
index 62f368403..0a82d5c6f 100644
--- a/loleaflet/src/control/Control.StatusBar.js
+++ b/loleaflet/src/control/Control.StatusBar.js
@@ -397,12 +397,7 @@ L.Control.StatusBar = L.Control.extend({
if (statusbar)
statusbar.refresh();
 
-   var showStatusbar = true;
-   if (window.uiDefaults) {
-   if (window.uiDefaults[docType]) {
-   showStatusbar = 
window.uiDefaults[docType].ShowStatusbar !== false;
-   }
-   }
+   var showStatusbar = 
this.map.uiManager.getSavedStateOrDefault('ShowStatusbar');
if (showStatusbar)
$('#toolbar-down').show();
else
diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index 7fa110194..97767962d 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -70,6 +70,10 @@ function onClick(e, id, item) {
throw new Error('unknown id: ' + id);
}
 
+   if (id === 'sidebar' || id === 'modifypage' || id === 
'slidechangewindow' || id === 'customanimation' || id === 'masterslidespanel') {
+   window.initSidebarState = true;
+   }
+
// In the iOS app we don't want clicking on the toolbar to pop up the 
keyboard.
if (!window.ThisIsTheiOSApp && id !== 'zoomin' && id !== 'zoomout' && 
id !== 'mobile_wizard' && id !== 'insertion_mobile_wizard') {
map.focus(map.canAcceptKeyboardInput()); // Maintain same 
keyboard state.
diff --git a/loleaflet/src/control/Control.UIManager.js 

[Libreoffice-commits] online.git: loleaflet/src

2020-05-28 Thread mert (via logerrit)
 loleaflet/src/control/Toolbar.js |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dd6ce865faf57cf02244710b27c5f18dc27427b4
Author: mert 
AuthorDate: Thu May 28 14:54:14 2020 +0300
Commit: Andras Timar 
CommitDate: Thu May 28 14:29:36 2020 +0200

Fix welcomedialog does not show-up

Change-Id: I38c2af5489b5557ef0cd8b944ba3b9cde316d693
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95029
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 6798c620a..0409c9d1c 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -414,7 +414,7 @@ L.Map.include({
 
showWelcomeDialog: function(calledFromMenu) {
console.log('showWelcomeDialog, calledFromMenu: ' + 
calledFromMenu);
-   var welcomeLocation = window.host + window.serviceRoot + 
'/welcome/welcome-' + String.locale + '.html';
+   var welcomeLocation = window.location.origin + 
window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/')) + 
'/welcome/welcome-' + String.locale + '.html';
 
var map = this;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-4' - loleaflet/src

2020-05-29 Thread mert (via logerrit)
 loleaflet/src/control/Toolbar.js |   20 
 1 file changed, 16 insertions(+), 4 deletions(-)

New commits:
commit ac61b2e7de7fa29b9c00977313b03519e5e909a8
Author: mert 
AuthorDate: Fri May 29 17:00:25 2020 +0300
Commit: Andras Timar 
CommitDate: Fri May 29 17:20:58 2020 +0200

Fix proxy related welcome msg and help dialog problems

Fixed cookie problem with proxy too for welcome message

Change-Id: I8e3e6ccb7673bddd5c26e3d2aadd2da4ed03a2e4
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95113
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 0409c9d1c..11f07f8f6 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -215,7 +215,11 @@ L.Map.include({
w = iw / 5 + 590;
}
var map = this;
-   $.get('loleaflet-help.html', function(data) {
+   var helpLocation = 'loleaflet-help.html';
+   if (window.socketProxy)
+   helpLocation = window.host + window.serviceRoot + 
'/loleaflet/dist/' + helpLocation;
+
+   $.get(helpLocation, function(data) {
var productName;
if (window.ThisIsAMobileApp) {
productName = window.MobileAppName;
@@ -403,7 +407,10 @@ L.Map.include({
if (!calledFromMenu) {
var WSDVerCookie = 'WSDWelcomeVersion=' 
+ map._socket.WSDServer.Version;
// Cookie will not expire for a year, 
and it will not be sent to other domains
-   WSDVerCookie += '; max-age=31536000; 
SameSite=Strict; path=/loleaflet';
+   var cookiePath = '/loleaflet';
+   if (window.socketProxy)
+   cookiePath = window.host + 
window.serviceRoot + cookiePath;
+   WSDVerCookie += '; max-age=31536000; 
SameSite=Strict; path=' + cookiePath;
document.cookie = WSDVerCookie;
}
map.focus();
@@ -414,7 +421,9 @@ L.Map.include({
 
showWelcomeDialog: function(calledFromMenu) {
console.log('showWelcomeDialog, calledFromMenu: ' + 
calledFromMenu);
-   var welcomeLocation = window.location.origin + 
window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/')) + 
'/welcome/welcome-' + String.locale + '.html';
+   var welcomeLocation = 'welcome/welcome-' + String.locale + 
'.html';
+   if (window.socketProxy)
+   welcomeLocation = window.host + window.serviceRoot + 
'/loleaflet/dist/' + welcomeLocation;
 
var map = this;
 
@@ -432,7 +441,10 @@ L.Map.include({
.fail(function() {
// Welcome dialog disabled in loolwsd.xml or 
nonexistant for some other reason
// Let's check back in a day (60 x 60 x 24 = 
86400 seconds)
-   var welcomeDisabledCookie = 
'WSDWelcomeDisabled=true; max-age=86400; SameSite=Strict; path=/loleaflet';
+   var cookiePath = '/loleaflet';
+   if (window.socketProxy)
+   cookiePath = window.host + 
window.serviceRoot + cookiePath;
+   var welcomeDisabledCookie = 
'WSDWelcomeDisabled=true; max-age=86400; SameSite=Strict; path=' + cookiePath;
document.cookie = welcomeDisabledCookie;
 
if (calledFromMenu)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2020-06-01 Thread mert (via logerrit)
 loleaflet/src/control/Toolbar.js |   20 
 1 file changed, 16 insertions(+), 4 deletions(-)

New commits:
commit 642c7598a7e5c937c08d03323c299b83e84e1b5e
Author: mert 
AuthorDate: Fri May 29 17:00:25 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Jun 1 21:38:07 2020 +0200

Fix proxy related welcome msg and help dialog problems

Fixed cookie problem with proxy too for welcome message

Change-Id: I8e3e6ccb7673bddd5c26e3d2aadd2da4ed03a2e4
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95152
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 0409c9d1c..11f07f8f6 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -215,7 +215,11 @@ L.Map.include({
w = iw / 5 + 590;
}
var map = this;
-   $.get('loleaflet-help.html', function(data) {
+   var helpLocation = 'loleaflet-help.html';
+   if (window.socketProxy)
+   helpLocation = window.host + window.serviceRoot + 
'/loleaflet/dist/' + helpLocation;
+
+   $.get(helpLocation, function(data) {
var productName;
if (window.ThisIsAMobileApp) {
productName = window.MobileAppName;
@@ -403,7 +407,10 @@ L.Map.include({
if (!calledFromMenu) {
var WSDVerCookie = 'WSDWelcomeVersion=' 
+ map._socket.WSDServer.Version;
// Cookie will not expire for a year, 
and it will not be sent to other domains
-   WSDVerCookie += '; max-age=31536000; 
SameSite=Strict; path=/loleaflet';
+   var cookiePath = '/loleaflet';
+   if (window.socketProxy)
+   cookiePath = window.host + 
window.serviceRoot + cookiePath;
+   WSDVerCookie += '; max-age=31536000; 
SameSite=Strict; path=' + cookiePath;
document.cookie = WSDVerCookie;
}
map.focus();
@@ -414,7 +421,9 @@ L.Map.include({
 
showWelcomeDialog: function(calledFromMenu) {
console.log('showWelcomeDialog, calledFromMenu: ' + 
calledFromMenu);
-   var welcomeLocation = window.location.origin + 
window.location.pathname.substr(0, window.location.pathname.lastIndexOf('/')) + 
'/welcome/welcome-' + String.locale + '.html';
+   var welcomeLocation = 'welcome/welcome-' + String.locale + 
'.html';
+   if (window.socketProxy)
+   welcomeLocation = window.host + window.serviceRoot + 
'/loleaflet/dist/' + welcomeLocation;
 
var map = this;
 
@@ -432,7 +441,10 @@ L.Map.include({
.fail(function() {
// Welcome dialog disabled in loolwsd.xml or 
nonexistant for some other reason
// Let's check back in a day (60 x 60 x 24 = 
86400 seconds)
-   var welcomeDisabledCookie = 
'WSDWelcomeDisabled=true; max-age=86400; SameSite=Strict; path=/loleaflet';
+   var cookiePath = '/loleaflet';
+   if (window.socketProxy)
+   cookiePath = window.host + 
window.serviceRoot + cookiePath;
+   var welcomeDisabledCookie = 
'WSDWelcomeDisabled=true; max-age=86400; SameSite=Strict; path=' + cookiePath;
document.cookie = welcomeDisabledCookie;
 
if (calledFromMenu)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - kit/ChildSession.cpp

2020-06-18 Thread mert (via logerrit)
 kit/ChildSession.cpp |   12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 1efdc09c628a37da4ac1c3c03a449922622d8baf
Author: mert 
AuthorDate: Wed Jun 17 18:13:22 2020 +0300
Commit: Andras Timar 
CommitDate: Thu Jun 18 14:12:41 2020 +0200

online: fix io error on saveas

Change-Id: Icd91eacf2945c803660aaacb1d46d169b1f9bd86
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96570
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index d9bf41631..7e2a84e0d 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -2022,8 +2022,16 @@ bool ChildSession::saveAs(const char* /*buffer*/, int 
/*length*/, const StringVe
 return false;
 }
 
-// TODO do we need a tempdir here?
-url = std::string("file://") + JAILED_DOCUMENT_ROOT + 
pathSegments[pathSegments.size() - 1];
+std::string jailDoc = JAILED_DOCUMENT_ROOT;
+if (NoCapsForKit)
+{
+jailDoc = Poco::URI(getJailedFilePath()).getPath();
+jailDoc = jailDoc.substr(0, jailDoc.find(JAILED_DOCUMENT_ROOT)) + 
JAILED_DOCUMENT_ROOT;
+}
+
+const std::string tmpDir = FileUtil::createRandomDir(jailDoc);
+const Poco::Path filenameParam(pathSegments[pathSegments.size() - 1]);
+url = std::string("file://") + jailDoc + tmpDir + "/" + 
filenameParam.getFileName();
 wopiFilename = wopiURL.getPath();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: kit/ChildSession.cpp

2020-06-18 Thread mert (via logerrit)
 kit/ChildSession.cpp |   12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 2231f1c568f3ca4a24c03791880392a9665e19e1
Author: mert 
AuthorDate: Wed Jun 17 18:13:22 2020 +0300
Commit: Andras Timar 
CommitDate: Thu Jun 18 16:32:14 2020 +0200

online: fix io error on saveas

Change-Id: Icd91eacf2945c803660aaacb1d46d169b1f9bd86
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96546
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index d9bf41631..7e2a84e0d 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -2022,8 +2022,16 @@ bool ChildSession::saveAs(const char* /*buffer*/, int 
/*length*/, const StringVe
 return false;
 }
 
-// TODO do we need a tempdir here?
-url = std::string("file://") + JAILED_DOCUMENT_ROOT + 
pathSegments[pathSegments.size() - 1];
+std::string jailDoc = JAILED_DOCUMENT_ROOT;
+if (NoCapsForKit)
+{
+jailDoc = Poco::URI(getJailedFilePath()).getPath();
+jailDoc = jailDoc.substr(0, jailDoc.find(JAILED_DOCUMENT_ROOT)) + 
JAILED_DOCUMENT_ROOT;
+}
+
+const std::string tmpDir = FileUtil::createRandomDir(jailDoc);
+const Poco::Path filenameParam(pathSegments[pathSegments.size() - 1]);
+url = std::string("file://") + jailDoc + tmpDir + "/" + 
filenameParam.getFileName();
 wopiFilename = wopiURL.getPath();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: kit/ChildSession.cpp

2020-06-18 Thread mert (via logerrit)
 kit/ChildSession.cpp |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit d29c986e6ad8f30abc1975c945bad62bc75d89f7
Author: mert 
AuthorDate: Thu Jun 18 20:30:56 2020 +0300
Commit: Andras Timar 
CommitDate: Thu Jun 18 21:16:57 2020 +0200

Fix insert local image for online

Change-Id: I4edde45cb6c36c5f52b34ac23692c10ef7a5148f
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96623
Tested-by: Jenkins CollaboraOffice 
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 7e2a84e0d..4b27da4c8 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -1194,7 +1194,15 @@ bool ChildSession::insertFile(const char* /*buffer*/, 
int /*length*/, const Stri
 
 #if !MOBILEAPP
 if (type == "graphic" || type == "selectbackground")
-url = "file://" + std::string(JAILED_DOCUMENT_ROOT) + 
"insertfile/" + name;
+{
+std::string jailDoc = JAILED_DOCUMENT_ROOT;
+if (NoCapsForKit)
+{
+jailDoc = Poco::URI(getJailedFilePath()).getPath();
+jailDoc = jailDoc.substr(0, 
jailDoc.find(JAILED_DOCUMENT_ROOT)) + JAILED_DOCUMENT_ROOT;
+}
+url = "file://" + jailDoc + "insertfile/" + name;
+}
 else if (type == "graphicurl")
 URI::decode(name, url);
 #else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/src

2020-06-25 Thread mert (via logerrit)
 loleaflet/src/control/Toolbar.js |9 +
 1 file changed, 9 insertions(+)

New commits:
commit 94402959af480b2026c3f785e48f236e44bb0830
Author: mert 
AuthorDate: Thu Jun 25 18:53:39 2020 +0300
Commit: Andras Timar 
CommitDate: Thu Jun 25 22:37:01 2020 +0200

Fix images are not shown in online help page on proxy

Relative urls must be replaced for proxy

Change-Id: Ia1d888941c33736c4eb19070aec73c5bdd6fa197
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97166
Tested-by: Jenkins CollaboraOffice 
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 89c191294..7f24d3a55 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -254,6 +254,15 @@ L.Map.include({
}
} else /* id === 'online-help' */ {

document.getElementById('keyboard-shortcuts').style.display='none';
+   if (window.socketProxy) {
+   var helpdiv = 
document.getElementById('online-help');
+   var imgList = 
helpdiv.querySelectorAll('img');
+   for (var p = 0; p < 
imgList.length; p++) {
+   var imgSrc = 
imgList[p].src;
+   imgSrc = 
imgSrc.substring(imgSrc.indexOf('/images'));
+   imgList[p].src 
= window.host + window.serviceRoot + '/loleaflet/dist'+ imgSrc;
+   }
+   }
// Display help according to 
document opened
if (map.getDocType() === 
'text') {
var x = 
document.getElementsByClassName('text');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/src

2020-06-26 Thread mert (via logerrit)
 loleaflet/src/control/Toolbar.js |9 +
 1 file changed, 9 insertions(+)

New commits:
commit 2440b6209ed4934ee6af71ef8f5a87b1af71fd30
Author: mert 
AuthorDate: Thu Jun 25 18:53:39 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Jun 26 10:28:09 2020 +0200

Fix images are not shown in online help page on proxy

Relative urls must be replaced for proxy

Change-Id: Ia1d888941c33736c4eb19070aec73c5bdd6fa197
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97166
Tested-by: Jenkins CollaboraOffice 
Tested-by: Jenkins
Reviewed-by: Andras Timar 
(cherry picked from commit 29c92b5c8db5b470facf09b19811805a9ea69192)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97138

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 1ce90a3ba..6f76e0540 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -254,6 +254,15 @@ L.Map.include({
}
} else /* id === 'online-help' */ {

document.getElementById('keyboard-shortcuts').style.display='none';
+   if (window.socketProxy) {
+   var helpdiv = 
document.getElementById('online-help');
+   var imgList = 
helpdiv.querySelectorAll('img');
+   for (var p = 0; p < 
imgList.length; p++) {
+   var imgSrc = 
imgList[p].src;
+   imgSrc = 
imgSrc.substring(imgSrc.indexOf('/images'));
+   imgList[p].src 
= window.host + window.serviceRoot + '/loleaflet/dist'+ imgSrc;
+   }
+   }
// Display help according to 
document opened
if (map.getDocType() === 
'text') {
var x = 
document.getElementsByClassName('text');
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/js

2020-06-29 Thread mert (via logerrit)
 loleaflet/js/global.js |   35 +++
 1 file changed, 23 insertions(+), 12 deletions(-)

New commits:
commit f8f6189bdd0c75b86d12268cfa97a7090ddbbe4d
Author: mert 
AuthorDate: Wed Jun 24 19:39:32 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Jun 29 08:33:27 2020 +0200

Fix url errors on backgroundImage in css files for proxy

Current replacing url strings method works fine,
however, it does not cover all the rules
for cases like when @media or @import are used.
They have a subset of their own rules which must
be covered as well.

Change-Id: Ib10f7cc361aea5cd3b855f64e3a64566a6c51a12
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97071
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js
index 3420b9c13..0ed660e69 100644
--- a/loleaflet/js/global.js
+++ b/loleaflet/js/global.js
@@ -571,20 +571,16 @@
{
// re-write relative URLs in CSS - somewhat grim.
window.addEventListener('load', function() {
-   var sheets = document.styleSheets;
-   for (var i = 0; i < sheets.length; ++i) {
-   var relBases = sheets[i].href.split('/');
-   relBases.pop(); // bin last - css name.
-   var replaceBase = 'url("' + relBases.join('/') 
+ '/images/';
+   var replaceUrls = function(rules, replaceBase) {
+   if (!rules)
+   return;
 
-   var rules;
-   try {
-   rules = sheets[i].cssRules || 
sheets[i].rules;
-   } catch (err) {
-   console.log('Missing CSS from ' + 
sheets[i].href);
-   continue;
-   }
for (var r = 0; r < rules.length; ++r) {
+   // check subset of rules like @media or 
@import
+   if (rules[r] && rules[r].type != 1) {
+   replaceUrls(rules[r].cssRules 
|| rules[r].rules, replaceBase);
+   continue;
+   }
if (!rules[r] || !rules[r].style)
continue;
var img = 
rules[r].style.backgroundImage;
@@ -596,6 +592,21 @@

img.replace('url("images/', replaceBase);
}
}
+   };
+   var sheets = document.styleSheets;
+   for (var i = 0; i < sheets.length; ++i) {
+   var relBases = sheets[i].href.split('/');
+   relBases.pop(); // bin last - css name.
+   var replaceBase = 'url("' + relBases.join('/') 
+ '/images/';
+
+   var rules;
+   try {
+   rules = sheets[i].cssRules || 
sheets[i].rules;
+   } catch (err) {
+   console.log('Missing CSS from ' + 
sheets[i].href);
+   continue;
+   }
+   replaceUrls(rules, replaceBase);
}
}, false);
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - kit/ChildSession.cpp

2020-06-18 Thread mert (via logerrit)
 kit/ChildSession.cpp |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit a733718ac40a090ea77d8cfd48a6514b6c16b527
Author: mert 
AuthorDate: Thu Jun 18 20:30:56 2020 +0300
Commit: Andras Timar 
CommitDate: Thu Jun 18 23:06:53 2020 +0200

Fix insert local image for online

Change-Id: I4edde45cb6c36c5f52b34ac23692c10ef7a5148f
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96623
Tested-by: Jenkins CollaboraOffice 
Tested-by: Jenkins
Reviewed-by: Andras Timar 
(cherry picked from commit d29c986e6ad8f30abc1975c945bad62bc75d89f7)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96635

diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index 7e2a84e0d..4b27da4c8 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -1194,7 +1194,15 @@ bool ChildSession::insertFile(const char* /*buffer*/, 
int /*length*/, const Stri
 
 #if !MOBILEAPP
 if (type == "graphic" || type == "selectbackground")
-url = "file://" + std::string(JAILED_DOCUMENT_ROOT) + 
"insertfile/" + name;
+{
+std::string jailDoc = JAILED_DOCUMENT_ROOT;
+if (NoCapsForKit)
+{
+jailDoc = Poco::URI(getJailedFilePath()).getPath();
+jailDoc = jailDoc.substr(0, 
jailDoc.find(JAILED_DOCUMENT_ROOT)) + JAILED_DOCUMENT_ROOT;
+}
+url = "file://" + jailDoc + "insertfile/" + name;
+}
 else if (type == "graphicurl")
 URI::decode(name, url);
 #else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2' - loleaflet/js

2020-06-25 Thread mert (via logerrit)
 loleaflet/js/global.js |   35 +++
 1 file changed, 23 insertions(+), 12 deletions(-)

New commits:
commit d49e05cde9a057712ad469e82079ce9ffb45e988
Author: mert 
AuthorDate: Wed Jun 24 19:39:32 2020 +0300
Commit: Andras Timar 
CommitDate: Thu Jun 25 15:36:57 2020 +0200

Fix url errors on backgroundImage in css files for proxy

Current replacing url strings method works fine,
however, it does not cover all the rules
for cases like when @media or @import are used.
They have a subset of their own rules which must
be covered as well.

Change-Id: Ib10f7cc361aea5cd3b855f64e3a64566a6c51a12
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97060
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/loleaflet/js/global.js b/loleaflet/js/global.js
index 6a0bd23df..5e0007d43 100644
--- a/loleaflet/js/global.js
+++ b/loleaflet/js/global.js
@@ -571,20 +571,16 @@
{
// re-write relative URLs in CSS - somewhat grim.
window.addEventListener('load', function() {
-   var sheets = document.styleSheets;
-   for (var i = 0; i < sheets.length; ++i) {
-   var relBases = sheets[i].href.split('/');
-   relBases.pop(); // bin last - css name.
-   var replaceBase = 'url("' + relBases.join('/') 
+ '/images/';
+   var replaceUrls = function(rules, replaceBase) {
+   if (!rules)
+   return;
 
-   var rules;
-   try {
-   rules = sheets[i].cssRules || 
sheets[i].rules;
-   } catch (err) {
-   console.log('Missing CSS from ' + 
sheets[i].href);
-   continue;
-   }
for (var r = 0; r < rules.length; ++r) {
+   // check subset of rules like @media or 
@import
+   if (rules[r] && rules[r].type != 1) {
+   replaceUrls(rules[r].cssRules 
|| rules[r].rules, replaceBase);
+   continue;
+   }
if (!rules[r] || !rules[r].style)
continue;
var img = 
rules[r].style.backgroundImage;
@@ -596,6 +592,21 @@

img.replace('url("images/', replaceBase);
}
}
+   };
+   var sheets = document.styleSheets;
+   for (var i = 0; i < sheets.length; ++i) {
+   var relBases = sheets[i].href.split('/');
+   relBases.pop(); // bin last - css name.
+   var replaceBase = 'url("' + relBases.join('/') 
+ '/images/';
+
+   var rules;
+   try {
+   rules = sheets[i].cssRules || 
sheets[i].rules;
+   } catch (err) {
+   console.log('Missing CSS from ' + 
sheets[i].href);
+   continue;
+   }
+   replaceUrls(rules, replaceBase);
}
}, false);
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/source

2021-03-10 Thread mert (via logerrit)
 sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 3d3e0e5941641757defc8df5e110387b8efbb0e5
Author: mert 
AuthorDate: Wed Mar 3 06:13:21 2021 +0300
Commit: Mert Tumer 
CommitDate: Wed Mar 10 09:24:52 2021 +0100

Draw: Fix crash on multiple page selection on slidesorter

Change-Id: Id7461b811d3445df895cf751153bd0dd81f09efc
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111864
Reviewed-by: Jan Holesovsky 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 505965dd5d05e4711bf5b433b8af06e88e030962)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111917
Tested-by: Jenkins

diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx 
b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 60bc5fadec77..1780554f74e9 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -218,6 +218,7 @@ SlideSorterViewShell* SlideSorterViewShell::GetSlideSorter 
(ViewShellBase& rBase
 FrameworkHelper::msCenterPaneURL,
 FrameworkHelper::msFullScreenPaneURL,
 FrameworkHelper::msLeftImpressPaneURL,
+FrameworkHelper::msLeftDrawPaneURL,
 OUString()};
 
 try
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svx sd/source svx/source

2021-03-11 Thread mert (via logerrit)
 include/svx/svdedtv.hxx|6 +-
 sd/source/ui/func/futransf.cxx |   13 -
 svx/source/svdraw/svdedtv1.cxx |8 +++-
 3 files changed, 20 insertions(+), 7 deletions(-)

New commits:
commit 2246b6a2887b90efc712c4479b19609cf9307a3d
Author: mert 
AuthorDate: Thu Mar 4 12:17:27 2021 +0300
Commit: Mert Tumer 
CommitDate: Fri Mar 12 04:36:28 2021 +0100

Fix wrong position on move when page has margin

Change-Id: I9ac2d9914b86210ca2148b44488c2c70cc5870d4
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111949
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111929
Tested-by: Jenkins

diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 916fdaeb186b..eb815b728cb3 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -304,7 +304,11 @@ public:
 // geometrical attribute (position, size, rotation angle)
 // A PageOrigin set at a position is taken into account.
 SfxItemSet GetGeoAttrFromMarked() const;
-void SetGeoAttrToMarked(const SfxItemSet& rAttr);
+// In LOK, interactive shape movement uses this function
+// in that case, margin is not taken into account
+// and the final position of the shape becomes incorrect
+// However, "Position and Size" dialog and other cases already add the 
margins.
+void SetGeoAttrToMarked(const SfxItemSet& rAttr, bool addPageMargin = 
false);
 
 // Returns NULL if:
 // - nothing is marked,
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index fa7398e48b43..6c07e0e70be6 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -48,14 +49,13 @@ rtl::Reference FuTransform::Create( ViewShell* 
pViewSh, ::sd::Window* pW
 
 namespace {
 
-void setUndo(::sd::View* pView, const SfxItemSet* pArgs)
+void setUndo(::sd::View* pView, const SfxItemSet* pArgs, bool addPageMargin)
 {
 // Undo
 OUString aString = pView->GetDescriptionOfMarkedObjects() +
 " " + SdResId(STR_TRANSFORM);
 pView->BegUndo(aString);
-
-pView->SetGeoAttrToMarked(*pArgs);
+pView->SetGeoAttrToMarked(*pArgs, addPageMargin);
 pView->SetAttributes(*pArgs);
 pView->EndUndo();
 }
@@ -71,7 +71,9 @@ void FuTransform::DoExecute( SfxRequest& rReq )
 
 if (pArgs)
 {
-setUndo(mpView, pArgs);
+// If this comes from LOK, that means the shape is moved by mouse
+// only then pArgs is pre-set.
+setUndo(mpView, pArgs, comphelper::LibreOfficeKit::isActive());
 return;
 }
 
@@ -115,7 +117,8 @@ void FuTransform::DoExecute( SfxRequest& rReq )
 if (nResult == RET_OK)
 {
 pRequest->Done(*(pDlg->GetOutputItemSet()));
-setUndo(mpView, pRequest->GetArgs());
+// Page margin is already calculated at this point.
+setUndo(mpView, pRequest->GetArgs(), false);
 }
 
 // deferred until the dialog ends
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index f2128824b6fa..5b17b8852462 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1512,7 +1512,7 @@ static Point ImpGetPoint(const tools::Rectangle& rRect, 
RectPoint eRP)
 return Point(); // Should not happen!
 }
 
-void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
+void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr, bool 
addPageMargin)
 {
 const bool bTiledRendering = comphelper::LibreOfficeKit::isActive();
 
@@ -1520,6 +1520,12 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& 
rAttr)
 
 if(GetSdrPageView())
 {
+if (addPageMargin)
+{
+SdrPage * pPage = GetSdrPageView()->GetPage();
+Point upperLeft(pPage->GetLeftBorder(), pPage->GetUpperBorder());
+aRect.Move(upperLeft.getX(), upperLeft.getY());
+}
 GetSdrPageView()->LogicToPagePos(aRect);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - include/svx sd/source svx/source

2021-03-09 Thread mert (via logerrit)
 include/svx/svdedtv.hxx|6 +-
 sd/source/ui/func/futransf.cxx |   13 -
 svx/source/svdraw/svdedtv1.cxx |8 +++-
 3 files changed, 20 insertions(+), 7 deletions(-)

New commits:
commit 206c5b374eb56ef1674bb0dbd0d199d2761ea469
Author: mert 
AuthorDate: Thu Mar 4 12:17:27 2021 +0300
Commit: Mert Tumer 
CommitDate: Tue Mar 9 09:37:31 2021 +0100

Fix wrong position on move when page has margin

Change-Id: I9ac2d9914b86210ca2148b44488c2c70cc5870d4
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111949
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins CollaboraOffice 

diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 973a28cd1b9e..4351ccee2764 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -305,7 +305,11 @@ public:
 // geometrical attribute (position, size, rotation angle)
 // A PageOrigin set at a position is taken into account.
 SfxItemSet GetGeoAttrFromMarked() const;
-void SetGeoAttrToMarked(const SfxItemSet& rAttr);
+// In LOK, interactive shape movement uses this function
+// in that case, margin is not taken into account
+// and the final position of the shape becomes incorrect
+// However, "Position and Size" dialog and other cases already add the 
margins.
+void SetGeoAttrToMarked(const SfxItemSet& rAttr, bool addPageMargin = 
false);
 
 // Returns NULL if:
 // - nothing is marked,
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index 96a805040cb9..a0dc99664c3f 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -48,14 +49,13 @@ rtl::Reference FuTransform::Create( ViewShell* 
pViewSh, ::sd::Window* pW
 
 namespace {
 
-void setUndo(::sd::View* pView, const SfxItemSet* pArgs)
+void setUndo(::sd::View* pView, const SfxItemSet* pArgs, bool addPageMargin)
 {
 // Undo
 OUString aString = pView->GetDescriptionOfMarkedObjects() +
 " " + SdResId(STR_TRANSFORM);
 pView->BegUndo(aString);
-
-pView->SetGeoAttrToMarked(*pArgs);
+pView->SetGeoAttrToMarked(*pArgs, addPageMargin);
 pView->SetAttributes(*pArgs);
 pView->EndUndo();
 }
@@ -71,7 +71,9 @@ void FuTransform::DoExecute( SfxRequest& rReq )
 
 if (pArgs)
 {
-setUndo(mpView, pArgs);
+// If this comes from LOK, that means the shape is moved by mouse
+// only then pArgs is pre-set.
+setUndo(mpView, pArgs, comphelper::LibreOfficeKit::isActive());
 return;
 }
 
@@ -116,7 +118,8 @@ void FuTransform::DoExecute( SfxRequest& rReq )
 if (nResult == RET_OK)
 {
 pRequest->Done(*(pDlg->GetOutputItemSet()));
-setUndo(mpView, pRequest->GetArgs());
+// Page margin is already calculated at this point.
+setUndo(mpView, pRequest->GetArgs(), false);
 }
 
 // deferred until the dialog ends
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index cf29f4a268df..830ef238c590 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1534,7 +1534,7 @@ static Point ImpGetPoint(const tools::Rectangle& rRect, 
RectPoint eRP)
 return Point(); // Should not happen!
 }
 
-void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr)
+void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr, bool 
addPageMargin)
 {
 const bool bTiledRendering = comphelper::LibreOfficeKit::isActive();
 
@@ -1542,6 +1542,12 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& 
rAttr)
 
 if(GetSdrPageView())
 {
+if (addPageMargin)
+{
+SdrPage * pPage = GetSdrPageView()->GetPage();
+Point upperLeft(pPage->GetLeftBorder(), pPage->GetUpperBorder());
+aRect.Move(upperLeft.getX(), upperLeft.getY());
+}
 GetSdrPageView()->LogicToPagePos(aRect);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/sdi sc/source

2021-03-01 Thread mert (via logerrit)
 sc/sdi/drawsh.sdi|2 +-
 sc/source/ui/drawfunc/drawsh.cxx |   17 +
 2 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 62c2e238fba7d926f4a05f52c185f9e727dd903f
Author: mert 
AuthorDate: Fri Feb 19 11:15:02 2021 +0300
Commit: Mert Tumer 
CommitDate: Tue Mar 2 08:28:12 2021 +0100

Implemented MoveShapeHandle uno command for sc

Change-Id: I5f81348cd778d7fbcb3b4e721fbf0412c4f5753d
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111514
Tested-by: Jenkins

diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 21e25f35623c..b1d5ecec44a8 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -230,7 +230,7 @@ interface TableDraw
 SID_ATTR_GLOW_TRANSPARENCY  [ ExecMethod = ExecDrawAttr; StateMethod = 
GetDrawAttrState; ]
 
 SID_ATTR_SOFTEDGE_RADIUS[ ExecMethod = ExecDrawAttr; StateMethod = 
GetDrawAttrState; ]
-
+SID_MOVE_SHAPE_HANDLE   [ ExecMethod = ExecDrawAttr; ]
 }
 
 
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 60d3b2114e29..90bf9f8e51cd 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -58,6 +58,7 @@
 #include 
 #include 
 #include 
+#include 
 
 SFX_IMPL_INTERFACE(ScDrawShell, SfxShell)
 
@@ -201,6 +202,22 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
 pView->SetAttributes(aEmptyAttr, true);
 }
 break;
+case SID_MOVE_SHAPE_HANDLE:
+{
+const SfxItemSet *pArgs = rReq.GetArgs ();
+if (pArgs && pArgs->Count () == 3)
+{
+const SfxUInt32Item* handleNumItem = 
rReq.GetArg(FN_PARAM_1);
+const SfxUInt32Item* newPosXTwips = 
rReq.GetArg(FN_PARAM_2);
+const SfxUInt32Item* newPosYTwips = 
rReq.GetArg(FN_PARAM_3);
+
+const sal_uLong handleNum = handleNumItem->GetValue();
+const sal_uLong newPosX = 
convertTwipToMm100(newPosXTwips->GetValue());
+const sal_uLong newPosY = 
convertTwipToMm100(newPosYTwips->GetValue());
+pView->MoveShapeHandle(handleNum, Point(newPosX, newPosY));
+}
+}
+break;
 
 case SID_ATTR_LINE_STYLE:
 case SID_ATTR_LINEEND_STYLE:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svx/source

2021-03-01 Thread mert (via logerrit)
 svx/source/svdraw/svdmrkv.cxx  |9 ++---
 svx/source/svdraw/svdoedge.cxx |2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 275377505f474ef54c50ec86b06c9b9435756913
Author: mert 
AuthorDate: Fri Feb 19 09:55:12 2021 +0300
Commit: Mert Tumer 
CommitDate: Tue Mar 2 08:27:48 2021 +0100

Convert MapModeUnits If necessary.

Connecting to a glue point or handle callback messages
contain points which may need a unit conversion depending
on the module

Change-Id: Icc0b2bc5981bb7d135efd38e60ac06fe12a70480
Signed-off-by: mert 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111513
Tested-by: Jenkins

diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index fbeeb8fda859..8c1ec40dce92 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -892,6 +892,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, const S
 boost::property_tree::ptree poly;
 boost::property_tree::ptree custom;
 boost::property_tree::ptree nodes;
+const bool convertMapMode = 
mpMarkedPV->GetView().GetFirstOutputDevice()->GetMapMode().GetMapUnit() == 
MapUnit::Map100thMM;
 for (size_t i = 0; i < maHdlList.GetHdlCount(); i++)
 {
 SdrHdl *pHdl = maHdlList.GetHdl(i);
@@ -901,8 +902,11 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, const S
 child.put("id", pHdl->GetObjHdlNum());
 child.put("kind", kind);
 child.put("pointer", 
static_cast(pHdl->GetPointer()));
-point.put("x", convertMm100ToTwip(pHdl->GetPos().getX()));
-point.put("y", convertMm100ToTwip(pHdl->GetPos().getY()));
+Point pHdlPos = pHdl->GetPos();
+if (convertMapMode)
+pHdlPos = OutputDevice::LogicToLogic(pHdlPos, 
MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
+point.put("x", pHdlPos.getX());
+point.put("y", pHdlPos.getY());
 child.add_child("point", point);
 const auto node = std::make_pair("", child);
 boost::property_tree::ptree* selectedNode = nullptr;
@@ -932,7 +936,6 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle 
const & rRect, const S
 }
 else
 kindNode.get().push_back(node);
-
 }
 nodes.add_child("rectangle", rectangle);
 nodes.add_child("poly", poly);
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index de697372d120..2eafff7605fc 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -2141,7 +2141,7 @@ bool SdrEdgeObj::ImpFindConnector(const Point& rPt, const 
SdrPageView& rPV, SdrO
 // sensitive area of connectors is twice as large as the one of the handles
 sal_uInt16 nMarkHdSiz=rPV.GetView().GetMarkHdlSizePixel();
 Size aHalfConSiz(nMarkHdSiz,nMarkHdSiz);
-if (comphelper::LibreOfficeKit::isActive())
+if (comphelper::LibreOfficeKit::isActive() && 
pOut->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
 aHalfConSiz=pOut->PixelToLogic(aHalfConSiz, 
MapMode(MapUnit::Map100thMM));
 else
 aHalfConSiz=pOut->PixelToLogic(aHalfConSiz);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   >