PaulJayD General User

Joined: 14 Sep 2007 Posts: 12
|
Posted: Fri Sep 14, 2007 7:19 am Post subject: %20 in Frame.Title Should be blank |
|
|
I assign the 'titleSet' to 'Open Document' event, and blanks in the filename show as '%20'.
Is there anyway to have blanks as blanks?
Thanks to anyone...
code:
Function Replace$(Source$, Rep$, New$)
'
' given a string, replace spec'd substr with spec'd substr
'
Dim n As Long
Dim c As String
For n = 1 To Len(Source$)
If Mid(Source$, n, 1) = Rep$ Then
Mid(Source$, n, 1, New$)
end if
Next n
Replace$ = Source$
End Function
sub titleSet
'
' set frame/document title to: fileid - path
'
oComp = StarDesktop.getCurrentComponent()
if (oComp.hasLocation) then
sURL = oComp.getLocation()
sFID = getFileId(sURL)
sPATH = getFilePath(sURL)
title$ = sFID & " - " & replace$(sPATH, "/", "\") & " - OpenOffice"
docattr = thisComponent.getDocumentInfo()
docattr.Title = title$
ThisComponent.CurrentController.Frame.title = title$
end if
end sub |
|