Resolves: fdo#87281 Crash on importing diagram in .docx file

Change-Id: Ic2c7326ab83258e2e9dcbac88aa9f76f771a9b12
(cherry picked from commit de41a2038ac44f71a9adef97e6ccea83c99dd1c2)