This patch fixes bug 7897, patch against lyx 2.0.2svn

The bug consisted of two problems:

1. Error in external_templates made "export->pdflatex" not export .tex
   files for the spreadsheets. It did work for "export->latex" though.
   This part of the bug affected all documents using spreadsheets.
   Fixed by changing a line in "external_templates"

2. Error in the example itself. (Affected the example only)
   Spreadsheets were named sheet.gnumeric, sheet.ods and sheet.xls
   All three were exported to "sheet.tex", resulting in
   overwriting due to the name clash. When the export then
   tried to move the same filename three times, the last
   two failed due to the file having moved in the first
   attempt.
   Fixed by naming the example files differently,
   i.e. sheet1.gnumeric, sheet2.ods, and sheet3.xls
   After that, Makefile.am was updated with the new filenames.

While working on this, I also improved the spreadsheets themselves a
little, and I changed "openoffice" references to "libreoffice".

Attached is a patch that fixes "external_templates", the example LyX
file spreadsheet.lyx, and Makefile.am

The spreadsheets themselves are not in the patch, because they are binary. Also, they are not attached because such attachments
apparently are forbidden!

You can get the spreadsheets from:
http://www.aitel.hist.no/~helgehaf/sw/lyxsheet/sheet1.gnumeric
http://www.aitel.hist.no/~helgehaf/sw/lyxsheet/sheet2.ods
http://www.aitel.hist.no/~helgehaf/sw/lyxsheet/sheet3.xls
http://www.aitel.hist.no/~helgehaf/sw/lyxsheet/longsheet.gnumeric

The patch and the .lyx file can also be downloaded from this
folder, if necessary.

I hope this fix makes it for 2.0.2. There is one string change
in "external_templates", feel free to drop that. (It changes
openoffice to libreoffice - not so important.)

Helge Hafting
Index: lib/external_templates
===================================================================
--- lib/external_templates	(revisjon 40210)
+++ lib/external_templates	(arbeidskopi)
@@ -36,7 +36,7 @@
 Template GnumericSpreadsheet
 	GuiName "Spreadsheet"
 	HelpText
-		A spreadsheet made with gnumeric, openoffice or excel.
+		A spreadsheet made with gnumeric, libreoffice or excel.
 		It imports as a long table, so any length
 		is ok. Excessive width could be a problem.
 		The gnumeric software is necessary for conversion,
@@ -69,7 +69,7 @@
 		Requirement "multirow"
 		Requirement "hhline"
 		Requirement "ifthen"
-		ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.tex"
+		ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.tex"
 	FormatEnd
 TemplateEnd
 
Index: lib/Makefile.am
===================================================================
--- lib/Makefile.am	(revisjon 40210)
+++ lib/Makefile.am	(arbeidskopi)
@@ -273,9 +273,9 @@
 	examples/serial_letter1.lyx \
 	examples/serial_letter2.lyx \
 	examples/serial_letter3.lyx \
-	examples/sheet.gnumeric \
-	examples/sheet.ods \
-	examples/sheet.xls \
+	examples/sheet1.gnumeric \
+	examples/sheet2.ods \
+	examples/sheet3.xls \
 	examples/simplecv.lyx \
 	examples/splash.lyx \
 	examples/spreadsheet.lyx \
Index: lib/examples/longsheet.gnumeric
===================================================================
Kan ikke vises: Filen er merket som binær type.
svn:mime-type = application/octet-stream
 
Index: lib/examples/spreadsheet.lyx
===================================================================
--- lib/examples/spreadsheet.lyx	(revisjon 40210)
+++ lib/examples/spreadsheet.lyx	(arbeidskopi)
@@ -127,7 +127,7 @@
 \begin_layout Standard
 First, the file 
 \emph on
-sheet.gnumeric, 
+sheet1.gnumeric, 
 \emph default
 a spreadsheet created with Gnumeric:
 \end_layout
@@ -135,7 +135,7 @@
 \begin_layout Standard
 \begin_inset External
 	template GnumericSpreadsheet
-	filename sheet.gnumeric
+	filename sheet1.gnumeric
 
 \end_inset
 
@@ -145,15 +145,15 @@
 \begin_layout Standard
 Then 
 \emph on
-sheet.ods, 
+sheet2.ods, 
 \emph default
-which was made with OpenOffice.org:
+which was made with LibreOffice Calc:
 \end_layout
 
 \begin_layout Standard
 \begin_inset External
 	template GnumericSpreadsheet
-	filename sheet.ods
+	filename sheet2.ods
 
 \end_inset
 
@@ -163,15 +163,15 @@
 \begin_layout Standard
 Finally 
 \emph on
-sheet.xls 
+sheet3.xls 
 \emph default
-which was created with Excel.
+which was made for Excel.
 \end_layout
 
 \begin_layout Standard
 \begin_inset External
 	template GnumericSpreadsheet
-	filename sheet.xls
+	filename sheet3.xls
 
 \end_inset
 

Reply via email to