tdf#128393 change sorting while thawed
Change-Id: I9670c1557e0b39f9dde1f068bb091b9459d89baa
Reviewed-on: https://gerrit.libreoffice.org/81554
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 6b00cac..3a62dd54 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -485,6 +485,24 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
m_xSelectionLB->freeze();
m_xSelectionLB->clear();
if (REFFLDFLAG & nTypeId)
{
if (nTypeId == REFFLDFLAG_FOOTNOTE || nTypeId == REFFLDFLAG_ENDNOTE)
{
m_xSelectionLB->thaw();
m_xSelectionLB->make_unsorted();
m_xSelectionLB->freeze();
}
// #i83479#
else if (nTypeId != REFFLDFLAG_HEADING && nTypeId != REFFLDFLAG_NUMITEM)
{
m_xSelectionLB->thaw();
m_xSelectionLB->make_sorted();
m_xSelectionLB->freeze();
}
}
// #i83479#
m_xSelectionToolTipLB->freeze();
m_xSelectionToolTipLB->clear();
@@ -495,7 +513,6 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
{
if (nTypeId == REFFLDFLAG_BOOKMARK) // text marks!
{
m_xSelectionLB->make_sorted();
// get all text marks
IDocumentMarkAccess* const pMarkAccess = pSh->getIDocumentMarkAccess();
for(IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->getBookmarksBegin();
@@ -517,7 +534,6 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
}
else if (nTypeId == REFFLDFLAG_FOOTNOTE)
{
m_xSelectionLB->make_unsorted();
SwSeqFieldList aArr;
const size_t nCnt = pSh->GetSeqFootnoteList( aArr );
@@ -534,7 +550,6 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
}
else if (nTypeId == REFFLDFLAG_ENDNOTE)
{
m_xSelectionLB->make_unsorted();
SwSeqFieldList aArr;
const size_t nCnt = pSh->GetSeqFootnoteList( aArr, true );
@@ -622,7 +637,6 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
}
else
{
m_xSelectionLB->make_sorted();
// get the fields to Seq-FieldType:
SwSetExpFieldType* pType = static_cast<SwSetExpFieldType*>(pSh->GetFieldType(