~ubuntu-branches/ubuntu/raring/koffice/raring

« back to all changes in this revision

Viewing changes to libs/odf/KoOdfNumberStyles.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-12-06 15:30:09 UTC
  • mfrom: (0.13.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101206153009-yf0dqbp9l7fzwxi8
Tags: 1:2.2.91-0ubuntu1
New upstream RC release

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
    QString format;
67
67
    int precision = -1;
68
68
    int leadingZ  = 1;
69
 
#ifdef __GNUC__
70
 
#warning Nothing changes thousandsSep - dead constant
71
 
#endif
72
 
    bool thousandsSep = false;
 
69
 
 
70
    // Long-standing todo: thousandsSep
 
71
    //bool thousandsSep = false;
73
72
    //todo negred
74
73
    //bool negRed = false;
75
74
    bool ok = false;
147
146
                if (ok)
148
147
                    leadingZ = d;
149
148
            }
150
 
            if (thousandsSep && leadingZ <= 3) {
151
 
                format += "#,";
152
 
                for (i = leadingZ; i <= 3; ++i)
153
 
                    format += '#';
154
 
            }
 
149
//            if (thousandsSep && leadingZ <= 3) {
 
150
//                format += "#,";
 
151
//                for (i = leadingZ; i <= 3; ++i)
 
152
//                    format += '#';
 
153
//            }
155
154
            for (i = 1; i <= leadingZ; ++i) {
156
155
                format +=  '0';
157
 
                if ((i % 3 == 0) && thousandsSep)
158
 
                    format = + ',' ;
 
156
//                if ((i % 3 == 0) && thousandsSep)
 
157
//                    format = + ',' ;
159
158
            }
160
159
            if (precision > -1) {
161
160
                format += '.';
187
186
                    exp = 1;
188
187
            }
189
188
 
190
 
            if (thousandsSep && leadingZ <= 3) {
191
 
                format += "#,";
192
 
                for (i = leadingZ; i <= 3; ++i)
193
 
                    format += '#';
194
 
            }
 
189
//            if (thousandsSep && leadingZ <= 3) {
 
190
//                format += "#,";
 
191
//                for (i = leadingZ; i <= 3; ++i)
 
192
//                    format += '#';
 
193
//            }
195
194
 
196
195
            for (i = 1; i <= leadingZ; ++i) {
197
196
                format += '0';
198
 
                if ((i % 3 == 0) && thousandsSep)
199
 
                    format += ',';
 
197
//                if ((i % 3 == 0) && thousandsSep)
 
198
//                    format += ',';
200
199
            }
201
200
 
202
201
            if (precision > -1) {