diff options
author | Behrend Cornelius <bc@openoffice.org> | 2001-10-08 08:52:01 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2001-10-08 08:52:01 +0000 |
commit | b1bf36532e74eb1498bd2fe906c4be34de051e56 (patch) | |
tree | 882187074581268bbd05def03a51c3e765144ad0 /wizards/source/gimmicks | |
parent | 02c04d0f25cb20aecb08b008732dbf13600e8549 (diff) |
#92590# english Texts of macros now improved
Diffstat (limited to 'wizards/source/gimmicks')
-rw-r--r-- | wizards/source/gimmicks/AutoText.xba | 13 | ||||
-rw-r--r-- | wizards/source/gimmicks/ChangeAllChars.xba | 8 | ||||
-rw-r--r-- | wizards/source/gimmicks/GetTexts.xba | 40 | ||||
-rw-r--r-- | wizards/source/gimmicks/ReadDir.xba | 4 | ||||
-rw-r--r-- | wizards/source/gimmicks/UserfieldDlg.xdl | 14 | ||||
-rw-r--r-- | wizards/source/gimmicks/Userfields.xba | 65 |
6 files changed, 41 insertions, 103 deletions
diff --git a/wizards/source/gimmicks/AutoText.xba b/wizards/source/gimmicks/AutoText.xba index a8ce044ebd9f..a9534b5c531f 100644 --- a/wizards/source/gimmicks/AutoText.xba +++ b/wizards/source/gimmicks/AutoText.xba @@ -20,15 +20,8 @@ Dim oContentStyle as Object Dim oHeaderStyle as Object Dim oGroupTitleStyle as Object Dim n, m, iAutoCount as Integer -Dim oLocale as New com.sun.star.lang.Locale BasicLibraries.LoadLibrary("Tools") - oLocale = GetStarOfficeLocale() - strHeading1 = "Überschrift 1" - strGroup = "Bereich:" - strBlockName = "Name des Bausteins" - strBlockShortName = "Kürzel" - strColumnWidth = "13cm" - sDocumentTitle = "Installierte Autotextbausteine" + sDocumentTitle = "Installed AutoTexts" ' Open a new empty document oDocument = StarDesktop.LoadComponentFromURL("private:factory/swriter","_blank",0,NoArgs) @@ -74,8 +67,8 @@ Dim oLocale as New com.sun.star.lang.Locale ' oTable.KeepTogether = False oTable.RepeatHeadLine = True oAutoTextCursor.Text.InsertTextContent(oAutoTextCursor,oTable,False) - InsertStringToCell("AutoText-Title",oTable.GetCellbyPosition(0,0), "AutoTextHeading") - InsertStringToCell("AutoText-Name",oTable.GetCellbyPosition(1,0), "AutoTextHeading") + InsertStringToCell("AutoText Name",oTable.GetCellbyPosition(0,0), "AutoTextHeading") + InsertStringToCell("AutoText Shortcut",oTable.GetCellbyPosition(1,0), "AutoTextHeading") ' Insert one row at the bottom of the table oRows = oTable.Rows iAutoCount = oAutoGroup.Count diff --git a/wizards/source/gimmicks/ChangeAllChars.xba b/wizards/source/gimmicks/ChangeAllChars.xba index 544e3778860a..aa0abaa1cca8 100644 --- a/wizards/source/gimmicks/ChangeAllChars.xba +++ b/wizards/source/gimmicks/ChangeAllChars.xba @@ -16,15 +16,15 @@ Const MBYES = 6 Const MBABORT = 2 Const MBNO = 7 BasicLibraries.LoadLibrary("Tools") - MSGBOXTITLE = "Change all characters to a '" & UPPERREPLACECHAR & "'" - NOTSAVEDTEXT = "This Document is modified: All characters are changed to an " & UPPERREPLACECHAR & "'. Shall the document be saved now?" + MSGBOXTITLE = "Change All Characters to an '" & UPPERREPLACECHAR & "'" + NOTSAVEDTEXT = "This document has already been modified: All characters will be changed to an " & UPPERREPLACECHAR & "'. Should the document be saved now?" WARNING = "This macro changes all characters and numbers to an '" & UPPERREPLACECHAR & "' in this document." On Local Error GoTo NODOCUMENT oDocument = StarDesktop.ActiveFrame.Controller.Model NODOCUMENT: If Err <> 0 Then - Msgbox("This Macro extracts all Data of a displayed Writer-Document." & chr(13) & "Activate a Writer-Document!" , 16, GetProductName()) + Msgbox(WARNING & chr(13) & "First, activate a Writer document." , 16, GetProductName()) Exit Sub End If On Local Error Goto 0 @@ -51,7 +51,7 @@ Const MBNO = 7 ReplaceAllStrings(oDocument) Case Else - Msgbox("This Macro only works with Writer-Documents!", 16, GetProductName()) + Msgbox("This macro only works with Writer documents.", 16, GetProductName()) End Select End Sub diff --git a/wizards/source/gimmicks/GetTexts.xba b/wizards/source/gimmicks/GetTexts.xba index 24337735aa23..2e7d49649bcb 100644 --- a/wizards/source/gimmicks/GetTexts.xba +++ b/wizards/source/gimmicks/GetTexts.xba @@ -33,8 +33,8 @@ Dim oCharStyles as Object sDocType = GetDocumentType(oDocument) NODOCUMENT: If Err <> 0 Then - Msgbox("This Macro extracts all Data of the displayed Writer-, Calc or Draw-Documents." & chr(13) &_ - "To start this macro you have to activate a Document first!" , 16, GetProductName) + Msgbox("This macro extracts all data from the active Writer, Calc or Draw document." & chr(13) &_ + "To start this macro you have to activate a document first." , 16, GetProductName) Exit Sub End If On Local Error Goto 0 @@ -46,11 +46,11 @@ Dim oCharStyles as Object ' create and define the character styles of the Log-document oCharStyles = oLogDocument.StyleFamilies.GetByName("CharacterStyles") oLogHeaderStyle = oLogDocument.createInstance("com.sun.star.style.CharacterStyle") - oCharStyles.InsertbyName("LogHeaderText", oLogHeaderStyle) + oCharStyles.InsertbyName("Log Header", oLogHeaderStyle) oLogHeaderStyle.charWeight = com.sun.star.awt.FontWeight.BOLD oLogBodyTextStyle = oLogDocument.createInstance("com.sun.star.style.CharacterStyle") - oCharStyles.InsertbyName("LogBodyText", oLogBodyTextStyle) + oCharStyles.InsertbyName("Log Body", oLogBodyTextStyle) ' Insert the title of the activated document as a hyperlink oHyperCursor = oLogText.createTextCursor() @@ -83,7 +83,7 @@ Dim oCharStyles as Object Case "sdraw" GetDrawStrings() Case Else - Msgbox("This Macro only works with Writer-, Calc or Draw/Impress-Documents!", 16, GetProductName()) + Msgbox("This macro only works with a Writer, Calc or Draw/Impress document.", 16, GetProductName()) End Select End Sub @@ -102,21 +102,21 @@ Dim oSheets as Object For i = 0 to osheets.Count - 1 oSheet = osheets.GetbyIndex(i) SheetName = oSheet.Name - MakeLogHeadLine("Sheet No " & i & "(" & SheetName & ")" ) + MakeLogHeadLine("Sheet No. " & i & "(" & SheetName & ")" ) ' Check the "body" of the sheet GetCellTexts(oSheet) If oSheet.IsScenario then - MakeLogHeadLine("Scenario-Comments of " & SheetName & "'") + MakeLogHeadLine("Scenario Comments from " & SheetName & "'") WriteStringtoLogFile(osheet.ScenarioComment) End if - GetAnnotations(oSheet, "Annotations of '" & SheetName & "'") + GetAnnotations(oSheet, "Annotations from '" & SheetName & "'") - GetChartStrings(oSheet, "Charts of '" & SheetName & "'") + GetChartStrings(oSheet, "Charts from '" & SheetName & "'") - GetControlStrings(oSheet.DrawPage, "Controls of '" & SheetName & "'") + GetControlStrings(oSheet.DrawPage, "Controls from '" & SheetName & "'") Next ' Pictures @@ -164,7 +164,7 @@ End Sub Sub GetCalcGraphicNames() Dim n,m as integer - MakeLogHeadLine("Pictures") + MakeLogHeadLine("Graphics") For n = 0 To oDocument.Drawpages.count-1 For m = 0 To oDocument.Drawpages.GetbyIndex(n).Count - 1 WriteStringtoLogFile(oDocument.DrawPages.GetbyIndex(n).GetbyIndex(m).Text.String) @@ -264,7 +264,7 @@ Dim oFrameTextPort as Object ' Is the frame bound to the Page If oTextFrame.AnchorType = com.sun.star.text.TextContentAnchorType.AT_PAGE Then - GetParagraphTexts(oTextFrame, "Textframe Content") + GetParagraphTexts(oTextFrame, "Text Frame Contents") End If oFrameEnum = oTextFrame.CreateEnumeration @@ -290,7 +290,7 @@ Sub GetTextFieldStrings() Dim aTextField as Object Dim i as integer Dim CurElement as Object - MakeLogHeadLine("TextFields") + MakeLogHeadLine("Text Fields") aTextfield = oDocument.getTextfields.CreateEnumeration While aTextField.hasmoreElements CurElement = aTextField.NextElement @@ -312,7 +312,7 @@ Dim oDocSections as Object Dim LinkedFileName as String Dim i as Integer If Right(oDocument.URL,3) = "sgl" Then - MakeLogHeadLine("Sub Documents") + MakeLogHeadLine("Sub-documents") oDocSections = oDocument.TextSections For i = 0 to oDocSections.Count - 1 LinkedFileName = oDocSections.GetbyIndex(i).FileLink.FileURL @@ -410,7 +410,7 @@ End Sub Sub GetDocumentInfo() Dim oDocuInfo as Object - MakeLogHeadLine("Document Info") + MakeLogHeadLine("Document Properties") oDocuInfo = oDocument.DocumentInfo WriteStringToLogFile(oDocuInfo.Title) WriteStringToLogFile(oDocuInfo.Description) @@ -430,7 +430,7 @@ Dim oAllHyperLinks as Object Dim SrchAttributes(0) as new com.sun.star.beans.PropertyValue Dim oSearchDesc as Object - MakeLogHeadLine("HyperLinks") + MakeLogHeadLine("Hyperlinks") ' create a Search-Descriptor oSearchDesc = oDocument.CreateSearchDescriptor oSearchDesc.Valuesearch = False @@ -455,7 +455,7 @@ End Sub Sub GetGraphicNames() Dim i as integer Dim oDocGraphics as Object - MakeLogHeadLine("Pictures") + MakeLogHeadLine("Graphics") oDocGraphics = oDocument.GraphicObjects For i = 0 to oDocGraphics.count - 1 WriteStringtoLogFile(oDocGraphics.GetbyIndex(i).Name) @@ -465,7 +465,7 @@ End Sub Sub GetStyles() Dim m,n as integer - MakeLogHeadLine("Userdefined Templates") + MakeLogHeadLine("User-defined Templates") ' Check all StyleFamilies(i.e. PageStyles, ParagraphStyles, CharacterStyles, cellStyles) For n = 0 to oDocument.StyleFamilies.Count - 1 @@ -521,9 +521,9 @@ End Sub Sub MakeLogHeadLine(HeadText as String) - oLogCursor.CharStyleName = "LogHeaderText" + oLogCursor.CharStyleName = "Log Header" oLogText.insertControlCharacter(oLogCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False) oLogText.insertString(oLogCursor,HeadText,False) oLogText.insertControlCharacter(oLogCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False) - oLogCursor.CharStyleName = "LogBodyText" + oLogCursor.CharStyleName = "Log Body" End Sub</script:module>
\ No newline at end of file diff --git a/wizards/source/gimmicks/ReadDir.xba b/wizards/source/gimmicks/ReadDir.xba index b5184d8c8547..223249d3ed50 100644 --- a/wizards/source/gimmicks/ReadDir.xba +++ b/wizards/source/gimmicks/ReadDir.xba @@ -47,13 +47,13 @@ Dim oStandardTemplate as Object BasicLibraries.LoadLibrary("Tools") oDocument = StarDesktop.LoadComponentFromURL("private:factory/sdraw","_blank",0, NoArgs()) oPage = oDocument.DrawPages(0) - oStandardTemplate = oDocument.StyleFamilies.GetByName("graphics").GetByName("Standard") + oStandardTemplate = oDocument.StyleFamilies.GetByName("graphics").GetByName("Default") oStandardTemplate.CharHeight = 10 oStandardTemplate.TextLeftDistance = 100 oStandardTemplate.TextRightDistance = 100 oStandardTemplate.TextUpperDistance = 50 oStandardTemplate.TextLowerDistance = 50 - DlgReadDir = LoadDialog("Gimmicks","ReadDirDlg") + DlgReadDir = LoadDialog("Gimmicks","ReadDirdlg") oProgressBar = DlgReadDir.Model.ProgressBar1 DlgReadDir.Model.TextField1.Text = ConvertFromUrl(GetPathSettings("Work")) DlgReadDir.Model.cmdGoOn.DefaultButton = True diff --git a/wizards/source/gimmicks/UserfieldDlg.xdl b/wizards/source/gimmicks/UserfieldDlg.xdl index a03e85c1fe26..c80c0dee35b5 100644 --- a/wizards/source/gimmicks/UserfieldDlg.xdl +++ b/wizards/source/gimmicks/UserfieldDlg.xdl @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="UserfieldDlg" dlg:title="Modify Userfields" dlg:left="161" dlg:top="57" dlg:width="281" dlg:height="214"> +<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="UserfieldDlg" dlg:title="Modify User Data" dlg:left="161" dlg:top="57" dlg:width="281" dlg:height="214"> <dlg:bulletinboard> <dlg:text dlg:id="Label1" dlg:tab-index="0" dlg:left="6" dlg:top="48" dlg:width="57" dlg:height="8" dlg:value="Label1"/> <dlg:text dlg:id="Label2" dlg:tab-index="1" dlg:left="6" dlg:top="64" dlg:width="57" dlg:height="8" dlg:value="Label2"/> @@ -23,13 +23,13 @@ <dlg:scrollbar dlg:id="ScrollBar1" dlg:tab-index="18" dlg:left="263" dlg:top="46" dlg:width="12" dlg:height="140" dlg:align="vertical"> <script:event script:event-name="on-mouseup" script:location="application" script:macro-name="Gimmicks.Userfields.ScrollControls" script:language="StarBasic"/> </dlg:scrollbar> - <dlg:button dlg:id="cmdQuit" dlg:tab-index="19" dlg:left="6" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Quit Macro" dlg:value="Quit"> + <dlg:button dlg:id="cmdQuit" dlg:tab-index="19" dlg:left="6" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Exit Macro" dlg:value="Exit"> <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Gimmicks.Userfields.StopMacro" script:language="StarBasic"/> </dlg:button> - <dlg:button dlg:id="cmdSave" dlg:tab-index="20" dlg:left="45" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Save all Data of all users to file" dlg:value="~Save"> + <dlg:button dlg:id="cmdSave" dlg:tab-index="20" dlg:left="45" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Save All Data of All Users to File" dlg:value="~Save"> <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Gimmicks.Userfields.SaveSettings" script:language="StarBasic"/> </dlg:button> - <dlg:button dlg:id="cmdTakeOver" dlg:tab-index="21" dlg:left="84" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Insert current User Data into Office Application" dlg:value="Se~lect"> + <dlg:button dlg:id="cmdTakeOver" dlg:tab-index="21" dlg:left="84" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Replace the User Data in <PRODUCTNAME> With the User Data Above" dlg:value="Se~lect"> <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Gimmicks.Userfields.SelectCurrentFields" script:language="StarBasic"/> </dlg:button> <dlg:button dlg:id="cmdNextUser" dlg:tab-index="22" dlg:left="162" dlg:top="193" dlg:width="35" dlg:height="14" dlg:tag="1" dlg:help-text="Show Data of Next User" dlg:value="Next >>"> @@ -38,11 +38,11 @@ <dlg:button dlg:id="cmdPrevUser" dlg:tab-index="23" dlg:left="123" dlg:top="193" dlg:width="35" dlg:height="14" dlg:tag="-1" dlg:help-text="Show Data of Previous User" dlg:value="<<Previous"> <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Gimmicks.Userfields.StepToRecord" script:language="StarBasic"/> </dlg:button> - <dlg:button dlg:id="CommandButton1" dlg:tab-index="24" dlg:left="201" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Add new User" dlg:value="~New"> + <dlg:button dlg:id="CommandButton1" dlg:tab-index="24" dlg:left="201" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Add Data for New User" dlg:value="~New"> <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Gimmicks.Userfields.AddRecord" script:language="StarBasic"/> </dlg:button> - <dlg:text dlg:id="Label10" dlg:tab-index="25" dlg:left="6" dlg:top="6" dlg:width="269" dlg:height="34" dlg:value="This Macro offers the opportunity to administrate several user Data in a simple way.
The User data of several users may be stored in an own file in the directory <ConfigDir> from where they can be inserted as the main user data into the office." dlg:multiline="true"/> - <dlg:button dlg:id="cmdDelete" dlg:tab-index="26" dlg:left="240" dlg:top="193" dlg:width="35" dlg:height="14" dlg:tag="Delete Data of current User" dlg:value="Delete"> + <dlg:text dlg:id="Label10" dlg:tab-index="25" dlg:left="6" dlg:top="6" dlg:width="269" dlg:height="34" dlg:value="This macro lets you easily administrate several user profiles.
The user data of several users may be stored in a single file in the directory <ConfigDir>. From there, you can select a particular user whose data is then the current user data in <PRODUCTNAME>." dlg:multiline="true"/> + <dlg:button dlg:id="cmdDelete" dlg:tab-index="26" dlg:left="240" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Delete Data of Current User" dlg:value="Delete"> <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Gimmicks.Userfields.DeleteCurrentSettings" script:language="StarBasic"/> </dlg:button> </dlg:bulletinboard> diff --git a/wizards/source/gimmicks/Userfields.xba b/wizards/source/gimmicks/Userfields.xba index 5fc07da2f542..a19681d01a2f 100644 --- a/wizards/source/gimmicks/Userfields.xba +++ b/wizards/source/gimmicks/Userfields.xba @@ -22,9 +22,9 @@ Dim SystemPath as String UserFieldDatatype(0,1) = "o" UserFieldDatatype(1,0) = "FIRSTNAME" UserFieldDatatype(1,1) = "givenname" - UserFieldDatatype(2,0) = "NAME" + UserFieldDatatype(2,0) = "LASTNAME" UserFieldDatatype(2,1) = "sn" - UserFieldDatatype(3,0) = "SHORTCUT" + UserFieldDatatype(3,0) = "INITIALS" UserFieldDatatype(3,1) = "initials" UserFieldDatatype(4,0) = "STREET" UserFieldDatatype(4,1) = "street" @@ -38,13 +38,13 @@ Dim SystemPath as String UserFieldDatatype(8,1) = "title" UserFieldDatatype(9,0) = "POSITION" UserFieldDatatype(9,1) = "position" - UserFieldDatatype(10,0) = "PHONE_PRIVATE" + UserFieldDatatype(10,0) = "PHONE_HOME" UserFieldDatatype(10,1) = "homephone" - UserFieldDatatype(11,0) = "PHONE_COMPANY" + UserFieldDatatype(11,0) = "PHONE_WORK" UserFieldDatatype(11,1) = "telephonenumber" UserFieldDatatype(12,0) = "FAX" UserFieldDatatype(12,1) = "facsimiletelephonenumber" - UserFieldDatatype(13,0) = "EMAIL" + UserFieldDatatype(13,0) = "E-MAIL" UserFieldDatatype(13,1) = "mail" UserFieldDatatype(14,0) = "STATE" UserFieldDatatype(14,1) = "st" @@ -118,30 +118,6 @@ Dim MaxIndex as Integer End Sub -Sub SaveDataToFile(FilePath as String, DataList() as String) -Dim FileChannel as Integer -Dim i as Integer -Dim oFile as Object -Dim oOutputStream as Object -Dim oStreamString as Object -Dim oUcb as Object -Dim sCRLF as String - - sCRLF = CHR(10) & CHR(13) - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - oOutputStream = createUnoService("com.sun.star.io.TextOutputStream") - If oUcb.Exists(FilePath) Then - oUcb.Kill(FilePath) - End If - oFile = oUcb.OpenFileReadWrite(FilePath) - oOutputStream.SetOutputStream(oFile.GetOutputStream) - For i = 0 To Ubound(DataList()) - oOutputStream.WriteString(DataList(i) & sCRLF) - Next i - oOutputStream.CloseOutput() -End Sub - - Sub ToggleButtons(ByVal Index as Integer) Dim i as Integer CurFieldIndex = Index @@ -150,37 +126,6 @@ Dim i as Integer End Sub -Function LoadDataFromFile(FilePath as String, DataList() as String) as Boolean -Dim oInputStream as Object -Dim i as Integer -Dim oUcb as Object -Dim oFile as Object -Dim MaxIndex as Integer - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - If oUcb.Exists(FilePath) Then - MaxIndex = 10 - oInputStream = createUnoService("com.sun.star.io.TextInputStream") - oFile = oUcb.OpenFileReadWrite(FilePath) - oInputStream.SetInputStream(oFile.GetInputStream) - i = -1 - Redim Preserve DataList(MaxIndex) as String - While Not oInputStream.IsEOF - i = i + 1 - If i > MaxIndex Then - MaxIndex = MaxIndex + 10 - Redim Preserve DataList(MaxIndex) as String - End If - DataList(i) = oInputStream.ReadLine - Wend - If i > -1 And i <> MaxIndex Then - Redim Preserve DataList(i) as String - End If - LoadDataFromFile() = True - oOutputStream.CloseInput() - Else - LoadDataFromFile() = False - End If -End Function Sub InitializeUserFamily() |