globalcitizen / anytopdf

Automatically exported from code.google.com/p/anytopdf
4 stars 1 forks source link

R3 does not solve the Ubuntu issue with the location of the macro files. #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Ubuntu 9:10
2. openoffice installed
3. run anytopdf yadda.doc yidda.pdf

What is the expected output? What do you see instead?
Expected output a pdf 
but there is an Error message 
ERROR: Unable to locate macro file.

What version of the product are you using? On what operating system?
r3 ubuntu jaunty

Please provide any additional information below.
The test for the macro ir wrong it cannot exist the first time and it will
always fail. The attached code solves the problem. It could be cleaner
using basename of the MACRO_FILE variable to point to the script.xlb but
this works.

$MACRO_FILE = $HOME . '/.openoffice.org/3/user/basic/Standar/AnyToPDF.xba';
if(! -e $HOME . '/.openoffice.org/3/user/basic/Standard/script.xlb') {
 $MACRO_FILE = $HOME . '/.ooo3/user/basic/Standard/AnyToPDF.xba';
 if(! -e $HOME . '/.ooo3/user/basic/Standard/script.xlb') {
  print "ERROR: Unable to locate macro file.\n";
  exit(1);
 }
}

Original issue reported on code.google.com by mikael.h...@gmail.com on 20 Jan 2010 at 6:05

GoogleCodeExporter commented 9 years ago
Actually it is karmic not jaunty. Forgot that i had updated.

Original comment by mikael.h...@gmail.com on 20 Jan 2010 at 6:15

GoogleCodeExporter commented 9 years ago
By the way thanks for doing this program it is really useful.

Original comment by mikael.h...@gmail.com on 21 Jan 2010 at 9:15

GoogleCodeExporter commented 9 years ago
noted an error in my correction. 
$MACRO_FILE = $HOME . '/.openoffice.org/3/user/basic/Standar/AnyToPDF.xba';
should be
$MACRO_FILE = $HOME . '/.openoffice.org/3/user/basic/Standard/AnyToPDF.xba';

Original comment by mikael.h...@gmail.com on 24 Jun 2010 at 9:22

GoogleCodeExporter commented 9 years ago
Thank you for your fix and apologies for the slow reply.  I have added commit 
access for you.  Feel free to submit the change.

Original comment by walter.stanish@gmail.com on 7 Sep 2010 at 12:37