diff options
author | Muthu Subramanian <sumuthu@collabora.com> | 2013-12-18 20:19:48 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-01-03 11:24:48 +0100 |
commit | cd793642b76d69155e581f3d7df049c08a4195ee (patch) | |
tree | cc48079b031d39bc00fbc8b071fcb5f640f1777c | |
parent | 3ab5537b23061e2e42b3afb56c403a72ae8524b8 (diff) |
Fix fdo#70220 Superscript not imported from pptx.
Ported from: 840a8573c8cebe67ddd3c9fe106c7dbd789bb334
(Original Author: Thorsten)
-rw-r--r-- | oox/inc/oox/drawingml/textcharacterproperties.hxx | 1 | ||||
-rw-r--r-- | oox/source/drawingml/textcharacterproperties.cxx | 7 | ||||
-rw-r--r-- | oox/source/drawingml/textcharacterpropertiescontext.cxx | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/oox/inc/oox/drawingml/textcharacterproperties.hxx b/oox/inc/oox/drawingml/textcharacterproperties.hxx index 3dc40621695a..1073fa65bc4f 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 0163f82c28dd..4230148477a5 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 605ebb0fe4e0..2119dc6a8661 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 ) ) |