java class not found in cf code

New Here ,
May 30, 2019 May 30, 2019

Copy link to clipboard

Copied

J'd like to manage libreooffice api for replace text in odf.

i've done a running java cfx but when i transate to cf sintax i get an error

this is the working java/cfx code

com.sun.star.util.XReplaceable xReplaceable = null;

com.sun.star.util.XReplaceDescriptor xReplaceDescr = null;

xReplaceable = UnoRuntime.queryInterface(com.sun.star.util.XReplaceable.class, xTextDocument);

xReplaceDescr = xReplaceable.createReplaceDescriptor();

and this is the cf code

<cfset xReplaceable = CreateObject("java", "com.sun.star.util.XReplaceable")>

<cfset xReplaceableClass = xReplaceable.getClass()>

<cfset xReplaceable = UnoRuntime.queryInterface(XTextDocumentClass, xTextDocument)>

<cfset xReplaceDescr = xReplaceable.createReplaceDescriptor()>

the error is in the last line

class not found: com.sun.star.util.XReplaceable.createReplaceDescriptor

any ideas?

Views

147

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , May 30, 2019 May 30, 2019
Do you mean:<cfset xReplaceable                 = createObject("java", "com.sun.star.util.XReplaceable")><cfset xReplaceableClass        = xReplaceable.getClass()><cfset xReplaceableInterface  = UnoRuntime.queryInterface(xReplaceableClass, xTextDocument)><cfset xReplaceDescr              = xReplaceableInterface.createReplaceDescriptor()>

Likes

Translate

Translate
Adobe Community Professional ,
May 30, 2019 May 30, 2019

Copy link to clipboard

Copied

Do you mean:

<cfset xReplaceable                 = createObject("java", "com.sun.star.util.XReplaceable")>

<cfset xReplaceableClass        = xReplaceable.getClass()>

<cfset xReplaceableInterface  = UnoRuntime.queryInterface(xReplaceableClass, xTextDocument)>

<cfset xReplaceDescr              = xReplaceableInterface.createReplaceDescriptor()>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 30, 2019 May 30, 2019

Copy link to clipboard

Copied

LATEST

yes, last nigth i was so tired that i didt'see the macroscopic transale error.....

tanks

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines