[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/window/dockwin.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8b08a9927bc4ee66a9575c658934dd27f06be702 Author: Darshan11 AuthorDate: Fri Dec 1 18:49:32 2023 +0530 Commit: Szymon Kłos CommitDate: Mon Dec 4 09:45:55 2023 +0100 Fix posx and posy for Filter by color in autofilter jsDialog Change-Id: I2d4cd198197250495cc87eb1ee68407baf8e6a1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160216 Reviewed-by: Szymon Kłos Tested-by: Jenkins CollaboraOffice diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 74c18cca5159..dab053b3fba9 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -927,7 +927,7 @@ Point DockingWindow::GetFloatingPos() const pWrapper->mpFloatWin->GetWindowState( aData ); Point aPos(aData.x(), aData.y()); // LOK needs logic coordinates not absolute screen position for autofilter menu -if (!comphelper::LibreOfficeKit::isActive() || get_id() != "check_list_menu") +if (!comphelper::LibreOfficeKit::isActive()) aPos = pWrapper->mpFloatWin->GetParent()->ImplGetFrameWindow()->AbsoluteScreenToOutputPixel( aPos ); return aPos; }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/window/layout.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit cf813141285dda900ccb2f102836385a8705bad9 Author: Gülşah Köse AuthorDate: Wed Nov 29 16:40:00 2023 +0300 Commit: Szymon Kłos CommitDate: Thu Nov 30 00:14:50 2023 +0100 Online: Put the image width height info into json. When online's image render is delayed we don't have any image size info so getting 0x0. To show better result we need that info into message. Signed-off-by: Gülşah Köse Change-Id: I28f345cdd64de5fa47b3b1054330e606e7b32f03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160106 Tested-by: Jenkins Reviewed-by: Szymon Kłos (cherry picked from commit 10da3d0be5d4f5fe174908a2db0d92cd3dc0398a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160039 Tested-by: Jenkins CollaboraOffice diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 8534b2809017..3d200eb68ffd 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -3099,6 +3099,8 @@ void VclDrawingArea::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) BitmapEx aImage = pDevice->GetBitmapEx(Point(0,0), aRenderSize); aImage.Scale(aOutputSize); +rJsonWriter.put("imagewidth", aRenderSize.Width()); +rJsonWriter.put("imageheight", aRenderSize.Height()); SvMemoryStream aOStm(65535, 65535); if(GraphicConverter::Export(aOStm, aImage, ConvertDataFormat::PNG) == ERRCODE_NONE)
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/app/svmain.cxx | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) New commits: commit 8234b6fe115627228fdb8a330a34c901f696c152 Author: Michael Stahl AuthorDate: Thu Nov 9 17:13:30 2023 +0100 Commit: Miklos Vajna CommitDate: Tue Nov 14 15:10:34 2023 +0100 vcl: don't override user's SSL_CERT_FILE for bundled OpenSSL Change-Id: I5d61fe62c2e6814ea757a0b543f7dbf45e0db456 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159219 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit d45bd161a4750ca30639ce1c6ca6d6d070e6d2cb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159417 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index aaf6a602cb14..0f9fcc17a49b 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -196,18 +196,22 @@ int ImplSVMain() #if defined(LINUX) && !defined(SYSTEM_OPENSSL) if (!bWasInitVCL) { -try // to point bundled OpenSSL to some system certificate file -{ // ... this only works if the client actually calls -// SSL_CTX_set_default_verify_paths() or similar; e.g. python ssl. -char const*const path = GetCABundleFile(); -OUString const name("SSL_CERT_FILE"); -OUString const filepath(::rtl::OStringToOUString( -::std::string_view(path), osl_getThreadTextEncoding())); -osl_setEnvironment(name.pData, filepath.pData); -} -catch (uno::RuntimeException const& e) +const OUString name("SSL_CERT_FILE"); +OUString temp; +if (osl_getEnvironment(name.pData, ) == osl_Process_E_NotFound) { -SAL_WARN("vcl", e.Message); +try // to point bundled OpenSSL to some system certificate file +{ // ... this only works if the client actually calls +// SSL_CTX_set_default_verify_paths() or similar; e.g. python ssl. +char const*const path = GetCABundleFile(); +OUString const filepath(::rtl::OStringToOUString( +::std::string_view(path), osl_getThreadTextEncoding())); +osl_setEnvironment(name.pData, filepath.pData); +} +catch (uno::RuntimeException const& e) +{ +SAL_WARN("vcl", e.Message); +} } } #endif
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/window/window2.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 83adaf60f3aceb878e73fd582855f4d287a09e86 Author: Caolán McNamara AuthorDate: Thu Oct 26 12:18:37 2023 +0100 Commit: Miklos Vajna CommitDate: Thu Oct 26 15:54:40 2023 +0200 crash seen in Window::ImplTrackTimerHdl #0 vcl::Window::ImplTrackTimerHdl (this=0x3403b0a0, pTimer=) at libreoffice/vcl/source/window/window2.cxx:231 #1 0x7f2bdd31f5e7 in Scheduler::CallbackTaskScheduling () at libreoffice/vcl/source/app/scheduler.cxx:485 #2 0x7f2bdd4e5176 in SalTimer::CallCallback (this=) at libreoffice/vcl/inc/saltimer.hxx:54 #3 SvpSalInstance::CheckTimeout (this=this@entry=0x261ef40, bExecuteTimers=bExecuteTimers@entry=true) at libreoffice/vcl/headless/svpinst.cxx:212 #4 0x7f2bdd4e713d in SvpSalInstance::ImplYield (this=this@entry=0x261ef40, bWait=bWait@entry=true, bHandleAllCurrentEvents=bHandleAllCurrentEvents@entry=false) at libreoffice/vcl/headless/svpinst.cxx:453 #5 0x7f2bdd4e74a0 in SvpSalInstance::DoYield (this=0x261ef40, bWait=, bHandleAllCurrentEvents=) at libreoffice/vcl/headless/svpinst.cxx:525 Change-Id: I66ec56603aeb8a7fe855253b961dafb0bc7b875e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158497 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 180edf5cf961..4e3ca2ec6b89 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -221,6 +221,12 @@ void Window::InvertTracking( const tools::Rectangle& rRect, ShowTrackFlags nFlag IMPL_LINK( Window, ImplTrackTimerHdl, Timer*, pTimer, void ) { +if (!mpWindowImpl) +{ +SAL_WARN("vcl", "ImplTrackTimerHdl has outlived dispose"); +return; +} + ImplSVData* pSVData = ImplGetSVData(); // if Button-Repeat we have to change the timeout
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/app/salvtables.cxx | 10 ++ vcl/source/window/mouse.cxx |4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) New commits: commit 6d9393f3ced54821645bfdc5596ba13d44bd4a0a Author: Caolán McNamara AuthorDate: Thu Oct 5 12:35:05 2023 +0100 Commit: Miklos Vajna CommitDate: Thu Oct 5 16:48:45 2023 +0200 cool#7254 crash on double click of value set item in bullets and numbering #0 0x7f6d6f39e7a8 in vcl::Window::MouseButtonUp (this=this@entry=0x34177ef0, rMEvt=...) at libreoffice/vcl/source/window/mouse.cxx:430 #1 0x7f6d6f6e6a32 in VclDrawingArea::MouseButtonUp (rMEvt=..., this=0x34177ef0) at libreoffice/include/vcl/layout.hxx:707 #2 SalInstanceDrawingArea::dblclick (this=0x31351fd0, rPos=...) at libreoffice/vcl/source/app/salvtables.cxx:6288 #3 0x7f6d6f8c989c in LOKTrigger::trigger_dblclick (rPos=..., rDrawingArea=warning: can't find linker symbol for virtual table for `weld::DrawingArea' value warning: found `construction vtable for SalInstanceDrawingArea-in-JSDrawingArea' instead ...) at libreoffice/include/vcl/jsdialog/executor.hxx:66 #4 jsdialog::ExecuteAction (nWindowId=..., rWidget=..., rData=...) at libreoffice/vcl/jsdialog/executor.cxx:239 #5 0x7f6d6e46cebe in lcl_sendDialogEvent (nWindowId=, pArguments=) at libreoffice/desktop/source/lib/init.cxx:4961 #6 0x0051 in lok::Document::sendDialogEvent (pArguments=, nWindowId=, this=0x30a67ca0) at libreoffice/include/LibreOfficeKit/LibreOfficeKit.hxx:323 #7 ChildSession::dialogEvent (this=this@entry=0x32d5e410, tokens=...) at kit/ChildSession.cpp:1640 #8 0x00540465 in ChildSession::_handleInput (this=, buffer=, length=) at kit/ChildSession.cpp:257 Change-Id: I655beb2a33cdb5d266db3bb50d8dc857192e5a4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157610 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index b577a64862f2..d79b755ae489 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -6277,15 +6277,17 @@ OutputDevice& SalInstanceDrawingArea::get_ref_device() { return *m_xDrawingArea- void SalInstanceDrawingArea::click(const Point& rPos) { MouseEvent aEvent(rPos, 1, MouseEventModifiers::NONE, MOUSE_LEFT, 0); -m_xDrawingArea->MouseButtonDown(aEvent); -m_xDrawingArea->MouseButtonUp(aEvent); +VclPtr xDrawingArea(m_xDrawingArea); +xDrawingArea->MouseButtonDown(aEvent); +xDrawingArea->MouseButtonUp(aEvent); } void SalInstanceDrawingArea::dblclick(const Point& rPos) { MouseEvent aEvent(rPos, 2, MouseEventModifiers::NONE, MOUSE_LEFT, 0); -m_xDrawingArea->MouseButtonDown(aEvent); -m_xDrawingArea->MouseButtonUp(aEvent); +VclPtr xDrawingArea(m_xDrawingArea); +xDrawingArea->MouseButtonDown(aEvent); +xDrawingArea->MouseButtonUp(aEvent); } void SalInstanceDrawingArea::mouse_up(const Point& rPos) diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 943543ce0d16..6ed64463fec9 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -420,14 +420,14 @@ void Window::MouseMove( const MouseEvent& rMEvt ) void Window::MouseButtonDown( const MouseEvent& rMEvt ) { NotifyEvent aNEvt( NotifyEventType::MOUSEBUTTONDOWN, this, ); -if (!EventNotify(aNEvt)) +if (!EventNotify(aNEvt) && mpWindowImpl) mpWindowImpl->mbMouseButtonDown = true; } void Window::MouseButtonUp( const MouseEvent& rMEvt ) { NotifyEvent aNEvt( NotifyEventType::MOUSEBUTTONUP, this, ); -if (!EventNotify(aNEvt)) +if (!EventNotify(aNEvt) && mpWindowImpl) mpWindowImpl->mbMouseButtonUp = true; }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/filter/GraphicFormatDetector.cxx | 134 +--- 1 file changed, 64 insertions(+), 70 deletions(-) New commits: commit 232216c003781404c377f96cd9d45aa9e83da2e7 Author: Tomaž Vajngerl AuthorDate: Fri Sep 1 21:20:05 2023 +0200 Commit: Miklos Vajna CommitDate: Mon Sep 4 09:10:58 2023 +0200 tdf#147704 fix reading TIFF metadata (width and height) When we prepare (not read and load) the bitmap we need to read only the metadata - most importantly pixel width and height. This didn't work correctly for the TIFF files or more importantly the specific TIFF files in the document, and the result was that the size reported was 0,0 and somehow the crop factor wasn't applied correctly. This change fixes the metadata reading and makes it more robust. Change-Id: I60951e5d01afc311c400589496ae82377ccb4cf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156457 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 9c636d76a9a7e167da39913ab60f5135f8e831a6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156438 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/vcl/source/filter/GraphicFormatDetector.cxx b/vcl/source/filter/GraphicFormatDetector.cxx index fc43cdd963ab..1a216bb1db92 100644 --- a/vcl/source/filter/GraphicFormatDetector.cxx +++ b/vcl/source/filter/GraphicFormatDetector.cxx @@ -33,7 +33,6 @@ constexpr sal_uInt32 SVG_CHECK_SIZE = 2048; constexpr sal_uInt32 WMF_EMF_CHECK_SIZE = 44; -constexpr sal_uInt32 DATA_SIZE = 640; namespace { @@ -716,6 +715,7 @@ bool GraphicFormatDetector::checkTIF() if (bDetectOk) { sal_uInt16 nTemp16 = 0; +sal_uInt32 nTemp32 = 0; mrStream.ReadUInt16(nTemp16); if (nTemp16 == 0x2a) @@ -725,90 +725,84 @@ bool GraphicFormatDetector::checkTIF() if (mbExtendedInfo) { -sal_uLong nCount; -sal_uLong nMax = DATA_SIZE - 48; -sal_uInt32 nTemp32 = 0; +sal_uInt32 nIfdOffset = 0; // Offset of the first IFD -mrStream.ReadUInt32(nTemp32); -nCount = nTemp32 + 2; -mrStream.SeekRel(nCount - 0x08); +mrStream.ReadUInt32(nIfdOffset); +mrStream.SeekRel(nIfdOffset - 8); // read 6 bytes until here + +sal_uInt16 nNumberOfTags = 0; +mrStream.ReadUInt16(nNumberOfTags); + +bool bOk = true; +sal_Int32 nCount = 0; -if (nCount < nMax) +// read tags till we find Tag256(Width) +mrStream.ReadUInt16(nTemp16); +while (nTemp16 != 256 && bOk) { -bool bOk = false; +mrStream.SeekRel(10); +mrStream.ReadUInt16(nTemp16); +nCount++; +if (nCount > nNumberOfTags) +bOk = false; +} -// read tags till we find Tag256 ( Width ) -// do not read more bytes than DATA_SIZE +if (bOk) +{ +// width mrStream.ReadUInt16(nTemp16); -while (nTemp16 != 256) +mrStream.SeekRel(4); +if (nTemp16 == 3) { -bOk = nCount < nMax; -if (!bOk) -{ -break; -} -mrStream.SeekRel(10); mrStream.ReadUInt16(nTemp16); -nCount += 12; +maMetadata.maPixSize.setWidth(nTemp16); +mrStream.SeekRel(2); +} +else +{ +mrStream.ReadUInt32(nTemp32); +maMetadata.maPixSize.setWidth(nTemp32); } -if (bOk) +// height +mrStream.SeekRel(2); +mrStream.ReadUInt16(nTemp16); +mrStream.SeekRel(4); +if (nTemp16 == 3) { -// width mrStream.ReadUInt16(nTemp16); -mrStream.SeekRel(4); -if (nTemp16 == 3) -{ -mrStream.ReadUInt16(nTemp16); -
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source vcl/unx
vcl/source/app/salvtables.cxx |2 ++ vcl/unx/gtk3/gtkinst.cxx |3 +++ 2 files changed, 5 insertions(+) New commits: commit a0001a031ebb8a4c57b5c4591482cdd946a5a20d Author: Caolán McNamara AuthorDate: Mon Aug 28 09:11:15 2023 +0100 Commit: Caolán McNamara CommitDate: Mon Aug 28 18:06:01 2023 +0200 Related: tdf#144906 unset g_DragSource if drag end callback never called a scenario I can reproduce with alt+f4 while dragging from the navigator Change-Id: I7123602e036fbe15e0ae8f9a7e1d5fc7483dc6c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156139 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-by: Caolán McNamara diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 91c6d1b0250f..b577a64862f2 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -5081,6 +5081,8 @@ SalInstanceTreeView::~SalInstanceTreeView() static_cast(*m_xTreeView).SetStartDragHdl(Link()); static_cast(*m_xTreeView).SetModelChangedHdl(Link()); } +if (g_DragSource == this) +g_DragSource = nullptr; m_xTreeView->SetPopupMenuHdl(Link()); m_xTreeView->SetExpandingHdl(Link()); m_xTreeView->SetDoubleClickHdl(Link()); diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 428f0f5ae357..17bbfe5d497e 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -16720,6 +16720,9 @@ public: g_signal_handler_disconnect(m_pTreeView, m_nRowActivatedSignalId); g_signal_handler_disconnect(gtk_tree_view_get_selection(m_pTreeView), m_nChangedSignalId); +if (g_DragSource == this) +g_DragSource = nullptr; + GValue value = G_VALUE_INIT; g_value_init(, G_TYPE_POINTER); g_value_set_pointer(, static_cast(nullptr));
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/graphic/BinaryDataContainer.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 934d43c0834da5ee04cc7362941b8e63e44e635c Author: Caolán McNamara AuthorDate: Wed Aug 16 16:31:54 2023 +0100 Commit: Miklos Vajna CommitDate: Fri Aug 18 08:22:47 2023 +0200 SAL_DEBUG "is never meant to remain in the code" Change-Id: I8c0e513d36c087e9ea8019325cdb3122bec744be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155772 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/vcl/source/graphic/BinaryDataContainer.cxx b/vcl/source/graphic/BinaryDataContainer.cxx index 43538f9b12fd..7af8b9149bfe 100644 --- a/vcl/source/graphic/BinaryDataContainer.cxx +++ b/vcl/source/graphic/BinaryDataContainer.cxx @@ -45,7 +45,6 @@ struct BinaryDataContainer::Impl // Horrifying data loss ... SAL_WARN_IF(pStream->GetError(), "vcl", "Inconsistent system - failed to swap image back in"); -SAL_DEBUG("Swap in: " << pStream->GetError()); } void swapOut()
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/window/layout.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 89266e4ebf4ce0de5686f1511f4487a9d23185b5 Author: Szymon Kłos AuthorDate: Mon Jul 24 15:09:23 2023 +0200 Commit: Caolán McNamara CommitDate: Mon Jul 24 16:12:40 2023 +0200 jsdialog: dark mode support in drawing area Change-Id: I235cf327c4c97d2f256c201ea4daf0c99f3d9005 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154844 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 46f816b29edd..8534b2809017 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -3092,6 +3092,9 @@ void VclDrawingArea::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) pDevice->SetOutputSize(aRenderSize); tools::Rectangle aRect(Point(0,0), aRenderSize); +// Dark mode support +pDevice->DrawWallpaper(aRect, pRefDevice->GetBackground()); + Paint(*pDevice, aRect); BitmapEx aImage = pDevice->GetBitmapEx(Point(0,0), aRenderSize);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/gdi/impgraph.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 896fc921cd72b5f0198772f2d4c569b59f51222c Author: Ashod Nakashian AuthorDate: Tue Jul 18 21:23:13 2023 -0400 Commit: Szymon Kłos CommitDate: Wed Jul 19 11:39:02 2023 +0200 vcl: swap out the BinaryDataContainer too Signed-off-by: Ashod Nakashian Change-Id: I2e6ac88ff95903acf2df2070a7c23f4fc135c253 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154606 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 3b06fbe94787..54adbbf5bf5a 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1313,6 +1313,8 @@ bool ImpGraphic::swapOut() // reset the swap file mpSwapFile.reset(); +mpGfxLink->getDataContainer().swapOut(); + // mark as swapped out mbSwapOut = true;
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/filter/GraphicFormatDetector.cxx |7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) New commits: commit a1d9d090338009c3fdc4dcb8d6dc0dfb6c13e582 Author: Paris Oplopoios AuthorDate: Sat Jun 24 03:48:32 2023 +0300 Commit: Andras Timar CommitDate: Thu Jun 29 13:50:35 2023 +0200 tdf#156016 Fix bug where SVG check size would be 0 Change-Id: I1c4adf75bbfbce7cb6b779375714b1c1bc7ec50d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153543 Tested-by: Jenkins Reviewed-by: Paris Oplopoios (cherry picked from commit 85013c57dd29e32ec0411c159ea72824ebca5aa9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153528 Reviewed-by: Michael Stahl diff --git a/vcl/source/filter/GraphicFormatDetector.cxx b/vcl/source/filter/GraphicFormatDetector.cxx index a0cdd2416c57..fc43cdd963ab 100644 --- a/vcl/source/filter/GraphicFormatDetector.cxx +++ b/vcl/source/filter/GraphicFormatDetector.cxx @@ -1249,7 +1249,7 @@ bool GraphicFormatDetector::checkSVG() SVG_CHECK_SIZE, nDecompressedSize); nCheckSize = std::min(nDecompressedSize, 256); bool bIsSvg(false); -bool bIsGZip = (nDecompressedSize > 0); +bool bIsGZip = mbWasCompressed; const char* pCheckArrayAsCharArray = reinterpret_cast(pCheckArray); // check for XML // #119176# SVG files which have no xml header at all have shown up this is optional @@ -1279,11 +1279,11 @@ bool GraphicFormatDetector::checkSVG() if (bIsGZip) { -nCheckSize = std::min(nDecompressedSize, 2048); +nCheckSize = std::min(nDecompressedSize, SVG_CHECK_SIZE); } else { -nCheckSize = std::min(mnStreamLength, 2048); +nCheckSize = std::min(mnStreamLength, SVG_CHECK_SIZE); mrStream.Seek(mnStreamPosition); nCheckSize = mrStream.ReadBytes(sExtendedOrDecompressedFirstBytes, nCheckSize); } @@ -1400,7 +1400,6 @@ sal_uInt8* GraphicFormatDetector::checkAndUncompressBuffer(sal_uInt8* aUncompres mbWasCompressed = true; return aUncompressedBuffer; } -nRetSize = 0; mbWasCompressed = false; return maFirstBytes.data(); }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/window/floatwin.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f3421312cdba7b953c39d37527aecd8c8105e91e Author: Henry Castro AuthorDate: Tue Jun 6 11:09:04 2023 -0400 Commit: Henry Castro CommitDate: Tue Jun 20 18:50:37 2023 +0200 lok: vcl: fix "ImplConvertToAbsPos" function The conversion to absolute position is ignored for mirrored graphics, otherwise, the popup window will be closed after the mouse up event. Signed-off-by: Henry Castro Change-Id: I2cb101b07f1aa79ab8aa605637b276ad3a56ce88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152681 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153328 Tested-by: Jenkins CollaboraOffice diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index eeb4566f680d..c634bb625e08 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -485,7 +485,7 @@ Point FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const Point& const OutputDevice *pWindowOutDev = pReference->GetOutDev(); // compare coordinates in absolute screen coordinates -if( pWindowOutDev->HasMirroredGraphics() ) +if ( pWindowOutDev->HasMirroredGraphics() && !comphelper::LibreOfficeKit::isActive() ) { if(!pReference->IsRTLEnabled() ) pWindowOutDev->ReMirror( aAbsolute );
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/app/svdata.cxx |8 ++-- vcl/source/app/svmain.cxx |8 +--- 2 files changed, 7 insertions(+), 9 deletions(-) New commits: commit 6fb7330f35424f3b9f04a6dfb99b1754e2dcfa0f Author: Michael Meeks AuthorDate: Fri Jun 9 12:17:36 2023 +0100 Commit: Caolán McNamara CommitDate: Fri Jun 9 16:54:04 2023 +0200 trimMemory - fix crash modifying structure during clear. Re-use existing code from shutdown, to avoid ~Bitmap mutating maScaleCache while we're iterating it inside clear. Change-Id: I021d9075cf5c449702af091c2c8a4de64887f2ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152785 Reviewed-by: Miklos Vajna Tested-by: Michael Meeks Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index febed41cb98c..cb7778fcfd40 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -419,9 +419,13 @@ ImplSVData::ImplSVData() void ImplSVData::dropCaches() { -maGDIData.maScaleCache.clear(); -maGDIData.maThemeImageCache.clear(); +// we are iterating over a map and doing erase while inside a loop which is doing erase +// hence we can't use clear() here +maGDIData.maScaleCache.remove_if([](const lru_scale_cache::key_value_pair_t&) +{ return true; }); + maGDIData.maThemeDrawCommandsCache.clear(); +maGDIData.maThemeImageCache.clear(); } void ImplSVData::dumpState(rtl::OStringBuffer ) diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 7c5505f364cb..2838cfc3a63c 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -588,13 +588,7 @@ void DeInitVCL() pSVData->maGDIData.mxScreenFontList.reset(); pSVData->maGDIData.mxScreenFontCache.reset(); -// we are iterating over a map and doing erase while inside a loop which is doing erase -// hence we can't use clear() here -pSVData->maGDIData.maScaleCache.remove_if([](const lru_scale_cache::key_value_pair_t&) -{ return true; }); - -pSVData->maGDIData.maThemeDrawCommandsCache.clear(); -pSVData->maGDIData.maThemeImageCache.clear(); +pSVData->dropCaches(); // Deinit Sal if (pSVData->mpDefInst)
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/treelist/iconview.cxx | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) New commits: commit 8b705ef10f40c71b693b219c82bef9e7ce767cb2 Author: Caolán McNamara AuthorDate: Sat Jun 3 16:31:24 2023 +0100 Commit: Caolán McNamara CommitDate: Sat Jun 3 20:23:56 2023 +0200 perf: use lighter weight png generation for iconview before: |--9.50%--JSDialogNotifyIdle::Invoke | | | |--9.33%--JSDialogNotifyIdle::generateWidgetUpdate | | IconView::DumpAsPropertyTree | | lcl_DumpEntryAndSiblings (inlined) | | | | | |--8.99%--extractPngString (inlined) | | | | | | | |--8.21%--GraphicConverter::Export | | | | Link::Call (inlined) | | | | GraphicFilter::FilterCallback | | | | GraphicFilter::ExportGraphic after: |--7.50%--JSDialogNotifyIdle::Invoke | JSDialogNotifyIdle::generateWidgetUpdate | IconView::DumpAsPropertyTree | lcl_DumpEntryAndSiblings (inlined) | | | |--7.16%--extractPngString (inlined) | | | | | |--6.84%--vcl::pngWrite Change-Id: Iae34c8bde3e0bbd075252de356f64557fd80c9ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152539 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx index b134991784b2..e658acdade6a 100644 --- a/vcl/source/treelist/iconview.cxx +++ b/vcl/source/treelist/iconview.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #include #include #include @@ -28,6 +29,7 @@ #include #include #include +#include namespace { @@ -262,7 +264,13 @@ static OString extractPngString(const SvLBoxContextBmp* pBmpItem) { BitmapEx aImage = pBmpItem->GetBitmap1().GetBitmapEx(); SvMemoryStream aOStm(65535, 65535); -if (GraphicConverter::Export(aOStm, aImage, ConvertDataFormat::PNG) == ERRCODE_NONE) +// Use fastest compression "1" +css::uno::Sequence aFilterData{ +comphelper::makePropertyValue("Compression", sal_Int32(1)), +}; +vcl::PngImageWriter aPNGWriter(aOStm); +aPNGWriter.setParameters(aFilterData); +if (aPNGWriter.write(aImage)) { css::uno::Sequence aSeq(static_cast(aOStm.GetData()), aOStm.Tell());
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/gdi/salgdilayout.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 127a7b263c4a45c1570f21080022f79099c5c3e6 Author: Michael Meeks AuthorDate: Tue May 23 18:19:18 2023 +0100 Commit: Caolán McNamara CommitDate: Wed May 24 20:38:54 2023 +0200 perf: surprising to see getenv on a profile. Change-Id: Id97c77d4c836e4f3c5a9eff6da07eb52d29248c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152167 Tested-by: Jenkins CollaboraOffice Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 91419779d871..a219ce89e5c6 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -62,7 +62,7 @@ SalGraphics::SalGraphics() bool SalGraphics::initWidgetDrawBackends(bool bForce) { -bool bFileDefinitionsWidgetDraw = !!getenv("VCL_DRAW_WIDGETS_FROM_FILE"); +static bool bFileDefinitionsWidgetDraw = !!getenv("VCL_DRAW_WIDGETS_FROM_FILE"); if (bFileDefinitionsWidgetDraw || bForce) {
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/window/window.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0acf7ff1cf7a7b34f9e731e6152b6cefaa8826a1 Author: Miklos Vajna AuthorDate: Mon May 15 13:33:11 2023 +0200 Commit: Miklos Vajna CommitDate: Tue May 16 08:48:24 2023 +0200 vcl: fix crash in Window::GetOutDev() Crashreport signature: program/libmergedlo.so rtl::Reference::get() const include/rtl/ref.hxx:208 program/libmergedlo.so vcl::Window::GetOutDev() vcl/source/window/window.cxx:574 program/libswlo.so SwViewShell::ImplEndAction(bool) sw/source/core/view/viewsh.cxx:294 program/libswlo.so SwViewShell::EndAction(bool) sw/inc/viewsh.hxx:611 i.e. GetOutDev() is called on a disposed vcl::Window. Change-Id: I5b17225fced85c6804fc93fd12021c92966d3aa7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151763 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 4ce13d590fe2..965f8772c293 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -571,7 +571,7 @@ Window::~Window() ::OutputDevice* Window::GetOutDev() { -return mpWindowImpl->mxOutDev.get(); +return mpWindowImpl ? mpWindowImpl->mxOutDev.get() : nullptr; } Color WindowOutputDevice::GetBackgroundColor() const
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/window/window.cxx |8 1 file changed, 8 insertions(+) New commits: commit a11502434a3c8fbf29ee82f7db0fc1be273d16bd Author: Szymon Kłos AuthorDate: Wed Mar 29 15:21:56 2023 +0200 Commit: Szymon Kłos CommitDate: Fri Mar 31 12:53:04 2023 + jsdialog: dump label relation between widgets Change-Id: I625346049b866d9f231bba461f40b671f4959e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149717 Tested-by: Szymon Kłos Reviewed-by: Szymon Kłos diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 5cfc50d717c0..4ce13d590fe2 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3398,6 +3398,14 @@ void Window::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) } } +vcl::Window* pAccLabelFor = getAccessibleRelationLabelFor(); +if (pAccLabelFor) +rJsonWriter.put("labelFor", pAccLabelFor->get_id()); + +vcl::Window* pAccLabelledBy = GetAccessibleRelationLabeledBy(); +if (pAccLabelledBy) +rJsonWriter.put("labelledBy", pAccLabelledBy->get_id()); + mpWindowImpl->maDumpAsPropertyTreeHdl.Call(rJsonWriter); }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - vcl/source
vcl/source/control/ctrl.cxx | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) New commits: commit 7c12399af9b13254b4c0be93a8c9c0b93b7cf49e Author: Marco Cecchetti AuthorDate: Thu Mar 9 20:49:46 2023 +0100 Commit: Andras Timar CommitDate: Sat Mar 11 12:31:49 2023 + lok: some tunneled dialog control was not invalidated correctly This patch fixes a regression for commit: "lok: form controls: rendering and mouse event forwarding" Change-Id: Iffb0757834a884a6c86206221660da2a24bdff17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148564 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar (cherry picked from commit 7ed760c4564834ec61ceb91f681dfc6daa1be4bd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148620 Tested-by: Andras Timar diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 46d1507eb40b..7a0b27982956 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -497,16 +497,17 @@ Control::GetUnzoomedControlPointFont() const void Control::LogicInvalidate(const tools::Rectangle* pRectangle) { -// avoid endless paint/invalidate loop in Impress -if (comphelper::LibreOfficeKit::isTiledPainting()) -return; - VclPtr pParent = GetParentWithLOKNotifier(); -if (!pParent) +if (!pParent || !dynamic_cast(GetParent())) +{ +// if control doesn't belong to a DocWindow, the overriden base class +// method has to be invoked +Window::LogicInvalidate(pRectangle); return; +} -// invalidate only controls that belong to a DocWindow -if (!dynamic_cast(GetParent())) +// avoid endless paint/invalidate loop in Impress +if (comphelper::LibreOfficeKit::isTiledPainting()) return; tools::Rectangle aResultRectangle;
[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' - vcl/source
vcl/source/app/salplug.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 9550587874617e83bb187305836d94b54d5ffd1f Author: Andras Timar AuthorDate: Tue Feb 14 11:51:50 2023 +0100 Commit: Andras Timar CommitDate: Tue Feb 14 12:01:22 2023 + fix error: macro UNIX_DESKTOP_DETECT is not used [-Werror=unused-macros] ... when HAVE_FEATURE_UI is 0 Change-Id: I353189a9cfd9eeb3d96008c440ff403d3634f14c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147002 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/vcl/source/app/salplug.cxx b/vcl/source/app/salplug.cxx index 378187dbfedc..e51375b94ae5 100644 --- a/vcl/source/app/salplug.cxx +++ b/vcl/source/app/salplug.cxx @@ -40,12 +40,14 @@ #include #include +#if HAVE_FEATURE_UI #if USING_X11 #define UNIX_DESKTOP_DETECT 1 #include #else #define UNIX_DESKTOP_DETECT 0 #endif +#endif #if defined(DISABLE_DYNLOADING) || !HAVE_FEATURE_UI #define STATIC_SAL_INSTANCE 1