This is an automated email from the ASF dual-hosted git repository. mseidel pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push: new 4cb6727860 Small changes to Help Authoring Tool 4cb6727860 is described below commit 4cb6727860852da919b3299f69ec1928beb0272d Author: mseidel <msei...@apache.org> AuthorDate: Fri Jun 2 21:56:06 2023 +0200 Small changes to Help Authoring Tool --- main/helpauthoring/Addons.xcu | 75 ++++---- main/helpauthoring/HelpAuthoring/Validate.xba | 130 +++++++------ main/helpauthoring/HelpAuthoring/_Main.xba | 20 +- main/helpauthoring/description.xml | 47 +++-- .../en-US/org.openoffice.helpauthoring/ha-ids.xhp | 14 +- .../ha-specialsections.xhp | 15 +- main/helpauthoring/images/icon.png | Bin 0 -> 2134 bytes main/helpauthoring/images/icon_hc.png | Bin 0 -> 2169 bytes main/helpauthoring/license/LICENSE | 202 +++++++++++++++++++++ main/helpauthoring/pkg-desc/pkg-description.en-US | 1 + 10 files changed, 356 insertions(+), 148 deletions(-) diff --git a/main/helpauthoring/Addons.xcu b/main/helpauthoring/Addons.xcu index d756e51333..e7877533dc 100644 --- a/main/helpauthoring/Addons.xcu +++ b/main/helpauthoring/Addons.xcu @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='UTF-8'?> <!--*********************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -8,16 +8,16 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * ***********************************************************--> @@ -33,7 +33,7 @@ <value>com.sun.star.text.TextDocument</value> </prop> <node oor:name="Submenu"> - <node oor:name="m01" oor:op="replace"> + <node oor:name="m02" oor:op="replace"> <prop oor:name="URL" oor:type="xs:string"> <value>vnd.sun.star.script:HelpAuthoring._Main.CreateFile?language=Basic&location=application</value> </prop> @@ -42,15 +42,6 @@ <value xml:lang="en-US">Create Help File</value> </prop> </node> - <node oor:name="m02" oor:op="replace"> - <prop oor:name="URL" oor:type="xs:string"> - <value>vnd.sun.star.script:HelpAuthoring._Main.DisplayVersion?language=Basic&location=application</value> - </prop> - <prop oor:name="Title" oor:type="xs:string"> - <value/> - <value xml:lang="en-US">About</value> - </prop> - </node> <node oor:name="m03" oor:op="replace"> <prop oor:name="URL" oor:type="xs:string"> <value>vnd.sun.star.script:HelpAuthoring.Helpers.SetDocumentRoot?language=Basic&location=application</value> @@ -66,7 +57,7 @@ </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">Edit Meta Data </value> + <value xml:lang="en-US">Edit Meta Data</value> </prop> </node> <node oor:name="m05" oor:op="replace"> @@ -75,7 +66,7 @@ </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">Validate this Help File </value> + <value xml:lang="en-US">Validate this Help File</value> </prop> </node> <node oor:name="m06" oor:op="replace"> @@ -84,7 +75,7 @@ </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">Toggle L10N </value> + <value xml:lang="en-US">Toggle L10N</value> </prop> </node> <node oor:name="m07" oor:op="replace"> @@ -93,7 +84,7 @@ </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">Assign ID </value> + <value xml:lang="en-US">Assign ID</value> </prop> </node> <node oor:name="m08" oor:op="replace"> @@ -102,7 +93,7 @@ </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">Insert Comment </value> + <value xml:lang="en-US">Insert Comment</value> </prop> </node> <node oor:name="m09" oor:op="replace"> @@ -111,7 +102,7 @@ </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">Insert Table </value> + <value xml:lang="en-US">Insert Table</value> </prop> </node> <node oor:name="m10" oor:op="replace"> @@ -120,7 +111,7 @@ </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">Insert Link </value> + <value xml:lang="en-US">Insert Link</value> </prop> </node> <node oor:name="m11" oor:op="replace"> @@ -129,7 +120,7 @@ </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">Insert Help ID </value> + <value xml:lang="en-US">Insert Help ID</value> </prop> </node> <node oor:name="m12" oor:op="replace"> @@ -138,7 +129,7 @@ </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">Insert Index Entry </value> + <value xml:lang="en-US">Insert Index Entry</value> </prop> </node> <node oor:name="m13" oor:op="replace"> @@ -147,52 +138,52 @@ </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">Insert Extended Tip </value> + <value xml:lang="en-US">Insert Extended Tip</value> </prop> </node> <node oor:name="m14" oor:op="replace"> <prop oor:name="URL" oor:type="xs:string"> - <value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertHowToGet?language=Basic&location=application</value> + <value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertGraphic?language=Basic&location=application</value> </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">"How to Get" Section </value> + <value xml:lang="en-US">Insert Image</value> </prop> </node> <node oor:name="m15" oor:op="replace"> <prop oor:name="URL" oor:type="xs:string"> - <value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertGraphic?language=Basic&location=application</value> + <value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertSection?language=Basic&location=application</value> </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">Insert Image </value> + <value xml:lang="en-US">Insert Section</value> </prop> </node> <node oor:name="m16" oor:op="replace"> <prop oor:name="URL" oor:type="xs:string"> - <value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertSection?language=Basic&location=application</value> + <value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertVariable?language=Basic&location=application</value> </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">Insert Section </value> + <value xml:lang="en-US">Insert Variable</value> </prop> </node> <node oor:name="m17" oor:op="replace"> <prop oor:name="URL" oor:type="xs:string"> - <value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertVariable?language=Basic&location=application</value> + <value>vnd.sun.star.script:HelpAuthoring.Embed.Main?language=Basic&location=application</value> </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">Insert Variable </value> + <value xml:lang="en-US">Transclude (Embed)</value> </prop> </node> <node oor:name="m18" oor:op="replace"> <prop oor:name="URL" oor:type="xs:string"> - <value>vnd.sun.star.script:HelpAuthoring.Embed.Main?language=Basic&location=application</value> + <value>vnd.sun.star.script:HelpAuthoring.OtherElements.InsertHowToGet?language=Basic&location=application</value> </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">Transclude (Embed) </value> + <value xml:lang="en-US">"How to Get" Section</value> </prop> </node> <node oor:name="m19" oor:op="replace"> @@ -201,7 +192,21 @@ </prop> <prop oor:name="Title" oor:type="xs:string"> <value/> - <value xml:lang="en-US">"Related Topics" Section </value> + <value xml:lang="en-US">"Related Topics" Section</value> + </prop> + </node> + <node oor:name="m20" oor:op="replace"> + <prop oor:name="URL"> + <value>private:separator</value> + </prop> + </node> + <node oor:name="m21" oor:op="replace"> + <prop oor:name="URL" oor:type="xs:string"> + <value>vnd.sun.star.script:HelpAuthoring._Main.DisplayVersion?language=Basic&location=application</value> + </prop> + <prop oor:name="Title" oor:type="xs:string"> + <value/> + <value xml:lang="en-US">About</value> </prop> </node> </node> diff --git a/main/helpauthoring/HelpAuthoring/Validate.xba b/main/helpauthoring/HelpAuthoring/Validate.xba index aa19a3609a..6b72bab61a 100644 --- a/main/helpauthoring/HelpAuthoring/Validate.xba +++ b/main/helpauthoring/HelpAuthoring/Validate.xba @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> <!--*********************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -9,22 +9,20 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * ***********************************************************--> <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Validate" script:language="StarBasic"> '############################################ ' VALIDATION ROUTINES -' -' May, 19 2004 - fpe '############################################ Dim sSwitchType As String @@ -55,7 +53,7 @@ Sub Validate Exit Sub End If - oDoc = StarDesktop.CurrentComponent + oDoc = StarDesktop.CurrentComponent sSwitchType = "" sCaseType = "" sDefaultType = "" @@ -65,13 +63,13 @@ Sub Validate CheckMetaData(oDoc) CheckHeading(oDoc) - + Enum = oDoc.Text.createEnumeration Do While Enum.hasMoreElements TextElement = Enum.nextElement If TextElement.supportsService("com.sun.star.text.Paragraph") Then ' we are a paragraph - + CheckSwitches(TextElement) CheckParaID(TextElement) CheckParaFormat(TextElement) @@ -86,7 +84,7 @@ Sub Validate CheckCell(TextElement) End If - Loop + Loop If sCaseType <> "" Then Terminate("Previous case ("+sCaseType+") not closed!",TextElement) @@ -99,13 +97,13 @@ Sub Validate If sSwitchType <> "" Then Terminate("Previous switch ("+sSwitchType+") not closed!",TextElement) End If - + If ubound(aTagsOpen()) > 0 Then Terminate("Element "+aTagsOpen(ubound(aTagsOpen()))+" not closed",TextElement) End If - + msgbox("Validation finished.") - + End Sub '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -115,17 +113,17 @@ End Sub Sub CheckCell(TE As Object) On Local Error Goto ERRHANDLE: - + CellName = "A1" Cell = TE.getCellByName(CellName) tmpCellEnum = Cell.createEnumeration tmpCellElement = tmpCellEnum.nextElement - + Rows = TE.getRows Cols = TE.getColumns ReDim aCellTagsOpen(0) - + For RowIndex = 1 to Rows.getCount() For ColIndex = 1 to Cols.getCount() @@ -147,7 +145,7 @@ Sub CheckCell(TE As Object) EndIf Loop - + If sCellCaseType <> "" Then Terminate("Previous case ("+sCellCaseType+") not closed!",CellElement) End If @@ -155,11 +153,11 @@ Sub CheckCell(TE As Object) If sCellSwitchType <> "" Then Terminate("Previous switch ("+sCellSwitchType+") not closed!",CellElement) End If - + If ubound(aCellTagsOpen()) > 0 Then Terminate("Element "+aCellTagsOpen(ubound(aCellTagsOpen()))+" not closed",CellElement) End If - + Next Next @@ -179,7 +177,7 @@ Sub CheckParaID(TE As Object) If Left(TE.ParaStyleName,4) = "hlp_" AND Not(Left(TE.ParaStyleName,8) = "hlp_aux_") Then sText = TE.GetString - + If sText = "" Then If bWarnEmptyPara Then Warn("Empty Paragraph","Empty paragraphs should be avoided. Do not use empty paragraphs for formatting purpose.",TE) @@ -209,7 +207,7 @@ Sub CheckParaID(TE As Object) If posID = 0 Then If bWarnParaNoID Then - Warn("Paragraph has no id.","IDs will be assigned on safe. You can also assign an ID using the Assign Paragraph ID menu item",TPE) + Warn("Paragraph has no id.","IDs will be assigned on save. You can also assign an ID using the Assign Paragraph ID menu item",TPE) bWarnParaNoID = FALSE InsertNewParaData Else @@ -263,7 +261,7 @@ Sub CheckSwitches(TE As Object) End If End If ' OPENING SWITCH - + If Left(sText,8) = "</SWITCH" Then ' a closing switch tag If sSwitchType = "" Then ' there was no switch open @@ -272,7 +270,7 @@ Sub CheckSwitches(TE As Object) If not(bCaseSet OR bDefaultSet) Then Terminate("Empty switch",TE) End If - + If sCaseType <> "" Then ' there is still a case open Terminate("Previous case ("+sCaseType+") not closed!",TE) End If @@ -280,11 +278,11 @@ Sub CheckSwitches(TE As Object) bDefaultSet = FALSE bCaseSet = FALSE End If - + End If ' CLOSING SWITCH - + If Left(sText,6) = "<CASE " Then ' an opening case tag - + If bDefaultSet Then Terminate("No case after default allowed.",TE) End If @@ -301,7 +299,7 @@ Sub CheckSwitches(TE As Object) End If End If ' OPENING CASE - + If Left(sText,6) = "</CASE" Then ' a closing case tag If sCaseType = "" Then @@ -311,7 +309,7 @@ Sub CheckSwitches(TE As Object) End If End If ' CLOSING CASE - + If Left(sText,8) = "<DEFAULT" Then ' an opening default tag If sCaseType = "" Then @@ -319,7 +317,7 @@ Sub CheckSwitches(TE As Object) Terminate("Multiple default not allowed.",TE) Else sDefaultType = "DEFAULT" - + If sSwitchType = "" Then Terminate("Default without switch",TE) End If @@ -331,7 +329,7 @@ Sub CheckSwitches(TE As Object) End If End If ' OPENING CASE - + If Left(sText,9) = "</DEFAULT" Then ' a closing default tag If sDefaultType <> "DEFAULT" Then @@ -345,7 +343,7 @@ Sub CheckSwitches(TE As Object) If (sSwitchType <> "" AND sCaseType = "" AND sDefaultType = "") Then Terminate("Nothing allowed between switch and case or default or /case or /default and /switch", TE) End If - End If + End If End Sub @@ -372,7 +370,7 @@ Sub CheckSwitchesInCell(CE As Object) End If End If ' OPENING SWITCH - + If Left(sText,8) = "</SWITCH" Then ' a closing switch tag If sCellSwitchType = "" Then ' there was no switch open @@ -381,7 +379,7 @@ Sub CheckSwitchesInCell(CE As Object) If not(bCellCaseSet OR bCellDefaultSet) Then Terminate("Empty switch",CE) End If - + If sCellCaseType <> "" Then ' there is still a case open Terminate("Previous case ("+sCellCaseType+") not closed!",CE) End If @@ -389,9 +387,9 @@ Sub CheckSwitchesInCell(CE As Object) bCellDefaultSet = FALSE bCellCaseSet = FALSE End If - + End If ' CLOSING SWITCH - + If Left(sText,6) = "<CASE " Then ' an opening case tag If bCellDefaultSet Then @@ -410,7 +408,7 @@ Sub CheckSwitchesInCell(CE As Object) End If End If ' OPENING CASE - + If Left(sText,6) = "</CASE" Then ' a closing case tag If sCellCaseType = "" Then @@ -420,7 +418,7 @@ Sub CheckSwitchesInCell(CE As Object) End If End If ' CLOSING CASE - + If Left(sText,8) = "<DEFAULT" Then ' an opening default tag If sCellCaseType = "" Then @@ -428,7 +426,7 @@ Sub CheckSwitchesInCell(CE As Object) Terminate("Multiple default not allowed.",CE) Else sCellDefaultType = "DEFAULT" - + If sCellSwitchType = "" Then Terminate("Default without switch",CE) End If @@ -440,7 +438,7 @@ Sub CheckSwitchesInCell(CE As Object) End If End If ' OPENING CASE - + If Left(sText,9) = "</DEFAULT" Then ' a closing default tag If sCellDefaultType <> "DEFAULT" Then @@ -454,7 +452,7 @@ Sub CheckSwitchesInCell(CE As Object) If (sCellSwitchType <> "" AND sCellCaseType = "" AND sCellDefaultType = "") Then Terminate("Nothing allowed between switch and case or default or /case or /default and /switch", CE) End If - End If + End If End Sub @@ -466,7 +464,7 @@ End Sub Sub Terminate(sStr As String, TE As Object) oCur = TE.getText.createTextCursorByRange(TE) - thiscomponent.getcurrentcontroller.select(oCur) + thiscomponent.getcurrentcontroller.select(oCur) msgbox sStr,48,"D'oh!" Stop @@ -487,7 +485,7 @@ Sub Warn(sWarn As String, sSolv As String, Optional TE As Object) If not(IsMissing(TE)) Then oCur = TE.getText.createTextCursorByRange(TE) - thiscomponent.getcurrentcontroller.select(oCur) + thiscomponent.getcurrentcontroller.select(oCur) End If If oDialog.Execute() = 1 Then @@ -539,7 +537,7 @@ Sub CheckMetaData(oDoc As Object) End If sIndex = oDoc.DocumentInfo.GetUserFieldValue(0) - + End Sub '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -554,10 +552,10 @@ End Sub '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Sub CheckInlineTags(TE As Object) - + If Left(TE.ParaStyleName,4)="hlp_" AND (Left(TE.ParaStyleName,8)<>"hlp_aux_" OR TE.ParaStyleName="hlp_aux_bookmark") Then - + Dim aTokens(0) As Object Dim aInlineTagsOpen(0) As String TP = TE.createEnumeration @@ -570,63 +568,63 @@ Sub CheckInlineTags(TE As Object) For i=1 to ubound(aTokens()) Token = aTokens(i) - + If Token.supportsService("com.sun.star.text.TextField") Then sTag = Token.TextField.TextFieldMaster.Name - + If Right(sTag,1)="_" Then ' a tag starts - + sTagName = Left(sTag,Len(sTag)-1) - + ' check for forbidden tags in paragraphs sTagFormat = TagFormatIsCorrect(sTagName, TE.ParaStyleName) If sTagFormat <> "" Then Terminate(sTagName+" element has wrong paragraph style ("+TE.ParaStyleName+")."+chr(13)+"Must be "+sTagFormat,Token) End If - + sDim = ubound(aInlineTagsOpen())+1 Redim Preserve aInlineTagsOpen(sDim) as String aInlineTagsOpen(sDim)=sTagName ElseIf Left(sTag,1)="_" Then ' a tag ends, all other cases are empty tags - + sTagName = Right(sTag,Len(sTag)-1) - + ' check for forbidden tags in paragraphs sTagFormat = TagFormatIsCorrect(sTagName, TE.ParaStyleName) If sTagFormat <> "" Then Terminate(sTagName+" element has wrong paragraph style ("+TE.ParaStyleName+")."+chr(13)+"Must be "+sTagFormat,Token) End If - + If ubound(aInlineTagsOpen()) > 0 Then If aInlineTagsOpen(ubound(aInlineTagsOpen())) <> sTagName Then - Terminate("Inline Element "+aInlineTagsOpen(ubound(aInlineTagsOpen()))+" not closed",Token) + Terminate("Inline Element "+aInlineTagsOpen(ubound(aInlineTagsOpen()))+" not closed",Token) End If sDim = ubound(aInlineTagsOpen())-1 Else Terminate("No opening tag for "+sTagName,Token) End If Redim Preserve aInlineTagsOpen(sDim) as String - + Else ' empty tag sTagName = sTag sTagFormat = TagFormatIsCorrect(sTagName, TE.ParaStyleName) If sTagFormat <> "" Then Terminate(sTagName+" element has wrong paragraph style ("+TE.ParaStyleName+")."+chr(13)+"Must be "+sTagFormat,Token) End If - + EndIf ElseIf (i > 1) AND (Trim(Token.String) <> "") Then If aInlineTagsOpen(ubound(aInlineTagsOpen())) = "SWITCHINLINE" Then Terminate("No text allowed here.",Token) End If End If - Next - + Next + If ubound(aInlineTagsOpen()) > 0 Then Terminate("Inline Element "+aInlineTagsOpen(ubound(aInlineTagsOpen()))+" not closed",Token) End If - + End If End Sub @@ -644,14 +642,14 @@ Sub CheckTags(TE As Object) If TPE.supportsService("com.sun.star.text.TextField") Then sTag = TPE.TextField.TextFieldMaster.Name If Right(sTag,1)="_" Then ' a tag starts - + sTagName = Left(sTag,Len(sTag)-1) sDim = ubound(aTagsOpen())+1 Redim Preserve aTagsOpen(sDim) as String aTagsOpen(sDim)=sTagName - + ElseIf Left(sTag,1)="_" Then ' a tag ends, all other cases are empty tags - + sTagName = Right(sTag,Len(sTag)-1) If ubound(aTagsOpen()) > 0 Then If aTagsOpen(ubound(aTagsOpen())) <> sTagName Then @@ -665,7 +663,7 @@ Sub CheckTags(TE As Object) Redim Preserve aTagsOpen(sDim) as String Else ' empty tags - + EndIf End If Wend @@ -686,14 +684,14 @@ Sub CheckTagsInCell(CE As Object) If CPE.supportsService("com.sun.star.text.TextField") Then sTag = CPE.TextField.TextFieldMaster.Name If Right(sTag,1)="_" Then ' a tag starts - + sTagName = Left(sTag,Len(sTag)-1) sDim = ubound(aCellTagsOpen())+1 Redim Preserve aCellTagsOpen(sDim) as String aCellTagsOpen(sDim)=sTagName - + ElseIf Left(sTag,1)="_" Then ' a tag ends, all other cases are empty tags - + sTagName = Right(sTag,Len(sTag)-1) If ubound(aCellTagsOpen()) > 0 Then If aCellTagsOpen(ubound(aCellTagsOpen())) <> sTagName Then diff --git a/main/helpauthoring/HelpAuthoring/_Main.xba b/main/helpauthoring/HelpAuthoring/_Main.xba index 551dd5ca71..20727b5f73 100644 --- a/main/helpauthoring/HelpAuthoring/_Main.xba +++ b/main/helpauthoring/HelpAuthoring/_Main.xba @@ -1,13 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> <script:module xmlns:script="http://openoffice.org/2000/script" script:name="_Main" script:language="StarBasic">' Set of Macros used for Help Authoring -' ===================================== -' Version -' ------------------------------------- -' ' #************************************************************** -' # +' # ' # Licensed to the Apache Software Foundation (ASF) under one ' # or more contributor license agreements. See the NOTICE file ' # distributed with this work for additional information @@ -15,19 +11,19 @@ ' # to you under the Apache License, Version 2.0 (the ' # "License"); you may not use this file except in compliance ' # with the License. You may obtain a copy of the License at -' # +' # ' # http://www.apache.org/licenses/LICENSE-2.0 -' # +' # ' # Unless required by applicable law or agreed to in writing, ' # software distributed under the License is distributed on an ' # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ' # KIND, either express or implied. See the License for the ' # specific language governing permissions and limitations ' # under the License. -' # +' # ' #************************************************************** -Global Const Version = "v3.20100805" +Global Const Version = "3.0.1" Global Const strErr_NoHelpFile = "Not a Help File" @@ -56,7 +52,7 @@ Sub SetMetaDataOnSave(Path as String) Path = document.URL End If - If not(IsSubDir(Path,sDocRoot)) Then ' doesn'tr work when resaving the file since it contains the OLD url (before resave) + If not(IsSubDir(Path,sDocRoot)) Then ' doesn't work when resaving the file since it contains the OLD url (before resave) msgbox("The File"+chr(13)+Path+chr(13)+"is outside of your Document Root"+chr(13)+sDocRoot+chr(13)+chr(13)+"You may want to adjust your document root settings and re-save the file.",48,"Warning") Else Path = Right(Path,Len(Path)-Len(sDocRoot)) @@ -66,7 +62,7 @@ Sub SetMetaDataOnSave(Path as String) document.DocumentInfo.SetUserFieldName(1,"ID") ' document.DocumentInfo.SetUserFieldName(2,"Comment") document.DocumentInfo.SetPropertyValue("Subject",Path) - + End Sub @@ -184,6 +180,6 @@ Sub CheckOnLoad End Sub Sub DisplayVersion - msgbox "OpenOffice.org Help Authoring Framework"+chr(13)+"Version "+Version,256 + msgbox "OpenOffice Help Authoring Framework"+chr(13)+"Version "+Version,256 End Sub </script:module> diff --git a/main/helpauthoring/description.xml b/main/helpauthoring/description.xml index 0b5ea712c7..23b63b57f4 100644 --- a/main/helpauthoring/description.xml +++ b/main/helpauthoring/description.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!--*********************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -8,30 +8,39 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * ***********************************************************--> -<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:d="http://openoffice.org/extensions/description/2006" - xmlns:xlink="http://www.w3.org/1999/xlink"> - - <identifier value="org.openoffice.helpauthoring"/> - - <version value="3.0-20100805"/> - - <dependencies> - <OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0"/> - </dependencies> - - <update-information> - </update-information> - +<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:d="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink"> + <version value="3.0.1"/> + <identifier value="org.openoffice.helpauthoring"/> + <display-name> + <name lang="en-US">OpenOffice Help Authoring Framework</name> + </display-name> + <registration> + <simple-license accept-by="admin" default-license-id="lic-en-US" suppress-on-update="true"> + <license-text xlink:href="license/LICENSE" lang="en-US" license-id="lic-en-US"/> + </simple-license> + </registration> + <dependencies> + <OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0"/> + </dependencies> + <publisher> + <name xlink:href="https://www.openoffice.org" lang="en">Apache Software Foundation</name> + </publisher> + <extension-description> + <src lang="en-US" xlink:href="pkg-desc/pkg-description-en-US.txt"/> + </extension-description> + <icon> + <default xlink:href="images/icon.png"/> + <high-contrast xlink:href="images/icon_hc.png"/> + </icon> </description> - diff --git a/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-ids.xhp b/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-ids.xhp index 245853aa79..b9852c12c2 100644 --- a/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-ids.xhp +++ b/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-ids.xhp @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?><helpdocument version="1.0"> <!--*********************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -8,20 +8,20 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * ***********************************************************--> - + <meta> <topic id="topic_0805201012545913" indexer="topic_0805201002104372"> <title xml-lang="en-US" id="tit">ID Assignment in Help Documents</title> @@ -38,7 +38,7 @@ <paragraph id="par_id080520100210452" role="paragraph" xml-lang="en-US">Many elements inside a help document carry an id so that they can be identified in other production steps, mainly for localization purposes. The IDs must be unique within a help document and should even be unique across help documents to allow for moving content across help files (which currently is not officially supported without re-translation).</paragraph> <paragraph id="par_id0805201002104581" role="paragraph" xml-lang="en-US">The help authoring environment takes care of assigning IDs to the corresponding elements on creation, or on <link href="org.openoffice.helpauthoring/ha-validating.xhp">validating</link> the help file (which also happens when a help file is saved).</paragraph> <paragraph id="par_id0805201002104578" role="note" xml-lang="en-US">If you copy an element within a help file you must make sure that the assigned id is different from the original. Therefore, it is best to copy a paragraph without its leading ID.</paragraph> -<paragraph id="par_id0805201002104546" role="paragraph" xml-lang="en-US">By default, paragraph IDs are not visible. You can show them by hovering the mouse cursor over the front of a paragraph. The ID will be displayed in a popup window. Also, <link href="org.openoffice.helpauthoring/ha-l10n.xhp">toggeling the localization status of a paragraph</link> makes its ID visible:</paragraph> +<paragraph id="par_id0805201002104546" role="paragraph" xml-lang="en-US">By default, paragraph IDs are not visible. You can show them by hovering the mouse cursor over the front of a paragraph. The ID will be displayed in a popup window. Also, <link href="org.openoffice.helpauthoring/ha-l10n.xhp">toggling the localization status of a paragraph</link> makes its ID visible:</paragraph> <list type="ordered"> <listitem> <paragraph id="par_id080520100210456" role="ol_item" xml-lang="en-US">Place the cursor inside the paragraph</paragraph> @@ -48,4 +48,4 @@ </listitem> </list> </body> -</helpdocument> \ No newline at end of file +</helpdocument> diff --git a/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-specialsections.xhp b/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-specialsections.xhp index 7a3a82d7df..3c8263ac17 100644 --- a/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-specialsections.xhp +++ b/main/helpauthoring/help/en-US/org.openoffice.helpauthoring/ha-specialsections.xhp @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?><helpdocument version="1.0"> <!--*********************************************************** - * + * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -8,20 +8,20 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. - * + * ***********************************************************--> - + <meta> <topic id="topic_0805201012591739" indexer="topic_080520100201326"> <title xml-lang="en-US" id="tit">Special Sections in Help Documents</title> @@ -42,9 +42,6 @@ <listitem> <paragraph id="par_id0805201002013486" role="paragraph" xml-lang="en-US"><emph>How to get this function</emph></paragraph> <paragraph id="par_id0805201002013460" role="paragraph" xml-lang="en-US">This section contains information about how to execute the function described in the help file (key strokes, menu items, toolbar icons, etc) and is usually placed near the top of a help file.</paragraph> -<paragraph id="par_id0805201002185331" role="paragraph" xml-lang="en-US"> -<image id="img_id080520100218213" src="../img/howtoget.png"><alt xml-lang="en-US" id="alt_id080520100218213">How to get this function</alt> - </image></paragraph> </listitem> <listitem> <paragraph id="par_id080520100201346" role="paragraph" xml-lang="en-US"><emph>Related topics</emph></paragraph> @@ -57,4 +54,4 @@ <paragraph id="par_id0805201002123497" role="ul_item" xml-lang="en-US">Example, Screenshot</paragraph> </listitem></list> </body> -</helpdocument> \ No newline at end of file +</helpdocument> diff --git a/main/helpauthoring/images/icon.png b/main/helpauthoring/images/icon.png new file mode 100644 index 0000000000..0766dd9307 Binary files /dev/null and b/main/helpauthoring/images/icon.png differ diff --git a/main/helpauthoring/images/icon_hc.png b/main/helpauthoring/images/icon_hc.png new file mode 100644 index 0000000000..9bff988946 Binary files /dev/null and b/main/helpauthoring/images/icon_hc.png differ diff --git a/main/helpauthoring/license/LICENSE b/main/helpauthoring/license/LICENSE new file mode 100644 index 0000000000..d20ad4dcf7 --- /dev/null +++ b/main/helpauthoring/license/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2011-2023 Apache Software Foundation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/main/helpauthoring/pkg-desc/pkg-description.en-US b/main/helpauthoring/pkg-desc/pkg-description.en-US new file mode 100644 index 0000000000..9d837b707b --- /dev/null +++ b/main/helpauthoring/pkg-desc/pkg-description.en-US @@ -0,0 +1 @@ +The Help Authoring Extension is useful to create and maintain OpenOffice help files (.xhp).