0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

SmartArt グラフィック レイアウトにおける layoutHeader1.xml

Last updated at Posted at 2021-05-30

最近SmartArt グラフィック レイアウトの仕様について調べているので、備忘録として残しておきます。

Microsoft Office SmartArt グラフィック レイアウト (.glox) のざっくりとした解説

  • ユーザーが作成したgloxファイルは、所定のフォルダーにコピーすれば認識される: %AppData%\Microsoft\Templates\SmartArt Graphics
  • ファイル形式: Open XML形式 (ZIPとして展開すればよいという説明を見かけますが、Officeアプリケーションでは正しく認識されないため、展開まではできてもドキュメントの作成は正しいお作法で行う必要あり。今回は割愛。)

最低限必要なファイル構造

https://docs.microsoft.com/en-us/previous-versions/office/developer/office-2007/dd439441(v=office.12) 参照

  • グラフィックレイアウトの定義: diagrams\layout1.xml
  • グラフィックレイアウトのヘッダー: diagrams\layoutHeader1.xml

今回は、簡単そうなlayoutHeader1.xmlについて紐解いていきましょう。

サンプル

難しそうな要素はなく、簡単に定義できそうです。

<?xml version="1.0" encoding="utf-8"?>
<layoutDefHdr xmlns="http://schemas.openxmlformats.org/drawingml/2006/diagram" uniqueId="任意。layout1.xmlのuniqueIdと合わせる">
  <title val="タイトル" />
  <desc val="説明" />
  <catLst>
    <cat type="list" pri="1" />
  </catLst>
</layoutDefHdr>

catは以下の種類が定義されているようです

priは表示する順番を定義しているため、Officeに既定で組み込まれているSmartArt グラフィックの数値を見ながら設定します。

  <catLst>
    <cat type="list" pri="1000" /><!-- リスト -->
    <cat type="process" pri="1000" /><!-- 手順 -->
    <cat type="cycle" pri="1000" /><!-- 循環 -->
    <cat type="hierarchy" pri="1000" /><!-- 階層構造 -->
    <cat type="relationship" pri="1000" /><!-- 集合関係 -->
    <cat type="matrix" pri="1000" /><!-- マトリックス -->
    <cat type="pyramid" pri="1000" /><!-- ピラミッド -->
    <cat type="picture" pri="1000" /><!-- 図 -->
  </catLst>

Officeに既定で組み込まれているSmartArt グラフィックの"catLst"

どのSmartArtグラフィックにどの値が設定されているかについて調べてみました。

  • *PriorityByList はcatLstの順番
  • *PriorityValue はpriの値

SmartArtグラフィック選択画面に組み込んでみました

今回はlayoutHeader1.xmlの定義のみのため、肝心な作り方については後日解説できれば。

上記リストには、Officeで定義されていないカテゴリーが記述されているようで、一部の項目はその他として表示されました。
また、一部順番が変わってしまった項目もあります。

サムネイル

  • 青: こちらで定義したglox
  • グレー: 組み込みのSmartArtグラフィック

リスト

上記のcsvによると、"カード型リスト"が400、"左右交代積み上げ六角形"が1500と順番になっていますが、組み込みと隣り合っているためほぼほぼ正確といえそうです。
1 リスト.png

手順

2 手順.png

循環

3 循環.png

階層構造

4 階層構造.png

集合関係

5 集合関係.png

マトリックス

6 マトリックス.png

ピラミッド

7 ピラミッド.png

8 図.png

その他

9 その他.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?