Bug 112148 - Export as Images extension 0.9.3 Has BASIC syntax error
Summary: Export as Images extension 0.9.3 Has BASIC syntax error
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Extensions (show other bugs)
Version:
(earliest affected)
5.3.1.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-31 17:44 UTC by daviding
Modified: 2017-09-04 06:01 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description daviding 2017-08-31 17:44:42 UTC
In LibreOffice 5.3.1.2, I have installed the Export as Images extension 0.9.3.  

With an open presentation, I choose File ... Export as Images ... to result on the following error message:  

 Basic syntax error.
 Expected: ).

Pressing OK four times clears the error window.  

The window with the Object Catalog appears.  I see:  

My Macros and Dialogs ... Export images ... _ Export Images, with the following code:  

'Setting UrlName
	Dim sFileUrl As String
	if imgType = "jpg" then
	sFileUrl = ConvertToURL( exportPath + exportName + " - " + slideNum + ".jpg"
	endif

	if imgType = "png" then
	sFileUrl = ConvertToURL( exportPath + exportName + " - " + slideNum + ".png"
	endif

	if imgType = "gif" then
	sFileUrl = ConvertToURL( exportPath + exportName + " - " + slideNum + ".gif"
	endif

	if imgType = "bmp" then
	sFileUrl = ConvertToURL( exportPath + exportName + " - " + slideNum + ".bmp"
	endif

	if imgType = "tif" then
	sFileUrl = ConvertToURL( exportPath + exportName + " - " + slideNum + ".tif"
	endif

	if imgType = "svg" then
	sFileUrl = ConvertToURL( exportPath + exportName + " - " + slideNum + ".svg"
	endif


Just reading this, it looks to me like the closing bracket is missing on the ConvertToURL function, so I add closing brackets to 6 lines.

I save and close.  Again running File ... Export to Images ... my transformation to a series of PNG files works as expected.
Comment 1 Jean-Baptiste Faure 2017-09-03 20:39:19 UTC
Changed component to Extensions.

Considering that
- this extensions has been marked as compatible with LO 5.1 nad that nothing is said about compatibility with newer versions
- there no mean to contact its author

I suggest you to release a new version with your fix yourself if your are confident enough in your finding. GPL licensing allows that.

Best regards. JBF
Comment 2 daviding 2017-09-04 03:12:00 UTC
@Jean-Baptiste, thanks for the vote of confidence, but I'm not really a developer.  

It also turns out that adding the brackets in the way I isn't a permanent fix.  I had exited LibreOffice, and a few days later, tried another export.  The same message came back.  I added the closing right brackets as before, and the Export as Images worked.  

So, my workaround is a temporary remedy, and not a real fix.  I don't know how to make the change permanent.
Comment 3 Maxim Monastirsky 2017-09-04 06:01:13 UTC
A better idea would be to upgrade your LO to one of the latest releases (currently 5.3.6 or 5.4.1). There was a problem in version 5.3.1 wrt missing brackets (see Bug 80731), and it was corrected in later versions.