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

java class not found in cf code

New Here ,
May 30, 2019 May 30, 2019

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?

335
Translate
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()>

Translate
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()>

Translate
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
LATEST

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

tanks

Translate
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