forked from amazingfate/loongoffice
Regression from commit af313fc149f80adb0f1680ca20e19745ccb7fede (tdf#105143 DOCX import: enable DoNotCaptureDrawObjsOnPage layout compat option, 2017-01-06), the second page of the document has an off-page positioned draw shape, which is still kept inside the page frame in Word, but not in Writer anymore. Reading the SwAnchoredObjectPosition::GetInfoAboutObj() code, there are a number of conditions at play here, but the relevant one is that fly frames have the restriction that the "do not capture" behavior is restricted to wrap=through, but the wrap type was ignored in the draw shape case. Fix the problem by being consistent here: require wrap=through for both fly frames and draw shapes that moves the shape back inside the page frame. Note that Word goes a bit further here and even keeps the shape inside the body text area, but that doesn't seem to be a regression, so leave that unchanged for now. Change-Id: I3b6331c13d2376cac9b0de90f6f57289a7a0f0e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168762 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins