Copy-Paste
V519 The ‘pArr[2]’ variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 3735, 3736. unotbl.cxx 3736
uno::Sequence< OUString > SwXTextTable::getSupportedServiceNames(void) { uno::Sequence< OUString > aRet(4); OUString* pArr = aRet.getArray(); pArr[0] = "com.sun.star.document.LinkTarget"; pArr[1] = "com.sun.star.text.TextTable"; pArr[2] = "com.sun.star.text.TextContent"; pArr[2] = "com.sun.star.text.TextSortable"; return aRet; }
It’s the classic last line effect. I’m almost sure the last line was derived from the one before it. The programmer replaced Content with Sortable but forgot about the index ‘2’.
Please click here to see more bugs from this project.