[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Mar 4 15:46:33 UTC 2019


 sw/source/ui/dbui/createaddresslistdialog.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit cda1cd96d88193ef8c76dda549a237dc2fb7589b
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Feb 28 10:19:32 2019 +0000
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Mon Mar 4 16:46:10 2019 +0100

    address list doesn't refresh on pressing 'delete'
    
    m_nCurrentDataSet doesn't change, so it doesn't refill it, even
    though m_nCurrentDataSet was deleted so it no refers to a new
    entry
    
    Change-Id: I0c68f407a23a28a7e55fb3cf691e5f07e5ed6729
    Reviewed-on: https://gerrit.libreoffice.org/68498
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index c3c927f71c5b..a48d68ca1fc0 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -82,7 +82,8 @@ public:
     void        SetData(SwCSVData& rDBData);
 
     void        SetCurrentDataSet(sal_uInt32 nSet);
-    sal_uInt32  GetCurrentDataSet() const { return m_nCurrentDataSet;}
+    void        CurrentDataSetInvalidated() { m_nCurrentDataSet = std::numeric_limits<sal_uInt32>::max(); }
+    sal_uInt32  GetCurrentDataSet() const { return m_nCurrentDataSet; }
     void        SetCursorTo(std::size_t nElement);
     virtual void Resize() override;
 };
@@ -541,6 +542,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, DeleteHdl_Impl, Button*, void)
         m_pCSVData->aDBData[0].assign(m_pCSVData->aDBData[0].size(), OUString());
         m_pDeletePB->Enable(false);
     }
+    m_pAddressControl->CurrentDataSetInvalidated();
     m_pAddressControl->SetCurrentDataSet(nCurrent);
     m_pSetNoNF->SetMax(m_pCSVData->aDBData.size());
     UpdateButtons();


More information about the Libreoffice-commits mailing list