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 / +14 lines)
Lines 454-465 BOOL ScDrawStringsVars::SetText( ScBaseCell* pCell ) Link Here
454
454
455
            Color* pColor;
455
            Color* pColor;
456
            ULONG nFormat = GetValueFormat();
456
            ULONG nFormat = GetValueFormat();
457
            ScCellFormat::GetString( pCell,
457
458
                                     nFormat, aString, &pColor,
458
            if (static_cast<NfIndexTableOffset>(nFormat) == NF_NUMBER_STANDARD)
459
                                     *pFormatter,
459
                // For 'General' format type, display the value the same way it
460
                                     pOutput->bShowNullValues,
460
                // is displayed in the edit window, which automatically
461
                                     pOutput->bShowFormulas,
461
                // adjusts the number of decimal places based on the value of
462
                                     ftCheck );
462
                // the cell.
463
                ScCellFormat::GetInputString(pCell, nFormat, aString, *pFormatter, &pColor);
464
            else
465
                ScCellFormat::GetString( pCell,
466
                                         nFormat, aString, &pColor,
467
                                         *pFormatter,
468
                                         pOutput->bShowNullValues,
469
                                         pOutput->bShowFormulas,
470
                                         ftCheck );
463
471
464
            if (aString.Len() > DRAWTEXT_MAX)
472
            if (aString.Len() > DRAWTEXT_MAX)
465
                aString.Erase(DRAWTEXT_MAX);
473
                aString.Erase(DRAWTEXT_MAX);

Return to issue 46511