Resolves: fdo#52226 swap in graphics on .docx and .rtf export

(cherry picked from commit 9dd5caac62083f7162d83319284df68ee83e3777)

Conflicts:
	sw/source/filter/ww8/docxattributeoutput.cxx
	sw/source/filter/ww8/rtfattributeoutput.cxx
	sw/source/filter/ww8/wrtww8gr.cxx

Change-Id: Ie818b382c0b17760c720ff2f2c73a3697989f97e
Reviewed-on: https://gerrit.libreoffice.org/10296
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>