diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2024-04-01 20:32:15 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2024-04-03 04:06:39 +0200 |
commit | db64748f1ee771da9da857f95601b9e08b577166 (patch) | |
tree | 2be5e8a13d75e287da95aa5d1b6891c34812875e /oox/source/drawingml/textbodypropertiescontext.cxx | |
parent | 6fd33d50603c2d12c0a1d88edb04c0890b6a1ef1 (diff) |
svx: read font and spacing scaling from oox, add bot as UNO prop.
- Read spacing in oox.
- Add spacing scaling as a property.
- Rename property "TextFitToSizeScale" to "TextFitToSizeFontScale"
- Add property "TextFitToSizeSpacingScale"
Change-Id: Icde575e55a3146169d86bb538a57adcf1fa228a7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165633
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'oox/source/drawingml/textbodypropertiescontext.cxx')
-rw-r--r-- | oox/source/drawingml/textbodypropertiescontext.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx index a08ae8fb9f6d..598bee8daa4e 100644 --- a/oox/source/drawingml/textbodypropertiescontext.cxx +++ b/oox/source/drawingml/textbodypropertiescontext.cxx @@ -237,8 +237,11 @@ ContextHandlerRef TextBodyPropertiesContext::onCreateContext( sal_Int32 aElement case A_TOKEN( normAutofit ): // CT_TextNormalAutofit { mrTextBodyProp.maPropertyMap.setProperty( PROP_TextFitToSize, TextFitToSizeType_AUTOFIT); - mrTextBodyProp.maPropertyMap.setProperty( PROP_TextAutoGrowHeight, false); + mrTextBodyProp.maPropertyMap.setProperty(PROP_TextAutoGrowHeight, false); mrTextBodyProp.mnFontScale = rAttribs.getInteger(XML_fontScale, 100000); + mrTextBodyProp.mnSpacingScale = rAttribs.getInteger(XML_lnSpcReduction, 100000); + mrTextBodyProp.maPropertyMap.setProperty(PROP_TextFitToSizeFontScale, double(mrTextBodyProp.mnFontScale) / 1000.0); + mrTextBodyProp.maPropertyMap.setProperty(PROP_TextFitToSizeSpacingScale, 100.0 - double(mrTextBodyProp.mnSpacingScale) / 1000.0); break; } case A_TOKEN( spAutoFit ): |