diff options
author | nd101 <Fong@nd.com.cn> | 2020-03-25 13:17:48 +0800 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2020-04-01 10:20:26 +0200 |
commit | 69b83dc2d3014dd9b18402534e15c937dc082464 (patch) | |
tree | 6b1cc499763e90ddc5de0a20af8c20fa1b92e3ac /oox | |
parent | 3af7be613526404276210a698f77e0187831b9b1 (diff) |
tdf#131554 placeholder iteration fails to stop when a match is found
Wrong placeholder is returned due to iteration not stopping
when a match is found. It causes a text element position
to be incorrectly set.
Change-Id: I58be6825cec7a61f48b46418bdf28964c1afe4ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91023
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Tested-by: Jenkins
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/ppt/pptshape.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 4f1350a7c7e8..a736afd66e27 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -420,6 +420,8 @@ namespace // 3. ph with nSecondSubType and the same oSubTypeIndex // 4. ph with nSecondSubType // 5. ph with the same oSubTypeIndex +// It appears 3 and 1 has the same highest prority. + oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal_Int32 nSecondSubType, const OptValue< sal_Int32 >& oSubTypeIndex, std::vector< oox::drawingml::ShapePtr >& rShapes, bool bMasterOnly ) { @@ -469,7 +471,7 @@ oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal aChoiceShapePtr3 = aChoiceShapePtr4; } } - if (aShapePtr.get()) + if (aShapePtr.get() || aChoiceShapePtr2.get()) break; ++aRevIter; } |