Kaydet (Commit) cf7b97d1 authored tarafından ekuiitr's avatar ekuiitr Kaydeden (comit) Jan Holesovsky

Support autoTxRot parameter in Text algorithm

Specifies how text is oriented relative to the shape, according to values:
none, upright(default) and gravity.

Change-Id: I3fcaa545965a9e2853943e4dc8215fa66576ac39
Reviewed-on: https://gerrit.libreoffice.org/55359Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
Tested-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst 0d071641
...@@ -544,8 +544,25 @@ void AlgAtom::layoutShape( const ShapePtr& rShape, ...@@ -544,8 +544,25 @@ void AlgAtom::layoutShape( const ShapePtr& rShape,
break; break;
} }
if (rShape->getRotation()) const sal_Int32 nautoTxRot = maMap.count(XML_autoTxRot) ? maMap.find(XML_autoTxRot)->second : XML_upr;
pTextBody->getTextProperties().moRotation = -rShape->getRotation();
switch(nautoTxRot)
{
case XML_upr:
{
if (rShape->getRotation())
pTextBody->getTextProperties().moRotation = -F_PI180*90*rShape->getRotation();
}
break;
case XML_grav:
{
if (rShape->getRotation()==90*F_PI180 || rShape->getRotation()==180*F_PI180)
pTextBody->getTextProperties().moRotation = 180*F_PI180;
}
break;
case XML_none:
break;
}
// text centered vertically by default // text centered vertically by default
pTextBody->getTextProperties().meVA = css::drawing::TextVerticalAdjust_CENTER; pTextBody->getTextProperties().meVA = css::drawing::TextVerticalAdjust_CENTER;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment