diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/documen9.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xehelper.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/excel/xistyle.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/oox/stylesbuffer.cxx | 34 | ||||
-rw-r--r-- | sc/source/ui/Accessibility/AccessibleText.cxx | 1 | ||||
-rw-r--r-- | sc/source/ui/app/drwtrans.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/csvgrid.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob.cxx | 34 | ||||
-rw-r--r-- | sc/source/ui/pagedlg/tphfedit.cxx | 1 | ||||
-rw-r--r-- | sc/source/ui/unoobj/textuno.cxx | 1 | ||||
-rw-r--r-- | sc/source/ui/view/editsh.cxx | 29 | ||||
-rw-r--r-- | sc/source/ui/view/output2.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/printfun.cxx | 1 |
14 files changed, 64 insertions, 64 deletions
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index 0393c01f0cd2..107ba9683220 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -582,7 +582,7 @@ void ScDocument::UpdateFontCharSet() nCount = rDrawPool.GetItemCount2(EE_CHAR_FONTINFO); for (i=0; i<nCount; i++) { - pItem = const_cast<SvxFontItem*>(static_cast<const SvxFontItem*>(rDrawPool.GetItem2(EE_CHAR_FONTINFO, i))); + pItem = const_cast<SvxFontItem*>(rDrawPool.GetItem2(EE_CHAR_FONTINFO, i)); if ( pItem && ( pItem->GetCharSet() == eSrcSet || ( bUpdateOld && pItem->GetCharSet() != RTL_TEXTENCODING_SYMBOL ) ) ) pItem->SetCharSet( eSysSet ); diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index 51b194ddb813..f3e171288321 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -453,7 +453,7 @@ XclExpStringRef lclCreateFormattedString( ScPatternAttr::GetFromEditItemSet( aItemSet, aEditSet ); // get escapement value - short nEsc = GETITEM( aEditSet, SvxEscapementItem, EE_CHAR_ESCAPEMENT ).GetEsc(); + short nEsc = aEditSet.Get( EE_CHAR_ESCAPEMENT ).GetEsc(); // process text fields bool bIsHyperlink = false; @@ -752,7 +752,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico // height // is calculated wrong in ScPatternAttr::GetFromEditItemSet, because already in twips and not 100thmm // -> get it directly from edit engine item set - aNewData.mnHeight = ulimit_cast< sal_uInt16 >( GETITEM( aEditSet, SvxFontHeightItem, EE_CHAR_FONTHEIGHT ).GetHeight() ); + aNewData.mnHeight = ulimit_cast< sal_uInt16 >( aEditSet.Get( EE_CHAR_FONTHEIGHT ).GetHeight() ); (aNewData.mnHeight += 10) /= 20; bool bFontHtChanged = (aFontData.mnHeight != aNewData.mnHeight); if( bFontHtChanged ) @@ -782,7 +782,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico aParaText += "&S"; // super/sub script - const SvxEscapementItem& rEscapeItem = GETITEM( aEditSet, SvxEscapementItem, EE_CHAR_ESCAPEMENT ); + const SvxEscapementItem& rEscapeItem = aEditSet.Get( EE_CHAR_ESCAPEMENT ); aNewData.SetScEscapement( rEscapeItem.GetEsc() ); if( aFontData.mnEscapem != aNewData.mnEscapem ) { diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 14efbde558fc..03bc06f8d0ca 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -307,7 +307,7 @@ void XclImpFont::FillToItemSet( SfxItemSet& rItemSet, XclFontItemType eType, boo // sc_which = the Calc Which-ID of the item // ee_which = the edit engine Which-ID of the item #define PUTITEM( item, sc_which, ee_which ) \ - ScfTools::PutItem( rItemSet, item, (bEE ? (ee_which) : (sc_which)), bSkipPoolDefs ) + ScfTools::PutItem( rItemSet, item, (bEE ? ((sal_uInt16)ee_which) : (sc_which)), bSkipPoolDefs ) // Font item if( mbFontNameUsed ) diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index 662f749ec96a..93cf0ca1e251 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -865,7 +865,7 @@ void Font::fillToItemSet( SfxItemSet& rItemSet, bool bEditEngineText, bool bSkip SvxFontItem aFontItem( lcl_getFontFamily( maApiData.maLatinFont.mnFamily ), maApiData.maLatinFont.maName, OUString(), PITCH_DONTKNOW, eTempTextEnc, ATTR_FONT ); - ScfTools::PutItem( rItemSet, aFontItem, bEditEngineText ? EE_CHAR_FONTINFO : ATTR_FONT, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, aFontItem, bEditEngineText ? (sal_uInt16)EE_CHAR_FONTINFO : ATTR_FONT, bSkipPoolDefs ); } if( !maApiData.maAsianFont.maName.isEmpty() ) { @@ -875,7 +875,7 @@ void Font::fillToItemSet( SfxItemSet& rItemSet, bool bEditEngineText, bool bSkip ScfTools::GetSystemTextEncoding() : eFontEnc; SvxFontItem aFontItem( lcl_getFontFamily( maApiData.maAsianFont.mnFamily ), maApiData.maAsianFont.maName, OUString(), PITCH_DONTKNOW, eTempTextEnc, ATTR_FONT ); - ScfTools::PutItem( rItemSet, aFontItem, bEditEngineText ? EE_CHAR_FONTINFO_CJK : ATTR_CJK_FONT, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, aFontItem, bEditEngineText ? (sal_uInt16)EE_CHAR_FONTINFO_CJK : ATTR_CJK_FONT, bSkipPoolDefs ); } if( !maApiData.maCmplxFont.maName.isEmpty() ) { @@ -885,7 +885,7 @@ void Font::fillToItemSet( SfxItemSet& rItemSet, bool bEditEngineText, bool bSkip ScfTools::GetSystemTextEncoding() : eFontEnc; SvxFontItem aFontItem( lcl_getFontFamily( maApiData.maCmplxFont.mnFamily ), maApiData.maCmplxFont.maName, OUString(), PITCH_DONTKNOW, eTempTextEnc, ATTR_FONT ); - ScfTools::PutItem( rItemSet, aFontItem, bEditEngineText ? EE_CHAR_FONTINFO_CTL : ATTR_CTL_FONT, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, aFontItem, bEditEngineText ? (sal_uInt16)EE_CHAR_FONTINFO_CTL : ATTR_CTL_FONT, bSkipPoolDefs ); } } // font height @@ -896,31 +896,31 @@ void Font::fillToItemSet( SfxItemSet& rItemSet, bool bEditEngineText, bool bSkip if( bEditEngineText/* && (eType != XclFontItemType::HeaderFooter) */) // do not convert header/footer height nHeight = (nHeight * 127 + 36) / EXC_POINTS_PER_INCH; // 1 in == 72 pt SvxFontHeightItem aHeightItem( nHeight, 100, ATTR_FONT_HEIGHT ); - ScfTools::PutItem( rItemSet, aHeightItem, bEditEngineText ? EE_CHAR_FONTHEIGHT : ATTR_FONT_HEIGHT, bSkipPoolDefs ); - ScfTools::PutItem( rItemSet, aHeightItem, bEditEngineText ? EE_CHAR_FONTHEIGHT_CJK : ATTR_CJK_FONT_HEIGHT, bSkipPoolDefs ); - ScfTools::PutItem( rItemSet, aHeightItem, bEditEngineText ? EE_CHAR_FONTHEIGHT_CTL : ATTR_CTL_FONT_HEIGHT, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, aHeightItem, bEditEngineText ? (sal_uInt16)EE_CHAR_FONTHEIGHT : ATTR_FONT_HEIGHT, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, aHeightItem, bEditEngineText ? (sal_uInt16)EE_CHAR_FONTHEIGHT_CJK : ATTR_CJK_FONT_HEIGHT, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, aHeightItem, bEditEngineText ? (sal_uInt16)EE_CHAR_FONTHEIGHT_CTL : ATTR_CTL_FONT_HEIGHT, bSkipPoolDefs ); } // font weight if( maUsedFlags.mbWeightUsed ) { ::FontWeight fWeight = vcl::unohelper::ConvertFontWeight( maApiData.maDesc.Weight ); SvxWeightItem aWeightItem( fWeight, ATTR_FONT_WEIGHT ); - ScfTools::PutItem( rItemSet, aWeightItem, bEditEngineText ? EE_CHAR_WEIGHT : ATTR_FONT_WEIGHT, bSkipPoolDefs ); - ScfTools::PutItem( rItemSet, aWeightItem, bEditEngineText ? EE_CHAR_WEIGHT_CTL : ATTR_CTL_FONT_WEIGHT, bSkipPoolDefs ); - ScfTools::PutItem( rItemSet, aWeightItem, bEditEngineText ? EE_CHAR_WEIGHT_CJK : ATTR_CJK_FONT_WEIGHT, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, aWeightItem, bEditEngineText ? (sal_uInt16)EE_CHAR_WEIGHT : ATTR_FONT_WEIGHT, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, aWeightItem, bEditEngineText ? (sal_uInt16)EE_CHAR_WEIGHT_CTL : ATTR_CTL_FONT_WEIGHT, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, aWeightItem, bEditEngineText ? (sal_uInt16)EE_CHAR_WEIGHT_CJK : ATTR_CJK_FONT_WEIGHT, bSkipPoolDefs ); } // font posture if( maUsedFlags.mbPostureUsed ) { SvxPostureItem aPostItem( ( maApiData.maDesc.Slant == css::awt::FontSlant_ITALIC ) ? ITALIC_NORMAL : ITALIC_NONE, ATTR_FONT_POSTURE); - ScfTools::PutItem( rItemSet, aPostItem, bEditEngineText ? EE_CHAR_ITALIC : ATTR_FONT_POSTURE, bSkipPoolDefs ); - ScfTools::PutItem( rItemSet, aPostItem, bEditEngineText ? EE_CHAR_ITALIC_CJK : ATTR_CJK_FONT_POSTURE, bSkipPoolDefs ); - ScfTools::PutItem( rItemSet, aPostItem, bEditEngineText ? EE_CHAR_ITALIC_CTL : ATTR_CTL_FONT_POSTURE, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, aPostItem, bEditEngineText ? (sal_uInt16)EE_CHAR_ITALIC : ATTR_FONT_POSTURE, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, aPostItem, bEditEngineText ? (sal_uInt16)EE_CHAR_ITALIC_CJK : ATTR_CJK_FONT_POSTURE, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, aPostItem, bEditEngineText ? (sal_uInt16)EE_CHAR_ITALIC_CTL : ATTR_CTL_FONT_POSTURE, bSkipPoolDefs ); } // character color if( maUsedFlags.mbColorUsed ) { - ScfTools::PutItem( rItemSet,SvxColorItem( maApiData.mnColor, bEditEngineText ? EE_CHAR_COLOR : ATTR_FONT_COLOR ) , bSkipPoolDefs ); + ScfTools::PutItem( rItemSet,SvxColorItem( maApiData.mnColor, bEditEngineText ? (sal_uInt16)EE_CHAR_COLOR : ATTR_FONT_COLOR ) , bSkipPoolDefs ); } // underline style if( maUsedFlags.mbUnderlineUsed ) @@ -933,24 +933,24 @@ void Font::fillToItemSet( SfxItemSet& rItemSet, bool bEditEngineText, bool bSkip else eScUnderl = LINESTYLE_NONE; SvxUnderlineItem aUnderlItem( eScUnderl, ATTR_FONT_UNDERLINE ); - ScfTools::PutItem( rItemSet, aUnderlItem, bEditEngineText ? EE_CHAR_UNDERLINE : ATTR_FONT_UNDERLINE, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, aUnderlItem, bEditEngineText ? (sal_uInt16)EE_CHAR_UNDERLINE : ATTR_FONT_UNDERLINE, bSkipPoolDefs ); } // strike out style if( maUsedFlags.mbStrikeoutUsed ) { - ScfTools::PutItem( rItemSet, SvxCrossedOutItem( maModel.mbStrikeout ? STRIKEOUT_SINGLE : STRIKEOUT_NONE, bEditEngineText ? EE_CHAR_STRIKEOUT : ATTR_FONT_CROSSEDOUT ), bEditEngineText ? EE_CHAR_STRIKEOUT : ATTR_FONT_CROSSEDOUT, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, SvxCrossedOutItem( maModel.mbStrikeout ? STRIKEOUT_SINGLE : STRIKEOUT_NONE, bEditEngineText ? (sal_uInt16)EE_CHAR_STRIKEOUT : ATTR_FONT_CROSSEDOUT ), bEditEngineText ? (sal_uInt16)EE_CHAR_STRIKEOUT : ATTR_FONT_CROSSEDOUT, bSkipPoolDefs ); } // outline style if( maUsedFlags.mbOutlineUsed ) { - ScfTools::PutItem( rItemSet, SvxContourItem( maApiData.mbOutline, ATTR_FONT_CONTOUR ), bEditEngineText ? EE_CHAR_OUTLINE : ATTR_FONT_CONTOUR, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, SvxContourItem( maApiData.mbOutline, ATTR_FONT_CONTOUR ), bEditEngineText ? (sal_uInt16)EE_CHAR_OUTLINE : ATTR_FONT_CONTOUR, bSkipPoolDefs ); } // shadow style if( maUsedFlags.mbShadowUsed ) { - ScfTools::PutItem( rItemSet, SvxShadowedItem( maApiData.mbShadow, ATTR_FONT_SHADOWED ), bEditEngineText ? EE_CHAR_SHADOW : ATTR_FONT_SHADOWED, bSkipPoolDefs ); + ScfTools::PutItem( rItemSet, SvxShadowedItem( maApiData.mbShadow, ATTR_FONT_SHADOWED ), bEditEngineText ? (sal_uInt16)EE_CHAR_SHADOW : ATTR_FONT_SHADOWED, bSkipPoolDefs ); } if( maUsedFlags.mbEscapementUsed ) { diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index 630202c89724..5ceb341135d5 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -37,6 +37,7 @@ #include <editeng/unofored.hxx> #include <editeng/editview.hxx> #include <editeng/unoedhlp.hxx> +#include <editeng/fhgtitem.hxx> #include <vcl/virdev.hxx> #include <editeng/editobj.hxx> #include <editeng/adjustitem.hxx> diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index 9a1bf0532027..3e7cce703222 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -460,7 +460,7 @@ bool ScDrawTransferObj::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, voi // 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 (!)"); @@ -473,7 +473,7 @@ bool ScDrawTransferObj::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, voi 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/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index bd5293e9b1c3..b77266912b62 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -29,6 +29,10 @@ #include <editeng/editstat.hxx> #include <editeng/frmdiritem.hxx> #include <editeng/lspcitem.hxx> +#include <editeng/fhgtitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/langitem.hxx> #include <sfx2/bindings.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/dispatch.hxx> diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 1ef24a76c9c6..b980acfac7ff 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -39,6 +39,9 @@ #include <editeng/colritem.hxx> #include <editeng/fhgtitem.hxx> #include <editeng/fontitem.hxx> +#include <editeng/wghtitem.hxx> +#include <editeng/postitem.hxx> +#include <editeng/langitem.hxx> #include <svl/itemset.hxx> #include <editutil.hxx> // *** edit engine *** diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 6f6d034af866..cdbbba7a8185 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -206,8 +206,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) case SID_CHARMAP: { - const SvxFontItem& rItem = static_cast<const SvxFontItem&>( - pOutView->GetAttribs().Get(EE_CHAR_FONTINFO)); + const SvxFontItem& rItem = pOutView->GetAttribs().Get(EE_CHAR_FONTINFO); OUString aString; SvxFontItem aNewItem( EE_CHAR_FONTINFO ); @@ -553,8 +552,7 @@ void ScDrawTextObjectBar::ExecuteToggle( SfxRequest &rReq ) pView->GetAttributes(aViewAttr); // Underline - FontLineStyle eOld = static_cast<const SvxUnderlineItem&>( aViewAttr. - Get(EE_CHAR_UNDERLINE)).GetLineStyle(); + FontLineStyle eOld = aViewAttr.Get(EE_CHAR_UNDERLINE).GetLineStyle(); FontLineStyle eNew = eOld; switch (nSlot) { @@ -720,8 +718,8 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq ) case SID_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 ); @@ -734,8 +732,8 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq ) case SID_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 ); @@ -844,31 +842,31 @@ void ScDrawTextObjectBar::ExecuteAttr( SfxRequest &rReq ) break; case SID_ATTR_CHAR_WEIGHT: - aNewAttr.Put( static_cast<const SvxWeightItem&>(aEditAttr.Get( EE_CHAR_WEIGHT )) ); + aNewAttr.Put( aEditAttr.Get( EE_CHAR_WEIGHT ) ); break; case SID_ATTR_CHAR_POSTURE: - aNewAttr.Put( static_cast<const SvxPostureItem&>(aEditAttr.Get( EE_CHAR_ITALIC )) ); + aNewAttr.Put( aEditAttr.Get( EE_CHAR_ITALIC ) ); break; case SID_ATTR_CHAR_UNDERLINE: - aNewAttr.Put( static_cast<const SvxUnderlineItem&>(aEditAttr.Get( EE_CHAR_UNDERLINE )) ); + aNewAttr.Put( aEditAttr.Get( EE_CHAR_UNDERLINE ) ); break; case SID_ATTR_CHAR_OVERLINE: - aNewAttr.Put( static_cast<const SvxOverlineItem&>(aEditAttr.Get( EE_CHAR_OVERLINE )) ); + aNewAttr.Put( aEditAttr.Get( EE_CHAR_OVERLINE ) ); break; case SID_ATTR_CHAR_CONTOUR: - aNewAttr.Put( static_cast<const SvxContourItem&>(aEditAttr.Get( EE_CHAR_OUTLINE )) ); + aNewAttr.Put( aEditAttr.Get( EE_CHAR_OUTLINE ) ); break; case SID_ATTR_CHAR_SHADOWED: - aNewAttr.Put( static_cast<const SvxShadowedItem&>(aEditAttr.Get( EE_CHAR_SHADOW )) ); + aNewAttr.Put( aEditAttr.Get( EE_CHAR_SHADOW ) ); break; case SID_ATTR_CHAR_STRIKEOUT: - aNewAttr.Put( static_cast<const SvxCrossedOutItem&>(aEditAttr.Get( EE_CHAR_STRIKEOUT )) ); + aNewAttr.Put( aEditAttr.Get( EE_CHAR_STRIKEOUT ) ); break; case SID_DRAWTEXT_ATTR_DLG: @@ -1092,8 +1090,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) // super-/subscript - SvxEscapement eEsc = (SvxEscapement) static_cast<const SvxEscapementItem&>( - aAttrSet.Get( EE_CHAR_ESCAPEMENT ) ).GetEnumValue(); + SvxEscapement eEsc = (SvxEscapement) aAttrSet.Get( EE_CHAR_ESCAPEMENT ).GetEnumValue(); if( eEsc == SvxEscapement::Superscript ) rDestSet.Put( SfxBoolItem( SID_SET_SUPER_SCRIPT, true ) ); else if( eEsc == SvxEscapement::Subscript ) @@ -1111,8 +1108,7 @@ void ScDrawTextObjectBar::GetAttrState( SfxItemSet& rDestSet ) } else { - FontLineStyle eUnderline = static_cast<const SvxUnderlineItem&>( - aAttrSet.Get(EE_CHAR_UNDERLINE)).GetLineStyle(); + FontLineStyle eUnderline = aAttrSet.Get(EE_CHAR_UNDERLINE).GetLineStyle(); sal_uInt16 nId = SID_ULINE_VAL_NONE; switch (eUnderline) { diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index 8ddc1da38dd7..4246534811dc 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -25,6 +25,7 @@ #include <editeng/editview.hxx> #include <editeng/flditem.hxx> #include <editeng/adjustitem.hxx> +#include <editeng/fhgtitem.hxx> #include <sfx2/basedlgs.hxx> #include <sfx2/objsh.hxx> #include <vcl/msgbox.hxx> diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index 5794ce65a39b..3801904f4a5b 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -27,6 +27,7 @@ #include <editeng/editeng.hxx> #include <editeng/editobj.hxx> #include <editeng/flditem.hxx> +#include <editeng/fhgtitem.hxx> #include <svx/unomid.hxx> #include <editeng/unoprnms.hxx> #include <editeng/unofored.hxx> 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> |