From ef9c8d8fff2eee87b6368e340506696bbcd63746 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Mon, 13 Jan 2020 16:08:46 +0100 Subject: [PATCH] Added check for null object --- IPHRedaction/Validation.xba | 13 +++++++++---- description.xml | 2 +- releasenotes.txt | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/IPHRedaction/Validation.xba b/IPHRedaction/Validation.xba index 7d4dd5f..6832422 100644 --- a/IPHRedaction/Validation.xba +++ b/IPHRedaction/Validation.xba @@ -1,6 +1,6 @@ -Sub markZZZX +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 - + \ No newline at end of file diff --git a/description.xml b/description.xml index 0b381a5..40aa829 100644 --- a/description.xml +++ b/description.xml @@ -3,7 +3,7 @@ xmlns:dep="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink"> - + Cleaning and validation documents for publishing in html and epub with pagination diff --git a/releasenotes.txt b/releasenotes.txt index 04c9d9e..bf33378 100644 --- a/releasenotes.txt +++ b/releasenotes.txt @@ -1,2 +1,3 @@ +0.3.6 Added check for null EmbeededObject (13.01.2019) 0.0.1 (18.10.2019) initial release