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 <caolanm@redhat.com>
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx
index 3455f11..35a24e6 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)