ScChartsObjはOpenOffice/LibreOffice Basicマクロでチャート(グラフ)を表すオブジェクトです。
ScChartsObjのメソッド一覧を次に示す。
プロパティ | 概要 | |
---|---|---|
SbxEMPTY | queryInterface ( SbxOBJECT ) | |
SbxOBJECT | getElementType ( void ) | |
SbxBOOL | hasElements ( void ) | |
SbxEMPTY | getByName ( SbxSTRING ) | |
SbxARRAY | getElementNames ( void ) | |
SbxBOOL | hasByName ( SbxSTRING ) | チャートの有無を返す |
SbxVOID | addNewByName ( SbxSTRING, SbxOBJECT, SbxARRAY, SbxBOOL, SbxBOOL ) | チャートを追加する |
SbxVOID | removeByName ( SbxSTRING ) | チャートを削除する |
SbxOBJECT | createEnumeration ( void ) | |
SbxLONG | getCount ( void ) | |
SbxEMPTY | getByIndex ( SbxLONG ) | |
SbxSTRING | getImplementationName ( void ) | |
SbxBOOL | supportsService ( SbxSTRING ) | |
SbxARRAY | getSupportedServiceNames ( void ) | |
SbxARRAY | getTypes ( void ) | |
SbxARRAY | getImplementationId ( void ) | |
SbxOBJECT | queryAdapter ( void ) |
指定した名前のグラフ(チャート)が存在するか否かを判定する。
OpenOffice.org Basicの呼び出し形式:
指定された名前のグラフ(チャート)が存在すればTrue、存在しなければFalseが返る。
Dim oCharts As Object
oCharts = ThisComponent.Sheets.getByName("表1").Charts
' グラフが無ければ追加する
If oCharts.hasByName("CandleChart") = False Then
oCharts.addNewByName("CandleChart", Rect, RangeAddress(), True, True)
End If
新たにグラフ(チャート)を追加する。
OpenOffice.org Basicの呼び出し形式:
無し
指定した名前のグラフ(チャート)を削除する。
OpenOffice.org Basicの呼び出し形式:
無し
Dim oCharts As Object
oCharts = ThisComponent.Sheets.getByName("表1").Charts
' グラフがあれば削除する
If oCharts.hasByName("CandleChart") = True Then
oCharts.removeByName("CandleChart")
End If