Difference between revisions of "Documentation/DevGuide/OfficeDev/Implementing a Thesaurus"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial author Sun Microsystems, Inc.)
 
 
(5 intermediate revisions by 3 users not shown)
Line 6: Line 6:
 
|NextPage=Documentation/DevGuide/OfficeDev/Integrating Import and Export Filters
 
|NextPage=Documentation/DevGuide/OfficeDev/Integrating Import and Export Filters
 
}}
 
}}
{{DISPLAYTITLE:Implementing a Thesaurus}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/OfficeDev/{{SUBPAGENAME}}}}
 +
{{DISPLAYTITLE:Implementing a Thesaurus}}
 
A sample implementation of a thesaurus is found in the examples for linguistic.
 
A sample implementation of a thesaurus is found in the examples for linguistic.
  
Line 24: Line 25:
  
 
Choose a different implementation name for the service and modify the  
 
Choose a different implementation name for the service and modify the  
 
+
<syntaxhighlight lang="java">
 
   public Locale[] getLocales()
 
   public Locale[] getLocales()
 
+
</syntaxhighlight>
 
and  
 
and  
 
+
<syntaxhighlight lang="java">
 
   public boolean hasLocale(...)
 
   public boolean hasLocale(...)
 
+
</syntaxhighlight>
 
functions.
 
functions.
  
 
The only function to be modified at the stated position to implement the <idl>com.sun.star.linguistic2.XThesaurus</idl> interface is  
 
The only function to be modified at the stated position to implement the <idl>com.sun.star.linguistic2.XThesaurus</idl> interface is  
 
+
<syntaxhighlight lang="java">
 
   public XMeaning[] queryMeanings(...)
 
   public XMeaning[] queryMeanings(...)
 
+
</syntaxhighlight>
 
Look in the constructor  
 
Look in the constructor  
 
+
<syntaxhighlight lang="java">
 
   public SampleThesaurus()  
 
   public SampleThesaurus()  
 
+
</syntaxhighlight>
 
to see if there are properties you do not require.
 
to see if there are properties you do not require.
  
Line 46: Line 47:
  
 
{{PDL1}}
 
{{PDL1}}
[[Category: Office Development]]
+
 
 +
[[Category:Documentation/Developer's Guide/Office Development]]

Latest revision as of 12:02, 3 January 2021



A sample implementation of a thesaurus is found in the examples for linguistic.

The thesaurus implements the following interfaces:

and

For the implementation of the thesaurus, modify the sample thesaurus by following the same procedure as for the spell checker and thesaurus:

Choose a different implementation name for the service and modify the

  public Locale[] getLocales()

and

  public boolean hasLocale(...)

functions.

The only function to be modified at the stated position to implement the com.sun.star.linguistic2.XThesaurus interface is

  public XMeaning[] queryMeanings(...)

Look in the constructor

  public SampleThesaurus()

to see if there are properties you do not require.

Registration and activation is the same as for the spell checker and hyphenator.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages