[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 13 commits - bin/check-elf-dynamic-objects bin/pack-debug config_host/config_vclplug.h.in configure.ac connectivity/source cui/uiconfig desktop/source sc/source sw/source vcl/inc vcl/qt5 vcl/source vcl/unx

Michael Weghorn (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 19 08:56:19 UTC 2019


 bin/check-elf-dynamic-objects                |    8 ++--
 bin/pack-debug                               |   38 +++++++++----------
 config_host/config_vclplug.h.in              |    2 +
 configure.ac                                 |   16 +++++---
 connectivity/source/drivers/dbase/DTable.cxx |    5 +-
 cui/uiconfig/ui/hyperlinkdialog.ui           |    2 -
 desktop/source/app/app.cxx                   |    2 -
 sc/source/core/data/global.cxx               |    9 ++++
 sw/source/core/undo/untbl.cxx                |    2 -
 vcl/inc/fontinstance.hxx                     |    2 -
 vcl/inc/qt5/Qt5Frame.hxx                     |   22 +++++++++++
 vcl/qt5/Qt5DragAndDrop.cxx                   |    1 
 vcl/qt5/Qt5Frame.cxx                         |   54 +++++++++++++++++++++++----
 vcl/source/window/builder.cxx                |    4 +-
 vcl/source/window/paint.cxx                  |    3 +
 vcl/unx/kde5/KDE5SalFrame.cxx                |   17 --------
 vcl/unx/kde5/KDE5SalFrame.hxx                |    5 --
 17 files changed, 125 insertions(+), 67 deletions(-)

New commits:
commit e42c7968737b0dbed83fcad4427f7aed15b24047
Author:     Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Sat Jun 15 07:28:07 2019 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 19 10:55:26 2019 +0200

    check-elf-dynamic-objects: Update 'qt5whitelist'
    
    This needs 'libgobject-2.0.so.0' and 'libxcb.so.1'
    as well now, since
    a6201725d760cbce832d4de029b418bb7334df6a
    ("Don't link avmediagst with gtk3 and qt5")
    and 77a3c443d35c7d966217f02ea9189cb1819c7828
    ("tdf#125921 Qt5 set WM_CLASS for top level windows").
    
    Reviewed-on: https://gerrit.libreoffice.org/74085
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit 365df1880a5bfacf25beddefc9206a783e6a4877)
    Reviewed-on: https://gerrit.libreoffice.org/74089
    
    Change-Id: I453cede879eda8470a45c48f789a0419866fcb79
    Reviewed-on: https://gerrit.libreoffice.org/74194
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    Tested-by: Jenkins
    (cherry picked from commit bed632513d7e2495b5f7622c214f0163d75babff)

diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects
index a2bb41b3548b..8848207855f5 100755
--- a/bin/check-elf-dynamic-objects
+++ b/bin/check-elf-dynamic-objects
@@ -97,7 +97,7 @@ gstreamerwhitelist="libgstpbutils-1.0.so.0 libgstvideo-1.0.so.0 libgstbase-1.0.s
 gtk2whitelist="libgtk-x11-2.0.so.0 libgdk-x11-2.0.so.0 libpangocairo-1.0.so.0 libfribidi.so.0 libatk-1.0.so.0 libcairo.so.2 libgio-2.0.so.0 libpangoft2-1.0.so.0 libpango-1.0.so.0 libfontconfig.so.1 libfreetype.so.6 libgdk_pixbuf-2.0.so.0 libgobject-2.0.so.0 libglib-2.0.so.0 libgmodule-2.0.so.0 libgthread-2.0.so.0 libdbus-glib-1.so.2 libdbus-1.so.3"
 gtk3whitelist="libgtk-3.so.0 libgdk-3.so.0 libcairo-gobject.so.2 libpangocairo-1.0.so.0 libfribidi.so.0 libatk-1.0.so.0 libcairo.so.2 libgio-2.0.so.0 libpangoft2-1.0.so.0 libpango-1.0.so.0 libfontconfig.so.1 libfreetype.so.6 libgdk_pixbuf-2.0.so.0 libgobject-2.0.so.0 libglib-2.0.so.0 libgmodule-2.0.so.0 libgthread-2.0.so.0 libdbus-glib-1.so.2 libdbus-1.so.3"
 kde4whitelist="libkio.so.5 libkfile.so.4 libkdeui.so.5 libkdecore.so.5 libQtNetwork.so.4 libQtGui.so.4 libQtCore.so.4 libglib-2.0.so.0"
-qt5whitelist="libQt5Core.so.5 libQt5Gui.so.5 libQt5Network.so.5 libQt5Widgets.so.5 libQt5X11Extras.so.5 libcairo.so.2 libglib-2.0.so.0"
+qt5whitelist="libQt5Core.so.5 libQt5Gui.so.5 libQt5Network.so.5 libQt5Widgets.so.5 libQt5X11Extras.so.5 libcairo.so.2 libglib-2.0.so.0 libxcb.so.1"
 kf5whitelist="libKF5ConfigCore.so.5 libKF5CoreAddons.so.5 libKF5I18n.so.5 libKF5KIOCore.so.5 libKF5KIOFileWidgets.so.5 libKF5KIOWidgets.so.5 libKF5WindowSystem.so.5"
 avahiwhitelist="libdbus-glib-1.so.2 libdbus-1.so.3 libgobject-2.0.so.0 libgmodule-2.0.so.0 libgthread-2.0.so.0 libglib-2.0.so.0 libavahi-common.so.3 libavahi-client.so.3"
 kerberoswhitelist="libgssapi_krb5.so.2 libcom_err.so.2 libkrb5.so.3"
@@ -131,7 +131,7 @@ local file="$1"
         ;;
         */libvclplug_kde5lo.so|*/libkde5be1lo.so)
             if [ "$ENABLE_KDE5" = TRUE ]; then
-                whitelist="${whitelist} ${qt5whitelist} ${kf5whitelist} libxcb.so.1"
+                whitelist="${whitelist} ${qt5whitelist} ${kf5whitelist}"
             fi
         ;;
         */libvclplug_gtklo.so|*/libqstart_gtklo.so|*/updater)
@@ -147,13 +147,13 @@ local file="$1"
         ;;
         */libvclplug_gtk3_kde5lo.so)
             if [ "$ENABLE_GTK3_KDE5" = TRUE ]; then
-                whitelist="${whitelist} ${x11whitelist} ${gtk3whitelist} ${qt5whitelist} ${kf5whitelist} libxcb.so.1"
+                whitelist="${whitelist} ${x11whitelist} ${gtk3whitelist} ${qt5whitelist} ${kf5whitelist}"
             fi
         ;;
         */lo_kde5filepicker)
             if [ "$ENABLE_GTK3_KDE5" = TRUE ]; then
                 whitelist="${whitelist} ${x11whitelist} ${gtk3whitelist} ${qt5whitelist} \
-                    ${kf5whitelist} libxcb.so.1"
+                    ${kf5whitelist}"
             fi
         ;;
         */libdesktop_detectorlo.so|*/ui-previewer|*/oosplash|*/gengal.bin)
commit dc614865c560523a57e046ba33f4df5aafb0d893
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Jun 14 00:46:32 2019 +0000
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 19 10:55:25 2019 +0200

    tdf#125921 Qt5 set WM_CLASS for top level windows
    
    Uses the same naming then the gtk3 backend, i.e. "libreoffice"
    for the instance name and different class names for the module
    windows, like "libreoffice-writer".
    
    These names are referenced in the desktop files a StartupWMClass
    and for example used to pin an app to the task bar.
    
    Change-Id: Ic9b8890536f6413ab59d2e0da866e2280ab3181a
    Reviewed-on: https://gerrit.libreoffice.org/74014
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
    (cherry picked from commit 77a3c443d35c7d966217f02ea9189cb1819c7828)
    Reviewed-on: https://gerrit.libreoffice.org/74082
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit 1a1e13333e8145c7a78ddb23b540b0832cadd446)
    Reviewed-on: https://gerrit.libreoffice.org/74193
    (cherry picked from commit d7b88e962f8907b00eef648e7d69f2cd20f51ac8)

diff --git a/configure.ac b/configure.ac
index e776f76bcf9b..d12895d157bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11331,7 +11331,9 @@ then
     QT5_LIBS="-L$qt5_libdir -lQt5Core -lQt5Gui -lQt5Widgets -lQt5Network"
 
     if test "$USING_X11" = TRUE; then
-        QT5_LIBS="$QT5_LIBS -lQt5X11Extras"
+        PKG_CHECK_MODULES(QT5_XCB,[xcb],,[AC_MSG_ERROR([XCB not found, which is needed for correct app grouping in X11.])])
+        QT5_CFLAGS="$QT5_CFLAGS $QT5_XCB_CFLAGS"
+        QT5_LIBS="$QT5_LIBS $QT5_XCB_LIBS -lQt5X11Extras"
         QT5_USING_X11=1
         AC_DEFINE(QT5_USING_X11)
     fi
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 2f548fc6eae3..1ded558d0664 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -27,6 +27,7 @@
 #include <Qt5MainWindow.hxx>
 #include <Qt5Menu.hxx>
 #include <Qt5SvpGraphics.hxx>
+#include <Qt5System.hxx>
 #include <Qt5Tools.hxx>
 #include <Qt5Widget.hxx>
 
@@ -46,6 +47,7 @@
 
 #if QT5_USING_X11
 #include <QtX11Extras/QX11Info>
+#include <xcb/xproto.h>
 #endif
 
 #include <saldatabasic.hxx>
@@ -1177,9 +1179,29 @@ void Qt5Frame::SetScreenNumber(unsigned int nScreen)
     }
 }
 
-void Qt5Frame::SetApplicationID(const OUString&)
+void Qt5Frame::SetApplicationID(const OUString& rWMClass)
 {
-    // So the hope is that QGuiApplication deals with this properly..
+#if QT5_USING_X11
+    if (QGuiApplication::platformName() != "xcb" || !m_pTopLevel)
+        return;
+
+    OString aResClass = OUStringToOString(rWMClass, RTL_TEXTENCODING_ASCII_US);
+    const char* pResClass
+        = !aResClass.isEmpty() ? aResClass.getStr() : SalGenericSystem::getFrameClassName();
+    OString aResName = SalGenericSystem::getFrameResName();
+
+    // the WM_CLASS data consists of two concated cstrings, including the terminating '\0' chars
+    const uint32_t data_len = aResName.getLength() + 1 + strlen(pResClass) + 1;
+    char* data = new char[data_len];
+    memcpy(data, aResName.getStr(), aResName.getLength() + 1);
+    memcpy(data + aResName.getLength() + 1, pResClass, strlen(pResClass) + 1);
+
+    xcb_change_property(QX11Info::connection(), XCB_PROP_MODE_REPLACE, m_pTopLevel->winId(),
+                        XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 8, data_len, data);
+    delete[] data;
+#else
+    (void)rWMClass;
+#endif
 }
 
 // Drag'n'drop foo
commit 5525368c6640f54cc8080ab5e9f6621a3d3874d8
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Jun 14 02:08:22 2019 +0000
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 19 10:55:25 2019 +0200

    KDE5 move screensafer inhibiting code into Qt5
    
    There will presumably be more X11 specific code later to implement some
    "fix" for tdf#119202. Moving the screensafer inhibitor is rather
    uncontroversial in comparion, so start with it and use it to carry the
    matching configure.ac changes.
    
    A little "nightmare" are all the clashing X11 / Qt type undefs, but I
    couldn't find a better solution while the inhibitor continues to
    include the X11 headers in it's header.
    
    Reviewed-on: https://gerrit.libreoffice.org/74015
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
    (cherry picked from commit b5323c72ff7e5bcde34089e49fe98e589dcc5acb)
    
    Change-Id: I55c89c76726d30a890178488484e954207267e89
    Reviewed-on: https://gerrit.libreoffice.org/74081
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit 9c37c306158267d942a0a1debc3845db1c923ceb)
    Reviewed-on: https://gerrit.libreoffice.org/74192
    (cherry picked from commit 3ff31faa48c12c33c9c3fafae8fc35201fa5d614)

diff --git a/config_host/config_vclplug.h.in b/config_host/config_vclplug.h.in
index be9c136245ee..21200e57c9bd 100644
--- a/config_host/config_vclplug.h.in
+++ b/config_host/config_vclplug.h.in
@@ -12,4 +12,6 @@ Settings about which X11 desktops have support enabled.
 #define ENABLE_KDE5 0
 #define ENABLE_GTK3_KDE5 0
 
+#define QT5_USING_X11 0
+
 #endif
diff --git a/configure.ac b/configure.ac
index 282d98ac4262..e776f76bcf9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11330,6 +11330,12 @@ then
     QT5_CFLAGS=$(printf '%s' "$QT5_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
     QT5_LIBS="-L$qt5_libdir -lQt5Core -lQt5Gui -lQt5Widgets -lQt5Network"
 
+    if test "$USING_X11" = TRUE; then
+        QT5_LIBS="$QT5_LIBS -lQt5X11Extras"
+        QT5_USING_X11=1
+        AC_DEFINE(QT5_USING_X11)
+    fi
+
     dnl Check for Meta Object Compiler
 
     AC_PATH_PROGS( MOC5, [moc-qt5 moc], no, [`dirname $qt5_libdir`/bin:$QT5DIR/bin:$PATH] )
@@ -11418,12 +11424,8 @@ then
         AC_MSG_ERROR([KF5 libraries not found.  Please specify the root of your KF5 installation by exporting KF5DIR before running "configure".])
     fi
 
-    if test "$USING_X11" = TRUE; then
-        PKG_CHECK_MODULES(KF5_XCB,[xcb],,[AC_MSG_ERROR([XCB not installed])])
-    fi
-
-    KF5_CFLAGS="-I$kf5_incdir -I$kf5_incdir/KCoreAddons -I$kf5_incdir/KI18n -I$kf5_incdir/KConfigCore -I$kf5_incdir/KWindowSystem -I$kf5_incdir/KIOCore -I$kf5_incdir/KIOWidgets -I$kf5_incdir/KIOFileWidgets -I$qt5_incdir -I$qt5_incdir/QtCore -I$qt5_incdir/QtGui -I$qt5_incdir/QtWidgets -I$qt5_incdir/QtNetwork -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT $KF5_XCB_CFLAGS"
-    KF5_LIBS="-L$kf5_libdir -lKF5CoreAddons -lKF5I18n -lKF5ConfigCore -lKF5WindowSystem -lKF5KIOCore -lKF5KIOWidgets -lKF5KIOFileWidgets -L$qt5_libdir -lQt5Core -lQt5Gui -lQt5Widgets -lQt5Network $KF5_XCB_LIBS"
+    KF5_CFLAGS="-I$kf5_incdir -I$kf5_incdir/KCoreAddons -I$kf5_incdir/KI18n -I$kf5_incdir/KConfigCore -I$kf5_incdir/KWindowSystem -I$kf5_incdir/KIOCore -I$kf5_incdir/KIOWidgets -I$kf5_incdir/KIOFileWidgets -I$qt5_incdir -I$qt5_incdir/QtCore -I$qt5_incdir/QtGui -I$qt5_incdir/QtWidgets -I$qt5_incdir/QtNetwork -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT"
+    KF5_LIBS="-L$kf5_libdir -lKF5CoreAddons -lKF5I18n -lKF5ConfigCore -lKF5WindowSystem -lKF5KIOCore -lKF5KIOWidgets -lKF5KIOFileWidgets -L$qt5_libdir -lQt5Core -lQt5Gui -lQt5Widgets -lQt5Network"
     KF5_CFLAGS=$(printf '%s' "$KF5_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
 
     if test "$USING_X11" = TRUE; then
diff --git a/vcl/inc/qt5/Qt5Frame.hxx b/vcl/inc/qt5/Qt5Frame.hxx
index 26d44cb80c8e..58b72e484afe 100644
--- a/vcl/inc/qt5/Qt5Frame.hxx
+++ b/vcl/inc/qt5/Qt5Frame.hxx
@@ -19,6 +19,8 @@
 
 #pragma once
 
+#include <config_vclplug.h>
+
 #include <salframe.hxx>
 #include <vclpluginapi.h>
 
@@ -30,6 +32,22 @@
 
 #include <QtCore/QObject>
 
+#if QT5_USING_X11
+#include <unx/screensaverinhibitor.hxx>
+// any better way to get rid of the X11 / Qt type clashes?
+#undef Bool
+#undef CursorShape
+#undef Expose
+#undef KeyPress
+#undef KeyRelease
+#undef FocusIn
+#undef FocusOut
+#undef FontChange
+#undef None
+#undef Status
+#undef Unsorted
+#endif
+
 class Qt5DragSource;
 class Qt5DropTarget;
 class Qt5Graphics;
@@ -86,6 +104,10 @@ class VCLPLUG_QT5_PUBLIC Qt5Frame : public QObject, public SalFrame
     sal_uInt32 m_nRestoreScreen;
     QRect m_aRestoreGeometry;
 
+#if QT5_USING_X11
+    ScreenSaverInhibitor m_ScreenSaverInhibitor;
+#endif
+
     void Center();
     Size CalcDefaultSize();
     void SetDefaultSize();
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index f5f7e52b2764..2f548fc6eae3 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -44,6 +44,10 @@
 #include <QtWidgets/QMenuBar>
 #include <QtWidgets/QMainWindow>
 
+#if QT5_USING_X11
+#include <QtX11Extras/QX11Info>
+#endif
+
 #include <saldatabasic.hxx>
 #include <window.h>
 #include <vcl/layout.hxx>
@@ -693,11 +697,25 @@ void Qt5Frame::ShowFullScreen(bool bFullScreen, sal_Int32 nScreen)
     }
 }
 
-void Qt5Frame::StartPresentation(bool)
+void Qt5Frame::StartPresentation(bool bStart)
 {
-    // meh - so there's no Qt platform independent solution - defer to
-    // KDE5 impl. For everyone else:
-    // https://forum.qt.io/topic/38504/solved-qdialog-in-fullscreen-disable-os-screensaver
+// meh - so there's no Qt platform independent solution
+// https://forum.qt.io/topic/38504/solved-qdialog-in-fullscreen-disable-os-screensaver
+#if QT5_USING_X11
+    boost::optional<unsigned int> aRootWindow;
+    boost::optional<Display*> aDisplay;
+
+    if (QX11Info::isPlatformX11())
+    {
+        aRootWindow = QX11Info::appRootWindow();
+        aDisplay = QX11Info::display();
+    }
+
+    m_ScreenSaverInhibitor.inhibit(bStart, "presentation", QX11Info::isPlatformX11(), aRootWindow,
+                                   aDisplay);
+#else
+    (void)bStart;
+#endif
 }
 
 void Qt5Frame::SetAlwaysOnTop(bool bOnTop)
diff --git a/vcl/unx/kde5/KDE5SalFrame.cxx b/vcl/unx/kde5/KDE5SalFrame.cxx
index c195b641e119..728ca1461537 100644
--- a/vcl/unx/kde5/KDE5SalFrame.cxx
+++ b/vcl/unx/kde5/KDE5SalFrame.cxx
@@ -20,11 +20,9 @@
 #include <memory>
 #include <QtGui/QColor>
 #include <QtWidgets/QStyle>
-#include <QtCore/QDebug>
 #include <QtWidgets/QToolTip>
 #include <QtWidgets/QApplication>
 #include <QtWidgets/QMenuBar>
-#include <QtX11Extras/QX11Info>
 
 #include <KConfig>
 #include <KConfigGroup>
@@ -222,19 +220,4 @@ void KDE5SalFrame::ReleaseGraphics(SalGraphics* pSalGraph)
     m_bGraphicsInUse = false;
 }
 
-void KDE5SalFrame::StartPresentation(bool bStart)
-{
-    // disable screensaver for running preso
-    boost::optional<unsigned int> aWindow;
-    boost::optional<Display*> aDisplay;
-    if (QX11Info::isPlatformX11())
-    {
-        aWindow = QX11Info::appRootWindow();
-        aDisplay = QX11Info::display();
-    }
-
-    m_ScreenSaverInhibitor.inhibit(bStart, "presentation", QX11Info::isPlatformX11(), aWindow,
-                                   aDisplay);
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kde5/KDE5SalFrame.hxx b/vcl/unx/kde5/KDE5SalFrame.hxx
index 441039829846..4b609bdf85a2 100644
--- a/vcl/unx/kde5/KDE5SalFrame.hxx
+++ b/vcl/unx/kde5/KDE5SalFrame.hxx
@@ -21,10 +21,7 @@
 
 #include <memory>
 
-#undef Status
-
 #include <qt5/Qt5Frame.hxx>
-#include <unx/screensaverinhibitor.hxx>
 
 #include "KDE5SalGraphics.hxx"
 
@@ -35,7 +32,6 @@ class KDE5SalFrame : public Qt5Frame
 {
 private:
     std::unique_ptr<KDE5SalGraphics> m_pKDE5Graphics;
-    ScreenSaverInhibitor m_ScreenSaverInhibitor;
     bool m_bGraphicsInUse;
 
 public:
@@ -45,7 +41,6 @@ public:
     virtual void ReleaseGraphics(SalGraphics* pGraphics) override;
     virtual void UpdateSettings(AllSettings& rSettings) override;
 
-    virtual void StartPresentation(bool bStart) override;
     virtual LanguageType GetInputLanguage() override { return LANGUAGE_SYSTEM; }
     virtual SalPointerState GetPointerState() override { return SalPointerState(); }
     virtual KeyIndicatorState GetIndicatorState() override { return KeyIndicatorState(); }
commit 00705fb7a4fda6b862d78c87e2de60f8f65c5826
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Wed Jun 12 23:43:35 2019 -0800
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 19 10:55:24 2019 +0200

    tdf#105799 Fix vector use bug
    
    Change-Id: Ibf2b5314584725a10e11fe83e9fef5c710e421c4
    Reviewed-on: https://gerrit.libreoffice.org/73937
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <raykowj at gmail.com>
    (cherry picked from commit adcb7bacb452dccde70b20a902f5c1f23f37913f)
    Reviewed-on: https://gerrit.libreoffice.org/74151
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit 1da4fb3d3438355c04ce616563422a6a51943c11)
    Reviewed-on: https://gerrit.libreoffice.org/74166
    (cherry picked from commit 772ceeaf8df89e392494b80efc1823b0e6917575)

diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 7b7f7cd5115e..0640fd478022 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -1286,7 +1286,7 @@ void SaveBox::SaveContentAttrs( SwDoc* pDoc )
     else
     {
         sal_uLong nEnd = pDoc->GetNodes()[ nSttNode ]->EndOfSectionIndex();
-        Ptrs.pContentAttrs = new SfxItemSets( static_cast<sal_uInt8>(nEnd - nSttNode - 1 ) );
+        Ptrs.pContentAttrs = new SfxItemSets;
         for( sal_uLong n = nSttNode + 1; n < nEnd; ++n )
         {
             SwContentNode* pCNd = pDoc->GetNodes()[ n ]->GetContentNode();
commit 028b662fec32de731aaa16a9ac25ae43f857b5bc
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jun 17 11:53:11 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 19 10:55:24 2019 +0200

    Resolves: tdf#125883 if old and new text will be the same don't change it
    
    that way the cursor and selection is left alone
    
    Change-Id: Id6efa7e2fe27f031761271fd591de7a73a1f6963
    Reviewed-on: https://gerrit.libreoffice.org/74160
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 53a2aeccd6b339bc5b7d7b403723fa48ecc5dd58)

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 6f6189d11d57..ea4153161e3c 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -181,7 +181,9 @@ namespace weld
 
     IMPL_LINK(MetricSpinButton, spin_button_output, SpinButton&, rSpinButton, void)
     {
-        rSpinButton.set_text(format_number(rSpinButton.get_value()));
+        OUString sNewText(format_number(rSpinButton.get_value()));
+        if (sNewText != rSpinButton.get_text())
+            rSpinButton.set_text(sNewText);
     }
 
     void MetricSpinButton::update_width_chars()
commit d115d6240e09410685684016a595ca70e4b4b517
Author:     Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Fri Jun 14 10:28:47 2019 +0530
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 19 10:55:23 2019 +0200

    tdf#125691: use _exit() instead of exit()...
    
    for ExitTimer which is used exclusively for
    the case when  OOO_EXIT_POST_STARTUP is set, so
    that there is no waiting around for ThreadPool's
    threads to get joined.
    
    Setting OOO_EXIT_POST_STARTUP already evades any
    proper destruction of objects in the heap, so
    using _exit() instead of exit() here does not
    make things any worse w.r.t the purpose of this
    env var.
    
    Change-Id: Ib4a253d6e1a3fd8593e4a2115a51cf4c10344b3c
    Reviewed-on: https://gerrit.libreoffice.org/74016
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    (cherry picked from commit d39846bfd16ad9873795149c370a95f42363bfd9)
    Reviewed-on: https://gerrit.libreoffice.org/74154
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit 92199ce4e544d17b4ceceefacf078c04996b57db)

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 3cc672c0b573..0a8178669d0f 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1929,7 +1929,7 @@ class ExitTimer : public Timer
     }
     virtual void Invoke() override
     {
-        exit(42);
+        _exit(42);
     }
 };
 
commit 3d71431e5f7a100002cd2602af15ff661084dcbd
Author:     Khaled Hosny <khaledhosny at eglug.org>
AuthorDate: Sun Jun 16 02:38:02 2019 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 19 10:55:23 2019 +0200

    tdf#121486: Correct scale of broken fonts on Windows
    
    Some fonts have negative tmAveCharWidth which makes no sense (fonts can't have
    negative glyph width, so the average can't be negative) and it would cause our
    code to apply negative scale to the glyphs of these fonts making them drawn on
    the flipped horizontally.
    
    Fix this by using the absolute value so it is always positive.
    
    Change-Id: I731e7aad80dae734847679a1b08c6ac78111e16c
    Reviewed-on: https://gerrit.libreoffice.org/74109
    Tested-by: Jenkins
    Reviewed-by: Khaled Hosny <khaledhosny at eglug.org>
    (cherry picked from commit 8fffb56940c6eb81674000cdb718edc79603a6c5)
    Reviewed-on: https://gerrit.libreoffice.org/74123
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    (cherry picked from commit cd33eb812277f516f4670edfffd68e5b763e8a4c)

diff --git a/vcl/inc/fontinstance.hxx b/vcl/inc/fontinstance.hxx
index 58bcd07927a0..f8199669952f 100644
--- a/vcl/inc/fontinstance.hxx
+++ b/vcl/inc/fontinstance.hxx
@@ -63,7 +63,7 @@ public: // TODO: make data members private
     void            IgnoreFallbackForUnicode( sal_UCS4, FontWeight eWeight, const OUString& rFontName );
 
     inline hb_font_t* GetHbFont();
-    void SetAverageWidthFactor(double nFactor) { m_nAveWidthFactor = nFactor; }
+    void SetAverageWidthFactor(double nFactor) { m_nAveWidthFactor = std::abs(nFactor); }
     double GetAverageWidthFactor() const { return m_nAveWidthFactor; }
     const FontSelectPattern& GetFontSelectPattern() const { return m_aFontSelData; }
 
commit 1039e636134b7267496ed74156e649e43d6456d1
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Fri Jun 14 21:53:18 2019 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 19 10:55:22 2019 +0200

    Resolves: tdf#124251 do not treat internal "URI" as real path URI
    
    Change-Id: I754704b0a979e8449b7ec799cbda58b14ab17098
    Reviewed-on: https://gerrit.libreoffice.org/74067
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit ca08ec9292410c28713fd2d92920a7af09883e97)
    Reviewed-on: https://gerrit.libreoffice.org/74070
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    (cherry picked from commit ed9cb51dfddf066b0b19681e86c42121aa9cce9c)

diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 0999082d9589..6a59a30e56b5 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -819,7 +819,14 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget)
     }
 
     // Don't fiddle with fragments pointing into current document.
-    if (!aUrlName.startsWith("#"))
+    // Also don't mess around with a vnd.sun.star.script or service or other
+    // internal "URI".
+    if (!aUrlName.startsWith("#")
+            && !aUrlName.startsWithIgnoreAsciiCase("vnd.sun.star.script:")
+            && !aUrlName.startsWithIgnoreAsciiCase("macro:")
+            && !aUrlName.startsWithIgnoreAsciiCase("slot:")
+            && !aUrlName.startsWithIgnoreAsciiCase("service:")
+            && !aUrlName.startsWithIgnoreAsciiCase(".uno:"))
     {
         // Any relative reference would fail with "not an absolute URL"
         // error, try to construct an absolute URI with the path relative
commit 0db9c50db6d72b724abaead30bf6f58f9d902e18
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Jun 14 02:30:01 2019 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 19 10:55:22 2019 +0200

    Qt5 move and init static m_ActiveDragSource
    
    Change-Id: Iab82151b8d1a8281c9999983b9de5f35dfb0442e
    Reviewed-on: https://gerrit.libreoffice.org/74013
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
    (cherry picked from commit 5195c5bcd8be5f3b183659ead272cd86b8774cc1)
    Reviewed-on: https://gerrit.libreoffice.org/74091
    (cherry picked from commit bf1a7feb2b871409e61512b8faf415fc87d4c631)
    Reviewed-on: https://gerrit.libreoffice.org/74096
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    (cherry picked from commit af8266b4d371ffbc14609686259546642b167755)

diff --git a/vcl/qt5/Qt5DragAndDrop.cxx b/vcl/qt5/Qt5DragAndDrop.cxx
index 42e61074a824..001302fef0d0 100644
--- a/vcl/qt5/Qt5DragAndDrop.cxx
+++ b/vcl/qt5/Qt5DragAndDrop.cxx
@@ -96,6 +96,7 @@ std::vector<css::datatransfer::DataFlavor> Qt5DnDTransferable::getTransferDataFl
 
 bool Qt5DragSource::m_bDropSuccessSet = false;
 bool Qt5DragSource::m_bDropSuccess = false;
+Qt5DragSource* Qt5DragSource::m_ActiveDragSource = nullptr;
 
 Qt5DragSource::~Qt5DragSource()
 {
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 6b738f159ea4..f5f7e52b2764 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -1166,8 +1166,6 @@ void Qt5Frame::SetApplicationID(const OUString&)
 
 // Drag'n'drop foo
 
-Qt5DragSource* Qt5DragSource::m_ActiveDragSource;
-
 void Qt5Frame::registerDragSource(Qt5DragSource* pDragSource)
 {
     assert(!m_pDragSource);
commit e80599fb094867823257ab86b327d0dee6110e7b
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jun 14 12:52:08 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 19 10:55:21 2019 +0200

    Resolves: tdf#125875 allow keyboard traversal into icon control
    
    Change-Id: I001a5ec63aa998917f30b47f37e7db995bf55f0f
    Reviewed-on: https://gerrit.libreoffice.org/74041
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    (cherry picked from commit 85089547c0fa6a8e9f9073f89e1b1abf0f43550f)

diff --git a/cui/uiconfig/ui/hyperlinkdialog.ui b/cui/uiconfig/ui/hyperlinkdialog.ui
index edc2dc11682b..dfa0b47d7922 100644
--- a/cui/uiconfig/ui/hyperlinkdialog.ui
+++ b/cui/uiconfig/ui/hyperlinkdialog.ui
@@ -112,7 +112,7 @@
                 <property name="width_request">110</property>
                 <property name="height_request">400</property>
                 <property name="visible">True</property>
-                <property name="can_focus">False</property>
+                <property name="can_focus">True</property>
                 <property name="vexpand">True</property>
               </object>
               <packing>
commit 44644eeb63cedb34ac7c21ef992364da9b67dbb5
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu Jun 13 15:53:06 2019 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 19 10:55:21 2019 +0200

    tdf#92079 vcl: fix missing image background on dialog from basic
    
    Regression from commit e5bb5c52aeaeb60c8592b004efd88c30242e03a1 (add
    RenderContext to Window::PushPaintHelper, use Erase correctly,
    2015-05-18), the problem was the unconditional ApplySettings() call in
    the direct painting case.
    
    It's not clear what was the intent of that addition, since
    vcl::Window::ApplySettings() is virtual, and the default implementation
    is empty. But at least the Dialog subclass sets the background there,
    leading to the loss of the original bitmap background.
    
    Fix the problem by explicitly restoring the old background after
    ApplySettings() at least in the bitmap case. (Wallpaper is
    copy-on-write, so no problem to make a copy before ApplySettings()
    unconditionally.)
    
    (cherry picked from commit f4e0cc1ff145287f80738f070a8c46a64b2f76d1)
    
    Change-Id: I89768a1331f9dc1ea4508336723484d112156338
    Reviewed-on: https://gerrit.libreoffice.org/74023
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    (cherry picked from commit 4046b51e6f6bd31b0188d9c00273a1761254a9d6)
    Reviewed-on: https://gerrit.libreoffice.org/74034
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    (cherry picked from commit 1fd61b1a2aac3e52f3c0a0ab8fbd3ff5170713c3)

diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 0031baf60937..8d3f88e9dfce 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -295,7 +295,10 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion)
         else
         {
             // direct painting
+            Wallpaper aBackground = m_pWindow->GetBackground();
             m_pWindow->ApplySettings(*m_pWindow);
+            if (aBackground.IsBitmap())
+                m_pWindow->SetBackground(aBackground);
             m_pWindow->PushPaintHelper(this, *m_pWindow);
             m_pWindow->Paint(*m_pWindow, m_aPaintRect);
         }
commit 869a00f77b5831a67149bc3a4946e21ddba93525
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Wed Jun 12 17:14:10 2019 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 19 10:55:20 2019 +0200

    Resolves: tdf#125878 correct calculation of H:M:S from timestamp
    
    This apparently has been wrong since the beginning in 2009.
    
    It's a somewhat odd algorithm anyway, first calculating the time
    in seconds, minutes and hours, but maybe there's a reason
    regarding rounding, so not changing that.
    
    Change-Id: I855d2c96094b4edb1095d20bcdfebdea6d6d943a
    Reviewed-on: https://gerrit.libreoffice.org/73893
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit 1436d2307d90f5ddbdcb0f129e59544306530342)
    Reviewed-on: https://gerrit.libreoffice.org/73915
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    (cherry picked from commit 5daf494782505dbee27b97a43a79588106715b16)

diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 858812193b8f..9e961cf793cb 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -185,8 +185,9 @@ void lcl_CalDate(sal_Int32 _nJulianDate,sal_Int32 _nJulianTime,css::util::DateTi
         double d_m = d_s / 60.0;
         double d_h  = d_m / 60.0;
         _rDateTime.Hours = static_cast<sal_uInt16>(d_h);
-        _rDateTime.Minutes = static_cast<sal_uInt16>(d_m);
-        _rDateTime.Seconds = static_cast<sal_uInt16>(( d_m - static_cast<double>(_rDateTime.Minutes) ) * 60.0);
+        _rDateTime.Minutes = static_cast<sal_uInt16>((d_h - static_cast<double>(_rDateTime.Hours)) * 60.0);
+        _rDateTime.Seconds = static_cast<sal_uInt16>(((d_m - static_cast<double>(_rDateTime.Minutes)) * 60.0)
+                - (static_cast<double>(_rDateTime.Hours) * 3600.0));
     }
 }
 
commit 2216ca12b2805a6bfcd826d41da79b090b83e0ec
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Wed Jun 19 10:52:56 2019 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed Jun 19 10:54:23 2019 +0200

    %s/6.0/6.2/g in bin/pack-debug
    
    Change-Id: I3d8916a43fa012d4074eba2254a6d591d9c25bda

diff --git a/bin/pack-debug b/bin/pack-debug
index 577b52bd913e..f37460ae5773 100755
--- a/bin/pack-debug
+++ b/bin/pack-debug
@@ -37,7 +37,7 @@ echo create debug packages >$BUILD_LOG
 eval $(grep ^INSTALLDIRNAME config.log)
 eval $(grep ^PRODUCTVERSION config.log)
 
-# set package base name, eg. collaboraoffice6.0
+# set package base name, eg. collaboraoffice6.2
 DEBUGSRC_PACKAGENAME=$INSTALLDIRNAME$PRODUCTVERSION
 
 #################################
@@ -245,24 +245,24 @@ do
  then
 	echo ================ $i ================
 	TARGET_NAME=$INSTALLDIRNAME"$(echo $(basename $i) | awk '
-	/epm_gid_Module_Optional_Firebird.lst/{print"basis6.0-firebird"}
-	/epm_gid_Module_Optional_Gnome.lst/{print"basis6.0-gnome-integration"}
-	/epm_gid_Module_Optional_Grfflt.lst/{print"basis6.0-graphicfilter"}
-	/epm_gid_Module_Optional_Kde.lst/{print"basis6.0-kde-integration"}
-	/epm_gid_Module_Optional_OGLTrans.lst/{print"basis6.0-ogltrans"}
-	/epm_gid_Module_Optional_PostgresqlSdbc.lst/{print"basis6.0-postgresql-sdbc"}
-	/epm_gid_Module_Pdfimport.lst/{print"basis6.0-extension-pdf-import"}
-	/epm_gid_Module_Prg_Base_Bin.lst/{print"basis6.0-base"}
-	/epm_gid_Module_Prg_Calc_Bin.lst/{print"basis6.0-calc"}
-	/epm_gid_Module_Prg_Impress_Bin.lst/{print"basis6.0-impress"}
-	/epm_gid_Module_Prg_Math_Bin.lst/{print"basis6.0-math"}
-	/epm_gid_Module_Prg_Wrt_Bin.lst/{print"basis6.0-writer"}
-	/epm_gid_Module_Pyuno.lst/{print"basis6.0-pyuno"}
-	/epm_gid_Module_Reportbuilder.lst/{print"basis6.0-extension-report-builder"}
-	/epm_gid_Module_Root_Brand.lst/{print"6.0"}
-	/epm_gid_Module_Root.lst/{print"basis6.0-core"}
-	/epm_gid_Module_Root_Ure_Hidden.lst/{print"6.0-ure"}
-	' | sed s/6.0/$PRODUCTVERSION/g)"
+	/epm_gid_Module_Optional_Firebird.lst/{print"basis6.2-firebird"}
+	/epm_gid_Module_Optional_Gnome.lst/{print"basis6.2-gnome-integration"}
+	/epm_gid_Module_Optional_Grfflt.lst/{print"basis6.2-graphicfilter"}
+	/epm_gid_Module_Optional_Kde.lst/{print"basis6.2-kde-integration"}
+	/epm_gid_Module_Optional_OGLTrans.lst/{print"basis6.2-ogltrans"}
+	/epm_gid_Module_Optional_PostgresqlSdbc.lst/{print"basis6.2-postgresql-sdbc"}
+	/epm_gid_Module_Pdfimport.lst/{print"basis6.2-extension-pdf-import"}
+	/epm_gid_Module_Prg_Base_Bin.lst/{print"basis6.2-base"}
+	/epm_gid_Module_Prg_Calc_Bin.lst/{print"basis6.2-calc"}
+	/epm_gid_Module_Prg_Impress_Bin.lst/{print"basis6.2-impress"}
+	/epm_gid_Module_Prg_Math_Bin.lst/{print"basis6.2-math"}
+	/epm_gid_Module_Prg_Wrt_Bin.lst/{print"basis6.2-writer"}
+	/epm_gid_Module_Pyuno.lst/{print"basis6.2-pyuno"}
+	/epm_gid_Module_Reportbuilder.lst/{print"basis6.2-extension-report-builder"}
+	/epm_gid_Module_Root_Brand.lst/{print"6.2"}
+	/epm_gid_Module_Root.lst/{print"basis6.2-core"}
+	/epm_gid_Module_Root_Ure_Hidden.lst/{print"6.2-ure"}
+	' | sed s/6.2/$PRODUCTVERSION/g)"
 	echo TARGET NAME: $TARGET_NAME
 
 	# create stripped libraries and linked debug info files


More information about the Libreoffice-commits mailing list