[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - 3 commits - oox/inc oox/source
oox/inc/oox/drawingml/textbodyproperties.hxx|1 + oox/inc/oox/drawingml/textcharacterproperties.hxx |2 ++ oox/source/drawingml/textbodyproperties.cxx |4 ++-- oox/source/drawingml/textbodypropertiescontext.cxx |4 ++-- oox/source/drawingml/textcharacterproperties.cxx|3 +++ oox/source/drawingml/textcharacterpropertiescontext.cxx |4 oox/source/drawingml/transform2dcontext.cxx |3 ++- 7 files changed, 16 insertions(+), 5 deletions(-) New commits: commit e05d649cbbafe9b22176a49fc316069e89926e70 Author: Muthu Subramanian sumu...@collabora.com Date: Mon Mar 31 15:13:51 2014 +0530 n#870234: Import gradfill for text colors. Uses the first color from the gradfill list. (Which is better than plain black!) Ported from: cfc76de83e3c0a56abd30a8f3bd7c69d3500d223 Change-Id: I57a3a54a8053a8ce320acbd02940f10941165d1c diff --git a/oox/inc/oox/drawingml/textcharacterproperties.hxx b/oox/inc/oox/drawingml/textcharacterproperties.hxx index 1073fa6..35943da 100644 --- a/oox/inc/oox/drawingml/textcharacterproperties.hxx +++ b/oox/inc/oox/drawingml/textcharacterproperties.hxx @@ -24,6 +24,7 @@ #include oox/helper/propertymap.hxx #include oox/drawingml/color.hxx #include oox/drawingml/textfont.hxx +#include oox/drawingml/fillproperties.hxx namespace oox { class PropertySet; } @@ -53,6 +54,7 @@ struct TextCharacterProperties OptValue bool moItalic; OptValue bool moUnderlineLineFollowText; OptValue bool moUnderlineFillFollowText; +GradientFillProperties maGradientProps; /// Properties for gradient text colors /** Overwrites all members that are explicitly set in rSourceProps. */ voidassignUsed( const TextCharacterProperties rSourceProps ); diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index bc23204..4800630 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -60,6 +60,7 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties rSource moItalic.assignIfUsed( rSourceProps.moItalic ); moUnderlineLineFollowText.assignIfUsed( rSourceProps.moUnderlineLineFollowText ); moUnderlineFillFollowText.assignIfUsed( rSourceProps.moUnderlineFillFollowText ); +maGradientProps.assignUsed( rSourceProps.maGradientProps ); } void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const XmlFilterBase rFilter, bool bUseOptional ) const @@ -93,6 +94,8 @@ void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const XmlFil if( maCharColor.isUsed() ) rPropMap[ PROP_CharColor ] = maCharColor.getColor( rFilter.getGraphicHelper() ); +if( maGradientProps.maGradientStops.size() 0 ) +rPropMap[ PROP_CharColor ] = maGradientProps.maGradientStops.begin()-second.getColor( rFilter.getGraphicHelper() ); if( moLang.has() !moLang.get().isEmpty() ) { diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx index 13af2cd..ec37a07 100644 --- a/oox/source/drawingml/textcharacterpropertiescontext.cxx +++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx @@ -161,6 +161,10 @@ Reference XFastContextHandler TextCharacterPropertiesContext::createFastChild case A_TOKEN( hlinkMouseOver ): // CT_Hyperlink xRet.set( new HyperLinkContext( *this, xAttributes, mrTextCharacterProperties.maHyperlinkPropertyMap ) ); break; + +case A_TOKEN( gradFill ): +xRet.set( new GradientFillContext( *this, xAttributes, mrTextCharacterProperties.maGradientProps ) ); +break; } if( !xRet.is() ) xRet.set( this ); commit 193ecefaef948272695b0dd0a42a3bcc3256f631 Author: Muthu Subramanian sumu...@collabora.com Date: Mon Mar 31 15:04:31 2014 +0530 n#862510: anchorCtr controls the anchoring as well. Ported from: c17eb67460293fbe72ffa8e80cd10743df493afa Change-Id: I7b5885c3ac9ec30970bdb8b2c9318dc181dda5bd diff --git a/oox/inc/oox/drawingml/textbodyproperties.hxx b/oox/inc/oox/drawingml/textbodyproperties.hxx index f8800be..c026b4e 100644 --- a/oox/inc/oox/drawingml/textbodyproperties.hxx +++ b/oox/inc/oox/drawingml/textbodyproperties.hxx @@ -34,6 +34,7 @@ struct TextBodyProperties { PropertyMap maPropertyMap; OptValue sal_Int32moRotation; +boolmbAnchorCtr; OptValue sal_Int32moVert; boost::optional sal_Int32 moInsets[4]; boost::optional sal_Int32 moTextOffX; diff --git a/oox/source/drawingml/textbodyproperties.cxx b/oox/source/drawingml/textbodyproperties.cxx index
[Libreoffice-commits] core.git: Branch 'distro/suse/suse-4.0' - 3 commits - oox/inc oox/source
oox/inc/oox/drawingml/textcharacterproperties.hxx |1 + oox/source/drawingml/textcharacterproperties.cxx| 10 ++ oox/source/drawingml/textcharacterpropertiescontext.cxx |2 ++ oox/source/export/drawingml.cxx |8 4 files changed, 17 insertions(+), 4 deletions(-) New commits: commit c0dd1682420f0e9e18a74a0ec5fd02b029573c80 Author: Muthu Subramanian sumu...@collabora.com Date: Thu Dec 12 18:24:42 2013 +0530 n#828390: Reset charescapement. Unless the value is reset - the escapement seems to continue to the next set of textruns. diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index 4230148..c531bc1 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -129,6 +129,9 @@ void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const XmlFil if( moBaseline.has() ) { rPropMap[ PROP_CharEscapement ] = sal_Int16(moBaseline.get( 0 ) / 1000); rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(DFLT_ESC_PROP); +} else { +rPropMap[ PROP_CharEscapement ] = sal_Int16(0); +rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(100); // 100% } if( !bUseOptional || moBold.has() ) { commit 1d42520a36bb2a3131330e03e7f25d4ae5a99241 Author: Muthu Subramanian sumu...@collabora.com Date: Wed Dec 18 20:19:48 2013 +0530 Fix fdo#70220 Superscript not imported from pptx. Ported from: 840a8573c8cebe67ddd3c9fe106c7dbd789bb334 (Original Author: Thorsten) diff --git a/oox/inc/oox/drawingml/textcharacterproperties.hxx b/oox/inc/oox/drawingml/textcharacterproperties.hxx index 3dc4062..1073fa6 100644 --- a/oox/inc/oox/drawingml/textcharacterproperties.hxx +++ b/oox/inc/oox/drawingml/textcharacterproperties.hxx @@ -46,6 +46,7 @@ struct TextCharacterProperties OptValue sal_Int32 moHeight; OptValue sal_Int32 moSpacing; OptValue sal_Int32 moUnderline; +OptValue sal_Int32 moBaseline; OptValue sal_Int32 moStrikeout; OptValue sal_Int32 moCaseMap; OptValue bool moBold; diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index 0163f82..4230148 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -21,6 +21,7 @@ #include com/sun/star/lang/Locale.hpp #include com/sun/star/awt/FontSlant.hpp #include com/sun/star/awt/FontWeight.hpp +#include editeng/escapementitem.hxx #include oox/helper/helper.hxx #include oox/helper/propertyset.hxx #include oox/core/xmlfilterbase.hxx @@ -52,6 +53,7 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties rSource moHeight.assignIfUsed( rSourceProps.moHeight ); moSpacing.assignIfUsed( rSourceProps.moSpacing ); moUnderline.assignIfUsed( rSourceProps.moUnderline ); +moBaseline.assignIfUsed( rSourceProps.moBaseline ); moStrikeout.assignIfUsed( rSourceProps.moStrikeout ); moCaseMap.assignIfUsed( rSourceProps.moCaseMap ); moBold.assignIfUsed( rSourceProps.moBold ); @@ -124,6 +126,11 @@ void TextCharacterProperties::pushToPropMap( PropertyMap rPropMap, const XmlFil rPropMap[ PROP_CharStrikeout ] = GetFontStrikeout( moStrikeout.get( XML_noStrike ) ); rPropMap[ PROP_CharCaseMap ] = GetCaseMap( moCaseMap.get( XML_none ) ); +if( moBaseline.has() ) { +rPropMap[ PROP_CharEscapement ] = sal_Int16(moBaseline.get( 0 ) / 1000); +rPropMap[ PROP_CharEscapementHeight ] = sal_Int8(DFLT_ESC_PROP); +} + if( !bUseOptional || moBold.has() ) { float fWeight = moBold.get( false ) ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL; rPropMap[ PROP_CharWeight ] = fWeight; diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx index 605ebb0..2119dc6 100644 --- a/oox/source/drawingml/textcharacterpropertiescontext.cxx +++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx @@ -56,6 +56,8 @@ TextCharacterPropertiesContext::TextCharacterPropertiesContext( mrTextCharacterProperties.moUnderline = aAttribs.getToken( XML_u ); if ( aAttribs.hasAttribute( XML_strike ) ) mrTextCharacterProperties.moStrikeout = aAttribs.getToken( XML_strike ); +if ( aAttribs.hasAttribute( XML_baseline ) ) +mrTextCharacterProperties.moBaseline = aAttribs.getInteger( XML_baseline ); // mrTextCharacterProperties.moCaseMap = aAttribs.getToken( XML_cap ); if ( aAttribs.hasAttribute( XML_b ) ) commit 4d4fb2a6f8afd525bffbc465779a6bf95e5debd9 Author: Muthu Subramanian sumu...@collabora.com Date: Wed Dec 18 20:08:41 2013 +0530 n#828390: Explictly export font properties. Seems like the status is returned as default, but the font properties needs to be still