summaryrefslogtreecommitdiff
path: root/offapi/UnoApi_offapi.mk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-10-31 13:07:31 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-10-31 13:22:06 +0100
commit1b98f38cfac2ac6caa7f178f70bcd9c5f74f16a4 (patch)
tree1b864bf96e10ba17326011026ce5851329e03fe9 /offapi/UnoApi_offapi.mk
parent074defe26f55ef05ca5bd45f292e736438654b47 (diff)
css.xml.sax.XAttributeList is broken by design
In the Java interface it was reportedly copied from, getValue can return null to indicate a missing attribute, but in UNOIDL that's not possible. The workaround that implementations of the UNOIDL interface resorted to is apparently to return an empty string (another option would have been to throw an exception). But the code in xmlsecurity appears to be written under the ill assumption that getValueByName would return null for a missing attribute. What the code as written actually did check was whether the return value is an empty string (because it picks the operator ==(OUString const &, sal_Unicode const *) overload, which happens to treat a null second argument like an empty string). Ideally, the code in xmlsecurity would have some way to tell a missing attribute from an empty one (via some extended XAttributeList2, or by iterating over all getNameByIndex, or ...). But for none of the affected attributes it seems expected that the attribute's value could be an empty string, so checking for an empty string seems to work reasonably well in practice. So keep it simple and just check for an empty string properly. Thanks to Tor for spotting that odd xmlsecurity code. Change-Id: Ib068ee98ef818683a43309ab4d7c3a4731e8deff
Diffstat (limited to 'offapi/UnoApi_offapi.mk')
0 files changed, 0 insertions, 0 deletions