diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:31:26 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-26 15:33:37 +0100 |
commit | 3b9e0676b0a193dbf802a6b703827c9cc0689900 (patch) | |
tree | f923afc6c47ceb5e3bb930025f27a8eaeb1758ff /svl/source/numbers/zforscan.cxx | |
parent | 23ab1493b64dff46e5f66941240c9972e99d6f1f (diff) |
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Iefbf64608dba0c0ae01e79e5b679a9b42748b73a
Diffstat (limited to 'svl/source/numbers/zforscan.cxx')
-rw-r--r-- | svl/source/numbers/zforscan.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index 04c8d177c5df..c8835b30fc38 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -131,21 +131,21 @@ void ImpSvNumberformatScan::InitSpecialKeyword( NfKeywordIndex eIdx ) const switch ( eIdx ) { case NF_KEY_TRUE : - ((ImpSvNumberformatScan*)this)->sKeyword[NF_KEY_TRUE] = + const_cast<ImpSvNumberformatScan*>(this)->sKeyword[NF_KEY_TRUE] = pFormatter->GetCharClass()->uppercase( pFormatter->GetLocaleData()->getTrueWord() ); if ( sKeyword[NF_KEY_TRUE].isEmpty() ) { SAL_WARN( "svl.numbers", "InitSpecialKeyword: TRUE_WORD?" ); - ((ImpSvNumberformatScan*)this)->sKeyword[NF_KEY_TRUE] = "TRUE"; + const_cast<ImpSvNumberformatScan*>(this)->sKeyword[NF_KEY_TRUE] = "TRUE"; } break; case NF_KEY_FALSE : - ((ImpSvNumberformatScan*)this)->sKeyword[NF_KEY_FALSE] = + const_cast<ImpSvNumberformatScan*>(this)->sKeyword[NF_KEY_FALSE] = pFormatter->GetCharClass()->uppercase( pFormatter->GetLocaleData()->getFalseWord() ); if ( sKeyword[NF_KEY_FALSE].isEmpty() ) { SAL_WARN( "svl.numbers", "InitSpecialKeyword: FALSE_WORD?" ); - ((ImpSvNumberformatScan*)this)->sKeyword[NF_KEY_FALSE] = "FALSE"; + const_cast<ImpSvNumberformatScan*>(this)->sKeyword[NF_KEY_FALSE] = "FALSE"; } break; default: @@ -155,7 +155,7 @@ void ImpSvNumberformatScan::InitSpecialKeyword( NfKeywordIndex eIdx ) const void ImpSvNumberformatScan::InitCompatCur() const { - ImpSvNumberformatScan* pThis = (ImpSvNumberformatScan*)this; + ImpSvNumberformatScan* pThis = const_cast<ImpSvNumberformatScan*>(this); // currency symbol for old style ("automatic") compatibility format codes pFormatter->GetCompatibilityCurrency( pThis->sCurSymbol, pThis->sCurAbbrev ); // currency symbol upper case @@ -167,7 +167,7 @@ void ImpSvNumberformatScan::InitKeywords() const { if ( !bKeywordsNeedInit ) return ; - ((ImpSvNumberformatScan*)this)->SetDependentKeywords(); + const_cast<ImpSvNumberformatScan*>(this)->SetDependentKeywords(); bKeywordsNeedInit = false; } |