Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi all,

with https://bugs.freedesktop.org/show_bug.cgi?id=37889 the implementation of B-splines has been adapted to the ODF1.2 specification. The B-splines now interpolate the given points. The attached patches changes UI and help files accordingly.

I have changed files in testautomation and in offapi as well, but I don't know how to test them.

The files are simple diffs because I do not use git but build from tar balls. The patches are against LO3402.

I have tried to find all affected files, but if you know another one, please tell me.

Kind regards
Regina
--- tp_ChartType.src.original   2011-05-19 11:09:16.000000000 +0200
+++ tp_ChartType.src    2011-06-19 21:21:27.890625000 +0200
@@ -245,7 +245,7 @@
     {
         Pos = MAP_APPFONT ( POS_X_SPLINE_EXTRAS , POS_Y_SPLINES_3  ) ;
         Size = MAP_APPFONT ( SPLINES_WIDTH_METRIC_TEXT , 10 ) ;
-        Text [ en-US ] = "~Data points order" ;
+        Text [ en-US ] = "~Degree of polynomials" ;
     };
     MetricField MF_SPLINE_ORDER
     {
--- CurveStyle.idl.original     2011-05-19 13:22:56.000000000 +0200
+++ CurveStyle.idl      2011-06-19 21:24:18.640625000 +0200
@@ -49,9 +49,8 @@
      */
     CUBIC_SPLINES,
 
-    /** Data points are connected via a smoothed B-spline curve.  The
-        data points themselves are not necessarily part of to the
-        curve.
+    /** Data points are connected via a parametric, interpolating
+        B-spline curve.
      */
     B_SPLINES,
 
--- type_xy.xhp.original        2011-05-19 11:53:21.000000000 +0200
+++ type_xy.xhp 2011-06-19 21:32:25.437500000 +0200
@@ -94,7 +94,7 @@
 <emph>Cubic Spline</emph> interpolates your data points with polynomials of degree 3. The 
transitions between the polynomial pieces are smooth, having the same slope and curvature. 
</paragraph>
 <paragraph role="paragraph" id="par_id6128421" xml-lang="en-US" l10n="NEW">The 
<emph>Resolution</emph> determines how many line segments are calculated to draw a piece of 
polynomial between two data points. You can see the intermediate points if you click any data 
point.</paragraph>
 <paragraph role="paragraph" id="par_id9280373" xml-lang="en-US" l10n="NEW">
-<emph>B-Spline</emph> uses the data points as control points to form a B-spline curve. Those 
curves are built piecewise from polynomials. The <emph>Data points order</emph> sets the degree k 
of these polynomials. <comment>Besides the first and last point the curve doesn't go through the 
data points but lays inside the convex hull of each k+1 adjacent data points. Having Resolution r 
and n+1 data points, r times n uniform line segments are used to draw the whole 
curve.</comment></paragraph><comment>Regina: watch issue 72218, which would bring a change to 
UI</comment>
+<emph>B-Spline</emph> uses a parametric, interpolating B-spline curve. Those curves are built 
piecewise from polynomials. The <emph>Degree of polynomials</emph> sets the degree of these 
polynomials.</paragraph>
 <section id="relatedtopics">
 <embed href="text/shared/guide/chart_insert.xhp#chart_insert"/>
 <embed href="text/schart/01/wiz_chart_type.xhp#wiz_chart_type"/>
--- smooth_line_properties.xhp.original 2011-05-19 11:53:21.000000000 +0200
+++ smooth_line_properties.xhp  2011-06-21 21:33:03.640625000 +0200
@@ -55,22 +55,22 @@
 <list type="ordered">
 <listitem>
 <paragraph role="paragraph" id="par_id1601611" xml-lang="en-US" l10n="NEW">Select Cubic Spline or 
B-Spline.</paragraph>
-<paragraph role="paragraph" id="par_id879848" xml-lang="en-US" l10n="NEW">These are mathematical 
models that influence the display of the curves. The cubic spline line passes through all points, 
while the B-spline line connects the first and last point and passes by the intermediate 
points.</paragraph>
+<paragraph role="paragraph" id="par_id879848" xml-lang="en-US" l10n="NEW">These are mathematical 
models that influence the display of the curves. The curves are created by joining together 
segments of polynomials.</paragraph>
 </listitem>
 <listitem>
 <paragraph role="paragraph" id="par_id3464461" xml-lang="en-US" l10n="NEW">Optionally set the 
resolution. A higher value leads to a smoother line.</paragraph>
 </listitem>
 <listitem>
-<paragraph role="paragraph" id="par_id6998809" xml-lang="en-US" l10n="NEW">For B-spline lines 
optionally set the data points order.</paragraph>
+<paragraph role="paragraph" id="par_id6998809" xml-lang="en-US" l10n="NEW">For B-spline lines 
optionally set the degree of the polynomials.</paragraph>
 </listitem>
-</list><comment>1088553477 cubic spline</comment>
+</list>
 <bookmark xml-lang="en-US" branch="hid/chart2:RadioButton:DLG_SPLINE_PROPERTIES:RB_SPLINES_CUBIC" 
id="bm_id1593676" localize="false"/>
-<paragraph role="paragraph" id="par_id3424481" xml-lang="en-US" l10n="NEW"><ahelp hid="." 
visibility="hidden">Apply a cubic spline model.</ahelp></paragraph><comment>1088553478 
b-spline</comment>
+<paragraph role="paragraph" id="par_id3424481" xml-lang="en-US" l10n="NEW"><ahelp hid="." 
visibility="hidden">Apply a cubic spline model.</ahelp></paragraph>
 <bookmark xml-lang="en-US" branch="hid/chart2:RadioButton:DLG_SPLINE_PROPERTIES:RB_SPLINES_B" 
id="bm_id1243629" localize="false"/>
-<paragraph role="paragraph" id="par_id1068758" xml-lang="en-US" l10n="NEW"><ahelp hid="." 
visibility="hidden">Apply a B-spline model.</ahelp></paragraph><comment>1088559618 
resolution</comment>
+<paragraph role="paragraph" id="par_id1068758" xml-lang="en-US" l10n="NEW"><ahelp hid="." 
visibility="hidden">Apply a B-spline model.</ahelp></paragraph>
 <bookmark xml-lang="en-US" 
branch="hid/chart2:MetricField:DLG_SPLINE_PROPERTIES:MF_SPLINE_RESOLUTION" id="bm_id9044770" 
localize="false"/>
-<paragraph role="paragraph" id="par_id2320932" xml-lang="en-US" l10n="NEW"><ahelp hid="." 
visibility="hidden">Set the resolution.</ahelp></paragraph><comment>1088559617 data points 
order</comment>
+<paragraph role="paragraph" id="par_id2320932" xml-lang="en-US" l10n="NEW"><ahelp hid="." 
visibility="hidden">Set the resolution.</ahelp></paragraph>
 <bookmark xml-lang="en-US" branch="hid/chart2:MetricField:DLG_SPLINE_PROPERTIES:MF_SPLINE_ORDER" 
id="bm_id3674123" localize="false"/>
-<paragraph role="paragraph" id="par_id8638874" xml-lang="en-US" l10n="NEW"><ahelp hid="." 
visibility="hidden">Set the data points order.</ahelp></paragraph>
+<paragraph role="paragraph" id="par_id8638874" xml-lang="en-US" l10n="NEW"><ahelp hid="." 
visibility="hidden">Set the degree of the polynomials.</ahelp></paragraph>
 </body>
 </helpdocument>
--- ch2_lvl1_wizard.inc.original        2011-05-19 13:15:13.000000000 +0200
+++ ch2_lvl1_wizard.inc 2011-06-19 21:35:42.687500000 +0200
@@ -416,7 +416,7 @@
     BSpline.check        
     printlog "Set Resolution to 33"
     Resolution.SetText "33"        
-    printlog "et Data Points Order to 5"    
+    printlog "et Degree of polynomials to 5"
     DataPointsOrder.SetText "5"    
     printlog "Close 'Smooth Lines' dialog"
     if fCloseSmoothLinePropertiesOK() > 0 then
@@ -524,9 +524,9 @@
         if Resolution.GetText <> "33" then
             warnlog "Value for Resolution '33' wasn't preserved after save and reload."
         endif        
-        printlog "Check if 'Data Points Order' has value '5'"
+        printlog "Check if 'Degree of polynomials' has value '5'"
         if DataPointsOrder.GetText <> "5" then
-            warnlog "Value for Data Points Order '5' wasn't preserved after save and reload."
+            warnlog "Value for Degree of polynomials '5' wasn't preserved after save and reload."
         endif        
         printlog "Close 'Smooth Lines' dialog"
         if fCloseSmoothLinePropertiesOK() > 0 then

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.