Difference between revisions of "Documentation/DevGuide/OfficeDev/Properties of a FrameLoader"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 8: Line 8:
 
}}
 
}}
 
{{DISPLAYTITLE:Properties of a FrameLoader}}
 
{{DISPLAYTITLE:Properties of a FrameLoader}}
{{PRODUCTNAME}} distinguishes asynchronous (<idl>com.sun.star.frame.FrameLoader</idl>) and synchronous (<idl>com.sun.star.frame.SynchronousFrameLoader</idl>) frame loader implementations, but the configuration does not recognize that. The interface is supported by the loader is detected at runtime , the synchronous interface being preferred. The following properties describe a loader:
+
{{PRODUCTNAME}} distinguishes asynchronous (<idl>com.sun.star.frame.FrameLoader</idl>) and synchronous (<idl>com.sun.star.frame.SynchronousFrameLoader</idl>) frame loader implementations. They are not distinguished by the configuration data but detected at runtime, synchronous loaders are preferred.
 +
 
 +
Every FrameLoader inside {{PRODUCTNAME}} is specified by the properties shown in the table below. These values are accessible at the service <idl>com.sun.star.frame.FrameLoaderFactory</idl> using the interface <idl>com.sun.star.container.XNameAccess</idl>. Write access is not available here. All types are addressed by their internal names. The property names are identical to the configuration property names.
  
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
 
{|border="1" cellpadding=4 style="border-collapse:collapse;"
Line 15: Line 17:
 
|-
 
|-
 
|<code>Name</code>  
 
|<code>Name</code>  
|string. This must be a valid UNO implementation name. It should be obvious that this field can not contain the service name, because this value must be unique. Otherwise {{PRODUCTNAME}} could not distinguish more than one registered entry, for there can be several implementations for a service name. This value is also an entry in the corresponding configuration list.  
+
|string. The internal name of the loader. This is only an API property, not a configuration property. In the configuration this is the name of the configuration node containing all the other properties. To avoid name clashes with other node names it should follow the rules outlined for [[Documentation/DevGuide/Extensions/Extension_Identifiers | extension identifiers]].  
 
|-
 
|-
 
|<code>UIName</code>  
 
|<code>UIName</code>  
|string. Displays the loader at a localized user interface. You must assign a value for a language, thus supporting CJK versions. All Unicode characters are permitted.  
+
|string. User friendly name of the type. It may be localized using the localization support of the configuration. All Unicode characters are permitted here. Currently this UI name is not used in OOo itself but it is available for e.g. extensions.
 
|-
 
|-
 
|<code>Types</code>  
 
|<code>Types</code>  
|sequence<string>. A list of type names recognized by this service You can also implement and register loader for groups of types.  
+
|sequence<string>. A list of internal type names that this service can handle.
 
|}
 
|}
 
The service <idl>com.sun.star.frame.FrameLoaderFactory</idl> makes this data available. It uses the same mechanism as the <idl>com.sun.star.document.FilterFactory</idl>, that is, an interface for data access, <idl>com.sun.star.container.XNameAccess</idl>, and another one for creation of such a FrameLoader, <idl>com.sun.star.lang.XMultiServiceFactory</idl>.
 
  
 
There are other properties than the properties described, for example, for the ContentHandler. They are not necessary for the environment of filters, or loading and saving documents, so they are not described. Additional information is found at [http://framework.openoffice.org/ http://framework.openoffice.org].
 
There are other properties than the properties described, for example, for the ContentHandler. They are not necessary for the environment of filters, or loading and saving documents, so they are not described. Additional information is found at [http://framework.openoffice.org/ http://framework.openoffice.org].

Revision as of 09:35, 1 October 2008



OpenOffice.org distinguishes asynchronous (com.sun.star.frame.FrameLoader) and synchronous (com.sun.star.frame.SynchronousFrameLoader) frame loader implementations. They are not distinguished by the configuration data but detected at runtime, synchronous loaders are preferred.

Every FrameLoader inside OpenOffice.org is specified by the properties shown in the table below. These values are accessible at the service com.sun.star.frame.FrameLoaderFactory using the interface com.sun.star.container.XNameAccess. Write access is not available here. All types are addressed by their internal names. The property names are identical to the configuration property names.

Properties of a FrameLoader
Name string. The internal name of the loader. This is only an API property, not a configuration property. In the configuration this is the name of the configuration node containing all the other properties. To avoid name clashes with other node names it should follow the rules outlined for extension identifiers.
UIName string. User friendly name of the type. It may be localized using the localization support of the configuration. All Unicode characters are permitted here. Currently this UI name is not used in OOo itself but it is available for e.g. extensions.
Types sequence<string>. A list of internal type names that this service can handle.

There are other properties than the properties described, for example, for the ContentHandler. They are not necessary for the environment of filters, or loading and saving documents, so they are not described. Additional information is found at http://framework.openoffice.org.

There is one entry in the configuration, used as a fallback if a registered item is not found, the generic FrameLoader. It is not necessary for an external developer to provide a frame loader to add support for an unknown document format to OpenOffice.org. It is enough to register a new filter component that is used by this special loader in a generic manner.

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