summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-24 15:06:10 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-05-18 15:10:04 +0200
commit891998d48e2b7cd3c48273b4706b92735033ad17 (patch)
tree6751fe33c8c7cc335712f20ade043568d8df5894 /sw
parent77282b66b27f8e3156b2fb68a9a3a363643ff2f8 (diff)
ofz#1220 sanitize nTyp to legal values
Change-Id: Iad71c4f79dbe03e2e325453eb0506a2d92d67c2d Reviewed-on: https://gerrit.libreoffice.org/37762 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 121f605f34dd..d404d6c9c29c 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1295,7 +1295,7 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox(WW8_DPHEAD* pHd, SfxAllItemSet &rSet)
else // no -> take lines
SetStdAttr( rSet, aCallB.dpPolyLine.aLnt, aCallB.dptxbx.aShd );
SetFill( rSet, aCallB.dptxbx.aFill );
- rSet.Put( SdrCaptionTypeItem( aCaptA[nTyp] ) );
+ rSet.Put(SdrCaptionTypeItem(aCaptA[nTyp % SAL_N_ELEMENTS(aCaptA)]));
return pObj;
}