summaryrefslogtreecommitdiff
path: root/app-office/libreoffice/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-08-18 18:16:17 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-08-18 18:16:17 +0100
commitfc637fb28da700da71ec2064d65ca5a7a31b9c6c (patch)
tree326613a08f25851c388715e205576a2e7d25dc4f /app-office/libreoffice/files
parentb24bd25253fe093f722ab576d29fdc41d04cb1ee (diff)
gentoo resync : 18.08.2019
Diffstat (limited to 'app-office/libreoffice/files')
-rw-r--r--app-office/libreoffice/files/libreoffice-6.1.5.2-gtk3_kde5-non-native-fpicker-for-non-plasma.patch105
-rw-r--r--app-office/libreoffice/files/libreoffice-6.1.5.2-gtk3_kde5-set-kfilewidgets-custom-widget-only-once.patch42
2 files changed, 0 insertions, 147 deletions
diff --git a/app-office/libreoffice/files/libreoffice-6.1.5.2-gtk3_kde5-non-native-fpicker-for-non-plasma.patch b/app-office/libreoffice/files/libreoffice-6.1.5.2-gtk3_kde5-non-native-fpicker-for-non-plasma.patch
deleted file mode 100644
index 30253e0b973f..000000000000
--- a/app-office/libreoffice/files/libreoffice-6.1.5.2-gtk3_kde5-non-native-fpicker-for-non-plasma.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From bf93bae6990b01ee726b59b0969b93585719671a Mon Sep 17 00:00:00 2001
-From: Michael Weghorn <m.weghorn@posteo.de>
-Date: Wed, 30 Jan 2019 10:11:35 +0100
-Subject: tdf#122752 gtk3_kde5: Use non-native fpicker for non-Plasma desktops
-
-Adding the custom widgets to the native dialog currently depends
-on the native dialog using a KFileWidget, which is just the case for
-the native QFileDialog implementation on Plasma/KDE5.
-
-In order not to lose custom controls for non-Plasma desktops,
-fall back to using the non-native QFileDialog there and adding
-the custom controls to its layout.
-This was mostly taken over from Qt5FileDialog.
-(This is a similar approach as that taken for the kde5 VCL plugin
-in https://gerrit.libreoffice.org/#/c/67106/ ).
-
-Adding the controls to the layout returned by 'QFileDialog::layout()'
-cannot be used for the native dialog as well, since a nullptr is
-returned in this case.
-
-From QFileDialog doc:
-
-> By default, a platform-native file dialog will be used if the platform
-> has one. In that case, the widgets which would otherwise be used to
-> construct the dialog will not be instantiated, so related accessors such
-> as layout() and itemDelegate() will return null. You can set the
-> DontUseNativeDialog option to ensure that the widget-based
-> implementation will be used instead of the native dialog.
-
-Change-Id: I75fbe7731da28d0dc7df878f4c57e141d4d89902
-Reviewed-on: https://gerrit.libreoffice.org/67111
-Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-Tested-by: Michael Weghorn <m.weghorn@posteo.de>
----
- vcl/unx/gtk3_kde5/kde5_filepicker.cxx | 26 +++++++++++++++++++++++++-
- vcl/unx/gtk3_kde5/kde5_filepicker.hxx | 2 ++
- 2 files changed, 27 insertions(+), 1 deletion(-)
-
-diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
-index 42e278a..33f64ad0 100644
---- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
-+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
-@@ -17,6 +17,8 @@
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-+#include <vcl/svapp.hxx>
-+
- #include "kde5_filepicker.hxx"
-
- #include <KWindowSystem>
-@@ -57,7 +59,7 @@ KDE5FilePicker::KDE5FilePicker(QObject* parent)
- connect(_dialog, &QFileDialog::filterSelected, this, &KDE5FilePicker::filterChanged);
- connect(_dialog, &QFileDialog::fileSelected, this, &KDE5FilePicker::selectionChanged);
-
-- qApp->installEventFilter(this);
-+ setupCustomWidgets();
- }
-
- void KDE5FilePicker::enableFolderMode()
-@@ -232,6 +234,28 @@ void KDE5FilePicker::initialize(bool saveDialog)
-
- void KDE5FilePicker::setWinId(sal_uIntPtr winId) { _winId = winId; }
-
-+void KDE5FilePicker::setupCustomWidgets()
-+{
-+ // When using the platform-native Plasma/KDE5 file picker, we currently rely on KFileWidget
-+ // being present to add the custom controls visible (s. 'eventFilter' method).
-+ // Since this doesn't work for other desktop environments, use a non-native
-+ // dialog there in order not to lose the custom controls and insert the custom
-+ // widget in the layout returned by QFileDialog::layout()
-+ // (which returns nullptr for native file dialogs)
-+ if (Application::GetDesktopEnvironment() == "KDE5")
-+ {
-+ qApp->installEventFilter(this);
-+ }
-+ else
-+ {
-+ _dialog->setOption(QFileDialog::DontUseNativeDialog);
-+ QGridLayout* pLayout = static_cast<QGridLayout*>(_dialog->layout());
-+ assert(pLayout);
-+ const int row = pLayout->rowCount();
-+ pLayout->addWidget(_extraControls, row, 1);
-+ }
-+}
-+
- bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
- {
- if (e->type() == QEvent::Show && o->isWidgetType())
-diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
-index d999f7b..c979a5d 100644
---- a/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
-+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.hxx
-@@ -98,6 +98,8 @@ public:
-
- private:
- Q_DISABLE_COPY(KDE5FilePicker)
-+ // adds the custom controls to the dialog
-+ void setupCustomWidgets();
-
- protected:
- bool eventFilter(QObject* watched, QEvent* event) override;
---
-cgit v1.1
-
diff --git a/app-office/libreoffice/files/libreoffice-6.1.5.2-gtk3_kde5-set-kfilewidgets-custom-widget-only-once.patch b/app-office/libreoffice/files/libreoffice-6.1.5.2-gtk3_kde5-set-kfilewidgets-custom-widget-only-once.patch
deleted file mode 100644
index 69134a8b9922..000000000000
--- a/app-office/libreoffice/files/libreoffice-6.1.5.2-gtk3_kde5-set-kfilewidgets-custom-widget-only-once.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 7b54f3db98e96231fc9f16429f325cdb1f37498c Mon Sep 17 00:00:00 2001
-From: Michael Weghorn <m.weghorn@posteo.de>
-Date: Thu, 31 Jan 2019 09:52:51 +0100
-Subject: tdf#123077 gtk3_kde5: Set KFileWidget's custom widget only once
-
-Since the event filter is only used to set the custom
-widget in the KFileWidget, it can and needs to be removed
-again once this has been done; which also avoids crashes.
-
-(s. https://gerrit.libreoffice.org/#/c/67185/ for more
-infos, where the same thing is done for kde5)
-
-Change-Id: I5c719fb17510916b4730ed5c00bb638df2f183e3
-Reviewed-on: https://gerrit.libreoffice.org/67184
-Tested-by: Jenkins
-Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-(cherry picked from commit 30cc54a4532a732a0cf6dfe9943521978ff7292f)
-Reviewed-on: https://gerrit.libreoffice.org/67203
-Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
----
- vcl/unx/gtk3_kde5/kde5_filepicker.cxx | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
-index 33f64ad0..9914869 100644
---- a/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
-+++ b/vcl/unx/gtk3_kde5/kde5_filepicker.cxx
-@@ -265,7 +265,11 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
- {
- KWindowSystem::setMainWindow(w, _winId);
- if (auto* fileWidget = w->findChild<KFileWidget*>({}, Qt::FindDirectChildrenOnly))
-+ {
- fileWidget->setCustomWidget(_extraControls);
-+ // remove event filter again; the only purpose was to set the custom widget here
-+ qApp->removeEventFilter(this);
-+ }
- }
- }
- return QObject::eventFilter(o, e);
---
-cgit v1.1
-