OpenOffice Basic: Difference between revisions

Content deleted Content added
No edit summary
Chtfn (talk | contribs)
m External links: fix LibreOffice Basic Help link
 
(33 intermediate revisions by 24 users not shown)
Line 1:
{{Short description|Programming language}}
{{Unreferencedno footnotes|date=December 2013}}
[[File:TriBasicExample.png|thumb|세가지 현대의 기본 변형들: [[Mono (software)|Mono]] Basic, OpenOffice Basic 그리고 [[Gambas]].]]
'''OpenOffice Basic''' (이전에formerly 알려진known as StarOffice Basic or ,'''StarBasic''' or '''OOoBasic''') is a dialect of the [[programming language]] [[BASIC]] that originated with the [[StarOffice]] [[Productivity software#Office suite|office suite]]에서 유래되고and spread through [[OpenOffice.org]]통해 퍼진and 그리고derivatives such as [[LibreOfficeApache OpenOffice]] 같은and 파생물인[[LibreOffice]] (where it is known as '''LibreOffice Basic'''로 알려진). The [[프로그램language 언어]]is a [[BASIC___domain-specific programming language]] which 언어이다specifically serves the OpenOffice application suite.
 
== 예시Example ==
오픈Although 오피스의OpenOffice 기본Basic 자체는is 다른similar 언어와to 유사하지만other dialects of BASIC, such as [[Microsoft]]'s [[Visual Basic for Applications|VBA]]같은 (VBA), the [[응용application 프로그램programming 인터페이스interface]] (API) is 매우very 다르다different, as the example below of a [[Macro (computer science)|macro]] 예에서illustrates. 보여주는것과While 같이.there is "paragrapha count"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.
 
<syntaxhighlight lang="oobasvbnet">
<!--oobas = openoffice basic; see [[mw:Extension:SyntaxHighlight_GeSHi#Supported_languages]] -->
<syntaxhighlight lang="oobas">
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
</syntaxhighlight>
 
== 참조See also ==
* [[Comparison of office suites]]
 
== Further 읽기reading ==
* {{Cite book|first=James|last=Steinberg|title=Open Office Basic: An Introduction|ISBNyear=2012 |isbn=978-1481270939|publisher=CreateSpace Independent Publishing Platform}}
 
== 바깥External 고리links ==
* [http://wiki.services.openoffice.org/wiki/Documentation/BASIC_Guide OpenOffice.org BASIC Programming Guide] wiki
 
* [https://help.libreoffice.org/latest/en-US/text/sbasic/shared/main0601.html LibreOffice Basic Help]
=== BASIC Macros ===
* [https://www.manfridayit.co.uk/blog/coding-vba-tips-snippets/using-vb-net-to-update-open-office-calc-spreadsheet/ Automating Open Office in VB.NET]
*[http://wiki.services.openoffice.org/wiki/Documentation/BASIC_Guide OpenOffice.org BASIC Programming Guide] wiki
*[http://wiki.services.openoffice.org/wiki/VBA OpenOffice.org VBA emulation model project] (still in heavy development)
*[http://www.pitonyak.org/oo.php Andrew Pitonyak's macro information]
 
=== OpenOffice.org API ===
*[http://api.openoffice.org/ OpenOffice.org/StarOffice API Project Page]
**[http://api.openoffice.org/SDK/index.html OpenOffice.org SDK]
**[http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide OpenOffice.org Developer's Guide]
**[http://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html API reference manual]
 
{{OpenOffice}}
Line 58 ⟶ 49:
[[Category:Articles with example BASIC code]]
[[Category:BASIC programming language family]]
<!-- Overwriting the cat of the template OpenOffice with a sort key-->
[[Category:OpenOffice|Basic]]
[[Category:LibreOffice|Basic]]