chart2/source/controller/main/ChartController_Insert.cxx | 17 ++- configure.ac | 2 desktop/source/lib/init.cxx | 8 - download.lst | 4 external/cairo/UnpackedTarball_cairo.mk | 4 external/cairo/cairo/0001-Fix-out-of-memory-when-using-linear-gradient.patch.1 | 29 ++++++ include/sfx2/opengrf.hxx | 2 include/tools/hostfilter.hxx | 2 sc/inc/dpcache.hxx | 3 sc/qa/unit/PivotTableFormatsImportExport.cxx | 45 +++++----- sc/qa/unit/data/xlsx/pivot-table/PivotTableWithNoSourceData.xlsx |binary sc/source/core/data/PivotTableFormatOutput.cxx | 32 +++++-- sc/source/core/data/document.cxx | 1 sc/source/core/data/dpcache.cxx | 19 +++- sc/source/ui/drawfunc/fuins1.cxx | 9 ++ sc/source/ui/view/tabvwshe.cxx | 7 - sc/source/ui/view/tabvwshf.cxx | 12 ++ sd/inc/sdgrffilter.hxx | 3 sd/source/filter/grf/sdgrffilter.cxx | 12 +- sd/source/ui/func/fuinsert.cxx | 7 - sd/source/ui/unoidl/unomodel.cxx | 7 + sfx2/source/appl/opengrf.cxx | 28 +++--- sfx2/source/notebookbar/SfxNotebookBar.cxx | 2 solenv/bin/assemble-flatpak-appdata.sh | 28 +----- sw/qa/extras/ooxmlexport/data/tdf169413_asciiTheme.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport25.cxx | 7 + sw/qa/filter/md/data/ole-without-graphic.odt |binary sw/qa/filter/md/md.cxx | 10 ++ sw/source/core/access/accpara.cxx | 2 sw/source/filter/md/wrtmd.cxx | 15 ++- sw/source/filter/ww8/docxattributeoutput.cxx | 11 +- sw/source/uibase/uiview/view2.cxx | 2 tools/source/inet/hostfilter.cxx | 14 ++- winaccessibility/source/UAccCOM/MAccessible.cxx | 28 ++++-- 34 files changed, 260 insertions(+), 112 deletions(-)
New commits: commit 200b5228cef7fe0615d7283d6ca200a5bb8e907f Author: Pranam Lashkari <[email protected]> AuthorDate: Fri Nov 28 22:52:12 2025 +0530 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:34 2025 +0100 fix multiple sheet rename error dialogs appearing regression from 70d8195a2b72440fe929e4e3761d1f1d5ace0096 Change-Id: I285a87f6a315034527749662eb96321afe081994 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194802 Tested-by: Jenkins CollaboraOffice <[email protected]> Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194956 diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 91d1504a6f0b..9b2297ed9918 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -916,14 +916,6 @@ bool ScDocument::RenameTab( SCTAB nTab, const OUString& rName, bool bExternalDoc SfxLokHelper::notifyDocumentSizeChangedAllViews(pModel); } } - else - { - OUString aErrMsg(ScResId(STR_INVALIDTABNAME)); - std::shared_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog( - GetDocumentShell()->GetFrame()->GetFrameWeld(), VclMessageType::Warning, - VclButtonsType::Ok, aErrMsg)); - xBox->runAsync(xBox, [](sal_uInt32) {}); - } } collectUIInformation({{"NewName", rName}}, u"Rename_Sheet"_ustr); diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index c471bc4be27e..6ec5cfd7b5ef 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -1101,6 +1101,14 @@ void ScTabViewShell::ExecuteAppendOrRenameTable(SfxRequest& rReq) { rReq.Done( *pReqArgs ); } + else + { + OUString aErrMsg(ScResId(STR_INVALIDTABNAME)); + std::shared_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog( + GetFrameWeld(), VclMessageType::Warning, + VclButtonsType::Ok, aErrMsg)); + xBox->runAsync(xBox, [](sal_uInt32) {}); + } } else { @@ -1192,8 +1200,8 @@ bool ScTabViewShell::DoAppendOrRenameTableDialog(sal_Int32 nResult, const VclPtr else { OUString aErrMsg ( ScResId( STR_INVALIDTABNAME ) ); - std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(), - VclMessageType::Warning, VclButtonsType::Ok, aErrMsg)); + std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog( + GetFrameWeld(), VclMessageType::Warning, VclButtonsType::Ok, aErrMsg)); xBox->run(); } } commit ff65fa983aca1e58446a1134b61ca0309593d583 Author: Pranam Lashkari <[email protected]> AuthorDate: Fri Nov 28 21:55:06 2025 +0530 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:34 2025 +0100 LOK: show warning/error dialogs show error dialog when invalid images are inserted (calc, impress) part 2 of 70d8195a2b72440fe929e4e3761d1f1d5ace0096 problem: when inserted and image in calc or impress, and image format is incorrect or not supported (i.e: .txt, .heic) then LOK did not get any failure messages Change-Id: I8af0cd5cf360574c116e6383ada170e32e317d12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194801 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Pranam Lashkari <[email protected]> (cherry picked from commit 86e643a4c4a26401bee8b636f7068859ab7fc683) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194955 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/include/sfx2/opengrf.hxx b/include/sfx2/opengrf.hxx index 4546fbabc726..94fed4e4b52e 100644 --- a/include/sfx2/opengrf.hxx +++ b/include/sfx2/opengrf.hxx @@ -22,6 +22,7 @@ #include <sfx2/dllapi.h> #include <rtl/ustring.hxx> #include <comphelper/errcode.hxx> +#include <unotools/resmgr.hxx> namespace com::sun::star::ui::dialogs { class XFilePickerControlAccess; } namespace com::sun::star::uno { template <class interface_type> class Reference; } @@ -58,6 +59,7 @@ public: void SetDetectedFilter(const OUString&); css::uno::Reference<css::ui::dialogs::XFilePickerControlAccess> const & GetFilePickerControlAccess() const; + static TranslateId SvxOpenGrfErr2ResId(ErrCode err); private: SvxOpenGraphicDialog (const SvxOpenGraphicDialog&) = delete; diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index d8eda3aba080..e5cad07b2c4a 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -25,6 +25,7 @@ #include <sfx2/lokhelper.hxx> #include <sfx2/opengrf.hxx> #include <sfx2/viewfrm.hxx> +#include <sfx2/sfxresid.hxx> #include <svx/svdograf.hxx> #include <svx/svdomedia.hxx> #include <svx/svdpage.hxx> @@ -288,6 +289,14 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell& rViewSh, { lcl_InsertGraphic( aGraphic, aFileName, bAsLink, true, rViewSh, pWindow, pView ); } + else + { + std::shared_ptr<weld::MessageDialog> xWarn(Application::CreateMessageDialog( + pWin->GetFrameWeld(), VclMessageType::Warning, VclButtonsType::Ok, + SfxResId(SvxOpenGraphicDialog::SvxOpenGrfErr2ResId(nError)))); + + xWarn->runAsync(xWarn, [](sal_uInt32) {}); + } } else { diff --git a/sd/inc/sdgrffilter.hxx b/sd/inc/sdgrffilter.hxx index a90934dd6dea..32647a371870 100644 --- a/sd/inc/sdgrffilter.hxx +++ b/sd/inc/sdgrffilter.hxx @@ -33,7 +33,8 @@ public: bool Import(); bool Export() override; - static void HandleGraphicFilterError(ErrCode nFilterError, ErrCode nStreamError); + static void HandleGraphicFilterError(ErrCode nFilterError, ErrCode nStreamError, + weld::Window* frameWeld = nullptr); static void InsertSdrGrafObj(const Graphic& rGraphic, SdPage* pPage); }; diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx index ea437dfb2ee0..10ad074709c4 100644 --- a/sd/source/filter/grf/sdgrffilter.cxx +++ b/sd/source/filter/grf/sdgrffilter.cxx @@ -103,7 +103,8 @@ SdGRFFilter::~SdGRFFilter() { } -void SdGRFFilter::HandleGraphicFilterError( ErrCode nFilterError, ErrCode nStreamError ) +void SdGRFFilter::HandleGraphicFilterError(ErrCode nFilterError, ErrCode nStreamError, + weld::Window* frameWeld) { if (ERRCODE_NONE != nStreamError) { @@ -130,11 +131,12 @@ void SdGRFFilter::HandleGraphicFilterError( ErrCode nFilterError, ErrCode nStrea if (pId && pId == STR_IMPORT_GRFILTER_IOERROR) ErrorHandler::HandleError( ERRCODE_IO_GENERAL ); - else + else if (frameWeld || !comphelper::LibreOfficeKit::isActive()) { - std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(nullptr, - VclMessageType::Warning, VclButtonsType::Ok, pId ? SdResId(pId) : OUString())); - xErrorBox->run(); + std::shared_ptr<weld::MessageDialog> xErrorBox( + Application::CreateMessageDialog(frameWeld, VclMessageType::Warning, VclButtonsType::Ok, + pId ? SdResId(pId) : OUString())); + xErrorBox->runAsync(xErrorBox, [](sal_uInt32) {}); } } diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index fd26dc295c76..bf3aa29db630 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -186,10 +186,11 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq ) } } } - else if (!comphelper::LibreOfficeKit::isActive()) + else { - // TODO: enable in LOK, it contains synchronous error window without LOKNotifier - SdGRFFilter::HandleGraphicFilterError( nError, GraphicFilter::GetGraphicFilter().GetLastError() ); + SdGRFFilter::HandleGraphicFilterError(nError, + GraphicFilter::GetGraphicFilter().GetLastError(), + mpWindow ? mpWindow->GetFrameWeld() : nullptr); } } diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx index 16e0731f310b..617f417f40f6 100644 --- a/sfx2/source/appl/opengrf.cxx +++ b/sfx2/source/appl/opengrf.cxx @@ -45,20 +45,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::uno; -static TranslateId SvxOpenGrfErr2ResId( ErrCode err ) -{ - if (err == ERRCODE_GRFILTER_OPENERROR) - return RID_SVXSTR_GRFILTER_OPENERROR; - else if (err == ERRCODE_GRFILTER_IOERROR) - return RID_SVXSTR_GRFILTER_IOERROR; - else if (err == ERRCODE_GRFILTER_VERSIONERROR) - return RID_SVXSTR_GRFILTER_VERSIONERROR; - else if (err == ERRCODE_GRFILTER_FILTERERROR) - return RID_SVXSTR_GRFILTER_FILTERERROR; - else - return RID_SVXSTR_GRFILTER_FORMATERROR; -} - struct SvxOpenGrf_Impl { SvxOpenGrf_Impl(weld::Window* pPreferredParent, @@ -277,6 +263,20 @@ void SvxOpenGraphicDialog::SetDetectedFilter(const OUString& rStr) mpImpl->sDetectedFilter = rStr; } +TranslateId SvxOpenGraphicDialog::SvxOpenGrfErr2ResId(ErrCode err) +{ + if (err == ERRCODE_GRFILTER_OPENERROR) + return RID_SVXSTR_GRFILTER_OPENERROR; + else if (err == ERRCODE_GRFILTER_IOERROR) + return RID_SVXSTR_GRFILTER_IOERROR; + else if (err == ERRCODE_GRFILTER_VERSIONERROR) + return RID_SVXSTR_GRFILTER_VERSIONERROR; + else if (err == ERRCODE_GRFILTER_FILTERERROR) + return RID_SVXSTR_GRFILTER_FILTERERROR; + else + return RID_SVXSTR_GRFILTER_FORMATERROR; +} + Reference<ui::dialogs::XFilePickerControlAccess> const & SvxOpenGraphicDialog::GetFilePickerControlAccess() const { return mpImpl->xCtrlAcc; commit d9cfe5dc7cd49d0b061b4945e82ff05ba9b4ae80 Author: Pranam Lashkari <[email protected]> AuthorDate: Fri Nov 28 19:02:10 2025 +0530 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:34 2025 +0100 LOK: show warning/error dialogs show error dialog when invalid images are inserted show error dialog when sheet rename was invalid Change-Id: I9bf6bb25ac247e966da36bffcda3284d5d82ae42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194778 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit 70d8195a2b72440fe929e4e3761d1f1d5ace0096) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194954 diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index d1c157dece3c..91d1504a6f0b 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -23,6 +23,7 @@ #include <editeng/editobj.hxx> #include <svx/svditer.hxx> #include <sfx2/docfile.hxx> +#include <sfx2/viewfrm.hxx> #include <svl/numformat.hxx> #include <poolcach.hxx> #include <svl/zforlist.hxx> @@ -915,6 +916,14 @@ bool ScDocument::RenameTab( SCTAB nTab, const OUString& rName, bool bExternalDoc SfxLokHelper::notifyDocumentSizeChangedAllViews(pModel); } } + else + { + OUString aErrMsg(ScResId(STR_INVALIDTABNAME)); + std::shared_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog( + GetDocumentShell()->GetFrame()->GetFrameWeld(), VclMessageType::Warning, + VclButtonsType::Ok, aErrMsg)); + xBox->runAsync(xBox, [](sal_uInt32) {}); + } } collectUIInformation({{"NewName", rName}}, u"Rename_Sheet"_ustr); diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 2029adbacc16..fa214e0e9334 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -392,7 +392,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) OUString sGraphicFormat = SwResId(STR_POOLFRM_GRAPHIC); const SfxStringItem* pName = rReq.GetArg<SfxStringItem>(SID_INSERT_GRAPHIC); - bool bShowError = !pName; + bool bShowError = !pName || comphelper::LibreOfficeKit::isActive(); // No file pickers in a non-desktop (mobile app) build. commit abb34bd4e4b85f902549aacdde59224164f7ced1 Author: Michael Stahl <[email protected]> AuthorDate: Thu Dec 4 10:25:37 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:34 2025 +0100 libpng: upgrade to release 1.6.52 Fixes CVE-2025-66293 Change-Id: I1f0aefccf2b80d14e70b423381c121a97e510045 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194979 Reviewed-by: Stephan Bergmann <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit f65e262ac15f247f9fabe6d60d3e69d269c68608) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194993 Tested-by: Stephan Bergmann <[email protected]> diff --git a/download.lst b/download.lst index 4724b873b231..e762a3d95912 100644 --- a/download.lst +++ b/download.lst @@ -646,8 +646,8 @@ PIXMAN_TARBALL := pixman-0.42.2.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts -LIBPNG_SHA256SUM := a050a892d3b4a7bb010c3a95c7301e49656d72a64f1fc709a90b8aded192bed2 -LIBPNG_TARBALL := libpng-1.6.51.tar.xz +LIBPNG_SHA256SUM := 36bd726228ec93a3b6c22fdb49e94a67b16f2fe9b39b78b7cb65772966661ccc +LIBPNG_TARBALL := libpng-1.6.52.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts commit 0ea6dc89e4e55ec3c87d084276e1261e389ce386 Author: Michael Stahl <[email protected]> AuthorDate: Thu Nov 27 20:34:38 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:34 2025 +0100 tdf#167362 sw: fix footnote hang with JAWS When moving the cursor to a line with a footnote, JAWS tries to retrieve the text attributes, gets an E_FAIL, but never gives up trying again. The problem is that some entirely undocumented magic number is stuffed into an uno::Any as `long` but the "CharEscapement" property is actually `short` and thus reading the property in AccessibleTextAttributeHelper::ConvertUnoToIAccessible2TextAttributes() throws and this is caught by CAccTextBase::get_attributes() and E_FAIL is returned. > vcllo.dll!o3tl::doAccess<short>(const com::sun::star::uno::Any & any) Line 284 vcllo.dll!AccessibleTextAttributeHelper::ConvertUnoToIAccessible2TextAttributes(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> & rUnoAttributes, IA2AttributeType eAttributeType) Line 271 vcllo.dll!AccessibleTextAttributeHelper::GetIAccessible2TextAttributes(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleText> xText, IA2AttributeType eAttributeType, long nOffset, long & rStartOffset, long & rEndOffset) Line 346 UAccCOM.dll!CAccTextBase::get_attributes(long offset, long * startOffset, long * endOffset, wchar_t * * textAttributes) Line 145 UAccCOM.dll!CAccText::get_attributes(long offset, long * startOffset, long * endOffset, wchar_t * * textAttributes) Line 54 FSDomNodeSymphony.dll!00007ff93f0fea12() ^ JAWS Change-Id: I6c487f9d2db462b787034df3d5ba2f2822d14746 (cherry picked from commit 776662481583935ca148930de1e91ea499c53b3a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194736 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit fac7e501d77a009fcd0bb1796a3ce8cee0c5e1f7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194869 Tested-by: Michael Stahl <[email protected]> diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 67578811a996..f6252ac87ce4 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -2008,7 +2008,7 @@ void SwAccessibleParagraph::_correctValues( const sal_Int32 nIndex, { if ( GetPortionData().IsIndexInFootnode(nIndex) ) { - rValue.Value <<= sal_Int32(101); + rValue.Value <<= sal_Int16(101); } continue; } commit b3019b6b90162e5540dd25d0363e41283c95ece9 Author: Michael Stahl <[email protected]> AuthorDate: Thu Nov 27 16:52:12 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:34 2025 +0100 tdf#168897 winaccessibility: fix JAWS crash with CAccTable stack: UAccCOM.dll!ATL::CComObjectRootBase::OuterAddRef() Line 2631 UAccCOM.dll!ATL::CComContainedObject<CAccImage>::AddRef() Line 3719 AccEventCache.dll!00007ffd2039be28() AccEventCache.dll!00007ffd20355677() AccEventCache.dll!00007ffd20346d41() AccEventCache.dll!00007ffd20347f9a() AccEventCache.dll!00007ffd20338ba2() AccEventCache.dll!00007ffd20380dd8() AccEventCache.dll!00007ffd2037fd7b() AccEventCache.dll!00007ffd2037f7ee() AccEventCache.dll!00007ffd2037d9e6() AccEventCache.dll!00007ffd2037d07f() ^ JAWS GlobalHooksDispatcher.dll!00007ffd214daed4() GlobalHooksDispatcher.dll!00007ffd214d8d84() user32.dll!00007ffd492068ac() ntdll.dll!00007ffd4ae71424() win32u.dll!NtUserNotifyWinEvent() winaccessibility.dll!AccObjectWinManager::NotifyAccEvent(com::sun::star::accessibility::XAccessible * pXAcc, UnoMSAAEvent eEvent) Line 182 ^ selfAccObj looks very dead here but that is a red herring! winaccessibility.dll!AccContainerEventListener::FireStateFocusedChange(bool enable) Line 351 winaccessibility.dll!AccContainerEventListener::SetComponentState(__int64 state, bool enable) Line 178 winaccessibility.dll!AccParagraphEventListener::SetComponentState(__int64 state, bool enable) Line 123 winaccessibility.dll!AccContainerEventListener::HandleStateChangedEvent(com::sun::star::uno::Any oldValue, com::sun::star::uno::Any newValue) Line 106 winaccessibility.dll!AccContainerEventListener::notifyEvent(const com::sun::star::accessibility::AccessibleEventObject & aEvent) Line 72 winaccessibility.dll!AccParagraphEventListener::notifyEvent(const com::sun::star::accessibility::AccessibleEventObject & aEvent) Line 77 comphelper.dll!comphelper::AccessibleEventNotifier::addEvent(const unsigned long _nClient, const com::sun::star::accessibility::AccessibleEventObject & _rEvent) Line 256 swlo.dll!SwAccessibleContext::FireAccessibleEvent(com::sun::star::accessibility::AccessibleEventObject & rEvent) Line 457 swlo.dll!SwAccessibleContext::FireStateChangedEvent(__int64 nState, bool bNewState) Line 478 swlo.dll!SwAccessibleParagraph::InvalidateFocus_() Line 397 swlo.dll!SwAccessibleContext::InvalidateFocus() Line 1314 swlo.dll!SwAccessibleMap::InvalidateFocus() Line 2695 swlo.dll!SwViewShell::InvalidateAccessibleFocus() Line 2597 swlo.dll!SwEditWin::GetFocus() Line 5569 vcllo.dll!vcl::Window::CompatGetFocus() Line 3891 vcllo.dll!vcl::Window::ImplGrabFocus(GetFocusFlags nFlags) Line 385 vcllo.dll!vcl::Window::GrabFocus() Line 2983 sfxlo.dll!SfxFrame::GrabFocusOnComponent_Impl() Line 650 The problem is quite simply that CMAccessible::SmartQI() returns a pointer that is the result of querying the newly created COM aggregation for IID_IUnknown instead of the requested `iid` interface. Apparently the wrong result happens to work in many cases, but the CAccTable actually has 2 interfaces IAccessibleTable and IAccessibleTable2, and the COM aggravation for IAccessibleTable2 is the one that crashes; in this case the correct pointer is an offset of 8 to the start of CAccTable, while in the working cases there is no offset. So likely the bug was introduced by commits 3b86569fcba210eb6570fabef7ff8abf6aff91f0 and d0e8e6e3cd51736583603e37f0ba2ff7bdf29f5c but only started to crash with 839dbf9ecf9f8fbec7de983d1a2e16d7de6f868c. Change-Id: I7c7d295c8032b95fe7f64b8da4dd9bc3212563f9 (cherry picked from commit 9502a9f76731afa0f5105e6d79b069222677f88d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194727 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Stephan Bergmann <[email protected]> (cherry picked from commit 7dc79ac270e855f58d24b2dedebe06a209a4bc66) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194868 Tested-by: Michael Stahl <[email protected]> diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index a6454f3c39f8..9d4271f41988 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -2340,15 +2340,31 @@ HRESULT WINAPI CMAccessible::SmartQI(void* /*pv*/, REFIID iid, void** ppvObject) assert(hr == S_OK); if(hr == S_OK) { + // does it matter which IID was used to query before it is + // put into the map? probably not, and currently + // QueryInterface is called after lookup anyway... m_containedObjects.emplace(*rEntry.piid, static_cast<IUnknown*>(*ppvObject)); + // very nonobvious: this QI only succeeds on an IID_IUnknown + // pointer because that one points directly to the + // CComAggObject whereas the other-IID ones point into + // CAcc* objects and end up forward back here to SmartQI + // which firstly doesn't know IID_IUNOXWrapper and secondly + // it would be useless to return a new instance for it, it + // *must* be the same CAcc* instance that was just created. + // Also, it's not possible to get the CAccTable out of the + // CComAggObject because it is private. + // However for the aggregated objects this here is also the + // *only* place where this interface is called; every other + // call is on a non-aggregated object - so it's sufficient + // if it works once right after construction. IUNOXWrapper* wrapper = nullptr; static_cast<IUnknown*>(*ppvObject)->QueryInterface(IID_IUNOXWrapper, reinterpret_cast<void**>(&wrapper)); - if(wrapper) - { - wrapper->put_XInterface( - reinterpret_cast<hyper>(m_xAccessible.get())); - wrapper->Release(); - } + assert(wrapper); // every map entry implements it currently + wrapper->put_XInterface( + reinterpret_cast<hyper>(m_xAccessible.get())); + wrapper->Release(); + // ppvObject is IID_IUnknown - Query for requested target! + static_cast<IUnknown*>(*ppvObject)->QueryInterface(iid, ppvObject); return S_OK; } } commit 5898923bb0a406d81968bd788e5ac8e2feca6477 Author: Caolán McNamara <[email protected]> AuthorDate: Mon Nov 24 08:30:31 2025 +0000 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:34 2025 +0100 null deref of ChartModel in async dialog callback #0 ___pthread_mutex_lock (mutex=0x108) at ./nptl/pthread_mutex_lock.c:80 #1 0x0000740d2e7e5e53 in __gthread_mutex_lock (__mutex=0x108) at /opt/rh/devtoolset-12/root/usr/include/c++/12/x86_64-redhat-linux/bits/gthr-default.h:749 #2 std::mutex::lock (this=0x108) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/std_mutex.h:100 #3 std::unique_lock<std::mutex>::lock (this=0x7ffd19a7d7f0) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_lock.h:139 #4 std::unique_lock<std::mutex>::unique_lock (__m=..., this=0x7ffd19a7d7f0) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_lock.h:69 #5 apphelper::LifeTimeGuard::LifeTimeGuard (rManager=..., this=0x7ffd19a7d7f0) at /home/collabora/jenkins/workspace/build_core_co-25.04_for_online_snapshot/chart2/source/inc/LifeTime.hxx:175 #6 chart::ChartModel::lockControllers (this=0x0) at /home/collabora/jenkins/workspace/build_core_co-25.04_for_online_snapshot/chart2/source/model/main/ChartModel.cxx:473 #7 0x0000740d2e8a220f in chart::ControllerLockGuardUNO::ControllerLockGuardUNO (this=this@entry=0x7ffd19a7d868, xModel=...) at /home/collabora/jenkins/workspace/build_core_co-25.04_for_online_snapshot/chart2/source/tools/ControllerLockGuard.cxx:32 #8 0x0000740d2e67a9b9 in operator() (nResult=<optimized out>, __closure=0x528ffe80) at /home/collabora/jenkins/workspace/build_core_co-25.04_for_online_snapshot/chart2/source/controller/main/ChartController_Insert.cxx:514 #9 std::__invoke_impl<void, chart::ChartController::executeDispatch_InsertTrendline()::<lambda(int)>&, int> (__f=...) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/invoke.h:61 #10 std::__invoke_r<void, chart::ChartController::executeDispatch_InsertTrendline()::<lambda(int)>&, int> (__fn=...) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/invoke.h:111 #11 std::_Function_handler<void(int), chart::ChartController::executeDispatch_InsertTrendline()::<lambda(int)> >::_M_invoke(const std::_Any_data &, int &&) (__functor=..., __args#0=<optimized out>) Change-Id: Ic95406f6f4894a4e064a5e539741279d7c7a6bab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194413 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Andras Timar <[email protected]> (cherry picked from commit 5495f4d6889dc0c465f0e41219c11d0f8c26ceef) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194809 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index 5513671a2965..cf95a24180f5 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -465,8 +465,10 @@ void ChartController::executeDispatch_InsertMenu_Trendlines() void ChartController::executeDispatch_InsertTrendline() { + rtl::Reference<ChartModel> xChartModel = getChartModel(); + rtl::Reference< DataSeries > xRegressionCurveContainer = - ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getChartModel()); + ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), xChartModel); if( !xRegressionCurveContainer.is() ) return; @@ -487,7 +489,7 @@ void ChartController::executeDispatch_InsertTrendline() auto aItemConverter = std::make_shared<wrapper::RegressionCurveItemConverter>( xCurve, xRegressionCurveContainer, m_pDrawModelWrapper->getSdrModel().GetItemPool(), m_pDrawModelWrapper->getSdrModel(), - getChartModel() ); + xChartModel ); // open dialog SfxItemSet aItemSet = aItemConverter->CreateEmptyItemSet(); @@ -496,22 +498,23 @@ void ChartController::executeDispatch_InsertTrendline() ObjectIdentifier::createDataCurveCID( ObjectIdentifier::getSeriesParticleFromCID( m_aSelection.getSelectedCID()), RegressionCurveHelper::getRegressionCurveIndex( xRegressionCurveContainer, xCurve ), false )); - aDialogParameter.init( getChartModel() ); + aDialogParameter.init( xChartModel ); ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get()); SolarMutexGuard aGuard; auto aDialog = std::make_shared<SchAttribTabDlg>(GetChartFrame(), &aItemSet, &aDialogParameter, - &aViewElementListProvider, getChartModel()); + &aViewElementListProvider, xChartModel); // note: when a user pressed "OK" but didn't change any settings in the // dialog, the SfxTabDialog returns "Cancel" - SfxTabDialogController::runAsync(aDialog, [this, aDialog, aItemConverter = std::move(aItemConverter), - xUndoGuard=std::move(xUndoGuard)](int nResult) { + SfxTabDialogController::runAsync(aDialog, [aDialog, aItemConverter = std::move(aItemConverter), + xUndoGuard=std::move(xUndoGuard), + xChartModel=std::move(xChartModel)](int nResult) { if ( nResult == RET_OK || aDialog->DialogWasClosedWithOK() ) { const SfxItemSet* pOutItemSet = aDialog->GetOutputItemSet(); if( pOutItemSet ) { - ControllerLockGuardUNO aCLGuard( getChartModel() ); + ControllerLockGuardUNO aCLGuard( xChartModel ); aItemConverter->ApplyItemSet( *pOutItemSet ); } xUndoGuard->commit(); commit b65d28f4cc32d166036bec7cf79ac05967d9a18f Author: Andras Timar <[email protected]> AuthorDate: Thu Nov 27 13:56:17 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:34 2025 +0100 Bump version to 25.04.7.3 Change-Id: Ie306c72cbfd5f9fc59c576ac1efa4449dfee2abe diff --git a/configure.ac b/configure.ac index afdfd1be5b0c..c7fc1b3bf839 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([Collabora Office],[25.04.7.2],[],[],[https://collaboraoffice.com/]) +AC_INIT([Collabora Office],[25.04.7.3],[],[],[https://collaboraoffice.com/]) dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard commit b90d3f5a46daa0c421bed08f0c1ae7718a398c26 Author: Caolán McNamara <[email protected]> AuthorDate: Tue Nov 25 20:18:18 2025 +0000 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:34 2025 +0100 a null mpDoc was seen here under windows Change-Id: I638a0bd77538db7200bdc2c705f51ec031bcdb46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194548 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Code-Style: Miklos Vajna <[email protected]> (cherry picked from commit e257b5a28896f140c4b47c258491031a0bec06bb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194684 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Code-Style: Caolán McNamara <[email protected]> diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index 736658e9c4b5..fdd5857dafe9 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -3972,7 +3972,7 @@ OString SdXImpressDocument::getViewRenderState(SfxViewShell* pViewShell) if (pView) { const SdViewOptions& pVOpt = pView->GetViewOptions(); - if (mpDoc->GetOnlineSpell()) + if (mpDoc && mpDoc->GetOnlineSpell()) aState.append('S'); if (pVOpt.mnDocBackgroundColor == svtools::ColorConfig::GetDefaultColor(svtools::DOCCOLOR, 1)) aState.append('D'); commit 7019b1914349bf49e77ed0b60cad0350e52087c9 Author: Caolán McNamara <[email protected]> AuthorDate: Wed Nov 26 08:46:59 2025 +0000 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:34 2025 +0100 avoid terminate after unhandled exception #3 0x00007e29f0a42476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26 #4 0x00007e29f0a287f3 in __GI_abort () at ./stdlib/abort.c:79 #5 0x00007e29f0ea2b9e in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6 #6 0x00007e29f0eae20c in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6 #7 0x00007e29f0eae277 in std::terminate() () from /lib/x86_64-linux-gnu/libstdc++.so.6 #8 0x00007e29f0eae4d8 in __cxa_throw () from /lib/x86_64-linux-gnu/libstdc++.so.6 #9 0x00007e29ead812a5 in SfxBaseModel::MethodEntryCheck (this=<optimized out>, i_mustBeInitialized=<optimized out>) at sfx2/source/doc/sfxbasemodel.cxx:3069 #10 0x00007e29eca6d629 in SfxModelGuard::SfxModelGuard (i_eState=SfxModelGuard::E_FULLY_ALIVE, i_rModel=..., this=0x7ffc94a61ec0) at sfx2/source/inc/docundomanager.hxx:76 #11 SfxBaseModel::getIdentifier (this=0x27ad5ab0) at sfx2/source/doc/sfxbasemodel.cxx:4015 #12 0x00007e29ec098e03 in (anonymous namespace)::ModuleManager::implts_identify (this=0x328c9cc0, xComponent=...) at framework/source/services/modulemanager.cxx:327 #13 0x00007e29ec0991f3 in (anonymous namespace)::ModuleManager::identify (this=0x328c9cc0, xModule=...) at framework/source/services/modulemanager.cxx:191 #14 0x00007e29ecaa8e0e in sfx2::SfxNotebookBar::IsActive (bConsiderSingleToolbar=<optimized out>) at sfx2/source/notebookbar/SfxNotebookBar.cxx:324 #15 0x00007e29ecaa95ab in sfx2::SfxNotebookBar::StateMethod (pSysWindow=0x36778bf0, xFrame=..., rUIFile=..., bReloadNotebookbar=<optimized out>) at sfx2/source/notebookbar/SfxNotebookBar.cxx:444 #16 0x00007e29dd85707b in sd::DrawDocShell::GetState (this=0x367c3290, rSet=...) at sd/source/ui/docshell/docshell.cxx:327 #17 0x00007e29ec8b67fe in SfxShell::GetSlotState (this=0x367c3290, nSlotId=nSlotId@entry=10338, pIF=<optimized out>, pIF@entry=0x0, pStateSet=pStateSet@entry=0x0) Change-Id: I13918818c04138848020ab8bdb646b0cb08f130a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194549 Reviewed-by: Michael Stahl <[email protected]> Code-Style: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> (cherry picked from commit adadeaf98114ffdf9893e6c92a630f7e90597f62) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194682 Code-Style: Miklos Vajna <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Miklos Vajna <[email protected]> diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index 2630cbc01eae..ad6152fa97da 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -323,7 +323,7 @@ bool SfxNotebookBar::IsActive(bool bConsiderSingleToolbar) { eApp = vcl::EnumContext::GetApplicationEnum(xModuleManager->identify(xFrame)); } - catch (css::frame::UnknownModuleException& e) + catch (css::uno::Exception& e) { SAL_WARN("sfx.appl", "SfxNotebookBar::IsActive(): " + e.Message); return false; commit bf994e7cb51760a25ce9e1257080930c14cbb4be Author: Justin Luth <[email protected]> AuthorDate: Sat Nov 15 14:08:13 2025 -0500 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:34 2025 +0100 tdf#169413 docx export: don't write themes twice in w:rFonts A round-trip was reported as corrupt by both Writer and Word. This probably started in 6.0 with tdf#38778 although a bibisect pointed to my 24.2 patch for tdf#108505. Although I'm not exactly sure what triggers this, grabBag was doubling up the bug report's conf12.docx w:cstheme in rFonts which looked like <w:rFonts w:cstheme="minorHAnsi" w:cs="Calibri" w:cstheme="minorHAnsi"/> and duplicate entries are invalid XML - even firefox complains. make CppunitTest_sw_ooxmlexport25 \ CPPUNIT_TEST_NAME=testTdf169413_asciiTheme Change-Id: Id9561b940c2c536147422e10a8c1d37ea51c2e78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194057 Reviewed-by: Justin Luth <[email protected]> Tested-by: Jenkins (cherry picked from commit 9e8211b1c2a814880c0108b2122a6085be192b82) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194062 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit 2a6de61011f4752451c266557d7d8f94562735b8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194693 Tested-by: Andras Timar <[email protected]> Reviewed-by: Andras Timar <[email protected]> Code-Style: Andras Timar <[email protected]> diff --git a/sw/qa/extras/ooxmlexport/data/tdf169413_asciiTheme.docx b/sw/qa/extras/ooxmlexport/data/tdf169413_asciiTheme.docx new file mode 100644 index 000000000000..308e44019bbf Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf169413_asciiTheme.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport25.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport25.cxx index 2098b407eaf1..1b0f0d794b09 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport25.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport25.cxx @@ -83,6 +83,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf165478_bottomAligned, "tdf165478_bottomAligned.d CPPUNIT_ASSERT_EQUAL(nCellBottom, nTextBottom); } +CPPUNIT_TEST_FIXTURE(Test, testTdf169413_asciiTheme) +{ + // the document failed to reload without errors after a round-trip + createSwDoc("tdf169413_asciiTheme.docx"); + saveAndReload(mpFilter); +} + CPPUNIT_TEST_FIXTURE(Test, testTdf166620) { createSwDoc(); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index f62d168f2b38..744d60f8d8f0 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3139,7 +3139,7 @@ void DocxAttributeOutput::CmdEndField_Impl(SwTextNode const*const pNode, /// </w:rPr> /// <w:fldChar w:fldCharType="begin" /> /// </w:r> -/// <w:r> +/// <w:r> /// <w:rPr> /// <!-- properties written with DoWriteFieldRunProperties() /// </w:rPr> @@ -10338,19 +10338,22 @@ void DocxAttributeOutput::CharGrabBag( const SfxGrabBagItem& rItem ) { if ( rGrabBagElement.second >>= sOriginalValue ) bWriteCSTheme = - ( m_pFontsAttrList->getOptionalValue( FSNS( XML_w, XML_cs ) ) == sOriginalValue ); + (m_pFontsAttrList->getOptionalValue(FSNS( XML_w, XML_cs)) == sOriginalValue) + && !m_pFontsAttrList->hasAttribute(FSNS(XML_w, XML_cstheme)); } else if ( m_pFontsAttrList.is() && rGrabBagElement.first == "CharThemeFontNameAscii" ) { if ( rGrabBagElement.second >>= sOriginalValue ) bWriteAsciiTheme = - ( m_pFontsAttrList->getOptionalValue( FSNS( XML_w, XML_ascii ) ) == sOriginalValue ); + (m_pFontsAttrList->getOptionalValue(FSNS( XML_w, XML_ascii)) == sOriginalValue) + && !m_pFontsAttrList->hasAttribute(FSNS(XML_w, XML_asciiTheme)); } else if ( m_pFontsAttrList.is() && rGrabBagElement.first == "CharThemeFontNameEastAsia" ) { if ( rGrabBagElement.second >>= sOriginalValue ) bWriteEastAsiaTheme = - ( m_pFontsAttrList->getOptionalValue( FSNS( XML_w, XML_eastAsia ) ) == sOriginalValue ); + (m_pFontsAttrList->getOptionalValue(FSNS(XML_w, XML_eastAsia)) == sOriginalValue) + && !m_pFontsAttrList->hasAttribute(FSNS(XML_w, XML_eastAsiaTheme)); } } commit e4adc4a2621f3c3f0350bd81ef16677e671a051a Author: Caolán McNamara <[email protected]> AuthorDate: Tue Nov 25 17:36:56 2025 +0000 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:33 2025 +0100 backport cairo's fix out of memory when using linear gradient of: https://gitlab.freedesktop.org/cairo/cairo/-/commit/d517773ff145d06c5b9efb21841fbc95caf5f540 Change Id: Ia168eb3ac9e4aa7306224a0d53ed4406f16aa021 Change-Id: Ic4ffc24bb225cc4b0d44ae8496a74f4d52220170 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194526 Code-Style: Caolán McNamara <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Armin Le Grand <[email protected]> Tested-by: Armin Le Grand <[email protected]> (cherry picked from commit df9b9431c3abf7a458e8aa7bd36ce7c71cb0f9d6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194683 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/external/cairo/UnpackedTarball_cairo.mk b/external/cairo/UnpackedTarball_cairo.mk index f4a41db0ae5b..95b396c859a1 100644 --- a/external/cairo/UnpackedTarball_cairo.mk +++ b/external/cairo/UnpackedTarball_cairo.mk @@ -23,6 +23,9 @@ endif # ofz50805.patch https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/350 # ofz46165.patch upstreamed as https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/351 # san.patch upstreamed as https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/352 +# +# external/cairo/cairo/0001-Fix-out-of-memory-when-using-linear-gradient.patch.1 is a backport +# of: https://gitlab.freedesktop.org/cairo/cairo/-/commit/d517773ff145d06c5b9efb21841fbc95caf5f540 $(eval $(call gb_UnpackedTarball_add_patches,cairo,\ external/cairo/cairo/cairo.buildfix.patch \ @@ -36,6 +39,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cairo,\ external/cairo/cairo/cairo-fd-hack.patch.0 \ external/cairo/cairo/cairo.ofz57493-Timeout.patch.1 \ external/cairo/cairo/Wincompatible-pointer-types.patch.0 \ + external/cairo/cairo/0001-Fix-out-of-memory-when-using-linear-gradient.patch.1 \ )) ifneq ($(OS),MACOSX) diff --git a/external/cairo/cairo/0001-Fix-out-of-memory-when-using-linear-gradient.patch.1 b/external/cairo/cairo/0001-Fix-out-of-memory-when-using-linear-gradient.patch.1 new file mode 100644 index 000000000000..3905e79a8e4a --- /dev/null +++ b/external/cairo/cairo/0001-Fix-out-of-memory-when-using-linear-gradient.patch.1 @@ -0,0 +1,29 @@ +From d517773ff145d06c5b9efb21841fbc95caf5f540 Mon Sep 17 00:00:00 2001 +From: Koichi Akabe <[email protected]> +Date: Tue, 6 Feb 2024 22:18:06 +0900 +Subject: [PATCH] Fix "out of memory" when using linear gradient + +--- + src/cairo-pattern.c | 6 +++++ + test/gradient-scale-crash.c | 49 +++++++++++++++++++++++++++++++++++++ + test/meson.build | 1 + + 3 files changed, 56 insertions(+) + create mode 100644 test/gradient-scale-crash.c + +diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c +index fcaaf46b8..742c51b2e 100644 +--- a/src/cairo-pattern.c ++++ b/src/cairo-pattern.c +@@ -2801,6 +2801,12 @@ _cairo_gradient_pattern_fit_to_range (const cairo_gradient_pattern_t *gradient, + dim = MAX (dim, fabs (radial->cd1.center.y - radial->cd2.center.y)); + dim = MAX (dim, fabs (radial->cd1.radius - radial->cd2.radius)); + } ++ dim = MAX (dim, fabs (gradient->base.matrix.xx)); ++ dim = MAX (dim, fabs (gradient->base.matrix.xy)); ++ dim = MAX (dim, fabs (gradient->base.matrix.x0)); ++ dim = MAX (dim, fabs (gradient->base.matrix.yx)); ++ dim = MAX (dim, fabs (gradient->base.matrix.yy)); ++ dim = MAX (dim, fabs (gradient->base.matrix.y0)); + + if (unlikely (dim > max_value)) { + cairo_matrix_t scale; commit 63179b4334cf5b82981afceaa9e63a00a723d28e Author: Gülşah Köse <[email protected]> AuthorDate: Fri Nov 21 18:10:23 2025 +0300 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:33 2025 +0100 cool#13543 Fix the empty hyperlink issue Using EE_TEXTPOS_MAX is safer than GetSelectionText().length in case we have trailing spaces at the end of the string. Signed-off-by: Gülşah Köse <[email protected]> Change-Id: I09cc55d317f741cb092dd225480a66093ac99286 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194342 Tested-by: Caolán McNamara <[email protected]> Code-Style: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194685 diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx index c0e2372908be..36b6141ee6bc 100644 --- a/sc/source/ui/view/tabvwshe.cxx +++ b/sc/source/ui/view/tabvwshe.cxx @@ -173,7 +173,7 @@ void ScTabViewShell::InsertURLField( const OUString& rName, const OUString& rURL bool bSelectFirst = false; bool bIsEditMode = pScMod->IsEditMode(); int nSelInd = 1; - OUString sSeltext(GetSelectionText()); + bool bHasText = !GetSelectionText().isEmpty(); if ( !bIsEditMode ) { @@ -195,9 +195,10 @@ void ScTabViewShell::InsertURLField( const OUString& rName, const OUString& rURL // Check if user selected a whole cell by single click, and cell has content. // tdf#80043 - if true, replace the entire content of the selected cell instead of // inserting a duplicate, or appending the url. - if (!bIsEditMode && !bSelectFirst && pTableView && !sSeltext.isEmpty()) + if (!bIsEditMode && !bSelectFirst && pTableView && bHasText) { - nSelInd = sSeltext.getLength(); + // Using GetSelectionText() length is not safe here in case of cell content has trailing spaces + nSelInd = EE_TEXTPOS_MAX; bSelectFirst = true; } commit 67fbe7583d7748227680258584c042a29ecc8ea1 Author: Michael Stahl <[email protected]> AuthorDate: Mon Nov 24 10:07:38 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:33 2025 +0100 libpng: upgrade to release 1.6.51 Fixes CVE-2025-64505, CVE-2025-64506, CVE-2025-64720, CVE-2025-65018 Change-Id: Id58827859de899aea020f43835f2b37bf262ed33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194421 Reviewed-by: Stephan Bergmann <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit 313c6d0a0d8a65e23e06ebcae08e0249f9f0d749) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194514 Tested-by: Stephan Bergmann <[email protected]> Code-Style: Stephan Bergmann <[email protected]> diff --git a/download.lst b/download.lst index 788b936f99b6..4724b873b231 100644 --- a/download.lst +++ b/download.lst @@ -646,8 +646,8 @@ PIXMAN_TARBALL := pixman-0.42.2.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts -LIBPNG_SHA256SUM := 4df396518620a7aa3651443e87d1b2862e4e88cad135a8b93423e01706232307 -LIBPNG_TARBALL := libpng-1.6.50.tar.xz +LIBPNG_SHA256SUM := a050a892d3b4a7bb010c3a95c7301e49656d72a64f1fc709a90b8aded192bed2 +LIBPNG_TARBALL := libpng-1.6.51.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts commit fdfa3002a982d84a4588cc5491426ad48fe2eeb1 Author: Miklos Vajna <[email protected]> AuthorDate: Tue Nov 25 08:30:12 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:33 2025 +0100 Related: tdf#169251 sw markdown export: fix crash on OLE with no graphic It turns out Writer can have broken OLE objects without a replacement graphic, so replace the assert with error handling. While at it, also implement export of the OLE graphics when it's there. (Insert a math object with a simple "a = b / c" formula to trigger that codepath.) Change-Id: Iad502bf243adacfce4d1bc903a77f19e4b81b007 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194506 Reviewed-by: Andras Timar <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Code-Style: Miklos Vajna <[email protected]> (cherry picked from commit 6b419bf6ca4e9e05b024b0aa4a3416860764706f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194519 Tested-by: Miklos Vajna <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/qa/filter/md/data/ole-without-graphic.odt b/sw/qa/filter/md/data/ole-without-graphic.odt new file mode 100644 index 000000000000..7bb5fcb09531 Binary files /dev/null and b/sw/qa/filter/md/data/ole-without-graphic.odt differ diff --git a/sw/qa/filter/md/md.cxx b/sw/qa/filter/md/md.cxx index a970a270cae4..1da8b18536b0 100644 --- a/sw/qa/filter/md/md.cxx +++ b/sw/qa/filter/md/md.cxx @@ -912,6 +912,16 @@ CPPUNIT_TEST_FIXTURE(Test, testEmbeddedAnchoredImageMdExport) CPPUNIT_ASSERT(aActual.ends_with(") B" SAL_NEWLINE_STRING)); } +CPPUNIT_TEST_FIXTURE(Test, testOLEWithoutGraphicMdExport) +{ + // Given a document with an OLE object that has no graphic: + createSwDoc("ole-without-graphic.odt"); + + // When exporting it as markdown: + // Then make sure this doesn't crash: + save(mpFilter); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/sw/source/filter/md/wrtmd.cxx b/sw/source/filter/md/wrtmd.cxx index df423ad6a334..4ff8d638b41f 100644 --- a/sw/source/filter/md/wrtmd.cxx +++ b/sw/source/filter/md/wrtmd.cxx @@ -175,9 +175,20 @@ void ApplyFlyFrameFormat(const SwFlyFrameFormat& rFrameFormat, SwMDWriter& rWrt, else if (eNodeType == SwNodeType::Ole) { SwOLENode* pOLENode = rWrt.m_pDoc->GetNodes()[nStart]->GetOLENode(); - assert(pOLENode->GetGraphic()); + if (!pOLENode->GetGraphic()) + { + return; + } + + // Assume that the graphic of OLE objects is never linked. aGraphic = *pOLENode->GetGraphic(); - // TODO fill aGraphicURL with the right info + OUString aGraphicInBase64; + if (!XOutBitmap::GraphicToBase64(aGraphic, aGraphicInBase64)) + { + return; + } + + aGraphicURL = "data:" + aGraphicInBase64; } const OUString& rBaseURL = rWrt.GetBaseURL(); commit 7a70b1362da2ea94b4a62dfecf68caf18edfbd8f Author: Miklos Vajna <[email protected]> AuthorDate: Fri Nov 21 09:28:13 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:33 2025 +0100 sd: fix crash in SdXImpressDocument::postMouseEvent() gdb trace on the core file: #0 0x0000774df1e04d9d in SdrPageView::GetPage (this=0x0) at /home/collabora/jenkins/workspace/build_core_co-25.04_for_online_snapshot/include/svx/svdpagv.hxx:167 #1 SdXImpressDocument::postMouseEvent (this=<optimized out>, nType=2, nX=<optimized out>, nY=<optimized out>, nCount=1, nButtons=0, nModifier=0) at /home/collabora/jenkins/workspace/build_core_co-25.04_for_online_snapshot/sd/source/ui/unoidl/unomodel.cxx:4370 #2 0x0000774e00fbec12 in doc_postMouseEvent (pThis=0x3cd69250, nType=2, nX=-180, nY=2220, nCount=1, nButtons=0, nModifier=0) at /home/collabora/jenkins/workspace/build_core_co-25.04_for_online_snapshot/desktop/source/lib/init.cxx:5661 #3 0x000000000058ab29 in lok::Document::postMouseEvent (nModifier=0, nButtons=0, nCount=<optimized out>, nY=<optimized out>, nX=<optimized out>, nType=<optimized out>, this=<optimized out>) at /home/collabora/jenkins/workspace/package_cool_25.04_rpm/rpmbuild/BUILD/coolwsd-25.04.7.2snapshot/bundled/include/LibreOfficeKit/LibreOfficeKit.hxx:297 Handle it similar to the nullptr sd Window just a bit later. Change-Id: I7a6e7dfc6971f266e1205ee3b92eb1ed5bae1025 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194303 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit 775840f89091853b4424a4b94d7081058d076f16) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194420 Tested-by: Miklos Vajna <[email protected]> Reviewed-by: Tomaž Vajngerl <[email protected]> diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index efb3a0bd52a6..736658e9c4b5 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -4367,6 +4367,11 @@ void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount, i const Point aPointHMM = o3tl::convert(aPointTwip, o3tl::Length::twip, o3tl::Length::mm100); SdrView* pDrawView = pViewShell->GetDrawView(); SdrPageView* pPageView = pDrawView->GetSdrPageView(); + if (!pPageView) + { + return; + } + SdrPage* pPage = pPageView->GetPage(); ::sd::Window* pActiveWin = pViewShell->GetActiveWindow(); if (!pActiveWin) commit d131e1179fec0eac74759e75f8aa6096e426f78b Author: Tomaž Vajngerl <[email protected]> AuthorDate: Wed Nov 12 18:59:58 2025 +0900 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:33 2025 +0100 sc: fix crash in pivot table with formats and no source data Add more strict checking if the dimension exists as a field so it can't happend that we crash when we want a dimension that doesn't exists. Additionally check the group items when filling the string values of the members, because sometimes a dimension is a group and is not found as a normal field. Also make sure that if the dimension is not available we don't crash. In the test the document has no source data and the "Month" is a group dimension. Change-Id: I9db996bb4327b2e081dbfc6dea7d731455111490 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193845 Reviewed-by: Tomaž Vajngerl <[email protected]> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193998 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit 81d59ec3770b841b9c44f33c91e0d9360e1773e2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194087 Tested-by: Miklos Vajna <[email protected]> diff --git a/sc/inc/dpcache.hxx b/sc/inc/dpcache.hxx index 1e7d7075e813..2e26f75d26e3 100644 --- a/sc/inc/dpcache.hxx +++ b/sc/inc/dpcache.hxx @@ -163,6 +163,7 @@ public: */ SC_DLLPUBLIC sal_Int32 GetGroupType(tools::Long nDim) const; + SC_DLLPUBLIC bool IsValidDimensionIndex(tools::Long nDimensionIndex) const; SC_DLLPUBLIC SCCOL GetDimensionIndex(std::u16string_view sName) const; sal_uInt32 GetNumberFormat( tools::Long nDim ) const; SC_DLLPUBLIC bool IsDateDimension( tools::Long nDim ) const ; @@ -206,11 +207,11 @@ public: #if DUMP_PIVOT_TABLE void Dump() const; #endif + const GroupItems* GetGroupItems(tools::Long nDim) const; private: void PostInit(); void Clear(); - const GroupItems* GetGroupItems(tools::Long nDim) const; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/qa/unit/PivotTableFormatsImportExport.cxx b/sc/qa/unit/PivotTableFormatsImportExport.cxx index 437a25d5e7e6..bbe3c251e22a 100644 --- a/sc/qa/unit/PivotTableFormatsImportExport.cxx +++ b/sc/qa/unit/PivotTableFormatsImportExport.cxx @@ -23,6 +23,8 @@ using namespace css; +namespace +{ class ScPivotTableFormatsImportExport : public ScModelTestBase { public: @@ -34,8 +36,6 @@ ScPivotTableFormatsImportExport::ScPivotTableFormatsImportExport() { } -namespace -{ ScAddress parseAddress(ScDocument& rDoc, OUString const& rAddressString) { ScAddress aAddress; @@ -82,9 +82,7 @@ template <typename T> OUString checkNonEmptyAddresses(ScDocument& rDoc, T const& return aString; } -} // end anonymous namespace - -static void assertDataFieldInRow_RowLabelColor(ScDocument& rDoc) +void assertDataFieldInRow_RowLabelColor(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getBackgroundColor(rDoc, u"G6"_ustr)); CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getFontColor(rDoc, u"G7"_ustr)); @@ -106,7 +104,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, assertDataFieldInRow_RowLabelColor(*getScDoc()); } -static void assertDataFieldInRow_ColumnLabelColor(ScDocument& rDoc) +void assertDataFieldInRow_ColumnLabelColor(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(Color(0x00B050), getBackgroundColor(rDoc, u"H5"_ustr)); @@ -128,7 +126,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, assertDataFieldInRow_ColumnLabelColor(*getScDoc()); } -static void assertDataFieldInColumn_ColumnLabelColor(ScDocument& rDoc) +void assertDataFieldInColumn_ColumnLabelColor(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getFontColor(rDoc, u"H4"_ustr)); CPPUNIT_ASSERT_EQUAL(Color(0x92D050), getBackgroundColor(rDoc, u"I4"_ustr)); @@ -151,7 +149,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, assertDataFieldInColumn_ColumnLabelColor(*getScDoc()); } -static void assertDataFieldInColumn_DataColor(ScDocument& rDoc) +void assertDataFieldInColumn_DataColor(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getFontColor(rDoc, u"H6"_ustr)); CPPUNIT_ASSERT_EQUAL(Color(0x92D050), getBackgroundColor(rDoc, u"I8"_ustr)); @@ -172,7 +170,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, assertDataFieldInColumn_DataColor(*getScDoc()); } -static void assertDataFieldInColumnAndTwoRowFields_DataColor(ScDocument& rDoc) +void assertDataFieldInColumnAndTwoRowFields_DataColor(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getBackgroundColor(rDoc, u"I7"_ustr)); CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getBackgroundColor(rDoc, u"I10"_ustr)); @@ -199,7 +197,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, assertDataFieldInColumnAndTwoRowFields_DataColor(*getScDoc()); } -static void assertSingleDataFieldInColumn_DataColor(ScDocument& rDoc) +void assertSingleDataFieldInColumn_DataColor(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getBackgroundColor(rDoc, u"J8"_ustr)); CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getBackgroundColor(rDoc, u"J12"_ustr)); @@ -215,7 +213,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, assertSingleDataFieldInColumn_DataColor(*getScDoc()); } -static void assertTwoRowTwoColumnFields_DataColor(ScDocument& rDoc) +void assertTwoRowTwoColumnFields_DataColor(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getBackgroundColor(rDoc, u"I7"_ustr)); CPPUNIT_ASSERT_EQUAL(Color(0xFFC000), getBackgroundColor(rDoc, u"J8"_ustr)); @@ -235,7 +233,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, assertTwoRowTwoColumnFields_DataColor(*getScDoc()); } -static void assertDataFieldInRow_DataColor(ScDocument& rDoc) +void assertDataFieldInRow_DataColor(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(Color(0x00B0F0), getBackgroundColor(rDoc, u"I6"_ustr)); CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getBackgroundColor(rDoc, u"K7"_ustr)); @@ -257,7 +255,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, assertDataFieldInRow_DataColor(*getScDoc()); } -static void assertMultipleSelections(ScDocument& rDoc) +void assertMultipleSelections(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getBackgroundColor(rDoc, u"I5"_ustr)); CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getBackgroundColor(rDoc, u"I6"_ustr)); @@ -295,7 +293,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, CPPUNIT_ASSERT_EQUAL(u"60"_ustr, rDoc.GetString(aAddress)); } -static void assertWholeDataColumnSelected(ScDocument& rDoc) +void assertWholeDataColumnSelected(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getBackgroundColor(rDoc, u"G2"_ustr)); CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getBackgroundColor(rDoc, u"G3"_ustr)); @@ -321,7 +319,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, assertWholeDataColumnSelected(*getScDoc()); } -static void assertWholeLabelColumnSelected(ScDocument& rDoc) +void assertWholeLabelColumnSelected(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getBackgroundColor(rDoc, u"F2"_ustr)); CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getBackgroundColor(rDoc, u"F3"_ustr)); @@ -347,7 +345,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, assertWholeLabelColumnSelected(*getScDoc()); } -static void assertSelectionInLabelAndData(ScDocument& rDoc) +void assertSelectionInLabelAndData(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getBackgroundColor(rDoc, u"F5"_ustr)); CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getBackgroundColor(rDoc, u"G5"_ustr)); @@ -369,7 +367,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, assertSelectionInLabelAndData(*getScDoc()); } -static void assertTwoRowsDataFieldInColumn_LabelColor(ScDocument& rDoc) +void assertTwoRowsDataFieldInColumn_LabelColor(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getBackgroundColor(rDoc, u"I4"_ustr)); CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, getBackgroundColor(rDoc, u"J4"_ustr)); @@ -396,7 +394,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, assertTwoRowsDataFieldInColumn_LabelColor(*getScDoc()); } -static void assertTwoDataFieldColumns_WholeDataColumnSelected(ScDocument& rDoc) +void assertTwoDataFieldColumns_WholeDataColumnSelected(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getBackgroundColor(rDoc, u"H2"_ustr)); CPPUNIT_ASSERT_EQUAL(COL_YELLOW, getBackgroundColor(rDoc, u"H3"_ustr)); @@ -424,7 +422,7 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, assertTwoDataFieldColumns_WholeDataColumnSelected(*getScDoc()); } -static void assertFields_WithCellProtection(ScDocument& rDoc) +void assertFields_WithCellProtection(ScDocument& rDoc) { CPPUNIT_ASSERT_EQUAL(false, getCellProtection(rDoc, u"F18"_ustr)); CPPUNIT_ASSERT_EQUAL(false, getCellProtection(rDoc, u"F19"_ustr)); @@ -449,6 +447,15 @@ CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, Pivot_Table_with_Cell_Prot assertFields_WithCellProtection(*getScDoc()); } +CPPUNIT_TEST_FIXTURE(ScPivotTableFormatsImportExport, Pivot_Table_with_No_Source_Data) +{ + // We need to round-trip this document without crashing + createScDoc("xlsx/pivot-table/PivotTableWithNoSourceData.xlsx"); + saveAndReload(u"Calc Office Open XML"_ustr); +} + +} // end anonymous namespace + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/qa/unit/data/xlsx/pivot-table/PivotTableWithNoSourceData.xlsx b/sc/qa/unit/data/xlsx/pivot-table/PivotTableWithNoSourceData.xlsx new file mode 100644 index 000000000000..d28a70eda335 Binary files /dev/null and b/sc/qa/unit/data/xlsx/pivot-table/PivotTableWithNoSourceData.xlsx differ diff --git a/sc/source/core/data/PivotTableFormatOutput.cxx b/sc/source/core/data/PivotTableFormatOutput.cxx index c9073d6be07b..bc40739ff28c 100644 --- a/sc/source/core/data/PivotTableFormatOutput.cxx +++ b/sc/source/core/data/PivotTableFormatOutput.cxx @@ -25,29 +25,43 @@ namespace class NameResolver { private: - ScDPTableData& mrTableData; ScDPCache const& mrCache; std::unordered_map<sal_Int32, std::vector<OUString>> maNameCache; - void fillNamesForDimension(std::vector<OUString>& rNames, sal_Int32 nDimension) + void fillNamesForItems(std::vector<OUString>& rNames, ScDPCache::ScDPItemDataVec const& rItems, + sal_Int32 nDimension) { - for (const auto& rItemData : mrCache.GetDimMemberValues(nDimension)) + for (const auto& rItemData : rItems) { OUString sFormattedName; if (rItemData.HasStringData() || rItemData.IsEmpty()) sFormattedName = rItemData.GetString(); else - sFormattedName = ScDPObject::GetFormattedString(&mrTableData, nDimension, - rItemData.GetValue()); + sFormattedName = mrCache.GetFormattedString(nDimension, rItemData, false); rNames.push_back(sFormattedName); } } + void fillNamesForDimension(std::vector<OUString>& rNames, sal_Int32 nDimension) + { + if (mrCache.IsValidDimensionIndex(nDimension)) + { + fillNamesForItems(rNames, mrCache.GetDimMemberValues(nDimension), nDimension); + } + else + { + auto* pGroup = mrCache.GetGroupItems(nDimension); + if (pGroup) + { + fillNamesForItems(rNames, pGroup->maItems, nDimension); + } + } + } + public: - NameResolver(ScDPTableData& rTableData, ScDPCache const& rCache) - : mrTableData(rTableData) - , mrCache(rCache) + NameResolver(ScDPCache const& rCache) + : mrCache(rCache) { } @@ -165,7 +179,7 @@ void FormatOutput::prepare(SCTAB nTab, std::vector<ScDPOutLevelData> const& rCol ScDPFilteredCache const& rFilteredCache = pTableData->GetCacheTable(); ScDPCache const& rCache = rFilteredCache.getCache(); - NameResolver aNameResolver(*pTableData, rCache); + NameResolver aNameResolver(rCache); // Initialize format output entries (FormatOutputEntry) and set the data already available from output fields // (rColumnFields and rRowFields) and the pivot table format list (PivotTableFormat). diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index d5ee6bcb2483..709cd8777835 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -1049,13 +1049,15 @@ const ScDPCache::IndexArrayType* ScDPCache::GetFieldIndexArray( size_t nDim ) co const ScDPCache::ScDPItemDataVec& ScDPCache::GetDimMemberValues(SCCOL nDim) const { - OSL_ENSURE( nDim>=0 && nDim < mnColumnCount ," nDim < mnColumnCount "); + SAL_WARN_IF(!IsValidDimensionIndex(nDim) ,"sc.core", "dimension index out of bound"); + + assert(IsValidDimensionIndex(nDim)); return maFields.at(nDim)->maItems; } sal_uInt32 ScDPCache::GetNumberFormat( tools::Long nDim ) const { - if ( nDim >= mnColumnCount ) + if (!IsValidDimensionIndex(nDim)) return 0; // TODO: Find a way to determine the dominant number format in presence of @@ -1065,7 +1067,7 @@ sal_uInt32 ScDPCache::GetNumberFormat( tools::Long nDim ) const bool ScDPCache::IsDateDimension( tools::Long nDim ) const { - if (nDim >= mnColumnCount) + if (!IsValidDimensionIndex(nDim)) return false; ScInterpreterContext& rContext = mrDoc.GetNonThreadedContext(); @@ -1075,7 +1077,11 @@ bool ScDPCache::IsDateDimension( tools::Long nDim ) const tools::Long ScDPCache::GetDimMemberCount(tools::Long nDim) const { - OSL_ENSURE( nDim>=0 && nDim < mnColumnCount ," ScDPTableDataCache::GetDimMemberCount : out of bound "); + SAL_WARN_IF(!IsValidDimensionIndex(nDim) ,"sc.core", "dimension index out of bound"); + + if (!IsValidDimensionIndex(nDim)) + return 0; + return maFields[nDim]->maItems.size(); } @@ -1089,6 +1095,11 @@ SCCOL ScDPCache::GetDimensionIndex(std::u16string_view sName) const return -1; } +bool ScDPCache::IsValidDimensionIndex(tools::Long nDimensionIndex) const +{ + return nDimensionIndex >= 0 && nDimensionIndex < mnColumnCount; +} + rtl_uString* ScDPCache::InternString( size_t nDim, const OUString& rStr ) { assert(nDim < maStringPools.size()); commit 23e2e7839c156134b1f215898808fade14a9ea4a Author: Méven Car <[email protected]> AuthorDate: Thu Nov 13 12:28:58 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:42:33 2025 +0100 HostFilter: Allow to disable SSL Host verification for allowed hosts LOK_HOST_ALLOWLIST allows to pass a restricted list of hosts that curlsession will be allowed to download from. LOK_HOST_ALLOWLIST_EXEMPT_VERIFY_HOST reuses this list for the use case of not verifying SSL host additionaly for them. This is useful for say developpement environement. Change-Id: I75ac26a4bfe1c33ff183c4ad12391b2da08593cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193961 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Tomaž Vajngerl <[email protected]> (cherry picked from commit 8688e9d8c94a21a7a0abc9edfe632e6fa0e94281) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194202 Reviewed-by: Méven Car <[email protected]> Tested-by: Tomaž Vajngerl <[email protected]> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 6cf5951e7a4b..3727f53041be 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -8379,11 +8379,11 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char rtl_alloc_preInit(2); #endif - char* pAllowlist = ::getenv("LOK_HOST_ALLOWLIST"); - if (pAllowlist) - { + if (const char* pAllowlist = ::getenv("LOK_HOST_ALLOWLIST")) HostFilter::setAllowedHostsRegex(pAllowlist); - } + + if (const char* pHostExemptVerifyHost = ::getenv("LOK_HOST_ALLOWLIST_EXEMPT_VERIFY_HOST")) + HostFilter::setAllowedHostsExemptVerifyHost(strncmp(pHostExemptVerifyHost,"1", 1) == 0); // What stage are we at ? if (pThis == nullptr) diff --git a/include/tools/hostfilter.hxx b/include/tools/hostfilter.hxx index ca2d91355986..8e992b407bbb 100644 --- a/include/tools/hostfilter.hxx +++ b/include/tools/hostfilter.hxx @@ -20,6 +20,8 @@ class TOOLS_DLLPUBLIC HostFilter public: static void setAllowedHostsRegex(const char* sAllowedRegex); + static void setAllowedHostsExemptVerifyHost(bool allowedHostExceptVerifyHost); + static bool isForbidden(const OUString& rHost); static void setExemptVerifyHost(const OUString& rExemptVerifyHost); diff --git a/tools/source/inet/hostfilter.cxx b/tools/source/inet/hostfilter.cxx index e13e3d66cab6..75ade47489af 100644 --- a/tools/source/inet/hostfilter.cxx +++ b/tools/source/inet/hostfilter.cxx @@ -13,6 +13,7 @@ static std::regex g_AllowedHostsRegex(""); static OUString g_ExceptVerifyHost; static bool g_AllowedHostsSet = false; +static bool g_AllowedHostsExemptVerifyHost = false; void HostFilter::setAllowedHostsRegex(const char* sAllowedRegex) { @@ -21,6 +22,11 @@ void HostFilter::setAllowedHostsRegex(const char* sAllowedRegex) g_AllowedHostsRegex = sAllowedRegex; } +void HostFilter::setAllowedHostsExemptVerifyHost(bool allowedHostsExemptVerifyHost) +{ + g_AllowedHostsExemptVerifyHost = allowedHostsExemptVerifyHost; +} + bool HostFilter::isForbidden(const OUString& rHost) { if (!g_AllowedHostsSet) @@ -36,7 +42,13 @@ void HostFilter::setExemptVerifyHost(const OUString& rExemptVerifyHost) bool HostFilter::isExemptVerifyHost(const std::u16string_view rHost) { - return rHost == g_ExceptVerifyHost; + if (rHost == g_ExceptVerifyHost) + return true; + + if (g_AllowedHostsSet && g_AllowedHostsExemptVerifyHost) + return std::regex_match(OUString(rHost).toUtf8().getStr(), g_AllowedHostsRegex); + + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ commit fef7ad2742117cb4f3e7870020c95902cd34f428 Author: Thorsten Behrens <[email protected]> AuthorDate: Mon Nov 17 04:47:12 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Fri Dec 5 18:40:56 2025 +0100 More branding-related fixes for flatpak build Change-Id: I6355cc13d6c20e0a1ff246364230835a2a1165da diff --git a/solenv/bin/assemble-flatpak-appdata.sh b/solenv/bin/assemble-flatpak-appdata.sh index 20003f5c1f60..e4fd8eebd721 100755 --- a/solenv/bin/assemble-flatpak-appdata.sh +++ b/solenv/bin/assemble-flatpak-appdata.sh @@ -29,44 +29,32 @@ cat <<EOF >"${1?}${3?}".appdata.xml <id>${3?}</id> <metadata_license>CC0-1.0</metadata_license> <project_license>MPL-2.0</project_license> - <name>Collabora Office</name> + <name>Collabora Office Desktop</name> <summary>The Collabora Office productivity suite</summary> <description> - <p>Collabora Office is a powerful office suite. Its clean interface and - feature-rich tools help you unleash your creativity and enhance your - productivity. Collabora Office includes several applications that make it the most - powerful Free and Open Source office suite on the market: Writer (word - processing), Calc (spreadsheets), Impress (presentations), Draw (vector - graphics and flowcharts), Base (databases), and Math (formula editing).</p> - <p>Collabora Office supports opening and saving into a wide variety of formats, so - you can easily share documents with users of other popular office suites - without worrying about compatibility.</p> + <p>Collabora Office Desktop is a powerful office suite.</p> </description> <launchable type="desktop-id">${3?}.desktop</launchable> - <url type="homepage">https://collabora.com</url> + <url type="homepage">https://collaboraoffice.com</url> <screenshots> <screenshot type="default"> - <image>https://hub.libreoffice.org/screenshots/writer-01.png</image> + <image>writer.png</image> <caption>Sample Writer document</caption> </screenshot> <screenshot> - <image>https://hub.libreoffice.org/screenshots/calc-02.png</image> + <image>calc.png</image> <caption>Sample Calc document</caption> </screenshot> <screenshot> - <image>https://hub.libreoffice.org/screenshots/impress-01.png</image> + <image>impress.png</image> <caption>Sample Impress document</caption> </screenshot> <screenshot> - <image>https://hub.libreoffice.org/screenshots/draw-02.png</image> + <image>draw.png</image> <caption>Sample Draw document</caption> </screenshot> - <screenshot> - <image>https://hub.libreoffice.org/screenshots/base-02.png</image> - <caption>Sample Base document</caption> - </screenshot> </screenshots> - <developer_name>Collabora Limited</developer_name> + <developer_name>Collabora Productivity Limited</developer_name> <kudos> <kudo>HiDpiIcon</kudo> <kudo>HighContrast</kudo>
