[gnumeric] Some documentation updates & Various ODF export fixes



commit 0bb3cec734af89cda1634aef65767056170b163c
Author: Andreas J. Guelzow <aguelzow math concordia ab ca>
Date:   Wed Apr 7 11:17:50 2010 -0600

    Some documentation updates & Various ODF export fixes
    
    2010-04-07  Andreas J. Guelzow <aguelzow pyrshep ca>
    	for Alexander Kahl & Sven Mantei
    
    	* analysis-solver.xml: updated
    	* analysis-statistical.xml: updated
    	* data-entry-advanced.xml: updated
    	* figures/advanced-filter-1.png: updated
    	* figures/analysistools-random-ex1.png: updated
    	* figures/analysistools-random-ex2.png: updated
    	* figures/analysistools-regression-ex1.png: updated
    	* figures/analysistools-regression-ex2.png: updated
    	* figures/analysistools-regression-ex3.png: updated
    	* figures/analysistools-regression.png: updated
    	* figures/dialog-auto-correct.png: updated
    	* figures/dialog-filter.png: updated
    	* figures/menu-context-graph.png: updated
    	* figures/number-format-dialog.png: updated
    	* figures/number-format-justification-dialog-2.png: updated
    	* figures/preferences-tools.png: updated
    	* figures/preferences-windows.png: updated
    	* figures/solver-02.png: updated
    	* figures/solver-03.png: updated
    	* figures/solver-04.png: updated
    
    2010-04-07  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* openoffice-write.c (odf_write_style_cell_properties):
    	  style:writing-mode in cell styles requires ODF 1.2
    	  style:text-align-source needs to be set here
    	(odf_write_style_paragraph_properties): not here
    	(odf_write_style_text_properties): font sizes must be lengths not
    	  just integers
    
    2010-04-07  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* options.c: add some translator comments

 NEWS                                               |    5 +
 doc/C/ChangeLog                                    |   25 +++++
 doc/C/analysis-solver.xml                          |  107 ++++----------------
 doc/C/analysis-statistical.xml                     |   16 +--
 doc/C/data-entry-advanced.xml                      |   54 +++++------
 doc/C/figures/advanced-filter-1.png                |  Bin 15173 -> 41118 bytes
 doc/C/figures/analysistools-random-ex1.png         |  Bin 73764 -> 32212 bytes
 doc/C/figures/analysistools-random-ex2.png         |  Bin 2905 -> 7413 bytes
 doc/C/figures/analysistools-regression-ex1.png     |  Bin 10002 -> 13236 bytes
 doc/C/figures/analysistools-regression-ex2.png     |  Bin 19975 -> 14522 bytes
 doc/C/figures/analysistools-regression-ex3.png     |  Bin 34776 -> 47353 bytes
 doc/C/figures/analysistools-regression.png         |  Bin 18082 -> 14148 bytes
 doc/C/figures/dialog-auto-correct.png              |  Bin 6741 -> 19437 bytes
 doc/C/figures/dialog-filter.png                    |  Bin 4288 -> 27227 bytes
 doc/C/figures/menu-context-graph.png               |  Bin 60005 -> 15081 bytes
 doc/C/figures/number-format-dialog.png             |  Bin 8711 -> 21689 bytes
 .../number-format-justification-dialog-2.png       |  Bin 11430 -> 32560 bytes
 doc/C/figures/preferences-tools.png                |  Bin 27340 -> 25567 bytes
 doc/C/figures/preferences-windows.png              |  Bin 32545 -> 34237 bytes
 doc/C/figures/solver-02.png                        |  Bin 12114 -> 16283 bytes
 doc/C/figures/solver-03.png                        |  Bin 8983 -> 19438 bytes
 doc/C/figures/solver-04.png                        |  Bin 9261 -> 21555 bytes
 plugins/fn-derivatives/ChangeLog                   |    4 +
 plugins/fn-derivatives/options.c                   |    2 +
 plugins/openoffice/ChangeLog                       |    9 ++
 plugins/openoffice/openoffice-write.c              |   32 +++++-
 26 files changed, 118 insertions(+), 136 deletions(-)
---
diff --git a/NEWS b/NEWS
index 2ff9ebe..f5b2d26 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,9 @@
 Gnumeric 1.10.2
 
+Alexander Kahl & Sven Mantei:
+
+	* Some documentation updates
+
 Andreas:
 
 	* Fix build with --disable-solver. [#612820]
@@ -10,6 +14,7 @@ Andreas:
 	  [#614031]
 	* Fix ZTEST description. [#614746]
 	* Don't write unnecessary manifest entries in ODF export.
+	* Various ODF export fixes.
 
 Morten:
 	* Improve object sizing tooltip positioning a bit.
diff --git a/doc/C/ChangeLog b/doc/C/ChangeLog
index 631c660..2421728 100644
--- a/doc/C/ChangeLog
+++ b/doc/C/ChangeLog
@@ -1,3 +1,28 @@
+2010-04-07  Andreas J. Guelzow <aguelzow pyrshep ca>
+	for Alexander Kahl & Sven Mantei
+
+	* analysis-solver.xml: updated
+	* analysis-statistical.xml: updated
+	* data-entry-advanced.xml: updated
+	* figures/advanced-filter-1.png: updated
+	* figures/analysistools-random-ex1.png: updated
+	* figures/analysistools-random-ex2.png: updated
+	* figures/analysistools-regression-ex1.png: updated
+	* figures/analysistools-regression-ex2.png: updated
+	* figures/analysistools-regression-ex3.png: updated
+	* figures/analysistools-regression.png: updated
+	* figures/dialog-auto-correct.png: updated
+	* figures/dialog-filter.png: updated
+	* figures/menu-context-graph.png: updated
+	* figures/number-format-dialog.png: updated
+	* figures/number-format-justification-dialog-2.png: updated
+	* figures/preferences-tools.png: updated
+	* figures/preferences-windows.png: updated
+	* figures/solver-02.png: updated
+	* figures/solver-03.png: updated
+	* figures/solver-04.png: updated
+
+
 2010-03-08  Morten Welinder <terra gnome org>
 
 	* Release 1.10.1
diff --git a/doc/C/analysis-solver.xml b/doc/C/analysis-solver.xml
index 2ec43b2..b049938 100644
--- a/doc/C/analysis-solver.xml
+++ b/doc/C/analysis-solver.xml
@@ -142,7 +142,7 @@
 
       <para>The model to be optimized is a linear model.  Thus, we
       should check that the check button `Linear (LP/MILP)' is pressed
-      on under the `Model Assumptions'.  Also make sure that the
+      on on the page `Model'.  Also make sure that the
       assume non-negative button is on, otherwise, the input variables
       can also take negative values.  There is also a check button
       `Assume Integer (Discrete)' which adds an integer constraint for
@@ -152,11 +152,11 @@
       <para>A few additional options can be set too.  If you want to
       limit the number of iterations the optimization algorithm is
       allowed to take you can set the maximum number in the `Max
-      iterations' entry box.  Similarly, you can limit the maximum
-      time the optimization is allowed to take in the `Max time' entry
-      box.  If either one of these settings is exceeded during the
-      optimization, the optimization is interrupted and an error
-      dialog is displayed.</para>
+      iterations' entry box on page `Options'.  Similarly, you can 
+      limit the maximum time the optimization is allowed to take in 
+      the `Max time' entry box.  If either one of these settings is 
+      exceeded during the optimization, the optimization is interrupted
+      and an error dialog is displayed.</para>
 
       <para>Some models can be better solved if the model is scaled
       into another form before the actual optimization.  Gnumeric
@@ -199,13 +199,13 @@
       left hand side (LHS) cell into the `Left Hand Side:' entry box.
       In our example, this would be E7 for the constraint #1, E8 for
       constraint #2, and so on.  The combo entry in the middle defines
-      the type of the constraint.  It can be<![CDATA[ `<=', `=', `>='
-      ]]> , or `Int'.  We will explain the `Int' constraints later.
-      In this example, you should select <![CDATA[ `<=' for
-      constraints #1-#2, `>=' ]]>for #3, and `=' for constraint #4.
-      The last entry on the right takes the right hand side values of
-      the constraints.  For constraints #1-#4 they should be G7 (5),
-      G8 (9), G9 (1), and G10 (4) in this order.</para>
+      the type of the constraint.  It can be<![CDATA[ `â?¤', `=', `â?¥'
+      ]]> ,`Int' or `Bool'.  We will explain the `Int' and `Bool' 
+      constraints later. In this example, you should select <![CDATA[ 
+      `â?¤' for constraints #1-#2, `â?¥' ]]>for #3, and `=' for 
+      constraint #4. The last entry on the right takes the right hand 
+      side values of the constraints.  For constraints #1-#4 they 
+      should be G7 (5), G8 (9), G9 (1), and G10 (4) in this order.</para>
 
       <para>After typing a constraint press
       <mousebutton>Add</mousebutton> button, and you will be able to
@@ -243,11 +243,11 @@
     <sect3 id="sect-advanced-analysis-solver-using-report">
       <title>Solver Reporting</title>
 
-      <para>Select the `Reports' page from the top of the dialog and
-      the a page containing five check buttons should appear.  By
-      pressing these check buttons on, you can produce various kinds of
-      reports.  You can read more about solver reporting in the
-      following section.</para>
+      <para>Select the `Reports' page from the top of the dialog and 
+      you will see a checkbox named `Program'. This report gives the 
+      model in its mathematical form. Program report is useful for 
+      checking out the correctness of the model.It can also be useful 
+      for educational purposes.</para>
 
     </sect3>
 
@@ -284,77 +284,6 @@
 
   </sect2>
 
-  <sect2 id="sect-advanced-analysis-solver-reports">
-    <title>Solver Reports</title>
-
-    <sect3 id="sect-advanced-analysis-solver-reports-answer">
-      <title>Answer Report</title>
-
-      <para>Answer report gives the original and final values for the
-      problem and for all the input variables and the constraints.  In
-      addition, for the constraints their formulas, binding status and
-      the slacks are printed out nicely.  The answer report is given
-      as a new sheet.</para>
-
-    </sect3>
-
-    <sect3 id="sect-advanced-analysis-solver-reports-sensitivity">
-      <title>Sensitivity Report</title>
-
-      <para>Sensitivity report gives the shadow prices for the
-      constraints.</para>
-
-      <para>Note that if the model contains integer or boolean
-      constraints, sensitivity report cannot be produced.</para>
-
-    </sect3>
-
-    <sect3 id="sect-advanced-analysis-solver-reports-limits">
-      <title>Limits Report</title>
-
-      <para>Limits report reports the achieved optimal value all the
-      input variables of the model with the optimal values and with
-      upper and lower bound for the optimal value in with the
-      particular variable could vary without changing the optimal
-      solution.</para>
-
-      <para>If an optimal value for a variable x is 4, for example,
-      and the lower bound is 2.4 and upper bound 5.9, then x could
-      take any value between 2.4 and 5.9, and still all the same
-      constraints were binding as with the optimal value 4.  In limits
-      report, you can also find the value of the target cell for both
-      upper and lower bound values for the variable.  For example, if
-      the optimal value where x is 4 leads to a profit of $5,000,
-      limits report specifies that if x is set to 2.4 the profit drops
-      to $3,640.</para>
-
-      <para>Note that if the model contains integer or boolean
-      constraints, limits report cannot be produced.</para>
-
-    </sect3>
-
-    <sect3 id="sect-advanced-analysis-solver-reports-performance">
-      <title>Performance Report</title>
-
-      <para>Performance reports gives various statistical
-      characteristics about the given model like how many variables
-      and rows it contains, and how many non-zero matrix elements it
-      has.  It also gives out the performance numbers like how much
-      computing time was required to compute the results.</para>
-
-    </sect3>
-
-    <sect3 id="sect-advanced-analysis-solver-reports-program">
-      <title>Program Report</title>
-
-      <para>Program report gives the model in its mathematical form.
-      Program report is useful for checking out the correctness of the
-      model.  It can also be useful for educational purposes.</para>
-
-    </sect3>
-
-  </sect2>
-
   <sect2 id="sect-advanced-analysis-solver-intprog">
     <title>Integer Programming</title>
 
diff --git a/doc/C/analysis-statistical.xml b/doc/C/analysis-statistical.xml
index c663d59..e7b8e59 100644
--- a/doc/C/analysis-statistical.xml
+++ b/doc/C/analysis-statistical.xml
@@ -2534,9 +2534,7 @@
   </figure>
   <para>The regression tool performs a multiple regression analysis.</para>
   <para>Enter a range or list of ranges containing the independent variables 
-  into the <quote><guilabel>X Variables:</guilabel></quote> entry. These ranges 
-  can be grouped into the various independent variables by columns, by rows, 
-  or by areas. Select the appropriate option.</para>
+  into the <quote><guilabel>X Variables:</guilabel></quote> entry.</para>
   <para>Enter a single range containing the dependent variable into the
    <quote><guilabel>Y Variable:</guilabel></quote> entry.</para>
   <para>If the ranges for the independent and dependent variables also contains 
@@ -2578,19 +2576,13 @@
     variable.</para>
 <orderedlist>
      <listitem><para>
-     Enter B1:B9,E1:E9 in the <quote><guilabel>X Variables:</guilabel></quote> 
+     Enter B1:C11 in the <quote><guilabel>X Variables:</guilabel></quote> 
      entry by typing 
      this directly into the entry or clicking in the entry field and 
-     then selecting the first part range on the sheet, typing comma, and then 
-     selecting the second range. In the latter case the 
-     entry will also contain the sheet name. </para></listitem>
+     then selecting the range on the sheet.</para></listitem>
      <listitem><para>
-     Enter A1:A9  in the <quote><guilabel>Y Variable:</guilabel></quote> 
+     Enter A1:A11  in the <quote><guilabel>Y Variable:</guilabel></quote> 
      entry. </para></listitem>
-     <listitem><para>
-     Select the <quote><guibutton>Columns</guibutton></quote> or 
-     <quote><guibutton>Areas</guibutton></quote> option 
-     since each variable is in its own column and also its own area.</para></listitem>
      <listitem><para> Select the <quote><guibutton>Labels</guibutton></quote>
      option since the first row contains labels. (see 
      <xref linkend="regression-example-2" />).</para></listitem>
diff --git a/doc/C/data-entry-advanced.xml b/doc/C/data-entry-advanced.xml
index e2e77d5..6b39126 100644
--- a/doc/C/data-entry-advanced.xml
+++ b/doc/C/data-entry-advanced.xml
@@ -292,6 +292,15 @@
          </screenshot>
        </figure>
 
+  <sect3 id="sect-dataentryadv-autocorrect-cap-days">
+     <title>Capitalize the Names of Days</title>
+
+     <para>If this correction rule is activated, the first letter of a
+     name of a day is capitalized automatically.  For example, if you
+     type `monday', it is automatically replaced by `Monday'.</para>
+
+  </sect3>
+
   <sect3 id="sect-dataentryadv-autocorrect-init-caps">
      <title>Correct TWo INitial CApitals</title>
 
@@ -306,15 +315,10 @@
 
      <para>It is possible to specify exceptions to this tool.  For
      example, you do not want the tool to replace the word `PVbonds'
-     when it is typed.  To specify exceptions, press the
-     ``Exceptions...''  button in the dialog.  This should pop up the
-     ``Auto correct exceptions'' dialog.  In this dialog, select the
-     ``INitial CApitals'' page.  In this page, type `PVbonds' into the
+     when it is typed.  To specify exceptions, type `PVbonds' into the
      ``Do not correct'' entry, and press ``Add'' button.  Now the word
      should be included in the list of exceptions.  To remove a word
-     from the list, select the word and press the ``Remove'' button.
-     If you now press ``Ok'' the exceptions in the list are
-     activated.</para>
+     from the list, select the word and press the ``Remove'' button.</para>
 
   </sect3>
 
@@ -328,27 +332,14 @@
 
      <para>It is possible to specify exceptions to this tool.  For
      example, you do not want the tool to capitalize letters after
-     acronym `i.g.'.  To specify exceptions, press the
-     ``Exceptions...''  button in the dialog.  This should pop up the
-     ``Auto correct exceptions'' dialog.  In this dialog, select the
-     ``First letter'' page.  In this page, type `i.g.' into the ``Do
+     acronym `i.g.'.  To specify exceptions, type `i.g.' into the ``Do
      not capitalize after'' entry, and press ``Add'' button.  Now the
      word should be included in the list of exceptions.  To remove a
      word from the list, select the word and press the ``Remove''
-     button.  If you now press ``Ok'' the exceptions in the list are
-     activated.</para>
+     button.</para>
 
   </sect3>
-
-  <sect3 id="sect-dataentryadv-autocorrect-cap-days">
-     <title>Capitalize the Names of Days</title>
-
-     <para>If this correction rule is activated, the first letter of a
-     name of a day is capitalized automatically.  For example, if you
-     type `monday', it is automatically replaced by `Monday'.</para>
-  </sect3>
-
-
+     
   </sect2>
 
 
@@ -387,13 +378,7 @@
      numbers.  This tool can generate random numbers from various
      probability distributions.</para>
 
-     <para>Specify the number of variables in the
-     <quote><guilabel>Number of Variables:</guilabel></quote> entry.
-     This determines the number of columns of random values to be
-     produced.</para> <para> Specify the number of random numbers for
-     each variable in the <quote><guilabel>Size of
-     Sample:</guilabel></quote> entry.  This determines the number of
-     rows of random values to be produced.</para> <para> Specify the
+          <para> Specify the
      random distribution by selecting one of the items from the random
      distribution list.  The following random distributions are
      supported: Discrete, Normal, Poisson, Exponential, Binomial,
@@ -499,6 +484,15 @@
         values for these entries are 0 and 1.</para>
         </listitem></varlistentry>
      </variablelist>
+
+     <para>Specify the number of variables in the <quote><guilabel>
+     Number of Variables:</guilabel></quote> entry on the `Options' Page.
+     This determines the number of columns of random values to be 
+     produced.</para> <para> Specify the number of random numbers for 
+     each variable in the <quote><guilabel>Size of Sample:</guilabel>
+     </quote> entry on the same page. This determines the number of rows 
+     of random values to be produced.</para> 
+
    <figure id="random-example-1">
     <title>Some Example Data for the Random Number Generation Tool</title>
     <screenshot>
diff --git a/doc/C/figures/advanced-filter-1.png b/doc/C/figures/advanced-filter-1.png
index cf91f40..12b82ec 100644
Binary files a/doc/C/figures/advanced-filter-1.png and b/doc/C/figures/advanced-filter-1.png differ
diff --git a/doc/C/figures/analysistools-random-ex1.png b/doc/C/figures/analysistools-random-ex1.png
index 49e69ee..20b23e9 100644
Binary files a/doc/C/figures/analysistools-random-ex1.png and b/doc/C/figures/analysistools-random-ex1.png differ
diff --git a/doc/C/figures/analysistools-random-ex2.png b/doc/C/figures/analysistools-random-ex2.png
index 299a484..53c202e 100644
Binary files a/doc/C/figures/analysistools-random-ex2.png and b/doc/C/figures/analysistools-random-ex2.png differ
diff --git a/doc/C/figures/analysistools-regression-ex1.png b/doc/C/figures/analysistools-regression-ex1.png
index feaf45b..c78d576 100644
Binary files a/doc/C/figures/analysistools-regression-ex1.png and b/doc/C/figures/analysistools-regression-ex1.png differ
diff --git a/doc/C/figures/analysistools-regression-ex2.png b/doc/C/figures/analysistools-regression-ex2.png
index fa0f4d7..3cb6511 100644
Binary files a/doc/C/figures/analysistools-regression-ex2.png and b/doc/C/figures/analysistools-regression-ex2.png differ
diff --git a/doc/C/figures/analysistools-regression-ex3.png b/doc/C/figures/analysistools-regression-ex3.png
index d5ffa39..34786da 100644
Binary files a/doc/C/figures/analysistools-regression-ex3.png and b/doc/C/figures/analysistools-regression-ex3.png differ
diff --git a/doc/C/figures/analysistools-regression.png b/doc/C/figures/analysistools-regression.png
index 2abe3ce..251590d 100644
Binary files a/doc/C/figures/analysistools-regression.png and b/doc/C/figures/analysistools-regression.png differ
diff --git a/doc/C/figures/dialog-auto-correct.png b/doc/C/figures/dialog-auto-correct.png
index 8b0fce6..5c36f0f 100644
Binary files a/doc/C/figures/dialog-auto-correct.png and b/doc/C/figures/dialog-auto-correct.png differ
diff --git a/doc/C/figures/dialog-filter.png b/doc/C/figures/dialog-filter.png
index 72cc51e..d56c338 100644
Binary files a/doc/C/figures/dialog-filter.png and b/doc/C/figures/dialog-filter.png differ
diff --git a/doc/C/figures/menu-context-graph.png b/doc/C/figures/menu-context-graph.png
index b75f245..8842bdc 100644
Binary files a/doc/C/figures/menu-context-graph.png and b/doc/C/figures/menu-context-graph.png differ
diff --git a/doc/C/figures/number-format-dialog.png b/doc/C/figures/number-format-dialog.png
index b6b8357..ca1e4b9 100644
Binary files a/doc/C/figures/number-format-dialog.png and b/doc/C/figures/number-format-dialog.png differ
diff --git a/doc/C/figures/number-format-justification-dialog-2.png b/doc/C/figures/number-format-justification-dialog-2.png
index dff035f..f483bf1 100644
Binary files a/doc/C/figures/number-format-justification-dialog-2.png and b/doc/C/figures/number-format-justification-dialog-2.png differ
diff --git a/doc/C/figures/preferences-tools.png b/doc/C/figures/preferences-tools.png
index d56cd30..728d680 100644
Binary files a/doc/C/figures/preferences-tools.png and b/doc/C/figures/preferences-tools.png differ
diff --git a/doc/C/figures/preferences-windows.png b/doc/C/figures/preferences-windows.png
index 06fbdee..d63af09 100644
Binary files a/doc/C/figures/preferences-windows.png and b/doc/C/figures/preferences-windows.png differ
diff --git a/doc/C/figures/solver-02.png b/doc/C/figures/solver-02.png
index 4234655..403e309 100644
Binary files a/doc/C/figures/solver-02.png and b/doc/C/figures/solver-02.png differ
diff --git a/doc/C/figures/solver-03.png b/doc/C/figures/solver-03.png
index 700cad7..91f9684 100644
Binary files a/doc/C/figures/solver-03.png and b/doc/C/figures/solver-03.png differ
diff --git a/doc/C/figures/solver-04.png b/doc/C/figures/solver-04.png
index 2cc4fa4..c7581f0 100644
Binary files a/doc/C/figures/solver-04.png and b/doc/C/figures/solver-04.png differ
diff --git a/plugins/fn-derivatives/ChangeLog b/plugins/fn-derivatives/ChangeLog
index 737ae5a..9c15017 100644
--- a/plugins/fn-derivatives/ChangeLog
+++ b/plugins/fn-derivatives/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-07  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* options.c: add some translator comments
+
 2010-03-08  Morten Welinder <terra gnome org>
 
 	* Release 1.10.1
diff --git a/plugins/fn-derivatives/options.c b/plugins/fn-derivatives/options.c
index 7aaefeb..ef9763a 100644
--- a/plugins/fn-derivatives/options.c
+++ b/plugins/fn-derivatives/options.c
@@ -455,6 +455,7 @@ static GnmFuncHelp const help_opt_bs_vega[] = {
 					"option is the rate of change of its price with "
 					"respect to volatility.")},
 	{ GNM_FUNC_HELP_NOTE, F_("Vega is the same for calls and puts.")},
+	/* xgettext:no-c-format */
 	{ GNM_FUNC_HELP_NOTE, F_("Vega is expressed as the rate of change "
 				 "of option value, per 100% volatility.")},
         { GNM_FUNC_HELP_SEEALSO, "OPT_BS,OPT_BS_DELTA,OPT_BS_RHO,OPT_BS_THETA,OPT_BS_GAMMA"},
@@ -575,6 +576,7 @@ static GnmFuncHelp const help_opt_bs_carrycost[] = {
 					"on an asset with spot price @{spot}. The elasticity of an option "
 					"is the rate of change of its price "
 					"with respect to its @{cost_of_carry}.")},
+	/* xgettext:no-c-format */
 	{ GNM_FUNC_HELP_NOTE, F_("Elasticity is expressed as the rate of change "
 				 "of the option value, per 100% volatility.")},
         { GNM_FUNC_HELP_SEEALSO, "OPT_BS,OPT_BS_DELTA,OPT_BS_RHO,OPT_BS_THETA,OPT_BS_GAMMA"},
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index b052425..e3cfac4 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,12 @@
+2010-04-07  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* openoffice-write.c (odf_write_style_cell_properties): 
+	  style:writing-mode in cell styles requires ODF 1.2
+	  style:text-align-source needs to be set here
+	(odf_write_style_paragraph_properties): not here
+	(odf_write_style_text_properties): font sizes must be lengths not
+	  just integers
+
 2010-04-06  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* openoffice-write.c (odf_write_manifest): only write a manifest
diff --git a/plugins/openoffice/openoffice-write.c b/plugins/openoffice/openoffice-write.c
index 251b441..213ee9d 100644
--- a/plugins/openoffice/openoffice-write.c
+++ b/plugins/openoffice/openoffice-write.c
@@ -741,7 +741,8 @@ odf_write_style_cell_properties (GnmOOExport *state, GnmStyle const *style)
 			/* Note that we will be setting style:writing-mode-automatic below */
 			break;
 		}
-		gsf_xml_out_add_cstr (state->xml, STYLE "writing-mode", writing_mode);
+		if (get_gsf_odf_version () > 101)
+			gsf_xml_out_add_cstr (state->xml, STYLE "writing-mode", writing_mode);
 		if (direction != NULL)
 			gsf_xml_out_add_cstr (state->xml, FOSTYLE "direction", direction);
 		gsf_xml_out_add_cstr (state->xml, STYLE "glyph-orientation-vertical", "auto");
@@ -789,6 +790,30 @@ odf_write_style_cell_properties (GnmOOExport *state, GnmStyle const *style)
 					      gnm_input_msg_get_msg (msg));		}
 	}
 
+/* Horizontal Alignment */
+	if (gnm_style_is_element_set (style, MSTYLE_ALIGN_H)) {
+		GnmHAlign align = gnm_style_get_align_h (style);
+		char const *source = NULL;
+		switch (align) {
+		case HALIGN_LEFT:
+		case HALIGN_RIGHT:
+		case HALIGN_CENTER:
+		case HALIGN_JUSTIFY:
+		        source = "fix";
+			break;
+		case HALIGN_GENERAL:
+		case HALIGN_FILL:
+		case HALIGN_CENTER_ACROSS_SELECTION:
+		case HALIGN_DISTRIBUTED:
+		default:
+			/* Note that since source is value-type, alignment should be ignored */
+                        /*(but isn't by OOo) */
+			source = "value-type";
+			break;
+		}
+		gsf_xml_out_add_cstr (state->xml, STYLE "text-align-source", source);
+	}
+
 	gsf_xml_out_end_element (state->xml); /* </style:table-cell-properties */
 
 }
@@ -808,7 +833,6 @@ odf_write_style_paragraph_properties (GnmOOExport *state, GnmStyle const *style)
 	if (gnm_style_is_element_set (style, MSTYLE_ALIGN_H)) {
 		GnmHAlign align = gnm_style_get_align_h (style);
 		char const *alignment = NULL;
-		char const *source = "fix";
 		gboolean gnum_specs = FALSE;
 		switch (align) {
 		case HALIGN_LEFT:
@@ -831,13 +855,11 @@ odf_write_style_paragraph_properties (GnmOOExport *state, GnmStyle const *style)
 			/* Note that since source is value-type, alignment should be ignored */
                         /*(but isn't by OOo) */
 			alignment = "start";
-			source = "value-type";
 			gnum_specs = TRUE;
 			break;
 		}
 		if (align != HALIGN_GENERAL)
 			gsf_xml_out_add_cstr (state->xml, FOSTYLE "text-align", alignment);
-		gsf_xml_out_add_cstr (state->xml, STYLE "text-align-source", source);
 		if (gnum_specs && state->with_extension)
 			gsf_xml_out_add_int (state->xml, GNMSTYLE "GnmHAlign", align);
 	}
@@ -915,7 +937,7 @@ odf_write_style_text_properties (GnmOOExport *state, GnmStyle const *style)
 		}
 /* Font Size */
 	if (gnm_style_is_element_set (style, MSTYLE_FONT_SIZE))
-		gsf_xml_out_add_int (state->xml, FOSTYLE "font-size",
+		odf_add_pt (state->xml, FOSTYLE "font-size",
 				     gnm_style_get_font_size (style));
 /* Foreground Color */
 	if (gnm_style_is_element_set (style, MSTYLE_FONT_COLOR))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]