summaryrefslogtreecommitdiff
path: root/wizards/source/importwizard/FilesModul.xba
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-06-06 13:30:49 +0000
committerRüdiger Timm <rt@openoffice.org>2008-06-06 13:30:49 +0000
commitcb56fbf425f04ede6a4d634e562bb2b53740aeaf (patch)
tree7fb00145c899a53f348b6ed910eadb10e0dbb0fb /wizards/source/importwizard/FilesModul.xba
parent2781f3d391e90c0157a7c5b8aa341b1fd4c8224d (diff)
INTEGRATION: CWS dba30c (1.46.26); FILE MERGED
2008/06/04 21:28:40 fs 1.46.26.1: BasicLibrary::getByName raises an exception now if the lib is not yet loaded
Diffstat (limited to 'wizards/source/importwizard/FilesModul.xba')
-rw-r--r--wizards/source/importwizard/FilesModul.xba26
1 files changed, 14 insertions, 12 deletions
diff --git a/wizards/source/importwizard/FilesModul.xba b/wizards/source/importwizard/FilesModul.xba
index 787c9972f40d..e7a09f3a4f63 100644
--- a/wizards/source/importwizard/FilesModul.xba
+++ b/wizards/source/importwizard/FilesModul.xba
@@ -755,18 +755,20 @@ Dim oLibrary as Object
MaxLibIndex = Ubound(oBasicLibraries.ElementNames())
For n = 0 To MaxLibIndex
LibName = oBasicLibraries.ElementNames(n)
- oLibrary = oBasicLibraries.getbyName(LibName)
- If oLibrary.hasElements() Then
- MaxModuleIndex = Ubound(oLibrary.ElementNames())
- For m = 0 To MaxModuleIndex
- ModuleName = oLibrary.ElementNames(m)
- sBasicCode = oLibrary.getbyName(ModuleName)
- If sBasicCode &lt;&gt; &quot;&quot; Then
- ConcatComment(sComment, sReeditMacro)
- CheckIfMacroExists() = True
- Exit Function
- End If
- Next m
+ If oBasicLibraries.isLibraryLoaded(LibName) Then
+ oLibrary = oBasicLibraries.getbyName(LibName)
+ If oLibrary.hasElements() Then
+ MaxModuleIndex = Ubound(oLibrary.ElementNames())
+ For m = 0 To MaxModuleIndex
+ ModuleName = oLibrary.ElementNames(m)
+ sBasicCode = oLibrary.getbyName(ModuleName)
+ If sBasicCode &lt;&gt; &quot;&quot; Then
+ ConcatComment(sComment, sReeditMacro)
+ CheckIfMacroExists() = True
+ Exit Function
+ End If
+ Next m
+ End If
End If
Next n
End If