diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-16 13:09:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-17 11:11:50 +0100 |
commit | c690d38b066bb9cda3e6af790c36fb37d2e0dea3 (patch) | |
tree | f769acfa1b117c65f65ba0cc512e92e03a3b5964 /sw | |
parent | 666dc76e0426927c5f8e70fcfa5bce25171a0722 (diff) |
TypedWhichId for EE_CHAR* constants
Change-Id: I261f8a949ddd858dee196118bb42993a101a2a28
Reviewed-on: https://gerrit.libreoffice.org/44829
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/shells/annotsh.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/shells/drwtxtex.cxx | 12 |
3 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 00c42f143d4b..8618a05ca217 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -620,7 +620,7 @@ bool SwTransferable::WriteObject( tools::SvRef<SotStorageStream>& xStream, // for the changed pool defaults from drawing layer pool set those // attributes as hard attributes to preserve them for saving const SfxItemPool& rItemPool = pModel->GetItemPool(); - const SvxFontHeightItem& rDefaultFontHeight = static_cast<const SvxFontHeightItem&>(rItemPool.GetDefaultItem(EE_CHAR_FONTHEIGHT)); + const SvxFontHeightItem& rDefaultFontHeight = rItemPool.GetDefaultItem(EE_CHAR_FONTHEIGHT); // SW should have no MasterPages OSL_ENSURE(0 == pModel->GetMasterPageCount(), "SW with MasterPages (!)"); @@ -633,7 +633,7 @@ bool SwTransferable::WriteObject( tools::SvRef<SotStorageStream>& xStream, while(aIter.IsMore()) { SdrObject* pObj = aIter.Next(); - const SvxFontHeightItem& rItem = static_cast<const SvxFontHeightItem&>(pObj->GetMergedItem(EE_CHAR_FONTHEIGHT)); + const SvxFontHeightItem& rItem = pObj->GetMergedItem(EE_CHAR_FONTHEIGHT); if(rItem.GetHeight() == rDefaultFontHeight.GetHeight()) { diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx index 07e6da2a0eac..f7c789f496c0 100644 --- a/sw/source/uibase/shells/annotsh.cxx +++ b/sw/source/uibase/shells/annotsh.cxx @@ -280,7 +280,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) } else { - FontLineStyle eFU = static_cast<const SvxUnderlineItem&>( aEditAttr.Get( EE_CHAR_UNDERLINE ) ).GetLineStyle(); + FontLineStyle eFU = aEditAttr.Get( EE_CHAR_UNDERLINE ).GetLineStyle(); aNewAttr.Put( SvxUnderlineItem( eFU != LINESTYLE_NONE ?LINESTYLE_NONE : LINESTYLE_SINGLE, EE_CHAR_UNDERLINE ) ); } } @@ -288,7 +288,7 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) } case SID_ATTR_CHAR_OVERLINE: { - FontLineStyle eFO = static_cast<const SvxOverlineItem&>(aEditAttr.Get(EE_CHAR_OVERLINE)).GetLineStyle(); + FontLineStyle eFO = aEditAttr.Get(EE_CHAR_OVERLINE).GetLineStyle(); aNewAttr.Put(SvxOverlineItem(eFO == LINESTYLE_SINGLE ? LINESTYLE_NONE : LINESTYLE_SINGLE, EE_CHAR_OVERLINE)); break; } @@ -356,8 +356,8 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) case FN_SET_SUPER_SCRIPT: { SvxEscapementItem aItem(EE_CHAR_ESCAPEMENT); - SvxEscapement eEsc = (SvxEscapement ) static_cast<const SvxEscapementItem&>( - aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue(); + SvxEscapement eEsc = (SvxEscapement ) + aEditAttr.Get( EE_CHAR_ESCAPEMENT ).GetEnumValue(); if( eEsc == SvxEscapement::Superscript ) aItem.SetEscapement( SvxEscapement::Off ); @@ -369,8 +369,8 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) case FN_SET_SUB_SCRIPT: { SvxEscapementItem aItem(EE_CHAR_ESCAPEMENT); - SvxEscapement eEsc = (SvxEscapement ) static_cast<const SvxEscapementItem&>( - aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue(); + SvxEscapement eEsc = (SvxEscapement ) + aEditAttr.Get( EE_CHAR_ESCAPEMENT ).GetEnumValue(); if( eEsc == SvxEscapement::Subscript ) aItem.SetEscapement( SvxEscapement::Off ); diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx index 696500197643..05cdf39bdc91 100644 --- a/sw/source/uibase/shells/drwtxtex.cxx +++ b/sw/source/uibase/shells/drwtxtex.cxx @@ -175,7 +175,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) } else { - FontLineStyle eFU = static_cast<const SvxUnderlineItem&>(aEditAttr.Get(EE_CHAR_UNDERLINE)).GetLineStyle(); + FontLineStyle eFU = aEditAttr.Get(EE_CHAR_UNDERLINE).GetLineStyle(); aNewAttr.Put( SvxUnderlineItem(eFU == LINESTYLE_SINGLE ? LINESTYLE_NONE : LINESTYLE_SINGLE, EE_CHAR_UNDERLINE) ); } } @@ -183,7 +183,7 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) case SID_ATTR_CHAR_OVERLINE: { - FontLineStyle eFO = static_cast<const SvxOverlineItem&>(aEditAttr.Get(EE_CHAR_OVERLINE)).GetLineStyle(); + FontLineStyle eFO = aEditAttr.Get(EE_CHAR_OVERLINE).GetLineStyle(); aNewAttr.Put(SvxOverlineItem(eFO == LINESTYLE_SINGLE ? LINESTYLE_NONE : LINESTYLE_SINGLE, EE_CHAR_OVERLINE)); } break; @@ -302,8 +302,8 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) case FN_SET_SUPER_SCRIPT: { SvxEscapementItem aItem(EE_CHAR_ESCAPEMENT); - SvxEscapement eEsc = (SvxEscapement ) static_cast<const SvxEscapementItem&>( - aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue(); + SvxEscapement eEsc = (SvxEscapement ) + aEditAttr.Get( EE_CHAR_ESCAPEMENT ).GetEnumValue(); if( eEsc == SvxEscapement::Superscript ) aItem.SetEscapement( SvxEscapement::Off ); @@ -315,8 +315,8 @@ void SwDrawTextShell::Execute( SfxRequest &rReq ) case FN_SET_SUB_SCRIPT: { SvxEscapementItem aItem(EE_CHAR_ESCAPEMENT); - SvxEscapement eEsc = (SvxEscapement ) static_cast<const SvxEscapementItem&>( - aEditAttr.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue(); + SvxEscapement eEsc = (SvxEscapement ) + aEditAttr.Get( EE_CHAR_ESCAPEMENT ).GetEnumValue(); if( eEsc == SvxEscapement::Subscript ) aItem.SetEscapement( SvxEscapement::Off ); |