summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2023-05-12 19:47:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-05-13 14:55:56 +0200
commit3168d1ab07239789cd36a5960cef2d13ae29c9de (patch)
tree344b92c257f9e70119d13b51e06abc74d12f40f3 /basctl
parent5351b8789805154219fe57b92b41b17c0e0cd765 (diff)
use more optional for SdrObjListIter
Change-Id: Iffd99d820889a1a5be514d46191ffaa2a6fa6910 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151721 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/dlged/propbrw.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index f95157d4f7d7..1bdc03811958 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -242,11 +242,11 @@ Sequence< Reference< XInterface > >
{
SdrObject* pCurrent = _rMarkList.GetMark(i)->GetMarkedSdrObj();
- std::unique_ptr<SdrObjListIter> pGroupIterator;
+ std::optional<SdrObjListIter> oGroupIterator;
if (pCurrent->IsGroupObject())
{
- pGroupIterator.reset(new SdrObjListIter(pCurrent->GetSubList()));
- pCurrent = pGroupIterator->IsMore() ? pGroupIterator->Next() : nullptr;
+ oGroupIterator.emplace(pCurrent->GetSubList());
+ pCurrent = oGroupIterator->IsMore() ? oGroupIterator->Next() : nullptr;
}
while (pCurrent)
@@ -259,7 +259,7 @@ Sequence< Reference< XInterface > >
}
// next element
- pCurrent = pGroupIterator && pGroupIterator->IsMore() ? pGroupIterator->Next() : nullptr;
+ pCurrent = oGroupIterator && oGroupIterator->IsMore() ? oGroupIterator->Next() : nullptr;
}
}