Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package OpenBoard for openSUSE:Factory 
checked in at 2022-09-20 19:23:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/OpenBoard (Old)
 and      /work/SRC/openSUSE:Factory/.OpenBoard.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "OpenBoard"

Tue Sep 20 19:23:30 2022 rev:3 rq:1004929 version:1.7.0~git20220914.47a96e1

Changes:
--------
--- /work/SRC/openSUSE:Factory/OpenBoard/OpenBoard.changes      2022-06-25 
10:24:20.762680934 +0200
+++ /work/SRC/openSUSE:Factory/.OpenBoard.new.2083/OpenBoard.changes    
2022-09-20 19:23:36.154477296 +0200
@@ -1,0 +2,35 @@
+Tue Sep 20 09:23:13 UTC 2022 - Martin Winter <[email protected]>
+
+- fix file list in spec file
+  - do not include /usr/share/mime/packages directory owned by
+    filesystem
+
+-------------------------------------------------------------------
+Wed Sep 14 06:24:01 UTC 2022 - Martin Winter <[email protected]>
+
+- update to version 1.7.0~git20220914.47a96e1
+- feat: user configurable shortcuts
+  * add 0460-shortcut-configuration.patch
+- fix: boxing in single screen mode
+  * update 0633-improve-displaymanager.patch
+- fix: PDF background export
+  * update 0637-fix-pdf-background-export.patch
+- fix: font handling
+  * update 0641-fix-font-handling.patch
+- fix: PDF export scaling
+  * add 0649-fix-pdf-export-scaling.patch
+- refactor: Linux build and installation
+  * add 0651-chore-reorganize-linux-build.patch
+  * replaces 0001-Rewrite-libs.pri.patch
+  * replaces 0002-Install-to-correct-directories-on-linux.patch
+  * replaces 0003-podcast.pri-port-to-pkgconfig.patch
+  * replaces 0004-Use-QStandardPaths-to-locate-resources.patch
+  * replaces 0005-Add-svg-icon.patch
+  * replaces 0006-pro-Remove-UB_THIRDPARTY_INTERACTIVE.patch
+  * replaces 0007-Linux-Only-use-onboard-by-default-if-it-s-installed.patch
+  * replaces 0008-install-fonts.patch
+  * add mimespec for .ubz files
+  * also improve handling of onboard on-screen keyboard
+- refactor: clean spec file
+
+-------------------------------------------------------------------

Old:
----
  0001-Rewrite-libs.pri.patch
  0002-Install-to-correct-directories-on-linux.patch
  0003-podcast.pri-port-to-pkgconfig.patch
  0004-Use-QStandardPaths-to-locate-resources.patch
  0005-Add-svg-icon.patch
  0006-pro-Remove-UB_THIRDPARTY_INTERACTIVE.patch
  0007-Linux-Only-use-onboard-by-default-if-it-s-installed.patch
  0008-install-fonts.patch

New:
----
  0460-shortcut-configuration.patch
  0649-fix-pdf-export-scaling.patch
  0651-chore-reorganize-linux-build.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ OpenBoard.spec ++++++
--- /var/tmp/diff_new_pack.aeWpsQ/_old  2022-09-20 19:23:36.978479659 +0200
+++ /var/tmp/diff_new_pack.aeWpsQ/_new  2022-09-20 19:23:36.978479659 +0200
@@ -16,29 +16,23 @@
 #
 
 
-Name:           OpenBoard
 %define         dest_dir %{_libdir}/%{name}
 %define         namelc openboard
 %define         fqname ch.%{namelc}.%{name}
 %define         githash  47a96e1d6bbdc0250977d22f1b79f11fcc1cbeee
 %define         gitshort 47a96e1
-%define         gitdate  20220608
-%define         buildver 0608
+%define         gitdate  20220914
+%define         buildver 0914
+Name:           OpenBoard
 Version:        1.7.0~git%{gitdate}.%{gitshort}
 Release:        0
 Summary:        Interactive whiteboard for schools and universities
 License:        GPL-3.0-or-later
 Group:          Amusements/Teaching/Other
-URL:            http://openboard.ch
+URL:            https://openboard.ch
 Source0:        
https://github.com/OpenBoard-org/OpenBoard/archive/%{githash}.zip#/OpenBoard-%{githash}.zip
-Patch0:         0001-Rewrite-libs.pri.patch
-Patch1:         0002-Install-to-correct-directories-on-linux.patch
-Patch2:         0003-podcast.pri-port-to-pkgconfig.patch
-Patch3:         0004-Use-QStandardPaths-to-locate-resources.patch
-Patch4:         0005-Add-svg-icon.patch
-Patch5:         0006-pro-Remove-UB_THIRDPARTY_INTERACTIVE.patch
-Patch6:         0007-Linux-Only-use-onboard-by-default-if-it-s-installed.patch
-Patch7:         0008-install-fonts.patch
+# https://github.com/OpenBoard-org/OpenBoard/pull/460
+Patch460:       0460-shortcut-configuration.patch
 # https://github.com/OpenBoard-org/OpenBoard/pull/551
 Patch551:       0551-common-background-drawing.patch
 # https://github.com/OpenBoard-org/OpenBoard/pull/569
@@ -53,20 +47,18 @@
 Patch637:       0637-fix-pdf-background-export.patch
 # https://github.com/OpenBoard-org/OpenBoard/pull/641
 Patch641:       0641-fix-font-handling.patch
-
+# https://github.com/OpenBoard-org/OpenBoard/pull/649
+Patch649:       0649-fix-pdf-export-scaling.patch
+# https://github.com/OpenBoard-org/OpenBoard/pull/651
+Patch651:       0651-chore-reorganize-linux-build.patch
 BuildRequires:  desktop-file-utils
 BuildRequires:  fdupes
 BuildRequires:  ffmpeg-devel
-BuildRequires:  unzip
-BuildRequires:  unzip
-%if 0%{?sle_version} > 150200 || 0%{?suse_version} > 1520
-BuildRequires:  pkgconfig(quazip1-qt5)
-%else
-BuildRequires:  pkgconfig(quazip)
-%endif
 BuildRequires:  pkgconfig
+BuildRequires:  unzip
 BuildRequires:  pkgconfig(Qt5Concurrent)
 BuildRequires:  pkgconfig(Qt5Core)
+BuildRequires:  pkgconfig(Qt5DBus)
 BuildRequires:  pkgconfig(Qt5Multimedia)
 BuildRequires:  pkgconfig(Qt5MultimediaWidgets)
 BuildRequires:  pkgconfig(Qt5Network)
@@ -79,6 +71,8 @@
 BuildRequires:  pkgconfig(freetype2)
 BuildRequires:  pkgconfig(openssl)
 BuildRequires:  pkgconfig(poppler)
+BuildRequires:  pkgconfig(quazip1-qt5)
+Recommends:     onboard
 
 %description
 OpenBoard is an open source cross-platform interactive white board
@@ -86,23 +80,11 @@
 originally forked from Open-Sankor??, which was itself based on
 Uniboard.
 
+This build is based on the development branch 1.7-dev and includes
+a set of additional patches for features and bug fixes.
+
 %prep
-%setup -n %{name}-%{githash} -q
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch551 -p1
-%patch569 -p1
-%patch604 -p1
-%patch629 -p1
-%patch633 -p1
-%patch637 -p1
-%patch641 -p1
+%autosetup -p1 -n %{name}-%{githash}
 
 # insert version
 sed -i 's/VERSION_BUILD = 0225/VERSION_BUILD = %{buildver}/g' OpenBoard.pro
@@ -111,6 +93,9 @@
 # remove x flag from any resource files
 find resources -type f -print0 | xargs -0 chmod a-x
 
+# remove leftover version control file
+rm resources/library/applications/Calculator.wgt/.gitignore
+
 %build
 lrelease-qt5 %{name}.pro
 
@@ -125,11 +110,12 @@
 %fdupes -s %{buildroot}
 
 %files
-%defattr(-,root,root,-)
-%doc COPYRIGHT LICENSE
+%license LICENSE
+%doc COPYRIGHT
 %{_datadir}/applications/%{fqname}.desktop
 %{_datadir}/icons/hicolor/scalable
-%{_datadir}/OpenBoard
+%{_datadir}/mime/packages/*
+%{_datadir}/openboard
 %{_bindir}/%{namelc}
 
 %changelog

++++++ 0460-shortcut-configuration.patch ++++++
++++ 13514 lines (skipped)

++++++ 0633-improve-displaymanager.patch ++++++
--- /var/tmp/diff_new_pack.aeWpsQ/_old  2022-09-20 19:23:37.018479774 +0200
+++ /var/tmp/diff_new_pack.aeWpsQ/_new  2022-09-20 19:23:37.022479785 +0200
@@ -1,7 +1,7 @@
 From aef0bfb171e9df1206381ebba95b95830212c576 Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Tue, 7 Jun 2022 09:28:21 +0200
-Subject: [PATCH 01/12] fix: validation of screen configuration
+Subject: [PATCH 01/13] fix: validation of screen configuration
 
 - never reject
 - make inacceptable input status visible by red border
@@ -208,7 +208,7 @@
 From 03050cf3136911e95c598719081aa43e033388b4 Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Tue, 7 Jun 2022 19:12:57 +0200
-Subject: [PATCH 02/12] fix: improve UBDisplayManager
+Subject: [PATCH 02/13] fix: improve UBDisplayManager
 
 - set initial window size in window mode
 - use the UBPlatformUtils.showFullScreen for control widget only
@@ -396,7 +396,7 @@
 From c7996ff0768ee90a80b077010b6b69ac9f9052e8 Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Fri, 10 Jun 2022 11:29:50 +0200
-Subject: [PATCH 03/12] fix: position minimized dock palette
+Subject: [PATCH 03/13] fix: position minimized dock palette
 
 - recompute position when screen configuration is updated
 - recompute position on screen when window is resized
@@ -467,7 +467,7 @@
 From e4df0d6146cd0035fbeb5b973038ac9712861fcc Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Fri, 10 Jun 2022 13:45:16 +0200
-Subject: [PATCH 04/12] fix: re-initialize previous screens on layout change
+Subject: [PATCH 04/13] fix: re-initialize previous screens on layout change
 
 ---
  src/core/UBApplicationController.cpp | 22 +++++++++++++++-------
@@ -537,7 +537,7 @@
 From ebb5c5a83bab2e1f0a2803967a106510dd2d004e Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Fri, 10 Jun 2022 16:13:00 +0200
-Subject: [PATCH 05/12] feat: configure screen list by index
+Subject: [PATCH 05/13] feat: configure screen list by index
 
 - use a numeric index to identify screens
 - store separate configurations per monitor configuration
@@ -553,7 +553,7 @@
 index 2b40e4822..d797db561 100644
 --- a/src/core/UBPreferencesController.cpp
 +++ b/src/core/UBPreferencesController.cpp
-@@ -116,7 +116,37 @@ UBPreferencesController::~UBPreferencesController()
+@@ -203,7 +203,37 @@ UBPreferencesController::~UBPreferencesController()
  
  void UBPreferencesController::adjustScreens()
  {
@@ -591,7 +591,7 @@
 +    }
  }
  
- void UBPreferencesController::show()
+ void UBPreferencesController::applyShortcutFilter(const QString &filter, int 
filterCol)
 @@ -137,10 +167,12 @@ void UBPreferencesController::wire()
      connect(mPreferencesUI->closeButton, SIGNAL(released()), this, 
SLOT(close()));
      connect(mPreferencesUI->defaultSettingsButton, SIGNAL(released()), this, 
SLOT(defaultSettings()));
@@ -807,7 +807,7 @@
 From fdf430cfeb82cb0fac6132974cc700f122f78435 Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Sat, 11 Jun 2022 15:53:15 +0200
-Subject: [PATCH 06/12] fix: showFullscreen in window mode
+Subject: [PATCH 06/13] fix: showFullscreen in window mode
 
 - restrict window mode to control widget only
 - make same changes for MacOS
@@ -963,7 +963,7 @@
 From df7577796c44cea5faf328877e3bb1f2f86c58a3 Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Sat, 11 Jun 2022 17:13:02 +0200
-Subject: [PATCH 07/12] refactor: store indexes instead of screen names, checks
+Subject: [PATCH 07/13] refactor: store indexes instead of screen names, checks
  and formatting
 
 - an entry like
@@ -1431,9 +1431,9 @@
      adjustScreens();
 -    connect(UBApplication::displayManager, 
&UBDisplayManager::screenLayoutChanged, this, 
&UBPreferencesController::adjustScreens);
 +    connect(UBApplication::displayManager, 
&UBDisplayManager::availableScreenCountChanged, this, 
&UBPreferencesController::adjustScreens);
-     wire();
- }
+     mPreferencesUI->shortcutTab->installEventFilter(this);
  
+     wire();
 @@ -133,10 +133,9 @@ void UBPreferencesController::adjustScreens()
  
      for (QScreen* screen : availableScreens)
@@ -1517,7 +1517,7 @@
 From 45761b5c2cdef916d8afaec5d8ce434b75ef9ac9 Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Mon, 13 Jun 2022 15:57:51 +0200
-Subject: [PATCH 08/12] fix: initialize previous screen widgets and content
+Subject: [PATCH 08/13] fix: initialize previous screen widgets and content
 
 - create widgets immediately after screen count is known
 - update content after widgets are positioned
@@ -1589,7 +1589,7 @@
 From e5ef9eb96cb618bd373b12df7dff0408204be0d9 Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Wed, 15 Jun 2022 09:54:20 +0200
-Subject: [PATCH 09/12] fix: typo in debug message
+Subject: [PATCH 09/13] fix: typo in debug message
 
 ---
  src/core/UBPersistenceWorker.cpp | 2 +-
@@ -1612,7 +1612,7 @@
 From e639f0ae496ec45268c3233c9d894641b0a9299c Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Wed, 15 Jun 2022 11:35:25 +0200
-Subject: [PATCH 10/12] fix: additional UBDisplayManager and
+Subject: [PATCH 10/13] fix: additional UBDisplayManager and
  UBPreferencesController changes
 
 - split into three phases
@@ -2181,18 +2181,19 @@
  
  class UBStringListValidator : public QValidator
 
-From 281a072d48297a7e00932b4ee191e5d371a5395a Mon Sep 17 00:00:00 2001
+From 9af1f3e18a0040707c39858c6f23ca58c2d92123 Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Wed, 15 Jun 2022 17:13:56 +0200
-Subject: [PATCH 11/12] feat: improve boxing in window mode
+Subject: [PATCH 11/13] feat: improve boxing in window mode
 
 - calculate boxing as if window would be full screen
+- set boxing only if display screen exists
 ---
- src/board/UBBoardController.cpp | 25 +++++++++++++++++++++----
- 1 file changed, 21 insertions(+), 4 deletions(-)
+ src/board/UBBoardController.cpp | 27 ++++++++++++++++++++++-----
+ 1 file changed, 22 insertions(+), 5 deletions(-)
 
 diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp
-index 0bdd0d894..e69a7ddff 100644
+index 0bdd0d894..a4ca32ed3 100644
 --- a/src/board/UBBoardController.cpp
 +++ b/src/board/UBBoardController.cpp
 @@ -252,8 +252,12 @@ void UBBoardController::setBoxing(QRect displayRect)
@@ -2238,8 +2239,12 @@
          mControlLayout->setContentsMargins(0, boxHeight, 0, boxHeight);
      }
      else
-@@ -1810,6 +1826,7 @@ void UBBoardController::boardViewResized(QResizeEvent* 
event)
-     if (mDisplayView) {
+@@ -1807,9 +1823,10 @@ void UBBoardController::boardViewResized(QResizeEvent* 
event)
+ 
+     mControlView->centerOn(0,0);
+ 
+-    if (mDisplayView) {
++    if (mDisplayView && UBApplication::displayManager->hasDisplay()) {
          UBApplication::applicationController->adjustDisplayView();
          mDisplayView->centerOn(0,0);
 +        setBoxing(mDisplayView->geometry());
@@ -2247,10 +2252,10 @@
  
      mPaletteManager->containerResized();
 
-From 6a38501e33735f82e064656c4b82294798028e7a Mon Sep 17 00:00:00 2001
+From 2e0d11bcd059b4f20dc8dd789a16eeb1817b09df Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Fri, 17 Jun 2022 09:50:08 +0200
-Subject: [PATCH 12/12] fix: object ownership, some cleanup
+Subject: [PATCH 12/13] fix: object ownership, some cleanup
 
 - set ownership of UBStringListValidator
 - make UBStringListValidator mutable and add setValidationStringList
@@ -2502,3 +2507,135 @@
          UBSetting* appPreferredLanguage;
          UBSetting* appRunInWindow;
 
+From 8d5d76a6a56a7e50cbef1acbe0cb6655eacddfd5 Mon Sep 17 00:00:00 2001
+From: letsfindaway <[email protected]>
+Date: Wed, 22 Jun 2022 11:38:04 +0200
+Subject: [PATCH 13/13] refactor: move string list trim to UBStringUtils
+
+- separate splitting from trimming
+- create function trimmed in UBStringUtils
+- remove trimmedTokens from UBPreferencesController
+---
+ src/core/UBPreferencesController.cpp | 25 ++++++-------------------
+ src/frameworks/UBStringUtils.cpp     | 22 ++++++++++++++++++++++
+ src/frameworks/UBStringUtils.h       |  2 +-
+ 3 files changed, 29 insertions(+), 20 deletions(-)
+
+diff --git a/src/core/UBPreferencesController.cpp 
b/src/core/UBPreferencesController.cpp
+index 132b87fd1..ba14c6e7d 100644
+--- a/src/core/UBPreferencesController.cpp
++++ b/src/core/UBPreferencesController.cpp
+@@ -38,6 +38,8 @@
+ #include "core/UBDisplayManager.h"
+ #include "core/UBShortcutManager.h"
+ 
++#include "frameworks/UBStringUtils.h"
++
+ #include "board/UBBoardController.h"
+ #include "document/UBDocumentController.h"
+ #include "domain/UBGraphicsScene.h"
+@@ -52,21 +54,6 @@ qreal UBPreferencesController::sSliderRatio = 10.0;
+ qreal UBPreferencesController::sMinPenWidth = 0.5;
+ qreal UBPreferencesController::sMaxPenWidth = 50.0;
+ 
+-// convenience function to split a comma separated list of tokens to a 
QStringList
+-QStringList trimmedTokens(const QString& input)
+-{
+-    QStringList tokens = input.split(',');
+-
+-    for (QString& entry : tokens)
+-    {
+-        entry = entry.trimmed();
+-    }
+-
+-    tokens.removeAll("");
+-
+-    return tokens;
+-}
+-
+ 
+ UBPreferencesDialog::UBPreferencesDialog(UBPreferencesController* 
prefController, QWidget* parent,Qt::WindowFlags f)
+     :QDialog(parent,f)
+@@ -813,7 +800,7 @@ void UBScreenListLineEdit::focusInEvent(QFocusEvent 
*focusEvent)
+ 
+     if (mScreenLabels.empty())
+     {
+-        QStringList screenList = trimmedTokens(text());
++        QStringList screenList = UBStringUtils::trimmed(text().split(','));
+ 
+         QList<QScreen*> screens = 
UBApplication::displayManager->availableScreens();
+         QStringList availableScreenIndexes;
+@@ -884,7 +871,7 @@ void UBScreenListLineEdit::addScreen()
+ 
+ void UBScreenListLineEdit::onTextChanged(const QString &input)
+ {
+-    QStringList screenList = trimmedTokens(input);
++    QStringList screenList = UBStringUtils::trimmed(input.split(','));
+ 
+     for (QPushButton* button : mScreenLabels)
+     {
+@@ -926,7 +913,7 @@ UBStringListValidator::UBStringListValidator(QObject 
*parent)
+ void UBStringListValidator::fixup(QString &input) const
+ {
+     // remove invalid tokens from list, trim tokens
+-    QStringList inputList = trimmedTokens(input);
++    QStringList inputList = UBStringUtils::trimmed(input.split(','));
+     QStringList outputList;
+ 
+     for (const QString& token : inputList)
+@@ -943,7 +930,7 @@ void UBStringListValidator::fixup(QString &input) const
+ QValidator::State UBStringListValidator::validate(QString &input, int &) const
+ {
+     bool ok = true;
+-    QStringList inputList = trimmedTokens(input);
++    QStringList inputList = UBStringUtils::trimmed(input.split(','));
+     // number of commas must match number of list items - 1
+     int commas = input.count(',');
+ 
+diff --git a/src/frameworks/UBStringUtils.cpp 
b/src/frameworks/UBStringUtils.cpp
+index ce579d2d0..e3201fcde 100644
+--- a/src/frameworks/UBStringUtils.cpp
++++ b/src/frameworks/UBStringUtils.cpp
+@@ -127,6 +127,28 @@ QDateTime UBStringUtils::fromUtcIsoDate(const QString& 
dateString)
+     return date.toLocalTime();
+ }
+ 
++/**
++ * @brief Create a list of trimmed, non-empty strings
++ * @param list input list of strings
++ * @return list of trimmed, nonempty strings
++ */
++QStringList UBStringUtils::trimmed(const QStringList &list)
++{
++    QStringList output;
++
++    for (const QString& entry : list)
++    {
++        QString trimmedEntry = entry.trimmed();
++
++        if (!trimmedEntry.isEmpty())
++        {
++            output << trimmedEntry;
++        }
++    }
++
++    return output;
++}
++
+ 
+ 
+ 
+diff --git a/src/frameworks/UBStringUtils.h b/src/frameworks/UBStringUtils.h
+index 5844fdb5f..ac9db2e10 100644
+--- a/src/frameworks/UBStringUtils.h
++++ b/src/frameworks/UBStringUtils.h
+@@ -50,7 +50,7 @@ class UBStringUtils
+         static QString toUtcIsoDateTime(const QDateTime& dateTime);
+         static QDateTime fromUtcIsoDate(const QString& dateString);
+ 
+-
++        static QStringList trimmed(const QStringList& list);
+ };
+ 
+ #endif // UBSTRINGUTILS_H
+

++++++ 0637-fix-pdf-background-export.patch ++++++
--- /var/tmp/diff_new_pack.aeWpsQ/_old  2022-09-20 19:23:37.034479820 +0200
+++ /var/tmp/diff_new_pack.aeWpsQ/_new  2022-09-20 19:23:37.038479831 +0200
@@ -1,31 +1,63 @@
-From e360c574f9a8ce73795d73c9f7431c6262e588aa Mon Sep 17 00:00:00 2001
+From a9c28a03b02f8b9064300f9d198ba77f79bbfc6b Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Wed, 22 Jun 2022 09:30:31 +0200
 Subject: [PATCH] fix: restore PDF background export
 
 - was not enabled with UBExportFullPDF
+- however do not draw background grid/color if a background PDF is used
 ---
- src/adaptors/UBExportFullPDF.cpp | 2 --
- 1 file changed, 2 deletions(-)
+ src/adaptors/UBExportFullPDF.cpp | 27 ++++++++++++++++-----------
+ 1 file changed, 16 insertions(+), 11 deletions(-)
 
 diff --git a/src/adaptors/UBExportFullPDF.cpp 
b/src/adaptors/UBExportFullPDF.cpp
-index baa38de4c..a3afc232d 100644
+index a2bd2e065..3e058119a 100644
 --- a/src/adaptors/UBExportFullPDF.cpp
 +++ b/src/adaptors/UBExportFullPDF.cpp
-@@ -142,7 +142,6 @@ void UBExportFullPDF::saveOverlayPdf(UBDocumentProxy* 
pDocumentProxy, const QStr
+@@ -108,21 +108,12 @@ void UBExportFullPDF::saveOverlayPdf(UBDocumentProxy* 
pDocumentProxy, const QStr
+         for(int pageIndex = 0 ; pageIndex < pDocumentProxy->pageCount(); 
pageIndex++)
+         {
+             UBGraphicsScene* scene = 
UBPersistenceManager::persistenceManager()->loadDocumentScene(pDocumentProxy, 
pageIndex);
+-            // set background to white, no grid for PDF output
++            // set background according to PDF export settings
+             bool isDark = scene->isDarkBackground();
+             UBPageBackground pageBackground = scene->pageBackground();
+ 
+             bool exportDark = isDark && 
UBSettings::settings()->exportBackgroundColor->get().toBool();
+ 
+-            if (UBSettings::settings()->exportBackgroundGrid->get().toBool())
+-            {
+-                scene->setBackground(exportDark, pageBackground);
+-            }
+-            else
+-            {
+-                scene->setBackground(exportDark, UBPageBackground::plain);
+-            }
+-
+             // set high res rendering
+             scene->setRenderingQuality(UBItem::RenderingQualityHigh, 
UBItem::CacheNotAllowed);
+             scene->setRenderingContext(UBGraphicsScene::PdfExport);
+@@ -141,8 +132,22 @@ void UBExportFullPDF::saveOverlayPdf(UBDocumentProxy* 
pDocumentProxy, const QStr
+ 
              if (pageIndex != 0) pdfPrinter.newPage();
  
++            // do not draw background color and grid if scene has PDF 
background
++            if (mHasPDFBackgrounds)
++            {
++                scene->setDrawingMode(true);
++                scene->setBackground(false, UBPageBackground::plain);
++            }
++            else if 
(UBSettings::settings()->exportBackgroundGrid->get().toBool())
++            {
++                scene->setBackground(exportDark, pageBackground);
++            }
++            else
++            {
++                scene->setBackground(exportDark, UBPageBackground::plain);
++            }
++
              //render to PDF
 -            scene->setDrawingMode(true);
              scene->render(pdfPainter, QRectF(), scene->normalizedSceneRect());
  
              //restore screen rendering quality
-@@ -150,7 +149,6 @@ void UBExportFullPDF::saveOverlayPdf(UBDocumentProxy* 
pDocumentProxy, const QStr
-             scene->setRenderingQuality(UBItem::RenderingQualityNormal, 
UBItem::CacheAllowed);
- 
-             //restore background state
--            scene->setDrawingMode(false);
-             scene->setBackground(isDark, pageBackground);
-         }
- 
 

++++++ 0641-fix-font-handling.patch ++++++
--- /var/tmp/diff_new_pack.aeWpsQ/_old  2022-09-20 19:23:37.050479866 +0200
+++ /var/tmp/diff_new_pack.aeWpsQ/_new  2022-09-20 19:23:37.050479866 +0200
@@ -1,4 +1,4 @@
-From ee7d9dd4953a45b1eb7fed807bd900932e40d646 Mon Sep 17 00:00:00 2001
+From 61bac4e2df21df409f0f05c711e6a3385daf434a Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Fri, 24 Jun 2022 07:01:07 +0200
 Subject: [PATCH 1/2] feat: add containsPrefix string utility
@@ -11,7 +11,7 @@
  2 files changed, 16 insertions(+), 2 deletions(-)
 
 diff --git a/src/frameworks/UBStringUtils.cpp 
b/src/frameworks/UBStringUtils.cpp
-index ce579d2d0..ac2a9395b 100644
+index b35299150..477fade30 100644
 --- a/src/frameworks/UBStringUtils.cpp
 +++ b/src/frameworks/UBStringUtils.cpp
 @@ -31,6 +31,19 @@
@@ -60,7 +60,7 @@
          static QString toCanonicalUuid(const QUuid& uuid);
  
 
-From 630cd0a11712b1cc92885b470fd60a260d00e007 Mon Sep 17 00:00:00 2001
+From cefb75f2a0c9b81c9cfa3f0638e37613c9f10472 Mon Sep 17 00:00:00 2001
 From: letsfindaway <[email protected]>
 Date: Fri, 24 Jun 2022 07:08:57 +0200
 Subject: [PATCH 2/2] perf: improve performance of building font model

++++++ 0649-fix-pdf-export-scaling.patch ++++++
>From e9ea08b2298ea4bbfae42df81b8895d4165efec6 Mon Sep 17 00:00:00 2001
From: letsfindaway <[email protected]>
Date: Fri, 1 Jul 2022 11:52:31 +0200
Subject: [PATCH 1/2] fix: scaling of background PDF during export

---
 src/adaptors/UBExportFullPDF.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/adaptors/UBExportFullPDF.cpp b/src/adaptors/UBExportFullPDF.cpp
index 6e98859ae..c61a66645 100644
--- a/src/adaptors/UBExportFullPDF.cpp
+++ b/src/adaptors/UBExportFullPDF.cpp
@@ -199,6 +199,11 @@ bool UBExportFullPDF::persistsDocument(UBDocumentProxy* 
pDocumentProxy, const QS
 
             MergeDescription mergeInfo;
 
+            // If the PDF was scaled when added to the scene (e.g if it was 
loaded from a document with a different DPI
+            // than the current one), it should also be scaled here.
+            qreal currentDpi = 
UBApplication::displayManager->logicalDpi(ScreenRole::Control);
+            qreal pdfScale = qreal(pDocumentProxy->pageDpi())/currentDpi;
+
             int existingPageCount = pDocumentProxy->pageCount();
 
             for(int pageIndex = 0 ; pageIndex < existingPageCount; pageIndex++)
@@ -238,10 +243,6 @@ bool UBExportFullPDF::persistsDocument(UBDocumentProxy* 
pDocumentProxy, const QS
                     xPdfOffset += (xPdf - xAnnotation) * scaleFactor * 
mScaleFactor;
                     yPdfOffset -= (yPdf - yAnnotation) * scaleFactor * 
mScaleFactor;
 
-                    // If the PDF was scaled when added to the scene (e.g if 
it was loaded from a document with a different DPI
-                    // than the current one), it should also be scaled here.
-                    qreal pdfScale = pdfItem->scale();
-
                     TransformationDescription pdfTransform(xPdfOffset, 
yPdfOffset, scaleFactor * pdfScale, 0);
                     TransformationDescription 
annotationTransform(xAnnotationsOffset, yAnnotationsOffset, 1, 0);
 

>From 5e4100bbaf38931268e040cb2b6bea24b0fbda46 Mon Sep 17 00:00:00 2001
From: letsfindaway <[email protected]>
Date: Fri, 19 Aug 2022 10:24:06 +0200
Subject: [PATCH 2/2] refactor: make compatibile with 1.6.x and 1.7.x

- use preprocessor to choose version dependent solutions
---
 src/adaptors/UBExportFullPDF.cpp | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/adaptors/UBExportFullPDF.cpp b/src/adaptors/UBExportFullPDF.cpp
index c61a66645..a2bd2e065 100644
--- a/src/adaptors/UBExportFullPDF.cpp
+++ b/src/adaptors/UBExportFullPDF.cpp
@@ -201,7 +201,20 @@ bool UBExportFullPDF::persistsDocument(UBDocumentProxy* 
pDocumentProxy, const QS
 
             // If the PDF was scaled when added to the scene (e.g if it was 
loaded from a document with a different DPI
             // than the current one), it should also be scaled here.
+#define UB_MINOR(version) EXTRACT_UB_MINOR(version)
+#define EXTRACT_UB_MINOR(major,minor,patch,type,build) minor
+#define UB_MAJOR(version) EXTRACT_UB_MAJOR(version)
+#define EXTRACT_UB_MAJOR(major,minor,patch,type,build) major
+
+#if UB_MAJOR(UBVERSION_RC) == 1 && UB_MINOR(UBVERSION_RC) == 6
+            QDesktopWidget* desktop = UBApplication::desktop();
+            qreal currentDpi = (desktop->physicalDpiX() + 
desktop->physicalDpiY()) / 2;
+#elif UB_MAJOR(UBVERSION_RC) == 1 && UB_MINOR(UBVERSION_RC) >= 7
             qreal currentDpi = 
UBApplication::displayManager->logicalDpi(ScreenRole::Control);
+#else
+#error Version UBVERSION_RC not supported by this code
+#endif
+
             qreal pdfScale = qreal(pDocumentProxy->pageDpi())/currentDpi;
 
             int existingPageCount = pDocumentProxy->pageCount();

++++++ 0651-chore-reorganize-linux-build.patch ++++++
++++ 905 lines (skipped)

Reply via email to