[Libreoffice-commits] core.git: sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Oct 27 12:40:48 UTC 2019
sw/source/ui/fldui/fldref.cxx | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
New commits:
commit 505822ef941194552ae782081d5f6e9d2a6989d3
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 25 20:38:31 2019 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 27 13:39:51 2019 +0100
tdf#128393 change sorting while thawed
Change-Id: I9670c1557e0b39f9dde1f068bb091b9459d89baa
Reviewed-on: https://gerrit.libreoffice.org/81533
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index a2c6bfb64244..4b89a8aca6f5 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -484,6 +484,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();
@@ -494,7 +512,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();
@@ -516,7 +533,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 );
@@ -533,7 +549,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 );
@@ -621,7 +636,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(
More information about the Libreoffice-commits
mailing list