From d4b70b34e76b1868b997082de685433779735061 Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Sat, 26 Jun 2010 12:16:59 +0100 Subject: [PATCH] sofimport error trap if ooo not installed --- openlp/plugins/songs/lib/sofimport.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/openlp/plugins/songs/lib/sofimport.py b/openlp/plugins/songs/lib/sofimport.py index 8ba5c31cf..da56580aa 100644 --- a/openlp/plugins/songs/lib/sofimport.py +++ b/openlp/plugins/songs/lib/sofimport.py @@ -42,9 +42,14 @@ if os.name == u'nt': PAGE_AFTER = 5 PAGE_BOTH = 6 else: - from com.sun.star.awt.FontWeight import BOLD - from com.sun.star.awt.FontSlant import ITALIC - from com.sun.star.style.BreakType import PAGE_BEFORE, PAGE_AFTER, PAGE_BOTH + try: + from com.sun.star.awt.FontWeight import BOLD + from com.sun.star.awt.FontSlant import ITALIC + from com.sun.star.style.BreakType import PAGE_BEFORE, PAGE_AFTER, \ + PAGE_BOTH + except ImportError: + pass + class SofImport(OooImport): """