LibreOffice Module oox (master) 1
Functions
FontworkHelpers Namespace Reference

Functions

void resetPropertyValueInVec (std::vector< css::beans::PropertyValue > &rPropVec, const OUString &rName)
 Removes the property specified by rName from the rPropVec vector of properties. More...
 
void putCustomShapeIntoTextPathMode (const css::uno::Reference< css::drawing::XShape > &xShape, const oox::drawingml::CustomShapePropertiesPtr &pCustomShapePropertiesPtr, const OUString &sMSPresetType, const bool bFromWordArt)
 Changes the EnhancedCustomShapeGeometry of xShape shape so, that it becomes a LO Fontwork shape corresponding to the OOXML shape specified by sMSPresetType. More...
 
OString GetVMLFontworkShapetypeMarkup (const MSO_SPT eShapeType)
 Returns the markup for the v:shapetype element for export of a Fontwork shape to VML. More...
 
void collectCharColorProps (const css::uno::Reference< css::text::XText > &rXText, std::vector< css::beans::PropertyValue > &rCharPropVec)
 Collects the properties "CharColor", "CharLumMod", "CharLumOff", "CharColorTheme", "CharComplexColor" and "CharTransparence" from the first non-empty run in rXText and puts them into rCharPropVec. More...
 
void applyPropsToRuns (const std::vector< css::beans::PropertyValue > &rTextPropVec, css::uno::Reference< css::text::XText > &rXText)
 Applies all properties in rTextPropVec excluding "CharInteropGrabBag" to all non-empty runs in rXText. More...
 
void createCharFillPropsFromShape (const css::uno::Reference< css::beans::XPropertySet > &rXPropSet, std::vector< css::beans::PropertyValue > &rCharPropVec)
 Generates the properties "CharColor", "CharLumMod", "CharLumOff", "CharColorTheme", "CharComplexColor" and "CharTransparence" from the shape properties "FillColor", "FillColorLumMod, "FillColorLumOff", "FillColorTheme", "FillComplexColor" and "FillTransparence" and puts them into rCharPropVec. More...
 
void createCharInteropGrabBagUpdatesFromShapeProps (const css::uno::Reference< css::beans::XPropertySet > &rXPropSet, std::vector< css::beans::PropertyValue > &rUpdatePropVec)
 Creates the properties "CharTextFillTextEffect", "CharTextOutlineTextEffect", "CharThemeColor", "CharThemeColorShade" or "CharThemeColorTint", and "CharThemeOriginalColor" from the FillFoo and LineBar properties of the shape and puts them into rUpdatePropVec. More...
 
void applyUpdatesToCharInteropGrabBag (const std::vector< css::beans::PropertyValue > &rUpdatePropVec, css::uno::Reference< css::text::XText > &rXText)
 Puts all properties in rUpdatePropVec into the "CharInteropGrabBag" of all non-empty runs in rXText. More...
 
bool createPrstDashFromLineDash (const css::drawing::LineDash &rLineDash, const css::drawing::LineCap &rLineCap, OUString &rsPrstDash)
 Uses LineDash and LineCap to detect, whether the dashing comes from a prstDash in MS Office. More...
 
bool getThemeColorFromShape (const OUString &rPropertyName, const css::uno::Reference< css::beans::XPropertySet > &xPropertySet, model::ComplexColor &rComplexColor)
 Returns true if a theme color with other type than model::ThemeColorType::Unknown was found. More...
 

Function Documentation

◆ applyPropsToRuns()

void FontworkHelpers::applyPropsToRuns ( const std::vector< css::beans::PropertyValue > &  rTextPropVec,
css::uno::Reference< css::text::XText > &  rXText 
)

Applies all properties in rTextPropVec excluding "CharInteropGrabBag" to all non-empty runs in rXText.

Referenced by oox::drawingml::DrawingML::WriteText().

◆ applyUpdatesToCharInteropGrabBag()

void FontworkHelpers::applyUpdatesToCharInteropGrabBag ( const std::vector< css::beans::PropertyValue > &  rUpdatePropVec,
css::uno::Reference< css::text::XText > &  rXText 
)

Puts all properties in rUpdatePropVec into the "CharInteropGrabBag" of all non-empty runs in rXText.

Existing properties are overwritten.

Referenced by oox::drawingml::DrawingML::WriteText().

◆ collectCharColorProps()

void FontworkHelpers::collectCharColorProps ( const css::uno::Reference< css::text::XText > &  rXText,
std::vector< css::beans::PropertyValue > &  rCharPropVec 
)

Collects the properties "CharColor", "CharLumMod", "CharLumOff", "CharColorTheme", "CharComplexColor" and "CharTransparence" from the first non-empty run in rXText and puts them into rCharPropVec.

Referenced by oox::drawingml::DrawingML::WriteText().

◆ createCharFillPropsFromShape()

void FontworkHelpers::createCharFillPropsFromShape ( const css::uno::Reference< css::beans::XPropertySet > &  rXPropSet,
std::vector< css::beans::PropertyValue > &  rCharPropVec 
)

Generates the properties "CharColor", "CharLumMod", "CharLumOff", "CharColorTheme", "CharComplexColor" and "CharTransparence" from the shape properties "FillColor", "FillColorLumMod, "FillColorLumOff", "FillColorTheme", "FillComplexColor" and "FillTransparence" and puts them into rCharPropVec.

Referenced by oox::drawingml::DrawingML::WriteText().

◆ createCharInteropGrabBagUpdatesFromShapeProps()

void FontworkHelpers::createCharInteropGrabBagUpdatesFromShapeProps ( const css::uno::Reference< css::beans::XPropertySet > &  rXPropSet,
std::vector< css::beans::PropertyValue > &  rUpdatePropVec 
)

Creates the properties "CharTextFillTextEffect", "CharTextOutlineTextEffect", "CharThemeColor", "CharThemeColorShade" or "CharThemeColorTint", and "CharThemeOriginalColor" from the FillFoo and LineBar properties of the shape and puts them into rUpdatePropVec.

Referenced by oox::drawingml::DrawingML::WriteText().

◆ createPrstDashFromLineDash()

bool FontworkHelpers::createPrstDashFromLineDash ( const css::drawing::LineDash &  rLineDash,
const css::drawing::LineCap &  rLineCap,
OUString &  rsPrstDash 
)

Uses LineDash and LineCap to detect, whether the dashing comes from a prstDash in MS Office.

If prstDash is detected, the method puts the corresponding string for markup into rsPrstDash and returns true. If no prstDash is detected, the method leaves rsPrstDash unchanged and returns false.

◆ getThemeColorFromShape()

bool FontworkHelpers::getThemeColorFromShape ( const OUString &  rPropertyName,
const css::uno::Reference< css::beans::XPropertySet > &  xPropertySet,
model::ComplexColor rComplexColor 
)

Returns true if a theme color with other type than model::ThemeColorType::Unknown was found.

The theme color is then in rComplexColor. Returns false otherwise. rComplexColor is then unchanged or its type is model::ThemeColorType::Unknown

◆ GetVMLFontworkShapetypeMarkup()

OString FontworkHelpers::GetVMLFontworkShapetypeMarkup ( const MSO_SPT  eShapeType)

◆ putCustomShapeIntoTextPathMode()

void FontworkHelpers::putCustomShapeIntoTextPathMode ( const css::uno::Reference< css::drawing::XShape > &  xShape,
const oox::drawingml::CustomShapePropertiesPtr pCustomShapePropertiesPtr,
const OUString &  sMSPresetType,
const bool  bFromWordArt 
)

Changes the EnhancedCustomShapeGeometry of xShape shape so, that it becomes a LO Fontwork shape corresponding to the OOXML shape specified by sMSPresetType.

Precondition: xShape is a custom shape.

Referenced by oox::drawingml::Shape::createAndInsert(), and oox::shape::WpsContext::onEndElement().

◆ resetPropertyValueInVec()

void FontworkHelpers::resetPropertyValueInVec ( std::vector< css::beans::PropertyValue > &  rPropVec,
const OUString &  rName 
)

Removes the property specified by rName from the rPropVec vector of properties.