-
-
Notifications
You must be signed in to change notification settings - Fork 85
/
staroffice-basic.scroll
54 lines (48 loc) · 1.64 KB
/
staroffice-basic.scroll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import ../code/conceptPage.scroll
id staroffice-basic
name StarOffice Basic
appeared 2000
tags pl
centralPackageRepositoryCount 0
country Germany
originCommunity Star Division
lineCommentToken '
hasLineComments true
' A comment
hasComments true
' A comment
hasSemanticIndentation false
wikipedia https://en.wikipedia.org/wiki/StarOffice_Basic
example
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
related basic vba isbn
summary OpenOffice Basic (formerly known as StarOffice Basic or StarBasic or OOoBasic) is a dialect of the programming language BASIC that originated with the StarOffice office suite and spread through OpenOffice.org and derivatives such as LibreOffice (where it is known as LibreOffice Basic). The language is a domain-specific programming language which specifically serves the OpenOffice application suite.
created 2012
backlinksCount 113
pageId 318131
revisionCount 2
dailyPageViews 5
isbndb 0