Difference between revisions of "Documentation/DevGuide/OfficeDev/Implementing a Thesaurus"
From Apache OpenOffice Wiki
< Documentation | DevGuide
m |
OOoWikiBot (Talk | contribs) m (Robot: Changing Category:Office Development) |
||
Line 46: | Line 46: | ||
{{PDL1}} | {{PDL1}} | ||
− | [[Category: Office Development]] | + | |
+ | [[Category:Documentation/Developers Guide/Office Development]] |
Revision as of 10:23, 4 June 2008
- Using Spellchecker
- Using Hyphenator
- Using Thesaurus
- Events
- Implementing a Spell Checker
- Implementing a Hyphenator
- Implementing a Thesaurus
A sample implementation of a thesaurus is found in the examples for linguistic.
The thesaurus implements the following interfaces:
- com.sun.star.linguistic2.XThesaurus
- com.sun.star.lang.XInitialization
- com.sun.star.lang.XServiceDisplayName
- com.sun.star.lang.XServiceInfo
- com.sun.star.lang.XComponent
and
- com.sun.star.lang.XTypeProvider, if you want to access your add-in interfaces from OpenOffice.org Basic, otherwise, this interface is not mandatory.
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). |