Makefile.fetch | 8 Repository.mk | 8 configure.ac | 2 download.lst | 48 ++++- external/libcmis/UnpackedTarball_libcmis.mk | 1 external/libcmis/http-session-cleanup.patch.1 | 82 +++++++++ external/more_fonts/ExternalPackage_agdasima.mk | 17 + external/more_fonts/ExternalPackage_bacasime_antique.mk | 16 + external/more_fonts/ExternalPackage_belanosima.mk | 18 ++ external/more_fonts/ExternalPackage_caprasimo.mk | 16 + external/more_fonts/ExternalPackage_lugrasimo.mk | 16 + external/more_fonts/ExternalPackage_lumanosimo.mk | 16 + external/more_fonts/ExternalPackage_lunasima.mk | 17 + external/more_fonts/ExternalPackage_sourcesans.mk | 27 +++ external/more_fonts/Module_more_fonts.mk | 16 + external/more_fonts/UnpackedTarball_agdasima.mk | 14 + external/more_fonts/UnpackedTarball_bacasime_antique.mk | 14 + external/more_fonts/UnpackedTarball_belanosima.mk | 14 + external/more_fonts/UnpackedTarball_caprasimo.mk | 14 + external/more_fonts/UnpackedTarball_lugrasimo.mk | 14 + external/more_fonts/UnpackedTarball_lumanosimo.mk | 14 + external/more_fonts/UnpackedTarball_lunasima.mk | 14 + external/more_fonts/UnpackedTarball_sourcesans.mk | 14 + external/more_fonts/fc_local.snippet | 49 +++++ include/sfx2/docmacromode.hxx | 1 officecfg/registry/data/org/openoffice/VCL.xcu | 115 ++++++++++++ package/inc/ZipFile.hxx | 3 package/source/zipapi/MemoryByteGrabber.hxx | 8 package/source/zipapi/ZipFile.cxx | 47 ++++- readlicense_oo/license/license.xml | 60 ++++++ sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 60 ++++++ sc/source/ui/inc/AccessibleSpreadsheet.hxx | 2 sc/source/ui/unoobj/textuno.cxx | 10 + sfx2/source/doc/docmacromode.cxx | 24 ++ sfx2/source/doc/objmisc.cxx | 6 sfx2/source/doc/objserv.cxx | 10 + sfx2/source/doc/objstor.cxx | 2 solenv/flatpak-manifest.in | 7 sw/source/uibase/app/apphdl.cxx | 2 sw/source/uibase/uno/unotxdoc.cxx | 6 vcl/inc/skia/osx/gdiimpl.hxx | 4 vcl/ios/DataFlavorMapping.cxx | 4 vcl/jsdialog/enabled.cxx | 2 vcl/osx/salgdiutils.cxx | 98 ++++++++--- vcl/osx/salmacos.cxx | 7 vcl/quartz/CoreTextFontFace.cxx | 53 +++-- vcl/skia/gdiimpl.cxx | 14 + vcl/skia/osx/gdiimpl.cxx | 142 +++++++++------- vcl/source/bitmap/BitmapEx.cxx | 11 - xmloff/source/text/XMLTextFrameContext.cxx | 27 ++- 50 files changed, 1053 insertions(+), 141 deletions(-)
New commits: commit 9723c9368a6cb6ed1ea5bd8aa48d8b22db83ea40 Author: Patrick Luby <[email protected]> AuthorDate: Sat Jul 6 08:20:51 2024 -0400 Commit: Andras Timar <[email protected]> CommitDate: Sat Jul 6 21:21:18 2024 +0200 Move break inside conditional statement to match macOS code Commit 839346d3f20af0c6db1377486cbff3f2ff3e2387 for iOS was miscopied from commit e4cbe169bd1236698a573bf4758d8ae8519a1c08 so correct the copy error to bring the iOS code back in sync with the macOS code. Change-Id: I3bb8cc85465adf978e50fab1a802c3f062b7a728 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170067 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Patrick Luby <[email protected]> Reviewed-by: Andras Timar <[email protected]> diff --git a/vcl/ios/DataFlavorMapping.cxx b/vcl/ios/DataFlavorMapping.cxx index ded47097015c..f2d039f2d6a9 100644 --- a/vcl/ios/DataFlavorMapping.cxx +++ b/vcl/ios/DataFlavorMapping.cxx @@ -403,11 +403,11 @@ NSString* DataFlavorMapper::openOfficeToSystemFlavor(const DataFlavor& oOOFlavor sysFlavor = flavorMap[i].SystemFlavor; else sysFlavor = OUStringToNSString(oOOFlavor.MimeType); - } - // Flavor set, then break - if (sysFlavor != nullptr) - break; + // Flavor set, then break + if (sysFlavor != nullptr) + break; + } } if (!sysFlavor) commit ed6ad116dbda6a58814807fb93b2d6f6c1fb85ea Author: Andras Timar <[email protected]> AuthorDate: Sat Jul 6 13:12:02 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Sat Jul 6 13:12:02 2024 +0200 Bump version to 24.04.4.4 Change-Id: Ia3e3e586035a543fb986017d3a36c5c1496624f7 diff --git a/configure.ac b/configure.ac index d87fb0cf9c52..82e18f49f496 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([Collabora Office],[24.04.4.3],[],[],[https://collaboraoffice.com/]) +AC_INIT([Collabora Office],[24.04.4.4],[],[],[https://collaboraoffice.com/]) dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard commit 3c5b2d0f20ec50c08d64b0583ba9d69652e36227 Author: Peter Hagen <[email protected]> AuthorDate: Fri Jul 5 14:10:11 2024 -0400 Commit: Andras Timar <[email protected]> CommitDate: Sat Jul 6 13:05:56 2024 +0200 Related tdf#161461: break out of loop once data flavor is set Change-Id: Ia56514e83e09c6747f582117e77de89f69495862 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170056 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Patrick Luby <[email protected]> Reviewed-by: Andras Timar <[email protected]> diff --git a/vcl/ios/DataFlavorMapping.cxx b/vcl/ios/DataFlavorMapping.cxx index 607f110222bb..ded47097015c 100644 --- a/vcl/ios/DataFlavorMapping.cxx +++ b/vcl/ios/DataFlavorMapping.cxx @@ -404,6 +404,10 @@ NSString* DataFlavorMapper::openOfficeToSystemFlavor(const DataFlavor& oOOFlavor else sysFlavor = OUStringToNSString(oOOFlavor.MimeType); } + + // Flavor set, then break + if (sysFlavor != nullptr) + break; } if (!sysFlavor) commit 4e784ab7d9970e84d471b995002dc6d64ec73733 Author: Andras Timar <[email protected]> AuthorDate: Wed Jul 3 19:25:25 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Fri Jul 5 20:37:14 2024 +0200 jsdialog: enable new style dialog to test: 1. Open sidebar in Writer 2. In Styles section press the rightmost icon [New] Change-Id: I03230c5ef2921da6b1671a2e67e3ba6d1e088e5b diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 8501667c117d..faa2a1bb2cfa 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -244,6 +244,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) || rUIFile == u"svx/ui/headfootformatpage.ui" || rUIFile == u"sfx/ui/linefragment.ui" || rUIFile == u"sfx/ui/managestylepage.ui" + || rUIFile == u"sfx/ui/newstyle.ui" || rUIFile == u"sfx/ui/password.ui" // svx || rUIFile == u"svx/ui/acceptrejectchangesdialog.ui" commit f43c8f6da4e932acc0b1686a39fe337a83151e83 Author: Andras Timar <[email protected]> AuthorDate: Wed Jul 3 18:47:35 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Fri Jul 5 20:36:59 2024 +0200 jsdialog: enable name dialog to test: 1. Help - Accessibility Check 2. If document title is not set, press [Fix] Change-Id: I9694679874c58515856edf8e3d31600258b8319c diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index ab0fbdbd7751..8501667c117d 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -55,6 +55,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) || rUIFile == u"cui/ui/linestyletabpage.ui" || rUIFile == u"cui/ui/linetabpage.ui" || rUIFile == u"cui/ui/macroselectordialog.ui" + || rUIFile == u"cui/ui/namedialog.ui" || rUIFile == u"cui/ui/numberingformatpage.ui" || rUIFile == u"cui/ui/numberingoptionspage.ui" || rUIFile == u"cui/ui/numberingpositionpage.ui" commit e47efda802fda14d3cd3398ef79d0deafd1dfe73 Author: Andras Timar <[email protected]> AuthorDate: Wed Jul 3 11:09:34 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Fri Jul 5 16:05:43 2024 +0200 [cp] Revert "tdf#136604: Remove Source Sans Pro fonts" This reverts commit 5d42f4403d4e51f33ad8f2ce9efbed542978b521. Change-Id: I7699cf6d654ad61825123190ebb670976d9869f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169927 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/Makefile.fetch b/Makefile.fetch index 48262c0374f8..5844bd8819ed 100644 --- a/Makefile.fetch +++ b/Makefile.fetch @@ -183,6 +183,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S $(call fetch_Optional,MORE_FONTS,FONT_LIBERATION_NARROW_TARBALL) \ $(call fetch_Optional,MORE_FONTS,FONT_LIBERATION_TARBALL) \ $(call fetch_Optional,MORE_FONTS,FONT_LINLIBERTINEG_TARBALL) \ + $(call fetch_Optional,MORE_FONTS,FONT_SOURCESANS_TARBALL) \ $(call fetch_Optional,MORE_FONTS,FONT_NOTO_KUFI_ARABIC_TARBALL) \ $(call fetch_Optional,MORE_FONTS,FONT_NOTO_SANS_TARBALL) \ $(call fetch_Optional,MORE_FONTS,FONT_NOTO_SERIF_TARBALL) \ diff --git a/Repository.mk b/Repository.mk index f464f2c899ac..096d386e2fcf 100644 --- a/Repository.mk +++ b/Repository.mk @@ -1071,6 +1071,7 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo_fonts,\ fonts_opendyslexic \ fonts_opensans \ fonts_reem \ + fonts_sourcesans \ fonts_scheherazade \ fonts_agdasima \ fonts_bacasime_antique \ diff --git a/download.lst b/download.lst index 1e34dc1c21ca..ea640e055228 100644 --- a/download.lst +++ b/download.lst @@ -170,6 +170,11 @@ FONT_LINLIBERTINEG_TARBALL := e7a384790b13c29113e22e596ade9687-LinLibertineG-201 # three static lines # so that git cherry-pick # will not run into conflicts +FONT_SOURCESANS_SHA256SUM := e7bc9a1fec787a529e49f5a26b93dcdcf41506449dfc70f92cdef6d17eb6fb61 +FONT_SOURCESANS_TARBALL := edc4d741888bc0d38e32dbaa17149596-source-sans-pro-2.010R-ro-1.065R-it.tar.gz +# three static lines +# so that git cherry-pick +# will not run into conflicts FONT_NOTO_KUFI_ARABIC_SHA256SUM := 1b6880e4b8df09c3b9e246d6084bfd94bf32a0ffff60cf2dcffd3622d0e2d79f FONT_NOTO_KUFI_ARABIC_TARBALL := NotoKufiArabic-v2.109.zip # three static lines diff --git a/external/more_fonts/ExternalPackage_sourcesans.mk b/external/more_fonts/ExternalPackage_sourcesans.mk new file mode 100644 index 000000000000..cd7ac29e92af --- /dev/null +++ b/external/more_fonts/ExternalPackage_sourcesans.mk @@ -0,0 +1,27 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,fonts_sourcesans,font_sourcesans)) + +$(eval $(call gb_ExternalPackage_add_unpacked_files,fonts_sourcesans,$(LIBO_SHARE_FOLDER)/fonts/truetype,\ + SourceSansPro-BlackIt.ttf \ + SourceSansPro-Black.ttf \ + SourceSansPro-BoldIt.ttf \ + SourceSansPro-Bold.ttf \ + SourceSansPro-ExtraLightIt.ttf \ + SourceSansPro-ExtraLight.ttf \ + SourceSansPro-It.ttf \ + SourceSansPro-LightIt.ttf \ + SourceSansPro-Light.ttf \ + SourceSansPro-Regular.ttf \ + SourceSansPro-SemiboldIt.ttf \ + SourceSansPro-Semibold.ttf \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/Module_more_fonts.mk b/external/more_fonts/Module_more_fonts.mk index c20fc83f34ad..6cc170df8c74 100644 --- a/external/more_fonts/Module_more_fonts.mk +++ b/external/more_fonts/Module_more_fonts.mk @@ -22,6 +22,7 @@ $(eval $(call gb_Module_add_targets,more_fonts,\ ExternalPackage_liberation_narrow \ ExternalPackage_libertineg \ ExternalPackage_libre_hebrew \ + ExternalPackage_sourcesans \ ExternalPackage_noto_kufi_arabic \ ExternalPackage_noto_naskh_arabic \ ExternalPackage_noto_sans \ @@ -59,6 +60,7 @@ $(eval $(call gb_Module_add_targets,more_fonts,\ UnpackedTarball_liberation_narrow \ UnpackedTarball_libertineg \ UnpackedTarball_libre_hebrew \ + UnpackedTarball_sourcesans \ UnpackedTarball_noto_kufi_arabic \ UnpackedTarball_noto_naskh_arabic \ UnpackedTarball_noto_sans \ diff --git a/external/more_fonts/UnpackedTarball_sourcesans.mk b/external/more_fonts/UnpackedTarball_sourcesans.mk new file mode 100644 index 000000000000..65ff325535a1 --- /dev/null +++ b/external/more_fonts/UnpackedTarball_sourcesans.mk @@ -0,0 +1,14 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,font_sourcesans)) + +$(eval $(call gb_UnpackedTarball_set_tarball,font_sourcesans,$(FONT_SOURCESANS_TARBALL))) + +# vim: set noet sw=4 ts=4: diff --git a/readlicense_oo/license/license.xml b/readlicense_oo/license/license.xml index 95d234f63124..628cb2724d04 100644 --- a/readlicense_oo/license/license.xml +++ b/readlicense_oo/license/license.xml @@ -2743,6 +2743,15 @@ "Scheherazade" and "SIL". This license is copied below, and is also available with a FAQ at: <a href="http://scripts.sil.org/OFL">http://scripts.sil.org/OFL</a></p> <p><a href="#a__SIL_Open_Font_License__version_1_1">Jump to SIL Open Font License, Version 1.1</a></p> + <h2>Source Sans Pro</h2> + <p>The following software may be included in this product: Source Sans Pro fonts. Use of any of this software + is governed by the terms of the license below:</p> + <p>Copyright 2010, 2012 Adobe Systems Incorporated (<a href="http://www.adobe.com/">http://www.adobe.com/</a>), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in + the United States and/or other countries.</p> + <p>This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, + and is also available with a FAQ at: <a href="http://scripts.sil.org/OFL">http://scripts.sil.org/OFL</a></p> + <p><a href="#a__SIL_Open_Font_License__version_1_1">Jump to SIL Open Font License, Version 1.1</a></p> </div> <div class="DICTIONARIES"> <hr /> diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in index 5e0edefc8a72..e31f55d0bdc3 100644 --- a/solenv/flatpak-manifest.in +++ b/solenv/flatpak-manifest.in @@ -172,6 +172,13 @@ "dest": "external/tarballs", "dest-filename": "@FONT_LINLIBERTINEG_TARBALL@" }, + { + "url": "https://dev-www.libreoffice.org/src/@FONT_SOURCESANS_TARBALL@", + "sha256": "@FONT_SOURCESANS_SHA256SUM@", + "type": "file", + "dest": "external/tarballs", + "dest-filename": "@FONT_SOURCESANS_TARBALL@" + }, { "url": "https://dev-www.libreoffice.org/src/@BOOST_TARBALL@", "sha256": "@BOOST_SHA256SUM@", commit 3e4a7a64178b82feae2da8bf837101bc991262e7 Author: Andras Timar <[email protected]> AuthorDate: Sat Jun 29 23:18:25 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Fri Jul 5 16:05:43 2024 +0200 Bundle fonts of Google's DocRepair Project See https://fonts.google.com/?query=The+DocRepair+Project DocRepair project intended to improve compliance with the ISO/IEC 29500 standard by providing fallback for proprietary fonts that minimizes text reflow in Office Open XML documents. Agency FB -> Agdasima Baskerville Old Face -> Bacasime Antique Berlin Sans FB -> Belanosima Cooper Black -> Caprasimo Lucida Calligraphy -> Lugrasimo Lucida Grande -> Lunasima Lucida Handwriting -> Lumanosimo Change-Id: I82a29bd9eeda88198290134a7906a35b6349a1b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169765 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/Makefile.fetch b/Makefile.fetch index 05463aaec76c..48262c0374f8 100644 --- a/Makefile.fetch +++ b/Makefile.fetch @@ -204,6 +204,13 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S $(call fetch_Optional,MORE_FONTS,FONT_REEM_TARBALL) \ $(call fetch_Optional,MORE_FONTS,FONT_SCHEHERAZADE_TARBALL) \ $(call fetch_Optional,MORE_FONTS,FONT_OPEN_SANS_TARBALL) \ + $(call fetch_Optional,MORE_FONTS,FONT_AGDASIMA_TARBALL) \ + $(call fetch_Optional,MORE_FONTS,FONT_BACASIME_ANTIQUE_TARBALL) \ + $(call fetch_Optional,MORE_FONTS,FONT_BELANOSIMA_TARBALL) \ + $(call fetch_Optional,MORE_FONTS,FONT_CAPRASIMO_TARBALL) \ + $(call fetch_Optional,MORE_FONTS,FONT_LUGRASIMO_TARBALL) \ + $(call fetch_Optional,MORE_FONTS,FONT_LUMANOSIMO_TARBALL) \ + $(call fetch_Optional,MORE_FONTS,FONT_LUNASIMA_TARBALL) \ $(call fetch_Optional,MSPUB,MSPUB_TARBALL) \ $(call fetch_Optional,MWAW,MWAW_TARBALL) \ $(call fetch_Optional,MYTHES,MYTHES_TARBALL) \ diff --git a/Repository.mk b/Repository.mk index ab768d87bc50..f464f2c899ac 100644 --- a/Repository.mk +++ b/Repository.mk @@ -1072,6 +1072,13 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo_fonts,\ fonts_opensans \ fonts_reem \ fonts_scheherazade \ + fonts_agdasima \ + fonts_bacasime_antique \ + fonts_belanosima \ + fonts_caprasimo \ + fonts_lugrasimo \ + fonts_lumanosimo \ + fonts_lunasima \ ) \ $(call gb_Helper_optional,NOTO_FONT,\ fonts_notomore \ diff --git a/download.lst b/download.lst index f8a321d7eb74..1e34dc1c21ca 100644 --- a/download.lst +++ b/download.lst @@ -325,6 +325,41 @@ FONT_OPEN_SANS_SHA256SUM := 85d79a39d26acb207ba13fb1007189d55355a0faf2cf7ccfe6a2 # three static lines # so that git cherry-pick # will not run into conflicts +FONT_AGDASIMA_TARBALL := Agdasima-2.002.zip +FONT_AGDASIMA_SHA256SUM := b4c17499f8bc183320ffdcf1f8491c778dd68a237adc056dc08e1fcb2da488f3 +# three static lines +# so that git cherry-pick +# will not run into conflicts +FONT_BACASIME_ANTIQUE_TARBALL := Bacasime_Antique-2.000.zip +FONT_BACASIME_ANTIQUE_SHA256SUM := 81127cebc97d4ee0b950c2bc2d6be0ed29abfe0d5988435eb9a39e382557250a +# three static lines +# so that git cherry-pick +# will not run into conflicts +FONT_BELANOSIMA_TARBALL := Belanosima-2.000.zip +FONT_BELANOSIMA_SHA256SUM := 9c30e9e7cdb0797b651113a77f6b789659b8d8598a466b2ba92754e9dec30449 +# three static lines +# so that git cherry-pick +# will not run into conflicts +FONT_CAPRASIMO_TARBALL := Caprasimo-1.001.zip +FONT_CAPRASIMO_SHA256SUM := f066d27cfc99b6601083be102d08b4039da8d2834e2795aabd890f16c6fd1b9b +# three static lines +# so that git cherry-pick +# will not run into conflicts +FONT_LUGRASIMO_TARBALL := Lugrasimo-1.001.zip +FONT_LUGRASIMO_SHA256SUM := db24dff31e8ddf6a113556c947a219f9534b072852e9ce2079a08c94854a7503 +# three static lines +# so that git cherry-pick +# will not run into conflicts +FONT_LUMANOSIMO_TARBALL := Lumanosimo-1.010.zip +FONT_LUMANOSIMO_SHA256SUM := d4545ad6afded9a55d9a7728cfc7453cf5637861db87aafe0a730676a0cb960f +# three static lines +# so that git cherry-pick +# will not run into conflicts +FONT_LUNASIMA_TARBALL := Lunasima-2.009.zip +FONT_LUNASIMA_SHA256SUM := 4302809cf4b95b481bec53de87484d919b391c90a518d065f6c775fd435a5393 +# three static lines +# so that git cherry-pick +# will not run into conflicts FREEHAND_SHA256SUM := 0e422d1564a6dbf22a9af598535425271e583514c0f7ba7d9091676420de34ac FREEHAND_TARBALL := libfreehand-0.1.2.tar.xz # three static lines diff --git a/external/more_fonts/ExternalPackage_agdasima.mk b/external/more_fonts/ExternalPackage_agdasima.mk new file mode 100644 index 000000000000..25867d9ec3e5 --- /dev/null +++ b/external/more_fonts/ExternalPackage_agdasima.mk @@ -0,0 +1,17 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,fonts_agdasima,font_agdasima)) + +$(eval $(call gb_ExternalPackage_add_unpacked_files,fonts_agdasima,$(LIBO_SHARE_FOLDER)/fonts/truetype,\ + Agdasima-Regular.ttf \ + Agdasima-Bold.ttf \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/ExternalPackage_bacasime_antique.mk b/external/more_fonts/ExternalPackage_bacasime_antique.mk new file mode 100644 index 000000000000..892260df7a98 --- /dev/null +++ b/external/more_fonts/ExternalPackage_bacasime_antique.mk @@ -0,0 +1,16 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,fonts_bacasime_antique,font_bacasime_antique)) + +$(eval $(call gb_ExternalPackage_add_unpacked_files,fonts_bacasime_antique,$(LIBO_SHARE_FOLDER)/fonts/truetype,\ + BacasimeAntique-Regular.ttf \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/ExternalPackage_belanosima.mk b/external/more_fonts/ExternalPackage_belanosima.mk new file mode 100644 index 000000000000..71c7a080b394 --- /dev/null +++ b/external/more_fonts/ExternalPackage_belanosima.mk @@ -0,0 +1,18 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,fonts_belanosima,font_belanosima)) + +$(eval $(call gb_ExternalPackage_add_unpacked_files,fonts_belanosima,$(LIBO_SHARE_FOLDER)/fonts/truetype,\ + Belanosima-Regular.ttf \ + Belanosima-SemiBold.ttf \ + Belanosima-Bold.ttf \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/ExternalPackage_caprasimo.mk b/external/more_fonts/ExternalPackage_caprasimo.mk new file mode 100644 index 000000000000..9e347449cb34 --- /dev/null +++ b/external/more_fonts/ExternalPackage_caprasimo.mk @@ -0,0 +1,16 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,fonts_caprasimo,font_caprasimo)) + +$(eval $(call gb_ExternalPackage_add_unpacked_files,fonts_caprasimo,$(LIBO_SHARE_FOLDER)/fonts/truetype,\ + Caprasimo-Regular.ttf \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/ExternalPackage_lugrasimo.mk b/external/more_fonts/ExternalPackage_lugrasimo.mk new file mode 100644 index 000000000000..69084ca701ea --- /dev/null +++ b/external/more_fonts/ExternalPackage_lugrasimo.mk @@ -0,0 +1,16 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,fonts_lugrasimo,font_lugrasimo)) + +$(eval $(call gb_ExternalPackage_add_unpacked_files,fonts_lugrasimo,$(LIBO_SHARE_FOLDER)/fonts/truetype,\ + Lugrasimo-Regular.ttf \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/ExternalPackage_lumanosimo.mk b/external/more_fonts/ExternalPackage_lumanosimo.mk new file mode 100644 index 000000000000..b60ecc8a471c --- /dev/null +++ b/external/more_fonts/ExternalPackage_lumanosimo.mk @@ -0,0 +1,16 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,fonts_lumanosimo,font_lumanosimo)) + +$(eval $(call gb_ExternalPackage_add_unpacked_files,fonts_lumanosimo,$(LIBO_SHARE_FOLDER)/fonts/truetype,\ + Lumanosimo-Regular.ttf \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/ExternalPackage_lunasima.mk b/external/more_fonts/ExternalPackage_lunasima.mk new file mode 100644 index 000000000000..475568f8406b --- /dev/null +++ b/external/more_fonts/ExternalPackage_lunasima.mk @@ -0,0 +1,17 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalPackage_ExternalPackage,fonts_lunasima,font_lunasima)) + +$(eval $(call gb_ExternalPackage_add_unpacked_files,fonts_lunasima,$(LIBO_SHARE_FOLDER)/fonts/truetype,\ + Lunasima-Regular.ttf \ + Lunasima-Bold.ttf \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/Module_more_fonts.mk b/external/more_fonts/Module_more_fonts.mk index 4d96d7e8292d..c20fc83f34ad 100644 --- a/external/more_fonts/Module_more_fonts.mk +++ b/external/more_fonts/Module_more_fonts.mk @@ -40,6 +40,13 @@ $(eval $(call gb_Module_add_targets,more_fonts,\ ExternalPackage_scheherazade \ ExternalPackage_opendyslexic \ ExternalPackage_opensans \ + ExternalPackage_agdasima \ + ExternalPackage_bacasime_antique \ + ExternalPackage_belanosima \ + ExternalPackage_caprasimo \ + ExternalPackage_lugrasimo \ + ExternalPackage_lumanosimo \ + ExternalPackage_lunasima \ UnpackedTarball_alef \ UnpackedTarball_amiri \ UnpackedTarball_caladea \ @@ -70,6 +77,13 @@ $(eval $(call gb_Module_add_targets,more_fonts,\ UnpackedTarball_scheherazade \ UnpackedTarball_opendyslexic \ UnpackedTarball_opensans \ + UnpackedTarball_agdasima \ + UnpackedTarball_bacasime_antique \ + UnpackedTarball_belanosima \ + UnpackedTarball_caprasimo \ + UnpackedTarball_lugrasimo \ + UnpackedTarball_lumanosimo \ + UnpackedTarball_lunasima \ )) # vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/UnpackedTarball_agdasima.mk b/external/more_fonts/UnpackedTarball_agdasima.mk new file mode 100644 index 000000000000..5c003c18cbfd --- /dev/null +++ b/external/more_fonts/UnpackedTarball_agdasima.mk @@ -0,0 +1,14 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,font_agdasima)) + +$(eval $(call gb_UnpackedTarball_set_tarball,font_agdasima,$(FONT_AGDASIMA_TARBALL),0)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/UnpackedTarball_bacasime_antique.mk b/external/more_fonts/UnpackedTarball_bacasime_antique.mk new file mode 100644 index 000000000000..7533fb16e9a9 --- /dev/null +++ b/external/more_fonts/UnpackedTarball_bacasime_antique.mk @@ -0,0 +1,14 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,font_bacasime_antique)) + +$(eval $(call gb_UnpackedTarball_set_tarball,font_bacasime_antique,$(FONT_BACASIME_ANTIQUE_TARBALL),0)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/UnpackedTarball_belanosima.mk b/external/more_fonts/UnpackedTarball_belanosima.mk new file mode 100644 index 000000000000..e752c46f31c0 --- /dev/null +++ b/external/more_fonts/UnpackedTarball_belanosima.mk @@ -0,0 +1,14 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,font_belanosima)) + +$(eval $(call gb_UnpackedTarball_set_tarball,font_belanosima,$(FONT_BELANOSIMA_TARBALL),0)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/UnpackedTarball_caprasimo.mk b/external/more_fonts/UnpackedTarball_caprasimo.mk new file mode 100644 index 000000000000..41d6d796ced9 --- /dev/null +++ b/external/more_fonts/UnpackedTarball_caprasimo.mk @@ -0,0 +1,14 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,font_caprasimo)) + +$(eval $(call gb_UnpackedTarball_set_tarball,font_caprasimo,$(FONT_CAPRASIMO_TARBALL),0)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/UnpackedTarball_lugrasimo.mk b/external/more_fonts/UnpackedTarball_lugrasimo.mk new file mode 100644 index 000000000000..f3632a0f6ec7 --- /dev/null +++ b/external/more_fonts/UnpackedTarball_lugrasimo.mk @@ -0,0 +1,14 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,font_lugrasimo)) + +$(eval $(call gb_UnpackedTarball_set_tarball,font_lugrasimo,$(FONT_LUGRASIMO_TARBALL),0)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/UnpackedTarball_lumanosimo.mk b/external/more_fonts/UnpackedTarball_lumanosimo.mk new file mode 100644 index 000000000000..350d7ed6cda7 --- /dev/null +++ b/external/more_fonts/UnpackedTarball_lumanosimo.mk @@ -0,0 +1,14 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,font_lumanosimo)) + +$(eval $(call gb_UnpackedTarball_set_tarball,font_lumanosimo,$(FONT_LUMANOSIMO_TARBALL),0)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/UnpackedTarball_lunasima.mk b/external/more_fonts/UnpackedTarball_lunasima.mk new file mode 100644 index 000000000000..0b75460a740e --- /dev/null +++ b/external/more_fonts/UnpackedTarball_lunasima.mk @@ -0,0 +1,14 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,font_lunasima)) + +$(eval $(call gb_UnpackedTarball_set_tarball,font_lunasima,$(FONT_LUNASIMA_TARBALL),0)) + +# vim: set noet sw=4 ts=4: diff --git a/external/more_fonts/fc_local.snippet b/external/more_fonts/fc_local.snippet index cb49929b0a4a..fdc0a627a042 100644 --- a/external/more_fonts/fc_local.snippet +++ b/external/more_fonts/fc_local.snippet @@ -27,3 +27,52 @@ <family>Caladea</family> </accept> </alias> + + <alias binding="same"> + <family>Agency FB</family> + <accept> + <family>Agdasima</family> + </accept> + </alias> + + <alias binding="same"> + <family>Baskerville Old Face</family> + <accept> + <family>Bacasime Antique</family> + </accept> + </alias> + + <alias binding="same"> + <family>Berlin Sans FB</family> + <accept> + <family>Belanosima</family> + </accept> + </alias> + + <alias binding="same"> + <family>Cooper Black</family> + <accept> + <family>Caprasimo</family> + </accept> + </alias> + + <alias binding="same"> + <family>Lucida Grande</family> + <accept> + <family>Lunasima</family> + </accept> + </alias> + + <alias binding="same"> + <family>Lucida Handwriting</family> + <accept> + <family>Lumanosimo</family> + </accept> + </alias> + + <alias binding="same"> + <family>Lucida Calligraphy</family> + <accept> + <family>Lugrasimo</family> + </accept> + </alias> diff --git a/officecfg/registry/data/org/openoffice/VCL.xcu b/officecfg/registry/data/org/openoffice/VCL.xcu index 2d472da4d2e5..6387f81c3e94 100644 --- a/officecfg/registry/data/org/openoffice/VCL.xcu +++ b/officecfg/registry/data/org/openoffice/VCL.xcu @@ -892,6 +892,25 @@ </node> <node oor:name="FontSubstitutions"> <node oor:name="en" oor:op="replace"> + <node oor:name="agdasima" oor:op="replace"> + <prop oor:name="SubstFonts"> + <value>Agency FB</value> + </prop> + <prop oor:name="SubstFontsMS"> + <value>Agency FB</value> + </prop> + <prop oor:name="FontType"> + <value>Normal,SansSerif</value> + </prop> + </node> + <node oor:name="agencyfb" oor:op="replace"> + <prop oor:name="SubstFonts"> + <value>Agdasima</value> + </prop> + <prop oor:name="FontType"> + <value>Normal,SansSerif</value> + </prop> + </node> <node oor:name="albany" oor:op="replace"> <prop oor:name="SubstFonts"> <value>albanyamt;albany;liberationsans;arial;nimbussansl;helvetica;lucidasans;lucida;geneva;helmet;sansserif;nimbussans;andalesansui;arialunicodems;lucidaunicode</value> @@ -1141,9 +1160,20 @@ <value>Normal,SansSerif</value> </prop> </node> + <node oor:name="bacasimeantique" oor:op="replace"> + <prop oor:name="SubstFonts"> + <value>Baskerville Old Face</value> + </prop> + <prop oor:name="SubstFontsMS"> + <value>Baskerville Old Face</value> + </prop> + <prop oor:name="FontType"> + <value>Normal,Serif</value> + </prop> + </node> <node oor:name="baskervilleoldface" oor:op="replace"> <prop oor:name="SubstFonts"> - <value>thorndaleamt;thorndale;timesnewroman;nimbusromanno9l;times;timesroman;newyork;timmons;serif;lucidaserif;lucidabright;roman;nimbusromanno9;bookman;itcbookman;garamond;garamondmt;palatino</value> + <value>Bacasime Antique;thorndaleamt;thorndale;timesnewroman;nimbusromanno9l;times;timesroman;newyork;timmons;serif;lucidaserif;lucidabright;roman;nimbusromanno9;bookman;itcbookman;garamond;garamondmt;palatino</value> </prop> <prop oor:name="SubstFontsMS"> <value/> @@ -1192,6 +1222,17 @@ <value>CJK,CJK_KR</value> </prop> </node> + <node oor:name="belanosima" oor:op="replace"> + <prop oor:name="SubstFonts"> + <value>Berlin Sans FB</value> + </prop> + <prop oor:name="SubstFontsMS"> + <value>Berlin Sans FB</value> + </prop> + <prop oor:name="FontType"> + <value>Normal,SansSerif</value> + </prop> + </node> <node oor:name="bell" oor:op="replace"> <prop oor:name="SubstFonts"> <value>thorndaleamt;thorndale;timesnewroman;nimbusromanno9l;times;timesroman;newyork;timmons;serif;lucidaserif;lucidabright;roman;nimbusromanno9;bookman;itcbookman;garamond;garamondmt;palatino</value> @@ -1209,6 +1250,14 @@ <value>Normal,Serif</value> </prop> </node> + <node oor:name="berlinsansfb" oor:op="replace"> + <prop oor:name="SubstFonts"> + <value>Belanosima</value> + </prop> + <prop oor:name="FontType"> + <value>Normal,SansSerif</value> + </prop> + </node> <node oor:name="bitstreamverasans" oor:op="replace"> <prop oor:name="SubstFonts"> <value>dejavusans</value> @@ -1413,6 +1462,17 @@ <value>Normal,SansSerif</value> </prop> </node> + <node oor:name="caprasimo" oor:op="replace"> + <prop oor:name="SubstFonts"> + <value>Cooper Black</value> + </prop> + <prop oor:name="SubstFontsMS"> + <value>Cooper Black</value> + </prop> + <prop oor:name="FontType"> + <value>Normal,Serif</value> + </prop> + </node> <node oor:name="consolas" oor:op="replace"> <prop oor:name="FontType"> <value>Normal,SansSerif,Fixed</value> @@ -1423,6 +1483,14 @@ <value>Normal,Serif</value> </prop> </node> + <node oor:name="cooperblack" oor:op="replace"> + <prop oor:name="SubstFonts"> + <value>Caprasimo</value> + </prop> + <prop oor:name="FontType"> + <value>Normal,Serif</value> + </prop> + </node> <node oor:name="corbel" oor:op="replace"> <prop oor:name="FontType"> <value>Normal,SansSerif</value> @@ -3094,7 +3162,7 @@ </node> <node oor:name="lucidacalligraphy" oor:op="replace"> <prop oor:name="SubstFonts"> - <value>zapfchancery;itczapfchancery;monotypecorsiva;corsiva;chancery;chanceryl;lucidacalligraphy;lucidahandwriting;palacescript;palacescriptmt;arioso;shelley;andymt;comicsansms;andy;kidprint;</value> + <value>Lugrasimo;zapfchancery;itczapfchancery;monotypecorsiva;corsiva;chancery;chanceryl;lucidacalligraphy;lucidahandwriting;palacescript;palacescriptmt;arioso;shelley;andymt;comicsansms;andy;kidprint;</value> </prop> <prop oor:name="SubstFontsMS"> <value/> @@ -3145,7 +3213,7 @@ </node> <node oor:name="lucidahandwriting" oor:op="replace"> <prop oor:name="SubstFonts"> - <value>andymt;comicsansms;andy;kidprint;zapfchancery;itczapfchancery;monotypecorsiva;corsiva;chancery;chanceryl;lucidacalligraphy;lucidahandwriting;palacescript;palacescriptmt;arioso;shelley</value> + <value>Lumanosimo;andymt;comicsansms;andy;kidprint;zapfchancery;itczapfchancery;monotypecorsiva;corsiva;chancery;chanceryl;lucidacalligraphy;lucidahandwriting;palacescript;palacescriptmt;arioso;shelley</value> </prop> <prop oor:name="SubstFontsMS"> <value/> @@ -3160,6 +3228,14 @@ <value>Italic,Script,Handwriting</value> </prop> </node> + <node oor:name="lucidagrande" oor:op="replace"> + <prop oor:name="SubstFonts"> + <value>Lunasima</value> + </prop> + <prop oor:name="FontType"> + <value>Normal,SansSerif</value> + </prop> + </node> <node oor:name="lucidasans" oor:op="replace"> <prop oor:name="SubstFonts"> <value>albanyamt;albany;arial;nimbussansl;helvetica;lucidasans;lucida;geneva;helmet;sansserif;nimbussans;andalesansui;arialunicodems;lucidaunicode</value> @@ -3262,6 +3338,39 @@ <value>Normal,Fixed,Typewriter</value> </prop> </node> + <node oor:name="lugrasimo" oor:op="replace"> + <prop oor:name="SubstFonts"> + <value>Lucida Calligraphy</value> + </prop> + <prop oor:name="SubstFontsMS"> + <value>Lucida Calligraphy</value> + </prop> + <prop oor:name="FontType"> + <value>Italic,Script,Chancery</value> + </prop> + </node> + <node oor:name="lunasima" oor:op="replace"> + <prop oor:name="SubstFonts"> + <value>Lucida Grande</value> + </prop> + <prop oor:name="SubstFontsMS"> + <value>Lucida Grande</value> + </prop> + <prop oor:name="FontType"> + <value>Normal,SansSerif</value> + </prop> + </node> + <node oor:name="lumanosimo" oor:op="replace"> + <prop oor:name="SubstFonts"> + <value>Lucida Handwriting</value> + </prop> + <prop oor:name="SubstFontsMS"> + <value>Lucida Handwriting</value> + </prop> + <prop oor:name="FontType"> + <value>Italic,Script,Handwriting</value> + </prop> + </node> <node oor:name="marlett" oor:op="replace"> <prop oor:name="SubstFonts"> <value>starsymbol;opensymbol;starbats;wingdings;zapfdingbats;itczapfdingbats;monotypesorts;dingbats;lucidadingbats;lucidasansdingbats;webdings;symbol;standardsymbols;standardsymbolsl;andalesansui;arialunicodems;lucidaunicode</value> diff --git a/readlicense_oo/license/license.xml b/readlicense_oo/license/license.xml index c1384c06ddcd..95d234f63124 100644 --- a/readlicense_oo/license/license.xml +++ b/readlicense_oo/license/license.xml @@ -2329,6 +2329,13 @@ <div class="MORE_FONTS"> <hr /> <h1><a id="a__Fonts" name="a__Fonts">Fonts</a></h1> + <h2>Agdasima</h2> + <p>The following software may be included in this product: Agdasima fonts. Use of any of this software is governed + by the terms of the license below:</p> + <p>Copyright 2023 The Agdasima Project Authors (https://github.com/docrepair-fonts/agdasima-fonts).</p> + <p>This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, + and is also available with a FAQ at: <a href="http://scripts.sil.org/OFL">http://scripts.sil.org/OFL</a></p> + <p><a href="#a__SIL_Open_Font_License__version_1_1">Jump to SIL Open Font License, Version 1.1</a></p> <h2>Alef</h2> <p>Copyright (c) 2012, HaGilda & Mushon Zer-Aviv (<http://hagilda.com|[email protected]>), with Reserved Font Name Alef Regular.</p> @@ -2340,10 +2347,33 @@ <p>Copyright (c) 2010-2017, Khaled Hosny (<[email protected]>)</p> <p>This Font Software is licensed under the SIL Open Font License, Version 1.1 as shown below.</p> <p><a href="#a__SIL_Open_Font_License__version_1_1">Jump to SIL Open Font License, Version 1.1</a></p> + <h2>Bacasime Antique</h2> + <p>The following software may be included in this product: Bacasime Antique fonts. Use of any of this software is governed + by the terms of the license below:</p> + <p>Copyright 2023 The Bacasime Antique Project Authors (https://github.com/docrepair-fonts/bacasime-antique-fonts), + with Reserved Font Name "Playfair".</p> + <p>This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, + and is also available with a FAQ at: <a href="http://scripts.sil.org/OFL">http://scripts.sil.org/OFL</a></p> + <p><a href="#a__SIL_Open_Font_License__version_1_1">Jump to SIL Open Font License, Version 1.1</a></p> + <h2>Belanosima</h2> + <p>The following software may be included in this product: Belanosima fonts. Use of any of this software is governed + by the terms of the license below:</p> + <p>Copyright 2023 The Belanosima Project Authors (https://github.com/docrepair-fonts/belanosima-fonts), + with Reserved Font Name "Josefin Sans".</p> + <p>This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, + and is also available with a FAQ at: <a href="http://scripts.sil.org/OFL">http://scripts.sil.org/OFL</a></p> + <p><a href="#a__SIL_Open_Font_License__version_1_1">Jump to SIL Open Font License, Version 1.1</a></p> <h2>Caladea</h2> <p>Copyright (c) 2012 Huerta Tipográfica</p> <p>This Font Software is licensed under the Apache License, Version 2.0 as shown below.</p> <p><a href="#a__Apache_License_version_2_0">Jump to Apache License Version 2.0</a></p> + <h2>Caprasimo</h2> + <p>The following software may be included in this product: Caprasimo fonts. Use of any of this software is governed + by the terms of the license below:</p> + <p>Copyright 2023 The Caprasimo Project Authors (https://github.com/docrepair-fonts/caprasimo-fonts).</p> + <p>This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, + and is also available with a FAQ at: <a href="http://scripts.sil.org/OFL">http://scripts.sil.org/OFL</a></p> + <p><a href="#a__SIL_Open_Font_License__version_1_1">Jump to SIL Open Font License, Version 1.1</a></p> <h2>Carlito</h2> <p>Copyright (c) 2010-2013 by tyPoland Lukasz Dziedzic with Reserved Font Name "Carlito".</p> <p>This Font Software is licensed under the SIL Open Font License, Version 1.1 as shown below.</p> @@ -2660,6 +2690,27 @@ <p>This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: <a href="http://scripts.sil.org/OFL">http://scripts.sil.org/OFL</a></p> <p><a href="#a__SIL_Open_Font_License__version_1_1">Jump to SIL Open Font License, Version 1.1</a></p> + <h2>Lugrasimo</h2> + <p>The following software may be included in this product: Lugrasimo fonts. Use of any of this software is governed + by the terms of the license below:</p> + <p>Copyright 2023 The Lugrasimo Project Authors (https://github.com/docrepair-fonts/lugrasimo-fonts).</p> + <p>This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, + and is also available with a FAQ at: <a href="http://scripts.sil.org/OFL">http://scripts.sil.org/OFL</a></p> + <p><a href="#a__SIL_Open_Font_License__version_1_1">Jump to SIL Open Font License, Version 1.1</a></p> + <h2>Lumanosimo</h2> + <p>The following software may be included in this product: Lumanosimo fonts. Use of any of this software is governed + by the terms of the license below:</p> + <p>Copyright 2023 The Lumanosimo Project Authors (https://github.com/docrepair-fonts/lumanosimo-fonts).</p> + <p>This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, + and is also available with a FAQ at: <a href="http://scripts.sil.org/OFL">http://scripts.sil.org/OFL</a></p> + <p><a href="#a__SIL_Open_Font_License__version_1_1">Jump to SIL Open Font License, Version 1.1</a></p> + <h2>Lunasima</h2> + <p>The following software may be included in this product: Lunasima fonts. Use of any of this software is governed + by the terms of the license below:</p> + <p>Copyright 2023 The Lunasima Project Authors (https://github.com/docrepair-fonts/lunasima-fonts).</p> + <p>This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, + and is also available with a FAQ at: <a href="http://scripts.sil.org/OFL">http://scripts.sil.org/OFL</a></p> + <p><a href="#a__SIL_Open_Font_License__version_1_1">Jump to SIL Open Font License, Version 1.1</a></p> <h2>Noto</h2> <p>The following software may be included in this product: Google Noto fonts. Use of any of this software is governed by the terms of the license below:</p> commit 7ebcf2ed3ecdf854925ba35d88e38e9bfc3b6978 Author: Patrick Luby <[email protected]> AuthorDate: Fri Jun 28 18:31:14 2024 -0400 Commit: Andras Timar <[email protected]> CommitDate: Fri Jul 5 16:04:10 2024 +0200 tdf#161833 treat semi-transparent pixels as opaque Limiting the contour wrapping polygon to only opaque pixels causes clipping of any shadows or other semi-transaprent areas in the image. So, instead of testing for fully opaque pixels, treat pixels that are not fully transparent as opaque. Also, tdf#161833 would cause semi-transparent pixels to be treated as fully transparent pixels when calculating the wrap contour for an image. To force the correct contour when loading a document, force the contour to be recalculated by ignoring the saved polygon if the contour is set to "recreate on edit". Change-Id: Ibe256f54e1c82de30c2b7d5b92a69344b4a7ba10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169745 Reviewed-by: Patrick Luby <[email protected]> Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins (cherry picked from commit 3da1d8a791cff6cf2dad29b64c9ad15b1a65d5b3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169956 diff --git a/vcl/source/bitmap/BitmapEx.cxx b/vcl/source/bitmap/BitmapEx.cxx index 571f8d700836..2778a434b390 100644 --- a/vcl/source/bitmap/BitmapEx.cxx +++ b/vcl/source/bitmap/BitmapEx.cxx @@ -1304,11 +1304,12 @@ tools::Polygon BitmapEx::GetContour( bool bContourEdgeDetect, std::unique_ptr<Point[]> pPoints2; tools::Long nX, nY; sal_uInt16 nPolyPos = 0; - // tdf#161498 use COL_ALPHA_OPAQUE for finding opaque pixels - // Starting with commit 81994cb2b8b32453a92bcb011830fcb884f22ff3, - // pixels now contain an alpha value instead of a transparency - // value. - const BitmapColor aTransparencyOpaque = pAcc->GetBestMatchingColor( COL_ALPHA_OPAQUE ); + // tdf#161833 treat semi-transparent pixels as opaque + // Limiting the contour wrapping polygon to only opaque pixels + // causes clipping of any shadows or other semi-transaprent + // areas in the image. So, instead of testing for fully opaque + // pixels, treat pixels that are not fully transparent as opaque. + const BitmapColor aTransparent = pAcc->GetBestMatchingColor( COL_ALPHA_TRANSPARENT ); pPoints1.reset(new Point[ nHeight ]); pPoints2.reset(new Point[ nHeight ]); @@ -1321,7 +1322,7 @@ tools::Polygon BitmapEx::GetContour( bool bContourEdgeDetect, // scan row from left to right while( nX < nEndX1 ) { - if( aTransparencyOpaque == pAcc->GetPixelFromData( pScanline, nX ) ) + if( aTransparent != pAcc->GetPixelFromData( pScanline, nX ) ) { pPoints1[ nPolyPos ] = Point( nX, nY ); nX = nStartX2; @@ -1329,7 +1330,7 @@ tools::Polygon BitmapEx::GetContour( bool bContourEdgeDetect, // this loop always breaks eventually as there is at least one pixel while( true ) { - if( aTransparencyOpaque == pAcc->GetPixelFromData( pScanline, nX ) ) + if( aTransparent != pAcc->GetPixelFromData( pScanline, nX ) ) { pPoints2[ nPolyPos ] = Point( nX, nY ); break; diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index b00b2b84d90e..575c7f95c23a 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -271,17 +271,26 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl( const SdXMLImExViewBox aViewBox( sViewBox, GetImport().GetMM100UnitConverter()); basegfx::B2DPolyPolygon aPolyPolygon; - if( bPath ) + // Related tdf#161833: ignore saved polygon for "recreate on edit" contours + // tdf#161833 would cause semi-transparent pixels to be treated as fully + // transparent pixels when calculating the wrap contour for an image. To + // force the correct contour when loading a document, force the contour + // to be recalculated by ignoring the saved polygon if the contour is set + // to "recreate on edit". + if( !bAuto ) { - basegfx::utils::importFromSvgD(aPolyPolygon, sD, GetImport().needFixPositionAfterZ(), nullptr); - } - else - { - basegfx::B2DPolygon aPolygon; - - if(basegfx::utils::importFromSvgPoints(aPolygon, sPoints)) + if( bPath ) { - aPolyPolygon = basegfx::B2DPolyPolygon(aPolygon); + basegfx::utils::importFromSvgD(aPolyPolygon, sD, GetImport().needFixPositionAfterZ(), nullptr); + } + else + { + basegfx::B2DPolygon aPolygon; + + if(basegfx::utils::importFromSvgPoints(aPolygon, sPoints)) + { + aPolyPolygon = basegfx::B2DPolyPolygon(aPolygon); + } } } commit f18ac9019bf7e147c23d7358b7bb8dfcdd566562 Author: Michael Stahl <[email protected]> AuthorDate: Thu Jul 4 12:10:29 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Fri Jul 5 16:04:10 2024 +0200 sfx2: fix signature infobar being shown for every repaired document (regression from commit 8b333575ee680664fa3d83249ccec90881754ad7) So it should only be set if the state is still UNKNOWN. But SfxObjectShell::ImplGetSignatureState() is called before the repair dialog is shown, so make sure that the second import (with RepairPackage) finds both members as SignatureState::UNKOWN. Change-Id: Ic914016dde6425a4d95fba7f6f66411305553930 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169989 Tested-by: Jenkins Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit 8d869b5fe47842df52965804db87db0941f4f2a0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169997 Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index ef7eed6b90fc..f3705edf41bb 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -957,6 +957,12 @@ void SfxObjectShell::BreakMacroSign_Impl( bool bBreakMacroSign ) void SfxObjectShell::CheckSecurityOnLoading_Impl() { + if (GetErrorCode() == ERRCODE_IO_BROKENPACKAGE) + { // safety first: don't run any macros from broken package. + pImpl->aMacroMode.disallowMacroExecution(); + return; // do not get signature status - needs to be done after RepairPackage + } + // make sure LO evaluates the macro signatures, so it can be preserved GetScriptingSignatureState(); diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 818c6b0bc93a..12485dace3c3 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1892,19 +1892,22 @@ SignatureState SfxObjectShell::ImplGetSignatureState( bool bScriptingContent ) { SignatureState* pState = bScriptingContent ? &pImpl->nScriptingSignatureState : &pImpl->nDocumentSignatureState; - // repaired package cannot be trusted - SfxBoolItem const*const pRepairItem{GetMedium()->GetItemSet().GetItem(SID_REPAIRPACKAGE, false)}; - if (pRepairItem && pRepairItem->GetValue()) - { - *pState = SignatureState::BROKEN; - } - if ( *pState == SignatureState::UNKNOWN ) { *pState = SignatureState::NOSIGNATURES; uno::Sequence< security::DocumentSignatureInformation > aInfos = GetDocumentSignatureInformation( bScriptingContent ); *pState = DocumentSignatures::getSignatureState(aInfos); + + // repaired package cannot be trusted + if (*pState != SignatureState::NOSIGNATURES) + { + SfxBoolItem const*const pRepairItem{GetMedium()->GetItemSet().GetItem(SID_REPAIRPACKAGE, false)}; + if (pRepairItem && pRepairItem->GetValue()) + { + *pState = SignatureState::BROKEN; + } + } } if ( *pState == SignatureState::OK || *pState == SignatureState::NOTVALIDATED diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index ce548a81ea6a..724c9cc31743 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -401,6 +401,8 @@ void SfxObjectShell::PrepareSecondTryLoad_Impl() // only for internal use pImpl->m_xDocStorage.clear(); pImpl->mxObjectContainer.reset(); + pImpl->nDocumentSignatureState = SignatureState::UNKNOWN; + pImpl->nScriptingSignatureState = SignatureState::UNKNOWN; pImpl->m_bIsInit = false; ResetError(); } commit d5d9e71ce5f84be144d0429c45abf637d1a012c5 Author: Michael Stahl <[email protected]> AuthorDate: Tue Jul 2 13:24:38 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Fri Jul 5 16:04:10 2024 +0200 sfx2: SfxObjectShell should not trust any signature on repaired package Change-Id: I0317f80989e9dabd23e88e3caab26ede3fb5bd56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169883 Tested-by: Jenkins Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit 8b333575ee680664fa3d83249ccec90881754ad7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169930 Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 0437204670c6..818c6b0bc93a 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1892,6 +1892,13 @@ SignatureState SfxObjectShell::ImplGetSignatureState( bool bScriptingContent ) { SignatureState* pState = bScriptingContent ? &pImpl->nScriptingSignatureState : &pImpl->nDocumentSignatureState; + // repaired package cannot be trusted + SfxBoolItem const*const pRepairItem{GetMedium()->GetItemSet().GetItem(SID_REPAIRPACKAGE, false)}; + if (pRepairItem && pRepairItem->GetValue()) + { + *pState = SignatureState::BROKEN; + } + if ( *pState == SignatureState::UNKNOWN ) { *pState = SignatureState::NOSIGNATURES; commit 18a7242d28bdd39426f1cba7afb6bd2f66c4f234 Author: Michael Stahl <[email protected]> AuthorDate: Tue Jul 2 11:50:09 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Fri Jul 5 16:04:10 2024 +0200 package: ZipFile: check Info-ZIP Unicode Path Extra Field Change-Id: I829eb449e8a0947341f066399be549f56b0f02da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169882 Tested-by: Jenkins Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit 67dca5a47d1be1b38edee7d0d81fa9adfce5a22e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169929 Reviewed-by: Caolán McNamara <[email protected]> diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx index 2d42ed403136..8bc726af8457 100644 --- a/package/inc/ZipFile.hxx +++ b/package/inc/ZipFile.hxx @@ -86,7 +86,8 @@ class ZipFile void recover(); static void readExtraFields(MemoryByteGrabber& aMemGrabber, sal_Int16 nExtraLen, sal_uInt64& nSize, sal_uInt64& nCompressedSize, - sal_uInt64* nOffset); + sal_uInt64* nOffset, + OUString const* pCENFilenameToCheck); public: diff --git a/package/source/zipapi/MemoryByteGrabber.hxx b/package/source/zipapi/MemoryByteGrabber.hxx index d474be40cda5..dd876d66ebfa 100644 --- a/package/source/zipapi/MemoryByteGrabber.hxx +++ b/package/source/zipapi/MemoryByteGrabber.hxx @@ -49,6 +49,14 @@ public: mnCurrent += nBytesToSkip; } + sal_Int8 ReadUInt8() + { + if (mnCurrent + 1 > mnEnd) + return 0; + sal_uInt8 nInt8 = mpBuffer[mnCurrent++]; + return nInt8; + } + // XSeekable chained... sal_Int16 ReadInt16() { diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index b112c611c3b7..d2d966fa2f16 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -36,6 +36,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/threadpool.hxx> #include <rtl/digest.h> +#include <rtl/crc.h> #include <sal/log.hxx> #include <o3tl/safeint.hxx> #include <o3tl/string_view.hxx> @@ -1122,7 +1123,7 @@ sal_Int32 ZipFile::readCEN() if (aEntry.nExtraLen>0) { - readExtraFields(aMemGrabber, aEntry.nExtraLen, nSize, nCompressedSize, &nOffset); + readExtraFields(aMemGrabber, aEntry.nExtraLen, nSize, nCompressedSize, &nOffset, &aEntry.sPath); } aEntry.nCompressedSize = nCompressedSize; aEntry.nSize = nSize; @@ -1166,7 +1167,8 @@ sal_Int32 ZipFile::readCEN() } void ZipFile::readExtraFields(MemoryByteGrabber& aMemGrabber, sal_Int16 nExtraLen, - sal_uInt64& nSize, sal_uInt64& nCompressedSize, sal_uInt64* nOffset) + sal_uInt64& nSize, sal_uInt64& nCompressedSize, + sal_uInt64* nOffset, OUString const*const pCENFilenameToCheck) { while (nExtraLen > 0) // Extensible data fields { @@ -1191,6 +1193,35 @@ void ZipFile::readExtraFields(MemoryByteGrabber& aMemGrabber, sal_Int16 nExtraLe if (dataSize > nReadSize) aMemGrabber.skipBytes(dataSize - nReadSize); } + // Info-ZIP Unicode Path Extra Field - pointless as we expect UTF-8 in CEN already + else if (nheaderID == 0x7075 && pCENFilenameToCheck) // ignore in recovery mode + { + if (aMemGrabber.remainingSize() < dataSize) + { + SAL_INFO("package", "Invalid Info-ZIP Unicode Path Extra Field: invalid TSize"); + throw ZipException(u"Invalid Info-ZIP Unicode Path Extra Field"_ustr); + } + auto const nVersion = aMemGrabber.ReadUInt8(); + if (nVersion != 1) + { + SAL_INFO("package", "Invalid Info-ZIP Unicode Path Extra Field: unexpected Version"); + throw ZipException(u"Invalid Info-ZIP Unicode Path Extra Field"_ustr); + } + // this CRC32 is actually of the pCENFilenameToCheck + // so it's pointless to check it if we require the UnicodeName + // to be equal to the CEN name anyway (and pCENFilenameToCheck + // is already converted to UTF-16 here) + (void) aMemGrabber.ReadUInt32(); + // this is required to be UTF-8 + OUString const unicodePath(reinterpret_cast<char const *>(aMemGrabber.getCurrentPos()), + dataSize - 5, RTL_TEXTENCODING_UTF8); + aMemGrabber.skipBytes(dataSize - 5); + if (unicodePath != *pCENFilenameToCheck) + { + SAL_INFO("package", "Invalid Info-ZIP Unicode Path Extra Field: unexpected UnicodeName"); + throw ZipException(u"Invalid Info-ZIP Unicode Path Extra Field"_ustr); + } + } else { aMemGrabber.skipBytes(dataSize); @@ -1293,7 +1324,7 @@ void ZipFile::recover() if (aEntry.nExtraLen > 0) { readExtraFields(aMemGrabberExtra, aEntry.nExtraLen, nSize, - nCompressedSize, nullptr); + nCompressedSize, nullptr, nullptr); } } commit 696ad3706dd72e296052e6fe119738ddaa9c3958 Author: Michael Stahl <[email protected]> AuthorDate: Tue Jul 2 11:47:17 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Fri Jul 5 16:04:10 2024 +0200 package: ZipFile: don't accept duplicate CEN entries Change-Id: Ice341a11346b445c555cba276bf2284e4f9b6685 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169881 Tested-by: Jenkins Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit 67cb6af482bc5b0f4d310f0a42a85057f3db0267) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169945 Reviewed-by: Caolán McNamara <[email protected]> diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index 3d382bd3a305..b112c611c3b7 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -1143,7 +1143,15 @@ sal_Int32 ZipFile::readCEN() continue; // This is a directory entry, not a stream - skip it } - aEntries[aEntry.sPath] = aEntry; + if (auto it = aEntries.find(aEntry.sPath); it == aEntries.end()) + { + aEntries[aEntry.sPath] = aEntry; + } + else + { + SAL_INFO("package", "Duplicate CEN entry: \"" << aEntry.sPath << "\""); + throw ZipException(u"Duplicate CEN entry"_ustr); + } } if (nCount != nTotal) commit 13ab09e8454bcb5eff27dd063f6ef1997b988d89 Author: Sarper Akdemir <[email protected]> AuthorDate: Tue Jun 11 12:39:36 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Fri Jul 5 16:03:20 2024 +0200 remove ability to trust not validated macro signatures in high security Giving the user the option to determine if they should trust an invalid signature in HIGH macro security doesn't make sense. CommonName of the signature is the most prominent feature presented and the CommonName of a certificate can be easily forged for an invalid signature, tricking the user into accepting an invalid signature. in the HIGH macro security setting only show the pop-up to enable/disable signed macro if the certificate signature can be validated. cherry-picked without UI/String altering bits for 24-2 Change-Id: Ia766fb701660160ee5dc9f6e077f4012a44ce721 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168667 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <[email protected]> (cherry picked from commit 2beaa3be3829303e948d401f492dbfd239d60aad) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169525 Reviewed-by: Thorsten Behrens <[email protected]> diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx index 688297f26598..0954126e36f3 100644 --- a/include/sfx2/docmacromode.hxx +++ b/include/sfx2/docmacromode.hxx @@ -264,6 +264,7 @@ namespace sfx2 bool hasMacroLibrary() const; bool hasUnsignedContentError() const; + bool hasInvalidSignaturesError() const; /** determines whether the given document storage has sub storages containing scripts or macros. diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx index 4e9311593aed..c87224301590 100644 --- a/sfx2/source/doc/docmacromode.cxx +++ b/sfx2/source/doc/docmacromode.cxx @@ -72,10 +72,13 @@ namespace sfx2 { IMacroDocumentAccess& m_rDocumentAccess; bool m_bHasUnsignedContentError; + /// Is true when macros was disabled due to invalid signatures (when macro security is high) + bool m_bHasInvalidSignaturesError; explicit DocumentMacroMode_Data( IMacroDocumentAccess& rDocumentAccess ) :m_rDocumentAccess( rDocumentAccess ) ,m_bHasUnsignedContentError( false ) + ,m_bHasInvalidSignaturesError( false ) { } }; @@ -212,13 +215,26 @@ namespace sfx2 // confirmation when macros are unsigned or untrusted. FROM_LIST_AND_SIGNED_NO_WARN // should not ask any confirmations. FROM_LIST_AND_SIGNED_WARN should only allow // trusted signed macros at this point; so it may only ask for confirmation to add - // certificates to trusted, and shouldn't show UI when trusted list is read-only. + // certificates to trusted, and shouldn't show UI when trusted list is read-only + // or the macro signature can't be validated. const bool bAllowUI = nMacroExecutionMode != MacroExecMode::FROM_LIST_AND_SIGNED_NO_WARN && eAutoConfirm == eNoAutoConfirm && (nMacroExecutionMode == MacroExecMode::ALWAYS_EXECUTE || !SvtSecurityOptions::IsReadOnly( - SvtSecurityOptions::EOption::MacroTrustedAuthors)); + SvtSecurityOptions::EOption::MacroTrustedAuthors)) + && (nMacroExecutionMode != MacroExecMode::FROM_LIST_AND_SIGNED_WARN + || nSignatureState == SignatureState::OK); + + if (nMacroExecutionMode == MacroExecMode::FROM_LIST_AND_SIGNED_WARN + && nSignatureState != SignatureState::NOSIGNATURES + && nSignatureState != SignatureState::OK) + { + // set the flag so that we can show the appropriate error & buttons + // for invalid signatures in the infobar for high macro security. + m_xData->m_bHasInvalidSignaturesError = true; + } + const bool bHasTrustedMacroSignature = m_xData->m_rDocumentAccess.hasTrustedScriptingSignature(bAllowUI ? rxInteraction : nullptr); if (bHasTrustedMacroSignature) @@ -407,6 +423,10 @@ namespace sfx2 return m_xData->m_bHasUnsignedContentError; } + bool DocumentMacroMode::hasInvalidSignaturesError() const + { + return m_xData->m_bHasInvalidSignaturesError; + } bool DocumentMacroMode::storageHasMacros( const Reference< XStorage >& rxStorage ) { commit 779d423e8f19ebcb3ffa12f5b68059fe9e1e03a9 Author: Michael Stahl <[email protected]> AuthorDate: Wed Jun 19 18:24:25 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Fri Jul 5 16:03:20 2024 +0200 libcmis: fix UAF on invalid certificate headers_slist may be used again on the 2nd call to curl_easy_perform() in the CURLE_SSL_CACERT case. Change-Id: I146d7f5dd72e2abd580a68c8ea4c9e56b7adeca3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169267 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins (cherry picked from commit 31ac510f0d8e8cb79d564c147ccf7265894cdcda) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169281 Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/external/libcmis/UnpackedTarball_libcmis.mk b/external/libcmis/UnpackedTarball_libcmis.mk index 5e31b8939fcb..744fcdaa84d3 100644 --- a/external/libcmis/UnpackedTarball_libcmis.mk +++ b/external/libcmis/UnpackedTarball_libcmis.mk @@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libcmis,$(LIBCMIS_TARBALL))) $(eval $(call gb_UnpackedTarball_set_patchlevel,libcmis,1)) $(eval $(call gb_UnpackedTarball_add_patches,libcmis,\ + external/libcmis/http-session-cleanup.patch.1 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/libcmis/http-session-cleanup.patch.1 b/external/libcmis/http-session-cleanup.patch.1 new file mode 100644 index 000000000000..0c7b352d4407 --- /dev/null +++ b/external/libcmis/http-session-cleanup.patch.1 @@ -0,0 +1,82 @@ +--- libcmis/src/libcmis/http-session.cxx.orig 2024-06-19 18:04:14.198691623 +0200 ++++ libcmis/src/libcmis/http-session.cxx 2024-06-19 18:09:08.853234764 +0200 +@@ -670,16 +670,17 @@ + curl_easy_setopt( m_curlHandle, CURLOPT_URL, url.c_str() ); + + // Set the headers +- struct curl_slist *headers_slist = NULL; ++ struct deleter { void operator()(curl_slist* p) const { curl_slist_free_all(p); } }; ++ unique_ptr<struct curl_slist, deleter> headers_slist; + for ( vector< string >::iterator it = headers.begin( ); it != headers.end( ); ++it ) +- headers_slist = curl_slist_append( headers_slist, it->c_str( ) ); ++ headers_slist.reset(curl_slist_append(headers_slist.release(), it->c_str())); + + // If we are using OAuth2, then add the proper header with token to authenticate + // Otherwise, just set the credentials normally using in libcurl options + if ( m_oauth2Handler != NULL && !m_oauth2Handler->getHttpHeader( ).empty() ) + { +- headers_slist = curl_slist_append( headers_slist, +- m_oauth2Handler->getHttpHeader( ).c_str( ) ); ++ headers_slist.reset(curl_slist_append(headers_slist.release(), ++ m_oauth2Handler->getHttpHeader().c_str())); + } + else if ( !getUsername().empty() ) + { +@@ -693,7 +693,7 @@ + #endif + } + +- curl_easy_setopt( m_curlHandle, CURLOPT_HTTPHEADER, headers_slist ); ++ curl_easy_setopt(m_curlHandle, CURLOPT_HTTPHEADER, headers_slist.get()); + + // Set the proxy configuration if any + if ( !libcmis::SessionFactory::getProxy( ).empty() ) +@@ -747,9 +747,6 @@ + // Perform the query + CURLcode errCode = curl_easy_perform( m_curlHandle ); + +- // Free the headers list +- curl_slist_free_all( headers_slist ); +- + // Process the response + bool isHttpError = errCode == CURLE_HTTP_RETURNED_ERROR; + if ( CURLE_OK != errCode && !( m_noHttpErrors && isHttpError ) ) +--- libcmis/src/libcmis/sharepoint-session.cxx.orig 2024-06-19 18:04:35.761804551 +0200 ++++ libcmis/src/libcmis/sharepoint-session.cxx 2024-06-19 18:08:44.563107553 +0200 +@@ -200,12 +200,13 @@ + curl_easy_setopt( m_curlHandle, CURLOPT_URL, url.c_str() ); + + // Set the headers +- struct curl_slist *headers_slist = NULL; ++ struct deleter { void operator()(curl_slist* p) const { curl_slist_free_all(p); } }; ++ unique_ptr<struct curl_slist, deleter> headers_slist; + for ( vector< string >::iterator it = headers.begin( ); it != headers.end( ); ++it ) +- headers_slist = curl_slist_append( headers_slist, it->c_str( ) ); ++ headers_slist.reset(curl_slist_append(headers_slist.release(), it->c_str())); + +- headers_slist = curl_slist_append( headers_slist, "accept:application/json; odata=verbose" ); +- headers_slist = curl_slist_append( headers_slist, ( "x-requestdigest:" + m_digestCode ).c_str( ) ); ++ headers_slist.reset(curl_slist_append(headers_slist.release(), "accept:application/json; odata=verbose")); ++ headers_slist.reset(curl_slist_append(headers_slist.release(), ("x-requestdigest:" + m_digestCode).c_str())); + + if ( !getUsername().empty() && !getPassword().empty() ) + { +@@ -220,7 +219,7 @@ + #endif + } + +- curl_easy_setopt( m_curlHandle, CURLOPT_HTTPHEADER, headers_slist ); ++ curl_easy_setopt(m_curlHandle, CURLOPT_HTTPHEADER, headers_slist.get()); + + // Set the proxy configuration if any + if ( !libcmis::SessionFactory::getProxy( ).empty() ) +@@ -274,9 +273,6 @@ + // Perform the query + CURLcode errCode = curl_easy_perform( m_curlHandle ); + +- // Free the headers list +- curl_slist_free_all( headers_slist ); +- + // Process the response + bool isHttpError = errCode == CURLE_HTTP_RETURNED_ERROR; + if ( CURLE_OK != errCode && !( m_noHttpErrors && isHttpError ) ) commit b1e2b054309e94d4613459f01a60b4cc2c6ddbf9 Author: Xisco Fauli <[email protected]> AuthorDate: Wed Jun 12 14:31:26 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Fri Jul 5 16:03:20 2024 +0200 libxml2: upgrade to 2.12.8 Downloaded from https://download.gnome.org/sources/libxml2/2.12/libxml2-2.12.8.tar.xz Change-Id: Ie6c0d102b44eaec14fabaf932ba140a113ff5073 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168718 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> (cherry picked from commit a96d0ef1bd9727c0723e903b8337f43a7618f089) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168721 Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/download.lst b/download.lst index 837fbe8253c8..f8a321d7eb74 100644 --- a/download.lst +++ b/download.lst @@ -487,8 +487,8 @@ XMLSEC_TARBALL := xmlsec1-1.3.2.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts -LIBXML_SHA256SUM := 24ae78ff1363a973e6d8beba941a7945da2ac056e19b53956aeb6927fd6cfb56 -LIBXML_VERSION_MICRO := 7 +LIBXML_SHA256SUM := 43ad877b018bc63deb2468d71f95219c2fac196876ef36d1bee51d226173ec93 +LIBXML_VERSION_MICRO := 8 LIBXML_TARBALL := libxml2-2.12.$(LIBXML_VERSION_MICRO).tar.xz # three static lines # so that git cherry-pick commit 069653955365ce038f1d6fdb26d7a58f7a531c66 Author: Xisco Fauli <[email protected]> AuthorDate: Wed Jun 5 11:40:19 2024 +0200 Commit: Andras Timar <[email protected]> CommitDate: Fri Jul 5 16:03:20 2024 +0200 openssl: upgrade to 3.0.14 Downloaded from https://www.openssl.org/source/openssl-3.0.14.tar.gz Change-Id: Ib75738f257210532d0f01f429ec3b78a1a2410a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168456 Reviewed-by: Taichi Haradaguchi <[email protected]> Tested-by: Jenkins (cherry picked from commit b3a70a28b0becc9c872f2a92c35dfdaac4822600) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168434 Tested-by: Christian Lohmaier <[email protected]> Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/download.lst b/download.lst index ec860191bb37..837fbe8253c8 100644 --- a/download.lst +++ b/download.lst @@ -571,8 +571,8 @@ OPENLDAP_TARBALL := openldap-2.6.7.tgz # three static lines # so that git cherry-pick # will not run into conflicts -OPENSSL_SHA256SUM := 88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313 -OPENSSL_TARBALL := openssl-3.0.13.tar.gz +OPENSSL_SHA256SUM := eeca035d4dd4e84fc25846d952da6297484afa0650a6f84c682e39df3a4123ca +OPENSSL_TARBALL := openssl-3.0.14.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts commit a1e37a2786687fb60e9aff07ffbd577590b6d661 Author: Caolán McNamara <[email protected]> AuthorDate: Fri Jul 5 13:05:25 2024 +0100 Commit: Andras Timar <[email protected]> CommitDate: Fri Jul 5 15:50:24 2024 +0200 return early if there is no m_pDocShell Change-Id: Id53115f9cb098b9b8ff1a529f5237054cdfd391e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170014 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Mike Kaganski <[email protected]> diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 3d8164647c06..3ac436056d22 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3206,6 +3206,12 @@ void SwXTextDocument::setClipboard(const uno::Reference<datatransfer::clipboard: { SolarMutexGuard aGuard; + if (!IsValid()) + { + SAL_WARN("sw.uno", "no DocShell when attempting to setClipboard"); + return; + } + SwView* pView = m_pDocShell->GetView(); if (pView) pView->GetEditWin().SetClipboard(xClipboard); commit 9d728a3b1341a860e99aea7710228d6153952f4b Author: Patrick Luby <[email protected]> AuthorDate: Thu Jun 27 20:05:19 2024 -0400 Commit: Andras Timar <[email protected]> CommitDate: Tue Jul 2 14:54:38 2024 +0200 tdf#159680 fix memory leak of CTFontRef The CTFontRef in CoreTextFontFace::GetVariations() was never released and a new CTFontRef was allocated in every call to CoreTextFontFace::GetVariations(). So release the CTFontRef and only allocate it once when mxVariations is populated. Change-Id: I08999956501d5860fff67e48001ef85a62ca8079 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169690 Tested-by: Jenkins Reviewed-by: Patrick Luby <[email protected]> (cherry picked from commit 2e87c644245751aea9f50faf16c4ca4d57b0c2f1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169676 Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/vcl/quartz/CoreTextFontFace.cxx b/vcl/quartz/CoreTextFontFace.cxx index 662b439a9eae..47792fff7a58 100644 --- a/vcl/quartz/CoreTextFontFace.cxx +++ b/vcl/quartz/CoreTextFontFace.cxx @@ -46,43 +46,46 @@ sal_IntPtr CoreTextFontFace::GetFontId() const const std::vector<hb_variation_t>& CoreTextFontFace::GetVariations(const LogicalFontInstance&) const { - CTFontRef pFont = CTFontCreateWithFontDescriptor(mxFontDescriptor, 0.0, nullptr); - if (!mxVariations) { mxVariations.emplace(); - CFArrayRef pAxes = CTFontCopyVariationAxes(pFont); - if (pAxes) + CTFontRef pFont = CTFontCreateWithFontDescriptor(mxFontDescriptor, 0.0, nullptr); + if (pFont) { - CFDictionaryRef pVariations = CTFontCopyVariation(pFont); - if (pVariations) + CFArrayRef pAxes = CTFontCopyVariationAxes(pFont); + if (pAxes) { - CFIndex nAxes = CFArrayGetCount(pAxes); - for (CFIndex i = 0; i < nAxes; ++i) + CFDictionaryRef pVariations = CTFontCopyVariation(pFont); + if (pVariations) { - auto pAxis = static_cast<CFDictionaryRef>(CFArrayGetValueAtIndex(pAxes, i)); - if (pAxis) + CFIndex nAxes = CFArrayGetCount(pAxes); + for (CFIndex i = 0; i < nAxes; ++i) { - hb_tag_t nTag; - auto pTag = static_cast<CFNumberRef>( - CFDictionaryGetValue(pAxis, kCTFontVariationAxisIdentifierKey)); - if (!pTag) - continue; - CFNumberGetValue(pTag, kCFNumberIntType, &nTag); + auto pAxis = static_cast<CFDictionaryRef>(CFArrayGetValueAtIndex(pAxes, i)); + if (pAxis) + { + hb_tag_t nTag; + auto pTag = static_cast<CFNumberRef>( + CFDictionaryGetValue(pAxis, kCTFontVariationAxisIdentifierKey)); + if (!pTag) + continue; + CFNumberGetValue(pTag, kCFNumberIntType, &nTag); - float fValue; - auto pValue - = static_cast<CFNumberRef>(CFDictionaryGetValue(pVariations, pTag)); - if (!pValue) - continue; - CFNumberGetValue(pValue, kCFNumberFloatType, &fValue); + float fValue; + auto pValue + = static_cast<CFNumberRef>(CFDictionaryGetValue(pVariations, pTag)); + if (!pValue) + continue; + CFNumberGetValue(pValue, kCFNumberFloatType, &fValue); - mxVariations->push_back({ nTag, fValue }); + mxVariations->push_back({ nTag, fValue }); + } } + CFRelease(pVariations); } - CFRelease(pVariations); + CFRelease(pAxes); } - CFRelease(pAxes); + CFRelease(pFont); } } commit cfb5019a0eed1b8c6920c57c75f53cfc31791ea9 Author: Patrick Luby <[email protected]> AuthorDate: Thu Jun 27 11:15:52 2024 -0400 Commit: Andras Timar <[email protected]> CommitDate: Tue Jul 2 14:54:33 2024 +0200 tdf#161498 use COL_ALPHA_OPAQUE for finding opaque pixels Starting with commit 81994cb2b8b32453a92bcb011830fcb884f22ff3, pixels now contain an alpha value instead of a transparency value. Change-Id: I07dd39859057bbbbd153a21ee38625049039b106 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169654 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> Reviewed-by: Patrick Luby <[email protected]> (cherry picked from commit 1ac602f6ccd75f3b79d6c7a9d40e64677dd5741a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169667 Reviewed-by: Adolfo Jayme Barrientos <[email protected]> diff --git a/vcl/source/bitmap/BitmapEx.cxx b/vcl/source/bitmap/BitmapEx.cxx index 07e25f177180..571f8d700836 100644 --- a/vcl/source/bitmap/BitmapEx.cxx +++ b/vcl/source/bitmap/BitmapEx.cxx @@ -1304,7 +1304,11 @@ tools::Polygon BitmapEx::GetContour( bool bContourEdgeDetect, std::unique_ptr<Point[]> pPoints2; tools::Long nX, nY; sal_uInt16 nPolyPos = 0; - const BitmapColor aBlack = pAcc->GetBestMatchingColor( COL_BLACK ); + // tdf#161498 use COL_ALPHA_OPAQUE for finding opaque pixels + // Starting with commit 81994cb2b8b32453a92bcb011830fcb884f22ff3, + // pixels now contain an alpha value instead of a transparency + // value. + const BitmapColor aTransparencyOpaque = pAcc->GetBestMatchingColor( COL_ALPHA_OPAQUE ); pPoints1.reset(new Point[ nHeight ]); pPoints2.reset(new Point[ nHeight ]); @@ -1317,7 +1321,7 @@ tools::Polygon BitmapEx::GetContour( bool bContourEdgeDetect, // scan row from left to right while( nX < nEndX1 ) { - if( aBlack == pAcc->GetPixelFromData( pScanline, nX ) ) + if( aTransparencyOpaque == pAcc->GetPixelFromData( pScanline, nX ) ) { pPoints1[ nPolyPos ] = Point( nX, nY ); nX = nStartX2; @@ -1325,7 +1329,7 @@ tools::Polygon BitmapEx::GetContour( bool bContourEdgeDetect, // this loop always breaks eventually as there is at least one pixel while( true ) { - if( aBlack == pAcc->GetPixelFromData( pScanline, nX ) ) + if( aTransparencyOpaque == pAcc->GetPixelFromData( pScanline, nX ) ) { pPoints2[ nPolyPos ] = Point( nX, nY ); break; commit e2d43085b83fa727626f1ef7d75a469f62a07cda Author: Patrick Luby <[email protected]> AuthorDate: Wed Jun 19 16:03:06 2024 -0400 Commit: Andras Timar <[email protected]> CommitDate: Tue Jul 2 14:54:28 2024 +0200 tdf#159175 Do not allocate a CGLayer for each NSWindow when using Skia Skia surfaces can be copied directly to an NSWindow's CGContextRef so disable allocation of a CGLayer for each NSWindow to significantly reduce memory usage when Skia is enabled. Change-Id: I8e3001e4f2ae8dd36156c06db68447c6b1bc67df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169242 Tested-by: Jenkins Reviewed-by: Patrick Luby <[email protected]> (cherry picked from commit 12dbf0e6b6b485a1d73c7e33bd0ecfb13e6efdac) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169559 Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/vcl/inc/skia/osx/gdiimpl.hxx b/vcl/inc/skia/osx/gdiimpl.hxx index b97245e86e11..b60280a09e6b 100644 --- a/vcl/inc/skia/osx/gdiimpl.hxx +++ b/vcl/inc/skia/osx/gdiimpl.hxx @@ -44,11 +44,13 @@ public: virtual void Flush(const tools::Rectangle&) override; virtual void WindowBackingPropertiesChanged() override; + CGImageRef createCGImageFromRasterSurface(const NSRect& rDirtyRect, CGPoint& rImageOrigin, + bool& rImageFlipped); + private: virtual int getWindowScaling() const override; virtual void createWindowSurfaceInternal(bool forceRaster = false) override; virtual void flushSurfaceToWindowContext() override; - void flushSurfaceToScreenCG(); static inline sk_sp<SkFontMgr> fontManager; }; diff --git a/vcl/osx/salgdiutils.cxx b/vcl/osx/salgdiutils.cxx index a9445293211c..d7f8ec48eaf0 100644 --- a/vcl/osx/salgdiutils.cxx +++ b/vcl/osx/salgdiutils.cxx @@ -29,6 +29,7 @@ #include <basegfx/range/b2irange.hxx> #include <basegfx/vector/b2ivector.hxx> #include <vcl/svapp.hxx> +#include <vcl/skia/SkiaHelper.hxx> #include <quartz/salgdi.h> #include <quartz/utils.h> @@ -37,7 +38,7 @@ #if HAVE_FEATURE_SKIA #include <tools/sk_app/mac/WindowContextFactory_mac.h> -#include <vcl/skia/SkiaHelper.hxx> +#include <skia/osx/gdiimpl.hxx> #endif static bool bTotalScreenBounds = false; @@ -233,6 +234,10 @@ bool AquaSharedAttributes::checkContext() maLayer.set(nullptr); } + // tdf#159175 no CGLayer is needed for an NSWindow when using Skia + if (SkiaHelper::isVCLSkiaEnabled() && mpFrame->getNSWindow()) + return true; + if (!maContextHolder.isSet()) { const int nBitmapDepth = 32; @@ -297,7 +302,7 @@ bool AquaSharedAttributes::checkContext() * associated window, if any; cf. drawRect event handling * on the frame. */ -void AquaSalGraphics::UpdateWindow( NSRect& ) +void AquaSalGraphics::UpdateWindow( NSRect& rRect ) { if (!maShared.mpFrame) { @@ -305,26 +310,65 @@ void AquaSalGraphics::UpdateWindow( NSRect& ) } NSGraphicsContext* pContext = [NSGraphicsContext currentContext]; - if (maShared.maLayer.isSet() && pContext != nullptr) + if (!pContext) + { + SAL_WARN_IF(!maShared.mpFrame->mbInitShow, "vcl", "UpdateWindow called with no NSGraphicsContext"); + return; + } + + CGImageRef img = nullptr; + CGPoint aImageOrigin = CGPointMake(0, 0); + bool bImageFlipped = false; +#if HAVE_FEATURE_SKIA + if (SkiaHelper::isVCLSkiaEnabled()) + { + // tdf#159175 no CGLayer is needed for an NSWindow when using Skia + // Get a CGImageRef directly from the Skia/Raster surface and draw + // that directly to the NSWindow. + // Note: Skia/Metal will always return a null CGImageRef since it + // draws directly to the NSWindow using the surface's CAMetalLayer. + AquaSkiaSalGraphicsImpl *pBackend = static_cast<AquaSkiaSalGraphicsImpl*>(mpBackend.get()); + if (pBackend) + img = pBackend->createCGImageFromRasterSurface(rRect, aImageOrigin, bImageFlipped); + } + else +#else + (void)rRect; +#endif + if (maShared.maLayer.isSet()) { + maShared.applyXorContext(); + + const CGRect aRectPoints = { CGPointZero, maShared.maLayer.getSizePixels() }; + CGContextSetBlendMode(maShared.maCSContextHolder.get(), kCGBlendModeCopy); + CGContextDrawLayerInRect(maShared.maCSContextHolder.get(), aRectPoints, maShared.maLayer.get()); + + img = CGBitmapContextCreateImage(maShared.maCSContextHolder.get()); + } + + if (img) + { + const float fScale = sal::aqua::getWindowScaling(); CGContextHolder rCGContextHolder([pContext CGContext]); rCGContextHolder.saveState(); - // Related: tdf#155092 translate Y coordinate for height differences - // When in live resize, the NSView's height may have changed before - // the CGLayer has been resized. This causes the CGLayer's content - // to be drawn just above or below the top left corner of the view - // so translate the Y coordinate by any difference between the - // NSView's height and the CGLayer's height. - NSView *pView = maShared.mpFrame->mpNSView; - if (pView) + CGRect aRect = CGRectMake(aImageOrigin.x / fScale, aImageOrigin.y / fScale, CGImageGetWidth(img) / fScale, CGImageGetHeight(img) / fScale); + if (bImageFlipped) { + // Related: tdf#155092 translate Y coordinate of flipped images + // When in live resize, the NSView's height may have changed before + // the surface has been resized. This causes flipped content + // to be drawn just above or below the top left corner of the view + // so translate the Y coordinate using the NSView's height. // Use the NSView's bounds, not its frame, to properly handle // any rotation and/or scaling that might have been already - // applied to the view - CGFloat fTranslateY = [pView bounds].size.height - maShared.maLayer.getSizePoints().height; - CGContextTranslateCTM(rCGContextHolder.get(), 0, fTranslateY); + // applied to the view. + NSView *pView = maShared.mpFrame->mpNSView; + if (pView) + aRect.origin.y = [pView bounds].size.height - aRect.origin.y - aRect.size.height; + else if (maShared.maLayer.isSet()) + aRect.origin.y = maShared.maLayer.getSizePoints().height - aRect.origin.y - aRect.size.height; } CGMutablePathRef rClip = maShared.mpFrame->getClipPath(); @@ -335,23 +379,23 @@ void AquaSalGraphics::UpdateWindow( NSRect& ) CGContextClip(rCGContextHolder.get()); } - maShared.applyXorContext(); - - const CGSize aSize = maShared.maLayer.getSizePoints(); - const CGRect aRect = CGRectMake(0, 0, aSize.width, aSize.height); - const CGRect aRectPoints = { CGPointZero, maShared.maLayer.getSizePixels() }; - CGContextSetBlendMode(maShared.maCSContextHolder.get(), kCGBlendModeCopy); - CGContextDrawLayerInRect(maShared.maCSContextHolder.get(), aRectPoints, maShared.maLayer.get()); - - CGImageRef img = CGBitmapContextCreateImage(maShared.maCSContextHolder.get()); - CGImageRef displayColorSpaceImage = CGImageCreateCopyWithColorSpace(img, [[maShared.mpFrame->getNSWindow() colorSpace] CGColorSpace]); CGContextSetBlendMode(rCGContextHolder.get(), kCGBlendModeCopy); - CGContextDrawImage(rCGContextHolder.get(), aRect, displayColorSpaceImage); - CGImageRelease(img); - CGImageRelease(displayColorSpaceImage); + NSWindow *pWindow = maShared.mpFrame->getNSWindow(); + if (pWindow) + { + CGImageRef displayColorSpaceImage = CGImageCreateCopyWithColorSpace(img, [[maShared.mpFrame->getNSWindow() colorSpace] CGColorSpace]); + CGContextDrawImage(rCGContextHolder.get(), aRect, displayColorSpaceImage); + CGImageRelease(displayColorSpaceImage); + } + else + { + CGContextDrawImage(rCGContextHolder.get(), aRect, img); + } rCGContextHolder.restoreState(); + + CGImageRelease(img); } else { diff --git a/vcl/osx/salmacos.cxx b/vcl/osx/salmacos.cxx index 700b252cf4f3..14e2a80695d9 100644 --- a/vcl/osx/salmacos.cxx +++ b/vcl/osx/salmacos.cxx @@ -26,6 +26,7 @@ #include <osl/diagnose.h> #include <vcl/bitmap.hxx> +#include <vcl/skia/SkiaHelper.hxx> #include <quartz/salbmp.h> #include <quartz/salgdi.h> @@ -506,6 +507,12 @@ bool AquaSalVirtualDevice::SetSize(tools::Long nDX, tools::Long nDY) nFlags = uint32_t(kCGImageAlphaNoneSkipFirst) | uint32_t(kCGBitmapByteOrder32Host); } + if (SkiaHelper::isVCLSkiaEnabled()) + { + mpGraphics->SetVirDevGraphics(this, maLayer, nullptr, mnBitmapDepth); + return true; + } + // Allocate buffer for virtual device graphics as bitmap context to store graphics with highest required (scaled) resolution size_t nScaledWidth = mnWidth * fScale; diff --git a/vcl/skia/osx/gdiimpl.cxx b/vcl/skia/osx/gdiimpl.cxx index 9b511ad4469b..ffe1ebc42d65 100644 --- a/vcl/skia/osx/gdiimpl.cxx +++ b/vcl/skia/osx/gdiimpl.cxx @@ -37,6 +37,24 @@ using namespace SkiaHelper; +namespace +{ +struct SnapshotImageData +{ + sk_sp<SkImage> image; + SkPixmap pixmap; +}; +} + +static void SnapshotImageDataCallback(void* pInfo, const void* pData, size_t nSize) +{ + (void)pData; + (void)nSize; + + if (pInfo) + delete static_cast<SnapshotImageData*>(pInfo); +} + AquaSkiaSalGraphicsImpl::AquaSkiaSalGraphicsImpl(AquaSalGraphics& rParent, AquaSharedAttributes& rShared) : SkiaSalGraphicsImpl(rParent, rShared.mpFrame) @@ -101,117 +119,129 @@ void AquaSkiaSalGraphicsImpl::WindowBackingPropertiesChanged() { windowBackingPr void AquaSkiaSalGraphicsImpl::flushSurfaceToWindowContext() { if (!isGPU()) - flushSurfaceToScreenCG(); + { + // tdf159175 mark dirty area in NSWindow for redrawing + // This will cause -[SalFrameView drawRect:] to be called. That, + // in turn, will draw a CGImageRef of the surface fetched from + // AquaSkiaSalGraphicsImpl::createCGImageFromRasterSurface(). + mrShared.refreshRect(mDirtyRect.x(), mDirtyRect.y(), mDirtyRect.width(), + mDirtyRect.height()); + } else + { SkiaSalGraphicsImpl::flushSurfaceToWindowContext(); + } } // For Raster we use our own screen blitting (see above). -void AquaSkiaSalGraphicsImpl::flushSurfaceToScreenCG() +CGImageRef AquaSkiaSalGraphicsImpl::createCGImageFromRasterSurface(const NSRect& rDirtyRect, + CGPoint& rImageOrigin, + bool& rImageFlipped) { + if (isGPU() || !mSurface) + return nullptr; + // Based on AquaGraphicsBackend::drawBitmap(). if (!mrShared.checkContext()) - return; + return nullptr; + + NSRect aIntegralRect = NSIntegralRect(rDirtyRect); + if (NSIsEmptyRect(aIntegralRect)) + return nullptr; - assert(mSurface.get()); // Do not use sub-rect, it creates copies of the data. - sk_sp<SkImage> image = makeCheckedImageSnapshot(mSurface); - SkPixmap pixmap; - if (!image->peekPixels(&pixmap)) + SnapshotImageData* pInfo = new SnapshotImageData; + pInfo->image = makeCheckedImageSnapshot(mSurface); + if (!pInfo->image->peekPixels(&pInfo->pixmap)) abort(); - // If window scaling, then mDirtyRect is in VCL coordinates, mSurface has screen size (=points,HiDPI), - // maContextHolder has screen size but a scale matrix set so its inputs are in VCL coordinates (see - // its setup in AquaSharedAttributes::checkContext()). + + SkIRect aDirtyRect = SkIRect::MakeXYWH( + aIntegralRect.origin.x * mScaling, aIntegralRect.origin.y * mScaling, + aIntegralRect.size.width * mScaling, aIntegralRect.size.height * mScaling); + if (mrShared.isFlipped()) + aDirtyRect = SkIRect::MakeXYWH( + aDirtyRect.x(), pInfo->pixmap.bounds().height() - aDirtyRect.y() - aDirtyRect.height(), + aDirtyRect.width(), aDirtyRect.height()); + if (!aDirtyRect.intersect(pInfo->pixmap.bounds())) + { + delete pInfo; + return nullptr; + } + + // If window scaling, then aDirtyRect is in scaled VCL coordinates and mSurface has + // screen size (=points,HiDPI). // This creates the bitmap context from the cropped part, writable_addr32() will get - // the first pixel of mDirtyRect.topLeft(), and using pixmap.rowBytes() ensures the following + // the first pixel of aDirtyRect.topLeft(), and using pixmap.rowBytes() ensures the following // pixel lines will be read from correct positions. - if (pixmap.bounds() != mDirtyRect && pixmap.bounds().bottom() == mDirtyRect.bottom()) + if (pInfo->pixmap.bounds() != aDirtyRect + && pInfo->pixmap.bounds().bottom() == aDirtyRect.bottom()) { - // HACK for tdf#145843: If mDirtyRect includes the last line but not the first pixel of it, + // HACK for tdf#145843: If aDirtyRect includes the last line but not the first pixel of it, // then the rowBytes() trick would lead to the CG* functions thinking that even pixels after // the pixmap data belong to the area (since the shifted x()+rowBytes() points there) and // at least on Intel Mac they would actually read those data, even though I see no good reason // to do that, as that's beyond the x()+width() for the last line. That could be handled // by creating a subset SkImage (which as is said above copies data), or set the x coordinate // to 0, which will then make rowBytes() match the actual data. - mDirtyRect.fLeft = 0; + aDirtyRect.fLeft = 0; // Related tdf#156630 pixmaps can be wider than the dirty rectangle // This seems to most commonly occur when SAL_FORCE_HIDPI_SCALING=1 // and the native window scale is 2. -e ... etc. - the rest is truncated
