Bug 706746 - LibreOffice Impress unable to export to png
Summary: LibreOffice Impress unable to export to png
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: libreoffice
Version: 15
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Caolan McNamara
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-22 17:21 UTC by TR Bentley
Modified: 2011-05-23 15:58 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-05-23 15:58:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.