sw/source/ui/dbui/mmresultdialogs.cxx |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 00ba164a6ef36c0adb3ff73c6f1c6e0c4191c1cb
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue May 5 10:36:28 2020 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue May 5 16:21:19 2020 +0200

    SwMMResultEmailDialog::FillInEmailSettings: Turn check into assert
    
    Since SwMMResultEmailDialog::FillInEmailSettings is only called
    from the SwMMResultEmailDialog ctor, 'm_xMailToLB->get_count()'
    should always return 0 here.
    
    Change-Id: I156552c17f5a53f6049d0a25231ba91143fdfe62
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93458
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx 
b/sw/source/ui/dbui/mmresultdialogs.cxx
index adbc284c5b97..3794f9f861c9 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -406,10 +406,6 @@ void SwMMResultEmailDialog::FillInEmailSettings()
 
     }
 
-    //fill mail address ListBox
-    if (m_xMailToLB->get_count())
-        return;
-
     //select first column
     uno::Reference< sdbcx::XColumnsSupplier > 
xColsSupp(xConfigItem->GetResultSet(), uno::UNO_QUERY);
     //get the name of the actual columns
@@ -417,6 +413,9 @@ void SwMMResultEmailDialog::FillInEmailSettings()
     uno::Sequence< OUString > aFields;
     if (xColAccess.is())
         aFields = xColAccess->getElementNames();
+
+    // fill mail address ListBox
+    assert(m_xMailToLB->get_count() == 0);
     for (const OUString& rField : std::as_const(aFields))
         m_xMailToLB->append_text(rField);
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to