Hi Regina
Am 05.12.2010 21:29, schrieb Regina Henschel:
Hi,
on the occasion of issue 54577 I have played around with fontwork
custom shapes and soon some questions arise.
The fontwork object has the property "TextFitToSize". This property
has values of type TextFitToSizeType, which is an enumeration with
values "NONE", "PROPORTIONAL", "ALLLINES", and "RESIZEATTR". I can set
ALLLINES via macro and (apart from issue 115922) via UI.
In the API [1] I find
"TextFitToSizeType TextFitToSize;
Description
With this set to true, the text inside of the Shape is stretched
to fit into the Shape."
which sounds inconsistent to me. "true" is boolean, and
TextFitToSizeType seems to work and has four values.
Then I had a look into ODF spec. There I find the attribute
"draw:fit-to-size" with type boolean. But I find nothing corresponding
to TextFitToSizeType.
Does that mean, that I cannot save this property values or should they
be saved in another way?
This is a bug in our api, the description of the api is correct, but the
property should be
of type bool. And indeed, this property is stored in ODF as
draw:fit-to-size.
When saving to ODF the enum values TextFitToSizeType_PROPORTIONAL,
TextFitToSizeType_ALLLINES and
TextFitToSizeType_RESIZEATTR are stored as draw:fit-to-size = TRUE. When
Reloading such document,
only the enum values TextFitToSizeType_NONE and
TextFitToSizeType_PROPORTIONAL are used and set.
So it is obvious that the TextFitToSize property of our API needs a
rework. I will write
an issue for this.
I see in ODF the attribute draw:text-path-scale with the values "path"
and "scale". How do they correspond to properties in OOo?
The other way round I see in OOo in the Macro IDE in
CustomShapeGeometrie "TextPath" the value "ScaleX". I think, it
belongs to the unpublished service EnhancedCustomShapeTextPath [2].
But what is the purpose of it? And how is it stored in ODF?
The draw:text-path-scale is equivalent to the ScaleX property of the
TextPath and is not
supported at the moment, there is no possibility to change this property
via UI. It has
been implemented for compatibility reasons only.
And does OOo property "TextPathMode" correspond to ODF attribute
"draw:text-path-mode" directly?
Yes, it does.
[1]
http://api.openoffice.org/docs/common/ref/com/sun/star/drawing/TextProperties.html#TextFitToSize
[2]
http://api.openoffice.org/docs/common/ref/com/sun/star/drawing/EnhancedCustomShapeTextPath.html
kind regards
Regina
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
best regards,
Sven
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]