avmedia/source/qt6/QtPlayer.cxx | 18 ++++++++++++------ sc/source/ui/miscdlgs/duplicaterecordsdlg.cxx | 12 ++++++++---- sw/inc/view.hxx | 4 ++-- sw/source/uibase/uiview/viewsrch.cxx | 12 ++++++------ vcl/source/window/paint.cxx | 6 +++++- 5 files changed, 33 insertions(+), 19 deletions(-)
New commits: commit f004a4fcdeac442e20b93bd70ffda76a7c1666a4 Author: Rafael Lima <[email protected]> AuthorDate: Tue Mar 11 14:51:27 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Thu Mar 27 10:19:54 2025 +0100 tdf#165678 Handle Duplicates dialog: make "All" checkbox work as in AutoFilter Change-Id: I5ed547d89ede1fe1ec413b1746b3cb2cd2c551d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182779 Tested-by: Jenkins Reviewed-by: Heiko Tietze <[email protected]> Reviewed-by: Sahil Gautam <[email protected]> (cherry picked from commit e1c7923596f39bac8ce926b56a2450911ffde4d8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183259 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sc/source/ui/miscdlgs/duplicaterecordsdlg.cxx b/sc/source/ui/miscdlgs/duplicaterecordsdlg.cxx index 0817d3a75914..f3376ae17ec7 100644 --- a/sc/source/ui/miscdlgs/duplicaterecordsdlg.cxx +++ b/sc/source/ui/miscdlgs/duplicaterecordsdlg.cxx @@ -133,7 +133,6 @@ void ScDuplicateRecordsDlg::InsertEntry(const OUString& rTxt, bool bToggle) const int nRow = m_xCheckList->n_children() - 1; m_xCheckList->set_toggle(nRow, bToggle ? TRISTATE_TRUE : TRISTATE_FALSE); m_xCheckList->set_text(nRow, rTxt, 0); - m_xCheckList->set_sensitive(m_xAllChkBtn->get_state() != TRISTATE_TRUE); } void ScDuplicateRecordsDlg::Init() @@ -171,7 +170,7 @@ void ScDuplicateRecordsDlg::Init() !officecfg::Office::Calc::Misc::HandleDuplicateRecords::RemoveRecords::get()); SetDialogLabels(); - m_xAllChkBtn->set_state(TRISTATE_FALSE); + m_xAllChkBtn->set_state(TRISTATE_TRUE); SetDialogData(true); } @@ -200,13 +199,18 @@ IMPL_LINK_NOARG(ScDuplicateRecordsDlg, RecordsChkHdl, const weld::TreeView::iter if (nRet == nTotalCount) m_xAllChkBtn->set_state(TRISTATE_TRUE); - else + else if (nRet == 0) m_xAllChkBtn->set_state(TRISTATE_FALSE); + else + m_xAllChkBtn->set_state(TRISTATE_INDET); } IMPL_LINK_NOARG(ScDuplicateRecordsDlg, AllCheckBtnHdl, weld::Toggleable&, void) { - SetDialogData(true); + if (m_xAllChkBtn->get_state() == TRISTATE_TRUE) + SetDialogData(true); + else + SetDialogData(false); } IMPL_LINK_NOARG(ScDuplicateRecordsDlg, OkHdl, weld::Button&, void) commit 8824cab091d21211162eefcacfcaaebac7c370df Author: Mike Kaganski <[email protected]> AuthorDate: Wed Mar 26 12:16:26 2025 +0500 Commit: Andras Timar <[email protected]> CommitDate: Thu Mar 27 10:19:54 2025 +0100 tdf#165910: use sal_Int32 for match count This is what all the functions called from SwView::FUNC_Search return: SwWrtShell::SearchAttr, SwWrtShell::SearchTempl, SwWrtShell::SearchPattern; and all of them use SAL_MAX_INT32 to denote 'cancel' state. Change-Id: Icec9c6b33ebfc856e4a67320f3442324db7459d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183324 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> (cherry picked from commit a62d9e9bb6b565e83c422066cf1f428173cdc0e0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183337 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 8c367a171ee6..c132400c9340 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -284,8 +284,8 @@ class SW_DLLPUBLIC SwView: public SfxViewShell // methods for searching // set search context SAL_DLLPRIVATE bool SearchAndWrap(bool bApi); - SAL_DLLPRIVATE sal_uInt16 SearchAll(); - SAL_DLLPRIVATE sal_uLong FUNC_Search( const SwSearchOptions& rOptions ); + SAL_DLLPRIVATE sal_Int32 SearchAll(); + SAL_DLLPRIVATE sal_Int32 FUNC_Search( const SwSearchOptions& rOptions ); SAL_DLLPRIVATE void Replace(); bool IsDocumentBorder(); diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx index 1944f1f40ca3..9d3eaa3603b5 100644 --- a/sw/source/uibase/uiview/viewsrch.cxx +++ b/sw/source/uibase/uiview/viewsrch.cxx @@ -350,7 +350,7 @@ void SwView::ExecSearch(SfxRequest& rReq) { SwSearchOptions aOpts( m_pWrtShell.get(), s_pSrchItem->GetBackward() ); s_bExtra = false; - sal_uLong nFound; + sal_Int32 nFound; { //Scope for SwWait-Object SwWait aWait( *GetDocShell(), true ); @@ -381,7 +381,7 @@ void SwView::ExecSearch(SfxRequest& rReq) m_pWrtShell->EndAllAction(); } - rReq.SetReturnValue(SfxBoolItem(nSlot, nFound != 0 && ULONG_MAX != nFound)); + rReq.SetReturnValue(SfxBoolItem(nSlot, nFound != 0 && SAL_MAX_INT32 != nFound)); if( !nFound ) { #if HAVE_FEATURE_DESKTOP @@ -396,7 +396,7 @@ void SwView::ExecSearch(SfxRequest& rReq) return; } - if( !bQuiet && ULONG_MAX != nFound) + if (!bQuiet && SAL_MAX_INT32 != nFound) { OUString sText( SwResId( STR_NB_REPLACED ) ); sText = sText.replaceFirst("XX", OUString::number( nFound )); @@ -618,7 +618,7 @@ bool SwView::SearchAndWrap(bool bApi) return s_bFound; } -sal_uInt16 SwView::SearchAll() +sal_Int32 SwView::SearchAll() { SwWait aWait( *GetDocShell(), true ); m_pWrtShell->StartAllAction(); @@ -636,7 +636,7 @@ sal_uInt16 SwView::SearchAll() m_pWrtShell->StartOfSection(); } s_bExtra = false; - sal_uInt16 nFound = o3tl::narrowing<sal_uInt16>(FUNC_Search( aOpts )); + auto nFound = FUNC_Search(aOpts); s_bFound = 0 != nFound; m_pWrtShell->EndAllAction(); @@ -752,7 +752,7 @@ SwSearchOptions::SwSearchOptions( SwWrtShell const * pSh, bool bBackward ) } } -sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions ) +sal_Int32 SwView::FUNC_Search(const SwSearchOptions& rOptions) { #if HAVE_FEATURE_DESKTOP SvxSearchDialogWrapper::SetSearchLabel(SearchLabel::Empty); commit 95e95b905864f4bcfeef519a06c300d642af0bc4 Author: Michael Weghorn <[email protected]> AuthorDate: Sat Mar 22 16:15:41 2025 -0700 Commit: Andras Timar <[email protected]> CommitDate: Thu Mar 27 10:19:53 2025 +0100 tdf#165870 qt avmedia: Handle null media player QtPlayer::m_xMediaPlayer can be null, e.g. in a PPTX file created in PowerPoint that contains an external video link to Youtube, so handle that case gracefully instead of asserting/crashing. Backtrace of assert getting triggered without this change in place: 1 __pthread_kill_implementation pthread_kill.c 44 0x7ffff789e95c 2 __pthread_kill_internal pthread_kill.c 89 0x7ffff789e9ff 3 __GI_raise raise.c 26 0x7ffff7849cc2 4 __GI_abort abort.c 73 0x7ffff78324ac 5 __assert_fail_base assert.c 118 0x7ffff7832420 6 avmedia::qt::QtPlayer::stop QtPlayer.cxx 75 0x7fff980b1675 7 avmedia::qt::QtPlayer::disposing QtPlayer.cxx 281 0x7fff980b34f7 8 cppu::WeakComponentImplHelperBase::dispose implbase.cxx 104 0x7ffff5b3de60 9 cppu::PartialWeakComponentImplHelper<com::sun::star::media::XPlayer, com::sun::star::media::XPlayerNotifier, com::sun::star::lang::XServiceInfo>::dispose compbase.hxx 90 0x7fff980b0455 10 avmedia::qt::QtManager::createPlayer QtManager.cxx 32 0x7fff980afc7e 11 non-virtual thunk to avmedia::qt::QtManager::createPlayer(rtl::OUString const&) 0x7fff980afdbc 12 avmedia::priv::MediaWindowImpl::createPlayer mediawindow_impl.cxx 212 0x7ffff0bf0d40 13 avmedia::priv::MediaWindowImpl::createPlayer mediawindow_impl.cxx 193 0x7ffff0bf0a7e 14 avmedia::MediaWindow::createPlayer mediawindow.cxx 364 0x7ffff0be5860 15 slideshow::internal::ViewMediaShape::implInitializeMediaPlayer viewmediashape.cxx 391 0x7fff65284f52 16 slideshow::internal::ViewMediaShape::implInitialize viewmediashape.cxx 309 0x7fff652839ab 17 slideshow::internal::ViewMediaShape::startMedia viewmediashape.cxx 107 0x7fff652832b1 18 slideshow::internal::(anonymous namespace)::MediaShape::implStartIntrinsicAnimation mediashape.cxx 212 0x7fff6526578e 19 slideshow::internal::ExternalShapeBase::ExternalShapeBaseListener::enableAnimations externalshapebase.cxx 68 0x7fff65259ccd [...] Change-Id: I6978f27d9b756a0fa8492d06bed57e805ca23a0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183228 Tested-by: Jenkins Reviewed-by: Michael Weghorn <[email protected]> (cherry picked from commit b1576ba17a4111f02fc6f8e27c09c78dbd7fd963) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183230 Reviewed-by: Michael Stahl <[email protected]> diff --git a/avmedia/source/qt6/QtPlayer.cxx b/avmedia/source/qt6/QtPlayer.cxx index 23460c92d675..b1d5fbb85370 100644 --- a/avmedia/source/qt6/QtPlayer.cxx +++ b/avmedia/source/qt6/QtPlayer.cxx @@ -72,9 +72,11 @@ void SAL_CALL QtPlayer::stop() { osl::MutexGuard aGuard(m_aMutex); - assert(m_xMediaPlayer); - // don't use QMediaPlayer::stop because XPlayer::stop should leave the position unchanged - m_xMediaPlayer->pause(); + if (m_xMediaPlayer) + { + // don't use QMediaPlayer::stop because XPlayer::stop should leave the position unchanged + m_xMediaPlayer->pause(); + } } sal_Bool SAL_CALL QtPlayer::isPlaying() @@ -284,9 +286,13 @@ void SAL_CALL QtPlayer::disposing() QtPlayer::~QtPlayer() { - // ensure output objects get deleted as QMediaPlayer doesn't take ownership of them - std::unique_ptr<QObject> xVideoWidget(m_xMediaPlayer->videoOutput()); - std::unique_ptr<QAudioOutput> xAudioOutput(m_xMediaPlayer->audioOutput()); + if (m_xMediaPlayer) + { + // ensure output objects get deleted as QMediaPlayer doesn't take ownership of them + std::unique_ptr<QObject> xVideoWidget(m_xMediaPlayer->videoOutput()); + std::unique_ptr<QAudioOutput> xAudioOutput(m_xMediaPlayer->audioOutput()); + } + m_xMediaPlayer.reset(); } commit adb5f9859c689a82936b3b9bbb8ffc77962f45c7 Author: Armin Le Grand (Collabora) <[email protected]> AuthorDate: Fri Mar 21 11:29:49 2025 +0100 Commit: Andras Timar <[email protected]> CommitDate: Thu Mar 27 10:19:53 2025 +0100 tdf#165706: Fix visualization of MultiFirmControls in EditMode 'Simple' FormControls were rendered correctly with SDPR active, but 'Multi' FormControls did not. Found an error regarding use of MapModes in that drawing code below in vcl that did not handle an evtl. set MapMode, corrected that. Change-Id: I51d7318c2950b7d70e3064ba628909cb17416bae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183196 Tested-by: Jenkins Reviewed-by: Armin Le Grand <[email protected]> (cherry picked from commit 6a7e2f4ba5581946adf26195f0782f938c56919f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183202 Reviewed-by: Michael Stahl <[email protected]> diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index fc6435ef46bd..b024374a13f4 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1547,7 +1547,11 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP nDeltaX = GetOutDev()->mnOutWidth - nDeltaX - pChild->GetOutDev()->mnOutWidth; tools::Long nDeltaY = pChild->GetOutOffYPixel() - GetOutOffYPixel(); Point aPos( i_rPos ); - Point aDelta( nDeltaX, nDeltaY ); + // tdf#165706 those delta values are in pixels, but aPos copied from + // i_rPos *may* be in logical coordinates if a MapMode is set at + // i_pTargetOutDev. To not mix values of different coordinate systems + // it *needs* to be converted (which does nothing if no MapMode) + Point aDelta( i_pTargetOutDev->PixelToLogic( Point( nDeltaX, nDeltaY )) ); aPos += aDelta; pChild->ImplPaintToDevice( i_pTargetOutDev, aPos ); }
