Added check for null object
This commit is contained in:
parent
202c41251b
commit
ef9c8d8fff
3 changed files with 11 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Validation" script:language="StarBasic">Sub markZZZX
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Validation" script:language="StarBasic">Sub markZXZ
|
||||
|
||||
End Sub
|
||||
|
||||
|
@ -92,11 +92,16 @@ Private Function checkGraphics
|
|||
' Globalscope.BasicLibraries.LoadLibrary( "MRILib" )
|
||||
' MRI draw
|
||||
If draw.supportsService("com.sun.star.text.TextEmbeddedObject") Then
|
||||
|
||||
embeededObject = draw.getEmbeddedObject()
|
||||
If Not embeededObject.supportsService("com.sun.star.formula.FormulaProperties") Then
|
||||
If IsNull(embeededObject) Then
|
||||
badFrame = badFrame + 1
|
||||
Else
|
||||
'Formula
|
||||
If Not embeededObject.supportsService("com.sun.star.formula.FormulaProperties") Then
|
||||
badFrame = badFrame + 1
|
||||
Else
|
||||
'Formula
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
|
@ -181,4 +186,4 @@ Private Sub StopTracking
|
|||
args1(0).Value = true
|
||||
dispatcher.executeDispatch(document, ".uno:ShowTrackedChanges", "", 0, args1())
|
||||
End Sub
|
||||
</script:module>
|
||||
</script:module>
|
Loading…
Add table
Add a link
Reference in a new issue