Apache OpenOffice (AOO) Bugzilla – Issue 8117
xstorable.storeAsURL throws UnknownPropertyException: FilterFlags
Last modified: 2013-02-24 21:06:54 UTC
I am trying to save a document using filter 'swriter: Text (encoded)' propertyvalue[ 0 ] = new PropertyValue(); propertyvalue[ 0 ].Name = "Overwrite"; propertyvalue[ 0 ].Value = new Boolean(true); propertyvalue[ 1 ] = new PropertyValue(); propertyvalue[ 1 ].Name = "FilterName"; propertyvalue[ 1 ].Value = DocumentConverter.stringConvertType; propertyvalue[ 2 ] = new PropertyValue(); propertyvalue[ 2 ].Name = "FilterFlags"; propertyvalue[ 2 ].Value = "Unicode"; xstorable.storeAsURL( stringUrl, propertyvalue ); The call to storeAsURL throws: com.sun.star.beans.UnknownPropertyException: FilterFlags I dont know if this is bug, or am I setting FilterFlags property incorectly?
it has to be "FilterOptions" which is undocumented in OOo 1.0, but implemented. It wil be documented in OOo 1.1. But when I use it, OOo crashes in storeAsURL()
Andreas, Please can you test this with OOo1.0.2?
I've tried the following macro ... and it worked fine for an OOo1.0.2 version. But I will try it for 1.1Beta too ... Sub Main doc = thisComponent dim propertyvalue(2) as new com.sun.star.beans.PropertyValue propertyvalue( 0 ).Name = "Overwrite" propertyvalue( 0 ).Value = true propertyvalue( 1 ).Name = "FilterFlags" propertyvalue( 1 ).Value = "Unicode" propertyvalue( 2 ).Name = "FilterName" propertyvalue( 2 ).Value = "swriter: Text (encoded)" doc.storeAsURL("file:///c:/temp/t1.txt",propertyvalue()) End Sub
OK - the exception is thrown for 1.0.1 but not for 1.0.2. They was removed here, because it's not specified to do so. On the other side this property isn't supported for this API call at all. Please use "FilterOptions" instead of that. The described crash couldn't be reproduced. That's why I set it to FIXED. Please check it for the next 1.0.2 or 1.1beta version again - it's they are available.
.
AS->TM: Please verify if this problem occure in our newest OO 1.1 Beta version. Use the little basic macro above to check if an exception or crash occure. THX.
Too late for beta2, re-targeted to 1.1 RC.
Both filteroptions and filterflags work with 644_m11 so I have marked this fixed.
This task is fixed or worked in OOo 1.1 beta2.
ATR: As TM has seen this issue fixed in beta2, so I close this bug.