[svn] r5801 - trunk/tools/unoconv
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Sat Sep 1 03:23:43 CEST 2007
Author: dag
Date: 2007-09-01 03:23:42 +0200 (Sat, 01 Sep 2007)
New Revision: 5801
Modified:
trunk/tools/unoconv/unoconv
Log:
Small changes.
Modified: trunk/tools/unoconv/unoconv
===================================================================
--- trunk/tools/unoconv/unoconv 2007-08-31 15:18:51 UTC (rev 5800)
+++ trunk/tools/unoconv/unoconv 2007-09-01 01:23:42 UTC (rev 5801)
@@ -367,13 +367,12 @@
### Test for an existing connection
try:
unocontext = resolver.resolve("uno:%s" % op.connection)
-# except NoConnectException, e:
except Exception, e:
error(2, "Existing listener not found.\n%s" % e)
### Test if we can use an Openoffice *binary* in our (modified) path
- for bin in ('boffice', 'soffice.bin', 'soffice', ):
- error(2, "Trying to launch %s as our own listener." % bin)
+ for bin in ('soffice.bin', 'soffice', ):
+ error(2, "Trying to launch our own listener using %s." % bin)
try:
oopid = os.spawnvp(os.P_NOWAIT, bin, [bin, "-nologo", "-nodefault", "-accept=%s" % op.connection]);
time.sleep(1)
@@ -383,17 +382,14 @@
error(3, "Launch of %s failed.\n%s" % (bin, e))
continue
- if not unocontext:
- die(251, "Unable to connect or start own listener. Aborting.")
+ if not unocontext:
+ die(251, "Unable to connect or start own listener. Aborting.")
### And some more OpenOffice magic
unosvcmgr = unocontext.ServiceManager
self.desktop = unosvcmgr.createInstanceWithContext("com.sun.star.frame.Desktop", unocontext)
self.cwd = unohelper.systemPathToFileUrl( os.getcwd() )
- def __del__(self):
- self.context.dispose()
-
def getformat(self, inputfn):
doctype = None
@@ -455,9 +451,9 @@
if not doc:
raise UnoException("File could not be loaded by OpenOffice", None)
- info(1, "Selected output format: %s" % outputfmt)
- info(1, "Selected ooffice filter: %s" % outputfmt.filter)
- info(1, "Used doctype: %s" % outputfmt.doctype)
+ error(1, "Selected output format: %s" % outputfmt)
+ error(1, "Selected ooffice filter: %s" % outputfmt.filter)
+ error(1, "Used doctype: %s" % outputfmt.doctype)
### Write outputfile
outputprops = (
@@ -471,7 +467,7 @@
outputfn = outputfn + '.' + outputfmt.extension
outputurl = unohelper.absolutize( self.cwd, unohelper.systemPathToFileUrl(outputfn) )
doc.storeToURL(outputurl, outputprops)
- info(1, "Output file: %s" % outputfn)
+ error(1, "Output file: %s" % outputfn)
else:
doc.storeToURL("private:stream", outputprops)
@@ -498,7 +494,7 @@
class Listener:
def __init__(self):
- info(1, "Start listener on %s:%s" % (op.server, op.port))
+ error(1, "Start listener on %s:%s" % (op.server, op.port))
for bin in ('soffice.bin', 'soffice', ):
error(2, "Warning: trying to launch %s." % bin)
try:
More information about the svn-commits
mailing list