Bug similar to https://bugzilla.mozilla.org/show_bug.cgi?id=69230 and http://qa.openoffice.org/issues/show_bug.cgi?id=39307