summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-22 15:55:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-30 08:50:31 +0200
commit2ccde70d60d3a5074faf49260e8fe0ccdb91ff26 (patch)
tree82555c2aac7ca37c30e1084a7a8069c71fc11fbc
parent61ff1d919e317947c769e61eeda7f1bb8132f273 (diff)
teach redundantcast plugin about functional casts
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0 Reviewed-on: https://gerrit.libreoffice.org/37910 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--basctl/source/basicide/baside2.cxx3
-rw-r--r--basic/source/comp/scanner.cxx14
-rw-r--r--basic/source/runtime/inputbox.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx8
-rw-r--r--chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx6
-rw-r--r--chart2/source/controller/main/ObjectHierarchy.cxx4
-rw-r--r--chart2/source/model/main/BaseCoordinateSystem.cxx2
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx5
-rw-r--r--chart2/source/view/main/ChartView.cxx2
-rw-r--r--chart2/source/view/main/DummyXShape.cxx2
-rw-r--r--comphelper/source/eventattachermgr/eventattachermgr.cxx2
-rw-r--r--comphelper/source/property/propstate.cxx4
-rw-r--r--compilerplugins/clang/redundantcast.cxx62
-rw-r--r--compilerplugins/clang/test/cppunitassertequals.cxx6
-rw-r--r--compilerplugins/clang/test/stringcopy.cxx2
-rw-r--r--connectivity/source/commontools/paramwrapper.cxx2
-rw-r--r--connectivity/source/inc/file/fcode.hxx2
-rw-r--r--cppcanvas/source/mtfrenderer/emfplus.cxx9
-rw-r--r--cppuhelper/source/propshlp.cxx8
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx6
-rw-r--r--cui/source/options/optjava.cxx2
-rw-r--r--cui/source/tabpages/border.cxx4
-rw-r--r--cui/source/tabpages/tpline.cxx3
-rw-r--r--cui/source/tabpages/tpshadow.cxx3
-rw-r--r--cui/source/tabpages/tptrans.cxx3
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx2
-rw-r--r--desktop/source/app/app.cxx2
-rw-r--r--drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx2
-rw-r--r--drawinglayer/source/processor2d/contourextractor2d.cxx2
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx4
-rw-r--r--editeng/source/items/svxfont.cxx2
-rw-r--r--editeng/source/rtf/rtfitem.cxx6
-rw-r--r--eventattacher/source/eventattacher.cxx2
-rw-r--r--filter/source/svg/svgreader.cxx2
-rw-r--r--forms/source/component/formcontrolfont.cxx4
-rw-r--r--forms/source/xforms/datatypes.cxx2
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx23
-rw-r--r--framework/source/tabwin/tabwindow.cxx2
-rw-r--r--framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx2
-rw-r--r--framework/source/uiconfiguration/uiconfigurationmanager.cxx2
-rw-r--r--framework/source/uielement/comboboxtoolbarcontroller.cxx4
-rw-r--r--framework/source/uielement/dropdownboxtoolbarcontroller.cxx4
-rw-r--r--framework/source/uielement/togglebuttontoolbarcontroller.cxx2
-rw-r--r--include/com/sun/star/uno/Sequence.hxx3
-rw-r--r--include/i18nlangtag/lang.h50
-rw-r--r--include/sot/stg.hxx2
-rw-r--r--include/tools/inetmsg.hxx2
-rw-r--r--mysqlc/source/mysqlc_resultsetmetadata.cxx2
-rw-r--r--opencl/inc/opencl_device_selection.h10
-rw-r--r--reportdesign/source/ui/report/FixedTextColor.cxx2
-rw-r--r--sal/osl/unx/socket.cxx2
-rw-r--r--sal/qa/rtl/math/test-rtl-math.cxx6
-rw-r--r--sc/source/core/data/docpool.cxx8
-rw-r--r--sc/source/core/data/olinetab.cxx6
-rw-r--r--sc/source/core/data/validat.cxx2
-rw-r--r--sc/source/core/tool/scmatrix.cxx2
-rw-r--r--sc/source/filter/excel/xeescher.cxx2
-rw-r--r--sc/source/filter/html/htmlexp.cxx4
-rw-r--r--sc/source/filter/oox/pivotcachebuffer.cxx4
-rw-r--r--sc/source/filter/oox/viewsettings.cxx2
-rw-r--r--sc/source/ui/cctrl/dpcontrol.cxx4
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx7
-rw-r--r--sc/source/ui/navipi/navipi.cxx2
-rw-r--r--sc/source/ui/unoobj/PivotTableDataProvider.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx6
-rw-r--r--sc/source/ui/vba/vbawsfunction.cxx4
-rw-r--r--sc/source/ui/view/dbfunc.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx8
-rw-r--r--sd/qa/unit/export-tests-ooxml1.cxx2
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx2
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx2
-rw-r--r--sd/source/ui/dlg/sdpreslt.cxx4
-rw-r--r--sd/source/ui/view/drviews7.cxx6
-rw-r--r--sd/source/ui/view/outlnvsh.cxx2
-rw-r--r--sd/source/ui/view/outlview.cxx3
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx2
-rw-r--r--slideshow/source/engine/animationnodes/animationnodefactory.cxx4
-rw-r--r--slideshow/source/engine/opengl/TransitionerImpl.cxx2
-rw-r--r--slideshow/source/engine/transitions/combtransition.cxx8
-rw-r--r--sot/source/sdstor/stg.cxx4
-rw-r--r--sot/source/sdstor/stgavl.cxx2
-rw-r--r--starmath/source/dialog.cxx4
-rw-r--r--starmath/source/unomodel.cxx2
-rw-r--r--store/source/stordata.hxx4
-rw-r--r--store/source/stordir.cxx2
-rw-r--r--store/source/storlckb.cxx2
-rw-r--r--svl/source/filerec/filerec.cxx8
-rw-r--r--svtools/source/brwbox/brwbox2.cxx2
-rw-r--r--svtools/source/filter/DocumentToGraphicRenderer.cxx2
-rw-r--r--svx/source/dialog/imapwnd.cxx2
-rw-r--r--svx/source/dialog/langbox.cxx2
-rw-r--r--svx/source/form/datanavi.cxx2
-rw-r--r--svx/source/gallery2/galtheme.cxx2
-rw-r--r--svx/source/inc/datanavi.hxx2
-rw-r--r--svx/source/styles/CommonStylePreviewRenderer.cxx2
-rw-r--r--svx/source/svdraw/svdogrp.cxx2
-rw-r--r--svx/source/svdraw/svdotxtr.cxx2
-rw-r--r--svx/source/svdraw/svdovirt.cxx2
-rw-r--r--svx/source/svdraw/textchainflow.cxx2
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx4
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx2
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx2
-rw-r--r--svx/source/unogallery/unogalitem.cxx2
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx2
-rw-r--r--sw/source/core/crsr/bookmrk.cxx2
-rw-r--r--sw/source/core/draw/dcontact.cxx2
-rw-r--r--sw/source/core/fields/authfld.cxx2
-rw-r--r--sw/source/core/layout/anchoredobject.cxx2
-rw-r--r--sw/source/core/layout/fly.cxx4
-rw-r--r--sw/source/core/layout/flylay.cxx2
-rw-r--r--sw/source/core/layout/paintfrm.cxx2
-rw-r--r--sw/source/core/text/frmcrsr.cxx2
-rw-r--r--sw/source/core/text/itrform2.cxx2
-rw-r--r--sw/source/core/txtnode/fntcache.cxx2
-rw-r--r--sw/source/filter/html/htmlform.cxx4
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx8
-rw-r--r--sw/source/filter/ww8/docxexport.cxx2
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx2
-rw-r--r--sw/source/ui/frmdlg/column.cxx2
-rw-r--r--sw/source/ui/misc/pgfnote.cxx2
-rw-r--r--sw/source/ui/vba/vbacolumn.cxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx4
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx2
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx4
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx6
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx8
-rw-r--r--toolkit/source/awt/vclxwindows.cxx12
-rw-r--r--tools/source/inet/inetmime.cxx2
-rw-r--r--ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx2
-rw-r--r--ucbhelper/source/provider/providerhelper.cxx5
-rw-r--r--ucbhelper/source/provider/resultset.cxx2
-rw-r--r--vcl/opengl/LineRenderUtils.cxx12
-rw-r--r--vcl/opengl/RenderList.cxx16
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/control/spinfld.cxx2
-rw-r--r--vcl/source/gdi/dibtools.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx4
-rw-r--r--vcl/source/window/dockmgr.cxx4
-rw-r--r--vcl/source/window/dockwin.cxx4
-rw-r--r--vcl/source/window/floatwin.cxx4
-rw-r--r--vcl/source/window/printdlg.cxx2
-rw-r--r--vcl/source/window/status.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx2
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx4
-rw-r--r--vcl/workben/vcldemo.cxx6
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx6
-rw-r--r--writerfilter/source/dmapper/StyleSheetTable.cxx2
-rw-r--r--writerfilter/source/rtftok/rtfsdrimport.cxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx2
154 files changed, 355 insertions, 308 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index d54141ffe7ab..b18a1bb6b664 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -249,8 +249,7 @@ void ModulWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Rec
void ModulWindow::Resize()
{
- m_aXEditorWindow->SetPosSizePixel( Point( 0, 0 ),
- Size( GetOutputSizePixel() ) );
+ m_aXEditorWindow->SetPosSizePixel( Point( 0, 0 ), GetOutputSizePixel() );
}
void ModulWindow::CheckCompileBasic()
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 65c8e3f6c4e6..f6c87116dc68 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -121,19 +121,19 @@ static SbxDataType GetSuffixType( sal_Unicode c )
switch (c)
{
case '%':
- return SbxDataType(SbxINTEGER);
+ return SbxINTEGER;
case '&':
- return SbxDataType(SbxLONG);
+ return SbxLONG;
case '!':
- return SbxDataType(SbxSINGLE);
+ return SbxSINGLE;
case '#':
- return SbxDataType(SbxDOUBLE);
+ return SbxDOUBLE;
case '@':
- return SbxDataType(SbxCURRENCY);
+ return SbxCURRENCY;
case '$':
- return SbxDataType(SbxSTRING);
+ return SbxSTRING;
default:
- return SbxDataType(SbxVARIANT);
+ return SbxVARIANT;
}
}
diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx
index 215c2a5a7835..69d42a664aef 100644
--- a/basic/source/runtime/inputbox.cxx
+++ b/basic/source/runtime/inputbox.cxx
@@ -91,9 +91,9 @@ void SvRTLInputBox::InitButtons( const Size& rDlgSize )
aOk->SetSizePixel( LogicToPixel( Size( 45, 15) ));
aCancel->SetSizePixel( LogicToPixel( Size( 45, 15) ));
Point aPos( rDlgSize.Width()-45-10, 5 );
- aOk->SetPosPixel( LogicToPixel( Point(aPos) ));
+ aOk->SetPosPixel( LogicToPixel( aPos ));
aPos.Y() += 16;
- aCancel->SetPosPixel( LogicToPixel( Point(aPos) ));
+ aCancel->SetPosPixel( LogicToPixel( aPos ));
aOk->SetClickHdl(LINK(this,SvRTLInputBox, OkHdl));
aCancel->SetClickHdl(LINK(this,SvRTLInputBox,CancelHdl));
}
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index 9e6a617948b0..0f151a44a615 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -216,7 +216,7 @@ WrappedConstantErrorLowProperty::WrappedConstantErrorLowProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
: WrappedStatisticProperty< double >( "ConstantErrorLow"
- , uno::Any( double(0.0) ), spChart2ModelContact, ePropertyType )
+ , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType )
{
}
@@ -266,7 +266,7 @@ WrappedConstantErrorHighProperty::WrappedConstantErrorHighProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
: WrappedStatisticProperty< double >( "ConstantErrorHigh"
- , uno::Any( double(0.0) ), spChart2ModelContact, ePropertyType )
+ , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType )
{
}
@@ -450,7 +450,7 @@ WrappedPercentageErrorProperty::WrappedPercentageErrorProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
: WrappedStatisticProperty< double >( "PercentageError"
- , uno::Any( double(0.0) ), spChart2ModelContact, ePropertyType )
+ , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType )
{
}
@@ -500,7 +500,7 @@ WrappedErrorMarginProperty::WrappedErrorMarginProperty(
std::shared_ptr< Chart2ModelContact > spChart2ModelContact,
tSeriesOrDiagramPropertyType ePropertyType )
: WrappedStatisticProperty< double >( "ErrorMargin"
- , uno::Any( double(0.0) ), spChart2ModelContact, ePropertyType )
+ , uno::Any( 0.0 ), spChart2ModelContact, ePropertyType )
{
}
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
index 77e0d0c660ba..d414f89eedaa 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx
@@ -182,9 +182,9 @@ void ThreeD_SceneGeometry_TabPage::applyAnglesToModel()
if( !m_pMFZRotation->IsEmptyFieldValue() )
m_nZRotation = m_pMFZRotation->GetValue();
- fXAngle = double(m_nXRotation)/double(pow(10.0,m_pMFXRotation->GetDecimalDigits()));
- fYAngle = double(-1.0*m_nYRotation)/double(pow(10.0,m_pMFYRotation->GetDecimalDigits()));
- fZAngle = double(-1.0*m_nZRotation)/double(pow(10.0,m_pMFZRotation->GetDecimalDigits()));
+ fXAngle = double(m_nXRotation)/pow(10.0,m_pMFXRotation->GetDecimalDigits());
+ fYAngle = double(-1.0*m_nYRotation)/pow(10.0,m_pMFYRotation->GetDecimalDigits());
+ fZAngle = double(-1.0*m_nZRotation)/pow(10.0,m_pMFZRotation->GetDecimalDigits());
fXAngle = basegfx::deg2rad(fXAngle);
fYAngle = basegfx::deg2rad(fYAngle);
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx
index 3e9fd051127e..b65e990841da 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -345,7 +345,7 @@ void ImplObjectHierarchy::createAxesTree(
{
//main grid
rContainer.push_back(
- ObjectIdentifier( ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartModel ) ) ) );
+ ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartModel ) ) );
}
Sequence< Reference< beans::XPropertySet > > aSubGrids( xAxis->getSubGridProperties() );
@@ -357,7 +357,7 @@ void ImplObjectHierarchy::createAxesTree(
{
//sub grid
rContainer.push_back(
- ObjectIdentifier( ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartModel, nSubGrid ) ) ) );
+ ObjectIdentifier( ObjectIdentifier::createClassifiedIdentifierForGrid( xAxis, xChartModel, nSubGrid ) ) );
}
}
}
diff --git a/chart2/source/model/main/BaseCoordinateSystem.cxx b/chart2/source/model/main/BaseCoordinateSystem.cxx
index 38694dcdf0e2..aa45934c21d5 100644
--- a/chart2/source/model/main/BaseCoordinateSystem.cxx
+++ b/chart2/source/model/main/BaseCoordinateSystem.cxx
@@ -149,7 +149,7 @@ BaseCoordinateSystem::BaseCoordinateSystem(
m_aOrigin.realloc( m_nDimensionCount );
for( sal_Int32 i = 0; i < m_nDimensionCount; ++i )
- m_aOrigin[ i ] <<= double( 0.0 );
+ m_aOrigin[ i ] <<= 0.0;
setFastPropertyValue_NoBroadcast( PROP_COORDINATESYSTEM_SWAPXANDYAXIS, uno::Any( false ));
}
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 057f957a46ad..c95c558cb921 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -1836,10 +1836,9 @@ void VCartesianAxis::createShapes()
AxisLabelAlignment aLabelAlign = m_aAxisProperties.maLabelAlignment;
get2DAxisMainLine(aStart, aEnd, aLabelAlign, fExtraLineCrossesOtherAxis);
m_aAxisProperties.maLabelAlignment = aLabelAlign;
- drawing::PointSequenceSequence aPoints{std::initializer_list<uno::Sequence<awt::Point>>
- {std::initializer_list<awt::Point>{
+ drawing::PointSequenceSequence aPoints{{
{static_cast<sal_Int32>(aStart.getX()), static_cast<sal_Int32>(aStart.getY())},
- {static_cast<sal_Int32>(aEnd.getX()), static_cast<sal_Int32>(aEnd.getY())} }}};
+ {static_cast<sal_Int32>(aEnd.getX()), static_cast<sal_Int32>(aEnd.getY())} }};
m_pShapeFactory->createLine2D(
m_xGroupShape_Shapes, aPoints, &m_aAxisProperties.m_aLineProperties );
}
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 7475767977c6..7cb1192aa3ff 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -3393,7 +3393,7 @@ void ChartView::createShapes3D()
if( pWindow->GetSizePixel().Width() == 0 || pWindow->GetSizePixel().Height() == 0 )
{
awt::Size aPageSize = mrChartModel.getVisualAreaSize( embed::Aspects::MSOLE_CONTENT );
- Size aSize = pWindow->LogicToPixel( Size(aPageSize.Width,aPageSize.Height), MapUnit(MapUnit::Map100thMM) );
+ Size aSize = pWindow->LogicToPixel( Size(aPageSize.Width,aPageSize.Height), MapUnit::Map100thMM );
pWindow->SetSizePixel(aSize);
}
pWindow->Show();
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 59fafeddfb3d..67a19b18a3f2 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -796,7 +796,7 @@ DummyText::DummyText(const OUString& rText, const tNameSequence& rNames,
pDevice->DrawText(Point(0, 0), rText);
bmpWidth = aRect.Right() - aRect.Left();
bmpHeight = aRect.Bottom() - aRect.Top();
- maBitmap = BitmapEx(pDevice->GetBitmapEx(aRect.TopLeft(), Size(bmpWidth, bmpHeight)));
+ maBitmap = pDevice->GetBitmapEx(aRect.TopLeft(), Size(bmpWidth, bmpHeight));
rCache.insertBitmap(aKey, maBitmap);
}
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index e9341410a21d..0807377bb301 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -207,7 +207,7 @@ void AttacherAllListener_Impl::convertToEventReturn( Any & rRet, const Type & rR
break;
case TypeClass_FLOAT: rRet <<= float(0); break;
- case TypeClass_DOUBLE: rRet <<= double(0.0); break;
+ case TypeClass_DOUBLE: rRet <<= 0.0; break;
case TypeClass_BYTE: rRet <<= sal_uInt8(0); break;
case TypeClass_SHORT: rRet <<= sal_Int16( 0 ); break;
case TypeClass_LONG: rRet <<= sal_Int32( 0 ); break;
diff --git a/comphelper/source/property/propstate.cxx b/comphelper/source/property/propstate.cxx
index e0830099b896..366b881cf1c6 100644
--- a/comphelper/source/property/propstate.cxx
+++ b/comphelper/source/property/propstate.cxx
@@ -53,12 +53,12 @@ namespace comphelper
css::uno::Sequence<css::uno::Type> OPropertyStateHelper::getTypes()
{
- return css::uno::Sequence<css::uno::Type>({
+ return {
cppu::UnoType<css::beans::XPropertySet>::get(),
cppu::UnoType<css::beans::XMultiPropertySet>::get(),
cppu::UnoType<css::beans::XFastPropertySet>::get(),
cppu::UnoType<css::beans::XPropertySetOption>::get(),
- cppu::UnoType<css::beans::XPropertyState>::get()});
+ cppu::UnoType<css::beans::XPropertyState>::get()};
}
OPropertyStateHelper::OPropertyStateHelper(
diff --git a/compilerplugins/clang/redundantcast.cxx b/compilerplugins/clang/redundantcast.cxx
index 3c38dd3ef495..148cdbead9be 100644
--- a/compilerplugins/clang/redundantcast.cxx
+++ b/compilerplugins/clang/redundantcast.cxx
@@ -87,6 +87,8 @@ public:
bool VisitCXXConstCastExpr(CXXConstCastExpr const * expr);
+ bool VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const * expr);
+
bool VisitCallExpr(CallExpr const * expr);
bool VisitCXXDeleteExpr(CXXDeleteExpr const * expr);
@@ -434,6 +436,66 @@ bool RedundantCast::VisitCXXConstCastExpr(CXXConstCastExpr const * expr) {
return true;
}
+bool RedundantCast::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const * expr) {
+ if (ignoreLocation(expr)) {
+ return true;
+ }
+ // A bit of a rabbit hole here, these expressions look like
+ // CPPUNIT_ASSERT( bool(aVec.find(p1.get()) == aVec.end()) )
+ // If I remove the bool, then another plugin wants me to change it to CPPUNIT_ASSERT_EQUAL,
+ // but that fails because CppUnit can't do "std::ostream << iterator".
+ StringRef aFileName = compiler.getSourceManager().getFilename(compiler.getSourceManager().getSpellingLoc(expr->getLocStart()));
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/o3tl/qa/"))
+ return true;
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/sfx2/qa/"))
+ return true;
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/postprocess/qa/"))
+ return true;
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/sc/qa/"))
+ return true;
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/cppu/qa/"))
+ return true;
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/vcl/qa/"))
+ return true;
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/cppuhelper/qa/"))
+ return true;
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/comphelper/qa/"))
+ return true;
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/connectivity/qa/"))
+ return true;
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/sal/qa/"))
+ return true;
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/salhelper/qa/"))
+ return true;
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/sw/qa/"))
+ return true;
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/svl/qa/"))
+ return true;
+ // the array-of-struct initialiser here makes clang unhappy if I remove all of the "SchemeInfo" names
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/tools/source/fsys/urlobj.cxx"))
+ return true;
+ // 2 structs with compiled-generated constructors where I cannot remove the cast even though the cast is a NoOp
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/tools/source/inet/inetmime.cxx"))
+ return true;
+ // some explicit use of std::initializer_list
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/svx/source/sidebar/area/AreaPropertyPanel.cxx"))
+ return true;
+ if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/svx/source/tbxctrls/fillctrl.cxx"))
+ return true;
+
+ auto const t1 = expr->getTypeAsWritten();
+ auto const t2 = compat::getSubExprAsWritten(expr)->getType();
+ if (t1 != t2)
+ return true;
+ if (!isOkToRemoveArithmeticCast(t1, t2, expr->getSubExpr()))
+ return true;
+ report(
+ DiagnosticsEngine::Warning,
+ "redundant functional cast from/to %0", expr->getExprLoc())
+ << t1 << expr->getSourceRange();
+ return true;
+}
+
bool RedundantCast::VisitCallExpr(CallExpr const * expr) {
if (ignoreLocation(expr)) {
return true;
diff --git a/compilerplugins/clang/test/cppunitassertequals.cxx b/compilerplugins/clang/test/cppunitassertequals.cxx
index 239de58853b3..f0b03fa7ffb4 100644
--- a/compilerplugins/clang/test/cppunitassertequals.cxx
+++ b/compilerplugins/clang/test/cppunitassertequals.cxx
@@ -48,9 +48,9 @@ void test(bool b1, bool b2, OUString const & s1, OUString const & s2, T t) {
CPPUNIT_ASSERT(t.operator ==(t));
// There might even be good reasons(?) not to warn inside explicit casts:
- CPPUNIT_ASSERT(bool(b1 && b2));
- CPPUNIT_ASSERT(bool(b1 == b2));
- CPPUNIT_ASSERT(bool(s1 == s2));
+ CPPUNIT_ASSERT(bool(b1 && b2)); // expected-error {{redundant functional cast from/to 'bool' [loplugin:redundantcast]}}
+ CPPUNIT_ASSERT(bool(b1 == b2)); // expected-error {{redundant functional cast from/to 'bool' [loplugin:redundantcast]}}
+ CPPUNIT_ASSERT(bool(s1 == s2)); // expected-error {{redundant functional cast from/to 'bool' [loplugin:redundantcast]}}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/compilerplugins/clang/test/stringcopy.cxx b/compilerplugins/clang/test/stringcopy.cxx
index c801b7096f74..f571f914b20e 100644
--- a/compilerplugins/clang/test/stringcopy.cxx
+++ b/compilerplugins/clang/test/stringcopy.cxx
@@ -13,7 +13,7 @@
int main() {
OUString s;
- (void) OUString(s); // expected-error {{redundant copy construction from 'rtl::OUString' to 'rtl::OUString' [loplugin:stringcopy]}}
+ (void) OUString(s); // expected-error {{redundant copy construction from 'rtl::OUString' to 'rtl::OUString' [loplugin:stringcopy]}} expected-error {{redundant functional cast from/to 'rtl::OUString' [loplugin:redundantcast]}}
using T1 = OUString;
(void) T1(s); // expected-error {{redundant copy construction from 'rtl::OUString' to 'T1' (aka 'rtl::OUString') [loplugin:stringcopy]}}
using T2 = OUString const;
diff --git a/connectivity/source/commontools/paramwrapper.cxx b/connectivity/source/commontools/paramwrapper.cxx
index 817de72d9365..5e115fd5b3e0 100644
--- a/connectivity/source/commontools/paramwrapper.cxx
+++ b/connectivity/source/commontools/paramwrapper.cxx
@@ -221,7 +221,7 @@ namespace param
aExceptionWrapper.Context = e.Context;
aExceptionWrapper.Message = e.Message;
aExceptionWrapper.TargetException <<= e;
- throw WrappedTargetException( aExceptionWrapper );
+ throw aExceptionWrapper;
}
}
else
diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx
index fe66e3c32710..8ac3676b26d0 100644
--- a/connectivity/source/inc/file/fcode.hxx
+++ b/connectivity/source/inc/file/fcode.hxx
@@ -308,7 +308,7 @@ namespace connectivity
inline bool OOperand::isValid() const
{
- return getValue().getDouble() != double(0.0);
+ return getValue().getDouble() != 0.0;
}
// Operator
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index a96900d48872..c63f85928182 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -315,7 +315,7 @@ namespace cppcanvas
rState.fillColor = COLOR(brushIndexOrColor);
- pPolyAction = ActionSharedPtr ( internal::PolyPolyActionFactory::createPolyPolyAction( localPolygon, rParms.mrCanvas, rState ) );
+ pPolyAction = internal::PolyPolyActionFactory::createPolyPolyAction( localPolygon, rParms.mrCanvas, rState );
} else {
rState.isFillColorSet = true;
@@ -369,7 +369,7 @@ namespace cppcanvas
fillColor = brush->secondColor;
}
rState.fillColor = vcl::unotools::colorToDoubleSequence(fillColor, rCanvas->getUNOCanvas()->getDevice()->getDeviceColorSpace());
- pPolyAction = ActionSharedPtr ( internal::PolyPolyActionFactory::createPolyPolyAction( localPolygon, rParms.mrCanvas, rState ) );
+ pPolyAction = internal::PolyPolyActionFactory::createPolyPolyAction( localPolygon, rParms.mrCanvas, rState );
}
else if (brush->type == BrushTypeTextureFill)
{
@@ -532,11 +532,10 @@ namespace cppcanvas
aTextureTransformation );
if( aTexture.Gradient.is() )
- pPolyAction =
- ActionSharedPtr ( internal::PolyPolyActionFactory::createPolyPolyAction( localPolygon,
+ pPolyAction = internal::PolyPolyActionFactory::createPolyPolyAction( localPolygon,
rParms.mrCanvas,
rState,
- aTexture ) );
+ aTexture );
}
}
diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx
index 8cc395a847f9..14a1cb45a077 100644
--- a/cppuhelper/source/propshlp.cxx
+++ b/cppuhelper/source/propshlp.cxx
@@ -228,10 +228,10 @@ Any OPropertySetHelper2::queryInterface( const css::uno::Type & rType )
*/
css::uno::Sequence< css::uno::Type > OPropertySetHelper::getTypes()
{
- return css::uno::Sequence<css::uno::Type>({
+ return {
UnoType<css::beans::XPropertySet>::get(),
UnoType<css::beans::XMultiPropertySet>::get(),
- UnoType<css::beans::XFastPropertySet>::get()});
+ UnoType<css::beans::XFastPropertySet>::get()};
}
// ComponentHelper
@@ -530,12 +530,12 @@ void OPropertySetHelper::setFastPropertyValue( sal_Int32 nHandle, const Any& rVa
catch (const css::uno::RuntimeException& ) { throw; /* allowed to leave */ }
catch (const css::uno::Exception& e )
{
- // not allowed to leave this meathod
+ // not allowed to leave this method
css::lang::WrappedTargetException aWrap;
aWrap.Context = static_cast< css::beans::XPropertySet* >( this );
aWrap.TargetException <<= e;
- throw css::lang::WrappedTargetException( aWrap );
+ throw aWrap;
}
// release guard to fire events
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index dc33da086b0b..9ef0d6f6261b 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -1003,13 +1003,13 @@ namespace svx
aTmp <<= aActiveDics;
aLngCfg.SetProperty( UPH_ACTIVE_CONVERSION_DICTIONARIES, aTmp );
- aTmp <<= bool( m_pIgnorepostCB->IsChecked() );
+ aTmp <<= m_pIgnorepostCB->IsChecked();
aLngCfg.SetProperty( UPH_IS_IGNORE_POST_POSITIONAL_WORD, aTmp );
- aTmp <<= bool( m_pShowrecentlyfirstCB->IsChecked() );
+ aTmp <<= m_pShowrecentlyfirstCB->IsChecked();
aLngCfg.SetProperty( UPH_IS_SHOW_ENTRIES_RECENTLY_USED_FIRST, aTmp );
- aTmp <<= bool( m_pAutoreplaceuniqueCB->IsChecked() );
+ aTmp <<= m_pAutoreplaceuniqueCB->IsChecked();
aLngCfg.SetProperty( UPH_IS_AUTO_REPLACE_UNIQUE_ENTRIES, aTmp );
EndDialog( RET_OK );
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 0c5d3877bf20..c0eb29c13eee 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -650,7 +650,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* /*rCoreSet*/ )
eErr = jfw_getEnabled( &bEnabled );
DBG_ASSERT( JFW_E_NONE == eErr,
"SvxJavaOptionsPage::FillItemSet(): error in jfw_getEnabled" ); (void)eErr;
- if ( bool(bEnabled) != m_pJavaEnableCB->IsChecked() )
+ if ( bEnabled != m_pJavaEnableCB->IsChecked() )
{
eErr = jfw_setEnabled( m_pJavaEnableCB->IsChecked() );
DBG_ASSERT( JFW_E_NONE == eErr,
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 606e66309205..eebd2eb35a8c 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -918,7 +918,7 @@ IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthHdl_Impl, Edit&, void)
m_pLbLineStyle->SetWidth( nVal );
m_pFrameSel->SetStyleToSelection( nVal,
- SvxBorderLineStyle( m_pLbLineStyle->GetSelectEntryStyle() ) );
+ m_pLbLineStyle->GetSelectEntryStyle() );
}
@@ -931,7 +931,7 @@ IMPL_LINK( SvxBorderTabPage, SelStyleHdl_Impl, ListBox&, rLb, void )
m_pLineWidthMF->GetDecimalDigits( ),
m_pLineWidthMF->GetUnit(), MapUnit::MapTwip ));
m_pFrameSel->SetStyleToSelection ( nVal,
- SvxBorderLineStyle( m_pLbLineStyle->GetSelectEntryStyle() ) );
+ m_pLbLineStyle->GetSelectEntryStyle() );
}
}
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 52830e93919f..319442e2cb1a 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -1657,9 +1657,8 @@ void SvxLineTabPage::ChangeEndHdl_Impl( void * p )
IMPL_LINK_NOARG(SvxLineTabPage, ChangeTransparentHdl_Impl, Edit&, void)
{
sal_uInt16 nVal = (sal_uInt16)m_pMtrTransparent->GetValue();
- XLineTransparenceItem aItem( nVal );
- m_rXLSet.Put( XLineTransparenceItem( aItem ) );
+ m_rXLSet.Put( XLineTransparenceItem( nVal ) );
FillXLSet_Impl();
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index 999cb1eb0eee..76ae22b242b9 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -478,8 +478,7 @@ IMPL_LINK_NOARG(SvxShadowTabPage, ModifyShadowHdl_Impl, Edit&, void)
m_rXFSet.Put( XFillColorItem( OUString(), m_pLbShadowColor->GetSelectEntryColor() ) );
sal_uInt16 nVal = (sal_uInt16)m_pMtrTransparent->GetValue();
- XFillTransparenceItem aItem( nVal );
- m_rXFSet.Put( XFillTransparenceItem( aItem ) );
+ m_rXFSet.Put( XFillTransparenceItem( nVal ) );
// shadow removal
sal_Int32 nX = 0L, nY = 0L;
diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx
index 5b1ce71a644a..6a0cee181285 100644
--- a/cui/source/tabpages/tptrans.cxx
+++ b/cui/source/tabpages/tptrans.cxx
@@ -133,8 +133,7 @@ void SvxTransparenceTabPage::ActivateLinear(bool bActivate)
IMPL_LINK_NOARG(SvxTransparenceTabPage, ModifyTransparentHdl_Impl, Edit&, void)
{
sal_uInt16 nPos = (sal_uInt16)m_pMtrTransparent->GetValue();
- XFillTransparenceItem aItem(nPos);
- rXFSet.Put(XFillTransparenceItem(aItem));
+ rXFSet.Put(XFillTransparenceItem(nPos));
// preview
InvalidatePreview();
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 95d417b61e8d..0b0a97569cc4 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1417,7 +1417,7 @@ OUString SAL_CALL OSingleSelectQueryComposer::getQueryWithSubstitution( )
{
SQLException aError;
if ( !pStatementNode->parseNodeToExecutableStatement( sSqlStatement, m_xConnection, m_aSqlParser, &aError ) )
- throw SQLException( aError );
+ throw aError;
}
return sSqlStatement;
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 5ec52681c5a7..6af740f15a1a 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1577,7 +1577,7 @@ int Desktop::Main()
}
else
{
- SAL_WARN("desktop.app", "cannot open pidfile " << pidfile.getURL() << osl::FileBase::RC(rc));
+ SAL_WARN("desktop.app", "cannot open pidfile " << pidfile.getURL() << rc);
}
}
else
diff --git a/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx b/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx
index 994a7ea391ec..40b5d3ef531c 100644
--- a/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx
+++ b/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx
@@ -85,7 +85,7 @@ namespace drawinglayer
if(bFilled)
{
xReference = new PolyPolygonColorPrimitive2D(
- basegfx::B2DPolyPolygon(aScaledOutline),
+ aScaledOutline,
basegfx::BColor(0.0, 0.0, 0.0));
}
else
diff --git a/drawinglayer/source/processor2d/contourextractor2d.cxx b/drawinglayer/source/processor2d/contourextractor2d.cxx
index c9d9f52d9dfa..6162994316dd 100644
--- a/drawinglayer/source/processor2d/contourextractor2d.cxx
+++ b/drawinglayer/source/processor2d/contourextractor2d.cxx
@@ -116,7 +116,7 @@ namespace drawinglayer
const primitive2d::MaskPrimitive2D& rMaskCandidate(static_cast< const primitive2d::MaskPrimitive2D& >(rCandidate));
basegfx::B2DPolyPolygon aMask(rMaskCandidate.getMask());
aMask.transform(getViewInformation2D().getObjectTransformation());
- maExtractedContour.push_back(basegfx::B2DPolyPolygon(aMask));
+ maExtractedContour.push_back(aMask);
break;
}
case PRIMITIVE2D_ID_TRANSFORMPRIMITIVE2D :
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 8bd8e8857e7f..f5a8745c4c13 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -262,7 +262,7 @@ namespace drawinglayer
if(rTextCandidate.getFontAttribute().getRTL())
{
- ComplexTextLayoutFlags nRTLLayoutMode(nOldLayoutMode & ~ComplexTextLayoutFlags(ComplexTextLayoutFlags::BiDiStrong));
+ ComplexTextLayoutFlags nRTLLayoutMode(nOldLayoutMode & ~ComplexTextLayoutFlags::BiDiStrong);
nRTLLayoutMode |= ComplexTextLayoutFlags::BiDiRtl|ComplexTextLayoutFlags::TextOriginLeft;
mpOutputDevice->SetLayoutMode(nRTLLayoutMode);
}
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 8bdc5101ab99..530b6f56f50e 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3588,7 +3588,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
short _nEsc = aTmpFont.GetEscapement();
if( _nEsc )
{
- long nShift = ((_nEsc*long(aTmpFont.GetFontSize().Height()))/ 100L);
+ long nShift = (_nEsc * aTmpFont.GetFontSize().Height()) / 100L;
if( !IsVertical() )
aRedLineTmpPos.Y() -= nShift;
else
@@ -4357,7 +4357,7 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_Int32 nPara,
{
// Bidi checking necessary
// Don't use BIDI_STRONG, VCL must do some checks.
- nLayoutMode &= ~ComplexTextLayoutFlags( ComplexTextLayoutFlags::BiDiStrong );
+ nLayoutMode &= ~ComplexTextLayoutFlags::BiDiStrong;
if ( bR2L )
nLayoutMode |= ComplexTextLayoutFlags::BiDiRtl|ComplexTextLayoutFlags::TextOriginLeft;
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 1cd3d491293f..eede74c3d3bf 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -516,7 +516,7 @@ void SvxFont::DrawPrev( OutputDevice *pOut, Printer* pPrinter,
else
nTmpEsc = nEsc;
Size aSize = ( this->GetFontSize() );
- aPos.Y() -= ( ( nTmpEsc * long( aSize.Height() ) ) / 100L );
+ aPos.Y() -= ( nTmpEsc * aSize.Height() ) / 100L;
}
Font aOldFont( ChgPhysFont( pOut ) );
Font aOldPrnFont( ChgPhysFont( pPrinter ) );
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index e891184b8c14..fa8fed89bfdd 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -289,8 +289,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
if( !pAkt )
break;
- pAkt->nStyleNo = sal_uInt16( nStyleNo );
-
+ pAkt->nStyleNo = nStyleNo;
}
break;
@@ -439,8 +438,7 @@ void SvxRTFParser::ReadAttr( int nToken, SfxItemSet* pSet )
if( IsCalcValue() )
CalcValue();
- nTokenValue = short( 100L * aLSpace.GetLineHeight()
- / long( nTokenValue ) );
+ nTokenValue = short( 100L * aLSpace.GetLineHeight() / nTokenValue );
if( nTokenValue > 200 ) // Data value for PropLnSp
nTokenValue = 200; // is one BYTE !!!
diff --git a/eventattacher/source/eventattacher.cxx b/eventattacher/source/eventattacher.cxx
index 9621492b49c8..654cce006837 100644
--- a/eventattacher/source/eventattacher.cxx
+++ b/eventattacher/source/eventattacher.cxx
@@ -469,7 +469,7 @@ void FilterAllListenerImpl::convertToEventReturn( Any & rRet, const Type & rRetT
break;
case TypeClass_FLOAT: rRet <<= float(0); break;
- case TypeClass_DOUBLE: rRet <<= double(0.0); break;
+ case TypeClass_DOUBLE: rRet <<= 0.0; break;
case TypeClass_BYTE: rRet <<= sal_uInt8( 0 ); break;
case TypeClass_SHORT: rRet <<= sal_Int16( 0 ); break;
case TypeClass_LONG: rRet <<= sal_Int32( 0 ); break;
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index dad573e20adb..3544673a88d2 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -1466,7 +1466,7 @@ struct ShapeWritingVisitor
xUnoAttrs,
xElem,
sStyleId,
- basegfx::B2DPolyPolygon(aPoly));
+ aPoly);
}
break;
diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx
index 30029e9cd893..16195bf85532 100644
--- a/forms/source/component/formcontrolfont.cxx
+++ b/forms/source/component/formcontrolfont.cxx
@@ -294,7 +294,7 @@ namespace frm
break;
case PROPERTY_ID_FONT_CHARWIDTH:
- bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, float( m_aFont.CharacterWidth ) );
+ bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_aFont.CharacterWidth );
break;
case PROPERTY_ID_FONT_KERNING:
@@ -302,7 +302,7 @@ namespace frm
break;
case PROPERTY_ID_FONT_ORIENTATION:
- bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, float( m_aFont.Orientation ) );
+ bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_aFont.Orientation );
break;
case PROPERTY_ID_FONT_PITCH:
diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx
index 2c1c6d2029b4..3bd0fb0537a6 100644
--- a/forms/source/xforms/datatypes.cxx
+++ b/forms/source/xforms/datatypes.cxx
@@ -250,7 +250,7 @@ namespace xforms
IllegalArgumentException aException;
aException.Message = sErrorMessage;
aException.Context = *this;
- throw IllegalArgumentException( aException );
+ throw aException;
}
return true;
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index a897906009fb..9ef5503210fa 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -182,7 +182,7 @@ void ToolbarLayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangl
{
// Left docking area window
// We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority!
- sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight ));
+ sal_Int32 nHeight = std::max<sal_Int32>( 0, nLeftRightDockingAreaHeight );
xLeftDockAreaWindow->setPosSize( 0, rBorderSpace.Y, rBorderSpace.X, nHeight, awt::PosSize::POSSIZE );
xLeftDockAreaWindow->setVisible( true );
@@ -191,8 +191,8 @@ void ToolbarLayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangl
{
// Right docking area window
// We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority!
- sal_Int32 nLeftPos = std::max( sal_Int32( 0 ), sal_Int32( aContainerClientSize.Width - rBorderSpace.Width ));
- sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight ));
+ sal_Int32 nLeftPos = std::max<sal_Int32>( 0, aContainerClientSize.Width - rBorderSpace.Width );
+ sal_Int32 nHeight = std::max<sal_Int32>( 0, nLeftRightDockingAreaHeight );
sal_Int32 nWidth = ( nLeftPos == 0 ) ? 0 : rBorderSpace.Width;
xRightDockAreaWindow->setPosSize( nLeftPos, rBorderSpace.Y, nWidth, nHeight, awt::PosSize::POSSIZE );
@@ -2921,12 +2921,12 @@ void ToolbarLayoutManager::implts_calcDockingPosSize(
}
else
{
- sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ), sal_Int32( nMaxLeftRightDockAreaSize ));
- sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize )));
+ sal_Int32 nMaxDockingAreaHeight = std::max<sal_Int32>( 0, nMaxLeftRightDockAreaSize );
+ sal_Int32 nPosY( std::max<sal_Int32>( aTrackingRect.Top(), nTopDockingAreaSize ));
if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight ))
nPosY = std::min( nPosY,
- std::max( sal_Int32( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() )),
- sal_Int32( nTopDockingAreaSize )));
+ std::max<sal_Int32>( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() ),
+ nTopDockingAreaSize ));
sal_Int32 nSize = std::min( nMaxDockingAreaHeight, static_cast<sal_Int32>(aTrackingRect.getHeight()) );
sal_Int32 nDockWidth = std::max( static_cast<sal_Int32>(aDockingAreaRect.getWidth()), sal_Int32( 0 ));
@@ -3051,14 +3051,13 @@ framework::ToolbarLayoutManager::DockingOperation ToolbarLayoutManager::implts_d
}
else
{
- sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ),
- sal_Int32( nMaxLeftRightDockAreaSize ));
+ sal_Int32 nMaxDockingAreaHeight = std::max<sal_Int32>( 0, nMaxLeftRightDockAreaSize );
- sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize )));
+ sal_Int32 nPosY( std::max<sal_Int32>( aTrackingRect.Top(), nTopDockingAreaSize ));
if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight ))
nPosY = std::min( nPosY,
- std::max( sal_Int32( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() )),
- sal_Int32( nTopDockingAreaSize )));
+ std::max<sal_Int32>( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() ),
+ nTopDockingAreaSize ));
sal_Int32 nSize = std::min( nMaxDockingAreaHeight, static_cast<sal_Int32>(aTrackingRect.getHeight()) );
diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx
index d249ec2fb45b..56007e6ed91e 100644
--- a/framework/source/tabwin/tabwindow.cxx
+++ b/framework/source/tabwin/tabwindow.cxx
@@ -600,7 +600,7 @@ void SAL_CALL TabWindow::removeTab( ::sal_Int32 ID )
implts_SendNotification( NOTIFY_REMOVED, ID );
// activate new tab if old tab was active!
- nPos = pTabControl->GetPagePos( sal_uInt16( nCurTabId ));
+ nPos = pTabControl->GetPagePos( nCurTabId );
if ( nPos != TAB_PAGE_NOTFOUND && nCurTabId != ID )
activateTab( nCurTabId );
}
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index a26eca969db6..a9946b55fd3d 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -1100,7 +1100,7 @@ Sequence< Sequence< PropertyValue > > SAL_CALL ModuleUIConfigurationManager::get
if ( ElementType == css::ui::UIElementType::UNKNOWN )
{
for ( sal_Int16 i = 0; i < css::ui::UIElementType::COUNT; i++ )
- impl_fillSequenceWithElementTypeInfo( aUIElementInfoCollection, sal_Int16( i ) );
+ impl_fillSequenceWithElementTypeInfo( aUIElementInfoCollection, i );
}
else
impl_fillSequenceWithElementTypeInfo( aUIElementInfoCollection, ElementType );
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index d38377387376..c8714f2d4275 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -860,7 +860,7 @@ Sequence< Sequence< PropertyValue > > SAL_CALL UIConfigurationManager::getUIElem
if ( ElementType == css::ui::UIElementType::UNKNOWN )
{
for ( sal_Int16 i = 0; i < css::ui::UIElementType::COUNT; i++ )
- impl_fillSequenceWithElementTypeInfo( aUIElementInfoCollection, sal_Int16( i ) );
+ impl_fillSequenceWithElementTypeInfo( aUIElementInfoCollection, i );
}
else
impl_fillSequenceWithElementTypeInfo( aUIElementInfoCollection, ElementType );
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index d6d42b1fb75a..b8c671edb931 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -294,7 +294,7 @@ void ComboboxToolbarController::executeControlCommand( const css::frame::Control
if ( rControlCommand.Arguments[i].Value >>= nTmpPos )
{
if (( nTmpPos >= 0 ) &&
- ( nTmpPos < sal_Int32( m_pComboBox->GetEntryCount() )))
+ ( nTmpPos < m_pComboBox->GetEntryCount() ))
nPos = nTmpPos;
}
}
@@ -313,7 +313,7 @@ void ComboboxToolbarController::executeControlCommand( const css::frame::Control
sal_Int32 nPos( -1 );
if ( rControlCommand.Arguments[i].Value >>= nPos )
{
- if ( 0 <= nPos && nPos < sal_Int32( m_pComboBox->GetEntryCount() ))
+ if ( 0 <= nPos && nPos < m_pComboBox->GetEntryCount() )
m_pComboBox->RemoveEntryAt(nPos);
}
break;
diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
index 89ebd484886e..348d0634f4dd 100644
--- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx
@@ -238,7 +238,7 @@ void DropdownToolbarController::executeControlCommand( const css::frame::Control
if ( rControlCommand.Arguments[i].Value >>= nTmpPos )
{
if (( nTmpPos >= 0 ) &&
- ( nTmpPos < sal_Int32( m_pListBoxControl->GetEntryCount() )))
+ ( nTmpPos < m_pListBoxControl->GetEntryCount() ))
nPos = nTmpPos;
}
}
@@ -257,7 +257,7 @@ void DropdownToolbarController::executeControlCommand( const css::frame::Control
sal_Int32 nPos( -1 );
if ( rControlCommand.Arguments[i].Value >>= nPos )
{
- if ( 0 <= nPos && nPos < sal_Int32( m_pListBoxControl->GetEntryCount() ))
+ if ( 0 <= nPos && nPos < m_pListBoxControl->GetEntryCount() )
m_pListBoxControl->RemoveEntry( nPos );
}
break;
diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx
index f1341f56f821..d8f95a6c7e86 100644
--- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx
@@ -194,7 +194,7 @@ void ToggleButtonToolbarController::executeControlCommand( const css::frame::Con
sal_Int32 nTmpPos = 0;
if ( rControlCommand.Arguments[i].Value >>= nTmpPos )
{
- if (( nTmpPos >= 0 ) && ( nTmpPos < sal_Int32( nSize )))
+ if (( nTmpPos >= 0 ) && ( nTmpPos < nSize ))
nPos = nTmpPos;
}
}
diff --git a/include/com/sun/star/uno/Sequence.hxx b/include/com/sun/star/uno/Sequence.hxx
index ab2c6bf8c339..dfebf3693b69 100644
--- a/include/com/sun/star/uno/Sequence.hxx
+++ b/include/com/sun/star/uno/Sequence.hxx
@@ -197,8 +197,7 @@ inline void Sequence< E >::realloc( sal_Int32 nSize )
inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence(
const ::rtl::ByteSequence & rByteSequence )
{
- return ::com::sun::star::uno::Sequence< sal_Int8 >(
- * reinterpret_cast< const ::com::sun::star::uno::Sequence< sal_Int8 > * >( &rByteSequence ) );
+ return * reinterpret_cast< const ::com::sun::star::uno::Sequence< sal_Int8 > * >( &rByteSequence );
}
}
diff --git a/include/i18nlangtag/lang.h b/include/i18nlangtag/lang.h
index 3e37953868cc..f57e648bba54 100644
--- a/include/i18nlangtag/lang.h
+++ b/include/i18nlangtag/lang.h
@@ -162,7 +162,7 @@ constexpr LanguageType primary(LanguageType lt) { return LanguageType(sal_uInt16
#define LANGUAGE_BOSNIAN_LATIN_LSO LanguageType(0x681A)
#define LANGUAGE_BOSNIAN_LSO LanguageType(0x781A)
#define LANGUAGE_BOSNIAN_LATIN_BOSNIA_HERZEGOVINA LanguageType(0x141A)
-#define LANGUAGE_BOSNIAN_BOSNIA_HERZEGOVINA LanguageType(LANGUAGE_BOSNIAN_LATIN_BOSNIA_HERZEGOVINA) /* TODO: remove, only for langtab.src & localize.sdf compatibility */
+#define LANGUAGE_BOSNIAN_BOSNIA_HERZEGOVINA LANGUAGE_BOSNIAN_LATIN_BOSNIA_HERZEGOVINA /* TODO: remove, only for langtab.src & localize.sdf compatibility */
#define LANGUAGE_BRETON_FRANCE LanguageType(0x047E) /* obsoletes LANGUAGE_USER_BRETON 0x0629 */
#define LANGUAGE_BULGARIAN LanguageType(0x0402)
#define LANGUAGE_BURMESE LanguageType(0x0455)
@@ -178,7 +178,7 @@ constexpr LanguageType primary(LanguageType lt) { return LanguageType(sal_uInt16
#define LANGUAGE_CHINESE_TRADITIONAL LanguageType(0x0404)
#define LANGUAGE_CHINESE_SIMPLIFIED_LEGACY LanguageType(0x0004) /* MS-.NET 'zh-CHS', primary only! but maps to 'zh-CN' */
#define LANGUAGE_CHINESE_TRADITIONAL_LSO LanguageType(0x7C04) /* MS-.NET 'zh-CHT' but maps to 'zh-Hant' */
-#define LANGUAGE_CHINESE LanguageType(LANGUAGE_CHINESE_SIMPLIFIED) /* most code uses LANGUAGE_CHINESE */
+#define LANGUAGE_CHINESE LANGUAGE_CHINESE_SIMPLIFIED /* most code uses LANGUAGE_CHINESE */
#define LANGUAGE_CORSICAN_FRANCE LanguageType(0x0483)
#define LANGUAGE_CROATIAN LanguageType(0x041A)
#define LANGUAGE_CROATIAN_BOSNIA_HERZEGOVINA LanguageType(0x101A)
@@ -337,7 +337,7 @@ constexpr LanguageType primary(LanguageType lt) { return LanguageType(sal_uInt16
#define LANGUAGE_RUSSIAN LanguageType(0x0419)
#define LANGUAGE_RUSSIAN_MOLDOVA LanguageType(0x0819)
#define LANGUAGE_SAMI_NORTHERN_NORWAY LanguageType(0x043B)
-#define LANGUAGE_SAMI_LAPPISH LanguageType(LANGUAGE_SAMI_NORTHERN_NORWAY) /* the old MS definition */
+#define LANGUAGE_SAMI_LAPPISH LANGUAGE_SAMI_NORTHERN_NORWAY /* the old MS definition */
#define LANGUAGE_SAMI_INARI LanguageType(0x243B)
#define LANGUAGE_SAMI_INARI_LSO LanguageType(0x703B)
#define LANGUAGE_SAMI_LULE_LSO LanguageType(0x7C3B)
@@ -352,7 +352,7 @@ constexpr LanguageType primary(LanguageType lt) { return LanguageType(sal_uInt16
#define LANGUAGE_SAMI_SOUTHERN_SWEDEN LanguageType(0x1C3B)
#define LANGUAGE_SANSKRIT LanguageType(0x044F)
#define LANGUAGE_SEPEDI LanguageType(0x046C)
-#define LANGUAGE_NORTHERNSOTHO LanguageType(LANGUAGE_SEPEDI) /* just an alias for the already existing localization */
+#define LANGUAGE_NORTHERNSOTHO LANGUAGE_SEPEDI /* just an alias for the already existing localization */
#define LANGUAGE_SERBIAN_CYRILLIC_LSO LanguageType(0x6C1A)
#define LANGUAGE_SERBIAN_CYRILLIC_SAM LanguageType(0x0C1A) /* Serbia and Montenegro (former) */
#define LANGUAGE_SERBIAN_CYRILLIC_BOSNIA_HERZEGOVINA LanguageType(0x1C1A)
@@ -375,7 +375,7 @@ constexpr LanguageType primary(LanguageType lt) { return LanguageType(sal_uInt16
#define LANGUAGE_UPPER_SORBIAN_GERMANY LanguageType(0x042E) /* obsoletes LANGUAGE_USER_UPPER_SORBIAN 0x0623 */
#define LANGUAGE_LOWER_SORBIAN_GERMANY LanguageType(0x082E) /* obsoletes LANGUAGE_USER_LOWER_SORBIAN 0x0624. NOTE: the primary ID is identical to Upper Sorbian, which is not quite correct because they're distinct languages */
#define LANGUAGE_LOWER_SORBIAN_LSO LanguageType(0x7C2E)
-#define LANGUAGE_SORBIAN LanguageType(LANGUAGE_USER_UPPER_SORBIAN) /* a strange MS definition */
+#define LANGUAGE_SORBIAN LANGUAGE_USER_UPPER_SORBIAN /* a strange MS definition */
#define LANGUAGE_SPANISH_DATED LanguageType(0x040A) /* old collation, not supported, see #i94435# */
#define LANGUAGE_SPANISH_ARGENTINA LanguageType(0x2C0A)
#define LANGUAGE_SPANISH_BOLIVIA LanguageType(0x400A)
@@ -399,7 +399,7 @@ constexpr LanguageType primary(LanguageType lt) { return LanguageType(sal_uInt16
#define LANGUAGE_SPANISH_UNITED_STATES LanguageType(0x540A)
#define LANGUAGE_SPANISH_URUGUAY LanguageType(0x380A)
#define LANGUAGE_SPANISH_VENEZUELA LanguageType(0x200A)
-#define LANGUAGE_SPANISH LanguageType(LANGUAGE_SPANISH_MODERN) /* modern collation, see #i94435# */
+#define LANGUAGE_SPANISH LANGUAGE_SPANISH_MODERN /* modern collation, see #i94435# */
#define LANGUAGE_SWAHILI LanguageType(0x0441) /* Kenya */
#define LANGUAGE_SWEDISH LanguageType(0x041D)
#define LANGUAGE_SWEDISH_FINLAND LanguageType(0x081D)
@@ -520,27 +520,27 @@ constexpr LanguageType primary(LanguageType lt) { return LanguageType(sal_uInt16
* mapping ISO back to LANGID will return the new value.
*/
#define LANGUAGE_OBSOLETE_USER_LATIN LanguageType(0x0610)
-#define LANGUAGE_USER_LATIN LanguageType(LANGUAGE_LATIN_LSO)
+#define LANGUAGE_USER_LATIN LANGUAGE_LATIN_LSO
#define LANGUAGE_USER_LATIN_VATICAN LanguageType(0x8076) /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_LATIN_LSO)) */
#define LANGUAGE_USER_ESPERANTO LanguageType(0x0611) /* no locale possible */
#define LANGUAGE_USER_INTERLINGUA LanguageType(0x0612) /* no locale, but conventions */
#define LANGUAGE_OBSOLETE_USER_MAORI LanguageType(0x0620)
-#define LANGUAGE_USER_MAORI LanguageType(LANGUAGE_MAORI_NEW_ZEALAND)
+#define LANGUAGE_USER_MAORI LANGUAGE_MAORI_NEW_ZEALAND
#define LANGUAGE_OBSOLETE_USER_KINYARWANDA LanguageType(0x0621)
-#define LANGUAGE_USER_KINYARWANDA LanguageType(LANGUAGE_KINYARWANDA_RWANDA)
+#define LANGUAGE_USER_KINYARWANDA LANGUAGE_KINYARWANDA_RWANDA
/* was reserved for Northern Sotho but never used: 0x0622 */ /* obsoleted by LANGUAGE_SEPEDI */
#define LANGUAGE_OBSOLETE_USER_UPPER_SORBIAN LanguageType(0x0623)
-#define LANGUAGE_USER_UPPER_SORBIAN LanguageType(LANGUAGE_UPPER_SORBIAN_GERMANY)
+#define LANGUAGE_USER_UPPER_SORBIAN LANGUAGE_UPPER_SORBIAN_GERMANY
#define LANGUAGE_OBSOLETE_USER_LOWER_SORBIAN LanguageType(0x0624)
-#define LANGUAGE_USER_LOWER_SORBIAN LanguageType(LANGUAGE_LOWER_SORBIAN_GERMANY)
+#define LANGUAGE_USER_LOWER_SORBIAN LANGUAGE_LOWER_SORBIAN_GERMANY
#define LANGUAGE_OBSOLETE_USER_OCCITAN LanguageType(0x0625)
-#define LANGUAGE_USER_OCCITAN LanguageType(LANGUAGE_OCCITAN_FRANCE) /* reserved to languedocian */
+#define LANGUAGE_USER_OCCITAN LANGUAGE_OCCITAN_FRANCE /* reserved to languedocian */
#define LANGUAGE_USER_KOREAN_NORTH LanguageType(0x8012) /* North Korean as opposed to South Korean, makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_KOREAN)) */
#define LANGUAGE_USER_KURDISH_TURKEY LanguageType(0x0626) /* sublang 0x01, Latin script */
#define LANGUAGE_USER_KURDISH_SYRIA LanguageType(0x0A26) /* sublang 0x02, Latin script */
#define LANGUAGE_OBSOLETE_USER_KURDISH_IRAQ LanguageType(0x0E26) /* sublang 0x03, Arabic script */
-#define LANGUAGE_USER_KURDISH_IRAQ LanguageType(LANGUAGE_KURDISH_ARABIC_IRAQ)
+#define LANGUAGE_USER_KURDISH_IRAQ LANGUAGE_KURDISH_ARABIC_IRAQ
#define LANGUAGE_USER_KURDISH_IRAN LanguageType(0x1226) /* sublang 0x04, Arabic script */
#define LANGUAGE_USER_KURDISH_SOUTHERN_IRAQ LanguageType(0x8092) /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_KURDISH_ARABIC_LSO)) */
#define LANGUAGE_USER_KURDISH_SOUTHERN_IRAN LanguageType(0x8492) /* makeLangID( 0x21, getPrimaryLanguage( LANGUAGE_KURDISH_ARABIC_LSO)) */
@@ -549,18 +549,18 @@ constexpr LanguageType primary(LanguageType lt) { return LanguageType(sal_uInt16
#define LANGUAGE_USER_DZONGKHA_MAP_LONLY LanguageType(0xF851) /* to map "dz" only, because of the MS error, and preserve CTL information, sub 0x3e */
#define LANGUAGE_USER_SWAHILI_TANZANIA LanguageType(0x8041) /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_SWAHILI)) */
#define LANGUAGE_OBSOLETE_USER_BRETON LanguageType(0x0629)
-#define LANGUAGE_USER_BRETON LanguageType(LANGUAGE_BRETON_FRANCE)
+#define LANGUAGE_USER_BRETON LANGUAGE_BRETON_FRANCE
#define LANGUAGE_OBSOLETE_USER_KALAALLISUT LanguageType(0x062A)
-#define LANGUAGE_USER_KALAALLISUT LanguageType(LANGUAGE_KALAALLISUT_GREENLAND)
+#define LANGUAGE_USER_KALAALLISUT LANGUAGE_KALAALLISUT_GREENLAND
#define LANGUAGE_USER_SWAZI LanguageType(0x062B)
#define LANGUAGE_USER_NDEBELE_SOUTH LanguageType(0x062C)
#define LANGUAGE_OBSOLETE_USER_TSWANA_BOTSWANA LanguageType(0x8032) /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_TSWANA)) */
-#define LANGUAGE_USER_TSWANA_BOTSWANA LanguageType(LANGUAGE_TSWANA_BOTSWANA)
+#define LANGUAGE_USER_TSWANA_BOTSWANA LANGUAGE_TSWANA_BOTSWANA
#define LANGUAGE_USER_MOORE LanguageType(0x062D)
#define LANGUAGE_USER_BAMBARA LanguageType(0x062E)
#define LANGUAGE_USER_AKAN LanguageType(0x062F)
#define LANGUAGE_OBSOLETE_USER_LUXEMBOURGISH LanguageType(0x0630)
-#define LANGUAGE_USER_LUXEMBOURGISH LanguageType(LANGUAGE_LUXEMBOURGISH_LUXEMBOURG)
+#define LANGUAGE_USER_LUXEMBOURGISH LANGUAGE_LUXEMBOURGISH_LUXEMBOURG
#define LANGUAGE_USER_FRIULIAN LanguageType(0x0631)
#define LANGUAGE_USER_FIJIAN LanguageType(0x0632)
#define LANGUAGE_USER_AFRIKAANS_NAMIBIA LanguageType(0x8036) /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_AFRIKAANS)) */
@@ -571,7 +571,7 @@ constexpr LanguageType primary(LanguageType lt) { return LanguageType(sal_uInt16
#define LANGUAGE_USER_GASCON LanguageType(0x0636) /* Gascon France */
#define LANGUAGE_USER_GERMAN_BELGIUM LanguageType(0x8007) /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_GERMAN)) */
#define LANGUAGE_OBSOLETE_USER_CATALAN_VALENCIAN LanguageType(0x8003) /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_CATALAN)) */
-#define LANGUAGE_USER_CATALAN_VALENCIAN LanguageType(LANGUAGE_CATALAN_VALENCIAN)
+#define LANGUAGE_USER_CATALAN_VALENCIAN LANGUAGE_CATALAN_VALENCIAN
#define LANGUAGE_USER_HAUSA_GHANA LanguageType(0x8068) /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_HAUSA_NIGERIA)) */
#define LANGUAGE_USER_EWE_GHANA LanguageType(0x0637)
#define LANGUAGE_USER_ENGLISH_GHANA LanguageType(0x8409) /* makeLangID( 0x21, getPrimaryLanguage( LANGUAGE_ENGLISH_US)) */
@@ -584,18 +584,18 @@ constexpr LanguageType primary(LanguageType lt) { return LanguageType(sal_uInt16
#define LANGUAGE_USER_NYANJA LanguageType(0x063E)
#define LANGUAGE_USER_KASHUBIAN LanguageType(0x063F)
#define LANGUAGE_OBSOLETE_USER_SPANISH_CUBA LanguageType(0x800A) /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_SPANISH)) */
-#define LANGUAGE_USER_SPANISH_CUBA LanguageType(LANGUAGE_SPANISH_CUBA)
+#define LANGUAGE_USER_SPANISH_CUBA LANGUAGE_SPANISH_CUBA
#define LANGUAGE_USER_TETUN LanguageType(0x0640)
#define LANGUAGE_USER_QUECHUA_NORTH_BOLIVIA LanguageType(0x0641)
#define LANGUAGE_USER_QUECHUA_SOUTH_BOLIVIA LanguageType(0x0642)
#define LANGUAGE_OBSOLETE_USER_SERBIAN_CYRILLIC_SERBIA LanguageType(0x8C1A) /* makeLangID( 0x20+0x03, getPrimaryLanguage( LANGUAGE_SERBIAN_CYRILLIC_LSO)) */
-#define LANGUAGE_USER_SERBIAN_CYRILLIC_SERBIA LanguageType(LANGUAGE_SERBIAN_CYRILLIC_SERBIA)
+#define LANGUAGE_USER_SERBIAN_CYRILLIC_SERBIA LANGUAGE_SERBIAN_CYRILLIC_SERBIA
#define LANGUAGE_OBSOLETE_USER_SERBIAN_LATIN_SERBIA LanguageType(0x881A) /* makeLangID( 0x20+0x02, getPrimaryLanguage( LANGUAGE_SERBIAN_LATIN_LSO)) */
-#define LANGUAGE_USER_SERBIAN_LATIN_SERBIA LanguageType(LANGUAGE_SERBIAN_LATIN_SERBIA)
+#define LANGUAGE_USER_SERBIAN_LATIN_SERBIA LANGUAGE_SERBIAN_LATIN_SERBIA
#define LANGUAGE_OBSOLETE_USER_SERBIAN_CYRILLIC_MONTENEGRO LanguageType(0xCC1A) /* makeLangID( 0x20+0x13, getPrimaryLanguage( LANGUAGE_SERBIAN_CYRILLIC_LSO)) */
-#define LANGUAGE_USER_SERBIAN_CYRILLIC_MONTENEGRO LanguageType(LANGUAGE_SERBIAN_CYRILLIC_MONTENEGRO)
+#define LANGUAGE_USER_SERBIAN_CYRILLIC_MONTENEGRO LANGUAGE_SERBIAN_CYRILLIC_MONTENEGRO
#define LANGUAGE_OBSOLETE_USER_SERBIAN_LATIN_MONTENEGRO LanguageType(0xC81A) /* makeLangID( 0x20+0x12, getPrimaryLanguage( LANGUAGE_SERBIAN_LATIN_LSO)) */
-#define LANGUAGE_USER_SERBIAN_LATIN_MONTENEGRO LanguageType(LANGUAGE_SERBIAN_LATIN_MONTENEGRO)
+#define LANGUAGE_USER_SERBIAN_LATIN_MONTENEGRO LANGUAGE_SERBIAN_LATIN_MONTENEGRO
#define LANGUAGE_USER_SAMI_KILDIN_RUSSIA LanguageType(0x803B) /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_SAMI_NORTHERN_NORWAY)) */
#define LANGUAGE_USER_BODO_INDIA LanguageType(0x0643)
#define LANGUAGE_USER_DOGRI_INDIA LanguageType(0x0644)
@@ -620,7 +620,7 @@ constexpr LanguageType primary(LanguageType lt) { return LanguageType(sal_uInt16
#define LANGUAGE_USER_BUSHI LanguageType(0x064D)
#define LANGUAGE_USER_TAHITIAN LanguageType(0x064E)
#define LANGUAGE_OBSOLETE_USER_MALAGASY_PLATEAU LanguageType(0x064F)
-#define LANGUAGE_USER_MALAGASY_PLATEAU LanguageType(LANGUAGE_MALAGASY_PLATEAU)
+#define LANGUAGE_USER_MALAGASY_PLATEAU LANGUAGE_MALAGASY_PLATEAU
#define LANGUAGE_USER_PAPIAMENTU_ARUBA LanguageType(0x8079) /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_PAPIAMENTU)) */
#define LANGUAGE_USER_SARDINIAN_CAMPIDANESE LanguageType(0x0650)
#define LANGUAGE_USER_SARDINIAN_GALLURESE LanguageType(0x0651)
@@ -634,7 +634,7 @@ constexpr LanguageType primary(LanguageType lt) { return LanguageType(sal_uInt16
#define LANGUAGE_USER_LIMBU LanguageType(0x0657)
#define LANGUAGE_USER_LOJBAN LanguageType(0x0658) /* no locale */
#define LANGUAGE_OBSOLETE_USER_KABYLE LanguageType(0x0659)
-#define LANGUAGE_USER_KABYLE LanguageType(LANGUAGE_TAMAZIGHT_LATIN_ALGERIA)
+#define LANGUAGE_USER_KABYLE LANGUAGE_TAMAZIGHT_LATIN_ALGERIA
#define LANGUAGE_USER_HAITIAN LanguageType(0x065A)
#define LANGUAGE_USER_BEEMBE LanguageType(0x065B)
#define LANGUAGE_USER_BEKWEL LanguageType(0x065C)
diff --git a/include/sot/stg.hxx b/include/sot/stg.hxx
index 3a11b4e2298d..a61094730680 100644
--- a/include/sot/stg.hxx
+++ b/include/sot/stg.hxx
@@ -58,7 +58,7 @@ public:
void ResetError() const;
void SetError( ErrCode ) const;
ErrCode GetError() const;
- bool Good() const { return bool( m_nError == SVSTREAM_OK ); }
+ bool Good() const { return m_nError == SVSTREAM_OK; }
StreamMode GetMode() const { return m_nMode; }
void SetAutoCommit( bool bSet )
{ m_bAutoCommit = bSet; }
diff --git a/include/tools/inetmsg.hxx b/include/tools/inetmsg.hxx
index 6bfe6bab92f7..bb99ee3296be 100644
--- a/include/tools/inetmsg.hxx
+++ b/include/tools/inetmsg.hxx
@@ -131,7 +131,7 @@ public:
INetMessageHeader GetHeaderField (sal_uIntPtr nIndex) const
{
if ( nIndex < m_aHeaderList.size() ) {
- return INetMessageHeader( *m_aHeaderList[ nIndex ] );
+ return *m_aHeaderList[ nIndex ];
} else {
return INetMessageHeader();
}
diff --git a/mysqlc/source/mysqlc_resultsetmetadata.cxx b/mysqlc/source/mysqlc_resultsetmetadata.cxx
index c8162cdcee84..6b3cf12eb43f 100644
--- a/mysqlc/source/mysqlc_resultsetmetadata.cxx
+++ b/mysqlc/source/mysqlc_resultsetmetadata.cxx
@@ -329,7 +329,7 @@ void OResultSetMetaData::checkColumnIndex(sal_Int32 columnIndex)
buf.appendAscii( "Column index out of range (expected 1 to " );
buf.append( sal_Int32( meta->getColumnCount() ) );
buf.appendAscii( ", got " );
- buf.append( sal_Int32( columnIndex ) );
+ buf.append( columnIndex );
buf.append( '.' );
throw SQLException( buf.makeStringAndClear(), *this, rtl::OUString(), 1, Any() );
}
diff --git a/opencl/inc/opencl_device_selection.h b/opencl/inc/opencl_device_selection.h
index f7d592de6e89..3a47ff6d8d5e 100644
--- a/opencl/inc/opencl_device_selection.h
+++ b/opencl/inc/opencl_device_selection.h
@@ -419,7 +419,7 @@ inline ds_status writeProfile(const OUString& rStreamName, std::unique_ptr<ds_pr
aXmlWriter.startElement("profile");
aXmlWriter.startElement("version");
- aXmlWriter.content(OString(pProfile->version));
+ aXmlWriter.content(pProfile->version);
aXmlWriter.endElement();
for (ds_device& rDevice : pProfile->devices)
@@ -439,11 +439,11 @@ inline ds_status writeProfile(const OUString& rStreamName, std::unique_ptr<ds_pr
aXmlWriter.endElement();
aXmlWriter.startElement("name");
- aXmlWriter.content(OString(rDevice.sDeviceName));
+ aXmlWriter.content(rDevice.sDeviceName);
aXmlWriter.endElement();
aXmlWriter.startElement("driver");
- aXmlWriter.content(OString(rDevice.sDriverVersion));
+ aXmlWriter.content(rDevice.sDriverVersion);
aXmlWriter.endElement();
break;
default:
@@ -549,8 +549,8 @@ inline ds_status readProfile(const OUString& rStreamName, std::unique_ptr<ds_pro
{
// is DS_DEVICE_NATIVE_CPU or name + version matches?
if (eDeviceType == DeviceType::NativeCPU ||
- (sName == OString(rDevice.sDeviceName) &&
- sVersion == OString(rDevice.sDriverVersion)))
+ (sName == rDevice.sDeviceName &&
+ sVersion == rDevice.sDriverVersion))
{
rDevice.fTime = fTime;
rDevice.bErrors = bErrors;
diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx
index 24ee9a2b296c..de398d2aa1ab 100644
--- a/reportdesign/source/ui/report/FixedTextColor.cxx
+++ b/reportdesign/source/ui/report/FixedTextColor.cxx
@@ -82,7 +82,7 @@ namespace rptui
void FixedTextColor::setPropertyTextColor(const uno::Reference< awt::XVclWindowPeer >& _xVclWindowPeer, sal_Int32 _nTextColor)
{
- _xVclWindowPeer->setProperty(PROPERTY_TEXTCOLOR, uno::makeAny(sal_Int32(_nTextColor)));
+ _xVclWindowPeer->setProperty(PROPERTY_TEXTCOLOR, uno::makeAny(_nTextColor));
}
diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx
index 6b24b0ab0143..bb8bf337766e 100644
--- a/sal/osl/unx/socket.cxx
+++ b/sal/osl/unx/socket.cxx
@@ -2399,7 +2399,7 @@ sal_Bool SAL_CALL osl_isInSocketSet(oslSocketSet Set, oslSocket pSocket)
return false;
}
- return bool(FD_ISSET(pSocket->m_Socket, &Set->m_Set));
+ return FD_ISSET(pSocket->m_Socket, &Set->m_Set);
}
sal_Int32 SAL_CALL osl_demultiplexSocketEvents(oslSocketSet IncomingSet,
diff --git a/sal/qa/rtl/math/test-rtl-math.cxx b/sal/qa/rtl/math/test-rtl-math.cxx
index fa118b9f3467..345ba84991ee 100644
--- a/sal/qa/rtl/math/test-rtl-math.cxx
+++ b/sal/qa/rtl/math/test-rtl-math.cxx
@@ -56,7 +56,7 @@ public:
rtl::OUString(" +1.E01foo"),
'.', ',', &status, &end);
CPPUNIT_ASSERT_EQUAL(rtl_math_ConversionStatus_Ok, status);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(RTL_CONSTASCII_LENGTH(" +1.E01")), end);
+ CPPUNIT_ASSERT_EQUAL(RTL_CONSTASCII_LENGTH(" +1.E01"), end);
CPPUNIT_ASSERT_EQUAL(10.0, res);
res = rtl::math::stringToDouble(
@@ -141,13 +141,13 @@ public:
rtl::OUString("1e"),
'.', ',', &status, &end);
CPPUNIT_ASSERT_EQUAL(rtl_math_ConversionStatus_Ok, status);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(RTL_CONSTASCII_LENGTH("1")), end);
+ CPPUNIT_ASSERT_EQUAL(RTL_CONSTASCII_LENGTH("1"), end);
CPPUNIT_ASSERT_EQUAL(1.0, res);
res = rtl::math::stringToDouble(
rtl::OUString("0e"),
'.', ',', &status, &end);
CPPUNIT_ASSERT_EQUAL(rtl_math_ConversionStatus_Ok, status);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(RTL_CONSTASCII_LENGTH("1")), end);
+ CPPUNIT_ASSERT_EQUAL(RTL_CONSTASCII_LENGTH("1"), end);
CPPUNIT_ASSERT_EQUAL(0.0, res);
}
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 526f8840be1d..7c235d04124b 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -232,19 +232,17 @@ ScDocumentPool::ScDocumentPool()
rPoolDefaults[ ATTR_FONT_CONTOUR - ATTR_STARTINDEX ] = new SvxContourItem( false, ATTR_FONT_CONTOUR );
rPoolDefaults[ ATTR_FONT_SHADOWED - ATTR_STARTINDEX ] = new SvxShadowedItem( false, ATTR_FONT_SHADOWED );
rPoolDefaults[ ATTR_FONT_COLOR - ATTR_STARTINDEX ] = new SvxColorItem( Color(COL_AUTO), ATTR_FONT_COLOR );
- rPoolDefaults[ ATTR_FONT_LANGUAGE - ATTR_STARTINDEX ] = new SvxLanguageItem( LanguageType(LANGUAGE_DONTKNOW), ATTR_FONT_LANGUAGE );
+ rPoolDefaults[ ATTR_FONT_LANGUAGE - ATTR_STARTINDEX ] = new SvxLanguageItem( LANGUAGE_DONTKNOW, ATTR_FONT_LANGUAGE );
rPoolDefaults[ ATTR_CJK_FONT - ATTR_STARTINDEX ] = pCjkFont;
rPoolDefaults[ ATTR_CJK_FONT_HEIGHT - ATTR_STARTINDEX ] = new SvxFontHeightItem( 200, 100, ATTR_CJK_FONT_HEIGHT );
rPoolDefaults[ ATTR_CJK_FONT_WEIGHT - ATTR_STARTINDEX ] = new SvxWeightItem( WEIGHT_NORMAL, ATTR_CJK_FONT_WEIGHT );
rPoolDefaults[ ATTR_CJK_FONT_POSTURE- ATTR_STARTINDEX ] = new SvxPostureItem( ITALIC_NONE, ATTR_CJK_FONT_POSTURE );
- rPoolDefaults[ ATTR_CJK_FONT_LANGUAGE-ATTR_STARTINDEX ] = new SvxLanguageItem( LanguageType(LANGUAGE_DONTKNOW),
- ATTR_CJK_FONT_LANGUAGE );
+ rPoolDefaults[ ATTR_CJK_FONT_LANGUAGE-ATTR_STARTINDEX ] = new SvxLanguageItem( LANGUAGE_DONTKNOW, ATTR_CJK_FONT_LANGUAGE );
rPoolDefaults[ ATTR_CTL_FONT - ATTR_STARTINDEX ] = pCtlFont;
rPoolDefaults[ ATTR_CTL_FONT_HEIGHT - ATTR_STARTINDEX ] = new SvxFontHeightItem( 200, 100, ATTR_CTL_FONT_HEIGHT );
rPoolDefaults[ ATTR_CTL_FONT_WEIGHT - ATTR_STARTINDEX ] = new SvxWeightItem( WEIGHT_NORMAL, ATTR_CTL_FONT_WEIGHT );
rPoolDefaults[ ATTR_CTL_FONT_POSTURE- ATTR_STARTINDEX ] = new SvxPostureItem( ITALIC_NONE, ATTR_CTL_FONT_POSTURE );
- rPoolDefaults[ ATTR_CTL_FONT_LANGUAGE-ATTR_STARTINDEX ] = new SvxLanguageItem( LanguageType(LANGUAGE_DONTKNOW),
- ATTR_CTL_FONT_LANGUAGE );
+ rPoolDefaults[ ATTR_CTL_FONT_LANGUAGE-ATTR_STARTINDEX ] = new SvxLanguageItem( LANGUAGE_DONTKNOW, ATTR_CTL_FONT_LANGUAGE );
rPoolDefaults[ ATTR_FONT_EMPHASISMARK-ATTR_STARTINDEX ] = new SvxEmphasisMarkItem( FontEmphasisMark::NONE, ATTR_FONT_EMPHASISMARK );
rPoolDefaults[ ATTR_USERDEF - ATTR_STARTINDEX ] = new SvXMLAttrContainerItem( ATTR_USERDEF );
rPoolDefaults[ ATTR_FONT_WORDLINE - ATTR_STARTINDEX ] = new SvxWordLineModeItem(false, ATTR_FONT_WORDLINE );
diff --git a/sc/source/core/data/olinetab.cxx b/sc/source/core/data/olinetab.cxx
index d7be0d322640..eb4426bbe8cb 100644
--- a/sc/source/core/data/olinetab.cxx
+++ b/sc/source/core/data/olinetab.cxx
@@ -253,7 +253,7 @@ bool ScOutlineArray::Insert(
rSizeChanged = false; // No more room
return false;
}
- aCollections[nMoveLevel+1].insert(ScOutlineEntry(*pEntry));
+ aCollections[nMoveLevel+1].insert(*pEntry);
size_t nPos = std::distance(rColl.begin(), it);
rColl.erase(it);
it = rColl.begin();
@@ -390,7 +390,7 @@ void ScOutlineArray::PromoteSub(SCCOLROW nStartPos, SCCOLROW nEndPos, size_t nSt
SCCOLROW nEnd = pEntry->GetEnd();
if (nStart >= nStartPos && nEnd <= nEndPos)
{
- aCollections[nLevel-1].insert(ScOutlineEntry(*pEntry));
+ aCollections[nLevel-1].insert(*pEntry);
// Re-calc iterator positions after the tree gets invalidated
size_t nPos = std::distance(rColl.begin(), it);
@@ -413,7 +413,7 @@ void ScOutlineArray::PromoteSub(SCCOLROW nStartPos, SCCOLROW nEndPos, size_t nSt
SCCOLROW nEnd = pEntry->GetEnd();
if (nStart >= nStartPos && nEnd <= nEndPos)
{
- aCollections[nLevel-1].insert(ScOutlineEntry(*pEntry));
+ aCollections[nLevel-1].insert(*pEntry);
// Re-calc iterator positions after the tree gets invalidated
size_t nPos = std::distance(rColl.begin(), it);
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 1deed0551ae8..d68a50b1c7e8 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -408,7 +408,7 @@ bool ScValidationData::DoError( vcl::Window* pParent, const OUString& rInput,
}
}
- ScopedVclPtrInstance< MessBox > aBox( pParent, WinBits(nStyle), aTitle, aMessage );
+ ScopedVclPtrInstance< MessBox > aBox( pParent, nStyle, aTitle, aMessage );
sal_uInt16 nRet = aBox->Execute();
return ( eErrorStyle == SC_VALERR_STOP || nRet == RET_CANCEL );
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 5baa7de82e58..2f603e02ff71 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -3243,7 +3243,7 @@ public:
TEmptyRes operator()(char) const
{
- return maCOp(char{}, maOp, 0, mfVal, maString);
+ return maCOp({}, maOp, 0, mfVal, maString);
}
static bool useFunctionForEmpty()
diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx
index b6ef37881da8..f02edf0d6434 100644
--- a/sc/source/filter/excel/xeescher.cxx
+++ b/sc/source/filter/excel/xeescher.cxx
@@ -614,7 +614,7 @@ void XclExpOcxControlObj::WriteSubRecs( XclExpStream& rStrm )
sal_uInt16 nPictFmlaSize = nFirstPartSize + nCellLinkSize + nSrcRangeSize + 18;
rStrm.StartRecord( EXC_ID_OBJPICTFMLA, nPictFmlaSize );
- rStrm << sal_uInt16( nFirstPartSize ) // size of first part
+ rStrm << nFirstPartSize // size of first part
<< sal_uInt16( 5 ) // formula size
<< sal_uInt32( 0 ) // unknown ID
<< sal_uInt8( 0x02 ) << sal_uInt32( 0 ) // tTbl token with unknown ID
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 6372fee39669..bb07232d3d43 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -918,7 +918,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
sal_uLong v;
if ( pGraphEntry )
nC = std::max( SCCOL(pGraphEntry->aRange.aEnd.Col() - nCol + 1),
- SCCOL(rMergeAttr.GetColMerge()) );
+ rMergeAttr.GetColMerge() );
else
nC = rMergeAttr.GetColMerge();
if ( nC > 1 )
@@ -932,7 +932,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
if ( pGraphEntry )
nR = std::max( SCROW(pGraphEntry->aRange.aEnd.Row() - nRow + 1),
- SCROW(rMergeAttr.GetRowMerge()) );
+ rMergeAttr.GetRowMerge() );
else
nR = rMergeAttr.GetRowMerge();
if ( nR > 1 )
diff --git a/sc/source/filter/oox/pivotcachebuffer.cxx b/sc/source/filter/oox/pivotcachebuffer.cxx
index 93677c03329a..b0ef8509f9a2 100644
--- a/sc/source/filter/oox/pivotcachebuffer.cxx
+++ b/sc/source/filter/oox/pivotcachebuffer.cxx
@@ -756,7 +756,7 @@ OUString PivotCacheField::createParentGroupField( const Reference< XDataPilotFie
void PivotCacheField::writeSourceHeaderCell( WorksheetHelper& rSheetHelper, sal_Int32 nCol, sal_Int32 nRow ) const
{
CellModel aModel;
- aModel.maCellAddr = ScAddress( SCCOL( nCol ), SCROW( nRow ), SCTAB( rSheetHelper.getSheetIndex() ) );
+ aModel.maCellAddr = ScAddress( SCCOL( nCol ), SCROW( nRow ), rSheetHelper.getSheetIndex() );
rSheetHelper.getSheetData().setStringCell( aModel, maFieldModel.maName );
}
@@ -797,7 +797,7 @@ void PivotCacheField::writeItemToSourceDataCell( WorksheetHelper& rSheetHelper,
if( rItem.getType() != XML_m )
{
CellModel aModel;
- aModel.maCellAddr = ScAddress( SCCOL( nCol ), SCROW( nRow ), SCTAB( rSheetHelper.getSheetIndex() ) );
+ aModel.maCellAddr = ScAddress( SCCOL( nCol ), SCROW( nRow ), rSheetHelper.getSheetIndex() );
SheetDataBuffer& rSheetData = rSheetHelper.getSheetData();
switch( rItem.getType() )
{
diff --git a/sc/source/filter/oox/viewsettings.cxx b/sc/source/filter/oox/viewsettings.cxx
index ffc9e7588e1e..3b01e8632b55 100644
--- a/sc/source/filter/oox/viewsettings.cxx
+++ b/sc/source/filter/oox/viewsettings.cxx
@@ -330,7 +330,7 @@ void SheetViewSettings::finalizeImport()
if( getSheetType() == WorksheetType::Chart )
{
xModel->maPaneSelMap.clear();
- xModel->maFirstPos = xModel->maSecondPos = ScAddress( SCCOL ( 0 ), SCROW ( 0 ), SCTAB (getSheetIndex() ) );
+ xModel->maFirstPos = xModel->maSecondPos = ScAddress( SCCOL ( 0 ), SCROW ( 0 ), getSheetIndex() );
xModel->mnViewType = XML_normal;
xModel->mnActivePaneId = XML_topLeft;
xModel->mnPaneState = XML_split;
diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx
index deb422163e9f..55e8785e514c 100644
--- a/sc/source/ui/cctrl/dpcontrol.cxx
+++ b/sc/source/ui/cctrl/dpcontrol.cxx
@@ -105,8 +105,8 @@ void ScDPFieldButton::draw()
// Border lines
mpOutDev->SetLineColor(mpStyle->GetLightColor());
- mpOutDev->DrawLine(Point(maPos), Point(maPos.X(), maPos.Y()+maSize.Height()-1));
- mpOutDev->DrawLine(Point(maPos), Point(maPos.X()+maSize.Width()-1, maPos.Y()));
+ mpOutDev->DrawLine(maPos, Point(maPos.X(), maPos.Y()+maSize.Height()-1));
+ mpOutDev->DrawLine(maPos, Point(maPos.X()+maSize.Width()-1, maPos.Y()));
mpOutDev->SetLineColor(mpStyle->GetShadowColor());
mpOutDev->DrawLine(Point(maPos.X(), maPos.Y()+maSize.Height()-1),
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index ca054000676f..7b99fd1459a9 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -225,7 +225,7 @@ ScZoomSliderWnd::ScZoomSliderWnd( vcl::Window* pParent,
mpImpl->maSliderButton = Image(BitmapEx(RID_SVXBMP_SLIDERBUTTON));
mpImpl->maIncreaseButton = Image(BitmapEx(RID_SVXBMP_SLIDERINCREASE));
mpImpl->maDecreaseButton = Image(BitmapEx(RID_SVXBMP_SLIDERDECREASE));
- Size aSliderSize = LogicToPixel( Size( aLogicalSize), MapMode( MapUnit::Map10thMM ) );
+ Size aSliderSize = LogicToPixel( aLogicalSize, MapMode( MapUnit::Map10thMM ) );
SetSizePixel( Size( aSliderSize.Width() * nSliderWidth-1, aSliderSize.Height() + nSliderHeight ) );
}
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index c7f3d076bfca..ed773c3ebf38 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1632,10 +1632,9 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller,
{
SfxItemSet& rStyleSet = pStyleSheet->GetItemSet();
- SvxPageUsage eUsage =
- SvxPageUsage( static_cast<const SvxPageItem&>(
- rStyleSet.Get( ATTR_PAGE )).
- GetPageUsage() );
+ SvxPageUsage eUsage = static_cast<const SvxPageItem&>(
+ rStyleSet.Get( ATTR_PAGE )).
+ GetPageUsage();
bool bShareHeader = static_cast<const SfxBoolItem&>(
static_cast<const SvxSetItem&>(rStyleSet
.Get(ATTR_PAGE_HEADERSET))
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index d148faff0c9f..75e638a47837 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -1020,7 +1020,7 @@ void ScNavigatorDlg::CheckDataArea()
|| nCurRow < pMarkArea->nRowStart+1
|| nCurRow > pMarkArea->nRowEnd+1 )
{
- aTbxCmd->SetItemState(nDataId, TriState(TRISTATE_TRUE));
+ aTbxCmd->SetItemState(nDataId, TRISTATE_TRUE);
aTbxCmd->TriggerItem(nDataId);
}
}
diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
index d412265b033c..65046a075021 100644
--- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx
+++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx
@@ -597,7 +597,7 @@ PivotTableDataProvider::assignValuesToDataSequence(size_t nIndex)
OUString sDataID = lcl_identifierForData(nIndex);
- std::vector<ValueAndFormat> const & rRowOfData = m_aDataRowVector[size_t(nIndex)];
+ std::vector<ValueAndFormat> const & rRowOfData = m_aDataRowVector[nIndex];
std::unique_ptr<PivotTableDataSequence> pSequence;
pSequence.reset(new PivotTableDataSequence(m_pDocument, m_sPivotTableName, sDataID, rRowOfData));
pSequence->setRole("values-y");
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 151403fa1f31..49a0d263bb48 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -3801,7 +3801,7 @@ ScVbaRange::setColumnWidth( const uno::Any& _columnwidth )
{
for ( sal_Int32 index = 1; index != nLen; ++index )
{
- uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32(index) ), uno::Any() ), uno::UNO_QUERY_THROW );
+ uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
xRange->setColumnWidth( _columnwidth );
}
return;
@@ -3965,7 +3965,7 @@ ScVbaRange::setRowHeight( const uno::Any& _rowheight)
{
for ( sal_Int32 index = 1; index != nLen; ++index )
{
- uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32(index) ), uno::Any() ), uno::UNO_QUERY_THROW );
+ uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
xRange->setRowHeight( _rowheight );
}
return;
@@ -4707,7 +4707,7 @@ ScVbaRange::Autofit()
{
for ( sal_Int32 index = 1; index != nLen; ++index )
{
- uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( sal_Int32(index) ), uno::Any() ), uno::UNO_QUERY_THROW );
+ uno::Reference< excel::XRange > xRange( m_Areas->Item( uno::makeAny( index ), uno::Any() ), uno::UNO_QUERY_THROW );
xRange->Autofit();
}
return;
diff --git a/sc/source/ui/vba/vbawsfunction.cxx b/sc/source/ui/vba/vbawsfunction.cxx
index 5e319fe7173b..ca7cf6dadc08 100644
--- a/sc/source/ui/vba/vbawsfunction.cxx
+++ b/sc/source/ui/vba/vbawsfunction.cxx
@@ -58,9 +58,9 @@ void lclConvertBooleanToDouble( uno::Any& rAny )
if ( rAny >>= bValue )
{
if ( bValue )
- rAny <<= double( 1.0 );
+ rAny <<= 1.0;
else
- rAny <<= double( 0.0 );
+ rAny <<= 0.0;
}
}
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index 860268a7a97f..876abdfa3156 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -65,7 +65,7 @@ void ScDBFunc::GotoDBArea( const OUString& rDBName )
pData->GetArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow );
SetTabNo( nTab );
- MoveCursorAbs( nStartCol, nStartRow, ScFollowMode( SC_FOLLOW_JUMP ),
+ MoveCursorAbs( nStartCol, nStartRow, SC_FOLLOW_JUMP,
false, false ); // bShift,bControl
DoneBlockMode();
InitBlockMode( nStartCol, nStartRow, nTab );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 22a80c561b7a..fbb1a9e8379f 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5829,23 +5829,23 @@ void ScGridWindow::UpdateCursorOverlay()
long aCursorWidth = 1 * fScaleFactor;
- tools::Rectangle aLeft = tools::Rectangle(aRect);
+ tools::Rectangle aLeft = aRect;
aLeft.Top() -= aCursorWidth;
aLeft.Bottom() += aCursorWidth;
aLeft.Right() = aLeft.Left();
aLeft.Left() -= aCursorWidth;
- tools::Rectangle aRight = tools::Rectangle(aRect);
+ tools::Rectangle aRight = aRect;
aRight.Top() -= aCursorWidth;
aRight.Bottom() += aCursorWidth;
aRight.Left() = aRight.Right();
aRight.Right() += aCursorWidth;
- tools::Rectangle aTop = tools::Rectangle(aRect);
+ tools::Rectangle aTop = aRect;
aTop.Bottom() = aTop.Top();
aTop.Top() -= aCursorWidth;
- tools::Rectangle aBottom = tools::Rectangle(aRect);
+ tools::Rectangle aBottom = aRect;
aBottom.Top() = aBottom.Bottom();
aBottom.Bottom() += aCursorWidth;
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index c606e3873f62..bb819c1a2247 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -671,7 +671,7 @@ void SdOOXMLExportTest1::testParaMarginAndindentation()
sal_Int32 nParaFirstLineIndent = 0;
xPropSet->getPropertyValue( "ParaFirstLineIndent" ) >>= nParaFirstLineIndent;
- CPPUNIT_ASSERT_EQUAL(sal_Int32(-1268), sal_Int32(nParaFirstLineIndent));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-1268), nParaFirstLineIndent);
xDocShRef->DoClose();
}
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 0a2a2c9e7e2f..499b7f0a5641 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -441,7 +441,7 @@ void SdTiledRenderingTest::testGetTextSelection()
CPPUNIT_ASSERT_EQUAL(OString("Shape"), pXImpressDocument->getTextSelection("text/plain;charset=utf-8", aUsedFormat));
// Make sure returned RTF is not empty.
- CPPUNIT_ASSERT(!OString(pXImpressDocument->getTextSelection("text/rtf", aUsedFormat)).isEmpty());
+ CPPUNIT_ASSERT(!pXImpressDocument->getTextSelection("text/rtf", aUsedFormat).isEmpty());
}
void SdTiledRenderingTest::testSetGraphicSelection()
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 9a0e7f0420f5..f51373cca0a4 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -200,7 +200,7 @@ OUString getAnnotationDateTimeString( const Reference< XAnnotation >& xAnnotatio
Date aDate( aDateTime.Day, aDateTime.Month, aDateTime.Year );
if (aDate==aSysDate)
sRet = SdResId(STR_ANNOTATION_TODAY);
- else if (aDate == Date(aSysDate-1))
+ else if (aDate == (aSysDate-1))
sRet = SdResId(STR_ANNOTATION_YESTERDAY);
else if (aDate.IsValidAndGregorian() )
sRet = rLocalData.getDate(aDate);
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index b7f7d3642671..280856096549 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -158,7 +158,7 @@ void SdPresLayoutDlg::FillValueSet()
aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR));
maLayoutNames.push_back(aLayoutName);
- Image aBitmap(Bitmap(mpDocSh->GetPagePreviewBitmap(pMaster)));
+ Image aBitmap(mpDocSh->GetPagePreviewBitmap(pMaster));
m_pVS->InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, aLayoutName);
}
}
@@ -256,7 +256,7 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl, Button*, void)
aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR));
maLayoutNames.push_back(aLayoutName);
- Image aBitmap(Bitmap(pTemplDocSh->GetPagePreviewBitmap(pMaster)));
+ Image aBitmap(pTemplDocSh->GetPagePreviewBitmap(pMaster));
m_pVS->InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, aLayoutName);
}
}
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index cf684596dbb6..098dab8c016e 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1741,7 +1741,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
{
XFillColorItem aColorItem( static_cast<const XFillColorItem&>(pArgs->Get( XATTR_FILLCOLOR )) );
rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_SOLID ) );
- rPageProperties.PutItem( XFillColorItem( aColorItem ));
+ rPageProperties.PutItem( aColorItem );
}
break;
@@ -1763,7 +1763,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
{
XFillHatchItem aHatchItem( static_cast<const XFillHatchItem&>(pArgs->Get( XATTR_FILLHATCH )) );
rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_HATCH ) );
- rPageProperties.PutItem( XFillHatchItem( aHatchItem ));
+ rPageProperties.PutItem( aHatchItem );
}
break;
@@ -1771,7 +1771,7 @@ void DrawViewShell::SetPageProperties (SfxRequest& rReq)
{
XFillBitmapItem aBitmapItem( static_cast<const XFillBitmapItem&>(pArgs->Get( XATTR_FILLBITMAP )) );
rPageProperties.PutItem( XFillStyleItem( drawing::FillStyle_BITMAP ) );
- rPageProperties.PutItem( XFillBitmapItem( aBitmapItem ));
+ rPageProperties.PutItem( aBitmapItem );
}
break;
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 39742f8b333b..b478e81354e0 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -276,7 +276,7 @@ void OutlineViewShell::ArrangeGUIElements ()
if (!aWin.IsEmpty()) // not when opening
{
- InitWindows(Point(0,0), aText.GetSize(), Point(aVis.TopLeft()));
+ InitWindows(Point(0,0), aText.GetSize(), aVis.TopLeft());
UpdateScrollBars();
}
}
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index b76b852e7100..9627e99edc09 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -780,8 +780,7 @@ IMPL_LINK_NOARG(OutlineView, StatusEventHdl, EditStatus&, void)
if (aWin.GetHeight() > aText.Bottom())
aText.Bottom() = aWin.GetHeight();
- mrOutlineViewShell.InitWindows(Point(0,0), aText.GetSize(),
- Point(aVis.TopLeft()));
+ mrOutlineViewShell.InitWindows(Point(0,0), aText.GetSize(), aVis.TopLeft());
mrOutlineViewShell.UpdateScrollBars();
}
}
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 83916da238ad..4524caefe1af 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -689,7 +689,7 @@ bool SfxDocumentDescPage::FillItemSet(SfxItemSet *rSet)
{
pInfo->setDescription( m_pCommentEd->GetText() );
}
- rSet->Put( SfxDocumentInfoItem( *pInfo ) );
+ rSet->Put( *pInfo );
if ( pInfo != m_pInfoItem )
{
delete pInfo;
diff --git a/slideshow/source/engine/animationnodes/animationnodefactory.cxx b/slideshow/source/engine/animationnodes/animationnodefactory.cxx
index c2ad083e16ad..7abb97bae370 100644
--- a/slideshow/source/engine/animationnodes/animationnodefactory.cxx
+++ b/slideshow/source/engine/animationnodes/animationnodefactory.cxx
@@ -572,11 +572,11 @@ AnimationNodeSharedPtr AnimationNodeFactory::createAnimationNode(
xNode.is(),
"AnimationNodeFactory::createAnimationNode(): invalid XAnimationNode" );
- return BaseNodeSharedPtr( implCreateAnimationNode(
+ return implCreateAnimationNode(
xNode,
BaseContainerNodeSharedPtr(), // no parent
NodeContext( rContext,
- rSlideSize )));
+ rSlideSize ));
}
#if defined(DBG_UTIL)
diff --git a/slideshow/source/engine/opengl/TransitionerImpl.cxx b/slideshow/source/engine/opengl/TransitionerImpl.cxx
index 644c3b823498..b19d62973108 100644
--- a/slideshow/source/engine/opengl/TransitionerImpl.cxx
+++ b/slideshow/source/engine/opengl/TransitionerImpl.cxx
@@ -1122,7 +1122,7 @@ void OGLTransitionerImpl::disposing()
}
#endif
- if (mbRestoreSync && bool(mpContext.is())) {
+ if (mbRestoreSync && mpContext.is()) {
// try to reestablish synchronize state
const char* sal_synchronize = getenv("SAL_SYNCHRONIZE");
mpContext->getOpenGLWindow().Synchronize(sal_synchronize && *sal_synchronize == '1' );
diff --git a/slideshow/source/engine/transitions/combtransition.cxx b/slideshow/source/engine/transitions/combtransition.cxx
index 71a22f388f5c..c553256bf89b 100644
--- a/slideshow/source/engine/transitions/combtransition.cxx
+++ b/slideshow/source/engine/transitions/combtransition.cxx
@@ -119,14 +119,14 @@ void CombTransition::renderComb( double t,
const basegfx::B2DVector aPushDirection = basegfx::B2DVector(
enteringSizePixel * maPushDirectionUnit );
- const basegfx::B2DPolyPolygon aClipPolygon1 = basegfx::B2DPolyPolygon(
+ const basegfx::B2DPolyPolygon aClipPolygon1 =
createClipPolygon( maPushDirectionUnit,
enteringSizePixel,
- mnNumStripes, 0 ) );
- const basegfx::B2DPolyPolygon aClipPolygon2 = basegfx::B2DPolyPolygon(
+ mnNumStripes, 0 );
+ const basegfx::B2DPolyPolygon aClipPolygon2 =
createClipPolygon( maPushDirectionUnit,
enteringSizePixel,
- mnNumStripes, 1 ) );
+ mnNumStripes, 1 );
SlideBitmapSharedPtr const & pLeavingBitmap = getLeavingBitmap(rViewEntry);
if( pLeavingBitmap )
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index d5e0bf691877..03313496f402 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -166,7 +166,7 @@ StorageStream::StorageStream( StgIo* p, StgDirEntry* q, StreamMode m )
}
}
else
- m &= ~StreamMode(StreamMode::READWRITE);
+ m &= ~StreamMode::READWRITE;
m_nMode = m;
}
@@ -478,7 +478,7 @@ Storage::Storage( StgIo* p, StgDirEntry* q, StreamMode m )
if( q )
q->m_aEntry.GetName( aName );
else
- m &= ~StreamMode(StreamMode::READWRITE);
+ m &= ~StreamMode::READWRITE;
m_nMode = m;
if( q && q->m_nRefCnt == 1 )
q->m_nMode = m;
diff --git a/sot/source/sdstor/stgavl.cxx b/sot/source/sdstor/stgavl.cxx
index b7a3d9f9b2ea..6f627af7e9d0 100644
--- a/sot/source/sdstor/stgavl.cxx
+++ b/sot/source/sdstor/stgavl.cxx
@@ -221,7 +221,7 @@ StgAvlNode* StgAvlNode::Rem( StgAvlNode** p, StgAvlNode* pDel, bool bPtrs )
if( p && *p && pDel )
{
StgAvlNode* pCur = *p;
- short nRes = bPtrs ? short( pCur == pDel ) : short(pCur->Compare( pDel ));
+ short nRes = bPtrs ? short( pCur == pDel ) : pCur->Compare( pDel );
if( !nRes )
{
// Element found: remove
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index 868254f60d79..42cb77684bf1 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -310,9 +310,9 @@ IMPL_LINK( SmFontDialog, FontModifyHdl, Edit&, rEdit, void )
IMPL_LINK_NOARG( SmFontDialog, AttrChangeHdl, Button*, void )
{
if (m_pBoldCheckBox->IsChecked())
- maFont.SetWeight(FontWeight(WEIGHT_BOLD));
+ maFont.SetWeight(WEIGHT_BOLD);
else
- maFont.SetWeight(FontWeight(WEIGHT_NORMAL));
+ maFont.SetWeight(WEIGHT_NORMAL);
if (m_pItalicCheckBox->IsChecked())
maFont.SetItalic(ITALIC_NORMAL);
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index e2d882f011f6..31ba947b106e 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -1048,7 +1048,7 @@ void SAL_CALL SmModel::render(
m_pPrintUIOptions.reset(new SmPrintUIOptions);
m_pPrintUIOptions->processProperties( rxOptions );
- pView->Impl_Print( *pOut, *m_pPrintUIOptions, tools::Rectangle( OutputRect ) );
+ pView->Impl_Print( *pOut, *m_pPrintUIOptions, OutputRect );
// release SmPrintUIOptions when everything is done.
// That way, when SmPrintUIOptions is needed again it will read the latest configuration settings in its c-tor.
diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx
index 6c81fd6af257..33bfe0ef32ee 100644
--- a/store/source/stordata.hxx
+++ b/store/source/stordata.hxx
@@ -39,7 +39,7 @@ namespace store
* OStoreDataPageData.
*
*======================================================================*/
-#define STORE_MAGIC_DATAPAGE sal_uInt32(0x94190310)
+constexpr sal_uInt32 STORE_MAGIC_DATAPAGE(0x94190310);
struct OStoreDataPageData : public store::PageData
{
@@ -123,7 +123,7 @@ public:
* OStoreIndirectionPageData.
*
*======================================================================*/
-#define STORE_MAGIC_INDIRECTPAGE sal_uInt32(0x89191107)
+constexpr sal_uInt32 STORE_MAGIC_INDIRECTPAGE(0x89191107);
struct OStoreIndirectionPageData : public store::PageData
{
diff --git a/store/source/stordir.cxx b/store/source/stordir.cxx
index 399af1d90d42..a4847cbc719e 100644
--- a/store/source/stordir.cxx
+++ b/store/source/stordir.cxx
@@ -63,7 +63,7 @@ static inline sal_Size convertTextToUnicode (
* OStoreDirectory_Impl implementation.
*
*======================================================================*/
-const sal_uInt32 OStoreDirectory_Impl::m_nTypeId = sal_uInt32(0x89191107);
+const sal_uInt32 OStoreDirectory_Impl::m_nTypeId(0x89191107);
/*
* OStoreDirectory_Impl.
diff --git a/store/source/storlckb.cxx b/store/source/storlckb.cxx
index eacfc8b140b7..05297cd38e03 100644
--- a/store/source/storlckb.cxx
+++ b/store/source/storlckb.cxx
@@ -39,7 +39,7 @@ using namespace store;
* OStoreLockBytes implementation.
*
*======================================================================*/
-const sal_uInt32 OStoreLockBytes::m_nTypeId = sal_uInt32(0x94190310);
+const sal_uInt32 OStoreLockBytes::m_nTypeId(0x94190310);
/*
* OStoreLockBytes.
diff --git a/svl/source/filerec/filerec.cxx b/svl/source/filerec/filerec.cxx
index d23eba74ea12..56549abd6580 100644
--- a/svl/source/filerec/filerec.cxx
+++ b/svl/source/filerec/filerec.cxx
@@ -45,15 +45,15 @@
static void lclWriteMiniHeader(SvStream *p, sal_uInt32 nPreTag, sal_uInt32 nStartPos, sal_uInt32 nEndPos)
{
- (*p).WriteUInt32( sal_uInt32(nPreTag) |
+ (*p).WriteUInt32( nPreTag |
sal_uInt32(nEndPos-nStartPos-SFX_REC_HEADERSIZE_MINI) << 8 );
}
static void lclWriteHeader(SvStream *p, sal_uInt32 nRecType, sal_uInt32 nContentTag, sal_uInt32 nContentVer)
{
- (*p).WriteUInt32( sal_uInt32(nRecType) |
- ( sal_uInt32(nContentVer) << 8 ) |
- ( sal_uInt32(nContentTag) << 16 ) );
+ (*p).WriteUInt32( nRecType |
+ ( nContentVer << 8 ) |
+ ( nContentTag << 16 ) );
}
#define SFX_REC_CONTENT_HEADER(nContentVer,n1StStartPos,nCurStartPos) \
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index 1e9fee93487c..1745d1920fbc 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -948,7 +948,7 @@ void BrowseBox::ImplPaintData(OutputDevice& _rOut, const tools::Rectangle& _rRec
if (nY <= aOverallAreaBRPos.Y())
_rOut.DrawLine( Point( nHLineX, nY ),
Point( bVLines
- ? std::min(long(long(aPos.X()) - 1), aOverallAreaBRPos.X())
+ ? std::min(long(aPos.X() - 1), aOverallAreaBRPos.X())
: aOverallAreaBRPos.X(),
nY ) );
_rOut.Pop();
diff --git a/svtools/source/filter/DocumentToGraphicRenderer.cxx b/svtools/source/filter/DocumentToGraphicRenderer.cxx
index 4d1e72f9ff94..a94b8febf3dd 100644
--- a/svtools/source/filter/DocumentToGraphicRenderer.cxx
+++ b/svtools/source/filter/DocumentToGraphicRenderer.cxx
@@ -53,7 +53,7 @@ DocumentToGraphicRenderer::~DocumentToGraphicRenderer()
Size DocumentToGraphicRenderer::getDocumentSizeInPixels(sal_Int32 aCurrentPage)
{
Size aSize100mm = getDocumentSizeIn100mm(aCurrentPage);
- return Size( Application::GetDefaultDevice()->LogicToPixel( aSize100mm, MapUnit::Map100thMM ) );
+ return Application::GetDefaultDevice()->LogicToPixel( aSize100mm, MapUnit::Map100thMM );
}
Size DocumentToGraphicRenderer::getDocumentSizeIn100mm(sal_Int32 aCurrentPage)
diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx
index 503e2bc5f902..a73ff87da1ed 100644
--- a/svx/source/dialog/imapwnd.cxx
+++ b/svx/source/dialog/imapwnd.cxx
@@ -313,7 +313,7 @@ void IMapWindow::SdrObjCreated( const SdrObject& rObj )
tools::Polygon aPoly(pPathObj->GetPathPoly().getB2DPolygon(0L));
delete pPathObj;
- IMapPolygonObject* pObj = new IMapPolygonObject( tools::Polygon(aPoly), "", "", "", "", "", true, false );
+ IMapPolygonObject* pObj = new IMapPolygonObject( aPoly, "", "", "", "", "", true, false );
pObj->SetExtraEllipse( aPoly.GetBoundRect() );
pCircObj->AppendUserData( new IMapUserData( IMapObjectPtr(pObj) ) );
}
diff --git a/svx/source/dialog/langbox.cxx b/svx/source/dialog/langbox.cxx
index 1bb997084716..f6ee80824c03 100644
--- a/svx/source/dialog/langbox.cxx
+++ b/svx/source/dialog/langbox.cxx
@@ -453,7 +453,7 @@ LanguageType SvxLanguageBoxBase::GetSelectLanguage() const
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
return LanguageType( reinterpret_cast<sal_uIntPtr>(ImplGetEntryData(nPos)) );
else
- return LanguageType( LANGUAGE_DONTKNOW );
+ return LANGUAGE_DONTKNOW;
}
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 34ef5f81b31b..cb9cb26a4d1e 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -1558,7 +1558,7 @@ namespace svxform
if ( aDlg->Execute() == RET_OK )
{
- if ( aDlg->GetModifyDoc() != bool( bDocumentData ) )
+ if ( aDlg->GetModifyDoc() != bDocumentData )
{
bDocumentData = aDlg->GetModifyDoc();
try
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 1f4626a2d048..83fdc6285cb6 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -1085,7 +1085,7 @@ bool GalleryTheme::GetURL( sal_uIntPtr nPos, INetURLObject& rURL )
if( pObject )
{
- rURL = INetURLObject( ImplGetURL( pObject ) );
+ rURL = ImplGetURL( pObject );
bRet = true;
}
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index 34e791ab2cee..0c6793f5bd7c 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -599,7 +599,7 @@ namespace svxform
OUString GetName() const { return m_pNameED->GetText(); }
void SetName( const OUString& _rName ) { m_pNameED->SetText( _rName );}
- bool GetModifyDoc() const { return bool( m_pModifyCB->IsChecked() ); }
+ bool GetModifyDoc() const { return m_pModifyCB->IsChecked(); }
void SetModifyDoc( const bool bModify ) { m_pModifyCB->Check( bModify ); }
};
diff --git a/svx/source/styles/CommonStylePreviewRenderer.cxx b/svx/source/styles/CommonStylePreviewRenderer.cxx
index 45360ba89eb9..7de7eef58342 100644
--- a/svx/source/styles/CommonStylePreviewRenderer.cxx
+++ b/svx/source/styles/CommonStylePreviewRenderer.cxx
@@ -146,7 +146,7 @@ bool CommonStylePreviewRenderer::recalculate()
{
const SvxFontHeightItem* pFontHeightItem = static_cast<const SvxFontHeightItem*>(pItem);
Size aFontSize(0, pFontHeightItem->GetHeight());
- maPixelSize = Size(mrOutputDev.LogicToPixel(aFontSize, mrShell.GetMapUnit()));
+ maPixelSize = mrOutputDev.LogicToPixel(aFontSize, mrShell.GetMapUnit());
pFont->SetFontSize(maPixelSize);
vcl::Font aOldFont(mrOutputDev.GetFont());
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index 02d6c50f0797..a469144b4319 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -146,7 +146,7 @@ sal_uInt16 SdrObjGroup::GetObjIdentifier() const
SdrLayerID SdrObjGroup::GetLayer() const
{
bool b1st = true;
- SdrLayerID nLay=SdrLayerID(SdrObject::GetLayer());
+ SdrLayerID nLay = SdrObject::GetLayer();
SdrObjList* pOL=pSub.get();
const size_t nObjCount = pOL->GetObjCount();
for (size_t i=0; i<nObjCount; ++i) {
diff --git a/svx/source/svdraw/svdotxtr.cxx b/svx/source/svdraw/svdotxtr.cxx
index a64c35ab1034..c76f138caba3 100644
--- a/svx/source/svdraw/svdotxtr.cxx
+++ b/svx/source/svdraw/svdotxtr.cxx
@@ -442,7 +442,7 @@ SdrObject* SdrTextObj::ImpConvertMakeObj(const basegfx::B2DPolyPolygon& rPolyPol
}
pPathObj->ImpSetAnchorPos(aAnchor);
- pPathObj->NbcSetLayer(SdrLayerID(GetLayer()));
+ pPathObj->NbcSetLayer(GetLayer());
if(pModel)
{
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index 00ee676799b3..5f6f21368805 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -510,7 +510,7 @@ sal_uInt32 SdrVirtObj::GetPointCount() const
Point SdrVirtObj::GetPoint(sal_uInt32 i) const
{
- return Point(rRefObj.GetPoint(i) + aAnchor);
+ return rRefObj.GetPoint(i) + aAnchor;
}
void SdrVirtObj::NbcSetPoint(const Point& rPnt, sal_uInt32 i)
diff --git a/svx/source/svdraw/textchainflow.cxx b/svx/source/svdraw/textchainflow.cxx
index 98a77d90bdca..3f0f07dea1b8 100644
--- a/svx/source/svdraw/textchainflow.cxx
+++ b/svx/source/svdraw/textchainflow.cxx
@@ -121,7 +121,7 @@ void TextChainFlow::impUpdateCursorInfo()
mbPossiblyCursorOut = bOverflow;
if(mbPossiblyCursorOut ) {
- maOverflowPosSel = ESelection(mpOverflChText->GetOverflowPointSel());
+ maOverflowPosSel = mpOverflChText->GetOverflowPointSel();
ESelection aSelAtUFTime = GetTextChain()->GetPreChainingSel(GetLinkTarget());
// Might be an invalid selection if the cursor at UF time was before
// the (possibly UF-induced) Overflowing point but we don't use it in that case
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 19a41f4e6f2d..2a20d011028e 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -688,8 +688,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
aCropDlgAttr.Put( SvxBrushItem( pObj->GetGraphic(), GPOS_MM, SID_ATTR_GRAF_GRAPHIC ) );
aCropDlgAttr.Put( SvxSizeItem( SID_ATTR_PAGE_SIZE,
- Size( OutputDevice::LogicToLogic(
- Size( 200000, 200000 ), aMap100, aMapTwip ) ) ) );
+ OutputDevice::LogicToLogic(
+ Size( 200000, 200000 ), aMap100, aMapTwip ) ) );
aCropDlgAttr.Put( SvxSizeItem( SID_ATTR_GRAF_FRMSIZE, OutputDevice::LogicToLogic(
pObj->GetLogicRect().GetSize(), aMap100, aMapTwip ) ) );
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index b90927a7326e..4c4b7305b147 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2127,7 +2127,7 @@ IMPL_LINK_NOARG(SvxLineWindow_Impl, SelectHdl, ListBox&, void)
VclPtr<SvxLineWindow_Impl> xThis(this);
SvxLineItem aLineItem( SID_FRAME_LINESTYLE );
- SvxBorderLineStyle nStyle = SvxBorderLineStyle( m_aLineStyleLb->GetSelectEntryStyle() );
+ SvxBorderLineStyle nStyle = m_aLineStyleLb->GetSelectEntryStyle();
if ( m_aLineStyleLb->GetSelectEntryPos( ) > 0 )
{
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index b00726280c67..906b21a25e58 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -572,7 +572,7 @@ void ChineseDictionaryDialog::dispose()
void ChineseDictionaryDialog::setDirectionAndTextConversionOptions( bool bDirectionToSimplified, sal_Int32 nTextConversionOptions /*i18n::TextConversionOption*/ )
{
- if( bDirectionToSimplified == bool(m_pRB_To_Simplified->IsChecked())
+ if( bDirectionToSimplified == m_pRB_To_Simplified->IsChecked()
&& nTextConversionOptions == m_nTextConversionOptions )
return;
diff --git a/svx/source/unogallery/unogalitem.cxx b/svx/source/unogallery/unogalitem.cxx
index 4a71280cd9ec..6de4a988eb41 100644
--- a/svx/source/unogallery/unogalitem.cxx
+++ b/svx/source/unogallery/unogalitem.cxx
@@ -261,7 +261,7 @@ void GalleryItem::_getPropertyValues( const comphelper::PropertyMapEntry** ppEnt
{
case UNOGALLERY_GALLERYITEMTYPE:
{
- *pValue <<= sal_Int8( getType() );
+ *pValue <<= getType();
}
break;
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index d876736f8076..22d010796da9 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -362,7 +362,7 @@ void SwTiledRenderingTest::testGetTextSelection()
CPPUNIT_ASSERT_EQUAL(OString("Hello"), pXTextDocument->getTextSelection("text/plain;charset=utf-8", aUsedFormat));
// Make sure we produce something for HTML.
- CPPUNIT_ASSERT(!OString(pXTextDocument->getTextSelection("text/html", aUsedFormat)).isEmpty());
+ CPPUNIT_ASSERT(!pXTextDocument->getTextSelection("text/html", aUsedFormat).isEmpty());
// Now select some shape text and check again.
SdrPage* pPage = pWrtShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0);
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 09992bf5df48..e0f1d8e12ed0 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -323,7 +323,7 @@ namespace sw { namespace mark
{
SwDoc *const pDoc( GetMarkPos().GetDoc() );
assert(pDoc);
- return !pDoc->IsInHeaderFooter( SwNodeIndex(GetMarkPos().nNode) );
+ return !pDoc->IsInHeaderFooter( GetMarkPos().nNode );
}
uno::Reference< rdf::XMetadatable > Bookmark::MakeUnoObject()
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 9bb337506f90..5c620cafc4d3 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -2475,7 +2475,7 @@ Point SwDrawVirtObj::GetSnapPoint(sal_uInt32 i) const
Point SwDrawVirtObj::GetPoint(sal_uInt32 i) const
{
- return Point(rRefObj.GetPoint(i) + GetOffset());
+ return rRefObj.GetPoint(i) + GetOffset();
}
void SwDrawVirtObj::NbcSetPoint(const Point& rPnt, sal_uInt32 i)
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 6b458fe418c7..498a5a1d44d9 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -493,7 +493,7 @@ void SwAuthorityFieldType::SetSortKeys(sal_uInt16 nKeyCount, SwTOXSortKey aKeys[
m_SortKeyArr.clear();
for(sal_uInt16 i = 0; i < nKeyCount; i++)
if(aKeys[i].eField < AUTH_FIELD_END)
- m_SortKeyArr.push_back(SwTOXSortKey(aKeys[i]));
+ m_SortKeyArr.push_back(aKeys[i]);
}
SwAuthorityField::SwAuthorityField( SwAuthorityFieldType* pInitType,
diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx
index 4b79a357771f..d0c7f320dfc7 100644
--- a/sw/source/core/layout/anchoredobject.cxx
+++ b/sw/source/core/layout/anchoredobject.cxx
@@ -575,7 +575,7 @@ const SwRect& SwAnchoredObject::GetObjRectWithSpaces() const
const SvxLRSpaceItem& rLR = rFormat.GetLRSpace();
{
maObjRectWithSpaces.Top ( std::max( maObjRectWithSpaces.Top() - long(rUL.GetUpper()), 0L ));
- maObjRectWithSpaces.Left( std::max( maObjRectWithSpaces.Left()- long(rLR.GetLeft()), 0L ));
+ maObjRectWithSpaces.Left( std::max( maObjRectWithSpaces.Left()- rLR.GetLeft(), 0L ));
maObjRectWithSpaces.SSize().Height() += rUL.GetLower();
maObjRectWithSpaces.SSize().Width() += rLR.GetRight();
}
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index df8f3a6f84fe..8ad675b77590 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -745,7 +745,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
aOld.Top( std::max( aOld.Top() - long(rUL.GetUpper()), 0L ) );
aOld.SSize().Height()+= rUL.GetLower();
const SvxLRSpaceItem &rLR = static_cast<const SwFormatChg*>(pOld)->pChangedFormat->GetLRSpace();
- aOld.Left ( std::max( aOld.Left() - long(rLR.GetLeft()), 0L ) );
+ aOld.Left ( std::max( aOld.Left() - rLR.GetLeft(), 0L ) );
aOld.SSize().Width() += rLR.GetRight();
aNew.Union( aOld );
NotifyBackground( FindPageFrame(), aNew, PREP_CLEAR );
@@ -850,7 +850,7 @@ void SwFlyFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
else
{
const SvxLRSpaceItem &rLR = *static_cast<const SvxLRSpaceItem*>(pNew);
- aOld.Left ( std::max( aOld.Left() - long(rLR.GetLeft()), 0L ) );
+ aOld.Left ( std::max( aOld.Left() - rLR.GetLeft(), 0L ) );
aOld.SSize().Width() += rLR.GetRight();
}
}
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 59f9e82fd78f..47b10ca812d2 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -419,7 +419,7 @@ void SwFlyFreeFrame::CheckClip( const SwFormatFrameSize &rSz )
// otherwise we'll end up with unwanted side-effects/oscillations
const long nPrtHeightDiff = Frame().Height() - Prt().Height();
const long nPrtWidthDiff = Frame().Width() - Prt().Width();
- maUnclippedFrame = SwRect( Frame() );
+ maUnclippedFrame = Frame();
Frame().Height( aFrameRect.Height() );
Frame().Width ( std::max( long(MINLAY), aFrameRect.Width() ) );
if ( Lower() && Lower()->IsColumnFrame() )
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 008e26f9efef..515e0d523bd9 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5107,7 +5107,7 @@ void PaintCharacterBorder(
if( aShadow.GetLocation() != SvxShadowLocation::NONE )
{
- lcl_PaintShadow( SwRect(aAlignedRect), aAlignedRect, aShadow,
+ lcl_PaintShadow( aAlignedRect, aAlignedRect, aShadow,
false, bTop, bBottom, bLeft, bRight, gProp);
}
}
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 18c26d55c591..2b51799c566c 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -1402,7 +1402,7 @@ void SwTextFrame::FillCursorPos( SwFillData& rFill ) const
nFirst = nFirst - nDist;
else
nFirst = 0;
- nDist = std::max( nDist, long( GetLineSpace() ) );
+ nDist = std::max( nDist, GetLineSpace() );
nDist += nLineHeight;
nDiff -= nFirst;
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index bd1890620c4e..42245d3a5e7a 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -1774,7 +1774,7 @@ void SwTextFormatter::CalcRealHeight( bool bNewLine )
break;
case SvxLineSpaceRule::Min:
{
- if( nLineHeight < sal_uInt16( pSpace->GetLineHeight() ) )
+ if( nLineHeight < pSpace->GetLineHeight() )
nLineHeight = pSpace->GetLineHeight();
break;
}
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 8617a3b80db4..8f02ce2fe8b8 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1985,7 +1985,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
}
if ( rInf.GetKern() && nLn )
- aTextSize.Width() += ( nLn - 1 ) * long( rInf.GetKern() );
+ aTextSize.Width() += ( nLn - 1 ) * rInf.GetKern();
OSL_ENSURE( !rInf.GetShell() ||
( USHRT_MAX != GetGuessedLeading() && USHRT_MAX != GetExternalLeading() ),
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index fb7cf356e1d7..30e4282858db 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -1337,11 +1337,11 @@ void SwHTMLParser::NewForm( bool bAppend )
xFormPropSet->setPropertyValue("TargetURL",
aTmp );
- aTmp <<= FormSubmitMethod(nMethod);
+ aTmp <<= nMethod;
xFormPropSet->setPropertyValue("SubmitMethod",
aTmp );
- aTmp <<= FormSubmitEncoding(nEncType);
+ aTmp <<= nEncType;
xFormPropSet->setPropertyValue("SubmitEncoding", aTmp );
if( !sTarget.isEmpty() )
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 8e97812d3a20..d7dbd1d575bf 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -8016,16 +8016,16 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
// otherwise - 'right' is checked if it is default and if it is non-default - all the values except for 'bottom' will be written
// and so on.
OStringBuffer aInset;
- if(!aInset.isEmpty() || fDistanceBottomInch != double(0.05))
+ if(!aInset.isEmpty() || fDistanceBottomInch != 0.05)
aInset.insert(0, "," + OString::number(fDistanceBottomInch) + "in");
- if(!aInset.isEmpty() || fDistanceRightInch != double(0.1))
+ if(!aInset.isEmpty() || fDistanceRightInch != 0.1)
aInset.insert(0, "," + OString::number(fDistanceRightInch) + "in");
- if(!aInset.isEmpty() || fDistanceTopInch != double(0.05))
+ if(!aInset.isEmpty() || fDistanceTopInch != 0.05)
aInset.insert(0, "," + OString::number(fDistanceTopInch) + "in");
- if(!aInset.isEmpty() || fDistanceLeftInch != double(0.1))
+ if(!aInset.isEmpty() || fDistanceLeftInch != 0.1)
aInset.insert(0, OString::number(fDistanceLeftInch) + "in");
if (!aInset.isEmpty())
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 69cd9444a85d..e06585d4ee5a 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -1077,7 +1077,7 @@ void DocxExport::WriteGlossary()
gId = gId.copy(3); //"rId" only save the numeric value
PropertySet aProps(xOutputStream);
- aProps.setAnyProperty( PROP_RelId, uno::makeAny( sal_Int32( gId.toInt32() )));
+ aProps.setAnyProperty( PROP_RelId, uno::makeAny( gId.toInt32() ));
m_pFilter->addRelation( xOutputStream, gType, gTarget);
uno::Reference< xml::sax::XSAXSerializable > gserializer( xDom, uno::UNO_QUERY );
writer->setOutputStream(GetFilter().openFragmentStream( "word/glossary/" + gTarget, contentType ) );
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index dd44481799e8..ee3b0ae1476c 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -1069,7 +1069,7 @@ void DocxSdrExport::writeDiagramRels(const uno::Sequence< uno::Sequence< uno::An
sFragment += sGrabBagProperyName + OUString::number(nAnchorId) + "_" + OUString::number(j) + sExtension;
PropertySet aProps(xOutStream);
- aProps.setAnyProperty(PROP_RelId, uno::makeAny(sal_Int32(sRelId.toInt32())));
+ aProps.setAnyProperty(PROP_RelId, uno::makeAny(sRelId.toInt32()));
m_pImpl->m_rExport.GetFilter().addRelation(xOutStream, sType, sFragment);
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 82ab2d2509ac..8a6dbdbe113b 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1719,9 +1719,9 @@ void lcl_TextFrameShadow(std::vector< std::pair<OString, OString> >& rFlyPropert
break;
}
if (!aOffsetX.isEmpty())
- rFlyProperties.push_back(std::make_pair<OString, OString>("shadowOffsetX", OString(aOffsetX)));
+ rFlyProperties.emplace_back( "shadowOffsetX", aOffsetX );
if (!aOffsetY.isEmpty())
- rFlyProperties.push_back(std::make_pair<OString, OString>("shadowOffsetY", OString(aOffsetY)));
+ rFlyProperties.emplace_back( "shadowOffsetY", aOffsetY );
}
void lcl_TextFrameRelativeSize(std::vector< std::pair<OString, OString> >& rFlyProperties, const SwFrameFormat& rFrameFormat)
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 8315e3d7af62..35433cd7d119 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2124,7 +2124,7 @@ void WW8AttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_
if ( SvxFrameDirection::Vertical_RL_TB == m_rWW8Export.TrueFrameDirection( *pFrameFormat ) )
{
m_rWW8Export.InsUInt16( NS_sprm::sprmTTextFlow );
- m_rWW8Export.pO->push_back( sal_uInt8(n) ); //start range
+ m_rWW8Export.pO->push_back( n ); //start range
m_rWW8Export.pO->push_back( sal_uInt8(n + 1) ); //end range
m_rWW8Export.InsUInt16( 5 ); //Equals vertical writing
}
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 61ffc364c731..473cea4543b6 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -733,7 +733,7 @@ IMPL_LINK_NOARG( SwColumnPage, UpdateColMgr, Edit&, void )
else
{
m_pColMgr->SetLineWidthAndColor(
- SvxBorderLineStyle( m_pLineTypeDLB->GetSelectEntryStyle( ) ),
+ m_pLineTypeDLB->GetSelectEntryStyle(),
nLineWidth,
m_pLineColorDLB->GetSelectEntryColor() );
m_pColMgr->SetAdjust( SwColLineAdj(
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 65f5829dc936..f23964aa1378 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -253,7 +253,7 @@ bool SwFootNotePage::FillItemSet(SfxItemSet *rSet)
m_pLineDistEdit->Denormalize(m_pLineDistEdit->GetValue(FUNIT_TWIP))));
// Separator style
- rFootnoteInfo.SetLineStyle( SvxBorderLineStyle( m_pLineTypeBox->GetSelectEntryStyle() ) );
+ rFootnoteInfo.SetLineStyle( m_pLineTypeBox->GetSelectEntryStyle() );
// Separator width
long nWidth = static_cast<long>(MetricField::ConvertDoubleValue(
diff --git a/sw/source/ui/vba/vbacolumn.cxx b/sw/source/ui/vba/vbacolumn.cxx
index ffa15ce28181..89ef096d97c1 100644
--- a/sw/source/ui/vba/vbacolumn.cxx
+++ b/sw/source/ui/vba/vbacolumn.cxx
@@ -67,7 +67,7 @@ void SwVbaColumn::SelectColumn( const uno::Reference< frame::XModel >& xModel, c
aRangeName.append(sStartCol).append(sal_Int32( 1 ) );
OUString sEndCol = SwVbaTableHelper::getColumnStr( nEndColumn );
sal_Int32 nRowCount = xTextTable->getRows()->getCount();
- aRangeName.append(':').append( sEndCol ).append( sal_Int32( nRowCount ) );
+ aRangeName.append(':').append( sEndCol ).append( nRowCount );
uno::Reference< table::XCellRange > xCellRange( xTextTable, uno::UNO_QUERY_THROW );
OUString sSelRange = aRangeName.makeStringAndClear();
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 4cb22e077ef8..f5c6316ddbac 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -743,7 +743,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
}
else
- ErrorHandler::HandleError(ErrCode( eErr ));
+ ErrorHandler::HandleError( eErr );
}
else
{
@@ -820,7 +820,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
}
else
- ErrorHandler::HandleError(ErrCode( eErr ));
+ ErrorHandler::HandleError( eErr );
}
break;
case SID_SPELLCHECKER_CHANGED:
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 4615824bccc3..a21b3648dd72 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1883,7 +1883,7 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
}
else if( aObjDesc.maSize.Width() && aObjDesc.maSize.Height() )
{
- aSize = Size( aObjDesc.maSize ); //always 100TH_MM
+ aSize = aObjDesc.maSize; //always 100TH_MM
MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( aObjDesc.mnViewAspect ) );
aSize = OutputDevice::LogicToLogic( aSize, MapUnit::Map100thMM, aUnit );
awt::Size aSz;
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index e8dd1a8ce4ea..460dce33e3b5 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -108,14 +108,14 @@ void SwView::SetZoom_( const Size &rEditSize, SvxZoomType eZoomType,
if( UseOnPage::Mirror == rDesc.GetUseOn() ) // mirrored pages
{
const SvxLRSpaceItem &rLeftLRSpace = rDesc.GetLeft().GetLRSpace();
- aPageSize.Width() += std::abs( long(rLeftLRSpace.GetLeft()) - long(rLRSpace.GetLeft()) );
+ aPageSize.Width() += std::abs( rLeftLRSpace.GetLeft() - rLRSpace.GetLeft() );
}
if( SvxZoomType::OPTIMAL == eZoomType )
{
if (!pPostItMgr->HasNotes() || !pPostItMgr->ShowNotes())
aPageSize.Width() -= ( rLRSpace.GetLeft() + rLRSpace.GetRight() + nLeftOfst * 2 );
- lLeftMargin = long(rLRSpace.GetLeft()) + DOCUMENTBORDER + nLeftOfst;
+ lLeftMargin = rLRSpace.GetLeft() + DOCUMENTBORDER + nLeftOfst;
nFac = aWindowSize.Width() * 100 / aPageSize.Width();
}
else if(SvxZoomType::WHOLEPAGE == eZoomType || SvxZoomType::PAGEWIDTH == eZoomType )
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index 3b3ff0ba371e..c94038539893 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -846,7 +846,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
!m_pSrchItem->GetPattern(),
rOptions.eStart,
rOptions.eEnd,
- FindRanges(eRanges),
+ eRanges,
!m_pSrchItem->GetSearchString().isEmpty() ? &aSearchOpt : nullptr,
pReplSet );
}
@@ -857,7 +857,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
nFound = m_pWrtShell->SearchTempl( m_pSrchItem->GetSearchString(),
rOptions.eStart,
rOptions.eEnd,
- FindRanges(eRanges),
+ eRanges,
bDoReplace ? &sRplStr : nullptr );
}
else
@@ -866,7 +866,7 @@ sal_uLong SwView::FUNC_Search( const SwSearchOptions& rOptions )
nFound = m_pWrtShell->SearchPattern(aSearchOpt, m_pSrchItem->GetNotes(),
rOptions.eStart,
rOptions.eEnd,
- FindRanges(eRanges),
+ eRanges,
bDoReplace );
}
m_pWrtShell->EndSelect();
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 1e85f5fca224..7eff56c3f7e0 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -1127,7 +1127,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
XFillColorItem aColorItem( static_cast<const XFillColorItem&>(pReqArgs->Get( XATTR_FILLCOLOR )) );
rMaster.SetFormatAttr( XFillStyleItem( drawing::FillStyle_SOLID ) );
- rMaster.SetFormatAttr( XFillColorItem( aColorItem ));
+ rMaster.SetFormatAttr( aColorItem );
}
break;
@@ -1135,7 +1135,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
XFillGradientItem aGradientItem( static_cast<const XFillGradientItem&>(pReqArgs->Get( XATTR_FILLGRADIENT )) );
rMaster.SetFormatAttr( XFillStyleItem( drawing::FillStyle_GRADIENT ) );
- rMaster.SetFormatAttr( XFillGradientItem( aGradientItem ) );
+ rMaster.SetFormatAttr( aGradientItem );
}
break;
@@ -1143,7 +1143,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
XFillHatchItem aHatchItem( static_cast<const XFillHatchItem&>(pReqArgs->Get( XATTR_FILLHATCH )) );
rMaster.SetFormatAttr( XFillStyleItem( drawing::FillStyle_HATCH ) );
- rMaster.SetFormatAttr( XFillHatchItem( aHatchItem ));
+ rMaster.SetFormatAttr( aHatchItem );
}
break;
@@ -1151,7 +1151,7 @@ void SwView::ExecTabWin( SfxRequest& rReq )
{
XFillBitmapItem aBitmapItem( static_cast<const XFillBitmapItem&>(pReqArgs->Get( XATTR_FILLBITMAP )) );
rMaster.SetFormatAttr( XFillStyleItem( drawing::FillStyle_BITMAP ) );
- rMaster.SetFormatAttr( XFillBitmapItem( aBitmapItem ));
+ rMaster.SetFormatAttr( aBitmapItem );
}
break;
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 8ca7de9664ab..84c3bd32ec04 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -2063,7 +2063,7 @@ void SAL_CALL VCLXListBox::listItemInserted( const ItemListEvent& i_rEvent )
VclPtr< ListBox > pListBox = GetAs< ListBox >();
ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemInserted: no ListBox?!" );
- ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition <= sal_Int32( pListBox->GetEntryCount() ) ),
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition <= pListBox->GetEntryCount() ),
"VCLXListBox::listItemInserted: illegal (inconsistent) item position!" );
pListBox->InsertEntry(
i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : OUString(),
@@ -2077,7 +2077,7 @@ void SAL_CALL VCLXListBox::listItemRemoved( const ItemListEvent& i_rEvent )
VclPtr< ListBox > pListBox = GetAs< ListBox >();
ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemRemoved: no ListBox?!" );
- ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < sal_Int32( pListBox->GetEntryCount() ) ),
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < pListBox->GetEntryCount() ),
"VCLXListBox::listItemRemoved: illegal (inconsistent) item position!" );
pListBox->RemoveEntry( i_rEvent.ItemPosition );
@@ -2089,7 +2089,7 @@ void SAL_CALL VCLXListBox::listItemModified( const ItemListEvent& i_rEvent )
VclPtr< ListBox > pListBox = GetAs< ListBox >();
ENSURE_OR_RETURN_VOID( pListBox, "VCLXListBox::listItemModified: no ListBox?!" );
- ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < sal_Int32( pListBox->GetEntryCount() ) ),
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < pListBox->GetEntryCount() ),
"VCLXListBox::listItemModified: illegal (inconsistent) item position!" );
// VCL's ListBox does not support changing an entry's text or image, so remove and re-insert
@@ -4503,7 +4503,7 @@ void SAL_CALL VCLXComboBox::listItemInserted( const ItemListEvent& i_rEvent )
VclPtr< ComboBox > pComboBox = GetAsDynamic< ComboBox >();
ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemInserted: no ComboBox?!" );
- ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition <= sal_Int32( pComboBox->GetEntryCount() ) ),
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition <= pComboBox->GetEntryCount() ),
"VCLXComboBox::listItemInserted: illegal (inconsistent) item position!" );
pComboBox->InsertEntryWithImage(
i_rEvent.ItemText.IsPresent ? i_rEvent.ItemText.Value : OUString(),
@@ -4518,7 +4518,7 @@ void SAL_CALL VCLXComboBox::listItemRemoved( const ItemListEvent& i_rEvent )
VclPtr< ComboBox > pComboBox = GetAsDynamic< ComboBox >();
ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemRemoved: no ComboBox?!" );
- ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < sal_Int32( pComboBox->GetEntryCount() ) ),
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < pComboBox->GetEntryCount() ),
"VCLXComboBox::listItemRemoved: illegal (inconsistent) item position!" );
pComboBox->RemoveEntryAt( i_rEvent.ItemPosition );
@@ -4531,7 +4531,7 @@ void SAL_CALL VCLXComboBox::listItemModified( const ItemListEvent& i_rEvent )
VclPtr< ComboBox > pComboBox = GetAsDynamic< ComboBox >();
ENSURE_OR_RETURN_VOID( pComboBox, "VCLXComboBox::listItemModified: no ComboBox?!" );
- ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < sal_Int32( pComboBox->GetEntryCount() ) ),
+ ENSURE_OR_RETURN_VOID( ( i_rEvent.ItemPosition >= 0 ) && ( i_rEvent.ItemPosition < pComboBox->GetEntryCount() ),
"VCLXComboBox::listItemModified: illegal (inconsistent) item position!" );
// VCL's ComboBox does not support changing an entry's text or image, so remove and re-insert
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 12626d44df13..e3d405bfbce3 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -606,7 +606,7 @@ sal_Unicode const * scanParameters(sal_Unicode const * pBegin,
}
bool bPresent = std::any_of(aList.begin(), aList.end(),
- Parameter::IsSameSection({aAttribute, nSection}));
+ Parameter::IsSameSection{aAttribute, nSection});
if (bPresent)
break;
diff --git a/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx b/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
index df1e99aad052..ec4497c78c63 100644
--- a/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx
@@ -75,7 +75,7 @@ namespace
}
buf.append( inXML.copy( start ) );
- return OString( buf.makeStringAndClear() );
+ return buf.makeStringAndClear();
}
}
diff --git a/ucbhelper/source/provider/providerhelper.cxx b/ucbhelper/source/provider/providerhelper.cxx
index fee706d11d28..9547ece9a982 100644
--- a/ucbhelper/source/provider/providerhelper.cxx
+++ b/ucbhelper/source/provider/providerhelper.cxx
@@ -265,9 +265,8 @@ ContentProviderImplHelper::getAdditionalPropertySet(
if ( m_pImpl->m_xPropertySetRegistry.is() )
{
// Open/create persistent property set.
- return uno::Reference< css::ucb::XPersistentPropertySet >(
- m_pImpl->m_xPropertySetRegistry->openPropertySet(
- rKey, bCreate ) );
+ return m_pImpl->m_xPropertySetRegistry->openPropertySet(
+ rKey, bCreate );
}
return uno::Reference< css::ucb::XPersistentPropertySet >();
diff --git a/ucbhelper/source/provider/resultset.cxx b/ucbhelper/source/provider/resultset.cxx
index 3264e9049234..9a8f7bb1bfd8 100644
--- a/ucbhelper/source/provider/resultset.cxx
+++ b/ucbhelper/source/provider/resultset.cxx
@@ -1511,7 +1511,7 @@ XTYPEPROVIDER_IMPL_2( PropertySetInfo,
// virtual
uno::Sequence< beans::Property > SAL_CALL PropertySetInfo::getProperties()
{
- return uno::Sequence< beans::Property >( *m_pProps );
+ return *m_pProps;
}
diff --git a/vcl/opengl/LineRenderUtils.cxx b/vcl/opengl/LineRenderUtils.cxx
index bdf28b1120d1..3418a5c06e65 100644
--- a/vcl/opengl/LineRenderUtils.cxx
+++ b/vcl/opengl/LineRenderUtils.cxx
@@ -35,10 +35,10 @@ void LineBuilder::appendLineSegment(const glm::vec2& rPoint1, const glm::vec2& r
GLuint zero = mrVertices.size();
mrVertices.insert(mrVertices.end(), {
- Vertex{rPoint1, glm::vec4{mR, mG, mB, mA}, glm::vec4{-rNormal1.x, -rNormal1.y, -aExtrusion1, mfLineWidthAndAA}},
- Vertex{rPoint1, glm::vec4{mR, mG, mB, mA}, glm::vec4{ rNormal1.x, rNormal1.y, aExtrusion1, mfLineWidthAndAA}},
- Vertex{rPoint2, glm::vec4{mR, mG, mB, mA}, glm::vec4{-rNormal2.x, -rNormal2.y, -aExtrusion2, mfLineWidthAndAA}},
- Vertex{rPoint2, glm::vec4{mR, mG, mB, mA}, glm::vec4{ rNormal2.x, rNormal2.y, aExtrusion2, mfLineWidthAndAA}},
+ {rPoint1, glm::vec4{mR, mG, mB, mA}, glm::vec4{-rNormal1.x, -rNormal1.y, -aExtrusion1, mfLineWidthAndAA}},
+ {rPoint1, glm::vec4{mR, mG, mB, mA}, glm::vec4{ rNormal1.x, rNormal1.y, aExtrusion1, mfLineWidthAndAA}},
+ {rPoint2, glm::vec4{mR, mG, mB, mA}, glm::vec4{-rNormal2.x, -rNormal2.y, -aExtrusion2, mfLineWidthAndAA}},
+ {rPoint2, glm::vec4{mR, mG, mB, mA}, glm::vec4{ rNormal2.x, rNormal2.y, aExtrusion2, mfLineWidthAndAA}},
});
mrIndices.insert(mrIndices.end(), {
@@ -62,8 +62,8 @@ void LineBuilder::appendAndConnectLinePoint(const glm::vec2& rPoint, const glm::
GLuint zero = mrVertices.size();
mrVertices.insert(mrVertices.end(), {
- Vertex{rPoint, glm::vec4{mR, mG, mB, mA}, glm::vec4{-aNormal.x, -aNormal.y, -aExtrusion, mfLineWidthAndAA}},
- Vertex{rPoint, glm::vec4{mR, mG, mB, mA}, glm::vec4{ aNormal.x, aNormal.y, aExtrusion, mfLineWidthAndAA}},
+ {rPoint, glm::vec4{mR, mG, mB, mA}, glm::vec4{-aNormal.x, -aNormal.y, -aExtrusion, mfLineWidthAndAA}},
+ {rPoint, glm::vec4{mR, mG, mB, mA}, glm::vec4{ aNormal.x, aNormal.y, aExtrusion, mfLineWidthAndAA}},
});
if (mnInitialIndexSize == mrIndices.size())
diff --git a/vcl/opengl/RenderList.cxx b/vcl/opengl/RenderList.cxx
index dd6502e8ce57..6c60a1f74df2 100644
--- a/vcl/opengl/RenderList.cxx
+++ b/vcl/opengl/RenderList.cxx
@@ -159,10 +159,10 @@ inline void appendTrapezoid(std::vector<Vertex>& rVertices, std::vector<GLuint>&
GLuint zero = rVertices.size();
rVertices.insert(rVertices.end(), {
- Vertex{glm::vec2{x1, y1}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
- Vertex{glm::vec2{x2, y2}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
- Vertex{glm::vec2{x3, y3}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
- Vertex{glm::vec2{x4, y4}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
+ {glm::vec2{x1, y1}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
+ {glm::vec2{x2, y2}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
+ {glm::vec2{x3, y3}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
+ {glm::vec2{x4, y4}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
});
rIndices.insert(rIndices.end(), {
@@ -181,10 +181,10 @@ void appendRectangle(std::vector<Vertex>& rVertices, std::vector<GLuint>& rIndic
GLuint zero = rVertices.size();
rVertices.insert(rVertices.end(), {
- Vertex{glm::vec2{x1, y1}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
- Vertex{glm::vec2{x2, y1}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
- Vertex{glm::vec2{x1, y2}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
- Vertex{glm::vec2{x2, y2}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
+ {glm::vec2{x1, y1}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
+ {glm::vec2{x2, y1}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
+ {glm::vec2{x1, y2}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
+ {glm::vec2{x2, y2}, glm::vec4{nR, nG, nB, nA}, glm::vec4{0.0f, 0.0f, 0.0f, 0.0f}},
});
rIndices.insert(rIndices.end(), {
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 406cf2d9faba..e31582511652 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2409,7 +2409,7 @@ void Edit::SetEchoChar( sal_Unicode c )
void Edit::SetReadOnly( bool bReadOnly )
{
- if ( mbReadOnly != bool(bReadOnly) )
+ if ( mbReadOnly != bReadOnly )
{
mbReadOnly = bReadOnly;
if ( mpSubEdit )
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index f462a600b237..96b8ffce552d 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -130,7 +130,7 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW
ControlState::ENABLED, rSpinbuttonValue, OUString());
if (!pWin->SupportsDoubleBuffering())
- pBorder->SetClipRegion(vcl::Region(oldRgn));
+ pBorder->SetClipRegion(oldRgn);
}
}
return bNativeOK;
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index dc3666978fb7..a4792ca4b1a6 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -733,7 +733,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
aMask.GetColorAndAlphaFor32Bit( aColor, aAlpha, reinterpret_cast<sal_uInt8*>(pTmp32++) );
rAcc.SetPixel(nY, nX, SanitizeColor(aColor, bForceToMonoWhileReading));
pAccAlpha->SetPixelIndex(nY, nX, sal_uInt8(0xff) - aAlpha);
- rAlphaUsed |= bool(0xff != aAlpha);
+ rAlphaUsed |= 0xff != aAlpha;
}
}
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 22628af4b90d..5384204e4dc5 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1398,7 +1398,7 @@ void PDFWriterImpl::PDFPage::appendPixelPoint( const basegfx::B2DPoint& rPoint,
appendDouble( fValue, rBuffer, nLog10Divisor );
rBuffer.append( ' ' );
- fValue = double(getHeight()) - pixelToPoint(rPoint.getY());
+ fValue = getHeight() - pixelToPoint(rPoint.getY());
appendDouble( fValue, rBuffer, nLog10Divisor );
}
@@ -11958,7 +11958,7 @@ void PDFWriterImpl::drawWallpaper( const tools::Rectangle& rRect, const Wallpape
else
{
// push the bitmap
- const BitmapEmit& rEmit = createBitmapEmit( BitmapEx( aBitmap ), Graphic() );
+ const BitmapEmit& rEmit = createBitmapEmit( aBitmap, Graphic() );
// convert to page coordinates; this needs to be done here
// since the emit does not know the page anymore
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 0df373e02a10..12654bf6c0db 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -187,7 +187,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl, void*, void)
!(aState.mnState & KEY_MOD1) && // i43499 CTRL disables docking now
bRealMove )
{
- maDockPos = Point( pDockingArea->OutputToScreenPixel( pDockingArea->AbsoluteScreenToOutputPixel( OutputToAbsoluteScreenPixel( Point() ) ) ) );
+ maDockPos = pDockingArea->OutputToScreenPixel( pDockingArea->AbsoluteScreenToOutputPixel( OutputToAbsoluteScreenPixel( Point() ) ) );
maDockRect = tools::Rectangle( maDockPos, mpDockWin->GetSizePixel() );
// mouse pos in screen pixels
@@ -726,7 +726,7 @@ bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos )
// mouse pos in screen pixels
Point aMousePos = pDockingArea->OutputToScreenPixel( aState.maPos );
- Point aDockPos = Point( pDockingArea->AbsoluteScreenToOutputPixel( GetWindow()->OutputToAbsoluteScreenPixel( GetWindow()->GetPosPixel() ) ) );
+ Point aDockPos = pDockingArea->AbsoluteScreenToOutputPixel( GetWindow()->OutputToAbsoluteScreenPixel( GetWindow()->GetPosPixel() ) );
tools::Rectangle aDockRect( aDockPos, GetWindow()->GetSizePixel() );
StartDocking( aMousePos, aDockRect );
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index a6e828fe2d3c..4c2dda5b79e5 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -154,7 +154,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin, DockingHdl, void*, void)
( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) &&
!(aState.mnState & KEY_MOD1) ) // i43499 CTRL disables docking now
{
- maDockPos = Point( mpDockWin->GetParent()->AbsoluteScreenToOutputPixel( OutputToAbsoluteScreenPixel( Point() ) ) );
+ maDockPos = mpDockWin->GetParent()->AbsoluteScreenToOutputPixel( OutputToAbsoluteScreenPixel( Point() ) );
maDockPos = mpDockWin->GetParent()->OutputToScreenPixel( maDockPos ); // sfx expects screen coordinates
if( ! mpDockWin->IsDocking() )
@@ -591,7 +591,7 @@ void DockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
if ( !IsDockingCanceled() )
{
bool bShow = false;
- if ( bool(bFloatMode) != IsFloatingMode() )
+ if ( bFloatMode != IsFloatingMode() )
{
Show( false, ShowFlags::NoFocusChange );
SetFloatingMode( bFloatMode );
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 71de988dfed7..ddca40f52d5c 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -453,8 +453,8 @@ Point FloatingWindow::ImplConvertToAbsPos(vcl::Window* pReference, const Point&
aAbsolute = aRect.TopLeft();
}
else
- aAbsolute = Point( pReference->OutputToAbsoluteScreenPixel(
- pReference->ScreenToOutputPixel(rPos) ) );
+ aAbsolute = pReference->OutputToAbsoluteScreenPixel(
+ pReference->ScreenToOutputPixel(rPos) );
return aAbsolute;
}
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 9dea04a8e4ed..6aef0dbafd69 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -301,7 +301,7 @@ void PrintDialog::PrintPreviewWindow::preparePreviewBitmap()
SetMapMode( MapUnit::MapPixel );
maPageVDev->SetMapMode( MapUnit::MapPixel );
- maPreviewBitmap = Bitmap(maPageVDev->GetBitmap(Point(0, 0), aVDevSize));
+ maPreviewBitmap = maPageVDev->GetBitmap(Point(0, 0), aVDevSize);
maPageVDev->SetDrawMode( nOldDrawMode );
}
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index e4ee8a3dc648..c4643dabbad8 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -452,7 +452,7 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& rRenderContext, cons
long nFullWidth = (nPrgsWidth + nOffset) * (10000 / nPercentCount);
long nPerc = (nPercent2 > 10000) ? 10000 : nPercent2;
- ImplControlValue aValue(nFullWidth * long(nPerc) / 10000);
+ ImplControlValue aValue(nFullWidth * nPerc / 10000);
tools::Rectangle aDrawRect(rPos, Size(nFullWidth, nPrgsHeight));
tools::Rectangle aControlRegion(aDrawRect);
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index b08cf4ca5261..7b0b4af23a65 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -4347,7 +4347,7 @@ void ToolBox::EndDocking( const tools::Rectangle& rRect, bool bFloatMode )
if ( meAlign != meDockAlign )
SetAlign( meDockAlign );
}
- if ( bFloatMode || (bool(bFloatMode) != ImplIsFloatingMode()) )
+ if ( bFloatMode || (bFloatMode != ImplIsFloatingMode()) )
DockingWindow::EndDocking( rRect, bFloatMode );
}
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index 10045e76b144..aac753a6da74 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -2553,7 +2553,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
// handle drag related events
if( rMessage.type == ClientMessage )
{
- if( Atom(rMessage.xclient.message_type) == m_nXdndStatus && Atom(rMessage.xclient.data.l[0]) == m_aDropWindow )
+ if( rMessage.xclient.message_type == m_nXdndStatus && Atom(rMessage.xclient.data.l[0]) == m_aDropWindow )
{
bHandled = true;
DragSourceDragEvent dsde;
@@ -2598,7 +2598,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
aGuard.clear();
m_xDragSourceListener->dragOver( dsde );
}
- else if( Atom(rMessage.xclient.message_type) == m_nXdndFinished && m_aDropWindow == Atom(rMessage.xclient.data.l[0]) )
+ else if( rMessage.xclient.message_type == m_nXdndFinished && m_aDropWindow == Atom(rMessage.xclient.data.l[0]) )
{
bHandled = true;
// notify the listener
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index f86d3280d454..e2ab80017c22 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -882,7 +882,7 @@ public:
aBlockColor.Erase(COL_GREEN);
BitmapEx aWhole(aBlockColor, aWholeMask);
- aRenderPt = Point(r.Center());
+ aRenderPt = r.Center();
aRenderPt.Move(nSlice+1, 0);
// An offset background for alpha rendering
@@ -1013,7 +1013,7 @@ public:
aClipRegion.Union(aPieces[i]);
}
assert (aClipRegion.getRegionBand());
- rDev.SetClipRegion(vcl::Region(aClipRegion));
+ rDev.SetClipRegion(aClipRegion);
rDev.SetFillColor(Color::HSBtoRGB(nHue, 75, 75));
nHue = (nHue + 97) % 360;
rDev.DrawRect(aOuter);
@@ -1064,7 +1064,7 @@ public:
{
assert (!aClipRegion.getRegionBand());
- rDev.SetClipRegion(vcl::Region(aClipRegion));
+ rDev.SetClipRegion(aClipRegion);
rDev.SetFillColor(Color::HSBtoRGB(nHue, 50, 75));
nHue = (nHue + 97) % 360;
rDev.DrawRect(aOuter);
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 95db1c41a893..5928fa4315c4 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -418,7 +418,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
m_pImpl->appendGrabBag(m_pImpl->m_aSubInteropGrabBag, "line", OUString::number(nIntValue));
//now set the value depending on the Mode
if( aSpacing.Mode == style::LineSpacingMode::PROP )
- aSpacing.Height = sal_Int16(sal_Int32(nIntValue) * 100 / nSingleLineSpacing );
+ aSpacing.Height = sal_Int16(nIntValue * 100 / nSingleLineSpacing );
else
aSpacing.Height = sal_Int16(ConversionHelper::convertTwipToMM100( nIntValue ));
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 7b2d188346f6..774dab8777e6 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -245,7 +245,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
{
// values can be: LN_Value_ST_Merge_restart, LN_Value_ST_Merge_continue, in reality the second one is a 0
TablePropertyMapPtr pMergeProps( new TablePropertyMap );
- pMergeProps->Insert( PROP_VERTICAL_MERGE, uno::makeAny( bool( sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_ST_Merge_restart )) );
+ pMergeProps->Insert( PROP_VERTICAL_MERGE, uno::makeAny( sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_ST_Merge_restart ) );
cellProps( pMergeProps);
}
break;
@@ -253,7 +253,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
{
// values can be: LN_Value_ST_Merge_restart, LN_Value_ST_Merge_continue, in reality the second one is a 0
TablePropertyMapPtr pMergeProps(new TablePropertyMap());
- pMergeProps->Insert(PROP_HORIZONTAL_MERGE, uno::makeAny(bool(sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_ST_Merge_restart)));
+ pMergeProps->Insert(PROP_HORIZONTAL_MERGE, uno::makeAny( sal::static_int_cast<Id>(nIntValue) == NS_ooxml::LN_Value_ST_Merge_restart ));
cellProps(pMergeProps);
}
break;
@@ -275,7 +275,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
// DomainMapperTableHandler::endTableGetCellProperties() can we
// handle the combination of the cell direction and paragraph
// alignment as necessary.
- pPropMap->Insert(PROP_CELL_DIRECTION, uno::Any(sal_Int32(nIntValue)));
+ pPropMap->Insert(PROP_CELL_DIRECTION, uno::Any(nIntValue));
bool bInsertCellProps = true;
switch ( nIntValue )
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 804940d84285..c70975a1f4b3 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -305,7 +305,7 @@ StyleSheetTable_Impl::StyleSheetTable_Impl(DomainMapper& rDMapper,
m_bIsNewDoc(bIsNewDoc)
{
//set font height default to 10pt
- uno::Any aVal = uno::makeAny( double(10.) );
+ uno::Any aVal = uno::makeAny( 10.0 );
m_pDefaultCharProps->Insert( PROP_CHAR_HEIGHT, aVal );
m_pDefaultCharProps->Insert( PROP_CHAR_HEIGHT_ASIAN, aVal );
m_pDefaultCharProps->Insert( PROP_CHAR_HEIGHT_COMPLEX, aVal );
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index 16a65806a6ce..fe13f2f2833c 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -511,7 +511,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
break;
case 0x2000: // curveto
aSegment.Command = drawing::EnhancedCustomShapeSegmentCommand::CURVETO;
- aSegment.Count = sal_Int32(nPoints);
+ aSegment.Count = nPoints;
aSegments.push_back(aSegment);
break;
case 0xb300: // arcto
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 23928cc91a83..6f8ed43c5205 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -596,7 +596,7 @@ namespace chelp {
ret = true;
}
else
- ret = bool( l < r );
+ ret = l < r;
return ret;
}