diff options
160 files changed, 285 insertions, 360 deletions
diff --git a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx index 23f6ae39c53e..ab1511f28049 100644 --- a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx +++ b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx @@ -70,7 +70,7 @@ awt::Rectangle VCLXAccessibleTabPageWindow::implGetBounds() tools::Rectangle aPageRect = m_pTabControl->GetTabBounds( m_nPageId ); if ( m_pTabPage ) { - tools::Rectangle aRect = tools::Rectangle( m_pTabPage->GetPosPixel(), m_pTabPage->GetSizePixel() ); + tools::Rectangle aRect( m_pTabPage->GetPosPixel(), m_pTabPage->GetSizePixel() ); aRect.Move( -aPageRect.Left(), -aPageRect.Top() ); aBounds = AWTRectangle( aRect ); } diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx index b638496946ea..c6565dda2a70 100644 --- a/basctl/source/dlged/propbrw.cxx +++ b/basctl/source/dlged/propbrw.cxx @@ -158,7 +158,7 @@ void PropBrw::ImplReCreateController() } } - Point aPropWinPos = Point( WIN_BORDER, WIN_BORDER ); + Point aPropWinPos( WIN_BORDER, WIN_BORDER ); Size aPropWinSize(STD_WIN_SIZE_X,STD_WIN_SIZE_Y); aPropWinSize.AdjustWidth( -(2*WIN_BORDER) ); aPropWinSize.AdjustHeight( -(2*WIN_BORDER) ); diff --git a/basic/source/sbx/sbxform.cxx b/basic/source/sbx/sbxform.cxx index 4cdf7678eac9..116c9757ffd8 100644 --- a/basic/source/sbx/sbxform.cxx +++ b/basic/source/sbx/sbxform.cxx @@ -519,7 +519,7 @@ void SbxBasicFormater::ScanFormatString( double dNumber, nMultipleThousandSeparators; bool bPercent,bCurrency,bScientific,bGenerateThousandSeparator; - OUStringBuffer sReturnStrg = OUStringBuffer(); + OUStringBuffer sReturnStrg; // analyse the format-string, i. e. determine the following values: /* diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx index 11d5f45e886b..000719180956 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx @@ -267,7 +267,7 @@ void SAL_CALL CreationWizardUnoDlg::setPropertyValue( const OUString& rPropertyN m_pDialog->SetPosPixel( Point(0,0) ); tools::Rectangle aRect( m_pDialog->GetWindowExtentsRelative( nullptr ) ); - Point aNewOuterPos = Point( aPos.X - aRect.Left(), aPos.Y - aRect.Top() ); + Point aNewOuterPos( aPos.X - aRect.Left(), aPos.Y - aRect.Top() ); m_pDialog->SetPosPixel( aNewOuterPos ); } } diff --git a/chart2/source/controller/main/DragMethod_PieSegment.cxx b/chart2/source/controller/main/DragMethod_PieSegment.cxx index 30cd56d635fc..e3f0a820a272 100644 --- a/chart2/source/controller/main/DragMethod_PieSegment.cxx +++ b/chart2/source/controller/main/DragMethod_PieSegment.cxx @@ -95,7 +95,7 @@ void DragMethod_PieSegment::MoveSdrDrag(const Point& rPnt) m_fAdditionalOffset = 1.0 - m_fInitialOffset; B2DVector aNewPosVector = m_aStartVector + (m_aDragDirection * m_fAdditionalOffset); - Point aNewPos = Point( static_cast<long>(aNewPosVector.getX()), static_cast<long>(aNewPosVector.getY()) ); + Point aNewPos( static_cast<long>(aNewPosVector.getX()), static_cast<long>(aNewPosVector.getY()) ); if( aNewPos != DragStat().GetNow() ) { Hide(); diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 607d0142d6c9..2e3244c3031c 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -611,7 +611,7 @@ void SAL_CALL ChartModel::close( sal_Bool bDeliverOwnership ) //the listeners have had no veto //check whether we self can close { - util::CloseVetoException aVetoException = util::CloseVetoException( + util::CloseVetoException aVetoException( "the model itself could not be closed", static_cast< ::cppu::OWeakObject* >(this) ); diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx index 45d3cc49947d..c00e5ad3457a 100644 --- a/chart2/source/tools/DataSeriesHelper.cxx +++ b/chart2/source/tools/DataSeriesHelper.cxx @@ -660,8 +660,7 @@ bool lcl_SequenceHasUnhiddenData( const uno::Reference< chart2::data::XDataSeque bool hasUnhiddenData( const uno::Reference< chart2::XDataSeries >& xSeries ) { - uno::Reference< chart2::data::XDataSource > xDataSource = - uno::Reference< chart2::data::XDataSource >( xSeries, uno::UNO_QUERY ); + uno::Reference< chart2::data::XDataSource > xDataSource( xSeries, uno::UNO_QUERY ); uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aDataSequences = xDataSource->getDataSequences(); diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx index 8a9717ac221c..716670409167 100644 --- a/chart2/source/tools/LifeTime.cxx +++ b/chart2/source/tools/LifeTime.cxx @@ -352,8 +352,7 @@ void CloseableLifeTimeManager::impl_doClose() if(xCloseable.is()) { - uno::Reference< lang::XComponent > xComponent = - uno::Reference< lang::XComponent >( xCloseable, uno::UNO_QUERY ); + uno::Reference< lang::XComponent > xComponent( xCloseable, uno::UNO_QUERY ); if(xComponent.is()) { OSL_ENSURE( m_bClosed, "a not closed component will be disposed " ); diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx index a50a4e39ba09..6ecfdad87777 100644 --- a/chart2/source/view/charttypes/AreaChart.cxx +++ b/chart2/source/view/charttypes/AreaChart.cxx @@ -839,8 +839,7 @@ void AreaChart::createShapes() pSeries->getPointCID_Stub(), nIndex ); uno::Reference< drawing::XShapes > xPointGroupShape_Shapes( createGroupShape(xSeriesGroupShape_Shapes,aPointCID) ); - uno::Reference<drawing::XShape> xPointGroupShape_Shape = - uno::Reference<drawing::XShape>( xPointGroupShape_Shapes, uno::UNO_QUERY ); + uno::Reference<drawing::XShape> xPointGroupShape_Shape( xPointGroupShape_Shapes, uno::UNO_QUERY ); { nCreatedPoints++; diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx index 2a029f7b89a8..1a0123f0c094 100644 --- a/chart2/source/view/charttypes/BubbleChart.cxx +++ b/chart2/source/view/charttypes/BubbleChart.cxx @@ -261,8 +261,7 @@ void BubbleChart::createShapes() pSeries->getPointCID_Stub(), nIndex ); uno::Reference< drawing::XShapes > xPointGroupShape_Shapes( createGroupShape(xSeriesGroupShape_Shapes,aPointCID) ); - uno::Reference<drawing::XShape> xPointGroupShape_Shape = - uno::Reference<drawing::XShape>( xPointGroupShape_Shapes, uno::UNO_QUERY ); + uno::Reference<drawing::XShape> xPointGroupShape_Shape( xPointGroupShape_Shapes, uno::UNO_QUERY ); { nCreatedPoints++; diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx index 75a82ab18cfd..823004d2091a 100644 --- a/chart2/source/view/charttypes/NetChart.cxx +++ b/chart2/source/view/charttypes/NetChart.cxx @@ -528,8 +528,7 @@ void NetChart::createShapes() pSeries->getPointCID_Stub(), nIndex ); uno::Reference< drawing::XShapes > xPointGroupShape_Shapes( createGroupShape(xSeriesGroupShape_Shapes,aPointCID) ); - uno::Reference<drawing::XShape> xPointGroupShape_Shape = - uno::Reference<drawing::XShape>( xPointGroupShape_Shapes, uno::UNO_QUERY ); + uno::Reference<drawing::XShape> xPointGroupShape_Shape( xPointGroupShape_Shapes, uno::UNO_QUERY ); { //create data point diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 8322ff05372b..835c19a449ad 100644 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -877,8 +877,8 @@ void lcl_AddErrorBottomLine( const drawing::Position3D& rPosition, ::basegfx::B2 , const drawing::Position3D& rUnscaledLogicPosition , bool bYError ) { - ::basegfx::B2DVector aMainDirection = ::basegfx::B2DVector( rStart.PositionX - rBottomEnd.PositionX - , rStart.PositionY - rBottomEnd.PositionY ); + ::basegfx::B2DVector aMainDirection( rStart.PositionX - rBottomEnd.PositionX + , rStart.PositionY - rBottomEnd.PositionY ); if( !aMainDirection.getLength() ) { //get logic clip values: diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 4fc6b67e64c7..9d076e1f9b40 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2308,7 +2308,7 @@ void lcl_createButtons(const uno::Reference<drawing::XShapes>& xPageShapes, { std::unique_ptr<VButton> pButton(new VButton); pButton->init(xPageShapes, xShapeFactory); - awt::Point aNewPosition = awt::Point(rRemainingSpace.X + x + 100, rRemainingSpace.Y + 100); + awt::Point aNewPosition(rRemainingSpace.X + x + 100, rRemainingSpace.Y + 100); sal_Int32 nDimensionIndex = rPageFieldEntry.DimensionIndex; OUString aFieldOutputDescription = xPivotTableDataProvider->getFieldOutputDescription(nDimensionIndex); pButton->setLabel(rPageFieldEntry.Name + " | " + aFieldOutputDescription); @@ -2335,8 +2335,8 @@ void lcl_createButtons(const uno::Reference<drawing::XShapes>& xPageShapes, std::unique_ptr<VButton> pButton(new VButton); pButton->init(xPageShapes, xShapeFactory); - awt::Point aNewPosition = awt::Point(rRemainingSpace.X + x + 100, - rRemainingSpace.Y + rRemainingSpace.Height - aSize.Height - 100); + awt::Point aNewPosition(rRemainingSpace.X + x + 100, + rRemainingSpace.Y + rRemainingSpace.Height - aSize.Height - 100); pButton->setLabel(rRowFieldEntry.Name); pButton->setCID("FieldButton.Row." + OUString::number(rRowFieldEntry.DimensionIndex)); pButton->setPosition(aNewPosition); diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index d90b502e629f..5d1ab0096ae1 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -732,7 +732,7 @@ static drawing::PolyPolygonBezierCoords getCircularArcBezierCoords( //at least one polygon is created using two normal and two control points //if the angle is larger it is separated into multiple sub angles - drawing::PolyPolygonBezierCoords aReturn = drawing::PolyPolygonBezierCoords(); + drawing::PolyPolygonBezierCoords aReturn; sal_Int32 nSegmentCount = static_cast< sal_Int32 >( fWidthAngleRadian/fAngleSubdivisionRadian ); if( fWidthAngleRadian > fAngleSubdivisionRadian*nSegmentCount ) nSegmentCount++; @@ -842,7 +842,7 @@ static drawing::PolyPolygonBezierCoords getRingBezierCoords( , const ::basegfx::B2DHomMatrix& aTransformationFromUnitCircle , const double fAngleSubdivisionRadian ) { - drawing::PolyPolygonBezierCoords aReturn = drawing::PolyPolygonBezierCoords(); + drawing::PolyPolygonBezierCoords aReturn; aReturn.Coordinates = drawing::PointSequenceSequence(1); aReturn.Flags = drawing::FlagSequenceSequence(1); @@ -1776,8 +1776,7 @@ uno::Reference< drawing::XShapes > } //return - uno::Reference< drawing::XShapes > xShapes = - uno::Reference<drawing::XShapes>( xShape, uno::UNO_QUERY ); + uno::Reference< drawing::XShapes > xShapes( xShape, uno::UNO_QUERY ); return xShapes; } catch( const uno::Exception& ) @@ -1829,8 +1828,7 @@ uno::Reference< drawing::XShapes > setShapeName( xShape , aName ); //return - uno::Reference< drawing::XShapes > xShapes = - uno::Reference<drawing::XShapes>( xShape, uno::UNO_QUERY ); + uno::Reference< drawing::XShapes > xShapes( xShape, uno::UNO_QUERY ); return xShapes; } catch( const uno::Exception& ) diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx index f606883e3fbd..6781f2044e7c 100644 --- a/chart2/source/view/main/VDataSeries.cxx +++ b/chart2/source/view/main/VDataSeries.cxx @@ -174,8 +174,7 @@ VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries ) ::rtl::math::setNan( & m_fXMeanValue ); ::rtl::math::setNan( & m_fYMeanValue ); - uno::Reference<data::XDataSource> xDataSource = - uno::Reference<data::XDataSource>( xDataSeries, uno::UNO_QUERY ); + uno::Reference<data::XDataSource> xDataSource( xDataSeries, uno::UNO_QUERY ); uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > > aDataSequences = diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index bbb0707f7a0f..43f103db7ca1 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -798,7 +798,7 @@ std::vector<std::shared_ptr<VButton>> lcl_createButtons( std::shared_ptr<VButton> pButton(new VButton); aButtons.push_back(pButton); pButton->init(xLegendContainer, xShapeFactory); - awt::Point aNewPosition = awt::Point(x, y); + awt::Point aNewPosition(x, y); pButton->setLabel(sColumnFieldEntry.Name); pButton->setCID("FieldButton.Column." + OUString::number(sColumnFieldEntry.DimensionIndex)); pButton->setPosition(aNewPosition); diff --git a/compilerplugins/clang/simplifyconstruct.cxx b/compilerplugins/clang/simplifyconstruct.cxx index c3e28ce7bcda..55f2404f8ab1 100644 --- a/compilerplugins/clang/simplifyconstruct.cxx +++ b/compilerplugins/clang/simplifyconstruct.cxx @@ -87,19 +87,15 @@ bool SimplifyConstruct::VisitVarDecl(VarDecl const* varDecl) if (isa<AutoType>(varDecl->getType())) return true; - auto init = varDecl->getInit()->IgnoreImplicit(); - auto functionalCast = dyn_cast<CXXFunctionalCastExpr>(init); - if (!functionalCast) + auto init = varDecl->getInit(); + if (!isa<CXXFunctionalCastExpr>(init->IgnoreImplicit()) && !isa<CXXTemporaryObjectExpr>(init) + && !isa<CXXTemporaryObjectExpr>(init->IgnoreImplicit())) return true; // e.g. the LANGUAGE_DONTKNOW defines if (compiler.getSourceManager().isMacroBodyExpansion(compat::getBeginLoc(init))) return true; - // varDecl->getInit()->IgnoreImplicit()->dump(); - // varDecl->getType()->dump(); - // varDecl->getType()->getUnqualifiedDesugaredType()->dump(); - report(DiagnosticsEngine::Warning, "simplify", varDecl->getLocation()) << varDecl->getSourceRange(); diff --git a/compilerplugins/clang/test/simplifyconstruct.cxx b/compilerplugins/clang/test/simplifyconstruct.cxx index 8fbffc8ba2d7..d44738f78d01 100644 --- a/compilerplugins/clang/test/simplifyconstruct.cxx +++ b/compilerplugins/clang/test/simplifyconstruct.cxx @@ -9,6 +9,7 @@ #include <memory> #include <rtl/ref.hxx> +#include <tools/gen.hxx> namespace test1 { @@ -75,4 +76,13 @@ struct Foo void f(Foo* f) { auto x = rtl::Reference(f); } } +namespace test5 +{ +void f() +{ + // expected-error@+1 {{simplify [loplugin:simplifyconstruct]}} + tools::Rectangle x = tools::Rectangle(10, 10, 10, 10); + (void)x; +} +} /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx index c5c74e809f79..f9ad5295a088 100644 --- a/connectivity/source/drivers/dbase/DIndex.cxx +++ b/connectivity/source/drivers/dbase/DIndex.cxx @@ -578,7 +578,7 @@ void ODbaseIndex::CreateImpl() nRowsLeft = xSet->getRow(); xSet->beforeFirst(); - ORowSetValue atmpValue=ORowSetValue(); + ORowSetValue atmpValue; ONDXKey aKey(atmpValue, nType, 0); ONDXKey aInsertKey(atmpValue, nType, 0); // Create the index structure diff --git a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx index 74613a733a3a..2ad5b5f56962 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx @@ -419,7 +419,7 @@ void SAL_CALL OConnection::close() // XWarningsSupplier Any SAL_CALL OConnection::getWarnings() { - Any x = Any(); + Any x; // when you collected some warnings -> return it return x; } diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx index 3b9e4a2aeb57..ae573a6d8fbc 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx @@ -254,8 +254,7 @@ template <> OUString OPreparedResultSet::retrieveValue(sal_Int32 column) return getRowSetValue(column); const char* sStr = static_cast<const char*>(m_aData[column - 1].buffer); - OUString sReturn = OUString(sStr, *m_aData[column - 1].length, m_encoding); - return sReturn; + return OUString(sStr, *m_aData[column - 1].length, m_encoding); } ORowSetValue OPreparedResultSet::getRowSetValue(sal_Int32 nColumnIndex) @@ -414,7 +413,7 @@ Any SAL_CALL OPreparedResultSet::getObject(sal_Int32 column, checkDisposed(OPreparedResultSet_BASE::rBHelper.bDisposed); checkColumnIndex(column); - Any aRet = Any(); + Any aRet; mysqlc_sdbc_driver::throwFeatureNotImplementedException("OPreparedResultSet::getObject", *this); return aRet; @@ -696,11 +695,7 @@ void SAL_CALL OPreparedResultSet::cancel() void SAL_CALL OPreparedResultSet::clearWarnings() {} -Any SAL_CALL OPreparedResultSet::getWarnings() -{ - Any aRet = Any(); - return aRet; -} +Any SAL_CALL OPreparedResultSet::getWarnings() { return Any(); } void SAL_CALL OPreparedResultSet::insertRow() { @@ -921,13 +916,12 @@ Any SAL_CALL OPreparedResultSet::getBookmark() { MutexGuard aGuard(m_aMutex); checkDisposed(OPreparedResultSet_BASE::rBHelper.bDisposed); - Any aRet = Any(); // if you don't want to support bookmark you must remove the XRowLocate interface mysqlc_sdbc_driver::throwFeatureNotImplementedException("OPreparedResultSet::getBookmark", *this); - return aRet; + return Any(); } sal_Bool SAL_CALL OPreparedResultSet::moveToBookmark(const Any& /* bookmark */) @@ -975,11 +969,10 @@ uno::Sequence<sal_Int32> { MutexGuard aGuard(m_aMutex); checkDisposed(OPreparedResultSet_BASE::rBHelper.bDisposed); - uno::Sequence<sal_Int32> aRet = uno::Sequence<sal_Int32>(); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OPreparedResultSet::deleteRows", *this); - return aRet; + return uno::Sequence<sal_Int32>(); } IPropertyArrayHelper* OPreparedResultSet::createArrayHelper() const diff --git a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx index e8c2fcda8a69..910825742cef 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_preparedstatement.cxx @@ -546,11 +546,7 @@ void SAL_CALL OPreparedStatement::addBatch() mysqlc_sdbc_driver::throwFeatureNotImplementedException("OPreparedStatement::addBatch", *this); } -Sequence<sal_Int32> SAL_CALL OPreparedStatement::executeBatch() -{ - Sequence<sal_Int32> aRet = Sequence<sal_Int32>(); - return aRet; -} +Sequence<sal_Int32> SAL_CALL OPreparedStatement::executeBatch() { return Sequence<sal_Int32>(); } void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const Any& rValue) { diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx index 05d5c1321604..0175dcd9cab9 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx @@ -435,10 +435,8 @@ Any SAL_CALL OResultSet::getObject(sal_Int32 column, checkDisposed(OResultSet_BASE::rBHelper.bDisposed); checkBordersAndEnsureFetched(column); - Any aRet = Any(); - mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getObject", *this); - return aRet; + return Any(); } sal_Int16 SAL_CALL OResultSet::getShort(sal_Int32 column) @@ -734,11 +732,7 @@ void SAL_CALL OResultSet::cancel() void SAL_CALL OResultSet::clearWarnings() {} -Any SAL_CALL OResultSet::getWarnings() -{ - Any aRet = Any(); - return aRet; -} +Any SAL_CALL OResultSet::getWarnings() { return Any(); } void SAL_CALL OResultSet::insertRow() { @@ -959,12 +953,11 @@ Any SAL_CALL OResultSet::getBookmark() { MutexGuard aGuard(m_aMutex); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - Any aRet = Any(); // if you don't want to support bookmark you must remove the XRowLocate interface mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::getBookmark", *this); - return aRet; + return Any(); } sal_Bool SAL_CALL OResultSet::moveToBookmark(const Any& /* bookmark */) @@ -1009,10 +1002,9 @@ uno::Sequence<sal_Int32> SAL_CALL OResultSet::deleteRows(const uno::Sequence<Any { MutexGuard aGuard(m_aMutex); checkDisposed(OResultSet_BASE::rBHelper.bDisposed); - uno::Sequence<sal_Int32> aRet = uno::Sequence<sal_Int32>(); mysqlc_sdbc_driver::throwFeatureNotImplementedException("OResultSet::deleteRows", *this); - return aRet; + return uno::Sequence<sal_Int32>(); } IPropertyArrayHelper* OResultSet::createArrayHelper() const diff --git a/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx index ef33d1431f72..a789dc4996b6 100644 --- a/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx +++ b/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx @@ -204,8 +204,7 @@ Sequence<sal_Int32> SAL_CALL OStatement::executeBatch() MutexGuard aGuard(m_aMutex); checkDisposed(rBHelper.bDisposed); - Sequence<sal_Int32> aRet = Sequence<sal_Int32>(); - return aRet; + return Sequence<sal_Int32>(); } sal_Int32 SAL_CALL OCommonStatement::executeUpdate(const OUString& sql) diff --git a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx index 096742687b85..d7a054297698 100644 --- a/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx +++ b/connectivity/source/drivers/postgresql/pq_resultsetmetadata.cxx @@ -202,8 +202,7 @@ void ResultSetMetaData::checkTable() if( ! tables.is() ) { - Reference< XTablesSupplier > supplier = - Reference< XTablesSupplier > ( + Reference< XTablesSupplier > supplier( extractConnectionFromStatement( m_origin->getStatement() ), UNO_QUERY); if( supplier.is() ) tables = supplier->getTables(); diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx index 3f3e1c14a4fb..f9c9f25abe1d 100644 --- a/connectivity/source/drivers/postgresql/pq_statement.cxx +++ b/connectivity/source/drivers/postgresql/pq_statement.cxx @@ -293,8 +293,7 @@ static std::vector< OUString > lookupKeys( else if( -1 == table.indexOf( '.' ) ) { // it wasn't a fully qualified name. Now need to skip through all tables. - Reference< XEnumerationAccess > enumerationAccess = - Reference< XEnumerationAccess > ( tables, UNO_QUERY ); + Reference< XEnumerationAccess > enumerationAccess( tables, UNO_QUERY ); Reference< css::container::XEnumeration > enumeration = enumerationAccess->createEnumeration(); @@ -362,8 +361,7 @@ static std::vector< OUString > lookupKeys( keyType == css::sdbcx::KeyType::PRIMARY ) { Reference< XColumnsSupplier > columns( set, UNO_QUERY ); - Reference< XIndexAccess > indexAccess = - Reference< XIndexAccess > ( columns->getColumns(), UNO_QUERY ); + Reference< XIndexAccess > indexAccess( columns->getColumns(), UNO_QUERY ); int length = indexAccess->getCount(); ret.resize( length ); diff --git a/connectivity/source/drivers/postgresql/pq_xtable.cxx b/connectivity/source/drivers/postgresql/pq_xtable.cxx index bdc7ac719dcb..f6175126724e 100644 --- a/connectivity/source/drivers/postgresql/pq_xtable.cxx +++ b/connectivity/source/drivers/postgresql/pq_xtable.cxx @@ -222,8 +222,7 @@ void Table::alterColumnByName( const OUString& colName, const Reference< XPropertySet >& descriptor ) { - Reference< css::container::XNameAccess > columns = - Reference< css::container::XNameAccess > ( getColumns(), UNO_QUERY ); + Reference< css::container::XNameAccess > columns( getColumns(), UNO_QUERY ); OUString newName = extractStringProperty(descriptor, getStatics().NAME ); ::pq_sdbc_driver::alterColumnByDescriptor( @@ -245,8 +244,7 @@ void Table::alterColumnByIndex( sal_Int32 index, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) { - Reference< css::container::XIndexAccess > columns = - Reference< css::container::XIndexAccess>( getColumns(), UNO_QUERY ); + Reference< css::container::XIndexAccess > columns( getColumns(), UNO_QUERY ); Reference< css::beans::XPropertySet> column(columns->getByIndex( index ), UNO_QUERY ); ::pq_sdbc_driver::alterColumnByDescriptor( extractStringProperty( this, getStatics().SCHEMA_NAME ), diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 564dc5920466..32c7a4b2e605 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -435,9 +435,7 @@ short SvxScriptOrgDialog::run() // force load of MSPs for all documents while ( pDoc ) { - Reference< provider::XScriptProviderSupplier > xSPS = - Reference< provider::XScriptProviderSupplier > - ( pDoc->GetModel(), UNO_QUERY ); + Reference< provider::XScriptProviderSupplier > xSPS( pDoc->GetModel(), UNO_QUERY ); if ( xSPS.is() ) { xSPS->getScriptProvider(); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 31c5e0400615..83f3a37855dc 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -2154,7 +2154,7 @@ void ExtensionsTabPage::ActivatePage() if ( m_xPage.is() ) { - Point aPos = Point(); + Point aPos; Size aSize = GetParent()->get_preferred_size(); m_xPage->setPosSize( aPos.X() + 1, aPos.Y() + 1, aSize.Width() - 2, aSize.Height() - 2, awt::PosSize::POSSIZE ); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index c47a0bcc66d1..2ed5e4ac7c0c 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -952,7 +952,7 @@ void OfaAutocorrReplacePage::NewEntry(const OUString& sShort, const OUString& sL } } - DoubleString aNewString = DoubleString(); + DoubleString aNewString; aNewString.sShort = sShort; aNewString.sLong = sLong; rNewArray.push_back(aNewString); @@ -982,7 +982,7 @@ void OfaAutocorrReplacePage::DeleteEntry(const OUString& sShort, const OUString& } } - DoubleString aDeletedString = DoubleString(); + DoubleString aDeletedString; aDeletedString.sShort = sShort; aDeletedString.sLong = sLong; rDeletedArray.push_back(aDeletedString); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 282a50460693..499910f6d78b 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -174,7 +174,7 @@ void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools:: nX = nLeadSpace; } - Point aPosText = Point(nX, (aSzWnd.Height() - GetTextHeight()) / 2); + Point aPosText(nX, (aSzWnd.Height() - GetTextHeight()) / 2); rRenderContext.DrawText(aPosText, aTmpStr); rRenderContext.Pop(); } diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx index 180ccb6936b2..2b8d58a3123d 100644 --- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx @@ -353,8 +353,8 @@ namespace dbmm bool bEqual = true; try { - ::ucbhelper::Content aContentLHS = ::ucbhelper::Content( _lhs, Reference< XCommandEnvironment >(), context ); - ::ucbhelper::Content aContentRHS = ::ucbhelper::Content( _rhs, Reference< XCommandEnvironment >(), context ); + ::ucbhelper::Content aContentLHS( _lhs, Reference< XCommandEnvironment >(), context ); + ::ucbhelper::Content aContentRHS( _rhs, Reference< XCommandEnvironment >(), context ); Reference< XContent > xContentLHS( aContentLHS.get(), UNO_SET_THROW ); Reference< XContent > xContentRHS( aContentRHS.get(), UNO_SET_THROW ); Reference< XContentIdentifier > xID1( xContentLHS->getIdentifier(), UNO_SET_THROW ); diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index f4e132493b0c..510dd533236c 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -193,7 +193,7 @@ void OTableWindow::FillListBox() } // mark all primary keys with special image - Image aPrimKeyImage = Image(StockImage::Yes, BMP_PRIMARY_KEY); + Image aPrimKeyImage(StockImage::Yes, BMP_PRIMARY_KEY); if (GetData()->IsShowAll()) { @@ -333,7 +333,7 @@ void OTableWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan tools::Rectangle OTableWindow::getSizingRect(const Point& _rPos,const Size& _rOutputSize) const { - tools::Rectangle aSizingRect = tools::Rectangle( GetPosPixel(), GetSizePixel() ); + tools::Rectangle aSizingRect( GetPosPixel(), GetSizePixel() ); if( m_nSizingFlags & SizingFlags::Top ) { diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 0d7d1327a40f..56ef9db54d38 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1347,7 +1347,7 @@ void CallbackFlushHandler::queue(const int type, const char* data) long nLeft, nTop, nWidth, nHeight; char nComma; aRectStream >> nLeft >> nComma >> nTop >> nComma >> nWidth >> nComma >> nHeight; - tools::Rectangle aNewRect = tools::Rectangle(nLeft, nTop, nLeft + nWidth, nTop + nHeight); + tools::Rectangle aNewRect(nLeft, nTop, nLeft + nWidth, nTop + nHeight); bool currentIsRedundant = false; removeAll([&aNewRect, &nLOKWindowId, ¤tIsRedundant] (const queue_type::value_type& elem) { if (elem.Type != LOK_CALLBACK_WINDOW) diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx index 76dce81832ba..62ea12db8178 100644 --- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx @@ -251,7 +251,7 @@ namespace drawinglayer } else { - BitmapEx aExpandVisibilityMask = BitmapEx(aMask, aMask); + BitmapEx aExpandVisibilityMask(aMask, aMask); maVirtualDeviceMask->DrawBitmapEx(rAnimationBitmap.maPositionPixel, aExpandVisibilityMask); } @@ -275,7 +275,7 @@ namespace drawinglayer } else { - BitmapEx aExpandVisibilityMask = BitmapEx(aMask, aMask); + BitmapEx aExpandVisibilityMask(aMask, aMask); maVirtualDeviceMask->DrawBitmapEx(rAnimationBitmap.maPositionPixel, aExpandVisibilityMask); } @@ -284,7 +284,7 @@ namespace drawinglayer case Disposal::Previous: { maVirtualDevice->DrawBitmapEx(rAnimationBitmap.maPositionPixel, rAnimationBitmap.maBitmapEx); - BitmapEx aExpandVisibilityMask = BitmapEx(rAnimationBitmap.maBitmapEx.GetMask(), rAnimationBitmap.maBitmapEx.GetMask()); + BitmapEx aExpandVisibilityMask(rAnimationBitmap.maBitmapEx.GetMask(), rAnimationBitmap.maBitmapEx.GetMask()); maVirtualDeviceMask->DrawBitmapEx(rAnimationBitmap.maPositionPixel, aExpandVisibilityMask); break; } diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx index 58cb38dc21c9..d184032ae684 100644 --- a/drawinglayer/source/tools/emfphelperdata.cxx +++ b/drawinglayer/source/tools/emfphelperdata.cxx @@ -493,7 +493,7 @@ namespace emfplushelper // EMF Alpha (1 byte): An 8-bit unsigned integer that specifies the transparency of the background, // ranging from 0 for completely transparent to 0xFF for completely opaque. - const Color color = Color(0xff - (brushIndexOrColor >> 24), (brushIndexOrColor >> 16) & 0xff, (brushIndexOrColor >> 8) & 0xff, brushIndexOrColor & 0xff); + const Color color(0xff - (brushIndexOrColor >> 24), (brushIndexOrColor >> 16) & 0xff, (brushIndexOrColor >> 8) & 0xff, brushIndexOrColor & 0xff); if (color.GetTransparency() < 255) { if (color.GetTransparency() == 0) diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 215af72daaed..7e91331943cc 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -430,7 +430,7 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion, if (!aRectangles.empty()) { tools::Rectangle& rStart = aRectangles.front(); - tools::Rectangle aStart = tools::Rectangle(rStart.Left(), rStart.Top(), rStart.Left() + 1, rStart.Bottom()); + tools::Rectangle aStart(rStart.Left(), rStart.Top(), rStart.Left() + 1, rStart.Bottom()); if (bMm100ToTwip) aStart = OutputDevice::LogicToLogic(aStart, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip)); aStart.Move(aOrigin.getX(), aOrigin.getY()); @@ -438,7 +438,7 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion, mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_START, aStart.toString().getStr()); tools::Rectangle& rEnd = aRectangles.back(); - tools::Rectangle aEnd = tools::Rectangle(rEnd.Right() - 1, rEnd.Top(), rEnd.Right(), rEnd.Bottom()); + tools::Rectangle aEnd(rEnd.Right() - 1, rEnd.Top(), rEnd.Right(), rEnd.Bottom()); if (bMm100ToTwip) aEnd = OutputDevice::LogicToLogic(aEnd, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip)); aEnd.Move(aOrigin.getX(), aOrigin.getY()); diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index 0821b601001b..1e0b4e51feb5 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -725,7 +725,7 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY ) EditLine* pLine = &pParaPortion->GetLines()[nLine]; - static tools::Rectangle aZeroArea = tools::Rectangle( Point(), Point() ); + static tools::Rectangle aZeroArea { Point(), Point() }; tools::Rectangle aBulletArea( aZeroArea ); if ( !nLine ) { @@ -1674,7 +1674,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion ) const SvxLineSpacingItem& rLSItem = pParaPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL ); long nStartX = GetXValue( rLRItem.GetTextLeft() + rLRItem.GetTextFirstLineOfst() + nSpaceBefore ); - tools::Rectangle aBulletArea = tools::Rectangle( Point(), Point() ); + tools::Rectangle aBulletArea { Point(), Point() }; if ( bLineBreak ) { nStartX = GetXValue( rLRItem.GetTextLeft() + rLRItem.GetTextFirstLineOfst() + nSpaceBeforeAndMinLabelWidth ); diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index ae1513cf6d8b..75abcf0448b6 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1634,7 +1634,7 @@ void ImpEditEngine::ImpConvert( OUString &rConvTxt, LanguageType &rConvTxtLang, LanguageType nResLang = LANGUAGE_NONE; EditPaM aPos( CreateEditPaM( pConvInfo->aConvContinue ) ); - EditSelection aCurSel = EditSelection( aPos, aPos ); + EditSelection aCurSel( aPos, aPos ); OUString aWord; @@ -1936,7 +1936,7 @@ bool ImpEditEngine::SpellSentence(EditView const & rEditView, //search for all errors in the rest of the sentence and add all the portions do { - EditSelection aNextSel = EditSelection(aCurSel.Max(), aSentencePaM.Max()); + EditSelection aNextSel(aCurSel.Max(), aSentencePaM.Max()); xAlt = ImpFindNextError(aNextSel); if(xAlt.is()) { diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx index 660a7d7d77c4..87144b6f4938 100644 --- a/editeng/source/outliner/outleeng.cxx +++ b/editeng/source/outliner/outleeng.cxx @@ -66,7 +66,7 @@ const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( sal_Int32 nPara ) const tools::Rectangle OutlinerEditEng::GetBulletArea( sal_Int32 nPara ) { - tools::Rectangle aBulletArea = tools::Rectangle( Point(), Point() ); + tools::Rectangle aBulletArea { Point(), Point() }; if ( nPara < pOwner->pParaList->GetParagraphCount() ) { if ( pOwner->ImplHasNumberFormat( nPara ) ) diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index 1fa6e212dc90..5d0fda71f07a 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -57,7 +57,7 @@ SvxUnoTextContentEnumeration::SvxUnoTextContentEnumeration( const SvxUnoTextBase nStartPos = std::max(nStartPos, rSel.nStartPos); if( currentPara == rSel.nEndPara ) nEndPos = std::min(nEndPos, rSel.nEndPos); - ESelection aCurrentParaSel = ESelection( currentPara, nStartPos, currentPara, nEndPos ); + ESelection aCurrentParaSel( currentPara, nStartPos, currentPara, nEndPos ); for (auto const& elemRange : rRanges) { if (pContent) diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index 3d398d8bd5df..e1d46c471124 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -1313,20 +1313,20 @@ namespace emfio if (maLatestFillStyle.aType != WinMtfFillStyleType::Pattern) mpGDIMetaFile->AddAction( new MetaPolygonAction( rPolygon ) ); else { - SvtGraphicFill aFill = SvtGraphicFill( tools::PolyPolygon( rPolygon ), - Color(), - 0.0, - SvtGraphicFill::fillNonZero, - SvtGraphicFill::fillTexture, - SvtGraphicFill::Transform(), - true, - SvtGraphicFill::hatchSingle, - Color(), - SvtGraphicFill::GradientType::Linear, - Color(), - Color(), - 0, - Graphic (maLatestFillStyle.aBmp) ); + SvtGraphicFill aFill( tools::PolyPolygon( rPolygon ), + Color(), + 0.0, + SvtGraphicFill::fillNonZero, + SvtGraphicFill::fillTexture, + SvtGraphicFill::Transform(), + true, + SvtGraphicFill::hatchSingle, + Color(), + SvtGraphicFill::GradientType::Linear, + Color(), + Color(), + 0, + Graphic (maLatestFillStyle.aBmp) ); SvMemoryStream aMemStm; diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index bbeaf3565cac..b77bcc286b36 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -196,8 +196,7 @@ uno::Reference< beans::XPropertySet > createMenuBarUI( throw uno::RuntimeException( "UpdateCheckJob: unable to obtain service manager from component context", uno::Reference< uno::XInterface > () ); - uno::Reference< beans::XPropertySet > xMenuBarUI = - uno::Reference< beans::XPropertySet > ( + uno::Reference< beans::XPropertySet > xMenuBarUI( xServiceManager->createInstanceWithContext( "com.sun.star.setup.UpdateCheckUI", xContext ), uno::UNO_QUERY_THROW); diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx index 251695ca738a..083bd2de47d2 100644 --- a/filter/source/config/cache/filtercache.cxx +++ b/filter/source/config/cache/filtercache.cxx @@ -2055,8 +2055,7 @@ void FilterCache::impl_readOldFormat() try { css::uno::Reference< css::uno::XInterface > xInt = impl_openConfig(E_PROVIDER_OLD); - css::uno::Reference< css::container::XNameAccess > xCfg = - css::uno::Reference< css::container::XNameAccess >(xInt, css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::container::XNameAccess > xCfg(xInt, css::uno::UNO_QUERY_THROW); OUString TYPES_SET("Types"); diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index 1d42bf42c560..bab56d749bc6 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -795,7 +795,7 @@ void Writer::Impl_writeImage( const BitmapEx& rBmpEx, const Point& rPt, const Si { BitmapEx bmpSource( rBmpEx ); - tools::Rectangle originalPixelRect = tools::Rectangle(Point(), bmpSource.GetSizePixel()); + tools::Rectangle originalPixelRect(Point(), bmpSource.GetSizePixel()); Point srcPt( map(rPt) ); Size srcSize( map(rSz) ); @@ -816,7 +816,7 @@ void Writer::Impl_writeImage( const BitmapEx& rBmpEx, const Point& rPt, const Si // clipping rectangle to get mapped. However, sometimes there are multiple layers // of mapping which eventually do cause the clipping rect to be mapped. Size clipSize( bNeedToMapClipRect ? map(rClipRect.GetSize()) : rClipRect.GetSize() ); - tools::Rectangle clipRect = tools::Rectangle(Point(), clipSize); + tools::Rectangle clipRect(Point(), clipSize); destRect.Intersection( clipRect ); tools::Rectangle cropRect(destRect); diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx index 9d68e124d13c..f32bc17f432d 100644 --- a/framework/source/accelerators/acceleratorconfiguration.cxx +++ b/framework/source/accelerators/acceleratorconfiguration.cxx @@ -953,7 +953,7 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::disposing(const css::lang::Event void XCUBasedAcceleratorConfiguration::impl_ts_load( bool bPreferred, const css::uno::Reference< css::container::XNameAccess >& xCfg ) { - AcceleratorCache aReadCache = AcceleratorCache(); + AcceleratorCache aReadCache; css::uno::Reference< css::container::XNameAccess > xAccess; if ( m_sGlobalOrModules == "Global" ) xCfg->getByName(CFG_ENTRY_GLOBAL) >>= xAccess; diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index bfff6003605a..685b2ce9a3eb 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -2456,8 +2456,8 @@ void LayoutManager::implts_setDockingAreaWindowSizes() // Convert relative size to output size. awt::Rectangle aRectangle = xContainerWindow->getPosSize(); awt::DeviceInfo aInfo = xDevice->getInfo(); - awt::Size aContainerClientSize = awt::Size( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset, - aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); + awt::Size aContainerClientSize( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset, + aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); ::Size aStatusBarSize = implts_getStatusBarSize(); // Position the status bar diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 493278ddf3ad..3ba5ece25409 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -154,8 +154,8 @@ void ToolbarLayoutManager::implts_setDockingAreaWindowSizes( const awt::Rectangl // Convert relative size to output size. awt::Rectangle aRectangle = xContainerWindow->getPosSize(); awt::DeviceInfo aInfo = xDevice->getInfo(); - awt::Size aContainerClientSize = awt::Size( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset , - aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); + awt::Size aContainerClientSize( aRectangle.Width - aInfo.LeftInset - aInfo.RightInset , + aRectangle.Height - aInfo.TopInset - aInfo.BottomInset ); long aStatusBarHeight = aDockOffsets.GetHeight(); sal_Int32 nLeftRightDockingAreaHeight( aContainerClientSize.Height ); diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index cbebcb13e747..a3ffb3a47481 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -4163,7 +4163,7 @@ void AutoRecovery::st_impl_removeFile(const OUString& sURL) try { - ::ucbhelper::Content aContent = ::ucbhelper::Content(sURL, css::uno::Reference< css::ucb::XCommandEnvironment >(), m_xContext); + ::ucbhelper::Content aContent(sURL, css::uno::Reference< css::ucb::XCommandEnvironment >(), m_xContext); aContent.executeCommand("delete", css::uno::makeAny(true)); } catch(const css::uno::Exception&) diff --git a/i18npool/source/indexentry/genindex_data.cxx b/i18npool/source/indexentry/genindex_data.cxx index 5fae0d3da165..d5bad8b18def 100644 --- a/i18npool/source/indexentry/genindex_data.cxx +++ b/i18npool/source/indexentry/genindex_data.cxx @@ -61,7 +61,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) continue; // input file is in UTF-8 encoding - OUString Ostr = OUString(str, len, RTL_TEXTENCODING_UTF8); + OUString Ostr(str, len, RTL_TEXTENCODING_UTF8); len = Ostr.getLength(); if (len == 0) continue; // skip empty line. diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx index f8749ace650d..c317f5ba170c 100644 --- a/l10ntools/source/po.cxx +++ b/l10ntools/source/po.cxx @@ -174,7 +174,7 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream) } while(!rIFStream.eof()) { - OString sLine = OString(sTemp.data(),sTemp.length()); + OString sLine(sTemp.data(),sTemp.length()); if (sLine.startsWith("#. ")) { if( !m_sExtractCom.isEmpty() ) @@ -580,7 +580,7 @@ void PoIfstream::open( const OString& rFileName, OString& rPoHeader ) while( !sTemp.empty() && !m_aInPut.eof() ) { std::getline(m_aInPut,sTemp); - OString sLine = OString(sTemp.data(),sTemp.length()); + OString sLine(sTemp.data(),sTemp.length()); if (sLine.startsWith("\"PO-Revision-Date")) rPoHeader += "PO-Revision-Date: " + lcl_GetTime() + "\n"; else if (sLine.startsWith("\"X-Generator")) diff --git a/l10ntools/source/propmerge.cxx b/l10ntools/source/propmerge.cxx index b87c64c994f7..42945aee316d 100644 --- a/l10ntools/source/propmerge.cxx +++ b/l10ntools/source/propmerge.cxx @@ -51,8 +51,7 @@ namespace const OString sHex = sResult.copy( nIndex + 2, 4 ); const sal_Unicode cDec = static_cast<sal_Unicode>( strtol( sHex.getStr(), nullptr, 16 ) ); - const OString sNewChar = - OString( &cDec, 1, RTL_TEXTENCODING_UTF8 ); + const OString sNewChar( &cDec, 1, RTL_TEXTENCODING_UTF8 ); sResult = sResult.replaceAll( "\\u" + sHex, sNewChar ); nIndex = lcl_IndexOfUnicode( sResult, nIndex ); } diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx index 45637de0c32c..38e8c3162f08 100644 --- a/lotuswordpro/source/filter/lwpdrawobj.cxx +++ b/lotuswordpro/source/filter/lwpdrawobj.cxx @@ -1061,7 +1061,7 @@ OUString LwpDrawTextBox::RegisterStyle() // the pFont need to be deleted myself? rtl::Reference<XFFont> pFont = new XFFont(); - OUString aFontName = OUString(reinterpret_cast<char*>(m_aTextRec.tmpTextFaceName), + OUString aFontName(reinterpret_cast<char*>(m_aTextRec.tmpTextFaceName), strlen(reinterpret_cast<char*>(m_aTextRec.tmpTextFaceName)), RTL_TEXTENCODING_MS_1252); pFont->SetFontName(aFontName); @@ -1265,7 +1265,7 @@ OUString LwpDrawTextArt::RegisterStyle() // the pFont need to be deleted myself? rtl::Reference<XFFont> pFont = new XFFont(); - OUString aFontName = OUString(reinterpret_cast<char*>(m_aTextArtRec.tmpTextFaceName), + OUString aFontName(reinterpret_cast<char*>(m_aTextArtRec.tmpTextFaceName), strlen(reinterpret_cast<char*>(m_aTextArtRec.tmpTextFaceName)), RTL_TEXTENCODING_MS_1252); pFont->SetFontName(aFontName); diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index 48e4ee97837b..a49c4375858b 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -1206,7 +1206,7 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_ XFParagraph * pXFPara = static_cast<XFParagraph*>(first.get()); if (!pXFPara) return; - XFColor aNullColor = XFColor(); + XFColor aNullColor; OUString sNumfmt = pCellLayout->GetNumfmtName(); bool bColorMod = false; diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index da3fa3c9a114..a0058bb30242 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1549,8 +1549,8 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase const & rFilte awt::Size aActualSize = mxShape->getSize(); Size aResolution(Application::GetDefaultDevice()->LogicToPixel(Size(100, 100), MapMode(MapUnit::MapCM))); double fPixelsPer100thmm = static_cast < double > ( aResolution.Width() ) / 100000.0; - awt::Size aSize = awt::Size( static_cast < sal_Int32 > ( ( fPixelsPer100thmm * aActualSize.Width ) + 0.5 ), - static_cast < sal_Int32 > ( ( fPixelsPer100thmm * aActualSize.Height ) + 0.5 ) ); + awt::Size aSize( static_cast < sal_Int32 > ( ( fPixelsPer100thmm * aActualSize.Width ) + 0.5 ), + static_cast < sal_Int32 > ( ( fPixelsPer100thmm * aActualSize.Height ) + 0.5 ) ); Sequence< PropertyValue > aFilterData( 4 ); aFilterData[ 0 ].Name = "PixelWidth"; diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 1f0667e3bb78..3c26f052b665 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -1320,9 +1320,8 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStre else m_pAntiImpl = new OWriteStream( this, xStream, bHierarchyAccess ); - uno::Reference< io::XStream > xWriteStream = - uno::Reference< io::XStream >( static_cast< ::cppu::OWeakObject* >( m_pAntiImpl ), - uno::UNO_QUERY ); + uno::Reference< io::XStream > xWriteStream( static_cast< ::cppu::OWeakObject* >( m_pAntiImpl ), + uno::UNO_QUERY ); SAL_WARN_IF( !xWriteStream.is(), "package.xstor", "OWriteStream MUST implement XStream && XComponent interfaces!" ); diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index 37345ee95368..d088e33d616e 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -347,11 +347,12 @@ static PyObject* initTestEnvironment( css::uno::UNO_QUERY_THROW); char *const testlib = getenv("TEST_LIB"); if (!testlib) { abort(); } - OString const libname = OString(testlib, strlen(testlib)) #ifdef _WIN32 - .replaceAll(OString('/'), OString('\\')) + OString const libname = OString(testlib, strlen(testlib)) + .replaceAll(OString('/'), OString('\\')); +#else + OString const libname(testlib, strlen(testlib)); #endif - ; osl::Module &mod = runtime.getImpl()->cargo->testModule; mod.load(OStringToOUString(libname, osl_getThreadTextEncoding()), diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 0ce9ecf3b984..b2083a95a8b1 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -1022,7 +1022,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi int nViewCount = 0; Point aNewObjPos(0,0); - Point aLeftTop = Point(SAL_MAX_INT32, SAL_MAX_INT32); + Point aLeftTop(SAL_MAX_INT32, SAL_MAX_INT32); for (const auto& rxSection : m_aSections) { OReportSection& rReportSection = rxSection->getReportSection(); diff --git a/sal/qa/rtl/oustring/rtl_OUString2.cxx b/sal/qa/rtl/oustring/rtl_OUString2.cxx index b3e972692a46..3b6474d1cafa 100644 --- a/sal/qa/rtl/oustring/rtl_OUString2.cxx +++ b/sal/qa/rtl/oustring/rtl_OUString2.cxx @@ -645,7 +645,7 @@ public: void lastIndexOf_test_oustring_008() { // search for earth, not found (-1) - OUString aStr = OUString(); + OUString aStr; OUString aSearchStr("earth"); lastIndexOf_oustring(aStr, aSearchStr, -1); } @@ -653,8 +653,8 @@ public: void lastIndexOf_test_oustring_009() { // search for earth, not found (-1) - OUString aStr = OUString(); - OUString aSearchStr = OUString(); + OUString aStr; + OUString aSearchStr; lastIndexOf_oustring(aStr, aSearchStr, -1); } diff --git a/sax/qa/cppunit/xmlimport.cxx b/sax/qa/cppunit/xmlimport.cxx index 7ab34ed763c9..79f360dce5da 100644 --- a/sax/qa/cppunit/xmlimport.cxx +++ b/sax/qa/cppunit/xmlimport.cxx @@ -300,7 +300,7 @@ Sequence< sal_Int8 > DummyTokenHandler::getUTF8Identifier( sal_Int32 nToken ) if ( nElementToken < SAL_N_ELEMENTS(tokens) ) aUtf8Token = tokens[ nElementToken ]; } - Sequence< sal_Int8 > aSeq = Sequence< sal_Int8 >( reinterpret_cast< const sal_Int8* >( + Sequence< sal_Int8 > aSeq( reinterpret_cast< const sal_Int8* >( aUtf8Token.getStr() ), aUtf8Token.getLength() ); return aSeq; } diff --git a/sc/qa/extras/anchor.cxx b/sc/qa/extras/anchor.cxx index 9e0e920ec281..8d61466b5a29 100644 --- a/sc/qa/extras/anchor.cxx +++ b/sc/qa/extras/anchor.cxx @@ -170,7 +170,7 @@ void ScAnchorTest::testTdf76183() SdrPage* pPage = pDrawLayer->GetPage(0); // Add a circle somewhere below first row. - const tools::Rectangle aOrigRect = tools::Rectangle(1000, 1000, 1200, 1200); + const tools::Rectangle aOrigRect(1000, 1000, 1200, 1200); SdrCircObj* pObj = new SdrCircObj(*pDrawLayer, OBJ_CIRC, aOrigRect); pPage->InsertObject(pObj); // Anchor to cell diff --git a/sc/qa/extras/scpdfexport.cxx b/sc/qa/extras/scpdfexport.cxx index 18ed4d166891..c21cdaa2dde7 100644 --- a/sc/qa/extras/scpdfexport.cxx +++ b/sc/qa/extras/scpdfexport.cxx @@ -84,8 +84,7 @@ void ScPDFExportTest::setUp() xTargetFrame = xDesktop->findFrame("_blank", 0); CPPUNIT_ASSERT(xTargetFrame.is()); - uno::Reference<frame::XModel> xModel - = uno::Reference<frame::XModel>(mxComponent, uno::UNO_QUERY); + uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); uno::Reference<frame::XModel2> xModel2(xModel, UNO_QUERY); CPPUNIT_ASSERT(xModel2.is()); @@ -222,8 +221,7 @@ void ScPDFExportTest::setFont(ScFieldEditEngine& rEE, sal_Int32 nStart, sal_Int3 void ScPDFExportTest::testExportRange_Tdf120161() { // create test document - uno::Reference<frame::XModel> xModel - = uno::Reference<frame::XModel>(mxComponent, uno::UNO_QUERY); + uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY); uno::Reference<sheet::XSpreadsheetDocument> xDoc(xModel, uno::UNO_QUERY_THROW); uno::Reference<sheet::XSpreadsheets> xSheets(xDoc->getSheets(), UNO_SET_THROW); uno::Reference<container::XIndexAccess> xIndex(xSheets, uno::UNO_QUERY_THROW); diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 06881c84b5bb..4db44ce1b6c1 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -2765,7 +2765,7 @@ void Test::testGraphicsInGroup() { // Add a circle. - tools::Rectangle aOrigRect = tools::Rectangle(10,10,210,210); // 200 x 200 + tools::Rectangle aOrigRect(10,10,210,210); // 200 x 200 SdrCircObj* pObj = new SdrCircObj(*pDrawLayer, OBJ_CIRC, aOrigRect); pPage->InsertObject(pObj); const tools::Rectangle& rNewRect = pObj->GetLogicRect(); @@ -3518,14 +3518,14 @@ void Test::testCopyPasteTranspose() // transpose clipboard, paste and check on Sheet2 m_pDoc->InsertTab(1, "Sheet2"); - ScRange aSrcRange = ScRange(0,0,0,2,0,0); + ScRange aSrcRange(0,0,0,2,0,0); ScDocument aNewClipDoc(SCDOCMODE_CLIP); copyToClip(m_pDoc, aSrcRange, &aNewClipDoc); ScDocumentUniquePtr pTransClip(new ScDocument(SCDOCMODE_CLIP)); aNewClipDoc.TransposeClip(pTransClip.get(), InsertDeleteFlags::ALL, false); - ScRange aDestRange = ScRange(3,1,1,3,3,1);//target: Sheet2.D2:D4 + ScRange aDestRange(3,1,1,3,3,1);//target: Sheet2.D2:D4 ScMarkData aMark; aMark.SetMarkArea(aDestRange); m_pDoc->CopyFromClip(aDestRange, aMark, InsertDeleteFlags::ALL, nullptr, pTransClip.get()); diff --git a/sc/qa/unit/ucalc_sort.cxx b/sc/qa/unit/ucalc_sort.cxx index 00473f4d7757..689177d7e42e 100644 --- a/sc/qa/unit/ucalc_sort.cxx +++ b/sc/qa/unit/ucalc_sort.cxx @@ -1913,7 +1913,7 @@ void Test::testSortImages() } // Insert graphic in cell B2. - const tools::Rectangle aOrigRect = tools::Rectangle(1000, 1000, 1200, 1200); + const tools::Rectangle aOrigRect(1000, 1000, 1200, 1200); SdrCircObj* pObj = new SdrCircObj(*pDrawLayer, OBJ_CIRC, aOrigRect); SdrPage* pPage = pDrawLayer->GetPage(0); CPPUNIT_ASSERT(pPage); diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 76fc911a82a6..7bf3eb55d5e6 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -1925,7 +1925,7 @@ void ScColumn::UpdateDrawObjectsForRow( std::vector<SdrObject*>& pObjects, SCCOL { for (auto &pObject : pObjects) { - ScAddress aNewAddress = ScAddress(nTargetCol, nTargetRow, nTab); + ScAddress aNewAddress(nTargetCol, nTargetRow, nTab); // Update draw object according to new anchor ScDrawLayer* pDrawLayer = GetDoc()->GetDrawLayer(); diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index b4dfbfac64aa..4bfacdde4190 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -397,7 +397,7 @@ long ScColumn::GetNeededSize( pEngine->SetHyphenator( xXHyphenator ); } - Size aPaper = Size( 1000000, 1000000 ); + Size aPaper( 1000000, 1000000 ); if ( eOrient==SvxCellOrientation::Stacked && !bAsianVertical ) aPaper.setWidth( 1 ); else if (bBreak) diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx index 9d52ba167d4c..48a6c432db1e 100644 --- a/sc/source/core/tool/detfunc.cxx +++ b/sc/source/core/tool/detfunc.cxx @@ -550,7 +550,7 @@ void ScDetectiveFunc::InsertToOtherTab( SCCOL nStartCol, SCROW nStartRow, long nPageSign = bNegativePage ? -1 : 1; Point aStartPos = GetDrawPos( nStartCol, nStartRow, DrawPosMode::DetectiveArrow ); - Point aEndPos = Point( aStartPos.X() + 1000 * nPageSign, aStartPos.Y() - 1000 ); + Point aEndPos( aStartPos.X() + 1000 * nPageSign, aStartPos.Y() - 1000 ); if (aEndPos.Y() < 0) aEndPos.AdjustY(2000 ); diff --git a/sc/source/core/tool/sharedformula.cxx b/sc/source/core/tool/sharedformula.cxx index ea815b115aeb..daef7a95d082 100644 --- a/sc/source/core/tool/sharedformula.cxx +++ b/sc/source/core/tool/sharedformula.cxx @@ -432,7 +432,7 @@ void SharedFormulaUtil::startListeningAsGroup( sc::StartListeningContext& rCxt, ScAddress aPos1 = rRef1.toAbs(rTopCell.aPos); ScAddress aPos2 = rRef2.toAbs(rTopCell.aPos); - ScRange aOrigRange = ScRange(aPos1, aPos2); + ScRange aOrigRange(aPos1, aPos2); ScRange aListenedRange = aOrigRange; if (rRef2.IsRowRel()) aListenedRange.aEnd.IncRow(xGroup->mnLength-1); diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx index 35d84b86194e..599d001b29b2 100644 --- a/sc/source/filter/excel/xename.cxx +++ b/sc/source/filter/excel/xename.cxx @@ -542,7 +542,7 @@ void XclExpNameManagerImpl::SaveXml( XclExpXmlStream& rStrm ) sal_uInt16 XclExpNameManagerImpl::FindNamedExp( SCTAB nTab, OUString sName ) { - NamedExpMap::key_type key = NamedExpMap::key_type(nTab, sName); + NamedExpMap::key_type key(nTab, sName); NamedExpMap::const_iterator itr = maNamedExpMap.find(key); return (itr == maNamedExpMap.end()) ? 0 : itr->second; } @@ -617,7 +617,7 @@ sal_uInt16 XclExpNameManagerImpl::CreateName( SCTAB nTab, const ScRangeData& rRa xName->SetLocalTab(nTab); sal_uInt16 nNameIdx = Append( xName ); // store the index of the NAME record in the lookup map - NamedExpMap::key_type key = NamedExpMap::key_type(nTab, rRangeData.GetName()); + NamedExpMap::key_type key(nTab, rRangeData.GetName()); maNamedExpMap[key] = nNameIdx; /* Create the definition formula. diff --git a/sc/source/filter/oox/pivottablebuffer.cxx b/sc/source/filter/oox/pivottablebuffer.cxx index 8af348942bcd..e9cc4010b673 100644 --- a/sc/source/filter/oox/pivottablebuffer.cxx +++ b/sc/source/filter/oox/pivottablebuffer.cxx @@ -1223,9 +1223,9 @@ void PivotTable::finalizeImport() Reference< XDataPilotTables > xDPTables( xDPTablesSupp->getDataPilotTables(), UNO_SET_THROW ); mxDPDescriptor.set( xDPTables->createDataPilotDescriptor(), UNO_SET_THROW ); ScRange aRange = mpPivotCache->getSourceRange(); - CellRangeAddress aCellRangeAddress = CellRangeAddress( aRange.aStart.Tab(), - aRange.aStart.Col(), aRange.aStart.Row(), - aRange.aEnd.Col(), aRange.aEnd.Row() ); + CellRangeAddress aCellRangeAddress( aRange.aStart.Tab(), + aRange.aStart.Col(), aRange.aStart.Row(), + aRange.aEnd.Col(), aRange.aEnd.Row() ); mxDPDescriptor->setSourceRange( aCellRangeAddress ); mxDPDescriptor->setTag( maDefModel.maTag ); diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx index fcc54e1880b1..1408d432e3d3 100644 --- a/sc/source/filter/oox/sheetdatabuffer.cxx +++ b/sc/source/filter/oox/sheetdatabuffer.cxx @@ -256,7 +256,7 @@ void SheetDataBuffer::setFormulaCell( const CellModel& rModel, const ApiTokenSeq array formula. In this case, the cell will be remembered. After reading the formula definition it will be retried to insert the formula via retryPendingSharedFormulaCell(). */ - ScAddress aTokenAddr = ScAddress ( aTokenInfo.First.Column, aTokenInfo.First.Row, aTokenInfo.First.Sheet ); + ScAddress aTokenAddr( aTokenInfo.First.Column, aTokenInfo.First.Row, aTokenInfo.First.Sheet ); BinAddress aBaseAddr( aTokenAddr ); aTokens = resolveSharedFormula( aTokenAddr ); if( !aTokens.hasElements() ) diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index c4bd8fa8c292..77d8bd7cd048 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -2734,8 +2734,8 @@ bool ScXMLExport::GetMerged (const table::CellRangeAddress* pCellAddress, uno::Reference<sheet::XCellRangeAddressable> xCellAddress (xCursor, uno::UNO_QUERY); xCursor->collapseToMergedArea(); table::CellRangeAddress aCellAddress2(xCellAddress->getRangeAddress()); - ScRange aScRange = ScRange( aCellAddress2.StartColumn, aCellAddress2.StartRow, aCellAddress2.Sheet, - aCellAddress2.EndColumn, aCellAddress2.EndRow, aCellAddress2.Sheet ); + ScRange aScRange( aCellAddress2.StartColumn, aCellAddress2.StartRow, aCellAddress2.Sheet, + aCellAddress2.EndColumn, aCellAddress2.EndRow, aCellAddress2.Sheet ); if ((aScRange.aEnd.Row() > nRow || aScRange.aEnd.Col() > nCol) && diff --git a/sc/source/filter/xml/xmltransformationi.cxx b/sc/source/filter/xml/xmltransformationi.cxx index c8e3d4768900..6c2871b138e6 100644 --- a/sc/source/filter/xml/xmltransformationi.cxx +++ b/sc/source/filter/xml/xmltransformationi.cxx @@ -260,7 +260,7 @@ ScXMLColumnTextContext::ScXMLColumnTextContext( : ScXMLImportContext(rImport) , maType(sc::TEXT_TRANSFORM_TYPE::TO_LOWER) { - OUString aType = OUString(); + OUString aType; if (rAttrList.is()) { @@ -339,7 +339,7 @@ ScXMLColumnAggregateContext::ScXMLColumnAggregateContext( : ScXMLImportContext(rImport) , maType(sc::AGGREGATE_FUNCTION::SUM) { - OUString aType = OUString(); + OUString aType; if (rAttrList.is()) { diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index bddb591f0391..4887523e09c5 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -243,7 +243,7 @@ void ScAutoFmtPreview::DrawString(vcl::RenderContext& rRenderContext, size_t nCo Size aStrSize; sal_uInt16 nFmtIndex = GetFormatIndex( nCol, nRow ); const basegfx::B2DRange cellRange(maArray.GetCellRange( nCol, nRow, true )); - Point aPos = Point(basegfx::fround(cellRange.getMinX()), basegfx::fround(cellRange.getMinY())); + Point aPos(basegfx::fround(cellRange.getMinX()), basegfx::fround(cellRange.getMinY())); sal_uInt16 nRightX = 0; bool bJustify = pCurData->GetIncludeJustify(); SvxCellHorJustify eJustification; diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 3d21cd96d3c3..4f6bbb937ce4 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -1189,7 +1189,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) case FID_DEFINE_CURRENT_NAME: { - ScAddress aCurrentAddress = ScAddress( nPosX, nPosY, nTab ); + ScAddress aCurrentAddress( nPosX, nPosY, nTab ); if ( pDoc && !pDoc->IsAddressInRangeName( RangeNameScope::GLOBAL, aCurrentAddress ) && diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index dce120c95779..74826da1aa37 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5674,8 +5674,8 @@ bool ScGridWindow::InsideVisibleRange( SCCOL nPosX, SCROW nPosY ) OString ScGridWindow::getCellCursor( int nOutputWidth, int nOutputHeight, long nTileWidth, long nTileHeight ) { - Fraction zoomX = Fraction(long(nOutputWidth * TWIPS_PER_PIXEL), nTileWidth); - Fraction zoomY = Fraction(long(nOutputHeight * TWIPS_PER_PIXEL), nTileHeight); + Fraction zoomX(long(nOutputWidth * TWIPS_PER_PIXEL), nTileWidth); + Fraction zoomY(long(nOutputHeight * TWIPS_PER_PIXEL), nTileHeight); return getCellCursor(zoomX, zoomY); } diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 663ce00737ca..5e1280cbd98f 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -666,7 +666,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI MapMode aCurrentMapMode(pContentDev->GetMapMode()); pContentDev->SetMapMode(MapMode(MapUnit::MapPixel)); - tools::Rectangle aPixRect = tools::Rectangle( Point(), GetOutputSizePixel() ); + tools::Rectangle aPixRect( Point(), GetOutputSizePixel() ); pContentDev->SetFillColor( rColorCfg.GetColorValue(svtools::APPBACKGROUND).nColor ); pContentDev->SetLineColor(); if ( nX2==MAXCOL ) diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 15664211f0ff..b2ca243b63e5 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -1975,7 +1975,7 @@ long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, bool bDoPrint, ScPr // adjust aPageRect for left/right page - tools::Rectangle aTempRect = tools::Rectangle( Point(), aPageSize ); + tools::Rectangle aTempRect( Point(), aPageSize ); if (IsMirror(nPageNo)) { aPageRect.SetLeft( ( aTempRect.Left() + nRightMargin ) * 100 / nZoom ); @@ -2044,7 +2044,7 @@ void ScPrintFunc::PrintPage( long nPageNo, SCCOL nX1, SCROW nY1, SCCOL nX2, SCRO // adjust aPageRect for left/right page - tools::Rectangle aTempRect = tools::Rectangle( Point(), aPageSize ); + tools::Rectangle aTempRect( Point(), aPageSize ); if (IsMirror(nPageNo)) { aPageRect.SetLeft( ( aTempRect.Left() + nRightMargin ) * 100 / nZoom ); diff --git a/scripting/source/provider/ActiveMSPList.cxx b/scripting/source/provider/ActiveMSPList.cxx index 5411b5a474ef..3cf34551d52c 100644 --- a/scripting/source/provider/ActiveMSPList.cxx +++ b/scripting/source/provider/ActiveMSPList.cxx @@ -242,8 +242,7 @@ ActiveMSPList::addActiveMSP( const Reference< uno::XInterface >& xComponent, // should probably throw from this method!!, reexamine try { - Reference< lang::XComponent > xBroadcaster = - Reference< lang::XComponent >( xComponent, UNO_QUERY_THROW ); + Reference< lang::XComponent > xBroadcaster( xComponent, UNO_QUERY_THROW ); xBroadcaster->addEventListener( this ); } catch ( const Exception& ) diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx index 57f66b1e0995..1e933df231f7 100644 --- a/scripting/source/provider/MasterScriptProvider.cxx +++ b/scripting/source/provider/MasterScriptProvider.cxx @@ -714,14 +714,7 @@ static Reference< XInterface > urihelper_create( static Sequence< OUString > urihelper_getSupportedServiceNames( ) { - OUString serviceNameList[] = { - OUString( - "com.sun.star.script.provider.ScriptURIHelper" ) }; - - Sequence< OUString > serviceNames = Sequence < - OUString > ( serviceNameList, 1 ); - - return serviceNames; + return { "com.sun.star.script.provider.ScriptURIHelper" }; } static OUString urihelper_getImplementationName( ) diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx index 2a09e8dbe5ae..172f0ac0ae66 100644 --- a/scripting/source/provider/URIHelper.cxx +++ b/scripting/source/provider/URIHelper.cxx @@ -252,14 +252,7 @@ ScriptingFrameworkURIHelper::supportsService( const OUString& serviceName ) uno::Sequence< OUString > SAL_CALL ScriptingFrameworkURIHelper::getSupportedServiceNames() { - OUString serviceNameList[] = { - OUString( - "com.sun.star.script.provider.ScriptURIHelper" ) }; - - uno::Sequence< OUString > serviceNames = uno::Sequence < - OUString > ( serviceNameList, 1 ); - - return serviceNames; + return { "com.sun.star.script.provider.ScriptURIHelper" }; } } diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 21875ad23078..c850461f3c9d 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1856,8 +1856,8 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const ::tools::Rectangle& rN long nOldWidth = GetWidth() - GetLeftBorder() - GetRightBorder(); long nOldHeight = GetHeight() - GetUpperBorder() - GetLowerBorder(); - Fraction aFractX = Fraction(aNewPageSize.Width(), nOldWidth); - Fraction aFractY = Fraction(aNewPageSize.Height(), nOldHeight); + Fraction aFractX(aNewPageSize.Width(), nOldWidth); + Fraction aFractY(aNewPageSize.Height(), nOldHeight); const size_t nObjCnt = (mbScaleObjects ? GetObjCount() : 0); diff --git a/sd/source/ui/dlg/TemplateScanner.cxx b/sd/source/ui/dlg/TemplateScanner.cxx index 14e53a6b6fa2..f1f250f046fa 100644 --- a/sd/source/ui/dlg/TemplateScanner.cxx +++ b/sd/source/ui/dlg/TemplateScanner.cxx @@ -173,7 +173,7 @@ TemplateScanner::State TemplateScanner::ScanEntry() OUString sContentType (xRow->getString (3)); OUString aId = xContentAccess->queryContentIdentifierString(); - ::ucbhelper::Content aContent = ::ucbhelper::Content (aId, mxEntryEnvironment, comphelper::getProcessComponentContext()); + ::ucbhelper::Content aContent(aId, mxEntryEnvironment, comphelper::getProcessComponentContext()); if (aContent.isDocument ()) { // Check whether the entry is an impress template. If so diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index b13e3d93a2a8..e26670b321e4 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1910,7 +1910,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r return; std::unique_ptr<::sd::ClientView> pView( new ::sd::ClientView( mpDocShell, pOut ) ); - ::tools::Rectangle aVisArea = ::tools::Rectangle( Point(), mpDoc->GetSdPage( static_cast<sal_uInt16>(nPageNumber) - 1, ePageKind )->GetSize() ); + ::tools::Rectangle aVisArea( Point(), mpDoc->GetSdPage( static_cast<sal_uInt16>(nPageNumber) - 1, ePageKind )->GetSize() ); vcl::Region aRegion( aVisArea ); ::sd::ViewShell* pOldViewSh = mpDocShell->GetViewShell(); diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index 54a3d09da33c..a240890ab6f8 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -900,7 +900,7 @@ void DrawViewShell::GetRulerState(SfxItemSet& rSet) if( mpDrawView->IsTextEdit() ) { Point aPnt1 = GetActiveWindow()->GetWinViewPos(); - ::tools::Rectangle aMinMaxRect = ::tools::Rectangle( aPnt1, Size(ULONG_MAX, ULONG_MAX) ); + ::tools::Rectangle aMinMaxRect( aPnt1, Size(ULONG_MAX, ULONG_MAX) ); rSet.Put( SfxRectangleItem(SID_RULER_LR_MIN_MAX, aMinMaxRect) ); } else diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 0f8edde16318..279872ba9382 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -273,9 +273,9 @@ void OutlineViewShell::ArrangeGUIElements () ::tools::Rectangle aVis = pOutlinerView->GetVisArea(); - ::tools::Rectangle aText = ::tools::Rectangle(Point(0,0), - Size(pOlView->GetPaperWidth(), - pOlView->GetOutliner().GetTextHeight())); + ::tools::Rectangle aText(Point(0,0), + Size(pOlView->GetPaperWidth(), + pOlView->GetOutliner().GetTextHeight())); if (aWin.GetHeight() > aText.Bottom()) aText.SetBottom( aWin.GetHeight() ); diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index da0a60cf8a15..a0e80edc01dc 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -734,9 +734,9 @@ IMPL_LINK_NOARG(OutlineView, StatusEventHdl, EditStatus&, void) ::sd::Window* pWin = mrOutlineViewShell.GetActiveWindow(); OutlinerView* pOutlinerView = GetViewByWindow(pWin); ::tools::Rectangle aVis = pOutlinerView->GetVisArea(); - ::tools::Rectangle aText = ::tools::Rectangle(Point(0,0), - Size(mnPaperWidth, - mrOutliner.GetTextHeight())); + ::tools::Rectangle aText(Point(0,0), + Size(mnPaperWidth, + mrOutliner.GetTextHeight())); ::tools::Rectangle aWin(Point(0,0), pWin->GetOutputSizePixel()); aWin = pWin->PixelToLogic(aWin); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 98db80802603..8cc0240f5f6f 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -2313,7 +2313,7 @@ Size SfxTemplateDialog_Impl::GetMinOutputSizePixel() { Size aSizeATL=m_pFloat->PixelToLogic(m_aActionTbL->CalcWindowSizePixel()); Size aSizeATR=m_pFloat->PixelToLogic(m_aActionTbR->CalcWindowSizePixel()); - Size aMinSize=Size( + Size aMinSize( aSizeATL.Width()+aSizeATR.Width()+ 2*SFX_TEMPLDLG_HFRAME + SFX_TEMPLDLG_MIDHSPACE, 4*aSizeATL.Height()+2*SFX_TEMPLDLG_MIDVSPACE); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index ad63078a44fb..46d75db945c3 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -2315,7 +2315,7 @@ void SfxMedium::Transfer_Impl() // <http://tools.ietf.org/html/rfc4918#section-7.3> // If the WebDAV resource is already locked by this LO instance, nothing will // happen, e.g. the LOCK method will not be sent to the server. - ::ucbhelper::Content aLockContent = ::ucbhelper::Content( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ), xComEnv, comphelper::getProcessComponentContext() ); + ::ucbhelper::Content aLockContent( GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ), xComEnv, comphelper::getProcessComponentContext() ); aLockContent.lock(); } } diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index f33f92b327b4..435041fd1189 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -2278,7 +2278,7 @@ void SAL_CALL SfxDocTplService::update() WaitWindow_Impl::WaitWindow_Impl() : WorkWindow(nullptr, WB_BORDER | WB_3DLOOK) { - tools::Rectangle aRect = tools::Rectangle(0, 0, 300, 30000); + tools::Rectangle aRect(0, 0, 300, 30000); maText = SfxResId(RID_CNT_STR_WAITING); maRect = GetTextRect(aRect, maText, gnTextStyle); aRect = maRect; diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index afe18e916005..bc464e4b0694 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -892,8 +892,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int16 nStoreMode, pFileDlg->CreateMatcher( aDocServiceName ); uno::Reference< ui::dialogs::XFilePicker3 > xFilePicker = pFileDlg->GetFilePicker(); - uno::Reference< ui::dialogs::XFilePickerControlAccess > xControlAccess = - uno::Reference< ui::dialogs::XFilePickerControlAccess >( xFilePicker, uno::UNO_QUERY ); + uno::Reference< ui::dialogs::XFilePickerControlAccess > xControlAccess( xFilePicker, uno::UNO_QUERY ); if ( xControlAccess.is() ) { diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index d8406ecd4313..986e16289ab8 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1516,7 +1516,7 @@ vcl::Window* SfxViewShell::GetEditWindowForActiveOLEObj() const void SfxViewShell::SetLOKLanguageTag(const OUString& rBcp47LanguageTag) { - LanguageTag aTag = LanguageTag(rBcp47LanguageTag, true); + LanguageTag aTag(rBcp47LanguageTag, true); css::uno::Sequence<OUString> inst(officecfg::Setup::Office::InstalledLocales::get()->getElementNames()); LanguageTag aFallbackTag = LanguageTag(getInstalledLocaleForSystemUILanguage(inst, /* bRequestInstallIfMissing */ false, rBcp47LanguageTag), true).makeFallback(); diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index efbefb21cab0..6a076a632806 100644 --- a/shell/source/cmdmail/cmdmailsuppl.cxx +++ b/shell/source/cmdmail/cmdmailsuppl.cxx @@ -168,8 +168,7 @@ void SAL_CALL CmdMailSuppl::sendSimpleMailMessage( const Reference< XSimpleMailM Sequence< Any > aArgumentList( 1 ); aArgumentList[0] <<= aProperty; - Reference< XNameAccess > xNameAccess = - Reference< XNameAccess > ( + Reference< XNameAccess > xNameAccess( m_xConfigurationProvider->createInstanceWithArguments( "com.sun.star.configuration.ConfigurationAccess", aArgumentList ), diff --git a/slideshow/source/engine/rehearsetimingsactivity.cxx b/slideshow/source/engine/rehearsetimingsactivity.cxx index 573507cc0091..10dbeb776502 100644 --- a/slideshow/source/engine/rehearsetimingsactivity.cxx +++ b/slideshow/source/engine/rehearsetimingsactivity.cxx @@ -441,9 +441,9 @@ void RehearseTimingsActivity::paint( cppcanvas::CanvasSharedPtr const & canvas ) blackHole->EnableOutput(false); blackHole->SetMapMode(MapMode(MapUnit::MapPixel)); blackHole->SetFont( maFont ); - tools::Rectangle rect = tools::Rectangle( 0,0, - maSpriteSizePixel.getX(), - maSpriteSizePixel.getY()); + tools::Rectangle rect( 0,0, + maSpriteSizePixel.getX(), + maSpriteSizePixel.getY()); if (mbDrawPressed) { blackHole->SetTextColor( COL_BLACK ); diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index 6a535b1e9777..34ac585f165a 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -312,8 +312,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, } else { - BitmapEx aTmpMask = BitmapEx(aMask, - aMask); + BitmapEx aTmpMask(aMask, aMask); pVDevMask->DrawBitmapEx(rAnimationBitmap.maPositionPixel, aTmpMask ); } diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx index 5fba90348dae..c3172ab60126 100644 --- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx +++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx @@ -483,13 +483,13 @@ void Test::ParseAndCompare(const char *formula1, const char *formula2, const cha OUString sOutput1, sOutput2; // parse formula1 - OUString sInput1 = OUString(formula1, strlen(formula1), RTL_TEXTENCODING_UTF8); + OUString sInput1(formula1, strlen(formula1), RTL_TEXTENCODING_UTF8); auto pNode1 = SmParser().ParseExpression(sInput1); pNode1->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmNodeToTextVisitor(pNode1.get(), sOutput1); // parse formula2 - OUString sInput2 = OUString(formula2, strlen(formula2), RTL_TEXTENCODING_UTF8); + OUString sInput2(formula2, strlen(formula2), RTL_TEXTENCODING_UTF8); auto pNode2 = SmParser().ParseExpression(sInput2); pNode2->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); SmNodeToTextVisitor(pNode2.get(), sOutput2); diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index 84c8508d4fe2..102851120a22 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -1045,7 +1045,7 @@ std::unique_ptr<SmNode> SmParser::DoLine() //positions, in visual formula editor. if(ExpressionArray.empty()) { - SmToken aTok = SmToken(); + SmToken aTok; aTok.eType = TNEWLINE; ExpressionArray.emplace_back(std::unique_ptr<SmNode>(new SmExpressionNode(aTok))); } diff --git a/svl/source/misc/sharecontrolfile.cxx b/svl/source/misc/sharecontrolfile.cxx index 94805932741c..cda98d014759 100644 --- a/svl/source/misc/sharecontrolfile.cxx +++ b/svl/source/misc/sharecontrolfile.cxx @@ -50,7 +50,7 @@ ShareControlFile::ShareControlFile( const OUString& aOrigURL ) if ( !m_xStream.is() && !GetURL().isEmpty() ) { uno::Reference< ucb::XCommandEnvironment > xDummyEnv; - ::ucbhelper::Content aContent = ::ucbhelper::Content( GetURL(), xDummyEnv, comphelper::getProcessComponentContext() ); + ::ucbhelper::Content aContent( GetURL(), xDummyEnv, comphelper::getProcessComponentContext() ); uno::Reference< ucb::XContentIdentifier > xContId( aContent.get().is() ? aContent.get()->getIdentifier() : nullptr ); if ( !xContId.is() || xContId->getContentProviderScheme() != "file" ) diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 4351633addd5..efb44073f2f0 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -1883,7 +1883,7 @@ void BrowseBox::MakeFieldVisible // calculate column position, field rectangle and painting area sal_uInt16 nColPos = GetColumnPos( nColId ); tools::Rectangle aFieldRect = GetFieldRectPixel( nRow, nColId, false ); - tools::Rectangle aDataRect = tools::Rectangle( Point(0, 0), pDataWin->GetSizePixel() ); + tools::Rectangle aDataRect( Point(0, 0), pDataWin->GetSizePixel() ); // positioned outside on the left? if ( nColPos >= FrozenColCount() && nColPos < nFirstCol ) diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 4d38e526a1b6..d639900f05b9 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1201,7 +1201,7 @@ void SvxXLinePreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rec if ( mbWithSymbol && mpGraphic ) { const Size aOutputSize(GetOutputSize()); - Point aPos = Point( aOutputSize.Width() / 3, aOutputSize.Height() / 2 ); + Point aPos( aOutputSize.Width() / 3, aOutputSize.Height() / 2 ); aPos.AdjustX( -(maSymbolSize.Width() / 2) ); aPos.AdjustY( -(maSymbolSize.Height() / 2) ); mpGraphic->Draw(&getBufferDevice(), aPos, maSymbolSize); diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx index 0a0741bbe922..fd237aea31a2 100644 --- a/svx/source/dialog/measctrl.cxx +++ b/svx/source/dialog/measctrl.cxx @@ -56,9 +56,9 @@ void SvxXMeasurePreview::ResizeImpl(const Size& rSize) rRefDevice.SetMapMode(m_aMapMode); Size aSize = rRefDevice.PixelToLogic(rSize); - Point aPt1 = Point(aSize.Width() / 5, static_cast<long>(aSize.Height() / 2)); + Point aPt1(aSize.Width() / 5, static_cast<long>(aSize.Height() / 2)); pMeasureObj->SetPoint(aPt1, 0); - Point aPt2 = Point(aSize.Width() * 4 / 5, static_cast<long>(aSize.Height() / 2)); + Point aPt2(aSize.Width() * 4 / 5, static_cast<long>(aSize.Height() / 2)); pMeasureObj->SetPoint(aPt2, 1); rRefDevice.Pop(); diff --git a/svx/source/sidebar/paragraph/ParaSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaSpacingControl.cxx index 7e703d347e55..d2fe7d247216 100644 --- a/svx/source/sidebar/paragraph/ParaSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaSpacingControl.cxx @@ -178,7 +178,7 @@ void SAL_CALL ParaLRSpacingControl::notifyContextChangeEvent(const css::ui::Cont if(pWindow) { - vcl::EnumContext eContext = vcl::EnumContext( + vcl::EnumContext eContext( vcl::EnumContext::GetApplicationEnum(rEvent.ApplicationName), vcl::EnumContext::GetContextEnum(rEvent.ContextName)); pWindow->SetContext(eContext); diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 08b0b9eaa82a..873f322ec6b6 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1208,7 +1208,7 @@ double SdrTextObj::GetFontScaleY() const SdrOutliner& rOutliner = ImpGetDrawOutliner(); const Size aShapeSize = GetSnapRect().GetSize(); - const Size aSize = Size(aShapeSize.Width() - GetTextLeftDistance() - GetTextRightDistance(), + const Size aSize(aShapeSize.Width() - GetTextLeftDistance() - GetTextRightDistance(), aShapeSize.Height() - GetTextUpperDistance() - GetTextLowerDistance()); rOutliner.SetPaperSize(aSize); diff --git a/svx/source/svdraw/textchaincursor.cxx b/svx/source/svdraw/textchaincursor.cxx index 117d6ddeeb5a..4f944f4342f6 100644 --- a/svx/source/svdraw/textchaincursor.cxx +++ b/svx/source/svdraw/textchaincursor.cxx @@ -84,7 +84,7 @@ void TextChainCursorManager::impDetectEvent(const KeyEvent& rKEvt, OUString aLastParaText = pOutl->GetText(pOutl->GetParagraph(nLastPara)); sal_Int32 nLastParaLen = aLastParaText.getLength(); - ESelection aEndSel = ESelection(nLastPara, nLastParaLen); + ESelection aEndSel(nLastPara, nLastParaLen); bool bAtEndOfTextContent = aCurSel == aEndSel; // Possibility: Are we "pushing" at the end of the object? @@ -106,7 +106,7 @@ void TextChainCursorManager::impDetectEvent(const KeyEvent& rKEvt, return; } - ESelection aStartSel = ESelection(0, 0); + ESelection aStartSel(0, 0); bool bAtStartOfTextContent = aCurSel == aStartSel; // Possibility: Are we "pushing" at the start of the object? diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx index 2475c5edcf71..fac758a30ccf 100644 --- a/sw/qa/extras/inc/swmodeltestbase.hxx +++ b/sw/qa/extras/inc/swmodeltestbase.hxx @@ -477,8 +477,8 @@ protected: pXpathStrResult); } - OUString aRet = OUString(reinterpret_cast<char*>(pXpathStrResult), - xmlStrlen(pXpathStrResult), RTL_TEXTENCODING_UTF8); + OUString aRet(reinterpret_cast<char*>(pXpathStrResult), + xmlStrlen(pXpathStrResult), RTL_TEXTENCODING_UTF8); xmlFree(pXpathStrResult); xmlFree(pXmlXpathObj); xmlFree(pXmlXpathCtx); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx index df83dab157fb..3fd1ae58f84b 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx @@ -441,7 +441,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf49073, "tdf49073.docx") { // test case for Asian phontic guide (ruby text.) sal_Unicode aRuby[3] = {0x304D,0x3082,0x3093}; - OUString sRuby = OUString(aRuby, SAL_N_ELEMENTS(aRuby)); + OUString sRuby(aRuby, SAL_N_ELEMENTS(aRuby)); CPPUNIT_ASSERT_EQUAL(sRuby,getProperty<OUString>(getParagraph(1)->getStart(), "RubyText")); OUString sStyle = getProperty<OUString>( getParagraph(1)->getStart(), "RubyCharStyleName"); uno::Reference<beans::XPropertySet> xPropertySet(getStyles("CharacterStyles")->getByName(sStyle), uno::UNO_QUERY ); diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 08aa8eecefcc..3793a13a4028 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -360,7 +360,7 @@ DECLARE_RTFEXPORT_TEST(testTdf49073, "tdf49073.rtf") { // test case for Asian phontic guide (ruby text.) sal_Unicode aRuby[3] = { 0x304D, 0x3082, 0x3093 }; - OUString sRuby = OUString(aRuby, SAL_N_ELEMENTS(aRuby)); + OUString sRuby(aRuby, SAL_N_ELEMENTS(aRuby)); CPPUNIT_ASSERT_EQUAL(sRuby, getProperty<OUString>(getParagraph(1)->getStart(), "RubyText")); OUString sStyle = getProperty<OUString>(getParagraph(1)->getStart(), "RubyCharStyleName"); uno::Reference<beans::XPropertySet> xPropertySet( diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 468827925a78..2a318026c14f 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -6522,12 +6522,12 @@ void SwUiWriterTest::testTdf115065() pWrtShell->GotoTable("Table2"); SwRect aRect = pWrtShell->GetCurrFrame()->getFrameArea(); // Destination point is the middle of the first cell of second table - Point ptTo = Point(aRect.Left() + aRect.Width() / 2, aRect.Top() + aRect.Height() / 2); + Point ptTo(aRect.Left() + aRect.Width() / 2, aRect.Top() + aRect.Height() / 2); pWrtShell->GotoTable("Table1"); aRect = pWrtShell->GetCurrFrame()->getFrameArea(); // Source point is the middle of the first cell of first table - Point ptFrom = Point(aRect.Left() + aRect.Width() / 2, aRect.Top() + aRect.Height() / 2); + Point ptFrom(aRect.Left() + aRect.Width() / 2, aRect.Top() + aRect.Height() / 2); pWrtShell->SelTableCol(); // The copy operation (or closing document after that) segfaulted diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 5d6d89a7a70c..a179b7642b1e 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -5716,7 +5716,7 @@ static void lcl_paintBitmapExToRect(vcl::RenderContext *pOut, const Point& aPoin long iterX = eArea != RIGHT && eArea != LEFT ? BORDER_TILE_SIZE : 0; long iterY = eArea == RIGHT || eArea == LEFT ? BORDER_TILE_SIZE : 0; - for (tools::Rectangle aTile = tools::Rectangle(aPoint, aTileSize); true; aTile.Move(iterX, iterY)) + for (tools::Rectangle aTile(aPoint, aTileSize); true; aTile.Move(iterX, iterY)) { tools::Rectangle aRender = aComplete.GetIntersection(aTile); if (aRender.IsEmpty()) diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 24b9f6b588f3..5606210afb20 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -2388,7 +2388,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor) } } - SwRect aTmp = SwRect( aTmpSt, aTmpEnd ); + SwRect aTmp( aTmpSt, aTmpEnd ); // Bug 34888: If content is selected which doesn't take space // away (i.e. PostIts, RefMarks, TOXMarks), then at // least set the width of the Cursor. diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index b6536f0397e1..58fdfa68d696 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -2193,9 +2193,7 @@ awt::Point SAL_CALL SwXShape::getPosition() { // #i34750# - get attribute position of top group // shape and add offset between top group object and group member - uno::Reference< drawing::XShape > xGroupShape = - uno::Reference< drawing::XShape >( pTopGroupObj->getUnoShape(), - uno::UNO_QUERY ); + uno::Reference< drawing::XShape > xGroupShape( pTopGroupObj->getUnoShape(), uno::UNO_QUERY ); aPos = xGroupShape->getPosition(); // add offset between top group object and group member // to the determined attribute position @@ -2275,9 +2273,7 @@ void SAL_CALL SwXShape::setPosition( const awt::Point& aPosition ) } // Convert given absolute position in horizontal left-to-right // layout into relative position in horizontal left-to-right layout. - uno::Reference< drawing::XShape > xGroupShape = - uno::Reference< drawing::XShape >( pTopGroupObj->getUnoShape(), - uno::UNO_QUERY ); + uno::Reference< drawing::XShape > xGroupShape( pTopGroupObj->getUnoShape(), uno::UNO_QUERY ); { // #i34750# // use method <xGroupShape->getPosition()> to get the correct diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx index 3a3ba81eb601..07fe504f9b9a 100644 --- a/sw/source/core/view/pagepreviewlayout.cxx +++ b/sw/source/core/view/pagepreviewlayout.cxx @@ -823,7 +823,7 @@ void SwPagePreviewLayout::CalcStartValuesForSelectedPageMove( } sal_uInt16 nNewStartPage = mnPaintPhyStartPageNum; - Point aNewStartPos = Point(0,0); + Point aNewStartPos(0,0); const sal_uInt16 nNewAbsSelectedPageNum = ConvertRelativeToAbsolutePageNum( nNewRelSelectedPageNum ); if ( !IsPageVisible( nNewAbsSelectedPageNum ) ) diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 66775b933a8d..23978cdac54a 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -1930,8 +1930,8 @@ void SwViewShell::PaintTile(VirtualDevice &rDevice, int contextWidth, int contex GetWin()->EnableMapMode(false); } - tools::Rectangle aOutRect = tools::Rectangle(Point(tilePosX, tilePosY), - rDevice.PixelToLogic(Size(contextWidth, contextHeight))); + tools::Rectangle aOutRect(Point(tilePosX, tilePosY), + rDevice.PixelToLogic(Size(contextWidth, contextHeight))); // Make the requested area visible -- we can't use MakeVisible as that will // only scroll the contents, but won't zoom/resize if needed. diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index dc7e4e18c6e8..b1da5bc210e2 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -581,7 +581,7 @@ FlyProcessingState SwWW8AttrIter::OutFlys(sal_Int32 nSwPos) xPropertySetInfo = xPropertySet->getPropertySetInfo(); if( xPropertySetInfo.is() ) { - MSWordExportBase::LinkedTextboxInfo aLinkedTextboxInfo = MSWordExportBase::LinkedTextboxInfo(); + MSWordExportBase::LinkedTextboxInfo aLinkedTextboxInfo; if( xPropertySetInfo->hasPropertyByName("LinkDisplayName") ) xPropertySet->getPropertyValue("LinkDisplayName") >>= sLinkChainName; diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 8fccbd2471f4..c9ec0f43fc27 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -1790,9 +1790,9 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj, { SwFormatFrameSize aSize = rFlySet.Get(RES_FRM_SIZE); - SwFormatFrameSize aNewSize = SwFormatFrameSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE, - aSize.GetWidth() + 2*nOutside, - aSize.GetHeight() + 2*nOutside); + SwFormatFrameSize aNewSize(bFixSize ? ATT_FIX_SIZE : ATT_VAR_SIZE, + aSize.GetWidth() + 2*nOutside, + aSize.GetHeight() + 2*nOutside); aNewSize.SetWidthSizeType(aSize.GetWidthSizeType()); rFlySet.Put( aNewSize ); } diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index f28a076da3b1..3f618e6dc99e 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -2533,8 +2533,7 @@ bool SwMSConvertControls::InsertControl( if( !xCreate.is() ) return false; - uno::Reference< drawing::XShape > xShape = - uno::Reference< drawing::XShape >(xCreate, uno::UNO_QUERY); + uno::Reference< drawing::XShape > xShape(xCreate, uno::UNO_QUERY); OSL_ENSURE(xShape.is(), "Did not get XShape"); xShape->setSize(rSize); diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index 1b41ef693097..71a35ddbcc8b 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -279,8 +279,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( uno::Sequence<beans::PropertyValue> aObjArgs( comphelper::InitPropertySequence({ { "DefaultParentBaseURL", Any(GetXMLImport().GetBaseURL()) } })); - uno::Reference < embed::XEmbeddedObject > xObj = - uno::Reference < embed::XEmbeddedObject >( xFactory->createInstanceInitNew( + uno::Reference < embed::XEmbeddedObject > xObj( xFactory->createInstanceInitNew( aClass, OUString(), xStorage, "DummyName", aObjArgs), uno::UNO_QUERY ); if ( xObj.is() ) { @@ -709,8 +708,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin( // create object with desired ClassId uno::Sequence < sal_Int8 > aClass( SvGlobalName( SO3_PLUGIN_CLASSID ).GetByteSequence() ); uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() ); - uno::Reference < embed::XEmbeddedObject > xObj = - uno::Reference < embed::XEmbeddedObject >( xFactory->createInstanceInitNew( + uno::Reference < embed::XEmbeddedObject > xObj( xFactory->createInstanceInitNew( aClass, OUString(), xStorage, "DummyName", uno::Sequence < beans::PropertyValue >() ), uno::UNO_QUERY ); @@ -841,8 +839,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra // create object with desired ClassId uno::Sequence < sal_Int8 > aClass( SvGlobalName( SO3_IFRAME_CLASSID ).GetByteSequence() ); uno::Reference < embed::XEmbeddedObjectCreator > xFactory = embed::EmbeddedObjectCreator::create( ::comphelper::getProcessComponentContext() ); - uno::Reference < embed::XEmbeddedObject > xObj = - uno::Reference < embed::XEmbeddedObject >( xFactory->createInstanceInitNew( + uno::Reference < embed::XEmbeddedObject > xObj( xFactory->createInstanceInitNew( aClass, OUString(), xStorage, "DummyName", uno::Sequence < beans::PropertyValue >() ), uno::UNO_QUERY ); diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index e42662d3c65d..cd9923701bad 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -75,9 +75,9 @@ void SwEnvPreview::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan Color aBack = rSettings.GetWindowColor(); Color aFront = SwViewOption::GetFontColor(); - Color aMedium = Color((aBack.GetRed() + aFront.GetRed()) / 2, - (aBack.GetGreen() + aFront.GetGreen()) / 2, - (aBack.GetBlue() + aFront.GetBlue()) / 2); + Color aMedium((aBack.GetRed() + aFront.GetRed()) / 2, + (aBack.GetGreen() + aFront.GetGreen()) / 2, + (aBack.GetBlue() + aFront.GetBlue()) / 2); rRenderContext.SetLineColor(aFront); diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx index 08cab28a4304..20807a0c6337 100644 --- a/sw/source/uibase/misc/glosdoc.cxx +++ b/sw/source/uibase/misc/glosdoc.cxx @@ -512,7 +512,7 @@ void SwGlossaries::InvalidateUNOOjects() if ( xGroup.is() ) static_cast< SwXAutoTextGroup* >( xGroup.get() )->Invalidate(); } - UnoAutoTextGroups aTmpg = UnoAutoTextGroups(); + UnoAutoTextGroups aTmpg; m_aGlossaryGroups.swap( aTmpg ); // invalidate all the AutoTextEntry-objects @@ -527,7 +527,7 @@ void SwGlossaries::InvalidateUNOOjects() if ( pEntry ) pEntry->Invalidate(); } - UnoAutoTextEntries aTmpe = UnoAutoTextEntries(); + UnoAutoTextEntries aTmpe; m_aGlossaryEntries.swap( aTmpe ); } diff --git a/sw/source/uibase/misc/glshell.cxx b/sw/source/uibase/misc/glshell.cxx index 70353ab227ed..174913cfddc2 100644 --- a/sw/source/uibase/misc/glshell.cxx +++ b/sw/source/uibase/misc/glshell.cxx @@ -105,8 +105,8 @@ static bool lcl_Save( SwWrtShell& rSh, const OUString& rGroupName, const SvxAutoCorrCfg& rCfg = SvxAutoCorrCfg::Get(); std::unique_ptr<SwTextBlocks> pBlock(::GetGlossaries()->GetGroupDoc( rGroupName )); - SvxMacro aStart = SvxMacro(OUString(), OUString()); - SvxMacro aEnd = SvxMacro(OUString(), OUString()); + SvxMacro aStart { OUString(), OUString() }; + SvxMacro aEnd { OUString(), OUString() }; SwGlossaryHdl* pGlosHdl; pGlosHdl = rSh.GetView().GetGlosHdl(); diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index e946ab09e5b6..d3d1d96445c2 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -1058,7 +1058,7 @@ OUString SwNavigationPI::CreateDropFileName( TransferableDataHelper& rData ) rData.HasFormat( nFormat = SotClipboardFormatId::FILEGRPDESCRIPTOR ) || rData.HasFormat( nFormat = SotClipboardFormatId::UNIFORMRESOURCELOCATOR )) { - INetBookmark aBkmk = INetBookmark(OUString(), OUString()); + INetBookmark aBkmk { OUString(), OUString() }; if (rData.GetINetBookmark(nFormat, aBkmk)) sFileName = aBkmk.GetURL(); } diff --git a/test/source/sheet/xnamedrange.cxx b/test/source/sheet/xnamedrange.cxx index cad13759292d..1e63aedb3f80 100644 --- a/test/source/sheet/xnamedrange.cxx +++ b/test/source/sheet/xnamedrange.cxx @@ -110,7 +110,7 @@ void XNamedRange::testSetReferencePosition() { uno::Reference< sheet::XNamedRange > xNamedRange = getNamedRange("initial1"); - table::CellAddress aBaseAddress = table::CellAddress(1,2,3); + table::CellAddress aBaseAddress(1,2,3); xNamedRange->setReferencePosition(aBaseAddress); diff --git a/test/source/sheet/xnamedranges.cxx b/test/source/sheet/xnamedranges.cxx index 036f5b75b00f..2017c7c849ac 100644 --- a/test/source/sheet/xnamedranges.cxx +++ b/test/source/sheet/xnamedranges.cxx @@ -43,7 +43,7 @@ void XNamedRanges::testAddNewByName() uno::Reference<container::XNameAccess> xNamedRangesNameAccess(getXNamedRanges(1), UNO_QUERY_THROW); - table::CellAddress aBaseAddress = table::CellAddress(0, 0, 0); + table::CellAddress aBaseAddress(0, 0, 0); sal_Int32 nType = 0; OUString const aContent1("D1"); @@ -87,7 +87,7 @@ void XNamedRanges::testAddNewFromTitles() uno::Reference<container::XIndexAccess> xNamedRangesIndex(xNamedRanges, UNO_QUERY_THROW); uno::Reference<container::XNameAccess> xNamedRangesNameAccess(xNamedRanges, UNO_QUERY_THROW); - table::CellRangeAddress aCellRangeAddress = table::CellRangeAddress(1, 0, 0, 3, 3); + table::CellRangeAddress aCellRangeAddress(1, 0, 0, 3, 3); OUString aString; uno::Reference<table::XCell> xCell; @@ -173,7 +173,7 @@ void XNamedRanges::testRemoveByName() void XNamedRanges::testOutputList() { - table::CellAddress aCellAddress = table::CellAddress(0, 2, 0); + table::CellAddress aCellAddress(0, 2, 0); uno::Reference<sheet::XNamedRanges> xNamedRanges(init(), UNO_QUERY_THROW); uno::Reference<container::XIndexAccess> xNamedRangesIndex(init(), UNO_QUERY_THROW); sal_Int32 nElementsCount = xNamedRangesIndex->getCount(); diff --git a/tools/qa/cppunit/test_color.cxx b/tools/qa/cppunit/test_color.cxx index 5bec65027b94..c985e6d0b2bb 100644 --- a/tools/qa/cppunit/test_color.cxx +++ b/tools/qa/cppunit/test_color.cxx @@ -180,7 +180,7 @@ void Test::testGetColorError() void Test::testInvert() { - Color aColor = Color(0xFF, 0x00, 0x88); + Color aColor(0xFF, 0x00, 0x88); aColor.Invert(); CPPUNIT_ASSERT_EQUAL(Color(0x00, 0xFF, 0x77).AsRGBHexString(), aColor.AsRGBHexString()); diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx index 14ad5b9d1485..97dcfc8a79ea 100644 --- a/tools/source/inet/inetmime.cxx +++ b/tools/source/inet/inetmime.cxx @@ -586,9 +586,7 @@ sal_Unicode const * scanParameters(sal_Unicode const * pBegin, } if (p == pAttributeBegin) break; - OString aAttribute = OString( - pAttributeBegin, p - pAttributeBegin, - RTL_TEXTENCODING_ASCII_US); + OString aAttribute(pAttributeBegin, p - pAttributeBegin, RTL_TEXTENCODING_ASCII_US); if (bDowncaseAttribute) aAttribute = aAttribute.toAsciiLowerCase(); diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx index d1e085a3f826..99ffd1433364 100644 --- a/ucb/source/cacher/contentresultsetwrapper.cxx +++ b/ucb/source/cacher/contentresultsetwrapper.cxx @@ -64,8 +64,7 @@ void ContentResultSetWrapper::impl_init_xRowOrigin() return; } - Reference< XRow > xOrgig = - Reference< XRow >( m_xResultSetOrigin, UNO_QUERY ); + Reference< XRow > xOrgig( m_xResultSetOrigin, UNO_QUERY ); { osl::Guard< osl::Mutex > aGuard( m_aMutex ); @@ -82,8 +81,7 @@ void ContentResultSetWrapper::impl_init_xContentAccessOrigin() return; } - Reference< XContentAccess > xOrgig = - Reference< XContentAccess >( m_xResultSetOrigin, UNO_QUERY ); + Reference< XContentAccess > xOrgig( m_xResultSetOrigin, UNO_QUERY ); { osl::Guard< osl::Mutex > aGuard( m_aMutex ); @@ -101,8 +99,7 @@ void ContentResultSetWrapper::impl_init_xPropertySetOrigin() return; } - Reference< XPropertySet > xOrig = - Reference< XPropertySet >( m_xResultSetOrigin, UNO_QUERY ); + Reference< XPropertySet > xOrig( m_xResultSetOrigin, UNO_QUERY ); { osl::Guard< osl::Mutex > aGuard( m_aMutex ); diff --git a/ucbhelper/source/provider/propertyvalueset.cxx b/ucbhelper/source/provider/propertyvalueset.cxx index bf1e019a7fef..b420de754008 100644 --- a/ucbhelper/source/provider/propertyvalueset.cxx +++ b/ucbhelper/source/provider/propertyvalueset.cxx @@ -137,7 +137,7 @@ class PropertyValues : public std::vector< ucbhelper_impl::PropertyValue > {}; \ osl::MutexGuard aGuard( m_aMutex ); \ \ - _type_ aValue = _type_(); /* default ctor */ \ + _type_ aValue {}; /* default ctor */ \ \ m_bWasNull = true; \ \ diff --git a/vcl/backendtest/VisualBackendTest.cxx b/vcl/backendtest/VisualBackendTest.cxx index 7f93666c4715..a3cfb8cb9ba1 100644 --- a/vcl/backendtest/VisualBackendTest.cxx +++ b/vcl/backendtest/VisualBackendTest.cxx @@ -528,7 +528,7 @@ protected: try { uno::Reference<uno::XComponentContext> xComponentContext = ::cppu::defaultBootstrap_InitialComponentContext(); - uno::Reference<lang::XMultiServiceFactory> xMSF = uno::Reference<lang::XMultiServiceFactory>(xComponentContext->getServiceManager(), uno::UNO_QUERY); + uno::Reference<lang::XMultiServiceFactory> xMSF(xComponentContext->getServiceManager(), uno::UNO_QUERY); if (!xMSF.is()) Application::Abort("Bootstrap failure - no service manager"); diff --git a/vcl/inc/bitmap/ScanlineTools.hxx b/vcl/inc/bitmap/ScanlineTools.hxx index 17925e9687b9..e469e29df233 100644 --- a/vcl/inc/bitmap/ScanlineTools.hxx +++ b/vcl/inc/bitmap/ScanlineTools.hxx @@ -39,7 +39,7 @@ public: virtual Color readPixel() override { - const Color aColor = Color(pData[4], pData[1], pData[2], pData[3]); + const Color aColor(pData[4], pData[1], pData[2], pData[3]); pData += 4; return aColor; } @@ -65,7 +65,7 @@ public: virtual Color readPixel() override { - const Color aColor = Color(pData[2], pData[1], pData[0]); + const Color aColor(pData[2], pData[1], pData[0]); pData += 3; return aColor; } @@ -93,8 +93,7 @@ public: virtual Color readPixel() override { - const Color nColor - = Color((*pData & 0xf800) >> 8, (*pData & 0x07e0) >> 3, (*pData & 0x001f) << 3); + const Color nColor((*pData & 0xf800) >> 8, (*pData & 0x07e0) >> 3, (*pData & 0x001f) << 3); pData++; return nColor; } diff --git a/vcl/opengl/LineRenderUtils.cxx b/vcl/opengl/LineRenderUtils.cxx index 61d0dc38457c..e130fb93bb22 100644 --- a/vcl/opengl/LineRenderUtils.cxx +++ b/vcl/opengl/LineRenderUtils.cxx @@ -121,8 +121,8 @@ void LineBuilder::appendBevelJoint(glm::vec2 const& point, const glm::vec2& prev // All the magic is done by the fact that we draw triangle strips, so we // cover the joins correctly. - glm::vec2 prevNormal = glm::vec2(-prevLineVector.y, prevLineVector.x); - glm::vec2 nextNormal = glm::vec2(-nextLineVector.y, nextLineVector.x); + glm::vec2 prevNormal(-prevLineVector.y, prevLineVector.x); + glm::vec2 nextNormal(-nextLineVector.y, nextLineVector.x); appendAndConnectLinePoint(point, prevNormal, 1.0f); appendAndConnectLinePoint(point, nextNormal, 1.0f); @@ -139,8 +139,8 @@ void LineBuilder::appendRoundJoint(glm::vec2 const& point, const glm::vec2& prev // line joins look round. Ideally the number of vectors could be // calculated. - glm::vec2 prevNormal = glm::vec2(-prevLineVector.y, prevLineVector.x); - glm::vec2 nextNormal = glm::vec2(-nextLineVector.y, nextLineVector.x); + glm::vec2 prevNormal(-prevLineVector.y, prevLineVector.x); + glm::vec2 nextNormal(-nextLineVector.y, nextLineVector.x); glm::vec2 middle = vcl::vertex::normalize(prevNormal + nextNormal); glm::vec2 middleLeft = vcl::vertex::normalize(prevNormal + middle); @@ -158,7 +158,7 @@ void LineBuilder::appendRoundLineCapVertices(const glm::vec2& rPoint1, const glm constexpr int nRoundCapIteration = 12; glm::vec2 lineVector = vcl::vertex::normalize(rPoint2 - rPoint1); - glm::vec2 normal = glm::vec2(-lineVector.y, lineVector.x); + glm::vec2 normal(-lineVector.y, lineVector.x); glm::vec2 previousRoundNormal = normal; for (int nFactor = 1; nFactor <= nRoundCapIteration; nFactor++) @@ -176,7 +176,7 @@ void LineBuilder::appendRoundLineCapVertices(const glm::vec2& rPoint1, const glm void LineBuilder::appendSquareLineCapVertices(const glm::vec2& rPoint1, const glm::vec2& rPoint2) { glm::vec2 lineVector = vcl::vertex::normalize(rPoint2 - rPoint1); - glm::vec2 normal = glm::vec2(-lineVector.y, lineVector.x); + glm::vec2 normal(-lineVector.y, lineVector.x); glm::vec2 extrudedPoint = rPoint1 + -lineVector * (mfLineWidth / 2.0f); diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 1914a4f6f60a..1924d46f268b 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -548,7 +548,7 @@ void OpenGLSalGraphicsImpl::CheckOffscreenTexture() SalTwoRect aPosAry(0, 0, fWidth, fHeight, 0,0, fWidth, fHeight); // TODO: lfrb: User GL_ARB_copy_image? - OpenGLTexture aNewTex = OpenGLTexture( GetWidth(), GetHeight() ); + OpenGLTexture aNewTex( GetWidth(), GetHeight() ); mpContext->state().scissor().disable(); mpContext->state().stencil().disable(); @@ -670,7 +670,7 @@ void OpenGLSalGraphicsImpl::DrawLineSegment(float x1, float y1, float x2, float glm::vec2 aPoint2(x2, y2); glm::vec2 aLineVector = vcl::vertex::normalize(aPoint2 - aPoint1); - glm::vec2 aNormal = glm::vec2(-aLineVector.y, aLineVector.x); + glm::vec2 aNormal(-aLineVector.y, aLineVector.x); vcl::vertex::addLineSegmentVertices(aVertices, aExtrusionVectors, aPoint1, aNormal, 1.0f, diff --git a/vcl/opengl/program.cxx b/vcl/opengl/program.cxx index 4de2c5decac0..6557eccf8f42 100644 --- a/vcl/opengl/program.cxx +++ b/vcl/opengl/program.cxx @@ -326,7 +326,7 @@ void OpenGLProgram::SetTransform( void OpenGLProgram::SetIdentityTransform(const OString& rName) { GLuint nUniform = GetUniformLocation(rName); - glm::mat4 aMatrix = glm::mat4(); + glm::mat4 aMatrix {}; glUniformMatrix4fv(nUniform, 1, GL_FALSE, glm::value_ptr( aMatrix ) ); CHECK_GL_ERROR(); } diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx index 27d2e19e2734..4de793ea6797 100644 --- a/vcl/opengl/salbmp.cxx +++ b/vcl/opengl/salbmp.cxx @@ -684,7 +684,7 @@ bool OpenGLSalBitmap::calcChecksumGL(OpenGLTexture& rInputTexture, BitmapChecksu int nNewWidth = ceil( nWidth / 4.0 ); int nNewHeight = ceil( nHeight / 4.0 ); - OpenGLTexture aFirstPassTexture = OpenGLTexture(nNewWidth, nNewHeight); + OpenGLTexture aFirstPassTexture(nNewWidth, nNewHeight); OpenGLFramebuffer* pFramebuffer = xContext->AcquireFramebuffer(aFirstPassTexture); pProgram->SetUniform1f( "xstep", 1.0 / mnWidth ); @@ -711,7 +711,7 @@ bool OpenGLSalBitmap::calcChecksumGL(OpenGLTexture& rInputTexture, BitmapChecksu nNewWidth = ceil( nWidth / 4.0 ); nNewHeight = ceil( nHeight / 4.0 ); - OpenGLTexture aSecondPassTexture = OpenGLTexture(nNewWidth, nNewHeight); + OpenGLTexture aSecondPassTexture(nNewWidth, nNewHeight); pFramebuffer = xContext->AcquireFramebuffer(aSecondPassTexture); pProgram->SetUniform1f( "xstep", 1.0 / mnWidth ); @@ -912,7 +912,7 @@ bool OpenGLSalBitmap::Replace( const Color& rSearchColor, const Color& rReplaceC if( !pProgram ) return false; - OpenGLTexture aNewTex = OpenGLTexture( mnWidth, mnHeight ); + OpenGLTexture aNewTex( mnWidth, mnHeight ); pFramebuffer = xContext->AcquireFramebuffer( aNewTex ); pProgram->SetTexture( "sampler", maTexture ); diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 4c954b4fe6d1..8c7de771f1b0 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -264,7 +264,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, Size aMax; Point aImagePos = rPos; Point aTextPos = rPos; - tools::Rectangle aUnion = tools::Rectangle(aImagePos, aImageSize); + tools::Rectangle aUnion(aImagePos, aImageSize); tools::Rectangle aSymbol; long nSymbolHeight = 0; @@ -273,7 +273,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, // Get the size of the text output area ( the symbol will be drawn in // this area as well, so the symbol rectangle will be calculated here, too ) - tools::Rectangle aRect = tools::Rectangle(Point(), rSize); + tools::Rectangle aRect(Point(), rSize); Size aTSSize; if (bHasSymbol) @@ -442,7 +442,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, { if (mpButtonData->meSymbolAlign == SymbolAlign::RIGHT) { - Point aRightPos = Point(aTextPos.X() + aTextSize.Width() + aSymbolSize.Width() / 2, aTextPos.Y()); + Point aRightPos(aTextPos.X() + aTextSize.Width() + aSymbolSize.Width() / 2, aTextPos.Y()); *pSymbolRect = tools::Rectangle(aRightPos, aSymbolSize); } else @@ -484,7 +484,7 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, void Button::ImplSetFocusRect(const tools::Rectangle &rFocusRect) { tools::Rectangle aFocusRect = rFocusRect; - tools::Rectangle aOutputRect = tools::Rectangle(Point(), GetOutputSizePixel()); + tools::Rectangle aOutputRect(Point(), GetOutputSizePixel()); if (!aFocusRect.IsEmpty()) { diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 8c01f8302535..ff8c07d2bbc1 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -815,7 +815,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) const double fAngle = F_PI1800 * nAngle10; const double fSin = sin( fAngle ); const double fCos = cos( fAngle ); - tools::Rectangle aRect=tools::Rectangle( Point(), GetPrefSize() ); + tools::Rectangle aRect( Point(), GetPrefSize() ); tools::Polygon aPoly( aRect ); aPoly.Rotate( Point(), fSin, fCos ); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 79289ba8b39a..9116984def55 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6513,7 +6513,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool } writeBuffer( aLine.getStr(), aLine.getLength() ); - Point aOffset = Point(0,0); + Point aOffset(0,0); if ( nEmphMark & FontEmphasisMark::PosBelow ) aOffset.AdjustY(GetFontInstance()->mxFontMetric->GetDescent() + nEmphYOff ); diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 31cc27a572cc..d73d987a56d7 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -1267,7 +1267,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout ) SetFillColor( GetTextColor() ); } - Point aOffset = Point(0,0); + Point aOffset(0,0); if ( nEmphasisMark & FontEmphasisMark::PosBelow ) aOffset.AdjustY(mpFontInstance->mxFontMetric->GetDescent() + nEmphasisYOff ); diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx index c0df51f62a67..71cd67017bcd 100644 --- a/vcl/source/outdev/wallpaper.cxx +++ b/vcl/source/outdev/wallpaper.cxx @@ -291,7 +291,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, const tools::Rectangle aOutRect( aTmpPoint, GetOutputSizePixel() ); const tools::Rectangle aColRect( Point( nX, nY ), Size( nWidth, nHeight ) ); - tools::Rectangle aWorkRect = tools::Rectangle( 0, 0, aOutRect.Right(), aPos.Y() - 1 ); + tools::Rectangle aWorkRect( 0, 0, aOutRect.Right(), aPos.Y() - 1 ); aWorkRect.Justify(); aWorkRect.Intersection( aColRect ); if( !aWorkRect.IsEmpty() ) diff --git a/vcl/source/uipreviewer/previewer.cxx b/vcl/source/uipreviewer/previewer.cxx index 63f7ae51e066..47fe2099e9fc 100644 --- a/vcl/source/uipreviewer/previewer.cxx +++ b/vcl/source/uipreviewer/previewer.cxx @@ -35,8 +35,7 @@ void UIPreviewApp::Init() cppu::defaultBootstrap_InitialComponentContext(); uno::Reference<lang::XMultiComponentFactory> xFactory = xContext->getServiceManager(); - uno::Reference<lang::XMultiServiceFactory> xSFactory = - uno::Reference<lang::XMultiServiceFactory> (xFactory, uno::UNO_QUERY_THROW); + uno::Reference<lang::XMultiServiceFactory> xSFactory(xFactory, uno::UNO_QUERY_THROW); comphelper::setProcessServiceFactory(xSFactory); // Create UCB (for backwards compatibility, in case some code still uses diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx index ef3bf456e7a9..6355f1f6d5e4 100644 --- a/vcl/source/window/accessibility.cxx +++ b/vcl/source/window/accessibility.cxx @@ -652,8 +652,7 @@ FindFocusedEditableText(uno::Reference<accessibility::XAccessibleContext> const& { if (xState->contains(accessibility::AccessibleStateType::FOCUSED)) { - uno::Reference<accessibility::XAccessibleEditableText> xText - = uno::Reference<accessibility::XAccessibleEditableText>(xContext, uno::UNO_QUERY); + uno::Reference<accessibility::XAccessibleEditableText> xText(xContext, uno::UNO_QUERY); if (xText.is()) return xText; if (xState->contains(accessibility::AccessibleStateType::MANAGES_DESCENDANTS)) diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 344a22469aec..95d91f129213 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -3075,7 +3075,7 @@ void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID) reader.nextItem( xmlreader::XmlReader::Text::Raw, &name, &nsId); - OString sValue = OString(name.begin, name.length); + OString sValue(name.begin, name.length); OUString sFinalValue; if (bTranslated) { @@ -3236,7 +3236,7 @@ std::vector<ComboBoxTextItem> VclBuilder::handleItems(xmlreader::XmlReader &read reader.nextItem( xmlreader::XmlReader::Text::Raw, &name, &nsId); - OString sValue = OString(name.begin, name.length); + OString sValue(name.begin, name.length); OUString sFinalValue; if (bTranslated) { @@ -3448,7 +3448,7 @@ void VclBuilder::handleSizeGroup(xmlreader::XmlReader &reader) if (name.equals("name")) { name = reader.getAttributeValue(false); - OString sWidget = OString(name.begin, name.length); + OString sWidget(name.begin, name.length); sal_Int32 nDelim = sWidget.indexOf(':'); if (nDelim != -1) sWidget = sWidget.copy(0, nDelim); @@ -3914,13 +3914,13 @@ std::vector<vcl::EnumContext::Context> VclBuilder::handleStyle(xmlreader::XmlRea if (classStyle.startsWith("context-")) { OString sContext = classStyle.copy(classStyle.indexOf('-') + 1); - OUString sContext2 = OUString(sContext.getStr(), sContext.getLength(), RTL_TEXTENCODING_UTF8); + OUString sContext2(sContext.getStr(), sContext.getLength(), RTL_TEXTENCODING_UTF8); aContext.push_back(vcl::EnumContext::GetContextEnum(sContext2)); } else if (classStyle.startsWith("priority-")) { OString aPriority = classStyle.copy(classStyle.indexOf('-') + 1); - OUString aPriority2 = OUString(aPriority.getStr(), aPriority.getLength(), RTL_TEXTENCODING_UTF8); + OUString aPriority2(aPriority.getStr(), aPriority.getLength(), RTL_TEXTENCODING_UTF8); nPriority = aPriority2.toInt32(); } else @@ -3988,7 +3988,7 @@ void VclBuilder::collectProperty(xmlreader::XmlReader &reader, stringmap &rMap) } reader.nextItem(xmlreader::XmlReader::Text::Raw, &name, &nsId); - OString sValue = OString(name.begin, name.length); + OString sValue(name.begin, name.length); OUString sFinalValue; if (bTranslated) { @@ -4025,7 +4025,7 @@ void VclBuilder::handleActionWidget(xmlreader::XmlReader &reader) } reader.nextItem(xmlreader::XmlReader::Text::Raw, &name, &nsId); - OString sID = OString(name.begin, name.length); + OString sID(name.begin, name.length); sal_Int32 nDelim = sID.indexOf(':'); if (nDelim != -1) sID = sID.copy(0, nDelim); diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 81e7cbe573c6..fdfa26bd70b4 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -630,7 +630,7 @@ void MenuBarWindow::HighlightItem(vcl::RenderContext& rRenderContext, sal_uInt16 if (pData->eType != MenuItemType::SEPARATOR) { // #107747# give menuitems the height of the menubar - tools::Rectangle aRect = tools::Rectangle(Point(nX, 1), Size(pData->aSz.Width(), aOutputSize.Height() - 2)); + tools::Rectangle aRect(Point(nX, 1), Size(pData->aSz.Width(), aOutputSize.Height() - 2)); rRenderContext.Push(PushFlags::CLIPREGION); rRenderContext.IntersectClipRegion(aRect); bool bRollover, bHighlight; diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 78b43cf8b576..415f6996d7ec 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -687,8 +687,8 @@ Reference< css::datatransfer::dnd::XDropTarget > Window::GetDropTarget() mpWindowImpl->mpFrameData->mxDropTarget->addDropTargetListener( mpWindowImpl->mpFrameData->mxDropTargetListener ); // register also as drag gesture listener if directly supported by drag source - Reference< css::datatransfer::dnd::XDragGestureRecognizer > xDragGestureRecognizer = - Reference< css::datatransfer::dnd::XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY); + Reference< css::datatransfer::dnd::XDragGestureRecognizer > xDragGestureRecognizer( + mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY); if( xDragGestureRecognizer.is() ) { diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index fca72f214022..34e76fa6c316 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1387,7 +1387,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP pDevice->SetTextAlign(GetTextAlign()); pDevice->SetRasterOp(GetRasterOp()); - tools::Rectangle aPaintRect = tools::Rectangle(Point(), GetOutputSizePixel()); + tools::Rectangle aPaintRect(Point(), GetOutputSizePixel()); vcl::Region aClipRegion(GetClipRegion()); pDevice->SetClipRegion(); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 942c34150c24..827d833df60b 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1984,7 +1984,7 @@ IMPL_LINK( PrintDialog, SelectHdl, ListBox&, rBox, void ) else aPrt->SetPaper( mePaper ); - Size aPaperSize = Size( aInfo.getWidth(), aInfo.getHeight() ); + Size aPaperSize( aInfo.getWidth(), aInfo.getHeight() ); checkPaperSize( aPaperSize ); maPController->setPaperSizeFromUser( aPaperSize ); diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index facd6fdd7603..f16710ae171f 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -511,7 +511,7 @@ void Splitter::ImplRestoreSplitter() // set splitter in the center of the ref window StartSplit(); Size aSize = mpRefWin->GetOutputSize(); - Point aPos = Point( aSize.Width()/2 , aSize.Height()/2); + Point aPos( aSize.Width()/2 , aSize.Height()/2); if ( mnLastSplitPos != mnSplitPos && mnLastSplitPos > 5 ) { // restore last pos if it was a useful position (>5) diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 824d020b97c0..15c05f455be8 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -2005,9 +2005,9 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) // We need a mouseevent with a position inside the button for the // ImplStartSplit function! MouseEvent aOrgMEvt = rTEvt.GetMouseEvent(); - MouseEvent aNewMEvt = MouseEvent( aTestRect.Center(), aOrgMEvt.GetClicks(), - aOrgMEvt.GetMode(), aOrgMEvt.GetButtons(), - aOrgMEvt.GetModifier() ); + MouseEvent aNewMEvt( aTestRect.Center(), aOrgMEvt.GetClicks(), + aOrgMEvt.GetMode(), aOrgMEvt.GetButtons(), + aOrgMEvt.GetModifier() ); ImplStartSplit( aNewMEvt ); mbFadeOutDown = false; diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 9981da0ada76..421e1c903815 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -628,7 +628,7 @@ ImageType ToolBox::GetImageSize() const OutputDevice *pDefault = Application::GetDefaultDevice(); float fScaleFactor = pDefault ? pDefault->GetDPIScaleFactor() : 1.0; - Size aUnscaledSize = Size(16, 16); + Size aUnscaledSize(16, 16); if (eToolBoxButtonSize == ToolBoxButtonSize::Large) { diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index c9c4a93da413..826ba0cbadbe 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -200,8 +200,7 @@ void Window::dispose() // deregister drop target listener if( mpWindowImpl->mpFrameData->mxDropTargetListener.is() ) { - Reference< XDragGestureRecognizer > xDragGestureRecognizer = - Reference< XDragGestureRecognizer > (mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY); + Reference< XDragGestureRecognizer > xDragGestureRecognizer(mpWindowImpl->mpFrameData->mxDragSource, UNO_QUERY); if( xDragGestureRecognizer.is() ) { xDragGestureRecognizer->removeDragGestureListener( diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index e3d81e6aa62d..3bda1c6c68d4 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -471,8 +471,8 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent if( pMouseDownWin->ImplGetFrameData()->mbInternalDragGestureRecognizer ) { // query DropTarget from child window - css::uno::Reference< css::datatransfer::dnd::XDragGestureRecognizer > xDragGestureRecognizer = - css::uno::Reference< css::datatransfer::dnd::XDragGestureRecognizer > ( pMouseDownWin->ImplGetWindowImpl()->mxDNDListenerContainer, + css::uno::Reference< css::datatransfer::dnd::XDragGestureRecognizer > xDragGestureRecognizer( + pMouseDownWin->ImplGetWindowImpl()->mxDNDListenerContainer, css::uno::UNO_QUERY ); if( xDragGestureRecognizer.is() ) diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx index 217ffdbb72cc..2c453e051b5c 100644 --- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx +++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx @@ -164,7 +164,7 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment() const char *pDesktop = getenv( "XDG_CURRENT_DESKTOP" ); if ( pDesktop ) { - OString aCurrentDesktop = OString( pDesktop, strlen( pDesktop ) ); + OString aCurrentDesktop( pDesktop, strlen( pDesktop ) ); //it may be separated by colon ( e.g. unity:unity7:ubuntu ) std::vector<OUString> aSplitCurrentDesktop = comphelper::string::split( diff --git a/vcl/unx/generic/print/text_gfx.cxx b/vcl/unx/generic/print/text_gfx.cxx index 7099d0a5f57d..156f801cb8c9 100644 --- a/vcl/unx/generic/print/text_gfx.cxx +++ b/vcl/unx/generic/print/text_gfx.cxx @@ -111,7 +111,7 @@ void PrinterGfx::DrawGlyph(const Point& rPoint, nDescend = nDescend * nTextHeight / 1000; nAscend = nAscend * nTextHeight / 1000; - Point aRotPoint = Point( -nDescend*nTextWidth/nTextHeight, nAscend*nTextWidth/nTextHeight ); + Point aRotPoint( -nDescend*nTextWidth/nTextHeight, nAscend*nTextWidth/nTextHeight ); // transform matrix to new individual direction PSGSave (); diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx index e76cf990228a..cac3ac6e4805 100644 --- a/vcl/unx/gtk/a11y/atkutil.cxx +++ b/vcl/unx/gtk/a11y/atkutil.cxx @@ -314,8 +314,7 @@ void DocumentFocusListener::attachRecursive( if( xStateSet->contains(accessibility::AccessibleStateType::FOCUSED ) ) atk_wrapper_focus_tracker_notify_when_idle( xAccessible ); - uno::Reference< accessibility::XAccessibleEventBroadcaster > xBroadcaster = - uno::Reference< accessibility::XAccessibleEventBroadcaster >(xContext, uno::UNO_QUERY); + uno::Reference< accessibility::XAccessibleEventBroadcaster > xBroadcaster(xContext, uno::UNO_QUERY); if (!xBroadcaster.is()) return; @@ -373,8 +372,7 @@ void DocumentFocusListener::detachRecursive( const uno::Reference< accessibility::XAccessibleStateSet >& xStateSet ) { - uno::Reference< accessibility::XAccessibleEventBroadcaster > xBroadcaster = - uno::Reference< accessibility::XAccessibleEventBroadcaster >(xContext, uno::UNO_QUERY); + uno::Reference< accessibility::XAccessibleEventBroadcaster > xBroadcaster(xContext, uno::UNO_QUERY); if( xBroadcaster.is() && 0 < m_aRefList.erase(xBroadcaster) ) { diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 50ebb17367c1..41504bf55c65 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -6750,7 +6750,7 @@ private: gtk_tree_model_get_iter(pModel, &aGtkIter.iter, tree_path); gtk_tree_path_free(tree_path); - OUString sText = OUString(pNewText, pNewText ? strlen(pNewText) : 0, RTL_TEXTENCODING_UTF8); + OUString sText(pNewText, pNewText ? strlen(pNewText) : 0, RTL_TEXTENCODING_UTF8); if (signal_editing_done(std::pair<const weld::TreeIter&, OUString>(aGtkIter, sText))) { void* pData = g_object_get_data(G_OBJECT(pCell), "g-lo-CellIndex"); @@ -6939,7 +6939,7 @@ public: GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(g_list_nth_data(m_pColumns, nColumn)); assert(pColumn && "wrong count"); const gchar* pTitle = gtk_tree_view_column_get_title(pColumn); - OUString sRet = OUString(pTitle, pTitle ? strlen(pTitle) : 0, RTL_TEXTENCODING_UTF8); + OUString sRet(pTitle, pTitle ? strlen(pTitle) : 0, RTL_TEXTENCODING_UTF8); return sRet; } @@ -8675,7 +8675,7 @@ public: GtkTextIter start, end; gtk_text_buffer_get_bounds(pBuffer, &start, &end); char* pStr = gtk_text_buffer_get_text(pBuffer, &start, &end, true); - OUString sRet = OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8); + OUString sRet(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8); g_free(pStr); return sRet; } @@ -10326,7 +10326,7 @@ private: int nTextLen = pTextStr ? strlen(pTextStr) : 0; if (nTextLen) { - OUString sOldText = OUString(pTextStr, nTextLen, RTL_TEXTENCODING_UTF8); + OUString sOldText(pTextStr, nTextLen, RTL_TEXTENCODING_UTF8); OString sText(OUStringToOString((*m_pStringReplace)(sOldText), RTL_TEXTENCODING_UTF8)); gtk_text_buffer_set_text(pBuffer, sText.getStr(), sText.getLength()); } diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index e7e194e50a62..689e19da83da 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -1193,7 +1193,7 @@ tools::Rectangle GtkSalGraphics::NWGetComboBoxButtonRect(ControlType nType, gint nButtonWidth = nArrowWidth + padding.left + padding.right; if( nPart == ControlPart::ButtonDown ) { - Point aPos = Point(aAreaRect.Left() + aAreaRect.GetWidth() - nButtonWidth, aAreaRect.Top()); + Point aPos(aAreaRect.Left() + aAreaRect.GetWidth() - nButtonWidth, aAreaRect.Top()); if (AllSettings::GetLayoutRTL()) aPos.setX( aAreaRect.Left() ); aButtonRect.SetSize( Size( nButtonWidth, aAreaRect.GetHeight() ) ); diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx index 4d0ef7dbb5e1..28bcee6c85b7 100644 --- a/vcl/workben/icontest.cxx +++ b/vcl/workben/icontest.cxx @@ -155,8 +155,7 @@ void IconTestApp::Init() cppu::defaultBootstrap_InitialComponentContext(); uno::Reference<lang::XMultiComponentFactory> xFactory = xContext->getServiceManager(); - uno::Reference<lang::XMultiServiceFactory> xSFactory = - uno::Reference<lang::XMultiServiceFactory> (xFactory, uno::UNO_QUERY_THROW); + uno::Reference<lang::XMultiServiceFactory> xSFactory(xFactory, uno::UNO_QUERY_THROW); comphelper::setProcessServiceFactory(xSFactory); // Create UCB (for backwards compatibility, in case some code still uses diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 3685e905a1ec..9043672fa179 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -864,9 +864,9 @@ public: aRight.Crop(tools::Rectangle(Point((nSlice * 3) + 3, (nSlice * 2) + 1), Size(nSlice, 1))); AlphaMask aAlphaMask(aRight.GetBitmap()); - Bitmap aBlockColor = Bitmap(aAlphaMask.GetSizePixel(), 24); + Bitmap aBlockColor(aAlphaMask.GetSizePixel(), 24); aBlockColor.Erase(COL_RED); - BitmapEx aShadowStretch = BitmapEx(aBlockColor, aAlphaMask); + BitmapEx aShadowStretch(aBlockColor, aAlphaMask); Point aRenderPt(r.TopLeft()); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 1e6a5a1e3f76..46f312eeeeaa 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -2973,7 +2973,7 @@ void DomainMapper_Impl::ChainTextFrames() uno::Sequence<beans::PropertyValue> aGrabBag; uno::Reference<lang::XServiceInfo> xServiceInfo(xPropertySet, uno::UNO_QUERY); - TextFramesForChaining aChainStruct = TextFramesForChaining(); + TextFramesForChaining aChainStruct; OUString sShapeName; OUString sLinkChainName; @@ -3661,9 +3661,7 @@ void DomainMapper_Impl::handleAuthor } if (m_xTextFactory.is()) xFieldInterface = m_xTextFactory->createInstance(sServiceName); - uno::Reference<beans::XPropertySet> xFieldProperties = - uno::Reference< beans::XPropertySet >( xFieldInterface, - uno::UNO_QUERY_THROW); + uno::Reference<beans::XPropertySet> xFieldProperties( xFieldInterface, uno::UNO_QUERY_THROW); if( bIsCustomField ) { xFieldProperties->setPropertyValue( @@ -5466,7 +5464,7 @@ void DomainMapper_Impl::startOrEndPermissionRange(sal_Int32 permissinId) // add new bookmark const bool bAbsorb = !xCursor->isCollapsed(); - uno::Reference< text::XTextRange > xCurrent = uno::Reference< text::XTextRange >(xCursor, uno::UNO_QUERY_THROW); + uno::Reference< text::XTextRange > xCurrent(xCursor, uno::UNO_QUERY_THROW); xTextAppend->insertTextContent(xCurrent, xPerm, bAbsorb); } diff --git a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx index a9ce3995cec9..650b356e7141 100644 --- a/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx +++ b/writerfilter/source/ooxml/OOXMLBinaryObjectReference.cxx @@ -63,8 +63,7 @@ void OOXMLBinaryObjectReference::resolve(BinaryObj & rHandler) if (! mbRead) read(); - writerfilter::Reference<Properties>::Pointer_t pRef = - writerfilter::Reference<Properties>::Pointer_t(); + writerfilter::Reference<Properties>::Pointer_t pRef; rHandler.data(reinterpret_cast<sal_uInt8 *>(mSequence.data()), mSequence.size(), pRef); diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index 61756c23eeda..26b673982333 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -1057,7 +1057,7 @@ void Databases::setActiveText( const OUString& Module, if( pData[i] == '%' || pData[i] == '$' ) { // need of replacement - OUString temp = OUString( pData, nSize, RTL_TEXTENCODING_UTF8 ); + OUString temp( pData, nSize, RTL_TEXTENCODING_UTF8 ); replaceName( temp ); tmp = OString( temp.getStr(), temp.getLength(), |