~ubuntu-branches/ubuntu/saucy/goffice/saucy-proposed

« back to all changes in this revision

Viewing changes to goffice/utils/go-format.c

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2013-08-30 14:03:56 UTC
  • mfrom: (1.2.35)
  • Revision ID: package-import@ubuntu.com-20130830140356-a1e30nbdku8kg4q0
Tags: 0.10.6-1
* New upstream release [August 2013].
* Dropped backported "pixbuf-fixes.patch".

Show diffs side-by-side

added added

removed removed

Lines of Context:
6506
6506
{
6507
6507
        if (!default_general_fmt)
6508
6508
                default_general_fmt = go_format_new_from_XL (
6509
 
                        _go_format_builtins[GO_FORMAT_GENERAL][0]);
 
6509
                        _go_format_builtins (GO_FORMAT_GENERAL)[0]);
6510
6510
        return default_general_fmt;
6511
6511
}
6512
6512
#endif
6560
6560
{
6561
6561
        if (!default_percentage_fmt)
6562
6562
                default_percentage_fmt = go_format_new_from_XL (
6563
 
                        _go_format_builtins[GO_FORMAT_PERCENTAGE][1]);
 
6563
                        _go_format_builtins (GO_FORMAT_PERCENTAGE) [1]);
6564
6564
        return default_percentage_fmt;
6565
6565
}
6566
6566
#endif
6571
6571
{
6572
6572
        if (!default_money_fmt)
6573
6573
                default_money_fmt = go_format_new_from_XL (
6574
 
                        _go_format_builtins[GO_FORMAT_CURRENCY][2]);
 
6574
                        _go_format_builtins (GO_FORMAT_CURRENCY)[2]);
6575
6575
        return default_money_fmt;
6576
6576
}
6577
6577
#endif
6582
6582
{
6583
6583
        if (!default_accounting_fmt)
6584
6584
                default_accounting_fmt = go_format_new_from_XL (
6585
 
                        _go_format_builtins[GO_FORMAT_ACCOUNTING][2]);
 
6585
                        _go_format_builtins (GO_FORMAT_ACCOUNTING)[2]);
6586
6586
        return default_accounting_fmt;
6587
6587
}
6588
6588
#endif
6765
6765
        GOFormatCurrency const *currency = details->currency;
6766
6766
 
6767
6767
        if (!currency)
6768
 
                currency = &_go_format_currencies[0];
 
6768
                currency = _go_format_currencies ();
6769
6769
 
6770
6770
        symstr = currency->symbol;
6771
6771
        switch (g_utf8_get_char (symstr)) {
6835
6835
        GOFormatCurrency const *currency = details->currency;
6836
6836
 
6837
6837
        if (!currency)
6838
 
                currency = &_go_format_currencies[0];
 
6838
                currency = _go_format_currencies ();
6839
6839
 
6840
6840
        extra_quotes = (details->force_quoted &&
6841
6841
                        currency->symbol[0] != '"' &&
6893
6893
 
6894
6894
        quoted = len > 2 && ptr[0] == '\"' && ptr[len - 1] == '\"';
6895
6895
 
6896
 
        for (i = 1; _go_format_currencies[i].symbol; i++) {
6897
 
                const GOFormatCurrency *ci = _go_format_currencies + i;
 
6896
        for (i = 1; _go_format_currencies ()[i].symbol; i++) {
 
6897
                const GOFormatCurrency *ci = _go_format_currencies() + i;
6898
6898
 
6899
6899
                if (ci->precedes != precedes)
6900
6900
                        continue;
8639
8639
                act_fmt = fmt;
8640
8640
        }
8641
8641
 
 
8642
        if (act_fmt == NULL)
 
8643
                        return FALSE;
 
8644
 
8642
8645
        g_object_get (G_OBJECT (xout), "pretty-print", &pp, NULL);
8643
8646
        /* We need to switch off pretty printing since number:text preserves whitespace */
8644
8647
        g_object_set (G_OBJECT (xout), "pretty-print", FALSE, NULL);