Bug 706746

Summary: LibreOffice Impress unable to export to png
Product: [Fedora] Fedora Reporter: TR Bentley <home>
Component: libreofficeAssignee: Caolan McNamara <caolanm>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: caolanm, dtardon, ltinkl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-23 15:58:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description TR Bentley 2011-05-22 17:21:26 UTC
Description of problem:
OpenLP has code to import and manage presentations from OpenOffice.  This has worked fine and used the python API and the document storetoURL method.
In moving for LibreOffice this code is now failing event though the documentation says that it should be able to export to a png file. 


Version-Release number of selected component (if applicable):
Latest version of F15 with all updates (not testing) applied.

How reproducible:
Every time.

Steps to Reproduce:
1.Install OpenLP and LibreOffice-impress , LibrOffice-uno and python-openoffice. 
2.start OpenLP and import a presentation 
3. import fails.
In debugging the code it fails.

        props = []
        props.append(self.create_property(u'FilterName', u'impress_png_Export'))
        props = tuple(props)
        doc = self.document
        pages = doc.getDrawPages()
        if not os.path.isdir(self.get_temp_folder()):
            os.makedirs(self.get_temp_folder())
        for idx in range(pages.getCount()):
            page = pages.getByIndex(idx)
            doc.getCurrentController().setCurrentPage(page)
            urlpath = u'%s/%s.png' % (thumbdirurl, unicode(idx + 1))
            path = os.path.join(self.get_temp_folder(),
                unicode(idx + 1) + u'.png')
            from com.sun.star.task import ErrorCodeIOException
            try:
                print "A"
                print urlpath, props
                doc.storeToURL(urlpath, props)
                print "B"
                self.convert_thumbnail(path, idx + 1)
                print "C"
                delete_file(path)
            except ErrorCodeIOException, exception:
                print "ERROR! ErrorCodeIOException %d" % exception.ErrCode
            except:
                import sys
                print sys.exc_info()
                log.exception(u'%s - Unable to store openoffice preview' % path)

  
Actual results:
An ErrorCodeIOException 2074 is thrown.  If you comment out the properties line you get an import BUT with empty images.
The problem is  props.append(self.create_property(u'FilterName', u'impress_jpg_Export'))
But it worked OK with OpenOffice.


Expected results:
a directory of png files



Additional info:

Comment 1 David Tardon 2011-05-23 07:18:45 UTC
I guess you do not have libreoffice-graphicfilter

Comment 2 TR Bentley 2011-05-23 15:58:56 UTC
This is correct and when I added it the code started to work.
Many thanks for the prompt response.