Abeさん,ご返答ありがとうございます。

> HorizontalLine (水平方向)
> VerticalLine   (垂直方向)
> という2つのTableBorderのメンバー(および、対応するIsHorizontalLineValid
> およびIsVerticalLineValid)で設定できるようです。

おかげさまで,
両方のメンバにaLIneをセット,両方のメンバに関するisフラグをtrueにセットする事で,
内側にも罫線を引くことができました。

2015年11月2日 16:13 Takeshi Abe <t...@fixedpoint.jp>:
> ci5kymさん
>
> 4.3.7を使っていないので推測ですが、セル範囲内の内側の線は
> HorizontalLine (水平方向)
> VerticalLine   (垂直方向)
> という2つのTableBorderのメンバー(および、対応するIsHorizontalLineValid
> およびIsVerticalLineValid)で設定できるようです。
>
> -- Takeshi Abe
>
> On Mon, 2 Nov 2015 14:51:47 +0900, mlus <m...@39596.com> wrote:
>> LibreOffice 4.3.7を使っております,ci5kymと申します。
>>
>> UNO Java経由でcalcのドキュメント内の一定範囲のセル(A1:C5など)に格子線(外枠だけでなく中も引く)
>> を引きたいのですが,ご存知の方がおられたらご教授お願い致します。
>>
>> --- やったこと ---
>> documentの取得などは省略します。
>>     com.sun.star.beans.XPropertySet xPropSet = null;
>>     com.sun.star.table.XCellRange xCellRange = null;
>>
>>     xCellRange = xSheet.getCellRangeByName("A1:C5");
>>     xPropSet = 
>> UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class,
>> xCellRange);
>>     com.sun.star.table.BorderLine aLine = new 
>> com.sun.star.table.BorderLine();
>>     aLine.Color = 0x99CCFF;
>>     aLine.InnerLineWidth = aLine.LineDistance = 0;
>>     aLine.OuterLineWidth = 50;
>>     com.sun.star.table.TableBorder aBorder = new
>> com.sun.star.table.TableBorder();
>>     aBorder.TopLine = aBorder.BottomLine = aBorder.LeftLine =
>> aBorder.RightLine = aLine;
>>     aBorder.IsTopLineValid = aBorder.IsBottomLineValid = true;
>>     aBorder.IsLeftLineValid = aBorder.IsRightLineValid = true;
>>     xPropSet.setPropertyValue("TableBorder", aBorder);
>>
>> これだと外枠だけに引かれて,範囲の内側のセルには引かれないままです。
>> com.sun.star.container.XIndexAccess を使って Iterator で回しながら,個別セルごとに
>> com.sun.star.beans.XPropertySet経由で枠線指定すれば個別セルの周りをを引くことができるのでしょうが,
>> そこまで面倒な事をしなくても,コマンド一発ですむような便利な方法がないものかと調べたのですが,
>> 見つかりませんでした。
>>
>> もし,ご存知の方がおられたら,ご教授お願い致します。
>>
>> --
>> Unsubscribe instructions: E-mail to users+unsubscr...@ja.libreoffice.org
>> Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
>> List archive: http://listarchives.libreoffice.org/ja/users/
>> All messages sent to this list will be publicly archived and cannot be 
>> deleted

-- 
Unsubscribe instructions: E-mail to users+unsubscr...@ja.libreoffice.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/ja/users/
All messages sent to this list will be publicly archived and cannot be deleted

メールによる返信