core.git: Branch 'distro/collabora/co-23.05' - editeng/source
editeng/source/misc/acorrcfg.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit cc0c61e728442ff90c808ad9060ee48a574396c8 Author: Tor Lillqvist AuthorDate: Thu Dec 29 13:50:00 2022 +0200 Commit: Caolán McNamara CommitDate: Thu Feb 29 20:47:41 2024 +0100 Make two TOOLS_WARN_EXCEPTION messages a bit more informative Change-Id: I614f44cfb94a214baace420f94f18991f368b953 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144859 Tested-by: Jenkins Reviewed-by: Tor Lillqvist (cherry picked from commit 3998ccfe14dab2e0a9b31cebe08534aa41177ce5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164168 Reviewed-by: Neil Guertin Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx index be4cc90e3680..db9ec117f025 100644 --- a/editeng/source/misc/acorrcfg.cxx +++ b/editeng/source/misc/acorrcfg.cxx @@ -96,7 +96,7 @@ static void scanAutoCorrectDirForLanguageTags( const OUString& rURL ) } catch (const uno::Exception&) { -TOOLS_WARN_EXCEPTION("editeng", "Unable to get directory entry."); +TOOLS_WARN_EXCEPTION("editeng", "Unable to get a directory entry from '" << rURL << "'"); } } } @@ -104,7 +104,7 @@ static void scanAutoCorrectDirForLanguageTags( const OUString& rURL ) } catch (const uno::Exception&) { -TOOLS_WARN_EXCEPTION("editeng", "Unable to iterate directory."); +TOOLS_WARN_EXCEPTION("editeng", "Unable to iterate directory '" << rURL << "'"); } }
core.git: Branch 'distro/allotropia/zeta-7-4' - distro-configs/LibreOfficeWASM32.conf
distro-configs/LibreOfficeWASM32.conf |1 + 1 file changed, 1 insertion(+) New commits: commit c9069219bef5846ef37265e07f3a475d532dbb25 Author: Tor Lillqvist AuthorDate: Tue Dec 6 11:32:53 2022 +0200 Commit: Balazs Varga CommitDate: Fri Jan 5 15:08:06 2024 +0100 Need --disable-gen for the Qt5-based WASM LibreOffice now Otherwise we get the slightly mysterious "Can't select gen VCL plugin, if --without-x is used!" error from configure.ac. Change-Id: I3ffda8f7306ff48a619052df25186f0989370d95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143707 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist (cherry picked from commit 27746ff5d5dfeef6192743d19659537b574b25ca) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161672 Tested-by: Balazs Varga Reviewed-by: Balazs Varga diff --git a/distro-configs/LibreOfficeWASM32.conf b/distro-configs/LibreOfficeWASM32.conf index d7fc849b3cfa..61c3f8f9da53 100644 --- a/distro-configs/LibreOfficeWASM32.conf +++ b/distro-configs/LibreOfficeWASM32.conf @@ -1,3 +1,4 @@ --host=wasm32-local-emscripten --enable-qt5 +--disable-gen --disable-scripting
core.git: Branch 'distro/allotropia/zeta-7-4' - configure.ac distro-configs/LibreOfficeWASM32.conf
configure.ac |2 -- distro-configs/LibreOfficeWASM32.conf |2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 26d55de1a125401318e9fc57425f4ee8df81f991 Author: Tor Lillqvist AuthorDate: Tue Nov 22 11:30:06 2022 +0200 Commit: Balazs Varga CommitDate: Fri Jan 5 15:04:52 2024 +0100 Move Qt5 and scripting options for Emscripten to the distro-configs file The resulting config_host.mk from running autogen.sh with just --with-distro=LibreOfficeWASM32 is identical, so this should be safe. Change-Id: I68ab81ba4e48c18d135a824c6158d725eb3f94da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143395 Tested-by: Jenkins Reviewed-by: Tor Lillqvist (cherry picked from commit 11e72e61b64bcabf5c599bc24e0b2f6b62c91b5c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161671 Tested-by: Balazs Varga Reviewed-by: Balazs Varga diff --git a/configure.ac b/configure.ac index 0c94e04acaca..0bfa249542e7 100644 --- a/configure.ac +++ b/configure.ac @@ -1136,8 +1136,6 @@ emscripten) test_system_freetype=no enable_compiler_plugins=no enable_customtarget_components=yes -enable_qt5=yes -enable_scripting=no enable_split_debug=yes enable_wasm_strip=yes with_system_zlib=no diff --git a/distro-configs/LibreOfficeWASM32.conf b/distro-configs/LibreOfficeWASM32.conf index b4a3f1dc6ae7..d7fc849b3cfa 100644 --- a/distro-configs/LibreOfficeWASM32.conf +++ b/distro-configs/LibreOfficeWASM32.conf @@ -1 +1,3 @@ --host=wasm32-local-emscripten +--enable-qt5 +--disable-scripting
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - bridges/source
bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h |2 ++ 1 file changed, 2 insertions(+) New commits: commit 32b334d57970e515141a0d5b1488e72a8f3f6fd6 Author: Tor Lillqvist AuthorDate: Thu Apr 20 17:43:03 2023 +0300 Commit: Aron Budea CommitDate: Tue Jun 20 01:29:35 2023 +0200 Fix compilation with latest Xcode with iOS SDK 16.4 Alternatively we could just remove lots of stuff that we apparently don't actually need from this file, including the problematic typedef and its uses. _Unwind_Exception_Class now gets typedeffed in as uint64_t which effectively is the same as the unsigned __attribute__((__mode__(__DI__))) that is used here. Change-Id: Id96d43eb481ee4ae97dd315aa2fd741e5f627916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150702 Reviewed-by: Patrick Luby Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150711 (cherry picked from commit c3f181fd2ff02bd4aeabd151e2fd79e38fa81331) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153305 Tested-by: Aron Budea Reviewed-by: Aron Budea diff --git a/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h b/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h index 83ed084860fd..aa35a5bc75e6 100644 --- a/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h +++ b/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h @@ -46,7 +46,9 @@ typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); typedef signed _Unwind_Sword __attribute__((__mode__(__word__))); typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__))); +#if !defined __IPHONE_16_4 || __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_16_4 typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__))); +#endif typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__))); #pragma GCC visibility push(default)
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/source include/LibreOfficeKit
desktop/source/lib/init.cxx | 102 +++--- include/LibreOfficeKit/LibreOfficeKit.h | 12 --- include/LibreOfficeKit/LibreOfficeKit.hxx | 28 3 files changed, 25 insertions(+), 117 deletions(-) New commits: commit 5fb42a705b25a19cef8384730630385409e5f2ba Author: Tor Lillqvist AuthorDate: Wed Apr 26 15:39:38 2023 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 27 12:04:55 2023 +0200 Bin the unused paintTileToCGContext special thing for iOS It was used by "LibreOfficeLight" which died years ago. Change-Id: I71a1315448baa4f1ec7a22b20cb3dd39c88cda78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151081 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 31477dd7588c..949af11504ed 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1125,13 +1125,6 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, const int nCanvasWidth, const int nCanvasHeight, const int nTilePosX, const int nTilePosY, const int nTileWidth, const int nTileHeight); -#ifdef IOS -static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, - void* rCGContext, - const int nCanvasWidth, const int nCanvasHeight, - const int nTilePosX, const int nTilePosY, - const int nTileWidth, const int nTileHeight); -#endif static void doc_paintPartTile(LibreOfficeKitDocument* pThis, unsigned char* pBuffer, const int nPart, @@ -1398,9 +1391,6 @@ LibLODocument_Impl::LibLODocument_Impl(uno::Reference xC m_pDocumentClass->setPartMode = doc_setPartMode; m_pDocumentClass->getEditMode = doc_getEditMode; m_pDocumentClass->paintTile = doc_paintTile; -#ifdef IOS -m_pDocumentClass->paintTileToCGContext = doc_paintTileToCGContext; -#endif m_pDocumentClass->paintPartTile = doc_paintPartTile; m_pDocumentClass->getTileMode = doc_getTileMode; m_pDocumentClass->getDocumentSize = doc_getDocumentSize; @@ -2592,41 +2582,6 @@ LibLibreOffice_Impl::~LibLibreOffice_Impl() namespace { -#ifdef IOS -void paintTileToCGContext(ITiledRenderable* pDocument, - void* rCGContext, const Size nCanvasSize, - const int nTilePosX, const int nTilePosY, - const int nTileWidth, const int nTileHeight) -{ -SystemGraphicsData aData; -aData.rCGContext = reinterpret_cast(rCGContext); - -ScopedVclPtrInstance pDevice(aData, Size(1, 1), DeviceFormat::DEFAULT); -pDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); -pDevice->SetOutputSizePixel(nCanvasSize); -pDocument->paintTile(*pDevice, nCanvasSize.Width(), nCanvasSize.Height(), -nTilePosX, nTilePosY, nTileWidth, nTileHeight); -} - -void paintTileIOS(LibreOfficeKitDocument* pThis, - unsigned char* pBuffer, - const int nCanvasWidth, const int nCanvasHeight, const double fDPIScale, - const int nTilePosX, const int nTilePosY, - const int nTileWidth, const int nTileHeight) -{ -CGContextRef pCGContext = CGBitmapContextCreate(pBuffer, nCanvasWidth, nCanvasHeight, 8, -nCanvasWidth * 4, CGColorSpaceCreateDeviceRGB(), - kCGImageAlphaPremultipliedFirst | kCGImageByteOrder32Little); - -CGContextTranslateCTM(pCGContext, 0, nCanvasHeight); -CGContextScaleCTM(pCGContext, fDPIScale, -fDPIScale); - -doc_paintTileToCGContext(pThis, (void*) pCGContext, nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); - -CGContextRelease(pCGContext); -} -#endif - void setLanguageAndLocale(OUString const & aLangISO) { SvtSysLocaleOptions aLocalOptions; @@ -3940,8 +3895,31 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, comphelper::ScopeGuard dpiScaleGuard([]() { comphelper::LibreOfficeKit::setDPIScale(1.0); }); #if defined(IOS) -double fDPIScaleX = 1.0; -paintTileIOS(pThis, pBuffer, nCanvasWidth, nCanvasHeight, fDPIScaleX, nTilePosX, nTilePosY, nTileWidth, nTileHeight); +double fDPIScale = 1.0; + +CGContextRef pCGContext = CGBitmapContextCreate(pBuffer, nCanvasWidth, nCanvasHeight, 8, +nCanvasWidth * 4, CGColorSpaceCreateDeviceRGB(), + kCGImageAlphaPremultipliedFirst | kCGImageByteOrder32Little); + +CGContextTranslateCTM(pCGContext, 0, nCanvasHeight); +CGContextScaleCTM(pCGContext, fDPIScale, -fDPI
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/source
desktop/source/lib/init.cxx | 20 1 file changed, 20 deletions(-) New commits: commit a7039218f3df28cf0d7d32b34b0eb9aaa68e85b6 Author: Tor Lillqvist AuthorDate: Wed Apr 26 13:03:16 2023 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 27 12:04:15 2023 +0200 Bin leftover dead code Change-Id: Ie0583d52b01bba92e6fc41f0fee3fd4732f1d479 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151080 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 918a4fe04368..31477dd7588c 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -7913,26 +7913,6 @@ static void lo_destroy(LibreOfficeKit* pThis) SAL_INFO("lok", "LO Destroy Done"); } -#ifdef IOS - -// Used by the unmaintained LibreOfficeLight app. Once that has been retired, get rid of this, too. - -__attribute__((visibility("default"))) -void temporaryHackToInvokeCallbackHandlers(LibreOfficeKitDocument* pThis) -{ -SolarMutexGuard aGuard; -LibLODocument_Impl* pDocument = static_cast(pThis); - -int nOrigViewId = doc_getView(pThis); - -if (nOrigViewId >= 0 && pDocument->mpCallbackFlushHandlers[nOrigViewId]) -{ -pDocument->mpCallbackFlushHandlers[nOrigViewId]->Invoke(); -} -} - -#endif - } // extern "C" /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
[Libreoffice-commits] core.git: desktop/source include/LibreOfficeKit
desktop/source/lib/init.cxx | 102 +++--- include/LibreOfficeKit/LibreOfficeKit.h | 12 --- include/LibreOfficeKit/LibreOfficeKit.hxx | 28 3 files changed, 25 insertions(+), 117 deletions(-) New commits: commit 0340cbbc34d2c97baa5b7ebc4a57650861907067 Author: Tor Lillqvist AuthorDate: Wed Apr 26 15:39:38 2023 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 27 06:53:22 2023 +0200 Bin the unused paintTileToCGContext special thing for iOS It was used by "LibreOfficeLight" which died years ago. Change-Id: I71a1315448baa4f1ec7a22b20cb3dd39c88cda78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151066 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index af31b1829163..d6ce62b38be4 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1119,13 +1119,6 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, const int nCanvasWidth, const int nCanvasHeight, const int nTilePosX, const int nTilePosY, const int nTileWidth, const int nTileHeight); -#ifdef IOS -static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, - void* rCGContext, - const int nCanvasWidth, const int nCanvasHeight, - const int nTilePosX, const int nTilePosY, - const int nTileWidth, const int nTileHeight); -#endif static void doc_paintPartTile(LibreOfficeKitDocument* pThis, unsigned char* pBuffer, const int nPart, @@ -1392,9 +1385,6 @@ LibLODocument_Impl::LibLODocument_Impl(uno::Reference xC m_pDocumentClass->setPartMode = doc_setPartMode; m_pDocumentClass->getEditMode = doc_getEditMode; m_pDocumentClass->paintTile = doc_paintTile; -#ifdef IOS -m_pDocumentClass->paintTileToCGContext = doc_paintTileToCGContext; -#endif m_pDocumentClass->paintPartTile = doc_paintPartTile; m_pDocumentClass->getTileMode = doc_getTileMode; m_pDocumentClass->getDocumentSize = doc_getDocumentSize; @@ -2586,41 +2576,6 @@ LibLibreOffice_Impl::~LibLibreOffice_Impl() namespace { -#ifdef IOS -void paintTileToCGContext(ITiledRenderable* pDocument, - void* rCGContext, const Size nCanvasSize, - const int nTilePosX, const int nTilePosY, - const int nTileWidth, const int nTileHeight) -{ -SystemGraphicsData aData; -aData.rCGContext = reinterpret_cast(rCGContext); - -ScopedVclPtrInstance pDevice(aData, Size(1, 1), DeviceFormat::WITHOUT_ALPHA); -pDevice->SetBackground(Wallpaper(COL_TRANSPARENT)); -pDevice->SetOutputSizePixel(nCanvasSize); -pDocument->paintTile(*pDevice, nCanvasSize.Width(), nCanvasSize.Height(), -nTilePosX, nTilePosY, nTileWidth, nTileHeight); -} - -void paintTileIOS(LibreOfficeKitDocument* pThis, - unsigned char* pBuffer, - const int nCanvasWidth, const int nCanvasHeight, const double fDPIScale, - const int nTilePosX, const int nTilePosY, - const int nTileWidth, const int nTileHeight) -{ -CGContextRef pCGContext = CGBitmapContextCreate(pBuffer, nCanvasWidth, nCanvasHeight, 8, -nCanvasWidth * 4, CGColorSpaceCreateDeviceRGB(), - kCGImageAlphaPremultipliedFirst | kCGImageByteOrder32Little); - -CGContextTranslateCTM(pCGContext, 0, nCanvasHeight); -CGContextScaleCTM(pCGContext, fDPIScale, -fDPIScale); - -doc_paintTileToCGContext(pThis, (void*) pCGContext, nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight); - -CGContextRelease(pCGContext); -} -#endif - void setLanguageAndLocale(OUString const & aLangISO) { SvtSysLocaleOptions aLocalOptions; @@ -3933,8 +3888,31 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, comphelper::ScopeGuard dpiScaleGuard([]() { comphelper::LibreOfficeKit::setDPIScale(1.0); }); #if defined(IOS) -double fDPIScaleX = 1.0; -paintTileIOS(pThis, pBuffer, nCanvasWidth, nCanvasHeight, fDPIScaleX, nTilePosX, nTilePosY, nTileWidth, nTileHeight); +double fDPIScale = 1.0; + +CGContextRef pCGContext = CGBitmapContextCreate(pBuffer, nCanvasWidth, nCanvasHeight, 8, +nCanvasWidth * 4, CGColorSpaceCreateDeviceRGB(), + kCGImageAlphaPremultipliedFirst | kCGImageByteOrder32Little); + +CGContextTranslateCTM(pCGContext, 0, nCanvasHeight); +CGContextScaleCTM(pCGContext, fDPIScale, -fDPI
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source
cui/source/options/optcolor.cxx | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) New commits: commit 7365ace31b1943f06e0ecc9164ba931a0e9030f9 Author: Tor Lillqvist AuthorDate: Thu Feb 23 12:29:48 2023 +0200 Commit: Tor Lillqvist CommitDate: Mon Apr 24 11:58:12 2023 +0200 Don't call CuiResId() in a global static variable initialiser Instead, have a function that returns a reference to a local static variable. That local static is then initialised only when the function is called for the first time. Calling CuiResId() in a global initialiser is a bit questionable, and causes an uncaught exception when LO core is used in a WASM app. Possibly it would also have been problematic on other uncommon platforms. Change-Id: I4fd799ba3aa8d63fd3db1eb8cf6211aeed904ed2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147512 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist (cherry picked from commit 6f29310fe83873c7d6844cf5e3089ca981e147db) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150149 Tested-by: Jenkins CollaboraOffice diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index eb13b442232a..112be3ea215c 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -160,9 +160,13 @@ const vEntryInfo[] = }; // Maps the names of default color schemes to the corresponding TranslateId -std::map const vColorSchemes = { -{"COLOR_SCHEME_LIBREOFFICE_AUTOMATIC", CuiResId(RID_COLOR_SCHEME_LIBREOFFICE_AUTOMATIC)}, -{"COLOR_SCHEME_LIBREOFFICE_DARK", CuiResId(RID_COLOR_SCHEME_LIBREOFFICE_DARK)} +const std::map () +{ +static std::map const vColorSchemes = { +{"COLOR_SCHEME_LIBREOFFICE_AUTOMATIC", CuiResId(RID_COLOR_SCHEME_LIBREOFFICE_AUTOMATIC)}, +{"COLOR_SCHEME_LIBREOFFICE_DARK", CuiResId(RID_COLOR_SCHEME_LIBREOFFICE_DARK)} +}; +return vColorSchemes; }; // If the color scheme name has a translated string, then return the translation @@ -170,8 +174,8 @@ std::map const vColorSchemes = { // For non-translatable color schemes, the ID and the name are the same OUString lcl_SchemeIdToTranslatedName(const OUString& sSchemeId) { -auto it = vColorSchemes.find(sSchemeId); -if (it != vColorSchemes.end()) +auto it = getColorSchemes().find(sSchemeId); +if (it != getColorSchemes().end()) return it->second; return sSchemeId; } @@ -180,7 +184,7 @@ OUString lcl_SchemeIdToTranslatedName(const OUString& sSchemeId) // For non-translatable color schemes, the ID and the name are the same OUString lcl_TranslatedNameToSchemeId(const OUString& sName) { -for (auto it = vColorSchemes.begin(); it != vColorSchemes.end(); ++it) +for (auto it = getColorSchemes().begin(); it != getColorSchemes().end(); ++it) if (it->second == sName) return it->first; return sName;
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - bridges/source
bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h |2 ++ 1 file changed, 2 insertions(+) New commits: commit c3f181fd2ff02bd4aeabd151e2fd79e38fa81331 Author: Tor Lillqvist AuthorDate: Thu Apr 20 17:43:03 2023 +0300 Commit: Tor Lillqvist CommitDate: Fri Apr 21 09:10:54 2023 +0200 Fix compilation with latest Xcode with iOS SDK 16.4 Alternatively we could just remove lots of stuff that we apparently don't actually need from this file, including the problematic typedef and its uses. _Unwind_Exception_Class now gets typedeffed in as uint64_t which effectively is the same as the unsigned __attribute__((__mode__(__DI__))) that is used here. Change-Id: Id96d43eb481ee4ae97dd315aa2fd741e5f627916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150702 Reviewed-by: Patrick Luby Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150711 diff --git a/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h b/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h index 83ed084860fd..aa35a5bc75e6 100644 --- a/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h +++ b/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h @@ -46,7 +46,9 @@ typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); typedef signed _Unwind_Sword __attribute__((__mode__(__word__))); typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__))); +#if !defined __IPHONE_16_4 || __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_16_4 typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__))); +#endif typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__))); #pragma GCC visibility push(default)
[Libreoffice-commits] core.git: bridges/source
bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h |2 ++ 1 file changed, 2 insertions(+) New commits: commit 153263957b22e2d5f76f951366d44c182c22c260 Author: Tor Lillqvist AuthorDate: Thu Apr 20 17:43:03 2023 +0300 Commit: Tor Lillqvist CommitDate: Thu Apr 20 21:35:01 2023 +0200 Fix compilation with latest Xcode with iOS SDK 16.4 Alternatively we could just remove lots of stuff that we apparently don't actually need from this file, including the problematic typedef and its uses. _Unwind_Exception_Class now gets typedeffed in as uint64_t which effectively is the same as the unsigned __attribute__((__mode__(__DI__))) that is used here. Change-Id: Id96d43eb481ee4ae97dd315aa2fd741e5f627916 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150702 Reviewed-by: Patrick Luby Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h b/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h index 83ed084860fd..aa35a5bc75e6 100644 --- a/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h +++ b/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h @@ -46,7 +46,9 @@ typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); typedef signed _Unwind_Sword __attribute__((__mode__(__word__))); typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); typedef unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__))); +#if !defined __IPHONE_16_4 || __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_16_4 typedef unsigned _Unwind_Exception_Class __attribute__((__mode__(__DI__))); +#endif typedef unsigned _Unwind_Internal_Ptr __attribute__((__mode__(__pointer__))); #pragma GCC visibility push(default)
Re: ESC meeting agenda: 2023-04-20 16:00 CEST
> More generally, what's the status concerning Swift on LO? Just a thought: Most of our Objective-C files are actually Objective-C++. That is, they also contain C++, and freely call various LibreOffice C++ functionality as needed. If they were "converted" to Swift, that would not be possible, but some complicated glue layer inbetween would need to be written. Which seems like a lot of pain for little gain. Or am I outdated, can you use C++ in Swift source files nowadays? --tml
[Libreoffice-commits] translations.git: Changes to 'refs/tags/co-6.4-68'
Tag 'co-6.4-68' created by Andras Timar at 2023-04-04 11:55 + co-6.4-68 Changes since cp-6.4-48: Tor Lillqvist (1): Add missing mobile-specific Impress German translations --- source/de/sd/messages.po | 37 + 1 file changed, 37 insertions(+) ---
[Libreoffice-commits] translations.git: Changes to 'refs/tags/co-6.4-67'
Tag 'co-6.4-67' created by Andras Timar at 2023-04-04 09:25 + co-6.4-67 Changes since cp-6.4-48: Tor Lillqvist (1): Add missing mobile-specific Impress German translations --- source/de/sd/messages.po | 37 + 1 file changed, 37 insertions(+) ---
[Libreoffice-commits] translations.git: Changes to 'refs/tags/co-6.4-66'
Tag 'co-6.4-66' created by Andras Timar at 2023-04-01 17:13 + co-6.4-66 Changes since cp-6.4-48: Tor Lillqvist (1): Add missing mobile-specific Impress German translations --- source/de/sd/messages.po | 37 + 1 file changed, 37 insertions(+) ---
[Libreoffice-commits] translations.git: Changes to 'refs/tags/co-6.4-65'
Tag 'co-6.4-65' created by Andras Timar at 2023-03-25 21:12 + co-6.4-65 Changes since cp-6.4-48: Tor Lillqvist (1): Add missing mobile-specific Impress German translations --- source/de/sd/messages.po | 37 + 1 file changed, 37 insertions(+) ---
[Libreoffice-commits] translations.git: Changes to 'refs/tags/co-6.4-64'
Tag 'co-6.4-64' created by Andras Timar at 2023-03-25 18:26 + co-6.4-64 Changes since cp-6.4-48: Tor Lillqvist (1): Add missing mobile-specific Impress German translations --- source/de/sd/messages.po | 37 + 1 file changed, 37 insertions(+) ---
[Libreoffice-commits] core.git: offapi/com
offapi/com/sun/star/accessibility/XAccessibleContext.idl |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 660f73385562314e01abb4cef9d443b0c0f42b06 Author: Tor Lillqvist AuthorDate: Tue Mar 21 09:48:04 2023 +0200 Commit: Tor Lillqvist CommitDate: Tue Mar 21 09:10:53 2023 + There is no XAccessibleStateType What is meant is surely AccessibleStateType. Change-Id: I57903dd7e1eb9b0a3cac42a96633093569f770eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149194 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/offapi/com/sun/star/accessibility/XAccessibleContext.idl b/offapi/com/sun/star/accessibility/XAccessibleContext.idl index 84c8a21cfdea..6b1b16701717 100644 --- a/offapi/com/sun/star/accessibility/XAccessibleContext.idl +++ b/offapi/com/sun/star/accessibility/XAccessibleContext.idl @@ -152,10 +152,10 @@ interface XAccessibleContext : ::com::sun::star::uno::XInterface /** Returns the set of states that are currently active for this object. -See the documentation of XAccessibleStateType for a +See the documentation of AccessibleStateType for a description of the individual states. -@see XAccessibleStateType +@see AccessibleStateType */ hyper getAccessibleStateSet ();
[Libreoffice-commits] core.git: codemaker/source cppu/qa
codemaker/source/cppumaker/cpputype.cxx | 159 cppu/qa/cppumaker/test_cppumaker.cxx| 32 ++ cppu/qa/cppumaker/types.idl | 54 ++ 3 files changed, 245 insertions(+) New commits: commit e1c6f36d8bcc0799281e3a7e244175f682d97cb2 Author: Tor Lillqvist AuthorDate: Thu Mar 16 15:32:10 2023 +0200 Commit: Tor Lillqvist CommitDate: Fri Mar 17 11:46:36 2023 + Add a to_string() function to the code generated for UNO IDL constant groups If the inpt matches one of the constants exactly, the result is the name of that constant. If the input matches some combination of constant values that are single bits, the result is the sequence of the names of those constants joined with plus signs. For instance, if the IDL has: constants Constants { const byte BIT0 = 1; const byte BIT1 = 2; const byte BIT2 = 4; const byte BIT3 = 8; } The result of Constants::to_string(5) is "BIT0+BIT2", and the result of Constants::to_string(17) is "17". I am sure there are corner cases that aren't handled as would be intuitive, especially with types that include unsigned values. Correspondingly, the semantics of the generated to_string() functions is not formally defined. Also add a unit test for the new functionality. Change-Id: I14aa826d0989ac6dfe97dd5c09119b1601c65643 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148995 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index bb8e3ed7d33c..c4ccbbb7ad0c 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -1660,6 +1661,7 @@ void ConstantGroup::dumpHdlFile( OUString headerDefine(dumpHeaderDefine(out, u"HDL")); out << "\n"; addDefaultHIncludes(includes); +includes.addRtlUstringHxx(); includes.dump(out, nullptr, true); out << "\n"; if (codemaker::cppumaker::dumpNamespaceOpen(out, name_, true)) { @@ -1685,6 +1687,10 @@ void ConstantGroup::dumpHppFile( void ConstantGroup::dumpDeclaration(FileStream & out) { +unoidl::ConstantValue::Type largestType = unoidl::ConstantValue::TYPE_BOOLEAN; +OUString largestTypeName = "sal_Bool"; +bool haveFloatingPoint = false; + for (const unoidl::ConstantGroupEntity::Member& member : entity_->getMembers()) { out << "static const "; switch (member.value.type) { @@ -1693,30 +1699,60 @@ void ConstantGroup::dumpDeclaration(FileStream & out) break; case unoidl::ConstantValue::TYPE_BYTE: out << "::sal_Int8"; +if (largestType < unoidl::ConstantValue::TYPE_BYTE) { +largestType = unoidl::ConstantValue::TYPE_BYTE; +largestTypeName = "sal_Int8"; +} break; case unoidl::ConstantValue::TYPE_SHORT: out << "::sal_Int16"; +if (largestType < unoidl::ConstantValue::TYPE_SHORT) { +largestType = unoidl::ConstantValue::TYPE_SHORT; +largestTypeName = "sal_Int16"; +} break; case unoidl::ConstantValue::TYPE_UNSIGNED_SHORT: out << "::sal_uInt16"; +if (largestType < unoidl::ConstantValue::TYPE_UNSIGNED_SHORT) { +largestType = unoidl::ConstantValue::TYPE_UNSIGNED_SHORT; +largestTypeName = "sal_uInt16"; +} break; case unoidl::ConstantValue::TYPE_LONG: out << "::sal_Int32"; +if (largestType < unoidl::ConstantValue::TYPE_LONG) { +largestType = unoidl::ConstantValue::TYPE_LONG; +largestTypeName = "sal_Int32"; +} break; case unoidl::ConstantValue::TYPE_UNSIGNED_LONG: out << "::sal_uInt32"; +if (largestType < unoidl::ConstantValue::TYPE_UNSIGNED_LONG) { +largestType = unoidl::ConstantValue::TYPE_UNSIGNED_LONG; +largestTypeName = "sal_uInt32"; +} break; case unoidl::ConstantValue::TYPE_HYPER: out << "::sal_Int64"; +if (largestType < unoidl::ConstantValue::TYPE_HYPER) { +largestType = unoidl::ConstantValue::TYPE_HYPER; +largestTypeName = "sal_Int64"; +} break; case unoidl::ConstantValue::TYPE_UNSIGNED_HYPER: out << "::sal_uInt
[Libreoffice-commits] core.git: offapi/com
offapi/com/sun/star/accessibility/AccessibleRole.idl |4 1 file changed, 4 deletions(-) New commits: commit 910226f2916b271a496daa6920843bf8d82238a6 Author: Tor Lillqvist AuthorDate: Thu Mar 16 12:29:30 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Mar 16 10:43:29 2023 + Remove false documentation There are no such duplicated constant labels in this file. Change-Id: I6352766834bf832667b5644d7507ec250932492a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148976 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/offapi/com/sun/star/accessibility/AccessibleRole.idl b/offapi/com/sun/star/accessibility/AccessibleRole.idl index c25b3d465d1a..f5e269d3a423 100644 --- a/offapi/com/sun/star/accessibility/AccessibleRole.idl +++ b/offapi/com/sun/star/accessibility/AccessibleRole.idl @@ -34,10 +34,6 @@ module com { module sun { module star { module accessibility { include future extensions to the set of roles we have to use constants here. -For some roles there exist two labels with the same value. Please -use the one with the underscores. The other ones are somewhat -deprecated and will be removed in the future. - @see XAccessibleContext @since OOo 1.1.2
[Libreoffice-commits] core.git: include/LibreOfficeKit
include/LibreOfficeKit/LibreOfficeKit.hxx |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit 42e94211ad6dc2125a411c1768d0b3a677dba34d Author: Tor Lillqvist AuthorDate: Mon Mar 13 11:23:05 2023 +0200 Commit: Tor Lillqvist CommitDate: Mon Mar 13 11:34:35 2023 + Improve documentation of lok::Document::getPartPageRectangles() Change-Id: Ic507749064ff27b36cac8e01a54fb58dd10cdda5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148779 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index bc3bbb98cc10..501b10bb61f9 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -84,10 +84,11 @@ public: } /** - * Get the logical rectangle of each part in the document. + * Get the extent of each page in the document. * - * A part refers to an individual page in Writer and has no relevant for - * Calc or Impress. + * This function is relevant for Writer documents only. It is a + * mistake that the API has "part" in its name as Writer documents + * don't have parts. * * @return a rectangle list, using the same format as * LOK_CALLBACK_TEXT_SELECTION.
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - 4 commits - external/freetype
external/freetype/ExternalProject_freetype.mk |2 +- external/freetype/freetype-fd-hack.patch.0|8 external/freetype/ubsan.patch | 13 - 3 files changed, 21 insertions(+), 2 deletions(-) New commits: commit 777fdb0378d135499962ac7ba6b2ae4fc37db068 Author: Tor Lillqvist AuthorDate: Fri Feb 10 11:15:21 2023 +0200 Commit: Andras Timar CommitDate: Wed Mar 8 20:59:58 2023 +0100 Avoid implicit function declaration warnings Noticed when compiling with Emscripten for WASM, but might well happen in other cases, too. Change-Id: I37ae326af21204d81a6a3267831d7a0198d1d501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146744 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147531 diff --git a/external/freetype/freetype-fd-hack.patch.0 b/external/freetype/freetype-fd-hack.patch.0 index db2bdc9e92f6..c12d6739fc4c 100644 --- a/external/freetype/freetype-fd-hack.patch.0 +++ b/external/freetype/freetype-fd-hack.patch.0 @@ -1,6 +1,14 @@ # -*- Mode: Diff -*- --- src/base/ftsystem.c +++ src/base/ftsystem.c +@@ -24,6 +24,7 @@ +* +*/ + ++#include + + #include + #include FT_CONFIG_CONFIG_H @@ -237,6 +237,8 @@ const char* filepathname ) { commit 62ef1dd55913f8cf03156249ef46b090c38fbab1 Author: Andras Timar AuthorDate: Wed Mar 8 20:58:14 2023 +0100 Commit: Andras Timar CommitDate: Wed Mar 8 20:58:14 2023 +0100 [cp] freetype: sync ubsan.patch with co-23.05 Change-Id: If6d3276f86c11bdd165c0587b547d371c2c4c5af diff --git a/external/freetype/ubsan.patch b/external/freetype/ubsan.patch index 6a7688139ae8..b27bbba09cb8 100644 --- a/external/freetype/ubsan.patch +++ b/external/freetype/ubsan.patch @@ -1,3 +1,14 @@ +--- src/truetype/ttgxvar.c src/truetype/ttgxvar.c +@@ -964,7 +964,7 @@ + /* in the OpenType specification. */ + + varData = >varData[outerIndex]; +-deltaSet = >deltaSet[varData->regionIdxCount * innerIndex]; ++deltaSet = varData->regionIdxCount * innerIndex == 0 ? varData->deltaSet : >deltaSet[varData->regionIdxCount * innerIndex]; + + /* outer loop steps through master designs to be blended */ + for ( master = 0; master < varData->regionIdxCount; master++ ) --- src/psaux/psobjs.c.orig2022-11-17 16:52:21.913211573 +0100 +++ src/psaux/psobjs.c 2022-11-17 16:53:17.905127207 +0100 @@ -201,7 +201,8 @@ commit ed83e5150ad1ed6ffab4f76f10e775907984bb62 Author: Miklos Vajna AuthorDate: Wed Nov 23 08:13:44 2022 +0100 Commit: Andras Timar CommitDate: Wed Mar 8 20:54:20 2023 +0100 exteral/freetype: improve -fsanitize=non-null-attribute fix Quoting <https://gerrit.libreoffice.org/c/core/+/143098/2#message-62ac4499370dd88eeb3181f52d817e831150c94d>: > What we do in other such cases is not make it conditional on the > pointer argument being non-null, but rather make it conditional on the > length argument not being zero. That way, it only catches the > "harmless" case of an "irrelevant" null pointer in combination with a > zero length, and doesn't hide bugs where the pointer is erroneously null > while the length is non-zero. So check for the length and not for the pointer argument. Change-Id: I1894eb67d49a9ae40cdce29de865172400a271dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143134 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/external/freetype/ubsan.patch b/external/freetype/ubsan.patch index 4a743f3ef3f6..6a7688139ae8 100644 --- a/external/freetype/ubsan.patch +++ b/external/freetype/ubsan.patch @@ -5,7 +5,7 @@ table->elements[idx] = FT_OFFSET( table->block, table->cursor ); table->lengths [idx] = length; -FT_MEM_COPY( table->block + table->cursor, object, length ); -+if (table->block + table->cursor) ++if (length != 0) + FT_MEM_COPY( table->block + table->cursor, object, length ); table->cursor += length; commit 6ced843b73674067a3965b572e6b7e417a054a71 Author: Michael Stahl AuthorDate: Fri Nov 25 11:27:57 2022 +0100 Commit: Andras Timar CommitDate: Wed Mar 8 20:52:13 2023 +0100 freetype: don't build yet another copy of zlib Since commit e515267602d9049bc15739a215f43f1379141d81 the zlib that's statically linked into freetype conflicts with the zlib that's statically linked into Qt5 because both appear to rename the symbols via Z_PREFIX to the same names and thus the linker complains about duplicate symbols. Apparently --without-zlib doesn't disable the feature but instead causes freetype to use its own copy; just use --with-zlib instead and rely on the ZLIB_CFLAGS/ZLIB_LIBS to find LO's bundled zlib. Change-Id: I0b5684ca6556c3da7874c17
[Libreoffice-commits] core.git: desktop/source
desktop/source/lib/init.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit bcf0f2b6d87f6be18c417e3537f5cf9b320c4348 Author: Tor Lillqvist AuthorDate: Wed Mar 8 13:01:39 2023 +0200 Commit: Tor Lillqvist CommitDate: Wed Mar 8 12:22:48 2023 + Make error message more useful Change-Id: I3c6efcbd2a2759385912aa352d0c250963e5f004 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148464 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index ee1f47a8ea96..54ffbac8e322 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3213,7 +3213,7 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha } else { -SetLastExceptionMsg("input filename without a suffix"); +SetLastExceptionMsg("input URL '" + aURL + "' lacks a suffix"); return false; } }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - desktop/qa desktop/source include/LibreOfficeKit
desktop/qa/desktop_lib/test_desktop_lib.cxx |4 --- desktop/source/lib/init.cxx | 34 include/LibreOfficeKit/LibreOfficeKit.h |8 -- include/LibreOfficeKit/LibreOfficeKit.hxx | 25 4 files changed, 1 insertion(+), 70 deletions(-) New commits: commit 18c56457718fb977457498130318f27024aa4218 Author: Tor Lillqvist AuthorDate: Tue Mar 7 11:43:00 2023 +0200 Commit: Tor Lillqvist CommitDate: Tue Mar 7 22:00:43 2023 + Drop the LibreOfficeKit paintThumbnail() API It turns out that Mert's original idea is actually the simplest and it is known to work. And in that, the separate paintThumbnail() is rather pointless, as all paintThumbnail() did was to call paintTile(). The caller (in Collabora Online) knows when a file is opened specifically for thumbnailing, and can call paintTile() itself with the appropriate parameters. My misguided idea would have had paintThumbnail() somehow figure out the physical Twip coordinates of the current location (for text documents, the insertion caret location) in the document. (Or, as LibreOfficeKit for some reason calls them, "logical" coordinates, even if a Twip is a very physical length unit.) Then it would have called paintTile() with those coordinates. But it turned out to be rather hard to figure out the Twip coordinates of the current location in the document. Mert's idea was that when a document is opened for thumbnailing, only Online actually needs to know that. From LibreOfficeKit's and core's point of view it is a normal document load operation. Then Online performs the .uno:OpenHyperlink magic, which makes core move the current position to the requested "target" or "mark" (the terminology varies) location. And then a "cursor" callback is used by Online to get the Twip coordinates of the target. It is a bit unclear to me whether .uno:HyperLink causes the document to be opened an extra time, but whatever, this way is said to work. So let's do it like that. This reverts the paintThumbnail part of 1aa37ca99112c0760552600d7774ba7224581c5b. Change-Id: I8f3d9917ee362c1518834fc10a57c57ebc4a6edb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148390 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148430 diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index fa7791ae7ee4..81f54be5553e 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -3671,11 +3671,9 @@ void DesktopLOKTest::testABI() CPPUNIT_ASSERT_EQUAL(documentClassOffset(67), offsetof(struct _LibreOfficeKitDocumentClass, getEditMode)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(68), offsetof(struct _LibreOfficeKitDocumentClass, setViewTimezone)); -CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), offsetof(struct _LibreOfficeKitDocumentClass, paintThumbnail)); - // As above -CPPUNIT_ASSERT_EQUAL(documentClassOffset(70), sizeof(struct _LibreOfficeKitDocumentClass)); +CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), sizeof(struct _LibreOfficeKitDocumentClass)); } CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index c584408b5e8d..276ed4142c58 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1114,12 +1114,6 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, const int nCanvasWidth, const int nCanvasHeight, const int nTilePosX, const int nTilePosY, const int nTileWidth, const int nTileHeight); -static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, - unsigned char* pBuffer, - int bufferWidth, - int bufferHeight, - int width, - const char* pURL); #ifdef IOS static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, void* rCGContext, @@ -1391,7 +1385,6 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference setPartMode = doc_setPartMode; m_pDocumentClass->getEditMode = doc_getEditMode; m_pDocumentClass->paintTile = doc_paintTile; -m_pDocumentClass->paintThumbnail = doc_paintThumbnail; #ifdef IOS m_pDocumentClass->paintTileToCGContext = doc_paintTileToCGContext; #endif @@ -4012,33 +4005,6 @@ static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, #endif -static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, - unsigne
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/qa desktop/source include/LibreOfficeKit
desktop/qa/desktop_lib/test_desktop_lib.cxx |4 --- desktop/source/lib/init.cxx | 34 include/LibreOfficeKit/LibreOfficeKit.h |8 -- include/LibreOfficeKit/LibreOfficeKit.hxx | 25 4 files changed, 1 insertion(+), 70 deletions(-) New commits: commit 10aeb60f1b369d93d52916371ae3e89d38d02e61 Author: Tor Lillqvist AuthorDate: Tue Mar 7 11:43:00 2023 +0200 Commit: Tor Lillqvist CommitDate: Tue Mar 7 22:00:21 2023 + Drop the LibreOfficeKit paintThumbnail() API It turns out that Mert's original idea is actually the simplest and it is known to work. And in that, the separate paintThumbnail() is rather pointless, as all paintThumbnail() did was to call paintTile(). The caller (in Collabora Online) knows when a file is opened specifically for thumbnailing, and can call paintTile() itself with the appropriate parameters. My misguided idea would have had paintThumbnail() somehow figure out the physical Twip coordinates of the current location (for text documents, the insertion caret location) in the document. (Or, as LibreOfficeKit for some reason calls them, "logical" coordinates, even if a Twip is a very physical length unit.) Then it would have called paintTile() with those coordinates. But it turned out to be rather hard to figure out the Twip coordinates of the current location in the document. Mert's idea was that when a document is opened for thumbnailing, only Online actually needs to know that. From LibreOfficeKit's and core's point of view it is a normal document load operation. Then Online performs the .uno:OpenHyperlink magic, which makes core move the current position to the requested "target" or "mark" (the terminology varies) location. And then a "cursor" callback is used by Online to get the Twip coordinates of the target. It is a bit unclear to me whether .uno:HyperLink causes the document to be opened an extra time, but whatever, this way is said to work. So let's do it like that. This reverts the paintThumbnail part of 1aa37ca99112c0760552600d7774ba7224581c5b. Change-Id: I8f3d9917ee362c1518834fc10a57c57ebc4a6edb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148390 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148428 diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 4348da15a68b..e8971919475c 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -3640,11 +3640,9 @@ void DesktopLOKTest::testABI() CPPUNIT_ASSERT_EQUAL(documentClassOffset(67), offsetof(struct _LibreOfficeKitDocumentClass, getEditMode)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(68), offsetof(struct _LibreOfficeKitDocumentClass, setViewTimezone)); -CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), offsetof(struct _LibreOfficeKitDocumentClass, paintThumbnail)); - // As above -CPPUNIT_ASSERT_EQUAL(documentClassOffset(70), sizeof(struct _LibreOfficeKitDocumentClass)); +CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), sizeof(struct _LibreOfficeKitDocumentClass)); } CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index fa2494f9ca18..6d0a32b5a25e 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1115,12 +1115,6 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, const int nCanvasWidth, const int nCanvasHeight, const int nTilePosX, const int nTilePosY, const int nTileWidth, const int nTileHeight); -static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, - unsigned char* pBuffer, - int bufferWidth, - int bufferHeight, - int width, - const char* pURL); #ifdef IOS static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, void* rCGContext, @@ -1394,7 +1388,6 @@ LibLODocument_Impl::LibLODocument_Impl(uno::Reference xC m_pDocumentClass->setPartMode = doc_setPartMode; m_pDocumentClass->getEditMode = doc_getEditMode; m_pDocumentClass->paintTile = doc_paintTile; -m_pDocumentClass->paintThumbnail = doc_paintThumbnail; #ifdef IOS m_pDocumentClass->paintTileToCGContext = doc_paintTileToCGContext; #endif @@ -4016,33 +4009,6 @@ static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, #endif -static void doc_paintThumbnail(LibreOfficeKitDocument* pThis,
[Libreoffice-commits] core.git: desktop/qa desktop/source include/LibreOfficeKit
desktop/qa/desktop_lib/test_desktop_lib.cxx |4 --- desktop/source/lib/init.cxx | 34 include/LibreOfficeKit/LibreOfficeKit.h |8 -- include/LibreOfficeKit/LibreOfficeKit.hxx | 25 4 files changed, 1 insertion(+), 70 deletions(-) New commits: commit 1f4e9eacc36413bba92f119ebed931cfdb975e80 Author: Tor Lillqvist AuthorDate: Tue Mar 7 11:43:00 2023 +0200 Commit: Tor Lillqvist CommitDate: Tue Mar 7 14:40:02 2023 + Drop the LibreOfficeKit paintThumbnail() API It turns out that Mert's original idea is actually the simplest and it is known to work. And in that, the separate paintThumbnail() is rather pointless, as all paintThumbnail() did was to call paintTile(). The caller (in Collabora Online) knows when a file is opened specifically for thumbnailing, and can call paintTile() itself with the appropriate parameters. My misguided idea would have had paintThumbnail() somehow figure out the physical Twip coordinates of the current location (for text documents, the insertion caret location) in the document. (Or, as LibreOfficeKit for some reason calls them, "logical" coordinates, even if a Twip is a very physical length unit.) Then it would have called paintTile() with those coordinates. But it turned out to be rather hard to figure out the Twip coordinates of the current location in the document. Mert's idea was that when a document is opened for thumbnailing, only Online actually needs to know that. From LibreOfficeKit's and core's point of view it is a normal document load operation. Then Online performs the .uno:OpenHyperlink magic, which makes core move the current position to the requested "target" or "mark" (the terminology varies) location. And then a "cursor" callback is used by Online to get the Twip coordinates of the target. It is a bit unclear to me whether .uno:HyperLink causes the document to be opened an extra time, but whatever, this way is said to work. So let's do it like that. This reverts the paintThumbnail part of 1aa37ca99112c0760552600d7774ba7224581c5b. Change-Id: I8f3d9917ee362c1518834fc10a57c57ebc4a6edb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148390 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index c143662d7dd4..217b537fa214 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -3635,11 +3635,9 @@ void DesktopLOKTest::testABI() CPPUNIT_ASSERT_EQUAL(documentClassOffset(67), offsetof(struct _LibreOfficeKitDocumentClass, getEditMode)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(68), offsetof(struct _LibreOfficeKitDocumentClass, setViewTimezone)); -CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), offsetof(struct _LibreOfficeKitDocumentClass, paintThumbnail)); - // As above -CPPUNIT_ASSERT_EQUAL(documentClassOffset(70), sizeof(struct _LibreOfficeKitDocumentClass)); +CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), sizeof(struct _LibreOfficeKitDocumentClass)); } CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 903dc2b06687..ee1f47a8ea96 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1114,12 +1114,6 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, const int nCanvasWidth, const int nCanvasHeight, const int nTilePosX, const int nTilePosY, const int nTileWidth, const int nTileHeight); -static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, - unsigned char* pBuffer, - int bufferWidth, - int bufferHeight, - int width, - const char* pURL); #ifdef IOS static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, void* rCGContext, @@ -1393,7 +1387,6 @@ LibLODocument_Impl::LibLODocument_Impl(uno::Reference xC m_pDocumentClass->setPartMode = doc_setPartMode; m_pDocumentClass->getEditMode = doc_getEditMode; m_pDocumentClass->paintTile = doc_paintTile; -m_pDocumentClass->paintThumbnail = doc_paintThumbnail; #ifdef IOS m_pDocumentClass->paintTileToCGContext = doc_paintTileToCGContext; #endif @@ -4015,33 +4008,6 @@ static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, #endif -static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, - unsigned char* p
[Libreoffice-commits] core.git: include/LibreOfficeKit
include/LibreOfficeKit/LibreOfficeKit.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f3a0ed5d63823a1a111de7330d4ddbaf4e0b6d41 Author: Tor Lillqvist AuthorDate: Tue Mar 7 13:03:14 2023 +0200 Commit: Tor Lillqvist CommitDate: Tue Mar 7 11:06:11 2023 + Fix Doxygen comment thinko: dumpState() is in lok::Office, not in lok::Document Change-Id: I87626370fdd8cbe906ed31d1b8c92234696e9708 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148414 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 09d3e91e8640..a54c364737c6 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -119,7 +119,7 @@ struct _LibreOfficeKitClass /// @see lok::Office::setOption void (*setOption) (LibreOfficeKit* pThis, const char* pOption, const char* pValue); -/// @see lok::Document::dumpState +/// @see lok::Office::dumpState /// @since LibreOffice 7.5 void (*dumpState) (LibreOfficeKit* pThis, const char* pOptions, char** pState);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - desktop/source include/LibreOfficeKit
desktop/source/lib/init.cxx | 23 +-- include/LibreOfficeKit/LibreOfficeKit.h |7 +-- include/LibreOfficeKit/LibreOfficeKit.hxx | 24 ++-- 3 files changed, 48 insertions(+), 6 deletions(-) New commits: commit b8e528ee27dce7b3bc742fd6c63af41fbd3608ed Author: Tor Lillqvist AuthorDate: Tue Feb 28 18:23:06 2023 +0200 Commit: Tor Lillqvist CommitDate: Wed Mar 1 09:35:37 2023 + Improve the LibreOfficeKit Document::paintThumbnail() API No implementation yet. Change-Id: Ie1dc955bc8b589bd336af0545a2270cbe84a8b9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148028 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148032 Tested-by: Tor Lillqvist diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 2bf2bb676016..c584408b5e8d 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1114,7 +1114,12 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, const int nCanvasWidth, const int nCanvasHeight, const int nTilePosX, const int nTilePosY, const int nTileWidth, const int nTileHeight); -static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, unsigned char* pBuffer, int x, int y); +static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, + unsigned char* pBuffer, + int bufferWidth, + int bufferHeight, + int width, + const char* pURL); #ifdef IOS static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, void* rCGContext, @@ -4007,8 +4012,14 @@ static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, #endif -static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, unsigned char* pBuffer, int x, int y) +static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, + unsigned char* pBuffer, + int bufferWidth, + int bufferHeight, + int width, + const char* pURL) { +#if 0 constexpr float zoom = 0.5f; constexpr int pixelWidth = 120; constexpr int pixelHeight = 120; @@ -4018,6 +4029,14 @@ static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, unsigned char* pBu constexpr int offsetYTwips = 15 * 15; doc_paintTile(pThis, pBuffer, pixelWidth, pixelHeight, x-offsetXTwips, y-offsetYTwips, pixelWidthTwips, pixelHeightTwips); +#else +(void) pThis; +(void) pBuffer; +(void) bufferWidth; +(void) bufferHeight; +(void) width; +(void) pURL; +#endif } static void doc_paintPartTile(LibreOfficeKitDocument* pThis, diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 4de2380998b4..09d3e91e8640 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -501,10 +501,13 @@ struct _LibreOfficeKitDocumentClass /// @see lok::Document::setViewTimezone(). void (*setViewTimezone) (LibreOfficeKitDocument* pThis, int nId, const char* timezone); +/// @see lok::Document::paintThumbnail(). void (*paintThumbnail) (LibreOfficeKitDocument* pThis, unsigned char* pBuffer, -int x, -int y); +int bufferWidth, +int bufferHeight, +int width, +const char* pURL); #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index cf17922fab06..e418bd88a316 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -886,9 +886,29 @@ public: mpDoc->pClass->setViewTimezone(mpDoc, nId, timezone); } -void paintThumbnail(unsigned char* pBuffer, int x, int y) +/** + * Create a thumbnail of a location in the document. + * + * @param pBuffer Where the thumbnail is painted. Same format as a tile painted + * by paintTile(). + * @param bufferWidth number of pixels in a row of pBuffer. + * @param bufferHeight number of pixels in a column of pBuffer. + * @param width logical width of the rendered rectangle, in TWIPs. + * @param pURL Just the fragment part of a URL, indicating the location in the document + * to render as a thumbnail. As returned by extractRequest(), or null, meaning the start + * of the document. + * + * Note that there is no parameter for the logical
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/source include/LibreOfficeKit
desktop/source/lib/init.cxx | 23 +-- include/LibreOfficeKit/LibreOfficeKit.h |7 +-- include/LibreOfficeKit/LibreOfficeKit.hxx | 24 ++-- 3 files changed, 48 insertions(+), 6 deletions(-) New commits: commit f8ab2cd237ce862d113e7782ca68513631ba2258 Author: Tor Lillqvist AuthorDate: Tue Feb 28 18:23:06 2023 +0200 Commit: Tor Lillqvist CommitDate: Wed Mar 1 09:12:17 2023 + Improve the LibreOfficeKit Document::paintThumbnail() API No implementation yet. Change-Id: Ie1dc955bc8b589bd336af0545a2270cbe84a8b9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148028 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148031 Tested-by: Tor Lillqvist diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 452ae0b60a64..fa2494f9ca18 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1115,7 +1115,12 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, const int nCanvasWidth, const int nCanvasHeight, const int nTilePosX, const int nTilePosY, const int nTileWidth, const int nTileHeight); -static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, unsigned char* pBuffer, int x, int y); +static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, + unsigned char* pBuffer, + int bufferWidth, + int bufferHeight, + int width, + const char* pURL); #ifdef IOS static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, void* rCGContext, @@ -4011,8 +4016,14 @@ static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, #endif -static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, unsigned char* pBuffer, int x, int y) +static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, + unsigned char* pBuffer, + int bufferWidth, + int bufferHeight, + int width, + const char* pURL) { +#if 0 constexpr float zoom = 0.5f; constexpr int pixelWidth = 120; constexpr int pixelHeight = 120; @@ -4022,6 +4033,14 @@ static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, unsigned char* pBu constexpr int offsetYTwips = 15 * 15; doc_paintTile(pThis, pBuffer, pixelWidth, pixelHeight, x-offsetXTwips, y-offsetYTwips, pixelWidthTwips, pixelHeightTwips); +#else +(void) pThis; +(void) pBuffer; +(void) bufferWidth; +(void) bufferHeight; +(void) width; +(void) pURL; +#endif } static void doc_paintPartTile(LibreOfficeKitDocument* pThis, diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 4de2380998b4..09d3e91e8640 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -501,10 +501,13 @@ struct _LibreOfficeKitDocumentClass /// @see lok::Document::setViewTimezone(). void (*setViewTimezone) (LibreOfficeKitDocument* pThis, int nId, const char* timezone); +/// @see lok::Document::paintThumbnail(). void (*paintThumbnail) (LibreOfficeKitDocument* pThis, unsigned char* pBuffer, -int x, -int y); +int bufferWidth, +int bufferHeight, +int width, +const char* pURL); #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 17fc518fbe13..04a3b82e6eca 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -886,9 +886,29 @@ public: mpDoc->pClass->setViewTimezone(mpDoc, nId, timezone); } -void paintThumbnail(unsigned char* pBuffer, int x, int y) +/** + * Create a thumbnail of a location in the document. + * + * @param pBuffer Where the thumbnail is painted. Same format as a tile painted + * by paintTile(). + * @param bufferWidth number of pixels in a row of pBuffer. + * @param bufferHeight number of pixels in a column of pBuffer. + * @param width logical width of the rendered rectangle, in TWIPs. + * @param pURL Just the fragment part of a URL, indicating the location in the document + * to render as a thumbnail. As returned by extractRequest(), or null, meaning the start + * of the document. + * + * Note that there is no parameter for the logical
[Libreoffice-commits] core.git: desktop/source include/LibreOfficeKit
desktop/source/lib/init.cxx | 23 +-- include/LibreOfficeKit/LibreOfficeKit.h |7 +-- include/LibreOfficeKit/LibreOfficeKit.hxx | 24 ++-- 3 files changed, 48 insertions(+), 6 deletions(-) New commits: commit 91afabee6bece4cbf61a8f32a6e6a69becd857ae Author: Tor Lillqvist AuthorDate: Tue Feb 28 18:23:06 2023 +0200 Commit: Tor Lillqvist CommitDate: Wed Mar 1 08:28:21 2023 + Improve the LibreOfficeKit Document::paintThumbnail() API No implementation yet. Change-Id: Ie1dc955bc8b589bd336af0545a2270cbe84a8b9c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148028 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index eee57facee65..903dc2b06687 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1114,7 +1114,12 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, const int nCanvasWidth, const int nCanvasHeight, const int nTilePosX, const int nTilePosY, const int nTileWidth, const int nTileHeight); -static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, unsigned char* pBuffer, int x, int y); +static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, + unsigned char* pBuffer, + int bufferWidth, + int bufferHeight, + int width, + const char* pURL); #ifdef IOS static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, void* rCGContext, @@ -4010,8 +4015,14 @@ static void doc_paintTileToCGContext(LibreOfficeKitDocument* pThis, #endif -static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, unsigned char* pBuffer, int x, int y) +static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, + unsigned char* pBuffer, + int bufferWidth, + int bufferHeight, + int width, + const char* pURL) { +#if 0 constexpr float zoom = 0.5f; constexpr int pixelWidth = 120; constexpr int pixelHeight = 120; @@ -4021,6 +4032,14 @@ static void doc_paintThumbnail(LibreOfficeKitDocument* pThis, unsigned char* pBu constexpr int offsetYTwips = 15 * 15; doc_paintTile(pThis, pBuffer, pixelWidth, pixelHeight, x-offsetXTwips, y-offsetYTwips, pixelWidthTwips, pixelHeightTwips); +#else +(void) pThis; +(void) pBuffer; +(void) bufferWidth; +(void) bufferHeight; +(void) width; +(void) pURL; +#endif } static void doc_paintPartTile(LibreOfficeKitDocument* pThis, diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h index 4de2380998b4..09d3e91e8640 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -501,10 +501,13 @@ struct _LibreOfficeKitDocumentClass /// @see lok::Document::setViewTimezone(). void (*setViewTimezone) (LibreOfficeKitDocument* pThis, int nId, const char* timezone); +/// @see lok::Document::paintThumbnail(). void (*paintThumbnail) (LibreOfficeKitDocument* pThis, unsigned char* pBuffer, -int x, -int y); +int bufferWidth, +int bufferHeight, +int width, +const char* pURL); #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY }; diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx index 17fc518fbe13..04a3b82e6eca 100644 --- a/include/LibreOfficeKit/LibreOfficeKit.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -886,9 +886,29 @@ public: mpDoc->pClass->setViewTimezone(mpDoc, nId, timezone); } -void paintThumbnail(unsigned char* pBuffer, int x, int y) +/** + * Create a thumbnail of a location in the document. + * + * @param pBuffer Where the thumbnail is painted. Same format as a tile painted + * by paintTile(). + * @param bufferWidth number of pixels in a row of pBuffer. + * @param bufferHeight number of pixels in a column of pBuffer. + * @param width logical width of the rendered rectangle, in TWIPs. + * @param pURL Just the fragment part of a URL, indicating the location in the document + * to render as a thumbnail. As returned by extractRequest(), or null, meaning the start + * of the document. + * + * Note that there is no parameter for the logical height of the + * rendered rectangle. The aspect ratio of the rendered rectangle + * is dete
[Libreoffice-commits] core.git: external/cairo
external/cairo/pixman/pixman-wasm.patch |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a62cb6db8210771c487dd934158e01c3d2db77af Author: Tor Lillqvist AuthorDate: Mon Feb 27 11:37:35 2023 +0200 Commit: Tor Lillqvist CommitDate: Mon Feb 27 10:55:10 2023 + It seems to work to compile also the MMX code for WASM Change-Id: I27b56297a07e248102cae1bee4074b7be422ce23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147875 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/external/cairo/pixman/pixman-wasm.patch b/external/cairo/pixman/pixman-wasm.patch index c76af875cd51..a04aa7ccca1b 100644 --- a/external/cairo/pixman/pixman-wasm.patch +++ b/external/cairo/pixman/pixman-wasm.patch @@ -45,7 +45,7 @@ { +#if defined(__EMSCRIPTEN__) + -+return X86_SSE | X86_SSE2 | X86_SSSE3; ++return X86_MMX | X86_MMX_EXTENSIONS | X86_SSE | X86_SSE2 | X86_SSSE3; + +#else uint32_t a, b, c, d;
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - basic/Library_sb.mk
basic/Library_sb.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4e5d0e93ea571ca10b0d920170b7bb9f3179756b Author: Tor Lillqvist AuthorDate: Wed Feb 22 14:22:15 2023 +0200 Commit: Tor Lillqvist CommitDate: Mon Feb 27 06:30:59 2023 + Fix --disable-scripting build (for example for WASM) Was broken by ccd0ef98f76011f108f8ea1d282b96386dba0a6a. Change-Id: I37f3cf14e14ca32919d54f3d0cddbc042c2a7056 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147463 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147749 Tested-by: Tor Lillqvist diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk index 28effaaae0e1..f640e366a50c 100644 --- a/basic/Library_sb.mk +++ b/basic/Library_sb.mk @@ -71,7 +71,6 @@ $(eval $(call gb_Library_add_exception_objects,sb,\ basic/source/classes/sb \ basic/source/classes/sbunoobj \ basic/source/classes/sbxmod \ - basic/source/comp/basiccharclass \ basic/source/comp/buffer \ basic/source/comp/codegen \ basic/source/comp/dim \ @@ -107,6 +106,7 @@ $(eval $(call gb_Library_add_exception_objects,sb,\ basic/source/runtime/methods \ basic/source/runtime/methods1 \ basic/source/classes/sbintern \ + basic/source/comp/basiccharclass \ basic/source/sbx/sbxarray \ basic/source/sbx/sbxbool \ basic/source/sbx/sbxbyte \
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/Module_vcl.mk
vcl/Module_vcl.mk |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 5c0044c81649a5fa239b8d97edda8bbfa371a282 Author: Tor Lillqvist AuthorDate: Wed Jan 11 12:56:04 2023 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 24 07:59:20 2023 + Don't bother building the vcldemo executable for WASM unless using Qt5 Reduces build time a bit. Sadly, we do need to build soffice.wasm also when not using Qt5, because wasm/Makefile.am in online uses its .linkdeps file. Change-Id: I48f67598050208220e63e3a0ff627f6420ff837f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145353 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147566 Tested-by: Tor Lillqvist diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 596ed5b8c03a..b6d06a6bc351 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -37,7 +37,9 @@ $(eval $(call gb_Module_add_targets,vcl,\ $(if $(filter DESKTOP FUZZERS,$(BUILD_TYPE)), \ StaticLibrary_vclmain \ $(if $(or $(DISABLE_GUI),$(DISABLE_DYNLOADING)), \ -$(if $(filter EMSCRIPTEN,$(OS)),Executable_vcldemo) \ +$(if $(filter EMSCRIPTEN,$(OS)), \ +$(if $(ENABLE_QT5),Executable_vcldemo) \ +) \ , \ $(if $(filter LINUX MACOSX SOLARIS WNT %BSD,$(OS)), \ Executable_vcldemo \
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/window/builder.cxx | 40 +++- 1 file changed, 39 insertions(+), 1 deletion(-) New commits: commit 031be329f6a64e56002ebb10e2e660333dd4667a Author: Tor Lillqvist AuthorDate: Tue Jan 10 17:55:01 2023 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 24 07:58:49 2023 + Make the "custom widgets" for the notebookbar work in COWASM Because building for WASM for some reason doesn't use the native-code.py approach, we need to duplicate part of what that script would produce. Change-Id: Iecb200b4b0d693914f57f6f73d5025626f15dcf8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145283 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147565 Tested-by: Tor Lillqvist diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 9c6e8d97881a..047fd6e4ae9c 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -1478,7 +1479,42 @@ void VclBuilderPreload() } #if defined DISABLE_DYNLOADING && !HAVE_FEATURE_DESKTOP + +// This ifdef branch is mainly for building for the Collabora Online +// -based mobile apps for Android and iOS. + extern "C" VclBuilder::customMakeWidget lo_get_custom_widget_func(const char* name); + +#elif defined EMSCRIPTEN && !ENABLE_QT5 + +// This branch is mainly for building for WASM, and especially for +// Collabora Online in the browser, where code from core and Collabora +// Online is compiled to WASM and linked into a single WASM binary. +// (Not for Allotropia's Qt-based LibreOffice in the browser.) + +// When building core for WASM it doesn't use the same +// solenv/bin/native-code.py thing as the mobile apps, even if in both +// cases everything is linked statically. So there is no generated +// native-code.h, and we can't use lo_get_custom_widget_func() from +// that. So cheat and duplicate the code from an existing generated +// native-code.h. It's just a handful of lines anyway. + +extern "C" void makeNotebookbarTabControl(VclPtr , const VclPtr , VclBuilder::stringmap ); +extern "C" void makeNotebookbarToolBox(VclPtr , const VclPtr , VclBuilder::stringmap ); + +static struct { const char *name; VclBuilder::customMakeWidget func; } custom_widgets[] = { +{ "makeNotebookbarTabControl", makeNotebookbarTabControl }, +{ "makeNotebookbarToolBox", makeNotebookbarToolBox }, +}; + +static VclBuilder::customMakeWidget lo_get_custom_widget_func(const char* name) +{ +for (size_t i = 0; i < sizeof(custom_widgets) / sizeof(custom_widgets[0]); i++) +if (strcmp(name, custom_widgets[i].name) == 0) +return custom_widgets[i].func; +return nullptr; +} + #endif namespace @@ -1538,7 +1574,9 @@ VclBuilder::customMakeWidget GetCustomMakeWidget(const OString& rName) else pFunction = reinterpret_cast( aI->second->getFunctionSymbol(sFunction)); -#elif !HAVE_FEATURE_DESKTOP +#elif !HAVE_FEATURE_DESKTOP || (defined EMSCRIPTEN && !ENABLE_QT5) +// This ifdef branch is mainly for building for either the +// Android or iOS apps, or the Collabora Online as WASM thing. pFunction = lo_get_custom_widget_func(sFunction.toUtf8().getStr()); SAL_WARN_IF(!pFunction, "vcl.builder", "Could not find " << sFunction); assert(pFunction);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - tools/source
tools/source/misc/extendapplicationenvironment.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7a0d7d6834ad5efd879968f706b75954e76acfa8 Author: Tor Lillqvist AuthorDate: Fri Dec 30 12:55:31 2022 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 24 07:58:22 2023 + I get "warning: unsupported syscall: __sys_prlimit64" in WASM so avoid that Change-Id: I8a9a19d3c7757e1b7e1d194c439280a9d4824c3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144876 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147564 Tested-by: Tor Lillqvist diff --git a/tools/source/misc/extendapplicationenvironment.cxx b/tools/source/misc/extendapplicationenvironment.cxx index ce2237a88c70..07f9779ccc26 100644 --- a/tools/source/misc/extendapplicationenvironment.cxx +++ b/tools/source/misc/extendapplicationenvironment.cxx @@ -38,7 +38,7 @@ namespace tools { void extendApplicationEnvironment() { -#if defined UNX +#if defined UNX && !defined EMSCRIPTEN // Try to set RLIMIT_NOFILE as large as possible (failure is harmless): rlimit lim; if (getrlimit(RLIMIT_NOFILE, ) == 0)
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sal/osl
sal/osl/unx/process_impl.cxx |8 1 file changed, 8 insertions(+) New commits: commit 701f0037383d9e10befec710d2a59e9adc91e588 Author: Tor Lillqvist AuthorDate: Tue Dec 13 10:47:15 2022 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 24 07:57:46 2023 + Add Emscripten ifdef to bootstrap_getExecutableFile() Change-Id: I15d31873a27ace544a76a64fe354edb97b144424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144039 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147563 Tested-by: Tor Lillqvist diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx index 5d7f7644feb0..a61df87c2cff 100644 --- a/sal/osl/unx/process_impl.cxx +++ b/sal/osl/unx/process_impl.cxx @@ -97,6 +97,13 @@ oslProcessError bootstrap_getExecutableFile(rtl_uString ** ppFileURL) { oslProcessError result = osl_Process_E_NotFound; +#ifdef EMSCRIPTEN +// Just return some dummy file: URL for now to see what happens +OUString fileURL = "vnd.sun.star.pathname:/instdir/program/soffice"; +rtl_uString_acquire(fileURL.pData); +*ppFileURL = fileURL.pData; +return osl_Process_E_None; +#else #ifdef ANDROID /* Now with just a single DSO, this one from lo-bootstrap.c is as good as * any */ @@ -136,6 +143,7 @@ oslProcessError bootstrap_getExecutableFile(rtl_uString ** ppFileURL) } return result; +#endif } }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - static/README.wasm.md
static/README.wasm.md | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) New commits: commit b7bcd8b77006922e2df5388b67c0d73f3db72ce3 Author: Tor Lillqvist AuthorDate: Wed Dec 14 21:38:08 2022 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 24 07:56:40 2023 + Update Qt5 build instructions to use Allotropia's pre-patched repo Change-Id: I4b739e36a008940705b32a2c83757520e2ae1add Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144196 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147562 Tested-by: Tor Lillqvist diff --git a/static/README.wasm.md b/static/README.wasm.md index c0fe6354e1a5..2a8727a1a5aa 100644 --- a/static/README.wasm.md +++ b/static/README.wasm.md @@ -54,19 +54,14 @@ generally the Qt6 WASM documentation is much better, because it incorporated man information from the Qt Wiki. FWIW: Qt 5.15 LTS is not maintained publicly and Qt WASM has quite a few bugs. Most -WASM fixes from Qt 6 are needed for Qt 5.15 too. They can mainly be cherry-picked from: -- git log origin/dev src/plugins/platforms/wasm/ -- git log --grep wasm origin/dev +WASM fixes from Qt 6 are needed for Qt 5.15 too. Allotropia offers a Qt repository +with the necessary patches cherry-picked. -We will probably offer our own Qt repository clone at some point. - -But even the public Qt 5.15 branch is still broken, so better start with the v5.15.2 tag. - -git clone https://github.com/qt/qt5.git +git clone https://github.com/allotropia/qt5.git cd qt5 -git checkout v5.15.2 +git checkout v5.15.2+wasm ./init-repository --module-subset=qtbase -./configure -xplatform wasm-emscripten -feature-thread -prefix $PWD/install-5.15.2 +./configure -xplatform wasm-emscripten -feature-thread -prefix make -j module-qtbase Optionally you can add the configure flag "-compile-examples". But then you also have to
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - external/fontconfig
external/fontconfig/ExternalProject_fontconfig.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 05ae7910448a46aa7bb5698244db83d86ed9f1f9 Author: Tor Lillqvist AuthorDate: Wed Dec 14 21:50:09 2022 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 24 07:56:25 2023 + Need to mention libxml2 here, too, when building for Emscripten Forgot this in 563c28b6508ac836fbe46369a4d2d300cda650cf. Change-Id: I8675273c461f1b83b4dbe8bb7f9f58130a1d77fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144200 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147561 Tested-by: Tor Lillqvist diff --git a/external/fontconfig/ExternalProject_fontconfig.mk b/external/fontconfig/ExternalProject_fontconfig.mk index ed01c04aaf2f..3bbecf1d672a 100644 --- a/external/fontconfig/ExternalProject_fontconfig.mk +++ b/external/fontconfig/ExternalProject_fontconfig.mk @@ -10,7 +10,7 @@ $(eval $(call gb_ExternalProject_ExternalProject,fontconfig)) $(eval $(call gb_ExternalProject_use_externals,fontconfig,\ - expat \ + $(if $(filter EMSCRIPTEN,$(OS)),libxml2,expat) \ freetype \ ))
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - solenv/gbuild
solenv/gbuild/platform/unxgcc.mk |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 55b095abcb655a9199be10243e2c6cf74d7e57f5 Author: Tor Lillqvist AuthorDate: Fri Dec 23 12:41:09 2022 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 24 07:56:02 2023 + Don't use symlinks for the Emscripten soffice.data and soffice.data.js.metadata Symlinks just complicate things. Disk space is cheap. soffice.data is under 100 megs even with Qt5. Note that after this you will need to clean out the existing soffice.data and soffice.data.js.metadata symlinks before you run make, otherwise you will get errors. As such, it is a bit weird that we unconditionally play around with soffice.data for *all* (non-CppunitTest) Executable targets. (Thus, for instance also for vcldemo and unoidl-read.) We should do this dance only for the soffice executable. And we should reduce the number of executables we build for Emscripten. Probably none other than soffice itself makes sense? Change-Id: I75f6719b92d83e88bf59d65c38aeeab47e0b29e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144781 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147560 Tested-by: Tor Lillqvist diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index f1cb77a63054..bfb860a41fc2 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -183,8 +183,8 @@ $(if $(filter TRUE,$(ENABLE_QT5)), \ sed -e 's/@APPNAME@/$(subst $(gb_Executable_EXT),,$(notdir $(1)))/' $(QT5_PLATFORMS_SRCDIR)/wasm_shell.html > $(dir $(1))qt_$(notdir $(1)); \ cp $(QT5_PLATFORMS_SRCDIR)/qtlogo.svg $(QT5_PLATFORMS_SRCDIR)/qtloader.js $(dir $(1)) ; \ ) \ -ln -sf $(call gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data $(dir $(1))/soffice.data ; \ -ln -sf $(call gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data.js.metadata $(dir $(1))/soffice.data.js.metadata \ +cp $(call gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data $(dir $(1))/soffice.data ; \ +cp $(call gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data.js.metadata $(dir $(1))/soffice.data.js.metadata \ ) endef
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - solenv/gbuild
solenv/gbuild/platform/unxgcc.mk |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit b7d19c5f2538507a0abae4e3b7c301b6f66f Author: Tor Lillqvist AuthorDate: Fri Dec 23 12:23:32 2022 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 24 07:55:38 2023 + Un-confuse Emscripten and Qt5 conditionals The embedded file system that we construct when building for Emscripten is not related to whether we use Qt5 or not. Change-Id: Ibf65cae06093d9130a19780c1116f8b9997c664b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144780 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147559 diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index 461d1f048390..f1cb77a63054 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -178,11 +178,13 @@ $(if $(filter Library,$(TARGETTYPE)), $(call gb_Helper_abbreviate_dirs,\ | cut -d' ' -f1-2 >> $(WORKDIR)/LinkTarget/$(2).exports.tmp && \ $(call gb_Helper_replace_if_different_and_touch,$(WORKDIR)/LinkTarget/$(2).exports.tmp, \ $(WORKDIR)/LinkTarget/$(2).exports,$(1 -$(if $(and $(filter CppunitTest Executable,$(TARGETTYPE)),$(filter EMSCRIPTEN,$(OS)),$(filter TRUE,$(ENABLE_QT5))), \ +$(if $(and $(filter CppunitTest Executable,$(TARGETTYPE)),$(filter EMSCRIPTEN,$(OS))), \ +$(if $(filter TRUE,$(ENABLE_QT5)), \ +sed -e 's/@APPNAME@/$(subst $(gb_Executable_EXT),,$(notdir $(1)))/' $(QT5_PLATFORMS_SRCDIR)/wasm_shell.html > $(dir $(1))qt_$(notdir $(1)); \ cp $(QT5_PLATFORMS_SRCDIR)/qtlogo.svg $(QT5_PLATFORMS_SRCDIR)/qtloader.js $(dir $(1)) ; \ -sed -e 's/@APPNAME@/$(subst $(gb_Executable_EXT),,$(notdir $(1)))/' $(QT5_PLATFORMS_SRCDIR)/wasm_shell.html > $(dir $(1))qt_$(notdir $(1)) ; \ +) \ ln -sf $(call gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data $(dir $(1))/soffice.data ; \ -ln -sf $(call gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data.js.metadata $(dir $(1))/soffice.data.js.metadata ; \ +ln -sf $(call gb_CustomTarget_get_workdir,static/emscripten_fs_image)/soffice.data.js.metadata $(dir $(1))/soffice.data.js.metadata \ ) endef
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/source i18nlangtag/source include/osl Repository.mk sal/emscripten sal/Library_lo-bootstrap.mk sal/Library_sal.mk sal/Modul
Repository.mk |6 + desktop/source/lib/init.cxx|8 --- i18nlangtag/source/languagetag/languagetag.cxx |6 - include/osl/detail/emscripten-bootstrap.h | 26 + sal/Library_lo-bootstrap.mk|9 sal/Library_sal.mk |2 - sal/Module_sal.mk |2 - sal/emscripten/lo-bootstrap.c | 19 ++ sal/rtl/bootstrap.cxx |6 - solenv/clang-format/excludelist|2 + unotools/source/i18n/resmgr.cxx| 10 ++--- 11 files changed, 86 insertions(+), 10 deletions(-) New commits: commit cae91e5b77c35e8b5cb9b0e543ae049dd0f72fd1 Author: Tor Lillqvist AuthorDate: Wed Dec 28 13:47:26 2022 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 24 07:55:10 2023 + Introduce lo_get_app_data_dir() for Emscripten, too And not just Android. Hardcoded to return "/instdir" to match what is in the emscripten_fs_image. Change-Id: I26d4ec5e02ec9900e35ca47f1565a13ad2b723b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144849 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147558 Tested-by: Tor Lillqvist diff --git a/Repository.mk b/Repository.mk index 8f3ff83ab181..80e511671626 100644 --- a/Repository.mk +++ b/Repository.mk @@ -335,6 +335,12 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ogltrans, \ OGLTrans \ )) +ifeq ($(OS),EMSCRIPTEN) +$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ + lo-bootstrap \ +)) +endif + ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE) $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ canvastools \ diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 72fab196c38a..452ae0b60a64 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -34,6 +34,10 @@ #include #endif +#ifdef EMSCRIPTEN +#include +#endif + #include #include #include @@ -7534,10 +7538,8 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char } else { -#ifdef ANDROID +#if defined ANDROID || defined EMSCRIPTEN aAppPath = OUString::fromUtf8(lo_get_app_data_dir()) + "/program"; -#elif defined __EMSCRIPTEN__ -aAppPath = OUString::fromUtf8("instdir/program"); #else // Fun conversion dance back and forth between URLs and system paths... OUString aAppURL; diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx index 92b9b5807e99..b54c2614e7f2 100644 --- a/i18nlangtag/source/languagetag/languagetag.cxx +++ b/i18nlangtag/source/languagetag/languagetag.cxx @@ -36,6 +36,10 @@ #include #endif +#ifdef EMSCRIPTEN +#include +#endif + using namespace com::sun::star; namespace { @@ -215,7 +219,7 @@ void LiblangtagDataRef::teardown() void LiblangtagDataRef::setupDataPath() { -#if defined(ANDROID) +#if defined(ANDROID) || defined(EMSCRIPTEN) maDataPath = OString(lo_get_app_data_dir()) + "/share/liblangtag"; #else // maDataPath is assumed to be empty here. diff --git a/include/osl/detail/emscripten-bootstrap.h b/include/osl/detail/emscripten-bootstrap.h new file mode 100644 index ..580964253377 --- /dev/null +++ b/include/osl/detail/emscripten-bootstrap.h @@ -0,0 +1,26 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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/. + */ + +#pragma once + +#if defined(EMSCRIPTEN) + +#ifdef __cplusplus +extern "C" { +#endif + +const char *lo_get_app_data_dir(void); + +#ifdef __cplusplus +} +#endif + +#endif // EMSCRIPTEN + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/Library_lo-bootstrap.mk b/sal/Library_lo-bootstrap.mk index 3dc4bf9dfeaa..1e727cdee427 100644 --- a/sal/Library_lo-bootstrap.mk +++ b/sal/Library_lo-bootstrap.mk @@ -10,6 +10,8 @@ $(eval $(call gb_Library_Library,lo-bootstrap)) +ifeq (ANDROID,$(OS)) + # We explicitly *don't* want gb_STDLIBS to be linked here $(eval $(call gb_Library_disable_standard_system_libs,lo-bootstrap)) @@ -22,6 +24,13 @@ $(eval $(call gb_Library_add_cobjects,lo-bootstrap,\ sal/android/libreofficekit-jni \ sal/android/lo-bootstrap \ )) +endif + +ifeq (EMSCRIPTEN,$(OS)) +$(eval $(call gb_Library_add_cobjects,lo-bootstrap,\ + sal/emscripten/lo-bootstrap \ +)) +endif $(eval $(call gb_Library_set_include,lo-bootstrap,\ $$(INCLUDE) \ di
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/source include/LibreOfficeKit
desktop/source/lib/init.cxx | 10 ++ include/LibreOfficeKit/LibreOfficeKitInit.h |4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) New commits: commit 9b59231edf524e359ae5bb92517c9f9a98b86030 Author: Tor Lillqvist AuthorDate: Mon Dec 12 17:59:30 2022 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 24 07:54:12 2023 + Attempt to add ifdefs for WASM (Emscripten) for LOKit-based code Change-Id: I5b2556d1be61fa3a1d7996ce8d61958fbe7984c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144002 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147557 Tested-by: Tor Lillqvist diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 399a42159cc3..72fab196c38a 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -7142,7 +7142,7 @@ static void lo_runLoop(LibreOfficeKit* /*pThis*/, LibreOfficeKitWakeCallback pWakeCallback, void* pData) { -#if defined(IOS) || defined(ANDROID) +#if defined(IOS) || defined(ANDROID) || defined(__EMSCRIPTEN__) Application::GetSolarMutex().acquire(); #endif @@ -7153,7 +7153,7 @@ static void lo_runLoop(LibreOfficeKit* /*pThis*/, Application::UpdateMainThread(); soffice_main(); } -#if defined(IOS) || defined(ANDROID) +#if defined(IOS) || defined(ANDROID) || defined(__EMSCRIPTEN__) vcl::lok::unregisterPollCallbacks(); Application::ReleaseSolarMutex(); #endif @@ -7536,6 +7536,8 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char { #ifdef ANDROID aAppPath = OUString::fromUtf8(lo_get_app_data_dir()) + "/program"; +#elif defined __EMSCRIPTEN__ +aAppPath = OUString::fromUtf8("instdir/program"); #else // Fun conversion dance back and forth between URLs and system paths... OUString aAppURL; @@ -7732,8 +7734,8 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char comphelper::ThreadPool::getSharedOptimalPool().shutdown(); } -// Turn off quick editing on IOS and ANDROID -#if defined IOS || defined ANDROID +// Turn off quick editing on iOS, Android and Emscripten +#if defined IOS || defined ANDROID || defined __EMSCRIPTEN__ if (officecfg::Office::Impress::Misc::TextObject::QuickEditing::get()) { std::shared_ptr batch(comphelper::ConfigurationChanges::create()); diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h index 08feb42c1e18..506f373c5108 100644 --- a/include/LibreOfficeKit/LibreOfficeKitInit.h +++ b/include/LibreOfficeKit/LibreOfficeKitInit.h @@ -259,13 +259,13 @@ typedef int (LokHookPreInit) ( const char *install_path, const char typedef int (LokHookPreInit2) ( const char *install_path, const char *user_profile_url, LibreOfficeKit** kit); -#if defined(IOS) || defined(ANDROID) +#if defined(IOS) || defined(ANDROID) || defined(__EMSCRIPTEN__) LibreOfficeKit *libreofficekit_hook_2(const char* install_path, const char* user_profile_path); #endif static LibreOfficeKit *lok_init_2( const char *install_path, const char *user_profile_url ) { -#if !defined(IOS) && !defined(ANDROID) +#if !defined(IOS) && !defined(ANDROID) && !defined(__EMSCRIPTEN__) void *dlhandle; char *imp_lib; LokHookFunction *pSym;
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/qa desktop/source include/LibreOfficeKit
desktop/qa/desktop_lib/test_desktop_lib.cxx | 16 ++ desktop/source/lib/init.cxx | 175 include/LibreOfficeKit/LibreOfficeKit.h | 10 + include/LibreOfficeKit/LibreOfficeKit.hxx | 10 + 4 files changed, 208 insertions(+), 3 deletions(-) New commits: commit ac1de680ae7f7d3ac71b73d3ebf2311a7f9e5451 Author: Tor Lillqvist AuthorDate: Tue Feb 21 13:19:42 2023 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 24 07:52:53 2023 + Extend LOKit API with functionality to extract a request and paint thumbnails Original author was Mert Tümer. Change-Id: I181a9955bcce1d5ee4c81e2a52445ef318dc4823 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147432 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 3908829f1918..4348da15a68b 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -3554,6 +3554,15 @@ void DesktopLOKTest::testABI() CPPUNIT_ASSERT_EQUAL(classOffset(9), offsetof(struct _LibreOfficeKitClass, getVersionInfo)); CPPUNIT_ASSERT_EQUAL(classOffset(10), offsetof(struct _LibreOfficeKitClass, runMacro)); CPPUNIT_ASSERT_EQUAL(classOffset(11), offsetof(struct _LibreOfficeKitClass, signDocument)); +CPPUNIT_ASSERT_EQUAL(classOffset(12), offsetof(struct _LibreOfficeKitClass, runLoop)); +CPPUNIT_ASSERT_EQUAL(classOffset(13), offsetof(struct _LibreOfficeKitClass, sendDialogEvent)); +CPPUNIT_ASSERT_EQUAL(classOffset(14), offsetof(struct _LibreOfficeKitClass, setOption)); +CPPUNIT_ASSERT_EQUAL(classOffset(15), offsetof(struct _LibreOfficeKitClass, dumpState)); +CPPUNIT_ASSERT_EQUAL(classOffset(16), offsetof(struct _LibreOfficeKitClass, extractRequest)); + +// When extending LibreOfficeKit with a new function pointer, add new assert for the offsetof the +// new function pointer and bump this assert for the size of the class. +CPPUNIT_ASSERT_EQUAL(classOffset(17), sizeof(struct _LibreOfficeKitClass)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(0), offsetof(struct _LibreOfficeKitDocumentClass, destroy)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(1), offsetof(struct _LibreOfficeKitDocumentClass, saveAs)); @@ -3631,10 +3640,11 @@ void DesktopLOKTest::testABI() CPPUNIT_ASSERT_EQUAL(documentClassOffset(67), offsetof(struct _LibreOfficeKitDocumentClass, getEditMode)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(68), offsetof(struct _LibreOfficeKitDocumentClass, setViewTimezone)); +CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), offsetof(struct _LibreOfficeKitDocumentClass, paintThumbnail)); + -// Extending is fine, update this, and add new assert for the offsetof the -// new method -CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), sizeof(struct _LibreOfficeKitDocumentClass)); +// As above +CPPUNIT_ASSERT_EQUAL(documentClassOffset(70), sizeof(struct _LibreOfficeKitDocumentClass)); } CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index d0e899b124f4..399a42159cc3 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -63,6 +63,7 @@ #include #include #include +#include #include #include #include @@ -175,6 +176,7 @@ // Needed for getUndoManager() #include #include +#include #include #include #include @@ -395,6 +397,97 @@ std::vector desktop::jsonToPropertyValuesVector(const char return aArguments; } +static bool extractLinks(const uno::Reference< container::XNameAccess >& xLinks, bool subcontent, OUStringBuffer& jsonText) +{ +const uno::Sequence< OUString > aNames( xLinks->getElementNames() ); + +const sal_uLong nLinks = aNames.getLength(); +const OUString* pNames = aNames.getConstArray(); +const OUString aProp_LinkDisplayName( "LinkDisplayName" ); +const OUString aProp_LinkTarget( "com.sun.star.document.LinkTarget" ); +bool bIsTarget = false; +for( sal_uLong i = 0; i < nLinks; i++ ) +{ +uno::Any aAny; +OUString aLink( *pNames++ ); + +bool bError = false; +try +{ +aAny = xLinks->getByName( aLink ); +} +catch(const uno::Exception&) +{ +// if the name of the target was invalid (like empty headings) +// no object can be provided +bError = true; +} +if(bError) +continue; + +uno::Reference< beans::XPropertySet > xTarget; +if( aAny >>= xTarget ) +{ +try +{ +// get name to display +aAny = xTarget->getPropertyValue( aProp_LinkDisplayName ); +OUString aDisplayName; +
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - external/redland
external/redland/UnpackedTarball_raptor.mk|1 + external/redland/raptor/raptor-emscripten.patch.1 | 12 2 files changed, 13 insertions(+) New commits: commit c1bc0e666588050b793738c7f19fd3e1322c44e6 Author: Tor Lillqvist AuthorDate: Thu Jan 12 16:01:00 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:34:16 2023 + Adapt to newer Emscripten SDK The check for platform in raptor's sort_r.h no longer worked with Emscripten 3.1.30. Looking for __EMSCRIPTEN__ explicitly helps. Change-Id: Ieccf723d809b4e90d44a8a510f71e12bd1d2e529 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145408 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147556 Tested-by: Tor Lillqvist diff --git a/external/redland/UnpackedTarball_raptor.mk b/external/redland/UnpackedTarball_raptor.mk index 619116c3380c..f829f6fb736b 100644 --- a/external/redland/UnpackedTarball_raptor.mk +++ b/external/redland/UnpackedTarball_raptor.mk @@ -22,6 +22,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,raptor,0)) $(eval $(call gb_UnpackedTarball_add_patches,raptor,\ external/redland/raptor/raptor-freebsd.patch.1 \ external/redland/raptor/raptor-msvc.patch.1 \ + external/redland/raptor/raptor-emscripten.patch.1 \ $(if $(filter-out WNT,$(OS)),external/redland/raptor/raptor-bundled-soname.patch.1) \ $(if $(filter ANDROID,$(OS)),external/redland/raptor/raptor-android.patch.1) \ external/redland/raptor/ubsan.patch \ diff --git a/external/redland/raptor/raptor-emscripten.patch.1 b/external/redland/raptor/raptor-emscripten.patch.1 new file mode 100644 index ..e3c53b35b7b0 --- /dev/null +++ b/external/redland/raptor/raptor-emscripten.patch.1 @@ -0,0 +1,12 @@ +-*- Mode: Diff -*- +--- raptor/src/sort_r.h raptor/src/sort_r.h +@@ -27,7 +27,7 @@ + defined AMIGA) + # define _SORT_R_BSD + #elif (defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ || \ +- defined __linux__ || defined __MINGW32__ || defined __GLIBC__) ++ defined __linux__ || defined __MINGW32__ || defined __GLIBC__ || defined __EMSCRIPTEN__) + # define _SORT_R_LINUX + #elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__) + # define _SORT_R_WINDOWS
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - solenv/gbuild
solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |2 ++ 1 file changed, 2 insertions(+) New commits: commit 4f07ec2d99c632356e3735400796ce4b823eb38d Author: Tor Lillqvist AuthorDate: Mon Feb 13 14:54:24 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:33:29 2023 + Use -O3 for Emscripten, seems to work Change-Id: I7effd75355ff81e6d4f85b1c6047c7656bfbb915 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147006 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147555 Tested-by: Tor Lillqvist diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk index 4ae925daf5d1..a69539b65403 100644 --- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk +++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk @@ -71,6 +71,8 @@ ifeq ($(HAVE_EXTERNAL_DWARF),TRUE) gb_DEBUGINFO_FLAGS += -gseparate-dwarf endif +gb_COMPILEROPTFLAGS := -O3 + # We need at least code elimination, otherwise linking OOMs even with 64GB. # So we "fake" -Og support to mean -O1 for Emscripten and always enable it for debug in configure. gb_COMPILERDEBUGOPTFLAGS := -O1
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - solenv/gbuild
solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |4 1 file changed, 4 insertions(+) New commits: commit 9fdb8d1230605ce57e4a2a8636b23005a22ea46a Author: Tor Lillqvist AuthorDate: Thu Feb 16 13:20:53 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:33:12 2023 + Add comment about using WASM exceptions Change-Id: I402bf56b89b3a18f854331915f827f7512fb05e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147152 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147554 diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk index fa7b51e54cc4..4ae925daf5d1 100644 --- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk +++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk @@ -32,6 +32,10 @@ gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO gb_Executable_EXT := .html ifeq ($(ENABLE_WASM_EXCEPTIONS),TRUE) +# Note that to really use WASM exceptions everywhere, you most probably want to also use +# CC=emcc -pthread -s USE_PTHREADS=1 -fwasm-exceptions -s SUPPORT_LONGJMP=wasm +# and CXX=em++ -pthread -s USE_PTHREADS=1 -fwasm-exceptions -s SUPPORT_LONGJMP=wasm +# in your autogen.input. Otherwise these flags won't propagate to all external libraries, I fear. gb_EMSCRIPTEN_EXCEPT = -fwasm-exceptions -s SUPPORT_LONGJMP=wasm gb_EMSCRIPTEN_CPPFLAGS += -s SUPPORT_LONGJMP=wasm else
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - static/README.wasm.md
static/README.wasm.md |4 1 file changed, 4 insertions(+) New commits: commit 26ad026bdd2dc6397465f9acdf18248ad6201e93 Author: Tor Lillqvist AuthorDate: Mon Feb 13 11:04:30 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:32:48 2023 + Mention that Emscripten 3.1.30 is known to work for COWASM Change-Id: Id01004121a306dea953b908c32acc7f2c0e6841c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146857 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147533 diff --git a/static/README.wasm.md b/static/README.wasm.md index 0ca4d3564413..c0fe6354e1a5 100644 --- a/static/README.wasm.md +++ b/static/README.wasm.md @@ -364,6 +364,10 @@ For instance, this autogen.input works for me: `--disable-gui` `--with-main-module=writer` +For building LO core for use in COWASM, it is known to work to use +Emscripten 3.1.30 (and not just 2.0.31 which is what the LO+Qt5 work +has been using). + ### That's all After all, in this case you are building LO core headless for it to be used by other software.
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - static/README.wasm.md
static/README.wasm.md |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1379b0adfb58eee93c2489cca71bfc83f1e1ffd1 Author: Tor Lillqvist AuthorDate: Mon Feb 13 10:56:36 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:32:31 2023 + Don't overload the word 'module' unnecessarily Change-Id: I10fb7d16192ddfb0802c976419c00302d4688c4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146856 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147532 diff --git a/static/README.wasm.md b/static/README.wasm.md index b9085fa9617a..0ca4d3564413 100644 --- a/static/README.wasm.md +++ b/static/README.wasm.md @@ -1,6 +1,6 @@ # Support for Emscripten Cross Build -This module provides support for building LibreOffice as WASM, with the Emscripten toolchain. +This subdirecctory provides support for building LibreOffice as WASM, with the Emscripten toolchain. You can build LibreOffice for WASM for two separate purposes: 1) Either to produce a WASM binary of LibreOffice as such, using Qt5 for
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - external/freetype
external/freetype/freetype-fd-hack.patch.0 |8 1 file changed, 8 insertions(+) New commits: commit b2c4f3804613e988b448b18d624de8c7e8983f35 Author: Tor Lillqvist AuthorDate: Fri Feb 10 11:15:21 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:32:15 2023 + Avoid implicit function declaration warnings Noticed when compiling with Emscripten for WASM, but might well happen in other cases, too. Change-Id: I37ae326af21204d81a6a3267831d7a0198d1d501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146744 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147531 diff --git a/external/freetype/freetype-fd-hack.patch.0 b/external/freetype/freetype-fd-hack.patch.0 index db2bdc9e92f6..c12d6739fc4c 100644 --- a/external/freetype/freetype-fd-hack.patch.0 +++ b/external/freetype/freetype-fd-hack.patch.0 @@ -1,6 +1,14 @@ # -*- Mode: Diff -*- --- src/base/ftsystem.c +++ src/base/ftsystem.c +@@ -24,6 +24,7 @@ +* +*/ + ++#include + + #include + #include FT_CONFIG_CONFIG_H @@ -237,6 +237,8 @@ const char* filepathname ) {
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - external/cairo
external/cairo/ExternalProject_pixman.mk |2 external/cairo/UnpackedTarball_pixman.mk |1 external/cairo/pixman/pixman-wasm.patch | 108 +++ 3 files changed, 110 insertions(+), 1 deletion(-) New commits: commit 43669709b81b9ca8487294a5d9d0d18d54dd361b Author: Tor Lillqvist AuthorDate: Thu Feb 9 14:24:07 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:31:37 2023 + Use SIMD in pixman for WASM Emscripten and WASM do have some support for SSSE3, so let's try to use it, with -msimd128. See https://emscripten.org/docs/porting/simd.html. WASM is not x86, though, so avoid use of inline x86 assembly, like the CPUID instruction. Emscripten does not have but does have , , and . Change-Id: Ic3a47291f6c6dee6843e93ccecc92a643b269cb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146691 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147530 diff --git a/external/cairo/ExternalProject_pixman.mk b/external/cairo/ExternalProject_pixman.mk index ac78b23d5c9e..29902b4c1f5c 100644 --- a/external/cairo/ExternalProject_pixman.mk +++ b/external/cairo/ExternalProject_pixman.mk @@ -28,7 +28,7 @@ $(call gb_ExternalProject_get_state_target,pixman,build) : $(if $(filter ANDROID,$(OS)),--disable-arm-simd --disable-arm-neon --disable-arm-a64-neon --disable-arm-iwmmxt) \ $(gb_CONFIGURE_PLATFORMS) \ $(if $(CROSS_COMPILING),$(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \ - $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-O3 -pthread") \ + $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-O3 -pthread -msimd128") \ && $(MAKE) \ ) $(call gb_Trace_EndRange,pixman,EXTERNAL) diff --git a/external/cairo/UnpackedTarball_pixman.mk b/external/cairo/UnpackedTarball_pixman.mk index 3f1f75616611..922ed9f24f22 100644 --- a/external/cairo/UnpackedTarball_pixman.mk +++ b/external/cairo/UnpackedTarball_pixman.mk @@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,pixman,$(PIXMAN_TARBALL),,cairo)) $(eval $(call gb_UnpackedTarball_add_patches,pixman,\ external/cairo/pixman/pixman-0.24.4.patch \ external/cairo/pixman/pixman-ubsan.patch \ + external/cairo/pixman/pixman-wasm.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/cairo/pixman/pixman-wasm.patch b/external/cairo/pixman/pixman-wasm.patch new file mode 100644 index ..c76af875cd51 --- /dev/null +++ b/external/cairo/pixman/pixman-wasm.patch @@ -0,0 +1,108 @@ +--- a/pixman/pixman/pixman-x86.c b/pixman/pixman/pixman-x86.c +@@ -77,13 +77,20 @@ + + #else + +-#define _PIXMAN_X86_64 \ +-(defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)) ++#if (defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)) ++#define _PIXMAN_X86_64 1 ++#else ++#define _PIXMAN_X86_64 0 ++#endif + + static pixman_bool_t + have_cpuid (void) + { +-#if _PIXMAN_X86_64 || defined (_MSC_VER) ++#if defined(__EMSCRIPTEN__) ++ ++return FALSE; ++ ++#elif _PIXMAN_X86_64 || defined (_MSC_VER) + + return TRUE; + +@@ -109,6 +109,8 @@ + #endif + } + ++#if !defined(__EMSCRIPTEN__) ++ + static void + pixman_cpuid (uint32_t feature, + uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d) +@@ -156,10 +156,17 @@ + #error Unknown compiler + #endif + } ++ ++#endif // !__EMSCRIPTEN__ + + static cpu_features_t + detect_cpu_features (void) + { ++#if defined(__EMSCRIPTEN__) ++ ++return X86_SSE | X86_SSE2 | X86_SSSE3; ++ ++#else + uint32_t a, b, c, d; + cpu_features_t features = 0; + +@@ -202,6 +202,8 @@ + } + + return features; ++ ++#endif // !__EMSCRIPTEN__ + } + + #endif +--- a/pixman/pixman/pixman-ssse3.c b/pixman/pixman/pixman-ssse3.c +@@ -28,7 +28,9 @@ + #endif + + #include ++#if !defined(__EMSCRIPTEN__) + #include ++#endif + #include + #include + #include +--- a/pixman/configure b/pixman/configure +@@ -14207,7 +14207,11 @@ + #if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)) + #error "Need GCC >= 3.4 for MMX intrinsics" + #endif ++#if !defined(__EMSCRIPTEN__) + #include ++#else ++#include ++#endif + #include + + /* Check support for block expressions */ +@@ -14308,7 +14308,9 @@ + # error "Need GCC >= 4.2 for SSE2 intrinsics on x86" + # endif + #endif ++#if !defined(__EMSCRIPTEN__) + #include ++#endif + #include + #include + int param; +@@ -14380,7 +14380,9 @@ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + ++#if !defined(__EMSCRIPTEN__) + #include ++#endif + #include + #include + #include
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - static/README.wasm.md
static/README.wasm.md | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) New commits: commit c9d40dcd1036fe84a10c2fe31e44f0a86f34bc4d Author: Tor Lillqvist AuthorDate: Mon Feb 6 11:57:15 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:30:46 2023 + Minor typo fixes and some additional information Change-Id: Ic0b76ca37dce37f88df62d80495e111c4d50818e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146572 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147529 diff --git a/static/README.wasm.md b/static/README.wasm.md index 8ef30f7605ac..b9085fa9617a 100644 --- a/static/README.wasm.md +++ b/static/README.wasm.md @@ -2,11 +2,11 @@ This module provides support for building LibreOffice as WASM, with the Emscripten toolchain. -You can build LibreOffice core for WASM for two separate purposes: -Either to produce a WASM binary of LibreOffice as such, using Qt5 as -the GUI, or just compiling the LibreOffice code to WASM libraries -without any UI for use in other software that has the UI, like -Collabora Online. +You can build LibreOffice for WASM for two separate purposes: 1) +Either to produce a WASM binary of LibreOffice as such, using Qt5 for +its GUI, or 2) just compiling LibreOffice core ("LibreOffice +Technology") to WASM without any UI for use in other software that +provides the UI, like Collabora Online built as WASM. The first purpose was the original reason for the WASM port and this document was originally written with that in mind. For the second @@ -350,7 +350,8 @@ Follow the instructions in the first part of this document. ### No Qt needed. -You don't need any dependencies other than those that building LO normally downloads and compiled when building core. +You don't need any dependencies other than those that normally are +downloaded and compiled when building LibreOffice. ### Set up LO @@ -366,3 +367,9 @@ For instance, this autogen.input works for me: ### That's all After all, in this case you are building LO core headless for it to be used by other software. + +Note that a soffice.wasm will be built, but that is just because of +how the makefilery has been set up. We do need the soffice.data file +that contains the in-memory file system needed by the LibreOffice +Technology core code during run-time, though. That is at the moment +built as a side-effect when building soffice.wasm.
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - static/README.wasm.md
static/README.wasm.md | 39 +-- 1 file changed, 37 insertions(+), 2 deletions(-) New commits: commit a9b8e9df244bc59111a922b21290331c9cafcb60 Author: Tor Lillqvist AuthorDate: Thu Feb 2 13:38:02 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:30:11 2023 + Add instructions for when building headless LO core for WASM Change-Id: Ic5fb943f8c26d21d94bafb815963960bdd2f26b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146497 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147527 diff --git a/static/README.wasm.md b/static/README.wasm.md index 7bca790acf7a..d345edd51baf 100644 --- a/static/README.wasm.md +++ b/static/README.wasm.md @@ -1,8 +1,19 @@ # Support for Emscripten Cross Build -This module provides support for emscripten cross build +This module provides support for building LibreOffice as WASM, with the Emscripten toolchain. -## Status +You can build LibreOffice core for WASM for two separate purposes: +Either to produce a WASM binary of LibreOffice as suchn, using Qt5 as +the GUI, or just compiling the LibreOffice code to WASM libraries +without any UI for use in other software that has the UI, like +Collabora Online. + +The first purpose was the original reason for the WASM port and this +document was originally written with that in mind. For the second +purpose, look towards the end of the document for the section +"Building headless LibreOffice as WASM for use in another product". + +## Status of LibreOffice as WASM with Qt The build generates a Writer-only LO build. You should be able to run either @@ -331,3 +342,27 @@ Emscripten supports standalone WASI binaries: - <https://emscripten.org/docs/introducing_emscripten/about_emscripten.html#about-emscripten-porting-code> - <https://emscripten.org/docs/compiling/Building-Projects.html> +## Building headless LibreOffice as WASM for use in another product + +### Set up Emscripten + +Follow the instructions in the first part of this document. + +### No Qt needed. + +You don't need any dependencies other than those that building LO normally downloads and compiled when building core. + +### Set up LO + +For instance, this autogen.input works for me: + +`--disable-debug` +`--enable-sal-log` +`--disable-crashdump` +`--host=wasm32-local-emscripten` +`--disable-gui` +`--with-main-module=writer` + +### That's all + +After all, in this case you are building LO core headless for it to be used by other software.
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - solenv/gbuild
solenv/gbuild/platform/com_GCC_defs.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 502f5139dfa27e8ab61699a52ea3327309fafd2c Author: Tor Lillqvist AuthorDate: Tue Jan 24 17:19:27 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:29:33 2023 + Clarify comment Change-Id: I33d10ea4f3ca35619d6f857d18b5c53a22d822a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146097 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147526 diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 3a14e841bc97..89e717ccd15a 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -280,7 +280,7 @@ endif # For Emscripten, the emcc command is a Python script that outputs annoying warnings like # .../emscripten/tools/building.py:638: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/emscripten_temp_0fvvg__1/conftest.js.jso.js' mode='w' encoding='utf-8'> -# into stderr, which makes the configure script think that there is a problem in +# into stderr, which makes a configure script think that there is a problem in # compiling even a microscopic test program with an option like -Werror which # surely *is* supported. Avoid this by setting PYTHONWARNINGS=ignore.
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/source
desktop/source/lib/init.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 5ef2aa0f4a129374a5808038d86e8f405af58acd Author: Tor Lillqvist AuthorDate: Tue Jan 24 15:43:15 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:29:16 2023 + Surround recently added code that breaks on COWASM with ifdef After 7a6324ea0d81bbe2bba09f8a7f5230342a4f4e85 I started getting UNO exceptions with the message "component context fails to supply service com.sun.star.xml.crypto.SEInitializer of type com.sun.star.xml.crypto.XSEInitializer". It is likely that it breaks in the iOS and Android apps, too, so bypass for those, too. Change-Id: Id08afbf6bea071c8b0b6564342716e0b064cb712 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146071 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147525 Tested-by: Tor Lillqvist diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 3304b4468409..d0e899b124f4 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3435,6 +3435,7 @@ static void doc_iniUnoCommands () return; } +#if !defined IOS && !defined ANDROID && !defined __EMSCRIPTEN__ uno::Reference xSEInitializer = xml::crypto::SEInitializer::create(xContext); if (!xSEInitializer.is()) { @@ -3448,6 +3449,7 @@ static void doc_iniUnoCommands () { SAL_WARN("lok", "iniUnoCommands: failed to create security context"); } +#endif SfxSlotPool& rSlotPool = SfxSlotPool::GetSlotPool(pViewFrame); uno::Reference xParser(util::URLTransformer::create(xContext));
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - solenv/gbuild
solenv/gbuild/platform/com_GCC_defs.mk | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) New commits: commit be06ff15ba720bc057b2192f4191b7f39f25b970 Author: Tor Lillqvist AuthorDate: Tue Jan 24 13:09:42 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:28:57 2023 + Use PYTHONWARNINGS=ignore instead of 'default' for Emscripten The Emscripten compiler, emcc is a Python script that wraps the actual compiler. It outputs annoying warnings like .../emscripten/tools/building.py:638: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/emscripten_temp_0fvvg__1/conftest.js.jso.js' mode='w' encoding='utf-8'> to stderr. (Ditto for em++.) Some steps in typical configure script think that a non-empty stderr means there was a problem in compiling a test program. This happens even for a microscopic test program with an option like -Werror which surely *is* supported. Avoid this by setting PYTHONWARNINGS=ignore. Change-Id: I11927fc7dccaa65a239ba65dfc7c6bb7487bf12d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146070 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147524 Tested-by: Tor Lillqvist diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 0cbe852539c9..3a14e841bc97 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -275,9 +275,16 @@ endif ifeq ($(COMPILER_PLUGINS_DEBUG),TRUE) gb_COMPILER_PLUGINS += -Xclang -plugin-arg-loplugin -Xclang --debug endif -# set CCACHE_CPP2=1 to prevent clang generating spurious warnings -# clear PYTHONWARNINGS to prevent noise from emscripten implementation -gb_COMPILER_SETUP += CCACHE_CPP2=1 $(if $(filter EMSCRIPTEN,$(OS)),PYTHONWARNINGS=default) + +# Set CCACHE_CPP2=1 to prevent Clang generating spurious warnings. + +# For Emscripten, the emcc command is a Python script that outputs annoying warnings like +# .../emscripten/tools/building.py:638: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/emscripten_temp_0fvvg__1/conftest.js.jso.js' mode='w' encoding='utf-8'> +# into stderr, which makes the configure script think that there is a problem in +# compiling even a microscopic test program with an option like -Werror which +# surely *is* supported. Avoid this by setting PYTHONWARNINGS=ignore. + +gb_COMPILER_SETUP += CCACHE_CPP2=1 $(if $(filter EMSCRIPTEN,$(OS)),PYTHONWARNINGS=ignore) gb_COMPILER_PLUGINS_SETUP := ICECC_EXTRAFILES=$(SRCDIR)/include/sal/log-areas.dox CCACHE_EXTRAFILES=$(SRCDIR)/include/sal/log-areas.dox SCCACHE_EXTRAFILES=$(SRCDIR)/include/sal/log-areas.dox gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS := \ -Xclang -plugin-arg-loplugin -Xclang --warnings-as-errors
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - external/cairo
external/cairo/ExternalProject_cairo.mk |2 +- external/cairo/ExternalProject_pixman.mk |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit b2d449152ea529f88778c532999c97b48e6fd75e Author: Tor Lillqvist AuthorDate: Mon Jan 23 16:29:42 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:28:29 2023 + Enforce compiling cairo and pixman for WASM with -O3 Earlier, no -O flag at all got used in the cairo and pixman builds. Which was sad, as these two libraries are performance-critical. Yes, this change is quick-and-dirty. The proper way would be to modify things in solenv/gbuild. But that is somewhat complicated. In general it seems fairly hard to make sure the same compiler flags get used for every external bundled library. Each external library is a special snowflake, more or less, with a differently structured ExternalProject makefile. For instance for the libwpd library (just picked randomly as an example), even -O2 gets used. (Which as such is OK.) This despite solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk apparently trying to enforce use of -O1 for Emscripten. This change has a visible impact on the performance of COWASM. Change-Id: I99d74db2da733134fde16661881856f9a81100f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146009 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147523 Tested-by: Tor Lillqvist diff --git a/external/cairo/ExternalProject_cairo.mk b/external/cairo/ExternalProject_cairo.mk index fd934906343b..b677098482ff 100644 --- a/external/cairo/ExternalProject_cairo.mk +++ b/external/cairo/ExternalProject_cairo.mk @@ -48,7 +48,7 @@ $(call gb_ExternalProject_get_state_target,cairo,build) : $(gb_RUN_CONFIGURE) ./configure \ $(if $(debug),STRIP=" ") \ $(if $(filter ANDROID iOS,$(OS)),CFLAGS="$(if $(debug),-g) $(ZLIB_CFLAGS) $(gb_VISIBILITY_FLAGS)") \ - $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS=-DCAIRO_NO_MUTEX" $(ZLIB_CFLAGS) -Wno-enum-conversion $(gb_EMSCRIPTEN_CPPFLAGS)" ) \ + $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-O3 -DCAIRO_NO_MUTEX $(ZLIB_CFLAGS) -Wno-enum-conversion $(gb_EMSCRIPTEN_CPPFLAGS)" ) \ $(if $(filter-out EMSCRIPTEN ANDROID iOS,$(OS)), \ CFLAGS="$(CFLAGS) $(call gb_ExternalProject_get_build_flags,cairo) $(ZLIB_CFLAGS)" \ LDFLAGS="$(call gb_ExternalProject_get_link_flags,cairo)" \ diff --git a/external/cairo/ExternalProject_pixman.mk b/external/cairo/ExternalProject_pixman.mk index 9293b9234013..ac78b23d5c9e 100644 --- a/external/cairo/ExternalProject_pixman.mk +++ b/external/cairo/ExternalProject_pixman.mk @@ -28,7 +28,7 @@ $(call gb_ExternalProject_get_state_target,pixman,build) : $(if $(filter ANDROID,$(OS)),--disable-arm-simd --disable-arm-neon --disable-arm-a64-neon --disable-arm-iwmmxt) \ $(gb_CONFIGURE_PLATFORMS) \ $(if $(CROSS_COMPILING),$(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \ - $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-pthread") \ + $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-O3 -pthread") \ && $(MAKE) \ ) $(call gb_Trace_EndRange,pixman,EXTERNAL)
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - solenv/gbuild
solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |1 - 1 file changed, 1 deletion(-) New commits: commit 1efd43cf08dbe36474bbccc99c5097112dd12b4b Author: Tor Lillqvist AuthorDate: Mon Jan 23 17:02:07 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:27:45 2023 + Bin line that was commented-out in December 2021 Change-Id: Ie6c6891d1a682d57e4606454fb6b295072e57644 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146038 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147522 Tested-by: Tor Lillqvist diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk index fdce92af0abe..fa7b51e54cc4 100644 --- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk +++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk @@ -62,7 +62,6 @@ gb_LINKERSTRIPDEBUGFLAGS := # This maps to g3, no source maps, but DWARF with current emscripten! # https://developer.chrome.com/blog/wasm-debugging-2020/ gb_DEBUGINFO_FLAGS = -g -#gb_DEBUGINFO_FLAGS = -gsource-map --source-map-base=file://$(WORKDIR)/LinkTarget/Executable ifeq ($(HAVE_EXTERNAL_DWARF),TRUE) gb_DEBUGINFO_FLAGS += -gseparate-dwarf
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - solenv/gbuild
solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |8 1 file changed, 8 insertions(+) New commits: commit 5506fba4d5d0eccd08f0dcea1164acd51c1f1f95 Author: Tor Lillqvist AuthorDate: Mon Jan 16 23:16:53 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:26:57 2023 + Adapt for --enable-wasm-exceptions Actually, it seems that to build core with --fwasm-exceptions for use in a LibreOffice Technology -using WASM executable, you need to compile *everything* with that (i.e. *all* of core's externals). Just these gbuild things are not enough to ensure that. You have to put CC=emcc -pthread -fwasm-exceptions -s SUPPORT_LONGJMP=wasm CXX=em++ -pthread -fwasm-exceptions -s SUPPORT_LONGJMP=wasm into your autogen.input. Change-Id: I10d21ad0f73e7e5d72864864d595077bd770f4f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145646 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147521 diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk index 8831aeeb5d54..fdce92af0abe 100644 --- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk +++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk @@ -39,7 +39,15 @@ gb_EMSCRIPTEN_EXCEPT = -s DISABLE_EXCEPTION_CATCHING=0 endif gb_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) + +ifeq ($(ENABLE_WASM_EXCEPTIONS),TRUE) +# Here we don't use += because gb_LinkTarget_EXCEPTIONFLAGS from com_GCC_defs.mk contains -fexceptions and +# gb_EMSCRIPTEN_EXCEPT already has -fwasm-exceptions +gb_LinkTarget_EXCEPTIONFLAGS = $(gb_EMSCRIPTEN_EXCEPT) +else gb_LinkTarget_EXCEPTIONFLAGS += $(gb_EMSCRIPTEN_EXCEPT) +endif + gb_LinkTarget_CFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT) ifeq ($(ENABLE_QT5),TRUE)
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - solenv/gbuild
solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk | 12 1 file changed, 8 insertions(+), 4 deletions(-) New commits: commit 378ea8aea5244ef419f3d0bb932125fa5c8b66a2 Author: Tor Lillqvist AuthorDate: Wed Jan 11 17:39:06 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:26:32 2023 + Use gb_EMSCRIPTEN_QTDEFS only when building with Qt5 Move -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE to gb_EMSCRIPTEN_CPPFLAGS. Change-Id: I435a8482e9d04d9c8218926865738397e2897109 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145354 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147520 Tested-by: Tor Lillqvist diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk index b0629894a07e..8831aeeb5d54 100644 --- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk +++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk @@ -18,7 +18,7 @@ gb_EMSCRIPTEN_PRE_JS_FILES = \ gb_RUN_CONFIGURE := $(SRCDIR)/solenv/bin/run-configure # avoid -s SAFE_HEAP=1 - c.f. gh#8584 this breaks source maps -gb_EMSCRIPTEN_CPPFLAGS := -pthread -s USE_PTHREADS=1 +gb_EMSCRIPTEN_CPPFLAGS := -pthread -s USE_PTHREADS=1 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) # Initial memory size and worker thread pool @@ -28,7 +28,7 @@ gb_EMSCRIPTEN_LDFLAGS += -s TOTAL_MEMORY=1GB -s PTHREAD_POOL_SIZE=4 # See emscripten.py, finalize_wasm, modify_wasm = True # So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK) gb_EMSCRIPTEN_LDFLAGS += --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16","UTF8ToString","allocateUTF8","printErr","ccall","cwrap"] -gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB +gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB gb_Executable_EXT := .html ifeq ($(ENABLE_WASM_EXCEPTIONS),TRUE) @@ -40,8 +40,12 @@ endif gb_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) gb_LinkTarget_EXCEPTIONFLAGS += $(gb_EMSCRIPTEN_EXCEPT) -gb_LinkTarget_CFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS) -gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_QTDEFS) $(gb_EMSCRIPTEN_EXCEPT) +gb_LinkTarget_CFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) +gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT) +ifeq ($(ENABLE_QT5),TRUE) +gb_LinkTarget_CFLAGS += $(gb_EMSCRIPTEN_QTDEFS) +gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_QTDEFS) +endif gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT) # Linker and compiler optimize + debug flags are handled in LinkTarget.mk
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - external/liborcus
external/liborcus/UnpackedTarball_liborcus.mk |1 + external/liborcus/liborcus-no-benchmark.patch.1 | 19 +++ 2 files changed, 20 insertions(+) New commits: commit 69ecf13f8a30bff2096b3e7bf5b87e79250a Author: Tor Lillqvist AuthorDate: Fri Jan 13 12:07:27 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:26:00 2023 + Don't bother building the liborcus benchmark It causes a problem when building with Emscripten and --enable-wasm-exceptions. Instead of fixing that problem, just don't bother building executables we won't run anyway. (Ideally liborcus should have some --disable-benchmark configure options, ping Kohei.) Change-Id: Ic8c1d51513793bba85dc2833cc8fd9ec5b97ce76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145645 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147519 Tested-by: Tor Lillqvist diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk index 30d3f0d78d1c..47d05e82c612 100644 --- a/external/liborcus/UnpackedTarball_liborcus.mk +++ b/external/liborcus/UnpackedTarball_liborcus.mk @@ -42,6 +42,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ external/liborcus/forcepoint-95.patch.1 \ external/liborcus/include.patch.0 \ external/liborcus/overrun.patch.0 \ + external/liborcus/liborcus-no-benchmark.patch.1 \ )) ifeq ($(OS),WNT) diff --git a/external/liborcus/liborcus-no-benchmark.patch.1 b/external/liborcus/liborcus-no-benchmark.patch.1 new file mode 100644 index ..a19cea836601 --- /dev/null +++ b/external/liborcus/liborcus-no-benchmark.patch.1 @@ -0,0 +1,19 @@ +-*- Mode: Diff -*- + +Don't build the benchmark directory. + +We won't run those anyway, and on some platforms building executables +here and there for random externals can be problematic. While at it, +skip the doc_example subdirectory too. + +--- liborcus/Makefile.in liborcus/Makefile.in +@@ -408,7 +408,7 @@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-SUBDIRS = src include benchmark doc_example ++SUBDIRS = src include + ACLOCAL_AMFLAGS = -I m4 + pcfiles = liborcus-@ORCUS_API_VERSION@.pc $(am__append_1) + pkgconfig_DATA = $(pcfiles)
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - solenv/gbuild solenv/inc
solenv/gbuild/platform/com_GCC_defs.mk |1 - solenv/gbuild/platform/com_MSC_defs.mk |1 - solenv/inc/doxygen.cfg |1 - solenv/inc/doxygen_doc.cfg |1 - solenv/inc/doxygen_tag.cfg |1 - 5 files changed, 5 deletions(-) New commits: commit fbd35ed547ed130e9846c0fbc1e8e6f08156a400 Author: Tor Lillqvist AuthorDate: Fri Jan 13 11:43:39 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:24:39 2023 + EXCEPTIONS_ON has no meaning Change-Id: I0ca0dcb76d342b451879788b57da03fb7d79e699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145456 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147518 diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 6eeda2fc03ab..0cbe852539c9 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -205,7 +205,6 @@ endif endif gb_LinkTarget_EXCEPTIONFLAGS := \ - -DEXCEPTIONS_ON \ -fexceptions ifeq ($(gb_ENABLE_DBGUTIL),$(false)) diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk index 928fd3400af1..ad425e9b5fdd 100644 --- a/solenv/gbuild/platform/com_MSC_defs.mk +++ b/solenv/gbuild/platform/com_MSC_defs.mk @@ -206,7 +206,6 @@ gb_CFLAGS_WERROR = $(if $(ENABLE_WERROR),-WX) gb_CXX03FLAGS := gb_LinkTarget_EXCEPTIONFLAGS := \ - -DEXCEPTIONS_ON \ -EHs \ gb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS) diff --git a/solenv/inc/doxygen.cfg b/solenv/inc/doxygen.cfg index 2bdabc731935..ed50d426549e 100644 --- a/solenv/inc/doxygen.cfg +++ b/solenv/inc/doxygen.cfg @@ -2017,7 +2017,6 @@ PREDEFINED = LINUX \ DBG_UTIL \ OSL_DEBUG_LEVEL=2 \ CUI \ - EXCEPTIONS_ON \ DOXYGEN_ONLY # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this diff --git a/solenv/inc/doxygen_doc.cfg b/solenv/inc/doxygen_doc.cfg index dfcf174ee559..78d2778f7a4b 100644 --- a/solenv/inc/doxygen_doc.cfg +++ b/solenv/inc/doxygen_doc.cfg @@ -2017,7 +2017,6 @@ PREDEFINED = LINUX \ DBG_UTIL \ OSL_DEBUG_LEVEL=2 \ CUI \ - EXCEPTIONS_ON \ DOXYGEN_ONLY # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this diff --git a/solenv/inc/doxygen_tag.cfg b/solenv/inc/doxygen_tag.cfg index a2f2e602612b..1ba9c17cdbfc 100644 --- a/solenv/inc/doxygen_tag.cfg +++ b/solenv/inc/doxygen_tag.cfg @@ -2017,7 +2017,6 @@ PREDEFINED = LINUX \ DBG_UTIL \ OSL_DEBUG_LEVEL=2 \ CUI \ - EXCEPTIONS_ON \ DOXYGEN_ONLY # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - configure.ac
configure.ac | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) New commits: commit 686a75b54ecfcceba6f1747c6b308b79624c3543 Author: Tor Lillqvist AuthorDate: Thu Jan 12 21:47:24 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:24:04 2023 + Fix Emscripten version check to still work with older SDK versions Change-Id: I051b5edd5936bcb94521f88ec7a7a762c66c9283 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145419 Tested-by: Jenkins Tested-by: Michael Stahl Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147517 Tested-by: Tor Lillqvist diff --git a/configure.ac b/configure.ac index 05534dc6a8c2..392e8020813c 100644 --- a/configure.ac +++ b/configure.ac @@ -1406,11 +1406,17 @@ if test "$_os" = "Emscripten"; then AS_IF([test -z "$EMSDK"], [AC_MSG_ERROR([No \$EMSDK environment variable.])]) EMSCRIPTEN_VERSION_H=$EMSDK/upstream/emscripten/cache/sysroot/include/emscripten/version.h -AS_IF([test ! -f "$EMSCRIPTEN_VERSION_H"], - [AC_MSG_ERROR([Could not find the in the Emscripten SDK.])]) -EMSCRIPTEN_MAJOR=$($GREP __EMSCRIPTEN_major__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p') -EMSCRIPTEN_MINOR=$($GREP __EMSCRIPTEN_minor__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p') -EMSCRIPTEN_TINY=$($GREP __EMSCRIPTEN_tiny__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p') +if test -f "$EMSCRIPTEN_VERSION_H"; then +EMSCRIPTEN_MAJOR=$($GREP __EMSCRIPTEN_major__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p') +EMSCRIPTEN_MINOR=$($GREP __EMSCRIPTEN_minor__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p') +EMSCRIPTEN_TINY=$($GREP __EMSCRIPTEN_tiny__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p') +else +EMSCRIPTEN_DEFINES=$(echo | emcc -dM -E - | $GREP __EMSCRIPTEN_) +EMSCRIPTEN_MAJOR=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p') +EMSCRIPTEN_MINOR=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p') +EMSCRIPTEN_TINY=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p') +fi + EMSCRIPTEN_VERSION="${EMSCRIPTEN_MAJOR}.${EMSCRIPTEN_MINOR}.${EMSCRIPTEN_TINY}" check_semantic_version_three_prefixed EMSCRIPTEN MIN
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - configure.ac
configure.ac | 12 1 file changed, 8 insertions(+), 4 deletions(-) New commits: commit 1cabf62a78a5d0cdef38dd16ad35fb20ab182529 Author: Tor Lillqvist AuthorDate: Thu Jan 12 15:45:11 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:23:03 2023 + Adapt to newer Emscripten SDK The __EMSCRIPTEN_major__, minor, and tiny macros are no longer predefined but only defined in . So grep that instead of running emcc -dM -E. Change-Id: I2383a906f9c746784449cd4606f653ab722b54de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145407 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147516 Tested-by: Tor Lillqvist diff --git a/configure.ac b/configure.ac index 75543fcdb289..05534dc6a8c2 100644 --- a/configure.ac +++ b/configure.ac @@ -1403,10 +1403,14 @@ EMSCRIPTEN_MIN_VERSION="${EMSCRIPTEN_MIN_MAJOR}.${EMSCRIPTEN_MIN_MINOR}.${EMSCRI if test "$_os" = "Emscripten"; then AC_MSG_CHECKING([if Emscripten is at least $EMSCRIPTEN_MIN_VERSION]) -EMSCRIPTEN_DEFINES=$(echo | emcc -dM -E - | $GREP __EMSCRIPTEN_) -EMSCRIPTEN_MAJOR=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p') -EMSCRIPTEN_MINOR=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p') -EMSCRIPTEN_TINY=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p') +AS_IF([test -z "$EMSDK"], + [AC_MSG_ERROR([No \$EMSDK environment variable.])]) + EMSCRIPTEN_VERSION_H=$EMSDK/upstream/emscripten/cache/sysroot/include/emscripten/version.h +AS_IF([test ! -f "$EMSCRIPTEN_VERSION_H"], + [AC_MSG_ERROR([Could not find the in the Emscripten SDK.])]) +EMSCRIPTEN_MAJOR=$($GREP __EMSCRIPTEN_major__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p') +EMSCRIPTEN_MINOR=$($GREP __EMSCRIPTEN_minor__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p') +EMSCRIPTEN_TINY=$($GREP __EMSCRIPTEN_tiny__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p') EMSCRIPTEN_VERSION="${EMSCRIPTEN_MAJOR}.${EMSCRIPTEN_MINOR}.${EMSCRIPTEN_TINY}" check_semantic_version_three_prefixed EMSCRIPTEN MIN
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - desktop/qa desktop/source include/LibreOfficeKit
desktop/qa/desktop_lib/test_desktop_lib.cxx | 16 ++ desktop/source/lib/init.cxx | 175 include/LibreOfficeKit/LibreOfficeKit.h | 10 + include/LibreOfficeKit/LibreOfficeKit.hxx | 10 + 4 files changed, 208 insertions(+), 3 deletions(-) New commits: commit 788165b04b68195f2fdf5fca0e6408fc52468833 Author: Tor Lillqvist AuthorDate: Tue Feb 21 13:19:42 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 18:21:41 2023 + Extend LOKit API with functionality to extract a request and paint thumbnails Original author was Mert Tümer. Change-Id: I181a9955bcce1d5ee4c81e2a52445ef318dc4823 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147433 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index b41a9c16f8d8..fa7791ae7ee4 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -3585,6 +3585,15 @@ void DesktopLOKTest::testABI() CPPUNIT_ASSERT_EQUAL(classOffset(9), offsetof(struct _LibreOfficeKitClass, getVersionInfo)); CPPUNIT_ASSERT_EQUAL(classOffset(10), offsetof(struct _LibreOfficeKitClass, runMacro)); CPPUNIT_ASSERT_EQUAL(classOffset(11), offsetof(struct _LibreOfficeKitClass, signDocument)); +CPPUNIT_ASSERT_EQUAL(classOffset(12), offsetof(struct _LibreOfficeKitClass, runLoop)); +CPPUNIT_ASSERT_EQUAL(classOffset(13), offsetof(struct _LibreOfficeKitClass, sendDialogEvent)); +CPPUNIT_ASSERT_EQUAL(classOffset(14), offsetof(struct _LibreOfficeKitClass, setOption)); +CPPUNIT_ASSERT_EQUAL(classOffset(15), offsetof(struct _LibreOfficeKitClass, dumpState)); +CPPUNIT_ASSERT_EQUAL(classOffset(16), offsetof(struct _LibreOfficeKitClass, extractRequest)); + +// When extending LibreOfficeKit with a new function pointer, add new assert for the offsetof the +// new function pointer and bump this assert for the size of the class. +CPPUNIT_ASSERT_EQUAL(classOffset(17), sizeof(struct _LibreOfficeKitClass)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(0), offsetof(struct _LibreOfficeKitDocumentClass, destroy)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(1), offsetof(struct _LibreOfficeKitDocumentClass, saveAs)); @@ -3662,10 +3671,11 @@ void DesktopLOKTest::testABI() CPPUNIT_ASSERT_EQUAL(documentClassOffset(67), offsetof(struct _LibreOfficeKitDocumentClass, getEditMode)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(68), offsetof(struct _LibreOfficeKitDocumentClass, setViewTimezone)); +CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), offsetof(struct _LibreOfficeKitDocumentClass, paintThumbnail)); + -// Extending is fine, update this, and add new assert for the offsetof the -// new method -CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), sizeof(struct _LibreOfficeKitDocumentClass)); +// As above +CPPUNIT_ASSERT_EQUAL(documentClassOffset(70), sizeof(struct _LibreOfficeKitDocumentClass)); } CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index b00497df127e..2bf2bb676016 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -61,6 +61,7 @@ #include #include #include +#include #include #include #include @@ -176,6 +177,7 @@ // Needed for getUndoManager() #include #include +#include #include #include #include @@ -402,6 +404,97 @@ std::vector desktop::jsonToPropertyValuesVector(const char return aArguments; } +static bool extractLinks(const uno::Reference< container::XNameAccess >& xLinks, bool subcontent, OUStringBuffer& jsonText) +{ +const uno::Sequence< OUString > aNames( xLinks->getElementNames() ); + +const sal_uLong nLinks = aNames.getLength(); +const OUString* pNames = aNames.getConstArray(); +const OUString aProp_LinkDisplayName( "LinkDisplayName" ); +const OUString aProp_LinkTarget( "com.sun.star.document.LinkTarget" ); +bool bIsTarget = false; +for( sal_uLong i = 0; i < nLinks; i++ ) +{ +uno::Any aAny; +OUString aLink( *pNames++ ); + +bool bError = false; +try +{ +aAny = xLinks->getByName( aLink ); +} +catch(const uno::Exception&) +{ +// if the name of the target was invalid (like empty headings) +// no object can be provided +bError = true; +} +if(bError) +continue; + +uno::Reference< beans::XPropertySet > xTarget; +if( aAny >>= xTarget ) +{ +try +{ +// get name to display +aAny = xTarget->getPropertyValue( aProp_LinkDisplayName ); +OUString aDisplayName; +
[Libreoffice-commits] core.git: cui/source
cui/source/options/optcolor.cxx | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) New commits: commit 6f29310fe83873c7d6844cf5e3089ca981e147db Author: Tor Lillqvist AuthorDate: Thu Feb 23 12:29:48 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 23 13:47:56 2023 + Don't call CuiResId() in a global static variable initialiser Instead, have a function that returns a reference to a local static variable. That local static is then initialised only when the function is called for the first time. Calling CuiResId() in a global initialiser is a bit questionable, and causes an uncaught exception when LO core is used in a WASM app. Possibly it would also have been problematic on other uncommon platforms. Change-Id: I4fd799ba3aa8d63fd3db1eb8cf6211aeed904ed2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147512 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index 2cb20a2650fa..4ad5d2b5e93f 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -161,9 +161,13 @@ const vEntryInfo[] = }; // Maps the names of default color schemes to the corresponding TranslateId -std::map const vColorSchemes = { -{"COLOR_SCHEME_LIBREOFFICE_AUTOMATIC", CuiResId(RID_COLOR_SCHEME_LIBREOFFICE_AUTOMATIC)}, -{"COLOR_SCHEME_LIBREOFFICE_DARK", CuiResId(RID_COLOR_SCHEME_LIBREOFFICE_DARK)} +const std::map () +{ +static std::map const vColorSchemes = { +{"COLOR_SCHEME_LIBREOFFICE_AUTOMATIC", CuiResId(RID_COLOR_SCHEME_LIBREOFFICE_AUTOMATIC)}, +{"COLOR_SCHEME_LIBREOFFICE_DARK", CuiResId(RID_COLOR_SCHEME_LIBREOFFICE_DARK)} +}; +return vColorSchemes; }; // If the color scheme name has a translated string, then return the translation @@ -171,8 +175,8 @@ std::map const vColorSchemes = { // For non-translatable color schemes, the ID and the name are the same OUString lcl_SchemeIdToTranslatedName(const OUString& sSchemeId) { -auto it = vColorSchemes.find(sSchemeId); -if (it != vColorSchemes.end()) +auto it = getColorSchemes().find(sSchemeId); +if (it != getColorSchemes().end()) return it->second; return sSchemeId; } @@ -181,7 +185,7 @@ OUString lcl_SchemeIdToTranslatedName(const OUString& sSchemeId) // For non-translatable color schemes, the ID and the name are the same OUString lcl_TranslatedNameToSchemeId(const OUString& sName) { -for (auto it = vColorSchemes.begin(); it != vColorSchemes.end(); ++it) +for (auto it = getColorSchemes().begin(); it != getColorSchemes().end(); ++it) if (it->second == sName) return it->first; return sName;
[Libreoffice-commits] core.git: basic/Library_sb.mk
basic/Library_sb.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d24b80c783746041b1ab838b2038aebc0c68a470 Author: Tor Lillqvist AuthorDate: Wed Feb 22 14:22:15 2023 +0200 Commit: Tor Lillqvist CommitDate: Wed Feb 22 18:40:08 2023 + Fix --disable-scripting build (for example for WASM) Was broken by ccd0ef98f76011f108f8ea1d282b96386dba0a6a. Change-Id: I37f3cf14e14ca32919d54f3d0cddbc042c2a7056 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147463 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk index 28effaaae0e1..f640e366a50c 100644 --- a/basic/Library_sb.mk +++ b/basic/Library_sb.mk @@ -71,7 +71,6 @@ $(eval $(call gb_Library_add_exception_objects,sb,\ basic/source/classes/sb \ basic/source/classes/sbunoobj \ basic/source/classes/sbxmod \ - basic/source/comp/basiccharclass \ basic/source/comp/buffer \ basic/source/comp/codegen \ basic/source/comp/dim \ @@ -107,6 +106,7 @@ $(eval $(call gb_Library_add_exception_objects,sb,\ basic/source/runtime/methods \ basic/source/runtime/methods1 \ basic/source/classes/sbintern \ + basic/source/comp/basiccharclass \ basic/source/sbx/sbxarray \ basic/source/sbx/sbxbool \ basic/source/sbx/sbxbyte \
[Libreoffice-commits] core.git: desktop/qa desktop/source include/LibreOfficeKit
desktop/qa/desktop_lib/test_desktop_lib.cxx | 16 ++ desktop/source/lib/init.cxx | 175 include/LibreOfficeKit/LibreOfficeKit.h | 10 + include/LibreOfficeKit/LibreOfficeKit.hxx | 10 + 4 files changed, 208 insertions(+), 3 deletions(-) New commits: commit 1aa37ca99112c0760552600d7774ba7224581c5b Author: Tor Lillqvist AuthorDate: Tue Feb 21 13:19:42 2023 +0200 Commit: Tor Lillqvist CommitDate: Wed Feb 22 08:14:30 2023 + Extend LOKit API with functionality to extract a request and paint thumbnails Original author was Mert Tümer. Change-Id: I181a9955bcce1d5ee4c81e2a52445ef318dc4823 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147396 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index 3d2fc3c0d2fb..c143662d7dd4 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -3549,6 +3549,15 @@ void DesktopLOKTest::testABI() CPPUNIT_ASSERT_EQUAL(classOffset(9), offsetof(struct _LibreOfficeKitClass, getVersionInfo)); CPPUNIT_ASSERT_EQUAL(classOffset(10), offsetof(struct _LibreOfficeKitClass, runMacro)); CPPUNIT_ASSERT_EQUAL(classOffset(11), offsetof(struct _LibreOfficeKitClass, signDocument)); +CPPUNIT_ASSERT_EQUAL(classOffset(12), offsetof(struct _LibreOfficeKitClass, runLoop)); +CPPUNIT_ASSERT_EQUAL(classOffset(13), offsetof(struct _LibreOfficeKitClass, sendDialogEvent)); +CPPUNIT_ASSERT_EQUAL(classOffset(14), offsetof(struct _LibreOfficeKitClass, setOption)); +CPPUNIT_ASSERT_EQUAL(classOffset(15), offsetof(struct _LibreOfficeKitClass, dumpState)); +CPPUNIT_ASSERT_EQUAL(classOffset(16), offsetof(struct _LibreOfficeKitClass, extractRequest)); + +// When extending LibreOfficeKit with a new function pointer, add new assert for the offsetof the +// new function pointer and bump this assert for the size of the class. +CPPUNIT_ASSERT_EQUAL(classOffset(17), sizeof(struct _LibreOfficeKitClass)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(0), offsetof(struct _LibreOfficeKitDocumentClass, destroy)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(1), offsetof(struct _LibreOfficeKitDocumentClass, saveAs)); @@ -3626,10 +3635,11 @@ void DesktopLOKTest::testABI() CPPUNIT_ASSERT_EQUAL(documentClassOffset(67), offsetof(struct _LibreOfficeKitDocumentClass, getEditMode)); CPPUNIT_ASSERT_EQUAL(documentClassOffset(68), offsetof(struct _LibreOfficeKitDocumentClass, setViewTimezone)); +CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), offsetof(struct _LibreOfficeKitDocumentClass, paintThumbnail)); + -// Extending is fine, update this, and add new assert for the offsetof the -// new method -CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), sizeof(struct _LibreOfficeKitDocumentClass)); +// As above +CPPUNIT_ASSERT_EQUAL(documentClassOffset(70), sizeof(struct _LibreOfficeKitDocumentClass)); } CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest); diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index ed601003d042..1a077ce19500 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -67,6 +67,7 @@ #include #include #include +#include #include #include #include @@ -179,6 +180,7 @@ // Needed for getUndoManager() #include #include +#include #include #include #include @@ -399,6 +401,97 @@ std::vector desktop::jsonToPropertyValuesVector(const char return aArguments; } +static bool extractLinks(const uno::Reference< container::XNameAccess >& xLinks, bool subcontent, OUStringBuffer& jsonText) +{ +const uno::Sequence< OUString > aNames( xLinks->getElementNames() ); + +const sal_uLong nLinks = aNames.getLength(); +const OUString* pNames = aNames.getConstArray(); +const OUString aProp_LinkDisplayName( "LinkDisplayName" ); +const OUString aProp_LinkTarget( "com.sun.star.document.LinkTarget" ); +bool bIsTarget = false; +for( sal_uLong i = 0; i < nLinks; i++ ) +{ +uno::Any aAny; +OUString aLink( *pNames++ ); + +bool bError = false; +try +{ +aAny = xLinks->getByName( aLink ); +} +catch(const uno::Exception&) +{ +// if the name of the target was invalid (like empty headings) +// no object can be provided +bError = true; +} +if(bError) +continue; + +uno::Reference< beans::XPropertySet > xTarget; +if( aAny >>= xTarget ) +{ +try +{ +// get name to display +aAny = xTarget->getPropertyValue( aProp_LinkDisplayName ); +OUString aDisplayName; +
[Libreoffice-commits] core.git: solenv/gbuild
solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |2 ++ 1 file changed, 2 insertions(+) New commits: commit 49445ccb891c6eb85b1d644c975c1b092ef00e43 Author: Tor Lillqvist AuthorDate: Mon Feb 13 14:54:24 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 16 21:27:14 2023 + Use -O3 for Emscripten, seems to work Change-Id: I7effd75355ff81e6d4f85b1c6047c7656bfbb915 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147006 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk index 4ae925daf5d1..a69539b65403 100644 --- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk +++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk @@ -71,6 +71,8 @@ ifeq ($(HAVE_EXTERNAL_DWARF),TRUE) gb_DEBUGINFO_FLAGS += -gseparate-dwarf endif +gb_COMPILEROPTFLAGS := -O3 + # We need at least code elimination, otherwise linking OOMs even with 64GB. # So we "fake" -Og support to mean -O1 for Emscripten and always enable it for debug in configure. gb_COMPILERDEBUGOPTFLAGS := -O1
[Libreoffice-commits] core.git: solenv/gbuild
solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |4 1 file changed, 4 insertions(+) New commits: commit 21e9ebb75b284b140b892f6f69a779d5277044d8 Author: Tor Lillqvist AuthorDate: Thu Feb 16 13:20:53 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 16 11:35:39 2023 + Add comment about using WASM exceptions Change-Id: I402bf56b89b3a18f854331915f827f7512fb05e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147152 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk index fa7b51e54cc4..4ae925daf5d1 100644 --- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk +++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk @@ -32,6 +32,10 @@ gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO gb_Executable_EXT := .html ifeq ($(ENABLE_WASM_EXCEPTIONS),TRUE) +# Note that to really use WASM exceptions everywhere, you most probably want to also use +# CC=emcc -pthread -s USE_PTHREADS=1 -fwasm-exceptions -s SUPPORT_LONGJMP=wasm +# and CXX=em++ -pthread -s USE_PTHREADS=1 -fwasm-exceptions -s SUPPORT_LONGJMP=wasm +# in your autogen.input. Otherwise these flags won't propagate to all external libraries, I fear. gb_EMSCRIPTEN_EXCEPT = -fwasm-exceptions -s SUPPORT_LONGJMP=wasm gb_EMSCRIPTEN_CPPFLAGS += -s SUPPORT_LONGJMP=wasm else
[Libreoffice-commits] core.git: linguistic/source
linguistic/source/lngprophelp.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit d88fa033f02b70e28dbef6b42a4e73abc24c3a60 Author: Tor Lillqvist AuthorDate: Wed Feb 15 14:20:27 2023 +0200 Commit: Tor Lillqvist CommitDate: Wed Feb 15 14:45:33 2023 + Make a few warning messages a bit more useful Change-Id: Ie533e76532f2ee6477cce8042d958d36bf9ebb9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147082 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx index 543685dc33c4..57483d062e55 100644 --- a/linguistic/source/lngprophelp.cxx +++ b/linguistic/source/lngprophelp.cxx @@ -412,7 +412,7 @@ bool PropertyHelper_Spell::propertyChange_Impl( const PropertyChangeEvent& rEvt break; } default: -SAL_WARN( "linguistic", "unknown property" ); +SAL_WARN( "linguistic", "unknown property handle " << rEvt.PropertyHandle << " (check in include/unotools/linguprops.hxx)" ); } if (pbVal) rEvt.NewValue >>= *pbVal; @@ -474,7 +474,7 @@ void PropertyHelper_Spell::SetTmpPropVals( const PropertyValues ) case UPH_IS_SPELL_CLOSED_COMPOUND : pbResVal = break; case UPH_IS_SPELL_HYPHENATED_COMPOUND : pbResVal = break; default: -SAL_WARN( "linguistic", "unknown property" ); +SAL_WARN( "linguistic", "unknown property handle " << rVal.Handle << " (check in include/unotools/linguprops.hxx)" ); } if (pbResVal) rVal.Value >>= *pbResVal; @@ -577,7 +577,7 @@ bool PropertyHelper_Hyphen::propertyChange_Impl( const PropertyChangeEvent& rEvt case UPH_HYPH_MIN_WORD_LENGTH : pnVal = break; case UPH_HYPH_NO_CAPS : pbVal = break; default: -SAL_WARN( "linguistic", "unknown property" ); +SAL_WARN( "linguistic", "unknown property handle " << rEvt.PropertyHandle << " (check in include/unotools/linguprops.hxx)"); } if (pnVal) rEvt.NewValue >>= *pnVal; @@ -629,7 +629,7 @@ void PropertyHelper_Hyphen::SetTmpPropVals( const PropertyValues ) else if ( rVal.Name == UPN_HYPH_NO_CAPS ) pbResVal = -DBG_ASSERT( pnResVal || pbResVal, "unknown property" ); +SAL_WARN_IF( !(pnResVal || pbResVal), "linguistic", "unknown property '" << rVal.Name << "'"); if (pnResVal) rVal.Value >>= *pnResVal;
[Libreoffice-commits] core.git: static/README.wasm.md
static/README.wasm.md |4 1 file changed, 4 insertions(+) New commits: commit 297c71c82bf6766c7fdeec0ab90e693c4fe39675 Author: Tor Lillqvist AuthorDate: Mon Feb 13 11:04:30 2023 +0200 Commit: Tor Lillqvist CommitDate: Mon Feb 13 09:05:21 2023 + Mention that Emscripten 3.1.30 is known to work for COWASM Change-Id: Id01004121a306dea953b908c32acc7f2c0e6841c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146857 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/static/README.wasm.md b/static/README.wasm.md index eeb1d90de41a..2a8727a1a5aa 100644 --- a/static/README.wasm.md +++ b/static/README.wasm.md @@ -359,6 +359,10 @@ For instance, this autogen.input works for me: `--disable-gui` `--with-main-module=writer` +For building LO core for use in COWASM, it is known to work to use +Emscripten 3.1.30 (and not just 2.0.31 which is what the LO+Qt5 work +has been using). + ### That's all After all, in this case you are building LO core headless for it to be used by other software.
[Libreoffice-commits] core.git: static/README.wasm.md
static/README.wasm.md |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4277e37e65a9a788cd787df54c4788c99225846c Author: Tor Lillqvist AuthorDate: Mon Feb 13 10:56:36 2023 +0200 Commit: Tor Lillqvist CommitDate: Mon Feb 13 08:59:40 2023 + Don't overload the word 'module' unnecessarily Change-Id: I10fb7d16192ddfb0802c976419c00302d4688c4e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146856 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/static/README.wasm.md b/static/README.wasm.md index e5869240f39f..eeb1d90de41a 100644 --- a/static/README.wasm.md +++ b/static/README.wasm.md @@ -1,6 +1,6 @@ # Support for Emscripten Cross Build -This module provides support for building LibreOffice as WASM, with the Emscripten toolchain. +This subdirecctory provides support for building LibreOffice as WASM, with the Emscripten toolchain. You can build LibreOffice for WASM for two separate purposes: 1) Either to produce a WASM binary of LibreOffice as such, using Qt5 for
[Libreoffice-commits] core.git: solenv/bin vcl/source
solenv/bin/native-code.py |2 +- vcl/source/treelist/transfer2.cxx |5 + 2 files changed, 6 insertions(+), 1 deletion(-) New commits: commit 33ec31c24053a96f167d11c734d72ec960246e04 Author: Tor Lillqvist AuthorDate: Thu Apr 14 14:25:31 2022 +0300 Commit: Andras Timar CommitDate: Sun Feb 12 18:35:44 2023 + Avoid LOKClipboard harder on iOS Change-Id: I2710a7537594c486878a68c630f762a24ac81c49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133017 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146739 (cherry picked from commit 069aae6be68d67b45222740de01467d11f15adfb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146800 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py index 660c5d65fd57..4928b146df93 100755 --- a/solenv/bin/native-code.py +++ b/solenv/bin/native-code.py @@ -128,7 +128,7 @@ core_constructor_list = [ "com_sun_star_comp_dba_ODatabaseSource", "com_sun_star_comp_dba_ORowSet_get_implementation", # desktop/lokclipboard.component -"desktop_LOKClipboard_get_implementation", +("desktop_LOKClipboard_get_implementation", "#ifndef IOS"), # drawinglayer/drawinglayer.component "drawinglayer_XPrimitive2DRenderer", # embeddedobj/util/embobj.component diff --git a/vcl/source/treelist/transfer2.cxx b/vcl/source/treelist/transfer2.cxx index d0a105554c0f..05183b9c0485 100644 --- a/vcl/source/treelist/transfer2.cxx +++ b/vcl/source/treelist/transfer2.cxx @@ -484,11 +484,16 @@ Reference GetSystemClipboard() Reference xClipboard; try { +#ifdef IOS +if (false) +; +#else if (comphelper::LibreOfficeKit::isActive()) { xClipboard = css::datatransfer::clipboard::LokClipboard::create( comphelper::getProcessComponentContext()); } +#endif else { xClipboard = css::datatransfer::clipboard::SystemClipboard::create(
[Libreoffice-commits] core.git: external/freetype
external/freetype/freetype-fd-hack.patch.0 |8 1 file changed, 8 insertions(+) New commits: commit 6d0a0e09ce0daac06bbad0c0cef3057196dbf6e0 Author: Tor Lillqvist AuthorDate: Fri Feb 10 11:15:21 2023 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 10 14:04:47 2023 + Avoid implicit function declaration warnings Noticed when compiling with Emscripten for WASM, but might well happen in other cases, too. Change-Id: I37ae326af21204d81a6a3267831d7a0198d1d501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146744 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/external/freetype/freetype-fd-hack.patch.0 b/external/freetype/freetype-fd-hack.patch.0 index db2bdc9e92f6..c12d6739fc4c 100644 --- a/external/freetype/freetype-fd-hack.patch.0 +++ b/external/freetype/freetype-fd-hack.patch.0 @@ -1,6 +1,14 @@ # -*- Mode: Diff -*- --- src/base/ftsystem.c +++ src/base/ftsystem.c +@@ -24,6 +24,7 @@ +* +*/ + ++#include + + #include + #include FT_CONFIG_CONFIG_H @@ -237,6 +237,8 @@ const char* filepathname ) {
[Libreoffice-commits] core.git: RepositoryExternal.mk
RepositoryExternal.mk |8 1 file changed, 8 insertions(+) New commits: commit 8d90e02b4cecdc7fd74b05b122f074a5f36ca965 Author: Tor Lillqvist AuthorDate: Thu Oct 20 11:20:12 2022 +0300 Commit: Tor Lillqvist CommitDate: Fri Feb 10 11:54:16 2023 + Get the shared object of a bundled fontconfig into rpm and deb packages Change-Id: I9630fa25178637bba189c263605a2198ef5c6064 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141550 Reviewed-by: Andras Timar Tested-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146720 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146740 Tested-by: Jenkins diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 0f7c77f443d6..9e8a46fa733e 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -1284,6 +1284,14 @@ gb_ExternalProject__use_fontconfig := else # SYSTEM_FONTCONFIG +ifneq ($(filter-out MACOSX WNT,$(OS)),) + +$(eval $(call gb_Helper_register_packages_for_install,ooo,\ + fontconfig \ +)) + +endif + define gb_LinkTarget__use_fontconfig $(call gb_LinkTarget_use_external_project,$(1),fontconfig) $(call gb_LinkTarget_set_include,$(1),\
[Libreoffice-commits] core.git: svx/source
svx/source/svdraw/svdomedia.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 5025a56db91bb3cf337659c0f8a77d36f49974ad Author: Tor Lillqvist AuthorDate: Tue Oct 25 11:37:42 2022 +0300 Commit: Tor Lillqvist CommitDate: Fri Feb 10 08:49:01 2023 + Guard against no HAVE_FEATURE_AVMEDIA in one more place This was said to fix build of the iOS app some years ago in a vendor branch, but unclear about that now, it seems to build from master at the moment anyway? Anyway, this still probably makes sense. Change-Id: I4a9e6f18e7b17664e5aed36233d5ccde44cf1194 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141796 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146742 Tested-by: Jenkins diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 9b17b7bf278a..c63df5d8b69e 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -474,6 +474,7 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper void SdrMediaObj::notifyPropertiesForLOKit() { +#if HAVE_FEATURE_AVMEDIA if (!m_xImpl->m_MediaProperties.getTempURL().isEmpty()) { const auto mediaId = reinterpret_cast(this); @@ -491,6 +492,7 @@ void SdrMediaObj::notifyPropertiesForLOKit() SfxLokHelper::notifyMediaUpdate(json); } +#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
[Libreoffice-commits] core.git: solenv/bin
solenv/bin/ooinstall |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit cbac6b9d8f1319fffc66b397dfa20588e35c24fb Author: Tor Lillqvist AuthorDate: Wed Nov 22 21:05:48 2017 +0200 Commit: Tor Lillqvist CommitDate: Fri Feb 10 08:48:39 2023 + Pass product name and not hardcoded "LibreOffice" to make_installer.pl -p Change-Id: I9b2d84bcc18e21b325960f7057e259daa37234a5 Reviewed-on: https://gerrit.libreoffice.org/55640 Reviewed-by: Andras Timar Tested-by: Andras Timar (cherry picked from commit 12d1b08aac8cc8c3176040efc7290377e380f0c4) Reviewed-on: https://gerrit.libreoffice.org/79128 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist (cherry picked from commit 0069417b55c99166aec5489ccef803eba25d2b4f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136842 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146741 Tested-by: Jenkins diff --git a/solenv/bin/ooinstall b/solenv/bin/ooinstall index efb1f28de824..71f10c739036 100755 --- a/solenv/bin/ooinstall +++ b/solenv/bin/ooinstall @@ -88,11 +88,14 @@ if ($destdir && "$ENV{DESTDIR}" ne "/" && -d "$ENV{DESTDIR}") { print "Running LibreOffice installer\n"; +my $PRODUCTNAME_no_spaces = $ENV{PRODUCTNAME}; +$PRODUCTNAME_no_spaces =~ s/ //g; + system ("cd $ENV{SRC_ROOT}/instsetoo_native/util ; " . "perl " . (scalar keys(%DB::sub) ? "-d " : "") . "-w $ENV{SRCDIR}/solenv/bin/make_installer.pl " . -"-f $ENV{BUILDDIR}/instsetoo_native/util/openoffice.lst -l $langs -p LibreOffice " . +"-f $ENV{BUILDDIR}/instsetoo_native/util/openoffice.lst -l $langs -p $PRODUCTNAME_no_spaces " . "-u $tmp_dir " . "-buildid $BUILD $destdir $strip $msi " . "-simple $path") && die "Failed to install: $!";
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - solenv/bin vcl/source
solenv/bin/native-code.py |2 +- vcl/source/treelist/transfer2.cxx |5 + 2 files changed, 6 insertions(+), 1 deletion(-) New commits: commit 069aae6be68d67b45222740de01467d11f15adfb Author: Tor Lillqvist AuthorDate: Thu Apr 14 14:25:31 2022 +0300 Commit: Tor Lillqvist CommitDate: Fri Feb 10 07:57:03 2023 + Avoid LOKClipboard harder on iOS Change-Id: I2710a7537594c486878a68c630f762a24ac81c49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133017 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146739 diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py index e2deb0cbd5b0..0309ae09a7ee 100755 --- a/solenv/bin/native-code.py +++ b/solenv/bin/native-code.py @@ -129,7 +129,7 @@ core_constructor_list = [ "com_sun_star_comp_dba_ODatabaseSource", "com_sun_star_comp_dba_ORowSet_get_implementation", # desktop/lokclipboard.component -"desktop_LOKClipboard_get_implementation", +("desktop_LOKClipboard_get_implementation", "#ifndef IOS"), # drawinglayer/drawinglayer.component "drawinglayer_XPrimitive2DRenderer", # embeddedobj/util/embobj.component diff --git a/vcl/source/treelist/transfer2.cxx b/vcl/source/treelist/transfer2.cxx index d0a105554c0f..05183b9c0485 100644 --- a/vcl/source/treelist/transfer2.cxx +++ b/vcl/source/treelist/transfer2.cxx @@ -484,11 +484,16 @@ Reference GetSystemClipboard() Reference xClipboard; try { +#ifdef IOS +if (false) +; +#else if (comphelper::LibreOfficeKit::isActive()) { xClipboard = css::datatransfer::clipboard::LokClipboard::create( comphelper::getProcessComponentContext()); } +#endif else { xClipboard = css::datatransfer::clipboard::SystemClipboard::create(
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - svx/source
svx/source/svdraw/svdomedia.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 4023eec345eb210b053a708f3b253c54fdea123c Author: Tor Lillqvist AuthorDate: Tue Oct 25 11:37:42 2022 +0300 Commit: Tor Lillqvist CommitDate: Fri Feb 10 07:56:36 2023 + Guard against no HAVE_FEATURE_AVMEDIA in one more place This change was said to fix the build of the iOS app in co-22.05, but I am not sure if it actually is needed for that here in co-23.05. Still, this seems like the proper thing to do? Change-Id: I4a9e6f18e7b17664e5aed36233d5ccde44cf1194 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141796 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146736 diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 9b17b7bf278a..c63df5d8b69e 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -474,6 +474,7 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper void SdrMediaObj::notifyPropertiesForLOKit() { +#if HAVE_FEATURE_AVMEDIA if (!m_xImpl->m_MediaProperties.getTempURL().isEmpty()) { const auto mediaId = reinterpret_cast(this); @@ -491,6 +492,7 @@ void SdrMediaObj::notifyPropertiesForLOKit() SfxLokHelper::notifyMediaUpdate(json); } +#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - RepositoryExternal.mk
RepositoryExternal.mk |8 1 file changed, 8 insertions(+) New commits: commit a30eb16d62188b55fc60fd91220c1c0b3fd46d7f Author: Tor Lillqvist AuthorDate: Thu Oct 20 11:20:12 2022 +0300 Commit: Tor Lillqvist CommitDate: Thu Feb 9 15:53:46 2023 + Get the shared object of a bundled fontconfig into rpm and deb packages Change-Id: I9630fa25178637bba189c263605a2198ef5c6064 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141550 Reviewed-by: Andras Timar Tested-by: Andras Timar Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146720 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index c1949cb9b7f5..3b8d10d31933 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -1284,6 +1284,14 @@ gb_ExternalProject__use_fontconfig := else # SYSTEM_FONTCONFIG +ifneq ($(filter-out MACOSX WNT,$(OS)),) + +$(eval $(call gb_Helper_register_packages_for_install,ooo,\ + fontconfig \ +)) + +endif + define gb_LinkTarget__use_fontconfig $(call gb_LinkTarget_use_external_project,$(1),fontconfig) $(call gb_LinkTarget_set_include,$(1),\
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - configure.ac desktop/source external/cairo external/fontconfig external/freetype external/harfbuzz vcl/source vcl/unx
configure.ac | 13 +- desktop/source/lib/init.cxx | 20 +++ external/cairo/ExternalPackage_cairo.mk |3 external/cairo/UnpackedTarball_cairo.mk |2 external/cairo/cairo/cairo-fd-hack.patch.0 | 15 ++ external/cairo/cairo/libcairo-bundled-soname.patch.0 | 12 ++ external/fontconfig/ExternalPackage_fontconfig.mk| 16 ++ external/fontconfig/ExternalProject_fontconfig.mk| 15 ++ external/fontconfig/Module_fontconfig.mk |1 external/fontconfig/UnpackedTarball_fontconfig.mk|1 external/fontconfig/libfontconfig-bundled-soname.patch.0 | 11 + external/freetype/ExternalProject_freetype.mk|2 external/freetype/UnpackedTarball_freetype.mk|1 external/freetype/freetype-fd-hack.patch.0 | 53 external/harfbuzz/UnpackedTarball_harfbuzz.mk|3 external/harfbuzz/harfbuzz-fd-hack.patch.0 | 24 vcl/source/fontsubset/sft.cxx| 23 +++ vcl/unx/generic/fontmanager/fontmanager.cxx | 90 --- vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 13 ++ 19 files changed, 270 insertions(+), 48 deletions(-) New commits: commit 1ab01e0467809b366c5cb690f10266e19ff75119 Author: Tor Lillqvist AuthorDate: Tue Sep 20 16:07:14 2022 +0300 Commit: Tor Lillqvist CommitDate: Thu Feb 9 15:34:39 2023 + Enable opening of downloaded fonts only in ForKit in Online We want that only the ForKit process needs to have access to new font files added to a Collabora Online instance dynamically by downloading from a server. There are however many locations in the Kit process, in core and in external libraries like harfbuzz, where the code wants to open a font file. Handle this so that the ForKit process opens such a downloaded font file and doesn't close it. The file descriptor is thus inherited by Kit processes. The font file pathname passed on to other code is a fake on in the format "/:FD:/%d" where the %d is the file descriptor of the opened font file. Add checks in all places where font files are opened, look for this special pathname format, and modify the code to just dup() the already open file descriptor in that case. All this is relevant for Linux only, as Collabora Online runs on Linux. Do the above for harfbuzz, cairo, fontconfig, and freetype. In addition make sure that these libraries (except harfbuzz which needs to be a static library and freetype) when bundled, on Linux, are built as shared libraries, and won't be confused with the corresponding system libraries by making sure their sonames are different. Change-Id: Ib059cb27e1637d07bb709249abd0d984f948caa9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140714 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146341 Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146717 Tested-by: Tor Lillqvist diff --git a/configure.ac b/configure.ac index 97f69bbdc9ad..b026c2ed552b 100644 --- a/configure.ac +++ b/configure.ac @@ -10850,11 +10850,18 @@ dnl === GRAPHITE_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/graphite/include -DGRAPHITE2_STATIC" GRAPHITE_LIBS_internal="-L${WORKDIR}/LinkTarget/StaticLibrary -lgraphite" -libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3]) - HARFBUZZ_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/harfbuzz/src" HARFBUZZ_LIBS_internal="-L${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs -lharfbuzz" -libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >= 2.6.8]) +case "$_os" in +Linux) +libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3],,,TRUE) +libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >= 0.9.42],,,TRUE) +;; +*) +libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3]) +libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >= 0.9.42]) +;; +esac if test "$COM" = "MSC"; then # override the above GRAPHITE_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/graphite.lib" diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index aab552b1c192..3304b4468409 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -26,6 +26,10 @@ #include #endif +#ifdef LINUX +#include +#endif + #ifdef ANDROID #include #endif @@ -4548,13 +4552,27 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, const char *pOption,
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - external/fontconfig
external/fontconfig/ExternalProject_fontconfig.mk |2 ++ 1 file changed, 2 insertions(+) New commits: commit 6a0e3532ff2c152813ee1557969d5b24c698d379 Author: Tor Lillqvist AuthorDate: Tue Dec 13 15:08:26 2022 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 9 15:26:25 2023 + Use libxml2 instead of expat in bundled fontconfig in the Emscripten case For just running LO itdelf as WASM it presumably does not matter. But, when building Collabora Online as WASM, using expat in fontconfig turns out to be problematic. The Poco library that Online uses includes a bundled expat library. For some reason the function signatures in that expat are different from those in the bundled expat library from LO core. Thus you get "RuntimeError: null function or function signature mismatch" as only the Poco copy of expat gets linked in in the WASM binary and when code in fontconfig tries to call expat code the signatures don't match. Change-Id: Ic035bb7aab06564ad0050519a2d7a0975ad3a14d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144049 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146716 Tested-by: Tor Lillqvist diff --git a/external/fontconfig/ExternalProject_fontconfig.mk b/external/fontconfig/ExternalProject_fontconfig.mk index 9f85faa393e4..f3675258fdea 100644 --- a/external/fontconfig/ExternalProject_fontconfig.mk +++ b/external/fontconfig/ExternalProject_fontconfig.mk @@ -27,6 +27,7 @@ $(call gb_ExternalProject_get_state_target,fontconfig,build) : $(if $(filter EMSCRIPTEN,$(OS)),-pthread)" \ $(if $(filter ANDROID,$(OS)),LIBS="-lm") \ LDFLAGS="$(call gb_ExternalProject_get_link_flags,fontconfig)" \ + $(if $(filter EMSCRIPTEN,$(OS)),LIBXML2_CFLAGS="$(LIBXML_CFLAGS)" LIBXML2_LIBS="$(LIBXML_LIBS)") \ $(gb_RUN_CONFIGURE) ./configure \ --disable-shared \ --disable-silent-rules \ @@ -39,6 +40,7 @@ $(call gb_ExternalProject_get_state_target,fontconfig,build) : --with-baseconfigdir=/instdir/share/fontconfig \ --with-cache-dir=/instdir/share/fontconfig/cache \ --with-add-fonts=/instdir/share/fonts \ + --enable-libxml2 \ ac_cv_func_fstatfs=no ac_cv_func_fstatvfs=no \ ) \ && $(MAKE) -C src && $(MAKE) fonts.conf \
[Libreoffice-commits] core.git: external/cairo
external/cairo/ExternalProject_pixman.mk |2 external/cairo/UnpackedTarball_pixman.mk |1 external/cairo/pixman/pixman-wasm.patch | 108 +++ 3 files changed, 110 insertions(+), 1 deletion(-) New commits: commit d5f5f0984510d6c1b453e31c1ad58fb29fed278b Author: Tor Lillqvist AuthorDate: Thu Feb 9 14:24:07 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 9 14:55:26 2023 + Use SIMD in pixman for WASM Emscripten and WASM do have some support for SSSE3, so let's try to use it, with -msimd128. See https://emscripten.org/docs/porting/simd.html. WASM is not x86, though, so avoid use of inline x86 assembly, like the CPUID instruction. Emscripten does not have but does have , , and . Change-Id: Ic3a47291f6c6dee6843e93ccecc92a643b269cb1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146691 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/external/cairo/ExternalProject_pixman.mk b/external/cairo/ExternalProject_pixman.mk index ac78b23d5c9e..29902b4c1f5c 100644 --- a/external/cairo/ExternalProject_pixman.mk +++ b/external/cairo/ExternalProject_pixman.mk @@ -28,7 +28,7 @@ $(call gb_ExternalProject_get_state_target,pixman,build) : $(if $(filter ANDROID,$(OS)),--disable-arm-simd --disable-arm-neon --disable-arm-a64-neon --disable-arm-iwmmxt) \ $(gb_CONFIGURE_PLATFORMS) \ $(if $(CROSS_COMPILING),$(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \ - $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-O3 -pthread") \ + $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-O3 -pthread -msimd128") \ && $(MAKE) \ ) $(call gb_Trace_EndRange,pixman,EXTERNAL) diff --git a/external/cairo/UnpackedTarball_pixman.mk b/external/cairo/UnpackedTarball_pixman.mk index 3f1f75616611..922ed9f24f22 100644 --- a/external/cairo/UnpackedTarball_pixman.mk +++ b/external/cairo/UnpackedTarball_pixman.mk @@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,pixman,$(PIXMAN_TARBALL),,cairo)) $(eval $(call gb_UnpackedTarball_add_patches,pixman,\ external/cairo/pixman/pixman-0.24.4.patch \ external/cairo/pixman/pixman-ubsan.patch \ + external/cairo/pixman/pixman-wasm.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/cairo/pixman/pixman-wasm.patch b/external/cairo/pixman/pixman-wasm.patch new file mode 100644 index ..c76af875cd51 --- /dev/null +++ b/external/cairo/pixman/pixman-wasm.patch @@ -0,0 +1,108 @@ +--- a/pixman/pixman/pixman-x86.c b/pixman/pixman/pixman-x86.c +@@ -77,13 +77,20 @@ + + #else + +-#define _PIXMAN_X86_64 \ +-(defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)) ++#if (defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)) ++#define _PIXMAN_X86_64 1 ++#else ++#define _PIXMAN_X86_64 0 ++#endif + + static pixman_bool_t + have_cpuid (void) + { +-#if _PIXMAN_X86_64 || defined (_MSC_VER) ++#if defined(__EMSCRIPTEN__) ++ ++return FALSE; ++ ++#elif _PIXMAN_X86_64 || defined (_MSC_VER) + + return TRUE; + +@@ -109,6 +109,8 @@ + #endif + } + ++#if !defined(__EMSCRIPTEN__) ++ + static void + pixman_cpuid (uint32_t feature, + uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d) +@@ -156,10 +156,17 @@ + #error Unknown compiler + #endif + } ++ ++#endif // !__EMSCRIPTEN__ + + static cpu_features_t + detect_cpu_features (void) + { ++#if defined(__EMSCRIPTEN__) ++ ++return X86_SSE | X86_SSE2 | X86_SSSE3; ++ ++#else + uint32_t a, b, c, d; + cpu_features_t features = 0; + +@@ -202,6 +202,8 @@ + } + + return features; ++ ++#endif // !__EMSCRIPTEN__ + } + + #endif +--- a/pixman/pixman/pixman-ssse3.c b/pixman/pixman/pixman-ssse3.c +@@ -28,7 +28,9 @@ + #endif + + #include ++#if !defined(__EMSCRIPTEN__) + #include ++#endif + #include + #include + #include +--- a/pixman/configure b/pixman/configure +@@ -14207,7 +14207,11 @@ + #if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)) + #error "Need GCC >= 3.4 for MMX intrinsics" + #endif ++#if !defined(__EMSCRIPTEN__) + #include ++#else ++#include ++#endif + #include + + /* Check support for block expressions */ +@@ -14308,7 +14308,9 @@ + # error "Need GCC >= 4.2 for SSE2 intrinsics on x86" + # endif + #endif ++#if !defined(__EMSCRIPTEN__) + #include ++#endif + #include + #include + int param; +@@ -14380,7 +14380,9 @@ + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + ++#if !defined(__EMSCRIPTEN__) + #include ++#endif + #include + #include + #include
[Libreoffice-commits] core.git: configure.ac desktop/source external/cairo external/fontconfig external/freetype external/harfbuzz vcl/source vcl/unx
configure.ac | 13 +- desktop/source/lib/init.cxx | 20 +++ external/cairo/ExternalPackage_cairo.mk |3 external/cairo/UnpackedTarball_cairo.mk |2 external/cairo/cairo/cairo-fd-hack.patch.0 | 15 ++ external/cairo/cairo/libcairo-bundled-soname.patch.0 | 12 ++ external/fontconfig/ExternalPackage_fontconfig.mk| 16 ++ external/fontconfig/ExternalProject_fontconfig.mk| 15 ++ external/fontconfig/Module_fontconfig.mk |1 external/fontconfig/UnpackedTarball_fontconfig.mk|1 external/fontconfig/libfontconfig-bundled-soname.patch.0 | 11 + external/freetype/ExternalProject_freetype.mk|2 external/freetype/UnpackedTarball_freetype.mk|1 external/freetype/freetype-fd-hack.patch.0 | 53 external/harfbuzz/UnpackedTarball_harfbuzz.mk|3 external/harfbuzz/harfbuzz-fd-hack.patch.0 | 24 vcl/source/fontsubset/sft.cxx| 23 +++ vcl/unx/generic/fontmanager/fontmanager.cxx | 90 --- vcl/unx/generic/glyphs/freetype_glyphcache.cxx | 13 ++ 19 files changed, 270 insertions(+), 48 deletions(-) New commits: commit d552b4a549d614a03aa9328e017dec27bd3ff41e Author: Tor Lillqvist AuthorDate: Tue Sep 20 16:07:14 2022 +0300 Commit: Tor Lillqvist CommitDate: Thu Feb 9 13:47:02 2023 + Enable opening of downloaded fonts only in ForKit in Online We want that only the ForKit process needs to have access to new font files added to a Collabora Online instance dynamically by downloading from a server. There are however many locations in the Kit process, in core and in external libraries like harfbuzz, where the code wants to open a font file. Handle this so that the ForKit process opens such a downloaded font file and doesn't close it. The file descriptor is thus inherited by Kit processes. The font file pathname passed on to other code is a fake on in the format "/:FD:/%d" where the %d is the file descriptor of the opened font file. Add checks in all places where font files are opened, look for this special pathname format, and modify the code to just dup() the already open file descriptor in that case. All this is relevant for Linux only, as Collabora Online runs on Linux. Do the above for harfbuzz, cairo, fontconfig, and freetype. In addition make sure that these libraries (except harfbuzz which needs to be a static library and freetype) when bundled, on Linux, are built as shared libraries, and won't be confused with the corresponding system libraries by making sure their sonames are different. Change-Id: Ib059cb27e1637d07bb709249abd0d984f948caa9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140714 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146341 Tested-by: Jenkins diff --git a/configure.ac b/configure.ac index 86896f3c4c80..c232686dc696 100644 --- a/configure.ac +++ b/configure.ac @@ -10823,11 +10823,18 @@ dnl === GRAPHITE_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/graphite/include -DGRAPHITE2_STATIC" GRAPHITE_LIBS_internal="-L${WORKDIR}/LinkTarget/StaticLibrary -lgraphite" -libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3]) - HARFBUZZ_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/harfbuzz/src" HARFBUZZ_LIBS_internal="-L${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs -lharfbuzz" -libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >= 2.6.8]) +case "$_os" in +Linux) +libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3],,,TRUE) +libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >= 0.9.42],,,TRUE) +;; +*) +libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3]) +libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >= 0.9.42]) +;; +esac if test "$COM" = "MSC"; then # override the above GRAPHITE_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/graphite.lib" diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index d0eda23e0eb8..d0c67bda098f 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -26,6 +26,10 @@ #include #endif +#ifdef LINUX +#include +#endif + #ifdef ANDROID #include #endif @@ -4554,13 +4558,27 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, const char *pOption, const c else sal_detail_set_log_selector(pCurrentSalLogOverride); } +#ifde
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - 2 commits - sc/source solenv/bin
sc/source/ui/view/gridwin4.cxx | 17 ++--- solenv/bin/ooinstall |5 - 2 files changed, 14 insertions(+), 8 deletions(-) New commits: commit 90608ef9d3644cb9795f977fedbe74e442a652c9 Author: Tor Lillqvist AuthorDate: Wed Nov 22 21:05:48 2017 +0200 Commit: Andras Timar CommitDate: Thu Feb 9 11:07:15 2023 +0100 Use the same solenv/bin/ooinstall as in the cp-5.3 branch Specifically, pass the correct product name and not a hardcoded "LibreOffice" for the make_installer.pl script's -p option. As such, instsetoo_native/util/openoffice.lst.in hardcodes the product name as "CollaboraOffice" so we could as well do that also in ooinstall. (cherry picked from commit 852ffcae172c8ce1536f847410d94b6fcb486b96) Change-Id: I9b2d84bcc18e21b325960f7057e259daa37234a5 Reviewed-on: https://gerrit.libreoffice.org/55640 Reviewed-by: Andras Timar Tested-by: Andras Timar (cherry picked from commit 12d1b08aac8cc8c3176040efc7290377e380f0c4) Reviewed-on: https://gerrit.libreoffice.org/79128 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist (cherry picked from commit 0069417b55c99166aec5489ccef803eba25d2b4f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136842 Tested-by: Jenkins CollaboraOffice diff --git a/solenv/bin/ooinstall b/solenv/bin/ooinstall index efb1f28de824..71f10c739036 100755 --- a/solenv/bin/ooinstall +++ b/solenv/bin/ooinstall @@ -88,11 +88,14 @@ if ($destdir && "$ENV{DESTDIR}" ne "/" && -d "$ENV{DESTDIR}") { print "Running LibreOffice installer\n"; +my $PRODUCTNAME_no_spaces = $ENV{PRODUCTNAME}; +$PRODUCTNAME_no_spaces =~ s/ //g; + system ("cd $ENV{SRC_ROOT}/instsetoo_native/util ; " . "perl " . (scalar keys(%DB::sub) ? "-d " : "") . "-w $ENV{SRCDIR}/solenv/bin/make_installer.pl " . -"-f $ENV{BUILDDIR}/instsetoo_native/util/openoffice.lst -l $langs -p LibreOffice " . +"-f $ENV{BUILDDIR}/instsetoo_native/util/openoffice.lst -l $langs -p $PRODUCTNAME_no_spaces " . "-u $tmp_dir " . "-buildid $BUILD $destdir $strip $msi " . "-simple $path") && die "Failed to install: $!"; commit 4a9728089606787c87f5c3dbf14c2ce57711fad6 Author: Dennis Francis AuthorDate: Fri May 6 10:56:38 2022 +0530 Commit: Andras Timar CommitDate: Thu Feb 9 11:05:10 2023 +0100 lok: do not recreate lok-drawview for every tile paint This lets the ScLOKDrawView live long enough for non-tile painting related invocation of its methods and hopefully those of its member objects. This is a blind fix for the following crash: /opt/collaboraoffice/program/../program/libsclo.so (anonymous namespace)::ScLOKProxyObjectContact::calculateGridOffsetForViewOjectContact(basegfx::B2DVector&, sdr::contact::ViewObjectContact const&) const ... /opt/collaboraoffice/program/libmergedlo.so SdrTextObj::NbcSetOutlinerParaObjectForText(std::unique_ptr >, SdrText*) /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/svx/source/svdraw/svdotext.cxx:1379 /opt/collaboraoffice/program/libmergedlo.so sdr::properties::TextProperties::ItemSetChanged(SfxItemSet const&) /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/unique_ptr.h:360 /opt/collaboraoffice/program/libmergedlo.so sdr::properties::RectangleProperties::ItemSetChanged(SfxItemSet const&) /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/svx/source/sdr/properties/rectangleproperties.cxx:54 /opt/collaboraoffice/program/libmergedlo.so sdr::properties::DefaultProperties::SetObjectItem(SfxPoolItem const&) /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/svx/source/sdr/properties/defaultproperties.cxx:120 /opt/collaboraoffice/program/libscfiltlo.so XclTxo::XclTxo(XclExpRoot const&, EditTextObject const&, SdrObject*) /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/include/svl/cenumitm.hxx:26 /opt/collaboraoffice/program/libscfiltlo.so XclObjComment::XclObjComment(XclExpObjectManager&, tools::Rectangle const&, EditTextObject const&, SdrCaptionObj*, bool, ScAddress const&, tools::Rectangle const&, tools::Rectangle const&) /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/unique_ptr.h:179 /opt/collaboraoffice/program/libscfiltlo.so XclExpNote::XclExpNote(XclExpRoot const&, ScAddress const&, ScPostIt const*, rtl::OUString const&) /opt/rh/devtoolset-10/root/u
[Libreoffice-commits] core.git: static/README.wasm.md
static/README.wasm.md | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) New commits: commit 187d3b6e8fa0f763b3e9a2e185c61697e9dae7d5 Author: Tor Lillqvist AuthorDate: Mon Feb 6 11:57:15 2023 +0200 Commit: Tor Lillqvist CommitDate: Mon Feb 6 10:01:21 2023 + Minor typo fixes and some additional information Change-Id: Ic0b76ca37dce37f88df62d80495e111c4d50818e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146572 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/static/README.wasm.md b/static/README.wasm.md index ac00e83135de..e5869240f39f 100644 --- a/static/README.wasm.md +++ b/static/README.wasm.md @@ -2,11 +2,11 @@ This module provides support for building LibreOffice as WASM, with the Emscripten toolchain. -You can build LibreOffice core for WASM for two separate purposes: -Either to produce a WASM binary of LibreOffice as such, using Qt5 as -the GUI, or just compiling the LibreOffice code to WASM libraries -without any UI for use in other software that has the UI, like -Collabora Online. +You can build LibreOffice for WASM for two separate purposes: 1) +Either to produce a WASM binary of LibreOffice as such, using Qt5 for +its GUI, or 2) just compiling LibreOffice core ("LibreOffice +Technology") to WASM without any UI for use in other software that +provides the UI, like Collabora Online built as WASM. The first purpose was the original reason for the WASM port and this document was originally written with that in mind. For the second @@ -345,7 +345,8 @@ Follow the instructions in the first part of this document. ### No Qt needed. -You don't need any dependencies other than those that building LO normally downloads and compiled when building core. +You don't need any dependencies other than those that normally are +downloaded and compiled when building LibreOffice. ### Set up LO @@ -361,3 +362,9 @@ For instance, this autogen.input works for me: ### That's all After all, in this case you are building LO core headless for it to be used by other software. + +Note that a soffice.wasm will be built, but that is just because of +how the makefilery has been set up. We do need the soffice.data file +that contains the in-memory file system needed by the LibreOffice +Technology core code during run-time, though. That is at the moment +built as a side-effect when building soffice.wasm.
[Libreoffice-commits] core.git: static/README.wasm.md
static/README.wasm.md | 39 +-- 1 file changed, 37 insertions(+), 2 deletions(-) New commits: commit 6f6b879e8ddc689b5ffc245d641963557e3f3bca Author: Tor Lillqvist AuthorDate: Thu Feb 2 13:38:02 2023 +0200 Commit: Tor Lillqvist CommitDate: Thu Feb 2 11:52:58 2023 + Add instructions for when building headless LO core for WASM Change-Id: Ic5fb943f8c26d21d94bafb815963960bdd2f26b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146497 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/static/README.wasm.md b/static/README.wasm.md index cbe5f74f6607..042417051de3 100644 --- a/static/README.wasm.md +++ b/static/README.wasm.md @@ -1,8 +1,19 @@ # Support for Emscripten Cross Build -This module provides support for emscripten cross build +This module provides support for building LibreOffice as WASM, with the Emscripten toolchain. -## Status +You can build LibreOffice core for WASM for two separate purposes: +Either to produce a WASM binary of LibreOffice as suchn, using Qt5 as +the GUI, or just compiling the LibreOffice code to WASM libraries +without any UI for use in other software that has the UI, like +Collabora Online. + +The first purpose was the original reason for the WASM port and this +document was originally written with that in mind. For the second +purpose, look towards the end of the document for the section +"Building headless LibreOffice as WASM for use in another product". + +## Status of LibreOffice as WASM with Qt The build generates a Writer-only LO build. You should be able to run either @@ -326,3 +337,27 @@ Emscripten supports standalone WASI binaries: - <https://emscripten.org/docs/introducing_emscripten/about_emscripten.html#about-emscripten-porting-code> - <https://emscripten.org/docs/compiling/Building-Projects.html> +## Building headless LibreOffice as WASM for use in another product + +### Set up Emscripten + +Follow the instructions in the first part of this document. + +### No Qt needed. + +You don't need any dependencies other than those that building LO normally downloads and compiled when building core. + +### Set up LO + +For instance, this autogen.input works for me: + +`--disable-debug` +`--enable-sal-log` +`--disable-crashdump` +`--host=wasm32-local-emscripten` +`--disable-gui` +`--with-main-module=writer` + +### That's all + +After all, in this case you are building LO core headless for it to be used by other software.
[Libreoffice-commits] core.git: desktop/source
desktop/source/deployment/misc/dp_misc.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 18d2c7e82dbbe708925588d101e7c59a5b9327a1 Author: Tor Lillqvist AuthorDate: Thu Jul 7 11:37:21 2022 +0300 Commit: Andras Timar CommitDate: Sat Jan 28 20:24:24 2023 + Avoid compiler warning Change-Id: I322b2c0ea14bbf8ed2fe1a306c0ed28f5e5ae258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136875 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist (cherry picked from commit ece304df9ad2aa0f974927320a1324c06b89f337) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146076 Tested-by: Jenkins Reviewed-by: Andras Timar diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index bbe3a085fc68..ea5c737c2d7b 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -515,7 +515,9 @@ void syncRepositories( Reference(), xCmdEnv); } } -#if !HAVE_FEATURE_MACOSX_SANDBOX +#if HAVE_FEATURE_MACOSX_SANDBOX +(void) bModified; +#else if (bModified && !comphelper::LibreOfficeKit::isActive()) { Reference restarter(task::OfficeRestartManager::get(comphelper::getProcessComponentContext()));
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - comphelper/source onlineupdate/source oox/source
comphelper/source/misc/hash.cxx|2 +- onlineupdate/source/update/updater/updater.cxx |2 +- oox/source/crypto/CryptTools.cxx |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 9f812ea09047e213571919afa4901bdd81b31afa Author: Tor Lillqvist AuthorDate: Wed Jan 25 10:32:39 2023 +0200 Commit: Tor Lillqvist CommitDate: Wed Jan 25 09:11:29 2023 + loplugin:cstylecast Change-Id: I729965fd60955102422f579cad458e564de16c34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146125 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/comphelper/source/misc/hash.cxx b/comphelper/source/misc/hash.cxx index 0fb2ef28c461..d537b9eeff72 100644 --- a/comphelper/source/misc/hash.cxx +++ b/comphelper/source/misc/hash.cxx @@ -84,7 +84,7 @@ struct HashImpl { PRErrorCode error = PR_GetError(); const char* errorText = PR_ErrorToName(error); -throw css::uno::RuntimeException("NSS_NoDB_Init failed with " + OUString(errorText, strlen(errorText), RTL_TEXTENCODING_UTF8) + " (" + OUString::number((int) error) + ")"); +throw css::uno::RuntimeException("NSS_NoDB_Init failed with " + OUString(errorText, strlen(errorText), RTL_TEXTENCODING_UTF8) + " (" + OUString::number(static_cast(error)) + ")"); } } mpContext = HASH_Create(getNSSType()); diff --git a/onlineupdate/source/update/updater/updater.cxx b/onlineupdate/source/update/updater/updater.cxx index 467f0b67cd1f..a82733323bb9 100644 --- a/onlineupdate/source/update/updater/updater.cxx +++ b/onlineupdate/source/update/updater/updater.cxx @@ -2925,7 +2925,7 @@ int NS_main(int argc, NS_tchar **argv) { PRErrorCode error = PR_GetError(); fprintf(stderr, "Could not initialize NSS: %s (%d)", -PR_ErrorToName(error), (int) error); +PR_ErrorToName(error), static_cast(error)); _exit(1); } } diff --git a/oox/source/crypto/CryptTools.cxx b/oox/source/crypto/CryptTools.cxx index c66a04084c87..e0a4b9d686cc 100644 --- a/oox/source/crypto/CryptTools.cxx +++ b/oox/source/crypto/CryptTools.cxx @@ -175,7 +175,7 @@ struct CryptoImpl { PRErrorCode error = PR_GetError(); const char* errorText = PR_ErrorToName(error); -throw css::uno::RuntimeException("NSS_NoDB_Init failed with " + OUString(errorText, strlen(errorText), RTL_TEXTENCODING_UTF8) + " (" + OUString::number((int) error) + ")"); +throw css::uno::RuntimeException("NSS_NoDB_Init failed with " + OUString(errorText, strlen(errorText), RTL_TEXTENCODING_UTF8) + " (" + OUString::number(static_cast(error)) + ")"); } } }
[Libreoffice-commits] core.git: solenv/gbuild
solenv/gbuild/platform/com_GCC_defs.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6e2d28934e273386e2f56a4eef0a9f03fa5d5c7d Author: Tor Lillqvist AuthorDate: Tue Jan 24 17:19:27 2023 +0200 Commit: Tor Lillqvist CommitDate: Tue Jan 24 15:21:31 2023 + Clarify comment Change-Id: I33d10ea4f3ca35619d6f857d18b5c53a22d822a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146097 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 3a14e841bc97..89e717ccd15a 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -280,7 +280,7 @@ endif # For Emscripten, the emcc command is a Python script that outputs annoying warnings like # .../emscripten/tools/building.py:638: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/emscripten_temp_0fvvg__1/conftest.js.jso.js' mode='w' encoding='utf-8'> -# into stderr, which makes the configure script think that there is a problem in +# into stderr, which makes a configure script think that there is a problem in # compiling even a microscopic test program with an option like -Werror which # surely *is* supported. Avoid this by setting PYTHONWARNINGS=ignore.
[Libreoffice-commits] core.git: desktop/source
desktop/source/lib/init.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit d514097753a5971f2d5616319238a1a9eb6d8f9a Author: Tor Lillqvist AuthorDate: Tue Jan 24 15:43:15 2023 +0200 Commit: Tor Lillqvist CommitDate: Tue Jan 24 15:17:30 2023 + Surround recently added code that breaks on COWASM with ifdef After 7a6324ea0d81bbe2bba09f8a7f5230342a4f4e85 I started getting UNO exceptions with the message "component context fails to supply service com.sun.star.xml.crypto.SEInitializer of type com.sun.star.xml.crypto.XSEInitializer". It is likely that it breaks in the iOS and Android apps, too, so bypass for those, too. Change-Id: Id08afbf6bea071c8b0b6564342716e0b064cb712 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146071 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 8e98e675bb79..97d74bc4682d 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3404,6 +3404,7 @@ static void doc_iniUnoCommands () return; } +#if !defined IOS && !defined ANDROID && !defined __EMSCRIPTEN__ uno::Reference xSEInitializer = xml::crypto::SEInitializer::create(xContext); if (!xSEInitializer.is()) { @@ -3417,6 +3418,7 @@ static void doc_iniUnoCommands () { SAL_WARN("lok", "iniUnoCommands: failed to create security context"); } +#endif SfxSlotPool& rSlotPool = SfxSlotPool::GetSlotPool(pViewFrame); uno::Reference xParser(util::URLTransformer::create(xContext));
[Libreoffice-commits] core.git: solenv/gbuild
solenv/gbuild/platform/com_GCC_defs.mk | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) New commits: commit e37a4598bbfcc4359fb13e362888b5fe29a997ef Author: Tor Lillqvist AuthorDate: Tue Jan 24 13:09:42 2023 +0200 Commit: Tor Lillqvist CommitDate: Tue Jan 24 15:11:49 2023 + Use PYTHONWARNINGS=ignore instead of 'default' for Emscripten The Emscripten compiler, emcc is a Python script that wraps the actual compiler. It outputs annoying warnings like .../emscripten/tools/building.py:638: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/emscripten_temp_0fvvg__1/conftest.js.jso.js' mode='w' encoding='utf-8'> to stderr. (Ditto for em++.) Some steps in typical configure script think that a non-empty stderr means there was a problem in compiling a test program. This happens even for a microscopic test program with an option like -Werror which surely *is* supported. Avoid this by setting PYTHONWARNINGS=ignore. Change-Id: I11927fc7dccaa65a239ba65dfc7c6bb7487bf12d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146070 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 0cbe852539c9..3a14e841bc97 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -275,9 +275,16 @@ endif ifeq ($(COMPILER_PLUGINS_DEBUG),TRUE) gb_COMPILER_PLUGINS += -Xclang -plugin-arg-loplugin -Xclang --debug endif -# set CCACHE_CPP2=1 to prevent clang generating spurious warnings -# clear PYTHONWARNINGS to prevent noise from emscripten implementation -gb_COMPILER_SETUP += CCACHE_CPP2=1 $(if $(filter EMSCRIPTEN,$(OS)),PYTHONWARNINGS=default) + +# Set CCACHE_CPP2=1 to prevent Clang generating spurious warnings. + +# For Emscripten, the emcc command is a Python script that outputs annoying warnings like +# .../emscripten/tools/building.py:638: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/emscripten_temp_0fvvg__1/conftest.js.jso.js' mode='w' encoding='utf-8'> +# into stderr, which makes the configure script think that there is a problem in +# compiling even a microscopic test program with an option like -Werror which +# surely *is* supported. Avoid this by setting PYTHONWARNINGS=ignore. + +gb_COMPILER_SETUP += CCACHE_CPP2=1 $(if $(filter EMSCRIPTEN,$(OS)),PYTHONWARNINGS=ignore) gb_COMPILER_PLUGINS_SETUP := ICECC_EXTRAFILES=$(SRCDIR)/include/sal/log-areas.dox CCACHE_EXTRAFILES=$(SRCDIR)/include/sal/log-areas.dox SCCACHE_EXTRAFILES=$(SRCDIR)/include/sal/log-areas.dox gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS := \ -Xclang -plugin-arg-loplugin -Xclang --warnings-as-errors
[Libreoffice-commits] core.git: include/rtl
include/rtl/string.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a771945f982a228e9076195bae5bdd0c8aaf60b3 Author: Tor Lillqvist AuthorDate: Tue Jan 24 14:26:27 2023 +0200 Commit: Tor Lillqvist CommitDate: Tue Jan 24 14:02:40 2023 + Be consistent in checks for LIBO_INTERNAL_ONLY Only check whether LIBO_INTERNAL_ONLY is defined or not. Don't check its value. If undefined, its value will default to 0, but checking the value will cause a warning that will be treated as an error if you compile with -Werror, as you should. Change-Id: I1d9e4569a016d2e6dbaa9d612071a5528ff1902e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146066 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx index 24c6a64008cf..0a90fc9f04a3 100644 --- a/include/rtl/string.hxx +++ b/include/rtl/string.hxx @@ -457,7 +457,7 @@ public: rtl_string_release( pData ); } -#if LIBO_INTERNAL_ONLY +#if defined LIBO_INTERNAL_ONLY /** Provides an OString const & passing a storage pointer of an rtl_String * handle. It is more convenient to use C++ OString member functions when dealing
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/source
desktop/source/deployment/misc/dp_misc.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit ac51e7f8be0b3321000e2878b3a702b6348f8fbd Author: Tor Lillqvist AuthorDate: Thu Jul 7 11:37:21 2022 +0300 Commit: Andras Timar CommitDate: Tue Jan 24 14:48:26 2023 +0100 Avoid compiler warning Change-Id: I322b2c0ea14bbf8ed2fe1a306c0ed28f5e5ae258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136875 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index 2983de24b959..04724ab0da64 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -514,7 +514,9 @@ void syncRepositories( Reference(), xCmdEnv); } } -#if !HAVE_FEATURE_MACOSX_SANDBOX +#if HAVE_FEATURE_MACOSX_SANDBOX +(void) bModified; +#else if (bModified && !comphelper::LibreOfficeKit::isActive()) { Reference restarter(task::OfficeRestartManager::get(comphelper::getProcessComponentContext()));
[Libreoffice-commits] core.git: external/cairo
external/cairo/ExternalProject_cairo.mk |2 +- external/cairo/ExternalProject_pixman.mk |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 5cd3a8ec6d36a389eb0be4d59f4570e3bda92dc5 Author: Tor Lillqvist AuthorDate: Mon Jan 23 16:29:42 2023 +0200 Commit: Tor Lillqvist CommitDate: Mon Jan 23 22:58:54 2023 + Enforce compiling cairo and pixman for WASM with -O3 Earlier, no -O flag at all got used in the cairo and pixman builds. Which was sad, as these two libraries are performance-critical. Yes, this change is quick-and-dirty. The proper way would be to modify things in solenv/gbuild. But that is somewhat complicated. In general it seems fairly hard to make sure the same compiler flags get used for every external bundled library. Each external library is a special snowflake, more or less, with a differently structured ExternalProject makefile. For instance for the libwpd library (just picked randomly as an example), even -O2 gets used. (Which as such is OK.) This despite solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk apparently trying to enforce use of -O1 for Emscripten. This change has a visible impact on the performance of COWASM. Change-Id: I99d74db2da733134fde16661881856f9a81100f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146009 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/external/cairo/ExternalProject_cairo.mk b/external/cairo/ExternalProject_cairo.mk index fd934906343b..b677098482ff 100644 --- a/external/cairo/ExternalProject_cairo.mk +++ b/external/cairo/ExternalProject_cairo.mk @@ -48,7 +48,7 @@ $(call gb_ExternalProject_get_state_target,cairo,build) : $(gb_RUN_CONFIGURE) ./configure \ $(if $(debug),STRIP=" ") \ $(if $(filter ANDROID iOS,$(OS)),CFLAGS="$(if $(debug),-g) $(ZLIB_CFLAGS) $(gb_VISIBILITY_FLAGS)") \ - $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS=-DCAIRO_NO_MUTEX" $(ZLIB_CFLAGS) -Wno-enum-conversion $(gb_EMSCRIPTEN_CPPFLAGS)" ) \ + $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-O3 -DCAIRO_NO_MUTEX $(ZLIB_CFLAGS) -Wno-enum-conversion $(gb_EMSCRIPTEN_CPPFLAGS)" ) \ $(if $(filter-out EMSCRIPTEN ANDROID iOS,$(OS)), \ CFLAGS="$(CFLAGS) $(call gb_ExternalProject_get_build_flags,cairo) $(ZLIB_CFLAGS)" \ LDFLAGS="$(call gb_ExternalProject_get_link_flags,cairo)" \ diff --git a/external/cairo/ExternalProject_pixman.mk b/external/cairo/ExternalProject_pixman.mk index 9293b9234013..ac78b23d5c9e 100644 --- a/external/cairo/ExternalProject_pixman.mk +++ b/external/cairo/ExternalProject_pixman.mk @@ -28,7 +28,7 @@ $(call gb_ExternalProject_get_state_target,pixman,build) : $(if $(filter ANDROID,$(OS)),--disable-arm-simd --disable-arm-neon --disable-arm-a64-neon --disable-arm-iwmmxt) \ $(gb_CONFIGURE_PLATFORMS) \ $(if $(CROSS_COMPILING),$(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \ - $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-pthread") \ + $(if $(filter EMSCRIPTEN,$(OS)),CFLAGS="-O3 -pthread") \ && $(MAKE) \ ) $(call gb_Trace_EndRange,pixman,EXTERNAL)
[Libreoffice-commits] core.git: solenv/gbuild
solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |1 - 1 file changed, 1 deletion(-) New commits: commit 36c492bb01f48435b714fc85b203c1e8a2fa8d07 Author: Tor Lillqvist AuthorDate: Mon Jan 23 17:02:07 2023 +0200 Commit: Tor Lillqvist CommitDate: Mon Jan 23 20:18:35 2023 + Bin line that was commented-out in December 2021 Change-Id: Ie6c6891d1a682d57e4606454fb6b295072e57644 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146038 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk index fdce92af0abe..fa7b51e54cc4 100644 --- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk +++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk @@ -62,7 +62,6 @@ gb_LINKERSTRIPDEBUGFLAGS := # This maps to g3, no source maps, but DWARF with current emscripten! # https://developer.chrome.com/blog/wasm-debugging-2020/ gb_DEBUGINFO_FLAGS = -g -#gb_DEBUGINFO_FLAGS = -gsource-map --source-map-base=file://$(WORKDIR)/LinkTarget/Executable ifeq ($(HAVE_EXTERNAL_DWARF),TRUE) gb_DEBUGINFO_FLAGS += -gseparate-dwarf
[Libreoffice-commits] core.git: solenv/gbuild
solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk |8 1 file changed, 8 insertions(+) New commits: commit d648f2ae3a16d0613d1b75848789b9742eb20b19 Author: Tor Lillqvist AuthorDate: Mon Jan 16 23:16:53 2023 +0200 Commit: Tor Lillqvist CommitDate: Tue Jan 17 07:57:12 2023 + Adapt for --enable-wasm-exceptions Actually, it seems that to build core with --fwasm-exceptions for use in a LibreOffice Technology -using WASM executable, you need to compile *everything* with that (i.e. *all* of core's externals). Just these gbuild things are not enough to ensure that. You have to put CC=emcc -pthread -fwasm-exceptions -s SUPPORT_LONGJMP=wasm CXX=em++ -pthread -fwasm-exceptions -s SUPPORT_LONGJMP=wasm into your autogen.input. Change-Id: I10d21ad0f73e7e5d72864864d595077bd770f4f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145646 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk index 8831aeeb5d54..fdce92af0abe 100644 --- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk +++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk @@ -39,7 +39,15 @@ gb_EMSCRIPTEN_EXCEPT = -s DISABLE_EXCEPTION_CATCHING=0 endif gb_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) + +ifeq ($(ENABLE_WASM_EXCEPTIONS),TRUE) +# Here we don't use += because gb_LinkTarget_EXCEPTIONFLAGS from com_GCC_defs.mk contains -fexceptions and +# gb_EMSCRIPTEN_EXCEPT already has -fwasm-exceptions +gb_LinkTarget_EXCEPTIONFLAGS = $(gb_EMSCRIPTEN_EXCEPT) +else gb_LinkTarget_EXCEPTIONFLAGS += $(gb_EMSCRIPTEN_EXCEPT) +endif + gb_LinkTarget_CFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) gb_LinkTarget_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS) $(gb_EMSCRIPTEN_EXCEPT) ifeq ($(ENABLE_QT5),TRUE)
[Libreoffice-commits] core.git: external/liborcus
external/liborcus/UnpackedTarball_liborcus.mk |1 + external/liborcus/liborcus-no-benchmark.patch.1 | 19 +++ 2 files changed, 20 insertions(+) New commits: commit 5c355dbae859d2ac0b0e8fedca86b64797aec081 Author: Tor Lillqvist AuthorDate: Fri Jan 13 12:07:27 2023 +0200 Commit: Tor Lillqvist CommitDate: Tue Jan 17 07:56:42 2023 + Don't bother building the liborcus benchmark It causes a problem when building with Emscripten and --enable-wasm-exceptions. Instead of fixing that problem, just don't bother building executables we won't run anyway. (Ideally liborcus should have some --disable-benchmark configure options, ping Kohei.) Change-Id: Ic8c1d51513793bba85dc2833cc8fd9ec5b97ce76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145645 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk index 30d3f0d78d1c..47d05e82c612 100644 --- a/external/liborcus/UnpackedTarball_liborcus.mk +++ b/external/liborcus/UnpackedTarball_liborcus.mk @@ -42,6 +42,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ external/liborcus/forcepoint-95.patch.1 \ external/liborcus/include.patch.0 \ external/liborcus/overrun.patch.0 \ + external/liborcus/liborcus-no-benchmark.patch.1 \ )) ifeq ($(OS),WNT) diff --git a/external/liborcus/liborcus-no-benchmark.patch.1 b/external/liborcus/liborcus-no-benchmark.patch.1 new file mode 100644 index ..a19cea836601 --- /dev/null +++ b/external/liborcus/liborcus-no-benchmark.patch.1 @@ -0,0 +1,19 @@ +-*- Mode: Diff -*- + +Don't build the benchmark directory. + +We won't run those anyway, and on some platforms building executables +here and there for random externals can be problematic. While at it, +skip the doc_example subdirectory too. + +--- liborcus/Makefile.in liborcus/Makefile.in +@@ -408,7 +408,7 @@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-SUBDIRS = src include benchmark doc_example ++SUBDIRS = src include + ACLOCAL_AMFLAGS = -I m4 + pcfiles = liborcus-@ORCUS_API_VERSION@.pc $(am__append_1) + pkgconfig_DATA = $(pcfiles)
[Libreoffice-commits] core.git: Branch 'feature/wasm' - 1226 commits - accessibility/inc accessibility/source android/default-document android/source animations/source avmedia/source basctl/Library_ba
Rebased ref, commits from common ancestor: commit 33c00fcae871a7c1419ca70d4a381c31e85ca944 Author: Tor Lillqvist AuthorDate: Mon Nov 21 14:20:28 2022 +0200 Commit: Thorsten Behrens CommitDate: Sun Jan 15 01:19:14 2023 +0100 Document how tml managed to run the qt_soffice.html thing without emrun diff --git a/static/README.wasm.md b/static/README.wasm.md index cbe5f74f6607..d4235a4683b3 100644 --- a/static/README.wasm.md +++ b/static/README.wasm.md @@ -10,6 +10,34 @@ The build generates a Writer-only LO build. You should be able to run either $ emrun --serve_after_close workdir/LinkTarget/Executable/qt_vcldemo.html $ emrun --serve_after_close workdir/LinkTarget/Executable/qt_wasm-qt5-mandelbrot.html +To run the WASM Qt-LibreOffice, it also works to just use the Chromium +browser on Linux against a local web server as long as the following +files (that have ended up after the build in instdir/program) are +available in a folder through the web server: + + qtloader.js + qtlogo.svg + qt_soffice.html + soffice.data + soffice.data.js.metadata + soffice.html + soffice.html.linkdeps + soffice.js + soffice.wasm + soffice.worker.js + +Either the instdir/program folder itself can be available in the web +server, or you copy those files to some place that is. No emrun or +container (as perhaps used to build the thing) necessary. + +Like this: + + chromium-browser --enable-features=SharedArrayBuffer http://localhost/tml/wasm/ + +Where the above mentioned files have been copied to a folder that +shows up as tml/wasm on localhost, and qt_soffice.html has been +renamed to index.html. + REMINDER: Always start new tabs in the browser, reload might fail / cache! INFO: latest browser won't work anymore with 0.0.0.0 and need 127.0.0.1. commit f814cc609f37d94075c32bddea97d7ba5b4fea32 Author: Balazs Varga AuthorDate: Fri Sep 23 10:57:09 2022 +0200 Commit: Thorsten Behrens CommitDate: Sun Jan 15 01:19:14 2023 +0100 WASM pdf conversion through emscripten and qt5 Exporting files to pdf and downloading it from the emscripten virtual memory file system to the local file system with qt5 and emscripten. What is working: 1. Uploading a file from the local file system to the emscripten memory with 'Open file dialoge' and then opening it. In the same time export it to pdf. 2. Load an uploaded document with the LibreOffice Kit command: - lodoc = _libreofficekit_hook(0) - _doc_postUnoCommand(lodoc, allocateUTF8(".uno:Open"), allocateUTF8( "{ \"URL\" : { \"type\":\"string\", \"value\":\"file:///android/default-document/{UPLOADED_FILE_NAME}\" }}"), 0) 3. Export the loaded document to pdf with the ExportDirectlyToPDF UI or with the LibreOffice Kit command: - lodoc = _libreofficekit_hook(0) - _doc_postUnoCommand(lodoc, allocateUTF8(".uno:ExportDirectToPDF"), allocateUTF8(""), 0) 4. alternatively, you can plant a file in the virtual filesystem prior to LibreOffice bootstrap, and export headless, via soffice cmdline args Change-Id: I8f03b0a057155afaa5f1ca0e3e451bb362a99769 diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index b64fa61389bf..47a7a2510403 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -45,6 +45,13 @@ #include #include +#ifdef EMSCRIPTEN +#include +#include +#include +#include +#endif + namespace weld {class Button; } class SbxValue; class SbxArray; @@ -435,6 +442,10 @@ public: virtual boolPrepareClose(bool bUI = true); virtual HiddenInformation GetHiddenInformationState( HiddenInformation nStates ); sal_Int16 QueryHiddenInformation( HiddenWarningFact eFact, weld::Window* pParent ); +#ifdef EMSCRIPTEN +voidReadWASMFile(emscripten::val& contentArray, sal_Int32 nRead, css::uno::Sequence& aContent); +voidWriteWASMFile(emscripten::val& contentArray, const OUString& rFileName); +#endif boolIsSecurityOptOpenReadOnly() const; voidSetSecurityOptOpenReadOnly( bool bOpenReadOnly ); diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 541d26a9ae29..6643aa8ceff0 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -1628,7 +1628,12 @@ void FileDialogHelper_Impl::getRealFilter( OUString& _rFilter ) const _rFilter = getCurrentFilterUIName(); if ( _rFilter.isEmpty() ) -_rFilter = maCurFilter; +{ +if (isShowFilterExtensionEnabled()) +_rFilter = getFilterName(maCurFilter); +else +_rFilter = maCurFilter; +} if ( !_rFilter.isEmpty() && mpMatcher ) { diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/
[Libreoffice-commits] core.git: solenv/gbuild solenv/inc
solenv/gbuild/platform/com_GCC_defs.mk |1 - solenv/gbuild/platform/com_MSC_defs.mk |1 - solenv/inc/doxygen.cfg |1 - solenv/inc/doxygen_doc.cfg |1 - solenv/inc/doxygen_tag.cfg |1 - 5 files changed, 5 deletions(-) New commits: commit ef3c34596ebc6e6e3b85c4093a28d48fe328c1a7 Author: Tor Lillqvist AuthorDate: Fri Jan 13 11:43:39 2023 +0200 Commit: Tor Lillqvist CommitDate: Sat Jan 14 12:09:53 2023 + EXCEPTIONS_ON has no meaning Change-Id: I0ca0dcb76d342b451879788b57da03fb7d79e699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145456 Tested-by: Tor Lillqvist Reviewed-by: Tor Lillqvist diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 6eeda2fc03ab..0cbe852539c9 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -205,7 +205,6 @@ endif endif gb_LinkTarget_EXCEPTIONFLAGS := \ - -DEXCEPTIONS_ON \ -fexceptions ifeq ($(gb_ENABLE_DBGUTIL),$(false)) diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk index 928fd3400af1..ad425e9b5fdd 100644 --- a/solenv/gbuild/platform/com_MSC_defs.mk +++ b/solenv/gbuild/platform/com_MSC_defs.mk @@ -206,7 +206,6 @@ gb_CFLAGS_WERROR = $(if $(ENABLE_WERROR),-WX) gb_CXX03FLAGS := gb_LinkTarget_EXCEPTIONFLAGS := \ - -DEXCEPTIONS_ON \ -EHs \ gb_PrecompiledHeader_EXCEPTIONFLAGS := $(gb_LinkTarget_EXCEPTIONFLAGS) diff --git a/solenv/inc/doxygen.cfg b/solenv/inc/doxygen.cfg index 2bdabc731935..ed50d426549e 100644 --- a/solenv/inc/doxygen.cfg +++ b/solenv/inc/doxygen.cfg @@ -2017,7 +2017,6 @@ PREDEFINED = LINUX \ DBG_UTIL \ OSL_DEBUG_LEVEL=2 \ CUI \ - EXCEPTIONS_ON \ DOXYGEN_ONLY # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this diff --git a/solenv/inc/doxygen_doc.cfg b/solenv/inc/doxygen_doc.cfg index dfcf174ee559..78d2778f7a4b 100644 --- a/solenv/inc/doxygen_doc.cfg +++ b/solenv/inc/doxygen_doc.cfg @@ -2017,7 +2017,6 @@ PREDEFINED = LINUX \ DBG_UTIL \ OSL_DEBUG_LEVEL=2 \ CUI \ - EXCEPTIONS_ON \ DOXYGEN_ONLY # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this diff --git a/solenv/inc/doxygen_tag.cfg b/solenv/inc/doxygen_tag.cfg index a2f2e602612b..1ba9c17cdbfc 100644 --- a/solenv/inc/doxygen_tag.cfg +++ b/solenv/inc/doxygen_tag.cfg @@ -2017,7 +2017,6 @@ PREDEFINED = LINUX \ DBG_UTIL \ OSL_DEBUG_LEVEL=2 \ CUI \ - EXCEPTIONS_ON \ DOXYGEN_ONLY # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
[Libreoffice-commits] core.git: configure.ac
configure.ac | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) New commits: commit 22cb88b25ba9a52ca0e0eaa3fd116f5fbcc9422f Author: Tor Lillqvist AuthorDate: Thu Jan 12 21:47:24 2023 +0200 Commit: Tor Lillqvist CommitDate: Fri Jan 13 10:11:44 2023 + Fix Emscripten version check to still work with older SDK versions Change-Id: I051b5edd5936bcb94521f88ec7a7a762c66c9283 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145419 Tested-by: Jenkins Tested-by: Michael Stahl Reviewed-by: Tor Lillqvist diff --git a/configure.ac b/configure.ac index 93a1c89e3569..56119241c743 100644 --- a/configure.ac +++ b/configure.ac @@ -1413,11 +1413,17 @@ if test "$_os" = "Emscripten"; then AS_IF([test -z "$EMSDK"], [AC_MSG_ERROR([No \$EMSDK environment variable.])]) EMSCRIPTEN_VERSION_H=$EMSDK/upstream/emscripten/cache/sysroot/include/emscripten/version.h -AS_IF([test ! -f "$EMSCRIPTEN_VERSION_H"], - [AC_MSG_ERROR([Could not find the in the Emscripten SDK.])]) -EMSCRIPTEN_MAJOR=$($GREP __EMSCRIPTEN_major__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p') -EMSCRIPTEN_MINOR=$($GREP __EMSCRIPTEN_minor__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p') -EMSCRIPTEN_TINY=$($GREP __EMSCRIPTEN_tiny__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p') +if test -f "$EMSCRIPTEN_VERSION_H"; then +EMSCRIPTEN_MAJOR=$($GREP __EMSCRIPTEN_major__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p') +EMSCRIPTEN_MINOR=$($GREP __EMSCRIPTEN_minor__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p') +EMSCRIPTEN_TINY=$($GREP __EMSCRIPTEN_tiny__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p') +else +EMSCRIPTEN_DEFINES=$(echo | emcc -dM -E - | $GREP __EMSCRIPTEN_) +EMSCRIPTEN_MAJOR=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p') +EMSCRIPTEN_MINOR=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p') +EMSCRIPTEN_TINY=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p') +fi + EMSCRIPTEN_VERSION="${EMSCRIPTEN_MAJOR}.${EMSCRIPTEN_MINOR}.${EMSCRIPTEN_TINY}" check_semantic_version_three_prefixed EMSCRIPTEN MIN