diff options
author | Justin Luth <jluth@mail.com> | 2023-06-06 10:51:46 -0400 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2023-06-06 20:23:45 +0200 |
commit | 6e2b10c735381babb1ed5df624462735b84a3c64 (patch) | |
tree | 3fcedbc66a1516ac3244b58dc5abddee09ce23d6 /sw/source | |
parent | 1527fa8435ef415678b2e4a6972f5e378ee5cab1 (diff) |
tdf#135709 doc import: force dynamic wrap on inline images
Wrapping is irrelevant for inline images,
so it is safe to do this in terms of writer layout.
The benefit is clearly seen when the user changes
from inline to anchored. In all other formats,
that results in Parallel wrapping, but in DOC format
the text "disappears" behind the image since it wraps through.
Change-Id: Ia4827814f9c9a3b8865bf8d0d72552b2b44a0207
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152682
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 4e7a454ab773..7768680d8b2c 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -2629,7 +2629,11 @@ SwFrameFormat* SwWW8ImplReader::Read_GrafLayer( tools::Long nGrafAnchorCp ) eSurround = css::text::WrapTextMode_NONE; break; case 3: // 3 wrap as if no object present - eSurround = css::text::WrapTextMode_THROUGH; + // Special case: on export, inline images are wrapped through as a hack for old formats. + // That is irrelevant for Writer, so instead use the default wrap in that case, + // so that when the user changes it into an anchor, it wraps nicely, and not through. + if (!IsInlineEscherHack()) + eSurround = css::text::WrapTextMode_THROUGH; break; case 4: // 4 wrap tightly around object case 5: // 5 wrap tightly, but allow holes |