summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index b0026f53a4c0..8373c0c88f38 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3497,6 +3497,7 @@ void lclProcessRecursiveGrabBag(sal_Int32 aElementId, const css::uno::Sequence<c
{
css::uno::Sequence<css::beans::PropertyValue> aAttributes;
rtl::Reference<FastAttributeList> pAttributes = FastSerializerHelper::createAttrList();
+ sal_Int32 nElements = 0;
for (const auto& rElement : rElements)
{
@@ -3504,6 +3505,10 @@ void lclProcessRecursiveGrabBag(sal_Int32 aElementId, const css::uno::Sequence<c
{
rElement.Value >>= aAttributes;
}
+ else
+ {
+ ++nElements;
+ }
}
for (const auto& rAttribute : std::as_const(aAttributes))
@@ -3525,7 +3530,7 @@ void lclProcessRecursiveGrabBag(sal_Int32 aElementId, const css::uno::Sequence<c
pAttributes->add(*aSubElementId, aValue);
}
- if (rElements.size() == 0)
+ if (nElements == 0)
{
pSerializer->singleElement(aElementId, pAttributes);
}