[ooo-build-commit] .: 2 commits - patches/dev300
Radek DoulÃk
rodo at kemper.freedesktop.org
Mon Sep 6 07:05:58 PDT 2010
patches/dev300/apply | 8
patches/dev300/oox-pptx-import-fix-placeholder-text-style-1.diff | 29
patches/dev300/oox-pptx-import-fix-placeholder-text-style.diff | 342 ++++------
3 files changed, 162 insertions(+), 217 deletions(-)
New commits:
commit 1047c3dc05b326e1244a321565d2ffe30ab4e7c6
Author: Radek Doulik <rodo at novell.com>
Date: Mon Sep 6 15:58:10 2010 +0200
fix regressions after oox/ placeholder fixes were merged upstream and modified
* fix shape subtype index problem as well, it was set to 0 even when no idx was used in the imported document
diff --git a/patches/dev300/apply b/patches/dev300/apply
index da8c1aa..a4c059d 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2975,8 +2975,6 @@ normalize-template-paths-fix.diff, n#512146, thorsten
# cache fontconfig's pre-substitution result for better rendering performance.
fontconfig-cache-pre-substitution.diff, n#529532, kohei
-# FIXME dev300-m83 oox-pptx-import-fix-placeholder-text-style.diff, n#479834, rodo
-
[ OOXMLExport ]
oox-pptx-export-hyperlinks.diff, n#499124, rodo
oox-pptx-export-vertical-text.diff, n#498737, rodo
@@ -3522,7 +3520,6 @@ SectionOwner => timar
magyarlinuxlibertine-fonts.diff
[ OOXML ]
-# FIXME dev300-m83 oox-pptx-import-fix-placeholder-text-style-1.diff, n#592906, rodo
oox-drawingml-fix-apply-shape-reference-crash.diff, n#593611, rodo
oox-smartart-import.diff, thorsten
@@ -3565,3 +3562,6 @@ oox-pptx-import-fix-groups-2.diff, n#619678, rodo
[ GSoC2010 ]
# Patches from GSoC 2010 students.
+
+[ OOXML ]
+oox-pptx-import-fix-placeholder-text-style.diff, n#592906, n#479834, rodo
diff --git a/patches/dev300/oox-pptx-import-fix-placeholder-text-style-1.diff b/patches/dev300/oox-pptx-import-fix-placeholder-text-style-1.diff
deleted file mode 100644
index b58c976..0000000
--- a/patches/dev300/oox-pptx-import-fix-placeholder-text-style-1.diff
+++ /dev/null
@@ -1,29 +0,0 @@
-From 8b7a6e42f9fa91ae7d6f991118609fd3d9d77187 Mon Sep 17 00:00:00 2001
-From: Jan Holesovsky <kendy at suse.cz>
-Date: Fri, 14 May 2010 17:09:35 +0200
-Subject: [PATCH 765/768] oox-pptx-import-fix-placeholder-text-style-1.diff
-
----
- oox/source/ppt/pptshape.cxx | 6 +++++-
- 1 files changed, 5 insertions(+), 1 deletions(-)
-
-diff --git oox/source/ppt/pptshape.cxx oox/source/ppt/pptshape.cxx
-index cdf0fee..f6cfc66 100644
---- oox/source/ppt/pptshape.cxx
-+++ oox/source/ppt/pptshape.cxx
-@@ -175,7 +175,11 @@ void PPTShape::addShape(
- if( mnSubType && getSubTypeIndex() && rSlidePersist.getMasterPersist().get() ) {
- oox::drawingml::ShapePtr pPlaceholder = PPTShape::findPlaceholderByIndex( getSubTypeIndex(), rSlidePersist.getMasterPersist()->getShapes()->getChildren() );
- if( pPlaceholder.get() && pPlaceholder->getTextBody() ) {
-- TextListStylePtr pNewTextListStyle (new TextListStyle());
-+ TextListStylePtr pNewTextListStyle ( new TextListStyle() );
-+
-+ pNewTextListStyle->apply( pPlaceholder->getTextBody()->getTextListStyle() );
-+ if( pPlaceholder->getMasterTextListStyle().get() )
-+ pNewTextListStyle->apply( *pPlaceholder->getMasterTextListStyle() );
-
- pNewTextListStyle->apply( pPlaceholder->getTextBody()->getTextListStyle() );
- aMasterTextListStyle = pNewTextListStyle;
---
-1.7.0.1
-
diff --git a/patches/dev300/oox-pptx-import-fix-placeholder-text-style.diff b/patches/dev300/oox-pptx-import-fix-placeholder-text-style.diff
index 54675b4..eefcb86 100644
--- a/patches/dev300/oox-pptx-import-fix-placeholder-text-style.diff
+++ b/patches/dev300/oox-pptx-import-fix-placeholder-text-style.diff
@@ -1,193 +1,169 @@
-From f73a65389e77b3de4358f709b7dbd4b2955b9d36 Mon Sep 17 00:00:00 2001
-From: Jan Holesovsky <kendy at suse.cz>
-Date: Fri, 14 May 2010 17:06:31 +0200
-Subject: [PATCH 629/768] oox-pptx-import-fix-placeholder-text-style.diff
-
----
- oox/inc/oox/ppt/pptshape.hxx | 4 ++
- oox/source/ppt/pptshape.cxx | 60 ++++++++++++++++++++++++++++++++++++
- oox/source/ppt/pptshapecontext.cxx | 59 ++---------------------------------
- 3 files changed, 68 insertions(+), 55 deletions(-)
-
-diff --git oox/inc/oox/ppt/pptshape.hxx oox/inc/oox/ppt/pptshape.hxx
-index f001e03..9586f89 100644
---- oox/inc/oox/ppt/pptshape.hxx
-+++ oox/inc/oox/ppt/pptshape.hxx
-@@ -63,6 +63,10 @@ public:
- void setReferenced( sal_Bool bReferenced ){ mbReferenced = bReferenced; };
- void setPlaceholder( oox::drawingml::ShapePtr pPlaceholder ) { mpPlaceholder = pPlaceholder; }
+diff -rup ../ooo330-m2-orig/oox/source/drawingml/shapecontext.cxx oox/source/drawingml/shapecontext.cxx
+--- ../ooo330-m2-orig/oox/source/drawingml/shapecontext.cxx 2010-07-22 13:12:44.000000000 +0200
++++ oox/source/drawingml/shapecontext.cxx 2010-09-02 17:18:22.000000000 +0200
+@@ -95,7 +95,8 @@ Reference< XFastContextHandler > ShapeCo
+ }
+ case XML_ph:
+ mpShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, XML_obj ) );
+- mpShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
++ if( xAttribs->hasAttribute( XML_idx ) )
++ mpShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
+ break;
+ // nvSpPr CT_ShapeNonVisual end
-+ static oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nMasterPlaceholder, const sal_Int32 nIdx, std::vector< oox::drawingml::ShapePtr >& rShapes );
-+ static oox::drawingml::ShapePtr findPlaceholderByIndex( const sal_Int32 nIdx, std::vector< oox::drawingml::ShapePtr >& rShapes );
-+ static oox::drawingml::ShapePtr findPlaceholder( sal_Int32 nFirstPlaceholder, sal_Int32 nSecondPlaceholder, const sal_Int32 nIdx, std::vector< oox::drawingml::ShapePtr >& rShapes );
-+
- protected:
-
- oox::drawingml::ShapePtr mpPlaceholder;
-diff --git oox/source/ppt/pptshape.cxx oox/source/ppt/pptshape.cxx
-index 0ab5769..cdf0fee 100644
---- oox/source/ppt/pptshape.cxx
-+++ oox/source/ppt/pptshape.cxx
-@@ -171,6 +171,17 @@ void PPTShape::addShape(
+diff -rup ../ooo330-m2-orig/oox/source/drawingml/shapegroupcontext.cxx oox/source/drawingml/shapegroupcontext.cxx
+--- ../ooo330-m2-orig/oox/source/drawingml/shapegroupcontext.cxx 2010-07-22 13:12:44.000000000 +0200
++++ oox/source/drawingml/shapegroupcontext.cxx 2010-09-02 17:18:28.000000000 +0200
+@@ -80,7 +80,8 @@ Reference< XFastContextHandler > ShapeGr
+ }
+ case XML_ph:
+ mpGroupShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, FastToken::DONTKNOW ) );
+- mpGroupShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
++ if( xAttribs->hasAttribute( XML_idx ) )
++ mpGroupShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
+ break;
+ // nvSpPr CT_ShapeNonVisual end
- if ( sServiceName.getLength() )
- {
-+ // use placeholder index if possible
-+ if( mnSubType && getSubTypeIndex() && rSlidePersist.getMasterPersist().get() ) {
-+ oox::drawingml::ShapePtr pPlaceholder = PPTShape::findPlaceholderByIndex( getSubTypeIndex(), rSlidePersist.getMasterPersist()->getShapes()->getChildren() );
-+ if( pPlaceholder.get() && pPlaceholder->getTextBody() ) {
-+ TextListStylePtr pNewTextListStyle (new TextListStyle());
-+
-+ pNewTextListStyle->apply( pPlaceholder->getTextBody()->getTextListStyle() );
-+ aMasterTextListStyle = pNewTextListStyle;
-+ }
-+ }
-+
- // use style from master slide for placeholders only, otherwise use slide's style, which might be the default style from presentation
- if ( !aMasterTextListStyle.get() )
- aMasterTextListStyle = ( mnSubType && rSlidePersist.getMasterPersist().get() ) ? rSlidePersist.getMasterPersist()->getOtherTextStyle() : rSlidePersist.getOtherTextStyle();
-@@ -229,4 +240,53 @@ void PPTShape::applyShapeReference( const oox::drawingml::Shape& rReferencedShap
- Shape::applyShapeReference( rReferencedShape );
- }
+diff -rup ../ooo330-m2-orig/oox/source/drawingml/textbodypropertiescontext.cxx oox/source/drawingml/textbodypropertiescontext.cxx
+--- ../ooo330-m2-orig/oox/source/drawingml/textbodypropertiescontext.cxx 2010-07-22 13:12:44.000000000 +0200
++++ oox/source/drawingml/textbodypropertiescontext.cxx 2010-09-02 12:16:09.000000000 +0200
+@@ -88,23 +88,26 @@ TextBodyPropertiesContext::TextBodyPrope
+ }
-+oox::drawingml::ShapePtr PPTShape::findPlaceholder( const sal_Int32 nMasterPlaceholder, const sal_Int32 nSubTypeIndex, std::vector< oox::drawingml::ShapePtr >& rShapes )
-+{
-+ oox::drawingml::ShapePtr aShapePtr;
-+ std::vector< oox::drawingml::ShapePtr >::reverse_iterator aRevIter( rShapes.rbegin() );
-+ while( aRevIter != rShapes.rend() )
-+ {
-+ if ( (*aRevIter)->getSubType() == nMasterPlaceholder )
+ // ST_TextAnchoringType
+- drawing::TextVerticalAdjust eVA( drawing::TextVerticalAdjust_TOP );
+- switch( xAttributes->getOptionalValueToken( XML_anchor, XML_t ) )
+- {
+- case XML_b : eVA = drawing::TextVerticalAdjust_BOTTOM; break;
+- case XML_dist :
+- case XML_just :
+- case XML_ctr : eVA = drawing::TextVerticalAdjust_CENTER; break;
+- default:
+- case XML_t : eVA = drawing::TextVerticalAdjust_TOP; break;
++ if( xAttributes->hasAttribute( XML_anchor ) ) {
++ drawing::TextVerticalAdjust eVA( drawing::TextVerticalAdjust_TOP );
++ switch( xAttributes->getOptionalValueToken( XML_anchor, XML_t ) )
+ {
-+ if ( ( nSubTypeIndex == -1 ) || ( nSubTypeIndex == (*aRevIter)->getSubTypeIndex() ) ) {
-+ aShapePtr = *aRevIter;
-+ break;
-+ }
++ case XML_b : eVA = drawing::TextVerticalAdjust_BOTTOM; break;
++ case XML_dist :
++ case XML_just :
++ case XML_ctr : eVA = drawing::TextVerticalAdjust_CENTER; break;
++ default:
++ case XML_t : eVA = drawing::TextVerticalAdjust_TOP; break;
+ }
-+ std::vector< oox::drawingml::ShapePtr >& rChildren = (*aRevIter)->getChildren();
-+ aShapePtr = findPlaceholder( nMasterPlaceholder, nSubTypeIndex, rChildren );
-+ if ( aShapePtr.get() )
-+ break;
-+ aRevIter++;
++ mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= eVA;
+ }
+- mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= eVA;
+
+ bool bAnchorCenter = aAttribs.getBool( XML_anchorCtr, false );
+- if( bAnchorCenter )
+- mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<=
+- TextHorizontalAdjust_CENTER;
+-
++ if( xAttributes->hasAttribute( XML_anchorCtr ) ) {
++ if( bAnchorCenter )
++ mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<=
++ TextHorizontalAdjust_CENTER;
+ }
-+ return aShapePtr;
-+}
-+
-+oox::drawingml::ShapePtr PPTShape::findPlaceholderByIndex( const sal_Int32 nIdx, std::vector< oox::drawingml::ShapePtr >& rShapes )
-+{
-+ oox::drawingml::ShapePtr aShapePtr;
-+ std::vector< oox::drawingml::ShapePtr >::reverse_iterator aRevIter( rShapes.rbegin() );
-+ while( aRevIter != rShapes.rend() )
-+ {
-+ if ( (*aRevIter)->getSubTypeIndex() == nIdx )
-+ {
-+ aShapePtr = *aRevIter;
-+ break;
-+ }
-+ std::vector< oox::drawingml::ShapePtr >& rChildren = (*aRevIter)->getChildren();
-+ aShapePtr = findPlaceholderByIndex( nIdx, rChildren );
-+ if ( aShapePtr.get() )
-+ break;
-+ aRevIter++;
+ // bool bCompatLineSpacing = aAttribs.getBool( XML_compatLnSpc, false );
+ // bool bForceAA = aAttribs.getBool( XML_forceAA, false );
+ // bool bFromWordArt = aAttribs.getBool( XML_fromWordArt, false );
+@@ -127,19 +130,21 @@ TextBodyPropertiesContext::TextBodyPrope
+ // bool bUpRight = aAttribs.getBool( XML_upright, 0 );
+
+ // ST_TextVerticalType
+- mrTextBodyProp.moVert = aAttribs.getToken( XML_vert );
+- bool bRtl = aAttribs.getBool( XML_rtl, false );
+- sal_Int32 tVert = mrTextBodyProp.moVert.get( XML_horz );
+- if( tVert == XML_vert || tVert == XML_eaVert || tVert == XML_vert270 || tVert == XML_mongolianVert ) {
+- mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ]
+- <<= WritingMode_TB_RL;
+- // workaround for TB_LR as using WritingMode2 doesn't work
+- if( !bAnchorCenter )
+- mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<=
+- TextHorizontalAdjust_LEFT;
+- } else
+- mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ]
+- <<= ( bRtl ? WritingMode_RL_TB : WritingMode_LR_TB );
++ if( xAttributes->hasAttribute( XML_vert ) ) {
++ mrTextBodyProp.moVert = aAttribs.getToken( XML_vert );
++ bool bRtl = aAttribs.getBool( XML_rtl, false );
++ sal_Int32 tVert = mrTextBodyProp.moVert.get( XML_horz );
++ if( tVert == XML_vert || tVert == XML_eaVert || tVert == XML_vert270 || tVert == XML_mongolianVert ) {
++ mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ]
++ <<= WritingMode_TB_RL;
++ // workaround for TB_LR as using WritingMode2 doesn't work
++ if( !bAnchorCenter )
++ mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<=
++ TextHorizontalAdjust_LEFT;
++ } else
++ mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ]
++ <<= ( bRtl ? WritingMode_RL_TB : WritingMode_LR_TB );
+ }
-+ return aShapePtr;
-+}
-+
-+// if nFirstPlaceholder can't be found, it will be searched for nSecondPlaceholder
-+oox::drawingml::ShapePtr PPTShape::findPlaceholder( sal_Int32 nFirstPlaceholder, sal_Int32 nSecondPlaceholder, const sal_Int32 nSubtypeIndex, std::vector< oox::drawingml::ShapePtr >& rShapes )
-+{
-+ oox::drawingml::ShapePtr pPlaceholder = findPlaceholder( nFirstPlaceholder, nSubtypeIndex, rShapes );
-+ return !nSecondPlaceholder || pPlaceholder.get() ? pPlaceholder : findPlaceholder( nSecondPlaceholder, nSubtypeIndex, rShapes );
-+}
-+
- } }
-diff --git oox/source/ppt/pptshapecontext.cxx oox/source/ppt/pptshapecontext.cxx
-index 5f7586b..8126c26 100644
---- oox/source/ppt/pptshapecontext.cxx
-+++ oox/source/ppt/pptshapecontext.cxx
-@@ -63,57 +63,6 @@ PPTShapeContext::PPTShapeContext( ContextHandler& rParent, const SlidePersistPtr
- {
}
--oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nMasterPlaceholder, sal_Int32 nSubTypeIndex, std::vector< oox::drawingml::ShapePtr >& rShapes )
--{
-- oox::drawingml::ShapePtr aShapePtr;
-- std::vector< oox::drawingml::ShapePtr >::reverse_iterator aRevIter( rShapes.rbegin() );
-- while( aRevIter != rShapes.rend() )
-- {
-- if ( (*aRevIter)->getSubType() == nMasterPlaceholder )
-- {
-- if ( ( nSubTypeIndex == -1 ) || ( nSubTypeIndex == (*aRevIter)->getSubTypeIndex() ) )
-- {
-- aShapePtr = *aRevIter;
-- break;
-- }
-- }
-- std::vector< oox::drawingml::ShapePtr >& rChildren = (*aRevIter)->getChildren();
-- aShapePtr = findPlaceholder( nMasterPlaceholder, nSubTypeIndex, rChildren );
-- if ( aShapePtr.get() )
-- break;
-- aRevIter++;
-- }
-- return aShapePtr;
--}
--
--oox::drawingml::ShapePtr findPlaceholderByIndex( const sal_Int32 nIdx, std::vector< oox::drawingml::ShapePtr >& rShapes )
--{
-- oox::drawingml::ShapePtr aShapePtr;
-- std::vector< oox::drawingml::ShapePtr >::reverse_iterator aRevIter( rShapes.rbegin() );
-- while( aRevIter != rShapes.rend() )
-- {
-- if ( (*aRevIter)->getSubTypeIndex() == nIdx )
-- {
-- aShapePtr = *aRevIter;
-- break;
-- }
-- std::vector< oox::drawingml::ShapePtr >& rChildren = (*aRevIter)->getChildren();
-- aShapePtr = findPlaceholderByIndex( nIdx, rChildren );
-- if ( aShapePtr.get() )
-- break;
-- aRevIter++;
-- }
-- return aShapePtr;
--}
--
--// if nFirstPlaceholder can't be found, it will be searched for nSecondPlaceholder
--oox::drawingml::ShapePtr findPlaceholder( sal_Int32 nFirstPlaceholder, sal_Int32 nSecondPlaceholder,
-- sal_Int32 nSubTypeIndex, std::vector< oox::drawingml::ShapePtr >& rShapes )
--{
-- oox::drawingml::ShapePtr pPlaceholder = findPlaceholder( nFirstPlaceholder, nSubTypeIndex, rShapes );
-- return !nSecondPlaceholder || pPlaceholder.get() ? pPlaceholder : findPlaceholder( nSecondPlaceholder, nSubTypeIndex, rShapes );
--}
--
- Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
- {
- Reference< XFastContextHandler > xRet;
-@@ -149,7 +98,7 @@ Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_In
- // TODO: use id to shape map
- SlidePersistPtr pMasterPersist( mpSlidePersistPtr->getMasterPersist() );
- if ( pMasterPersist.get() )
-- pPlaceholder = findPlaceholderByIndex( nIdx, pMasterPersist->getShapes()->getChildren() );
-+ pPlaceholder = PPTShape::findPlaceholderByIndex( nIdx, pMasterPersist->getShapes()->getChildren() );
- }
- if ( !pPlaceholder.get() && ( ( eShapeLocation == Slide ) || ( eShapeLocation == Layout ) ) )
- {
-@@ -191,13 +140,13 @@ Reference< XFastContextHandler > PPTShapeContext::createFastChildContext( sal_In
- if ( nFirstPlaceholder )
- {
- if ( eShapeLocation == Layout ) // for layout objects the referenced object can be found within the same shape tree
-- pPlaceholder = findPlaceholder( nFirstPlaceholder, nSecondPlaceholder, -1, mpSlidePersistPtr->getShapes()->getChildren() );
-+ pPlaceholder = PPTShape::findPlaceholder( nFirstPlaceholder, nSecondPlaceholder, -1, mpSlidePersistPtr->getShapes()->getChildren() );
- else if ( eShapeLocation == Slide ) // normal slide shapes have to search within the corresponding master tree for referenced objects
- {
- SlidePersistPtr pMasterPersist( mpSlidePersistPtr->getMasterPersist() );
- if ( pMasterPersist.get() )
-- pPlaceholder = findPlaceholder( nFirstPlaceholder, nSecondPlaceholder,
-- pPPTShapePtr->getSubTypeIndex(), pMasterPersist->getShapes()->getChildren() );
-+ pPlaceholder = PPTShape::findPlaceholder( nFirstPlaceholder, nSecondPlaceholder, pPPTShapePtr->getSubTypeIndex(),
-+ pMasterPersist->getShapes()->getChildren() );
- }
- }
+ // --------------------------------------------------------------------
+diff -rup ../ooo330-m2-orig/oox/source/ppt/pptgraphicshapecontext.cxx oox/source/ppt/pptgraphicshapecontext.cxx
+--- ../ooo330-m2-orig/oox/source/ppt/pptgraphicshapecontext.cxx 2010-08-24 20:25:45.000000000 +0200
++++ oox/source/ppt/pptgraphicshapecontext.cxx 2010-09-02 17:18:54.000000000 +0200
+@@ -132,7 +132,8 @@ Reference< XFastContextHandler > PPTGrap
+ OUString sIdx( xAttribs->getOptionalValue( XML_idx ) );
+ sal_Bool bHasIdx = sIdx.getLength() > 0;
+ sal_Int32 nIdx = sIdx.toInt32();
+- mpShapePtr->setSubTypeIndex( nIdx );
++ if( xAttribs->hasAttribute( XML_idx ) )
++ mpShapePtr->setSubTypeIndex( nIdx );
+
+ if ( nSubType || bHasIdx )
+ {
+diff -rup ../ooo330-m2-orig/oox/source/ppt/pptshapecontext.cxx oox/source/ppt/pptshapecontext.cxx
+--- ../ooo330-m2-orig/oox/source/ppt/pptshapecontext.cxx 2010-08-24 20:25:41.000000000 +0200
++++ oox/source/ppt/pptshapecontext.cxx 2010-09-02 17:18:37.000000000 +0200
+@@ -116,7 +116,8 @@ Reference< XFastContextHandler > PPTShap
+ {
+ sal_Int32 nSubType( xAttribs->getOptionalValueToken( XML_type, XML_obj ) );
+ mpShapePtr->setSubType( nSubType );
+- mpShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
++ if( xAttribs->hasAttribute( XML_idx ) )
++ mpShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
+ if ( nSubType )
+ {
+ PPTShape* pPPTShapePtr = dynamic_cast< PPTShape* >( mpShapePtr.get() );
+diff -rup ../ooo330-m2-orig/oox/source/ppt/pptshape.cxx oox/source/ppt/pptshape.cxx
+--- ../ooo330-m2-orig/oox/source/ppt/pptshape.cxx 2010-08-24 20:25:50.000000000 +0200
++++ oox/source/ppt/pptshape.cxx 2010-09-03 16:41:34.000000000 +0200
+@@ -170,7 +170,11 @@ void PPTShape::addShape(
}
---
-1.7.0.1
-
+ }
+
+-/*
++ OSL_TRACE("shape service: %s", rtl::OUStringToOString(sServiceName, RTL_TEXTENCODING_UTF8 ).getStr());
++
++ if( mnSubType && aMasterTextListStyle && getSubTypeIndex() != -1 )
++ aMasterTextListStyle.reset();
++
+ // use placeholder index if possible
+ if( mnSubType && getSubTypeIndex() && rSlidePersist.getMasterPersist().get() ) {
+ oox::drawingml::ShapePtr pPlaceholder = PPTShape::findPlaceholderByIndex( getSubTypeIndex(), rSlidePersist.getMasterPersist()->getShapes()->getChildren() );
+@@ -184,7 +188,7 @@ void PPTShape::addShape(
+ aMasterTextListStyle = pNewTextListStyle;
+ }
+ }
+-*/
++
+ if ( sServiceName.getLength() )
+ {
+ // use style from master slide for placeholders only, otherwise use slide's style, which might be the default style from presentation
+diff -rup ../ooo330-m2-orig/oox/source/ppt/pptshapegroupcontext.cxx oox/source/ppt/pptshapegroupcontext.cxx
+--- ../ooo330-m2-orig/oox/source/ppt/pptshapegroupcontext.cxx 2010-08-24 20:25:45.000000000 +0200
++++ oox/source/ppt/pptshapegroupcontext.cxx 2010-09-02 17:18:15.000000000 +0200
+@@ -82,7 +82,8 @@ Reference< XFastContextHandler > PPTShap
+ }
+ case NMSP_PPT|XML_ph:
+ mpGroupShapePtr->setSubType( xAttribs->getOptionalValueToken( XML_type, FastToken::DONTKNOW ) );
+- mpGroupShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
++ if( xAttribs->hasAttribute( XML_idx ) )
++ mpGroupShapePtr->setSubTypeIndex( xAttribs->getOptionalValue( XML_idx ).toInt32() );
+ break;
+ // nvSpPr CT_ShapeNonVisual end
+
commit 5e969c4f1698ea1e4286ec45856c60d0e2c92fde
Author: Radek Doulik <rodo at novell.com>
Date: Wed Aug 25 11:47:30 2010 +0200
removed commented upstreamed patch
diff --git a/patches/dev300/apply b/patches/dev300/apply
index 60b45a3..da8c1aa 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2003,8 +2003,6 @@ oox-pptx-import-fix-layout.diff, n#480223, rodo
oox-pptx-import-fix-transition-auto-advance.diff, n#480243, rodo
[ OOXML ]
-# FIXME dev300-m83 oox-pptx-import-fix-text-body-vert.diff, n#479829, rodo
-
# FIXME: 2009-08-12: Does not apply, upstream code refactored, not
# clear what to do. --tml
# oox-import-zoom-setting-with-tab-color.diff, n#494603, janneke
More information about the ooo-build-commit
mailing list