diff options
author | Behrend Cornelius <bc@openoffice.org> | 2001-09-12 11:23:59 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2001-09-12 11:23:59 +0000 |
commit | 1dc9eee8548e21734778e9cf66466c56699c335f (patch) | |
tree | 9b1580739910c5e11ba86ed52aa7c7e830f03f68 /wizards/source/tools/Misc.xba | |
parent | 1f3f0c371b60548adc0634883f00e6fa8dc8df2d (diff) |
#91712# 'CutPathView' Routine modified
Diffstat (limited to 'wizards/source/tools/Misc.xba')
-rw-r--r-- | wizards/source/tools/Misc.xba | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/wizards/source/tools/Misc.xba b/wizards/source/tools/Misc.xba index 92113d073310..1b1c414e0e20 100644 --- a/wizards/source/tools/Misc.xba +++ b/wizards/source/tools/Misc.xba @@ -269,12 +269,20 @@ ErrorOcurred: End Function -Function CutPathView(sDocUrl as String, PathLen as Integer) +Function CutPathView(sDocUrl as String, Optional PathLen as Integer) Dim sViewPath as String +Dim FileName as String +Dim iFileLen as Integer sViewPath = ConvertfromURL(sDocURL) iViewPathLen = Len(sViewPath) If iViewPathLen > 60 Then - sViewPath = "..." & Right(sViewPath,58) + FileName = FileNameoutofPath(sViewPath, "/") + iFileLen = Len(FileName) + If iFileLen < 44 Then + sViewPath = Left(sViewPath,57-iFileLen-10) & "..." & Right(sViewPath,iFileLen + 10) + Else + sViewPath = Left(sViewPath,27) & "..." & Right(sViewPath,30) + End If End If CutPathView = sViewPath End Function |