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

New commits:
commit 8e98abb60d6930670d92906a6110b80b84a003c3
Author:     Szymon Kłos <[email protected]>
AuthorDate: Tue Jan 19 12:02:41 2021 +0100
Commit:     Jan Holesovsky <[email protected]>
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 <[email protected]>
    (cherry picked from commit fbef08d9cb9c5bfc852dc23d5bafc9d057ee3bcd)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109737
    Reviewed-by: Jan Holesovsky <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

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))
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to