Top > Extensions > Template
*テンプレート拡張機能パッケージ [#w24c4249] テンプレートを配布するための拡張機能パッケージの作成方法。 #contents **ディレクトリ構造 [#p4dd652c] テンプレート用拡張機能パッケージの最小ファイル構成を示してあります。 &ref(template_oxt.png,nolink); -manifest.xml --ファイルの mime-type 指定 -Paths.xcu --テンプレートディレクトリ指定 -groupuinames.xml --テンプレートカテゴリ分け指定 **テンプレートファイル [#d8bc1e52] テンプレートファイルは OOo でテンプレートファイルとして保存して作成します。 **manifest.xml [#s7ba7359] コンフィグレーション Paths.xcu ファイルを拡張機能マネージャに処理されるように指定します。 #code{{ <?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 [#c73a4225] このファイルではツール - オプション - OpenOffice.org - パスのテンプレートにパスを追加するために使用します。 以下では template ディレクトリを指定しています。 #code{{ <?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 [#gac058f6] テンプレートをカテゴリー分けするときに利用します。 以下では temp ディレクトリを「テンプレートたち」として表示させます。 #code{{ <?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 エンコードで保存してください。 |