[Libreoffice-commits] core.git: basctl/source basic/source chart2/source comphelper/source compilerplugins/clang connectivity/source cppcanvas/source cppuhelper/source cui/source dbaccess/source desktop/source drawinglayer/source editeng/source eventattacher/source filter/source forms/source framework/source include/com include/i18nlangtag include/sot include/tools mysqlc/source opencl/inc reportdesign/source sal/osl sal/qa sc/source sd/qa sd/source sfx2/source slideshow/source sot/source starmath/source store/source svl/source svtools/source svx/source sw/qa sw/source toolkit/source tools/source ucbhelper/source ucb/source vcl/opengl vcl/source vcl/unx vcl/workben writerfilter/source xmlhelp/source
Noel Grandin
noel.grandin at collabora.co.uk
Tue May 30 06:51:23 UTC 2017
basctl/source/basicide/baside2.cxx | 3
basic/source/comp/scanner.cxx | 14 +-
basic/source/runtime/inputbox.cxx | 4
chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx | 8 -
chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx | 6
chart2/source/controller/main/ObjectHierarchy.cxx | 4
chart2/source/model/main/BaseCoordinateSystem.cxx | 2
chart2/source/view/axes/VCartesianAxis.cxx | 5
chart2/source/view/main/ChartView.cxx | 2
chart2/source/view/main/DummyXShape.cxx | 2
comphelper/source/eventattachermgr/eventattachermgr.cxx | 2
comphelper/source/property/propstate.cxx | 4
compilerplugins/clang/redundantcast.cxx | 62 ++++++++++
compilerplugins/clang/test/cppunitassertequals.cxx | 6
compilerplugins/clang/test/stringcopy.cxx | 2
connectivity/source/commontools/paramwrapper.cxx | 2
connectivity/source/inc/file/fcode.hxx | 2
cppcanvas/source/mtfrenderer/emfplus.cxx | 9 -
cppuhelper/source/propshlp.cxx | 8 -
cui/source/dialogs/hangulhanjadlg.cxx | 6
cui/source/options/optjava.cxx | 2
cui/source/tabpages/border.cxx | 4
cui/source/tabpages/tpline.cxx | 3
cui/source/tabpages/tpshadow.cxx | 3
cui/source/tabpages/tptrans.cxx | 3
dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 2
desktop/source/app/app.cxx | 2
drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx | 2
drawinglayer/source/processor2d/contourextractor2d.cxx | 2
drawinglayer/source/processor2d/vclprocessor2d.cxx | 2
editeng/source/editeng/impedit3.cxx | 4
editeng/source/items/svxfont.cxx | 2
editeng/source/rtf/rtfitem.cxx | 6
eventattacher/source/eventattacher.cxx | 2
filter/source/svg/svgreader.cxx | 2
forms/source/component/formcontrolfont.cxx | 4
forms/source/xforms/datatypes.cxx | 2
framework/source/layoutmanager/toolbarlayoutmanager.cxx | 23 +--
framework/source/tabwin/tabwindow.cxx | 2
framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx | 2
framework/source/uiconfiguration/uiconfigurationmanager.cxx | 2
framework/source/uielement/comboboxtoolbarcontroller.cxx | 4
framework/source/uielement/dropdownboxtoolbarcontroller.cxx | 4
framework/source/uielement/togglebuttontoolbarcontroller.cxx | 2
include/com/sun/star/uno/Sequence.hxx | 3
include/i18nlangtag/lang.h | 50 ++++----
include/sot/stg.hxx | 2
include/tools/inetmsg.hxx | 2
mysqlc/source/mysqlc_resultsetmetadata.cxx | 2
opencl/inc/opencl_device_selection.h | 10 -
reportdesign/source/ui/report/FixedTextColor.cxx | 2
sal/osl/unx/socket.cxx | 2
sal/qa/rtl/math/test-rtl-math.cxx | 6
sc/source/core/data/docpool.cxx | 8 -
sc/source/core/data/olinetab.cxx | 6
sc/source/core/data/validat.cxx | 2
sc/source/core/tool/scmatrix.cxx | 2
sc/source/filter/excel/xeescher.cxx | 2
sc/source/filter/html/htmlexp.cxx | 4
sc/source/filter/oox/pivotcachebuffer.cxx | 4
sc/source/filter/oox/viewsettings.cxx | 2
sc/source/ui/cctrl/dpcontrol.cxx | 4
sc/source/ui/cctrl/tbzoomsliderctrl.cxx | 2
sc/source/ui/docshell/docsh4.cxx | 7 -
sc/source/ui/navipi/navipi.cxx | 2
sc/source/ui/unoobj/PivotTableDataProvider.cxx | 2
sc/source/ui/vba/vbarange.cxx | 6
sc/source/ui/vba/vbawsfunction.cxx | 4
sc/source/ui/view/dbfunc.cxx | 2
sc/source/ui/view/gridwin.cxx | 8 -
sd/qa/unit/export-tests-ooxml1.cxx | 2
sd/qa/unit/tiledrendering/tiledrendering.cxx | 2
sd/source/ui/annotations/annotationmanager.cxx | 2
sd/source/ui/dlg/sdpreslt.cxx | 4
sd/source/ui/view/drviews7.cxx | 6
sd/source/ui/view/outlnvsh.cxx | 2
sd/source/ui/view/outlview.cxx | 3
sfx2/source/dialog/dinfdlg.cxx | 2
slideshow/source/engine/animationnodes/animationnodefactory.cxx | 4
slideshow/source/engine/opengl/TransitionerImpl.cxx | 2
slideshow/source/engine/transitions/combtransition.cxx | 8 -
sot/source/sdstor/stg.cxx | 4
sot/source/sdstor/stgavl.cxx | 2
starmath/source/dialog.cxx | 4
starmath/source/unomodel.cxx | 2
store/source/stordata.hxx | 4
store/source/stordir.cxx | 2
store/source/storlckb.cxx | 2
svl/source/filerec/filerec.cxx | 8 -
svtools/source/brwbox/brwbox2.cxx | 2
svtools/source/filter/DocumentToGraphicRenderer.cxx | 2
svx/source/dialog/imapwnd.cxx | 2
svx/source/dialog/langbox.cxx | 2
svx/source/form/datanavi.cxx | 2
svx/source/gallery2/galtheme.cxx | 2
svx/source/inc/datanavi.hxx | 2
svx/source/styles/CommonStylePreviewRenderer.cxx | 2
svx/source/svdraw/svdogrp.cxx | 2
svx/source/svdraw/svdotxtr.cxx | 2
svx/source/svdraw/svdovirt.cxx | 2
svx/source/svdraw/textchainflow.cxx | 2
svx/source/tbxctrls/grafctrl.cxx | 4
svx/source/tbxctrls/tbcontrl.cxx | 2
svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 2
svx/source/unogallery/unogalitem.cxx | 2
sw/qa/extras/tiledrendering/tiledrendering.cxx | 2
sw/source/core/crsr/bookmrk.cxx | 2
sw/source/core/draw/dcontact.cxx | 2
sw/source/core/fields/authfld.cxx | 2
sw/source/core/layout/anchoredobject.cxx | 2
sw/source/core/layout/fly.cxx | 4
sw/source/core/layout/flylay.cxx | 2
sw/source/core/layout/paintfrm.cxx | 2
sw/source/core/text/frmcrsr.cxx | 2
sw/source/core/text/itrform2.cxx | 2
sw/source/core/txtnode/fntcache.cxx | 2
sw/source/filter/html/htmlform.cxx | 4
sw/source/filter/ww8/docxattributeoutput.cxx | 8 -
sw/source/filter/ww8/docxexport.cxx | 2
sw/source/filter/ww8/docxsdrexport.cxx | 2
sw/source/filter/ww8/rtfattributeoutput.cxx | 4
sw/source/filter/ww8/wrtww8.cxx | 2
sw/source/ui/frmdlg/column.cxx | 2
sw/source/ui/misc/pgfnote.cxx | 2
sw/source/ui/vba/vbacolumn.cxx | 2
sw/source/uibase/app/docsh2.cxx | 4
sw/source/uibase/dochdl/swdtflvr.cxx | 2
sw/source/uibase/uiview/viewmdi.cxx | 4
sw/source/uibase/uiview/viewsrch.cxx | 6
sw/source/uibase/uiview/viewtab.cxx | 8 -
toolkit/source/awt/vclxwindows.cxx | 12 -
tools/source/inet/inetmime.cxx | 2
ucb/source/ucp/webdav-neon/NeonPropFindRequest.cxx | 2
ucbhelper/source/provider/providerhelper.cxx | 5
ucbhelper/source/provider/resultset.cxx | 2
vcl/opengl/LineRenderUtils.cxx | 12 -
vcl/opengl/RenderList.cxx | 16 +-
vcl/source/control/edit.cxx | 2
vcl/source/control/spinfld.cxx | 2
vcl/source/gdi/dibtools.cxx | 2
vcl/source/gdi/pdfwriter_impl.cxx | 4
vcl/source/window/dockmgr.cxx | 4
vcl/source/window/dockwin.cxx | 4
vcl/source/window/floatwin.cxx | 4
vcl/source/window/printdlg.cxx | 2
vcl/source/window/status.cxx | 2
vcl/source/window/toolbox.cxx | 2
vcl/unx/generic/dtrans/X11_selection.cxx | 4
vcl/workben/vcldemo.cxx | 6
writerfilter/source/dmapper/DomainMapper.cxx | 2
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 6
writerfilter/source/dmapper/StyleSheetTable.cxx | 2
writerfilter/source/rtftok/rtfsdrimport.cxx | 2
xmlhelp/source/cxxhelp/provider/databases.cxx | 2
154 files changed, 355 insertions(+), 308 deletions(-)
New commits:
commit 2ccde70d60d3a5074faf49260e8fe0ccdb91ff26
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon May 22 15:55:38 2017 +0200
teach redundantcast plugin about functional casts
Change-Id: Iac8ccd17d9e46ebb2cb55db7adb06c469bbd4ea0
Reviewed-on: https://gerrit.libreoffice.org/37910
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
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)
{
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list