On 29/03/18 08:46, Jens Carl wrote:
On 03/27/2018 01:29 AM, Stephan Bergmann wrote:
In a rather unfortunate and confusing way,
offapi/com/sun/star/sheet/XFunctionDescriptions.idl mentions the
css.sheet.FunctionDescription old-style (see below) service
description as a source of documentation for that
sequence<css.beans.PropertyValue>. Documenting such a
sequence<css.beans.PropertyValue> with an old-style service
description (that lists only properties, no interfaces nor
super-services) is a misuse of the UNOIDL concepts. But a misuse that
goes unpunished, because it's all merely documentation.
So as a user you can guess from the documentation that the
sequence<css.beans.PropertyValue> returned by getById will have five
elements, "Id" of UNO type LONG, "Category" of UNO type LONG, etc.
And such a sequence is a "pure" value detached from the object from
which it was obtained via getById, so changing its elements wouldn't
have any effect on the original object. That's probably the reason
why the properties of that misused css.sheet.FunctionDescription are
marked as readonly. Even if it is technically nonsense, it expresses
the moral equivalent of there being no way to change the original
object's values that are obtained via getById.
So coming back to my original question: So the intended behaviour is
they're read-only and meant to "display" only some information?
css.sheet.FunctionDescription is apparently meant to be documentation
for the sequence<css.beans.PropertyValue> returned by
css.sheet.XFunctionDescription's getById.
Going forward the I see a couple options:
1. Only test the get part and ignore the set part, because there is no
value to it.
2. Drop these tests (don't convert them from Java to C++).
I'm not sure what tests exactly you're referring to. I would naively
assume that there is an existing test that obtains an instance of
ScFunctionListObj, calls getById on it, and inspects the returned sequence.
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.