Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

OpenOffice Basic

From Wikipedia, the free encyclopedia
(Redirected fromStarOffice Basic)
Programming language
This article includes alist of references,related reading, orexternal links,but its sources remain unclear because it lacksinline citations. Please helpimprove this article byintroducing more precise citations.(December 2013) (Learn how and when to remove this message)

OpenOffice Basic (formerly known as StarOffice Basic orStarBasic orOOoBasic) is a dialect of theprogramming languageBASIC that originated with theStarOfficeoffice suite and spread throughOpenOffice.org and derivatives such asApache OpenOffice andLibreOffice (where it is known asLibreOffice Basic). The language is adomain-specific programming language which specifically serves the OpenOffice application suite.

Example

[edit]

Although OpenOffice Basic is similar to other dialects of BASIC, such asMicrosoft'sVisual Basic for Applications (VBA), theapplication programming interface (API) is very different, as the example below of amacro illustrates. While there is a much easier way to obtain the "paragraph count" document property, the example shows the fundamental methods for accessing each paragraph in a text document, sequentially.

SubParaCount'' Count number of paragraphs in a text document'DimDocAsObject,EnumAsObject,TextElAsObject,CountAsLongDoc=ThisComponent' Is this a text document?IfNotDoc.SupportsService("com.sun.star.text.TextDocument")ThenMsgBox"This macro must be run from a text document",64,"Error"ExitSubEndIfCount=0' Examine each component - paragraph or table?Enum=Doc.Text.CreateEnumerationWhileEnum.HasMoreElementsTextEl=Enum.NextElement' Is the component a paragraph?IfTextEl.SupportsService("com.sun.star.text.Paragraph")ThenCount=Count+1EndIfWend'Display resultMsgBoxCount,0,"Paragraph Count"EndSub

See also

[edit]

Further reading

[edit]
  • Steinberg, James (2012).Open Office Basic: An Introduction. CreateSpace Independent Publishing Platform.ISBN 978-1481270939.

External links

[edit]
Activederivatives
Discontinued and
merged derivatives
Technologies
Companies
Dialects of theBASIC programming language (list)
Classic
Microsoft
Texas Instruments
Hewlett-Packard
Locomotive Software
Microcomputers
Minicomputers
Time-sharing computers
Other
Extenders
Procedure-
oriented
Proprietary
Free and
open source
Withobject
extensions
Proprietary
Free and
open source
RAD
designers
Proprietary
Free and
open source
Defunct
Retrieved from "https://en.wikipedia.org/w/index.php?title=OpenOffice_Basic&oldid=1221529470"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp