テンプレート拡張機能パッケージ 
テンプレートを配布するための拡張機能パッケージの作成方法。
ディレクトリ構造 
テンプレート用拡張機能パッケージの最小ファイル構成を示してあります。

- manifest.xml
- Paths.xcu
- groupuinames.xml
テンプレートファイル 
テンプレートファイルは OOo でテンプレートファイルとして保存して作成します。
manifest.xml 
コンフィグレーション Paths.xcu ファイルを拡張機能マネージャに処理されるように指定します。
0
1
2
3
4
| <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
<manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
manifest:full-path ="Paths.xcu"/>
</manifest:manifest>
|
Paths.xcu 
このファイルではツール - オプション - OpenOffice.org - パスのテンプレートにパスを追加するために使用します。
以下では template ディレクトリを指定しています。
0
1
2
3
4
5
6
7
8
9
10
11
12
| <?xml version='1.0' encoding='UTF-8'?>
<oor:component-data oor:package="org.openoffice.Office" oor:name="Paths"
xmlns:install="http://openoffice.org/2004/installation"
xmlns:oor="http://openoffice.org/2001/registry"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<node oor:name="Paths">
<node oor:name="Template" oor:op="fuse">
<node oor:name="InternalPaths">
<node oor:name="%origin%/template" oor:op="fuse"/>
</node>
</node>
</node>
</oor:component-data>
|
groupuinames.xml 
テンプレートをカテゴリー分けするときに利用します。
以下では temp ディレクトリを「テンプレートたち」として表示させます。
0
1
2
3
| <?xml version="1.0" encoding="UTF-8"?>
<groupuinames:template-group-list xmlns:groupuinames="http://openoffice.org/2006/groupuinames">
<groupuinames:template-group groupuinames:name="temp"
groupuinames:default-ui-name="テンプレートたち" />
</groupuinames:template-group-list>
|
カテゴリー分けする必要が無いときにはこのファイルおよびサブディレクトリは必要がありません。
カテゴリーのディレクトリ名に日本語などの文字は使わないでください。その代わりに表示名で日本語などに変換します。
また、ファイルに日本語などの文字が含まれているときには UTF-8 エンコードで保存してください。