Module: GOffice

Defined in:
lib/goffice/loader.rb,
lib/goffice.rb,
lib/goffice/version.rb

Overview

Copyright (C) 2016 Ruby-GNOME2 Project Team

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Defined Under Namespace

Modules: ActionComboTextSearchDir, AnchorType, ArrowType, BasisType, CSplineType, CanvasDirection, CharmapSelTestDirection, DataFlags, Direction, DistributionType, DocControlState, DotDot, DrawingAnchorDir, FileFormatLevel, FileProbeLevel, FileSaveScope, FontScript, FormatFamily, FormatMagic, FormatNumberError, GeometryRotationType, GeometrySide, GradientDirection, GraphAxisElemType, GraphAxisMetrics, GraphAxisPolarUnit, GraphAxisPosition, GraphAxisSet, GraphAxisTickTypes, GraphAxisType, GraphDataType, GraphDimType, GraphErrorBarDirection, GraphErrorBarDisplay, GraphErrorBarType, GraphGridType, GraphMSDimType, GraphManualSizeMode, GraphObjectNamingConv, GraphObjectPosition, GraphPlotRenderingOrder, GraphRegCurveDrawingBounds, GraphSeriesFillType, GraphSeriesLabelsPos, GraphSeriesPriority, GraphWidgetSizeMode, ImageFormat, ImageType, Justification, LineDashType, LineInterpolation, MarkerShape, MimePriority, PathDirection, PathOptions, PatternType, ProgressHelperType, RegressionResult, ResourceType, Severity, SnapshotType, StyleFill, StyleFlag, UnitId, Version, _CmdContext Classes: 3DRotationSel, ActionComboColor, ActionComboPixmaps, ActionComboStack, ActionComboText, ArrowSel, CalendarButton, Canvas, CanvasArc, CanvasCircle, CanvasComponent, CanvasEllipse, CanvasGraph, CanvasGroup, CanvasImage, CanvasItem, CanvasLine, CanvasPath, CanvasPixbuf, CanvasPolygon, CanvasPolyline, CanvasRectangle, CanvasStyledItem, CanvasText, CanvasWidget, CharmapSel, CmdContext, ColorGroup, ColorPalette, ComboBox, ComboColor, ComboPixmaps, Component, ComponentMimeDialog, Data, DataMatrix, DataMatrixVal, DataScalar, DataScalarStr, DataScalarVal, DataVector, DataVectorStr, DataVectorVal, Distribution, Doc, DocControl, Emf, Error, FileOpener, FileSaver, FontSel, FontSelDialog, FormatSel, Graph3DBox, Graph3DBoxView, GraphAxis, GraphAxisBase, GraphAxisColorMap, GraphAxisLine, GraphChart, GraphChildButton, GraphColorScale, GraphDataAllocator, GraphDataEditor, GraphDataLabel, GraphDataset, GraphErrorBar, GraphGraph, GraphGraphView, GraphGrid, GraphGridLine, GraphLabel, GraphLegend, GraphObject, GraphOutlinedObject, GraphOutlinedView, GraphPlot, GraphPlotView, GraphRegCurve, GraphRegEqn, GraphRenderer, GraphSeries, GraphSeriesElement, GraphSeriesLabels, GraphSeriesLines, GraphSmoothedCurve, GraphStyledObject, GraphText, GraphTheme, GraphTrendLine, GraphView, GraphWidget, IOContext, Image, Loader, LocaleSel, Marker, MathEditor, MenuPixmaps, OptionMenu, Palette, Persist, Pixbuf, Plugin, PluginLoader, PluginLoaderModule, PluginService, PluginServiceFileOpener, PluginServiceFileSaver, PluginServiceGObjectLoader, PluginServiceGeneral, PluginServicePluginLoader, PluginServiceResource, PluginServiceSimple, RotationSel, SearchReplace, Selector, Spectre, Style, StyledObject, Svg, Undo, UndoBinary, UndoGroup, UndoUnary, View

Constant Summary collapse

CM_PER_IN =
254
COLOR_GROUP_HISTORY_SIZE =
8
EMU_PER_IN =
914400
F_OK =
0
GEOMETRY_ANGLE_TOLERANCE =
0.001000
GOFFICE_API_VERSION =
0.0
GOFFICE_MODULE_PLUGIN_MAGIC_NUMBER =
1198421357
GOG_PARAM_FORCE_SAVE =
2
GOG_PARAM_POSITION =
4
GOG_RENDERER_GRIP_SIZE =
4
GOG_RENDERER_HAIRLINE_WIDTH_PTS =
0.500000
GOG_SERIES_ACCEPT_TREND_LINE =
1
LOGFIT_C_ACCURACY =
0.000001
LOGFIT_C_RANGE_FACTOR =
100
LOGFIT_C_STEP_FACTOR =
0.050000
M_PI =
3.141593
PARAM_PERSISTENT =
1
PT_PER_IN =
72
R_OK =
4
SUBSCRIPT_RISE =
-5000
SUPERSCRIPT_RISE =
5000
UN_PER_CM =
0
UN_PER_EMU =
0
UN_PER_IN =
228600000
UN_PER_PT =
0
W_OK =
2
X_OK =
1
LOG_DOMAIN =
"GOffice"

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.const_missing(name) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/goffice.rb', line 30

def const_missing(name)
  init
  if const_defined?(name)
    const_get(name)
  else
    super
  end
end

.initObject



39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/goffice.rb', line 39

def init
  class << self
    remove_method(:init)
    remove_method(:const_missing)
  end
  Gtk.init if Gtk.respond_to?(:init)
  loader = Loader.new(self)
  loader.load("GOffice")
  init
  class << self
    remove_method(:init)
  end
end

Instance Method Details

#accumulator_add_quadl(acc, x) ⇒ nil

Parameters:

  • acc (GOffice::Accumulatorl)
  • x (GOffice::Quadl)

Returns:

  • (nil)

#accumulator_addl(acc, x) ⇒ nil

Parameters:

  • acc (GOffice::Accumulatorl)
  • x (GOffice::long double)

Returns:

  • (nil)

#accumulator_clearl(acc) ⇒ nil

Parameters:

  • acc (GOffice::Accumulatorl)

Returns:

  • (nil)

#accumulator_end(state) ⇒ nil

Parameters:

  • state (GObject)

Returns:

  • (nil)

#accumulator_endl(state) ⇒ nil

Parameters:

  • state (GObject)

Returns:

  • (nil)

#accumulator_freel(acc) ⇒ nil

Parameters:

  • acc (GOffice::Accumulatorl)

Returns:

  • (nil)

#accumulator_functionalBoolean

Returns:

  • (Boolean)

#accumulator_functionallBoolean

Returns:

  • (Boolean)

#accumulator_newGOffice::Accumulator

Returns:

  • (GOffice::Accumulator)

#accumulator_newlGOffice::Accumulatorl

Returns:

  • (GOffice::Accumulatorl)

#accumulator_startGObject

Returns:

  • (GObject)

#accumulator_startlGObject

Returns:

  • (GObject)

#accumulator_valuel(acc) ⇒ GOffice::long double

Parameters:

  • acc (GOffice::Accumulatorl)

Returns:

  • (GOffice::long double)

#add_epsilon(x) ⇒ Float

Returns the next-smaller representable value, except that zero and infinites are returned unchanged.

Parameters:

  • x (Float)

    a number

Returns:

  • (Float)

#add_epsilonl(x) ⇒ GOffice::long double

Returns the next-larger representable value, except that zero and infinites are returned unchanged.

Parameters:

  • x (GOffice::long double)

    a number

Returns:

  • (GOffice::long double)

#arrow_type_as_str(typ) ⇒ String

Parameters:

Returns:

  • (String)

#arrow_type_from_str(name) ⇒ GOffice::ArrowType

Parameters:

  • name (String)

Returns:

#ascii_strcase_equal(v, v2) ⇒ Integer

Parameters:

  • v (GObject)
  • v2 (GObject)

Returns:

  • (Integer)

#ascii_strcase_hash(v) ⇒ Integer

Parameters:

  • v (GObject)

Returns:

  • (Integer)

#ascii_strtod(s, end) ⇒ Float

Parameters:

  • s (String)
  • end (String)

Returns:

  • (Float)

#ascii_strtold(s, end) ⇒ GOffice::long double

Parameters:

  • s (String)
  • end (String)

Returns:

  • (GOffice::long double)

#atan2pi(y, x) ⇒ Float

Parameters:

  • y (Float)
  • x (Float)

Returns:

  • (Float)

#atan2pil(y, x) ⇒ GOffice::long double

Parameters:

  • y (GOffice::long double)
  • x (GOffice::long double)

Returns:

  • (GOffice::long double)

#atanpi(x) ⇒ Float

Parameters:

  • x (Float)

Returns:

  • (Float)

#atanpil(x) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)

Returns:

  • (GOffice::long double)

#atk_setup_label(label, target) ⇒ nil

A convenience routine to setup label-for/labeled-by relationship between a pair of widgets

Parameters:

  • label (Gtk::Widget)

    Gtk::Widget

  • target (Gtk::Widget)

    Gtk::Widget

Returns:

  • (nil)

#basename_from_uri(uri) ⇒ String

Decode the final path component. Returns as UTF-8 encoded suitable for display.

Parameters:

  • uri (String)

    The uri

Returns:

  • (String)

    a string that the caller is responsible for freeing.

#bezier_spline_init(x, y, n, closed) ⇒ GOffice::BezierSpline

x and y values must be valid and finite. The returned structure contains the x and y coordinates of all control points, including the incoming data. the n and closed fields are just copies of the corresponding arguments. destroyed by a call to go_bezier_spline_destroy.

Parameters:

  • x (Float)

    the x values

  • y (Float)

    the y values

  • n (Integer)

    the number of x and y values

  • closed (Boolean)

    whether to return a closed curve or not

Returns:

  • (GOffice::BezierSpline)

    a newly created struct GOBezierSpline instance which should be

#cairo_convert_data_from_pixbuf(dst, src, width, height, rowstride) ⇒ nil

Converts the pixel data stored in src in GDK_COLORSPACE_RGB pixbuf format to CAIRO_FORMAT_ARGB32 cairo format and move them to dst. If src == dst, pixel are converted in place.

Parameters:

  • dst (Integer)

    a pointer to pixel data in cairo format

  • src (Integer)

    a pointer to pixel data in pixbuf format

  • width (Integer)

    image width

  • height (Integer)

    image height

  • rowstride (Integer)

    data rowstride

Returns:

  • (nil)

#cairo_convert_data_to_pixbuf(dst, src, width, height, rowstride) ⇒ nil

Converts the pixel data stored in src in CAIRO_FORMAT_ARGB32 cairo format to GDK_COLORSPACE_RGB pixbuf format and move them to dst. If src == dst, pixel are converted in place.

Parameters:

  • dst (Integer)

    a pointer to pixel data in pixbuf format

  • src (Integer)

    a pointer to pixel data in cairo format

  • width (Integer)

    image width

  • height (Integer)

    image height

  • rowstride (Integer)

    data rowstride

Returns:

  • (nil)

#cairo_emit_svg_path(cr, path) ⇒ nil

Emits a path described as a SVG path string (d property of path elements) to a cairo context.

Parameters:

  • cr (cairo::Context)

    a cairo context

  • path (String)

    a SVG path

Returns:

  • (nil)

#cairo_surface_is_vector(surface) ⇒ Boolean

Parameters:

  • surface (cairo::Surface)

Returns:

  • (Boolean)

#color_as_str(color) ⇒ String

Parameters:

  • color (GOffice::Color)

Returns:

  • (String)

#color_from_gdk_rgba(rgbacolor, res) ⇒ GOffice::Color

Returns resulting color.

Parameters:

  • rgbacolor (Gdk::RGBA)

    Gdk::RGBA to convert

  • res (GOffice::Color)

    resulting color

Returns:

  • (GOffice::Color)

    resulting color

#color_from_str(str, res) ⇒ Boolean

Returns true if str can be parsed as a color of the form R:G:B:A and the result is stored in res.

Parameters:

  • str (String)

    String to parse

  • res (GOffice::Color)

    the parsed color

Returns:

  • (Boolean)

    true if str can be parsed as a color of the form R:G:B:A and the result is stored in res.

#color_selector_get_color(selector, is_auto) ⇒ GOffice::Color

by clicking on automatic palette item.

Parameters:

  • selector (GOffice::Selector)

    a #GOSelector

  • is_auto (Boolean)

    true if the current selection was set

Returns:

  • (GOffice::Color)

    current color selection of selector.

#color_selector_set_allow_alpha(selector, allow_alpha) ⇒ nil

Seta whether the custom colour selector should allow the use of opacity.

Parameters:

  • selector (GOffice::Selector)

    GOColor::Selector

  • allow_alpha (Boolean)

    If true, the selector will have an alpha channel.

Returns:

  • (nil)

#color_selector_set_color(selector, color) ⇒ Boolean

Sets current selection to color. An "activate" signal will be emitted.

Parameters:

  • selector (GOffice::Selector)

    GOColor::Selector to change

  • color (GOffice::Color)

    a #GOColor

Returns:

  • (Boolean)

    true if selection changed.

#color_to_gdk_rgba(color, res) ⇒ Gdk::RGBA

Returns res.

Parameters:

  • color (GOffice::Color)

    #GOColor

  • res (Gdk::RGBA)

    %GdkRGBA to change

Returns:

  • (Gdk::RGBA)

    res

#color_to_pango(color, is_fore) ⇒ Pango::Attribute

Returns the newly created Pango::Attribute.

Parameters:

  • color (GOffice::Color)

    #GOColor

  • is_fore (Boolean)

    true for foreground, false for background

Returns:

  • (Pango::Attribute)

    the newly created Pango::Attribute.

#complex_addl(dst, a, b) ⇒ nil

Parameters:

  • dst (GOffice::Complexl)
  • a (GOffice::Complexl)
  • b (GOffice::Complexl)

Returns:

  • (nil)

#complex_conjl(dst, src) ⇒ nil

Parameters:

  • dst (GOffice::Complexl)
  • src (GOffice::Complexl)

Returns:

  • (nil)

#complex_cosl(dst, src) ⇒ nil

Parameters:

  • dst (GOffice::Complexl)
  • src (GOffice::Complexl)

Returns:

  • (nil)

#complex_divl(dst, a, b) ⇒ nil

Parameters:

  • dst (GOffice::Complexl)
  • a (GOffice::Complexl)
  • b (GOffice::Complexl)

Returns:

  • (nil)

#complex_expl(dst, src) ⇒ nil

Parameters:

  • dst (GOffice::Complexl)
  • src (GOffice::Complexl)

Returns:

  • (nil)

#complex_from_stringl(dst, src, imunit) ⇒ Integer

Parameters:

  • dst (GOffice::Complexl)
  • src (String)
  • imunit (String)

Returns:

  • (Integer)

#complex_invalid_pl(src) ⇒ Integer

Parameters:

  • src (GOffice::Complexl)

Returns:

  • (Integer)

#complex_invalidl(dst) ⇒ nil

Parameters:

  • dst (GOffice::Complexl)

Returns:

  • (nil)

#complex_lnl(dst, src) ⇒ nil

Parameters:

  • dst (GOffice::Complexl)
  • src (GOffice::Complexl)

Returns:

  • (nil)

#complex_mull(dst, a, b) ⇒ nil

Parameters:

  • dst (GOffice::Complexl)
  • a (GOffice::Complexl)
  • b (GOffice::Complexl)

Returns:

  • (nil)

#complex_powl(dst, a, b) ⇒ nil

Parameters:

  • dst (GOffice::Complexl)
  • a (GOffice::Complexl)
  • b (GOffice::Complexl)

Returns:

  • (nil)

#complex_real_pl(src) ⇒ Integer

Parameters:

  • src (GOffice::Complexl)

Returns:

  • (Integer)

#complex_sinl(dst, src) ⇒ nil

Parameters:

  • dst (GOffice::Complexl)
  • src (GOffice::Complexl)

Returns:

  • (nil)

#complex_sqrtl(dst, src) ⇒ nil

Parameters:

  • dst (GOffice::Complexl)
  • src (GOffice::Complexl)

Returns:

  • (nil)

#complex_subl(dst, a, b) ⇒ nil

Parameters:

  • dst (GOffice::Complexl)
  • a (GOffice::Complexl)
  • b (GOffice::Complexl)

Returns:

  • (nil)

#complex_tanl(dst, src) ⇒ nil

Parameters:

  • dst (GOffice::Complexl)
  • src (GOffice::Complexl)

Returns:

  • (nil)

#complex_to_polar(mod, angle, src) ⇒ nil

Parameters:

  • mod (Float)
  • angle (Float)
  • src (GOffice::Complex)

Returns:

  • (nil)

#complex_to_stringl(src, reformat, imformat, imunit) ⇒ String

Parameters:

  • src (GOffice::Complexl)
  • reformat (String)
  • imformat (String)
  • imunit (GOffice::gchar)

Returns:

  • (String)

#complex_zero_pl(src) ⇒ Integer

Parameters:

  • src (GOffice::Complexl)

Returns:

  • (Integer)

#components_add_filter(chooser) ⇒ nil

Parameters:

  • chooser (Gtk::FileChooser)

Returns:

  • (nil)

#components_add_mime_type(mime, priority, service_id) ⇒ nil

Parameters:

Returns:

  • (nil)

#components_get_mime_suffix(mime) ⇒ String

Parameters:

  • mime (String)

Returns:

  • (String)

#components_get_mime_typesGLib::SList<String>

supported by at least one registered component.

Returns:

  • (GLib::SList<String>)

    the list of mime types

#components_get_priority(mime_type) ⇒ GOffice::MimePriority

Parameters:

  • mime_type (String)

Returns:

#components_set_mime_suffix(mime, suffix) ⇒ nil

Parameters:

  • mime (String)
  • suffix (String)

Returns:

  • (nil)

#components_support_clipboard(mime_type) ⇒ Boolean

Parameters:

  • mime_type (String)

Returns:

  • (Boolean)

#conf_add_monitor(node, key, monitor, data) ⇒ Integer

monitor will be called whenever the value associated with key changes.

Parameters:

  • node (GOffice::ConfNode)

    GOConf::Node

  • key (String)

    configuration key

  • monitor (GOffice::ConfMonitorFunc)

    GOMonitor::Func

  • data (GObject)

    user data

Returns:

  • (Integer)

    the signal ID.

#conf_free_node(node) ⇒ nil

Parameters:

  • node (GOffice::ConfNode)

Returns:

  • (nil)

#conf_get_bool(node, key) ⇒ Boolean

Parameters:

  • node (GOffice::ConfNode)
  • key (String)

Returns:

  • (Boolean)

#conf_get_double(node, key) ⇒ Float

Parameters:

  • node (GOffice::ConfNode)
  • key (String)

Returns:

  • (Float)

#conf_get_enum_as_str(node, key) ⇒ String

Parameters:

  • node (GOffice::ConfNode)
  • key (String)

Returns:

  • (String)

#conf_get_int(node, key) ⇒ Integer

Parameters:

  • node (GOffice::ConfNode)
  • key (String)

Returns:

  • (Integer)

#conf_get_node(parent, key) ⇒ GOffice::ConfNode

Returns the GOConf::Node associated with key.

Parameters:

  • parent (GOffice::ConfNode)

    parent node or nil

  • key (String)

    configuration key

Returns:

  • (GOffice::ConfNode)

    the GOConf::Node associated with key

#conf_get_str_list(node, key) ⇒ GLib::SList<String>

with key.

Parameters:

  • node (GOffice::ConfNode)

    GOConf::Node

  • key (String)

    configuration key

Returns:

  • (GLib::SList<String>)

    a list of strings asociated

#conf_get_string(node, key) ⇒ String

Parameters:

  • node (GOffice::ConfNode)
  • key (String)

Returns:

  • (String)

#conf_load_bool(node, key, default_val) ⇒ Boolean

Parameters:

  • node (GOffice::ConfNode)
  • key (String)
  • default_val (Boolean)

Returns:

  • (Boolean)

#conf_load_double(node, key, minima, maxima, default_val) ⇒ Float

Parameters:

  • node (GOffice::ConfNode)
  • key (String)
  • minima (Float)
  • maxima (Float)
  • default_val (Float)

Returns:

  • (Float)

#conf_load_enum(node, key, t, default_val) ⇒ Integer

Parameters:

  • node (GOffice::ConfNode)
  • key (String)
  • t (GLib::Type)
  • default_val (Integer)

Returns:

  • (Integer)

#conf_load_int(node, key, minima, maxima, default_val) ⇒ Integer

Parameters:

  • node (GOffice::ConfNode)
  • key (String)
  • minima (Integer)
  • maxima (Integer)
  • default_val (Integer)

Returns:

  • (Integer)

#conf_load_str_list(node, key) ⇒ GLib::SList<String>

with key.

Parameters:

  • node (GOffice::ConfNode)

    GOConf::Node

  • key (String)

    configuration key

Returns:

  • (GLib::SList<String>)

    a list of strings asociated

#conf_load_string(node, key) ⇒ String

Parameters:

  • node (GOffice::ConfNode)
  • key (String)

Returns:

  • (String)

#conf_remove_monitor(monitor_id) ⇒ nil

Parameters:

  • monitor_id (Integer)

Returns:

  • (nil)

#conf_set_bool(node, key, val) ⇒ nil

Parameters:

  • node (GOffice::ConfNode)
  • key (String)
  • val (Boolean)

Returns:

  • (nil)

#conf_set_double(node, key, val) ⇒ nil

Parameters:

  • node (GOffice::ConfNode)
  • key (String)
  • val (Float)

Returns:

  • (nil)

#conf_set_enum(node, key, t, val) ⇒ nil

Parameters:

  • node (GOffice::ConfNode)
  • key (String)
  • t (GLib::Type)
  • val (Integer)

Returns:

  • (nil)

#conf_set_int(node, key, val) ⇒ nil

Parameters:

  • node (GOffice::ConfNode)
  • key (String)
  • val (Integer)

Returns:

  • (nil)

#conf_set_str_list(node, key, list) ⇒ nil

Sets list as the value for key.

Parameters:

  • node (GOffice::ConfNode)

    GOConf::Node

  • key (String)

    configuration key

  • list (GLib::SList<String>)

    the list of strings to set.

Returns:

  • (nil)

#conf_set_string(node, key, str) ⇒ nil

Parameters:

  • node (GOffice::ConfNode)
  • key (String)
  • str (String)

Returns:

  • (nil)

#conf_sync(node) ⇒ nil

Parameters:

  • node (GOffice::ConfNode)

Returns:

  • (nil)

#continued_fraction(val, max_denom, res_num, res_denom) ⇒ nil

Parameters:

  • val (Float)
  • max_denom (Integer)
  • res_num (Integer)
  • res_denom (Integer)

Returns:

  • (nil)

#cospi(x) ⇒ Float

multiplication outright.

Parameters:

  • x (Float)

    a number

Returns:

  • (Float)

    the cosine of Pi times x, but with less error than doing the

#cospil(x) ⇒ GOffice::long double

multiplication outright.

Parameters:

  • x (GOffice::long double)

    a number

Returns:

  • (GOffice::long double)

    the cosine of Pi times x, but with less error than doing the

#cotpi(x) ⇒ Float

Parameters:

  • x (Float)

Returns:

  • (Float)

#cotpil(x) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)

Returns:

  • (GOffice::long double)

#coup_cd(res, settle, mat, freq, eom, next) ⇒ nil

Parameters:

  • res (GLib::Date)
  • settle (GLib::Date)
  • mat (GLib::Date)
  • freq (Integer)
  • eom (Boolean)
  • next (Boolean)

Returns:

  • (nil)

#coupdaybs(settlement, maturity, conv) ⇒ Float

Returns the number of days from the beginning of the coupon period to the settlement date.

Parameters:

  • settlement (GLib::Date)

    #GDate

  • maturity (GLib::Date)

    #GDate

  • conv (GOffice::CouponConvention)

    Go::CouponConvention

Returns:

  • (Float)

    the number of days from the beginning of the coupon period to the settlement date.

#coupdays(settlement, maturity, conv) ⇒ Float

Currently, returns negative numbers if the branch is not implemented.

Parameters:

  • settlement (GLib::Date)

    #GDate

  • maturity (GLib::Date)

    #GDate

  • conv (GOffice::CouponConvention)

    Go::CouponConvention

Returns:

  • (Float)

    the number of days in the coupon period of the settlement date.

#coupdaysnc(settlement, maturity, conv) ⇒ Float

coupon date.

Parameters:

  • settlement (GLib::Date)
  • maturity (GLib::Date)
  • conv (GOffice::CouponConvention)

    Go::CouponConvention

Returns:

  • (Float)

    the number of days from the settlement date to the next

#create_std_tags_for_buffer(buffer) ⇒ nil

Parameters:

  • buffer (Gtk::TextBuffer)

Returns:

  • (nil)

#cspline_destroyl(sp) ⇒ nil

Parameters:

  • sp (GOffice::CSplinel)

Returns:

  • (nil)

#cspline_init(x, y, n, limits, c0, cn) ⇒ GOffice::CSpline

Creates a spline structure, and computes the coefficients associated with the polynoms. The ith polynome (between x[i-1] and x[i] is: y(x) = y[i-1] + (c[i-1] + (b[i-1] + a[i] * (x - x[i-1])) * (x - x[i-1])) * (x - x[i-1]) where a[i-1], b[i-1], c[i-1], x[i-1] and y[i-1] are the corresponding members of the new structure. GO_CSPLINE_NATURAL: first and least second derivatives are 0. GO_CSPLINE_PARABOLIC: the curve will be a parabole arc outside of the limits. GO_CSPLINE_CUBIC: the curve will be cubic outside of the limits. GO_CSPLINE_CLAMPED: the first and last derivatives are imposed. destroyed by a call to go_cspline_destroy.

Parameters:

  • x (Float)

    the x values

  • y (Float)

    the y values

  • n (Integer)

    the number of x and y values

  • limits (Integer)

    how the limits must be treated, four values are allowed:

  • c0 (Float)

    the first derivative when using clamped splines, not used in the other limit types.

  • cn (Float)

    the first derivative when using clamped splines, not used in the other limit types.

Returns:

  • (GOffice::CSpline)

    a newly created GOCSpline instance which should be

#date_conv_equal(a, b) ⇒ Boolean

Parameters:

  • a (GOffice::DateConventions)
  • b (GOffice::DateConventions)

Returns:

  • (Boolean)

#date_conv_from_str(s) ⇒ GOffice::DateConventions

Parameters:

  • s (String)

Returns:

  • (GOffice::DateConventions)

#date_conv_translate(f, src, dst) ⇒ Float

Parameters:

  • f (Float)
  • src (GOffice::DateConventions)
  • dst (GOffice::DateConventions)

Returns:

  • (Float)

#date_convention_base(conv) ⇒ Integer

Parameters:

  • conv (GOffice::DateConventions)

Returns:

  • (Integer)

#date_days_between_basis(from, to, basis) ⇒ Integer

Parameters:

Returns:

  • (Integer)

#date_g_months_between(date1, date2) ⇒ Integer

Parameters:

  • date1 (GLib::Date)
  • date2 (GLib::Date)

Returns:

  • (Integer)

#date_g_to_serial(date, conv) ⇒ Integer

Parameters:

  • date (GLib::Date)
  • conv (GOffice::DateConventions)

Returns:

  • (Integer)

#date_g_years_between(date1, date2) ⇒ Integer

Parameters:

  • date1 (GLib::Date)
  • date2 (GLib::Date)

Returns:

  • (Integer)

#date_month_name(m, abbrev) ⇒ String

Parameters:

  • m (GLib::DateMonth)
  • abbrev (Boolean)

Returns:

  • (String)

#date_serial_raw_to_seconds(raw) ⇒ Integer

Parameters:

  • raw (Float)

Returns:

  • (Integer)

#date_serial_raw_to_serial(raw) ⇒ Integer

Parameters:

  • raw (Float)

Returns:

  • (Integer)

#date_serial_to_g(res, serial, conv) ⇒ nil

Parameters:

  • res (GLib::Date)
  • serial (Integer)
  • conv (GOffice::DateConventions)

Returns:

  • (nil)

#date_serial_to_timet(serial, conv) ⇒ GOffice::glong

Parameters:

  • serial (Integer)
  • conv (GOffice::DateConventions)

Returns:

  • (GOffice::glong)

#date_timet_to_seconds(t) ⇒ Integer

Parameters:

  • t (GOffice::glong)

Returns:

  • (Integer)

#date_timet_to_serial(t, conv) ⇒ Integer

Parameters:

  • t (GOffice::glong)
  • conv (GOffice::DateConventions)

Returns:

  • (Integer)

#date_timet_to_serial_raw(t, conv) ⇒ Float

Parameters:

  • t (GOffice::glong)
  • conv (GOffice::DateConventions)

Returns:

  • (Float)

#date_weekday_name(wd, abbrev) ⇒ String

Parameters:

  • wd (GLib::DateWeekday)
  • abbrev (Boolean)

Returns:

  • (String)

#date_weeknum(date, method) ⇒ Integer

1: Week starts on Sunday. January 1 is in week 1. 2: Week starts on Monday. January 1 is in week 1. 150: ISO 8601 week number.

Parameters:

  • date (GLib::Date)

    date

  • method (Integer)

    week numbering method

Returns:

  • (Integer)

    week number according to the given method.

#dcauchy(x, location, scale, give_log) ⇒ Float

Parameters:

  • x (Float)
  • location (Float)
  • scale (Float)
  • give_log (Boolean)

Returns:

  • (Float)

#dcauchyl(x, location, scale, give_log) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)
  • location (GOffice::long double)
  • scale (GOffice::long double)
  • give_log (Boolean)

Returns:

  • (GOffice::long double)

#debug_check_finalized(obj, id) ⇒ nil

Parameters:

  • obj (GObject)
  • id (String)

Returns:

  • (nil)

#debug_flag(flag) ⇒ Boolean

Parameters:

  • flag (String)

Returns:

  • (Boolean)

#destroy_password(passwd) ⇒ nil

Overwrite a string holding a password. This is a separate routine to ensure that the compiler does not try to outsmart us.

Note: this does not free the memory.

Parameters:

  • passwd (String)

    The buffer to clear

Returns:

  • (nil)

#dialog_guess_alternative_button_order(dialog) ⇒ nil

This function inspects the buttons in the dialog and comes up with a reasonable alternative dialog order.

Parameters:

  • dialog (Gtk::Dialog)

    Gtk::Dialog

Returns:

  • (nil)

#direction_get_name(d) ⇒ String

Parameters:

Returns:

  • (String)

#direction_is_forward(d) ⇒ Boolean

Returns TRUE for GO_DIRECTION_DOWN or GO_DIRECTION_RIGHT.

Parameters:

Returns:

  • (Boolean)

    TRUE for GO_DIRECTION_DOWN or GO_DIRECTION_RIGHT.

#direction_is_horizontal(d) ⇒ Boolean

Returns TRUE for GO_DIRECTION_LEFT and GO_DIRECTION_RIGHT.

Parameters:

Returns:

  • (Boolean)

    TRUE for GO_DIRECTION_LEFT and GO_DIRECTION_RIGHT.

#dirname_from_uri(uri, brief) ⇒ String

Decode the all but the final path component. Returns as UTF-8 encoded suitable for display.

Parameters:

  • uri (String)

    target

  • brief (Boolean)

    if TRUE, hide "file://" if present.

Returns:

  • (String)

    dirname which the caller is responsible for freeing.

#dlnorm(x, meanlog, sdlog, give_log) ⇒ Float

Parameters:

  • x (Float)
  • meanlog (Float)
  • sdlog (Float)
  • give_log (Boolean)

Returns:

  • (Float)

#dlnorml(x, meanlog, sdlog, give_log) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)
  • meanlog (GOffice::long double)
  • sdlog (GOffice::long double)
  • give_log (Boolean)

Returns:

  • (GOffice::long double)

#dnorm(x, mu, sigma, give_log) ⇒ Float

Parameters:

  • x (Float)
  • mu (Float)
  • sigma (Float)
  • give_log (Boolean)

Returns:

  • (Float)

#dnorml(x, mu, sigma, give_log) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)
  • mu (GOffice::long double)
  • sigma (GOffice::long double)
  • give_log (Boolean)

Returns:

  • (GOffice::long double)

#dtoa(dst, fmt, array) ⇒ nil

Parameters:

  • dst (GLib::String)
  • fmt (String)
  • array (Array)

Returns:

  • (nil)

#dweibull(x, shape, scale, give_log) ⇒ Float

Parameters:

  • x (Float)
  • shape (Float)
  • scale (Float)
  • give_log (Boolean)

Returns:

  • (Float)

#dweibulll(x, shape, scale, give_log) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)
  • shape (GOffice::long double)
  • scale (GOffice::long double)
  • give_log (Boolean)

Returns:

  • (GOffice::long double)

#error_exportGLib::Quark

Returns:

  • (GLib::Quark)

#error_importGLib::Quark

Returns:

  • (GLib::Quark)

#error_invalidGLib::Quark

Returns:

  • (GLib::Quark)

#error_systemGLib::Quark

Returns:

  • (GLib::Quark)

#exponential_regression(xss, dim, ys, n, affine, res, stat_) ⇒ GOffice::RegressionResult

Performs one-dimensional linear regressions on the input points. Fits to "y = b * m1^x1 * ... * md^xd " or equivalently to "log y = log b + x1 * log m1 + ... + xd * log md".

Parameters:

  • xss (Float)

    x-vectors (i.e. independent data)

  • dim (Integer)

    number of x-vectors

  • ys (Float)

    y-vector (dependent data)

  • n (Integer)

    number of data points

  • affine (Boolean)

    if true, a non-one multiplier is allowed

  • res (Float)

    output place for constant[0] and root1[1], root2[2],... There will be dim+1 results.

  • stat_ (GOffice::go_regression_stat_t)

    non-NULL storage for additional results.

Returns:

#exponential_regression_as_log(xss, dim, ys, n, affine, res, stat_) ⇒ GOffice::RegressionResult

Performs one-dimensional linear regressions on the input points as go_exponential_regression, but returns the logarithm of the coefficients instead or the coefficients themselves. Fits to "y = b * exp (m1x1) * ... * exp (mdxd) " or equivalently to "ln y = ln b + x1 * m1 + ... + xd * md".

Parameters:

  • xss (Float)

    x-vectors (i.e. independent data)

  • dim (Integer)

    number of x-vectors

  • ys (Float)

    y-vector (dependent data)

  • n (Integer)

    number of data points

  • affine (Boolean)

    if true, a non-one multiplier is allowed

  • res (Float)

    output place for constant[0] and root1[1], root2[2],... There will be dim+1 results.

  • stat_ (GOffice::go_regression_stat_t)

    non-NULL storage for additional results.

Returns:

#exponential_regression_as_logl(xss, dim, ys, n, affine, res, stat_) ⇒ GOffice::RegressionResult

Parameters:

  • xss (GOffice::long double)
  • dim (Integer)
  • ys (GOffice::long double)
  • n (Integer)
  • affine (Boolean)
  • res (GOffice::long double)
  • stat_ (GOffice::go_regression_stat_tl)

Returns:

#exponential_regressionl(xss, dim, ys, n, affine, res, stat_) ⇒ GOffice::RegressionResult

Parameters:

  • xss (GOffice::long double)
  • dim (Integer)
  • ys (GOffice::long double)
  • n (Integer)
  • affine (Boolean)
  • res (GOffice::long double)
  • stat_ (GOffice::go_regression_stat_tl)

Returns:

#fake_ceil(x) ⇒ Float

Parameters:

  • x (Float)

Returns:

  • (Float)

#fake_ceill(x) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)

Returns:

  • (GOffice::long double)

#fake_floor(x) ⇒ Float

Parameters:

  • x (Float)

Returns:

  • (Float)

#fake_floorl(x) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)

Returns:

  • (GOffice::long double)

#fake_round(x) ⇒ Float

Parameters:

  • x (Float)

Returns:

  • (Float)

#fake_roundl(x) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)

Returns:

  • (GOffice::long double)

#fake_trunc(x) ⇒ Float

Parameters:

  • x (Float)

Returns:

  • (Float)

#fake_truncl(x) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)

Returns:

  • (GOffice::long double)

#file_access(uri, mode) ⇒ Integer

Parameters:

  • uri (String)
  • mode (Integer)

Returns:

  • (Integer)

#file_create(uri) ⇒ Gsf::Output

Creates a file or return an error. If the file already exists, it is replaced.

Parameters:

  • uri (String)

    target uri

Returns:

  • (Gsf::Output)

    non-nil on success

#file_get_date_accessed(uri) ⇒ GOffice::glong

Parameters:

  • uri (String)

Returns:

  • (GOffice::glong)

#file_get_date_changed(uri) ⇒ GOffice::glong

Parameters:

  • uri (String)

Returns:

  • (GOffice::glong)

#file_get_date_modified(uri) ⇒ GOffice::glong

Parameters:

  • uri (String)

Returns:

  • (GOffice::glong)

#file_get_group_name(uri) ⇒ String

Parameters:

  • uri (String)

Returns:

  • (String)

#file_get_modtime(uri) ⇒ GLib::DateTime

Determine the last modification time of uri. file.

Parameters:

  • uri (String)

    The uri

Returns:

  • (GLib::DateTime)

    the modification time of the

#file_get_owner_name(uri) ⇒ String

Parameters:

  • uri (String)

Returns:

  • (String)

#file_open(uri) ⇒ Gsf::Input

Try all available methods to open a file or return an error

Parameters:

  • uri (String)

    target uri

Returns:

  • (Gsf::Input)

    non-nil on success

#file_openersGLib::List<GOffice::FileOpener>

GOFile::Opener types (do not modify list)

Returns:

#file_saversGLib::List<GOffice::FileSaver>

GOFile::Saver types (do not modify list)

Returns:

#file_split_urls(data) ⇒ GLib::SList<String>

Splits the chain into a list of URIs. Lines starting with '#' are ignored.

Parameters:

  • data (String)

    a string filled with a list of URIs separated by new lines.

Returns:

  • (GLib::SList<String>)

    the URIs list.

#filename_from_uri(uri) ⇒ String

Parameters:

  • uri (String)

Returns:

  • (String)

#filename_simplify(filename, dotdot, make_absolute) ⇒ String

Parameters:

Returns:

  • (String)

#filename_to_uri(filename) ⇒ String

Parameters:

  • filename (String)

Returns:

  • (String)

#finite(x) ⇒ Integer

Parameters:

  • x (Float)

Returns:

  • (Integer)

#finitel(x) ⇒ Integer

Parameters:

  • x (GOffice::long double)

Returns:

  • (Integer)

#font_cache_register(callback) ⇒ nil

Parameters:

  • callback (GObject::Closure)

Returns:

  • (nil)

#font_cache_unregister(callback) ⇒ nil

Parameters:

  • callback (GObject::Closure)

Returns:

  • (nil)

#fonts_list_families(context) ⇒ GLib::SList<String>

font family names.

Parameters:

  • context (Pango::Context)

    Pango::Context

Returns:

  • (GLib::SList<String>)

    a sorted list of strings of

#fonts_list_sizesGLib::SList<Integer>

sizes in Pango units. The list must be freed.

Returns:

  • (GLib::SList<Integer>)

    a sorted list of font

#format_allow_ee_markupBoolean

Returns:

  • (Boolean)

#format_allow_pi_slashBoolean

Returns:

  • (Boolean)

#format_allow_siBoolean

Returns:

  • (Boolean)

#format_default_accountingGOffice::Format

Returns the default accounting format.

Returns:

  • (GOffice::Format)

    the default accounting format

#format_default_dateGOffice::Format

Returns the default date format.

Returns:

  • (GOffice::Format)

    the default date format

#format_default_date_timeGOffice::Format

Returns the default date-and-time format.

Returns:

  • (GOffice::Format)

    the default date-and-time format

#format_default_moneyGOffice::Format

Returns the default monetary format.

Returns:

  • (GOffice::Format)

    the default monetary format

#format_default_percentageGOffice::Format

Returns the default percentage format.

Returns:

  • (GOffice::Format)

    the default percentage format

#format_default_timeGOffice::Format

Returns the default time format.

Returns:

  • (GOffice::Format)

    the default time format

#format_emptyGOffice::Format

Returns the empty format.

Returns:

  • (GOffice::Format)

    the empty format

#format_foreach(func, user_data) ⇒ nil

Executes func for each registered #GOFormat

Parameters:

  • func (GLib::HFunc)

    function to execute for each known format

  • user_data (GObject)

    user data for func

Returns:

  • (nil)

#format_generalGOffice::Format

Returns the general format.

Returns:

  • (GOffice::Format)

    the general format

#format_generate_number_str(dst, min_digits, num_decimals, thousands_sep, negative_red, negative_paren, prefix, postfix) ⇒ nil

Generates a format string for a number format with the given parameters and appends it to dst.

Parameters:

  • dst (GLib::String)

    GString to append format string to.

  • min_digits (Integer)

    minimum number of digits before decimal separator.

  • num_decimals (Integer)

    number of decimals

  • thousands_sep (Boolean)

    if true, use a thousands separator.

  • negative_red (Boolean)

    if true, make negative values red.

  • negative_paren (Boolean)

    if true, enclose negative values in parentheses.

  • prefix (String)

    optional string to place before number part of the format

  • postfix (String)

    optional string to place after number part of the format

Returns:

  • (nil)

#format_generate_str(dst, details) ⇒ nil

Parameters:

  • dst (GLib::String)
  • details (GOffice::FormatDetails)

Returns:

  • (nil)

#format_locale_currencyGOffice::FormatCurrency

Returns The GOFormat::Currency matches the current locale.

Returns:

  • (GOffice::FormatCurrency)

    The GOFormat::Currency matches the current locale.

#format_measure_pango(str, layout) ⇒ Integer

Parameters:

  • str (GLib::String)
  • layout (Pango::Layout)

Returns:

  • (Integer)

#format_measure_strlen(str, layout) ⇒ Integer

Parameters:

  • str (GLib::String)
  • layout (Pango::Layout)

Returns:

  • (Integer)

#format_measure_zero(str, layout) ⇒ Integer

Parameters:

  • str (GLib::String)
  • layout (Pango::Layout)

Returns:

  • (Integer)

#format_output_to_odf(xout, fmt, cond_part, name, with_extension) ⇒ Boolean

Parameters:

  • xout (Gsf::XMLOut)
  • fmt (GOffice::Format)
  • cond_part (Integer)
  • name (String)
  • with_extension (Boolean)

Returns:

  • (Boolean)

#format_palette_color_of_index(i) ⇒ GOffice::Color

Parameters:

  • i (Integer)

Returns:

  • (GOffice::Color)

#format_palette_index_from_color(c) ⇒ Integer

sense.

Parameters:

  • c (GOffice::Color)

    color

Returns:

  • (Integer)

    the index of the color closest to the argument color in some

#format_palette_name_of_index(i) ⇒ String

Parameters:

  • i (Integer)

Returns:

  • (String)

#format_str_delocalize(str) ⇒ String

De-localizes the given format string, i.e., changes locale's decimal separators to dots and performs other such transformations.

Parameters:

  • str (String)

    A valid localized format string

Returns:

  • (String)

    a non-local format string, or nil if the format was not valid.

#format_str_localize(str) ⇒ String

Localizes the given format string, i.e., changes decimal dots to the locale's notion of that and performs other such transformations.

Parameters:

  • str (String)

    A valid format string

Returns:

  • (String)

    a localized format string, or nil if the format was not valid.

#format_value_gstring(layout, str, measure, metrics, fmt, val, type, sval, go_color, col_width, date_conv, unicode_minus) ⇒ GOffice::FormatNumberError

Render a floating-point value into layout in such a way that the layouting width does not needlessly exceed col_width. Optionally use unicode minus instead of hyphen.

Parameters:

  • layout (Pango::Layout)

    Optional PangoLayout, probably preseeded with font attribute.

  • str (GLib::String)

    a GString to store (not append!) the resulting string in.

  • measure (GOffice::FormatMeasure)

    Function to measure width of string/layout.

  • metrics (GOffice::FontMetrics)

    Font metrics corresponding to mesaure.

  • fmt (GOffice::Format)

    #GOFormat

  • val (Float)

    floating-point value. Must be finite.

  • type (GOffice::gchar)

    a format character

  • sval (String)

    a string to append to str after val

  • go_color (GOffice::Color)

    a color to rende

  • col_width (Integer)

    intended max width of layout in pango units. -1 means no restriction.

  • date_conv (GOffice::DateConventions)

    GODate::Conventions

  • unicode_minus (Boolean)

    Use unicode minuses, not hyphens.

Returns:

#fourier_fft(in, n, skip, fourier, inverse) ⇒ nil

Parameters:

  • in (GOffice::Complex)
  • n (Integer)
  • skip (Integer)
  • fourier (GOffice::Complex)
  • inverse (Boolean)

Returns:

  • (nil)

#fourier_fftl(in, n, skip, fourier, inverse) ⇒ nil

Parameters:

  • in (GOffice::Complexl)
  • n (Integer)
  • skip (Integer)
  • fourier (GOffice::Complexl)
  • inverse (Boolean)

Returns:

  • (nil)

#gdk_pixbuf_get_from_cache(filename) ⇒ GdkPixbuf::Pixbuf

Retrieves a pixbuf from the image cache, loading it from the file filename located in goffice_icon_dir if not cached yet.

Parameters:

  • filename (String)

    pixbuf filename

Returns:

  • (GdkPixbuf::Pixbuf)

    a GdkPixbuf, NULL on error.

#gdk_pixbuf_load_from_file(filename) ⇒ GdkPixbuf::Pixbuf

Utility routine to create pixbufs from file name in the goffice_icon_dir. As a special case, filename may have the form "res:" in which case the resource manager is queried instead of loading a file.

Parameters:

  • filename (String)

    pixbuf filename

Returns:

  • (GdkPixbuf::Pixbuf)

    a GdkPixbuf that the caller is responsible for.

#geometry_AABR_add(aabr0, aabr1) ⇒ nil

Computes the Axis Aligned Bounding Rectangle of aabr0 and aabr1, and stores result in aabr0.

Parameters:

  • aabr0 (GOffice::GeometryAABR)

    a GOGeometry::AABR

  • aabr1 (GOffice::GeometryAABR)

    a GOGeometry::AABR

Returns:

  • (nil)

#geometry_calc_label_anchor(obr, alpha) ⇒ GOffice::GeometrySide

Returns computed label anchor, to be used by go_geometry_calc_label_position.

Parameters:

  • obr (GOffice::GeometryOBR)

    bounding rectangle of label

  • alpha (Float)

    angle of axis

Returns:

#geometry_calc_label_position(obr, alpha, offset, side, anchor) ⇒ GOffice::GeometrySide

Convenience routine that computes position of a label relative to an axis.

Parameters:

  • obr (GOffice::GeometryOBR)

    bounding rectangle of label

  • alpha (Float)

    angle of axis

  • offset (Float)

    minimum distance between label and axis

  • side (GOffice::GeometrySide)

    side of label with respect to axis

  • anchor (GOffice::GeometrySide)

    where to anchor the label

Returns:

#geometry_cartesian_to_polar(x, y, rho, theta) ⇒ nil

Converts cartesion coordinates to polar coordinates.

Parameters:

  • x (Float)

    cartesian coordinate

  • y (Float)

    cartesian coordinate

  • rho (Float)

    polar coordinate

  • theta (Float)

    polar coordinate

Returns:

  • (nil)

#geometry_get_rotation_type(alpha) ⇒ GOffice::GeometryRotationType

Calculates rotation type for handling of special angles (alpha = n * pi / 2)

Parameters:

  • alpha (Float)

    angle in radians

Returns:

#geometry_OBR_to_AABR(obr, aabr) ⇒ nil

Stores Axis Aligned Bounding Rectangle of obr in aabr.

Parameters:

  • obr (GOffice::GeometryOBR)

    a GOGeometry::OBR

  • aabr (GOffice::GeometryAABR)

    a GOGeometry::AABR

Returns:

  • (nil)

#geometry_point_to_segment(xp, yp, xs, ys, w, h) ⇒ Float

Returns the distance between a point and a segment.

Parameters:

  • xp (Float)

    point coordinate

  • yp (Float)

    point coordinate

  • xs (Float)

    segment start coordinate

  • ys (Float)

    segment start coordinate

  • w (Float)

    extent of segment

  • h (Float)

    extent of segment

Returns:

  • (Float)

    the distance between a point and a segment.

#geometry_test_OBR_overlap(obr0, obr1) ⇒ Boolean

Overlap test of Oriented Bounding Rectangles by the separating axis method.

Parameters:

  • obr0 (GOffice::GeometryOBR)

    a GOGeometry::OBR

  • obr1 (GOffice::GeometryOBR)

    a GOGeometry::OBR

Returns:

  • (Boolean)

    true if OOBRs overlap

#get_file_permissions(uri) ⇒ GOffice::FilePermissions

Parameters:

  • uri (String)

Returns:

  • (GOffice::FilePermissions)

#get_mime_type(uri) ⇒ String

be freed with g_free().

Parameters:

  • uri (String)

    the uri.

Returns:

  • (String)

    the mime type for the file as a newly allocated string. Needs to

#get_mime_type_for_data(data, data_size) ⇒ String

be freed with g_free().

Parameters:

  • data (GObject)

    the data.

  • data_size (Integer)

    the data size

Returns:

  • (String)

    the mime type for the data as a newly allocated string. Needs to

#gog_axis_map(map, value) ⇒ Float

Converts value to plot coordinates. A value in [0,1.0] range means a data within axis bounds.

Parameters:

  • map (GOffice::GraphAxisMap)

    a Gog::AxisMap

  • value (Float)

    value to map to plot space.

Returns:

  • (Float)

    mapped value.

#gog_guru(graph, dalloc, cc, closure) ⇒ Gtk::Widget

CHANGED 0.5.3 : drop the toplevel window argument and have the callers handle widget_show and set_transient

Parameters:

Returns:

  • (Gtk::Widget)

    the dialog, and shows new graph guru.

#gog_guru_add_custom_widget(guru, custom) ⇒ nil

Parameters:

  • guru (Gtk::Widget)
  • custom (Gtk::Widget)

Returns:

  • (nil)

#gog_guru_get_help_button(guru) ⇒ Gtk::Widget

Quick utility to allow application specific help. Required until we clean up the relationship between goffice and gnumeric to decide which parts of the help live where.

Parameters:

  • guru (Gtk::Widget)

    Gtk::Widget (the result of gog_guru).

Returns:

  • (Gtk::Widget)

    Gtk::Widget associated with the gurus help button.

#gog_style_newGOffice::GraphStyle

Returns the new Gog::Style.

Returns:

  • (GOffice::GraphStyle)

    the new Gog::Style

#gog_xml_read_state_get_obj(xin) ⇒ GOffice::GraphObject

Returns the laset rerad Gog::Object.

Parameters:

  • xin (Gsf::XMLIn)

    Gsf::XMLIn

Returns:

#gradient_dir_as_str(dir) ⇒ String

Parameters:

Returns:

  • (String)

#gradient_dir_from_str(name) ⇒ GOffice::GradientDirection

Parameters:

  • name (String)

Returns:

#gradient_selector_set_colors(selector, start, stop) ⇒ nil

Parameters:

Returns:

  • (nil)

#gtk_builder_combo_box_init_text(gui, widget_name) ⇒ Gtk::ComboBox

searches the Gtk::ComboBox in gui and ensures it has a model and a renderer appropriate for using with #gtk_combo_box_append_text and friends.

Parameters:

  • gui (Gtk::Builder)

    the Gtk::Builder

  • widget_name (String)

    the name of the combo box in the ui file.

Returns:

  • (Gtk::ComboBox)

    the Gtk::ComboBox or nil

#gtk_builder_get_widget(gui, widget_name) ⇒ Gtk::Widget

Simple wrapper to #gtk_builder_get_object which returns the object as a GtkWidget.

Parameters:

  • gui (Gtk::Builder)

    the Gtk::Builder

  • widget_name (String)

    the name of the combo box in the ui file.

Returns:

  • (Gtk::Widget)

    a new Gtk::Widget or nil

#gtk_builder_group_value(gui, group) ⇒ Integer

Parameters:

  • gui (Gtk::Builder)
  • group (String)

Returns:

  • (Integer)

#gtk_builder_load(uifile, domain, gcc) ⇒ Gtk::Builder

Simple utility to open ui files

Since 0.9.6 uifile should be one of these:

res:NAME -- data from resource manager data:DATA -- data right here filename -- data from local file

Data may be compressed, regardless of source.

Parameters:

  • uifile (String)

    the name of the file load

  • domain (String)

    the translation domain

  • gcc (GOffice::CmdContext)

    GOCmd::Context

Returns:

  • (Gtk::Builder)

    a new Gtk::Builder or nil

#gtk_builder_load_internal(uifile, domain, gcc) ⇒ Gtk::Builder

Simple utility to open ui files Variant of go_gtk_builder_new that searchs goffice directories for files. uifile should be one of these:

res:NAME -- data from resource manager data:DATA -- data right here filename -- data from local file

Data may be compressed, regardless of source.

Parameters:

  • uifile (String)

    the name of the file load

  • domain (String)

    the translation domain

  • gcc (GOffice::CmdContext)

    GOCmd::Context

Returns:

  • (Gtk::Builder)

    a new Gtk::Builder or nil

#gtk_builder_signal_connect(gui, instance_name, detailed_signal, c_handler, data) ⇒ GOffice::gulong

Convenience wrapper around g_signal_connect for GtkBuilder.

Parameters:

  • gui (Gtk::Builder)

    Gtk::Builder

  • instance_name (String)

    widget name

  • detailed_signal (String)

    signal name

  • c_handler (GObject::Callback)

    #GCallback

  • data (GObject)

    arbitrary

Returns:

  • (GOffice::gulong)

    The signal id

#gtk_builder_signal_connect_swapped(gui, instance_name, detailed_signal, c_handler, data) ⇒ GOffice::gulong

Convenience wrapper around g_signal_connect_swapped for GtkBuilder.

Parameters:

  • gui (Gtk::Builder)

    Gtk::Builder

  • instance_name (String)

    widget name

  • detailed_signal (String)

    signal name

  • c_handler (GObject::Callback)

    #GCallback

  • data (GObject)

    arbitary

Returns:

  • (GOffice::gulong)

    The signal id

#gtk_button_build_with_stock(text, stock_id) ⇒ Gtk::Widget

FROM : gedit Creates a new GtkButton with custom label and stock image.

Parameters:

  • text (String)

    button label

  • stock_id (String)

    icon name (or stock id)

Returns:

  • (Gtk::Widget)

    newly created button

#gtk_combo_box_append_text(combo, str) ⇒ nil

Parameters:

  • combo (Gtk::ComboBox)
  • str (String)

Returns:

  • (nil)

#gtk_combo_box_remove_text(combo, position) ⇒ nil

Parameters:

  • combo (Gtk::ComboBox)
  • position (Integer)

Returns:

  • (nil)

#gtk_dialog_add_button(dialog, text, stock_id, response_id) ⇒ Gtk::Widget

FROM : gedit Creates and adds a button with stock image to the action area of an existing dialog.

Parameters:

  • dialog (Gtk::Dialog)

    dialog you want to add a button

  • text (String)

    button label

  • stock_id (String)

    stock icon id

  • response_id (Integer)

    respond id when button clicked

Returns:

  • (Gtk::Widget)

    newly created button

#gtk_dialog_run(dialog, parent) ⇒ Integer

Pop up a dialog as child of a window.

Parameters:

  • dialog (Gtk::Dialog)

    Gtk::Dialog

  • parent (Gtk::Window)

    Gtk::Window

Returns:

  • (Integer)

    result ID.

#gtk_editable_enters(window, w) ⇒ nil

Normally if there's an editable widget (such as Gtk::Entry) in your dialog, pressing Enter will activate the editable rather than the default dialog button. However, in most cases, the user expects to type something in and then press enter to close the dialog. This function enables that behavior.

Parameters:

  • window (Gtk::Window)

    Gtk::Window

  • w (Gtk::Widget)

    Gtk::Widget

Returns:

  • (nil)

#gtk_file_sel_dialog(toplevel, w) ⇒ Boolean

Runs a modal dialog to select a file.

Parameters:

  • toplevel (Gtk::Window)

    Gtk::Window

  • w (Gtk::Widget)

    Gtk::Widget

Returns:

  • (Boolean)

    true if a file was selected.

#gtk_grid_remove_row(grid, row) ⇒ nil

Parameters:

  • grid (Gtk::Grid)
  • row (Integer)

Returns:

  • (nil)

#gtk_help_button_init(w, data_dir, app, link) ⇒ nil

Parameters:

  • w (Gtk::Widget)
  • data_dir (String)
  • app (String)
  • link (String)

Returns:

  • (nil)

#gtk_nonmodal_dialog(toplevel, dialog) ⇒ nil

Utility to set dialog as a transient of toplevel and to set up a handler for "Escape"

Parameters:

  • toplevel (Gtk::Window)

    Gtk::Window

  • dialog (Gtk::Window)

    Gtk::Window

Returns:

  • (nil)

#gtk_notice_dialog(parent, type, format, array) ⇒ nil

Parameters:

  • parent (Gtk::Window)
  • type (Gtk::MessageType)
  • format (String)
  • array (Array)

Returns:

  • (nil)

#gtk_notice_nonmodal_dialog(parent, ref, type, format, array) ⇒ nil

Parameters:

  • parent (Gtk::Window)
  • ref (Gtk::Widget)
  • type (Gtk::MessageType)
  • format (String)
  • array (Array)

Returns:

  • (nil)

#gtk_query_yes_no(toplevel, default_answer, format, array) ⇒ Boolean

Parameters:

  • toplevel (Gtk::Window)
  • default_answer (Boolean)
  • format (String)
  • array (Array)

Returns:

  • (Boolean)

#gtk_select_image(toplevel, initial) ⇒ String

Parameters:

  • toplevel (Gtk::Window)
  • initial (String)

Returns:

  • (String)

#gtk_select_image_with_extra_widget(toplevel, initial, extra) ⇒ String

Parameters:

  • toplevel (Gtk::Window)
  • initial (String)
  • extra (Gtk::Widget)

Returns:

  • (String)

#gtk_url_is_writeable(parent, uri, overwrite_by_default) ⇒ Boolean

Check if it makes sense to try saving. If it's an existing file and writable for us, ask if we want to overwrite. We check for other problems, but if we miss any, the saver will report. So it doesn't have to be bulletproof.

FIXME: The message boxes should really be children of the file selector, not the workbook.

Parameters:

  • parent (Gtk::Window)

    Gtk::Window

  • uri (String)

    the uri to test.

  • overwrite_by_default (Boolean)

    gboolean

Returns:

  • (Boolean)

    true if url is writable

#gtk_url_show(url, screen) ⇒ GLib::Error

This function is a simple convenience wrapper for #gtk_show_uri. went wrong.

Parameters:

  • url (String)

    the url to show

  • screen (Gdk::Screen)

    screen to show the uri on or nil for the default screen

Returns:

  • (GLib::Error)

    nil on sucess, or a newly allocated #GError if something

#gtk_widget_disable_focus(w) ⇒ nil

Convenience wrapper to disable focus on a container and it's children.

Parameters:

  • w (Gtk::Widget)

    Gtk::Widget

Returns:

  • (nil)

#gtk_widget_render_icon_pixbuf(widget, icon_name, size) ⇒ GdkPixbuf::Pixbuf

This function works as gtk_widget_render_icon_pixbuf except that it takes an icon name, not a stock id.

Parameters:

  • widget (Gtk::Widget)

    a mapped widget determining the screen targeted

  • icon_name (String)

    the name of the icon to render

  • size (Gtk::IconSize)

    the symbolic size desired.

Returns:

  • (GdkPixbuf::Pixbuf)

    A Gdk::Pixbuf.

#gtk_widget_replace(victim, replacement) ⇒ nil

Parameters:

  • victim (Gtk::Widget)
  • replacement (Gtk::Widget)

Returns:

  • (nil)

#gtk_window_set_transient(toplevel, window) ⇒ nil

Make the window a child of the workbook in the command context, if there is one. The function duplicates the positioning functionality in gnome_dialog_set_parent, but does not require the transient window to be a GnomeDialog.

Parameters:

  • toplevel (Gtk::Window)

    The calling window

  • window (Gtk::Window)

    the transient window

Returns:

  • (nil)

#guess_encoding(raw, len, user_guess, utf8_str, truncated) ⇒ String

Parameters:

  • raw (String)
  • len (Integer)
  • user_guess (String)
  • utf8_str (GLib::String)
  • truncated (Integer)

Returns:

  • (String)

#gui_get_image_save_info(toplevel, supported_formats, ret_format, resolution) ⇒ String

Opens a file chooser and lets user choose file URI and format in a list of supported ones.

Parameters:

  • toplevel (Gtk::Window)

    a Gtk::Window

  • supported_formats (GLib::SList<nil>)

    a #GSList of supported file formats

  • ret_format (GOffice::ImageFormat)

    default file format

  • resolution (Float)

    export resolution

Returns:

  • (String)

    file URI string, file GOImage::Format stored in ret_format, and export resolution in resolution.

#hash_keys(hash) ⇒ GLib::SList<nil>

Collects an unordered list of the keys in hash. caller needs to free. The content has not additional references added

Note: consider using g_hash_table_get_keys instead.

Parameters:

  • hash (GLib::HashTable<GObject>)

    GHash::Table

Returns:

  • (GLib::SList<nil>)

    a list which the

#initnil

Initialize GOffice.

This function can be called several times; each call will increment a reference counter. Code that calls this function should call libgoffice_shutdown() when done to decrement the counter.

Returns:

  • (nil)

#io_count_progress_set(io_context, total, step) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_count_progress_update(io_context, inc) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_error_clear(ioc) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_error_display(ioc) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_error_info_set(ioc, error) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_error_occurred(ioc) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)

#io_error_push(ioc, error) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_error_string(ioc, str) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_error_unknown(ioc) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_progress_message(io_context, msg) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_progress_range_pop(io_context) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_progress_range_push(io_context, min, max) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_progress_unset(io_context) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_progress_update(io_context, f) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_value_progress_set(io_context, total, step) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_value_progress_update(io_context, value) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_warning(ioc, fmt, array) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_warning_occurred(ioc) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)

#io_warning_unknown_font(ioc, font_name) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_warning_unknown_function(ioc, funct_name) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_warning_unsupported_feature(ioc, feature) ⇒ nil

Parameters:

Returns:

  • (nil)

#io_warning_varargs(ioc, fmt, args) ⇒ nil

Parameters:

Returns:

  • (nil)

#line_dash_as_label(type) ⇒ String

Returns a pointer to the user readable name of the dash type, or the name of %GO_LINE_NONE if type is invalid. The returned string should not be freed.

Parameters:

Returns:

  • (String)

    a pointer to the user readable name of the dash type, or the name of %GO_LINE_NONE if type is invalid. The returned string should not be freed.

#line_dash_as_str(type) ⇒ String

Returns a pointer to the nickname of the dash type, or "none" if type is invalid. The returning string should not be freed.

Parameters:

Returns:

  • (String)

    a pointer to the nickname of the dash type, or "none" if type is invalid. The returning string should not be freed.

#line_dash_from_str(name) ⇒ GOffice::LineDashType

Returns a GOLine::DashType corresponding to name, or %GO_LINE_NONE if not found.

Parameters:

  • name (String)

    Name of the dash type

Returns:

#line_dash_get_length(type) ⇒ Float

Returns the unscaled length of the dash sequence.

Parameters:

Returns:

  • (Float)

    the unscaled length of the dash sequence.

#line_dash_get_sequence(type, scale) ⇒ GOffice::LineDashSequence

Returns a struct containing the dash sequence corresponding to type, or nil if type is invalid or equal to %GO_LINE_NONE. The lengths are scaled according to scale.

Parameters:

Returns:

  • (GOffice::LineDashSequence)

    a struct containing the dash sequence corresponding to type, or nil if type is invalid or equal to %GO_LINE_NONE. The lengths are scaled according to scale.

#line_interpolation_as_label(type) ⇒ String

%GO_LINE_INTERPOLATION_LINEAR if type is invalid. The returned string should not be freed.

Parameters:

Returns:

  • (String)

    a pointer to the label of type, or the name of

#line_interpolation_as_str(type) ⇒ String

Returns a pointer to the nickname of type, or "linear" if type is invalid. The returned string should not be freed.

Parameters:

Returns:

  • (String)

    a pointer to the nickname of type, or "linear" if type is invalid. The returned string should not be freed.

#line_interpolation_auto_skip(type) ⇒ Boolean

data, FALSE if it is only optional.

Parameters:

Returns:

  • (Boolean)

    TRUE if the line interpolation type forces skipping invalid

#line_interpolation_from_str(name) ⇒ GOffice::LineInterpolation

Returns a GOLine::Interpolation corresponding to name, or %GO_LINE_INTERPOLATION_LINEAR if not found.

Parameters:

  • name (String)

    an interpolation type nickname

Returns:

#line_interpolation_supports_radial(type) ⇒ Boolean

axes set, FALSE if it can't.

Parameters:

Returns:

  • (Boolean)

    TRUE if the line interpolation type can be used with radial

#linear_regression(xss, dim, ys, n, affine, res, stat_) ⇒ GOffice::RegressionResult

Performs multi-dimensional linear regressions on the input points. Fits to "y = b + a1 * x1 + ... ad * xd".

Parameters:

  • xss (Float)

    x-vectors (i.e. independent data)

  • dim (Integer)

    number of x-vectors.

  • ys (Float)

    y-vector. (Dependent data.)

  • n (Integer)

    number of data points.

  • affine (Boolean)

    if true, a non-zero constant is allowed.

  • res (Float)

    place for constant[0] and slope1[1], slope2[2],... There will be dim+1 results.

  • stat_ (GOffice::go_regression_stat_t)

    non-NULL storage for additional results.

Returns:

#linear_regression_leverage(A, d, m, n) ⇒ GOffice::RegressionResult

Parameters:

  • A (Float)
  • d (Float)
  • m (Integer)
  • n (Integer)

Returns:

#linear_regression_leveragel(A, d, m, n) ⇒ GOffice::RegressionResult

Parameters:

  • A (GOffice::long double)
  • d (GOffice::long double)
  • m (Integer)
  • n (Integer)

Returns:

#linear_regressionl(xss, dim, ys, n, affine, res, stat_) ⇒ GOffice::RegressionResult

Parameters:

  • xss (GOffice::long double)
  • dim (Integer)
  • ys (GOffice::long double)
  • n (Integer)
  • affine (Boolean)
  • res (GOffice::long double)
  • stat_ (GOffice::go_regression_stat_tl)

Returns:

#linear_solve(A, b, n, res) ⇒ GOffice::RegressionResult

Parameters:

  • A (Float)
  • b (Float)
  • n (Integer)
  • res (Float)

Returns:

#linear_solve_multiple(A, B, n, bn) ⇒ GOffice::RegressionResult

Parameters:

  • A (Float)
  • B (Float)
  • n (Integer)
  • bn (Integer)

Returns:

#linear_solve_multiplel(A, B, n, bn) ⇒ GOffice::RegressionResult

Parameters:

  • A (GOffice::long double)
  • B (GOffice::long double)
  • n (Integer)
  • bn (Integer)

Returns:

#linear_solvel(A, b, n, res) ⇒ GOffice::RegressionResult

Parameters:

  • A (GOffice::long double)
  • b (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)

Returns:

#list_index_custom(list, data, cmp_func) ⇒ Integer

Searched for data in list and return the corresponding index or -1 if not found.

Parameters:

  • list (GLib::List<nil>)

    #GList

  • data (GObject)

    element for which the index is searched for

  • cmp_func (GLib::CompareFunc)

    GCompare::Func

Returns:

  • (Integer)

    the data index in the list.

#load_pango_attributes_into_buffer(markup, buffer, str) ⇒ nil

Parameters:

  • markup (Pango::AttrList)
  • buffer (Gtk::TextBuffer)
  • str (String)

Returns:

  • (nil)

#locale_24hBoolean

Returns true if the locale uses a 24h clock, false otherwise.

Returns:

  • (Boolean)

    true if the locale uses a 24h clock, false otherwise.

#locale_boolean_name(b) ⇒ String

Returns Current locale's rendering of b.

Parameters:

  • b (Boolean)

    a boolean value

Returns:

  • (String)

    Current locale's rendering of b.

#locale_get_arg_sepGOffice::gchar

Returns:

  • (GOffice::gchar)

#locale_get_col_sepGOffice::gchar

Returns:

  • (GOffice::gchar)

#locale_get_currency(precedes, space_sep) ⇒ GLib::String

Play with the default logic so that things come out nicely for the default case.

Parameters:

  • precedes (Boolean)

    a pointer to a boolean which is set to TRUE if the currency should precede

  • space_sep (Boolean)

    a pointer to a boolean which is set to TRUE if the currency should have a space separating it from the value

Returns:

  • (GLib::String)

    A string with the default currency

#locale_get_date_formatGLib::String

Returns Current locale's date format as a string.

Returns:

  • (GLib::String)

    Current locale's date format as a string.

#locale_get_decimalGLib::String

Returns Current locale's decimal separator.

Returns:

  • (GLib::String)

    Current locale's decimal separator.

#locale_get_row_sepGOffice::gchar

Returns:

  • (GOffice::gchar)

#locale_get_thousandGLib::String

be an empty string.

Returns:

  • (GLib::String)

    Current locale's thousands separator. This may

#locale_get_time_formatGLib::String

Returns Current locale's time format as a string.

Returns:

  • (GLib::String)

    Current locale's time format as a string.

#locale_month_before_dayInteger

Returns:

  • (Integer)

#locale_untranslated_booleansnil

Short circuit the current locale so that we can import files and still produce error messages in the current LC_MESSAGE

Returns:

  • (nil)

#log10l(x) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)

Returns:

  • (GOffice::long double)

#logarithmic_fit(xs, ys, n, res) ⇒ GOffice::RegressionResult

Performs a two-dimensional non-linear fitting on the input points. Fits to "y = a + b * ln (sign * (x - c))", with sign in +1. The graph is a logarithmic curve moved horizontally by c and possibly mirrored across the y-axis (if sign = -1).

Fits c (and sign) by iterative trials, but seems to be fast enough even for automatic recomputation.

Adapts c until a local minimum of squared residuals is reached. For each new c tried out the corresponding a and b are calculated by linear regression. If no local minimum is found, an error is returned. If there is more than one local minimum, the one found is not necessarily the smallest (i.e., there might be cases in which the returned fit is not the best possible). If the shape of the point cloud is to different from ``logarithmic'', either sign can not be determined (error returned) or no local minimum will be found.

(Requires: at least 3 different x values, at least 3 different y values.)

Parameters:

  • xs (Float)

    x-vector (i.e. independent data)

  • ys (Float)

    y-vector (dependent data)

  • n (Integer)

    number of data points

  • res (Float)

    output place for sign[0], a[1], b[2], c[3], and sum of squared residuals[4].

Returns:

#logarithmic_fitl(xs, ys, n, res) ⇒ GOffice::RegressionResult

Parameters:

  • xs (GOffice::long double)
  • ys (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)

Returns:

#logarithmic_regression(xss, dim, ys, n, affine, res, stat_) ⇒ GOffice::RegressionResult

This is almost a copy of linear_regression and produces multi-dimensional linear regressions on the input points after transforming xss to ln(xss). Fits to "y = b + a1 * z1 + ... ad * zd" with "zi = ln (xi)". Problems with arrays in the calling function: see comment to gnumeric_linest, which is also valid for gnumeric_logreg.

(Errors: less than two points, all points on a vertical line, non-positive x data.)

Parameters:

  • xss (Float)

    x-vectors (i.e. independent data)

  • dim (Integer)

    number of x-vectors

  • ys (Float)

    y-vector (dependent data)

  • n (Integer)

    number of data points

  • affine (Boolean)

    if true, a non-zero constant is allowed

  • res (Float)

    output place for constant[0] and factor1[1], factor2[2],... There will be dim+1 results.

  • stat_ (GOffice::go_regression_stat_t)

    non-NULL storage for additional results.

Returns:

#logarithmic_regressionl(xss, dim, ys, n, affine, res, stat_) ⇒ GOffice::RegressionResult

Parameters:

  • xss (GOffice::long double)
  • dim (Integer)
  • ys (GOffice::long double)
  • n (Integer)
  • affine (Boolean)
  • res (GOffice::long double)
  • stat_ (GOffice::go_regression_stat_tl)

Returns:

#mathml_to_itex(mml, buf, length, compact, gcc) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)

#matrix_determinant(A, n) ⇒ Float

Parameters:

  • A (Float)
  • n (Integer)

Returns:

  • (Float)

#matrix_determinantl(A, n) ⇒ GOffice::long double

Parameters:

  • A (GOffice::long double)
  • n (Integer)

Returns:

  • (GOffice::long double)

#matrix_invert(A, n) ⇒ Boolean

Parameters:

  • A (Float)
  • n (Integer)

Returns:

  • (Boolean)

#matrix_invertl(A, n) ⇒ Boolean

Parameters:

  • A (GOffice::long double)
  • n (Integer)

Returns:

  • (Boolean)

#matrix_pseudo_inverse(A, m, n, threshold, B) ⇒ nil

Parameters:

  • A (Float)
  • m (Integer)
  • n (Integer)
  • threshold (Float)
  • B (Float)

Returns:

  • (nil)

#matrix_pseudo_inversel(A, m, n, threshold, B) ⇒ nil

Parameters:

  • A (GOffice::long double)
  • m (Integer)
  • n (Integer)
  • threshold (GOffice::long double)
  • B (GOffice::long double)

Returns:

  • (nil)

#memdup(mem, byte_size) ⇒ GObject

Like g_memdup or g_memdup2. This function is meant to ease transition to g_memdup2 without having to require very new glib.

Parameters:

  • mem (GObject)

    Memory to copy

  • byte_size (Integer)

    size of memory block to copy

Returns:

  • (GObject)

#memdup_n(mem, n_blocks, block_size) ⇒ GObject

Like go_memdup (mem, n_blocks * block_size), but with overflow check. Like a potential future g_memdup_n.

Parameters:

  • mem (GObject)

    Memory to copy

  • n_blocks (Integer)

    Number of blocks to copy.

  • block_size (Integer)

    Number of bytes per blocks.

Returns:

  • (GObject)

Implementation of a GtkMenuPositionFunc that positions the child window under the parent one, for use with gtk_menu_popup.

Parameters:

  • menu (Gtk::Menu)

    a Gtk::Menu

  • x (Integer)

    non-NULL storage for the X coordinate of the menu

  • y (Integer)

    non-NULL storage for the Y coordinate of the menu

  • push_in (Integer)

    non-NULL storage for the push-in distance

  • user_data (GObject)

    arbitrary

Returns:

  • (nil)

#mime_to_image_format(mime_type) ⇒ String

Returns file extension for the given mime type.

Parameters:

  • mime_type (String)

    a mime type string

Returns:

  • (String)

    file extension for the given mime type.

#mime_type_get_description(mime_type) ⇒ String

Needs to be freed with g_free(). If the description is not found, the mime type itself will be returned.

Parameters:

  • mime_type (String)

    the mime type to describe.

Returns:

  • (String)

    the description for the mime type as a newly allocated string.

#non_linear_regression(f, xvals, par, yvals, sigmas, x_dim, p_dim, chi, errors) ⇒ GOffice::RegressionResult

SYNOPSIS: result = non_linear_regression (f, xvals, par, yvals, sigmas, x_dim, p_dim, &chi, errors) Non linear regression. meaningful without the sigmas. deviation for each parameter. values. The resulting parameters are placed back into par.

Parameters:

  • f (GOffice::RegressionFunction)

    the model function

  • xvals (Float)

    independent values.

  • par (Float)

    model parameters.

  • yvals (Float)

    dependent values.

  • sigmas (Float)

    stahdard deviations for the dependent values.

  • x_dim (Integer)

    Number of data points.

  • p_dim (Integer)

    Number of parameters.

  • chi (Float)

    Chi Squared of the final result. This value is not very

  • errors (Float)

    MUST ALREADY BE ALLOCATED. These are the approximated standard

Returns:

#non_linear_regressionl(f, xvals, par, yvals, sigmas, x_dim, p_dim, chi, errors) ⇒ GOffice::RegressionResult

SYNOPSIS: result = non_linear_regression (f, xvals, par, yvals, sigmas, x_dim, p_dim, &chi, errors) Non linear regression. meaningful without the sigmas. deviation for each parameter. values. The resulting parameters are placed back into par.

Parameters:

  • f (GOffice::RegressionFunctionl)

    the model function

  • xvals (GOffice::long double)

    independent values.

  • par (GOffice::long double)

    model parameters.

  • yvals (GOffice::long double)

    dependent values.

  • sigmas (GOffice::long double)

    stahdard deviations for the dependent values.

  • x_dim (Integer)

    Number of data points.

  • p_dim (Integer)

    Number of parameters.

  • chi (GOffice::long double)

    Chi Squared of the final result. This value is not very

  • errors (GOffice::long double)

    MUST ALREADY BE ALLOCATED. These are the approximated standard

Returns:

#object_properties_apply(obj, props, changed_only) ⇒ nil

Sets a list of properties for obj. The list needs to be a list of alternating GParam::Spec and #GValue. apply properties with changed values.

Parameters:

  • obj (GObject::Object)

    #GObject

  • props (GLib::SList<nil>)

    the list of properties and their values to

  • changed_only (Boolean)

    whether to restrict calls to g_object_set_property() to

Returns:

  • (nil)

#object_properties_collect(obj) ⇒ GLib::SList<nil>

Collect all rw properties and their values. properties as GParam::Spec and values as #GValue.

Parameters:

  • obj (GObject::Object)

    #GObject

Returns:

  • (GLib::SList<nil>)

    the list of collected

#object_properties_free(props) ⇒ nil

Unsezts the values in the list which needs to be a list of alternating GParam::Spec and #GValue. unset

Parameters:

  • props (GLib::SList<nil>)

    the list of properties and their values to

Returns:

  • (nil)

#object_set_property(obj, property_name, user_prop_name, value, err, error_template) ⇒ Boolean

Parameters:

  • obj (GObject::Object)
  • property_name (String)
  • user_prop_name (String)
  • value (String)
  • err (GLib::Error)
  • error_template (String)

Returns:

  • (Boolean)

#object_toggle(object, property_name) ⇒ nil

Toggle a boolean object property.

Parameters:

  • object (GObject)

    #GObject

  • property_name (String)

    name

Returns:

  • (nil)

#pango_attr_list_erase(attrs, pos, len) ⇒ nil

This function erases a segment of attributes. This is what to call after deleting a segment from the text described by the attributes.

Parameters:

  • attrs (Pango::AttrList)

    An attribute list

  • pos (Integer)

    a text position in bytes

  • len (Integer)

    length of segment in bytes

Returns:

  • (nil)

#pango_attr_list_is_empty(attrs) ⇒ Boolean

Parameters:

  • attrs (Pango::AttrList)

Returns:

  • (Boolean)

#pango_attr_list_open_hole(tape, pos, len) ⇒ nil

This function opens up a blank segment of attributes. This is what to call after inserting a segment into the text described by the attributes.

Parameters:

  • tape (Pango::AttrList)

    An attribute list

  • pos (Integer)

    a text position in bytes

  • len (Integer)

    length of segment in bytes

Returns:

  • (nil)

#pango_attr_list_unset(list, start, end, type) ⇒ nil

Parameters:

  • list (Pango::AttrList)

    Pango::AttrList

  • start (Integer)

    starting character index

  • end (Integer)

    last character index

  • type (Pango::AttrType)

    Pango::AttrType

Returns:

  • (nil)

#pango_attr_subscript_get_attr_typePango::AttrType

Returns:

  • (Pango::AttrType)

#pango_attr_subscript_new(val) ⇒ Pango::Attribute

Returns a subscript attribute.

Parameters:

  • val (Boolean)

    true if the characters must be lowered.

Returns:

  • (Pango::Attribute)

    a subscript attribute.

#pango_attr_superscript_get_attr_typePango::AttrType

Returns:

  • (Pango::AttrType)

#pango_attr_superscript_new(val) ⇒ Pango::Attribute

Returns a superscript attribute.

Parameters:

  • val (Boolean)

    true if the characters must be raised.

Returns:

  • (Pango::Attribute)

    a superscript attribute.

#pango_attrs_to_markup(attrs, text) ⇒ String

Parameters:

  • attrs (Pango::AttrList)
  • text (String)

Returns:

  • (String)

#pango_measure_string(context, font_desc, str) ⇒ Integer

A utility function to measure text.

Parameters:

  • context (Pango::Context)

    Pango::Context

  • font_desc (Pango::FontDescription)

    Pango::FontDescription

  • str (String)

    The text to measure.

Returns:

  • (Integer)

    the pixel length of str according to context.

#pango_translate_attributes(attrs) ⇒ Pango::AttrList

Parameters:

  • attrs (Pango::AttrList)

Returns:

  • (Pango::AttrList)

#pango_translate_layout(layout) ⇒ nil

Parameters:

  • layout (Pango::Layout)

Returns:

  • (nil)

#parse_key_value(options, err, handler, user) ⇒ Boolean

Parameters:

  • options (String)

    Options string.

  • err (GLib::Error)

    Reference to store GError if parsing fails.

  • handler (GOffice::ParseKeyValueFunc)

    Handler to call for each key-value pair.

  • user (GObject)

    user pointer.

Returns:

  • (Boolean)

#pattern_as_str(pattern) ⇒ String

Parameters:

Returns:

  • (String)

#pattern_from_str(name) ⇒ GOffice::PatternType

Parameters:

  • name (String)

Returns:

#pattern_selector_new(initial_type, default_type) ⇒ Gtk::Widget

Creates a new pattern selector.

Parameters:

Returns:

  • (Gtk::Widget)

    a new Gtk::Widget.

#pattern_selector_set_colors(selector, foreground, background) ⇒ nil

Updates swatch colors of selector.

Parameters:

  • selector (GOffice::Selector)

    a pattern #GOSelector

  • foreground (GOffice::Color)

    foreground color

  • background (GOffice::Color)

    background color

Returns:

  • (nil)

#pcauchy(x, location, scale, lower_tail, log_p) ⇒ Float

Parameters:

  • x (Float)
  • location (Float)
  • scale (Float)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (Float)

#pcauchyl(x, location, scale, lower_tail, log_p) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)
  • location (GOffice::long double)
  • scale (GOffice::long double)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (GOffice::long double)

#plnorm(x, logmean, logsd, lower_tail, log_p) ⇒ Float

Parameters:

  • x (Float)
  • logmean (Float)
  • logsd (Float)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (Float)

#plnorml(x, logmean, logsd, lower_tail, log_p) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)
  • logmean (GOffice::long double)
  • logsd (GOffice::long double)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (GOffice::long double)

#plugins_get_active_pluginsGLib::SList<String>

plugins names.

Returns:

  • (GLib::SList<String>)

    the list of active

#plugins_get_available_pluginsGLib::SList<GOffice::Plugin>

plugins. The returned value must not be freed and stays valid until calling plugins_rescan or plugins_shutdown.

Returns:

#plugins_get_plugin_by_id(plugin_id) ⇒ GOffice::Plugin

Returns GOPlugin object for plugin with ID equal to plugin_id or nil if there's no plugin available with given id. Function returns "borrowed" reference, use g_object_ref if you want to be sure that plugin won't disappear.

Parameters:

  • plugin_id (String)

    String containing plugin ID

Returns:

  • (GOffice::Plugin)

    GOPlugin object for plugin with ID equal to plugin_id or nil if there's no plugin available with given id. Function returns "borrowed" reference, use g_object_ref if you want to be sure that plugin won't disappear.

#plugins_get_plugin_dirString

Returns:

  • (String)

#plugins_init(context, known_states, active_plugins, plugin_dirs, activate_new_plugins, default_loader_type) ⇒ nil

Initializes the plugin subsystem. Might be called several times to add new plugins.

Parameters:

  • context (GOffice::CmdContext)

    GOCmd::Context used to report errors

  • known_states (GLib::SList<String>)

    A list of known states (defined how ?)

  • active_plugins (GLib::SList<String>)

    A list of active plugins

  • plugin_dirs (GLib::SList<String>)

    a list of directories to search for plugins

  • activate_new_plugins (Boolean)

    activate plugins we have no seen before.

  • default_loader_type (GLib::Type)

    importer to use by default.

Returns:

  • (nil)

#plugins_register_loader(id_str, service) ⇒ nil

Registers new type of plugin loader identified by loader_id (identifier consists of loader's plugin ID and service ID concatenated using colon). All requests to create new loader object of this type will be passed to service.

This function is intended for use by GOPluginService objects.

Parameters:

Returns:

  • (nil)

#plugins_rescan(ret_error, ret_new_plugins) ⇒ nil

of new plugins

Parameters:

  • ret_error (GOffice::ErrorInfo)

    Pointer used to report errors

  • ret_new_plugins (GLib::SList<GOffice::Plugin>)

    Optional pointer to return list

Returns:

  • (nil)

#plugins_shutdownGLib::SList<String>

Shuts down the plugin subsystem. Call this function only once before exiting the application. Some plugins may be left active or in broken state, so calling plugins_init again will NOT work properly. use.

Returns:

  • (GLib::SList<String>)

    the list of plugins still in

#plugins_unregister_loader(id_str) ⇒ nil

Unregisters a type of plugin loader identified by loader_id. After callingthis function Gnumeric will be unable to load plugins supported by the specified loader.

This function is intended for use by GOPluginService objects.

Parameters:

  • id_str (String)

    Loader's id

Returns:

  • (nil)

#pnorm(x, mu, sigma, lower_tail, log_p) ⇒ Float

Parameters:

  • x (Float)
  • mu (Float)
  • sigma (Float)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (Float)

#pnorm_both(x, cum, ccum, i_tail, log_p) ⇒ nil

Parameters:

  • x (Float)
  • cum (Float)
  • ccum (Float)
  • i_tail (Integer)
  • log_p (Boolean)

Returns:

  • (nil)

#pnorm_bothl(x, cum, ccum, i_tail, log_p) ⇒ nil

Parameters:

  • x (GOffice::long double)
  • cum (GOffice::long double)
  • ccum (GOffice::long double)
  • i_tail (Integer)
  • log_p (Boolean)

Returns:

  • (nil)

#pnorml(x, mu, sigma, lower_tail, log_p) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)
  • mu (GOffice::long double)
  • sigma (GOffice::long double)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (GOffice::long double)

#pow(x, y) ⇒ Float

Parameters:

  • x (Float)
  • y (Float)

Returns:

  • (Float)

#pow10(n) ⇒ Float

Parameters:

  • n (Integer)

Returns:

  • (Float)

#pow10l(n) ⇒ GOffice::long double

Parameters:

  • n (Integer)

Returns:

  • (GOffice::long double)

#pow2(n) ⇒ Float

Parameters:

  • n (Integer)

Returns:

  • (Float)

#pow2l(n) ⇒ GOffice::long double

Parameters:

  • n (Integer)

Returns:

  • (GOffice::long double)

#power_regression(xss, dim, ys, n, affine, res, stat_) ⇒ GOffice::RegressionResult

Performs one-dimensional linear regressions on the input points. Fits to "y = b * x1^m1 * ... * xd^md " or equivalently to "log y = log b + m1 * log x1 + ... + md * log xd".

Parameters:

  • xss (Float)

    x-vectors (i.e. independent data)

  • dim (Integer)

    number of x-vectors

  • ys (Float)

    y-vector (dependent data)

  • n (Integer)

    number of data points

  • affine (Boolean)

    if true, a non-one multiplier is allowed

  • res (Float)

    output place for constant[0] and root1[1], root2[2],... There will be dim+1 results.

  • stat_ (GOffice::go_regression_stat_t)

    non-NULL storage for additional results.

Returns:

#power_regressionl(xss, dim, ys, n, affine, res, stat_) ⇒ GOffice::RegressionResult

Parameters:

  • xss (GOffice::long double)
  • dim (Integer)
  • ys (GOffice::long double)
  • n (Integer)
  • affine (Boolean)
  • res (GOffice::long double)
  • stat_ (GOffice::go_regression_stat_tl)

Returns:

#powl(x, y) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)
  • y (GOffice::long double)

Returns:

  • (GOffice::long double)

#pweibull(x, shape, scale, lower_tail, log_p) ⇒ Float

Parameters:

  • x (Float)
  • shape (Float)
  • scale (Float)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (Float)

#pweibulll(x, shape, scale, lower_tail, log_p) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)
  • shape (GOffice::long double)
  • scale (GOffice::long double)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (GOffice::long double)

#qcauchy(p, location, scale, lower_tail, log_p) ⇒ Float

Parameters:

  • p (Float)
  • location (Float)
  • scale (Float)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (Float)

#qcauchyl(p, location, scale, lower_tail, log_p) ⇒ GOffice::long double

Parameters:

  • p (GOffice::long double)
  • location (GOffice::long double)
  • scale (GOffice::long double)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (GOffice::long double)

#qlnorm(p, logmean, logsd, lower_tail, log_p) ⇒ Float

Parameters:

  • p (Float)
  • logmean (Float)
  • logsd (Float)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (Float)

#qlnorml(p, logmean, logsd, lower_tail, log_p) ⇒ GOffice::long double

Parameters:

  • p (GOffice::long double)
  • logmean (GOffice::long double)
  • logsd (GOffice::long double)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (GOffice::long double)

#qnorm(p, mu, sigma, lower_tail, log_p) ⇒ Float

Parameters:

  • p (Float)
  • mu (Float)
  • sigma (Float)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (Float)

#qnorml(p, mu, sigma, lower_tail, log_p) ⇒ GOffice::long double

Parameters:

  • p (GOffice::long double)
  • mu (GOffice::long double)
  • sigma (GOffice::long double)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (GOffice::long double)

#quad_acos(res, a) ⇒ nil

This function computes the arc cosine of a, storing the result in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_acosl(res, a) ⇒ nil

This function computes the arc cosine of a, storing the result in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_add(res, a, b) ⇒ nil

This function adds a and b, storing the result in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

  • b (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_addl(res, a, b) ⇒ nil

This function adds a and b, storing the result in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

  • b (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_asin(res, a) ⇒ nil

This function computes the arc sine of a, storing the result in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_asinl(res, a) ⇒ nil

This function computes the arc sine of a, storing the result in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_atan2(res, y, x) ⇒ nil

This function computes polar angle coordinate of the point (x,y), storing the result in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • y (GOffice::Quad)

    quad-precision value

  • x (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_atan2l(res, y, x) ⇒ nil

This function computes polar angle coordinate of the point (x,y), storing the result in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • y (GOffice::Quadl)

    quad-precision value

  • x (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_atan2pi(res, y, x) ⇒ nil

This function computes polar angle coordinate of the point (x,y) divided by pi, storing the result in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • y (GOffice::Quad)

    quad-precision value

  • x (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_atan2pil(res, y, x) ⇒ nil

This function computes polar angle coordinate of the point (x,y) divided by pi, storing the result in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • y (GOffice::Quadl)

    quad-precision value

  • x (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_constant8(res, data, n, base, scale) ⇒ nil

This function interprets a vector of digits in a given base as a quad-precision value. It is mostly meant for internal use.

Parameters:

  • res (GOffice::Quad)

    result location

  • data (Array<Integer>)

    vector of digits

  • n (Integer)

    length of digit vector.

  • base (Float)

    base of vector's elements

  • scale (Float)

    scaling value after interpreting digits

Returns:

  • (nil)

#quad_cos(res, a) ⇒ nil

This function computes the cosine of a, storing the result in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_cosl(res, a) ⇒ nil

This function computes the cosine of a, storing the result in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_cospi(res, a) ⇒ nil

This function computes the cosine of a times pi, storing the result in res. This is more accurate than actually doing the multiplication.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_cospil(res, a) ⇒ nil

This function computes the cosine of a times pi, storing the result in res. This is more accurate than actually doing the multiplication.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_div(res, a, b) ⇒ nil

This function divides a and b, storing the result in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

  • b (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_divl(res, a, b) ⇒ nil

This function divides a and b, storing the result in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

  • b (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_dot_product(res, a, b, n) ⇒ nil

Parameters:

  • res (GOffice::Quad)

    result location

  • a (Array<GOffice::Quad>)

    vector of quad-precision values

  • b (Array<GOffice::Quad>)

    vector of quad-precision values

  • n (Integer)

    length of vectors.

Returns:

  • (nil)

#quad_dot_productl(res, a, b, n) ⇒ nil

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (Array<GOffice::Quadl>)

    vector of quad-precision values

  • b (Array<GOffice::Quadl>)

    vector of quad-precision values

  • n (Integer)

    length of vectors.

Returns:

  • (nil)

#quad_end(state) ⇒ nil

This ends a section of quad precision arithmetic.

Parameters:

  • state (GObject)

    state pointer from go_quad_start.

Returns:

  • (nil)

#quad_endl(state) ⇒ nil

This ends a section of quad precision arithmetic.

Parameters:

  • state (GObject)

    state pointer from go_quad_startl.

Returns:

  • (nil)

#quad_exp(res, exp2, a) ⇒ nil

This function computes the exponential function at a, storing the result in res. If the optional exp2 is supplied, it is used to return a power of 2 by which the result should be scaled. This is useful to represent results much, much bigger than double precision can handle.

Parameters:

  • res (GOffice::Quad)

    result location

  • exp2 (Float)

    (allow-none): power-of-2 result scaling location

  • a (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_expm1(res, a) ⇒ nil

This function computes the exponential function at a with 1 subtracted, storing the difference in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_expm1l(res, a) ⇒ nil

This function computes the exponential function at a with 1 subtracted, storing the difference in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_floor(res, a) ⇒ nil

This function takes the floor of a, storing the result in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_floorl(res, a) ⇒ nil

This function takes the floor of a, storing the result in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_functionalBoolean

Returns:

  • (Boolean)

#quad_functionallBoolean

Returns:

  • (Boolean)

#quad_hypot(res, a, b) ⇒ nil

This function computes the square root of a^2 plugs b^2, storing the result in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

  • b (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_hypotl(res, a, b) ⇒ nil

This function computes the square root of a^2 plugs b^2, storing the result in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

  • b (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_init(res, h) ⇒ nil

This stores the value h in res. As an exception, this may be called outside go_quad_start and go_quad_end sections.

Parameters:

  • res (GOffice::Quad)

    result location

  • h (Float)

    a double precision value

Returns:

  • (nil)

#quad_log(res, a) ⇒ nil

This function computes the natural logarithm at a, storing the result in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_logl(res, a) ⇒ nil

This function computes the natural logarithm at a, storing the result in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_matrix_back_solvel(R, x, b, allow_degenerate) ⇒ Boolean

than being given a zero result. A degenerate dimension is one whose diagonal entry is zero. This function solves the triangular system R*x=b.

Parameters:

  • R (GOffice::QuadMatrixl)

    An upper triangular matrix.

  • x (GOffice::Quadl)

    Result vector.

  • b (GOffice::Quadl)

    Input vector.

  • allow_degenerate (Boolean)

    If true, then degenerate dimensions are ignored other

Returns:

  • (Boolean)

    true on error.

#quad_matrix_copy(A, B) ⇒ nil

Copies B to A.

Parameters:

  • A (GOffice::QuadMatrix)

    Destination matrix.

  • B (GOffice::QuadMatrix)

    Source matrix.

Returns:

  • (nil)

#quad_matrix_copyl(A, B) ⇒ nil

Copies B to A.

Parameters:

  • A (GOffice::QuadMatrixl)

    Destination matrix.

  • B (GOffice::QuadMatrixl)

    Source matrix.

Returns:

  • (nil)

#quad_matrix_determinantl(A, res) ⇒ nil

Parameters:

  • A (GOffice::QuadMatrixl)
  • res (GOffice::Quadl)

Returns:

  • (nil)

#quad_matrix_dumpl(A, fmt) ⇒ nil

Parameters:

  • A (GOffice::QuadMatrixl)
  • fmt (String)

Returns:

  • (nil)

#quad_matrix_dupl(A) ⇒ GOffice::QuadMatrixl

Returns a new matrix.

Parameters:

  • A (GOffice::QuadMatrixl)

    Matrix to duplicate

Returns:

  • (GOffice::QuadMatrixl)

    a new matrix.

#quad_matrix_freel(A) ⇒ nil

Parameters:

  • A (GOffice::QuadMatrixl)

Returns:

  • (nil)

#quad_matrix_fwd_solvel(R, x, b, allow_degenerate) ⇒ Boolean

than being given a zero result. A degenerate dimension is one whose diagonal entry is zero. This function solves the triangular system RT*x=b.

Parameters:

  • R (GOffice::QuadMatrixl)

    An upper triangular matrix.

  • x (GOffice::Quadl)

    Result vector.

  • b (GOffice::Quadl)

    Input vector.

  • allow_degenerate (Boolean)

    If true, then degenerate dimensions are ignored other

Returns:

  • (Boolean)

    true on error.

#quad_matrix_inversel(A, threshold) ⇒ GOffice::QuadMatrixl

eigenvalue is less than or equal to the given threshold, nil is returned indicating a matrix that cannot be inverted. (Note: this doesn't actually use the eigenvalues of A, but of A after an orthogonal transformation.)

Parameters:

  • A (GOffice::QuadMatrixl)

    Source matrix.

  • threshold (GOffice::long double)

    condition number threshold.

Returns:

  • (GOffice::QuadMatrixl)

    The inverse matrix of A. If any eigenvalues divided by the largest

#quad_matrix_multiply(C, A, B) ⇒ nil

Multiplies A*B and stores the result in C.

Parameters:

  • C (GOffice::QuadMatrix)

    Destination matrix.

  • A (GOffice::QuadMatrix)

    Source matrix.

  • B (GOffice::QuadMatrix)

    Source matrix.

Returns:

  • (nil)

#quad_matrix_multiplyl(C, A, B) ⇒ nil

Multiplies A*B and stores the result in C.

Parameters:

  • C (GOffice::QuadMatrixl)

    Destination matrix.

  • A (GOffice::QuadMatrixl)

    Source matrix.

  • B (GOffice::QuadMatrixl)

    Source matrix.

Returns:

  • (nil)

#quad_matrix_new(m, n) ⇒ GOffice::QuadMatrix

Returns a new zero matrix.

Parameters:

  • m (Integer)

    number of rows

  • n (Integer)

    number of columns

Returns:

  • (GOffice::QuadMatrix)

    a new zero matrix.

#quad_matrix_newl(m, n) ⇒ GOffice::QuadMatrixl

Returns a new zero matrix.

Parameters:

  • m (Integer)

    number of rows

  • n (Integer)

    number of columns

Returns:

  • (GOffice::QuadMatrixl)

    a new zero matrix.

#quad_matrix_pseudo_inversel(A, threshold) ⇒ GOffice::QuadMatrixl

Returns A's pseudo-inverse.

Parameters:

  • A (GOffice::QuadMatrixl)

    An arbitrary matrix.

  • threshold (GOffice::long double)

    condition number threshold.

Returns:

  • (GOffice::QuadMatrixl)

    A's pseudo-inverse.

#quad_matrix_transpose(A, B) ⇒ nil

Transposes B into A.

Parameters:

  • A (GOffice::QuadMatrix)

    Destination matrix.

  • B (GOffice::QuadMatrix)

    Source matrix.

Returns:

  • (nil)

#quad_matrix_transposel(A, B) ⇒ nil

Transposes B into A.

Parameters:

  • A (GOffice::QuadMatrixl)

    Destination matrix.

  • B (GOffice::QuadMatrixl)

    Source matrix.

Returns:

  • (nil)

#quad_mul(res, a, b) ⇒ nil

This function multiplies a and b, storing the result in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

  • b (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_mul12(res, x, y) ⇒ nil

This function multiplies x and y, storing the result in res with full quad precision.

Parameters:

  • res (GOffice::Quad)

    result location

  • x (Float)

    double precision value

  • y (Float)

    double precision value

Returns:

  • (nil)

#quad_mull(res, a, b) ⇒ nil

This function multiplies a and b, storing the result in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

  • b (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_pow(res, exp2, x, y) ⇒ nil

This function computes x to the power of y, storing the result in res. If the optional exp2 is supplied, it is used to return a power of 2 by which the result should be scaled. This is useful to represent results much, much bigger than double precision can handle.

Parameters:

  • res (GOffice::Quad)

    result location

  • exp2 (Float)

    (allow-none): power-of-2 result scaling location

  • x (GOffice::Quad)

    quad-precision value

  • y (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_qr_determinantl(qr, det) ⇒ nil

Parameters:

  • qr (GOffice::QuadQRl)
  • det (GOffice::Quadl)

Returns:

  • (nil)

#quad_qr_freel(qr) ⇒ nil

Parameters:

  • qr (GOffice::QuadQRl)

Returns:

  • (nil)

#quad_qr_mark_degeneratel(qr, i) ⇒ nil

Marks dimension i of the qr decomposition as degenerate. In practice this means setting the i-th eigenvalue of R to zero.

Parameters:

  • qr (GOffice::QuadQRl)

    A QR decomposition.

  • i (Integer)

    a dimension

Returns:

  • (nil)

#quad_qr_multiply_qtl(qr, x) ⇒ nil

Replaces x by Q^t * x

Parameters:

  • qr (GOffice::QuadQRl)

    A QR decomposition.

  • x (GOffice::Quadl)

    a vector.

Returns:

  • (nil)

#quad_qr_new(A) ⇒ GOffice::QuadQR

QR decomposition of a matrix using Householder matrices.

A (input) is an m-times-n matrix. A[0...m-1][0..n-1] If qAT is TRUE, this parameter is transposed.

V is a pre-allocated output m-times-n matrix. V will contrain n vectors of different lengths: n, n-1, ..., 1. These are the Householder vectors (or null for the degenerate case). The matrix Q of size m-times-m is implied from V.

R is a matrix of size n-times-n. (To get the m-times-n version of R, simply add m-n null rows.)

Parameters:

  • A (GOffice::QuadMatrix)

    Source matrix.

Returns:

  • (GOffice::QuadQR)

    a new GOQuad::QR.

#quad_qr_newl(A) ⇒ GOffice::QuadQRl

Returns qr decomposition.

Parameters:

  • A (GOffice::QuadMatrixl)

    input matrix

Returns:

  • (GOffice::QuadQRl)

    qr decomposition.

#quad_qr_rl(qr) ⇒ GOffice::QuadMatrixl

of size n. To get the large R, if needed, add m-n zero rows.

Parameters:

  • qr (GOffice::QuadQRl)

    A QR decomposition.

Returns:

  • (GOffice::QuadMatrixl)

    the small R from the decomposition, i.e., a square matrix

#quad_sin(res, a) ⇒ nil

This function computes the sine of a, storing the result in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_sinl(res, a) ⇒ nil

This function computes the sine of a, storing the result in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_sinpi(res, a) ⇒ nil

This function computes the sine of a times pi, storing the result in res. This is more accurate than actually doing the multiplication.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_sinpil(res, a) ⇒ nil

This function computes the sine of a times pi, storing the result in res. This is more accurate than actually doing the multiplication.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_sqrt(res, a) ⇒ nil

This function takes the square root of a, storing the result in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_sqrtl(res, a) ⇒ nil

This function takes the square root of a, storing the result in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#quad_startGObject

Initializes #GOQuad arithmetic. Any use of #GOQuad must occur between calls to go_quad_start() and go_quad_end().

Returns:

  • (GObject)

    a pointer to pass to go_quad_end() when done.

#quad_startlGObject

Initializes #GOQuadl arithmetic. Any use of #GOQuadl must occur between calls to go_quad_startl() and go_quad_endl().

Returns:

  • (GObject)

    a pointer to pass to go_quad_endl() when done.

#quad_sub(res, a, b) ⇒ nil

This function subtracts a and b, storing the result in res.

Parameters:

  • res (GOffice::Quad)

    result location

  • a (GOffice::Quad)

    quad-precision value

  • b (GOffice::Quad)

    quad-precision value

Returns:

  • (nil)

#quad_subl(res, a, b) ⇒ nil

This function subtracts a and b, storing the result in res.

Parameters:

  • res (GOffice::Quadl)

    result location

  • a (GOffice::Quadl)

    quad-precision value

  • b (GOffice::Quadl)

    quad-precision value

Returns:

  • (nil)

#qweibull(p, shape, scale, lower_tail, log_p) ⇒ Float

Parameters:

  • p (Float)
  • shape (Float)
  • scale (Float)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (Float)

#qweibulll(p, shape, scale, lower_tail, log_p) ⇒ GOffice::long double

Parameters:

  • p (GOffice::long double)
  • shape (GOffice::long double)
  • scale (GOffice::long double)
  • lower_tail (Boolean)
  • log_p (Boolean)

Returns:

  • (GOffice::long double)

#range_average(xs, n, res) ⇒ Integer

the input values will be stored in res.

Parameters:

  • xs (Array<Float>)

    values.

  • n (Integer)

    number of values

  • res (Float)

    result.

Returns:

  • (Integer)

    0 unless an error occurred. The average of

#range_averagel(xs, n, res) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)

Returns:

  • (Integer)

#range_constant(xs, n) ⇒ Integer

Returns 1 if range is constant, 0 otherwise.

Parameters:

  • xs (Array<Float>)

    values.

  • n (Integer)

    number of values

Returns:

  • (Integer)

    1 if range is constant, 0 otherwise.

#range_constantl(xs, n) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)

Returns:

  • (Integer)

#range_decreasing(xs, n) ⇒ Integer

Returns 1 if range is decreasing, 0 otherwise.

Parameters:

  • xs (Array<Float>)

    values.

  • n (Integer)

    number of values

Returns:

  • (Integer)

    1 if range is decreasing, 0 otherwise.

#range_decreasingl(xs, n) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)

Returns:

  • (Integer)

#range_devsq(xs, n, res) ⇒ Integer

values deviation from the mean will be stored in res.

Parameters:

  • xs (Array<Float>)

    values.

  • n (Integer)

    number of values

  • res (Float)

    result.

Returns:

  • (Integer)

    0 unless an error occurred. The sum of the input

#range_devsql(xs, n, res) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)

Returns:

  • (Integer)

#range_fractile_inter(xs, n, res, f) ⇒ Integer

the interpolated fractile given by f and stores it in res.

Parameters:

  • xs (Array<Float>)

    values.

  • n (Integer)

    number of values

  • res (Float)

    result.

  • f (Float)

    fractile

Returns:

  • (Integer)

    0 unless an error occurred. This function computes

#range_fractile_inter_nonconst(xs, n, res, f) ⇒ Integer

Parameters:

  • xs (Float)
  • n (Integer)
  • res (Float)
  • f (Float)

Returns:

  • (Integer)

#range_fractile_inter_nonconstl(xs, n, res, f) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)
  • f (GOffice::long double)

Returns:

  • (Integer)

#range_fractile_inter_sorted(xs, n, res, f) ⇒ Integer

the interpolated fractile given by f and stores it in res.

Parameters:

  • xs (Array<Float>)

    values, which must be sorted.

  • n (Integer)

    number of values

  • res (Float)

    result.

  • f (Float)

    fractile

Returns:

  • (Integer)

    0 unless an error occurred. This function computes

#range_fractile_inter_sortedl(xs, n, res, f) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)
  • f (GOffice::long double)

Returns:

  • (Integer)

#range_fractile_interl(xs, n, res, f) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)
  • f (GOffice::long double)

Returns:

  • (Integer)

#range_increasing(xs, n) ⇒ Integer

Returns 1 if range is increasing, 0 otherwise.

Parameters:

  • xs (Array<Float>)

    values.

  • n (Integer)

    number of values

Returns:

  • (Integer)

    1 if range is increasing, 0 otherwise.

#range_increasingl(xs, n) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)

Returns:

  • (Integer)

#range_max(xs, n, res) ⇒ Integer

the input values will be stored in res.

Parameters:

  • xs (Array<Float>)

    values.

  • n (Integer)

    number of values

  • res (Float)

    result.

Returns:

  • (Integer)

    0 unless an error occurred. The maximum of

#range_maxabs(xs, n, res) ⇒ Integer

values of the input values will be stored in res.

Parameters:

  • xs (Array<Float>)

    values.

  • n (Integer)

    number of values

  • res (Float)

    result.

Returns:

  • (Integer)

    0 unless an error occurred. The maximum of the absolute

#range_maxabsl(xs, n, res) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)

Returns:

  • (Integer)

#range_maxl(xs, n, res) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)

Returns:

  • (Integer)

#range_median_inter(xs, n, res) ⇒ Integer

the interpolated median and stores it in res.

Parameters:

  • xs (Array<Float>)

    values.

  • n (Integer)

    number of values

  • res (Float)

    result.

Returns:

  • (Integer)

    0 unless an error occurred. This function computes

#range_median_inter_nonconst(xs, n, res) ⇒ Integer

Parameters:

  • xs (Float)
  • n (Integer)
  • res (Float)

Returns:

  • (Integer)

#range_median_inter_nonconstl(xs, n, res) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)

Returns:

  • (Integer)

#range_median_inter_sorted(xs, n, res) ⇒ Integer

the interpolated median and stores it in res.

Parameters:

  • xs (Array<Float>)

    values, which must be sorted.

  • n (Integer)

    number of values

  • res (Float)

    result.

Returns:

  • (Integer)

    0 unless an error occurred. This function computes

#range_median_inter_sortedl(xs, n, res) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)

Returns:

  • (Integer)

#range_median_interl(xs, n, res) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)

Returns:

  • (Integer)

#range_min(xs, n, res) ⇒ Integer

the input values will be stored in res.

Parameters:

  • xs (Array<Float>)

    values.

  • n (Integer)

    number of values

  • res (Float)

    result.

Returns:

  • (Integer)

    0 unless an error occurred. The minimum of

#range_minl(xs, n, res) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)

Returns:

  • (Integer)

#range_sort(xs, n) ⇒ Float

Parameters:

  • xs (Float)
  • n (Integer)

Returns:

  • (Float)

#range_sortl(xs, n) ⇒ GOffice::long double

Parameters:

  • xs (GOffice::long double)
  • n (Integer)

Returns:

  • (GOffice::long double)

#range_sum(xs, n, res) ⇒ Integer

values will be stored in res.

Parameters:

  • xs (Array<Float>)

    values.

  • n (Integer)

    number of values

  • res (Float)

    result.

Returns:

  • (Integer)

    0 unless an error occurred. The arithmetic sum of the input

#range_suml(xs, n, res) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)

Returns:

  • (Integer)

#range_sumsq(xs, n, res) ⇒ Integer

of the input values will be stored in res.

Parameters:

  • xs (Array<Float>)

    values.

  • n (Integer)

    number of values

  • res (Float)

    result.

Returns:

  • (Integer)

    0 unless an error occurred. The arithmetic sum of the squares

#range_sumsql(xs, n, res) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)
  • res (GOffice::long double)

Returns:

  • (Integer)

#range_vary_uniformly(xs, n) ⇒ Integer

Returns 1 if range is either decreasing or increasing, 0 otherwise.

Parameters:

  • xs (Array<Float>)

    values.

  • n (Integer)

    number of values

Returns:

  • (Integer)

    1 if range is either decreasing or increasing, 0 otherwise.

#range_vary_uniformlyl(xs, n) ⇒ Integer

Parameters:

  • xs (GOffice::long double)
  • n (Integer)

Returns:

  • (Integer)

#real_nameString

Returns a utf8 encoded string with the current user name.

Returns:

  • (String)

    a utf8 encoded string with the current user name.

#regcomp(preg, pattern, cflags) ⇒ Integer

Parameters:

  • preg (GOffice::Regexp)
  • pattern (String)
  • cflags (Integer)

Returns:

  • (Integer)

#regerror(errcode, preg, errbuf, errbuf_size) ⇒ Integer

Parameters:

  • errcode (Integer)
  • preg (GOffice::Regexp)
  • errbuf (String)
  • errbuf_size (Integer)

Returns:

  • (Integer)

#regexec(preg, string, nmatch, pmatch, eflags) ⇒ Integer

Parameters:

  • preg (GOffice::Regexp)
  • string (String)
  • nmatch (Integer)
  • pmatch (GOffice::Regmatch)
  • eflags (Integer)

Returns:

  • (Integer)

#regexp_quote(target, s) ⇒ nil

Parameters:

  • target (GLib::String)
  • s (String)

Returns:

  • (nil)

#regexp_quote1(target, s) ⇒ String

Parameters:

  • target (GLib::String)
  • s (String)

Returns:

  • (String)

#regfree(preg) ⇒ nil

Parameters:

  • preg (GOffice::Regexp)

Returns:

  • (nil)

#regression_stat_destroyl(stat_) ⇒ nil

Parameters:

  • stat_ (GOffice::go_regression_stat_tl)

Returns:

  • (nil)

#regression_stat_newlGOffice::go_regression_stat_tl

Returns:

  • (GOffice::go_regression_stat_tl)

#render_general(layout, str, measure, metrics, val, col_width, unicode_minus, numeral_shape, custom_shape_flags) ⇒ nil

Render a floating-point value into layout in such a way that the layouting width does not needlessly exceed col_width. Optionally use unicode minus instead of hyphen. A width of -1 means no restriction.

Parameters:

  • layout (Pango::Layout)

    Optional Pango::Layout, probably preseeded with font attribute.

  • str (GLib::String)

    a GString to store (not append!) the resulting string in.

  • measure (GOffice::FormatMeasure)

    Function to measure width of string/layout.

  • metrics (GOffice::FontMetrics)

    Font metrics corresponding to measure.

  • val (Float)

    floating-point value. Must be finite.

  • col_width (Integer)

    intended max width of layout in the units that measure uses.

  • unicode_minus (Boolean)

    Use unicode minuses, not hyphens.

  • numeral_shape (Integer)

    numeral shape identifier.

  • custom_shape_flags (Integer)

    flags for using numeral_shape.

Returns:

  • (nil)

#render_generall(layout, str, measure, metrics, val, col_width, unicode_minus, numeral_shape, custom_shape_flags) ⇒ nil

Render a floating-point value into layout in such a way that the layouting width does not needlessly exceed col_width. Optionally use unicode minus instead of hyphen. A width of -1 means no restriction.

Parameters:

  • layout (Pango::Layout)

    Optional Pango::Layout, probably preseeded with font attribute.

  • str (GLib::String)

    a GString to store (not append!) the resulting string in.

  • measure (GOffice::FormatMeasure)

    Function to measure width of string/layout.

  • metrics (GOffice::FontMetrics)

    Font metrics corresponding to mesaure.

  • val (GOffice::long double)

    floating-point value. Must be finite.

  • col_width (Integer)

    intended max width of layout in the units that measure uses.

  • unicode_minus (Boolean)

    Use unicode minuses, not hyphens.

  • numeral_shape (Integer)

    numeral shape identifier.

  • custom_shape_flags (Integer)

    flags for using numeral_shape.

Returns:

  • (nil)

#rint(x) ⇒ Float

Parameters:

  • x (Float)

Returns:

  • (Float)

#rsm_lookup(id, len) ⇒ GObject

Returns the resource or nil if not found.

Parameters:

  • id (String)

    resource name

  • len (Integer)

    where to store the resource size in bytes

Returns:

  • (GObject)

    the resource or nil if not found

#rsm_register_file(id, data, len) ⇒ nil

Parameters:

  • id (String)
  • data (GObject)
  • len (Integer)

Returns:

  • (nil)

#rsm_unregister_file(id) ⇒ nil

Parameters:

  • id (String)

Returns:

  • (nil)

#search_match_string(sr, src) ⇒ Boolean

Parameters:

Returns:

  • (Boolean)

#set_file_permissions(uri, file_permissions) ⇒ nil

Parameters:

  • uri (String)
  • file_permissions (GOffice::FilePermissions)

Returns:

  • (nil)

#setlocale(category, val) ⇒ String

Parameters:

  • category (Integer)
  • val (String)

Returns:

  • (String)

#shell_arg_to_uri(arg) ⇒ String

Parameters:

  • arg (String)

Returns:

  • (String)

#shell_argv_to_glib_encoding(argc, argv) ⇒ Array<String>

Transform arguments to UTF-8 when needed.

Parameters:

  • argc (Integer)

    arguments number

  • argv (String)

    command line arguments

Returns:

  • (Array<String>)

    the arguments in UTF-8 locale.

#shell_argv_to_glib_encoding_freenil

Returns:

  • (nil)

#shutdownnil

Decrements the counter for data initialized by libgoffice_init(). When the counter reaches 0, the data is freed/cleaned up as appropriate.

Returns:

  • (nil)

#sinpi(x) ⇒ Float

multiplication outright.

Parameters:

  • x (Float)

    a number

Returns:

  • (Float)

    the sine of Pi times x, but with less error than doing the

#sinpil(x) ⇒ GOffice::long double

multiplication outright.

Parameters:

  • x (GOffice::long double)

    a number

Returns:

  • (GOffice::long double)

    the sine of Pi times x, but with less error than doing the

#slist_create(item1, array) ⇒ GLib::SList<nil>

Creates a GList from NULL-terminated list of arguments. As the arguments are just copied to the list, the caller owns them.

Parameters:

  • item1 (GObject)

    first item

  • array (Array)

    nil terminated list of additional items

Returns:

  • (GLib::SList<nil>)

    created list.

#stern_brocot(val, max_denom, res_num, res_denom) ⇒ nil

Parameters:

  • val (Float)
  • max_denom (Integer)
  • res_num (Integer)
  • res_denom (Integer)

Returns:

  • (nil)

#str_compare(x, y) ⇒ Integer

Parameters:

  • x (GObject)
  • y (GObject)

Returns:

  • (Integer)

#strescape(target, str) ⇒ nil

Parameters:

  • target (GLib::String)
  • str (String)

Returns:

  • (nil)

#string_append_c_n(target, c, n) ⇒ nil

Parameters:

  • target (GLib::String)
  • c (GOffice::gchar)
  • n (Integer)

Returns:

  • (nil)

#string_append_gstring(target, src) ⇒ nil

Parameters:

  • target (GLib::String)
  • src (GLib::String)

Returns:

  • (nil)

#string_cmp(gstr_a, gstr_b) ⇒ Integer

Parameters:

  • gstr_a (GObject)
  • gstr_b (GObject)

Returns:

  • (Integer)

#string_cmp_ignorecase(gstr_a, gstr_b) ⇒ Integer

Parameters:

  • gstr_a (GObject)
  • gstr_b (GObject)

Returns:

  • (Integer)

#string_equal(gstr_a, gstr_b) ⇒ Boolean

Parameters:

  • gstr_a (GObject)
  • gstr_b (GObject)

Returns:

  • (Boolean)

#string_equal_ignorecase(gstr_a, gstr_b) ⇒ Boolean

Returns TRUE if the two strings are equal when ignoring letter case.

Parameters:

  • gstr_a (GObject)

    string.

  • gstr_b (GObject)

    string.

Returns:

  • (Boolean)

    TRUE if the two strings are equal when ignoring letter case.

#string_equal_rich(gstr_a, gstr_b) ⇒ Boolean

Parameters:

  • gstr_a (GObject)

    string.

  • gstr_b (GObject)

    string.

Returns:

  • (Boolean)

#string_ERRORGOffice::String

A convenience for g_return_val to share one error string without adding a reference to functions that do not add references to the result

Returns:

  • (GOffice::String)

    A string saying 'ERROR' but does not add a ref to it.

#string_foreach_base(callback, data) ⇒ nil

Iterates through the strings data base and apply callback to each.

Parameters:

  • callback (GLib::HFunc)

    callback

  • data (GObject)

    user data

Returns:

  • (nil)

#string_hash(gstr) ⇒ Integer

Parameters:

  • gstr (GObject)

Returns:

  • (Integer)

#string_replace(target, pos, oldlen, txt, newlen) ⇒ nil

Parameters:

  • target (GLib::String)
  • pos (Integer)
  • oldlen (GOffice::gssize)
  • txt (String)
  • newlen (GOffice::gssize)

Returns:

  • (nil)

#strsplit_to_slist(str, delimiter) ⇒ GLib::SList<String>

Splits up string into tokens at delim and returns a string list. free after use using function g_slist_free_full(), using g_free as second argument.

Parameters:

  • str (String)

    String to split

  • delimiter (GOffice::gchar)

    Token delimiter

Returns:

  • (GLib::SList<String>)

    string list which you should

#strtod(s, end) ⇒ Float

Parameters:

  • s (String)
  • end (String)

Returns:

  • (Float)

#strtold(s, end) ⇒ GOffice::long double

Parameters:

  • s (String)
  • end (String)

Returns:

  • (GOffice::long double)

#strunescape(target, str) ⇒ String

Parameters:

  • target (GLib::String)
  • str (String)

Returns:

  • (String)

#sub_epsilon(x) ⇒ Float

Returns the next-smaller representable value, except that zero and infinites are returned unchanged.

Parameters:

  • x (Float)

    a number

Returns:

  • (Float)

#sub_epsilonl(x) ⇒ GOffice::long double

Returns the next-smaller representable value, except that zero and infinites are returned unchanged.

Parameters:

  • x (GOffice::long double)

    a number

Returns:

  • (GOffice::long double)

#sys_data_dirString

Returns:

  • (String)

#sys_extern_plugin_dirString

Returns:

  • (String)

#sys_icon_dirString

Returns:

  • (String)

#sys_lib_dirString

Returns:

  • (String)

#tanpi(x) ⇒ Float

multiplication outright.

Parameters:

  • x (Float)

    a number

Returns:

  • (Float)

    the tangent of Pi times x, but with less error than doing the

#tanpil(x) ⇒ GOffice::long double

multiplication outright.

Parameters:

  • x (GOffice::long double)

    a number

Returns:

  • (GOffice::long double)

    the tangent of Pi times x, but with less error than doing the

#trunc(x) ⇒ Float

Parameters:

  • x (Float)

Returns:

  • (Float)

#truncl(x) ⇒ GOffice::long double

Parameters:

  • x (GOffice::long double)

Returns:

  • (GOffice::long double)

#unichar_issign(uc) ⇒ Integer

Parameters:

  • uc (String)

Returns:

  • (Integer)

#unit_define(symbol, dim, factor_to_SI) ⇒ GOffice::Unit

already exists, the existing is returned. Otherwise a new one is created.

Parameters:

  • symbol (String)

    symbol name for unit.

  • dim (String)

    dimension measured by unit.

  • factor_to_SI (Float)

    factor to convert to SI unit.

Returns:

  • (GOffice::Unit)

    the named Go::Unit. If a #GoUnit of that name

#unit_get(id) ⇒ GOffice::Unit

Returns the Go::Unit corresponding to id.

Parameters:

Returns:

  • (GOffice::Unit)

    the Go::Unit corresponding to id.

#unit_get_from_symbol(symbol) ⇒ GOffice::Unit

Parameters:

  • symbol (String)

Returns:

  • (GOffice::Unit)

#url_check_extension(uri, std_ext, new_uri) ⇒ Boolean

Modifies given uri by adding the extension std_ext if needed. If no std_ext is given or uri already has some extension, it just copies uri.

Value in new_uri: newly allocated string which you should free after use, containing (optionally) modified uri.

Parameters:

  • uri (String)

    Uri

  • std_ext (String)

    Standard extension for the content type

  • new_uri (String)

    New uri

Returns:

  • (Boolean)

    false if the uri has an extension not matching std_ext

#url_encode(uri, type) ⇒ String

url-encode a string according to RFC 2368.

Parameters:

  • uri (String)

    The uri part to be encoded

  • type (Integer)

    0: mailto, 1: file or http

Returns:

  • (String)

    an encoded string which the caller is responsible for freeing.

#url_make_relative(uri, ref_uri) ⇒ String

Parameters:

  • uri (String)
  • ref_uri (String)

Returns:

  • (String)

#url_resolve_relative(ref_uri, rel_uri) ⇒ String

Parameters:

  • ref_uri (String)
  • rel_uri (String)

Returns:

  • (String)

#url_simplify(uri) ⇒ String

Parameters:

  • uri (String)

Returns:

  • (String)

#utf8_collate_casefold(a, b) ⇒ Integer

Parameters:

  • a (String)
  • b (String)

Returns:

  • (Integer)

#utf8_strcapital(p, len) ⇒ String

Similar to g_utf8_strup and g_utf8_strup, except that this function creates a string "Very Much Like: This, One".

Parameters:

  • p (String)

    pointer to UTF-8 string

  • len (GOffice::gssize)

    length in bytes, or -1.

Returns:

  • (String)

    newly allocated string.

#uuidString

RFC4122 version 4 compliant random UUIDs generator. must be freed with _free().

Returns:

  • (String)

    A string with RFC41122 version 4 random UUID,

#xml_get_child_by_name(tree, name) ⇒ libxml2::Node

Returns the child with name as name if any.

Parameters:

  • tree (libxml2::Node)

    #xmlNode

  • name (String)

    child name

Returns:

  • (libxml2::Node)

    the child with name as name if any.

#xml_get_child_by_name_by_lang(tree, name) ⇒ libxml2::Node

attribute corresponding to the preferred language.

Parameters:

  • tree (libxml2::Node)

    #xmlNode

  • name (String)

    child name

Returns:

  • (libxml2::Node)

    the child with name as name and with "xml:lang"

#xml_get_child_by_name_no_lang(tree, name) ⇒ libxml2::Node

attribute if any.

Parameters:

  • tree (libxml2::Node)

    #xmlNode

  • name (String)

    child name

Returns:

  • (libxml2::Node)

    the child with name as name and withou "xml:lang"

#xml_in_doc_dispose_on_exit(pdoc) ⇒ nil

Parameters:

  • pdoc (Gsf::XMLInDoc)

Returns:

  • (nil)

#xml_node_get_bool(node, name, result) ⇒ Boolean

Parameters:

  • node (libxml2::NodePtr)
  • name (String)
  • result (Boolean)

Returns:

  • (Boolean)

#xml_node_get_cstr(node, name) ⇒ libxml2::Char

Get an xmlChar * value for a node carried as an attibute result must be xmlFree

Parameters:

  • node (libxml2::NodePtr)

    #xmlNodePtr

  • name (String)

    attribute name

Returns:

  • (libxml2::Char)

    the attribute value

#xml_node_get_double(node, name, result) ⇒ Boolean

Parameters:

  • node (libxml2::NodePtr)
  • name (String)
  • result (Float)

Returns:

  • (Boolean)

#xml_node_get_enum(node, name, etype, val) ⇒ Boolean

Parameters:

  • node (libxml2::NodePtr)
  • name (String)
  • etype (GLib::Type)
  • val (Integer)

Returns:

  • (Boolean)

#xml_node_get_gocolor(node, name, result) ⇒ Boolean

Parameters:

  • node (libxml2::NodePtr)
  • name (String)
  • result (GOffice::Color)

Returns:

  • (Boolean)

#xml_node_get_int(node, name, result) ⇒ Boolean

Parameters:

  • node (libxml2::NodePtr)
  • name (String)
  • result (Integer)

Returns:

  • (Boolean)

#xml_node_set_bool(node, name, val) ⇒ nil

Parameters:

  • node (libxml2::NodePtr)
  • name (String)
  • val (Boolean)

Returns:

  • (nil)

#xml_node_set_cstr(node, name, val) ⇒ nil

Parameters:

  • node (libxml2::NodePtr)
  • name (String)
  • val (String)

Returns:

  • (nil)

#xml_node_set_double(node, name, val, precision) ⇒ nil

Parameters:

  • node (libxml2::NodePtr)
  • name (String)
  • val (Float)
  • precision (Integer)

Returns:

  • (nil)

#xml_node_set_enum(node, name, etype, val) ⇒ nil

Parameters:

  • node (libxml2::NodePtr)
  • name (String)
  • etype (GLib::Type)
  • val (Integer)

Returns:

  • (nil)

#xml_node_set_gocolor(node, name, val) ⇒ nil

Parameters:

  • node (libxml2::NodePtr)
  • name (String)
  • val (GOffice::Color)

Returns:

  • (nil)

#xml_node_set_int(node, name, val) ⇒ nil

Parameters:

  • node (libxml2::NodePtr)
  • name (String)
  • val (Integer)

Returns:

  • (nil)

#xml_out_add_color(out, id, c) ⇒ nil

Parameters:

  • out (Gsf::XMLOut)
  • id (String)
  • c (GOffice::Color)

Returns:

  • (nil)

#xml_out_add_double(output, id, d) ⇒ nil

Output a representation of d that will be read back without loss of precision.

Parameters:

  • output (Gsf::XMLOut)

    destination

  • id (String)

    attribute name

  • d (Float)

    value

Returns:

  • (nil)

#xml_out_add_long_double(output, id, ld) ⇒ nil

Output a representation of ld that will be read back without loss of precision.

Parameters:

  • output (Gsf::XMLOut)

    destination

  • id (String)

    attribute name

  • ld (GOffice::long double)

    value

Returns:

  • (nil)

#xml_parse_file(filename) ⇒ libxml2::DocPtr

Like xmlParseFile, but faster. Does not accept compressed files. See http://bugzilla.gnome.org/show_bug.cgi?id=168414

Note: this reads the entire file into memory and should therefore not be used for user-supplied files.

Parameters:

  • filename (String)

    the locale path to a file to parse.

Returns:

  • (libxml2::DocPtr)

    A libxml2 xmlDocPtr or nil.