summaryrefslogtreecommitdiff
path: root/wizards/source/tools/Misc.xba
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2001-09-12 11:23:59 +0000
committerBehrend Cornelius <bc@openoffice.org>2001-09-12 11:23:59 +0000
commit1dc9eee8548e21734778e9cf66466c56699c335f (patch)
tree9b1580739910c5e11ba86ed52aa7c7e830f03f68 /wizards/source/tools/Misc.xba
parent1f3f0c371b60548adc0634883f00e6fa8dc8df2d (diff)
#91712# 'CutPathView' Routine modified
Diffstat (limited to 'wizards/source/tools/Misc.xba')
-rw-r--r--wizards/source/tools/Misc.xba12
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 &gt; 60 Then
- sViewPath = &quot;...&quot; &amp; Right(sViewPath,58)
+ FileName = FileNameoutofPath(sViewPath, &quot;/&quot;)
+ iFileLen = Len(FileName)
+ If iFileLen &lt; 44 Then
+ sViewPath = Left(sViewPath,57-iFileLen-10) &amp; &quot;...&quot; &amp; Right(sViewPath,iFileLen + 10)
+ Else
+ sViewPath = Left(sViewPath,27) &amp; &quot;...&quot; &amp; Right(sViewPath,30)
+ End If
End If
CutPathView = sViewPath
End Function