diff options
author | Noel Power <noel.power@novell.com> | 2012-04-16 16:20:51 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-04-17 14:30:32 +0100 |
commit | 46e18bc915ac94a81462642cc9d56d29c04d0c46 (patch) | |
tree | a68c3816ffabb574ac91b21929a8606911c3a5ef /svl | |
parent | f39d0b837742c69488e43e919f7f1a927c2859ed (diff) |
enable '*' repeat next char to fill available width for calc num formats
but - however no support to import/export this to file format yet
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/zforlist.hxx | 4 | ||||
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 16 |
2 files changed, 15 insertions, 5 deletions
diff --git a/svl/inc/svl/zforlist.hxx b/svl/inc/svl/zforlist.hxx index 1249250bbe2b..7f2a7ff7c3bd 100644 --- a/svl/inc/svl/zforlist.hxx +++ b/svl/inc/svl/zforlist.hxx @@ -483,11 +483,11 @@ public: /// Format a number according to a format index, return string and color void GetOutputString( const double& fOutNumber, sal_uInt32 nFIndex, - String& sOutString, Color** ppColor ); + String& sOutString, Color** ppColor, bool bUseStarFormat = false ); /// Format a number according to a format index, return string and color void GetOutputString( const double& fOutNumber, sal_uInt32 nFIndex, - rtl::OUString& sOutString, Color** ppColor ); + rtl::OUString& sOutString, Color** ppColor, bool bUseStarFormat = false ); /** Format a string according to a format index, return string and color. Formats only if the format code is of type text or the 4th subcode diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 5a6848c7238e..d897274e002d 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -1546,7 +1546,8 @@ void SvNumberFormatter::GetInputLineString(const double& fOutNumber, void SvNumberFormatter::GetOutputString(const double& fOutNumber, sal_uInt32 nFIndex, String& sOutString, - Color** ppColor) + Color** ppColor, + bool bUseStarFormat ) { if (bNoZero && fOutNumber == 0.0) { @@ -1557,13 +1558,17 @@ void SvNumberFormatter::GetOutputString(const double& fOutNumber, if (!pFormat) pFormat = GetFormatEntry(ZF_STANDARD); ChangeIntl(pFormat->GetLanguage()); + if ( bUseStarFormat ) + pFormat->SetStarFormatSupport( true ); pFormat->GetOutputString(fOutNumber, sOutString, ppColor); + if ( bUseStarFormat ) + pFormat->SetStarFormatSupport( false ); } void SvNumberFormatter::GetOutputString(String& sString, sal_uInt32 nFIndex, String& sOutString, - Color** ppColor) + Color** ppColor ) { SvNumberformat* pFormat = GetFormatEntry( nFIndex ); if (!pFormat) @@ -1583,7 +1588,8 @@ void SvNumberFormatter::GetOutputString(String& sString, void SvNumberFormatter::GetOutputString(const double& fOutNumber, sal_uInt32 nFIndex, rtl::OUString& sOutString, - Color** ppColor) + Color** ppColor, + bool bUseStarFormat ) { if (bNoZero && fOutNumber == 0.0) { @@ -1595,7 +1601,11 @@ void SvNumberFormatter::GetOutputString(const double& fOutNumber, pFormat = GetFormatEntry(ZF_STANDARD); ChangeIntl(pFormat->GetLanguage()); String aOutString; + if ( bUseStarFormat ) + pFormat->SetStarFormatSupport( true ); pFormat->GetOutputString(fOutNumber, aOutString, ppColor); + if ( bUseStarFormat ) + pFormat->SetStarFormatSupport( false ); sOutString = aOutString; } |