diff options
author | Xisco Fauli <anistenis@gmail.com> | 2011-08-08 19:34:04 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-18 02:57:44 +0200 |
commit | 9ad82442fb37f42d3f2797b9594c7021aeb34de4 (patch) | |
tree | abfd71bb04b74d992f21d57dc1cc5574068493d7 /wizards/com/sun/star/wizards/document/OfficeDocument.py | |
parent | 3f92e275dafc0a54160937710cf77a9995c08cb5 (diff) |
first attempt to create the web wizard
Diffstat (limited to 'wizards/com/sun/star/wizards/document/OfficeDocument.py')
-rw-r--r-- | wizards/com/sun/star/wizards/document/OfficeDocument.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py index 70e6487b594d..62f385a61265 100644 --- a/wizards/com/sun/star/wizards/document/OfficeDocument.py +++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py @@ -66,6 +66,7 @@ class OfficeDocument(object): (implements XComponent) object ( XTextDocument, or XSpreadsheedDocument ) ''' + @classmethod def createNewDocument(self, frame, sDocumentType, preview, readonly): loadValues = range(2) loadValues[0] = uno.createUnoStruct( @@ -83,13 +84,13 @@ class OfficeDocument(object): loadValues[1].Value = True else: loadValues[1].Value = False - sURL = "private:factory/" + sDocumentType + xComponent = None try: xComponent = frame.loadComponentFromURL( - sURL, "_self", 0, loadValues) + sURL, "_self", 0, tuple(loadValues)) - except Exception, exception: + except Exception: traceback.print_exc() return xComponent @@ -255,6 +256,7 @@ class OfficeDocument(object): else: return typeDetect.getByName(type) + @classmethod def getTypeMediaDescriptor(self, xmsf, type): typeDetect = xmsf.createInstance( "com.sun.star.document.TypeDetection") |