diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-15 09:06:24 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-15 09:06:24 +0100 |
commit | 8fc6c5c84b3e4249f4c38ebb7399e0d07d9d4463 (patch) | |
tree | 4eeccec5155416c03527870091ac1d3f2e35ebb9 /cui | |
parent | d73e5b066bc575ee97ec388f301806297eeb7f59 (diff) |
More loplugin:cstylecast: cui
Change-Id: I5bbdd0b65111c65850652f2ddc93379954498073
Diffstat (limited to 'cui')
25 files changed, 90 insertions, 90 deletions
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 2d41c1b664f5..933f3c394512 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -427,10 +427,10 @@ void SvxHyperlinkTabPageBase::GetDataFromCommonFields( OUString& aStrName, aStrIntName = mpEdText->GetText(); aStrName = mpEdIndication->GetText(); aStrFrame = mpCbbFrame->GetText(); - eMode = (SvxLinkInsertMode) (mpLbForm->GetSelectedEntryPos()+1); + eMode = static_cast<SvxLinkInsertMode>(mpLbForm->GetSelectedEntryPos()+1); // Ask dialog whether the current doc is a HTML-doc if (static_cast<SvxHpLinkDlg*>(mpDialog.get())->IsHTMLDoc()) - eMode = (SvxLinkInsertMode) ( sal_uInt16(eMode) | HLINK_HTMLMODE ); + eMode = static_cast<SvxLinkInsertMode>( sal_uInt16(eMode) | HLINK_HTMLMODE ); } // reset dialog-fields diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx index 07cc8d3cb883..05c13741bd19 100644 --- a/cui/source/options/optasian.cxx +++ b/cui/source/options/optasian.cxx @@ -194,7 +194,7 @@ bool SvxAsianLayoutPage::FillItemSet( SfxItemSet* ) OUString sCompress(cCharacterCompressionType); if(pImpl->xPrSetInfo.is() && pImpl->xPrSetInfo->hasPropertyByName(sCompress)) { - pImpl->xPrSet->setPropertyValue(sCompress, Any((sal_uInt16)nSet)); + pImpl->xPrSet->setPropertyValue(sCompress, Any(static_cast<sal_uInt16>(nSet))); } } pImpl->aConfig.Commit(); @@ -253,7 +253,7 @@ void SvxAsianLayoutPage::Reset( const SfxItemSet* ) Any aVal = pImpl->xPrSet->getPropertyValue(sCompress); sal_uInt16 nTmp; if (aVal >>= nTmp) - nCompress = (CharCompressType)nTmp; + nCompress = static_cast<CharCompressType>(nTmp); } OUString sPunct(cIsKernAsianPunctuation); if(pImpl->xPrSetInfo->hasPropertyByName(sPunct)) diff --git a/cui/source/options/optctl.cxx b/cui/source/options/optctl.cxx index 563888e55cf6..fbbbe0af158d 100644 --- a/cui/source/options/optctl.cxx +++ b/cui/source/options/optctl.cxx @@ -115,7 +115,7 @@ bool SvxCTLOptionsPage::FillItemSet( SfxItemSet* ) if ( m_pNumeralsLB->IsValueChangedFromSaved() ) { const sal_Int32 nPos = m_pNumeralsLB->GetSelectedEntryPos(); - aCTLOptions.SetCTLTextNumerals( (SvtCTLOptions::TextNumerals)nPos ); + aCTLOptions.SetCTLTextNumerals( static_cast<SvtCTLOptions::TextNumerals>(nPos) ); bModified = true; } diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 1cbef34f5251..8a3a972771f5 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -823,7 +823,7 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) // Mouse Snap Mode SnapType eOldSnap = pAppearanceCfg->GetSnapMode(); - SnapType eNewSnap = (SnapType)m_pMousePosLB->GetSelectedEntryPos(); + SnapType eNewSnap = static_cast<SnapType>(m_pMousePosLB->GetSelectedEntryPos()); if(eNewSnap > SnapType::NONE) eNewSnap = SnapType::NONE; @@ -1001,7 +1001,7 @@ void OfaViewTabPage::Reset( const SfxItemSet* ) m_pIconStyleLB->SaveValue(); // Mouse Snap - m_pMousePosLB->SelectEntryPos((sal_Int32)pAppearanceCfg->GetSnapMode()); + m_pMousePosLB->SelectEntryPos(static_cast<sal_Int32>(pAppearanceCfg->GetSnapMode())); m_pMousePosLB->SaveValue(); // Mouse Snap diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index a625c014677c..63b060ce3797 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -1178,7 +1178,7 @@ bool SvxLinguTabPage::FillItemSet( SfxItemSet* rCoreSet ) SvTreeListEntry *pEntry = m_pLinguOptionsCLB->GetEntry( j ); OptionsUserData aData( reinterpret_cast<sal_uLong>(pEntry->GetUserData()) ); - OUString aPropName( lcl_GetPropertyName( (EID_OPTIONS) aData.GetEntryId() ) ); + OUString aPropName( lcl_GetPropertyName( static_cast<EID_OPTIONS>(aData.GetEntryId()) ) ); Any aAny; if (aData.IsCheckable()) diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 0bd155a15198..00bdcd0cadd8 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -101,7 +101,7 @@ struct SvxBackgroundPage_Impl /// Returns the fill style of the currently selected entry. static drawing::FillStyle lcl_getFillStyle(ListBox const * pLbSelect) { - return (drawing::FillStyle)reinterpret_cast<sal_uLong>(pLbSelect->GetSelectedEntryData()); + return static_cast<drawing::FillStyle>(reinterpret_cast<sal_uLong>(pLbSelect->GetSelectedEntryData())); } // Selects the entry matching the specified fill style. @@ -109,7 +109,7 @@ static void lcl_setFillStyle(ListBox* pLbSelect, drawing::FillStyle eStyle) { for (int i = 0; i < pLbSelect->GetEntryCount(); ++i) { - if ((drawing::FillStyle)reinterpret_cast<sal_uLong>(pLbSelect->GetEntryData(i)) == eStyle) + if (static_cast<drawing::FillStyle>(reinterpret_cast<sal_uLong>(pLbSelect->GetEntryData(i))) == eStyle) { pLbSelect->SelectEntryPos(i); return; diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 4fbea4152af0..aa92adbe3973 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1489,11 +1489,11 @@ void SvxCharEffectsPage::UpdatePreview_Impl() rCTLFont.SetColor(GetPreviewFontColor(rSelectedColor)); sal_Int32 nPos = m_pUnderlineLB->GetSelectedEntryPos(); - FontLineStyle eUnderline = (FontLineStyle)reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData( nPos )); + FontLineStyle eUnderline = static_cast<FontLineStyle>(reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData( nPos ))); nPos = m_pOverlineLB->GetSelectedEntryPos(); - FontLineStyle eOverline = (FontLineStyle)reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData( nPos )); + FontLineStyle eOverline = static_cast<FontLineStyle>(reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData( nPos ))); nPos = m_pStrikeoutLB->GetSelectedEntryPos(); - FontStrikeout eStrikeout = (FontStrikeout)reinterpret_cast<sal_uLong>(m_pStrikeoutLB->GetEntryData( nPos )); + FontStrikeout eStrikeout = static_cast<FontStrikeout>(reinterpret_cast<sal_uLong>(m_pStrikeoutLB->GetEntryData( nPos ))); rFont.SetUnderline( eUnderline ); rCJKFont.SetUnderline( eUnderline ); rCTLFont.SetUnderline( eUnderline ); @@ -1511,7 +1511,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl() if (nEmphasis != LISTBOX_ENTRY_NOTFOUND) { bool bUnder = ( CHRDLG_POSITION_UNDER == reinterpret_cast<sal_uLong>(m_pPositionLB->GetEntryData( nPos )) ); - FontEmphasisMark eMark = (FontEmphasisMark)nEmphasis; + FontEmphasisMark eMark = static_cast<FontEmphasisMark>(nEmphasis); eMark |= bUnder ? FontEmphasisMark::PosBelow : FontEmphasisMark::PosAbove; rFont.SetEmphasisMark( eMark ); rCJKFont.SetEmphasisMark( eMark ); @@ -1521,9 +1521,9 @@ void SvxCharEffectsPage::UpdatePreview_Impl() sal_Int32 nRelief = m_pReliefLB->GetSelectedEntryPos(); if (LISTBOX_ENTRY_NOTFOUND != nRelief) { - rFont.SetRelief( (FontRelief)nRelief ); - rCJKFont.SetRelief( (FontRelief)nRelief ); - rCTLFont.SetRelief( (FontRelief)nRelief ); + rFont.SetRelief( static_cast<FontRelief>(nRelief) ); + rCJKFont.SetRelief( static_cast<FontRelief>(nRelief) ); + rCTLFont.SetRelief( static_cast<FontRelief>(nRelief) ); } rFont.SetOutline( StateToAttr( m_pOutlineBtn->GetState() ) ); @@ -1537,7 +1537,7 @@ void SvxCharEffectsPage::UpdatePreview_Impl() sal_Int32 nCapsPos = m_pEffectsLB->GetSelectedEntryPos(); if ( nCapsPos != LISTBOX_ENTRY_NOTFOUND ) { - SvxCaseMap eCaps = (SvxCaseMap)nCapsPos; + SvxCaseMap eCaps = static_cast<SvxCaseMap>(nCapsPos); rFont.SetCaseMap( eCaps ); rCJKFont.SetCaseMap( eCaps ); // #i78474# small caps do not exist in CTL fonts @@ -1758,7 +1758,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) { for ( sal_Int32 i = 0; i < m_pUnderlineLB->GetEntryCount(); ++i ) { - if ( (FontLineStyle)reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData(i)) == eUnderline ) + if ( static_cast<FontLineStyle>(reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData(i))) == eUnderline ) { m_pUnderlineLB->SelectEntryPos(i); bEnable = true; @@ -1802,7 +1802,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) { for ( sal_Int32 i = 0; i < m_pOverlineLB->GetEntryCount(); ++i ) { - if ( (FontLineStyle)reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData(i)) == eOverline ) + if ( static_cast<FontLineStyle>(reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData(i))) == eOverline ) { m_pOverlineLB->SelectEntryPos(i); bEnable = true; @@ -1846,7 +1846,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) { for ( sal_Int32 i = 0; i < m_pStrikeoutLB->GetEntryCount(); ++i ) { - if ( (FontStrikeout)reinterpret_cast<sal_uLong>(m_pStrikeoutLB->GetEntryData(i)) == eStrikeout ) + if ( static_cast<FontStrikeout>(reinterpret_cast<sal_uLong>(m_pStrikeoutLB->GetEntryData(i))) == eStrikeout ) { m_pStrikeoutLB->SelectEntryPos(i); bEnable = true; @@ -1900,7 +1900,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) rCJKFont.SetEmphasisMark( eMark ); rCTLFont.SetEmphasisMark( eMark ); - m_pEmphasisLB->SelectEntryPos( (sal_Int32)FontEmphasisMark( eMark & FontEmphasisMark::Style ) ); + m_pEmphasisLB->SelectEntryPos( static_cast<sal_Int32>(FontEmphasisMark( eMark & FontEmphasisMark::Style )) ); eMark &= ~FontEmphasisMark::Style; sal_uLong nEntryData = ( eMark == FontEmphasisMark::PosAbove ) ? CHRDLG_POSITION_OVER @@ -1998,7 +1998,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) case SfxItemState::SET: { const SvxCharReliefItem& rItem = static_cast<const SvxCharReliefItem&>(rSet->Get( nWhich )); - m_pReliefLB->SelectEntryPos((sal_Int32)rItem.GetValue()); + m_pReliefLB->SelectEntryPos(static_cast<sal_Int32>(rItem.GetValue())); SelectHdl_Impl(m_pReliefLB); break; } @@ -2026,7 +2026,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) case SfxItemState::SET: { const SvxContourItem& rItem = static_cast<const SvxContourItem&>(rSet->Get( nWhich )); - m_pOutlineBtn->SetState( (TriState)rItem.GetValue() ); + m_pOutlineBtn->SetState( static_cast<TriState>(rItem.GetValue()) ); m_pOutlineBtn->EnableTriState( false ); break; } @@ -2055,7 +2055,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) case SfxItemState::SET: { const SvxShadowedItem& rItem = static_cast<const SvxShadowedItem&>(rSet->Get( nWhich )); - m_pShadowBtn->SetState( (TriState)rItem.GetValue() ); + m_pShadowBtn->SetState( static_cast<TriState>(rItem.GetValue()) ); m_pShadowBtn->EnableTriState( false ); break; } @@ -2084,7 +2084,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) case SfxItemState::SET: { const SvxBlinkItem& rItem = static_cast<const SvxBlinkItem&>(rSet->Get( nWhich )); - m_pBlinkingBtn->SetState( (TriState)rItem.GetValue() ); + m_pBlinkingBtn->SetState( static_cast<TriState>(rItem.GetValue()) ); m_pBlinkingBtn->EnableTriState( false ); break; } @@ -2112,7 +2112,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet* rSet ) case SfxItemState::SET: { const SvxCharHiddenItem& rItem = static_cast<const SvxCharHiddenItem&>(rSet->Get( nWhich )); - m_pHiddenBtn->SetState( (TriState)rItem.GetValue() ); + m_pHiddenBtn->SetState( static_cast<TriState>(rItem.GetValue()) ); m_pHiddenBtn->EnableTriState( false ); break; } @@ -2155,7 +2155,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_UNDERLINE ); pOld = GetOldItem( *rSet, SID_ATTR_CHAR_UNDERLINE ); sal_Int32 nPos = m_pUnderlineLB->GetSelectedEntryPos(); - FontLineStyle eUnder = (FontLineStyle)reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData( nPos )); + FontLineStyle eUnder = static_cast<FontLineStyle>(reinterpret_cast<sal_uLong>(m_pUnderlineLB->GetEntryData( nPos ))); if ( pOld ) { @@ -2189,7 +2189,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) nWhich = GetWhich( SID_ATTR_CHAR_OVERLINE ); pOld = GetOldItem( *rSet, SID_ATTR_CHAR_OVERLINE ); nPos = m_pOverlineLB->GetSelectedEntryPos(); - FontLineStyle eOver = (FontLineStyle)reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData( nPos )); + FontLineStyle eOver = static_cast<FontLineStyle>(reinterpret_cast<sal_uLong>(m_pOverlineLB->GetEntryData( nPos ))); if ( pOld ) { @@ -2223,7 +2223,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) nWhich = GetWhich( SID_ATTR_CHAR_STRIKEOUT ); pOld = GetOldItem( *rSet, SID_ATTR_CHAR_STRIKEOUT ); nPos = m_pStrikeoutLB->GetSelectedEntryPos(); - FontStrikeout eStrike = (FontStrikeout)reinterpret_cast<sal_uLong>(m_pStrikeoutLB->GetEntryData( nPos )); + FontStrikeout eStrike = static_cast<FontStrikeout>(reinterpret_cast<sal_uLong>(m_pStrikeoutLB->GetEntryData( nPos ))); if ( pOld ) { @@ -2280,7 +2280,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) pOld = GetOldItem( *rSet, SID_ATTR_CHAR_EMPHASISMARK ); sal_Int32 nMarkPos = m_pEmphasisLB->GetSelectedEntryPos(); sal_Int32 nPosPos = m_pPositionLB->GetSelectedEntryPos(); - FontEmphasisMark eMark = (FontEmphasisMark)nMarkPos; + FontEmphasisMark eMark = static_cast<FontEmphasisMark>(nMarkPos); if ( m_pPositionLB->IsEnabled() ) { eMark |= ( CHRDLG_POSITION_UNDER == reinterpret_cast<sal_uLong>(m_pPositionLB->GetEntryData( nPosPos )) ) @@ -2319,7 +2319,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) sal_Int32 nCapsPos = m_pEffectsLB->GetSelectedEntryPos(); if ( nCapsPos != LISTBOX_ENTRY_NOTFOUND ) { - eCaseMap = (SvxCaseMap)nCapsPos; + eCaseMap = static_cast<SvxCaseMap>(nCapsPos); bChecked = true; } @@ -2352,7 +2352,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) if(m_pReliefLB->IsValueChangedFromSaved()) { m_pReliefLB->SaveValue(); - SvxCharReliefItem aRelief((FontRelief)m_pReliefLB->GetSelectedEntryPos(), nWhich); + SvxCharReliefItem aRelief(static_cast<FontRelief>(m_pReliefLB->GetSelectedEntryPos()), nWhich); rSet->Put(aRelief); } diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx index 7aa82e5bad6f..ebfe9a008e2e 100644 --- a/cui/source/tabpages/connect.cxx +++ b/cui/source/tabpages/connect.cxx @@ -367,7 +367,7 @@ bool SvxConnectionPage::FillItemSet( SfxItemSet* rAttrs) { if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - rAttrs->Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) ); + rAttrs->Put( SdrEdgeKindItem( static_cast<SdrEdgeKind>(nPos) ) ); bModified = true; } } @@ -453,7 +453,7 @@ void SvxConnectionPage::ChangeAttrHdl_Impl(void const * p) sal_Int32 nPos = m_pLbType->GetSelectedEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - aAttrSet.Put( SdrEdgeKindItem( (SdrEdgeKind) nPos ) ); + aAttrSet.Put( SdrEdgeKindItem( static_cast<SdrEdgeKind>(nPos) ) ); } } diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx index 384475316bac..969ad25fcf0d 100644 --- a/cui/source/tabpages/labdlg.cxx +++ b/cui/source/tabpages/labdlg.cxx @@ -171,7 +171,7 @@ bool SvxCaptionTabPage::FillItemSet( SfxItemSet* _rOutAttrs) MapUnit eUnit; - nCaptionType = (SdrCaptionType) (m_pCT_CAPTTYPE->GetSelectItemId()-1); + nCaptionType = static_cast<SdrCaptionType>(m_pCT_CAPTTYPE->GetSelectItemId()-1); _rOutAttrs->Put( SdrCaptionTypeItem( nCaptionType ) ); @@ -349,7 +349,7 @@ void SvxCaptionTabPage::Reset( const SfxItemSet* ) m_pLB_ANSATZ->SelectEntryPos( nAnsatzTypePos ); SetupAnsatz_Impl( nAnsatzTypePos ); - m_pCT_CAPTTYPE->SelectItem( (int)nCaptionType+1 ); // Enum starts at 0! + m_pCT_CAPTTYPE->SelectItem( static_cast<int>(nCaptionType)+1 ); // Enum starts at 0! SetupType_Impl( nCaptionType ); } @@ -454,7 +454,7 @@ IMPL_LINK( SvxCaptionTabPage, LineOptHdl_Impl, Button *, pButton, void ) IMPL_LINK_NOARG(SvxCaptionTabPage, SelectCaptTypeHdl_Impl, ValueSet*, void) { - SetupType_Impl( (SdrCaptionType) m_pCT_CAPTTYPE->GetSelectItemId() ); + SetupType_Impl( static_cast<SdrCaptionType>(m_pCT_CAPTTYPE->GetSelectItemId()) ); } void SvxCaptionTabPage::SetupType_Impl( SdrCaptionType nType ) diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index 8aa7f60aa7ba..0ee4dcff56b2 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -117,7 +117,7 @@ void SfxMacroTabPage::EnableButtons() if ( pE ) { // get bound macro - const SvxMacro* pM = aTbl.Get( (SvMacroItemId)reinterpret_cast<sal_uLong>(pE->GetUserData()) ); + const SvxMacro* pM = aTbl.Get( static_cast<SvMacroItemId>(reinterpret_cast<sal_uLong>(pE->GetUserData())) ); mpImpl->pDeletePB->Enable( nullptr != pM ); OUString sEventMacro = static_cast<const SvLBoxString&>(pE->GetItem( LB_MACROS_ITEMPOS )).GetText(); @@ -325,7 +325,7 @@ bool SfxMacroTabPage::AssignDeleteHdl(Control const * pBtn) const bool bAssEnabled = pBtn != mpImpl->pDeletePB && mpImpl->pAssignPB->IsEnabled(); // remove from the table - SvMacroItemId nEvent = (SvMacroItemId)reinterpret_cast<sal_uLong>(pE->GetUserData()); + SvMacroItemId nEvent = static_cast<SvMacroItemId>(reinterpret_cast<sal_uLong>(pE->GetUserData())); aTbl.Erase( nEvent ); OUString sScriptURI; @@ -428,7 +428,7 @@ void SfxMacroTabPage::FillEvents() OUString sOld( rLItem.GetText() ); OUString sNew; - SvMacroItemId nEventId = (SvMacroItemId) reinterpret_cast<sal_uLong>( pE->GetUserData() ); + SvMacroItemId nEventId = static_cast<SvMacroItemId>(reinterpret_cast<sal_uLong>( pE->GetUserData() )); if( aTbl.IsKeyValid( nEventId ) ) sNew = ConvertToUIName_Impl( aTbl.Get( nEventId ) ); diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index f220327a9c15..adfb0ec6fa26 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -512,7 +512,7 @@ bool SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { sal_uInt16 nFieldUnit = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(m_pLbUnit->GetEntryData( nPos ))); - FieldUnit _eUnit = (FieldUnit) nFieldUnit; + FieldUnit _eUnit = static_cast<FieldUnit>(nFieldUnit); rAttrs->Put( SdrMeasureUnitItem( _eUnit ) ); bModified = true; } @@ -738,7 +738,7 @@ void SvxMeasurePage::ChangeAttrHdl_Impl( void const * p ) if( nPos != LISTBOX_ENTRY_NOTFOUND ) { sal_uInt16 nFieldUnit = static_cast<sal_uInt16>(reinterpret_cast<sal_IntPtr>(m_pLbUnit->GetEntryData( nPos ))); - FieldUnit _eUnit = (FieldUnit) nFieldUnit; + FieldUnit _eUnit = static_cast<FieldUnit>(nFieldUnit); aAttrSet.Put( SdrMeasureUnitItem( _eUnit ) ); } } diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 9708119125ed..bafe79ca8fd2 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -114,7 +114,7 @@ static SvxNumSettings_Impl* lcl_CreateNumSettingsPtr(const Sequence<PropertyValu { sal_Int16 nTmp; if (pValues[j].Value >>= nTmp) - pNew->nNumberType = (SvxNumType)nTmp; + pNew->nNumberType = static_cast<SvxNumType>(nTmp); } else if ( pValues[j].Name == "Prefix" ) pValues[j].Value >>= pNew->sPrefix; @@ -1744,7 +1744,7 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox&, rBox, void { SvxNumberFormat aNumFmt(pActNum->GetLevel(i)); // PAGEDESC does not exist - SvxNumType nNumType = (SvxNumType)reinterpret_cast<sal_uLong>(rBox.GetSelectedEntryData()); + SvxNumType nNumType = static_cast<SvxNumType>(reinterpret_cast<sal_uLong>(rBox.GetSelectedEntryData())); aNumFmt.SetNumberingType(nNumType); sal_uInt16 nNumberingType = aNumFmt.GetNumberingType(); if(SVX_NUM_BITMAP == (nNumberingType&(~LINK_TOKEN))) diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 36548ec99905..69ed0a9a8d43 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -723,7 +723,7 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet ) } nPos = m_pPaperSizeBox->GetSelectedEntryPos(); - Paper ePaper = (Paper)reinterpret_cast<sal_uLong>(m_pPaperSizeBox->GetEntryData( nPos )); + Paper ePaper = static_cast<Paper>(reinterpret_cast<sal_uLong>(m_pPaperSizeBox->GetEntryData( nPos ))); const sal_Int32 nOld = m_pPaperSizeBox->GetSavedValue(); bool bChecked = m_pLandscapeBtn->IsChecked(); @@ -1652,12 +1652,12 @@ void SvxPageDescPage::PageCreated(const SfxAllItemSet& aSet) if (pModeItem) { - eMode = (SvxModeType)pModeItem->GetEnumValue(); + eMode = static_cast<SvxModeType>(pModeItem->GetEnumValue()); } if(pPaperStartItem && pPaperEndItem) { - SetPaperFormatRanges((Paper)pPaperStartItem->GetEnumValue()); + SetPaperFormatRanges(static_cast<Paper>(pPaperStartItem->GetEnumValue())); } if(pCollectListItem) diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index fc050eb31451..5ea77cf288e1 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -897,7 +897,7 @@ void SvxStdParagraphTabPage::UpdateExample_Impl() case LLINESPACE_MIN: case LLINESPACE_DURCH: case LLINESPACE_FIX: - m_pExampleWin->SetLineSpace( (SvxPrevLineSpace)nPos ); + m_pExampleWin->SetLineSpace( static_cast<SvxPrevLineSpace>(nPos) ); break; } m_pExampleWin->Invalidate(); @@ -1153,7 +1153,7 @@ bool SvxParaAlignTabPage::FillItemSet( SfxItemSet* rOutSet ) } if(m_pVertAlignLB->IsValueChangedFromSaved()) { - rOutSet->Put(SvxParaVertAlignItem((SvxParaVertAlignItem::Align)m_pVertAlignLB->GetSelectedEntryPos(), GetWhich( SID_PARA_VERTALIGN ))); + rOutSet->Put(SvxParaVertAlignItem(static_cast<SvxParaVertAlignItem::Align>(m_pVertAlignLB->GetSelectedEntryPos()), GetWhich( SID_PARA_VERTALIGN ))); bModified = true; } @@ -1242,7 +1242,7 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet* rSet ) const SvxParaVertAlignItem& rAlign = static_cast<const SvxParaVertAlignItem&>(rSet->Get( _nWhich )); - m_pVertAlignLB->SelectEntryPos((sal_Int32)rAlign.GetValue()); + m_pVertAlignLB->SelectEntryPos(static_cast<sal_Int32>(rAlign.GetValue())); } _nWhich = GetWhich( SID_ATTR_FRAMEDIRECTION ); diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index bc9995dcd5bb..16126a4ea367 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -773,7 +773,7 @@ bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet) bool bModified = false; if(bAnchorChanged) { - rSet->Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, (sal_Int16)nAnchor)); + rSet->Put(SfxInt16Item(SID_ATTR_TRANSFORM_ANCHOR, static_cast<sal_Int16>(nAnchor))); bModified = true; } if ( m_pPositionCB->IsValueChangedFromSaved() ) @@ -911,7 +911,7 @@ bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet) rSet->Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_WIDTH ), nWidth ) ); rSet->Put( SfxUInt32Item( GetWhich( SID_ATTR_TRANSFORM_HEIGHT ), nHeight ) ); //this item is required by SdrEditView::SetGeoAttrToMarked() - rSet->Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), (sal_uInt16)RectPoint::LT ) ); + rSet->Put( SfxAllEnumItem( GetWhich( SID_ATTR_TRANSFORM_SIZE_POINT ), sal_uInt16(RectPoint::LT) ) ); bModified = true; } @@ -926,7 +926,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet* rSet) RndStdIds nAnchorType = RndStdIds::FLY_AT_PARA; if(pItem) { - nAnchorType = (RndStdIds) static_cast<const SfxInt16Item*>(pItem)->GetValue(); + nAnchorType = static_cast<RndStdIds>(static_cast<const SfxInt16Item*>(pItem)->GetValue()); switch(nAnchorType) { case RndStdIds::FLY_AT_PAGE: m_pToPageRB->Check(); break; @@ -1734,13 +1734,13 @@ void SvxSwPosSizeTabPage::FillRelLB(FrmMap const *pMap, sal_uInt16 nMapPos, sal_ nLBRelations = pMap[nMapPos].nLBRelations; } - for (sal_uLong nBit = 1; nBit < (sal_uLong)LB::LAST; nBit <<= 1) + for (sal_uLong nBit = 1; nBit < sal_uLong(LB::LAST); nBit <<= 1) { - if (nLBRelations & (LB)nBit) + if (nLBRelations & static_cast<LB>(nBit)) { for (sal_uInt16 nRelPos = 0; nRelPos < SAL_N_ELEMENTS(aRelationMap); nRelPos++) { - if (aRelationMap[nRelPos].nLBRelation == (LB)nBit) + if (aRelationMap[nRelPos].nLBRelation == static_cast<LB>(nBit)) { SvxSwFramePosString::StringId sStrId1 = m_pHoriMirrorCB->IsChecked() ? aRelationMap[nRelPos].eMirrorStrId : aRelationMap[nRelPos].eStrId; sStrId1 = lcl_ChangeResIdToVerticalOrRTL(sStrId1, m_bIsVerticalFrame, m_bIsInRightToLeft); diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index aa72b0f452d7..d4015f1d3a10 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -679,7 +679,7 @@ void SvxTabulatorTabPage::PageCreated(const SfxAllItemSet& aSet) { const SfxUInt16Item* pControlItem = aSet.GetItem<SfxUInt16Item>(SID_SVXTABULATORTABPAGE_DISABLEFLAGS, false); if (pControlItem) - DisableControls((TabulatorDisableFlags)pControlItem->GetValue()); + DisableControls(static_cast<TabulatorDisableFlags>(pControlItem->GetValue())); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx index bab7754a2de0..904ed4de4403 100644 --- a/cui/source/tabpages/textanim.cxx +++ b/cui/source/tabpages/textanim.cxx @@ -73,7 +73,7 @@ void SvxTextTabDialog::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) if (rMarkList.GetMarkCount() == 1) { const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - eKind = (SdrObjKind)pObj->GetObjIdentifier(); + eKind = static_cast<SdrObjKind>(pObj->GetObjIdentifier()); } } static_cast<SvxTextAttrPage&>(rPage).SetObjKind(eKind); @@ -371,7 +371,7 @@ bool SvxTextAnimationPage::FillItemSet( SfxItemSet* rAttrs) if( nPos != LISTBOX_ENTRY_NOTFOUND && m_pLbEffect->IsValueChangedFromSaved() ) { - rAttrs->Put( SdrTextAniKindItem( (SdrTextAniKind) nPos ) ); + rAttrs->Put( SdrTextAniKindItem( static_cast<SdrTextAniKind>(nPos) ) ); bModified = true; } @@ -381,7 +381,7 @@ bool SvxTextAnimationPage::FillItemSet( SfxItemSet* rAttrs) m_aRightState != m_pBtnRight->GetState() || m_aDownState != m_pBtnDown->GetState()) { - SdrTextAniDirection eValue = (SdrTextAniDirection) GetSelectedDirection(); + SdrTextAniDirection eValue = static_cast<SdrTextAniDirection>(GetSelectedDirection()); rAttrs->Put( SdrTextAniDirectionItem( eValue ) ); bModified = true; } @@ -485,7 +485,7 @@ IMPL_LINK_NOARG(SvxTextAnimationPage, SelectEffectHdl_Impl, ListBox&, void) sal_Int32 nPos = m_pLbEffect->GetSelectedEntryPos(); if( nPos != LISTBOX_ENTRY_NOTFOUND ) { - eAniKind = (SdrTextAniKind) nPos; + eAniKind = static_cast<SdrTextAniKind>(nPos); switch( eAniKind ) { case SdrTextAniKind::NONE: @@ -637,7 +637,7 @@ sal_uInt16 SvxTextAnimationPage::GetSelectedDirection() else if( m_pBtnDown->IsChecked() ) nValue = SdrTextAniDirection::Down; - return (sal_uInt16)nValue; + return static_cast<sal_uInt16>(nValue); } diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index f1b1752c8659..46d3f519ffad 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -210,7 +210,7 @@ bool SvxBitmapTabPage::FillItemSet( SfxItemSet* rAttrs ) rAttrs->Put(XFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject())); } - BitmapStyle eStylePos = (BitmapStyle)m_pBitmapStyleLB->GetSelectedEntryPos(); bool bIsStretched( eStylePos == STRETCHED ); + BitmapStyle eStylePos = static_cast<BitmapStyle>(m_pBitmapStyleLB->GetSelectedEntryPos()); bool bIsStretched( eStylePos == STRETCHED ); bool bIsTiled( eStylePos == TILED ); rAttrs->Put( XFillBmpTileItem(bIsTiled) ); @@ -644,7 +644,7 @@ IMPL_LINK_NOARG( SvxBitmapTabPage, ClickScaleHdl, Button*, void ) IMPL_LINK_NOARG( SvxBitmapTabPage, ModifyBitmapStyleHdl, ListBox&, void ) { - BitmapStyle eStylePos = (BitmapStyle)m_pBitmapStyleLB->GetSelectedEntryPos(); + BitmapStyle eStylePos = static_cast<BitmapStyle>(m_pBitmapStyleLB->GetSelectedEntryPos()); bool bIsStretched( eStylePos == STRETCHED ); bool bIsTiled( eStylePos == TILED ); diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 4fe0db177ddc..f363f7b7498f 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -299,7 +299,7 @@ void SvxColorTabPage::Reset( const SfxItemSet* rSet ) // set color model OUString aStr = GetUserData(); - eCM = (ColorModel)aStr.toInt32(); + eCM = static_cast<ColorModel>(aStr.toInt32()); SetColorModel( eCM ); ChangeColorModel(); @@ -760,7 +760,7 @@ sal_uInt16 SvxColorTabPage::PercentToColor_Impl( sal_uInt16 nPercent ) void SvxColorTabPage::FillUserData() { // the color model is saved in the Ini-file - SetUserData( OUString::number( (int)eCM ) ); + SetUserData( OUString::number( static_cast<int>(eCM) ) ); } diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index e01db477109b..0ce06ab0a362 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -237,7 +237,7 @@ bool SvxGradientTabPage::FillItemSet( SfxItemSet* rSet ) aString = "gradient"; pXGradient.reset(new XGradient( m_pLbColorFrom->GetSelectEntryColor(), m_pLbColorTo->GetSelectEntryColor(), - (css::awt::GradientStyle) m_pLbGradientType->GetSelectedEntryPos(), + static_cast<css::awt::GradientStyle>(m_pLbGradientType->GetSelectedEntryPos()), static_cast<long>(m_pMtrAngle->GetValue() * 10), // should be changed in resource static_cast<sal_uInt16>(m_pMtrCenterX->GetValue()), static_cast<sal_uInt16>(m_pMtrCenterY->GetValue()), @@ -330,7 +330,7 @@ void SvxGradientTabPage::ModifiedHdl_Impl( void const * pControl ) if(pControl == m_pSliderIncrement) m_pMtrIncrement->SetValue( m_pSliderIncrement->GetThumbPos() ); - css::awt::GradientStyle eXGS = (css::awt::GradientStyle) m_pLbGradientType->GetSelectedEntryPos(); + css::awt::GradientStyle eXGS = static_cast<css::awt::GradientStyle>(m_pLbGradientType->GetSelectedEntryPos()); XGradient aXGradient( m_pLbColorFrom->GetSelectEntryColor(), m_pLbColorTo->GetSelectEntryColor(), @@ -410,7 +410,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickAddHdl_Impl, Button*, void) { XGradient aXGradient( m_pLbColorFrom->GetSelectEntryColor(), m_pLbColorTo->GetSelectEntryColor(), - (css::awt::GradientStyle) m_pLbGradientType->GetSelectedEntryPos(), + static_cast<css::awt::GradientStyle>(m_pLbGradientType->GetSelectedEntryPos()), static_cast<long>(m_pMtrAngle->GetValue() * 10), // should be changed in resource static_cast<sal_uInt16>(m_pMtrCenterX->GetValue()), static_cast<sal_uInt16>(m_pMtrCenterY->GetValue()), @@ -449,7 +449,7 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickModifyHdl_Impl, Button*, void) XGradient aXGradient( m_pLbColorFrom->GetSelectEntryColor(), m_pLbColorTo->GetSelectEntryColor(), - (css::awt::GradientStyle) m_pLbGradientType->GetSelectedEntryPos(), + static_cast<css::awt::GradientStyle>(m_pLbGradientType->GetSelectedEntryPos()), static_cast<long>(m_pMtrAngle->GetValue() * 10), // should be changed in resource static_cast<sal_uInt16>(m_pMtrCenterX->GetValue()), static_cast<sal_uInt16>(m_pMtrCenterY->GetValue()), diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index d03df82bfe65..3b0f8823969e 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -261,7 +261,7 @@ bool SvxHatchTabPage::FillItemSet( SfxItemSet* rSet ) else { pXHatch.reset(new XHatch( m_pLbLineColor->GetSelectEntryColor(), - (css::drawing::HatchStyle) m_pLbLineType->GetSelectedEntryPos(), + static_cast<css::drawing::HatchStyle>(m_pLbLineType->GetSelectedEntryPos()), GetCoreValue( *m_pMtrDistance, m_ePoolUnit ), static_cast<long>(m_pMtrAngle->GetValue() * 10) )); } @@ -362,7 +362,7 @@ void SvxHatchTabPage::ModifiedHdl_Impl( void const * p ) m_pMtrAngle->SetValue( m_pSliderAngle->GetThumbPos() ); XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(), - (css::drawing::HatchStyle) m_pLbLineType->GetSelectedEntryPos(), + static_cast<css::drawing::HatchStyle>(m_pLbLineType->GetSelectedEntryPos()), GetCoreValue( *m_pMtrDistance, m_ePoolUnit ), static_cast<long>(m_pMtrAngle->GetValue() * 10) ); @@ -478,7 +478,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickAddHdl_Impl, Button*, void) if( !nError ) { XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(), - (css::drawing::HatchStyle) m_pLbLineType->GetSelectedEntryPos(), + static_cast<css::drawing::HatchStyle>(m_pLbLineType->GetSelectedEntryPos()), GetCoreValue( *m_pMtrDistance, m_ePoolUnit ), static_cast<long>(m_pMtrAngle->GetValue() * 10) ); @@ -507,7 +507,7 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickModifyHdl_Impl, Button*, void) OUString aName( m_pHatchingList->GetHatch( static_cast<sal_uInt16>(nPos) )->GetName() ); XHatch aXHatch( m_pLbLineColor->GetSelectEntryColor(), - (css::drawing::HatchStyle) m_pLbLineType->GetSelectedEntryPos(), + static_cast<css::drawing::HatchStyle>(m_pLbLineType->GetSelectedEntryPos()), GetCoreValue( *m_pMtrDistance, m_ePoolUnit ), static_cast<long>(m_pMtrAngle->GetValue() * 10) ); diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index c57590af33ee..44a2b721c44e 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -543,7 +543,7 @@ void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) { const CntUInt16Item* pPageTypeItem = rSet.GetItem<CntUInt16Item>(SID_PAGE_TYPE, false); if (pPageTypeItem) - SetPageType((PageType) pPageTypeItem->GetValue()); + SetPageType(static_cast<PageType>(pPageTypeItem->GetValue())); if( m_nDlgType == 0 && m_pDashList.is() ) { sal_Int32 nPos; @@ -954,7 +954,7 @@ bool SvxLineTabPage::FillItemSet( SfxItemSet* rAttrs ) } } } - rAttrs->Put (CntUInt16Item(SID_PAGE_TYPE, (sal_uInt16)m_nPageType)); + rAttrs->Put (CntUInt16Item(SID_PAGE_TYPE, static_cast<sal_uInt16>(m_nPageType))); return bModified; } @@ -1781,7 +1781,7 @@ void SvxLineTabPage::PageCreated(const SfxAllItemSet& aSet) if (pLineEndListItem) SetLineEndList(pLineEndListItem->GetLineEndList()); if (pPageTypeItem) - SetPageType((PageType) pPageTypeItem->GetValue()); + SetPageType(static_cast<PageType>(pPageTypeItem->GetValue())); if (pDlgTypeItem) SetDlgType(pDlgTypeItem->GetValue()); Construct(); diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index 6296400844e7..9db1afd02bf8 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -175,7 +175,7 @@ void SvxShadowTabPage::ActivatePage( const SfxItemSet& rSet ) { const SfxUInt16Item* pPageTypeItem = rSet.GetItem<SfxUInt16Item>(SID_PAGE_TYPE, false); if (pPageTypeItem) - SetPageType((PageType) pPageTypeItem->GetValue()); + SetPageType(static_cast<PageType>(pPageTypeItem->GetValue())); if( m_nDlgType == 0 ) { @@ -324,7 +324,7 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs ) } } - rAttrs->Put (CntUInt16Item(SID_PAGE_TYPE, (sal_uInt16)m_nPageType)); + rAttrs->Put (CntUInt16Item(SID_PAGE_TYPE, static_cast<sal_uInt16>(m_nPageType))); return bModified; } @@ -506,7 +506,7 @@ void SvxShadowTabPage::PageCreated(const SfxAllItemSet& aSet) if (pColorListItem) SetColorList(pColorListItem->GetColorList()); if (pPageTypeItem) - SetPageType((PageType) pPageTypeItem->GetValue()); + SetPageType(static_cast<PageType>(pPageTypeItem->GetValue())); if (pDlgTypeItem) SetDlgType(pDlgTypeItem->GetValue()); } diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx index e4faafec0142..bf8ce4d9ff02 100644 --- a/cui/source/tabpages/tptrans.cxx +++ b/cui/source/tabpages/tptrans.cxx @@ -152,7 +152,7 @@ void SvxTransparenceTabPage::ModifiedTrgrHdl_Impl(void const * pControl) { if(pControl == m_pLbTrgrGradientType || pControl == this) { - css::awt::GradientStyle eXGS = (css::awt::GradientStyle)m_pLbTrgrGradientType->GetSelectedEntryPos(); + css::awt::GradientStyle eXGS = static_cast<css::awt::GradientStyle>(m_pLbTrgrGradientType->GetSelectedEntryPos()); SetControlState_Impl( eXGS ); } @@ -162,7 +162,7 @@ void SvxTransparenceTabPage::ModifiedTrgrHdl_Impl(void const * pControl) XGradient aTmpGradient( Color(nStartCol, nStartCol, nStartCol), Color(nEndCol, nEndCol, nEndCol), - (css::awt::GradientStyle)m_pLbTrgrGradientType->GetSelectedEntryPos(), + static_cast<css::awt::GradientStyle>(m_pLbTrgrGradientType->GetSelectedEntryPos()), static_cast<sal_uInt16>(m_pMtrTrgrAngle->GetValue()) * 10, static_cast<sal_uInt16>(m_pMtrTrgrCenterX->GetValue()), static_cast<sal_uInt16>(m_pMtrTrgrCenterY->GetValue()), @@ -181,7 +181,7 @@ void SvxTransparenceTabPage::ActivateGradient(bool bActivate) if(bActivate) { - css::awt::GradientStyle eXGS = (css::awt::GradientStyle)m_pLbTrgrGradientType->GetSelectedEntryPos(); + css::awt::GradientStyle eXGS = static_cast<css::awt::GradientStyle>(m_pLbTrgrGradientType->GetSelectedEntryPos()); SetControlState_Impl( eXGS ); } } @@ -346,7 +346,7 @@ bool SvxTransparenceTabPage::FillItemSet(SfxItemSet* rAttrs) XGradient aTmpGradient( Color(nStartCol, nStartCol, nStartCol), Color(nEndCol, nEndCol, nEndCol), - (css::awt::GradientStyle)m_pLbTrgrGradientType->GetSelectedEntryPos(), + static_cast<css::awt::GradientStyle>(m_pLbTrgrGradientType->GetSelectedEntryPos()), static_cast<sal_uInt16>(m_pMtrTrgrAngle->GetValue()) * 10, static_cast<sal_uInt16>(m_pMtrTrgrCenterX->GetValue()), static_cast<sal_uInt16>(m_pMtrTrgrCenterY->GetValue()), @@ -393,7 +393,7 @@ bool SvxTransparenceTabPage::FillItemSet(SfxItemSet* rAttrs) rAttrs->Put(aShadowItem); bModified = true; } - rAttrs->Put(CntUInt16Item(SID_PAGE_TYPE, (sal_uInt16)nPageType)); + rAttrs->Put(CntUInt16Item(SID_PAGE_TYPE, static_cast<sal_uInt16>(nPageType))); return bModified; } @@ -470,7 +470,7 @@ void SvxTransparenceTabPage::ActivatePage(const SfxItemSet& rSet) { const CntUInt16Item* pPageTypeItem = rSet.GetItem<CntUInt16Item>(SID_PAGE_TYPE, false); if (pPageTypeItem) - SetPageType((PageType) pPageTypeItem->GetValue()); + SetPageType(static_cast<PageType>(pPageTypeItem->GetValue())); if(nDlgType == 0) // area dialog nPageType = PageType::Transparence; @@ -566,7 +566,7 @@ void SvxTransparenceTabPage::PageCreated(const SfxAllItemSet& aSet) const SfxUInt16Item* pDlgTypeItem = aSet.GetItem<SfxUInt16Item>(SID_DLG_TYPE, false); if (pPageTypeItem) - SetPageType((PageType) pPageTypeItem->GetValue()); + SetPageType(static_cast<PageType>(pPageTypeItem->GetValue())); if (pDlgTypeItem) SetDlgType(pDlgTypeItem->GetValue()); } diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index b7c154ab2842..245e823ba6c3 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -620,7 +620,7 @@ void SvxSlantTabPage::Reset(const SfxItemSet* rAttrs) if (rMarkList.GetMarkCount() == 1) { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - SdrObjKind eKind = (SdrObjKind) pObj->GetObjIdentifier(); + SdrObjKind eKind = static_cast<SdrObjKind>(pObj->GetObjIdentifier()); if (eKind == OBJ_CUSTOMSHAPE) { //save geometry @@ -872,7 +872,7 @@ void SvxPositionSizeTabPage::Construct() if(1 == rMarkList.GetMarkCount()) { const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); - const SdrObjKind eKind((SdrObjKind)pObj->GetObjIdentifier()); + const SdrObjKind eKind(static_cast<SdrObjKind>(pObj->GetObjIdentifier())); if((pObj->GetObjInventor() == SdrInventor::Default) && (OBJ_TEXT == eKind || OBJ_TITLETEXT == eKind || OBJ_OUTLINETEXT == eKind) && |