Blame SOURCES/0029-fdo-71434-don-t-show-master-text-if-PlaceHolder-type.patch

f0633d
From 0f4a452be3342d0206d6724faf170fa2786a7777 Mon Sep 17 00:00:00 2001
f0633d
From: Korrawit Pruegsanusak <detective.conan.1412@gmail.com>
f0633d
Date: Tue, 26 Nov 2013 22:31:51 +0700
f0633d
Subject: [PATCH 029/109] fdo#71434: don't show master text if PlaceHolder
f0633d
 types defined
f0633d
f0633d
I've added all of valid PlaceHolder types from
f0633d
http://www.schemacentral.com/sc/ooxml/t-p_ST_PlaceholderType.html
f0633d
f0633d
(cherry picked from commit bb1213a740b3b3b2b1967639939dd7a72c6d4237)
f0633d
f0633d
Change-Id: I038fe43ff83699f92ff5eb9945bce12540058478
f0633d
Reviewed-on: https://gerrit.libreoffice.org/6821
f0633d
Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com>
f0633d
Tested-by: Muthu Subramanian K <muthusuba@gmail.com>
f0633d
Reviewed-by: Thorsten Behrens <thb@documentfoundation.org>
f0633d
Tested-by: Thorsten Behrens <thb@documentfoundation.org>
f0633d
---
f0633d
 oox/source/ppt/pptgraphicshapecontext.cxx | 23 ++++++++++++++++++++---
f0633d
 1 file changed, 20 insertions(+), 3 deletions(-)
f0633d
f0633d
diff --git a/oox/source/ppt/pptgraphicshapecontext.cxx b/oox/source/ppt/pptgraphicshapecontext.cxx
f0633d
index e21b9a1..fec7785 100644
f0633d
--- a/oox/source/ppt/pptgraphicshapecontext.cxx
f0633d
+++ b/oox/source/ppt/pptgraphicshapecontext.cxx
f0633d
@@ -149,9 +149,26 @@ Reference< XFastContextHandler > PPTGraphicShapeContext::createFastChildContext(
f0633d
                 if ( pPlaceholder.get() )
f0633d
                 {
f0633d
                     bool bUseText = true;
f0633d
-                    // TODO: Check if pPlaceholder->getSubType is none (i.e. none explicitly specified)
f0633d
-                    if( pPlaceholder->getSubType() == XML_obj )
f0633d
-                        bUseText = false;
f0633d
+                    switch( pPlaceholder->getSubType() )
f0633d
+                    {
f0633d
+                        case XML_title :
f0633d
+                        case XML_body :
f0633d
+                        case XML_ctrTitle :
f0633d
+                        case XML_subTitle :
f0633d
+                        case XML_dt :
f0633d
+                        case XML_sldNum :
f0633d
+                        case XML_ftr :
f0633d
+                        case XML_hdr :
f0633d
+                        case XML_obj :
f0633d
+                        case XML_chart :
f0633d
+                        case XML_tbl :
f0633d
+                        case XML_clipArt :
f0633d
+                        case XML_dgm :
f0633d
+                        case XML_media :
f0633d
+                        case XML_sldImg :
f0633d
+                        case XML_pic :
f0633d
+                            bUseText = false;
f0633d
+                    }
f0633d
                     mpShapePtr->applyShapeReference( *pPlaceholder.get(), bUseText );
f0633d
                     PPTShape* pPPTShape = dynamic_cast< PPTShape* >( pPlaceholder.get() );
f0633d
                     if ( pPPTShape )
f0633d
-- 
f0633d
1.8.4.2
f0633d