diff options
author | Attila Bakos <bakos.attilakaroly@nisz.hu> | 2020-04-08 14:50:07 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-04-20 10:55:53 +0200 |
commit | 9283cd9e13cd3e0dd7d6b831d930128931862a40 (patch) | |
tree | 073fb549e8459c7564c0dcf1053b70662714830d /oox | |
parent | df4c562ac613ce51d431cbb633ffe57c5305714f (diff) |
tdf#78749 DOCX: import VML background image
of text boxes. DOCX relationship identifier
wasn't handled earlier, only XLSX.
Co-developer: Tibor Nagy
Change-Id: I72f246e6f69d70d1e203087516ee93a57563f777
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91933
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/vml/vmlshapecontext.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index dbec50102fd1..ce8805f6621c 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -354,6 +354,10 @@ ContextHandlerRef ShapeTypeContext::onCreateContext( sal_Int32 nElement, const A mrTypeModel.maStrokeModel.moJoinStyle = rAttribs.getToken( XML_joinstyle ); break; case VML_TOKEN( fill ): + { + // in DOCX shapes use r:id for the relationship id + // in XLSX they use o:relid + bool bHasORelId = rAttribs.hasAttribute( O_TOKEN(relid) ); mrTypeModel.maFillModel.moFilled.assignIfUsed( lclDecodeBool( rAttribs, XML_on ) ); mrTypeModel.maFillModel.moColor.assignIfUsed( rAttribs.getString( XML_color ) ); mrTypeModel.maFillModel.moOpacity = lclDecodeOpacity( rAttribs, XML_opacity, 1.0 ); @@ -364,9 +368,10 @@ ContextHandlerRef ShapeTypeContext::onCreateContext( sal_Int32 nElement, const A mrTypeModel.maFillModel.moFocus = lclDecodePercent( rAttribs, XML_focus, 0.0 ); mrTypeModel.maFillModel.moFocusPos = lclDecodePercentPair( rAttribs, XML_focusposition ); mrTypeModel.maFillModel.moFocusSize = lclDecodePercentPair( rAttribs, XML_focussize ); - mrTypeModel.maFillModel.moBitmapPath = decodeFragmentPath( rAttribs, O_TOKEN( relid ) ); + mrTypeModel.maFillModel.moBitmapPath = decodeFragmentPath( rAttribs, bHasORelId ? O_TOKEN(relid) : R_TOKEN(id) ); mrTypeModel.maFillModel.moRotate = lclDecodeBool( rAttribs, XML_rotate ); - break; + break; + } case VML_TOKEN( imagedata ): { // shapes in docx use r:id for the relationship id |