[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - oox/source

Korrawit Pruegsanusak detective.conan.1412 at gmail.com
Tue Dec 3 01:44:31 PST 2013


 oox/source/ppt/pptgraphicshapecontext.cxx |   23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

New commits:
commit 0f4a452be3342d0206d6724faf170fa2786a7777
Author: Korrawit Pruegsanusak <detective.conan.1412 at gmail.com>
Date:   Tue Nov 26 22:31:51 2013 +0700

    fdo#71434: don't show master text if PlaceHolder types defined
    
    I've added all of valid PlaceHolder types from
    http://www.schemacentral.com/sc/ooxml/t-p_ST_PlaceholderType.html
    
    (cherry picked from commit bb1213a740b3b3b2b1967639939dd7a72c6d4237)
    
    Change-Id: I038fe43ff83699f92ff5eb9945bce12540058478
    Reviewed-on: https://gerrit.libreoffice.org/6821
    Reviewed-by: Muthu Subramanian K <muthusuba at gmail.com>
    Tested-by: Muthu Subramanian K <muthusuba at gmail.com>
    Reviewed-by: Thorsten Behrens <thb at documentfoundation.org>
    Tested-by: Thorsten Behrens <thb at documentfoundation.org>

diff --git a/oox/source/ppt/pptgraphicshapecontext.cxx b/oox/source/ppt/pptgraphicshapecontext.cxx
index e21b9a1..fec7785 100644
--- a/oox/source/ppt/pptgraphicshapecontext.cxx
+++ b/oox/source/ppt/pptgraphicshapecontext.cxx
@@ -149,9 +149,26 @@ Reference< XFastContextHandler > PPTGraphicShapeContext::createFastChildContext(
                 if ( pPlaceholder.get() )
                 {
                     bool bUseText = true;
-                    // TODO: Check if pPlaceholder->getSubType is none (i.e. none explicitly specified)
-                    if( pPlaceholder->getSubType() == XML_obj )
-                        bUseText = false;
+                    switch( pPlaceholder->getSubType() )
+                    {
+                        case XML_title :
+                        case XML_body :
+                        case XML_ctrTitle :
+                        case XML_subTitle :
+                        case XML_dt :
+                        case XML_sldNum :
+                        case XML_ftr :
+                        case XML_hdr :
+                        case XML_obj :
+                        case XML_chart :
+                        case XML_tbl :
+                        case XML_clipArt :
+                        case XML_dgm :
+                        case XML_media :
+                        case XML_sldImg :
+                        case XML_pic :
+                            bUseText = false;
+                    }
                     mpShapePtr->applyShapeReference( *pPlaceholder.get(), bUseText );
                     PPTShape* pPPTShape = dynamic_cast< PPTShape* >( pPlaceholder.get() );
                     if ( pPPTShape )


More information about the Libreoffice-commits mailing list