Fixed error caused by using documents created in the recent versions of OpenOffice
Created originally on Bitbucket by mojo (Eugene Morozov)
Was already merged in Bitbucket before import, marked as merged by the import user
New version that should work with documents created in both old and new versions of OpenOffice.