1 diff --git svtools/inc/svtools/zforlist.hxx svtools/inc/svtools/zforlist.hxx
2 index bb4a589..069930e 100644
3 --- svtools/inc/svtools/zforlist.hxx
4 +++ svtools/inc/svtools/zforlist.hxx
5 @@ -492,11 +492,16 @@ public:
6 void GetOutputString( String& sString, sal_uInt32 nFIndex,
7 String& sOutString, Color** ppColor );
9 + void GetStringColor( sal_uInt32 nFIndex, Color** ppColor );
11 /** Format a number according to the standard default format matching
12 the given format index */
13 void GetInputLineString( const double& fOutNumber,
14 sal_uInt32 nFIndex, String& sOutString );
16 + void GetInputLineString( const double& fOutNumber,
17 + sal_uInt32 nFIndex, String& sOutString, Color** ppColor );
19 /** Format a number according to a format code string to be scanned.
21 <FALSE/> if format code contains an error
22 diff --git svtools/inc/svtools/zformat.hxx svtools/inc/svtools/zformat.hxx
23 index 4c52b10..d502bb6 100644
24 --- svtools/inc/svtools/zformat.hxx
25 +++ svtools/inc/svtools/zformat.hxx
26 @@ -241,6 +241,7 @@ public:
28 BOOL GetOutputString( double fNumber, String& OutString, Color** ppColor );
29 BOOL GetOutputString( String& sString, String& OutString, Color** ppColor );
30 + void GetStringColor( Color** ppColor );
33 BOOL IsTextFormat() const { return (eType & NUMBERFORMAT_TEXT) != 0; }
34 diff --git svtools/source/numbers/zforlist.cxx svtools/source/numbers/zforlist.cxx
35 index 4b13774..ceedb05 100644
36 --- svtools/source/numbers/zforlist.cxx
37 +++ svtools/source/numbers/zforlist.cxx
38 @@ -1488,9 +1488,16 @@ void SvNumberFormatter::GetInputLineString(const double& fOutNumber,
43 + GetInputLineString(fOutNumber, nFIndex, sOutString, &pColor);
46 +void SvNumberFormatter::GetInputLineString(const double& fOutNumber,
48 + String& sOutString, Color** ppColor)
50 SvNumberformat* pFormat;
53 pFormat = (SvNumberformat*) aFTable.Get(nFIndex);
55 pFormat = aFTable.Get(ZF_STANDARD);
56 @@ -1531,7 +1538,13 @@ void SvNumberFormatter::GetInputLineString(const double& fOutNumber,
57 nOldPrec = pFormatScanner->GetStandardPrec();
58 ChangeStandardPrec(300); // Merkwert
60 - pFormat->GetOutputString(fOutNumber, sOutString, &pColor);
62 + pFormat->GetOutputString(fOutNumber, sOutString, ppColor);
65 + Color* pColor; // throw away the color info.
66 + pFormat->GetOutputString(fOutNumber, sOutString, &pColor);
70 ChangeStandardPrec(nOldPrec);
71 @@ -1574,6 +1587,21 @@ void SvNumberFormatter::GetOutputString(String& sString,
75 +void SvNumberFormatter::GetStringColor( sal_uInt32 nFIndex, Color** ppColor)
80 + SvNumberformat* pFormat = (SvNumberformat*) aFTable.Get(nFIndex);
82 + pFormat = aFTable.Get(ZF_STANDARD_TEXT);
84 + if (pFormat->IsTextFormat() || pFormat->HasTextFormat())
85 + pFormat->GetStringColor(ppColor);
90 BOOL SvNumberFormatter::GetPreviewString(const String& sFormatString,
91 double fPreviewNumber,
93 diff --git svtools/source/numbers/zformat.cxx svtools/source/numbers/zformat.cxx
94 index 368fb16..65c0592 100644
95 --- svtools/source/numbers/zformat.cxx
96 +++ svtools/source/numbers/zformat.cxx
97 @@ -1915,6 +1915,25 @@ BOOL SvNumberformat::GetOutputString(String& sString,
102 +void SvNumberformat::GetStringColor( Color** ppColor )
108 + if (eType & NUMBERFORMAT_TEXT)
110 + else if (NumFor[3].GetnAnz() > 0)
114 + *ppColor = NULL; // no change of color
117 + *ppColor = NumFor[nIx].GetColor();
121 void SvNumberformat::GetNextFareyNumber(ULONG nPrec, ULONG x0, ULONG x1,