[gnumeric] Support --export-range in LaTeX export.
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Support --export-range in LaTeX export.
- Date: Wed, 8 Dec 2010 04:44:03 +0000 (UTC)
commit 7669b253be159df69ac59a1d59189d588bbec8d4
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Tue Dec 7 21:46:23 2010 -0700
Support --export-range in LaTeX export.
2010-12-07 Andreas J. Guelzow <aguelzow pyrshep ca>
* latex.c (file_saver_sheet_get_extent): new
(latex_file_save): use file_saver_sheet_get_extent
(latex_table_file_save): use file_saver_sheet_get_extent
NEWS | 1 +
plugins/html/ChangeLog | 6 ++++++
plugins/html/latex.c | 26 ++++++++++++++++++++++++--
3 files changed, 31 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index 75e6c0c..a895ce2 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Andreas:
* Permit data entry by-passing autocorrection.
* Work around OpenOffice date formatting bugs. [#636131]
* Export text formats to and import from ODF. [#636158]
+ * Support --export-range in LaTeX export.
Jean:
* Only disable the formula bar when a chart sheet is selected. [#636031]
diff --git a/plugins/html/ChangeLog b/plugins/html/ChangeLog
index 34a695f..6889d89 100644
--- a/plugins/html/ChangeLog
+++ b/plugins/html/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-07 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * latex.c (file_saver_sheet_get_extent): new
+ (latex_file_save): use file_saver_sheet_get_extent
+ (latex_table_file_save): use file_saver_sheet_get_extent
+
2010-11-25 Morten Welinder <terra gnome org>
* Release 1.10.12
diff --git a/plugins/html/latex.c b/plugins/html/latex.c
index 7af386e..3964c8a 100644
--- a/plugins/html/latex.c
+++ b/plugins/html/latex.c
@@ -1,3 +1,4 @@
+/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* latex.c
*
@@ -1163,6 +1164,27 @@ latex2e_print_hhline (GsfOutput *output, GnmStyleBorderType *clines, int n, GnmS
gsf_output_printf (output, "}\n");
}
+static GnmRange
+file_saver_sheet_get_extent (Sheet *sheet)
+{
+ GnmRangeRef *range
+ = g_object_get_data (G_OBJECT (sheet->workbook),
+ "ssconvert-range");
+ if (range) {
+ Sheet *start_sheet, *end_sheet;
+ GnmEvalPos ep;
+ GnmRange r;
+
+ gnm_rangeref_normalize (range,
+ eval_pos_init_sheet (&ep, sheet),
+ &start_sheet, &end_sheet,
+ &r);
+ if (start_sheet == sheet)
+ return r;
+ }
+ return sheet_get_extent (sheet, TRUE);
+}
+
/**
* latex_file_save : The LaTeX2e exporter plugin function.
*
@@ -1194,7 +1216,7 @@ latex_file_save (GOFileSaver const *fs, GOIOContext *io_context,
/* Get the topmost sheet and its range from the plugin function argument. */
current_sheet = wb_view_cur_sheet(wb_view);
- total_range = sheet_get_extent (current_sheet, TRUE);
+ total_range = file_saver_sheet_get_extent (current_sheet);
num_cols = total_range.end.col - total_range.start.col + 1;
@@ -1465,7 +1487,7 @@ latex_table_file_save (GOFileSaver const *fs, GOIOContext *io_context,
/* Get the topmost sheet and its range from the plugin function argument. */
current_sheet = wb_view_cur_sheet(wb_view);
- total_range = sheet_get_extent (current_sheet, TRUE);
+ total_range = file_saver_sheet_get_extent (current_sheet);
/* Step through the sheet, writing cells as appropriate. */
for (row = total_range.start.row; row <= total_range.end.row; row++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]