summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8graf.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8/ww8graf.cxx')
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx21
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);
+ }
+ }
}
}