desktop/source/app/app.cxx | 4 ++++ sal/osl/unx/security.cxx | 7 +++++++ sfx2/source/view/viewfrm.cxx | 2 ++ static/CustomTarget_wasm_fs_image.mk | 20 ++++++++++++++++++++ vcl/inc/qt5/Qt5Instance.hxx | 2 ++ vcl/inc/salinst.hxx | 1 + vcl/qt5/Qt5Instance.cxx | 6 ++++++ vcl/qt5/Qt5Timer.cxx | 12 ++++++++++++ vcl/qt5/Qt5Widget.cxx | 3 +++ vcl/source/app/svapp.cxx | 8 ++++++-- 10 files changed, 63 insertions(+), 2 deletions(-)
New commits: commit 5d3014943b8a94621738972b4838b3261e83b3d6 Author: Thorsten Behrens <thorsten.behr...@allotropia.de> AuthorDate: Fri Oct 1 20:45:15 2021 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Sat Oct 2 11:10:24 2021 +0200 Get main loops working somehow for WASM Change-Id: I5f322c96d029221e74382812893d192c893774d5 diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index f1cb4c29ec09..0c2ef8a3e52a 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -102,7 +102,9 @@ #include <osl/process.h> #include <rtl/byteseq.hxx> #include <unotools/pathoptions.hxx> +#ifndef ENABLE_WASM_STRIP_PINGUSER #include <unotools/VersionConfig.hxx> +#endif #include <rtl/bootstrap.hxx> #include <vcl/test/GraphicsRenderTests.hxx> #include <vcl/glxtestprocess.hxx> @@ -342,10 +344,12 @@ namespace { void runGraphicsRenderTests() { +#ifndef ENABLE_WASM_STRIP_PINGUSER if (!utl::isProductVersionUpgraded(false)) { return; } +#endif GraphicsRenderTests TestObject; TestObject.run(); } diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index d80c97c614fa..b9affb1c59e8 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -49,7 +49,9 @@ #include <vcl/stdtext.hxx> #include <vcl/weld.hxx> #include <vcl/weldutils.hxx> +#ifndef ENABLE_WASM_STRIP_PINGUSER #include <unotools/VersionConfig.hxx> +#endif #include <svtools/miscopt.hxx> #include <tools/diagnose_ex.h> #include <com/sun/star/container/XIndexAccess.hpp> diff --git a/vcl/inc/qt5/Qt5Instance.hxx b/vcl/inc/qt5/Qt5Instance.hxx index dc347021b9bb..c8db3b98346b 100644 --- a/vcl/inc/qt5/Qt5Instance.hxx +++ b/vcl/inc/qt5/Qt5Instance.hxx @@ -164,6 +164,8 @@ public: void UpdateStyle(bool bFontsChanged); void* CreateGStreamerSink(const SystemChildWindow*) override; + + bool DoExecute(int &nExitCode) override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx index 9694d30f4939..342fa86877c6 100644 --- a/vcl/inc/salinst.hxx +++ b/vcl/inc/salinst.hxx @@ -208,6 +208,7 @@ public: virtual void* CreateGStreamerSink(const SystemChildWindow*) { return nullptr; } virtual void BeforeAbort(const OUString& /* rErrorText */, bool /* bDumpCore */) {} + virtual bool DoExecute(int &nExitCode) { (void)nExitCode; return false; } }; // called from SVMain diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx index c1e82aa6a0d9..72c60876ce6b 100644 --- a/vcl/qt5/Qt5Instance.cxx +++ b/vcl/qt5/Qt5Instance.cxx @@ -678,6 +678,12 @@ std::unique_ptr<QApplication> Qt5Instance::CreateQApplication(int& nArgc, char** return pQApp; } +bool Qt5Instance::DoExecute(int &nExitCode) +{ + nExitCode = m_pQApplication->exec(); + return true; +} + extern "C" { VCLPLUG_QT5_PUBLIC SalInstance* create_SalInstance() { diff --git a/vcl/qt5/Qt5Timer.cxx b/vcl/qt5/Qt5Timer.cxx index bbc2800e868d..18b216d6cf3c 100644 --- a/vcl/qt5/Qt5Timer.cxx +++ b/vcl/qt5/Qt5Timer.cxx @@ -20,12 +20,16 @@ #include <Qt5Timer.hxx> #include <Qt5Timer.moc> +#include <Qt5Instance.hxx> + #include <QtWidgets/QApplication> #include <QtCore/QThread> #include <vcl/svapp.hxx> #include <sal/log.hxx> +#include <svdata.hxx> + Qt5Timer::Qt5Timer() { m_aTimer.setSingleShot(true); @@ -38,6 +42,14 @@ Qt5Timer::Qt5Timer() void Qt5Timer::timeoutActivated() { SolarMutexGuard aGuard; +#ifdef EMSCRIPTEN + const ImplSVData* pSVData = ImplGetSVData(); + if (pSVData->mpDefInst) + { + bool ts = static_cast<Qt5Instance*>(pSVData->mpDefInst)->DispatchUserEvents(true); + SAL_INFO("vcl.qt5", __func__ << " " << ts); + } +#endif CallCallback(); } diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx index ed80dd0033d6..e19424900aee 100644 --- a/vcl/qt5/Qt5Widget.cxx +++ b/vcl/qt5/Qt5Widget.cxx @@ -87,6 +87,7 @@ void Qt5Widget::paintEvent(QPaintEvent* pEvent) void Qt5Widget::resizeEvent(QResizeEvent* pEvent) { + const qreal fRatio = m_rFrame.devicePixelRatioF(); const int nWidth = ceil(pEvent->size().width() * fRatio); const int nHeight = ceil(pEvent->size().height() * fRatio); @@ -94,6 +95,8 @@ void Qt5Widget::resizeEvent(QResizeEvent* pEvent) m_rFrame.maGeometry.nWidth = nWidth; m_rFrame.maGeometry.nHeight = nHeight; + SAL_INFO("vcl.qt5", __func__ << nWidth << "x" << nHeight); + if (m_rFrame.m_bUseCairo) { if (m_rFrame.m_pSvpGraphics) diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index af0353043f51..bcde930eb7df 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -440,8 +440,12 @@ void Application::Execute() pSVData->maAppData.mpEventTestingIdle->Start(); } - while ( !pSVData->maAppData.mbAppQuit ) - Application::Yield(); + int nExitCode = 0; + if (!pSVData->mpDefInst->DoExecute(nExitCode)) + { + while ( !pSVData->maAppData.mbAppQuit ) + Application::Yield(); + } pSVData->maAppData.mbInAppExecute = false; commit 95f5e13a02cc8fb049deafd2ec98cff2c2c8e1a9 Author: Thorsten Behrens <thorsten.behr...@allotropia.de> AuthorDate: Fri Oct 1 20:37:07 2021 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Sat Oct 2 11:10:24 2021 +0200 Include more bits in shrink-wrapped filesystem Make sure to pre-populate user config Change-Id: Iec15769b6d71d2e23219b4499302b0ff6884b4cd diff --git a/static/CustomTarget_wasm_fs_image.mk b/static/CustomTarget_wasm_fs_image.mk index a10c244ae4e0..229cc77435fc 100644 --- a/static/CustomTarget_wasm_fs_image.mk +++ b/static/CustomTarget_wasm_fs_image.mk @@ -26,6 +26,26 @@ gb_wasm_image_filelist := \ $(INSTROOT)/$(LIBO_ETC_FOLDER)/services/services.rdb \ $(INSTROOT)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \ $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \ + $(INSTROOT)/user/registrymodifications.xcu \ + $(INSTROOT)/user/autotext/mytexts.bau \ + $(INSTROOT)/user/config/autotbl.fmt \ + $(INSTROOT)/share/registry/base.xcd \ + $(INSTROOT)/share/registry/calc.xcd \ + $(INSTROOT)/share/registry/cjk.xcd \ + $(INSTROOT)/share/registry/ctlseqcheck.xcd \ + $(INSTROOT)/share/registry/ctl.xcd \ + $(INSTROOT)/share/registry/draw.xcd \ + $(INSTROOT)/share/registry/graphicfilter.xcd \ + $(INSTROOT)/share/registry/impress.xcd \ + $(INSTROOT)/share/registry/Langpack-en-US.xcd \ + $(INSTROOT)/share/registry/lingucomponent.xcd \ + $(INSTROOT)/share/registry/main.xcd \ + $(INSTROOT)/share/registry/math.xcd \ + $(INSTROOT)/share/registry/pyuno.xcd \ + $(INSTROOT)/share/registry/writer.xcd \ + $(INSTROOT)/share/registry/xsltfilter.xcd \ + $(INSTROOT)/program/intro-highres.png \ + $(INSTROOT)/program/intro.png \ wasm_fs_image_WORKDIR := $(call gb_CustomTarget_get_workdir,static/wasm_fs_image) commit 2e57ef781c47ab07476b081075bebadbe4157340 Author: Thorsten Behrens <thorsten.behr...@allotropia.de> AuthorDate: Fri Oct 1 20:36:32 2021 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Sat Oct 2 11:10:23 2021 +0200 Short-circuit osl security for the moment No useful value here currently for WASM Change-Id: I97627d473353d87fabe625567f36c7fe8e019838 diff --git a/sal/osl/unx/security.cxx b/sal/osl/unx/security.cxx index f6fc52ce5398..f0460796646a 100644 --- a/sal/osl/unx/security.cxx +++ b/sal/osl/unx/security.cxx @@ -58,6 +58,7 @@ static bool osl_psz_getHomeDir(oslSecurity Security, OString* pszDirectory); static bool osl_psz_getConfigDir(oslSecurity Security, OString* pszDirectory); +#if !defined(EMSCRIPTEN) static bool sysconf_SC_GETPW_R_SIZE_MAX(std::size_t * value) { #if defined _SC_GETPW_R_SIZE_MAX long m; @@ -112,6 +113,7 @@ static oslSecurityImpl * growSecurityImpl( } return p; } +#endif static void deleteSecurityImpl(oslSecurityImpl * impl) { free(impl); @@ -119,6 +121,10 @@ static void deleteSecurityImpl(oslSecurityImpl * impl) { oslSecurity SAL_CALL osl_getCurrentSecurity() { +#if defined(EMSCRIPTEN) + SAL_INFO("sal.osl","osl_getCurrentSecurity quickreturn"); + return nullptr; +#else std::size_t n = 0; oslSecurityImpl * p = nullptr; for (;;) { @@ -170,6 +176,7 @@ oslSecurity SAL_CALL osl_getCurrentSecurity() } #endif } +#endif } oslSecurityError SAL_CALL osl_loginUser(