summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/dbgui
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:44:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:44:47 +0000
commit91fe6b97952aa6f7cef58327fd085a17db38ad95 (patch)
tree7a4412295bfb80e15a4936fe67d4bd7b96458ce8 /sc/source/ui/dbgui
parentReleasing progress-linux version 4:24.2.1-4~progress7.99u1. (diff)
downloadlibreoffice-91fe6b97952aa6f7cef58327fd085a17db38ad95.tar.xz
libreoffice-91fe6b97952aa6f7cef58327fd085a17db38ad95.zip
Merging upstream version 4:24.2.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sc/source/ui/dbgui')
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
index 45af29a4f1..672de9559c 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
@@ -67,6 +67,9 @@ void ScPivotLayoutTreeListBase::PushEntriesToPivotFieldVector(ScPivotFieldVector
std::unique_ptr<weld::TreeIter> xEachEntry(mxControl->make_iterator());
if (!mxControl->get_iter_first(*xEachEntry))
return;
+
+ std::optional<ScPivotField> oDataField;
+
do
{
ScItemValue* pItemValue = weld::fromId<ScItemValue*>(mxControl->get_id(*xEachEntry));
@@ -78,8 +81,15 @@ void ScPivotLayoutTreeListBase::PushEntriesToPivotFieldVector(ScPivotFieldVector
aField.nFuncMask = rFunctionData.mnFuncMask;
aField.mnDupCount = rFunctionData.mnDupCount;
aField.maFieldRef = rFunctionData.maFieldRef;
- rVector.push_back(aField);
+
+ if (aField.nCol == PIVOT_DATA_FIELD)
+ oDataField = aField;
+ else
+ rVector.push_back(aField);
} while (mxControl->iter_next(*xEachEntry));
+
+ if (oDataField)
+ rVector.push_back(*oDataField);
}
void ScPivotLayoutTreeListBase::InsertEntryForSourceTarget(weld::TreeView& /*pSource*/, int /*nTarget*/)