diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-21 14:08:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-23 12:36:14 +0200 |
commit | d4ca0cc293e060e68237f251173d951eceb7898f (patch) | |
tree | 58e4b7a97b82b1dc4847fdcb063f09d23c0138d8 /cui/source/options/optgdlg.cxx | |
parent | loplugin: cstylecast (diff) | |
download | core-d4ca0cc293e060e68237f251173d951eceb7898f.tar.gz core-d4ca0cc293e060e68237f251173d951eceb7898f.zip |
loplugin: cstylecast
Change-Id: I0eaeebad6be75a1c0cccdf90955fde1a2909bdba
Diffstat (limited to 'cui/source/options/optgdlg.cxx')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index ef1ae9661187..5d0a32eef05f 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -331,7 +331,7 @@ void OfaMiscTabPage::Reset( const SfxItemSet* rSet ) const SfxPoolItem* pItem = NULL; if ( SfxItemState::SET == rSet->GetItemState( SID_ATTR_YEAR2000, false, &pItem ) ) { - m_pYearValueField->SetValue( ((SfxUInt16Item*)pItem)->GetValue() ); + m_pYearValueField->SetValue( static_cast<const SfxUInt16Item*>(pItem)->GetValue() ); TwoFigureConfigHdl(m_pYearValueField); } else @@ -1072,7 +1072,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(vcl::Window* pParent, const SfxItemSet& //sal_uInt16 p = m_pUserInterfaceLB->InsertLanguage(aLang); OUString aLangStr( SvtLanguageTable::GetLanguageString( aLang, true ) ); sal_uInt16 p = m_pUserInterfaceLB->InsertEntry(aLangStr); - m_pUserInterfaceLB->SetEntryData(p, (void*)(i+1)); + m_pUserInterfaceLB->SetEntryData(p, reinterpret_cast<void*>(i+1)); } } @@ -1089,7 +1089,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(vcl::Window* pParent, const SfxItemSet& sal_Int32 d = 0; for (sal_uInt16 i=0; i < m_pUserInterfaceLB->GetEntryCount(); i++) { - d = (sal_Int32)(sal_IntPtr)m_pUserInterfaceLB->GetEntryData(i); + d = (sal_Int32)reinterpret_cast<sal_IntPtr>(m_pUserInterfaceLB->GetEntryData(i)); if ( d > 0 && seqInstalledLanguages.getLength() > d-1 && seqInstalledLanguages[d-1].equals(m_sUserLocaleValue)) m_pUserInterfaceLB->SelectEntryPos(i); } @@ -1224,7 +1224,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet ) // handle settings for UI Language // a change of setting needs to bring up a warning message OUString aLangString; - sal_Int32 d = (sal_Int32)(sal_IntPtr)m_pUserInterfaceLB->GetEntryData(m_pUserInterfaceLB->GetSelectEntryPos()); + sal_Int32 d = (sal_Int32)reinterpret_cast<sal_IntPtr>(m_pUserInterfaceLB->GetEntryData(m_pUserInterfaceLB->GetSelectEntryPos())); if( d > 0 && seqInstalledLanguages.getLength() > d-1) aLangString = seqInstalledLanguages[d-1]; @@ -1526,21 +1526,21 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet ) const SfxPoolItem* pLang; if( SfxItemState::SET == rSet->GetItemState(SID_ATTR_LANGUAGE, false, &pLang)) { - LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); + LanguageType eTempCurLang = static_cast<const SvxLanguageItem*>(pLang)->GetValue(); if (MsLangId::resolveSystemLanguageByScriptType(eCurLang, ::com::sun::star::i18n::ScriptType::LATIN) != eTempCurLang) eCurLang = eTempCurLang; } if( SfxItemState::SET == rSet->GetItemState(SID_ATTR_CHAR_CJK_LANGUAGE, false, &pLang)) { - LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); + LanguageType eTempCurLang = static_cast<const SvxLanguageItem*>(pLang)->GetValue(); if (MsLangId::resolveSystemLanguageByScriptType(eCurLangCJK, ::com::sun::star::i18n::ScriptType::ASIAN) != eTempCurLang) eCurLangCJK = eTempCurLang; } if( SfxItemState::SET == rSet->GetItemState(SID_ATTR_CHAR_CTL_LANGUAGE, false, &pLang)) { - LanguageType eTempCurLang = ((const SvxLanguageItem*)pLang)->GetValue(); + LanguageType eTempCurLang = static_cast<const SvxLanguageItem*>(pLang)->GetValue(); if (MsLangId::resolveSystemLanguageByScriptType(eCurLangCTL, ::com::sun::star::i18n::ScriptType::COMPLEX) != eTempCurLang) eCurLangCTL = eTempCurLang; } @@ -1583,7 +1583,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet ) // check the box "For the current document only" // set the focus to the Western Language box const SfxPoolItem* pLang = 0; - if ( SfxItemState::SET == rSet->GetItemState(SID_SET_DOCUMENT_LANGUAGE, false, &pLang ) && ((const SfxBoolItem*)pLang)->GetValue() ) + if ( SfxItemState::SET == rSet->GetItemState(SID_SET_DOCUMENT_LANGUAGE, false, &pLang ) && static_cast<const SfxBoolItem*>(pLang)->GetValue() ) { m_pWesternLanguageLB->GrabFocus(); m_pCurrentDocCB->Enable(true); |