From f912e831a0c8b5d7434cbf4ac536fbb347429ca4 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Fri, 4 Jun 2021 16:40:15 +0200 Subject: [PATCH] Check if no textranges selected --- ePublishing/Endnotes.xba | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ePublishing/Endnotes.xba b/ePublishing/Endnotes.xba index 68bf1aa..e74867e 100644 --- a/ePublishing/Endnotes.xba +++ b/ePublishing/Endnotes.xba @@ -19,8 +19,9 @@ Sub convertEndnotesExecution Exit Sub End If oSelections = ThisComponent.getCurrentSelection() - If IsNull(oSelections) Then - MsgBox getTranslation("something weird happened error text") + + If NOT oSelections.supportsService("com.sun.star.text.TextRanges") Then + MsgBox getTranslation("EndnotesNotFound") Exit Sub End If objectsCount = oSelections.getCount()