** [[OOobbs3/58]] [#o5a07126] -''サマリ'': Wirter / TableのautoformatのFormat値について -''環境'': Writer -''状態'': 未解決 -''状態'': 解決 -''投稿者'': [[new_OOo3]] -''投稿日'': 2011-07-10 (日) 23:08:47 *** 質問 [#mca3213c] お世話になります。 下記Codeにて、新規Writer DocumentにTableを追加しautoFormatを設定しました。 ****** [ Sample Code ] ******* Sub oWriterTable Dim oDoc Dim oTable Dim oCurs Dim oText Dim Dummy() oDoc = StarDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, Dummy()) oText = oDoc.getText() ' Create Table oTable = oDoc.createInstance("com.sun.star.text.TextTable") oTable.initialize(3, 3) ' 入力範囲設定 oCurs = oDoc.getCurrentController().getViewCursor() oText.insertTextContent(oCurs, oTable, False) ' 入力 oTable.setDataArray(Array(Array(1,2,3), Array(4,5,6), Array(7,8,9)) ' ' autoFormat oTable.autoFormat("3D") ' Display msgbox "Success" End Sub ********************************************* 上記CodeにてFormat Nameが「3D」以外の時、Formatが設定されません。(例えば「Green」に設定した時等) また、本Siteの以下のPageに 「設定ファイルが config/autotbl.fmt にあるがフォーマット不明。」 と記されておられます。 URL : http://hermione.s41.xrea.com/pukiwiki/index.php?OOoBasic%2FCalc%2FAutoFormat つきましては、下記項目についてご教示頂けます様お願いします。 [ 質問事項 ] 1) 設定Fileに「3D」と「Standard」以外の設定があるか確認する方法があれば御教示下さい。 2) 設定されていない場合、手動にてautoFormatを選択した時に表示されるFormat(例えば「Green」等)を追加する方法があればご教示下さい。 3) 設定Fileを変更する以外でOpenOffice.org BasicでautoFormatを追加する場合の例を出来ましたらご教示頂けます様お願いします。 宜しくお願いします。 *** 回答 [#i3cc0f38] - API 経由で行う方法については上記 URL に書かれています。 -- はにゃ? &new{2011-07-11 (月) 18:02:47}; - APIにてサービスをInstance化して行う場合、設定値が多い為に何とか楽に設定出来ればと思い投稿させて頂きました。地道に設定していくのが一番の早道である事を再認識しました。ご教示頂きまして本当にありがとうございます。 -- new_OOo3 &new{2011-07-11 (月) 20:38:33}; #comment *** 感想,コメント,メモ [#dc4a6bdf] #comment |