diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2017-08-21 16:06:43 +0200 |
---|---|---|
committer | Tamás Zolnai <tamas.zolnai@collabora.com> | 2017-09-25 21:06:14 +0200 |
commit | 9778e5765ad26457da779493edde8a061266c7e3 (patch) | |
tree | 94498937af51f737a20a33eade43425cdda37dd6 /oox | |
parent | 9602a07fe0cd3f1b9d78279629393ec1d173ebca (diff) |
VML, Watermark: detect shapetype from other subdocuments
In some documents Watermark wasn't visible
because shapetype wasn't detected.
It was impossible to use shapetype defined in header1.xml
in shape placed in the header2.xml.
Change-Id: Ib406c8fc702968684ad46efd0857b768af2820f5
Reviewed-on: https://gerrit.libreoffice.org/41395
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
(cherry picked from commit 87f1f7fdb34fe452ac540524224e1e808ce5d3a2)
Reviewed-on: https://gerrit.libreoffice.org/42349
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index c89b5ece1934..45e7e40ab831 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -284,6 +284,14 @@ void ShapeBase::finalizeFragmentImport() aType = aType.copy(1); if( const ShapeType* pShapeType = mrDrawing.getShapes().getShapeTypeById( aType, true ) ) maTypeModel.assignUsed( pShapeType->getTypeModel() ); + else { + // Temporary fix, shapetype not found if referenced from different substream + // FIXME: extend scope of ShapeContainer to store all shapetypes from the document + const OUString sShapeTypePrefix = "shapetype_"; + if (aType.startsWith(sShapeTypePrefix)) { + maTypeModel.moShapeType = aType.copy(sShapeTypePrefix.getLength()).toInt32(); + } + } } } |