• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

258

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

Community Expert , 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()>

Votes

Translate

Translate
Community Expert ,
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()>

Votes

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

Votes

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
Resources
Documentation