View | Details | Raw Unified | Return to issue 46511
Collapse All | Expand All

(-)sc/inc/cellform.hxx (-1 / +1 lines)
Lines 58-64 public: Link Here
58
                               ScForceTextFmt eForceTextFmt = ftDontForce );
58
                               ScForceTextFmt eForceTextFmt = ftDontForce );
59
59
60
    static void		GetInputString( ScBaseCell* pCell, ULONG nFormat, String& rString,
60
    static void		GetInputString( ScBaseCell* pCell, ULONG nFormat, String& rString,
61
                                      SvNumberFormatter& rFormatter );
61
                                      SvNumberFormatter& rFormatter, Color** ppColor = NULL );
62
};
62
};
63
63
64
64
(-)sc/source/core/tool/cellform.cxx (-3 / +8 lines)
Lines 159-166 void ScCellFormat::GetString( ScBaseCell* pCell, ULONG nFormat, String& rString, Link Here
159
}
159
}
160
160
161
void ScCellFormat::GetInputString( ScBaseCell* pCell, ULONG nFormat, String& rString,
161
void ScCellFormat::GetInputString( ScBaseCell* pCell, ULONG nFormat, String& rString,
162
                                      SvNumberFormatter& rFormatter )
162
                                      SvNumberFormatter& rFormatter, Color** ppColor )
163
{
163
{
164
    if (ppColor)
165
        *ppColor = NULL;
166
164
    if (&rFormatter==NULL)
167
    if (&rFormatter==NULL)
165
    {
168
    {
166
        rString.Erase();
169
        rString.Erase();
Lines 173-189 void ScCellFormat::GetInputString( ScBaseCell* pCell, ULONG nFormat, String& rSt Link Here
173
        case CELLTYPE_STRING:
176
        case CELLTYPE_STRING:
174
            {
177
            {
175
                ((ScStringCell*)pCell)->GetString( rString );
178
                ((ScStringCell*)pCell)->GetString( rString );
179
                rFormatter.GetStringColor(nFormat, ppColor);
176
            }
180
            }
177
            break;
181
            break;
178
        case CELLTYPE_EDIT:
182
        case CELLTYPE_EDIT:
179
            {
183
            {
180
                ((ScEditCell*)pCell)->GetString( rString );
184
                ((ScEditCell*)pCell)->GetString( rString );
185
                rFormatter.GetStringColor(nFormat, ppColor);
181
            }
186
            }
182
            break;
187
            break;
183
        case CELLTYPE_VALUE:
188
        case CELLTYPE_VALUE:
184
            {
189
            {
185
                double nValue = ((ScValueCell*)pCell)->GetValue();
190
                double nValue = ((ScValueCell*)pCell)->GetValue();
186
                rFormatter.GetInputLineString( nValue, nFormat, rString );
191
                rFormatter.GetInputLineString( nValue, nFormat, rString, ppColor );
187
            }
192
            }
188
            break;
193
            break;
189
        case CELLTYPE_FORMULA:
194
        case CELLTYPE_FORMULA:
Lines 195-201 void ScCellFormat::GetInputString( ScBaseCell* pCell, ULONG nFormat, String& rSt Link Here
195
                else if (((ScFormulaCell*)pCell)->IsValue())
200
                else if (((ScFormulaCell*)pCell)->IsValue())
196
                {
201
                {
197
                    double nValue = ((ScFormulaCell*)pCell)->GetValue();
202
                    double nValue = ((ScFormulaCell*)pCell)->GetValue();
198
                    rFormatter.GetInputLineString( nValue, nFormat, rString );
203
                    rFormatter.GetInputLineString( nValue, nFormat, rString, ppColor );
199
                }
204
                }
200
                else
205
                else
201
                {
206
                {
(-)sc/source/ui/view/output2.cxx (-6 / +17 lines)
Lines 451-462 BOOL ScDrawStringsVars::SetText( ScBaseCell* pCell ) Link Here
451
451
452
            Color* pColor;
452
            Color* pColor;
453
            ULONG nFormat = GetValueFormat();
453
            ULONG nFormat = GetValueFormat();
454
            ScCellFormat::GetString( pCell,
454
455
                                     nFormat, aString, &pColor,
455
            if ((nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0)
456
                                     *pOutput->pDoc->GetFormatTable(),
456
                // For 'General' format type, display the value the same way it
457
                                     pOutput->bShowNullValues,
457
                // is displayed in the edit window, which automatically
458
                                     pOutput->bShowFormulas,
458
                // adjusts the number of decimal places based on the value of
459
                                     ftCheck );
459
                // the cell.
460
                ScCellFormat::GetInputString( pCell,
461
                                              nFormat, aString,
462
                                              *pOutput->pDoc->GetFormatTable(),
463
                                              &pColor );
464
            else
465
                ScCellFormat::GetString( pCell,
466
                                         nFormat, aString, &pColor,
467
                                         *pOutput->pDoc->GetFormatTable(),
468
                                         pOutput->bShowNullValues,
469
                                         pOutput->bShowFormulas,
470
                                         ftCheck );
460
471
461
            if (aString.Len() > DRAWTEXT_MAX)
472
            if (aString.Len() > DRAWTEXT_MAX)
462
                aString.Erase(DRAWTEXT_MAX);
473
                aString.Erase(DRAWTEXT_MAX);

Return to issue 46511