sc/source/filter/excel/xiescher.cxx | 3 +++ sc/source/ui/view/tabview.cxx | 28 ++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-)
New commits: commit 12fdd2792c392a5b355110836faa40db5866e57e Author: Patrick Luby <patrick.l...@collabora.com> AuthorDate: Mon Mar 20 16:48:30 2023 -0400 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Mar 21 20:21:47 2023 +0000 tdf#152406 Disable anti-jitter code for scroll wheel events After moving thousands of columns to the right via horizontal scroll wheel or trackpad swipe events, most vertical scroll wheel or trackpad swipe events will trigger the anti-jitter code because nScrollPos and nPrevDragPos will be equal and nDelta will be overriden and set to zero. So, only use the anti-jitter code for mouse drag events. Change-Id: I9a22b31e1e012a97a058ab36e040629a71f5d24f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149183 Tested-by: Jenkins Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit d82a734c07b85cbd7861699b7fa6d3ebbb3122f2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149238 diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 17a414a5f5e4..aad41a9c1236 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -1182,16 +1182,28 @@ void ScTabView::ScrollHdl(ScrollAdaptor* pScroll) tools::Long nScrollPos = GetScrollBarPos( *pScroll ) + nScrollMin; nDelta = nScrollPos - nViewPos; - if ( nScrollPos > nPrevDragPos ) - { - if (nDelta<0) nDelta=0; - } - else if ( nScrollPos < nPrevDragPos ) + + // tdf#152406 Disable anti-jitter code for scroll wheel events + // After moving thousands of columns to the right via + // horizontal scroll wheel or trackpad swipe events, most + // vertical scroll wheel or trackpad swipe events will trigger + // the anti-jitter code because nScrollPos and nPrevDragPos + // will be equal and nDelta will be overriden and set to zero. + // So, only use the anti-jitter code for mouse drag events. + if ( eType == ScrollType::Drag ) { - if (nDelta>0) nDelta=0; + if ( nScrollPos > nPrevDragPos ) + { + if (nDelta<0) nDelta=0; + } + else if ( nScrollPos < nPrevDragPos ) + { + if (nDelta>0) nDelta=0; + } + else + nDelta = 0; } - else - nDelta = 0; + nPrevDragPos = nScrollPos; } break; commit fa1760d0c7ac8b9fb2e88f7d6d7f9de14479cbf6 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Mar 21 13:29:23 2023 +0000 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Tue Mar 21 15:55:23 2023 +0000 crashreporting: CreateEmbeddedObject might fail Change-Id: I0e1ccbea92343d18e5ff3a9af1f54ed5e0dd796b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149113 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 7940758bffc5..2838347b3f14 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -1763,6 +1763,9 @@ rtl::Reference<SdrObject> XclImpChartObj::DoCreateSdrObj( XclImpDffConverter& rD Reference< XEmbeddedObject > xEmbObj = pDocShell->GetEmbeddedObjectContainer(). CreateEmbeddedObject( SvGlobalName( SO3_SCH_CLASSID ).GetByteSequence(), aEmbObjName, &sBaseURL ); + if (!xEmbObj) + return xSdrObj; + /* Set the size to the embedded object, this prevents that font sizes of text objects are changed in the chart when the object is inserted into the draw page. */