summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2001-11-20 13:42:50 +0000
committerBehrend Cornelius <bc@openoffice.org>2001-11-20 13:42:50 +0000
commit8276feef0ed62e00395b0f79ff639443ae0226a4 (patch)
treeff984ca7c10bf0729d048d0b9e19f7485ed2718b
parent9adb2bb8a9b3fce82c9e1f0bb5dcca6213c4f256 (diff)
#94903# RTrimStr Routine improved, SwitchMousePointer() added
-rw-r--r--wizards/source/tools/Misc.xba8
-rw-r--r--wizards/source/tools/ModuleControls.xba12
-rw-r--r--wizards/source/tools/Strings.xba8
3 files changed, 18 insertions, 10 deletions
diff --git a/wizards/source/tools/Misc.xba b/wizards/source/tools/Misc.xba
index abcb3f0ef91a..25a4cb5b8460 100644
--- a/wizards/source/tools/Misc.xba
+++ b/wizards/source/tools/Misc.xba
@@ -535,16 +535,8 @@ End Function
&apos; Dis-or enables a Window and adjusts the mousepointer accordingly
Sub ToggleWindow(bDoEnable as Boolean)
Dim oWindow as Object
-Dim oWindowPointer as Object
oWindow = StarDesktop.CurrentFrame.ComponentWindow
oWindow.Enable = bDoEnable
- oWindowPointer = CreateUnoService(&quot;com.sun.star.awt.Pointer&quot;)
- If bDoEnable Then
- oWindowPointer.SetType(com.sun.star.awt.SystemPointer.ARROW)
- Else
- oWindowPointer.SetType(com.sun.star.awt.SystemPointer.WAIT)
- End If
- oWindow.SetPointer(oWindowPointer)
End Sub
diff --git a/wizards/source/tools/ModuleControls.xba b/wizards/source/tools/ModuleControls.xba
index 617685a16296..614c7d1278f6 100644
--- a/wizards/source/tools/ModuleControls.xba
+++ b/wizards/source/tools/ModuleControls.xba
@@ -275,4 +275,16 @@ Dim sProdName as String
oDialog.AppendFilter(FilterNames(i,0), FilterNames(i,1))
Next i
oDialog.SetCurrentFilter(FilterNames(0,0)
+End Sub
+
+
+Sub SwitchMousePointer(oWindowPeer as Object, bDoEnable as Boolean)
+Dim oWindowPointer as Object
+ oWindowPointer = CreateUnoService(&quot;com.sun.star.awt.Pointer&quot;)
+ If bDoEnable Then
+ oWindowPointer.SetType(com.sun.star.awt.SystemPointer.ARROW)
+ Else
+ oWindowPointer.SetType(com.sun.star.awt.SystemPointer.WAIT)
+ End If
+ oWindowPeer.SetPointer(oWindowPointer)
End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/tools/Strings.xba b/wizards/source/tools/Strings.xba
index 601ab7404d3c..553fffd2eb32 100644
--- a/wizards/source/tools/Strings.xba
+++ b/wizards/source/tools/Strings.xba
@@ -84,8 +84,12 @@ Dim SmallLen as Integer
Dim BigLen as Integer
SmallLen = Len(SmallString)
BigLen = Len(BigString)
- If Mid(BigString,BigLen + 1 - SmallLen, SmallLen) = SmallString Then
- RTrimStr = Mid(BigString,1,BigLen - SmallLen)
+ If Instr(1,BigString, SmallString) &lt;&gt; 0 Then
+ If Mid(BigString,BigLen + 1 - SmallLen, SmallLen) = SmallString Then
+ RTrimStr = Mid(BigString,1,BigLen - SmallLen)
+ Else
+ RTrimStr = BigString
+ End If
Else
RTrimStr = BigString
End If