← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~j-corwin/openlp/sof into lp:openlp

 

Jonathan Corwin has proposed merging lp:~j-corwin/openlp/sof into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)


Fix for OSX where no OpenOffice, so sofimport was failing to load.

Note, awaiting for confirmation from matthub on IRC that it fixes the problem, but merge proposing in case he does so in my absence so it can be merged.
-- 
https://code.launchpad.net/~j-corwin/openlp/sof/+merge/28556
Your team OpenLP Core is requested to review the proposed merge of lp:~j-corwin/openlp/sof into lp:openlp.
=== modified file 'openlp/plugins/songs/lib/sofimport.py'
--- openlp/plugins/songs/lib/sofimport.py	2010-05-25 16:16:43 +0000
+++ openlp/plugins/songs/lib/sofimport.py	2010-06-26 12:03:28 +0000
@@ -42,9 +42,14 @@
     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):
     """


Follow ups