On 07/08/2015 17:32, Miklos Vajna wrote:
Hi,
On Fri, Aug 07, 2015 at 04:52:36PM +0800, "Matthew J. Francis" <mjay.francis@gmail.com> wrote:
How specifically should that be changed, though. In this case, merely
changing the declared type to short would leave it such that its value
is defined by the set of integer values of an enum, which is still
annoying in terms of manipulation using PyUNO and peculiar in terms of
the IDL.
If the documentation says that this is a short, exact possible values
are defined here and there, I don't see that worse than the current
situation. :-)
It's not worse, but also not by itself a solution for an important part
of the problem, which is that you currently can't compare a value from
this property with anything in PyUNO - only assign blindly to the
property (unless you go to the trouble of defining your own constants
from reading the IDL)
If there's a constant group, since a recent change you can
import something.Group
then
if obj.SomeProperty == Group.VALUE: ...
If there isn't, I'll have to also do something similar to make Enums
aware of their value set (which may be a good idea anyway), and make
them int-comparable as mentioned previously (which is ickier, Python
avoids doing this in its more recently added native Enum class - you
have to explicitly use an IntEnum for that).
[...]
In case all other ParaAdjust implementations (I'm sure at least editeng
has one) also deal with a sal_Int16 in fact, then just changing
'[property] com::sun::star::style::ParagraphAdjust ParaAdjust;' to
'[property] short ParaAdjust;' in the IDL file (and using a comment to
still refer to the enumeration informally) would make sense, I think.
Even if the in-build check complains that this is nominally an
incompatible change.
Unfortunately it looks like this may not be the case.
chart2/source/model/main/Title.cxx /
offapi/com/sun/star/chart2/Title.idl look suspicious for one. If
different implementations of the ParagraphProperties service disagree
about the real type, then I don't see a way to make everything
consistent compatibly.
Regards
Matthew Francis
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.