oox/source/drawingml/textbodyproperties.cxx | 4 ---- oox/source/drawingml/textbodypropertiescontext.cxx | 3 +++ oox/source/ppt/pptshape.cxx | 17 +++++++++++++++-- oox/source/ppt/slidepersist.cxx | 2 +- 4 files changed, 19 insertions(+), 7 deletions(-)
New commits: commit b93463bcfe79a80773c622bc27ccffc54d3eb71e Author: Muthu Subramanian <sumu...@suse.com> Date: Fri Feb 10 14:52:05 2012 +0530 n744512: Fixed formatting of tables. otherStyle needs to be used to format tables. removed wrong defaultStyling. added using masterslide style info correctly. diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 17ceb30..0bd2ce4 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -308,9 +308,22 @@ void PPTShape::addShape( if ( !sServiceName.isEmpty() ) { - // 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(); + { + bool isOther = !getTextBody().get(); + TextListStylePtr aSlideStyle = isOther ? rSlidePersist.getOtherTextStyle() : rSlidePersist.getDefaultTextStyle(); + // Combine from MasterSlide details as well. + if( rSlidePersist.getMasterPersist().get() ) + { + aMasterTextListStyle = isOther ? rSlidePersist.getMasterPersist()->getOtherTextStyle() : rSlidePersist.getMasterPersist()->getDefaultTextStyle(); + if( aSlideStyle.get() ) + aMasterTextListStyle->apply( *aSlideStyle.get() ); + } + else + { + aMasterTextListStyle = aSlideStyle; + } + } if( aMasterTextListStyle.get() && getTextBody().get() ) { TextListStylePtr aCombinedTextListStyle (new TextListStyle()); diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx index 91f7734..77432ae 100644 --- a/oox/source/ppt/slidepersist.cxx +++ b/oox/source/ppt/slidepersist.cxx @@ -71,8 +71,8 @@ SlidePersist::SlidePersist( XmlFilterBase& rFilter, sal_Bool bMaster, sal_Bool b maTitleTextStylePtr->apply( *pDefaultTextStyle.get() ); maBodyTextStylePtr->apply( *pDefaultTextStyle.get() ); maNotesTextStylePtr->apply( *pDefaultTextStyle.get() ); - */ maOtherTextStylePtr->apply( *pDefaultTextStyle.get() ); + */ } #if OSL_DEBUG_LEVEL > 0 mxDebugPage = mxPage; commit 1ae7ac2a031b037174f03f170af013e0d4736424 Author: Muthu Subramanian <sumu...@suse.com> Date: Fri Feb 10 14:44:40 2012 +0530 Code review fixes. diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx index 7a74610..43acd8c 100644 --- a/oox/source/drawingml/textbodyproperties.cxx +++ b/oox/source/drawingml/textbodyproperties.cxx @@ -42,10 +42,6 @@ TextBodyProperties::TextBodyProperties() void TextBodyProperties::pushToPropMap( PropertyMap& rPropMap ) const { rPropMap.insert( maPropertyMap.begin(), maPropertyMap.end() ); - - // #160799# fake different vertical text modes by top-bottom writing mode - if( moVert.get( XML_horz ) != XML_horz ) - rPropMap[ PROP_TextWritingMode ] <<= ::com::sun::star::text::WritingMode_TB_RL; } // ============================================================================ diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index ea84306..f281c56 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -119,6 +119,7 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, 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 ) { + // #160799# fake different vertical text modes by top-bottom writing mode mrTextBodyProp.maPropertyMap[ PROP_TextWritingMode ] <<= WritingMode_TB_RL; // workaround for TB_LR as using WritingMode2 doesn't work @@ -154,6 +155,8 @@ TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler& rParent, } else if( mrTextBodyProp.moVert.get( XML_horz ) == XML_horz ) mrTextBodyProp.maPropertyMap[ PROP_TextVerticalAdjust ] <<= eVA; + else if( eVA == drawing::TextVerticalAdjust_CENTER && xAttributes->hasAttribute( XML_vert ) ) + mrTextBodyProp.maPropertyMap[ PROP_TextHorizontalAdjust ] <<= TextHorizontalAdjust_CENTER; } } _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits