[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - 2 commits - vcl/qt5
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Jan 16 23:49:42 UTC 2019
vcl/qt5/Qt5Bitmap.cxx | 4 ++++
vcl/qt5/Qt5Graphics_Text.cxx | 7 ++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 15a9a00deea6dac77816862e6d6e0efcf5ea665f
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Mon Dec 17 15:07:26 2018 +0100
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Jan 17 00:49:34 2019 +0100
Qt5 don't re-register system fonts
System fonts are already registered in the QFontDatabase. And
addApplicationFont seems to be really expensive especially when
registering large fonts like the Noto CJK fonts, which increases
load time by 4 seconds per font.
This skips all font + style combinations already known in the DB.
Since addApplicationFont already relies on fontconfig on Unix/X11
this should be fine.
Change-Id: Ief13a613abd99b9fe391d9afe868541035340d1c
Reviewed-on: https://gerrit.libreoffice.org/65270
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
(cherry picked from commit 5d13f3efe0157559d3625c6b8fe7e9741e601215)
Reviewed-on: https://gerrit.libreoffice.org/65290
(cherry picked from commit 6d3faf6a048eedf3fe4a1f43545eeda38adb2763)
Reviewed-on: https://gerrit.libreoffice.org/66457
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx
index 37a0879b0044..f63756c768f7 100644
--- a/vcl/qt5/Qt5Graphics_Text.cxx
+++ b/vcl/qt5/Qt5Graphics_Text.cxx
@@ -101,6 +101,7 @@ void Qt5Graphics::GetDevFontList(PhysicalFontCollection* pPFC)
if (bUseFontconfig)
{
+ const QStringList aFontFamilyList = aFDB.families();
::std::vector<psp::fontID> aList;
psp::FastPrintFontInfo aInfo;
@@ -112,7 +113,11 @@ void Qt5Graphics::GetDevFontList(PhysicalFontCollection* pPFC)
continue;
QString aFilename = toQString(
OStringToOUString(rMgr.getFontFileSysPath(aInfo.m_nID), RTL_TEXTENCODING_UTF8));
- QFontDatabase::addApplicationFont(aFilename);
+ QRawFont aRawFont(aFilename, 0.0);
+ QString aFamilyName = aRawFont.familyName();
+ if (!aFontFamilyList.contains(aFamilyName)
+ || !aFDB.styles(aFamilyName).contains(aRawFont.styleName()))
+ QFontDatabase::addApplicationFont(aFilename);
}
SalGenericInstance::RegisterFontSubstitutors(pPFC);
commit ba48f577c51e3e39f56438b56582973e14f7ed01
Author: Aleksei Nikiforov <darktemplar at basealt.ru>
AuthorDate: Mon Dec 17 15:31:16 2018 +0300
Commit: Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Jan 17 00:49:19 2019 +0100
Qt5: fix color bits interpretation for 32bit ARGB image formats
Change-Id: Iea8547089a0ce2dc9f6a06b84552f4261fbfa0f1
Reviewed-on: https://gerrit.libreoffice.org/65311
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
(cherry picked from commit 7802d99c35f5acfa43203f1dd6d1752af4e7c0b6)
Reviewed-on: https://gerrit.libreoffice.org/65332
Reviewed-by: Aleksei Nikiforov <darktemplar at basealt.ru>
Reviewed-on: https://gerrit.libreoffice.org/66458
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/vcl/qt5/Qt5Bitmap.cxx b/vcl/qt5/Qt5Bitmap.cxx
index 73df8c1c98e5..aac79e4181a5 100644
--- a/vcl/qt5/Qt5Bitmap.cxx
+++ b/vcl/qt5/Qt5Bitmap.cxx
@@ -263,7 +263,11 @@ BitmapBuffer* Qt5Bitmap::AcquireBuffer(BitmapAccessMode /*nMode*/)
break;
case 32:
{
+#ifdef OSL_BIGENDIAN
pBuffer->mnFormat = ScanlineFormat::N32BitTcArgb | ScanlineFormat::TopDown;
+#else
+ pBuffer->mnFormat = ScanlineFormat::N32BitTcBgra | ScanlineFormat::TopDown;
+#endif
pBuffer->maPalette = aEmptyPalette;
break;
}
More information about the Libreoffice-commits
mailing list