summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-04-06 18:30:23 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-04-06 18:30:23 +0200
commit2f01d679585f9770d81d8e0a8f3eb7a5b4edf2b4 (patch)
tree66934324322bb52ad0e3eefe7dd91ff9a51971f9 /xmloff/source
parentf79c466405843fc5ee01b2129c97965bcdd6b3b8 (diff)
Improved loplugin:redundantcast, static_cast on arithmetic types: xmloff
Change-Id: I67a7f0643b4773c991e780c9a715636bb3e6e6cb
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx6
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx2
-rw-r--r--xmloff/source/style/styleexp.cxx2
-rw-r--r--xmloff/source/text/XMLTextMarkImportContext.cxx3
-rw-r--r--xmloff/source/text/txtimp.cxx3
5 files changed, 7 insertions, 9 deletions
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index bf3e95b85445..5fdb943556a8 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -1114,9 +1114,9 @@ void SchXMLStatisticsObjectContext::StartElement( const uno::Reference< xml::sax
uno::UNO_QUERY );
xBarProp->setPropertyValue("ErrorBarStyle",uno::makeAny(css::chart::ErrorBarStyle::NONE));
- xBarProp->setPropertyValue("PositiveError",uno::makeAny(static_cast<double>(0.0)));
- xBarProp->setPropertyValue("NegativeError",uno::makeAny(static_cast<double>(0.0)));
- xBarProp->setPropertyValue("Weight",uno::makeAny(static_cast<double>(1.0)));
+ xBarProp->setPropertyValue("PositiveError",uno::makeAny(0.0));
+ xBarProp->setPropertyValue("NegativeError",uno::makeAny(0.0));
+ xBarProp->setPropertyValue("Weight",uno::makeAny(1.0));
xBarProp->setPropertyValue("ShowPositiveError",uno::makeAny(true));
xBarProp->setPropertyValue("ShowNegativeError",uno::makeAny(true));
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index f00ce12d94f3..b301a1ed7961 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -369,7 +369,7 @@ Reference< chart2::data::XDataSequence > CreateDataSequence(
bool bVal = false;
uno::Any any = xPropSet->getPropertyValue("UseInternalDataProvider");
if (any >>= bVal)
- bUseInternal = static_cast<bool>(bVal);
+ bUseInternal = bVal;
}
catch (const beans::UnknownPropertyException&)
{
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index f019e8cb14e7..8aec434b5faf 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -185,7 +185,7 @@ bool XMLStyleExport::exportStyle(
if( nOutlineLevel > 0 )
{
OUStringBuffer sTmp;
- sTmp.append( static_cast<sal_Int32>(nOutlineLevel));
+ sTmp.append(nOutlineLevel);
GetExport().AddAttribute( XML_NAMESPACE_STYLE,
XML_DEFAULT_OUTLINE_LEVEL,
sTmp.makeStringAndClear() );
diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
index b73ae0166d6b..3878152e5bae 100644
--- a/xmloff/source/text/XMLTextMarkImportContext.cxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -247,8 +247,7 @@ void XMLTextMarkImportContext::EndElement()
{
std::shared_ptr< ::xmloff::ParsedRDFaAttributes >
xRDFaAttributes;
- if (m_bHaveAbout && (TypeBookmarkStart
- == static_cast<lcl_MarkType>(nTmp)))
+ if (m_bHaveAbout && TypeBookmarkStart == nTmp)
{
xRDFaAttributes =
GetImport().GetRDFaImportHelper().ParseRDFa(
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index c1f552df985b..2bd3cace328f 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1850,9 +1850,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
{
if ( nCurrentOutlineLevelInheritedFromParagraphStyle != 0 )
{
- sal_Int16 nZero = 0;
xPropSet->setPropertyValue(s_OutlineLevel,
- makeAny( static_cast<sal_Int16>(nZero) ));
+ makeAny( sal_Int16(0) ));
}
}
}