diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:23:58 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:23:58 +0100 |
commit | 1099ae1c16cd8323d877e894d8ce213ef8e1c349 (patch) | |
tree | f5eb610a9a27de258415a9ae1d14b2972c7a84cb /forms/source/richtext | |
parent | 11e93c64c33ed17e2286bf3be7a473df43425012 (diff) |
More loplugin:cstylecast: forms
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files
Change-Id: I91065e9ff1c160e5becda1ffa033de7c1b48b7f3
Diffstat (limited to 'forms/source/richtext')
-rw-r--r-- | forms/source/richtext/parametrizedattributedispatcher.cxx | 2 | ||||
-rw-r--r-- | forms/source/richtext/richtextimplcontrol.cxx | 2 | ||||
-rw-r--r-- | forms/source/richtext/richtextmodel.cxx | 6 | ||||
-rw-r--r-- | forms/source/richtext/rtattributehandler.cxx | 8 | ||||
-rw-r--r-- | forms/source/richtext/specialdispatchers.cxx | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/forms/source/richtext/parametrizedattributedispatcher.cxx b/forms/source/richtext/parametrizedattributedispatcher.cxx index cd3169cf67f1..01ef4f6af300 100644 --- a/forms/source/richtext/parametrizedattributedispatcher.cxx +++ b/forms/source/richtext/parametrizedattributedispatcher.cxx @@ -92,7 +92,7 @@ namespace frm { // get the real slot id. This may differ from our attribute id: for instance, both // SID_ATTR_CHAR_HEIGHT and SID_ATTR_CHAR_LATIN_HEIGHT are mapped to the same which id - SfxSlotId nSlotId = lcl_normalizeLatinScriptSlotId( (SfxSlotId)m_nAttributeId ); + SfxSlotId nSlotId = lcl_normalizeLatinScriptSlotId( static_cast<SfxSlotId>(m_nAttributeId) ); SfxAllItemSet aParameterSet( getEditView()->GetEmptyItemSet() ); TransformParameters( nSlotId, _rArguments, aParameterSet ); diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index 9d9cf426070b..663e9a3d7965 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -114,7 +114,7 @@ namespace frm // This is useful in case the observer is for instance a toolbox which contains only // an, e.g., "bold" slot, and thus not interested in the particular script type of the // current selection. - SvxScriptSetItem aNormalizedSet( (WhichId)_pHandler->first, *m_pView->GetAttribs().GetPool() ); + SvxScriptSetItem aNormalizedSet( static_cast<WhichId>(_pHandler->first), *m_pView->GetAttribs().GetPool() ); normalizeScriptDependentAttribute( aNormalizedSet ); implCheckUpdateCache( _pHandler->first, _pHandler->second->getState( aNormalizedSet.GetItemSet() ) ); diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx index 493338eacbff..cca527d17578 100644 --- a/forms/source/richtext/richtextmodel.cxx +++ b/forms/source/richtext/richtextmodel.cxx @@ -426,13 +426,13 @@ namespace frm break; case PROPERTY_ID_LINEEND_FORMAT: - aDefault <<= (sal_Int16)LineEndFormat::LINE_FEED; + aDefault <<= sal_Int16(LineEndFormat::LINE_FEED); break; case PROPERTY_ID_ECHO_CHAR: case PROPERTY_ID_ALIGN: case PROPERTY_ID_MAXTEXTLEN: - aDefault <<= (sal_Int16)0; + aDefault <<= sal_Int16(0); break; case PROPERTY_ID_TABSTOP: @@ -469,7 +469,7 @@ namespace frm break; case PROPERTY_ID_BORDER: - aDefault <<= (sal_Int16)1; + aDefault <<= sal_Int16(1); break; default: diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx index 41eb8247e0fa..8d0737b7852c 100644 --- a/forms/source/richtext/rtattributehandler.cxx +++ b/forms/source/richtext/rtattributehandler.cxx @@ -68,7 +68,7 @@ namespace frm void AttributeHandler::putItemForScript( SfxItemSet& _rAttribs, const SfxPoolItem& _rItem, SvtScriptType _nForScriptType ) const { - SvxScriptSetItem aSetItem( (WhichId)getAttributeId(), *_rAttribs.GetPool() ); + SvxScriptSetItem aSetItem( static_cast<WhichId>(getAttributeId()), *_rAttribs.GetPool() ); aSetItem.PutItemForScriptType( _nForScriptType, _rItem ); _rAttribs.Put( aSetItem.GetItemSet(), false ); } @@ -109,7 +109,7 @@ namespace frm case SID_ATTR_CHAR_LATIN_WEIGHT: nWhich = EE_CHAR_WEIGHT; break; default: - nWhich = _rPool.GetWhich( (SfxSlotId)_nAttributeId ); + nWhich = _rPool.GetWhich( static_cast<SfxSlotId>(_nAttributeId) ); } return nWhich; } @@ -157,7 +157,7 @@ namespace frm break; default: - pReturn = new SlotHandler( (SfxSlotId)_nAttributeId, lcl_implGetWhich( _rEditEnginePool, _nAttributeId ) ); + pReturn = new SlotHandler( static_cast<SfxSlotId>(_nAttributeId), lcl_implGetWhich( _rEditEnginePool, _nAttributeId ) ); break; } @@ -229,7 +229,7 @@ namespace frm if ( 100 == m_nLineSpace ) aLineSpacing.SetInterLineSpaceRule( SvxInterLineSpaceRule::Off ); else - aLineSpacing.SetPropLineSpace( (sal_uInt8)m_nLineSpace ); + aLineSpacing.SetPropLineSpace( static_cast<sal_uInt8>(m_nLineSpace) ); _rNewAttribs.Put( aLineSpacing ); } diff --git a/forms/source/richtext/specialdispatchers.cxx b/forms/source/richtext/specialdispatchers.cxx index 89f3a6e6437c..31a1c6cde092 100644 --- a/forms/source/richtext/specialdispatchers.cxx +++ b/forms/source/richtext/specialdispatchers.cxx @@ -155,8 +155,8 @@ namespace frm bool bEnable = true; OSL_VERIFY( pLookup->Value >>= bEnable ); if ( m_nAttributeId == SID_ATTR_PARA_SCRIPTSPACE ) - return new SvxScriptSpaceItem( bEnable, (WhichId)m_nAttributeId ); - return new SfxBoolItem( (WhichId)m_nAttributeId, bEnable ); + return new SvxScriptSpaceItem( bEnable, static_cast<WhichId>(m_nAttributeId) ); + return new SfxBoolItem( static_cast<WhichId>(m_nAttributeId), bEnable ); } OSL_FAIL( "OAsianFontLayoutDispatcher::convertDispatchArgsToItem: did not find the one and only argument!" ); |