diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-03-10 14:19:26 +0100 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2014-03-10 17:12:26 +0100 |
commit | 1959431528686bd1b73b73c2664c8c161c2194f5 (patch) | |
tree | 473d2d2ffd434041245b15e4776d212250fafafb /oox/source/drawingml/textcharacterproperties.cxx | |
parent | d665e63be3e4dfad44b178ee90ad83f9408fd43c (diff) |
oox: handle all w14 text effects at groupshape import
When dealing with groupshapes, the responsibility to process the
w14 text effects elements is in oox. This commit adds the code
to handle all elements and its children elements and attributes and
puts the values into a CharInteropGrabBag.
Change-Id: Iafb8759bd60e0ee831296dc2d9159f4311ad5403
Diffstat (limited to 'oox/source/drawingml/textcharacterproperties.cxx')
-rw-r--r-- | oox/source/drawingml/textcharacterproperties.cxx | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/oox/source/drawingml/textcharacterproperties.cxx b/oox/source/drawingml/textcharacterproperties.cxx index 7f2e3a7fc964..bb7b227c91f0 100644 --- a/oox/source/drawingml/textcharacterproperties.cxx +++ b/oox/source/drawingml/textcharacterproperties.cxx @@ -63,6 +63,8 @@ void TextCharacterProperties::assignUsed( const TextCharacterProperties& rSource moItalic.assignIfUsed( rSourceProps.moItalic ); moUnderlineLineFollowText.assignIfUsed( rSourceProps.moUnderlineLineFollowText ); moUnderlineFillFollowText.assignIfUsed( rSourceProps.moUnderlineFillFollowText ); + + maTextEffectsProperties = rSourceProps.maTextEffectsProperties; } void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFilterBase& rFilter, bool bUseOptional ) const @@ -159,11 +161,30 @@ void TextCharacterProperties::pushToPropMap( PropertyMap& rPropMap, const XmlFil } } - void TextCharacterProperties::pushToPropSet( PropertySet& rPropSet, const XmlFilterBase& rFilter, bool bUseOptional ) const +void pushToGrabBag( PropertySet& rPropSet, const std::vector<PropertyValue>& aVectorOfProperyValues ) +{ + Sequence<PropertyValue> aGrabBag; + Any aAnyGrabBag = rPropSet.getAnyProperty(PROP_CharInteropGrabBag); + aAnyGrabBag >>= aGrabBag; + + sal_Int32 nLength = aGrabBag.getLength(); + aGrabBag.realloc(nLength + aVectorOfProperyValues.size()); + + for (size_t i = 0; i < aVectorOfProperyValues.size(); i++) + { + PropertyValue aPropertyValue = aVectorOfProperyValues[i]; + aGrabBag[nLength + i] = aPropertyValue; + } + + rPropSet.setAnyProperty(PROP_CharInteropGrabBag, makeAny(aGrabBag)); +} + +void TextCharacterProperties::pushToPropSet( PropertySet& rPropSet, const XmlFilterBase& rFilter, bool bUseOptional ) const { PropertyMap aPropMap; pushToPropMap( aPropMap, rFilter, bUseOptional ); rPropSet.setProperties( aPropMap ); + pushToGrabBag(rPropSet, maTextEffectsProperties); } float TextCharacterProperties::getCharHeightPoints( float fDefault ) const |