diff options
author | nd101 <Fong@nd.com.cn> | 2020-03-25 13:17:48 +0800 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-04-02 21:40:50 +0200 |
commit | 55d423e8f371e914c51f9aa18aacede46355b133 (patch) | |
tree | 377eae7cfeca7710d5a6939aad4f388ae4aa9a9b /oox | |
parent | fdc768a10024998f6ed27991ea722645b3f5c246 (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
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91472
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
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 0088c1e51673..39b0c2eb4abc 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -424,6 +424,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 ) { @@ -473,7 +475,7 @@ oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstSubType, sal aChoiceShapePtr3 = aChoiceShapePtr4; } } - if (aShapePtr.get()) + if (aShapePtr.get() || aChoiceShapePtr2.get()) break; ++aRevIter; } |