openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1838561 - /openoffice/trunk/main/wizards/source/gimmicks/GetTexts.xba
Date Tue, 21 Aug 2018 15:13:16 GMT
Author: mseidel
Date: Tue Aug 21 15:13:15 2018
New Revision: 1838561

Deleted whitespace, fixed typos and spelling errors


Modified: openoffice/trunk/main/wizards/source/gimmicks/GetTexts.xba
--- openoffice/trunk/main/wizards/source/gimmicks/GetTexts.xba (original)
+++ openoffice/trunk/main/wizards/source/gimmicks/GetTexts.xba Tue Aug 21 15:13:15 2018
@@ -21,12 +21,12 @@
 <script:module xmlns:script="" script:name="GetTexts"
script:language="StarBasic">Option Explicit
-&apos; Macro-Description:
-&apos; This Macro extracts the Strings out of the currently activated document und inserts
them into a logdocument
-&apos; The aim of the macro is to provide the programmer an insight into the StarOffice
-&apos; It focusses on how document-Objects are accessed.
-&apos; Therefor not only texts of the document-body are retrieved but also Texts of general
-&apos; document Objects like, Annotations, charts and general Document Information
+&apos; Description:
+&apos; This macro extracts the strings out of the currently active document and inserts
them into a log document.
+&apos; The aim of the macro is to provide the programmer an insight into the OpenOffice
+&apos; It focuses on how document objects are accessed.
+&apos; Therefore not only texts of the document body are retrieved but also texts of
+&apos; document objects like, annotations, charts and general document information.
 Public oLogDocument, oLogText, oLogCursor, oLogHeaderStyle, oLogBodyTextStyle as Object
 Public oDocument as Object
@@ -38,13 +38,13 @@ Sub Main
 Dim sDocType as String
 Dim oHyperCursor as Object
 Dim oCharStyles as Object
-    BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+	BasicLibraries.LoadLibrary(&quot;Tools&quot;)
 	On Local Error GoTo NODOCUMENT
 	oDocument = StarDesktop.ActiveFrame.Controller.Model
 	sDocType = GetDocumentType(oDocument)
 	If Err &lt;&gt; 0 Then
-		Msgbox(&quot;This macro extracts all data from the active Writer, Calc or Draw document.&quot;
&amp; chr(13) &amp;_
+		Msgbox(&quot;This macro extracts all data from the active Writer, Calc or Draw/Impress
document.&quot; &amp; chr(13) &amp;_
 			   &quot;To start this macro you have to activate a document first.&quot; , 16,
 		Exit Sub
 	End If
@@ -55,7 +55,7 @@ Dim oCharStyles as Object
 	If Not IsNull(oLogDocument) Then
 		oLogText = oLogDocument.Text
-		&apos; create and define the character styles of the Log-document
+		&apos; create and define the character styles of the log document
 		oCharStyles = oLogDocument.StyleFamilies.GetByName(&quot;CharacterStyles&quot;)
 		oLogHeaderStyle = oLogDocument.createInstance(&quot;;)
 		oCharStyles.InsertbyName(&quot;Log Header&quot;, oLogHeaderStyle)
@@ -101,7 +101,7 @@ Dim oCharStyles as Object
 End Sub
-&apos; ***********************************************Calc-Documents**************************************************
+&apos; ***********************************************Calc documents**************************************************
 Sub GetCalcStrings()
 Dim i, n as integer
@@ -114,7 +114,7 @@ Dim oSheets as Object
 	For i = 0 to osheets.Count - 1
 		oSheet = osheets.GetbyIndex(i)
 		SheetName = oSheet.Name
-		MakeLogHeadLine(&quot;Sheet No. &quot; &amp; i &amp; &quot;(&quot;
&amp; SheetName &amp; &quot;)&quot; )
+		MakeLogHeadLine(&quot;Sheet No. &quot; &amp; i &amp; &quot; (&quot;
&amp; SheetName &amp; &quot;)&quot; )
 		&apos; Check the &quot;body&quot; of the sheet
@@ -185,7 +185,7 @@ Dim n,m as integer
 End Sub
-&apos; ***********************************************Writer-Documents**************************************************
+&apos; ***********************************************Writer documents**************************************************
 Sub GetParagraphTexts(oParaObject as Object, HeadLine as String)
 Dim ParaEnum as Object
@@ -202,8 +202,8 @@ Dim oCell as Object
 	While ParaEnum.HasMoreElements
 		oPara = ParaEnum.NextElement
-		&apos; Note: The Enumeration ParaEnum lists all tables and Paragraphs.
-		&apos; Therefor we have to find out what kind of object &quot;oPara&quot; actually
+		&apos; Note: The enumeration ParaEnum lists all tables and paragraphs.
+		&apos; Therefore we have to find out what kind of object &quot;oPara&quot;
actually is
 		If oPara.supportsService(&quot;;) Then
 			&apos; &quot;oPara&quot; is a Paragraph
 			oTextPortEnum = oPara.createEnumeration
@@ -225,7 +225,6 @@ Dim oCell as Object
 End Sub
 Sub GetChartStrings(oSheet as Object, HeaderLine as String)
 Dim i as Integer
 Dim aChartObject as Object
@@ -260,7 +259,6 @@ Dim aChartDiagram as Object
 End Sub
 Sub GetFrameTexts()
 Dim i as integer
 Dim oTextFrame as object
@@ -274,8 +272,8 @@ Dim oFrameTextPort as Object
 		oTextFrame = oDocument.TextFrames.GetbyIndex(i)
-		&apos; Is the frame bound to the Page
-		If oTextFrame.AnchorType  =  Then
+		&apos; Is the frame bound to the page?
+		If oTextFrame.AnchorType = Then
 			GetParagraphTexts(oTextFrame, &quot;Text Frame Contents&quot;)
 		End If
@@ -318,7 +316,6 @@ Dim CurElement as Object
 End Sub
 Sub GetLinkedFileNames()
 Dim oDocSections as Object
 Dim LinkedFileName as String
@@ -360,7 +357,7 @@ Sub GetWriterStrings()
 End Sub
-&apos; ***********************************************Draw-Documents**************************************************
+&apos; ***********************************************Draw/Impress documents**************************************************
 Sub GetDrawPageTitles(LocObject as Object)
 Dim n as integer
@@ -369,9 +366,9 @@ Dim oPage as Object
 	For n = 0 to LocObject.Count - 1
 		oPage = LocObject.GetbyIndex(n)
-		&apos; Is the Page a DrawPage and not a MasterPage?
+		&apos; Is the page a DrawPage and not a MasterPage?
 		If oPage.supportsService(&quot;;)then
-			&apos; Get the Name of the NotesPage (only relevant for Impress-Documents)
+			&apos; Get the name of the NotesPage (only relevant for Impress documents)
 			If oDocument.supportsService(&quot;;)
 			End If
@@ -428,10 +425,10 @@ Dim oDocuProps as Object
-&apos; 	WriteStringToLogFile(oDocuProps.UserDefinedProperties.ReplyTo)
-&apos; 	WriteStringToLogFile(oDocuProps.UserDefinedProperties.Recipient)
-&apos; 	WriteStringToLogFile(oDocuProps.UserDefinedProperties.References)
-&apos; 	WriteStringToLogFile(oDocuProps.Keywords)
+	&apos; WriteStringToLogFile(oDocuProps.UserDefinedProperties.ReplyTo)
+	&apos; WriteStringToLogFile(oDocuProps.UserDefinedProperties.Recipient)
+	&apos; WriteStringToLogFile(oDocuProps.UserDefinedProperties.References)
+	&apos; WriteStringToLogFile(oDocuProps.Keywords)
 End Sub
@@ -457,7 +454,7 @@ Dim oSearchDesc as Object
 	For i = 0 to oAllHyperLinks.Count - 1
 		oFound = oAllHyperLinks(i)
 		oCrsr = oFound.Text.createTextCursorByRange(oFound)
-		WriteStringToLogFile(oCrs.HyperLinkURL)   	&apos;Url
+		WriteStringToLogFile(oCrs.HyperLinkURL) 	&apos;Url
 		WriteStringToLogFile(oCrs.HyperLinkTarget)	&apos;Name
 		WriteStringToLogFile(oCrs.HyperLinkName)	&apos;Frame
 	Next i
@@ -520,14 +517,14 @@ Dim i as integer
 	End If
 End Sub
-&apos; ***********************************************LogDocument**************************************************
+&apos; ***********************************************Log document**************************************************
 Sub WriteStringtoLogFile( sString as String)
 	If (Not FieldInArray(LogArray(),LogIndex,sString))AND (NOT ISNULL(sString)) Then
 		LogArray(LogIndex) = sString
 		LogIndex = LogIndex + 1
-   		oLogText.insertControlCharacter(oLogCursor,,False)
+		oLogText.insertControlCharacter(oLogCursor,,False)
 	End If
 End Sub

View raw message