Class UnoTypeProvider


  • public class UnoTypeProvider
    extends java.lang.Object
    Class providing UNO types from a LibreOffice instance and optionally from a UNO project.
    • Method Detail

      • refreshCache

        public void refreshCache()
        Refresh the cache of Uno types.
      • contains

        public boolean contains​(java.lang.String pScopedName,
                                java.lang.String[] pContainers)
        Checks whether the list contains the given type name.
        Parameters:
        pScopedName - the type name to match
        pContainers - the UNO types containers to look in. These have to be either the path to a project RDB file or a LibreOffice name
        Returns:
        true if the list contains a type with this name
      • setProject

        public void setProject​(IUnoidlProject pProject)
        Set the UNO project for which to get the UNO types. This project's types.rdb registry will be used as external registry for the types query.
        Parameters:
        pProject - the project for which to launch the type query
      • setOOoInstance

        public void setOOoInstance​(IOOo pOOoInstance)
        Sets the OOo if the new one is different from the old one.
        Parameters:
        pOOoInstance - LibreOffice instance to bootstrap
      • getState

        public TypeProviderState getState()
        Returns:
        the status of the UNO type provider.
      • addInitListener

        public void addInitListener​(IInitListener pListener)
        Register the given listener.
        Parameters:
        pListener - the listener to add
      • removeInitListener

        public void removeInitListener​(IInitListener pListener)
        Makes the given initialization listener stop listening.
        Parameters:
        pListener - the listener to remove
      • toArray

        protected java.lang.Object[] toArray​(java.lang.String[] pContainers)
        Initializes the cache if needed and get the cached data.
        Parameters:
        pContainers - the container from which to get the types.
        Returns:
        the types list as an array.
        See Also:
        TypesGetter
      • removeAllTypes

        protected void removeAllTypes()
        Purge the types list.