8000 Give the DatasheetFontName of a report of the Access 2000 format as text, as of a form by dominion525 · Pull Request #111 · dominion525/jetdb · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/jetdb/src/form2000.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ const REPORT: Table = &[
(0xE4, 0x004E, Kind::Text),
(0xE5, 0x00F0, Kind::Text),
(0xE6, 0x00DA, Kind::Text),
(0xE7, 0x00A0, Kind::Text),
(0xEA, 0x00BD, Kind::Bytes),
(0xEB, 0x00BE, Kind::Bytes),
(0xEC, 0x00BF, Kind::Bytes),
Expand Down
2 changes: 1 addition & 1 deletion docs/form-design.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Blob ヘッダー 8 バイト + フォームやレポート自体 + 並び
- 要素の種類は Access の `acControlType` で、TypeInfo の type_code の下位バイトと同じ。100 がラベル、109 がテキストボックス、123 がタブコントロール、124 がページ、152 が詳細セクション、155・156 がページヘッダー・フッター、など
- プロパティの ID は種類ごとの番号。たとえば `0xDC` は、コントロールでは名前、フォームではレコードソース。値の大きさは ID で決まる。`0x00`〜`0x2F` は値なし(既定と違う値を表すはい/いいえで、`NotDefault` として返す)、`0x30`〜`0x5F` は 1 バイト、`0x60`〜`0x7F` は 2 バイト、`0x80`〜`0xBC` は 4 バイト、`0xBD`〜`0xFC` は長さ 1 バイトとその長さのバイト(長さが `0xFF` なら 2 バイトの長さが続く)。`0x80`〜`0xBC` で実際に見たのは `0x9C`〜`0xA0` だけで、4 バイトの値が `0xA1`〜`0xBC` のどこまでかはわかっていない

jetdb は、種類ごとの表(598 組)で、プロパティに Access 2002 以降の ID を付け、値はその ID の型で返す。そのため、[prop_id マッピング](#prop_id-マッピング) の名前がそのまま付く。そのうち 409 組は、`testdata/V2000/controlPropertyTestV2000.mdb` と `propertyIdTestV2000.mdb` のフォームとレポートを、Access for Microsoft 365 で作った同じオブジェクト(`testdata/V2007/controlPropertyTestV2007.accdb` と `propertyIdTestV2007.accdb`)と突き合わせて決めた。オブジェクトをまたいだ ID の値の並びが、後の形式の ID 1 つとだけ一致するものを組にした。両方の形式で名前がわかる組 307 組は、すべて名前が一致した。さらに、その 409 組を、2000 形式のファイルそのものの SaveAsText の出力(`testdata/V2000/saveastext`。Microsoft 365 の Access がそのファイルから書き出したもので、`Version =19`)で確かめた。409 組のうちデータにある 386 組のうち、381 組は両方の形式で同じ名前の項目にある。残る 4 組は、両方の形式でいつも同じ値を持つ項目どうしにあり、データからは区別できない。名前と値の並びで指す ID が違うときは、名前に従って組にしている。四角形の BorderColor のように、それらのファイルで値がいつも GridlineColor(`0x01CF`)と同じものなど、10 組がそれに当たる。2000 形式に保存するとき、Access は DatasheetGridlinesColor12(`0x0247`)の値を、その形式にある DatasheetGridlinesColor(`0x013F`)として書く。後の形式の ID は Access for Microsoft 365 のもので、`0x01C4` より大きい ID は、それより前の Access のファイルより 1 つ大きい。残る 189 組は、その SaveAsText の出力だけで決めた。種類ごとに、ID のすべての値を持つ項目がそれ 1 つだけで、後の形式の ID は、[prop_id マッピング](#prop_id-マッピング) でその項目の名前が付いているものである。そのうち、フォームのウィンドウの位置の Right と Bottom、PrtDevMode など 18 組は、2 つの形式のファイルで値が違うため、値はその出力と突き合わせて確かめる。組の無いプロパティは、2000 形式の ID に `0x8000` を足した ID で返す。たとえばフォームの `0x8036` は、その出力で Cycle・DatasheetCellsEffect・DatasheetGridlinesBehavior・PictureType のどれもがその値を持つ。
jetdb は、種類ごとの表(599 組)で、プロパティに Access 2002 以降の ID を付け、値はその ID の型で返す。そのため、[prop_id マッピング](#prop_id-マッピング) の名前がそのまま付く。そのうち 409 組は、`testdata/V2000/controlPropertyTestV2000.mdb` と `propertyIdTestV2000.mdb` のフォームとレポートを、Access for Microsoft 365 で作った同じオブジェクト(`testdata/V2007/controlPropertyTestV2007.accdb` と `propertyIdTestV2007.accdb`)と突き合わせて決めた。オブジェクトをまたいだ ID の値の並びが、後の形式の ID 1 つとだけ一致するものを組にした。両方の形式で名前がわかる組 307 組は、すべて名前が一致した。さらに、その 409 組を、2000 形式のファイルそのものの SaveAsText の出力(`testdata/V2000/saveastext`。Microsoft 365 の Access がそのファイルから書き出したもので、`Version =19`)で確かめた。409 組のうちデータにある 386 組のうち、381 組は両方の形式で同じ名前の項目にある。残る 4 組は、両方の形式でいつも同じ値を持つ項目どうしにあり、データからは区別できない。名前と値の並びで指す ID が違うときは、名前に従って組にしている。四角形の BorderColor のように、それらのファイルで値がいつも GridlineColor(`0x01CF`)と同じものなど、10 組がそれに当たる。2000 形式に保存するとき、Access は DatasheetGridlinesColor12(`0x0247`)の値を、その形式にある DatasheetGridlinesColor(`0x013F`)として書く。後の形式の ID は Access for Microsoft 365 のもので、`0x01C4` より大きい ID は、それより前の Access のファイルより 1 つ大きい。残る 190 組は、その SaveAsText の出力だけで決めた。種類ごとに、ID のすべての値を持つ項目がそれ 1 つだけで、後の形式の ID は、[prop_id マッピング](#prop_id-マッピング) でその項目の名前が付いているものである。そのうち、フォームのウィンドウの位置の Right と Bottom、PrtDevMode など 18 組は、2 つの形式のファイルで値が違うため、値はその出力と突き合わせて確かめる。組の無いプロパティは、2000 形式の ID に `0x8000` を足した ID で返す。たとえばフォームの `0x8036` は、その出力で Cycle・DatasheetCellsEffect・DatasheetGridlinesBehavior・PictureType のどれもがその値を持つ。

## 既知の制約

Expand Down
2 changes: 1 addition & 1 deletion docs/form-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Property ID (1 byte) + value
- The type of an entry is the `acControlType` of Access, the low byte of the type codes of TypeInfo: 100 a label, 109 a text box, 123 a tab control, 124 a page, 152 the detail section, 155 and 156 the page header and footer, and so on.
- The ID of a property is numbered in each type: `0xDC` is the name of a control and the record source of a form. The ID tells the size of the value: none for `0x00`–`0x2F` (a Yes/No set to the value that is not its default, given as `NotDefault`), 1 byte for `0x30`–`0x5F`, 2 bytes for `0x60`–`0x7F`, 4 bytes for `0x80`–`0xBC`, and a length byte and that many bytes for `0xBD`–`0xFC`, the length byte `0xFF` being followed by a length of 2 bytes. Of `0x80`–`0xBC`, only `0x9C`–`0xA0` have been seen, so where the 4-byte values end in `0xA1`–`0xBC` is not known.

jetdb gives a property the ID of Access 2002 and later from a table of each type (598 pairs), and the value as that ID holds it, so that the names of [prop_id Mapping](#prop_id-mapping) apply. Of them, 409 pairs were tied by the forms and reports of `testdata/V2000/controlPropertyTestV2000.mdb` and `propertyIdTestV2000.mdb` against the same objects in `testdata/V2007/controlPropertyTestV2007.accdb` and `propertyIdTestV2007.accdb`, made in Access for Microsoft 365: the values of an ID across the objects are those of one ID of the later format and of no other. Of the pairs whose names are known in both formats, all 307 agree. Each of them was then checked against the SaveAsText output of the files of the 2000 format themselves (`testdata/V2000/saveastext`, written by Access for Microsoft 365 from those files with `Version =19`): of the 409 pairs, 381 of the 386 the data has are under the key of the same name in both formats, and the other four under keys that always hold the same values in both, which the data cannot tell apart. Where the names and the values point to different IDs, the pair follows the names: ten pairs, such as the BorderColor of a rectangle, whose values in those files are always those of GridlineColor (`0x01CF`). Saving in the 2000 format, Access writes the value of DatasheetGridlinesColor12 (`0x0247`) as DatasheetGridlinesColor (`0x013F`), the one that format has. The IDs of the later format are those of Access for Microsoft 365, one higher above `0x01C4` than in files of earlier Access. The other 189 pairs were tied by that SaveAsText output alone: the values of an ID of a type are all held by one key, and by no other, and the ID of the later format is the one [prop_id Mapping](#prop_id-mapping) names after that key. In 18 of them, such as Right and Bottom, the window position of a form, and PrtDevMode, the values differ between the files of the two formats; their values are checked against that output. A property without a pair keeps the ID of the 2000 format plus `0x8000`, such as `0x8036` of a form, whose values Cycle, DatasheetCellsEffect, DatasheetGridlinesBehavior and PictureType all hold in that output.
jetdb gives a property the ID of Access 2002 and later from a table of each type (599 pairs), and the value as that ID holds it, so that the names of [prop_id Mapping](#prop_id-mapping) apply. Of them, 409 pairs were tied by the forms and reports of `testdata/V2000/controlPropertyTestV2000.mdb` and `propertyIdTestV2000.mdb` against the same objects in `testdata/V2007/controlPropertyTestV2007.accdb` and `propertyIdTestV2007.accdb`, made in Access for Microsoft 365: the values of an ID across the objects are those of one ID of the later format and of no other. Of the pairs whose names are known in both formats, all 307 agree. Each of them was then checked against the SaveAsText output of the files of the 2000 format themselves (`testdata/V2000/saveastext`, written by Access for Microsoft 365 from those files with `Version =19`): of the 409 pairs, 381 of the 386 the data has are under the key of the same name in both formats, and the other four under keys that always hold the same values in both, which the data cannot tell apart. Where the names and the values point to different IDs, the pair follows the names: ten pairs, such as the BorderColor of a rectangle, whose values in those files are always those of GridlineColor (`0x01CF`). Saving in the 2000 format, Access writes the value of DatasheetGridlinesColor12 (`0x0247`) as DatasheetGridlinesColor (`0x013F`), the one that format has. The IDs of the later format are those of Access for Microsoft 365, one higher above `0x01C4` than in files of ea 56A5 rlier Access. The other 190 pairs were tied by that SaveAsText output alone: the values of an ID of a type are all held by one key, and by no other, and the ID of the later format is the one [prop_id Mapping](#prop_id-mapping) names after that key. In 18 of them, such as Right and Bottom, the window position of a form, and PrtDevMode, the values differ between the files of the two formats; their values are checked against that output. A property without a pair keeps the ID of the 2000 format plus `0x8000`, such as `0x8036` of a form, whose values Cycle, DatasheetCellsEffect, DatasheetGridlinesBehavior and PictureType all hold in that output.

## Known Limitations

Expand Down
Loading
0