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

2018-01-30 Thread Milian Wolff
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx |   35 -
 1 file changed, 34 insertions(+), 1 deletion(-)

New commits:
commit 53e414df4af125ccc9b9dd96b7212f2fef7b7de2
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Tue Jan 30 11:16:00 2018 +0100

Fix compilation with GCC 4.8

Workaround a bug in variadic template parameter pack expansion in
lambdas that affects GCC 4.8. The workaround expands the pack outside
the lambda into a custom functor that then calls readIpcArgs.

Change-Id: I7a2d8572a6f2b330bb22a4f18f5cc13fd7ef9b45
Reviewed-on: https://gerrit.libreoffice.org/48895
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx
index bed1ae113823..3e97eebbb0c1 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx
@@ -71,10 +71,43 @@ public:
 
 std::string readResponseLine();
 
+// workaround gcc <= 4.8 bug: 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55914
+template  struct seq
+{
+};
+template  struct gens : gens
+{
+};
+template  struct gens<0, S...>
+{
+typedef seq type;
+};
+template  struct ArgsReader
+{
+ArgsReader(Args&... args)
+: m_args(args...)
+{
+}
+
+void operator()(std::istream& stream)
+{
+callFunc(stream, typename gens<sizeof...(Args)>::type());
+}
+
+private:
+template  void callFunc(std::istream& stream, seq)
+{
+readIpcArgs(stream, std::get(m_args)...);
+}
+
+std::tuple<Args&...> m_args;
+};
+
 template  void readResponse(uint64_t id, Args&... args)
 {
 // read synchronously from a background thread and run the eventloop 
until the value becomes available
 // this allows us to keep the GUI responsive and also enables access 
to the LO clipboard
+ArgsReader argsReader(args...);
 await(std::async(std::launch::async, [&]() {
 while (true)
 {
@@ -92,7 +125,7 @@ public:
 if (m_incomingResponse == id)
 {
 // the response we are waiting for came in
-readIpcArgs(m_responseStream, args...);
+argsReader(m_responseStream);
 m_incomingResponse = 0;
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - vcl/unx

2018-01-30 Thread Milian Wolff
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx |   35 -
 1 file changed, 34 insertions(+), 1 deletion(-)

New commits:
commit 71ff8ea36e365c364aedce83dd6f9f3b8db69f5d
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Tue Jan 30 11:16:00 2018 +0100

Fix compilation with GCC 4.8

Workaround a bug in variadic template parameter pack expansion in
lambdas that affects GCC <= 4.8
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55914).
The workaround expands the pack outside the lambda into a custom
functor that then calls readIpcArgs.

Change-Id: I7a2d8572a6f2b330bb22a4f18f5cc13fd7ef9b45

diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx
index a1877d617420..a6b6f9098300 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx
@@ -71,10 +71,43 @@ public:
 
 std::string readResponseLine();
 
+// workaround gcc <= 4.8 bug: 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55914
+template  struct seq
+{
+};
+template  struct gens : gens
+{
+};
+template  struct gens<0, S...>
+{
+typedef seq type;
+};
+template  struct ArgsReader
+{
+ArgsReader(Args&... args)
+: m_args(args...)
+{
+}
+
+void operator()(std::istream& stream)
+{
+callFunc(stream, typename gens<sizeof...(Args)>::type());
+}
+
+private:
+template  void callFunc(std::istream& stream, seq)
+{
+readIpcArgs(stream, std::get(m_args)...);
+}
+
+std::tuple<Args&...> m_args;
+};
+
 template  void readResponse(uint64_t id, Args&... args)
 {
 // read synchronously from a background thread and run the eventloop 
until the value becomes available
 // this allows us to keep the GUI responsive and also enables access 
to the LO clipboard
+ArgsReader argsReader(args...);
 await(std::async(std::launch::async, [&]() {
 while (true)
 {
@@ -91,7 +124,7 @@ public:
 if (m_incomingResponse == id)
 {
 // the response we are waiting for came in
-readIpcArgs(m_responseStream, args...);
+argsReader(m_responseStream);
 m_incomingResponse = 0;
 break;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - 11 commits - config_host/config_gtk3_kde5.h.in config_host/config_kde5.h.in config_host/config_qt5.h.in config_host/con

2018-01-26 Thread Milian Wolff
 Repository.mk  |7 
 RepositoryExternal.mk  |   64 ++
 config_host.mk.in  |   14 
 config_host/config_gtk3_kde5.h.in  |   10 
 config_host/config_kde5.h.in   |   10 
 config_host/config_qt5.h.in|   11 
 config_host/config_vclplug.h.in|1 
 configure.ac   |  237 +
 postprocess/Rdb_services.mk|3 
 scp2/InstallScript_setup_osl.mk|2 
 scp2/Module_scp2.mk|2 
 shell/Library_kde5be.mk|   32 +
 shell/Module_shell.mk  |6 
 shell/source/backends/desktopbe/desktopbackend.cxx |4 
 shell/source/backends/kde5be/kde5access.cxx|  316 
 shell/source/backends/kde5be/kde5access.hxx|   48 +
 shell/source/backends/kde5be/kde5backend.cxx   |  252 +
 shell/source/backends/kde5be/kde5be1.component |   25 
 vcl/CustomTarget_gtk3_kde5_moc.mk  |   22 
 vcl/Executable_lo_kde5filepicker.mk|   98 +++
 vcl/Library_vclplug_gtk3_kde5.mk   |  127 
 vcl/Module_vcl.mk  |7 
 vcl/unx/generic/plugadapt/salplug.cxx  |5 
 vcl/unx/gtk3_kde5/FPServiceInfo.hxx|   28 +
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkaction.cxx |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkbridge.cxx |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkcomponent.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkeditabletext.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkfactory.cxx|   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkhypertext.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkimage.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atklistener.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkregistry.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkselection.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atktable.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atktext.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atktextattributes.cxx |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkutil.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkvalue.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkwindow.cxx |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkwrapper.cxx|   12 
 vcl/unx/gtk3_kde5/filepicker_ipc_commands.hxx  |  161 ++
 vcl/unx/gtk3_kde5/gtk3_kde5_a11y.cxx   |   38 +
 vcl/unx/gtk3_kde5/gtk3_kde5_cairo.cxx  |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx |  432 +
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx |  136 +
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx |  259 ++
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx |  113 
 vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.cxx   |   88 +++
 vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.hxx   |   61 ++
 vcl/unx/gtk3_kde5/gtk3_kde5_gloactiongroup.cxx |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_glomenu.cxx|   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkdata.cxx|   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkframe.cxx   |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx|   55 ++
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkobject.cxx  |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtksalmenu.cxx |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtksys.cxx |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_hudawareness.cxx   |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_printwrapper.cxx   |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_salnativewidgets-gtk.cxx   |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_salprn-gtk.cxx |   22 
 vcl/unx/gtk3_kde5/kde5_filepicker.cxx  |  245 +
 vcl/unx/gtk3_kde5/kde5_filepicker.hxx  |  110 
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx  |  246 +
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.hxx  |   45 +
 vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx  |   54 ++
 67 files changed, 3839 insertions(+), 3 deletions(-)

New commits:
commit 93a0865bcd6260d36450c37afdf509d8b6e7d253
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Thu Jan 25 14:08:28 2018 +0100

lo_kde5filepicker: cleanup main and add version and help options

This way users can figure out what this tool is about. Most notably,
you can run it now with `-h, --help` as one would expect.

Change-Id: If8dd3142bdcc96d2962a2647b2187d75666b9394
(cherry picked from commit 63d9c1f8bf94ea16f08e78a5f2667d5e4d96c22e)

diff --git a/vcl/unx/gtk

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

2018-01-25 Thread Milian Wolff
 vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx |   19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

New commits:
commit bea99d013a0dea0c010a94425aef08c6711a669c
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Thu Jan 25 14:08:28 2018 +0100

lo_kde5filepicker: cleanup main and add version and help options

This way users can figure out what this tool is about. Most notably,
you can run it now with `-h, --help` as one would expect.

Change-Id: If8dd3142bdcc96d2962a2647b2187d75666b9394
Reviewed-on: https://gerrit.libreoffice.org/48592
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx 
b/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx
index c17236d281a0..d25af0afee70 100644
--- a/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx
@@ -21,14 +21,29 @@
 #include "kde5_filepicker_ipc.hxx"
 
 #include 
+#include 
+#include 
 
-#include 
+#include 
 
 int main(int argc, char** argv)
 {
+QApplication::setOrganizationName("LibreOffice");
+QApplication::setOrganizationDomain("libreoffice.org");
 QApplication::setApplicationName(QStringLiteral("lo_kde5filepicker"));
-QApplication app(argc, argv);
 QApplication::setQuitOnLastWindowClosed(false);
+QApplication::setApplicationVersion(LIBO_VERSION_DOTTED);
+
+QApplication app(argc, argv);
+
+QCommandLineParser parser;
+parser.setApplicationDescription(
+QObject::tr("Helper executable for LibreOffice KDE/Plasma 
integration.\n"
+"Do not run this executable directly. Rather, use it 
indirectly via "
+"the gtk3_kde5 VCL plugin 
(SAL_USE_VCLPLUGIN=gtk3_kde5)."));
+parser.addVersionOption();
+parser.addHelpOption();
+parser.process(app);
 
 KDE5FilePicker filePicker;
 FilePickerIpc ipc();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Milian Wolff
 vcl/unx/gtk3_kde5/kde5_filepicker.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 91ab6b4feda09e2ded45f716d8f283ced06971ad
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Thu Jan 25 14:05:37 2018 +0100

Properly restore size of KDE5 file picker dialog

The event filter we installed prevented the show event from reaching
the KDEPlatformFileDialogHelper::show method. This prevented the
dialog from being restored to the size chosen by the user previously.

Change-Id: I7af457f19f59d27bd104f8f70d9f4767da6641ee
Reviewed-on: https://gerrit.libreoffice.org/48591
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx 
b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
index 9b3f21db92e9..d774ebc2834e 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
@@ -235,7 +235,6 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
 KWindowSystem::setMainWindow(w, _winId);
 if (auto* fileWidget = w->findChild<KFileWidget*>({}, 
Qt::FindDirectChildrenOnly))
 fileWidget->setCustomWidget(_extraControls);
-return false;
 }
 }
 return QObject::eventFilter(o, e);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-01-25 Thread Milian Wolff
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx |   51 --
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.hxx |2 -
 2 files changed, 29 insertions(+), 24 deletions(-)

New commits:
commit a8a52bf04c3e459189511dd2fefc0f2851a356e9
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Thu Jan 25 13:53:25 2018 +0100

Properly quit the lo_kde5filepicker on Quit command

Quitting the event loop is not enough, we also have to get out
of the readCommands loop. Return false for this scenario. Also
exit the command when an unhandled command comes in, we cannot
really recover the stream from this anyways.

Change-Id: I7d58724ea0364565e476516d5645cb436ce1d461
Reviewed-on: https://gerrit.libreoffice.org/48590
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx 
b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
index 082864066d16..26c19f6b4c9b 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
@@ -65,14 +65,17 @@ FilePickerIpc::~FilePickerIpc() = default;
 
 void FilePickerIpc::readCommands()
 {
-while (!std::cin.eof())
+while (readCommand())
 {
-readCommand();
+// read next command
 }
 }
 
-void FilePickerIpc::readCommand()
+bool FilePickerIpc::readCommand()
 {
+if (std::cin.eof())
+return false;
+
 uint64_t messageId = 0;
 Commands command;
 readIpcArgs(std::cin, messageId, command);
@@ -84,45 +87,45 @@ void FilePickerIpc::readCommand()
 QString title;
 readIpcArgs(std::cin, title);
 m_filePicker->setTitle(title);
-return;
+return true;
 }
 case Commands::SetWinId:
 {
 sal_uIntPtr winId = 0;
 readIpcArgs(std::cin, winId);
 m_filePicker->setWinId(winId);
-return;
+return true;
 }
 case Commands::Execute:
 {
 sendIpcArgs(std::cout, messageId, m_filePicker->execute());
-return;
+return true;
 }
 case Commands::SetMultiSelectionMode:
 {
 bool multiSelection = false;
 readIpcArgs(std::cin, multiSelection);
 m_filePicker->setMultiSelectionMode(multiSelection);
-return;
+return true;
 }
 case Commands::SetDefaultName:
 {
 QString name;
 readIpcArgs(std::cin, name);
 m_filePicker->setDefaultName(name);
-return;
+return true;
 }
 case Commands::SetDisplayDirectory:
 {
 QString dir;
 readIpcArgs(std::cin, dir);
 m_filePicker->setDisplayDirectory(dir);
-return;
+return true;
 }
 case Commands::GetDisplayDirectory:
 {
 sendIpcArgs(std::cout, messageId, 
m_filePicker->getDisplayDirectory());
-return;
+return true;
 }
 case Commands::GetSelectedFiles:
 {
@@ -145,26 +148,26 @@ void FilePickerIpc::readCommand()
 files << url.toString();
 }
 sendIpcArgs(std::cout, messageId, files);
-return;
+return true;
 }
 case Commands::AppendFilter:
 {
 QString title, filter;
 readIpcArgs(std::cin, title, filter);
 m_filePicker->appendFilter(title, filter);
-return;
+return true;
 }
 case Commands::SetCurrentFilter:
 {
 QString title;
 readIpcArgs(std::cin, title);
 m_filePicker->setCurrentFilter(title);
-return;
+return true;
 }
 case Commands::GetCurrentFilter:
 {
 sendIpcArgs(std::cout, messageId, 
m_filePicker->getCurrentFilter());
-return;
+return true;
 }
 case Commands::SetValue:
 {
@@ -173,7 +176,7 @@ void FilePickerIpc::readCommand()
 bool value = false;
 readIpcArgs(std::cin, controlId, nControlAction, value);
 m_filePicker->setValue(controlId, nControlAction, value);
-return;
+return true;
 }
 case Commands::GetValue:
 {
@@ -181,7 +184,7 @@ void FilePickerIpc::readCommand()
 sal_Int16 nControlAction = 0;
 readIpcArgs(std::cin, controlId, nControlAction);
 sendIpcArgs(std::cout, messageId, 
m_filePicker->getValue(controlId, nControlAction));
-return;
+return true;
 }
 case Commands::EnableControl:
 {
@@ -189,7 +192,7 @@ void FilePickerIpc::readCommand()
 bool enabled = false;
 readIpcA

[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - .gitreview

2018-01-25 Thread Milian Wolff
 .gitreview |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 968063794fd55fa584b26206a994c2d29c8d3e54
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Thu Jan 25 14:29:29 2018 +0100

Update default branch in .gitreview

Change-Id: I32348fa4775cd430edf487d5866b6c50782b99e7
Reviewed-on: https://gerrit.libreoffice.org/48593
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
Tested-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/.gitreview b/.gitreview
index 13446a7f6d4b..5cbcb2da323f 100644
--- a/.gitreview
+++ b/.gitreview
@@ -3,5 +3,5 @@ host=logerrit
 port=29418
 project=core
 defaultremote=logerrit
-defaultbranch=libreoffice-5-2
+defaultbranch=private/swe/libreoffice-5-2+backports
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - configure.ac vcl/unx

2018-01-25 Thread Milian Wolff
 configure.ac   |4 -
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx |9 --
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx |3 
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx |   98 +++--
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx |   29 +--
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx|6 -
 6 files changed, 101 insertions(+), 48 deletions(-)

New commits:
commit cbf0c689d41ba11f37e557c10db7976f8318d43c
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Wed Jan 24 11:43:20 2018 +0100

Undo "check for boost/process/child.hpp in configure.ac if 
--enable-gtk3-kde5"

This reverts commit c7a1320593191e8359aa64d8e262948da085d358.
It's no longer required since we ported away from boost.:process

Change-Id: I53c5b994c3ba2801823ba0d6ab25f43223db1476
Reviewed-on: https://gerrit.libreoffice.org/48491
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/configure.ac b/configure.ac
index 3de79ab4d192..2780d20f7b9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8716,10 +8716,6 @@ if test "$with_system_boost" = "yes"; then
[AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
 AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
[AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install 
boost >= 1.36)], [])
-if test "x$enable_gtk3_kde5" = "xyes"; then
-AC_CHECK_HEADER(boost/process/child.hpp, [],
-   [AC_MSG_ERROR(boost/process/child.hpp not found. install boost >= 
1.64)], [])
-fi
 CXXFLAGS=$save_CXXFLAGS
 AC_LANG_POP([C++])
 # this is in m4/ax_boost_base.m4
commit 068f244222edcc5916fe864a0265ab6ccb4e43d2
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Wed Jan 24 11:35:20 2018 +0100

gtk3_kde5: port away from boost::process

While this uglifies the code, it removes a dependency on newer
boost 1.64+ which ships boost::process. This helps on systems
where LO is linked against system boost and an older version
of boost is used.

Additionally, and this is the main motivation, this makes it
easier to backport these changes to 5.2, where the bundled boost
is also only at 1.60.

To keep the required changes at a minimum, the osl_* API for
reading from/writing to the stdout/stdin of the helper process,
we buffer the responses on a line-by-line basis. Note that one
cannot simply reuse osl_readLine on the non-seekable oslFileHandle.
Instead, we have to roll our own simplistic readLine implementation...

Change-Id: I1197e38cb2416e926d8ba985accd6c10d78bcc52
Reviewed-on: https://gerrit.libreoffice.org/48490
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
index 7372d476f55e..8c983996b791 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
@@ -42,13 +42,6 @@
 
 #include 
 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::ui::dialogs;
 using namespace ::com::sun::star::ui::dialogs::TemplateDescription;
@@ -57,8 +50,6 @@ using namespace 
::com::sun::star::ui::dialogs::CommonFilePickerElementIds;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::uno;
-namespace bp = boost::process;
-namespace bf = boost::filesystem;
 
 // helper functions
 
diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx
index 80261ded9f9b..740382d9ec49 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx
@@ -32,9 +32,6 @@
 
 #include 
 
-#include 
-#include 
-
 #include "gtk3_kde5_filepicker_ipc.hxx"
 
 #include 
diff --git a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx 
b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
index fd9c1c7b64e1..21690c5e74f8 100644
--- a/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
@@ -26,6 +26,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 
@@ -41,38 +42,33 @@
 #include 
 
 #include 
-#include 
-#include 
-#include 
 
 using namespace ::com::sun::star::ui::dialogs;
 
-namespace bp = boost::process;
-namespace bf = boost::filesystem;
-
 // helper functions
 
 namespace
 {
-bf::path applicationDirPath()
+OUString applicationDirPath()
 {
 OUString applicationFilePath;
 osl_getExecutableFile();
 OUString applicationSystemPath;
 osl_getSystemPathFromFileURL(applicationFilePath.pData, 
);
-auto sysPath = applicationSystemPath.toUtf8();
-auto ret = bf::path(sysPath.getSt

[Libreoffice-commits] core.git: include/osl

2018-01-24 Thread Milian Wolff
 include/osl/process.h |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit cca67d26b6d503ab7dcf3a05fb77fe648cd25f2c
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Tue Jan 23 17:40:51 2018 +0100

Fix documentation for osl_executeProcess_WithRedirectedIO

The file handle arguments are out parameters, not input parameters.

Change-Id: Iad604e4df9e89a8f83c4cb6a3faa35ee20cd80aa
Reviewed-on: https://gerrit.libreoffice.org/48450
Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
Tested-by: Jenkins <c...@libreoffice.org>

diff --git a/include/osl/process.h b/include/osl/process.h
index a2c1eed4193c..f3aa86d2f6dc 100644
--- a/include/osl/process.h
+++ b/include/osl/process.h
@@ -203,17 +203,17 @@ SAL_DLLPUBLIC oslProcessError SAL_CALL osl_executeProcess(
 Pointer to a oslProcess variable, which receives the handle of the newly 
created process.
 This parameter must not be NULL.
 
-@param[in] pChildInputWrite
+@param[out] pChildInputWrite
 Pointer to a oslFileHandle variable that receives the handle which can be 
used to write
 to the child process standard input device. The returned handle is not 
random accessible.
 The handle has to be closed with osl_closeFile if no longer used. This 
parameter can be NULL.
 
-@param[in] pChildOutputRead
+@param[out] pChildOutputRead
 Pointer to a oslFileHandle variable that receives the handle which can be 
used to read from
 the child process standard output device. The returned handle is not 
random accessible.
 The Handle has to be closed with osl_closeFile if no longer used. This 
parameter can be NULL.
 
-@param[in] pChildErrorRead
+@param[out] pChildErrorRead
 Pointer to a oslFileHandle variable that receives the handle which can be 
used to read from
 the child process standard error device. The returned handle is not random 
accessible.
 The Handle has to be closed with osl_closeFile if no longer used. This 
parameter can be NULL.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: config_host/config_kde5.h.in config_host/config_vclplug.h.in config_host.mk.in configure.ac RepositoryExternal.mk Repository.mk scp2/InstallScript_setup_osl.mk scp2/Mod

2018-01-23 Thread Milian Wolff
 Repository.mk   |1 +
 RepositoryExternal.mk   |   35 +++
 config_host.mk.in   |4 
 config_host/config_kde5.h.in|   10 ++
 config_host/config_vclplug.h.in |1 +
 configure.ac|   27 ---
 scp2/InstallScript_setup_osl.mk |2 +-
 scp2/Module_scp2.mk |2 +-
 vcl/Module_vcl.mk   |1 +
 9 files changed, 78 insertions(+), 5 deletions(-)

New commits:
commit 4d78cf97d7b1629556df68fc461922fda930d9ec
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Wed Jan 10 16:26:10 2018 +0100

Extend build system to support linking against KDE Frameworks 5

Pass --enable-kde5 to autogen.sh to enable this feature. Then
add kde5 to the list of externals to link against KF5. I will
introduce other code that depends on KF5 though which will
leverage this feature.

Change-Id: I17e434a53ac769000b0f805b1f41cdc5c2c84ee2
Reviewed-on: https://gerrit.libreoffice.org/47715
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/Repository.mk b/Repository.mk
index dcb201a904b9..d7b1847591c4 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -299,6 +299,7 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,kde, \
$(if $(ENABLE_KDE4),kde4be1) \
$(if $(USING_X11), \
$(if $(ENABLE_KDE4),vclplug_kde4) \
+   $(if $(ENABLE_KDE5),vclplug_kde5) \
 $(if $(ENABLE_QT5),vclplug_qt5) \
) \
 ))
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index a795db70e4a0..94f2bd333d28 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3066,6 +3066,41 @@ endef
 
 endif # ENABLE_KDE4
 
+
+ifeq ($(ENABLE_KDE5),TRUE)
+
+define gb_LinkTarget__use_kde5
+$(call gb_LinkTarget_set_include,$(1),\
+   $(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem 
/,-isystem/,$(KF5_CFLAGS \
+   $$(INCLUDE) \
+)
+
+$(call gb_LinkTarget_add_defs,$(1),\
+   $(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) 
\
+)
+
+$(call gb_LinkTarget_add_libs,$(1),\
+   $(KF5_LIBS) \
+)
+
+ifeq ($(COM),GCC)
+$(call gb_LinkTarget_add_cxxflags,$(1),\
+   -Wno-shadow \
+)
+endif
+
+endef
+
+else # !ENABLE_KDE5
+
+define gb_LinkTarget__use_kde5
+
+endef
+
+endif # ENABLE_KDE5
+
+
+
 ifeq ($(ENABLE_QT5),TRUE)
 
 define gb_LinkTarget__use_qt5
diff --git a/config_host.mk.in b/config_host.mk.in
index cf9cefbd0fc8..d5630a5b4537 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -157,6 +157,7 @@ export ENABLE_PCH=@ENABLE_PCH@
 export ENABLE_PDFIMPORT=@ENABLE_PDFIMPORT@
 export ENABLE_PDFIUM=@ENABLE_PDFIUM@
 export ENABLE_QT5=@ENABLE_QT5@
+export ENABLE_KDE5=@ENABLE_KDE5@
 export ENABLE_RANDR=@ENABLE_RANDR@
 export ENABLE_RELEASE_BUILD=@ENABLE_RELEASE_BUILD@
 export ENABLE_REPORTBUILDER=@ENABLE_REPORTBUILDER@
@@ -299,6 +300,9 @@ export KDE4_GLIB_LIBS=$(gb_SPACE)@KDE4_GLIB_LIBS@
 export KDE4_HAVE_GLIB=@KDE4_HAVE_GLIB@
 export KF5_CFLAGS=$(gb_SPACE)@KF5_CFLAGS@
 export KF5_LIBS=$(gb_SPACE)@KF5_LIBS@
+export KF5_GLIB_CFLAGS=$(gb_SPACE)@KF5_GLIB_CFLAGS@
+export KF5_GLIB_LIBS=$(gb_SPACE)@KF5_GLIB_LIBS@
+export KF5_HAVE_GLIB=@KF5_HAVE_GLIB@
 export KRB5_LIBS=@KRB5_LIBS@
 export LCMS2_CFLAGS=$(gb_SPACE)@LCMS2_CFLAGS@
 export LCMS2_LIBS=$(gb_SPACE)@LCMS2_LIBS@
diff --git a/config_host/config_kde5.h.in b/config_host/config_kde5.h.in
new file mode 100644
index ..af42a5edcf6a
--- /dev/null
+++ b/config_host/config_kde5.h.in
@@ -0,0 +1,10 @@
+/*
+Settings for KDE5 integration.
+*/
+
+#ifndef CONFIG_KDE5_H
+#define CONFIG_KDE5_H
+
+#define KDE5_HAVE_GLIB 0
+
+#endif
diff --git a/config_host/config_vclplug.h.in b/config_host/config_vclplug.h.in
index 510d0d25229c..b7b9624cdf79 100644
--- a/config_host/config_vclplug.h.in
+++ b/config_host/config_vclplug.h.in
@@ -9,5 +9,6 @@ Settings about which X11 desktops have support enabled.
 
 #define ENABLE_GTK 0
 #define ENABLE_KDE4 0
+#define ENABLE_KDE5 0
 
 #endif
diff --git a/configure.ac b/configure.ac
index e60822d9df26..ce9b28feba0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -593,6 +593,7 @@ linux-gnu*|k*bsd*-gnu*)
 build_gstreamer_1_0=yes
 build_gstreamer_0_10=yes
 test_kde4=yes
+test_kde5=yes
 test_qt5=yes
 if test "$enable_fuzzers" != yes; then
 test_freetype=yes
@@ -688,6 +689,7 @@ freebsd*)
 build_gstreamer_1_0=yes
 build_gstreamer_0_10=yes
 test_kde4=yes
+test_kde5=yes
 test_qt5=yes
 test_freetype=yes
 AC_MSG_CHECKING([the FreeBSD operating system release])
@@ -717,6 +719,7 @@ freebsd*)
 build_gstreamer_1_0=yes
 build_gstreamer_0_10=yes
 test_kde4=yes
+test_kde5=yes
 test_qt5=yes
 test_freetype=yes
 PTHREAD_LIBS="-pthread -lpthread"
@@ -743,6 +746,7 @@ dragonfly*)
 build_gstreamer_1_0=yes
 b

[Libreoffice-commits] core.git: 2 commits - configure.ac vcl/unx

2018-01-23 Thread Milian Wolff
 configure.ac  |4 ++
 vcl/unx/gtk3_kde5/kde5_filepicker.cxx |   45 ++
 vcl/unx/gtk3_kde5/kde5_filepicker.hxx |3 --
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx |   27 ++
 4 files changed, 35 insertions(+), 44 deletions(-)

New commits:
commit f1b60bd62daff4aaf6465caadd4ad0c447521102
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Mon Jan 22 17:06:00 2018 +0100

Support opening of (some) remote URLs through the KDE file dialog

LO already supports http, https, webdav and webdavs through the
WebDAVContentProvider. Ftp is supported via FTPContentProvider
and then finally we have the GIOContentProvider that can potentially
support SMB, if the dependencies for that are met.

We now configure the KDE file dialog to allow these remote protocols.
Note that this filtering depends on https://phabricator.kde.org/D10024
and https://phabricator.kde.org/D10025 to have any effect.

Then we rewrite the URLs we receive from KIO to a format that is
supported by LO. Most notably, we prepend `vnd.sun.star.` to the
webdav URL schemes, such that they get picked up by the
WebDAVContentProvider. Then finally, we clear the username from
the smb:// URLs we get from KIO, as that prevents GIO from opening
them.

In all cases, the user will get prompted a second time for the
credentials required to access the remote resource. This is
unfortunate, but better than nothing. In the future, we may solve
this issue through either a separate KIO UCP or by getting support
for the FDO Secret Service specification in KWallet.

Change-Id: I91df28434b115639c2698968e2a672b3320bf8e2
Reviewed-on: https://gerrit.libreoffice.org/48350
Tested-by: Jenkins <c...@libreoffice.org>
Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx 
b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
index db7d04cf7d4a..456ba645808b 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
@@ -32,17 +32,6 @@
 #include 
 #include 
 
-// The dialog should check whether LO also supports the protocol
-// provided by KIO, and KFileWidget::dirOperator() is only 4.3+ .
-// Moreover it's only in this somewhat internal KFileWidget class,
-// which may not necessarily be what QFileDialog::fileWidget() returns,
-// but that's hopefully not a problem in practice.
-//#if Qt_VERSION_MAJOR == 4 && Qt_VERSION_MINOR >= 2
-//#define ALLOW_REMOTE_URLS 1
-//#else
-#define ALLOW_REMOTE_URLS 0
-//#endif
-
 // KDE5FilePicker
 
 KDE5FilePicker::KDE5FilePicker(QObject* parent)
@@ -53,16 +42,15 @@ KDE5FilePicker::KDE5FilePicker(QObject* parent)
 , _winId(0)
 , allowRemoteUrls(false)
 {
-#if ALLOW_REMOTE_URLS
-if (KFileWidget* fileWidget = 
dynamic_cast<KFileWidget*>(_dialog->fileWidget()))
-{
-allowRemoteUrls = true;
-// Use finishedLoading signal rather than e.g. urlEntered, because if 
there's a problem
-// such as the URL being mistyped, there's no way to prevent two 
message boxes about it,
-// one from us and one from Qt code.
-connect(fileWidget->dirOperator(), SIGNAL(finishedLoading()), 
SLOT(checkProtocol()));
-}
-#endif
+_dialog->setSupportedSchemes({
+QStringLiteral("file"),
+QStringLiteral("ftp"),
+QStringLiteral("http"),
+QStringLiteral("https"),
+QStringLiteral("webdav"),
+QStringLiteral("webdavs"),
+QStringLiteral("smb"),
+});
 
 setMultiSelectionMode(false);
 
@@ -245,21 +233,6 @@ void SAL_CALL KDE5FilePicker::initialize(bool saveDialog)
 }
 }
 
-void KDE5FilePicker::checkProtocol()
-{
-// There's no libreoffice.desktop :(, so find a matching one.
-/*
-KService::List services = KServiceTypeTrader::self()->query( 
"Application", "Exec =~ 'libreoffice %U'" );
-QStringList protocols;
-if( !services.isEmpty())
-protocols = services[ 0 ]->property( "X-Qt-Protocols" ).toStringList();
-if( protocols.isEmpty()) // incorrect (developer?) installation ?
-protocols << "file" << "http";
-if( !protocols.contains( _dialog->baseUrl().protocol()) && 
!protocols.contains( "KIO" ))
-KMessageBox::error( _dialog, KIO::buildErrorString( 
KIO::ERR_UNSUPPORTED_PROTOCOL, _dialog->baseUrl().protocol()));
-*/
-}
-
 void KDE5FilePicker::setWinId(sal_uIntPtr winId) { _winId = winId; }
 
 bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx 
b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
index 8b364832c6af..25c7454f86b5 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
+++ b/vcl/unx/gtk3_kde5/kde5

[Libreoffice-commits] core.git: 2 commits - config_host/config_gtk3_kde5.h.in config_host/config_vclplug.h.in config_host.mk.in configure.ac postprocess/Rdb_services.mk Repository.mk shell/Library_kde

2018-01-23 Thread Milian Wolff
 Repository.mk  |7 
 config_host.mk.in  |1 
 config_host/config_gtk3_kde5.h.in  |   10 
 config_host/config_vclplug.h.in|1 
 configure.ac   |   31 +
 postprocess/Rdb_services.mk|3 
 shell/Library_kde5be.mk|   32 +
 shell/Module_shell.mk  |6 
 shell/source/backends/desktopbe/desktopbackend.cxx |4 
 shell/source/backends/kde5be/kde5access.cxx|  316 +++
 shell/source/backends/kde5be/kde5access.hxx|   48 +
 shell/source/backends/kde5be/kde5backend.cxx   |  252 +
 shell/source/backends/kde5be/kde5be1.component |   25 
 vcl/CustomTarget_gtk3_kde5_moc.mk  |   22 
 vcl/Executable_lo_kde5filepicker.mk|   99 +++
 vcl/Library_vclplug_gtk3_kde5.mk   |  128 
 vcl/Module_vcl.mk  |7 
 vcl/unx/generic/plugadapt/salplug.cxx  |5 
 vcl/unx/gtk3_kde5/FPServiceInfo.hxx|   28 +
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkaction.cxx |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkbridge.cxx |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkcomponent.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkeditabletext.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkfactory.cxx|   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkhypertext.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkimage.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atklistener.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkregistry.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkselection.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atktable.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atktext.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atktextattributes.cxx |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkutil.cxx   |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkvalue.cxx  |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkwindow.cxx |   12 
 vcl/unx/gtk3_kde5/a11y/gtk3_kde5_atkwrapper.cxx|   12 
 vcl/unx/gtk3_kde5/filepicker_ipc_commands.hxx  |  170 ++
 vcl/unx/gtk3_kde5/gtk3_kde5_a11y.cxx   |   38 +
 vcl/unx/gtk3_kde5/gtk3_kde5_cairo.cxx  |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx |  456 +
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx |  139 +
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx |  201 +++
 vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx |  109 
 vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.cxx   |   88 +++
 vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.hxx   |   61 ++
 vcl/unx/gtk3_kde5/gtk3_kde5_gloactiongroup.cxx |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_glomenu.cxx|   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkdata.cxx|   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkframe.cxx   |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkinst.cxx|   55 ++
 vcl/unx/gtk3_kde5/gtk3_kde5_gtkobject.cxx  |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtksalmenu.cxx |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_gtksys.cxx |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_hudawareness.cxx   |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_printwrapper.cxx   |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_salnativewidgets-gtk.cxx   |   22 
 vcl/unx/gtk3_kde5/gtk3_kde5_salprn-gtk.cxx |   22 
 vcl/unx/gtk3_kde5/kde5_filepicker.cxx  |  283 ++
 vcl/unx/gtk3_kde5/kde5_filepicker.hxx  |  113 
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx  |  223 
 vcl/unx/gtk3_kde5/kde5_filepicker_ipc.hxx  |   45 +
 vcl/unx/gtk3_kde5/kde5_lo_filepicker_main.cxx  |   39 +
 62 files changed, 3508 insertions(+), 5 deletions(-)

New commits:
commit ecb5fcff336c8b0e5ad2503f0880c439a6c323a5
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Wed Jan 10 17:50:43 2018 +0100

Introduce gtk3_kde5 vcl plugin

This is a hybrid plugin which mostly wraps the GTK3 vclplug. Only
the file and folder picker are replaced by KDE dialogs. This gives
us a well-maintained GTK LO base with basic KDE integration with
minimum effort.

To prevent issues with nested event loops, the KDE dialogs are
launched from a separate process, the new lo_kde5filepicker helper
executable. A trivial stdin/stdout IPC mechanism transfers the data
between LO and the Qt/KDE helper. The usage of an external process
also allows us to copy'n'paste between LO and the KDE file dialog
without freezing the UI, as would happen when one would do this
in-p

[Libreoffice-commits] core.git: Branch 'feature/gtk3_kde5' - 3 commits - config_host/config_gtk3_kde5.h.in config_host/config_vclplug.h.in config_host.mk.in configure.ac Repository.mk vcl/CustomTarget

2018-01-22 Thread Milian Wolff
Rebased ref, commits from common ancestor:
commit 81e4d45342d4698acb3ccc1dcd6bc03e65ffe690
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Mon Jan 22 17:06:00 2018 +0100

Support opening of (some) remote URLs through the KDE file dialog

LO already supports http, https, webdav and webdavs through the
WebDAVContentProvider. Ftp is supported via FTPContentProvider
and then finally we have the GIOContentProvider that can potentially
support SMB, if the dependencies for that are met.

We now configure the KDE file dialog to allow these remote protocols.
Note that this filtering depends on https://phabricator.kde.org/D10024
and https://phabricator.kde.org/D10025 to have any effect.

Then we rewrite the URLs we receive from KIO to a format that is
supported by LO. Most notably, we prepend `vnd.sun.star.` to the
webdav URL schemes, such that they get picked up by the
WebDAVContentProvider. Then finally, we clear the username from
the smb:// URLs we get from KIO, as that prevents GIO from opening
them.

In all cases, the user will get prompted a second time for the
credentials required to access the remote resource. This is
unfortunate, but better than nothing. In the future, we may solve
this issue through either a separate KIO UCP or by getting support
for the FDO Secret Service specification in KWallet.

Change-Id: I91df28434b115639c2698968e2a672b3320bf8e2

diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx 
b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
index db7d04cf7d4a..456ba645808b 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
@@ -32,17 +32,6 @@
 #include 
 #include 
 
-// The dialog should check whether LO also supports the protocol
-// provided by KIO, and KFileWidget::dirOperator() is only 4.3+ .
-// Moreover it's only in this somewhat internal KFileWidget class,
-// which may not necessarily be what QFileDialog::fileWidget() returns,
-// but that's hopefully not a problem in practice.
-//#if Qt_VERSION_MAJOR == 4 && Qt_VERSION_MINOR >= 2
-//#define ALLOW_REMOTE_URLS 1
-//#else
-#define ALLOW_REMOTE_URLS 0
-//#endif
-
 // KDE5FilePicker
 
 KDE5FilePicker::KDE5FilePicker(QObject* parent)
@@ -53,16 +42,15 @@ KDE5FilePicker::KDE5FilePicker(QObject* parent)
 , _winId(0)
 , allowRemoteUrls(false)
 {
-#if ALLOW_REMOTE_URLS
-if (KFileWidget* fileWidget = 
dynamic_cast<KFileWidget*>(_dialog->fileWidget()))
-{
-allowRemoteUrls = true;
-// Use finishedLoading signal rather than e.g. urlEntered, because if 
there's a problem
-// such as the URL being mistyped, there's no way to prevent two 
message boxes about it,
-// one from us and one from Qt code.
-connect(fileWidget->dirOperator(), SIGNAL(finishedLoading()), 
SLOT(checkProtocol()));
-}
-#endif
+_dialog->setSupportedSchemes({
+QStringLiteral("file"),
+QStringLiteral("ftp"),
+QStringLiteral("http"),
+QStringLiteral("https"),
+QStringLiteral("webdav"),
+QStringLiteral("webdavs"),
+QStringLiteral("smb"),
+});
 
 setMultiSelectionMode(false);
 
@@ -245,21 +233,6 @@ void SAL_CALL KDE5FilePicker::initialize(bool saveDialog)
 }
 }
 
-void KDE5FilePicker::checkProtocol()
-{
-// There's no libreoffice.desktop :(, so find a matching one.
-/*
-KService::List services = KServiceTypeTrader::self()->query( 
"Application", "Exec =~ 'libreoffice %U'" );
-QStringList protocols;
-if( !services.isEmpty())
-protocols = services[ 0 ]->property( "X-Qt-Protocols" ).toStringList();
-if( protocols.isEmpty()) // incorrect (developer?) installation ?
-protocols << "file" << "http";
-if( !protocols.contains( _dialog->baseUrl().protocol()) && 
!protocols.contains( "KIO" ))
-KMessageBox::error( _dialog, KIO::buildErrorString( 
KIO::ERR_UNSUPPORTED_PROTOCOL, _dialog->baseUrl().protocol()));
-*/
-}
-
 void KDE5FilePicker::setWinId(sal_uIntPtr winId) { _winId = winId; }
 
 bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx 
b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
index 8b364832c6af..25c7454f86b5 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
@@ -102,9 +102,6 @@ private:
 protected:
 bool eventFilter(QObject* watched, QEvent* event) override;
 
-private Q_SLOTS:
-void checkProtocol();
-
 Q_SIGNALS:
 void filterChanged();
 void selectionChanged();
diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx 
b/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
index 9911219d010a..1ae6289677d6 100644
--- a/vcl/unx/gtk3_kde5/kde5_filepicker_ipc.cxx
+++ b/vcl/unx/gtk3_kde5/kd

[Libreoffice-commits] core.git: Changes to 'feature/gtk3_kde5'

2018-01-11 Thread Milian Wolff
New branch 'feature/gtk3_kde5' available with the following commits:
commit 619ef7a01e5410df5f4c4db34914784ce79edaed
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Wed Jan 10 17:50:43 2018 +0100

Introduce gtk3_kde5 vcl plugin

This is a hybrid plugin which mostly wraps the GTK3 vclplug. Only
the file and folder picker are replaced by KDE dialogs. This gives
us a well-maintained GTK LO base with basic KDE integration with
minimum effort.

To prevent issues with nested event loops, the KDE dialogs are
launched from a separate process, the new lo_kde5filepicker helper
executable. A trivial stdin/stdout IPC mechanism transfers the data
between LO and the Qt/KDE helper. The usage of an external process
also allows us to copy'n'paste between LO and the KDE file dialog
without freezing the UI, as would happen when one would do this
in-process. This is in general also the architecture applied by the
kmozillahelper, which is used to integrate KDE file dialogs into
Firefox.

While the KDE dialog is shown, the GTK3 main window is disabled and
close requests are ignored. The KDE dialog in turn also sets the LO
window as transient parent. Together, this makes the illusion perfect
and the KDE dialog behaves like a modal dialog. This works properly
also with multiple LO main windows, and only individual windows will
get blocked as one would expect.

Functionality wise, most of the features of the KDE4 dialog are
supported. You can pick files and folders, and save files under a new
name. Some custom checkbox widgets are supported, but lists, buttons
and preview widgets are not yet implemented. Also, loading remote
files via KIO is not possible yet.

Change-Id: I1a97cf7c272307a19ace4222d5f12253bc722829

commit 39be6daa11b8fc7a41666149e861cf798b1bbc8c
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Wed Jan 10 17:12:00 2018 +0100

Add KDE5 desktop backend

This is mostly a copy of the KDE4 backend ported to Qt5/KF5.

One difference is that this code will initialize the QApplication
on-demand, when it's not yet available. This will allow us to use
this desktop backend also within a vclplug that does not use Qt
itself, such as the upcoming Gtk3/KDE5 hybrid.

Change-Id: I5cf96ac5729608c82a58eead6723a38f014ba875

commit 17697ff07ef34df7377e84270ee6af17c207bd31
Author: Milian Wolff <milian.wo...@kdab.com>
Date:   Wed Jan 10 16:26:10 2018 +0100

Extend build system to support linking against KDE Frameworks 5

Pass --enable-kde5 to autogen.sh to enable this feature. Then
add kde5 to the list of externals to link against KF5. Note that
we have to disable the kde5 vclplug, as that does not compile in
it's current form. I will introduce other code that depends on
KF5 though which will leverage this feature.

Change-Id: I17e434a53ac769000b0f805b1f41cdc5c2c84ee2

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Milian Wolff license statement

2018-01-10 Thread Milian Wolff
All of my past & future contributions to LibreOffice may be
licensed under the MPLv2/LGPLv3+ dual license.
-- 
Milian Wolff | milian.wo...@kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts

smime.p7s
Description: S/MIME cryptographic signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice