Added check for null object

This commit is contained in:
Georgy Litvinov 2020-01-13 16:08:46 +01:00
parent 202c41251b
commit ef9c8d8fff
3 changed files with 11 additions and 5 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> <!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 End Sub
@ -92,7 +92,11 @@ Private Function checkGraphics
&apos; Globalscope.BasicLibraries.LoadLibrary( &quot;MRILib&quot; ) &apos; Globalscope.BasicLibraries.LoadLibrary( &quot;MRILib&quot; )
&apos; MRI draw &apos; MRI draw
If draw.supportsService(&quot;com.sun.star.text.TextEmbeddedObject&quot;) Then If draw.supportsService(&quot;com.sun.star.text.TextEmbeddedObject&quot;) Then
embeededObject = draw.getEmbeddedObject() embeededObject = draw.getEmbeddedObject()
If IsNull(embeededObject) Then
badFrame = badFrame + 1
Else
If Not embeededObject.supportsService(&quot;com.sun.star.formula.FormulaProperties&quot;) Then If Not embeededObject.supportsService(&quot;com.sun.star.formula.FormulaProperties&quot;) Then
badFrame = badFrame + 1 badFrame = badFrame + 1
Else Else
@ -100,6 +104,7 @@ Private Function checkGraphics
EndIf EndIf
EndIf EndIf
EndIf EndIf
EndIf
Next i Next i
If drawingN &lt;&gt; 0 Then If drawingN &lt;&gt; 0 Then
result = result &amp;&quot;В документе найдены рисунки (&quot; &amp; drawingN &amp; &quot;), неподходящие для публикации.&quot; &amp; chr(10) result = result &amp;&quot;В документе найдены рисунки (&quot; &amp; drawingN &amp; &quot;), неподходящие для публикации.&quot; &amp; chr(10)

View file

@ -3,7 +3,7 @@
xmlns:dep="http://openoffice.org/extensions/description/2006" xmlns:dep="http://openoffice.org/extensions/description/2006"
xmlns:xlink="http://www.w3.org/1999/xlink"> xmlns:xlink="http://www.w3.org/1999/xlink">
<identifier value="pro.litvinovg.Redaction" /> <identifier value="pro.litvinovg.Redaction" />
<version value="0.3.5" /> <version value="0.3.6" />
<platform value="all" /> <platform value="all" />
<display-name> <display-name>
<name lang="en">Cleaning and validation documents for publishing in html and epub with pagination</name> <name lang="en">Cleaning and validation documents for publishing in html and epub with pagination</name>

View file

@ -1,2 +1,3 @@
0.3.6 Added check for null EmbeededObject (13.01.2019)
0.0.1 (18.10.2019) 0.0.1 (18.10.2019)
initial release initial release