diff options
author | Noel Power <noel.power@novell.com> | 2012-08-03 14:24:00 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-08-03 14:25:47 +0100 |
commit | 52dff376587c2e072048d9b99748cd46336a48ba (patch) | |
tree | 75a0c652eee2dfcc7d027b516b7e7b9c3333dcfd /svl | |
parent | cc51389c07f880d513f94b9c4c1bad449435b406 (diff) |
enable preview for 'special' '*' formats
Change-Id: I2f94c3d8d827ecabc6dd5e685bb40954fe2427c4
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/zforlist.hxx | 3 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx index 7ac39d6d66d7..983cf83089f9 100644 --- a/svl/inc/svl/zforlist.hxx +++ b/svl/inc/svl/zforlist.hxx @@ -513,7 +513,8 @@ public: */ bool GetPreviewString( const String& sFormatString, double fPreviewNumber, String& sOutString, Color** ppColor, - LanguageType eLnge = LANGUAGE_DONTKNOW ); + LanguageType eLnge = LANGUAGE_DONTKNOW, + bool bUseStarFormat = false ); /** Same as <method>GetPreviewString</method> but the format code string may be either language/country eLnge or en_US english US */ diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index cbaed9420b1d..2dbed7993c03 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1510,7 +1510,8 @@ bool SvNumberFormatter::GetPreviewString(const String& sFormatString, double fPreviewNumber, String& sOutString, Color** ppColor, - LanguageType eLnge) + LanguageType eLnge, + bool bUseStarFormat ) { if (sFormatString.Len() == 0) // no empty string return false; @@ -1532,9 +1533,15 @@ bool SvNumberFormatter::GetPreviewString(const String& sFormatString, sal_uInt32 CLOffset = ImpGenerateCL(eLnge); // create new standard formats if necessary nKey = ImpIsEntry(p_Entry->GetFormatstring(),CLOffset, eLnge); if (nKey != NUMBERFORMAT_ENTRY_NOT_FOUND) // already present - GetOutputString(fPreviewNumber,nKey,sOutString,ppColor); + GetOutputString(fPreviewNumber,nKey,sOutString,ppColor, bUseStarFormat); else + { + if ( bUseStarFormat ) + p_Entry->SetStarFormatSupport( true ); p_Entry->GetOutputString(fPreviewNumber,sOutString, ppColor); + if ( bUseStarFormat ) + p_Entry->SetStarFormatSupport( false ); + } delete p_Entry; return true; } |