[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/source

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Tue Feb 9 12:47:39 UTC 2021


 sc/source/ui/dbgui/PivotLayoutTreeListData.cxx |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 8e98abb60d6930670d92906a6110b80b84a003c3
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Jan 19 12:02:41 2021 +0100
Commit:     Jan Holesovsky <kendy at collabora.com>
CommitDate: Tue Feb 9 13:47:06 2021 +0100

    pivot table: avoid crash on drag n drop
    
    prevents from unexpected situation when user will send double request for the same drag and drop operation (slow internet connection and repeating operation)
    
    Change-Id: I8d081cf884c38b2e4f367143ad728c29b1466fbd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109634
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    (cherry picked from commit fbef08d9cb9c5bfc852dc23d5bafc9d057ee3bcd)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109737
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
index 6b10fd8b953f..da54e26ad5a1 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListData.cxx
@@ -184,6 +184,9 @@ void ScPivotLayoutTreeListData::PushDataFieldNames(std::vector<ScDPName>& rDataF
 
 void ScPivotLayoutTreeListData::InsertEntryForSourceTarget(weld::TreeView& rSource, int nTarget)
 {
+    if (rSource.count_selected_rows() <=0)
+        return;
+
     ScItemValue* pItemValue = reinterpret_cast<ScItemValue*>(rSource.get_selected_id().toInt64());
 
     if (mpParent->IsDataElement(pItemValue->maFunctionData.mnCol))


More information about the Libreoffice-commits mailing list