summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-16 13:09:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-17 11:11:50 +0100
commitc690d38b066bb9cda3e6af790c36fb37d2e0dea3 (patch)
treef769acfa1b117c65f65ba0cc512e92e03a3b5964 /sc/source/ui/view
parent666dc76e0426927c5f8e70fcfa5bce25171a0722 (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 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/editsh.cxx29
-rw-r--r--sc/source/ui/view/output2.cxx6
-rw-r--r--sc/source/ui/view/printfun.cxx1
3 files changed, 15 insertions, 21 deletions
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 3d1876798c88..632876d3d9f5 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -970,8 +970,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ULINE_VAL_DOUBLE:
case SID_ULINE_VAL_DOTTED:
{
- FontLineStyle eOld = static_cast<const SvxUnderlineItem&>( pEditView->
- GetAttribs().Get(EE_CHAR_UNDERLINE)).GetLineStyle();
+ FontLineStyle eOld = pEditView->GetAttribs().Get(EE_CHAR_UNDERLINE).GetLineStyle();
FontLineStyle eNew = eOld;
switch (nSlot)
{
@@ -1003,8 +1002,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ATTR_CHAR_OVERLINE:
{
- FontLineStyle eOld = static_cast<const SvxOverlineItem&>( pEditView->
- GetAttribs().Get(EE_CHAR_OVERLINE)).GetLineStyle();
+ FontLineStyle eOld = pEditView->GetAttribs().Get(EE_CHAR_OVERLINE).GetLineStyle();
FontLineStyle eNew = ( eOld != LINESTYLE_NONE ) ? LINESTYLE_NONE : LINESTYLE_SINGLE;
aSet.Put( SvxOverlineItem( eNew, EE_CHAR_OVERLINE ) );
rBindings.Invalidate( nSlot );
@@ -1013,8 +1011,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ATTR_CHAR_STRIKEOUT:
{
- bool bOld = static_cast<const SvxCrossedOutItem&>( pEditView->GetAttribs().
- Get(EE_CHAR_STRIKEOUT)).GetValue() != STRIKEOUT_NONE;
+ bool bOld = pEditView->GetAttribs().Get(EE_CHAR_STRIKEOUT).GetValue() != STRIKEOUT_NONE;
aSet.Put( SvxCrossedOutItem( bOld ? STRIKEOUT_NONE : STRIKEOUT_SINGLE, EE_CHAR_STRIKEOUT ) );
rBindings.Invalidate( nSlot );
}
@@ -1022,8 +1019,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ATTR_CHAR_SHADOWED:
{
- bool bOld = static_cast<const SvxShadowedItem&>(pEditView->GetAttribs().
- Get(EE_CHAR_SHADOW)).GetValue();
+ bool bOld = pEditView->GetAttribs().Get(EE_CHAR_SHADOW).GetValue();
aSet.Put( SvxShadowedItem( !bOld, EE_CHAR_SHADOW ) );
rBindings.Invalidate( nSlot );
}
@@ -1031,8 +1027,7 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_ATTR_CHAR_CONTOUR:
{
- bool bOld = static_cast<const SvxContourItem&>(pEditView->GetAttribs().
- Get(EE_CHAR_OUTLINE)).GetValue();
+ bool bOld = pEditView->GetAttribs().Get(EE_CHAR_OUTLINE).GetValue();
aSet.Put( SvxContourItem( !bOld, EE_CHAR_OUTLINE ) );
rBindings.Invalidate( nSlot );
}
@@ -1040,8 +1035,8 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
case SID_SET_SUPER_SCRIPT:
{
- SvxEscapement eOld = (SvxEscapement) static_cast<const SvxEscapementItem&>(
- pEditView->GetAttribs().Get(EE_CHAR_ESCAPEMENT)).GetEnumValue();
+ SvxEscapement eOld = (SvxEscapement)
+ pEditView->GetAttribs().Get(EE_CHAR_ESCAPEMENT).GetEnumValue();
SvxEscapement eNew = (eOld == SvxEscapement::Superscript) ?
SvxEscapement::Off : SvxEscapement::Superscript;
aSet.Put( SvxEscapementItem( eNew, EE_CHAR_ESCAPEMENT ) );
@@ -1050,8 +1045,8 @@ void ScEditShell::ExecuteAttr(SfxRequest& rReq)
break;
case SID_SET_SUB_SCRIPT:
{
- SvxEscapement eOld = (SvxEscapement) static_cast<const SvxEscapementItem&>(
- pEditView->GetAttribs().Get(EE_CHAR_ESCAPEMENT)).GetEnumValue();
+ SvxEscapement eOld = (SvxEscapement)
+ pEditView->GetAttribs().Get(EE_CHAR_ESCAPEMENT).GetEnumValue();
SvxEscapement eNew = (eOld == SvxEscapement::Subscript) ?
SvxEscapement::Off : SvxEscapement::Subscript;
aSet.Put( SvxEscapementItem( eNew, EE_CHAR_ESCAPEMENT ) );
@@ -1144,8 +1139,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet)
}
else
{
- FontLineStyle eUnderline = static_cast<const SvxUnderlineItem&>(
- aAttribs.Get(EE_CHAR_UNDERLINE)).GetLineStyle();
+ FontLineStyle eUnderline = aAttribs.Get(EE_CHAR_UNDERLINE).GetLineStyle();
sal_uInt16 nId = SID_ULINE_VAL_NONE;
switch (eUnderline)
{
@@ -1163,8 +1157,7 @@ void ScEditShell::GetAttrState(SfxItemSet &rSet)
if ( pHdl && pHdl->IsFormulaMode() )
rSet.ClearItem( EE_CHAR_WEIGHT ); // Highlighted brace not here
- SvxEscapement eEsc = (SvxEscapement) static_cast<const SvxEscapementItem&>(
- aAttribs.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue();
+ SvxEscapement eEsc = (SvxEscapement) aAttribs.Get( EE_CHAR_ESCAPEMENT ).GetEnumValue();
if( eEsc == SvxEscapement::Superscript )
{
rSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, true ) );
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index c344f751c10e..eb990ce561b7 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2192,9 +2192,9 @@ static void lcl_ScaleFonts( EditEngine& rEngine, long nPercent )
ESelection aSel( nPar, nStart, nPar, nEnd );
SfxItemSet aAttribs = rEngine.GetAttribs( aSel );
- long nWestern = static_cast<const SvxFontHeightItem&>(aAttribs.Get(EE_CHAR_FONTHEIGHT)).GetHeight();
- long nCJK = static_cast<const SvxFontHeightItem&>(aAttribs.Get(EE_CHAR_FONTHEIGHT_CJK)).GetHeight();
- long nCTL = static_cast<const SvxFontHeightItem&>(aAttribs.Get(EE_CHAR_FONTHEIGHT_CTL)).GetHeight();
+ long nWestern = aAttribs.Get(EE_CHAR_FONTHEIGHT).GetHeight();
+ long nCJK = aAttribs.Get(EE_CHAR_FONTHEIGHT_CJK).GetHeight();
+ long nCTL = aAttribs.Get(EE_CHAR_FONTHEIGHT_CTL).GetHeight();
nWestern = ( nWestern * nPercent ) / 100;
nCJK = ( nCJK * nPercent ) / 100;
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 12236ffdac7f..2571f27eff4d 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -35,6 +35,7 @@
#include <editeng/pbinitem.hxx>
#include <editeng/shaditem.hxx>
#include <editeng/sizeitem.hxx>
+#include <editeng/fhgtitem.hxx>
#include <svx/svdpagv.hxx>
#include <editeng/ulspitem.hxx>
#include <sfx2/app.hxx>