diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index e9a4fea132f2..40862f813ff5 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -813,8 +813,10 @@ const SfxItemSet* ScDocument::GetCondResult( ScRefCellValue& rCell, const ScAddress& rPos, const ScConditionalFormatList& rList, const ScCondFormatIndexes& rIndex ) const { - for (const auto& rItem : rIndex) + for (size_t i = 0, nLen = rIndex.size(); i < nLen; ++i) { + const auto& rItem = rIndex[i]; + const ScConditionalFormat* pForm = rList.GetFormat(rItem); if (!pForm) continue;