[Libreoffice-commits] dev-tools.git: helpauthoring/HelpAuthoring
Yousuf Philips
philipz85 at hotmail.com
Mon Sep 14 00:27:57 PDT 2015
helpauthoring/HelpAuthoring/OtherElements.xba | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
New commits:
commit e3189845ad125274a353a99de47a3c41d5d78d87
Author: Yousuf Philips <philipz85 at hotmail.com>
Date: Sun Sep 13 17:57:10 2015 +0400
Tweaks for insert extended tip and and insert section
Change-Id: Ieb455d5f33736e47b83f9b6b1f0691cdb03a44d4
diff --git a/helpauthoring/HelpAuthoring/OtherElements.xba b/helpauthoring/HelpAuthoring/OtherElements.xba
index c93bc81..bae4f31 100644
--- a/helpauthoring/HelpAuthoring/OtherElements.xba
+++ b/helpauthoring/HelpAuthoring/OtherElements.xba
@@ -287,6 +287,9 @@ Sub InsertExtendedTip
Exit Sub
End If
+ ID = "."
+ ID = inputbox("A help ID (hID) is a unique reference key to context-sensitive help when a user uses the F1 key or the Help button. There are two types: UNO commands and Symbolic names."+chr(10)+"examples: .uno:InsertCtrl, SID_FM_CONVERTTO_IMAGECONTROL","Enter Help ID (hID)",".uno:" )
+
thiscomponent.getcurrentcontroller.select(oCurStart)
If Ret=6 Then
InsertTag("AHID_","<AHID hid="""+ID+""">")
@@ -318,10 +321,8 @@ Sub CloseSort
GoDown(1)
End Sub
-sub InsertSection
-
-
- If not IsHelpFile Then
+sub InsertSection( optional sSecName as string )
+ If not IsHelpFile and IsMissing(sSecName) Then
msgbox(strErr_NoHelpFile)
Exit Sub
End If
@@ -336,11 +337,11 @@ sub InsertSection
oEnd = oCur.getEnd
oCurEnd = oEnd.getText.createTextCursorByRange(oEnd)
- sSectionName = AlphaNum(inputbox("Please specify a section name/identifier:"))
-
- If sSectionName = "" Then
- Exit Sub
- End If
+ if IsMissing(sSecName) or sSecName = 0 then
+ sSectionName = AlphaNum(inputbox("Please specify a section name/identifier:"))
+ else
+ sSectionName = sSecName
+ end if
If sSectionName = "" Then
msgbox "No (valid) identifier -- no section."+chr(13)+"Hint: Use only A-Z,a-z,0-9 and _",48,"D'oh!"
@@ -372,8 +373,8 @@ sub InsertSection
thiscomponent.getcurrentcontroller.select(oCurStart)
CR_before
GoUp(1)
- InsertTag("SECTION_","<SECTION id="""+sSectionName+""">")
SetParaStyle("hlp_aux_section")
+ InsertTag("SECTION_","<SECTION id="""+sSectionName+""">")
thiscomponent.getcurrentcontroller.select(oCurEnd)
CR
More information about the Libreoffice-commits
mailing list