vitomation01: #i109696 - Removed two more unused functions
This commit is contained in:
@@ -237,108 +237,3 @@ function hHelpGetAboutItemCount() as integer
|
||||
|
||||
end function
|
||||
|
||||
'*******************************************************************************
|
||||
|
||||
function hHelpGetSearchIndexItemCount() as integer
|
||||
|
||||
'///<h3>Get the number of items in the Help Search Index</h3>
|
||||
'///<i>Starting point: Help / Index page</i><br>
|
||||
'///<i>Note: Workaround for incorrect value returned by .getItemCount()</i><br>
|
||||
|
||||
'///<u>Input</u>:
|
||||
'///<ol>
|
||||
'///+<li>Nothing</li>
|
||||
'///</ol>
|
||||
|
||||
'///<u>Returns</u>:
|
||||
'///<ol>
|
||||
'///+<li>Number of items in the list (integer)</li>
|
||||
'///</ol>
|
||||
|
||||
'///<u>Description</u>:
|
||||
'///<ul>
|
||||
|
||||
const CFN = "hHelpGetSearchIndexItemCount:"
|
||||
|
||||
dim iItem as integer
|
||||
printlog( CFN & "Enter" )
|
||||
|
||||
'///+<li>Run through the list and count the items, break on error</li>
|
||||
for iItem = 1 to 10000
|
||||
|
||||
try
|
||||
SearchIndex.select( iItem )
|
||||
catch
|
||||
iItem = iItem - 1
|
||||
exit for
|
||||
endcatch
|
||||
|
||||
next iItem
|
||||
|
||||
printlog( CFN & "Exit with item count = " & iItem )
|
||||
hHelpGetSearchIndexItemCount() = iItem
|
||||
'///</ul>
|
||||
|
||||
end function
|
||||
|
||||
'*******************************************************************************
|
||||
|
||||
function hGetHelpContentHeader( iLength as integer ) as string
|
||||
|
||||
|
||||
'///<h3>Get the header of the content in the help browser</h3>
|
||||
'///<i>This is the first line of the content page, truncated (if desired)</i><br><br>
|
||||
|
||||
'///<u>Parameter(s):</u><br>
|
||||
'///<ol>
|
||||
'///+<li>Length of the requested string (Integer)</li>
|
||||
'///<ul>
|
||||
'///+<li>The max length of the string to be returned</li>
|
||||
'///+<li>≤ 0 = do not truncate</li>
|
||||
'///</ul>
|
||||
'///</ol>
|
||||
|
||||
|
||||
'///<u>Returns:</u><br>
|
||||
'///<ol>
|
||||
'///+<li>Header (String)</li>
|
||||
'///<ul>
|
||||
'///+<li>A string containing the content header</li>
|
||||
'///+<li>The header is the first line of the content page</li>
|
||||
'///</ul>
|
||||
'///</ol>
|
||||
|
||||
const CFN = "hGetHelpContentHeader::"
|
||||
printlog( CFN & "Enter with option (iLength): " & iLength )
|
||||
dim cHeaderString as string
|
||||
|
||||
'///<u>Description:</u>
|
||||
'///<ul>
|
||||
'///+<li>Maximize the help viewer (required to avoid cut off strings)</li>
|
||||
kontext "HelpContent"
|
||||
'StarOfficeHelp.maximize()
|
||||
|
||||
'///+<li>Go to the top left position in the help browser</li>
|
||||
HelpContent.typeKeys( "<MOD1 HOME>" )
|
||||
|
||||
'///+<li>Mark the entire line - note that this ends at the linebreak</li>
|
||||
HelpContent.typeKeys( "<SHIFT END>" )
|
||||
|
||||
'///+<li>Copy the string to the clipboard</li>
|
||||
EditCopy
|
||||
|
||||
'///+<li>Assign the string to a variable</li>
|
||||
cHeaderString = getClipboardText
|
||||
|
||||
'///+<li>Truncate string</li>
|
||||
if ( iLength > 0 ) then
|
||||
if ( len( cHeaderString ) > iLength ) then
|
||||
cHeaderString = left( cHeaderString, iLength )
|
||||
endif
|
||||
endif
|
||||
'///</ul>
|
||||
|
||||
printlog( CFN & "Exit: " & cHeaderString )
|
||||
hGetHelpContentHeader() = cHeaderString
|
||||
|
||||
end function
|
||||
|
Reference in New Issue
Block a user