[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - sw/source

2019-09-07 Thread Mert Tumer (via logerrit)
 sw/source/uibase/dialog/watermarkdialog.cxx |2 +-
 sw/source/uibase/inc/watermarkdialog.hxx|3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 4a439151f3b21b3381060d7c7e616f469e5f090f
Author: Mert Tumer 
AuthorDate: Fri Jan 18 00:52:23 2019 +0300
Commit: Aron Budea 
CommitDate: Sat Sep 7 08:14:52 2019 +0200

lok: Make the welded Watermark dialog work with dialog tunneling.

Change-Id: Ib5acd6fe4838aa09b74333c46cf38b9e0a926682
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/66555
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 
(cherry picked from commit 2a1ea372daa12c0041d2c080a8fab33a6a87950d)
Reviewed-on: https://gerrit.libreoffice.org/78738
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/sw/source/uibase/dialog/watermarkdialog.cxx 
b/sw/source/uibase/dialog/watermarkdialog.cxx
index 378f20e2b9cb..a40977792873 100644
--- a/sw/source/uibase/dialog/watermarkdialog.cxx
+++ b/sw/source/uibase/dialog/watermarkdialog.cxx
@@ -20,7 +20,7 @@
 #include 
 
 SwWatermarkDialog::SwWatermarkDialog(weld::Window* pParent, SfxBindings& 
rBindings)
-: GenericDialogController(pParent, 
"modules/swriter/ui/watermarkdialog.ui", "WatermarkDialog")
+: SfxDialogController(pParent, "modules/swriter/ui/watermarkdialog.ui", 
"WatermarkDialog")
 , m_rBindings(rBindings)
 , m_xTextInput(m_xBuilder->weld_entry("TextInput"))
 , m_xOKButton(m_xBuilder->weld_button("ok"))
diff --git a/sw/source/uibase/inc/watermarkdialog.hxx 
b/sw/source/uibase/inc/watermarkdialog.hxx
index 65801fcba3a9..dff87a792a57 100644
--- a/sw/source/uibase/inc/watermarkdialog.hxx
+++ b/sw/source/uibase/inc/watermarkdialog.hxx
@@ -12,8 +12,9 @@
 #include 
 #include 
 #include 
+#include 
 
-class SwWatermarkDialog : public weld::GenericDialogController
+class SwWatermarkDialog : public SfxDialogController
 {
 public:
 SwWatermarkDialog(weld::Window* pParent, SfxBindings& rBindings);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: desktop/qa desktop/source filter/source include/LibreOfficeKit

2019-11-10 Thread Mert Tumer (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |4 +--
 desktop/source/lib/init.cxx |   33 +++-
 filter/source/pdf/pdfexport.cxx |   23 +--
 include/LibreOfficeKit/LibreOfficeKit.h |8 ++
 include/LibreOfficeKit/LibreOfficeKit.hxx   |8 +-
 5 files changed, 50 insertions(+), 26 deletions(-)

New commits:
commit 7c8450abac77a2e41f1068fb11d19c1c0c93783f
Author: Mert Tumer 
AuthorDate: Thu Oct 24 12:11:21 2019 +0300
Commit: Ashod Nakashian 
CommitDate: Sun Nov 10 22:39:55 2019 +0100

Added Orientation argument to LOKIT renderFont

method for rendering watermarks with angle

Change-Id: Id422ed62e4f78390661e4e1efa45101af9ecfc23
Reviewed-on: https://gerrit.libreoffice.org/81435
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian 

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 8200c7e1c859..e6207b2cf98a 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -2743,11 +2743,11 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(54), offsetof(struct 
_LibreOfficeKitDocumentClass, getSelectionType));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(55), offsetof(struct 
_LibreOfficeKitDocumentClass, removeTextContext));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(56), offsetof(struct 
_LibreOfficeKitDocumentClass, sendDialogEvent));
-
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(57), offsetof(struct 
_LibreOfficeKitDocumentClass, renderFontOrientation));
 
 // Extending is fine, update this, and add new assert for the offsetof the
 // new method
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(57), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(58), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5b5b301cdee9..bc0fd62eb78a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -879,6 +879,12 @@ static int doc_getView(LibreOfficeKitDocument* pThis);
 static int doc_getViewsCount(LibreOfficeKitDocument* pThis);
 static bool doc_getViewIds(LibreOfficeKitDocument* pThis, int* pArray, size_t 
nSize);
 static void doc_setViewLanguage(LibreOfficeKitDocument* pThis, int nId, const 
char* language);
+static unsigned char* doc_renderFontOrientation(LibreOfficeKitDocument* pThis,
+  const char *pFontName,
+  const char *pChar,
+  int* pFontWidth,
+  int* pFontHeight,
+  int pOrientation);
 static unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis,
   const char *pFontName,
   const char *pChar,
@@ -895,7 +901,8 @@ static void doc_paintWindowDPI(LibreOfficeKitDocument* 
pThis, unsigned nLOKWindo
const int nWidth, const int nHeight,
const double fDPIScale);
 
-static void doc_postWindow(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int nAction, const char* pData);
+static void doc_postWindow(LibreOfficeKitDocument* pThis, unsigned
+ nLOKWindowId, int nAction, const char* pData);
 
 static char* doc_getPartInfo(LibreOfficeKitDocument* pThis, int nPart);
 
@@ -1001,6 +1008,7 @@ LibLODocument_Impl::LibLODocument_Impl(const 
uno::Reference getViewIds = doc_getViewIds;
 
 m_pDocumentClass->renderFont = doc_renderFont;
+m_pDocumentClass->renderFontOrientation = doc_renderFontOrientation;
 m_pDocumentClass->getPartHash = doc_getPartHash;
 
 m_pDocumentClass->paintWindow = doc_paintWindow;
@@ -4671,12 +4679,24 @@ static void doc_setViewLanguage(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*p
 SfxLokHelper::setViewLanguage(nId, OStringToOUString(language, 
RTL_TEXTENCODING_UTF8));
 }
 
-unsigned char* doc_renderFont(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* 
/*pThis*/,
+
+
+unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis,
   const char* pFontName,
   const char* pChar,
   int* pFontWidth,
   int* pFontHeight)
 {
+return doc_renderFontOrientation(pThis, pFontName, pChar, pFontWidth, 
pFontHeight, 0);
+}
+
+unsigned char* doc_renderFontOrientation(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*pThis*/,
+  const char* pFontName,
+  const char* pChar,
+  int* pFontWidth,
+  int* pFontHeight,
+  int pOrientation)
+{
 comphelper::ProfileZone aZone("doc_renderFont");
 
 SolarMutexGuard aGuard;
@@ -4708,6 +4728,7 @@ 

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - common/Session.cpp common/Session.hpp kit/ChildSession.hpp kit/Kit.cpp kit/Watermark.hpp loleaflet/src Makefile.am ws

2019-10-19 Thread Mert Tumer (via logerrit)
 Makefile.am   |3 
 common/Session.cpp|   16 ++
 common/Session.hpp|   12 +
 kit/ChildSession.hpp  |2 
 kit/Kit.cpp   |  224 ++
 kit/Watermark.hpp |  178 +++
 loleaflet/src/core/Socket.js  |3 
 loleaflet/src/layer/tile/TileLayer.js |2 
 wsd/ClientSession.cpp |7 -
 wsd/DocumentBroker.cpp|4 
 10 files changed, 264 insertions(+), 187 deletions(-)

New commits:
commit ed5d304a6e17d98569a75fa9b73639ee07dbdee6
Author: Mert Tumer 
AuthorDate: Wed Oct 16 14:00:16 2019 +0300
Commit: Andras Timar 
CommitDate: Sat Oct 19 20:14:08 2019 +0200

Moved class Watermark to a seperate file

Added hash method for watermarktext and
find it from normalizedviewid for rendering
watermarks on the correct tiles

Change-Id: I4b22ae1493d2957afb93028d1ece967cf766268f
Reviewed-on: https://gerrit.libreoffice.org/81047
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/Makefile.am b/Makefile.am
index 14d64158a..dea71963d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -220,7 +220,8 @@ kit_headers = kit/ChildSession.hpp \
   kit/Delta.hpp \
   kit/DummyLibreOfficeKit.hpp \
   kit/Kit.hpp \
-  kit/KitHelper.hpp
+  kit/KitHelper.hpp \
+  kit/Watermark.hpp
 
 noinst_HEADERS = $(wsd_headers) $(shared_headers) $(kit_headers) \
  bundled/include/LibreOfficeKit/LibreOfficeKit.h \
diff --git a/common/Session.cpp b/common/Session.cpp
index f7ed7f33f..040bbc25e 100644
--- a/common/Session.cpp
+++ b/common/Session.cpp
@@ -250,6 +250,22 @@ void Session::getIOStats(uint64_t , uint64_t )
 }
 }
 
+ void Session::setHash(const std::string& text)
+ {
+ int hash = 0x811C9DC5;
+ int prime = 0x1000193;
+
+ if (!text.empty())
+ {
+for (unsigned int i = 0; i < text.length(); ++i)
+{
+hash += hash ^ text[i];
+hash *= prime;
+}
+ }
+ _hash = abs(hash);
+ }
+
 void Session::dumpState(std::ostream& os)
 {
 WebSocketHandler::dumpState(os);
diff --git a/common/Session.hpp b/common/Session.hpp
index 49f48b2e9..1934c9465 100644
--- a/common/Session.hpp
+++ b/common/Session.hpp
@@ -122,6 +122,13 @@ public:
 
 const std::string& getJailedFilePathAnonym() const { return 
_jailedFilePathAnonym; }
 
+int getHash() { return _hash; }
+
+void setHash(const std::string& text);
+
+void setHash(const int hash) { _hash = hash; };
+
+
 protected:
 Session(const std::string& name, const std::string& id, bool readonly);
 virtual ~Session();
@@ -212,6 +219,11 @@ private:
 
 /// Language for the document based on what the user has in the UI.
 std::string _lang;
+
+/// Hash for normalizedViewId which is basically an identity for the tile 
to
+/// choose what to render on and send it to its subscribers
+/// it is the close-to-unique integer representation of a string like 
Watermarks etc.
+int _hash;
 };
 
 #endif
diff --git a/kit/ChildSession.hpp b/kit/ChildSession.hpp
index f6bcf60a7..bbcc2c773 100644
--- a/kit/ChildSession.hpp
+++ b/kit/ChildSession.hpp
@@ -24,6 +24,7 @@
 #include "Kit.hpp"
 #include "Session.hpp"
 
+class Watermark;
 class ChildSession;
 
 enum class LokEventTargetEnum
@@ -238,6 +239,7 @@ public:
 }
 
 using Session::sendTextFrame;
+std::shared_ptr _docWatermark;
 
 private:
 bool loadDocument(const char* buffer, int length, const 
std::vector& tokens);
diff --git a/kit/Kit.cpp b/kit/Kit.cpp
index ad0df946e..3adb5347e 100644
--- a/kit/Kit.cpp
+++ b/kit/Kit.cpp
@@ -67,6 +67,7 @@
 #include 
 #include 
 #include "Delta.hpp"
+#include "Watermark.hpp"
 
 #ifndef MOBILEAPP
 #include 
@@ -629,171 +630,6 @@ public:
 }
 };
 
-class Watermark
-{
-public:
-Watermark(const std::shared_ptr& loKitDoc, const 
std::string& text,
-const std::shared_ptr & session)
-: _loKitDoc(loKitDoc)
-, _text(text)
-, _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 = 

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - loleaflet/src test/httpwstest.cpp test/TileCacheTests.cpp test/TileQueueTests.cpp test/WhiteBoxTests.cpp wsd/ClientSe

2019-10-19 Thread Mert Tumer (via logerrit)
 loleaflet/src/control/Parts.js|2 
 loleaflet/src/layer/tile/GridLayer.js |2 
 test/TileCacheTests.cpp   |   85 +-
 test/TileQueueTests.cpp   |   58 +++
 test/WhiteBoxTests.cpp|   21 
 test/httpwstest.cpp   |6 +-
 wsd/ClientSession.cpp |3 -
 wsd/TileDesc.hpp  |   40 
 8 files changed, 123 insertions(+), 94 deletions(-)

New commits:
commit f2e4e260c2abb121e206b5b75f910c130751f3bd
Author: Mert Tumer 
AuthorDate: Mon Oct 14 01:11:19 2019 +0300
Commit: Andras Timar 
CommitDate: Sat Oct 19 20:13:39 2019 +0200

Extend TileDesc with normalizedViewId

Change-Id: I138dc9547c90eb44f86ca99b192af67fa9422b4b

Include nviewid to the tests with tile messages

Change-Id: I0b59e65648a402ccd136d13e5f00b52a1466f41c
Reviewed-on: https://gerrit.libreoffice.org/81049
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/loleaflet/src/control/Parts.js b/loleaflet/src/control/Parts.js
index c428408e7..3602962da 100644
--- a/loleaflet/src/control/Parts.js
+++ b/loleaflet/src/control/Parts.js
@@ -123,6 +123,7 @@ L.Map.include({
}
 
this._socket.sendMessage('tile ' +
+   'nviewid=0' + ' ' +
'part=' + part + ' ' +
'width=' + maxWidth * 
dpiscale + ' ' +
'height=' + maxHeight * 
dpiscale + ' ' +
@@ -147,6 +148,7 @@ L.Map.include({
var dpiscale = L.getDpiScaleFactor();
 
this._socket.sendMessage('tile ' +
+   'nviewid=0' + ' ' +
'part=' + part + ' ' +
'width=' + width * 
dpiscale + ' ' +
'height=' + height * 
dpiscale + ' ' +
diff --git a/loleaflet/src/layer/tile/GridLayer.js 
b/loleaflet/src/layer/tile/GridLayer.js
index 3fcbbbac5..55cb0263e 100644
--- a/loleaflet/src/layer/tile/GridLayer.js
+++ b/loleaflet/src/layer/tile/GridLayer.js
@@ -688,6 +688,7 @@ L.GridLayer = L.Layer.extend({
 
if (tilePositionsX !== '' && tilePositionsY !== '') {
var message = 'tilecombine ' +
+   'nviewid=0' + ' ' +
'part=' + this._selectedPart + ' ' +
'width=' + this._tileWidthPx + ' ' +
'height=' + this._tileHeightPx + ' ' +
@@ -1022,6 +1023,7 @@ L.GridLayer = L.Layer.extend({
 
twips = this._coordsToTwips(coords);
msg = 'tilecombine ' +
+   'nviewid=0' + ' ' +
'part=' + coords.part + ' ' +
'width=' + this._tileWidthPx + ' ' +
'height=' + this._tileHeightPx + ' ' +
diff --git a/test/TileCacheTests.cpp b/test/TileCacheTests.cpp
index 2b319c300..b6dda807f 100644
--- a/test/TileCacheTests.cpp
+++ b/test/TileCacheTests.cpp
@@ -185,6 +185,7 @@ void TileCacheTests::testSimple()
 // now, so it discards the cached data.
 TileCache tc("doc.ods", Poco::Timestamp(), "/tmp/tile_cache_tests", true);
 
+int nviewid = 0;
 int part = 0;
 int width = 256;
 int height = 256;
@@ -192,7 +193,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
 std::unique_ptr file = tc.lookupTile(tile);
@@ -226,13 +227,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 

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - test/TileCacheTests.cpp wsd/ClientSession.cpp wsd/DocumentBroker.cpp wsd/DocumentBroker.hpp wsd/TileCache.cpp wsd/Til

2019-10-19 Thread Mert Tumer (via logerrit)
 test/TileCacheTests.cpp |2 +-
 wsd/ClientSession.cpp   |2 +-
 wsd/DocumentBroker.cpp  |4 ++--
 wsd/DocumentBroker.hpp  |2 +-
 wsd/TileCache.cpp   |   23 +--
 wsd/TileCache.hpp   |8 
 6 files changed, 22 insertions(+), 19 deletions(-)

New commits:
commit ed4d93df1bfddfd73719af74cfafbbeefef90e02
Author: Mert Tumer 
AuthorDate: Wed Oct 16 16:50:09 2019 +0300
Commit: Andras Timar 
CommitDate: Sat Oct 19 20:14:31 2019 +0200

Include normalizedViewId to TileCache

Change-Id: Ibabc38a796cd99fb9d0efbf0ef14bf3d82c87b47
Reviewed-on: https://gerrit.libreoffice.org/81048
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/test/TileCacheTests.cpp b/test/TileCacheTests.cpp
index b6dda807f..fd453d995 100644
--- a/test/TileCacheTests.cpp
+++ b/test/TileCacheTests.cpp
@@ -211,7 +211,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
 file = tc.lookupTile(tile);
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index 86a79754e..112eb511e 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -1299,7 +1299,7 @@ void ClientSession::dumpState(std::ostream& os)
 void ClientSession::handleTileInvalidation(const std::string& message,
 const std::shared_ptr& docBroker)
 {
-docBroker->invalidateTiles(message);
+docBroker->invalidateTiles(message, getHash());
 
 // Skip requesting new tiles if we don't have client visible area data yet.
 if(!_clientVisibleArea.hasSurface() ||
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 3119a14c1..fd4120611 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -1363,10 +1363,10 @@ bool DocumentBroker::handleInput(const 
std::vector& payload)
 return true;
 }
 
-void DocumentBroker::invalidateTiles(const std::string& tiles)
+void DocumentBroker::invalidateTiles(const std::string& tiles, int 
normalizedViewId)
 {
 // Remove from cache.
-_tileCache->invalidateTiles(tiles);
+_tileCache->invalidateTiles(tiles, normalizedViewId);
 }
 
 void DocumentBroker::handleTileRequest(TileDesc& tile,
diff --git a/wsd/DocumentBroker.hpp b/wsd/DocumentBroker.hpp
index 24a5e1ac9..858e80658 100644
--- a/wsd/DocumentBroker.hpp
+++ b/wsd/DocumentBroker.hpp
@@ -305,7 +305,7 @@ public:
 _cursorHeight = h;
 }
 
-void invalidateTiles(const std::string& tiles);
+void invalidateTiles(const std::string& tiles, int normalizedViewId);
 void handleTileRequest(TileDesc& tile,
const std::shared_ptr& session);
 void handleDialogRequest(const std::string& dialogCmd);
diff --git a/wsd/TileCache.cpp b/wsd/TileCache.cpp
index b46d16044..e38fdad57 100644
--- a/wsd/TileCache.cpp
+++ b/wsd/TileCache.cpp
@@ -353,7 +353,7 @@ std::unique_ptr 
TileCache::lookupCachedFile(const std::string& nam
 return nullptr;
 }
 
-void TileCache::invalidateTiles(int part, int x, int y, int width, int height)
+void TileCache::invalidateTiles(int part, int x, int y, int width, int height, 
int nViewId)
 {
 LOG_TRC("Removing invalidated tiles: part: " << part <<
 ", x: " << x << ", y: " << y <<
@@ -369,7 +369,7 @@ void TileCache::invalidateTiles(int part, int x, int y, int 
width, int height)
 for (auto tileIterator = DirectoryIterator(dir); tileIterator != 
DirectoryIterator(); ++tileIterator)
 {
 const std::string fileName = tileIterator.path().getFileName();
-if (intersectsTile(fileName, part, x, y, width, height))
+if (intersectsTile(fileName, part, x, y, width, height, nViewId))
 {
 LOG_DBG("Removing tile: " << tileIterator.path().toString());
 FileUtil::removeFile(tileIterator.path());
@@ -378,11 +378,11 @@ void TileCache::invalidateTiles(int part, int x, int y, 
int width, int height)
 }
 }
 
-void TileCache::invalidateTiles(const std::string& tiles)
+void TileCache::invalidateTiles(const std::string& tiles, int normalizedViewId)
 {
 std::pair result = 
TileCache::parseInvalidateMsg(tiles);
 Util::Rectangle& invalidateRect = result.second;
-invalidateTiles(result.first, invalidateRect.getLeft(), 
invalidateRect.getTop(), invalidateRect.getWidth(), invalidateRect.getHeight());
+invalidateTiles(result.first, invalidateRect.getLeft(), 
invalidateRect.getTop(), invalidateRect.getWidth(), invalidateRect.getHeight(), 
normalizedViewId);
 }
 
 std::pair TileCache::parseInvalidateMsg(const 
std::string& tiles)
@@ -433,25 +433,28 @@ void TileCache::removeFile(const std::string& fileName)
 std::string TileCache::cacheFileName(const TileDesc& tile)
 {
 std::ostringstream oss;
-oss << tile.getPart() << '_' << tile.getWidth() << 'x' << tile.getHeight() 
<< '.'
+  

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0-29' - desktop/qa desktop/source filter/source include/LibreOfficeKit

2019-11-27 Thread Mert Tumer (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |7 -
 desktop/source/lib/init.cxx |   33 +
 filter/source/pdf/pdfexport.cxx |   36 
 include/LibreOfficeKit/LibreOfficeKit.h |8 ++
 include/LibreOfficeKit/LibreOfficeKit.hxx   |8 --
 5 files changed, 59 insertions(+), 33 deletions(-)

New commits:
commit b7e6a06a34f601dfb619e7c83800738643d14e96
Author: Mert Tumer 
AuthorDate: Thu Oct 24 12:11:21 2019 +0300
Commit: Andras Timar 
CommitDate: Wed Nov 27 21:13:44 2019 +0100

Added Orientation argument to LOKIT renderFont

method for rendering watermarks with angle

Reviewed-on: https://gerrit.libreoffice.org/82404
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 1dd66357752b01fbf3f1aee9966a55d4a16038e4)

Change-Id: Id422ed62e4f78390661e4e1efa45101af9ecfc23
Reviewed-on: https://gerrit.libreoffice.org/83937
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 46b2dcb431fc..cb42ab2d75b4 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -70,6 +70,7 @@ public:
 virtual void setUp() override
 {
 UnoApiTest::setUp();
+
 
mxDesktop.set(frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory(;
 SfxApplication::GetOrCreate();
 };
@@ -77,6 +78,7 @@ public:
 virtual void tearDown() override
 {
 closeDoc();
+
 UnoApiTest::tearDown();
 };
 
@@ -2769,9 +2771,12 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(48), offsetof(struct 
_LibreOfficeKitDocumentClass, postWindowGestureEvent));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(49), offsetof(struct 
_LibreOfficeKitDocumentClass, selectPart));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(50), offsetof(struct 
_LibreOfficeKitDocumentClass, moveSelectedParts));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(51), offsetof(struct 
_LibreOfficeKitDocumentClass, renderFontOrientation));
+]
+
 // Extending is fine, update this, and add new assert for the offsetof the
 // new method
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(51), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(52), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 33b699d78c1b..f9bb73a1d0a0 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -795,6 +795,12 @@ static int doc_getView(LibreOfficeKitDocument* pThis);
 static int doc_getViewsCount(LibreOfficeKitDocument* pThis);
 static bool doc_getViewIds(LibreOfficeKitDocument* pThis, int* pArray, size_t 
nSize);
 static void doc_setViewLanguage(LibreOfficeKitDocument* pThis, int nId, const 
char* language);
+static unsigned char* doc_renderFontOrientation(LibreOfficeKitDocument* pThis,
+  const char *pFontName,
+  const char *pChar,
+  int* pFontWidth,
+  int* pFontHeight,
+  int pOrientation);
 static unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis,
   const char *pFontName,
   const char *pChar,
@@ -811,7 +817,8 @@ static void doc_paintWindowDPI(LibreOfficeKitDocument* 
pThis, unsigned nLOKWindo
const int nWidth, const int nHeight,
const double fDPIScale);
 
-static void doc_postWindow(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int nAction, const char* pData);
+static void doc_postWindow(LibreOfficeKitDocument* pThis, unsigned
+ nLOKWindowId, int nAction, const char* pData);
 
 static char* doc_getPartInfo(LibreOfficeKitDocument* pThis, int nPart);
 
@@ -879,6 +886,7 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference 
getViewIds = doc_getViewIds;
 
 m_pDocumentClass->renderFont = doc_renderFont;
+m_pDocumentClass->renderFontOrientation = doc_renderFontOrientation;
 m_pDocumentClass->getPartHash = doc_getPartHash;
 
 m_pDocumentClass->paintWindow = doc_paintWindow;
@@ -4013,12 +4021,24 @@ static void doc_setViewLanguage(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*p
 SfxLokHelper::setViewLanguage(nId, OStringToOUString(language, 
RTL_TEXTENCODING_UTF8));
 }
 
-unsigned char* doc_renderFont(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* 
/*pThis*/,
+
+
+unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis,
   const char* pFontName,
   const char* pChar,
  

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4' - 4 commits - common/Session.cpp common/Session.hpp kit/ChildSession.hpp kit/Kit.cpp kit/Watermark.hpp loleaflet/src test

2019-10-14 Thread Mert Tumer (via logerrit)
 common/Session.cpp|   16 ++
 common/Session.hpp|   11 +
 kit/ChildSession.hpp  |2 
 kit/Kit.cpp   |  204 --
 kit/Watermark.hpp |  180 ++
 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   |   85 +++---
 test/TileQueueTests.cpp   |   58 -
 test/WhiteBoxTests.cpp|   21 +--
 test/httpwstest.cpp   |6 -
 wsd/ClientSession.cpp |   12 +-
 wsd/DocumentBroker.cpp|   13 +-
 wsd/DocumentBroker.hpp|2 
 wsd/TileCache.cpp |   25 ++--
 wsd/TileCache.hpp |8 -
 wsd/TileDesc.hpp  |   41 +-
 19 files changed, 398 insertions(+), 295 deletions(-)

New commits:
commit eb6064816b2f31e1bbc83f47162ae7ff632e53ca
Author: Mert Tumer 
AuthorDate: Mon Oct 14 00:45:59 2019 +0300
Commit: Mert Tumer 
CommitDate: Mon Oct 14 12:12:56 2019 +0300

Include nviewid to tests with tile messages

Change-Id: I8af803bd57cc0e3d0af510dcf6013c1658658678

diff --git a/test/TileCacheTests.cpp b/test/TileCacheTests.cpp
index b4ec0fa8d..7e2e6c9dd 100644
--- a/test/TileCacheTests.cpp
+++ b/test/TileCacheTests.cpp
@@ -185,6 +185,7 @@ void TileCacheTests::testSimple()
 // now, so it discards the cached data.
 TileCache tc("doc.ods", Poco::Timestamp());
 
+int nviewid=0;
 int part = 0;
 int width = 256;
 int height = 256;
@@ -192,7 +193,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);
@@ -209,7 +210,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);
@@ -225,13 +226,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());
@@ -242,7 +243,7 @@ void TileCacheTests::testSimpleCombine()
 std::cerr << "Connecting second client." << std::endl;
 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 receive a tile: message as expected", 
!tile2a.empty());
@@ -267,7 +268,7 @@ void TileCacheTests::testCancelTiles()
 std::shared_ptr socket = 
loadDocAndGetSocket("setclientpart.ods", _uri, testName);
 
 // Request a huge tile, and cancel immediately.
-sendTextFrame(socket, "tilecombine part=0 width=2560 height=2560 
tileposx=0 tileposy=0 tilewidth=38400 tileheight=38400");
+sendTextFrame(socket, "tilecombine nviewid=0 part=0 width=2560 
height=2560 tileposx=0 tileposy=0 tilewidth=38400 tileheight=38400");
 sendTextFrame(socket, "canceltiles");
 
 const auto res = getResponseString(socket, "tile:", testName, 1000);

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

2020-02-29 Thread Mert Tumer (via logerrit)
 sc/source/ui/view/gridwin.cxx |   21 -
 1 file changed, 20 insertions(+), 1 deletion(-)

New commits:
commit 91228affd8996d9690b0abfa9544a18701ee3ec3
Author: Mert Tumer 
AuthorDate: Thu Feb 20 18:33:04 2020 +0300
Commit: Andras Timar 
CommitDate: Sat Feb 29 19:38:03 2020 +0100

send hyperlinkclicked callback on calc mobile

for opening links ctrl+click must be pressed
but in mobile this cant be done
This patch allows it to send the callback and also
cell coordinates for hyperlink popup

Change-Id: I8c0fac167627ef449d9cf20a36a7a5a77978ae0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89121
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 
(cherry picked from commit 9bfa939f87f28cdaed2a24c3dc5f9a21004b19da)

Blind build fix for Android

After 9bfa939f87f28cdaed2a24c3dc5f9a21004b19da

Also, replace chained OStringBuffer::append() with operator+

Change-Id: I7012667b3c4173cc0193720e0197992e5942bc7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89164
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89693
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index ef07ea912115..5ca54bae2a93 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2206,7 +2206,26 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& 
rMEvt )
 // ScGlobal::OpenURL() only understands Calc A1 style syntax.
 // Convert it to Calc A1 before calling OpenURL().
 if (pDoc->GetAddressConvention() == 
formula::FormulaGrammar::CONV_OOO)
-ScGlobal::OpenURL(aUrl, aTarget);
+{
+// in mobile view there is no ctrl+click and for hyperlink 
popup
+// the cell coordinates must be sent along with click position 
for elegance
+if (comphelper::LibreOfficeKit::isActive() &&
+ 
comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+{
+ScTabViewShell* pViewShell = pViewData->GetViewShell();
+Point aPos = rMEvt.GetPosPixel();
+SCCOL nPosX;
+SCROW nPosY;
+pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, 
nPosX, nPosY );
+auto pForTabView = dynamic_cast(pViewShell);
+OString aCursor = 
pForTabView->GetViewData().describeCellCursorAt(nPosX, nPosY);
+double fPPTX = pForTabView->GetViewData().GetPPTX();
+int mouseX = aPos.X() / fPPTX;
+OString aMsg(aUrl.toUtf8() + " coordinates: " + aCursor + 
", " + OString::number(mouseX));
+
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, 
aMsg.getStr());
+} else
+ScGlobal::OpenURL(aUrl, aTarget);
+}
 else
 {
 ScAddress aTempAddr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-03-04 Thread Mert Tumer (via logerrit)
 sc/source/ui/view/gridwin.cxx |   10 +++---
 sw/source/uibase/docvw/edtwin.cxx |6 ++
 2 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 9323307d675b71c501534ee98872a2f00b465bc2
Author: Mert Tumer 
AuthorDate: Wed Feb 26 18:48:46 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Mar 4 21:19:58 2020 +0100

fix ToC links give unhelpful url popups

core expects ctrl+click for internal links too and
it should not expect it if it is tiled rendering

Change-Id: Id841f0e9729e46f00988ea0b4eb29bd65098a740
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89559
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit 3fe9dfca2d44d9e41ee329883f199359c673f382)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89919
Tested-by: Jenkins

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 5ca54bae2a93..d690b59fccc6 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2202,14 +2202,18 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& 
rMEvt )
 if ( GetEditUrl( rMEvt.GetPosPixel(), , ,  ) )
 {
 nMouseStatus = SC_GM_NONE;  // Ignore double-click
-
+bool isTiledRendering = comphelper::LibreOfficeKit::isActive();
 // ScGlobal::OpenURL() only understands Calc A1 style syntax.
 // Convert it to Calc A1 before calling OpenURL().
 if (pDoc->GetAddressConvention() == 
formula::FormulaGrammar::CONV_OOO)
 {
+if (aUrl.startsWith("#")) {
+ScGlobal::OpenURL(aUrl, aTarget, isTiledRendering);
+return;
+}
 // in mobile view there is no ctrl+click and for hyperlink 
popup
 // the cell coordinates must be sent along with click position 
for elegance
-if (comphelper::LibreOfficeKit::isActive() &&
+if (isTiledRendering &&
  
comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
 {
 ScTabViewShell* pViewShell = pViewData->GetViewShell();
@@ -2260,7 +2264,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt 
)
 aBuf.append('#');
 OUString 
aUrlCalcA1(aTempAddr.Format(ScRefFlags::ADDR_ABS_3D, pDoc, 
formula::FormulaGrammar::CONV_OOO));
 aBuf.append(aUrlCalcA1);
-ScGlobal::OpenURL(aBuf.makeStringAndClear(), aTarget);
+ScGlobal::OpenURL(aBuf.makeStringAndClear(), aTarget, 
isTiledRendering);
 }
 }
 
diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index a1e1a6f26db2..d60b347c6bb0 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -4650,6 +4650,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
 }
 else if ( IsAttrAtPos::InetAttr == 
aContentAtPos.eContentAtPos )
 {
+if (comphelper::LibreOfficeKit::isActive())
+{
+OUString val((*static_cast(aContentAtPos.aFnd.pAttr)).GetValue());
+if (val.startsWith("#"))
+bExecHyperlinks = true;
+}
 if ( bExecHyperlinks && 
aContentAtPos.aFnd.pAttr )
 rSh.ClickToINetAttr( *static_cast(aContentAtPos.aFnd.pAttr), nFilter );
 }
___
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.2' - sc/source sw/source

2020-03-02 Thread Mert Tumer (via logerrit)
 sc/source/ui/view/gridwin.cxx |   10 +++---
 sw/source/uibase/docvw/edtwin.cxx |6 ++
 2 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 3fe9dfca2d44d9e41ee329883f199359c673f382
Author: Mert Tumer 
AuthorDate: Wed Feb 26 18:48:46 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Mar 2 23:42:13 2020 +0100

fix ToC links give unhelpful url popups

core expects ctrl+click for internal links too and
it should not expect it if it is tiled rendering

Change-Id: Id841f0e9729e46f00988ea0b4eb29bd65098a740
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89559
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index a5ca02b06aec..2a751f77ac99 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2185,14 +2185,18 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& 
rMEvt )
 if ( GetEditUrl( rMEvt.GetPosPixel(), , ,  ) )
 {
 nMouseStatus = SC_GM_NONE;  // Ignore double-click
-
+bool isTiledRendering = comphelper::LibreOfficeKit::isActive();
 // ScGlobal::OpenURL() only understands Calc A1 style syntax.
 // Convert it to Calc A1 before calling OpenURL().
 if (pDoc->GetAddressConvention() == 
formula::FormulaGrammar::CONV_OOO)
 {
+if (aUrl.startsWith("#")) {
+ScGlobal::OpenURL(aUrl, aTarget, isTiledRendering);
+return;
+}
 // in mobile view there is no ctrl+click and for hyperlink 
popup
 // the cell coordinates must be sent along with click position 
for elegance
-if (comphelper::LibreOfficeKit::isActive() &&
+if (isTiledRendering &&
  
comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
 {
 ScTabViewShell* pViewShell = pViewData->GetViewShell();
@@ -2243,7 +2247,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt 
)
 aBuf.append('#');
 OUString 
aUrlCalcA1(aTempAddr.Format(ScRefFlags::ADDR_ABS_3D, pDoc, 
formula::FormulaGrammar::CONV_OOO));
 aBuf.append(aUrlCalcA1);
-ScGlobal::OpenURL(aBuf.makeStringAndClear(), aTarget);
+ScGlobal::OpenURL(aBuf.makeStringAndClear(), aTarget, 
isTiledRendering);
 }
 }
 
diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index d48a5a4199c0..06d98b1c6dac 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -4650,6 +4650,12 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
 }
 else if ( IsAttrAtPos::InetAttr == 
aContentAtPos.eContentAtPos )
 {
+if (comphelper::LibreOfficeKit::isActive())
+{
+OUString val((*static_cast(aContentAtPos.aFnd.pAttr)).GetValue());
+if (val.startsWith("#"))
+bExecHyperlinks = true;
+}
 if ( bExecHyperlinks && 
aContentAtPos.aFnd.pAttr )
 rSh.ClickToINetAttr( *static_cast(aContentAtPos.aFnd.pAttr), nFilter );
 }
___
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.2' - sc/source

2020-02-20 Thread Mert Tumer (via logerrit)
 sc/source/ui/view/gridwin.cxx |   26 +-
 1 file changed, 25 insertions(+), 1 deletion(-)

New commits:
commit 9bfa939f87f28cdaed2a24c3dc5f9a21004b19da
Author: Mert Tumer 
AuthorDate: Thu Feb 20 18:33:04 2020 +0300
Commit: Michael Meeks 
CommitDate: Thu Feb 20 16:47:37 2020 +0100

send hyperlinkclicked callback on calc mobile

for opening links ctrl+click must be pressed
but in mobile this cant be done
This patch allows it to send the callback and also
cell coordinates for hyperlink popup

Change-Id: I8c0fac167627ef449d9cf20a36a7a5a77978ae0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89121
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index d416607a379e..1232a8fa3626 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2189,7 +2189,31 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& 
rMEvt )
 // ScGlobal::OpenURL() only understands Calc A1 style syntax.
 // Convert it to Calc A1 before calling OpenURL().
 if (pDoc->GetAddressConvention() == 
formula::FormulaGrammar::CONV_OOO)
-ScGlobal::OpenURL(aUrl, aTarget);
+{
+// in mobile view there is no ctrl+click and for hyperlink 
popup
+// the cell coordinates must be sent along with click position 
for elegance
+if (comphelper::LibreOfficeKit::isActive() &&
+ 
comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()))
+{
+ScTabViewShell* pViewShell = pViewData->GetViewShell();
+Point aPos = rMEvt.GetPosPixel();
+SCCOL nPosX;
+SCROW nPosY;
+pViewData->GetPosFromPixel( aPos.X(), aPos.Y(), eWhich, 
nPosX, nPosY );
+auto pForTabView = dynamic_cast(pViewShell);
+OString aCursor = 
pForTabView->GetViewData().describeCellCursorAt(nPosX, nPosY);
+double fPPTX = pForTabView->GetViewData().GetPPTX();
+int mouseX = aPos.X() / fPPTX;
+OStringBuffer aBuf;
+aBuf.append(aUrl.toUtf8().getStr());
+aBuf.append(" coordinates: ");
+aBuf.append(aCursor);
+aBuf.append(", ");
+aBuf.append(mouseX);
+
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, 
aBuf.makeStringAndClear().getStr());
+} else
+ScGlobal::OpenURL(aUrl, aTarget);
+}
 else
 {
 ScAddress aTempAddr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-11 Thread Mert Tumer (via logerrit)
 sc/source/ui/view/viewfun5.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 1cec037fb349c8535cd1e09f00c0eb08e45fd957
Author: Mert Tumer 
AuthorDate: Mon Jan 20 22:08:40 2020 +0300
Commit: Andras Timar 
CommitDate: Tue Feb 11 16:35:58 2020 +0100

Fix csv dialog pops up on mobile when copy/paste

Change-Id: I9e4b154090ad9da0d10a368656f6f63fe335cecf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87132
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit f99605b6df506d51411d22d377eafd722685edbd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88397
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index a682420fb071..c0a108c1045d 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -336,7 +337,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId 
nFormatId,
 {
 // Do CSV dialog if more than one line. But not if invoked 
from Automation.
 sal_Int32 nDelim = pStrBuffer->indexOf('\n');
-if (!comphelper::Automation::AutomationInvokedZone::isActive()
+if 
(!comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()) && 
!comphelper::Automation::AutomationInvokedZone::isActive()
 && nDelim >= 0 && nDelim != pStrBuffer->getLength () - 1)
 {
 vcl::Window* pParent = GetActiveWin();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-11 Thread Mert Tumer (via logerrit)
 sc/source/ui/view/formatsh.cxx |   26 --
 1 file changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 62e077c3e58b965f0587995667d45a0a26f3672e
Author: Mert Tumer 
AuthorDate: Mon Jan 13 13:17:09 2020 +0300
Commit: Andras Timar 
CommitDate: Tue Feb 11 22:29:26 2020 +0100

Fix FontColor does not change selected cells on calc

Change-Id: Iae2f72bff4fd6986fc8cc07ba09996b1af4eb140
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86670
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 
(cherry picked from commit 23e8e4521366aaf5831a3c1feaffdc41658ce7e7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88398
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 379761bfcaf0..3ed5a2a48208 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1784,10 +1784,32 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
 break;
 case SID_ATTR_CHAR_COLOR:
 case SID_SCATTR_PROTECTION :
-pTabViewShell->ApplyAttr( pNewAttrs->Get( 
pNewAttrs->GetPool()->GetWhich( nSlot) ), false);
+{
+const SfxPoolItem* pColorStringItem = nullptr;
+if ( SfxItemState::SET == pNewAttrs->GetItemState( 
SID_ATTR_COLOR_STR, false,  ) )
+{
+Color aColor;
+OUString sColor = static_cast(pColorStringItem)->GetValue();
+if ( sColor == "transparent" )
+aColor = COL_TRANSPARENT;
+else
+aColor = Color( sColor.toInt32( 16 ) );
+
+SvxColorItem 
aColorItem(pTabViewShell->GetSelectionPattern()->
+GetItem( ATTR_FONT_COLOR ) );
+aColorItem.SetValue(aColor);
+pTabViewShell->ApplyAttr(aColorItem, false);
+}
+else
+{
+pTabViewShell->ApplyAttr( pNewAttrs->Get( 
pNewAttrs->GetPool()->GetWhich( nSlot) ), false);
+}
+
 rBindings.Invalidate( nSlot );
 rBindings.Update( nSlot );
-break;
+}
+
+break;
 
 case SID_ATTR_CHAR_FONT:
 case SID_ATTR_CHAR_FONTHEIGHT:
___
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.2' - sc/source

2020-01-13 Thread Mert Tumer (via logerrit)
 sc/source/ui/view/formatsh.cxx |   26 --
 1 file changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 23e8e4521366aaf5831a3c1feaffdc41658ce7e7
Author: Mert Tumer 
AuthorDate: Mon Jan 13 13:17:09 2020 +0300
Commit: Michael Meeks 
CommitDate: Mon Jan 13 18:45:57 2020 +0100

Fix FontColor does not change selected cells on calc

Change-Id: Iae2f72bff4fd6986fc8cc07ba09996b1af4eb140
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86670
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 2d49fe1bb9c4..f6808252314a 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -1784,10 +1784,32 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
 break;
 case SID_ATTR_CHAR_COLOR:
 case SID_SCATTR_PROTECTION :
-pTabViewShell->ApplyAttr( pNewAttrs->Get( 
pNewAttrs->GetPool()->GetWhich( nSlot) ), false);
+{
+const SfxPoolItem* pColorStringItem = nullptr;
+if ( SfxItemState::SET == pNewAttrs->GetItemState( 
SID_ATTR_COLOR_STR, false,  ) )
+{
+Color aColor;
+OUString sColor = static_cast(pColorStringItem)->GetValue();
+if ( sColor == "transparent" )
+aColor = Color( COL_TRANSPARENT );
+else
+aColor = Color( sColor.toInt32( 16 ) );
+
+SvxColorItem 
aColorItem(pTabViewShell->GetSelectionPattern()->
+GetItem( ATTR_FONT_COLOR ) );
+aColorItem.SetValue(aColor);
+pTabViewShell->ApplyAttr(aColorItem, false);
+}
+else
+{
+pTabViewShell->ApplyAttr( pNewAttrs->Get( 
pNewAttrs->GetPool()->GetWhich( nSlot) ), false);
+}
+
 rBindings.Invalidate( nSlot );
 rBindings.Update( nSlot );
-break;
+}
+
+break;
 
 case SID_ATTR_CHAR_FONT:
 case SID_ATTR_CHAR_FONTHEIGHT:
___
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.2' - sc/source

2020-01-21 Thread Mert Tumer (via logerrit)
 sc/source/ui/view/viewfun5.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f99605b6df506d51411d22d377eafd722685edbd
Author: Mert Tumer 
AuthorDate: Mon Jan 20 22:08:40 2020 +0300
Commit: Michael Meeks 
CommitDate: Tue Jan 21 16:36:38 2020 +0100

Fix csv dialog pops up on mobile when copy/paste

Change-Id: I9e4b154090ad9da0d10a368656f6f63fe335cecf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87132
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 3c293013f0af..de6cfd7e137a 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -337,7 +338,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId 
nFormatId,
 {
 // Do CSV dialog if more than one line. But not if invoked 
from Automation.
 sal_Int32 nDelim = pStrBuffer->indexOf('\n');
-if (!comphelper::Automation::AutomationInvokedZone::isActive()
+if 
(!comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()) && 
!comphelper::Automation::AutomationInvokedZone::isActive()
 && nDelim >= 0 && nDelim != pStrBuffer->getLength () - 1)
 {
 vcl::Window* pParent = GetActiveWin();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-14 Thread Mert Tumer (via logerrit)
 vcl/source/uitest/uiobject.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 7a5b499dd25d7d1e077974053b52b72ee7f44ebc
Author: Mert Tumer 
AuthorDate: Fri Apr 3 15:34:37 2020 +0300
Commit: Andras Timar 
CommitDate: Tue Apr 14 23:28:49 2020 +0200

mobile: cannot change linestyle on impress

Change-Id: I6e63c951f7a7d4fc70eed424cc2f7da60dbad9b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91632
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit e4f28d0642e4663d558a55e99ec1cc2ea9ad27ed)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92172
Tested-by: Jenkins

diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 206b6a32e3b3..737979b29a82 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -22,6 +22,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -995,7 +996,11 @@ ListBoxUIObject::~ListBoxUIObject()
 void ListBoxUIObject::execute(const OUString& rAction,
 const StringMap& rParameters)
 {
-if (!mxListBox->IsEnabled() || !mxListBox->IsReallyVisible())
+if (!mxListBox->IsEnabled())
+return;
+
+bool isTiledRendering = comphelper::LibreOfficeKit::isActive();
+if (!isTiledRendering && !mxListBox->IsReallyVisible())
 return;
 
 if (rAction == "SELECT")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/source sfx2/source

2020-04-15 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx  |1 +
 sfx2/source/control/unoctitm.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit df619066c1c20d757cb6d2a5b29a566787b9173f
Author: Mert Tumer 
AuthorDate: Tue Apr 14 18:19:09 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Apr 15 23:20:06 2020 +0200

send state changes of .uno:NumberFormatDecimal command to LOK

Change-Id: I7872c0a0c123865c77d3aa8937775116368f1ffa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92203
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit 2f6cbb67099edde535a81e7b0a32c1418805d6d6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92290
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 8f42bd2883a4..b8228bfe8639 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2647,6 +2647,7 @@ static void doc_iniUnoCommands ()
 OUString(".uno:ToggleMergeCells"),
 OUString(".uno:NumberFormatCurrency"),
 OUString(".uno:NumberFormatPercent"),
+OUString(".uno:NumberFormatDecimal"),
 OUString(".uno:NumberFormatDate"),
 OUString(".uno:FrameLineColor"),
 OUString(".uno:SortAscending"),
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index d6e6c8673e38..9d4bc6612be0 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1153,6 +1153,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
  aEvent.FeatureURL.Path == "WrapText" ||
  aEvent.FeatureURL.Path == "NumberFormatCurrency" ||
  aEvent.FeatureURL.Path == "NumberFormatPercent" ||
+ aEvent.FeatureURL.Path == "NumberFormatDecimal" ||
  aEvent.FeatureURL.Path == "NumberFormatDate")
 {
 bool aBool;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-15 Thread Mert Tumer (via logerrit)
 sc/source/ui/drawfunc/fudraw.cxx |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 2e6753fc764c9c5f36c623e4bdf0f3dfc7229391
Author: Mert Tumer 
AuthorDate: Thu Apr 9 19:36:53 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Apr 15 20:05:05 2020 +0200

mobile: fix double tap on chart doesn't get into editmode

Sometimes double tapping on a chart when it is not selected
in the beginning, starts the input mode instead of chart
editing.

Change-Id: Iee2a01c1ac909ac4060e91cdacfa9161dc4f1c3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91992
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit d09a35bc10251ef0b66e06c6ffbb2d16332b318b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92291
Tested-by: Jenkins

diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index bd6ac3c96c09..eb05faccc730 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -34,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // base class for draw module specific functions
 FuDraw::FuDraw(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
@@ -244,6 +246,15 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
 if( !pView->IsTextEdit() && 1 == rMarkList.GetMarkCount() )
 {
 SdrObject* pObj = rMarkList.GetMark( 0 
)->GetMarkedSdrObj();
+bool isMobilePhone = 
comphelper::LibreOfficeKit::isActive() && 
comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView());
+// Double tapping on charts on phone may result in 
activating the edit mode which is not wanted.
+// It happens due to the delay of selection message of the 
object from kit to javascript
+// in that case F2 is sent instead of double click
+if (isMobilePhone && ScDocument::IsChart(pObj))
+{
+rViewShell.ActivateObject( static_cast< SdrOle2Obj* >( 
pObj ), 0 );
+break;
+}
 if ( lcl_KeyEditMode( pObj, rViewShell, nullptr ) )
// start text edit for suitable object
 bReturn = true;
 }
___
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.2' - sc/source

2020-04-15 Thread Mert Tumer (via logerrit)
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 3d407fff18e6c612fe4f63559a600ddcce7c3e94
Author: Mert Tumer 
AuthorDate: Tue Apr 14 18:15:59 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Apr 15 11:44:03 2020 +0200

Added unique id for number format combobox

This will allow us to control it for the mobilewizard
easily rather than using the id of 'category' which is
not unique.

Change-Id: I61b612d5355584597a16942b7151a82376033a45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92202
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx 
b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index 28eb0ab05ffc..ec4da5d0823f 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -91,6 +91,7 @@ void NumberFormatPropertyPanel::Initialize()
 mpLbCategory->SetSelectHdl ( LINK(this, NumberFormatPropertyPanel, 
NumFormatSelectHdl) );
 mpLbCategory->SelectEntryPos(0);
 mpLbCategory->SetDropDownLineCount(mpLbCategory->GetEntryCount());
+mpLbCategory->set_id("numberformatcombobox");
 
 Link aLink = LINK(this, NumberFormatPropertyPanel, 
NumFormatValueHdl);
 
___
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.2' - desktop/source sfx2/source

2020-04-15 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx  |1 +
 sfx2/source/control/unoctitm.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit 2f6cbb67099edde535a81e7b0a32c1418805d6d6
Author: Mert Tumer 
AuthorDate: Tue Apr 14 18:19:09 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Apr 15 11:44:20 2020 +0200

send state changes of .uno:NumberFormatDecimal command to LOK

Change-Id: I7872c0a0c123865c77d3aa8937775116368f1ffa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92203
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 612b6a51ceac..146f65889a1a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2648,6 +2648,7 @@ static void doc_iniUnoCommands ()
 OUString(".uno:ToggleMergeCells"),
 OUString(".uno:NumberFormatCurrency"),
 OUString(".uno:NumberFormatPercent"),
+OUString(".uno:NumberFormatDecimal"),
 OUString(".uno:NumberFormatDate"),
 OUString(".uno:FrameLineColor"),
 OUString(".uno:SortAscending"),
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 3f84d441562a..cedf079234ff 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1152,6 +1152,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
  aEvent.FeatureURL.Path == "WrapText" ||
  aEvent.FeatureURL.Path == "NumberFormatCurrency" ||
  aEvent.FeatureURL.Path == "NumberFormatPercent" ||
+ aEvent.FeatureURL.Path == "NumberFormatDecimal" ||
  aEvent.FeatureURL.Path == "NumberFormatDate")
 {
 bool aBool;
___
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.2' - sd/source

2020-04-07 Thread Mert Tumer (via logerrit)
 sd/source/ui/view/drviews5.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 3bd5dcc02b84da14286af4492f28bc776d765146
Author: Mert Tumer 
AuthorDate: Tue Apr 7 15:36:34 2020 +0300
Commit: Andras Timar 
CommitDate: Tue Apr 7 19:27:49 2020 +0200

fix ODP roundtripped in online opens with huge zoom in desktop

Change-Id: Ia3192cfeaab8ac643bba7b499240882f403b6388
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91822
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx
index 2266c7981d06..dea2c58d795f 100644
--- a/sd/source/ui/view/drviews5.cxx
+++ b/sd/source/ui/view/drviews5.cxx
@@ -61,6 +61,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace sd {
 
@@ -343,6 +344,12 @@ void DrawViewShell::WriteFrameViewData()
 
 Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel();
 ::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic( 
::tools::Rectangle( Point(0,0), aVisSizePixel) );
+if (comphelper::LibreOfficeKit::isActive())
+{
+// aVisArea is nonsensical in the LOK case, use the slide size
+aVisArea = ::tools::Rectangle(Point(), getCurrentPage()->GetSize());
+}
+
 mpFrameView->SetVisArea(aVisArea);
 
 if( mePageKind == PageKind::Handout )
___
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.2' - vcl/source

2020-04-06 Thread Mert Tumer (via logerrit)
 vcl/source/uitest/uiobject.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit e4f28d0642e4663d558a55e99ec1cc2ea9ad27ed
Author: Mert Tumer 
AuthorDate: Fri Apr 3 15:34:37 2020 +0300
Commit: Andras Timar 
CommitDate: Mon Apr 6 21:43:55 2020 +0200

mobile: cannot change linestyle on impress

Change-Id: I6e63c951f7a7d4fc70eed424cc2f7da60dbad9b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91632
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 899fbb97d75c..af3f486569d8 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -21,6 +21,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -936,7 +937,11 @@ ListBoxUIObject::~ListBoxUIObject()
 void ListBoxUIObject::execute(const OUString& rAction,
 const StringMap& rParameters)
 {
-if (!mxListBox->IsEnabled() || !mxListBox->IsReallyVisible())
+if (!mxListBox->IsEnabled())
+return;
+
+bool isTiledRendering = comphelper::LibreOfficeKit::isActive();
+if (!isTiledRendering && !mxListBox->IsReallyVisible())
 return;
 
 if (rAction == "SELECT")
___
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.2' - sc/source

2020-04-15 Thread Mert Tumer (via logerrit)
 sc/source/ui/drawfunc/fudraw.cxx |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit d09a35bc10251ef0b66e06c6ffbb2d16332b318b
Author: Mert Tumer 
AuthorDate: Thu Apr 9 19:36:53 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Apr 15 15:37:42 2020 +0200

mobile: fix double tap on chart doesn't get into editmode

Sometimes double tapping on a chart when it is not selected
in the beginning, starts the input mode instead of chart
editing.

Change-Id: Iee2a01c1ac909ac4060e91cdacfa9161dc4f1c3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91992
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index 65a3f0b843da..c60890c23c15 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -38,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // base class for draw module specific functions
 FuDraw::FuDraw(ScTabViewShell& rViewSh, vcl::Window* pWin, ScDrawView* pViewP,
@@ -248,6 +250,15 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
 if( !pView->IsTextEdit() && 1 == rMarkList.GetMarkCount() )
 {
 SdrObject* pObj = rMarkList.GetMark( 0 
)->GetMarkedSdrObj();
+bool isMobilePhone = 
comphelper::LibreOfficeKit::isActive() && 
comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView());
+// Double tapping on charts on phone may result in 
activating the edit mode which is not wanted.
+// It happens due to the delay of selection message of the 
object from kit to javascript
+// in that case F2 is sent instead of double click
+if (isMobilePhone && ScDocument::IsChart(pObj))
+{
+rViewShell.ActivateObject( static_cast< SdrOle2Obj* >( 
pObj ), 0 );
+break;
+}
 if ( lcl_KeyEditMode( pObj, rViewShell, nullptr ) )
// start text edit for suitable object
 bReturn = true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-17 Thread Mert Tumer (via logerrit)
 sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx |2 -
 sc/uiconfig/scalc/ui/sidebarnumberformat.ui|   28 ++---
 2 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 666bbf736381396647db69f97c753ffb8bddf693
Author: Mert Tumer 
AuthorDate: Tue Apr 14 18:15:59 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Apr 17 11:13:05 2020 +0200

Added unique id for number format combobox

This will allow us to control it for the mobilewizard
easily rather than using the id of 'category' which is
not unique.

Change-Id: I61b612d5355584597a16942b7151a82376033a45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92202
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92309
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx 
b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
index ec9e665287b2..36dd8f129347 100644
--- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
+++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx
@@ -35,7 +35,7 @@ NumberFormatPropertyPanel::NumberFormatPropertyPanel(
 const css::uno::Reference& rxFrame,
 SfxBindings* pBindings)
 : PanelLayout(pParent,"NumberFormatPropertyPanel", 
"modules/scalc/ui/sidebarnumberformat.ui", rxFrame, true)
-, mxLbCategory(m_xBuilder->weld_combo_box("category"))
+, mxLbCategory(m_xBuilder->weld_combo_box("numberformatcombobox"))
 , mxTBCategory(m_xBuilder->weld_toolbar("numberformat"))
 , mxCatagoryDispatch(new ToolbarUnoDispatcher(*mxTBCategory, *m_xBuilder, 
rxFrame))
 , mxFtDecimals(m_xBuilder->weld_label("decimalplaceslabel"))
diff --git a/sc/uiconfig/scalc/ui/sidebarnumberformat.ui 
b/sc/uiconfig/scalc/ui/sidebarnumberformat.ui
index 09704d6ef5d0..60a6185aac8f 100644
--- a/sc/uiconfig/scalc/ui/sidebarnumberformat.ui
+++ b/sc/uiconfig/scalc/ui/sidebarnumberformat.ui
@@ -67,27 +67,27 @@
   
 
 
-  
+  
 True
 False
-Select a category of 
contents.
+Select a 
category of contents.
 center
 True
 
-  General
-  Number
-  Percent
-  Currency
-  Date 
-  Time
-  Scientific
-  Fraction
-  Boolean Value
-  Text
+  General
+  Number
+  Percent
+  Currency
+  Date 
+  Time
+  Scientific
+  Fraction
+  Boolean Value
+  Text
 
 
-  
-Category
+  
+Category
   
 
   
___
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.2' - svx/uiconfig

2020-03-31 Thread Mert Tumer (via logerrit)
 svx/uiconfig/ui/sidebartextpanel.ui |   29 +++--
 1 file changed, 27 insertions(+), 2 deletions(-)

New commits:
commit 68d7fff82e5f72e37ca9a4e5e18367c172cdecd3
Author: Mert Tumer 
AuthorDate: Tue Mar 31 15:04:38 2020 +0300
Commit: Andras Timar 
CommitDate: Tue Mar 31 16:30:34 2020 +0200

added Clear Direct Formatting button to sidebar

Change-Id: I8d723f50cdc9bb768c082b7b5d9eafe1a6d7f9f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91419
Reviewed-by: Andras Timar 
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/uiconfig/ui/sidebartextpanel.ui 
b/svx/uiconfig/ui/sidebartextpanel.ui
index c2c995490525..64b19a115db2 100644
--- a/svx/uiconfig/ui/sidebartextpanel.ui
+++ b/svx/uiconfig/ui/sidebartextpanel.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -273,7 +273,7 @@
   
 True
 True
- 
+
   
 True
 False
@@ -293,6 +293,31 @@
 2
   
 
+
+  
+True
+False
+False
+
+  
+True
+False
+True
+.uno:ResetAttributes
+True
+  
+  
+False
+True
+  
+
+  
+  
+False
+True
+3
+  
+
 
   
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-03-31 Thread Mert Tumer (via logerrit)
 svx/uiconfig/ui/sidebartextpanel.ui |   29 +++--
 1 file changed, 27 insertions(+), 2 deletions(-)

New commits:
commit f905411741170e524c4a8741a600142585a4d8d8
Author: Mert Tumer 
AuthorDate: Tue Mar 31 15:04:38 2020 +0300
Commit: Andras Timar 
CommitDate: Tue Mar 31 22:04:21 2020 +0200

added Clear Direct Formatting button to sidebar

Change-Id: I8d723f50cdc9bb768c082b7b5d9eafe1a6d7f9f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91398
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/svx/uiconfig/ui/sidebartextpanel.ui 
b/svx/uiconfig/ui/sidebartextpanel.ui
index 65443d789f31..af220dcc0b25 100644
--- a/svx/uiconfig/ui/sidebartextpanel.ui
+++ b/svx/uiconfig/ui/sidebartextpanel.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -273,7 +273,7 @@
   
 True
 True
- 
+
   
 True
 False
@@ -293,6 +293,31 @@
 2
   
 
+
+  
+True
+False
+False
+
+  
+True
+False
+True
+.uno:ResetAttributes
+True
+  
+  
+False
+True
+  
+
+  
+  
+False
+True
+3
+  
+
 
   
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-04-14 Thread Mert Tumer (via logerrit)
 sd/source/ui/func/fusel.cxx |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 895c47abc7fbd56f04b9f5d295885ea60403d62c
Author: Mert Tumer 
AuthorDate: Wed Mar 18 13:17:32 2020 +0300
Commit: Andras Timar 
CommitDate: Tue Apr 14 19:40:23 2020 +0200

mobile: fix hyperlinks are not clickable on impress

Change-Id: I77a0ef263814359607d9c1d863f93c55f3493dbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90687
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92211
Tested-by: Jenkins

diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index b425727b67af..18616775ac9e 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -266,6 +266,14 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
  {
 mpWindow->ReleaseMouse();
 
+// If tiled rendering, let client handles URL execution and 
early returns.
+if (comphelper::LibreOfficeKit::isActive())
+{
+SfxViewShell& rSfxViewShell = 
mpViewShell->GetViewShellBase();
+
rSfxViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, 
aVEvt.pURLField->GetURL().toUtf8().getStr());
+return true;
+}
+
 if (!lcl_followHyperlinkAllowed(rMEvt))
 return true;
 
@@ -275,14 +283,6 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
 SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
 mpWindow->ReleaseMouse();
 
-// If tiled rendering, let client handles URL execution and 
early returns.
-if (comphelper::LibreOfficeKit::isActive())
-{
-SfxViewShell& rSfxViewShell = 
mpViewShell->GetViewShellBase();
-
rSfxViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, 
aVEvt.pURLField->GetURL().toUtf8().getStr());
-return true;
-}
-
 if (rMEvt.IsMod1())
 {
 // Open in new frame
___
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' - 5 commits - android/source sal/osl sc/inc sc/source svx/source

2020-05-13 Thread Mert Tumer (via logerrit)
 android/source/build.gradle  |7 +++
 sal/osl/unx/file.cxx |   24 +---
 sc/inc/document.hxx  |2 +-
 sc/inc/table.hxx |2 +-
 sc/source/core/data/document.cxx |4 ++--
 sc/source/core/data/table2.cxx   |   31 +++
 sc/source/ui/view/viewdata.cxx   |   29 +++--
 sc/source/ui/view/viewfun5.cxx   |3 ++-
 svx/source/unodraw/unoprov.cxx   |   22 +-
 9 files changed, 85 insertions(+), 39 deletions(-)

New commits:
commit e2bdf124eca37cdcac62224269cdc6792126638c
Author: Mert Tumer 
AuthorDate: Mon Jan 20 22:08:40 2020 +0300
Commit: Michael Meeks 
CommitDate: Wed May 13 20:12:30 2020 +0100

Fix csv dialog pops up on mobile when copy/paste

Change-Id: I9e4b154090ad9da0d10a368656f6f63fe335cecf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87132
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit f99605b6df506d51411d22d377eafd722685edbd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88397
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 0e61a2a8a072..c80d6b059735 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -336,7 +337,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId 
nFormatId,
 {
 // Do CSV dialog if more than one line. But not if invoked 
from Automation.
 sal_Int32 nDelim = pStrBuffer->indexOf('\n');
-if (!comphelper::Automation::AutomationInvokedZone::isActive()
+if 
(!comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()) && 
!comphelper::Automation::AutomationInvokedZone::isActive()
 && nDelim >= 0 && nDelim != pStrBuffer->getLength () - 1)
 {
 vcl::Window* pParent = GetActiveWin();
commit 935c46c4e65b30486daac27c5bfd4c0532c8fcb8
Author: Noel Grandin 
AuthorDate: Mon Nov 18 15:35:18 2019 +0200
Commit: Michael Meeks 
CommitDate: Wed May 13 20:07:04 2020 +0100

crashtesting fdo78617-2.ods

as a consequence of
commit feec8e3c34e08b621098a17f1011dccd0b4f7f4c
Date:   Tue Nov 12 16:00:55 2019 +0200
reduce iteration in ScViewData::GetScrPos

Change-Id: Iec539c33bd80b9ad2d2a3698d443c5cec81f8f85
Reviewed-on: https://gerrit.libreoffice.org/83093
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index e4ca4479bd3b..b5939dbbc83e 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -3282,17 +3282,20 @@ sal_uLong ScTable::GetScaledRowHeight( SCROW nStartRow, 
SCROW nEndRow, double fS
 
 // round-down a single height value, multiply resulting 
(pixel) values
 const sal_uLong nOneHeight = static_cast( 
aData.mnValue * fScale );
-SCROW nRowsInSegment = nSegmentEnd + 1 - nRow;
-if (pnMaxHeight)
+// sometimes scaling results in zero height
+if (nOneHeight)
 {
-nRowsInSegment = std::min(nRowsInSegment, 
static_cast(*pnMaxHeight / nOneHeight + 1));
-nHeight += nOneHeight * nRowsInSegment;
-if (nHeight > *pnMaxHeight)
-return nHeight;
+SCROW nRowsInSegment = nSegmentEnd + 1 - nRow;
+if (pnMaxHeight)
+{
+nRowsInSegment = std::min(nRowsInSegment, 
static_cast(*pnMaxHeight / nOneHeight + 1));
+nHeight += nOneHeight * nRowsInSegment;
+if (nHeight > *pnMaxHeight)
+return nHeight;
+}
+else
+nHeight += nOneHeight * nRowsInSegment;
 }
-else
-nHeight += nOneHeight * nRowsInSegment;
-
 
 nRow = nSegmentEnd + 1;
 }
commit 50cf5641eda91337015ae0ec34fd24ce22e9583b
Author: Noel Grandin 
AuthorDate: Tue Nov 12 16:00:55 2019 +0200
Commit: Michael Meeks 
CommitDate: Wed May 13 20:06:32 2020 +0100

reduce iteration in ScViewData::GetScrPos

we already have a ScTable::GetRowHeightScaled method that uses spans, so use
that.

Change-Id: I126292b4a8b37ebf2d4f737dcbfdadc31226531e
Reviewed-on: https://gerrit.libreoffice.org/82520
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - desktop/source include/sfx2 sfx2/source

2020-05-06 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx   |   17 +++--
 include/sfx2/sidebar/SidebarDockingWindow.hxx |1 +
 sfx2/source/sidebar/ResourceManager.cxx   |9 +
 3 files changed, 25 insertions(+), 2 deletions(-)

New commits:
commit 7f578ebe3cd824c05492c8fce9a1ed60bb5cfdfa
Author: Mert Tumer 
AuthorDate: Wed Apr 29 16:29:57 2020 +0300
Commit: Andras Timar 
CommitDate: Thu May 7 07:06:26 2020 +0200

added ability to switch sidebar deck on init.cxx for mobilewizard

Change-Id: I532398bc41e1c984c24b1d39e4844315a0a69847
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93162
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7c3a86ca5878..e6c2d6630a58 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -113,6 +113,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1120,7 +1121,7 @@ rtl::Reference 
forceSetClipboardForCurrentView(LibreOfficeKitDocum
 
 #endif
 
-void setupSidebar(bool bShow)
+void setupSidebar(bool bShow, OUString sidebarDeckId = "")
 {
 SfxViewShell* pViewShell = SfxViewShell::Current();
 SfxViewFrame* pViewFrame = pViewShell ? pViewShell->GetViewFrame() : 
nullptr;
@@ -1142,6 +1143,11 @@ void setupSidebar(bool bShow)
 auto pDockingWin = dynamic_cast(pChild->GetWindow());
 if (!pDockingWin)
 return;
+
+if (!sidebarDeckId.isEmpty())
+{
+pDockingWin->GetSidebarController()->SwitchToDeck(sidebarDeckId);
+}
 pDockingWin->SyncUpdate();
 }
 else
@@ -3625,6 +3631,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 SfxObjectShell* pDocSh = SfxObjectShell::Current();
 OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8);
 LibLODocument_Impl* pDocument = static_cast(pThis);
+OUString sidebarDeckId = "PropertyDeck";
 
 std::vector 
aPropertyValuesVector(jsonToPropertyValuesVector(pArguments));
 
@@ -3756,9 +3763,15 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 return;
 }
 }
+else if (gImpl && aCommand == ".uno:LOKSidebarWriterPage")
+{
+sidebarDeckId = "WriterPageDeck";
+setupSidebar(true, sidebarDeckId);
+return;
+}
 else if (gImpl && aCommand == ".uno:SidebarShow")
 {
-setupSidebar(true);
+setupSidebar(true, sidebarDeckId);
 return;
 }
 else if (gImpl && aCommand == ".uno:SidebarHide")
diff --git a/include/sfx2/sidebar/SidebarDockingWindow.hxx 
b/include/sfx2/sidebar/SidebarDockingWindow.hxx
index 049cf241aacd..64287cfe74a5 100644
--- a/include/sfx2/sidebar/SidebarDockingWindow.hxx
+++ b/include/sfx2/sidebar/SidebarDockingWindow.hxx
@@ -47,6 +47,7 @@ public:
 
 void SetReadyToDrag( bool bStartDrag ) { mbIsReadyToDrag = bStartDrag; }
 bool IsReadyToDrag() const { return mbIsReadyToDrag; }
+auto& GetSidebarController() const { return mpSidebarController; }
 
 /// Force generation of all panels by completion.
 void SyncUpdate();
diff --git a/sfx2/source/sidebar/ResourceManager.cxx 
b/sfx2/source/sidebar/ResourceManager.cxx
index f563943e150d..0642109b1dd2 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -430,6 +430,15 @@ void ResourceManager::ReadPanelList()
 if (!aPanelNode.isValid())
 continue;
 
+if (comphelper::LibreOfficeKit::isActive())
+{
+// Hide these panels in LOK as they aren't fully functional.
+OUString aPanelId = getString(aPanelNode, "Id");
+if (aPanelId == "PageStylesPanel" || aPanelId == "PageHeaderPanel"
+|| aPanelId == "PageFooterPanel")
+continue;
+}
+
 maPanels.push_back(std::make_shared());
 PanelDescriptor& rPanelDescriptor(*maPanels.back());
 
___
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.2' - desktop/source include/sfx2

2020-05-10 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx|   20 
 include/sfx2/sidebar/SidebarController.hxx |1 +
 2 files changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 3ea23d3b13e08f2ac9d83446acc588bbf1d4ad74
Author: Mert Tumer 
AuthorDate: Fri May 8 17:23:12 2020 +0300
Commit: Andras Timar 
CommitDate: Sun May 10 16:38:58 2020 +0200

mobile: fix calc chart wizard properties is not shown

Change-Id: I2fd98ddbdb529c3f224299c6824b4743797925be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93747
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 40c19ca439fd..203ece44ef51 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1147,10 +1147,24 @@ void setupSidebar(bool bShow, OUString sidebarDeckId = 
"")
 if (!pDockingWin)
 return;
 
+OUString currentDeckId = 
pDockingWin->GetSidebarController()->GetCurrentDeckId();
+
+// check if it is the chart deck id, if it is, don't switch to default 
deck
+bool switchToDefault = true;
+
+if (currentDeckId == "ChartDeck")
+switchToDefault = false;
+
 if (!sidebarDeckId.isEmpty())
 {
 pDockingWin->GetSidebarController()->SwitchToDeck(sidebarDeckId);
 }
+else
+{
+if (switchToDefault)
+pDockingWin->GetSidebarController()->SwitchToDefaultDeck();
+}
+
 pDockingWin->SyncUpdate();
 }
 else
@@ -3661,7 +3675,6 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 SfxObjectShell* pDocSh = SfxObjectShell::Current();
 OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8);
 LibLODocument_Impl* pDocument = static_cast(pThis);
-OUString sidebarDeckId = "PropertyDeck";
 
 std::vector 
aPropertyValuesVector(jsonToPropertyValuesVector(pArguments));
 
@@ -3795,13 +3808,12 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 }
 else if (gImpl && aCommand == ".uno:LOKSidebarWriterPage")
 {
-sidebarDeckId = "WriterPageDeck";
-setupSidebar(true, sidebarDeckId);
+setupSidebar(true, "WriterPageDeck");
 return;
 }
 else if (gImpl && aCommand == ".uno:SidebarShow")
 {
-setupSidebar(true, sidebarDeckId);
+setupSidebar(true);
 return;
 }
 else if (gImpl && aCommand == ".uno:SidebarHide")
diff --git a/include/sfx2/sidebar/SidebarController.hxx 
b/include/sfx2/sidebar/SidebarController.hxx
index e65bbae42537..92a063c9f403 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -140,6 +140,7 @@ public:
 FocusManager& GetFocusManager() { return maFocusManager;}
 
 ResourceManager* GetResourceManager() { return mpResourceManager.get();}
+auto& GetCurrentDeckId() const { return msCurrentDeckId; }
 
// std::unique_ptr GetResourceManager() { return 
mpResourceManager;}
 
___
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.2' - sd/source

2020-03-18 Thread Mert Tumer (via logerrit)
 sd/source/ui/func/fusel.cxx |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 18ac91043d2e90b89ac56e3230d687fffeeb25a9
Author: Mert Tumer 
AuthorDate: Wed Mar 18 13:17:32 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Mar 18 11:59:54 2020 +0100

mobile: fix hyperlinks are not clickable on impress

Change-Id: I77a0ef263814359607d9c1d863f93c55f3493dbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90687
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 81988e00a351..b5e49ef8112f 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -269,6 +269,14 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
  {
 mpWindow->ReleaseMouse();
 
+// If tiled rendering, let client handles URL execution and 
early returns.
+if (comphelper::LibreOfficeKit::isActive())
+{
+SfxViewShell& rSfxViewShell = 
mpViewShell->GetViewShellBase();
+
rSfxViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, 
aVEvt.pURLField->GetURL().toUtf8().getStr());
+return true;
+}
+
 SvtSecurityOptions aSecOpt;
 if (!rMEvt.IsMod1() && 
aSecOpt.IsOptionSet(SvtSecurityOptions::EOption::CtrlClickHyperlink))
 return true;
@@ -281,14 +289,6 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
 SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
 mpWindow->ReleaseMouse();
 
-// If tiled rendering, let client handles URL execution and 
early returns.
-if (comphelper::LibreOfficeKit::isActive())
-{
-SfxViewShell& rSfxViewShell = 
mpViewShell->GetViewShellBase();
-
rSfxViewShell.libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, 
aVEvt.pURLField->GetURL().toUtf8().getStr());
-return true;
-}
-
 if (rMEvt.IsMod1())
 {
 // Open in new frame
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa sc/source sd/qa sd/source svx/sdi sw/qa sw/source

2020-10-09 Thread Mert Tumer (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   25 +
 sc/source/ui/app/scmod.cxx   |4 +++-
 sd/qa/unit/uiimpress.cxx |   18 ++
 sd/source/ui/view/drviewse.cxx   |9 -
 svx/sdi/svx.sdi  |2 +-
 sw/qa/extras/uiwriter/uiwriter.cxx   |   20 
 sw/source/uibase/uiview/view0.cxx|6 +-
 7 files changed, 80 insertions(+), 4 deletions(-)

New commits:
commit 7aaa9ef2e5edaf468f116449776433e98fb1a2f3
Author: Mert Tumer 
AuthorDate: Thu Oct 8 13:37:07 2020 +0300
Commit: Mert Tumer 
CommitDate: Fri Oct 9 21:30:26 2020 +0200

Added optional parameter Enabled for uno:SpellOnline

Change-Id: I3578b0a002ea2cdcc7893972607f26732ce545ea
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103982
Tested-by: Jenkins

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 8a0c9f2f637f..8c03a19902d5 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -110,6 +111,7 @@ public:
 void testSheetGeometryDataInvariance();
 void testSheetGeometryDataCorrectness();
 void testDeleteCellMultilineContent();
+void testSpellOnlineParameter();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnHeaders);
@@ -154,6 +156,7 @@ public:
 CPPUNIT_TEST(testSheetGeometryDataInvariance);
 CPPUNIT_TEST(testSheetGeometryDataCorrectness);
 CPPUNIT_TEST(testDeleteCellMultilineContent);
+CPPUNIT_TEST(testSpellOnlineParameter);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1632,6 +1635,28 @@ void ScTiledRenderingTest::testFilterDlg()
 SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, 
nullptr);
 }
 
+void ScTiledRenderingTest::testSpellOnlineParameter()
+{
+ScModelObj* pModelObj = createDoc("empty.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+bool bSet = pDoc->GetDocOptions().IsAutoSpell();
+
+uno::Sequence params =
+{
+comphelper::makePropertyValue("Enable", uno::makeAny(!bSet)),
+};
+dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell());
+
+// set the same state as now and we don't expect any change (no-toggle)
+params =
+{
+comphelper::makePropertyValue("Enable", uno::makeAny(!bSet)),
+};
+dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell());
+}
+
 void ScTiledRenderingTest::testVbaRangeCopyPaste()
 {
 comphelper::LibreOfficeKit::setActive();
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 7f272e131192..688e52d3f54a 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -343,7 +343,9 @@ void ScModule::Execute( SfxRequest& rReq )
 {
 bool bSet;
 const SfxPoolItem* pItem;
-if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( 
nSlot, true,  ) )
+if (pReqArgs->HasItem(FN_PARAM_1, ))
+bSet = static_cast(pItem)->GetValue();
+else if ( pReqArgs && SfxItemState::SET == 
pReqArgs->GetItemState( nSlot, true,  ) )
 bSet = static_cast(pItem)->GetValue();
 else
 {   // Toggle
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index 56d1f8fc789b..fbd23a24eda0 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -379,6 +379,24 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf134053)
 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Dot length", 706, fDotLength, 12);
 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Dash length", 2822, fDashLength, 12);
 }
+
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testSpellOnlineParameter)
+{
+mxComponent = 
loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/empty.fodp"));
+auto pImpressDocument = 
dynamic_cast(mxComponent.get());
+bool bSet = pImpressDocument->GetDoc()->GetOnlineSpell();
+
+uno::Sequence params(
+comphelper::InitPropertySequence({ { "Enable", uno::makeAny(!bSet) } 
}));
+dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell());
+
+// set the same state as now and we don't expect any change (no-toggle)
+params = comphelper::InitPropertySequence({ { "Enable", 
uno::makeAny(!bSet) } });
+dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/qa sc/source sd/qa sd/source sw/qa sw/source

2020-10-19 Thread Mert Tumer (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx   |   17 +
 sc/source/ui/unoobj/docuno.cxx |   12 +++-
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |   16 
 sd/source/ui/unoidl/unomodel.cxx   |2 ++
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   17 +
 sw/source/uibase/uno/unotxdoc.cxx  |2 ++
 6 files changed, 65 insertions(+), 1 deletion(-)

New commits:
commit 5c5fa6597af973ebce48f983af8fdbb87789d03f
Author: Mert Tumer 
AuthorDate: Tue Oct 13 20:16:22 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Mon Oct 19 09:51:03 2020 +0200

Check render parameters for AutoSpellChecking

Change-Id: Ife2551b4023461da26e70ac3de505adf9d7db1e8
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104274
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 33a15349b70b..b6db96dc5473 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -112,6 +112,7 @@ public:
 void testDeleteCellMultilineContent();
 void testFunctionDlg();
 void testSpellOnlineParameter();
+void testSpellOnlineRenderParameter();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnHeaders);
@@ -158,6 +159,7 @@ public:
 CPPUNIT_TEST(testDeleteCellMultilineContent);
 CPPUNIT_TEST(testFunctionDlg);
 CPPUNIT_TEST(testSpellOnlineParameter);
+CPPUNIT_TEST(testSpellOnlineRenderParameter);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -604,6 +606,21 @@ void ScTiledRenderingTest::testViewCursors()
 CPPUNIT_ASSERT(aView1.m_bViewCursorInvalidated);
 }
 
+void ScTiledRenderingTest::testSpellOnlineRenderParameter()
+{
+ScModelObj* pModelObj = createDoc("empty.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+bool bSet = pDoc->GetDocOptions().IsAutoSpell();
+
+uno::Sequence aPropertyValues =
+{
+comphelper::makePropertyValue(".uno:SpellOnline", uno::makeAny(!bSet)),
+};
+pModelObj->initializeForTiledRendering(aPropertyValues);
+
+CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell());
+}
+
 void lcl_dispatchCommand(const uno::Reference& xComponent, 
const OUString& rCommand, const uno::Sequence& rArguments)
 {
 uno::Reference xController = 
uno::Reference(xComponent, 
uno::UNO_QUERY_THROW)->getCurrentController();
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index b51e63419f57..9d2539a25bcd 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1173,7 +1173,7 @@ void ScModelObj::completeFunction(const OUString& 
rFunctionName)
 }
 }
 
-void ScModelObj::initializeForTiledRendering(const 
css::uno::Sequence& /*rArguments*/)
+void ScModelObj::initializeForTiledRendering(const 
css::uno::Sequence& rArguments)
 {
 SolarMutexGuard aGuard;
 
@@ -1182,6 +1182,16 @@ void ScModelObj::initializeForTiledRendering(const 
css::uno::SequenceSetAppOptions(aAppOptions);
 
+for (const beans::PropertyValue& rValue : rArguments)
+{
+if (rValue.Name == ".uno:SpellOnline" && rValue.Value.has())
+ {
+ScDocOptions options = GetDocument()->GetDocOptions();
+options.SetAutoSpell(rValue.Value.get());
+GetDocument()->SetDocOptions(options);
+ }
+}
+
 // show us the text exactly
 ScInputOptions aInputOptions(SC_MOD()->GetInputOptions());
 aInputOptions.SetTextWysiwyg(true);
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index d7c2719e105a..79163b0cea67 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -126,6 +126,7 @@ public:
 void testRegenerateDiagram();
 void testLanguageAllText();
 void testInsertDeletePageInvalidation();
+void testSpellOnlineRenderParameter();
 
 CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
 CPPUNIT_TEST(testCreateDestroy);
@@ -177,6 +178,7 @@ public:
 CPPUNIT_TEST(testRegenerateDiagram);
 CPPUNIT_TEST(testLanguageAllText);
 CPPUNIT_TEST(testInsertDeletePageInvalidation);
+CPPUNIT_TEST(testSpellOnlineRenderParameter);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -2429,6 +2431,20 @@ void 
SdTiledRenderingTest::testInsertDeletePageInvalidation()
 CPPUNIT_ASSERT_EQUAL(size_t(8), aView1.m_aInvalidations.size());
 }
 
+void SdTiledRenderingTest::testSpellOnlineRenderParameter()
+{
+// Load the document.
+SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
+bool bSet = pXImpressDocument->GetDoc()->GetOnlineSpell();
+
+uno::Sequence aPropertyValues =
+{
+comphelper::InitPropertySequence({ { ".uno:SpellOnline", 
uno::makeAny(!bSet) } }),
+};
+

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/qa sc/source sd/qa sd/source svx/sdi sw/qa sw/source

2020-10-09 Thread Mert Tumer (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   25 +
 sc/source/ui/app/scmod.cxx   |4 +++-
 sd/qa/unit/uiimpress.cxx |   17 +
 sd/source/ui/view/drviewse.cxx   |9 -
 svx/sdi/svx.sdi  |2 +-
 sw/qa/extras/uiwriter/uiwriter.cxx   |   19 +++
 sw/source/uibase/uiview/view0.cxx|6 +-
 7 files changed, 78 insertions(+), 4 deletions(-)

New commits:
commit d90a404a078b9fc1baa98ec0eb3d6a90f869b336
Author: Mert Tumer 
AuthorDate: Thu Oct 8 13:37:07 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Fri Oct 9 15:37:51 2020 +0200

Added optional parameter Enabled for uno:SpellOnline

Change-Id: I3578b0a002ea2cdcc7893972607f26732ce545ea
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104083
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 4962ebc5fb68..33a15349b70b 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -110,6 +111,7 @@ public:
 void testSheetGeometryDataCorrectness();
 void testDeleteCellMultilineContent();
 void testFunctionDlg();
+void testSpellOnlineParameter();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnHeaders);
@@ -155,6 +157,7 @@ public:
 CPPUNIT_TEST(testSheetGeometryDataCorrectness);
 CPPUNIT_TEST(testDeleteCellMultilineContent);
 CPPUNIT_TEST(testFunctionDlg);
+CPPUNIT_TEST(testSpellOnlineParameter);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1684,6 +1687,28 @@ void ScTiledRenderingTest::testFunctionDlg()
 SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, 
nullptr);
 }
 
+void ScTiledRenderingTest::testSpellOnlineParameter()
+{
+ScModelObj* pModelObj = createDoc("empty.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+bool bSet = pDoc->GetDocOptions().IsAutoSpell();
+
+uno::Sequence params =
+{
+comphelper::makePropertyValue("Enable", uno::makeAny(!bSet)),
+};
+lcl_dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell());
+
+// set the same state as now and we don't expect any change (no-toggle)
+params =
+{
+comphelper::makePropertyValue("Enable", uno::makeAny(!bSet)),
+};
+lcl_dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell());
+}
+
 void ScTiledRenderingTest::testVbaRangeCopyPaste()
 {
 comphelper::LibreOfficeKit::setActive();
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 739d13322051..59fc059bf5ef 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -342,7 +342,9 @@ void ScModule::Execute( SfxRequest& rReq )
 {
 bool bSet;
 const SfxPoolItem* pItem;
-if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( 
nSlot, true,  ) )
+if (pReqArgs->HasItem(FN_PARAM_1, ))
+bSet = static_cast(pItem)->GetValue();
+else if ( pReqArgs && SfxItemState::SET == 
pReqArgs->GetItemState( nSlot, true,  ) )
 bSet = static_cast(pItem)->GetValue();
 else
 {   // Toggle
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index ce7a310bc289..738b09a3fd7d 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -275,6 +275,23 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testPageFillGradient)
 CPPUNIT_ASSERT_EQUAL(OUString("ff"), 
aGradient.GetStartColor().AsRGBHexString());
 CPPUNIT_ASSERT_EQUAL(OUString("ff"), 
aGradient.GetEndColor().AsRGBHexString());
 }
+
+CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testSpellOnlineParameter)
+{
+mxComponent = 
loadFromDesktop(m_directories.getURLFromSrc("sd/qa/unit/data/empty.fodp"));
+auto pImpressDocument = 
dynamic_cast(mxComponent.get());
+bool bSet = pImpressDocument->GetDoc()->GetOnlineSpell();
+
+uno::Sequence 
params(comphelper::InitPropertySequence({{"Enable", uno::makeAny(!bSet)}}));
+dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell());
+
+// set the same state as now and we don't expect any change (no-toggle)
+params = comphelper::InitPropertySequence({{"Enable", 
uno::makeAny(!bSet)}});
+dispatchCommand(mxComponent, ".uno:SpellOnline", params);
+CPPUNIT_ASSERT_EQUAL(!bSet, pImpressDocument->GetDoc()->GetOnlineSpell());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 

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

2020-08-18 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 021d17006c970bbd784bc3a5474d56fff02fdca0
Author: Mert Tumer 
AuthorDate: Mon Aug 17 11:40:38 2020 +0300
Commit: Andras Timar 
CommitDate: Tue Aug 18 23:01:25 2020 +0200

Fix hyperlink popup does not show up

The popup does not show up when double clicking
same cell after first one when the cell has a
hyperlink. This is because LOK_CALLBACK_INVALIDATE
_VISIBLE_CURSOR message is filtered out when it
is duplicate and hyperlink is inside this callback.

Selecting different cell after editing one does not
make calc to send another invalidate cursor message
because it is only sent if the selected cell is being
edited. This confuses the ui experience, so this patch
prevents the callback from being filtered out
if only it contains a hyperlink. If there is not a hyperlink
on the cursor position the duplicate callbacks will still
be filtered out.

Signed-off-by: Mert Tumer 
Change-Id: Ibca0887b7d49633e476bc63d08bc0b7cc309d710
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100851
Tested-by: Jenkins
Reviewed-by: Andras Timar 
(cherry picked from commit 06bed3046b4ca62a50566f42d3a7079f0b563935)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100934
Tested-by: Jenkins CollaboraOffice 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 02bf19602150..4d96e34333ea 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1554,10 +1554,15 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 case LOK_CALLBACK_CALC_FUNCTION_LIST:
 case LOK_CALLBACK_JSDIALOG:
 {
+// deleting the duplicate of visible cursor message can cause 
hyperlink popup not to show up on second/or more click on the same place.
+// If the hyperlink is not empty we can bypass that to show 
the popup
+const bool hyperLinkException = type == 
LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR &&
+payload.find("\"hyperlink\":\"\"") == std::string::npos &&
+payload.find("\"hyperlink\": {}") == std::string::npos;
 const int nViewId = lcl_getViewId(payload);
 removeAll(
-[type, nViewId] (const queue_type::value_type& elem) {
-return (elem.Type == type && nViewId == 
lcl_getViewId(elem));
+[type, nViewId, hyperLinkException] (const 
queue_type::value_type& elem) {
+return (elem.Type == type && nViewId == 
lcl_getViewId(elem) && !hyperLinkException);
 }
 );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-18 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 06bed3046b4ca62a50566f42d3a7079f0b563935
Author: Mert Tumer 
AuthorDate: Mon Aug 17 11:40:38 2020 +0300
Commit: Andras Timar 
CommitDate: Tue Aug 18 22:29:25 2020 +0200

Fix hyperlink popup does not show up

The popup does not show up when double clicking
same cell after first one when the cell has a
hyperlink. This is because LOK_CALLBACK_INVALIDATE
_VISIBLE_CURSOR message is filtered out when it
is duplicate and hyperlink is inside this callback.

Selecting different cell after editing one does not
make calc to send another invalidate cursor message
because it is only sent if the selected cell is being
edited. This confuses the ui experience, so this patch
prevents the callback from being filtered out
if only it contains a hyperlink. If there is not a hyperlink
on the cursor position the duplicate callbacks will still
be filtered out.

Signed-off-by: Mert Tumer 
Change-Id: Ibca0887b7d49633e476bc63d08bc0b7cc309d710
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100851
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 78f152166acd..beb35b4e5fcc 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1546,10 +1546,15 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 case LOK_CALLBACK_CALC_FUNCTION_LIST:
 case LOK_CALLBACK_JSDIALOG:
 {
+// deleting the duplicate of visible cursor message can cause 
hyperlink popup not to show up on second/or more click on the same place.
+// If the hyperlink is not empty we can bypass that to show 
the popup
+const bool hyperLinkException = type == 
LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR &&
+payload.find("\"hyperlink\":\"\"") == std::string::npos &&
+payload.find("\"hyperlink\": {}") == std::string::npos;
 const int nViewId = lcl_getViewId(payload);
 removeAll(
-[type, nViewId] (const queue_type::value_type& elem) {
-return (elem.Type == type && nViewId == 
lcl_getViewId(elem));
+[type, nViewId, hyperLinkException] (const 
queue_type::value_type& elem) {
+return (elem.Type == type && nViewId == 
lcl_getViewId(elem) && !hyperLinkException);
 }
 );
 }
___
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.2' - desktop/source

2020-08-19 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 7621398ad1b4e25b87d6da709b41966e7e3a9484
Author: Mert Tumer 
AuthorDate: Mon Aug 17 11:40:38 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Aug 19 08:58:44 2020 +0200

Fix hyperlink popup does not show up

The popup does not show up when double clicking
same cell after first one when the cell has a
hyperlink. This is because LOK_CALLBACK_INVALIDATE
_VISIBLE_CURSOR message is filtered out when it
is duplicate and hyperlink is inside this callback.

Selecting different cell after editing one does not
make calc to send another invalidate cursor message
because it is only sent if the selected cell is being
edited. This confuses the ui experience, so this patch
prevents the callback from being filtered out
if only it contains a hyperlink. If there is not a hyperlink
on the cursor position the duplicate callbacks will still
be filtered out.

Signed-off-by: Mert Tumer 
Change-Id: Ibca0887b7d49633e476bc63d08bc0b7cc309d710
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100851
Tested-by: Jenkins
Reviewed-by: Andras Timar 
(cherry picked from commit 06bed3046b4ca62a50566f42d3a7079f0b563935)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100935
Tested-by: Jenkins CollaboraOffice 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d33454297cf8..d0982e0bdcf1 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1519,10 +1519,15 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 case LOK_CALLBACK_VIEW_CURSOR_VISIBLE:
 case LOK_CALLBACK_CALC_FUNCTION_LIST:
 {
+// deleting the duplicate of visible cursor message can cause 
hyperlink popup not to show up on second/or more click on the same place.
+// If the hyperlink is not empty we can bypass that to show 
the popup
+const bool hyperLinkException = type == 
LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR &&
+payload.find("\"hyperlink\":\"\"") == std::string::npos &&
+payload.find("\"hyperlink\": {}") == std::string::npos;
 const int nViewId = lcl_getViewId(payload);
 removeAll(
-[type, nViewId] (const queue_type::value_type& elem) {
-return (elem.Type == type && nViewId == 
lcl_getViewId(elem));
+[type, nViewId, hyperLinkException] (const 
queue_type::value_type& elem) {
+return (elem.Type == type && nViewId == 
lcl_getViewId(elem) && !hyperLinkException);
 }
 );
 }
___
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.2' - xmlsecurity/source

2020-10-02 Thread Mert Tumer (via logerrit)
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0b1b1e90bffd4e8a7647cc01f5529c745ebdb121
Author: Mert Tumer 
AuthorDate: Wed Sep 30 17:14:59 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Oct 2 22:55:12 2020 +0200

Fix libnssckbi not found error on Android

This error causes Android App to be unable to
open Password-protected documents.

Change-Id: Iacbacb1c780025752e2447db325b075c58947818
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103659
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx 
b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index b2fd04423be9..bbdc036395f2 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -415,7 +415,7 @@ bool 
nsscrypto_initialize(css::uno::Reference const
 
 if (true)
 #else
-#if defined SYSTEM_NSS
+#if defined SYSTEM_NSS || defined ANDROID
 OUString rootModule("libnssckbi" SAL_DLLEXTENSION);
 #else
 OUString rootModule("${LO_LIB_DIR}/libnssckbi" SAL_DLLEXTENSION);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-02 Thread Mert Tumer (via logerrit)
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 16a7f98f99d334ea865b800e0b32d6fed1483942
Author: Mert Tumer 
AuthorDate: Wed Sep 30 17:14:59 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Oct 2 22:54:07 2020 +0200

Fix libnssckbi not found error on Android

This error causes Android App to be unable to
open Password-protected documents.

Change-Id: Iacbacb1c780025752e2447db325b075c58947818
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103658
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx 
b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index 1d6dcda2f315..b8acdc059cf8 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -430,7 +430,7 @@ bool 
nsscrypto_initialize(css::uno::Reference const
 
 if (true)
 #else
-#if defined SYSTEM_NSS
+#if defined SYSTEM_NSS || defined ANDROID
 OUString rootModule("libnssckbi" SAL_DLLEXTENSION);
 #else
 OUString rootModule("${LO_LIB_DIR}/libnssckbi" SAL_DLLEXTENSION);
___
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' - xmlsecurity/source

2020-10-02 Thread Mert Tumer (via logerrit)
 xmlsecurity/source/xmlsec/nss/nssinitializer.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit da24149ac681555430271f264095e2d8807c55cf
Author: Mert Tumer 
AuthorDate: Wed Sep 30 17:14:59 2020 +0300
Commit: Andras Timar 
CommitDate: Fri Oct 2 22:53:49 2020 +0200

Fix libnssckbi not found error on Android

This error causes Android App to be unable to
open Password-protected documents.

Change-Id: Iacbacb1c780025752e2447db325b075c58947818
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103708
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx 
b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index 8c71ed12b67d..d5f95d096e91 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -353,7 +353,7 @@ bool 
nsscrypto_initialize(css::uno::Reference const
 
 if (true)
 #else
-#if defined SYSTEM_NSS
+#if defined SYSTEM_NSS || defined ANDROID
 OUString rootModule("libnssckbi" SAL_DLLEXTENSION);
 #else
 OUString rootModule("${LO_LIB_DIR}/libnssckbi" SAL_DLLEXTENSION);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-04 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |   12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 34decd703e880a04634585e20651a2f9b7fef393
Author: Mert Tumer 
AuthorDate: Wed Jun 10 14:41:41 2020 +0300
Commit: Mert Tumer 
CommitDate: Tue Aug 4 12:42:50 2020 +0200

Fix .uno:SidebarHide command works for online

Signed-off-by: Mert Tumer 
Change-Id: I03743d15300687b1da947d3c44be6a42aab83107
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96513
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index e844243207d8..dc1b6b1664fc 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -911,6 +911,16 @@ void setupSidebar(bool bShow)
 SetLastExceptionMsg("No view shell or sidebar");
 }
 
+void hideSidebar()
+{
+SfxViewShell* pViewShell = SfxViewShell::Current();
+SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr;
+if (pViewFrame)
+pViewFrame->SetChildWindow(SID_SIDEBAR, false , false );
+else
+SetLastExceptionMsg("No view shell or sidebar");
+}
+
 VclPtr getSidebarWindow()
 {
 VclPtr xRet;
@@ -3894,7 +3904,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 }
 else if (gImpl && aCommand == ".uno:SidebarHide")
 {
-setupSidebar(false);
+hideSidebar();
 return;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/source include/sfx2 sfx2/source

2020-08-04 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx   |   19 ---
 include/sfx2/sidebar/SidebarDockingWindow.hxx |2 +-
 sfx2/source/sidebar/ResourceManager.cxx   |9 +
 3 files changed, 26 insertions(+), 4 deletions(-)

New commits:
commit 87c58f6a9351f2a2ec40fd99c4e5a63bfe29d0b8
Author: Mert Tumer 
AuthorDate: Wed Apr 29 16:29:57 2020 +0300
Commit: Mert Tumer 
CommitDate: Tue Aug 4 12:43:29 2020 +0200

added ability to switch sidebar deck on init.cxx for mobilewizard

Change-Id: I532398bc41e1c984c24b1d39e4844315a0a69847
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93162
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97062
Reviewed-by: Jan Holesovsky 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98247
Tested-by: Jenkins
Reviewed-by: Mert Tumer 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index dc1b6b1664fc..346c5174accd 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -111,6 +111,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -883,10 +884,10 @@ void ExecuteOrientationChange()
 mxUndoManager->leaveUndoContext();
 }
 
-void setupSidebar(bool bShow)
+void setupSidebar(bool bShow, const OUString& sidebarDeckId = "")
 {
 SfxViewShell* pViewShell = SfxViewShell::Current();
-SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr;
+SfxViewFrame* pViewFrame = pViewShell ? pViewShell->GetViewFrame() : 
nullptr;
 if (pViewFrame)
 {
 if (bShow && !pViewFrame->GetChildWindow(SID_SIDEBAR))
@@ -905,6 +906,11 @@ void setupSidebar(bool bShow)
 auto pDockingWin = dynamic_cast(pChild->GetWindow());
 if (!pDockingWin)
 return;
+
+if (!sidebarDeckId.isEmpty())
+{
+pDockingWin->GetSidebarController()->SwitchToDeck(sidebarDeckId);
+}
 pDockingWin->SyncUpdate();
 }
 else
@@ -3744,6 +3750,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 SfxObjectShell* pDocSh = SfxObjectShell::Current();
 OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8);
 LibLODocument_Impl* pDocument = static_cast(pThis);
+OUString sidebarDeckId = "PropertyDeck";
 
 std::vector 
aPropertyValuesVector(jsonToPropertyValuesVector(pArguments));
 
@@ -3897,9 +3904,15 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 return;
 }
 }
+else if (gImpl && aCommand == ".uno:LOKSidebarWriterPage")
+{
+sidebarDeckId = "WriterPageDeck";
+setupSidebar(true, sidebarDeckId);
+return;
+}
 else if (gImpl && aCommand == ".uno:SidebarShow")
 {
-setupSidebar(true);
+setupSidebar(true, sidebarDeckId);
 return;
 }
 else if (gImpl && aCommand == ".uno:SidebarHide")
diff --git a/include/sfx2/sidebar/SidebarDockingWindow.hxx 
b/include/sfx2/sidebar/SidebarDockingWindow.hxx
index 6d726ddd1260..f156ab0cb0fb 100644
--- a/include/sfx2/sidebar/SidebarDockingWindow.hxx
+++ b/include/sfx2/sidebar/SidebarDockingWindow.hxx
@@ -49,7 +49,7 @@ public:
 void SyncUpdate();
 
 void NotifyResize();
-
+auto& GetSidebarController() const { return mpSidebarController; }
 using SfxDockingWindow::Close;
 
 private:
diff --git a/sfx2/source/sidebar/ResourceManager.cxx 
b/sfx2/source/sidebar/ResourceManager.cxx
index f3440e6dcb46..c61781643f49 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -429,6 +429,15 @@ void ResourceManager::ReadPanelList()
 if (!aPanelNode.isValid())
 continue;
 
+if (comphelper::LibreOfficeKit::isActive())
+{
+// Hide these panels in LOK as they aren't fully functional.
+OUString aPanelId = getString(aPanelNode, "Id");
+if (aPanelId == "PageStylesPanel" || aPanelId == "PageHeaderPanel"
+|| aPanelId == "PageFooterPanel")
+continue;
+}
+
 maPanels.push_back(std::make_shared());
 PanelDescriptor& rPanelDescriptor(*maPanels.back());
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/source include/sfx2

2020-08-04 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx|   20 
 include/sfx2/sidebar/SidebarController.hxx |1 +
 2 files changed, 17 insertions(+), 4 deletions(-)

New commits:
commit ff23d87cb00388095a94b90e061564fc179e1823
Author: Mert Tumer 
AuthorDate: Fri May 8 17:23:12 2020 +0300
Commit: Mert Tumer 
CommitDate: Tue Aug 4 12:44:31 2020 +0200

mobile: fix calc chart wizard properties is not shown

Change-Id: I2fd98ddbdb529c3f224299c6824b4743797925be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93747
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97061
Reviewed-by: Jan Holesovsky 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98248
Tested-by: Jenkins
Reviewed-by: Mert Tumer 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 346c5174accd..db6dc07262a0 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -907,10 +907,24 @@ void setupSidebar(bool bShow, const OUString& 
sidebarDeckId = "")
 if (!pDockingWin)
 return;
 
+OUString currentDeckId = 
pDockingWin->GetSidebarController()->GetCurrentDeckId();
+
+// check if it is the chart deck id, if it is, don't switch to default 
deck
+bool switchToDefault = true;
+
+if (currentDeckId == "ChartDeck")
+switchToDefault = false;
+
 if (!sidebarDeckId.isEmpty())
 {
 pDockingWin->GetSidebarController()->SwitchToDeck(sidebarDeckId);
 }
+else
+{
+if (switchToDefault)
+pDockingWin->GetSidebarController()->SwitchToDefaultDeck();
+}
+
 pDockingWin->SyncUpdate();
 }
 else
@@ -3750,7 +3764,6 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 SfxObjectShell* pDocSh = SfxObjectShell::Current();
 OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8);
 LibLODocument_Impl* pDocument = static_cast(pThis);
-OUString sidebarDeckId = "PropertyDeck";
 
 std::vector 
aPropertyValuesVector(jsonToPropertyValuesVector(pArguments));
 
@@ -3906,13 +3919,12 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 }
 else if (gImpl && aCommand == ".uno:LOKSidebarWriterPage")
 {
-sidebarDeckId = "WriterPageDeck";
-setupSidebar(true, sidebarDeckId);
+setupSidebar(true, "WriterPageDeck");
 return;
 }
 else if (gImpl && aCommand == ".uno:SidebarShow")
 {
-setupSidebar(true, sidebarDeckId);
+setupSidebar(true);
 return;
 }
 else if (gImpl && aCommand == ".uno:SidebarHide")
diff --git a/include/sfx2/sidebar/SidebarController.hxx 
b/include/sfx2/sidebar/SidebarController.hxx
index d03576b3416d..e9b653762e82 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -134,6 +134,7 @@ public:
 FocusManager& GetFocusManager() { return maFocusManager;}
 
 ResourceManager* GetResourceManager() { return mpResourceManager.get();}
+auto& GetCurrentDeckId() const { return msCurrentDeckId; }
 
// std::unique_ptr GetResourceManager() { return 
mpResourceManager;}
 
___
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.2' - desktop/source

2020-06-24 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |   12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit d046bad4fad89b1afeed78703afa695528338299
Author: Mert Tumer 
AuthorDate: Wed Jun 10 14:41:41 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Wed Jun 24 13:31:30 2020 +0200

Fix .uno:SidebarHide command works for online

Change-Id: I03743d15300687b1da947d3c44be6a42aab83107
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96618
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index b34f814ff472..568363fea289 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1172,6 +1172,16 @@ void setupSidebar(bool bShow, OUString sidebarDeckId = 
"")
 SetLastExceptionMsg("No view shell or sidebar");
 }
 
+void hideSidebar()
+{
+SfxViewShell* pViewShell = SfxViewShell::Current();
+SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr;
+if (pViewFrame)
+pViewFrame->SetChildWindow(SID_SIDEBAR, false, false);
+else
+SetLastExceptionMsg("No view shell or sidebar");
+}
+
 VclPtr getSidebarWindow()
 {
 VclPtr xRet;
@@ -3921,7 +3931,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 }
 else if (gImpl && aCommand == ".uno:SidebarHide")
 {
-setupSidebar(false);
+hideSidebar();
 return;
 }
 
___
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' - desktop/source

2020-06-26 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |   12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 2f283b44c708f3b30cef25ebd8e04a5b4c48c626
Author: Mert Tumer 
AuthorDate: Wed Jun 10 14:41:41 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Fri Jun 26 11:30:51 2020 +0200

Fix .uno:SidebarHide command works for online

Change-Id: I03743d15300687b1da947d3c44be6a42aab83107
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96618
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97059

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 69e8073b0bd0..51a8c80ad049 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -910,6 +910,16 @@ void setupSidebar(bool bShow, OUString sidebarDeckId = "")
 SetLastExceptionMsg("No view shell or sidebar");
 }
 
+void hideSidebar()
+{
+SfxViewShell* pViewShell = SfxViewShell::Current();
+SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr;
+if (pViewFrame)
+pViewFrame->SetChildWindow(SID_SIDEBAR, false, false);
+else
+SetLastExceptionMsg("No view shell or sidebar");
+}
+
 VclPtr getSidebarWindow()
 {
 VclPtr xRet;
@@ -3957,7 +3967,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 }
 else if (gImpl && aCommand == ".uno:SidebarHide")
 {
-setupSidebar(false);
+hideSidebar();
 return;
 }
 
___
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' - desktop/source include/sfx2 sfx2/source

2020-06-26 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx   |   19 ---
 include/sfx2/sidebar/SidebarDockingWindow.hxx |1 +
 sfx2/source/sidebar/ResourceManager.cxx   |9 +
 3 files changed, 26 insertions(+), 3 deletions(-)

New commits:
commit e80c47b42dd1c9ae869d241c327def8b4a0b1ad4
Author: Mert Tumer 
AuthorDate: Wed Apr 29 16:29:57 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Fri Jun 26 11:30:04 2020 +0200

added ability to switch sidebar deck on init.cxx for mobilewizard

Change-Id: I532398bc41e1c984c24b1d39e4844315a0a69847
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93162
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97062
Reviewed-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 0434818c7845..2190c7d49e6a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -112,6 +112,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -862,10 +863,10 @@ void ExecuteOrientationChange()
 mxUndoManager->leaveUndoContext();
 }
 
-void setupSidebar(bool bShow)
+void setupSidebar(bool bShow, OUString sidebarDeckId = "")
 {
 SfxViewShell* pViewShell = SfxViewShell::Current();
-SfxViewFrame* pViewFrame = pViewShell? pViewShell->GetViewFrame(): nullptr;
+SfxViewFrame* pViewFrame = pViewShell ? pViewShell->GetViewFrame() : 
nullptr;
 if (pViewFrame)
 {
 if (bShow && !pViewFrame->GetChildWindow(SID_SIDEBAR))
@@ -884,6 +885,11 @@ void setupSidebar(bool bShow)
 auto pDockingWin = dynamic_cast(pChild->GetWindow());
 if (!pDockingWin)
 return;
+
+if (!sidebarDeckId.isEmpty())
+{
+pDockingWin->GetSidebarController()->SwitchToDeck(sidebarDeckId);
+}
 pDockingWin->SyncUpdate();
 }
 else
@@ -3795,6 +3801,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 SfxObjectShell* pDocSh = SfxObjectShell::Current();
 OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8);
 LibLODocument_Impl* pDocument = static_cast(pThis);
+OUString sidebarDeckId = "PropertyDeck";
 
 std::vector 
aPropertyValuesVector(jsonToPropertyValuesVector(pArguments));
 
@@ -3925,9 +3932,15 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 return;
 }
 }
+else if (gImpl && aCommand == ".uno:LOKSidebarWriterPage")
+{
+sidebarDeckId = "WriterPageDeck";
+setupSidebar(true, sidebarDeckId);
+return;
+}
 else if (gImpl && aCommand == ".uno:SidebarShow")
 {
-setupSidebar(true);
+setupSidebar(true, sidebarDeckId);
 return;
 }
 else if (gImpl && aCommand == ".uno:SidebarHide")
diff --git a/include/sfx2/sidebar/SidebarDockingWindow.hxx 
b/include/sfx2/sidebar/SidebarDockingWindow.hxx
index 37f6532c7dd7..48afc8f19751 100644
--- a/include/sfx2/sidebar/SidebarDockingWindow.hxx
+++ b/include/sfx2/sidebar/SidebarDockingWindow.hxx
@@ -45,6 +45,7 @@ public:
 
 void SetReadyToDrag( bool bStartDrag ) { mbIsReadyToDrag = bStartDrag; }
 bool IsReadyToDrag() const { return mbIsReadyToDrag; }
+auto& GetSidebarController() const { return mpSidebarController; }
 
 /// Force generation of all panels by completion.
 void SyncUpdate();
diff --git a/sfx2/source/sidebar/ResourceManager.cxx 
b/sfx2/source/sidebar/ResourceManager.cxx
index e1e011422da7..9cd9543eb2f0 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -429,6 +429,15 @@ void ResourceManager::ReadPanelList()
 if (!aPanelNode.isValid())
 continue;
 
+if (comphelper::LibreOfficeKit::isActive())
+{
+// Hide these panels in LOK as they aren't fully functional.
+OUString aPanelId = getString(aPanelNode, "Id");
+if (aPanelId == "PageStylesPanel" || aPanelId == "PageHeaderPanel"
+|| aPanelId == "PageFooterPanel")
+continue;
+}
+
 maPanels.push_back(std::make_shared());
 PanelDescriptor& rPanelDescriptor(*maPanels.back());
 
___
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' - desktop/source include/sfx2

2020-06-26 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx|   20 
 include/sfx2/sidebar/SidebarController.hxx |1 +
 2 files changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 3e8917702642595526a43f3d6866ba9b0446e50b
Author: Mert Tumer 
AuthorDate: Fri May 8 17:23:12 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Fri Jun 26 11:30:31 2020 +0200

mobile: fix calc chart wizard properties is not shown

Change-Id: I2fd98ddbdb529c3f224299c6824b4743797925be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93747
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97061
Reviewed-by: Jan Holesovsky 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2190c7d49e6a..69e8073b0bd0 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -886,10 +886,24 @@ void setupSidebar(bool bShow, OUString sidebarDeckId = "")
 if (!pDockingWin)
 return;
 
+OUString currentDeckId = 
pDockingWin->GetSidebarController()->GetCurrentDeckId();
+
+// check if it is the chart deck id, if it is, don't switch to default 
deck
+bool switchToDefault = true;
+
+if (currentDeckId == "ChartDeck")
+switchToDefault = false;
+
 if (!sidebarDeckId.isEmpty())
 {
 pDockingWin->GetSidebarController()->SwitchToDeck(sidebarDeckId);
 }
+else
+{
+if (switchToDefault)
+pDockingWin->GetSidebarController()->SwitchToDefaultDeck();
+}
+
 pDockingWin->SyncUpdate();
 }
 else
@@ -3801,7 +3815,6 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 SfxObjectShell* pDocSh = SfxObjectShell::Current();
 OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8);
 LibLODocument_Impl* pDocument = static_cast(pThis);
-OUString sidebarDeckId = "PropertyDeck";
 
 std::vector 
aPropertyValuesVector(jsonToPropertyValuesVector(pArguments));
 
@@ -3934,13 +3947,12 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 }
 else if (gImpl && aCommand == ".uno:LOKSidebarWriterPage")
 {
-sidebarDeckId = "WriterPageDeck";
-setupSidebar(true, sidebarDeckId);
+setupSidebar(true, "WriterPageDeck");
 return;
 }
 else if (gImpl && aCommand == ".uno:SidebarShow")
 {
-setupSidebar(true, sidebarDeckId);
+setupSidebar(true);
 return;
 }
 else if (gImpl && aCommand == ".uno:SidebarHide")
diff --git a/include/sfx2/sidebar/SidebarController.hxx 
b/include/sfx2/sidebar/SidebarController.hxx
index eb459b1a708f..440ff55b7bfc 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -134,6 +134,7 @@ public:
 FocusManager& GetFocusManager() { return maFocusManager;}
 
 ResourceManager* GetResourceManager() { return mpResourceManager.get();}
+auto& GetCurrentDeckId() const { return msCurrentDeckId; }
 
// std::unique_ptr GetResourceManager() { return 
mpResourceManager;}
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-07-16 Thread Mert Tumer (via logerrit)
 sd/source/ui/view/drviews5.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 15d3b2521e3df1ea0a659f82aeb67a2fc1f0
Author: Mert Tumer 
AuthorDate: Tue Apr 7 15:36:34 2020 +0300
Commit: Mert Tumer 
CommitDate: Thu Jul 16 21:54:12 2020 +0200

fix ODP roundtripped in online opens with huge zoom in desktop

Change-Id: Ia3192cfeaab8ac643bba7b499240882f403b6388
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91822
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98246
Tested-by: Jenkins
Reviewed-by: Mert Tumer 

diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx
index 110e7756225f..d632d24a46d0 100644
--- a/sd/source/ui/view/drviews5.cxx
+++ b/sd/source/ui/view/drviews5.cxx
@@ -49,11 +49,13 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 
 namespace sd {
 
@@ -336,6 +338,12 @@ void DrawViewShell::WriteFrameViewData()
 
 Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel();
 ::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic( 
::tools::Rectangle( Point(0,0), aVisSizePixel) );
+if (comphelper::LibreOfficeKit::isActive())
+{
+// aVisArea is nonsensical in the LOK case, use the slide size
+aVisArea = ::tools::Rectangle(Point(), getCurrentPage()->GetSize());
+}
+
 mpFrameView->SetVisArea(aVisArea);
 
 if( mePageKind == PageKind::Handout )
___
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' - vcl/jsdialog

2021-01-12 Thread Mert Tumer (via logerrit)
 vcl/jsdialog/executor.cxx |   17 +
 1 file changed, 17 insertions(+)

New commits:
commit a1549c122724733f51096611486a26dcad7321fe
Author: Mert Tumer 
AuthorDate: Wed Dec 16 23:01:25 2020 +0300
Commit: Mert Tumer 
CommitDate: Tue Jan 12 09:41:31 2021 +0100

jsdialogs: send click pos for drawingarea

Change-Id: I91aae808fe17f47fe9fa75dca069e4919c2ce4c3
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108685
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index 62e6c2b660fd..f33eeb4b086a 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -118,6 +118,23 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 {
 if (sAction == "click")
 {
+int separatorPos = rData["data"].indexOf(';');
+if (separatorPos > 0)
+{
+// x;y
+OString clickPosX = 
OUStringToOString(rData["data"].copy(0, separatorPos),  
RTL_TEXTENCODING_ASCII_US);
+OString  clickPosY = 
OUStringToOString(rData["data"].copy(separatorPos + 1),  
RTL_TEXTENCODING_ASCII_US);
+if (!clickPosX.isEmpty() && !clickPosY.isEmpty())
+{
+double posX = std::atof(clickPosX.getStr());
+double posY = std::atof(clickPosY.getStr());
+Size size = pArea->get_size_request();
+posX = posX * size.Width();
+posY = posY * size.Height();
+LOKTrigger::trigger_click(*pArea, Point(posX, 
posY));
+return true;
+}
+}
 LOKTrigger::trigger_click(*pArea, Point(10, 10));
 return true;
 }
___
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' - vcl/source

2021-01-12 Thread Mert Tumer (via logerrit)
 vcl/source/window/builder.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit eb1a1a2a0f0d0d55e38d212c2165c88c5697eb9e
Author: Mert Tumer 
AuthorDate: Wed Dec 16 23:00:11 2020 +0300
Commit: Szymon KÅ‚os 
CommitDate: Tue Jan 12 10:59:30 2021 +0100

jsdialogs: Use JS dialog for Fontwork dialog

Change-Id: I4d2206550f7d3948f373c803888c7d19034e42c4
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108684
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon KÅ‚os 

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 97f48ddf545d..b795ea03b629 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -189,7 +189,8 @@ weld::Builder* Application::CreateBuilder(weld::Widget* 
pParent, const OUString
 || rUIFile == "modules/scalc/ui/fourieranalysisdialog.ui"
 || rUIFile == "modules/scalc/ui/datafielddialog.ui"
 || rUIFile == "modules/scalc/ui/pivotfielddialog.ui"
-|| rUIFile == "modules/scalc/ui/datafieldoptionsdialog.ui")
+|| rUIFile == "modules/scalc/ui/datafieldoptionsdialog.ui"
+|| rUIFile == "svx/ui/fontworkgallerydialog.ui")
 {
 bUseJSBuilder = true;
 }
___
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' - desktop/source

2021-01-12 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 6fc194b0dafe13b0b841fccc1ac517fb15df616a
Author: Mert Tumer 
AuthorDate: Thu Dec 10 11:59:06 2020 +0300
Commit: Mert Tumer 
CommitDate: Tue Jan 12 09:39:52 2021 +0100

fix rendershapeselection for drawing

Change-Id: Id4cb37885bf9b442adc679b895d89cd615ffb2ee
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108681
Tested-by: Jenkins CollaboraOffice 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6fcb2ca02a17..af1161274c37 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3619,6 +3619,9 @@ static size_t 
doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu
 case LOK_DOCTYPE_PRESENTATION:
 aMediaDescriptor["FilterName"] <<= 
OUString("impress_svg_Export");
 break;
+case LOK_DOCTYPE_DRAWING:
+aMediaDescriptor["FilterName"] <<= OUString("draw_svg_Export");
+break;
 case LOK_DOCTYPE_TEXT:
 aMediaDescriptor["FilterName"] <<= 
OUString("writer_svg_Export");
 break;
___
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' - desktop/source

2020-11-27 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 455cd8fe00d1c756da1bb50a50bac68a1ad645ef
Author: Mert Tumer 
AuthorDate: Fri Nov 27 16:56:53 2020 +0300
Commit: Mert Tumer 
CommitDate: Fri Nov 27 15:31:59 2020 +0100

Fix unmodified pdf does forced-save

This is a problem when dealing with the large
pdfs which take long amount of time to save.
Adding or removing annotations do change the state of
IsModified()

Change-Id: I872cb3aec5188986cc13c6659e1bb741a6870409
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106778
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index b37c85ffbc63..c9d5e7d1d489 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3841,7 +3841,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 {
 // Check if saving a PDF file
 OUString aMimeType = lcl_getCurrentDocumentMimeType(pDocument);
-if (aMimeType == "application/pdf")
+if (pDocSh->IsModified() && aMimeType == "application/pdf")
 {
 // If we have a PDF file (for saving annotations for example), we 
need
 // to run save-as to the same file as the opened document. Plain 
save
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-26 Thread Mert Tumer (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx   |   17 +
 sc/source/ui/unoobj/docuno.cxx |   12 +++-
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |   16 
 sd/source/ui/unoidl/unomodel.cxx   |2 ++
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   17 +
 sw/source/uibase/uno/unotxdoc.cxx  |2 ++
 6 files changed, 65 insertions(+), 1 deletion(-)

New commits:
commit b2f4e18f63457d11a783db939729450ddbe9d594
Author: Mert Tumer 
AuthorDate: Tue Oct 13 20:16:22 2020 +0300
Commit: Miklos Vajna 
CommitDate: Thu Nov 26 09:07:10 2020 +0100

Check render parameters for AutoSpellChecking

Conflicts:
sc/qa/unit/tiledrendering/tiledrendering.cxx
sw/qa/extras/tiledrendering/tiledrendering.cxx

Change-Id: Ife2551b4023461da26e70ac3de505adf9d7db1e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106602
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index bb34928fef7d..ed6370e1dbe5 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -112,6 +112,7 @@ public:
 void testSheetGeometryDataCorrectness();
 void testDeleteCellMultilineContent();
 void testSpellOnlineParameter();
+void testSpellOnlineRenderParameter();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnHeaders);
@@ -157,6 +158,7 @@ public:
 CPPUNIT_TEST(testSheetGeometryDataCorrectness);
 CPPUNIT_TEST(testDeleteCellMultilineContent);
 CPPUNIT_TEST(testSpellOnlineParameter);
+CPPUNIT_TEST(testSpellOnlineRenderParameter);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -603,6 +605,21 @@ void ScTiledRenderingTest::testViewCursors()
 CPPUNIT_ASSERT(aView1.m_bViewCursorInvalidated);
 }
 
+void ScTiledRenderingTest::testSpellOnlineRenderParameter()
+{
+ScModelObj* pModelObj = createDoc("empty.ods");
+ScDocument* pDoc = pModelObj->GetDocument();
+bool bSet = pDoc->GetDocOptions().IsAutoSpell();
+
+uno::Sequence aPropertyValues =
+{
+comphelper::makePropertyValue(".uno:SpellOnline", uno::makeAny(!bSet)),
+};
+pModelObj->initializeForTiledRendering(aPropertyValues);
+
+CPPUNIT_ASSERT_EQUAL(!bSet, pDoc->GetDocOptions().IsAutoSpell());
+}
+
 void ScTiledRenderingTest::testTextViewSelection()
 {
 comphelper::LibreOfficeKit::setActive();
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index c677e3639fb1..7142e2807cf9 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1163,7 +1163,7 @@ void ScModelObj::completeFunction(const OUString& 
rFunctionName)
 }
 }
 
-void ScModelObj::initializeForTiledRendering(const 
css::uno::Sequence& /*rArguments*/)
+void ScModelObj::initializeForTiledRendering(const 
css::uno::Sequence& rArguments)
 {
 SolarMutexGuard aGuard;
 
@@ -1172,6 +1172,16 @@ void ScModelObj::initializeForTiledRendering(const 
css::uno::SequenceSetAppOptions(aAppOptions);
 
+for (const beans::PropertyValue& rValue : rArguments)
+{
+if (rValue.Name == ".uno:SpellOnline" && rValue.Value.has())
+ {
+ScDocOptions options = GetDocument()->GetDocOptions();
+options.SetAutoSpell(rValue.Value.get());
+GetDocument()->SetDocOptions(options);
+ }
+}
+
 // show us the text exactly
 ScInputOptions aInputOptions(SC_MOD()->GetInputOptions());
 aInputOptions.SetTextWysiwyg(true);
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index c9bd05d737d4..7464635e5e4d 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -128,6 +128,7 @@ public:
 void testRegenerateDiagram();
 void testLanguageAllText();
 void testInsertDeletePageInvalidation();
+void testSpellOnlineRenderParameter();
 
 CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
 CPPUNIT_TEST(testCreateDestroy);
@@ -180,6 +181,7 @@ public:
 CPPUNIT_TEST(testRegenerateDiagram);
 CPPUNIT_TEST(testLanguageAllText);
 CPPUNIT_TEST(testInsertDeletePageInvalidation);
+CPPUNIT_TEST(testSpellOnlineRenderParameter);
 
 CPPUNIT_TEST_SUITE_END();
 
@@ -2461,6 +2463,20 @@ void 
SdTiledRenderingTest::testInsertDeletePageInvalidation()
 CPPUNIT_ASSERT_EQUAL(size_t(8), aView1.m_aInvalidations.size());
 }
 
+void SdTiledRenderingTest::testSpellOnlineRenderParameter()
+{
+// Load the document.
+SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
+bool bSet = pXImpressDocument->GetDoc()->GetOnlineSpell();
+
+uno::Sequence aPropertyValues =
+{
+comphelper::InitPropertySequence({ { ".uno:SpellOnline", 
uno::makeAny(!bSet) } }),
+};
+

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

2020-11-29 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 201edc324fb9c4922ab4aa3c7233676ed43a8e03
Author: Mert Tumer 
AuthorDate: Fri Nov 27 16:56:53 2020 +0300
Commit: Mert Tumer 
CommitDate: Sun Nov 29 17:08:13 2020 +0100

Fix unmodified pdf does forced-save

This is a problem when dealing with the large
pdfs which take long amount of time to save.
Adding or removing annotations do change the state of
IsModified()

Change-Id: I872cb3aec5188986cc13c6659e1bb741a6870409
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106778
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 455cd8fe00d1c756da1bb50a50bac68a1ad645ef)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106741
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 8395e81057b9..f53fd96eb609 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3808,7 +3808,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 {
 // Check if saving a PDF file
 OUString aMimeType = lcl_getCurrentDocumentMimeType(pDocument);
-if (aMimeType == "application/pdf")
+if (pDocSh->IsModified() && aMimeType == "application/pdf")
 {
 // If we have a PDF file (for saving annotations for example), we 
need
 // to run save-as to the same file as the opened document. Plain 
save
___
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' - desktop/source

2020-11-15 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 21aa33dff0fe32bdba5ab67f10c7af0fb64b9c88
Author: Mert Tumer 
AuthorDate: Sun Nov 15 13:16:53 2020 +0300
Commit: Mert Tumer 
CommitDate: Sun Nov 15 15:52:18 2020 +0100

Remove Bottom DrawTextFlag on renderFont for Watermark

Alignment should be done for watermark in online side
this breaks the positioning.

Change-Id: I202f671269aaacd266f6443a5e336d987f680a72
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105898
Tested-by: Jenkins CollaboraOffice 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 0d80378f7c31..a36b4aef2052 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5353,7 +5353,6 @@ unsigned char* 
doc_renderFontOrientation(SAL_UNUSED_PARAMETER LibreOfficeKitDocu
 DrawTextFlags const nStyle =
 DrawTextFlags::Center
 | DrawTextFlags::VCenter
-| DrawTextFlags::Bottom
 | DrawTextFlags::MultiLine
 | DrawTextFlags::WordBreak;// | 
DrawTextFlags::WordBreakHyphenation ;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-15 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 49b80617171a348437e62948e128b6b2b8bf
Author: Mert Tumer 
AuthorDate: Sun Nov 15 13:16:53 2020 +0300
Commit: Mert Tumer 
CommitDate: Sun Nov 15 17:36:49 2020 +0100

Remove Bottom DrawTextFlag on renderFont for Watermark

Alignment should be done for watermark in online side
this breaks the positioning.

Change-Id: I202f671269aaacd266f6443a5e336d987f680a72
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105853
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index b31d68dc5391..8f82d577f3cc 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5322,7 +5322,6 @@ unsigned char* 
doc_renderFontOrientation(SAL_UNUSED_PARAMETER LibreOfficeKitDocu
 DrawTextFlags const nStyle =
 DrawTextFlags::Center
 | DrawTextFlags::VCenter
-| DrawTextFlags::Bottom
 | DrawTextFlags::MultiLine
 | DrawTextFlags::WordBreak;// | 
DrawTextFlags::WordBreakHyphenation ;
 
___
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' - sd/source

2021-01-05 Thread Mert Tumer (via logerrit)
 sd/source/ui/view/drviewse.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit ed58d457d58cc95a931037f4f574588ab50d22b7
Author: Mert Tumer 
AuthorDate: Wed Dec 9 14:13:26 2020 +0300
Commit: Jan Holesovsky 
CommitDate: Tue Jan 5 11:01:30 2021 +0100

Insert draw connectors directly for online

Change-Id: I962a69c142151a43c47efbdb79428760ab07ad98
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108682
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 3ae9b37171b0..e330d0416ce8 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -451,6 +451,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
 case SID_CONNECTOR_LINES_CIRCLES:
 case SID_INSERT_SIGNATURELINE:
 {
+bCreateDirectly = comphelper::LibreOfficeKit::isActive();
 SetCurrentFunction( FuConstructRectangle::Create( this, 
GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) );
 rReq.Done();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-01-20 Thread Mert Tumer (via logerrit)
 sd/source/ui/view/drviewse.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5dbdf1d0833eaa5868bff4cef0714ee4cef81cb8
Author: Mert Tumer 
AuthorDate: Wed Dec 9 14:13:26 2020 +0300
Commit: Mert Tumer 
CommitDate: Thu Jan 21 08:13:32 2021 +0100

Insert draw connectors directly for online

Change-Id: I962a69c142151a43c47efbdb79428760ab07ad98
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108682
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109214
Tested-by: Jenkins

diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index db9662bb7650..bd4c3775300d 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -448,6 +448,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
 case SID_CONNECTOR_LINES_CIRCLES:
 case SID_INSERT_SIGNATURELINE:
 {
+bCreateDirectly = comphelper::LibreOfficeKit::isActive();
 SetCurrentFunction( FuConstructRectangle::Create( this, 
GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) );
 rReq.Done();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-01-17 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit d2baba68d32fa93e758dcc9c9a890206065ea9ac
Author: Mert Tumer 
AuthorDate: Thu Dec 10 11:59:06 2020 +0300
Commit: Mert Tumer 
CommitDate: Sun Jan 17 09:18:43 2021 +0100

fix rendershapeselection for drawing

Change-Id: Id4cb37885bf9b442adc679b895d89cd615ffb2ee
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108681
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109213
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 86cab63684f9..c8090aeff672 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3619,6 +3619,9 @@ static size_t 
doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu
 case LOK_DOCTYPE_PRESENTATION:
 aMediaDescriptor["FilterName"] <<= 
OUString("impress_svg_Export");
 break;
+case LOK_DOCTYPE_DRAWING:
+aMediaDescriptor["FilterName"] <<= OUString("draw_svg_Export");
+break;
 case LOK_DOCTYPE_TEXT:
 aMediaDescriptor["FilterName"] <<= 
OUString("writer_svg_Export");
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-01-21 Thread Mert Tumer (via logerrit)
 vcl/source/app/salvtables.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f72c5680b0e10ad59e2abf0ebc1e71c94c41d173
Author: Mert Tumer 
AuthorDate: Wed Dec 16 21:02:42 2020 +0300
Commit: Mert Tumer 
CommitDate: Fri Jan 22 05:17:06 2021 +0100

Fix MouseClick shoud be MouseLeft for drawing area

Change-Id: I4dd0c6862c6473d3cbfcc4535c2d2ebe4a0a238a
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108683
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109215
Tested-by: Jenkins

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 6183b1a3ac24..fe93e637a823 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5921,7 +5921,7 @@ OutputDevice& SalInstanceDrawingArea::get_ref_device() { 
return *m_xDrawingArea;
 
 void SalInstanceDrawingArea::click(const Point& rPos)
 {
-MouseEvent aEvent(rPos);
+MouseEvent aEvent(rPos, 1, MouseEventModifiers::NONE, MOUSE_LEFT, 0);
 m_xDrawingArea->MouseButtonDown(aEvent);
 m_xDrawingArea->MouseButtonUp(aEvent);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-01-14 Thread Mert Tumer (via logerrit)
 vcl/source/window/builder.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ca8ba00bb851e9a0c11f3494386cb549e587fcc2
Author: Mert Tumer 
AuthorDate: Wed Dec 16 23:00:11 2020 +0300
Commit: Szymon KÅ‚os 
CommitDate: Fri Jan 15 08:37:57 2021 +0100

jsdialogs: Use JS dialog for Fontwork dialog

Change-Id: I4d2206550f7d3948f373c803888c7d19034e42c4
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108684
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon KÅ‚os 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109217
Tested-by: Szymon KÅ‚os 

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 3335296e8128..9371a9b1eca7 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -208,7 +208,8 @@ weld::Builder* Application::CreateBuilder(weld::Widget* 
pParent, const OUString
 || rUIFile == "uui/ui/macrowarnmedium.ui"
 || rUIFile == "modules/scalc/ui/datafielddialog.ui"
 || rUIFile == "modules/scalc/ui/pivotfielddialog.ui"
-|| rUIFile == "modules/scalc/ui/datafieldoptionsdialog.ui")
+|| rUIFile == "modules/scalc/ui/datafieldoptionsdialog.ui"
+|| rUIFile == "svx/ui/fontworkgallerydialog.ui")
 {
 bUseJSBuilder = true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/jsdialog

2021-07-06 Thread Mert Tumer (via logerrit)
 vcl/jsdialog/executor.cxx |   19 +++
 1 file changed, 19 insertions(+)

New commits:
commit 2779e669fd54695ace5a9425280d1efca93729b6
Author: Mert Tumer 
AuthorDate: Wed Dec 16 23:01:25 2020 +0300
Commit: Mert Tumer 
CommitDate: Tue Jul 6 09:02:18 2021 +0200

jsdialogs: send click pos for drawingarea

Change-Id: I91aae808fe17f47fe9fa75dca069e4919c2ce4c3
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108685
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109216
Tested-by: Jenkins

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index c8659b22158e..39d39601c02f 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -141,6 +141,25 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 {
 if (sAction == "click")
 {
+int separatorPos = rData["data"].indexOf(';');
+if (separatorPos > 0)
+{
+// x;y
+std::string_view clickPosX = OUStringToOString(
+rData["data"].subView(0, separatorPos), 
RTL_TEXTENCODING_ASCII_US);
+std::string_view clickPosY = OUStringToOString(
+rData["data"].subView(separatorPos + 1), 
RTL_TEXTENCODING_ASCII_US);
+if (!clickPosX.empty() && !clickPosY.empty())
+{
+double posX = std::atof(clickPosX.data());
+double posY = std::atof(clickPosY.data());
+Size size = pArea->get_size_request();
+posX = posX * size.Width();
+posY = posY * size.Height();
+LOKTrigger::trigger_click(*pArea, Point(posX, 
posY));
+return true;
+}
+}
 LOKTrigger::trigger_click(*pArea, Point(10, 10));
 return true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 5 commits - desktop/source sc/qa sc/source sd/qa sd/source sw/qa sw/source vcl/jsdialog vcl/source

2021-04-08 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx|3 +++
 sc/qa/unit/tiledrendering/tiledrendering.cxx   |   17 +
 sc/source/ui/unoobj/docuno.cxx |   12 +++-
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |   16 
 sd/source/ui/unoidl/unomodel.cxx   |2 ++
 sd/source/ui/view/drviewse.cxx |1 +
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   17 +
 sw/source/uibase/uno/unotxdoc.cxx  |2 ++
 vcl/jsdialog/executor.cxx  |   17 +
 vcl/source/app/salvtables.cxx  |2 +-
 10 files changed, 87 insertions(+), 2 deletions(-)

New commits:
commit 4c6040c6a59f00f0a2b62d456e809af0c2f3adab
Author: Mert Tumer 
AuthorDate: Wed Dec 16 23:01:25 2020 +0300
Commit: Andras Timar 
CommitDate: Thu Apr 8 15:17:10 2021 +0200

jsdialogs: send click pos for drawingarea

Change-Id: I91aae808fe17f47fe9fa75dca069e4919c2ce4c3
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108685
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx
index c538371a4f2b..f338cb6830b2 100644
--- a/vcl/jsdialog/executor.cxx
+++ b/vcl/jsdialog/executor.cxx
@@ -119,6 +119,23 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& 
rWidget, StringMap& rDat
 {
 if (sAction == "click")
 {
+int separatorPos = rData["data"].indexOf(';');
+if (separatorPos > 0)
+{
+// x;y
+OString clickPosX = 
OUStringToOString(rData["data"].copy(0, separatorPos),  
RTL_TEXTENCODING_ASCII_US);
+OString  clickPosY = 
OUStringToOString(rData["data"].copy(separatorPos + 1),  
RTL_TEXTENCODING_ASCII_US);
+if (!clickPosX.isEmpty() && !clickPosY.isEmpty())
+{
+double posX = std::atof(clickPosX.getStr());
+double posY = std::atof(clickPosY.getStr());
+Size size = pArea->get_size_request();
+posX = posX * size.Width();
+posY = posY * size.Height();
+LOKTrigger::trigger_click(*pArea, Point(posX, 
posY));
+return true;
+}
+}
 LOKTrigger::trigger_click(*pArea, Point(10, 10));
 return true;
 }
commit 1b7d097d004cc7a629af4d3b8c8ff973a600c704
Author: Mert Tumer 
AuthorDate: Thu Dec 10 11:59:06 2020 +0300
Commit: Andras Timar 
CommitDate: Thu Apr 8 15:15:59 2021 +0200

fix rendershapeselection for drawing

Change-Id: Id4cb37885bf9b442adc679b895d89cd615ffb2ee
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108681
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109213
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 352dc13d5576..7ea03307b40c 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3616,6 +3616,9 @@ static size_t 
doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu
 case LOK_DOCTYPE_PRESENTATION:
 aMediaDescriptor["FilterName"] <<= 
OUString("impress_svg_Export");
 break;
+case LOK_DOCTYPE_DRAWING:
+aMediaDescriptor["FilterName"] <<= OUString("draw_svg_Export");
+break;
 case LOK_DOCTYPE_TEXT:
 aMediaDescriptor["FilterName"] <<= 
OUString("writer_svg_Export");
 break;
commit 470110a48ce3c975945bd2d3bae2578a65adb6e9
Author: Mert Tumer 
AuthorDate: Wed Dec 16 21:02:42 2020 +0300
Commit: Andras Timar 
CommitDate: Thu Apr 8 15:15:46 2021 +0200

Fix MouseClick shoud be MouseLeft for drawing area

Change-Id: I4dd0c6862c6473d3cbfcc4535c2d2ebe4a0a238a
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108683
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109215
Tested-by: Jenkins

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index f80d51e605ef..4b7ccce0153c 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5872,7 +5872,7 @@ OutputDevice& SalInstanceDrawingArea::get_ref_device() { 
return *m_xDrawingArea;
 
 void SalInstanceDrawingArea::click(const Point& rPos)
 {
-MouseEvent aEvent(rPos);
+MouseEvent aEvent(rPos, 1, MouseEventModifiers::NONE, MOUSE_LEFT, 0);
 m_xDrawingArea->MouseButtonDown(aEvent);
 m_xDrawingArea->MouseButtonUp(aEvent);
 }
commit 

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

2021-08-10 Thread Mert Tumer (via logerrit)
 sfx2/source/sidebar/SidebarController.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 81055959e06848c917c4df1e4f19e1e5c6e70684
Author: Mert Tumer 
AuthorDate: Fri Aug 6 12:42:16 2021 +0300
Commit: Mert Tumer 
CommitDate: Tue Aug 10 12:27:54 2021 +0200

lok: Avoid redundant call to UpdateConfigurations

We call doc_setView each time we send an event to LOK such as keystroke
and SidebarController::notifyContextChange event is triggered after that
UpdateConfigurations() call causes layout reallocating for whole sidebar
and we end up keep doing it. It takes significant amount of cpu time for
lok case for no reason.

Signed-off-by: Mert Tumer 
Change-Id: I8f456156af841fdeaba1934498863a07a7d4554e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120112
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 
(cherry picked from commit b606764ce2a042f2a38c98820d7236661149d20c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120138
Tested-by: Jenkins

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index b81080c546cd..fff93887c3a7 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -355,7 +355,8 @@ void SAL_CALL SidebarController::notifyContextChangeEvent 
(const css::ui::Contex
  // calling with held
  // solarmutex
 // TODO: this call is redundant but mandatory for unit test to update 
context on document loading
-UpdateConfigurations();
+if (!comphelper::LibreOfficeKit::isActive())
+UpdateConfigurations();
 }
 }
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sfx2/source

2021-08-06 Thread Mert Tumer (via logerrit)
 sfx2/source/sidebar/SidebarController.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit b606764ce2a042f2a38c98820d7236661149d20c
Author: Mert Tumer 
AuthorDate: Fri Aug 6 12:42:16 2021 +0300
Commit: Michael Meeks 
CommitDate: Fri Aug 6 15:26:03 2021 +0200

lok: Avoid redundant call to UpdateConfigurations

We call doc_setView each time we send an event to LOK such as keystroke
and SidebarController::notifyContextChange event is triggered after that
UpdateConfigurations() call causes layout reallocating for whole sidebar
and we end up keep doing it. It takes significant amount of cpu time for
lok case for no reason.

Signed-off-by: Mert Tumer 
Change-Id: I8f456156af841fdeaba1934498863a07a7d4554e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120112
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index 266a69f5dcbe..db4f9679e34a 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -333,7 +333,8 @@ void SAL_CALL SidebarController::notifyContextChangeEvent 
(const css::ui::Contex
  // calling with held
  // solarmutex
 // TODO: this call is redundant but mandatory for unit test to update 
context on document loading
-UpdateConfigurations();
+if (!comphelper::LibreOfficeKit::isActive())
+UpdateConfigurations();
 }
 }
 


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

2021-10-14 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4c5b693267fac35c83e59f3288a1d46b99f02eea
Author: Mert Tumer 
AuthorDate: Fri Oct 1 15:34:33 2021 +0300
Commit: Szymon KÅ‚os 
CommitDate: Fri Oct 15 07:24:31 2021 +0200

lok: Fix graphicselection INPLACE msg is filtered out

INPLACE message is not at the beginning,
search it instead

Signed-off-by: Mert Tumer 
Change-Id: I2a09ac5a664c1ff26790aa776d871ac34c3d99dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122919
Reviewed-by: Szymon KÅ‚os 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123522
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 8156b3b2b40f..1d9c482c8f14 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1667,7 +1667,7 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 // remove only selection ranges and 'EMPTY' messages
 // always send 'INPLACE' and 'INPLACE EXIT' messages
 removeAll(type, [payload] (const CallbackData& elemData)
-{ return (elemData.PayloadString[0] != 'I'); });
+{ return (elemData.PayloadString.find("INPLACE") == 
std::string::npos); });
 }
 break;
 }


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - desktop/source

2021-10-01 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e3f45fdc1e6547b35ab69a01e57ee7c926b8b7e7
Author: Mert Tumer 
AuthorDate: Fri Oct 1 15:34:33 2021 +0300
Commit: Mert Tumer 
CommitDate: Fri Oct 1 19:45:46 2021 +0200

lok: Fix graphicselection INPLACE msg is filtered out

INPLACE message is not at the beginning,
search it instead

Signed-off-by: Mert Tumer 
Change-Id: I2a09ac5a664c1ff26790aa776d871ac34c3d99dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122919
Reviewed-by: Szymon KÅ‚os 
Tested-by: Jenkins CollaboraOffice 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index dab77ee9aa8b..7e92549a7cb9 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1673,7 +1673,7 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 // remove only selection ranges and 'EMPTY' messages
 // always send 'INPLACE' and 'INPLACE EXIT' messages
 removeAll(type, [payload] (const CallbackData& elemData)
-{ return (elemData.PayloadString[0] != 'I'); });
+{ return (elemData.PayloadString.find("INPLACE") == 
std::string::npos); });
 }
 break;
 }


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - desktop/source sfx2/source

2022-01-10 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |7 ++-
 sfx2/source/view/viewsh.cxx |1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 09b30a80a3b2a58d981b712f8bd184410c222535
Author: Mert Tumer 
AuthorDate: Mon Jan 10 13:23:03 2022 +0300
Commit: Mert Tumer 
CommitDate: Mon Jan 10 13:13:40 2022 +0100

lok: Fix freshly added comments are not displayed

Signed-off-by: Mert Tumer 
Change-Id: Ice772eff8b9f8ae8c23ec1e66675e33a80492028
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128217
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon KÅ‚os 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 1ef25f2c5dc6..545e7182068e 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1585,13 +1585,18 @@ void CallbackFlushHandler::queue(const int type, 
CallbackData& aCallbackData)
 SAL_INFO("lok", "Queue: [" << type << "]: [" << aCallbackData.getPayload() 
<< "] on " << m_queue1.size() << " entries.");
 
 bool bIsChartActive = false;
+bool bIsComment = false;
 if (type == LOK_CALLBACK_GRAPHIC_SELECTION)
 {
 LokChartHelper aChartHelper(SfxViewShell::Current());
 bIsChartActive = aChartHelper.GetWindow() != nullptr;
 }
+else if (type == LOK_CALLBACK_COMMENT)
+{
+bIsComment = true;
+}
 
-if (callbacksDisabled() && !bIsChartActive)
+if (callbacksDisabled() && !bIsChartActive && !bIsComment)
 {
 // We drop notifications when this is set, except for important ones.
 // When we issue a complex command (such as .uno:InsertAnnotation)
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index d1c0e48ba18e..292f6f4fe096 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1455,6 +1455,7 @@ static bool ignoreLibreOfficeKitViewCallback(int nType, 
const SfxViewShell_Impl*
 {
 case LOK_CALLBACK_FORM_FIELD_BUTTON:
 case LOK_CALLBACK_TEXT_SELECTION:
+case LOK_CALLBACK_COMMENT:
 break;
 default:
 // Reject e.g. invalidate during paint.


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - desktop/source sfx2/source

2022-01-12 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |7 ++-
 sfx2/source/view/viewsh.cxx |1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 98d897ff144fa97b9b4db3a0e5657630747feca9
Author: Mert Tumer 
AuthorDate: Mon Jan 10 13:23:03 2022 +0300
Commit: Mert Tumer 
CommitDate: Wed Jan 12 09:47:09 2022 +0100

lok: Fix freshly added comments are not displayed

Signed-off-by: Mert Tumer 
Change-Id: Ice772eff8b9f8ae8c23ec1e66675e33a80492028
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128217
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon KÅ‚os 
(cherry picked from commit 09b30a80a3b2a58d981b712f8bd184410c222535)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128229

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 632deac8fd42..0c93a7f9d626 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1477,13 +1477,18 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 SAL_INFO("lok", "Queue: [" << type << "]: [" << payload << "] on " << 
m_queue1.size() << " entries.");
 
 bool bIsChartActive = false;
+bool bIsComment = false;
 if (type == LOK_CALLBACK_GRAPHIC_SELECTION)
 {
 LokChartHelper aChartHelper(SfxViewShell::Current());
 bIsChartActive = aChartHelper.GetWindow() != nullptr;
 }
+else if (type == LOK_CALLBACK_COMMENT)
+{
+bIsComment = true;
+}
 
-if (callbacksDisabled() && !bIsChartActive)
+if (callbacksDisabled() && !bIsChartActive && !bIsComment)
 {
 // We drop notifications when this is set, except for important ones.
 // When we issue a complex command (such as .uno:InsertAnnotation)
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index c59db5582ea9..f8f4f615966b 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1480,6 +1480,7 @@ void SfxViewShell::libreOfficeKitViewCallback(int nType, 
const char* pPayload) c
 {
 case LOK_CALLBACK_FORM_FIELD_BUTTON:
 case LOK_CALLBACK_TEXT_SELECTION:
+case LOK_CALLBACK_COMMENT:
 break;
 default:
 // Reject e.g. invalidate during paint.


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/source

2022-01-11 Thread Mert Tumer (via logerrit)
 sc/source/ui/docshell/docsh.cxx |   29 ++---
 1 file changed, 18 insertions(+), 11 deletions(-)

New commits:
commit 108a6044debbe0831b7a8309e2a5fba23e384b39
Author: Mert Tumer 
AuthorDate: Wed Dec 29 16:34:38 2021 +0300
Commit: Andras Timar 
CommitDate: Tue Jan 11 13:40:44 2022 +0100

LOK android: Fix csv sheet name becomes temp name

Signed-off-by: Mert Tumer 
Change-Id: If43d7a995a5e53734fc7ecdcbf9b750b4886dc45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127684
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 6a8e1e477743..f8258883a98b 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -132,6 +132,8 @@
 #include 
 #include 
 
+#include 
+
 using namespace com::sun::star;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::lang::XMultiServiceFactory;
@@ -1286,17 +1288,22 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
 sc::SetFormulaDirtyContext aCxt;
 m_aDocument.SetAllFormulasDirty(aCxt);
 
-// The same resulting name has to be handled in
-// ScExternalRefCache::initializeDoc() and related, hence
-// pass 'true' for RenameTab()'s bExternalDocument for a
-// composed name so ValidTabName() will not be checked,
-// which could veto the rename in case it contained
-// characters that Excel does not handle. If we wanted to
-// change that then it needed to be handled in all
-// corresponding places of the external references
-// manager/cache. Likely then we'd also need a method to
-// compose a name excluding such characters.
-m_aDocument.RenameTab( 0, INetURLObject( 
rMedium.GetName()).GetBase(), true/*bExternalDocument*/);
+bool bIsMobile = comphelper::LibreOfficeKit::isActive() && 
SfxViewShell::Current()
+&& SfxViewShell::Current()->isLOKMobilePhone();
+// for mobile case, we use a copy of the original document 
and give it a temporary name before editing
+// Therefore, the sheet name becomes ugly, long and 
nonsensical.
+if (!bIsMobile)
+// The same resulting name has to be handled in
+// ScExternalRefCache::initializeDoc() and related, 
hence
+// pass 'true' for RenameTab()'s bExternalDocument for 
a
+// composed name so ValidTabName() will not be checked,
+// which could veto the rename in case it contained
+// characters that Excel does not handle. If we wanted 
to
+// change that then it needed to be handled in all
+// corresponding places of the external references
+// manager/cache. Likely then we'd also need a method 
to
+// compose a name excluding such characters.
+m_aDocument.RenameTab( 0, INetURLObject( 
rMedium.GetName()).GetBase(), true/*bExternalDocument*/);
 
 bOverflowRow = aImpEx.IsOverflowRow();
 bOverflowCol = aImpEx.IsOverflowCol();


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

2022-03-14 Thread Mert Tumer (via logerrit)
 sw/source/core/crsr/viscrs.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 3a2c156eb8b5e68e9de430e788a57e0c220f7e3a
Author: Mert Tumer 
AuthorDate: Fri Feb 25 13:05:28 2022 +0300
Commit: Mert Tumer 
CommitDate: Mon Mar 14 11:53:31 2022 +0100

dont send text selection start/end when there is no selection

when there is no selection, startrect and endrect get the
cursor coordinates, we should not send it. Otherwise this
causes selection handles to appear on online

Signed-off-by: Mert Tumer 
Change-Id: I4402e04d4a16a1f840499c57421fd01caf43f116
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130525
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon KÅ‚os 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131520
Tested-by: Jenkins

diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 26e43813575d..0501162a2a16 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -521,6 +521,13 @@ OString SwSelPaintRects::getLOKPayload( int nType, int 
nViewId, bool* ignore ) c
 SwRect aEndRect;
 FillStartEnd(aStartRect, aEndRect);
 
+// no selection rect
+if (!size())
+{
+*ignore = true;
+return OString();
+}
+
 if( nType == LOK_CALLBACK_TEXT_SELECTION_START )
 {
 if (aStartRect.HasArea())


[Libreoffice-commits] core.git: 2 commits - include/svtools sc/source svx/source

2022-03-14 Thread Mert Tumer (via logerrit)
 include/svtools/ctrlbox.hxx  |1 +
 sc/source/ui/view/gridwin.cxx|7 +++
 svx/source/tbxctrls/tbcontrl.cxx |5 -
 3 files changed, 12 insertions(+), 1 deletion(-)

New commits:
commit dc05d912b56751ee53e2ee3d2638d85829b6a2d9
Author: Mert Tumer 
AuthorDate: Tue Jan 18 12:57:16 2022 +0300
Commit: Mert Tumer 
CommitDate: Mon Mar 14 11:52:59 2022 +0100

set active element to -1 when no selection for fontnamebox

FontNameBox sets the currentVal to emptystring when there's
a mixed font-name selection on the text but does not update
the active_element which is incorrect whereas other comboboxes such
as FontSize does it correctly.

Signed-off-by: Mert Tumer 
Change-Id: Iff86bba64c2ab564ff5c5fa979eb846af9651a11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128551
Reviewed-by: Szymon KÅ‚os 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131518
Tested-by: Jenkins

diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 28730d16e85a..ca45b081cf5a 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -368,6 +368,7 @@ public:
 int get_active() const { return m_xComboBox->get_active(); }
 OUString get_active_text() const { return m_xComboBox->get_active_text(); }
 void set_active_or_entry_text(const OUString& rText);
+void set_active(int nPos) { m_xComboBox->set_active(nPos); }
 int get_count() const { return m_xComboBox->get_count(); }
 OUString get_text(int nIndex) const { return 
m_xComboBox->get_text(nIndex); }
 void set_sensitive(bool bSensitive) { 
m_xComboBox->set_sensitive(bSensitive); }
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index d9971a2e5f21..70b14ee14bba 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3159,8 +3159,11 @@ void SvxFontNameBox_Base::statusChanged_Impl( const 
css::frame::FeatureStateEven
 css::awt::FontDescriptor aFontDesc;
 if ( rEvent.State >>= aFontDesc )
 Update();
-else
+else {
+// no active element; delete value in the display
+m_xWidget->set_active(-1);
 set_active_or_entry_text("");
+}
 m_xWidget->save_value();
 }
 }
commit 74d24d03afc58a535d3afb7d0c2d172fa1636829
Author: Mert Tumer 
AuthorDate: Wed Jan 12 19:02:23 2022 +0300
Commit: Mert Tumer 
CommitDate: Mon Mar 14 11:52:47 2022 +0100

lok: remove residue text selection when there's none in the core

Residue selection can stay at the browser even after changing the 
cellcursor pos
make sure to clean it up if there is no selection rectangle in reality
to be synced with core.

Signed-off-by: Mert Tumer 
Change-Id: I1b06b6ec84ae195936d12dc986ef4a19b26dbc8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128351
Tested-by: Jenkins CollaboraOffice 
Tested-by: Henry Castro 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131517

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index e676dcfadd42..b5c6965cbcc1 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5932,6 +5932,13 @@ void ScGridWindow::notifyKitCellCursor() const
 pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_CURSOR, 
getCellCursor().getStr());
 if (bListValButton && aListValPos == mrViewData.GetCurPos())
 updateLOKValListButton(true, aListValPos);
+std::vector aRects;
+GetSelectionRects(aRects);
+if (aRects.empty() || !mrViewData.IsActive())
+{
+pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, 
"");
+SfxLokHelper::notifyOtherViews(pViewShell, 
LOK_CALLBACK_TEXT_VIEW_SELECTION, "selection", "EMPTY");
+}
 }
 
 void ScGridWindow::notifyKitCellViewCursor(const SfxViewShell* pForShell) const


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 2 commits - desktop/source sfx2/source sw/source

2022-03-14 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx|7 ++-
 sfx2/source/view/viewsh.cxx|1 +
 sw/source/core/crsr/viscrs.cxx |7 +++
 3 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 5bd14dff1d20250f52c23a11f8f54da639c072a1
Author: Mert Tumer 
AuthorDate: Fri Feb 25 13:05:28 2022 +0300
Commit: Mert Tumer 
CommitDate: Mon Mar 14 11:46:25 2022 +0100

dont send text selection start/end when there is no selection

when there is no selection, startrect and endrect get the
cursor coordinates, we should not send it. Otherwise this
causes selection handles to appear on online

Signed-off-by: Mert Tumer 
Change-Id: I4402e04d4a16a1f840499c57421fd01caf43f116
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130525
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon KÅ‚os 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131522

diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 26e43813575d..0501162a2a16 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -521,6 +521,13 @@ OString SwSelPaintRects::getLOKPayload( int nType, int 
nViewId, bool* ignore ) c
 SwRect aEndRect;
 FillStartEnd(aStartRect, aEndRect);
 
+// no selection rect
+if (!size())
+{
+*ignore = true;
+return OString();
+}
+
 if( nType == LOK_CALLBACK_TEXT_SELECTION_START )
 {
 if (aStartRect.HasArea())
commit 318e2b0e8dc7901271a121b8fd11e89cbc65d335
Author: Mert Tumer 
AuthorDate: Mon Jan 10 13:23:03 2022 +0300
Commit: Mert Tumer 
CommitDate: Mon Mar 14 11:46:14 2022 +0100

lok: Fix freshly added comments are not displayed

Signed-off-by: Mert Tumer 
Change-Id: Ice772eff8b9f8ae8c23ec1e66675e33a80492028
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128217
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon KÅ‚os 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131521

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 9720a7a78967..183578df411a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1484,13 +1484,18 @@ void CallbackFlushHandler::queue(const int type, 
CallbackData& aCallbackData)
 SAL_INFO("lok", "Queue: [" << type << "]: [" << aCallbackData.getPayload() 
<< "] on " << m_queue1.size() << " entries.");
 
 bool bIsChartActive = false;
+bool bIsComment = false;
 if (type == LOK_CALLBACK_GRAPHIC_SELECTION)
 {
 LokChartHelper aChartHelper(SfxViewShell::Current());
 bIsChartActive = aChartHelper.GetWindow() != nullptr;
 }
+else if (type == LOK_CALLBACK_COMMENT)
+{
+bIsComment = true;
+}
 
-if (callbacksDisabled() && !bIsChartActive)
+if (callbacksDisabled() && !bIsChartActive && !bIsComment)
 {
 // We drop notifications when this is set, except for important ones.
 // When we issue a complex command (such as .uno:InsertAnnotation)
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index f4ec9b29b0a1..cbb3749ec737 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1447,6 +1447,7 @@ static bool ignoreLibreOfficeKitViewCallback(int nType, 
const SfxViewShell_Impl*
 {
 case LOK_CALLBACK_FORM_FIELD_BUTTON:
 case LOK_CALLBACK_TEXT_SELECTION:
+case LOK_CALLBACK_COMMENT:
 break;
 default:
 // Reject e.g. invalidate during paint.


[Libreoffice-commits] core.git: 2 commits - desktop/source sc/source sfx2/source

2022-03-14 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |7 ++-
 sc/source/ui/docshell/docsh.cxx |   29 ++---
 sfx2/source/view/viewsh.cxx |1 +
 3 files changed, 25 insertions(+), 12 deletions(-)

New commits:
commit 422fd364934d93ea02a614e8f431bfc1126b5a2d
Author: Mert Tumer 
AuthorDate: Wed Dec 29 16:34:38 2021 +0300
Commit: Mert Tumer 
CommitDate: Mon Mar 14 11:52:33 2022 +0100

LOK android: Fix csv sheet name becomes temp name

Signed-off-by: Mert Tumer 
Change-Id: If43d7a995a5e53734fc7ecdcbf9b750b4886dc45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127684
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131516

diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 4179a0ba5acf..8c64e3a8416f 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -137,6 +137,8 @@
 #include 
 #include 
 
+#include 
+
 using namespace com::sun::star;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::lang::XMultiServiceFactory;
@@ -1286,17 +1288,22 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
 sc::SetFormulaDirtyContext aCxt;
 m_aDocument.SetAllFormulasDirty(aCxt);
 
-// The same resulting name has to be handled in
-// ScExternalRefCache::initializeDoc() and related, hence
-// pass 'true' for RenameTab()'s bExternalDocument for a
-// composed name so ValidTabName() will not be checked,
-// which could veto the rename in case it contained
-// characters that Excel does not handle. If we wanted to
-// change that then it needed to be handled in all
-// corresponding places of the external references
-// manager/cache. Likely then we'd also need a method to
-// compose a name excluding such characters.
-m_aDocument.RenameTab( 0, INetURLObject( 
rMedium.GetName()).GetBase(), true/*bExternalDocument*/);
+bool bIsMobile = comphelper::LibreOfficeKit::isActive() && 
SfxViewShell::Current()
+&& SfxViewShell::Current()->isLOKMobilePhone();
+// for mobile case, we use a copy of the original document 
and give it a temporary name before editing
+// Therefore, the sheet name becomes ugly, long and 
nonsensical.
+if (!bIsMobile)
+// The same resulting name has to be handled in
+// ScExternalRefCache::initializeDoc() and related, 
hence
+// pass 'true' for RenameTab()'s bExternalDocument for 
a
+// composed name so ValidTabName() will not be checked,
+// which could veto the rename in case it contained
+// characters that Excel does not handle. If we wanted 
to
+// change that then it needed to be handled in all
+// corresponding places of the external references
+// manager/cache. Likely then we'd also need a method 
to
+// compose a name excluding such characters.
+m_aDocument.RenameTab( 0, INetURLObject( 
rMedium.GetName()).GetBase(), true/*bExternalDocument*/);
 
 bOverflowRow = aImpEx.IsOverflowRow();
 bOverflowCol = aImpEx.IsOverflowCol();
commit 2df5a083a83f6e83ac45465d4b65887421ac945d
Author: Mert Tumer 
AuthorDate: Mon Jan 10 13:23:03 2022 +0300
Commit: Mert Tumer 
CommitDate: Mon Mar 14 11:52:20 2022 +0100

lok: Fix freshly added comments are not displayed

Signed-off-by: Mert Tumer 
Change-Id: Ice772eff8b9f8ae8c23ec1e66675e33a80492028
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128217
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon KÅ‚os 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131515
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index b5db7f8cb1e6..0e1c47e9b5dc 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1479,13 +1479,18 @@ void CallbackFlushHandler::queue(const int type, 
CallbackData& aCallbackData)
 SAL_INFO("lok", "Queue: [" << type << "]: [" << aCallbackData.getPayload() 
<< "] on " << m_queue1.size() << " entries.");
 
 bool bIsChartActive = false;
+bool bIsComment = false;
 if (type == LOK_CALLBACK_GRAPHIC_SELECTION)
 {
 LokChartHelper aChartHelper(SfxViewShell::Current());
 bIsChartActive = aChartHelper.GetWindow() != nullptr;
 }
+else if (type == LOK_CALLBACK_COMMENT)
+{
+bIsComment = true;
+}
 
-if (callbacksDisabled() && 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sw/source

2022-02-28 Thread Mert Tumer (via logerrit)
 sw/source/core/crsr/viscrs.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit bc86da350e3b5137a1a3c86b19f5c6c028b67b21
Author: Mert Tumer 
AuthorDate: Fri Feb 25 13:05:28 2022 +0300
Commit: Mert Tumer 
CommitDate: Mon Feb 28 17:54:24 2022 +0100

dont send text selection start/end when there is no selection

when there is no selection, startrect and endrect get the
cursor coordinates, we should not send it. Otherwise this
causes selection handles to appear on online

Signed-off-by: Mert Tumer 
Change-Id: I4402e04d4a16a1f840499c57421fd01caf43f116
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130525
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon KÅ‚os 

diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index f81f9750b312..6b8c3c5b71a2 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -524,6 +524,13 @@ OString SwSelPaintRects::getLOKPayload( int nType, int 
nViewId, bool* ignore ) c
 SwRect aEndRect;
 FillStartEnd(aStartRect, aEndRect);
 
+// no selection rect
+if (!size())
+{
+*ignore = true;
+return OString();
+}
+
 if( nType == LOK_CALLBACK_TEXT_SELECTION_START )
 {
 if (aStartRect.HasArea())


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

2022-03-01 Thread Mert Tumer (via logerrit)
 sc/source/ui/docshell/docsh.cxx |   29 ++---
 1 file changed, 18 insertions(+), 11 deletions(-)

New commits:
commit 8363d389fa70fc6a7ab16ce5b71e4ed9c815faa6
Author: Mert Tumer 
AuthorDate: Wed Dec 29 16:34:38 2021 +0300
Commit: Henry Castro 
CommitDate: Tue Mar 1 13:41:09 2022 +0100

LOK android: Fix csv sheet name becomes temp name

Signed-off-by: Mert Tumer 
Change-Id: If43d7a995a5e53734fc7ecdcbf9b750b4886dc45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127583
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 

diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 2bf345635645..551ab8d03f32 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -132,6 +132,8 @@
 #include 
 #include 
 
+#include 
+
 using namespace com::sun::star;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::lang::XMultiServiceFactory;
@@ -1305,17 +1307,22 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
 sc::SetFormulaDirtyContext aCxt;
 m_aDocument.SetAllFormulasDirty(aCxt);
 
-// The same resulting name has to be handled in
-// ScExternalRefCache::initializeDoc() and related, hence
-// pass 'true' for RenameTab()'s bExternalDocument for a
-// composed name so ValidTabName() will not be checked,
-// which could veto the rename in case it contained
-// characters that Excel does not handle. If we wanted to
-// change that then it needed to be handled in all
-// corresponding places of the external references
-// manager/cache. Likely then we'd also need a method to
-// compose a name excluding such characters.
-m_aDocument.RenameTab( 0, INetURLObject( 
rMedium.GetName()).GetBase(), true/*bExternalDocument*/);
+bool bIsMobile = comphelper::LibreOfficeKit::isActive() && 
SfxViewShell::Current()
+&& SfxViewShell::Current()->isLOKMobilePhone();
+// for mobile case, we use a copy of the original document 
and give it a temporary name before editing
+// Therefore, the sheet name becomes ugly, long and 
nonsensical.
+if (!bIsMobile)
+// The same resulting name has to be handled in
+// ScExternalRefCache::initializeDoc() and related, 
hence
+// pass 'true' for RenameTab()'s bExternalDocument for 
a
+// composed name so ValidTabName() will not be checked,
+// which could veto the rename in case it contained
+// characters that Excel does not handle. If we wanted 
to
+// change that then it needed to be handled in all
+// corresponding places of the external references
+// manager/cache. Likely then we'd also need a method 
to
+// compose a name excluding such characters.
+m_aDocument.RenameTab( 0, INetURLObject( 
rMedium.GetName()).GetBase(), true/*bExternalDocument*/);
 
 bOverflowRow = aImpEx.IsOverflowRow();
 bOverflowCol = aImpEx.IsOverflowCol();


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sw/source

2022-03-23 Thread Mert Tumer (via logerrit)
 sw/source/ui/table/instable.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit f1daf818764ea867fe37670433a4036c5154428e
Author: Mert Tumer 
AuthorDate: Wed Mar 23 14:23:23 2022 +0300
Commit: Andras Timar 
CommitDate: Wed Mar 23 16:55:14 2022 +0100

sw: change inserttable style option default to 1

Right now it is default to NONE in the list
if the user explicitly choses otherwise but that
does not align with inserttable option on the toolbar
there it is defaulted to "Default Table Style"
1 means "Default Table Style"

Signed-off-by: Mert Tumer 
Change-Id: I1db19f0292ac6775653b0db3f2860fea9e3b0adf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131971
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index b700b85d53fc..94e29d28665d 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -149,9 +149,8 @@ void SwInsTableDlg::InitAutoTableFormat()
 // Change this min variable if you add autotable manually.
 minTableIndexInLb = 1;
 maxTableIndexInLb = minTableIndexInLb + 
static_cast(pTableTable->size());
-lbIndex = 0;
-m_xLbFormat->select( lbIndex );
-tbIndex = lbIndexToTableIndex(lbIndex);
+m_xLbFormat->select( minTableIndexInLb );
+tbIndex = lbIndexToTableIndex( minTableIndexInLb );
 
 SelFormatHdl( *m_xLbFormat );
 }


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sw/source

2022-03-25 Thread Mert Tumer (via logerrit)
 sw/source/ui/table/instable.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit a4e7cc2a12ca3ea90ec21de96aa038f2447b40f8
Author: Mert Tumer 
AuthorDate: Fri Mar 25 17:56:30 2022 +0300
Commit: Gökay ŞATIR 
CommitDate: Fri Mar 25 19:39:10 2022 +0100

make default selected table style to Default Table Style for only online

unfortunately when the table has a style 
sw/qa/uitest/writer_tests4/tdf115573.py fails
because tables that have pre-applied style resets the style of the elements 
in their cells
when a new row is inserted and the ui test above relies on that. For now 
this is LOK only

Signed-off-by: Mert Tumer 
Change-Id: I2f60376fc2d929498aef45259a5ef291922ccdcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132124
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Gökay ŞATIR 

diff --git a/sw/source/ui/table/instable.cxx b/sw/source/ui/table/instable.cxx
index 94e29d28665d..1a3bafb14dc2 100644
--- a/sw/source/ui/table/instable.cxx
+++ b/sw/source/ui/table/instable.cxx
@@ -149,8 +149,13 @@ void SwInsTableDlg::InitAutoTableFormat()
 // Change this min variable if you add autotable manually.
 minTableIndexInLb = 1;
 maxTableIndexInLb = minTableIndexInLb + 
static_cast(pTableTable->size());
-m_xLbFormat->select( minTableIndexInLb );
-tbIndex = lbIndexToTableIndex( minTableIndexInLb );
+// 1 means default table style
+// unfortunately when the table has a style 
sw/qa/uitest/writer_tests4/tdf115573.py fails
+// because tables that have pre-applied style resets the style of the 
elements in their cells
+// when a new row is inserted and the ui test above relies on that. For 
now this is LOK only
+lbIndex = comphelper::LibreOfficeKit::isActive() ? 1 : 0;
+m_xLbFormat->select( lbIndex );
+tbIndex = lbIndexToTableIndex(lbIndex);
 
 SelFormatHdl( *m_xLbFormat );
 }


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/source

2022-03-22 Thread Mert Tumer (via logerrit)
 sc/source/ui/docshell/docsh.cxx |   30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 69deb41027783a8ca43aaf76816446234bc3a0a7
Author: Mert Tumer 
AuthorDate: Mon Mar 21 14:07:13 2022 +0300
Commit: Szymon KÅ‚os 
CommitDate: Tue Mar 22 12:44:43 2022 +0100

android: Fix tab name on CSV still becomes tempfile name

Unfortunately, in order for isLOKMObilePhone to work we need
to send deviceFormFactor on document load but at this stage
the document is still not loaded and the control does not work here

Signed-off-by: Mert Tumer 
Change-Id: I5388cf4a049dbf007a1fd79abefb64bed580eea1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131900
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon KÅ‚os 

diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index f8258883a98b..cad8403477d9 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+ #include 
+
 #include 
 
 #include 
@@ -1288,23 +1290,21 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
 sc::SetFormulaDirtyContext aCxt;
 m_aDocument.SetAllFormulasDirty(aCxt);
 
-bool bIsMobile = comphelper::LibreOfficeKit::isActive() && 
SfxViewShell::Current()
-&& SfxViewShell::Current()->isLOKMobilePhone();
 // for mobile case, we use a copy of the original document 
and give it a temporary name before editing
 // Therefore, the sheet name becomes ugly, long and 
nonsensical.
-if (!bIsMobile)
-// The same resulting name has to be handled in
-// ScExternalRefCache::initializeDoc() and related, 
hence
-// pass 'true' for RenameTab()'s bExternalDocument for 
a
-// composed name so ValidTabName() will not be checked,
-// which could veto the rename in case it contained
-// characters that Excel does not handle. If we wanted 
to
-// change that then it needed to be handled in all
-// corresponding places of the external references
-// manager/cache. Likely then we'd also need a method 
to
-// compose a name excluding such characters.
-m_aDocument.RenameTab( 0, INetURLObject( 
rMedium.GetName()).GetBase(), true/*bExternalDocument*/);
-
+#if !(defined ANDROID)
+// The same resulting name has to be handled in
+// ScExternalRefCache::initializeDoc() and related, hence
+// pass 'true' for RenameTab()'s bExternalDocument for a
+// composed name so ValidTabName() will not be checked,
+// which could veto the rename in case it contained
+// characters that Excel does not handle. If we wanted to
+// change that then it needed to be handled in all
+// corresponding places of the external references
+// manager/cache. Likely then we'd also need a method to
+// compose a name excluding such characters.
+m_aDocument.RenameTab( 0, INetURLObject( 
rMedium.GetName()).GetBase(), true/*bExternalDocument*/);
+#endif
 bOverflowRow = aImpEx.IsOverflowRow();
 bOverflowCol = aImpEx.IsOverflowCol();
 bOverflowCell = aImpEx.IsOverflowCell();


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - include/svtools svx/source

2022-01-18 Thread Mert Tumer (via logerrit)
 include/svtools/ctrlbox.hxx  |1 +
 svx/source/tbxctrls/tbcontrl.cxx |5 -
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit a9db5edbccf001eec46a76c48c36812930e535a5
Author: Mert Tumer 
AuthorDate: Tue Jan 18 12:57:16 2022 +0300
Commit: Mert Tumer 
CommitDate: Tue Jan 18 13:31:24 2022 +0100

set active element to -1 when no selection for fontnamebox

FontNameBox sets the currentVal to emptystring when there's
a mixed font-name selection on the text but does not update
the active_element which is incorrect whereas other comboboxes such
as FontSize does it correctly.

Signed-off-by: Mert Tumer 
Change-Id: Iff86bba64c2ab564ff5c5fa979eb846af9651a11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128551
Reviewed-by: Szymon KÅ‚os 
Tested-by: Jenkins CollaboraOffice 

diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 9cea6647f461..69b5aefac7dd 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -366,6 +366,7 @@ public:
 int get_active() const { return m_xComboBox->get_active(); }
 OUString get_active_text() const { return m_xComboBox->get_active_text(); }
 void set_active_or_entry_text(const OUString& rText);
+void set_active(int nPos) { m_xComboBox->set_active(nPos); }
 int get_count() const { return m_xComboBox->get_count(); }
 OUString get_text(int nIndex) const { return 
m_xComboBox->get_text(nIndex); }
 void set_sensitive(bool bSensitive) { 
m_xComboBox->set_sensitive(bSensitive); }
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 8f8055352695..5e9727ddfe3d 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3032,8 +3032,11 @@ void SvxFontNameBox_Base::statusChanged_Impl( const 
css::frame::FeatureStateEven
 css::awt::FontDescriptor aFontDesc;
 if ( rEvent.State >>= aFontDesc )
 Update();
-else
+else {
+// no active element; delete value in the display
+m_xWidget->set_active(-1);
 set_active_or_entry_text("");
+}
 m_xWidget->save_value();
 }
 }


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sd/qa svx/source

2022-01-20 Thread Mert Tumer (via logerrit)
 sd/qa/unit/tiledrendering/tiledrendering.cxx |   16 ++--
 svx/source/svdraw/svdxcgv.cxx|5 -
 2 files changed, 6 insertions(+), 15 deletions(-)

New commits:
commit 9ca4bb1e7392347b03887486cad597c0fb7ce774
Author: Mert Tumer 
AuthorDate: Wed Jan 19 14:23:52 2022 +0300
Commit: Mert Tumer 
CommitDate: Thu Jan 20 09:55:44 2022 +0100

lok: Set pasted text rect pos to 0, 0

Rect size change according to the length of the text
however, this can make the text inserted in the negative coordinates
and half of it becomes invisible.

Signed-off-by: Mert Tumer 
Change-Id: Ibd4e6164c21088205efecf024c1888c55ac33f0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128603
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon KÅ‚os 

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 917f2eb04038..7934fb8ca34e 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2465,21 +2465,9 @@ void SdTiledRenderingTest::testPasteTextOnSlide()
 SdrTextObj* pTextObj = dynamic_cast(pObject);
 CPPUNIT_ASSERT(pTextObj);
 CPPUNIT_ASSERT_EQUAL(OBJ_TEXT, pTextObj->GetObjIdentifier());
-// This test is unreliable: it gives alternating results for the following 
coordinates.
-// As a compromise, instead of disabling it altogether, we allow for both 
sets of values.
 const Point aPos = pTextObj->GetLastBoundRect().TopLeft();
-if (aPos.getX() < 1)
-{
-// We get this with 'make CppunitTest_sd_tiledrendering'
-CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(6739), 
aPos.getX(), 100);
-CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(6822), 
aPos.getY(), 100);
-}
-else
-{
-// We get this with 'make check'
-CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(12990), 
aPos.getX(), 100);
-CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(7393), 
aPos.getY(), 100);
-}
+CPPUNIT_ASSERT_EQUAL(static_cast(0), aPos.getX());
+CPPUNIT_ASSERT_EQUAL(static_cast(0), aPos.getY());
 }
 
 void SdTiledRenderingTest::testTdf115873()
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 21d0451e7f3c..e53444e9c87c 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -48,6 +48,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace com::sun::star;
 
@@ -404,7 +405,9 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, 
SdrObjList& rLst, const Po
 nSizY /= aDstFr.GetNumerator();
 tools::Long xs=nSizX;
 tools::Long ys=nSizY;
-Point aPos(rCenter.X()-xs/2,rCenter.Y()-ys/2);
+// set the pos to 0, 0 for online case
+bool isLOK = comphelper::LibreOfficeKit::isActive();
+Point aPos(isLOK ? 0 : rCenter.X()-xs/2, isLOK ? 0 : rCenter.Y()-ys/2);
 tools::Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys);
 pObj->SetLogicRect(aR);
 rLst.InsertObject(pObj, SAL_MAX_SIZE);


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

2022-01-24 Thread Mert Tumer (via logerrit)
 sd/qa/unit/tiledrendering/tiledrendering.cxx |   16 ++--
 svx/source/svdraw/svdxcgv.cxx|5 -
 2 files changed, 6 insertions(+), 15 deletions(-)

New commits:
commit 548e2d4cabda2300aeda3bbf1c686e51a7f952c5
Author: Mert Tumer 
AuthorDate: Wed Jan 19 14:23:52 2022 +0300
Commit: Mert Tumer 
CommitDate: Mon Jan 24 19:19:07 2022 +0100

lok: Set pasted text rect pos to 0, 0

Rect size change according to the length of the text
however, this can make the text inserted in the negative coordinates
and half of it becomes invisible.

Change-Id: Ibd4e6164c21088205efecf024c1888c55ac33f0e
Signed-off-by: Mert Tumer 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128603
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon KÅ‚os 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128868

diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index fae683532057..b39321948e32 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2466,21 +2466,9 @@ void SdTiledRenderingTest::testPasteTextOnSlide()
 SdrTextObj* pTextObj = dynamic_cast(pObject);
 CPPUNIT_ASSERT(pTextObj);
 CPPUNIT_ASSERT_EQUAL(static_cast(OBJ_TEXT), 
pTextObj->GetObjIdentifier());
-// This test is unreliable: it gives alternating results for the following 
coordinates.
-// As a compromise, instead of disabling it altogether, we allow for both 
sets of values.
 const Point aPos = pTextObj->GetLastBoundRect().TopLeft();
-if (aPos.getX() < 1)
-{
-// We get this with 'make CppunitTest_sd_tiledrendering'
-CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(6739), aPos.getX(), 
100);
-CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(6822), aPos.getY(), 
100);
-}
-else
-{
-// We get this with 'make check'
-CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(12990), aPos.getX(), 
100);
-CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast(7393), aPos.getY(), 
100);
-}
+CPPUNIT_ASSERT_EQUAL(static_cast(0), aPos.getX());
+CPPUNIT_ASSERT_EQUAL(static_cast(0), aPos.getY());
 }
 
 void SdTiledRenderingTest::testTdf115873()
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 88083f3e93e0..f6f707367768 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -58,6 +58,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace com::sun::star;
 
@@ -414,7 +415,9 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, 
SdrObjList& rLst, const Po
 nSizY /= aDstFr.GetNumerator();
 long xs=nSizX;
 long ys=nSizY;
-Point aPos(rCenter.X()-xs/2,rCenter.Y()-ys/2);
+// set the pos to 0, 0 for online case
+bool isLOK = comphelper::LibreOfficeKit::isActive();
+Point aPos(isLOK ? 0 : rCenter.X()-xs/2, isLOK ? 0 : rCenter.Y()-ys/2);
 tools::Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys);
 pObj->SetLogicRect(aR);
 rLst.InsertObject(pObj, SAL_MAX_SIZE);


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/source

2022-01-14 Thread Mert Tumer (via logerrit)
 sc/source/ui/view/gridwin.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 5b5315073d9c73cc51c039a935ef6a5094f3923f
Author: Mert Tumer 
AuthorDate: Wed Jan 12 19:02:23 2022 +0300
Commit: Henry Castro 
CommitDate: Fri Jan 14 15:47:18 2022 +0100

lok: remove residue text selection when there's none in the core

Residue selection can stay at the browser even after changing the 
cellcursor pos
make sure to clean it up if there is no selection rectangle in reality
to be synced with core.

Signed-off-by: Mert Tumer 
Change-Id: I1b06b6ec84ae195936d12dc986ef4a19b26dbc8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128351
Tested-by: Jenkins CollaboraOffice 
Tested-by: Henry Castro 
Reviewed-by: Henry Castro 

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index bb0c8bac9fe5..826550e8f391 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5597,6 +5597,13 @@ void ScGridWindow::notifyKitCellCursor() const
 pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_CURSOR, 
getCellCursor().getStr());
 if (bListValButton && aListValPos == mrViewData.GetCurPos())
 updateLOKValListButton(true, aListValPos);
+std::vector aRects;
+GetSelectionRects(aRects);
+if (aRects.empty() || !mrViewData.IsActive())
+{
+pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, 
"");
+SfxLokHelper::notifyOtherViews(pViewShell, 
LOK_CALLBACK_TEXT_VIEW_SELECTION, "selection", "EMPTY");
+}
 }
 
 void ScGridWindow::notifyKitCellViewCursor(const SfxViewShell* pForShell) const


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - desktop/source filter/source

2022-04-06 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx|9 -
 filter/source/storagefilterdetect/filterdetect.cxx |7 +++
 2 files changed, 15 insertions(+), 1 deletion(-)

New commits:
commit 8461a6428c8e0e4e21cd8d340a389e34b64b68de
Author: Mert Tumer 
AuthorDate: Wed Apr 6 16:59:53 2022 +0300
Commit: Gökay ŞATIR 
CommitDate: Wed Apr 6 18:36:08 2022 +0200

lok: load template documents as regular documents

otherwise lok cannot save them directly because
libreoffice will try to open a save-as dialog
For odg, change the draw8_template type draw8

Signed-off-by: Mert Tumer 
Change-Id: I34b0ed03adcac89eaa926f8ae6c57e6f622a90f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132633
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index fdf93283101f..3e4265969053 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2540,7 +2540,7 @@ static LibreOfficeKitDocument* 
lo_documentLoadWithOptions(LibreOfficeKit* pThis,
  Application::SetDialogCancelMode(DialogCancelMode::LOKSilent);
 }
 
-uno::Sequence aFilterOptions(3);
+uno::Sequence aFilterOptions(4);
 aFilterOptions[0] = css::beans::PropertyValue( "FilterOptions",
0,
uno::makeAny(aOptions),
@@ -2587,6 +2587,13 @@ static LibreOfficeKitDocument* 
lo_documentLoadWithOptions(LibreOfficeKit* pThis,
 aFilterOptions[3].Value <<= nUpdateDoc;
 */
 
+// set this explicitly false to be able to load template files
+// as regular files, otherwise we cannot save them; it will try
+// to bring saveas dialog which cannot work with LOK case
+aFilterOptions[3].Name = "AsTemplate";
+aFilterOptions[3].Value <<= false;
+
+
 const int nThisDocumentId = nDocumentIdCounter++;
 SfxViewShell::SetCurrentDocId(ViewShellDocId(nThisDocumentId));
 uno::Reference xComponent = 
xComponentLoader->loadComponentFromURL(
diff --git a/filter/source/storagefilterdetect/filterdetect.cxx 
b/filter/source/storagefilterdetect/filterdetect.cxx
index f2eba546a4d3..64ee68175473 100644
--- a/filter/source/storagefilterdetect/filterdetect.cxx
+++ b/filter/source/storagefilterdetect/filterdetect.cxx
@@ -32,6 +32,8 @@
 #include 
 #include 
 
+#include 
+
 using namespace ::com::sun::star;
 using utl::MediaDescriptor;
 
@@ -102,6 +104,11 @@ OUString SAL_CALL 
StorageFilterDetect::detect(uno::SequencegetPropertyValue( "MediaType" ) >>= aMediaType;
 aTypeName = getInternalFromMediaType( aMediaType );
+if (comphelper::LibreOfficeKit::isActive() && aTypeName == 
"draw8_template")
+{
+// save it as draw8 instead of template format
+aTypeName = "draw8";
+}
 }
 
 catch( const lang::WrappedTargetException& aWrap )


[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-6.4-60'

2022-04-06 Thread Mert Tumer (via logerrit)
Tag 'cp-6.4-60' created by Andras Timar  at 
2022-04-06 20:47 +

cp-6.4-60

Changes since cp-6.4-59-14:
---
 0 files changed
---


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - desktop/source filter/source

2022-04-06 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx|9 -
 filter/source/storagefilterdetect/filterdetect.cxx |7 +++
 2 files changed, 15 insertions(+), 1 deletion(-)

New commits:
commit 49f8a7333bddceb3b8bd18d81ff593fa39f5a437
Author: Mert Tumer 
AuthorDate: Wed Apr 6 16:59:53 2022 +0300
Commit: Andras Timar 
CommitDate: Wed Apr 6 22:20:14 2022 +0200

lok: load template documents as regular documents

otherwise lok cannot save them directly because
libreoffice will try to open a save-as dialog
For odg, change the draw8_template type draw8

Signed-off-by: Mert Tumer 
Change-Id: I34b0ed03adcac89eaa926f8ae6c57e6f622a90f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132633
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5721b56573d6..f3396a3f4bc7 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2380,7 +2380,7 @@ static LibreOfficeKitDocument* 
lo_documentLoadWithOptions(LibreOfficeKit* pThis,
  Application::SetDialogCancelMode(DialogCancelMode::LOKSilent);
 }
 
-uno::Sequence aFilterOptions(3);
+uno::Sequence aFilterOptions(4);
 aFilterOptions[0] = css::beans::PropertyValue( "FilterOptions",
0,
uno::makeAny(aOptions),
@@ -2427,6 +2427,13 @@ static LibreOfficeKitDocument* 
lo_documentLoadWithOptions(LibreOfficeKit* pThis,
 aFilterOptions[3].Value <<= nUpdateDoc;
 */
 
+// set this explicitly false to be able to load template files
+// as regular files, otherwise we cannot save them; it will try
+// to bring saveas dialog which cannot work with LOK case
+aFilterOptions[3].Name = "AsTemplate";
+aFilterOptions[3].Value <<= false;
+
+
 const int nThisDocumentId = nDocumentIdCounter++;
 SfxViewShell::SetCurrentDocId(ViewShellDocId(nThisDocumentId));
 uno::Reference xComponent = 
xComponentLoader->loadComponentFromURL(
diff --git a/filter/source/storagefilterdetect/filterdetect.cxx 
b/filter/source/storagefilterdetect/filterdetect.cxx
index 02ed875c6699..694251c389b3 100644
--- a/filter/source/storagefilterdetect/filterdetect.cxx
+++ b/filter/source/storagefilterdetect/filterdetect.cxx
@@ -33,6 +33,8 @@
 #include 
 #include 
 
+#include 
+
 using namespace ::com::sun::star;
 using utl::MediaDescriptor;
 
@@ -103,6 +105,11 @@ OUString SAL_CALL 
StorageFilterDetect::detect(uno::SequencegetPropertyValue( "MediaType" ) >>= aMediaType;
 aTypeName = getInternalFromMediaType( aMediaType );
+if (comphelper::LibreOfficeKit::isActive() && aTypeName == 
"draw8_template")
+{
+// save it as draw8 instead of template format
+aTypeName = "draw8";
+}
 }
 
 catch( const lang::WrappedTargetException& aWrap )


[Libreoffice-commits] core.git: Changes to 'private/mert/wip_deepl'

2022-07-05 Thread Mert Tumer (via logerrit)
New branch 'private/mert/wip_deepl' available with the following commits:
commit 40175032ec98383a41b5008e56a68d03b486e1ba
Author: Mert Tumer 
Date:   Tue Jul 5 12:03:27 2022 +0300

wip translate

Signed-off-by: Mert Tumer 

commit 4fee1409c404d97a7c6e27e06470167d8cf8839a
Author: Mert Tumer 
Date:   Mon Jul 4 19:52:49 2022 +0300

Added option to disable ssl verification for languagetool

This will allow to use self-signed certificates with local run
languagetool APIs

Signed-off-by: Mert Tumer 
Change-Id: I2bda575fa6174dfc0f6c24da45267ee732643db6



[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - cui/source cui/uiconfig desktop/source include/svtools lingucomponent/source officecfg/registry svtools/source

2022-07-05 Thread Mert Tumer (via logerrit)
 cui/source/options/optlanguagetool.cxx|4 
 cui/source/options/optlanguagetool.hxx|1 
 cui/uiconfig/ui/langtoolconfigpage.ui |  227 
+-
 desktop/source/lib/init.cxx   |3 
 include/svtools/languagetoolcfg.hxx   |3 
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx |   16 
 officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs|7 
 svtools/source/config/languagetoolcfg.cxx |   16 
 8 files changed, 172 insertions(+), 105 deletions(-)

New commits:
commit 3a7a58d8b86bffed074bee56ad96fd3e673ef040
Author: Mert Tumer 
AuthorDate: Mon Jul 4 19:52:49 2022 +0300
Commit: Andras Timar 
CommitDate: Tue Jul 5 11:28:39 2022 +0200

Added option to disable ssl verification for languagetool

This will allow to use self-signed certificates with local run
languagetool APIs

Signed-off-by: Mert Tumer 
Change-Id: I2bda575fa6174dfc0f6c24da45267ee732643db6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136811
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/cui/source/options/optlanguagetool.cxx 
b/cui/source/options/optlanguagetool.cxx
index 38807bc337d3..fc7a42536051 100644
--- a/cui/source/options/optlanguagetool.cxx
+++ b/cui/source/options/optlanguagetool.cxx
@@ -29,6 +29,7 @@ 
OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage,
 , m_xUsernameED(m_xBuilder->weld_entry("username"))
 , m_xApiKeyED(m_xBuilder->weld_entry("apikey"))
 , m_xActivateBox(m_xBuilder->weld_check_button("activate"))
+, m_xSSLDisableVerificationBox(m_xBuilder->weld_check_button("verifyssl"))
 , m_xApiSettingsFrame(m_xBuilder->weld_frame("apisettings"))
 {
 m_xActivateBox->connect_toggled(LINK(this, OptLanguageToolTabPage, 
CheckHdl));
@@ -44,6 +45,7 @@ void OptLanguageToolTabPage::EnableControls(bool bEnable)
 rLanguageOpts.setEnabled(bEnable);
 m_xApiSettingsFrame->set_visible(bEnable);
 m_xActivateBox->set_active(bEnable);
+
m_xSSLDisableVerificationBox->set_active(rLanguageOpts.getSSLVerification() != 
true);
 }
 
 IMPL_LINK_NOARG(OptLanguageToolTabPage, CheckHdl, weld::Toggleable&, void)
@@ -57,6 +59,7 @@ void OptLanguageToolTabPage::Reset(const SfxItemSet*)
 m_xBaseURLED->set_text(rLanguageOpts.getBaseURL());
 m_xUsernameED->set_text(rLanguageOpts.getUsername());
 m_xApiKeyED->set_text(rLanguageOpts.getApiKey());
+
m_xSSLDisableVerificationBox->set_active(rLanguageOpts.getSSLVerification() != 
true);
 }
 
 bool OptLanguageToolTabPage::FillItemSet(SfxItemSet*)
@@ -65,6 +68,7 @@ bool OptLanguageToolTabPage::FillItemSet(SfxItemSet*)
 rLanguageOpts.setBaseURL(m_xBaseURLED->get_text());
 rLanguageOpts.setUsername(m_xUsernameED->get_text());
 rLanguageOpts.setApiKey(m_xApiKeyED->get_text());
+
rLanguageOpts.setSSLVerification(m_xSSLDisableVerificationBox->get_active() != 
true);
 return false;
 }
 
diff --git a/cui/source/options/optlanguagetool.hxx 
b/cui/source/options/optlanguagetool.hxx
index 46a60ecbe103..85e0238b0318 100644
--- a/cui/source/options/optlanguagetool.hxx
+++ b/cui/source/options/optlanguagetool.hxx
@@ -36,6 +36,7 @@ private:
 std::unique_ptr m_xUsernameED;
 std::unique_ptr m_xApiKeyED;
 std::unique_ptr m_xActivateBox;
+std::unique_ptr m_xSSLDisableVerificationBox;
 std::unique_ptr m_xApiSettingsFrame;
 
 void EnableControls(bool bEnable);
diff --git a/cui/uiconfig/ui/langtoolconfigpage.ui 
b/cui/uiconfig/ui/langtoolconfigpage.ui
index 7b822325e3f1..237040fa76b7 100644
--- a/cui/uiconfig/ui/langtoolconfigpage.ui
+++ b/cui/uiconfig/ui/langtoolconfigpage.ui
@@ -76,16 +76,130 @@
   
 True
 False
-5
-12
 
-  
+  
 True
 False
-start
-Base URL:
-True
-baseurl
+5
+12
+
+  
+True
+False
+start
+Base URL:
+True
+baseurl
+  
+  
+0
+0
+  
+
+
+  
+True
+True
+True
+  
+  
+1
+0
+ 

[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - 60 commits - binaryurp/source chart2/source config_host.mk.in configure.ac connectivity/source cui/Library_cui.mk cui/Module_cui.mk cu

2022-07-12 Thread Mert Tumer (via logerrit)
Rebased ref, commits from common ancestor:
commit fe2d708d32cf04bb3da22fdbd9806fb8b5b8f7d7
Author: Mert Tumer 
AuthorDate: Tue Jul 5 12:03:27 2022 +0300
Commit: Mert Tumer 
CommitDate: Tue Jul 12 14:06:04 2022 +0300

wip translate

Signed-off-by: Mert Tumer 

diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 573f036128c8..f8e162a973a6 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -570,7 +570,7 @@ class SdrAngleItem;
 #define SID_FM_FILECONTROL  ( SID_SVX_START + 605 )
 //( SID_SVX_START + 606 ) is used by SID_DRAWTBX_REDACTED_EXPORT
 #define SID_FM_NAVIGATIONBAR( SID_SVX_START + 607 )
-//FREE
+#define SID_FM_TRANSLATE( SID_SVX_START + 608 )
 //FREE
 #define SID_FM_DELETEROWS   ( SID_SVX_START + 610 )
 //FREE
diff --git a/include/vcl/unohelp3.hxx b/include/vcl/unohelp3.hxx
new file mode 100644
index ..2d3bfb4e5f28
--- /dev/null
+++ b/include/vcl/unohelp3.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace vcl::unohelper {
+
+class VCL_DLLPUBLIC HtmlTransferable final :
+public css::datatransfer::XTransferable,
+public ::cppu::OWeakObject
+{
+private:
+OStringdata;
+
+public:
+HtmlTransferable( OString sData );
+virtual ~HtmlTransferable() override;
+
+// css::uno::XInterface
+css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) 
override;
+void  SAL_CALL acquire() noexcept override  { 
OWeakObject::acquire(); }
+void  SAL_CALL release() noexcept override  { 
OWeakObject::release(); }
+
+// css::datatransfer::XTransferable
+css::uno::Any SAL_CALL getTransferData( const 
css::datatransfer::DataFlavor& aFlavor ) override;
+css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL 
getTransferDataFlavors(  ) override;
+sal_Bool SAL_CALL isDataFlavorSupported( const 
css::datatransfer::DataFlavor& aFlavor ) override;
+};
+
+}  // namespace vcl::unohelper
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 37996759a90d..2f82b9f1711f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -1333,6 +1333,14 @@
   1
 
   
+  
+
+  Translate Page...
+
+
+  1
+
+  
   
 
   Co~lumns...
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 9ab00de7e881..6b5fb5021370 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -1596,6 +1596,22 @@ SfxBoolItem NavigationBar SID_FM_NAVIGATIONBAR
 GroupId = SfxGroupId::Controls;
 ]
 
+SfxBoolItem Translate SID_FM_TRANSLATE
+[
+AutoUpdate = FALSE,
+FastCall = TRUE,
+ReadOnlyDoc = FALSE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+AccelConfig = FALSE,
+MenuConfig = FALSE,
+ToolBoxConfig = FALSE,
+GroupId = SfxGroupId::Format;
+]
+
 
 SfxBoolItem Combobox SID_INSERT_COMBOBOX
 
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index a49d53d0509f..5408e28b867a 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -91,6 +91,7 @@ $(eval $(call gb_Library_use_externals,sw,\
icuuc \
icu_headers \
libxml2 \
+curl \
 ))
 
 $(eval $(call gb_Library_add_exception_objects,sw,\
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index 4c1d9614f56c..f4cd9cbf5432 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -150,6 +150,7 @@ $(eval $(call gb_Library_add_exception_objects,swui,\
 sw/source/ui/misc/pgfnote \
 sw/source/ui/misc/pggrid \
 sw/source/ui/misc/srtdlg \
+

[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - include/svx include/vcl officecfg/registry svx/sdi sw/inc sw/Library_sw.mk sw/Library_swui.mk sw/sdi sw/source sw/uiconfig sw/UIConfig

2022-07-12 Thread Mert Tumer (via logerrit)
Rebased ref, commits from common ancestor:
commit 9ab279dbb665c2ac60c5b0de45158f17b4118483
Author: Mert Tumer 
AuthorDate: Tue Jul 5 12:03:27 2022 +0300
Commit: Mert Tumer 
CommitDate: Tue Jul 12 16:26:31 2022 +0300

wip translate

Signed-off-by: Mert Tumer 

diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 573f036128c8..f8e162a973a6 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -570,7 +570,7 @@ class SdrAngleItem;
 #define SID_FM_FILECONTROL  ( SID_SVX_START + 605 )
 //( SID_SVX_START + 606 ) is used by SID_DRAWTBX_REDACTED_EXPORT
 #define SID_FM_NAVIGATIONBAR( SID_SVX_START + 607 )
-//FREE
+#define SID_FM_TRANSLATE( SID_SVX_START + 608 )
 //FREE
 #define SID_FM_DELETEROWS   ( SID_SVX_START + 610 )
 //FREE
diff --git a/include/vcl/unohelp3.hxx b/include/vcl/unohelp3.hxx
new file mode 100644
index ..2d3bfb4e5f28
--- /dev/null
+++ b/include/vcl/unohelp3.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace vcl::unohelper {
+
+class VCL_DLLPUBLIC HtmlTransferable final :
+public css::datatransfer::XTransferable,
+public ::cppu::OWeakObject
+{
+private:
+OStringdata;
+
+public:
+HtmlTransferable( OString sData );
+virtual ~HtmlTransferable() override;
+
+// css::uno::XInterface
+css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) 
override;
+void  SAL_CALL acquire() noexcept override  { 
OWeakObject::acquire(); }
+void  SAL_CALL release() noexcept override  { 
OWeakObject::release(); }
+
+// css::datatransfer::XTransferable
+css::uno::Any SAL_CALL getTransferData( const 
css::datatransfer::DataFlavor& aFlavor ) override;
+css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL 
getTransferDataFlavors(  ) override;
+sal_Bool SAL_CALL isDataFlavorSupported( const 
css::datatransfer::DataFlavor& aFlavor ) override;
+};
+
+}  // namespace vcl::unohelper
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 37996759a90d..2f82b9f1711f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -1333,6 +1333,14 @@
   1
 
   
+  
+
+  Translate Page...
+
+
+  1
+
+  
   
 
   Co~lumns...
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 9ab00de7e881..6b5fb5021370 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -1596,6 +1596,22 @@ SfxBoolItem NavigationBar SID_FM_NAVIGATIONBAR
 GroupId = SfxGroupId::Controls;
 ]
 
+SfxBoolItem Translate SID_FM_TRANSLATE
+[
+AutoUpdate = FALSE,
+FastCall = TRUE,
+ReadOnlyDoc = FALSE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+AccelConfig = FALSE,
+MenuConfig = FALSE,
+ToolBoxConfig = FALSE,
+GroupId = SfxGroupId::Format;
+]
+
 
 SfxBoolItem Combobox SID_INSERT_COMBOBOX
 
diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index a49d53d0509f..5408e28b867a 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -91,6 +91,7 @@ $(eval $(call gb_Library_use_externals,sw,\
icuuc \
icu_headers \
libxml2 \
+curl \
 ))
 
 $(eval $(call gb_Library_add_exception_objects,sw,\
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index 4c1d9614f56c..f4cd9cbf5432 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -150,6 +150,7 @@ $(eval $(call gb_Library_add_exception_objects,swui,\
 sw/source/ui/misc/pgfnote \
 sw/source/ui/misc/pggrid \
 sw/source/ui/misc/srtdlg \
+

[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - include/sfx2 include/svx include/vcl officecfg/registry svx/sdi sw/inc sw/Library_sw.mk sw/Library_swui.mk sw/sdi sw/source sw/uiconfi

2022-07-12 Thread Mert Tumer (via logerrit)
Rebased ref, commits from common ancestor:
commit 9b7336c3770bbe89674e97e8505167281c9172b4
Author: Mert Tumer 
AuthorDate: Tue Jul 5 12:03:27 2022 +0300
Commit: Mert Tumer 
CommitDate: Tue Jul 12 17:59:52 2022 +0300

wip translate

Signed-off-by: Mert Tumer 

diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 39a3ec5bf9d6..1937368ba2b9 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -208,6 +208,7 @@ class SvxSearchItem;
 #define SID_VIEW_DATA_SOURCE_BROWSER(SID_SFX_START + 1660)
 #define SID_UNPACK  (SID_SFX_START + 1662)
 // (SID_SFX_START + 1663) used further down
+#define SID_ATTR_TARGETLANG_STR (SID_SFX_START + 1664)
 // FREE
 #define SID_OUTPUTSTREAM(SID_SFX_START + 1666)
 #define SID_IMAGE_ORIENTATION   (SID_SFX_START + 1667)
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 573f036128c8..f8e162a973a6 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -570,7 +570,7 @@ class SdrAngleItem;
 #define SID_FM_FILECONTROL  ( SID_SVX_START + 605 )
 //( SID_SVX_START + 606 ) is used by SID_DRAWTBX_REDACTED_EXPORT
 #define SID_FM_NAVIGATIONBAR( SID_SVX_START + 607 )
-//FREE
+#define SID_FM_TRANSLATE( SID_SVX_START + 608 )
 //FREE
 #define SID_FM_DELETEROWS   ( SID_SVX_START + 610 )
 //FREE
diff --git a/include/vcl/unohelp3.hxx b/include/vcl/unohelp3.hxx
new file mode 100644
index ..2d3bfb4e5f28
--- /dev/null
+++ b/include/vcl/unohelp3.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#pragma once
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace vcl::unohelper {
+
+class VCL_DLLPUBLIC HtmlTransferable final :
+public css::datatransfer::XTransferable,
+public ::cppu::OWeakObject
+{
+private:
+OStringdata;
+
+public:
+HtmlTransferable( OString sData );
+virtual ~HtmlTransferable() override;
+
+// css::uno::XInterface
+css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) 
override;
+void  SAL_CALL acquire() noexcept override  { 
OWeakObject::acquire(); }
+void  SAL_CALL release() noexcept override  { 
OWeakObject::release(); }
+
+// css::datatransfer::XTransferable
+css::uno::Any SAL_CALL getTransferData( const 
css::datatransfer::DataFlavor& aFlavor ) override;
+css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL 
getTransferDataFlavors(  ) override;
+sal_Bool SAL_CALL isDataFlavorSupported( const 
css::datatransfer::DataFlavor& aFlavor ) override;
+};
+
+}  // namespace vcl::unohelper
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index 37996759a90d..2f82b9f1711f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -1333,6 +1333,14 @@
   1
 
   
+  
+
+  Translate Page...
+
+
+  1
+
+  
   
 
   Co~lumns...
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 9ab00de7e881..ac886aaa0cd4 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -1596,6 +1596,23 @@ SfxBoolItem NavigationBar SID_FM_NAVIGATIONBAR
 GroupId = SfxGroupId::Controls;
 ]
 
+SfxBoolItem Translate SID_FM_TRANSLATE
+(SfxStringItem TargetLang SID_ATTR_TARGETLANG_STR)
+[
+AutoUpdate = FALSE,
+FastCall = TRUE,
+ReadOnlyDoc = FALSE,
+Toggle = FALSE,
+Container = FALSE,
+RecordAbsolute = FALSE,
+RecordPerSet;
+
+AccelConfig = FALSE,
+MenuConfig = FALSE,
+ToolBoxConfig = FALSE,
+GroupId = SfxGroupId::Format;
+]
+
 
 SfxBoolItem Combobox 

[Libreoffice-commits] core.git: cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/sfx2 include/svtools lingucomponent/Library_LanguageTool.mk lingucomponent/Module_linguco

2022-06-10 Thread Mert Tumer (via logerrit)
 Repository.mk|1 
 cui/Library_cui.mk   |1 
 cui/UIConfig_cui.mk  |1 
 cui/inc/treeopt.hrc  |3 
 cui/source/options/optlanguagetool.cxx   |   76 +
 cui/source/options/optlanguagetool.hxx   |   44 +
 cui/source/options/treeopt.cxx   |2 
 cui/uiconfig/ui/langtoolconfigpage.ui|  240 
+
 include/sfx2/pageids.hxx |1 
 include/svtools/languagetoolcfg.hxx  |   59 +
 include/svtools/strings.hrc  |1 
 lingucomponent/Library_LanguageTool.mk   |   48 +
 lingucomponent/Module_lingucomponent.mk  |1 
 lingucomponent/source/spellcheck/languagetool/LanguageTool.component |   26 
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx|  407 
++
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.hxx|   91 ++
 officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs   |   30 
 scripting/source/stringresource/stringresource.cxx   |1 
 svtools/Library_svt.mk   |1 
 svtools/source/config/languagetoolcfg.cxx|  164 

 20 files changed, 1197 insertions(+), 1 deletion(-)

New commits:
commit d952df361a5e190246d7a0738ae5347b82cd57b5
Author: Mert Tumer 
AuthorDate: Tue May 10 13:06:06 2022 +0300
Commit: Christian Lohmaier 
CommitDate: Fri Jun 10 13:52:17 2022 +0200

LanguageTool Grammar Checker implementation

Signed-off-by: Mert Tumer 
Change-Id: I275cbea668afc5beb5147370119631df8b6a2d46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135178
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/Repository.mk b/Repository.mk
index 4004cbe142df..5ee1546b2504 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -368,6 +368,7 @@ endif
 
 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
 avmedia \
+   LanguageTool \
 $(call gb_Helper_optional,AVMEDIA, \
$(if $(filter MACOSX,$(OS)),\
avmediaMacAVF \
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 8f8e73afe6cd..cb26653b395d 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -187,6 +187,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/options/optgdlg \
 cui/source/options/optgenrl \
 cui/source/options/opthtml \
+cui/source/options/optlanguagetool \
 cui/source/options/optinet2 \
 cui/source/options/optjava \
 cui/source/options/optjsearch \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index eda70a1dd29c..cdedcc15a857 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -143,6 +143,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/optfontspage \
cui/uiconfig/ui/optgeneralpage \
cui/uiconfig/ui/opthtmlpage \
+   cui/uiconfig/ui/langtoolconfigpage \
cui/uiconfig/ui/optionsdialog \
cui/uiconfig/ui/optjsearchpage \
cui/uiconfig/ui/optlanguagespage \
diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc
index a3033143983b..f4fc28c5725b 100644
--- a/cui/inc/treeopt.hrc
+++ b/cui/inc/treeopt.hrc
@@ -55,7 +55,8 @@ const std::pair 
SID_LANGUAGE_OPTIONS_RES[] =
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Writing Aids"), RID_SFXPAGE_LINGU },
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"),  
RID_SVXPAGE_JSEARCH_OPTIONS },
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"),  
RID_SVXPAGE_ASIAN_LAYOUT },
-{ NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"),  
RID_SVXPAGE_OPTIONS_CTL }
+{ NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"),  
RID_SVXPAGE_OPTIONS_CTL },
+{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"),  
RID_SVXPAGE_LANGTOOL_OPTIONS }
 };
 
 const std::pair SID_INET_DLG_RES[] =
diff --git a/cui/source/options/optlanguagetool.cxx 
b/cui/source/options/optlanguagetool.cxx
new file mode 100644
index ..38807bc337d3
--- /dev/null
+++ b/cui/source/options/optlanguagetool.cxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor 

[Libreoffice-commits] core.git: include/unotools lingucomponent/config lingucomponent/source postprocess/CustomTarget_registry.mk unotools/source

2022-06-14 Thread Mert Tumer (via logerrit)
 include/unotools/lingucfg.hxx  |2 
 lingucomponent/config/Linguistic-lingucomponent-grammarchecker.xcu |   30 
++
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx  |   45 
+++---
 postprocess/CustomTarget_registry.mk   |1 
 unotools/source/config/lingucfg.cxx|   21 
 5 files changed, 70 insertions(+), 29 deletions(-)

New commits:
commit c3ed41752237a7a70c856dfb0d618f1c2eacea5a
Author: Mert Tumer 
AuthorDate: Tue May 10 13:06:06 2022 +0300
Commit: Mert Tumer 
CommitDate: Tue Jun 14 10:04:28 2022 +0200

Load the locales from config file for languagetool

Locales needs to be read again
in the Preferences/Writing Aids section and since
this is a network operation it can cause a problem.
Better to list all the supported locales in the xcu
and load it right away.

Signed-off-by: Mert Tumer 
Change-Id: Ifff624334627f7be259b677f9b416d6ddedfb2c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135598
Tested-by: Jenkins

diff --git a/include/unotools/lingucfg.hxx b/include/unotools/lingucfg.hxx
index b4a0b824e127..9117799c2f3a 100644
--- a/include/unotools/lingucfg.hxx
+++ b/include/unotools/lingucfg.hxx
@@ -192,6 +192,8 @@ public:
 
 bool GetDictionaryEntry( const OUString , 
SvtLinguConfigDictionaryEntry  ) const;
 
+bool GetLocaleListFor( const OUString , const OUString 
, css::uno::Sequence< OUString >  ) const;
+
 css::uno::Sequence< OUString > GetDisabledDictionaries() const;
 
 std::vector< SvtLinguConfigDictionaryEntry > 
GetActiveDictionariesByFormat( std::u16string_view rFormatName ) const;
diff --git a/lingucomponent/config/Linguistic-lingucomponent-grammarchecker.xcu 
b/lingucomponent/config/Linguistic-lingucomponent-grammarchecker.xcu
new file mode 100644
index ..ce3d6033d0c2
--- /dev/null
+++ b/lingucomponent/config/Linguistic-lingucomponent-grammarchecker.xcu
@@ -0,0 +1,30 @@
+
+
+http://openoffice.org/2004/installation; 
xmlns:oor="http://openoffice.org/2001/registry; 
xmlns:xs="http://www.w3.org/2001/XMLSchema; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>
+
+
+
+
+ar ast-ES be-BY br-FR ca-ES ca-ES-valencia zh-CN 
da-DK nl nl-BE en en-AU en-CA en-CA en-GB en-NZ en-ZA en-US fr gl-ES de de-AT 
de-DE de-DE de-CH el-GR ga-IE it ja-JP km-KH nb no fa pl-PL pt pt-AO pt-BR 
pt-MZ pt-PT ro-RO ru-RU de-DE-x-simple-language sk-SK sl-SI es es-AR sv tl-PH 
ta-IN uk-UA
+
+
+
+
+
+
diff --git a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx 
b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
index 06b4fcb64175..d7d53c015860 100644
--- a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
+++ b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
@@ -35,11 +35,12 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
 
 using namespace osl;
 using namespace com::sun::star;
@@ -108,40 +109,26 @@ sal_Bool SAL_CALL 
LanguageToolGrammarChecker::hasLocale(const Locale& rLocale)
 
 Sequence SAL_CALL LanguageToolGrammarChecker::getLocales()
 {
+MutexGuard aGuard(GetLinguMutex());
+
 if (m_aSuppLocales.hasElements())
 return m_aSuppLocales;
-SvxLanguageToolOptions& rLanguageOpts = SvxLanguageToolOptions::Get();
-OString localeUrl = OUStringToOString(rLanguageOpts.getLocaleListURL(), 
RTL_TEXTENCODING_UTF8);
-if (localeUrl.isEmpty())
-{
-return m_aSuppLocales;
-}
-tools::Long statusCode = 0;
-std::string response = makeHttpRequest(localeUrl, HTTP_METHOD::HTTP_GET, 
OString(), statusCode);
-if (statusCode != 200)
-{
-return m_aSuppLocales;
-}
-if (response.empty())
-{
-return m_aSuppLocales;
-}
-boost::property_tree::ptree root;
-std::stringstream aStream(response);
-boost::property_tree::read_json(aStream, root);
 
-size_t length = root.size();
-m_aSuppLocales.realloc(length);
+SvtLinguConfig aLinguCfg;
+uno::Sequence aLocaleList;
+aLinguCfg.GetLocaleListFor("GrammarCheckers", 
"org.openoffice.lingu.LanguageToolGrammarChecker",
+   aLocaleList);
+
+auto nLength = aLocaleList.getLength();
+m_aSuppLocales.realloc(nLength);
 auto pArray = m_aSuppLocales.getArray();
-int i = 0;
-for (auto it = root.begin(); it != root.end(); it++, i++)
+auto pLocaleList = aLocaleList.getArray();
+
+for (auto i = 0; i < nLength; i++)
 {
-boost::property_tree::ptree& localeItem = it->second;
-const std::string longCode = localeItem.get("longCode");
-Locale aLocale = LanguageTag::convertToLocale(
-OUString(longCode.c_str(), longCode.length(), 
RTL_TEXTENCODING_UTF8));
-

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/sfx2 include/svtools include/unotools lingucomponent

2022-06-14 Thread Mert Tumer (via logerrit)
 Repository.mk|1 
 cui/Library_cui.mk   |1 
 cui/UIConfig_cui.mk  |1 
 cui/inc/treeopt.hrc  |3 
 cui/source/options/optlanguagetool.cxx   |   76 +
 cui/source/options/optlanguagetool.hxx   |   44 +
 cui/source/options/treeopt.cxx   |2 
 cui/uiconfig/ui/langtoolconfigpage.ui|  240 
++
 include/sfx2/pageids.hxx |1 
 include/svtools/languagetoolcfg.hxx  |   59 +
 include/svtools/strings.hrc  |1 
 include/unotools/lingucfg.hxx|2 
 lingucomponent/Library_LanguageTool.mk   |   48 +
 lingucomponent/Module_lingucomponent.mk  |1 
 lingucomponent/config/Linguistic-lingucomponent-grammarchecker.xcu   |   30 
 lingucomponent/source/spellcheck/languagetool/LanguageTool.component |   26 
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx|  394 
++
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.hxx|   91 ++
 officecfg/registry/schema/org/openoffice/Office/Linguistic.xcs   |   30 
 postprocess/CustomTarget_registry.mk |1 
 postprocess/Rdb_services.mk  |1 
 scripting/source/stringresource/stringresource.cxx   |1 
 svtools/Library_svt.mk   |1 
 svtools/source/config/languagetoolcfg.cxx|  164 

 unotools/source/config/lingucfg.cxx  |   21 
 25 files changed, 1239 insertions(+), 1 deletion(-)

New commits:
commit 7686dceb70881e8a3c4ac7f18ced15e5202de8c7
Author: Mert Tumer 
AuthorDate: Tue May 10 13:06:06 2022 +0300
Commit: Mert Tumer 
CommitDate: Tue Jun 14 16:13:22 2022 +0200

LanguageTool Grammar Checker implementation

Signed-off-by: Mert Tumer 
Change-Id: I275cbea668afc5beb5147370119631df8b6a2d46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135464

diff --git a/Repository.mk b/Repository.mk
index 55a8d77f297d..6dd4aebbe9cd 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -319,6 +319,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ogltrans, \
 
 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
acc \
+   LanguageTool \
$(call gb_Helper_optional,AVMEDIA,avmedia) \
$(if $(filter MACOSX,$(OS)),\
avmediaMacAVF \
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 88e75ee1faef..1e8023cc819c 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -180,6 +180,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/options/optgdlg \
 cui/source/options/optgenrl \
 cui/source/options/opthtml \
+cui/source/options/optlanguagetool \
 cui/source/options/optinet2 \
 cui/source/options/optjava \
 cui/source/options/optjsearch \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index c70cbd94588c..a4ad452bdfee 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -138,6 +138,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/optfontspage \
cui/uiconfig/ui/optgeneralpage \
cui/uiconfig/ui/opthtmlpage \
+   cui/uiconfig/ui/langtoolconfigpage \
cui/uiconfig/ui/optionsdialog \
cui/uiconfig/ui/optjsearchpage \
cui/uiconfig/ui/optlanguagespage \
diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc
index c7ee66d7e8d0..952b79ea92d4 100644
--- a/cui/inc/treeopt.hrc
+++ b/cui/inc/treeopt.hrc
@@ -54,7 +54,8 @@ const std::pair 
SID_LANGUAGE_OPTIONS_RES[] =
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Writing Aids"), RID_SFXPAGE_LINGU },
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"),  
RID_SVXPAGE_JSEARCH_OPTIONS },
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"),  
RID_SVXPAGE_ASIAN_LAYOUT },
-{ NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"),  
RID_SVXPAGE_OPTIONS_CTL }
+{ NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"),  
RID_SVXPAGE_OPTIONS_CTL },
+{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"),  
RID_SVXPAGE_LANGTOOL_OPTIONS }
 };
 
 const std::pair SID_INET_DLG_RES[] =
diff --git a/cui/source/options/optlanguagetool.cxx 
b/cui/source/options/optlanguagetool.cxx
new file mode 100644
index ..38807bc337d3
--- /dev/null
+++ b/cui/source/options/optlanguagetool.cxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - desktop/source

2022-06-14 Thread Mert Tumer (via logerrit)
 desktop/source/lib/init.cxx |   34 ++
 1 file changed, 34 insertions(+)

New commits:
commit 2b8d12bae6b1cf83e6f2e65f6d90afe8fc5a3c58
Author: Mert Tumer 
AuthorDate: Fri Jun 10 13:09:51 2022 +0300
Commit: Mert Tumer 
CommitDate: Tue Jun 14 16:13:34 2022 +0200

lok: set LanguageTool config parameters from environment

Signed-off-by: Mert Tumer 
Change-Id: Ic7343439536abee626c269d2a824bb36f9abc40f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135583
Tested-by: Jenkins CollaboraOffice 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 63ad2bbad39c..ac644c8b02ba 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -127,6 +127,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #ifdef IOS
@@ -6561,6 +6562,38 @@ void setCertificateDir()
 }
 }
 
+void setLanguageToolConfig()
+{
+const char* pEnabled = ::getenv("LANGUAGETOOL_ENABLED");
+const char* pBaseUrlString = ::getenv("LANGUAGETOOL_BASEURL");
+const char* pUsername = ::getenv("LANGUAGETOOL_USERNAME");
+const char* pApikey = ::getenv("LANGUAGETOOL_APIKEY");
+if (pEnabled && pBaseUrlString)
+{
+OUString aEnabled = OStringToOUString(pEnabled, RTL_TEXTENCODING_UTF8);
+if (aEnabled != "true")
+return;
+OUString aBaseUrl = OStringToOUString(pBaseUrlString, 
RTL_TEXTENCODING_UTF8);
+try
+{
+SvxLanguageToolOptions& rLanguageOpts = 
SvxLanguageToolOptions::Get();
+rLanguageOpts.setBaseURL(aBaseUrl);
+rLanguageOpts.setEnabled(true);
+if (pUsername && pApikey)
+{
+OUString aUsername = OStringToOUString(pUsername, 
RTL_TEXTENCODING_UTF8);
+OUString aApiKey = OStringToOUString(pApikey, 
RTL_TEXTENCODING_UTF8);
+rLanguageOpts.setUsername(aUsername);
+rLanguageOpts.setApiKey(aApiKey);
+}
+}
+catch(uno::Exception const& rException)
+{
+SAL_WARN("lok", "Failed to set LanguageTool API settings: " << 
rException.Message);
+}
+}
+}
+
 }
 
 static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const 
char* pUserProfileUrl)
@@ -6875,6 +6908,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
 #endif
 
 setCertificateDir();
+setLanguageToolConfig();
 
 if (bNotebookbar)
 {


[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - 29 commits - configure.ac cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source drawinglayer/source ic

2022-07-20 Thread Mert Tumer (via logerrit)
Rebased ref, commits from common ancestor:
commit 140ac17f44f51edf5929d617bc0d10a8ee4c5588
Author: Mert Tumer 
AuthorDate: Tue Jul 5 12:03:27 2022 +0300
Commit: Mert Tumer 
CommitDate: Wed Jul 20 22:25:26 2022 +0300

new uno command uno:Translate with deepl api

New Uno command added for translation
right now it is only using deepl translation api

There's a section in the options > language settings
for setting up the api url and auth key

uno:Translate is a menu button under Format tab
which will bring up Language Selection dialog for translation.

DeepL can accept html as the input for translation, this new
feature leverages that by exporting paragraphs/selections to
html and paste them back without losing the formatting (in theory)
This works good in general but we may lose formatting in very complex
styled sentences.

Translation works in two ways;
1) Whole document
when there is no selection, it assumes that we want to translate whole
document. Each paragraphs is sent one by one so that the output timeout
can be minimum for each paragraph.
2) Selection

Signed-off-by: Mert Tumer 
Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index d455a64ab266..c4c0a52b2ef4 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/options/optgenrl \
 cui/source/options/opthtml \
 cui/source/options/optlanguagetool \
+cui/source/options/optdeepl \
 cui/source/options/optinet2 \
 cui/source/options/optjava \
 cui/source/options/optjsearch \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 806779daaa9d..0ed879e2b228 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/optgeneralpage \
cui/uiconfig/ui/opthtmlpage \
cui/uiconfig/ui/langtoolconfigpage \
+   cui/uiconfig/ui/deepltabpage \
cui/uiconfig/ui/optionsdialog \
cui/uiconfig/ui/optjsearchpage \
cui/uiconfig/ui/optlanguagespage \
diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc
index 952b79ea92d4..6d5bc4004a53 100644
--- a/cui/inc/treeopt.hrc
+++ b/cui/inc/treeopt.hrc
@@ -55,7 +55,8 @@ const std::pair 
SID_LANGUAGE_OPTIONS_RES[] =
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"),  
RID_SVXPAGE_JSEARCH_OPTIONS },
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"),  
RID_SVXPAGE_ASIAN_LAYOUT },
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"),  
RID_SVXPAGE_OPTIONS_CTL },
-{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"),  
RID_SVXPAGE_LANGTOOL_OPTIONS }
+{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"),  
RID_SVXPAGE_LANGTOOL_OPTIONS },
+{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"),  
RID_SVXPAGE_DEEPL_OPTIONS }
 };
 
 const std::pair SID_INET_DLG_RES[] =
diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx
new file mode 100644
index ..94b48ccc2f43
--- /dev/null
+++ b/cui/source/options/optdeepl.cxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "optdeepl.hxx"
+#include 
+
+OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage,
+   weld::DialogController* 
pController,
+   const SfxItemSet& rSet)
+: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", 
)
+, m_xAPIUrl(m_xBuilder->weld_entry("apiurl"))
+, m_xAuthKey(m_xBuilder->weld_entry("authkey"))
+{
+
+}
+
+OptDeeplTabPage::~OptDeeplTabPage() {}
+
+void OptDeeplTabPage::Reset(const SfxItemSet*)
+{
+SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get();
+m_xAPIUrl->set_text(rDeeplOptions.getAPIUrl());
+m_xAuthKey->set_text(rDeeplOptions.getAuthKey());
+}
+
+bool OptDeeplTabPage::FillItemSet(SfxItemSet*)
+{
+SvxDeeplOptions& rDeeplOptions = 

[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - 12 commits - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk desktop/source drawinglayer/source include/sfx2 in

2022-07-25 Thread Mert Tumer (via logerrit)
Rebased ref, commits from common ancestor:
commit 799a381452337bb007b6efd4d366cf5c4d5ea74e
Author: Mert Tumer 
AuthorDate: Tue Jul 5 12:03:27 2022 +0300
Commit: Mert Tumer 
CommitDate: Mon Jul 25 19:11:26 2022 +0300

new uno command uno:Translate with deepl api

New Uno command added for translation
right now it is only using deepl translation api

There's a section in the options > language settings
for setting up the api url and auth key

uno:Translate is a menu button under Format tab
which will bring up Language Selection dialog for translation.

DeepL can accept html as the input for translation, this new
feature leverages that by exporting paragraphs/selections to
html and paste them back without losing the formatting (in theory)
This works good in general but we may lose formatting in very complex
styled sentences.

Translation works in two ways;
1) Whole document
when there is no selection, it assumes that we want to translate whole
document. Each paragraphs is sent one by one so that the output timeout
can be minimum for each paragraph.
2) Selection

Signed-off-by: Mert Tumer 
Change-Id: Ia2d3ab2f6757faf565b939e1d670a7dedac33390

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index d455a64ab266..c4c0a52b2ef4 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/options/optgenrl \
 cui/source/options/opthtml \
 cui/source/options/optlanguagetool \
+cui/source/options/optdeepl \
 cui/source/options/optinet2 \
 cui/source/options/optjava \
 cui/source/options/optjsearch \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 806779daaa9d..0ed879e2b228 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/optgeneralpage \
cui/uiconfig/ui/opthtmlpage \
cui/uiconfig/ui/langtoolconfigpage \
+   cui/uiconfig/ui/deepltabpage \
cui/uiconfig/ui/optionsdialog \
cui/uiconfig/ui/optjsearchpage \
cui/uiconfig/ui/optlanguagespage \
diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc
index 952b79ea92d4..6d5bc4004a53 100644
--- a/cui/inc/treeopt.hrc
+++ b/cui/inc/treeopt.hrc
@@ -55,7 +55,8 @@ const std::pair 
SID_LANGUAGE_OPTIONS_RES[] =
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"),  
RID_SVXPAGE_JSEARCH_OPTIONS },
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"),  
RID_SVXPAGE_ASIAN_LAYOUT },
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"),  
RID_SVXPAGE_OPTIONS_CTL },
-{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"),  
RID_SVXPAGE_LANGTOOL_OPTIONS }
+{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"),  
RID_SVXPAGE_LANGTOOL_OPTIONS },
+{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"),  
RID_SVXPAGE_DEEPL_OPTIONS }
 };
 
 const std::pair SID_INET_DLG_RES[] =
diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx
new file mode 100644
index ..94b48ccc2f43
--- /dev/null
+++ b/cui/source/options/optdeepl.cxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "optdeepl.hxx"
+#include 
+
+OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage,
+   weld::DialogController* 
pController,
+   const SfxItemSet& rSet)
+: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", 
)
+, m_xAPIUrl(m_xBuilder->weld_entry("apiurl"))
+, m_xAuthKey(m_xBuilder->weld_entry("authkey"))
+{
+
+}
+
+OptDeeplTabPage::~OptDeeplTabPage() {}
+
+void OptDeeplTabPage::Reset(const SfxItemSet*)
+{
+SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get();
+m_xAPIUrl->set_text(rDeeplOptions.getAPIUrl());
+m_xAuthKey->set_text(rDeeplOptions.getAuthKey());
+}
+
+bool OptDeeplTabPage::FillItemSet(SfxItemSet*)
+{
+SvxDeeplOptions& rDeeplOptions = 

[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/sfx2 include/svtools include/svx include/vcl officecfg/

2022-07-14 Thread Mert Tumer (via logerrit)
Rebased ref, commits from common ancestor:
commit 45b74b4b7e61751b350fcbc2526d482a2ad1b18b
Author: Mert Tumer 
AuthorDate: Tue Jul 5 12:03:27 2022 +0300
Commit: Mert Tumer 
CommitDate: Thu Jul 14 18:45:31 2022 +0300

wip translate

Signed-off-by: Mert Tumer 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index d455a64ab266..c4c0a52b2ef4 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/options/optgenrl \
 cui/source/options/opthtml \
 cui/source/options/optlanguagetool \
+cui/source/options/optdeepl \
 cui/source/options/optinet2 \
 cui/source/options/optjava \
 cui/source/options/optjsearch \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 806779daaa9d..0ed879e2b228 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/optgeneralpage \
cui/uiconfig/ui/opthtmlpage \
cui/uiconfig/ui/langtoolconfigpage \
+   cui/uiconfig/ui/deepltabpage \
cui/uiconfig/ui/optionsdialog \
cui/uiconfig/ui/optjsearchpage \
cui/uiconfig/ui/optlanguagespage \
diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc
index 952b79ea92d4..6d5bc4004a53 100644
--- a/cui/inc/treeopt.hrc
+++ b/cui/inc/treeopt.hrc
@@ -55,7 +55,8 @@ const std::pair 
SID_LANGUAGE_OPTIONS_RES[] =
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"),  
RID_SVXPAGE_JSEARCH_OPTIONS },
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"),  
RID_SVXPAGE_ASIAN_LAYOUT },
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"),  
RID_SVXPAGE_OPTIONS_CTL },
-{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"),  
RID_SVXPAGE_LANGTOOL_OPTIONS }
+{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"),  
RID_SVXPAGE_LANGTOOL_OPTIONS },
+{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"),  
RID_SVXPAGE_DEEPL_OPTIONS }
 };
 
 const std::pair SID_INET_DLG_RES[] =
diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx
new file mode 100644
index ..94b48ccc2f43
--- /dev/null
+++ b/cui/source/options/optdeepl.cxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "optdeepl.hxx"
+#include 
+
+OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage,
+   weld::DialogController* 
pController,
+   const SfxItemSet& rSet)
+: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", 
)
+, m_xAPIUrl(m_xBuilder->weld_entry("apiurl"))
+, m_xAuthKey(m_xBuilder->weld_entry("authkey"))
+{
+
+}
+
+OptDeeplTabPage::~OptDeeplTabPage() {}
+
+void OptDeeplTabPage::Reset(const SfxItemSet*)
+{
+SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get();
+m_xAPIUrl->set_text(rDeeplOptions.getAPIUrl());
+m_xAuthKey->set_text(rDeeplOptions.getAuthKey());
+}
+
+bool OptDeeplTabPage::FillItemSet(SfxItemSet*)
+{
+SvxDeeplOptions& rDeeplOptions = SvxDeeplOptions::Get();
+rDeeplOptions.setAPIUrl(m_xAPIUrl->get_text());
+rDeeplOptions.setAuthKey(m_xAuthKey->get_text());
+return false;
+}
+
+std::unique_ptr OptDeeplTabPage::Create(weld::Container* pPage,
+   
weld::DialogController* pController,
+   const SfxItemSet* 
rAttrSet)
+{
+return std::make_unique(pPage, pController, *rAttrSet);
+}
diff --git a/cui/source/options/optdeepl.hxx b/cui/source/options/optdeepl.hxx
new file mode 100644
index ..124f9494c4aa
--- /dev/null
+++ b/cui/source/options/optdeepl.hxx
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one 

[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/sfx2 include/svx include/vcl officecfg/registry svx/sdi

2022-07-13 Thread Mert Tumer (via logerrit)
Rebased ref, commits from common ancestor:
commit 2d13c73e198c3d1b462fcc055dfe38b0b361474f
Author: Mert Tumer 
AuthorDate: Tue Jul 5 12:03:27 2022 +0300
Commit: Mert Tumer 
CommitDate: Wed Jul 13 19:16:35 2022 +0300

wip translate

Signed-off-by: Mert Tumer 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index d455a64ab266..c4c0a52b2ef4 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/options/optgenrl \
 cui/source/options/opthtml \
 cui/source/options/optlanguagetool \
+cui/source/options/optdeepl \
 cui/source/options/optinet2 \
 cui/source/options/optjava \
 cui/source/options/optjsearch \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 806779daaa9d..0ed879e2b228 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/optgeneralpage \
cui/uiconfig/ui/opthtmlpage \
cui/uiconfig/ui/langtoolconfigpage \
+   cui/uiconfig/ui/deepltabpage \
cui/uiconfig/ui/optionsdialog \
cui/uiconfig/ui/optjsearchpage \
cui/uiconfig/ui/optlanguagespage \
diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc
index 952b79ea92d4..6d5bc4004a53 100644
--- a/cui/inc/treeopt.hrc
+++ b/cui/inc/treeopt.hrc
@@ -55,7 +55,8 @@ const std::pair 
SID_LANGUAGE_OPTIONS_RES[] =
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"),  
RID_SVXPAGE_JSEARCH_OPTIONS },
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"),  
RID_SVXPAGE_ASIAN_LAYOUT },
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"),  
RID_SVXPAGE_OPTIONS_CTL },
-{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"),  
RID_SVXPAGE_LANGTOOL_OPTIONS }
+{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"),  
RID_SVXPAGE_LANGTOOL_OPTIONS },
+{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"),  
RID_SVXPAGE_DEEPL_OPTIONS }
 };
 
 const std::pair SID_INET_DLG_RES[] =
diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx
new file mode 100644
index ..5b3538530cce
--- /dev/null
+++ b/cui/source/options/optdeepl.cxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "optdeepl.hxx"
+#include 
+#include 
+
+OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage,
+   weld::DialogController* 
pController,
+   const SfxItemSet& rSet)
+: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", 
)
+{
+
+}
+
+OptDeeplTabPage::~OptDeeplTabPage() {}
+
+void OptDeeplTabPage::Reset(const SfxItemSet*)
+{
+}
+
+bool OptDeeplTabPage::FillItemSet(SfxItemSet*)
+{
+return false;
+}
+
+std::unique_ptr OptDeeplTabPage::Create(weld::Container* pPage,
+   
weld::DialogController* pController,
+   const SfxItemSet* 
rAttrSet)
+{
+return std::make_unique(pPage, pController, *rAttrSet);
+}
diff --git a/cui/source/options/optdeepl.hxx b/cui/source/options/optdeepl.hxx
new file mode 100644
index ..15d80b007647
--- /dev/null
+++ b/cui/source/options/optdeepl.hxx
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the 

[Libreoffice-commits] core.git: Branch 'private/mert/wip_deepl' - cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk include/sfx2 include/svx include/vcl officecfg/registry svx/sdi

2022-07-13 Thread Mert Tumer (via logerrit)
Rebased ref, commits from common ancestor:
commit cc0a4ed042b1ce484250dbb101d0a5f48f640153
Author: Mert Tumer 
AuthorDate: Tue Jul 5 12:03:27 2022 +0300
Commit: Mert Tumer 
CommitDate: Wed Jul 13 22:58:43 2022 +0300

wip translate

Signed-off-by: Mert Tumer 

diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index d455a64ab266..c4c0a52b2ef4 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -181,6 +181,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
 cui/source/options/optgenrl \
 cui/source/options/opthtml \
 cui/source/options/optlanguagetool \
+cui/source/options/optdeepl \
 cui/source/options/optinet2 \
 cui/source/options/optjava \
 cui/source/options/optjsearch \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 806779daaa9d..0ed879e2b228 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -139,6 +139,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/optgeneralpage \
cui/uiconfig/ui/opthtmlpage \
cui/uiconfig/ui/langtoolconfigpage \
+   cui/uiconfig/ui/deepltabpage \
cui/uiconfig/ui/optionsdialog \
cui/uiconfig/ui/optjsearchpage \
cui/uiconfig/ui/optlanguagespage \
diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc
index 952b79ea92d4..6d5bc4004a53 100644
--- a/cui/inc/treeopt.hrc
+++ b/cui/inc/treeopt.hrc
@@ -55,7 +55,8 @@ const std::pair 
SID_LANGUAGE_OPTIONS_RES[] =
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Searching in Japanese"),  
RID_SVXPAGE_JSEARCH_OPTIONS },
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Asian Layout"),  
RID_SVXPAGE_ASIAN_LAYOUT },
 { NC_("SID_LANGUAGE_OPTIONS_RES", "Complex Text Layout"),  
RID_SVXPAGE_OPTIONS_CTL },
-{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"),  
RID_SVXPAGE_LANGTOOL_OPTIONS }
+{ NC_("SID_LANGUAGE_OPTIONS_RES", "LanguageTool Server Settings"),  
RID_SVXPAGE_LANGTOOL_OPTIONS },
+{ NC_("SID_LANGUAGE_OPTIONS_RES", "DeepL Server Settings"),  
RID_SVXPAGE_DEEPL_OPTIONS }
 };
 
 const std::pair SID_INET_DLG_RES[] =
diff --git a/cui/source/options/optdeepl.cxx b/cui/source/options/optdeepl.cxx
new file mode 100644
index ..5b3538530cce
--- /dev/null
+++ b/cui/source/options/optdeepl.cxx
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include "optdeepl.hxx"
+#include 
+#include 
+
+OptDeeplTabPage::OptDeeplTabPage(weld::Container* pPage,
+   weld::DialogController* 
pController,
+   const SfxItemSet& rSet)
+: SfxTabPage(pPage, pController, "cui/ui/deepltabpage.ui", "OptDeeplPage", 
)
+{
+
+}
+
+OptDeeplTabPage::~OptDeeplTabPage() {}
+
+void OptDeeplTabPage::Reset(const SfxItemSet*)
+{
+}
+
+bool OptDeeplTabPage::FillItemSet(SfxItemSet*)
+{
+return false;
+}
+
+std::unique_ptr OptDeeplTabPage::Create(weld::Container* pPage,
+   
weld::DialogController* pController,
+   const SfxItemSet* 
rAttrSet)
+{
+return std::make_unique(pPage, pController, *rAttrSet);
+}
diff --git a/cui/source/options/optdeepl.hxx b/cui/source/options/optdeepl.hxx
new file mode 100644
index ..15d80b007647
--- /dev/null
+++ b/cui/source/options/optdeepl.hxx
@@ -0,0 +1,33 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the 

  1   2   >