Apache OpenOffice (AOO) Bugzilla – Issue 106151
Text portion containing text field is missing interface XTextField
Last modified: 2011-02-09 10:51:57 UTC
In prior versions a text portion (XTextPortion), that contained a text field, implemented the XTextField interface, too. This interface is now missing. I'm attaching a Writer document, which reproduces the issue. It contains a single text field, a bookmark on the text field and a Basic macro (Module1.Main), which queries the interfaces on the text portions in the bookmark. On running the macro a message will be printed, whether the XTextField interface has been found. I tested this on OOo 3.01 and OOo 3.20m1.
Created attachment 65513 [details] See issue description.
Reassigned to JSK
To clarify the test case: 1. Open the attached document testXTextField.odt 2. Execute the macro testXTextField.odt->Standard->Module1->Main On OOo versions prior to 3.2 you get the message "Interface XTextField found", on 3.2 the interface isn't found and you get the corresponding message. This is a pretty major regression and potentially breaks a lot of macros and extensions that depend on this interface. It should be considered as a blocker for 3.2.
I identified another missing interface. XTextPortion is also no longer implementing XTextContent. These seemingly randomly missing interfaces are a major problem. This could break any code that expects a certain interface to exist. And it can be detected at runtime only. I have expanded the test case document to test for the XTextContent interface in a XTextPortion. An additional message 'interface XTextContent found' on OOo 3.01 and 'interface XTextContent no found' on OOo 3.2 is shown.
Created attachment 65605 [details] expanded test case
confirm & set to regression
This was changed by intent. The old behavior was undocumented and didn't make sense. Now the text portion has a property named "TextField". And this time it's also documented. :-)
closing