sc/source/ui/dbgui/tpsort.cxx | 11 +++++++---- vcl/unx/generic/gdi/gdiimpl.cxx | 4 ---- vcl/unx/generic/gdi/gdiimpl.hxx | 2 -- 3 files changed, 7 insertions(+), 10 deletions(-)
New commits: commit 13810281fe1297833a849bf5adea0be8ea77ca88 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Jan 10 10:32:10 2023 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Jan 10 19:57:09 2023 +0000 Resolves: tdf#152950 don't set_active while frozen Change-Id: I7db73e37ed426aae2282a6bf1564e5d3843442cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145261 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 3455f11006cf..35a24e633058 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -813,6 +813,8 @@ void ScTabPageSortOptions::EdOutPosModHdl() void ScTabPageSortOptions::FillAlgor() { + tools::Long nCount = 0; + m_xLbAlgorithm->freeze(); m_xLbAlgorithm->clear(); @@ -830,18 +832,19 @@ void ScTabPageSortOptions::FillAlgor() lang::Locale aLocale( LanguageTag::convertToLocale( eLang )); const uno::Sequence<OUString> aAlgos = m_xColWrap->listCollatorAlgorithms( aLocale ); - tools::Long nCount = aAlgos.getLength(); + nCount = aAlgos.getLength(); for (const OUString& sAlg : aAlgos) { OUString sUser = m_xColRes->GetTranslation( sAlg ); m_xLbAlgorithm->append_text(sUser); } - m_xLbAlgorithm->set_active(0); // first entry is default - m_xFtAlgorithm->set_sensitive(nCount > 1); // enable only if there is a choice - m_xLbAlgorithm->set_sensitive(nCount > 1); // enable only if there is a choice } m_xLbAlgorithm->thaw(); + + m_xLbAlgorithm->set_active(nCount ? 0 : -1); // first entry is default + m_xFtAlgorithm->set_sensitive(nCount > 1); // enable only if there is a choice + m_xLbAlgorithm->set_sensitive(nCount > 1); // enable only if there is a choice } IMPL_LINK_NOARG(ScTabPageSortOptions, FillAlgorHdl, weld::ComboBox&, void) commit 4a050ed9e8f5fc0a6df35adfcda5698af1e81d47 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Jan 10 09:35:12 2023 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Jan 10 19:56:59 2023 +0000 mpMonoGC is unused since: commit 837f171810a95a1d87907dd08d67e969276f0559 Date: Thu Oct 1 14:20:31 2015 +0200 loplugin:unusedmethods in vcl mpMaskGC is also unused. Change-Id: I4885dacfa1caf31d9943e36881900291ef3e5560 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145257 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx index 3e2b520bd904..3e4256184674 100644 --- a/vcl/unx/generic/gdi/gdiimpl.cxx +++ b/vcl/unx/generic/gdi/gdiimpl.cxx @@ -110,9 +110,7 @@ X11SalGraphicsImpl::X11SalGraphicsImpl(X11SalGraphics& rParent): mpPenGC(nullptr), moPenColor( std::in_place, 0x00, 0x00, 0x00 ), mnPenPixel(0), - mpMonoGC(nullptr), mpCopyGC(nullptr), - mpMaskGC(nullptr), mpInvertGC(nullptr), mpStippleGC(nullptr) { @@ -168,9 +166,7 @@ void X11SalGraphicsImpl::freeResources() freeGC( pDisplay, mpPenGC ); freeGC( pDisplay, mpBrushGC ); - freeGC( pDisplay, mpMonoGC ); freeGC( pDisplay, mpCopyGC ); - freeGC( pDisplay, mpMaskGC ); freeGC( pDisplay, mpInvertGC ); freeGC( pDisplay, mpStippleGC ); mbTrackingGC = mbPenGC = mbBrushGC = mbCopyGC = mbInvertGC = mbInvert50GC = mbStippleGC = false; diff --git a/vcl/unx/generic/gdi/gdiimpl.hxx b/vcl/unx/generic/gdi/gdiimpl.hxx index 1c7689b641f0..73bf4813ee42 100644 --- a/vcl/unx/generic/gdi/gdiimpl.hxx +++ b/vcl/unx/generic/gdi/gdiimpl.hxx @@ -64,9 +64,7 @@ private: Pixel mnPenPixel; - GC mpMonoGC; GC mpCopyGC; - GC mpMaskGC; GC mpInvertGC; GC mpStippleGC;