summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index a43db5d01869..de0820b8204a 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -663,10 +663,16 @@ bool SwWW8AttrIter::IsTextAttr( sal_Int32 nSwPos )
for (size_t i = 0; i < pTextAttrs->Count(); ++i)
{
const SwTextAttr* pHt = pTextAttrs->Get(i);
- if ( ( pHt->HasDummyChar() || pHt->HasContent() )
- && (pHt->GetStart() == nSwPos) )
+ if (nSwPos == pHt->GetStart())
{
- return true;
+ if (pHt->HasDummyChar() || pHt->HasContent() )
+ {
+ return true;
+ }
+ }
+ else if (nSwPos < pHt->GetStart())
+ {
+ break; // sorted by start
}
}
}