summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/wrtww8gr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8/wrtww8gr.cxx')
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index 61d9ad960a27..d66cb8cc280f 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -99,9 +99,8 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStora
{
bool bGraphicNeeded = false;
SfxItemIter aIter( rSet );
- const SfxPoolItem* pItem = aIter.GetCurItem();
-
- do {
+ for (auto pItem = aIter.GetCurItem(); !bGraphicNeeded && pItem; pItem = aIter.NextItem())
+ {
switch (pItem->Which())
{
/*
@@ -121,8 +120,7 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStora
default:
bGraphicNeeded = true;
}
- } while( !bGraphicNeeded && !aIter.IsAtEnd() &&
- nullptr != ( pItem = aIter.NextItem() ) );
+ }
/*
Now we must see if the object contains a preview itself which is equal to