오픈오피스 베이직
보이기
오픈오피스 베이직(OpenOffice Basic, 스타오피스베이직 혹은 스타오피스 or OOo베이직로 알려졌던) 은 프로그래밍 언어 베이직과 유사하다. 그 유래는 스타오피스 제품군을 통해 확산되었던 오픈오피스와 리브레오피스이다.
예[편집]
매크로 일러스트레이터와 같은 예에 따르면 비록 오픈오피스 베이직이 베이직과 유사하지만 마이크로소프트의 VBA, API와는 매우 다르다.
Sub ParaCount
'
' Count number of paragraphs in a text document
'
Dim Doc As Object, Enum As Object, TextEl As Object, Count As Long
Doc = ThisComponent
' Is this a text document?
If Not Doc.SupportsService("com.sun.star.text.TextDocument") Then
MsgBox "This macro must be run from a text document", 64, "Error"
Exit Sub
End If
Count = 0
' Examine each component - paragraph or table?
Enum = Doc.Text.CreateEnumeration
While Enum.HasMoreElements
TextEl = Enum.NextElement
' Is the component a paragraph?
If TextEl.SupportsService("com.sun.star.text.Paragraph") Then
Count = Count + 1
End If
Wend
'Display result
MsgBox Count, 0, "Paragraph Count"
End Sub
같이 보기[편집]
추가 문헌[편집]
- 슈타인버그, 제임스. 《오픈 오피스 베이직: 소개》. CreateSpace Independent Publishing Platform. ISBN 978-1481270939.
- 베이직 매크로
- 오픈 오피스 베이직 프로그래밍 가이드
- 오픈 오피스 VBA 에뮬레이션 모델 프로젝트 (여전히 어려운 개발에 사용된다)
- 엔드류 피튼왁의 매크로 정보 Archived 2016년 5월 5일 - 웨이백 머신
- 오픈오피스 API
- 리브레오피스 API