diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-15 09:00:57 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-15 09:00:57 +0100 |
commit | 9dab60931e65220049b7c39579a57aebf0f9de5e (patch) | |
tree | 14ca37e3f41ee344e010334f69806afbe6317d15 /xmloff/source/style | |
parent | b5ed99e5a5adc097283f1409a06d770949fb22af (diff) |
More loplugin:cstylecast: xmloff
Change-Id: I870bc9fd1c7361913b073411065ec723f6b080da
Diffstat (limited to 'xmloff/source/style')
-rw-r--r-- | xmloff/source/style/DashStyle.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/GradientStyle.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/HatchStyle.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/TransGradientStyle.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/XMLBackgroundImageContext.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/style/XMLFootnoteSeparatorExport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/XMLFootnoteSeparatorImport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/adjushdl.cxx | 14 | ||||
-rw-r--r-- | xmloff/source/style/backhdl.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/style/breakhdl.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/fonthdl.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/style/postuhdl.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/prhdlfac.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfe.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/xmlstyle.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/xmltabe.cxx | 2 |
17 files changed, 37 insertions, 37 deletions
diff --git a/xmloff/source/style/DashStyle.cxx b/xmloff/source/style/DashStyle.cxx index e9087b00b8b3..bba930eda041 100644 --- a/xmloff/source/style/DashStyle.cxx +++ b/xmloff/source/style/DashStyle.cxx @@ -69,7 +69,7 @@ SvXMLEnumMapEntry<drawing::DashStyle> const pXML_DashStyle_Enum[] = { XML_ROUND, drawing::DashStyle_ROUND }, { XML_RECT, drawing::DashStyle_RECTRELATIVE }, { XML_ROUND, drawing::DashStyle_ROUNDRELATIVE }, - { XML_TOKEN_INVALID, (drawing::DashStyle)0 } + { XML_TOKEN_INVALID, drawing::DashStyle(0) } }; // Import diff --git a/xmloff/source/style/GradientStyle.cxx b/xmloff/source/style/GradientStyle.cxx index 53ec6158763c..b91cb3c53f67 100644 --- a/xmloff/source/style/GradientStyle.cxx +++ b/xmloff/source/style/GradientStyle.cxx @@ -62,7 +62,7 @@ SvXMLEnumMapEntry<awt::GradientStyle> const pXML_GradientStyle_Enum[] = { XML_GRADIENTSTYLE_ELLIPSOID, awt::GradientStyle_ELLIPTICAL }, { XML_GRADIENTSTYLE_SQUARE, awt::GradientStyle_SQUARE }, { XML_GRADIENTSTYLE_RECTANGULAR, awt::GradientStyle_RECT }, - { XML_TOKEN_INVALID, (awt::GradientStyle)0 } + { XML_TOKEN_INVALID, awt::GradientStyle(0) } }; // Import diff --git a/xmloff/source/style/HatchStyle.cxx b/xmloff/source/style/HatchStyle.cxx index 99111dcdd359..bcc24c5d0c78 100644 --- a/xmloff/source/style/HatchStyle.cxx +++ b/xmloff/source/style/HatchStyle.cxx @@ -53,7 +53,7 @@ SvXMLEnumMapEntry<drawing::HatchStyle> const pXML_HatchStyle_Enum[] = { XML_HATCHSTYLE_SINGLE, drawing::HatchStyle_SINGLE }, { XML_HATCHSTYLE_DOUBLE, drawing::HatchStyle_DOUBLE }, { XML_HATCHSTYLE_TRIPLE, drawing::HatchStyle_TRIPLE }, - { XML_TOKEN_INVALID, (drawing::HatchStyle)0 } + { XML_TOKEN_INVALID, drawing::HatchStyle(0) } }; // Import diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx index 4162e036ac46..6ff3eb1da0f2 100644 --- a/xmloff/source/style/TransGradientStyle.cxx +++ b/xmloff/source/style/TransGradientStyle.cxx @@ -59,7 +59,7 @@ SvXMLEnumMapEntry<awt::GradientStyle> const pXML_GradientStyle_Enum[] = { XML_GRADIENTSTYLE_ELLIPSOID, awt::GradientStyle_ELLIPTICAL }, { XML_GRADIENTSTYLE_SQUARE, awt::GradientStyle_SQUARE }, { XML_GRADIENTSTYLE_RECTANGULAR, awt::GradientStyle_RECT }, - { XML_TOKEN_INVALID, (awt::GradientStyle)0 } + { XML_TOKEN_INVALID, awt::GradientStyle(0) } }; // Import diff --git a/xmloff/source/style/XMLBackgroundImageContext.cxx b/xmloff/source/style/XMLBackgroundImageContext.cxx index 2f89ef6299e3..28c421f43bb8 100644 --- a/xmloff/source/style/XMLBackgroundImageContext.cxx +++ b/xmloff/source/style/XMLBackgroundImageContext.cxx @@ -74,14 +74,14 @@ static const SvXMLEnumMapEntry<GraphicLocation> psXML_BrushHoriPos[] = { { XML_LEFT, GraphicLocation_LEFT_MIDDLE }, { XML_RIGHT, GraphicLocation_RIGHT_MIDDLE }, - { XML_TOKEN_INVALID, (GraphicLocation)0 } + { XML_TOKEN_INVALID, GraphicLocation(0) } }; static const SvXMLEnumMapEntry<GraphicLocation> psXML_BrushVertPos[] = { { XML_TOP, GraphicLocation_MIDDLE_TOP }, { XML_BOTTOM, GraphicLocation_MIDDLE_BOTTOM }, - { XML_TOKEN_INVALID, (GraphicLocation)0 } + { XML_TOKEN_INVALID, GraphicLocation(0) } }; static void lcl_xmlbic_MergeHoriPos( GraphicLocation& ePos, @@ -288,7 +288,7 @@ void XMLBackgroundImageContext::ProcessAttrs( { XML_BACKGROUND_REPEAT, GraphicLocation_TILED }, { XML_BACKGROUND_NO_REPEAT, GraphicLocation_MIDDLE_MIDDLE }, { XML_BACKGROUND_STRETCH, GraphicLocation_AREA }, - { XML_TOKEN_INVALID, (GraphicLocation)0 } + { XML_TOKEN_INVALID, GraphicLocation(0) } }; if( SvXMLUnitConverter::convertEnum( nPos, rValue, psXML_BrushRepeat ) ) diff --git a/xmloff/source/style/XMLFootnoteSeparatorExport.cxx b/xmloff/source/style/XMLFootnoteSeparatorExport.cxx index 74ca184edcfc..5446398e5e72 100644 --- a/xmloff/source/style/XMLFootnoteSeparatorExport.cxx +++ b/xmloff/source/style/XMLFootnoteSeparatorExport.cxx @@ -150,7 +150,7 @@ void XMLFootnoteSeparatorExport::exportXML( { XML_LEFT, text::HorizontalAdjust_LEFT }, { XML_CENTER, text::HorizontalAdjust_CENTER }, { XML_RIGHT, text::HorizontalAdjust_RIGHT }, - { XML_TOKEN_INVALID, (text::HorizontalAdjust)0 } + { XML_TOKEN_INVALID, text::HorizontalAdjust(0) } }; if (SvXMLUnitConverter::convertEnum( diff --git a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx index f12db97c6c0f..5ec390c459cc 100644 --- a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx +++ b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx @@ -121,7 +121,7 @@ void XMLFootnoteSeparatorImport::StartElement( { XML_LEFT, text::HorizontalAdjust_LEFT }, { XML_CENTER, text::HorizontalAdjust_CENTER }, { XML_RIGHT, text::HorizontalAdjust_RIGHT }, - { XML_TOKEN_INVALID, (text::HorizontalAdjust)0 } + { XML_TOKEN_INVALID, text::HorizontalAdjust(0) } }; SvXMLUnitConverter::convertEnum( diff --git a/xmloff/source/style/adjushdl.cxx b/xmloff/source/style/adjushdl.cxx index 0b2c1f99d59e..d6b9e6958f5c 100644 --- a/xmloff/source/style/adjushdl.cxx +++ b/xmloff/source/style/adjushdl.cxx @@ -37,7 +37,7 @@ SvXMLEnumMapEntry<style::ParagraphAdjust> const pXML_Para_Adjust_Enum[] = { XML_JUSTIFIED, style::ParagraphAdjust_BLOCK }, // obsolete { XML_LEFT, style::ParagraphAdjust_LEFT }, { XML_RIGHT, style::ParagraphAdjust_RIGHT }, - { XML_TOKEN_INVALID, (style::ParagraphAdjust)0 } + { XML_TOKEN_INVALID, style::ParagraphAdjust(0) } }; SvXMLEnumMapEntry<style::ParagraphAdjust> const pXML_Para_Align_Last_Enum[] = @@ -46,7 +46,7 @@ SvXMLEnumMapEntry<style::ParagraphAdjust> const pXML_Para_Align_Last_Enum[] = { XML_CENTER, style::ParagraphAdjust_CENTER }, { XML_JUSTIFY, style::ParagraphAdjust_BLOCK }, { XML_JUSTIFIED, style::ParagraphAdjust_BLOCK }, // obsolete - { XML_TOKEN_INVALID, (style::ParagraphAdjust)0 } + { XML_TOKEN_INVALID, style::ParagraphAdjust(0) } }; @@ -63,7 +63,7 @@ bool XMLParaAdjustPropHdl::importXML( const OUString& rStrImpValue, uno::Any& rV style::ParagraphAdjust eAdjust; bool bRet = SvXMLUnitConverter::convertEnum( eAdjust, rStrImpValue, pXML_Para_Adjust_Enum ); if( bRet ) - rValue <<= (sal_Int16)eAdjust; + rValue <<= static_cast<sal_Int16>(eAdjust); return bRet; } @@ -77,7 +77,7 @@ bool XMLParaAdjustPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rV rValue >>= nVal; - bool bRet = SvXMLUnitConverter::convertEnum( aOut, (style::ParagraphAdjust)nVal, pXML_Para_Adjust_Enum, XML_START ); + bool bRet = SvXMLUnitConverter::convertEnum( aOut, static_cast<style::ParagraphAdjust>(nVal), pXML_Para_Adjust_Enum, XML_START ); rStrExpValue = aOut.makeStringAndClear(); @@ -98,7 +98,7 @@ bool XMLLastLineAdjustPropHdl::importXML( const OUString& rStrImpValue, uno::Any style::ParagraphAdjust eAdjust; bool bRet = SvXMLUnitConverter::convertEnum( eAdjust, rStrImpValue, pXML_Para_Align_Last_Enum ); if( bRet ) - rValue <<= (sal_Int16)eAdjust; + rValue <<= static_cast<sal_Int16>(eAdjust); return bRet; } @@ -111,8 +111,8 @@ bool XMLLastLineAdjustPropHdl::exportXML( OUString& rStrExpValue, const uno::Any rValue >>= nVal; - if( (style::ParagraphAdjust)nVal != style::ParagraphAdjust_LEFT ) - bRet = SvXMLUnitConverter::convertEnum( aOut, (style::ParagraphAdjust)nVal, pXML_Para_Align_Last_Enum, XML_START ); + if( static_cast<style::ParagraphAdjust>(nVal) != style::ParagraphAdjust_LEFT ) + bRet = SvXMLUnitConverter::convertEnum( aOut, static_cast<style::ParagraphAdjust>(nVal), pXML_Para_Align_Last_Enum, XML_START ); rStrExpValue = aOut.makeStringAndClear(); diff --git a/xmloff/source/style/backhdl.cxx b/xmloff/source/style/backhdl.cxx index 74236713c2c3..ed0b56d98784 100644 --- a/xmloff/source/style/backhdl.cxx +++ b/xmloff/source/style/backhdl.cxx @@ -31,14 +31,14 @@ SvXMLEnumMapEntry<style::GraphicLocation> const pXML_BrushHorizontalPos[] = { { XML_LEFT, style::GraphicLocation_LEFT_MIDDLE }, { XML_RIGHT, style::GraphicLocation_RIGHT_MIDDLE }, - { XML_TOKEN_INVALID, (style::GraphicLocation)0 } + { XML_TOKEN_INVALID, style::GraphicLocation(0) } }; SvXMLEnumMapEntry<style::GraphicLocation> const pXML_BrushVerticalPos[] = { { XML_TOP, style::GraphicLocation_MIDDLE_TOP }, { XML_BOTTOM, style::GraphicLocation_MIDDLE_BOTTOM }, - { XML_TOKEN_INVALID, (style::GraphicLocation)0 } + { XML_TOKEN_INVALID, style::GraphicLocation(0) } }; @@ -130,7 +130,7 @@ bool XMLBackGraphicPositionPropHdl::importXML( const OUString& rStrImpValue, uno bRet &= style::GraphicLocation_NONE != ePos; if( bRet ) - rValue <<= (style::GraphicLocation)(sal_uInt16)ePos; + rValue <<= static_cast<style::GraphicLocation>(static_cast<sal_uInt16>(ePos)); return bRet; } @@ -145,7 +145,7 @@ bool XMLBackGraphicPositionPropHdl::exportXML( OUString& rStrExpValue, const uno { sal_Int32 nValue = 0; if( rValue >>= nValue ) - eLocation = (style::GraphicLocation)nValue; + eLocation = static_cast<style::GraphicLocation>(nValue); else bRet = false; } diff --git a/xmloff/source/style/breakhdl.cxx b/xmloff/source/style/breakhdl.cxx index 9a0d844478e2..9acc14bff932 100644 --- a/xmloff/source/style/breakhdl.cxx +++ b/xmloff/source/style/breakhdl.cxx @@ -81,7 +81,7 @@ bool XMLFmtBreakBeforePropHdl::exportXML( OUString& rStrExpValue, const uno::Any if( !( rValue >>= nValue ) ) return false; - eBreak = (style::BreakType) nValue; + eBreak = static_cast<style::BreakType>(nValue); } sal_uInt16 nEnum = 0; @@ -151,7 +151,7 @@ bool XMLFmtBreakAfterPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& if( !( rValue >>= nValue ) ) return false; - eBreak = (style::BreakType) nValue; + eBreak = static_cast<style::BreakType>(nValue); } sal_uInt16 nEnum = 0; diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx index 794972a2948d..0a2d0d9b8514 100644 --- a/xmloff/source/style/fonthdl.cxx +++ b/xmloff/source/style/fonthdl.cxx @@ -41,7 +41,7 @@ static const SvXMLEnumMapEntry<FontFamily>* lcl_getFontFamilyGenericMapping() { XML_SCRIPT, FAMILY_SCRIPT }, { XML_SWISS, FAMILY_SWISS }, { XML_SYSTEM, FAMILY_SYSTEM }, - { XML_TOKEN_INVALID, (FontFamily)0 } + { XML_TOKEN_INVALID, FontFamily(0) } }; return aFontFamilyGenericMapping; } @@ -50,7 +50,7 @@ static SvXMLEnumMapEntry<FontPitch> const aFontPitchMapping[] = { { XML_FIXED, PITCH_FIXED }, { XML_VARIABLE, PITCH_VARIABLE }, - { XML_TOKEN_INVALID, (FontPitch)0 } + { XML_TOKEN_INVALID, FontPitch(0) } }; // class XMLFontFamilyNamePropHdl @@ -209,7 +209,7 @@ bool XMLFontFamilyPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rV sal_Int16 nFamily = sal_Int16(); if( rValue >>= nFamily ) { - FontFamily eFamily = (FontFamily)nFamily; + FontFamily eFamily = static_cast<FontFamily>(nFamily); if( eFamily != FAMILY_DONTKNOW ) bRet = SvXMLUnitConverter::convertEnum( aOut, eFamily, lcl_getFontFamilyGenericMapping() ); } @@ -278,7 +278,7 @@ bool XMLFontPitchPropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rVa FontPitch ePitch = PITCH_DONTKNOW; if( rValue >>= nPitch ) - ePitch = (FontPitch)nPitch; + ePitch = static_cast<FontPitch>(nPitch); if( PITCH_DONTKNOW != ePitch ) { diff --git a/xmloff/source/style/postuhdl.cxx b/xmloff/source/style/postuhdl.cxx index 8f457c51f969..d4df03c70c08 100644 --- a/xmloff/source/style/postuhdl.cxx +++ b/xmloff/source/style/postuhdl.cxx @@ -34,7 +34,7 @@ SvXMLEnumMapEntry<FontItalic> const aPostureGenericMapping[] = { XML_POSTURE_NORMAL, ITALIC_NONE }, { XML_POSTURE_ITALIC, ITALIC_NORMAL }, { XML_POSTURE_OBLIQUE, ITALIC_OBLIQUE }, - { XML_TOKEN_INVALID, (FontItalic)0 } + { XML_TOKEN_INVALID, FontItalic(0) } }; @@ -67,7 +67,7 @@ bool XMLPosturePropHdl::exportXML( OUString& rStrExpValue, const uno::Any& rValu if( !( rValue >>= nValue ) ) return false; - eSlant = (awt::FontSlant)nValue; + eSlant = static_cast<awt::FontSlant>(nValue); } OUStringBuffer aOut; diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx index 8fae927244e9..0b18917c02ee 100644 --- a/xmloff/source/style/prhdlfac.cxx +++ b/xmloff/source/style/prhdlfac.cxx @@ -65,7 +65,7 @@ static SvXMLEnumMapEntry<drawing::ColorMode> const aXML_ColorMode_EnumMap[] = { XML_MONO, drawing::ColorMode_MONO }, { XML_WATERMARK, drawing::ColorMode_WATERMARK }, { XML_STANDARD, drawing::ColorMode_STANDARD }, - { XML_TOKEN_INVALID, (drawing::ColorMode)0 } + { XML_TOKEN_INVALID, drawing::ColorMode(0) } }; static SvXMLEnumMapEntry<text::HorizontalAdjust> const aXML_HorizontalAdjust_Enum[] = @@ -73,7 +73,7 @@ static SvXMLEnumMapEntry<text::HorizontalAdjust> const aXML_HorizontalAdjust_Enu { XML_LEFT, text::HorizontalAdjust_LEFT }, { XML_CENTER, text::HorizontalAdjust_CENTER }, { XML_RIGHT, text::HorizontalAdjust_RIGHT }, - { XML_TOKEN_INVALID, (text::HorizontalAdjust)0 } + { XML_TOKEN_INVALID, text::HorizontalAdjust(0) } }; // aXML_WritingDirection_Enum is used with and without 'page' diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx index 059bf8739600..1fd79f01be4e 100644 --- a/xmloff/source/style/xmlnumfe.cxx +++ b/xmloff/source/style/xmlnumfe.cxx @@ -1031,8 +1031,8 @@ static bool lcl_IsDefaultDateFormat( const SvNumberformat& rFormat, bool bSystem return false; // additional elements else { - NfIndexTableOffset eFound = (NfIndexTableOffset) SvXMLNumFmtDefaults::GetDefaultDateFormat( - eDateDOW, eDateDay, eDateMonth, eDateYear, eDateHours, eDateMins, eDateSecs, bSystemDate ); + NfIndexTableOffset eFound = static_cast<NfIndexTableOffset>(SvXMLNumFmtDefaults::GetDefaultDateFormat( + eDateDOW, eDateDay, eDateMonth, eDateYear, eDateHours, eDateMins, eDateSecs, bSystemDate )); return ( eFound == eBuiltIn ); } diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 1eedc4000bd3..e3576285f3da 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1709,9 +1709,9 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter) // check for default date formats if ( nType == XML_TOK_STYLES_DATE_STYLE && bAutoOrder && !bDateNoDefault ) { - NfIndexTableOffset eFormat = (NfIndexTableOffset) SvXMLNumFmtDefaults::GetDefaultDateFormat( + NfIndexTableOffset eFormat = static_cast<NfIndexTableOffset>(SvXMLNumFmtDefaults::GetDefaultDateFormat( eDateDOW, eDateDay, eDateMonth, eDateYear, - eDateHours, eDateMins, eDateSecs, bFromSystem ); + eDateHours, eDateMins, eDateSecs, bFromSystem )); if ( eFormat < NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS ) { // #109651# if a date format has the automatic-order attribute and diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index 262dce7f32a3..752c5bbf0701 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -102,9 +102,9 @@ void SvXMLStyleContext::SetAttribute( sal_uInt16 nPrefixKey, if( IsXMLToken( rLocalName, XML_FAMILY ) ) { if( IsXMLToken( rValue, XML_PARAGRAPH ) ) - mnFamily = (sal_uInt16)SfxStyleFamily::Para; + mnFamily = sal_uInt16(SfxStyleFamily::Para); else if( IsXMLToken( rValue, XML_TEXT ) ) - mnFamily = (sal_uInt16)SfxStyleFamily::Char; + mnFamily = sal_uInt16(SfxStyleFamily::Char); } else if( IsXMLToken( rLocalName, XML_NAME ) ) { diff --git a/xmloff/source/style/xmltabe.cxx b/xmloff/source/style/xmltabe.cxx index c63c47d78df2..9fde295abfee 100644 --- a/xmloff/source/style/xmltabe.cxx +++ b/xmloff/source/style/xmltabe.cxx @@ -39,7 +39,7 @@ SvXMLEnumMapEntry<style::TabAlign> const pXML_tabstop_style[] = { XML_RIGHT, style::TabAlign_RIGHT }, { XML_CHAR, style::TabAlign_DECIMAL }, { XML_DEFAULT, style::TabAlign_DEFAULT }, // ????????????????????????????????????? - { XML_TOKEN_INVALID, (style::TabAlign)0 } + { XML_TOKEN_INVALID, style::TabAlign(0) } }; void SvxXMLTabStopExport::exportTabStop( const css::style::TabStop* pTabStop ) |