このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。

翻訳前ページへ


Language

The 解放する/自由な and Open 生産性 控訴
解放(する)d: Apache OpenOffice 4.1.15

使用者 Guide for the Office Scripting 枠組み

Contents

Pre-requisites

Before you 任命する/導入する the Scripting 枠組み, be aware of the に引き続いて:

Binding Office Scripts

The 死刑執行 of Office scripts can be bound to menu and 重要な items and also to 使用/適用 or 文書 events. These bindings can be defined 経由で a 始める,決める of 割り当てる dialogs which can be started from the 道具s/Scripting 追加する-on's menu

割り当てるing scripts to Menu and 重要な items

The dialog shown below is the 割り当てる Script to Menu dialog. This dialog is 類似の in design and 機能(する)/行事 to the 割り当てる Script to 重要な dialog and the 指示/教授/教育s below should be seen to 適用する also to the 割り当てる Script to 重要な dialog.

公式文書,認める: Unlike StarBasic it will not be possible to 体制/機構 a 重要な binding that 適用するs for the whole Office 控訴 – 重要な bindings can only be 体制/機構 for an 使用/適用 or a 文書 of that 使用/適用 type.

割り当てるing scripts to events

Other Scripting-追加する'ons Menu Items

Two other menu items are 利用できる under the 道具s/Scripting 追加する-on's submenu:

最高の,を越す

Running the example Office Scripts

There are two examples scripts 供給(する)d with the Scripting 枠組み, 最高潮の場面 and MemoryUsage. 最高潮の場面 is an 使用/適用 level script for Writer that 許すs the 使用者 to search for a word or phrase. It will 最高潮の場面 all instances in red and give a count of the number of instances.

The second example, MemoryUsage, is a script 蓄える/店d in a Calc spreadsheet that checks the 現在の memory usage in the Java 事実上の Machine and updates 独房s in the spreadsheet with the usage values. The spreadsheet also 含む/封じ込めるs a graph which will update when the 独房 values are changed.

The examples are 利用できる for both Java and BeanShell in the language directories created under <Office 取り付け・設備>/使用者/Scripts by the installer.

Running the 最高潮の場面 example

To run this example you first need to create a menu item from which you can 遂行する/発効させる the script.

Running the MemoryUsage example

The Java 見解/翻訳/版 of the MemoryUsage example is already (軍隊を)展開する,配備するd inside an Office 文書, ExampleSpreadSheet.sxc. To run the Java example, just open:

<Office 取り付け・設備>/使用者/Scripts/java/ExampleSpreadSheet.sxc.

You can then 遂行する/発効させる the MemoryUsage script by 圧力(をかける)ing CTRL+転換+M with the ExampleSpreadSheet.sxc window 焦点(を合わせる)d. You should see the memory usage values 存在 updated, and the graph should change to 反映する the new values.

Running the ExportSheetsToHTML example

To run this example you first need to create or open an 存在するing spreadsheet 文書. If you have created a new 文書 save it (eg. c:\temp\mycalcdoc.sxc)

This will have created a 重要な binding to the ExportSheetsToHTML script. 圧力(をかける)ing CONTROL + H will now save each sheet in HTML 判型 in the same directory as the 初めの 文書 (eg. c:\temp\mycalcdoc_sheet1.html, c:\temp\mycalcdoc_sheet2.html, ...)

最高の,を越す

てこ入れ/借入資本ing StarBasic 安全

As part of the 早期に Developer 解放(する) v0.2 of the Scripting 枠組み, we have 試みる/企てるd to mimic the 安全 settings for StarBasic.  The settings 許す the 使用者 to 支配(する)/統制する the 死刑執行 of 大型のs 現在の in OpenOffice.org 文書s. 設立する in  the  道具s->選択s dialog under  OpenOffice.org->安全, these  settings 許す the 使用者  to 明示する the 条件s under which it is permissable to 遂行する/発効させる 文書 based StarBasic 大型のs. The settings in this dialog now 適用する to both StarBasic 大型のs and Scripting 枠組み scripts.
A 十分な description of how these settings work can be 設立する by clicking the "Help" button in the dialog, and then clicking "OpenOffice.org", and "安全" in the left-手渡す pane of the Help dialog. The possible シナリオs associated with the 安全 settings are summarised in the (米)棚上げする/(英)提議する below.

"Run 大型の"

"確認する in the 事例/患者 of other 文書 sources"

"Show 警告 before Running"

文書 path in "Path 名簿(に載せる)/表(にあげる)"

Behaviour

Never

N/A

N/A

N/A

大型のs never run. No 警告 陳列する,発揮するd.

によれば path 名簿(に載せる)/表(にあげる)

No

No

No

大型のs never run. No 警告 陳列する,発揮するd.

によれば path 名簿(に載せる)/表(にあげる)

No

No

Yes

大型のs run. No 警告 陳列する,発揮するd.

によれば path 名簿(に載せる)/表(にあげる)

No

Yes

No

大型のs never run. No 警告 陳列する,発揮するd.

によれば path 名簿(に載せる)/表(にあげる)

No

Yes

Yes

警告 陳列する,発揮するd on 文書 負担. If "Run" button clicked 大型のs will run, さもなければ they will not.

によれば path 名簿(に載せる)/表(にあげる)

Yes

No

No

警告 with checkbox to 追加する path to path 名簿(に載せる)/表(にあげる) is 陳列する,発揮するd on 文書 負担. If "Run" button clicked 大型のs will run, さもなければ they will not. 関わりなく which button is clicked, if checkbox is ticked 文書 path is 追加するd to "Path 名簿(に載せる)/表(にあげる)".

によれば path 名簿(に載せる)/表(にあげる)

Yes

No

Yes

大型のs run. No 警告 陳列する,発揮するd.

によれば path 名簿(に載せる)/表(にあげる)

Yes

Yes

No

警告 with checkbox to 追加する path to path 名簿(に載せる)/表(にあげる) is 陳列する,発揮するd on 文書 負担. If "Run" button clicked 大型のs will run, さもなければ they will not. 関わりなく which button is clicked, if checkbox is ticked 文書 path is 追加するd to "Path 名簿(に載せる)/表(にあげる)".

によれば path 名簿(に載せる)/表(にあげる)

Yes

Yes

Yes

警告 陳列する,発揮するd on 文書 負担. If "Run" button clicked 大型のs will run, さもなければ they will not.

Always

N/A

No

N/A

大型のs run. No 警告 陳列する,発揮するd.

Always

N/A

Yes

N/A

警告 陳列する,発揮するd on 文書 負担. If "Run" button clicked 大型のs will run, さもなければ they will not.



最高の,を越す

Different behaviour in the Scripting 枠組み

The Script 安全 has one 重要な difference in behaviour to the StarBasic 安全. In the Scripting 枠組み the 安全 警告 dialogs are 陳列する,発揮するd only upon the first script invocation on a 文書 含む/封じ込めるing scripts, unlike StarBasic where the dialogs are 陳列する,発揮するd on 負担ing a 文書 含む/封じ込めるing 大型のs.
If the settings are "Always", and "Show 警告 Before Running", when 負担ing a 文書 含む/封じ込めるing 大型のs the StarBasic dialog 陳列する,発揮する is incorrect (the dialog 陳列する,発揮するd is more appropriate to the "(許可,名誉などを)与えるing To Path 名簿(に載せる)/表(にあげる)" setting). This has been logged as 問題/発行する 11822, the 直す/買収する,八百長をする for which is not in the OpenOffice.org 1.1 beta 解放(する). Under the Scripting 枠組み the 訂正する dialog is 陳列する,発揮するd.

最高の,を越す

Troubleshooting

See the 解放(する) 公式文書,認めるs page.


Last 修正するd: Tue Jul 15 16:16:07 BST 2003

Apache Software Foundation

Copyright & License | Privacy | 接触する Us | 寄付する | Thanks

Apache, OpenOffice, OpenOffice.org and the seagull logo are 登録(する)d trademarks of The Apache ソフトウェア 創立/基礎. The Apache feather logo is a trademark of The Apache ソフトウェア 創立/基礎. Other 指名するs appearing on the 場所/位置 may be trademarks of their 各々の owners.