summaryrefslogtreecommitdiff
path: root/sw/source/core/undo/rolbck.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/undo/rolbck.cxx')
-rw-r--r--sw/source/core/undo/rolbck.cxx20
1 files changed, 5 insertions, 15 deletions
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index a80d270cb81f..8d30afb1b870 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -1191,27 +1191,17 @@ void SwHistory::CopyFormatAttr(
if(rSet.Count())
{
SfxItemIter aIter(rSet);
-
+ const SfxPoolItem* pItem = aIter.GetCurItem();
do
{
- if(!IsInvalidItem(aIter.GetCurItem()))
- {
- const SfxPoolItem* pNew = aIter.GetCurItem();
-
- Add(
- pNew,
- pNew,
- nNodeIdx);
- }
-
- if(aIter.IsAtEnd())
+ if(!IsInvalidItem(pItem))
{
- break;
+ Add(pItem, pItem, nNodeIdx);
}
- aIter.NextItem();
+ pItem = aIter.NextItem();
- } while(true);
+ } while(pItem);
}
}