diff options
author | Justin Luth <jluth@mail.com> | 2023-05-30 11:23:58 -0400 |
---|---|---|
committer | Justin Luth <jluth@mail.com> | 2023-05-30 21:33:16 +0200 |
commit | 0ceb131e964206efbb1c76a03f19d1992e2f89c7 (patch) | |
tree | ea2a0405d747eb09f75596a889da394696330d65 /sw/source | |
parent | 60e32969a98cad348cf8e55e8f93abc3d6e9c70c (diff) |
tdf#140508 doc import: auto-contour for textboxes
This fixes a 6.3.1 regression.
The problem was that contour was turned off
despite settings indicating that it should be on.
An earlier patchset contains the results of a make sw.check assert.
make CppunitTest_sw_ww8export3 CPPUNIT_TEST_NAME=testTdf79186_noLayoutInCell
Change-Id: Ib3df022a1430649b271083f343b470798f4a08c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152398
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 35621217ece1..4e7a454ab773 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -2104,11 +2104,22 @@ void SwWW8ImplReader::MapWrapIntoFlyFormat(const SvxMSDffImportRec& rRecord, } else if (rFlyFormat.GetSurround().IsContour()) { - // Contour is enabled, but no polygon is set: disable contour, because Word does not - // Writer-style auto-contour in that case. - SwFormatSurround aSurround(rFlyFormat.GetSurround()); - aSurround.SetContour(false); - rFlyFormat.SetFormatAttr(aSurround); + const SdrObject* pSdrObj = rFlyFormat.FindSdrObject(); + SdrObjKind eKind = pSdrObj ? pSdrObj->GetObjIdentifier() : SdrObjKind::Graphic; + switch (eKind) + { + case SdrObjKind::Text: + break; + case SdrObjKind::SwFlyDrawObjIdentifier: + default: + { + // Contour is enabled, but no polygon is set: disable contour, because Word does not + // Writer-style auto-contour in that case. + SwFormatSurround aSurround(rFlyFormat.GetSurround()); + aSurround.SetContour(false); + rFlyFormat.SetFormatAttr(aSurround); + } + } } } |