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 /svx | |
parent | cc51389c07f880d513f94b9c4c1bad449435b406 (diff) |
enable preview for 'special' '*' formats
Change-Id: I2f94c3d8d827ecabc6dd5e685bb40954fe2427c4
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/numfmtsh.hxx | 4 | ||||
-rw-r--r-- | svx/source/items/numfmtsh.cxx | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/svx/inc/svx/numfmtsh.hxx b/svx/inc/svx/numfmtsh.hxx index d131e9fb7511..ad640d52f14c 100644 --- a/svx/inc/svx/numfmtsh.hxx +++ b/svx/inc/svx/numfmtsh.hxx @@ -185,6 +185,8 @@ public: bool IsInTable(sal_uInt16 nPos, bool bTmpBanking, ::rtl::OUString const& rFmtString); + void SetUseStarFormat( bool bUse ) { bUseStarFormat = bUse; } + bool IsUseStarFormat( void ) { return bUseStarFormat; } private: static const double DEFAULT_NUMVALUE; @@ -206,7 +208,7 @@ private: bool bBankingSymbol; sal_uInt16 nCurCurrencyEntryPos; std::vector<String*> aCurrencyFormatList; - + bool bUseStarFormat; #ifdef _SVX_NUMFMTSH_CXX SVX_DLLPRIVATE short FillEntryList_Impl( std::vector<String*>& rList ); SVX_DLLPRIVATE void FillEListWithStd_Impl( std::vector<String*>& rList,sal_uInt16 aPrivCat, short &Pos); diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index 896d88e953b9..48ca710362ea 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -84,7 +84,8 @@ SvxNumberFormatShell::SvxNumberFormatShell( SvNumberFormatter* pNumFormatter, nCurFormatKey ( nFormatKey ), pCurCurrencyEntry(NULL), bBankingSymbol (false), - nCurCurrencyEntryPos((sal_uInt16) SELPOS_NONE) + nCurCurrencyEntryPos((sal_uInt16) SELPOS_NONE), + bUseStarFormat (false) { nValNum = DEFAULT_NUMVALUE; @@ -115,7 +116,8 @@ SvxNumberFormatShell::SvxNumberFormatShell( SvNumberFormatter* pNumFormatter, nCurFormatKey ( nFormatKey ), pCurCurrencyEntry(NULL), bBankingSymbol (false), - nCurCurrencyEntryPos((sal_uInt16) SELPOS_NONE) + nCurCurrencyEntryPos((sal_uInt16) SELPOS_NONE), + bUseStarFormat (false) { // #50441# When used in Writer, the SvxNumberInfoItem contains the // original string in addition to the value @@ -439,7 +441,7 @@ void SvxNumberFormatShell::MakePreviewString( const String& rFormatStr, // real preview - not implemented in NumberFormatter for text formats pFormatter->GetPreviewString( rFormatStr, nValNum, rPreviewStr, - &rpFontColor, eCurLanguage ); + &rpFontColor, eCurLanguage, bUseStarFormat ); } else { @@ -453,7 +455,7 @@ void SvxNumberFormatShell::MakePreviewString( const String& rFormatStr, rPreviewStr, &rpFontColor ); else pFormatter->GetOutputString( nValNum, nExistingFormat, - rPreviewStr, &rpFontColor ); + rPreviewStr, &rpFontColor, bUseStarFormat ); } } @@ -1152,7 +1154,7 @@ void SvxNumberFormatShell::GetPreviewString_Impl( String& rString, Color*& rpCol if ( bUseText ) pFormatter->GetOutputString( aValStr, nCurFormatKey, rString, &rpColor ); else - pFormatter->GetOutputString( nValNum, nCurFormatKey, rString, &rpColor ); + pFormatter->GetOutputString( nValNum, nCurFormatKey, rString, &rpColor, bUseStarFormat ); } // ----------------------------------------------------------------------- |