diff options
48 files changed, 100 insertions, 105 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 01fe64219c1f..bb8ddeff03a8 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -1174,13 +1174,13 @@ void DlgEditor::Print( Printer* pPrinter, const OUString& rTitle ) // not wor Size aOutputSz; if( nBmpSzHeight * nScaleX <= nPaperSzHeight ) { - aOutputSz.Width() = (long)(((double)nBmpSzWidth) * nScaleX); - aOutputSz.Height() = (long)(((double)nBmpSzHeight) * nScaleX); + aOutputSz.Width() = (long)(nBmpSzWidth * nScaleX); + aOutputSz.Height() = (long)(nBmpSzHeight * nScaleX); } else { - aOutputSz.Width() = (long)(((double)nBmpSzWidth) * nScaleY); - aOutputSz.Height() = (long)(((double)nBmpSzHeight) * nScaleY); + aOutputSz.Width() = (long)(nBmpSzWidth * nScaleY); + aOutputSz.Height() = (long)(nBmpSzHeight * nScaleY); } Point aPosOffs( diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 6344bdebaf6b..e23536751753 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2370,7 +2370,7 @@ double Now_Impl() nSeconds *= 3600; nSeconds += aTime.GetMin() * 60; nSeconds += aTime.GetSec(); - double nDays = ((double)nSeconds) / (double)(24.0*3600.0); + double nDays = ((double)nSeconds) / (24.0*3600.0); aSerial += nDays; return aSerial; } @@ -3254,7 +3254,7 @@ RTLFUNC(FileDateTime) nSeconds *= 3600; nSeconds += aTime.GetMin() * 60; nSeconds += aTime.GetSec(); - double nDays = ((double)nSeconds) / (double)(24.0*3600.0); + double nDays = ((double)nSeconds) / (24.0*3600.0); fSerial += nDays; Color* pCol; diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index c14281c4ea96..f38d47a882bf 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -627,7 +627,7 @@ void Wait_Impl( bool bDurationBased, SbxArray& rPar ) { double dWait = rPar.Get(1)->GetDouble(); double dNow = Now_Impl(); - double dSecs = (double)( ( dWait - dNow ) * (double)( 24.0*3600.0) ); + double dSecs = ( dWait - dNow ) * 24.0 * 3600.0; nWait = (long)( dSecs * 1000 ); // wait in thousands of sec } else diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx index ac098881395a..76b9c7306fa2 100644 --- a/basic/source/sbx/sbxdate.cxx +++ b/basic/source/sbx/sbxdate.cxx @@ -413,7 +413,7 @@ start: break; case SbxBYREF | SbxDATE: case SbxBYREF | SbxDOUBLE: - *p->pDouble = (double) n; + *p->pDouble = n; break; case SbxBYREF | SbxCURRENCY: if( n > SbxMAXCURR ) diff --git a/basic/source/sbx/sbxdbl.cxx b/basic/source/sbx/sbxdbl.cxx index cfe964097ad7..3c17e6155ef7 100644 --- a/basic/source/sbx/sbxdbl.cxx +++ b/basic/source/sbx/sbxdbl.cxx @@ -198,7 +198,7 @@ start: case SbxLPSTR: if( !p->pOUString ) p->pOUString = new OUString; - ImpCvtNum( (double) n, 14, *p->pOUString, bCoreString ); + ImpCvtNum( n, 14, *p->pOUString, bCoreString ); break; case SbxOBJECT: { @@ -295,7 +295,7 @@ start: *p->puInt64 = ImpDoubleToSalUInt64( n ); break; case SbxBYREF | SbxDATE: case SbxBYREF | SbxDOUBLE: - *p->pDouble = (double) n; break; + *p->pDouble = n; break; case SbxBYREF | SbxCURRENCY: if( n > SbxMAXCURR ) { diff --git a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx index 55959776bd3a..b32609dae846 100644 --- a/chart2/source/controller/main/DragMethod_RotateDiagram.cxx +++ b/chart2/source/controller/main/DragMethod_RotateDiagram.cxx @@ -137,8 +137,8 @@ void DragMethod_RotateDiagram::MoveSdrDrag(const Point& rPnt) double fCx = m_aReferenceRect.Center().X(); double fCy = m_aReferenceRect.Center().Y(); - m_fAdditionalZAngleRad = atan((double)(fCx - m_aStartPos.X())/(m_aStartPos.Y()-fCy)) - + atan((double)(fCx - rPnt.X())/(fCy-rPnt.Y())); + m_fAdditionalZAngleRad = atan((fCx - m_aStartPos.X())/(m_aStartPos.Y()-fCy)) + + atan((fCx - rPnt.X())/(fCy-rPnt.Y())); } m_nAdditionalHorizontalAngleDegree = static_cast<sal_Int32>(m_fAdditionalXAngleRad*180.0/F_PI); diff --git a/compilerplugins/clang/redundantcast.cxx b/compilerplugins/clang/redundantcast.cxx index 7b3b05d8aced..845876425c7e 100644 --- a/compilerplugins/clang/redundantcast.cxx +++ b/compilerplugins/clang/redundantcast.cxx @@ -306,8 +306,8 @@ bool RedundantCast::VisitCStyleCastExpr(CStyleCastExpr const * expr) { << t1 << t2 << expr->getSourceRange(); return true; } - bool bBuiltinTypeBool = t1->isSpecificBuiltinType(BuiltinType::Bool); - if ((bBuiltinTypeBool || loplugin::TypeCheck(t1).Typedef()) && t1 == t2) + bool bBuiltinType = t1->isSpecificBuiltinType(BuiltinType::Bool) || t1->isSpecificBuiltinType(BuiltinType::Double); + if ((bBuiltinType || loplugin::TypeCheck(t1).Typedef()) && t1 == t2) { // Ignore FD_ISSET expanding to "...(SOCKET)(fd)..." in some Microsoft // winsock2.h (TODO: improve heuristic of determining that the whole diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx index ab223a886257..8a343a3404a9 100644 --- a/connectivity/source/drivers/dbase/DTable.cxx +++ b/connectivity/source/drivers/dbase/DTable.cxx @@ -905,7 +905,7 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool memcpy(&nValue, pData, nLen); if ( m_aScales[i-1] ) - d = (double)(nValue / pow(10.0,(int)m_aScales[i-1])); + d = (nValue / pow(10.0,(int)m_aScales[i-1])); else d = (double)(nValue); } diff --git a/cppcanvas/source/mtfrenderer/mtftools.cxx b/cppcanvas/source/mtfrenderer/mtftools.cxx index a9ceb98c5594..4432e7196386 100644 --- a/cppcanvas/source/mtfrenderer/mtftools.cxx +++ b/cppcanvas/source/mtfrenderer/mtftools.cxx @@ -199,10 +199,10 @@ namespace cppcanvas ::basegfx::B2DPolyPolygon( ::basegfx::tools::createPolygonFromRect( ::basegfx::B2DRectangle( - (double)(aLocalClipRect.Left() - rOffset.getX())/pScaling->getX(), - (double)(aLocalClipRect.Top() - rOffset.getY())/pScaling->getY(), - (double)(aLocalClipRect.Right() - rOffset.getX())/pScaling->getX(), - (double)(aLocalClipRect.Bottom() - rOffset.getY())/pScaling->getY() ) ) ) ); + (aLocalClipRect.Left() - rOffset.getX())/pScaling->getX(), + (aLocalClipRect.Top() - rOffset.getY())/pScaling->getY(), + (aLocalClipRect.Right() - rOffset.getX())/pScaling->getX(), + (aLocalClipRect.Bottom() - rOffset.getY())/pScaling->getY() ) ) ) ); } else { diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx index 45491d251667..23dc70a7e463 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx @@ -214,7 +214,7 @@ Any OXMLDataSourceSetting::convertString(const css::uno::Type& _rExpectedType, c SAL_WARN_IF(!bSuccess, "dbaccess", "OXMLDataSourceSetting::convertString: could not convert \"" << _rReadCharacters << "\" into a double!"); - aReturn <<= (double)nValue; + aReturn <<= nValue; } break; case TypeClass_STRING: diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index 242f51e3a672..ce90e1926514 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -197,7 +197,7 @@ namespace pcr { Any aPropValue; if ( !getTypedControlWindow()->GetText().isEmpty() ) - aPropValue <<= (double)getTypedControlWindow()->GetValue(); + aPropValue <<= getTypedControlWindow()->GetValue(); return aPropValue; } diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index 755f6b8b9afe..027ed0eefdf5 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -358,7 +358,7 @@ void CGMImpressOutAct::ImplSetTextBundle( const uno::Reference< beans::XProperty nFontType = pFontEntry->nFontType; aFontDescriptor.Name = OUString::createFromAscii( reinterpret_cast<char*>(pFontEntry->pFontName) ); } - aFontDescriptor.Height = ( sal_Int16 )( ( mpCGM->pElement->nCharacterHeight * (double)1.50 ) ); + aFontDescriptor.Height = ( sal_Int16 )( ( mpCGM->pElement->nCharacterHeight * 1.50 ) ); if ( nFontType & 1 ) aFontDescriptor.Slant = awt::FontSlant_ITALIC; if ( nFontType & 2 ) diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx index 68e63844843b..adb80d08db59 100644 --- a/filter/source/graphicfilter/icgm/class4.cxx +++ b/filter/source/graphicfilter/icgm/class4.cxx @@ -56,7 +56,7 @@ void CGM::ImplGetVector( double* pVector ) { for ( sal_uInt32 i = 0; i < 4; i++ ) { - pVector[ i ] = (double)ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + pVector[ i ] = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); } } else @@ -504,7 +504,7 @@ void CGM::ImplDoClass4() if ( pElement->eVDCType == VDC_REAL ) { - aRadius.X = (double)ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + aRadius.X = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); } else { @@ -557,7 +557,7 @@ void CGM::ImplDoClass4() ImplGetVector( &vector[ 0 ] ); if ( pElement->eVDCType == VDC_REAL ) { - aRadius.X = (double)ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); + aRadius.X = ImplGetFloat( pElement->eVDCRealPrecision, pElement->nVDCRealSize ); } else { diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 75bd52cdff99..7c6886d8ce9c 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -370,14 +370,10 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, nEndAngle = *o3tl::doAccess<sal_Int32>(rObj.GetUsrAny()); Point aStart, aEnd, aCenter; - aStart.X() = (sal_Int32)( ( cos( (double)( nStartAngle * - F_PI18000 ) ) * 100.0 ) ); - aStart.Y() = - (sal_Int32)( ( sin( (double)( nStartAngle * - F_PI18000 ) ) * 100.0 ) ); - aEnd.X() = (sal_Int32)( ( cos( (double)( nEndAngle * - F_PI18000 ) ) * 100.0 ) ); - aEnd.Y() = - (sal_Int32)( ( sin( (double)( nEndAngle * - F_PI18000 ) ) * 100.0 ) ); + aStart.X() = (sal_Int32)( cos( nStartAngle * F_PI18000 ) * 100.0 ); + aStart.Y() = - (sal_Int32)( sin( nStartAngle * F_PI18000 ) * 100.0 ); + aEnd.X() = (sal_Int32)( cos( nEndAngle * F_PI18000 ) * 100.0 ); + aEnd.Y() = - (sal_Int32)( sin( nEndAngle * F_PI18000 ) * 100.0 ); const tools::Rectangle& rRect = aRect100thmm; aCenter.X() = rRect.Left() + ( rRect.GetWidth() / 2 ); aCenter.Y() = rRect.Top() + ( rRect.GetHeight() / 2 ); diff --git a/forms/source/component/EditBase.cxx b/forms/source/component/EditBase.cxx index 261efa16073c..99ecfdb316d1 100644 --- a/forms/source/component/EditBase.cxx +++ b/forms/source/component/EditBase.cxx @@ -189,7 +189,7 @@ void OEditBaseModel::read(const Reference<XObjectInputStream>& _rxInStream) else if ((nAnyMask & DEFAULT_DOUBLE) == DEFAULT_DOUBLE) { double fValue = _rxInStream->readDouble(); - m_aDefault <<= (double)fValue; + m_aDefault <<= fValue; } else if ((nAnyMask & DEFAULT_TIME) == DEFAULT_TIME) { diff --git a/forms/source/component/Numeric.cxx b/forms/source/component/Numeric.cxx index ab9ab0c78c30..f537cff50bc5 100644 --- a/forms/source/component/Numeric.cxx +++ b/forms/source/component/Numeric.cxx @@ -147,7 +147,7 @@ bool ONumericModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) Any ONumericModel::translateDbColumnToControlValue() { - m_aSaveValue <<= (double)m_xColumn->getDouble(); + m_aSaveValue <<= m_xColumn->getDouble(); if ( m_xColumn->wasNull() ) m_aSaveValue.clear(); diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx index cf13db054a50..b4bf35ec96e4 100644 --- a/hwpfilter/source/hwpreader.cxx +++ b/hwpfilter/source/hwpreader.cxx @@ -43,7 +43,7 @@ #define rendEl(x) do { if (m_rxDocumentHandler.is()) m_rxDocumentHandler->endElement(x); } while(false) #define rchars(x) do { if (m_rxDocumentHandler.is()) m_rxDocumentHandler->characters(x); } while(false) #define padd(x,y,z) mxList->addAttribute(x,y,z) -#define Double2Str(x) OUString::number((double)(x)) +#define Double2Str(x) OUString::number(x) #define WTI(x) ((double)(x) / 1800.) // unit => inch #define WTMM(x) ((double)(x) / 1800. * 25.4) // unit => mm #define WTSM(x) ((int)((x) / 1800. * 2540)) // unit ==> 1/100 mm diff --git a/idlc/source/astexpression.cxx b/idlc/source/astexpression.cxx index bac987d942ea..f0c12f4a1369 100644 --- a/idlc/source/astexpression.cxx +++ b/idlc/source/astexpression.cxx @@ -595,7 +595,7 @@ coerce_value(AstExprValue *ev, ExprType t) ev->et = ET_double; return true; case ET_uhyper: - if ((double)ev->u.dval > FLT_MAX || (double)ev->u.dval < -FLT_MAX) + if (ev->u.dval > FLT_MAX || ev->u.dval < -FLT_MAX) return false; ev->u.dval = (double)ev->u.ulval; ev->et = ET_double; diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx index 2e5a02e9fabd..6df8304df41a 100644 --- a/oox/source/ppt/timenode.cxx +++ b/oox/source/ppt/timenode.cxx @@ -154,7 +154,7 @@ namespace oox { namespace ppt { { // first effect does not start on click, so correct // first click nodes begin to 0s - xClickNode->setBegin( makeAny( (double)0.0 ) ); + xClickNode->setBegin( makeAny( 0.0 ) ); break; } } diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx index ad1ba750342d..59949b534c46 100644 --- a/reportdesign/source/filter/xml/xmlControlProperty.cxx +++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx @@ -237,7 +237,7 @@ Any OXMLControlProperty::convertString(const css::uno::Type& _rExpectedType, con OStringBuffer("OXMLControlProperty::convertString: could not convert \""). append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)). append("\" into a double!").getStr()); - aReturn <<= (double)nValue; + aReturn <<= nValue; } break; case TypeClass_STRING: diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx index cbc6172d6231..2a1b23a09b3d 100644 --- a/sc/source/core/tool/docoptio.cxx +++ b/sc/source/core/tool/docoptio.cxx @@ -339,7 +339,7 @@ IMPL_LINK_NOARG(ScDocCfg, CalcCommitHdl, ScLinkConfigItem&, void) pValues[nProp] <<= (sal_Int32) GetIterCount(); break; case SCCALCOPT_ITER_MINCHG: - pValues[nProp] <<= (double) GetIterEps(); + pValues[nProp] <<= GetIterEps(); break; case SCCALCOPT_DATE_DAY: pValues[nProp] <<= (sal_Int32) nDateDay; diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx index 381bb07e9395..3d517987f6f9 100644 --- a/sc/source/core/tool/interpr2.cxx +++ b/sc/source/core/tool/interpr2.cxx @@ -767,7 +767,7 @@ void ScInterpreter::ScGetDiffDate360() else aDate2.SetDay(30); } - PushDouble( fSign * (double) + PushDouble( fSign * ( (double) aDate2.GetDay() + (double) aDate2.GetMonth() * 30.0 + (double) aDate2.GetYear() * 360.0 - (double) aDate1.GetDay() - (double) aDate1.GetMonth() * 30.0 @@ -1310,7 +1310,7 @@ void ScInterpreter::ScNPV() { case svDouble : { - nVal += (GetDouble() / pow(1.0 + nInterest, (double)nCount)); + nVal += (GetDouble() / pow(1.0 + nInterest, nCount)); nCount++; } break; @@ -1322,7 +1322,7 @@ void ScInterpreter::ScNPV() if (!aCell.hasEmptyValue() && aCell.hasNumeric()) { double nCellVal = GetCellValue(aAdr, aCell); - nVal += (nCellVal / pow(1.0 + nInterest, (double)nCount)); + nVal += (nCellVal / pow(1.0 + nInterest, nCount)); nCount++; } } @@ -1336,7 +1336,7 @@ void ScInterpreter::ScNPV() ScHorizontalValueIterator aValIter( pDok, aRange ); while ((nErr == FormulaError::NONE) && aValIter.GetNext(nCellVal, nErr)) { - nVal += (nCellVal / pow(1.0 + nInterest, (double)nCount)); + nVal += (nCellVal / pow(1.0 + nInterest, nCount)); nCount++; } if ( nErr != FormulaError::NONE ) @@ -1428,13 +1428,13 @@ void ScInterpreter::ScIRR() if (aValIter.GetFirst(fValue, nErr)) { double nCount = 0.0; - fNom += fValue / pow(1.0+x,(double)nCount); + fNom += fValue / pow(1.0+x,nCount); fDenom += -nCount * fValue / pow(1.0+x,nCount+1.0); nCount++; while ((nErr == FormulaError::NONE) && aValIter.GetNext(fValue, nErr)) { - fNom += fValue / pow(1.0+x,(double)nCount); - fDenom += -nCount * fValue / pow(1.0+x,nCount+1.0); + fNom += fValue / pow(1.0+x,nCount); + fDenom += -nCount * fValue / pow(1.0+x,nCount+1.0); nCount++; } SetError(nErr); diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 959023e5466a..aa4b94899f10 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -2992,7 +2992,7 @@ void ScInterpreter::ScHarMean() } } if (nGlobalError == FormulaError::NONE) - PushDouble((double)nValCount/nVal); + PushDouble( nValCount / nVal ); else PushError( nGlobalError); } diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx index fefac2e70c6e..3ae86c0c4d58 100644 --- a/sc/source/filter/excel/excform.cxx +++ b/sc/source/filter/excel/excform.cxx @@ -1601,7 +1601,7 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz ) if( aPool.IsSingleOp( eParam[ nLauf ], ocMissing ) ) { if( !nNullParam ) - nNullParam = (sal_uInt16) aPool.Store( ( double ) 0.0 ); + nNullParam = (sal_uInt16) aPool.Store( 0.0 ); eParam[ nLauf ] = nNullParam; } } diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index ba26604d3568..ee9e04ac8bb2 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -86,8 +86,7 @@ using namespace ::com::sun::star; -const double ImportExcel::fExcToTwips = - ( double ) TWIPS_PER_CHAR / 256.0; +const double ImportExcel::fExcToTwips = TWIPS_PER_CHAR / 256.0; ImportTyp::ImportTyp( ScDocument* pDoc, rtl_TextEncoding eQ ) { diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index d8a0f18d9b80..75951cd6d4ae 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -910,7 +910,7 @@ sax_fastparser::FSHelperPtr XclXmlUtils::WriteFontData( sax_fastparser::FSHelper lcl_WriteValue( pStream, XML_shadow, rFontData.mbShadow ? XclXmlUtils::ToPsz( rFontData.mbShadow ) : nullptr ); lcl_WriteValue( pStream, XML_u, bHaveUnderline ? pUnderline : nullptr ); lcl_WriteValue( pStream, XML_vertAlign, bHaveVertAlign ? pVertAlign : nullptr ); - lcl_WriteValue( pStream, XML_sz, OString::number( (double) (rFontData.mnHeight / 20.0) ).getStr() ); // Twips->Pt + lcl_WriteValue( pStream, XML_sz, OString::number( rFontData.mnHeight / 20.0 ).getStr() ); // Twips->Pt if( rFontData.maColor != Color( 0xFF, 0xFF, 0xFF, 0xFF ) ) pStream->singleElement( XML_color, // OOXTODO: XML_auto, bool diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index 2309993d6f57..d2d0d6dc1961 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -609,7 +609,7 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const OUString& aName, else if ( pFormula->IsValue() ) { // numeric value - aRet <<= (double) pFormula->GetValue(); + aRet <<= pFormula->GetValue(); } else { diff --git a/sc/source/ui/unoobj/optuno.cxx b/sc/source/ui/unoobj/optuno.cxx index 0731ef75cb06..0c66d0772c07 100644 --- a/sc/source/ui/unoobj/optuno.cxx +++ b/sc/source/ui/unoobj/optuno.cxx @@ -152,7 +152,7 @@ uno::Any ScDocOptionsHelper::getPropertyValue( aRet <<= (sal_Int32)( rOptions.GetIterCount() ); break; case PROP_UNO_ITEREPSILON: - aRet <<= (double)( rOptions.GetIterEps() ); + aRet <<= rOptions.GetIterEps(); break; case PROP_UNO_LOOKUPLABELS: aRet <<= rOptions.IsLookUpColRowNames(); diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 83cffc745268..8339a5ea538e 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -191,7 +191,7 @@ const double fExtraWidth = 182.0 / 256.0; // * 1 point = 1/72 inch = 20 twips // * 1 inch = 72 points = 1440 twips // * 1 cm = 567 twips -static double lcl_hmmToPoints( double nVal ) { return ( (double)((nVal /1000 ) * 567 ) / 20 ); } +static double lcl_hmmToPoints( double nVal ) { return nVal / 1000 * 567 / 20; } static const sal_Int16 supportedIndexTable[] = { excel::XlBordersIndex::xlEdgeLeft, excel::XlBordersIndex::xlEdgeTop, excel::XlBordersIndex::xlEdgeBottom, excel::XlBordersIndex::xlEdgeRight, excel::XlBordersIndex::xlDiagonalDown, excel::XlBordersIndex::xlDiagonalUp, excel::XlBordersIndex::xlInsideVertical, excel::XlBordersIndex::xlInsideHorizontal }; diff --git a/sc/source/ui/view/drawutil.cxx b/sc/source/ui/view/drawutil.cxx index 5f5c969c27ce..c25292e7c3ef 100644 --- a/sc/source/ui/view/drawutil.cxx +++ b/sc/source/ui/view/drawutil.cxx @@ -66,7 +66,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab, rScaleX = Fraction( ((double)aPixelLog.X()) * ((double)rZoomX.GetNumerator()) / ((double)nTwipsX) / - ((double)HMM_PER_TWIPS) / + HMM_PER_TWIPS / ((double)rZoomX.GetDenominator()) ); else rScaleX = Fraction( 1, 1 ); @@ -75,7 +75,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab, rScaleY = Fraction( ((double)aPixelLog.Y()) * ((double)rZoomY.GetNumerator()) / ((double)nTwipsY) / - ((double)HMM_PER_TWIPS) / + HMM_PER_TWIPS / ((double)rZoomY.GetDenominator()) ); else rScaleY = Fraction( 1, 1 ); diff --git a/sccomp/qa/unit/lpsolver.cxx b/sccomp/qa/unit/lpsolver.cxx index 2754c03bc754..2ecc3282b17f 100644 --- a/sccomp/qa/unit/lpsolver.cxx +++ b/sccomp/qa/unit/lpsolver.cxx @@ -100,7 +100,7 @@ void LpSolverTest::testSolver(OUString const & rName) CPPUNIT_ASSERT(xSolver->getSuccess()); uno::Sequence<double> aSolution = xSolver->getSolution(); CPPUNIT_ASSERT_EQUAL(aSolution.getLength(), aVariables.getLength()); - CPPUNIT_ASSERT_EQUAL(aSolution[0], (double)5.0); + CPPUNIT_ASSERT_EQUAL(aSolution[0], 5.0); uno::Reference<sheet::XSolverDescription> xDesc(xSolver, uno::UNO_QUERY_THROW); const OString sMessage("Empty description for " + OUStringToOString(rName, RTL_TEXTENCODING_UTF8)); diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index aada2ef1acd8..86e7fd18bfb1 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -958,14 +958,14 @@ Reference< XAnimationNode > CustomAnimationEffect::createAfterEffectNode() const } else { - aBegin <<= (double)0.0; + aBegin <<= 0.0; } xAnimate->setBegin( aBegin ); xAnimate->setTo( aTo ); xAnimate->setAttributeName( aAttributeName ); - xAnimate->setDuration( makeAny( (double)0.001 ) ); + xAnimate->setDuration( makeAny( 0.001 ) ); xAnimate->setFill( AnimationFill::HOLD ); xAnimate->setTarget( maTarget ); @@ -1853,7 +1853,7 @@ void EffectSequenceHelper::implRebuild() // must not have INDEFINITE begin but start at 0s bFirst = false; if( pEffect->getNodeType() != EffectNodeType::ON_CLICK ) - aBegin <<= (double)0.0; + aBegin <<= 0.0; } xOnClickContainer->setBegin( aBegin ); @@ -1911,7 +1911,7 @@ void EffectSequenceHelper::implRebuild() { // empty sequence, set duration to 0.0 explicitly // (otherwise, this sequence will never end) - mxSequenceRoot->setDuration( makeAny((double)0.0) ); + mxSequenceRoot->setDuration( makeAny(0.0) ); } } catch( Exception& ) @@ -2002,7 +2002,7 @@ void stl_process_after_effect_node_func(AfterEffectNode& rNode) // this does not yet have a child container, create one xNextContainer.set( ParallelTimeContainer::create(xContext), UNO_QUERY_THROW ); - xNextContainer->setBegin( makeAny( (double)0.0 ) ); + xNextContainer->setBegin( makeAny( 0.0 ) ); xNextClickContainer->appendChild( xNextContainer ); } DBG_ASSERT( xNextContainer.is(), "ppt::stl_process_after_effect_node_func::operator(), could not find/create container!" ); @@ -2026,7 +2026,7 @@ void stl_process_after_effect_node_func(AfterEffectNode& rNode) DBG_ASSERT( xNextContainer.is(), "ppt::stl_process_after_effect_node_func::operator(), could not create container!" ); if( xNextContainer.is() ) { - xNextContainer->setBegin( makeAny( (double)0.0 ) ); + xNextContainer->setBegin( makeAny( 0.0 ) ); xNewClickContainer->appendChild( xNextContainer ); } } @@ -3027,7 +3027,7 @@ void MainSequence::createMainSequence() // empty sequence until now, set duration to 0.0 // explicitly (otherwise, this sequence will never // end) - mxSequenceRoot->setDuration( makeAny((double)0.0) ); + mxSequenceRoot->setDuration( makeAny(0.0) ); Reference< XAnimationNode > xMainSequenceNode( mxSequenceRoot, UNO_QUERY_THROW ); mxTimingRootNode->appendChild( xMainSequenceNode ); diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx index 47f4a2c43574..1f9f60c6c351 100644 --- a/sd/source/core/EffectMigration.cxx +++ b/sd/source/core/EffectMigration.cxx @@ -1306,7 +1306,7 @@ void createVisibilityOnOffNode(Reference< XTimeContainer >& rxParentContainer, S Reference< XAnimationNode > xOuterSeqTimeContainer(xMsf->createInstance("com.sun.star.animations.ParallelTimeContainer"), UNO_QUERY_THROW); // set begin - xOuterSeqTimeContainer->setBegin(Any((double)0.0)); + xOuterSeqTimeContainer->setBegin(Any(0.0)); // set fill xOuterSeqTimeContainer->setFill(AnimationFill::HOLD); @@ -1324,7 +1324,7 @@ void createVisibilityOnOffNode(Reference< XTimeContainer >& rxParentContainer, S Reference< XAnimationNode > xAnimateSetForLast(xMsf->createInstance("com.sun.star.animations.AnimateSet"), UNO_QUERY_THROW); // set begin - xAnimateSetForLast->setBegin(Any((double)0.0)); + xAnimateSetForLast->setBegin(Any(0.0)); // set duration xAnimateSetForLast->setDuration(Any(fDuration)); @@ -1384,7 +1384,7 @@ void EffectMigration::CreateAnimatedGroup(SdrObjGroup& rGroupObj, SdPage& rPage) Reference< XAnimationNode > xOuterSeqTimeContainer(xMsf->createInstance("com.sun.star.animations.ParallelTimeContainer"), UNO_QUERY_THROW); // set begin - xOuterSeqTimeContainer->setBegin(Any((double)(0.0))); + xOuterSeqTimeContainer->setBegin(Any(0.0)); // prepare parent container Reference< XTimeContainer > xParentContainer(xOuterSeqTimeContainer, UNO_QUERY_THROW); diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index d8a00d5ea2bf..27f9e64565fd 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -1870,10 +1870,10 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a css::awt::Size aSize( mXShape->getSize() ); css::awt::Point aStart, aEnd, aCenter; ::tools::Rectangle aRect( Point( aPoint.X, aPoint.Y ), Size( aSize.Width, aSize.Height ) ); - aStart.X = (sal_Int32)( ( cos( (double)( nStartAngle * F_PI18000 ) ) * 100.0 ) ); - aStart.Y = - (sal_Int32)( ( sin( (double)( nStartAngle * F_PI18000 ) ) * 100.0 ) ); - aEnd.X = (sal_Int32)( ( cos( (double)( nEndAngle * F_PI18000 ) ) * 100.0 ) ); - aEnd.Y = - (sal_Int32)( ( sin( (double)( nEndAngle * F_PI18000 ) ) * 100.0 ) ); + aStart.X = (sal_Int32)( ( cos( nStartAngle * F_PI18000 ) * 100.0 ) ); + aStart.Y = - (sal_Int32)( ( sin( nStartAngle * F_PI18000 ) * 100.0 ) ); + aEnd.X = (sal_Int32)( ( cos( nEndAngle * F_PI18000 ) * 100.0 ) ); + aEnd.Y = - (sal_Int32)( ( sin( nEndAngle * F_PI18000 ) * 100.0 ) ); aCenter.X = aPoint.X + ( aSize.Width / 2 ); aCenter.Y = aPoint.Y + ( aSize.Height / 2 ); aStart.X += aCenter.X; diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx b/sd/source/filter/eppt/pptx-stylesheet.cxx index eb0327aa3031..065b723dc860 100644 --- a/sd/source/filter/eppt/pptx-stylesheet.cxx +++ b/sd/source/filter/eppt/pptx-stylesheet.cxx @@ -252,7 +252,7 @@ void PPTExParaSheet::SetStyleSheet( const css::uno::Reference< css::beans::XProp { const FontCollectionEntry* pDesc = rFontCollection.GetById( rCharLevel.mnFont ); if ( pDesc ) - nLineSpacing = (sal_Int16)( (double)100.0 * pDesc->Scaling + 0.5 ); + nLineSpacing = (sal_Int16)( 100.0 * pDesc->Scaling + 0.5 ); else nLineSpacing = 100; } diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx index 74491b321742..3c1f76523a72 100644 --- a/sd/source/filter/ppt/pptinanimations.cxx +++ b/sd/source/filter/ppt/pptinanimations.cxx @@ -905,7 +905,7 @@ void AnimationImporter::fillNode( Reference< XAnimationNode >& xNode, const Anim Any aDuration; if( rNode.mnDuration > 0 ) { - aDuration <<= (double)(rNode.mnDuration / 1000.0); + aDuration <<= rNode.mnDuration / 1000.0; } else if( rNode.mnDuration < 0 ) { @@ -2632,7 +2632,7 @@ void AnimationImporter::importAnimationEvents( const Atom* pAtom, const Referenc } if( (nBegin != 0) || (aEvent.Trigger == EventTrigger::NONE) ) - aEvent.Offset = (nBegin == -1) ? makeAny( Timing_INDEFINITE ) : makeAny( (double)(nBegin / 1000.0) ); + aEvent.Offset = (nBegin == -1) ? makeAny( Timing_INDEFINITE ) : makeAny( nBegin / 1000.0 ); } break; case DFF_msofbtAnimateTargetElement: diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index bdf409161d80..32e74d1f01f5 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -481,7 +481,7 @@ void CharHeightPropertyBox::setValue( const Any& rValue, const OUString& ) Any CharHeightPropertyBox::getValue() { - return makeAny( (double)((double)mpMetric->GetValue() / 100.0) ); + return makeAny( (double)mpMetric->GetValue() / 100.0 ); } Control* CharHeightPropertyBox::getControl() @@ -581,7 +581,7 @@ void TransparencyPropertyBox::setValue( const Any& rValue, const OUString& ) Any TransparencyPropertyBox::getValue() { - return makeAny( (double)((double)mpMetric->GetValue()) / 100.0 ); + return makeAny( ((double)mpMetric->GetValue()) / 100.0 ); } Control* TransparencyPropertyBox::getControl() @@ -702,7 +702,7 @@ void RotationPropertyBox::setValue( const Any& rValue, const OUString& ) Any RotationPropertyBox::getValue() { - return makeAny( (double)((double)mpMetric->GetValue()) ); + return makeAny( (double)mpMetric->GetValue() ); } Control* RotationPropertyBox::getControl() @@ -849,7 +849,7 @@ void ScalePropertyBox::setValue( const Any& rValue, const OUString& ) Any ScalePropertyBox::getValue() { - double fValue1 = (double)((double)mpMetric->GetValue() / 100.0); + double fValue1 = (double)mpMetric->GetValue() / 100.0; double fValue2 = fValue1; if( mnDirection == 1 ) @@ -2227,11 +2227,11 @@ STLPropertySet* CustomAnimationDialog::createDefaultSet() pSet->setPropertyDefaultValue( nHandleAfterEffectOnNextEffect, makeAny( false ) ); pSet->setPropertyDefaultValue( nHandleDimColor, aEmpty ); pSet->setPropertyDefaultValue( nHandleIterateType, makeAny( (sal_Int16)0 ) ); - pSet->setPropertyDefaultValue( nHandleIterateInterval, makeAny( (double)0.0 ) ); + pSet->setPropertyDefaultValue( nHandleIterateInterval, makeAny( 0.0 ) ); pSet->setPropertyDefaultValue( nHandleStart, makeAny( (sal_Int16)EffectNodeType::ON_CLICK ) ); - pSet->setPropertyDefaultValue( nHandleBegin, makeAny( (double)0.0 ) ); - pSet->setPropertyDefaultValue( nHandleDuration, makeAny( (double)2.0 ) ); + pSet->setPropertyDefaultValue( nHandleBegin, makeAny( 0.0 ) ); + pSet->setPropertyDefaultValue( nHandleDuration, makeAny( 2.0 ) ); pSet->setPropertyDefaultValue( nHandleRepeat, aEmpty ); pSet->setPropertyDefaultValue( nHandleRewind, makeAny( AnimationFill::HOLD ) ); @@ -2251,13 +2251,13 @@ STLPropertySet* CustomAnimationDialog::createDefaultSet() pSet->setPropertyDefaultValue( nHandleHasVisibleShape, makeAny( false ) ); pSet->setPropertyDefaultValue( nHandleTextGrouping, makeAny( (sal_Int32)-1 ) ); pSet->setPropertyDefaultValue( nHandleAnimateForm, makeAny( true ) ); - pSet->setPropertyDefaultValue( nHandleTextGroupingAuto, makeAny( (double)-1.0 ) ); + pSet->setPropertyDefaultValue( nHandleTextGroupingAuto, makeAny( -1.0 ) ); pSet->setPropertyDefaultValue( nHandleTextReverse, makeAny( false ) ); pSet->setPropertyDefaultValue( nHandleCurrentPage, aEmpty ); pSet->setPropertyDefaultValue( nHandleSoundURL, aEmpty ); - pSet->setPropertyDefaultValue( nHandleSoundVolumne, makeAny( (double)1.0) ); + pSet->setPropertyDefaultValue( nHandleSoundVolumne, makeAny( 1.0) ); pSet->setPropertyDefaultValue( nHandleSoundEndAfterSlide, makeAny( (sal_Int32)0 ) ); pSet->setPropertyDefaultValue( nHandleCommand, makeAny( (sal_Int16)0 ) ); diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index a2ac3a0cc5ff..e446748f2b5c 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -1210,7 +1210,7 @@ STLPropertySet* CustomAnimationPane::createSelectionSet() addValue( pSet, nHandleTextGrouping, makeAny( pTextGroup.get() ? pTextGroup->getTextGrouping() : (sal_Int32)-1 ) ); addValue( pSet, nHandleAnimateForm, makeAny( pTextGroup.get() == nullptr || pTextGroup->getAnimateForm() ) ); - addValue( pSet, nHandleTextGroupingAuto, makeAny( pTextGroup.get() ? pTextGroup->getTextGroupingAuto() : (double)-1.0 ) ); + addValue( pSet, nHandleTextGroupingAuto, makeAny( pTextGroup.get() ? pTextGroup->getTextGroupingAuto() : -1.0 ) ); addValue( pSet, nHandleTextReverse, makeAny( pTextGroup.get() && pTextGroup->getTextReverse() ) ); if( pEffectSequence->getSequenceType() == EffectNodeType::INTERACTIVE_SEQUENCE ) diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index e2a7e0dddf85..0a104ae0f69c 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -815,7 +815,7 @@ bool SlideshowImpl::startPreview( Sequence< beans::PropertyValue > aProperties(nPropertyCount); aProperties[0].Name = "AutomaticAdvancement"; - aProperties[0].Value <<= (double)1.0; // one second timeout + aProperties[0].Value <<= 1.0; // one second timeout if( mxPreviewAnimationNode.is() ) { diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 82e147a83658..70f0ec899ee1 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -1084,7 +1084,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) aAny <<= (sal_Int32)( GetPage()->GetTime() + .5 ); break; case WID_PAGE_HIGHRESDURATION: - aAny <<= (double)( GetPage()->GetTime() ); + aAny <<= GetPage()->GetTime(); break; case WID_PAGE_LDNAME: { diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index 713756e1b065..8a0ea977272d 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -797,7 +797,7 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina aRet <<= (float)( toDouble( rVal, -FLT_MAX, FLT_MAX ) ); break; case TypeClass_DOUBLE: - aRet <<= (double)( toDouble( rVal, -DBL_MAX, DBL_MAX ) ); + aRet <<= toDouble( rVal, -DBL_MAX, DBL_MAX ); break; // --- to STRING ---------------------------------------------------------------------------- diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index c01ee3d3282b..a264b93939df 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -691,7 +691,7 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa double fL = hypot( fvx, fvy ); fvx = fvx / fL; fvy = fvy / fL; - fL = (double)( aTextAreaIter->aBoundRect.GetHeight() / 2.0 + aTextAreaIter->aBoundRect.Top() ) - aParagraphIter->aBoundRect.Center().Y(); + fL = aTextAreaIter->aBoundRect.GetHeight() / 2.0 + aTextAreaIter->aBoundRect.Top() - aParagraphIter->aBoundRect.Center().Y(); fvx *= fL; fvy *= fL; rPolyPoly.Rotate( Point( aBoundRect.Center().X(), aParagraphIter->aBoundRect.Center().Y() ), sin( fAngle ), cos( fAngle ) ); diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index a6485c72fd0a..79d44e75318e 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -1989,7 +1989,7 @@ bool DbNumericField::commitControl() if (!aText.isEmpty()) // not empty { double fValue = static_cast<DoubleNumericField*>(m_pWindow.get())->GetValue(); - aVal <<= (double)fValue; + aVal <<= fValue; } m_rColumn.getModel()->setPropertyValue(FM_PROP_VALUE, aVal); return true; @@ -2141,7 +2141,7 @@ bool DbCurrencyField::commitControl() { fValue /= ::rtl::math::pow10Exp(1.0, m_nScale); } - aVal <<= (double)fValue; + aVal <<= fValue; } m_rColumn.getModel()->setPropertyValue(FM_PROP_VALUE, aVal); return true; diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 8bdac6feb728..aafa9f505549 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -1084,7 +1084,7 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const } break; case FIELD_PROP_DOUBLE: - rAny <<= (double)GetValue(); + rAny <<= GetValue(); break; case FIELD_PROP_SUBTYPE: { diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 7d67b481f159..f7e2270aacef 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -5670,22 +5670,22 @@ css::uno::Any VCLXNumericField::getProperty( const OUString& PropertyName ) { case BASEPROPERTY_VALUE_DOUBLE: { - aProp <<= (double) getValue(); + aProp <<= getValue(); } break; case BASEPROPERTY_VALUEMIN_DOUBLE: { - aProp <<= (double) getMin(); + aProp <<= getMin(); } break; case BASEPROPERTY_VALUEMAX_DOUBLE: { - aProp <<= (double) getMax(); + aProp <<= getMax(); } break; case BASEPROPERTY_VALUESTEP_DOUBLE: { - aProp <<= (double) getSpinSize(); + aProp <<= getSpinSize(); } break; case BASEPROPERTY_NUMSHOWTHOUSANDSEP: @@ -6272,22 +6272,22 @@ css::uno::Any VCLXCurrencyField::getProperty( const OUString& PropertyName ) { case BASEPROPERTY_VALUE_DOUBLE: { - aProp <<= (double) getValue(); + aProp <<= getValue(); } break; case BASEPROPERTY_VALUEMIN_DOUBLE: { - aProp <<= (double) getMin(); + aProp <<= getMin(); } break; case BASEPROPERTY_VALUEMAX_DOUBLE: { - aProp <<= (double) getMax(); + aProp <<= getMax(); } break; case BASEPROPERTY_VALUESTEP_DOUBLE: { - aProp <<= (double) getSpinSize(); + aProp <<= getSpinSize(); } break; case BASEPROPERTY_CURRENCYSYMBOL: diff --git a/vcl/unx/generic/print/common_gfx.cxx b/vcl/unx/generic/print/common_gfx.cxx index 1d9a1ca9b659..1a394a25769d 100644 --- a/vcl/unx/generic/print/common_gfx.cxx +++ b/vcl/unx/generic/print/common_gfx.cxx @@ -77,8 +77,8 @@ PrinterGfx::Init (const JobData& rData) mbColor = rData.m_nColorDevice ? ( rData.m_nColorDevice != -1 ) : ( rData.m_pParser == nullptr || rData.m_pParser->isColorDevice() ); int nRes = rData.m_aContext.getRenderResolution(); mnDpi = nRes; - mfScaleX = (double)72.0 / (double)mnDpi; - mfScaleY = (double)72.0 / (double)mnDpi; + mfScaleX = 72.0 / (double)mnDpi; + mfScaleY = 72.0 / (double)mnDpi; const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( rData.m_aPrinterName ) ); mbUploadPS42Fonts = rInfo.m_pParser && rInfo.m_pParser->isType42Capable(); } diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx index 13dd71711c2e..cb1133ac0724 100644 --- a/vcl/unx/generic/print/printerjob.cxx +++ b/vcl/unx/generic/print/printerjob.cxx @@ -570,8 +570,8 @@ PrinterJob::InitPaperSize (const JobData& rJobSetup) mnTMarginPt = nUpper; mnBMarginPt = nLower; - mfXScale = (double)72.0 / (double)mnResolution; - mfYScale = -1.0 * (double)72.0 / (double)mnResolution; + mfXScale = 72.0 / (double)mnResolution; + mfYScale = -1.0 * 72.0 / (double)mnResolution; } void diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 2fc1045a9f8e..c8a2161a9828 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -151,7 +151,7 @@ Any PropertyConversion::convertString( const css::uno::Type& _rExpectedType, OStringBuffer("PropertyConversion::convertString: could not convert \""). append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)). append("\" into a double!").getStr()); - aReturn <<= (double)nValue; + aReturn <<= nValue; } break; case TypeClass_STRING: |