[Libreoffice-commits] core.git: 2 commits - accessibility/source basctl/source chart2/source compilerplugins/clang connectivity/source cppu/qa cui/source desktop/source drawinglayer/source editeng/source filter/source i18npool/source jvmfwk/source libreofficekit/qa linguistic/source oox/source sal/osl sc/source sd/qa sd/source sfx2/source slideshow/source svl/source svtools/source svx/source sw/qa sw/source toolkit/source tools/source writerfilter/source xmlhelp/source xmloff/source xmlsecurity/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 15 06:39:09 UTC 2019


 accessibility/source/standard/vclxaccessibletoolbox.cxx             |    2 
 basctl/source/basicide/scriptdocument.cxx                           |    2 
 basctl/source/dlged/managelang.cxx                                  |    4 -
 chart2/source/controller/main/ChartController_Insert.cxx            |    4 -
 chart2/source/controller/main/ChartController_Properties.cxx        |    2 
 chart2/source/model/template/ChartTypeTemplate.cxx                  |    2 
 chart2/source/tools/LifeTime.cxx                                    |    6 -
 chart2/source/tools/MeanValueRegressionCurveCalculator.cxx          |    2 
 compilerplugins/clang/sharedvisitor/sharedvisitor.cxx               |    5 +
 compilerplugins/clang/simplifyconstruct.cxx                         |   37 ++++++++++
 compilerplugins/clang/test/simplifyconstruct.cxx                    |   31 ++++++++
 connectivity/source/commontools/RowFunctionParser.cxx               |    2 
 cppu/qa/test_any.cxx                                                |    2 
 cui/source/customize/cfg.cxx                                        |    4 -
 cui/source/dialogs/screenshotannotationdlg.cxx                      |   18 ++--
 desktop/source/app/officeipcthread.cxx                              |    2 
 drawinglayer/source/tools/converters.cxx                            |    4 -
 editeng/source/items/frmitems.cxx                                   |    2 
 editeng/source/misc/svxacorr.cxx                                    |    2 
 filter/source/flash/swfwriter.cxx                                   |    2 
 i18npool/source/indexentry/genindex_data.cxx                        |    2 
 jvmfwk/source/elements.cxx                                          |   15 +---
 libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx |    2 
 linguistic/source/convdic.cxx                                       |    4 -
 linguistic/source/dicimp.cxx                                        |    4 -
 linguistic/source/dlistimp.cxx                                      |    2 
 oox/source/export/drawingml.cxx                                     |    2 
 sal/osl/unx/file_path_helper.cxx                                    |    2 
 sal/osl/unx/uunxapi.cxx                                             |    2 
 sc/source/core/data/colorscale.cxx                                  |    2 
 sc/source/core/opencl/formulagroupcl.cxx                            |    2 
 sc/source/filter/excel/xetable.cxx                                  |    2 
 sc/source/ui/app/rfindlst.cxx                                       |    4 -
 sc/source/ui/view/viewdata.cxx                                      |    2 
 sd/qa/unit/export-tests-ooxml2.cxx                                  |    2 
 sd/source/filter/ppt/pptin.cxx                                      |    2 
 sd/source/ui/animations/CustomAnimationDialog.cxx                   |    2 
 sd/source/ui/dlg/PhotoAlbumDialog.cxx                               |    2 
 sd/source/ui/slidesorter/view/SlsTheme.cxx                          |    4 -
 sfx2/source/appl/appserv.cxx                                        |    2 
 sfx2/source/appl/newhelp.cxx                                        |    2 
 sfx2/source/dialog/backingwindow.cxx                                |    2 
 slideshow/source/engine/slide/userpaintoverlay.cxx                  |    2 
 slideshow/source/engine/transitions/combtransition.cxx              |    2 
 svl/source/fsstor/fsstorage.cxx                                     |    3 
 svtools/source/uno/unoiface.cxx                                     |    4 -
 svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx       |    2 
 svx/source/form/fmpgeimp.cxx                                        |    2 
 svx/source/items/algitem.cxx                                        |    2 
 svx/source/items/pageitem.cxx                                       |    2 
 sw/qa/core/uwriter.cxx                                              |    4 -
 sw/qa/extras/odfexport/odfexport.cxx                                |    2 
 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx                           |    2 
 sw/qa/extras/rtfexport/rtfexport.cxx                                |    2 
 sw/qa/extras/uiwriter/uiwriter.cxx                                  |    4 -
 sw/source/core/crsr/DropDownFormFieldButton.cxx                     |    3 
 sw/source/core/doc/doctxm.cxx                                       |    2 
 sw/source/core/edit/autofmt.cxx                                     |   12 +--
 sw/source/core/fields/reffld.cxx                                    |    2 
 sw/source/core/text/frmcrsr.cxx                                     |    2 
 sw/source/core/text/guess.cxx                                       |    2 
 sw/source/core/text/porlay.cxx                                      |    2 
 sw/source/core/text/pormulti.cxx                                    |    4 -
 sw/source/core/txtnode/fntcache.cxx                                 |    2 
 sw/source/filter/html/htmlsect.cxx                                  |    2 
 sw/source/ui/fldui/fldvar.cxx                                       |    2 
 sw/source/ui/vba/vbalisthelper.cxx                                  |    2 
 toolkit/source/awt/vclxwindow.cxx                                   |   12 +--
 toolkit/source/awt/vclxwindows.cxx                                  |   10 +-
 toolkit/source/helper/accessibilityclient.cxx                       |    3 
 tools/source/xml/XmlWalker.cxx                                      |    2 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx                   |    6 -
 writerfilter/source/dmapper/LoggedResources.cxx                     |    5 -
 writerfilter/source/rtftok/rtfdocumentimpl.cxx                      |    4 -
 writerfilter/source/rtftok/rtfsprm.cxx                              |    4 -
 xmlhelp/source/treeview/tvread.cxx                                  |    3 
 xmloff/source/chart/SchXMLExport.cxx                                |    7 -
 xmloff/source/draw/XMLNumberStyles.cxx                              |    4 -
 xmloff/source/draw/sdxmlexp.cxx                                     |    4 -
 xmloff/source/forms/layerimport.cxx                                 |    3 
 xmloff/source/forms/propertyexport.cxx                              |    3 
 xmloff/source/script/XMLStarBasicExportHandler.cxx                  |    7 -
 xmloff/source/style/TransGradientStyle.cxx                          |    4 -
 xmloff/source/style/XMLFontAutoStylePool.cxx                        |    3 
 xmloff/source/text/XMLIndexMarkExport.cxx                           |    3 
 xmloff/source/text/XMLLineNumberingExport.cxx                       |    4 -
 xmloff/source/text/XMLSectionExport.cxx                             |    6 -
 xmloff/source/text/XMLTextFrameContext.cxx                          |    3 
 xmloff/source/text/XMLTextHeaderFooterContext.cxx                   |    4 -
 xmloff/source/text/txtftne.cxx                                      |    3 
 xmloff/source/text/txtparae.cxx                                     |    3 
 xmloff/source/text/txtvfldi.cxx                                     |    3 
 xmloff/source/transform/EventOOoTContext.cxx                        |    8 --
 xmlsecurity/source/dialogs/macrosecurity.cxx                        |    3 
 xmlsecurity/source/helper/xmlsignaturehelper.cxx                    |    6 -
 xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx              |    2 
 xmlsecurity/source/xmlsec/saxhelper.cxx                             |    4 -
 97 files changed, 213 insertions(+), 193 deletions(-)

New commits:
commit f87fab6310bee5a8df2a95ebc962072bdeb5faff
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Sun Apr 14 16:42:29 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Apr 15 08:38:02 2019 +0200

    loplugin:sequentialassign in writerfilter..xmlsecurity
    
    Change-Id: I41028c704eca08b71746c3c87e38926b95449775
    Reviewed-on: https://gerrit.libreoffice.org/70735
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 0f8ce7b4065d..6f49eecf348e 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1652,8 +1652,7 @@ void DomainMapper_Impl::appendTextPortion( const OUString& rString, const Proper
                     else
                     {
                         m_bStartedTOC = true;
-                        uno::Reference< text::XTextCursor > xTOCTextCursor;
-                        xTOCTextCursor = xTextAppend->getEnd()->getText( )->createTextCursor( );
+                        uno::Reference< text::XTextCursor > xTOCTextCursor = xTextAppend->getEnd()->getText( )->createTextCursor( );
                         xTOCTextCursor->gotoEnd(false);
                         if (xTOCTextCursor.is())
                         {
@@ -4846,8 +4845,7 @@ void DomainMapper_Impl::CloseFieldCommand()
                 {
                     xFieldInterface = m_xTextFactory->createInstance("com.sun.star.text.Fieldmark");
                     const uno::Reference<text::XTextContent> xTextContent(xFieldInterface, uno::UNO_QUERY_THROW);
-                    uno::Reference< text::XTextAppend >  xTextAppend;
-                    xTextAppend = m_aTextAppendStack.top().xTextAppend;
+                    uno::Reference< text::XTextAppend > xTextAppend = m_aTextAppendStack.top().xTextAppend;
                     uno::Reference< text::XTextCursor > xCrsr = xTextAppend->createTextCursorByRange(pContext->GetStartRange());
                     if (xTextContent.is())
                     {
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index ab8b249b8b50..076f4dd48f1f 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -906,8 +906,8 @@ void RTFDocumentImpl::resolvePict(bool const bInline, uno::Reference<drawing::XS
     if (xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextFrame"))
         pExtHeader = nullptr;
 
-    uno::Reference<graphic::XGraphic> xGraphic;
-    xGraphic = m_pGraphicHelper->importGraphic(xInputStream, pExtHeader);
+    uno::Reference<graphic::XGraphic> xGraphic
+        = m_pGraphicHelper->importGraphic(xInputStream, pExtHeader);
 
     if (m_aStates.top().aPicture.eStyle != RTFBmpStyle::NONE)
     {
diff --git a/writerfilter/source/rtftok/rtfsprm.cxx b/writerfilter/source/rtftok/rtfsprm.cxx
index 410a1264ca8d..a4c956dec3e4 100644
--- a/writerfilter/source/rtftok/rtfsprm.cxx
+++ b/writerfilter/source/rtftok/rtfsprm.cxx
@@ -41,9 +41,7 @@ std::string RTFSprm::toString() const
 {
     OStringBuffer aBuf("RTFSprm");
 
-    std::string sResult;
-
-    sResult = (*QNameToString::Instance())(m_nKeyword);
+    std::string sResult = (*QNameToString::Instance())(m_nKeyword);
 
     aBuf.append(" ('");
     if (sResult.length() == 0)
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index fb22ca058d95..337864d809fb 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -2913,8 +2913,7 @@ void SchXMLExportHelper_Impl::exportRegressionCurve(
             bool bShowRSquared = false;
             bool bExportEquation = false;
 
-            OUString aService;
-            aService = xServiceName->getServiceName();
+            OUString aService = xServiceName->getServiceName();
 
             std::vector< XMLPropertyState > aPropertyStates = mxExpPropMapper->Filter( xProperties );
 
@@ -3021,9 +3020,7 @@ void SchXMLExportHelper_Impl::exportErrorBar( const Reference<beans::XPropertySe
 
         try
         {
-            Any aAny;
-
-            aAny = xSeriesProp->getPropertyValue( bYError ? OUString("ErrorBarY") : OUString("ErrorBarX") );
+            Any aAny = xSeriesProp->getPropertyValue( bYError ? OUString("ErrorBarY") : OUString("ErrorBarX") );
             aAny >>= xErrorBarProp;
 
             if ( xErrorBarProp.is() )
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx
index 45a161a81421..79a5c600deb9 100644
--- a/xmloff/source/draw/XMLNumberStyles.cxx
+++ b/xmloff/source/draw/XMLNumberStyles.cxx
@@ -339,10 +339,8 @@ static void SdXMLExportDataStyleNumber( SdXMLExport& rExport, SdXMLDataStyleNumb
 
 static void SdXMLExportStyle( SdXMLExport& rExport, const SdXMLFixedDataStyle* pStyle, const SdXMLFixedDataStyle* pStyle2 = nullptr )
 {
-    OUString sAttrValue;
-
     // name
-    sAttrValue = OUString::createFromAscii( pStyle->mpName );
+    OUString sAttrValue = OUString::createFromAscii( pStyle->mpName );
     if( pStyle2 )
         sAttrValue += OUString::createFromAscii( pStyle2->mpName );
 
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 7075dc273eec..78312ff011c3 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -681,9 +681,7 @@ bool SdXMLExport::ImpPrepAutoLayoutInfo(const Reference<XDrawPage>& xPage, OUStr
     if(xPropSet.is())
     {
         sal_uInt16 nType = sal_uInt16();
-        Any aAny;
-
-        aAny = xPropSet->getPropertyValue("Layout");
+        Any aAny = xPropSet->getPropertyValue("Layout");
         if(aAny >>= nType)
         {
             if(ImpXMLAutoLayoutInfo::IsCreateNecessary(nType))
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index 332da3c6708e..ce19c3eb657d 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -376,8 +376,7 @@ void OFormLayerXMLImport_Impl::startPage(const Reference< XDrawPage >& _rxDrawPa
         return;
 
     // add a new entry to our page map
-    ::std::pair< MapDrawPage2Map::iterator, bool > aPagePosition;
-    aPagePosition = m_aControlIds.emplace(_rxDrawPage, MapString2PropertySet());
+    ::std::pair< MapDrawPage2Map::iterator, bool > aPagePosition = m_aControlIds.emplace(_rxDrawPage, MapString2PropertySet());
     OSL_ENSURE(aPagePosition.second, "OFormLayerXMLImport_Impl::startPage: already imported this page!");
     m_aCurrentPageIds = aPagePosition.first;
 }
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index 80d5a97f0752..708848670c1f 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -148,8 +148,7 @@ namespace xmloff
             bool bIsEmptyValue = TypeClass_VOID == aValue.getValueType().getTypeClass();
             if ( bIsEmptyValue )
             {
-                css::beans::Property aPropDesc;
-                aPropDesc = m_xPropertyInfo->getPropertyByName( rProperty );
+                css::beans::Property aPropDesc = m_xPropertyInfo->getPropertyByName( rProperty );
                 aExportType = aPropDesc.Type;
             }
             token::XMLTokenEnum eValueType = implGetPropertyXMLType( aExportType );
diff --git a/xmloff/source/script/XMLStarBasicExportHandler.cxx b/xmloff/source/script/XMLStarBasicExportHandler.cxx
index 398908e52454..50bc55e4fa5e 100644
--- a/xmloff/source/script/XMLStarBasicExportHandler.cxx
+++ b/xmloff/source/script/XMLStarBasicExportHandler.cxx
@@ -79,12 +79,9 @@ void XMLStarBasicExportHandler::Export(
 
     if( !sLocation.isEmpty() )
     {
-        OUStringBuffer sTmp( sLocation.getLength() + sName.getLength() + 1 );
-        sTmp = sLocation;
-        sTmp.append( ':' );
-        sTmp.append( sName );
+        OUString sTmp = sLocation + ":" + sName;
         rExport.AddAttribute(XML_NAMESPACE_SCRIPT, XML_MACRO_NAME,
-                            sTmp.makeStringAndClear());
+                            sTmp);
     }
     else
     {
diff --git a/xmloff/source/style/TransGradientStyle.cxx b/xmloff/source/style/TransGradientStyle.cxx
index 9abd72e98725..fb24ef79610e 100644
--- a/xmloff/source/style/TransGradientStyle.cxx
+++ b/xmloff/source/style/TransGradientStyle.cxx
@@ -247,10 +247,8 @@ void XMLTransGradientStyleExport::exportXML(
                     rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_CY, aStrValue );
                 }
 
-                Color aColor;
-
                 // Transparency start
-                aColor = Color(aGradient.StartColor);
+                Color aColor = Color(aGradient.StartColor);
                 sal_Int32 aStartValue = 100 - static_cast<sal_Int32>(((aColor.GetRed() + 1) * 100) / 255);
                 ::sax::Converter::convertPercent( aOut, aStartValue );
                 aStrValue = aOut.makeStringAndClear();
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index 054ce59a122c..e0d11241be4d 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -355,8 +355,7 @@ std::unordered_set<OUString> XMLFontAutoStylePool::getUsedFontList()
     GetExport().collectAutoStyles();
 
     // Check auto-styles for fonts
-    std::vector<xmloff::AutoStyleEntry> aAutoStyleEntries;
-    aAutoStyleEntries = GetExport().GetAutoStylePool()->GetAutoStyleEntries();
+    std::vector<xmloff::AutoStyleEntry> aAutoStyleEntries = GetExport().GetAutoStylePool()->GetAutoStyleEntries();
     for (auto const & rAutoStyleEntry : aAutoStyleEntries)
     {
         for (auto const & rPair : rAutoStyleEntry.m_aXmlProperties)
diff --git a/xmloff/source/text/XMLIndexMarkExport.cxx b/xmloff/source/text/XMLIndexMarkExport.cxx
index c0846dd2a71d..c52235cf6baa 100644
--- a/xmloff/source/text/XMLIndexMarkExport.cxx
+++ b/xmloff/source/text/XMLIndexMarkExport.cxx
@@ -70,8 +70,7 @@ void XMLIndexMarkExport::ExportIndexMark(
     sal_Int8 nElementNo = -1;
 
     // get index mark
-    Any aAny;
-    aAny = rPropSet->getPropertyValue(gsDocumentIndexMark);
+    Any aAny = rPropSet->getPropertyValue(gsDocumentIndexMark);
     Reference<XPropertySet> xIndexMarkPropSet;
     aAny >>= xIndexMarkPropSet;
 
diff --git a/xmloff/source/text/XMLLineNumberingExport.cxx b/xmloff/source/text/XMLLineNumberingExport.cxx
index e59f5a2c7f2b..455fd18b3242 100644
--- a/xmloff/source/text/XMLLineNumberingExport.cxx
+++ b/xmloff/source/text/XMLLineNumberingExport.cxx
@@ -66,10 +66,8 @@ void XMLLineNumberingExport::Export()
 
         if (xLineNumbering.is())
         {
-            Any aAny;
-
             // char style
-            aAny = xLineNumbering->getPropertyValue("CharStyleName");
+            Any aAny = xLineNumbering->getPropertyValue("CharStyleName");
             OUString sTmp;
             aAny >>= sTmp;
             if (!sTmp.isEmpty())
diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx
index 8dfde974df9e..45b02e05c35d 100644
--- a/xmloff/source/text/XMLSectionExport.cxx
+++ b/xmloff/source/text/XMLSectionExport.cxx
@@ -356,10 +356,9 @@ void XMLSectionExport::ExportRegularSectionStart(
 
     // get XPropertySet for other values
     Reference<XPropertySet> xPropSet(rSection, UNO_QUERY);
-    Any aAny;
 
     // condition and display
-    aAny = xPropSet->getPropertyValue("Condition");
+    Any aAny = xPropSet->getPropertyValue("Condition");
     OUString sCond;
     aAny >>= sCond;
     enum XMLTokenEnum eDisplay = XML_TOKEN_INVALID;
@@ -605,8 +604,7 @@ void XMLSectionExport::ExportAlphabeticalIndexStart(
     {
 
         // style name (if present)
-        Any aAny;
-        aAny = rPropertySet->getPropertyValue("MainEntryCharacterStyleName");
+        Any aAny = rPropertySet->getPropertyValue("MainEntryCharacterStyleName");
         OUString sStyleName;
         aAny >>= sStyleName;
         if (!sStyleName.isEmpty())
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index 994325d5b7d9..d317ee2808b5 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -1373,8 +1373,7 @@ XMLTextFrameContext::XMLTextFrameContext(
             {
                 rtl::Reference < XMLTextImportHelper > xTxtImport =
                                                     GetImport().GetTextImport();
-                XMLPropStyleContext* pStyle( nullptr );
-                pStyle = xTxtImport->FindAutoFrameStyle( aStyleName );
+                XMLPropStyleContext* pStyle = xTxtImport->FindAutoFrameStyle( aStyleName );
                 if ( pStyle && pStyle->GetParentName().isEmpty() )
                 {
                     m_HasAutomaticStyleWithoutParentStyle = true;
diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
index 717c0cf912c0..7db0783e5cf7 100644
--- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx
+++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx
@@ -57,9 +57,7 @@ XMLTextHeaderFooterContext::XMLTextHeaderFooterContext( SvXMLImport& rImport, sa
     // NOTE: if this ever handles XML_DISPLAY attr then beware of fdo#72850 !
     if( bLeft || bFirst )
     {
-        Any aAny;
-
-        aAny = xPropSet->getPropertyValue( sOn );
+        Any aAny = xPropSet->getPropertyValue( sOn );
         bool bOn = *o3tl::doAccess<bool>(aAny);
 
         if( bOn )
diff --git a/xmloff/source/text/txtftne.cxx b/xmloff/source/text/txtftne.cxx
index 0c7b7682413b..155205e9f2bc 100644
--- a/xmloff/source/text/txtftne.cxx
+++ b/xmloff/source/text/txtftne.cxx
@@ -72,8 +72,7 @@ void XMLTextParagraphExport::exportTextFootnote(
     bool bAutoStyles, bool bIsProgress )
 {
     // get footnote and associated text
-    Any aAny;
-    aAny = rPropSet->getPropertyValue(gsFootnote);
+    Any aAny = rPropSet->getPropertyValue(gsFootnote);
     Reference<XFootnote> xFootnote;
     aAny >>= xFootnote;
     Reference<XText> xText(xFootnote, UNO_QUERY);
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 9fb4b4360c24..907a799546bf 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -2075,8 +2075,7 @@ void XMLTextParagraphExport::exportParagraph(
     }
 
     Reference < XEnumerationAccess > xEA( rTextContent, UNO_QUERY );
-    Reference < XEnumeration > xTextEnum;
-    xTextEnum = xEA->createEnumeration();
+    Reference < XEnumeration > xTextEnum = xEA->createEnumeration();
     const bool bHasPortions = xTextEnum.is();
 
     Reference < XEnumeration> xContentEnum;
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index 949f74b4dcc7..c6d6ba0f6e73 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -382,8 +382,7 @@ void XMLSequenceFieldImportContext::PrepareField(
     // handle reference name
     if (bRefNameOK)
     {
-        Any aAny;
-        aAny = xPropertySet->getPropertyValue("SequenceValue");
+        Any aAny = xPropertySet->getPropertyValue("SequenceValue");
         sal_Int16 nValue = 0;
         aAny >>= nValue;
         GetImportHelper().InsertSequenceID(sRefName, GetName(), nValue);
diff --git a/xmloff/source/transform/EventOOoTContext.cxx b/xmloff/source/transform/EventOOoTContext.cxx
index ef00793a95d0..d9a2c49fc4d2 100644
--- a/xmloff/source/transform/EventOOoTContext.cxx
+++ b/xmloff/source/transform/EventOOoTContext.cxx
@@ -198,12 +198,8 @@ void XMLEventOOoTransformerContext::StartElement(
     {
         if( !IsXMLToken( aLocation, XML_APPLICATION ) )
             aLocation = GetXMLToken( XML_DOCUMENT );
-        OUStringBuffer sTmp( aLocation.getLength() + aMacroName.getLength() + 1 );
-        sTmp = aLocation;
-        sTmp.append( ':' );
-        sTmp.append( aMacroName );
-        pMutableAttrList->SetValueByIndex( nMacroName,
-                                           sTmp.makeStringAndClear() );
+        OUString sTmp = aLocation + ":" + aMacroName;
+        pMutableAttrList->SetValueByIndex( nMacroName, sTmp );
     }
 
     if( m_bPersistent )
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx
index 3e61b21dfa2a..70a9b32d88a8 100644
--- a/xmlsecurity/source/dialogs/macrosecurity.cxx
+++ b/xmlsecurity/source/dialogs/macrosecurity.cxx
@@ -314,10 +314,9 @@ void MacroSecurityTrustedSourcesTP::FillCertLB()
         for( sal_uInt32 nEntry = 0 ; nEntry < nEntries ; ++nEntry )
         {
             css::uno::Sequence< OUString >&              rEntry = m_aTrustedAuthors[ nEntry ];
-            uno::Reference< css::security::XCertificate >   xCert;
 
             // create from RawData
-            xCert = m_pDlg->m_xSecurityEnvironment->createCertificateFromAscii( rEntry[ 2 ] );
+            uno::Reference< css::security::XCertificate > xCert = m_pDlg->m_xSecurityEnvironment->createCertificateFromAscii( rEntry[ 2 ] );
 
             m_xTrustCertLB->append(OUString::number(nEntry), xmlsec::GetContentPart(xCert->getSubjectName()));
             m_xTrustCertLB->set_text(nEntry, xmlsec::GetContentPart(xCert->getIssuerName()), 1);
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index db80016f84e0..1754d25b8167 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -331,8 +331,7 @@ bool XMLSignatureHelper::ReadAndVerifySignatureStorage(const uno::Reference<embe
 
     uno::Reference<embed::XStorage> xSubStorage = xStorage->openStorageElement("_rels", nOpenMode);
     uno::Reference<io::XInputStream> xRelStream(xSubStorage->openStreamElement("origin.sigs.rels", nOpenMode), uno::UNO_QUERY);
-    uno::Sequence< uno::Sequence<beans::StringPair> > aRelationsInfo;
-    aRelationsInfo = comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(xRelStream, "origin.sigs.rels", mxCtx);
+    uno::Sequence< uno::Sequence<beans::StringPair> > aRelationsInfo = comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(xRelStream, "origin.sigs.rels", mxCtx);
 
     for (sal_Int32 i = 0; i < aRelationsInfo.getLength(); ++i)
     {
@@ -421,8 +420,7 @@ void XMLSignatureHelper::EnsureSignaturesRelation(const css::uno::Reference<css:
     sal_Int32 nOpenMode = embed::ElementModes::READWRITE;
     uno::Reference<embed::XStorage> xSubStorage = xStorage->openStorageElement("_rels", nOpenMode);
     uno::Reference<io::XInputStream> xRelStream(xSubStorage->openStreamElement(".rels", nOpenMode), uno::UNO_QUERY);
-    std::vector< uno::Sequence<beans::StringPair> > aRelationsInfo;
-    aRelationsInfo = comphelper::sequenceToContainer< std::vector< uno::Sequence<beans::StringPair> > >(comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(xRelStream, ".rels", mxCtx));
+    std::vector< uno::Sequence<beans::StringPair> > aRelationsInfo = comphelper::sequenceToContainer< std::vector< uno::Sequence<beans::StringPair> > >(comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(xRelStream, ".rels", mxCtx));
 
     // Do we have a relation already?
     bool bHaveRelation = false;
diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx
index 30811dbfac00..091773992324 100644
--- a/xmlsecurity/source/xmlsec/saxhelper.cxx
+++ b/xmlsecurity/source/xmlsec/saxhelper.cxx
@@ -286,9 +286,7 @@ void SAXHelper::startElement(
  */
 void SAXHelper::endElement( const OUString& aName )
 {
-    xmlChar* fullname = nullptr ;
-
-    fullname = ous_to_xmlstr( aName ) ;
+    xmlChar* fullname = ous_to_xmlstr( aName ) ;
     m_pSaxHandler->endElement( m_pParserCtxt , fullname ) ;
 
     if( fullname != nullptr )
commit b52f309f2b9037ee53ab8ac2d66967c012ba82f1
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Apr 12 18:39:22 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Apr 15 08:37:54 2019 +0200

    improve loplugin simplifyconstruct
    
    to find stuff like
       OUString s = OUString("xxx")
    
    Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04
    Reviewed-on: https://gerrit.libreoffice.org/70697
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index 7e20c261435d..5f5089ab5dbb 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -376,7 +376,7 @@ void VCLXAccessibleToolBox::UpdateItem_Impl( ToolBox::ImplToolItems::size_type _
 
         // TODO: we should make this dependent on the existence of event listeners
         // with the current implementation, we always create accessible object
-        Any aNewChild = Any( getAccessibleChild( static_cast<sal_Int32>(_nPos) ) );
+        Any aNewChild( getAccessibleChild( static_cast<sal_Int32>(_nPos) ) );
             //TODO: ToolBox::ImplToolItems::size_type -> sal_Int32!
         NotifyAccessibleEvent( AccessibleEventId::CHILD, Any(), aNewChild );
     }
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 16e73e6da2f0..2cf0a44dcaf5 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -1087,7 +1087,7 @@ namespace basctl
 
         for (auto const& doc : aDocuments)
         {
-            const ScriptDocument aCheck = ScriptDocument( doc.xModel );
+            const ScriptDocument aCheck( doc.xModel );
             if  (   _rUrlOrCaption == aCheck.getTitle()
                 ||  _rUrlOrCaption == aCheck.m_pImpl->getURL()
                 )
diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx
index d23563714196..2c10c81c0eab 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -302,7 +302,7 @@ Sequence< Locale > SetDefaultLanguageDialog::GetLocales() const
     bool bNotLocalized = !m_xLocalizationMgr->isLibraryLocalized();
     if (bNotLocalized)
     {
-        LanguageType eType = LanguageType(m_xLanguageLB->get_selected_id().toUInt32());
+        LanguageType eType(m_xLanguageLB->get_selected_id().toUInt32());
         Sequence<Locale> aLocaleSeq(1);
         aLocaleSeq[0] = LanguageTag(eType).getLocale();
         return aLocaleSeq;
@@ -313,7 +313,7 @@ Sequence< Locale > SetDefaultLanguageDialog::GetLocales() const
     {
         if (m_xCheckLangLB->get_toggle(i, 0) == TRISTATE_TRUE)
         {
-            LanguageType eType = LanguageType(m_xCheckLangLB->get_id(i).toUInt32());
+            LanguageType eType(m_xCheckLangLB->get_id(i).toUInt32());
             aLocaleSeq.push_back(LanguageTag::convertToLocale(eType));
         }
     }
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx
index 63d88e18a007..a2f2dcb347ae 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -380,7 +380,7 @@ void ChartController::executeDispatch_InsertTrendline()
     // open dialog
     SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet();
     aItemConverter.FillItemSet( aItemSet );
-    ObjectPropertiesDialogParameter aDialogParameter = ObjectPropertiesDialogParameter(
+    ObjectPropertiesDialogParameter aDialogParameter(
         ObjectIdentifier::createDataCurveCID(
             ObjectIdentifier::getSeriesParticleFromCID( m_aSelection.getSelectedCID()),
             RegressionCurveHelper::getRegressionCurveIndex( xRegressionCurveContainer, xCurve ), false ));
@@ -439,7 +439,7 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError )
         SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet();
         aItemSet.Put(SfxBoolItem(SCHATTR_STAT_ERRORBAR_TYPE,bYError));
         aItemConverter.FillItemSet( aItemSet );
-        ObjectPropertiesDialogParameter aDialogParameter = ObjectPropertiesDialogParameter(
+        ObjectPropertiesDialogParameter aDialogParameter(
             ObjectIdentifier::createClassifiedIdentifierWithParent(
                 objType, OUString(), m_aSelection.getSelectedCID()));
         aDialogParameter.init( getModel() );
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index 9a0242081da2..9ba3f1f712e4 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -753,7 +753,7 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard(
         pItemConverter->FillItemSet(aItemSet);
 
         //prepare dialog
-        ObjectPropertiesDialogParameter aDialogParameter = ObjectPropertiesDialogParameter( rObjectCID );
+        ObjectPropertiesDialogParameter aDialogParameter( rObjectCID );
         aDialogParameter.init( getModel() );
         ViewElementListProvider aViewElementListProvider( m_pDrawModelWrapper.get() );
 
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index f11c58787f0b..e20d23494f63 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -386,7 +386,7 @@ void SAL_CALL ChartTypeTemplate::applyStyle(
         try
         {
             StackMode eStackMode = getStackMode( nChartTypeIndex );
-            const uno::Any aPropValue = uno::Any(
+            const uno::Any aPropValue(
                 ( (eStackMode == StackMode::YStacked) ||
                   (eStackMode == StackMode::YStackedPercent) )
                 ? chart2::StackingDirection_Y_STACKING
diff --git a/chart2/source/tools/LifeTime.cxx b/chart2/source/tools/LifeTime.cxx
index adc04802925b..8a9717ac221c 100644
--- a/chart2/source/tools/LifeTime.cxx
+++ b/chart2/source/tools/LifeTime.cxx
@@ -131,8 +131,7 @@ bool LifeTimeManager::dispose()
 
     //--do the disposing of listeners after calling this method
     {
-        uno::Reference< lang::XComponent > xComponent =
-            uno::Reference< lang::XComponent >(m_pComponent);
+        uno::Reference< lang::XComponent > xComponent(m_pComponent);
         if(xComponent.is())
         {
             // notify XCLoseListeners
@@ -217,8 +216,7 @@ bool CloseableLifeTimeManager::g_close_startTryClose(bool bDeliverOwnership)
 
     try
     {
-        uno::Reference< util::XCloseable > xCloseable =
-            uno::Reference< util::XCloseable >(m_pCloseable);
+        uno::Reference< util::XCloseable > xCloseable(m_pCloseable);
         if(xCloseable.is())
         {
             //--call queryClosing on all registered close listeners
diff --git a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
index b9d342cbe519..43088acc364a 100644
--- a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
@@ -113,7 +113,7 @@ OUString MeanValueRegressionCurveCalculator::ImplGetRepresentation(
     const uno::Reference< util::XNumberFormatter >& xNumFormatter,
     sal_Int32 nNumberFormatKey, sal_Int32* pFormulaLength /* = nullptr */ ) const
 {
-    OUString aBuf = OUString(mYName + " = ");
+    OUString aBuf(mYName + " = ");
     if ( pFormulaLength )
     {
         *pFormulaLength -= aBuf.getLength();
diff --git a/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx b/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
index 5b72c329691d..66e43b96f67b 100644
--- a/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
+++ b/compilerplugins/clang/sharedvisitor/sharedvisitor.cxx
@@ -626,6 +626,11 @@ public:
             if( !externVar->VisitVarDecl( arg ))
                 externVar = nullptr;
         }
+        if( simplifyConstruct != nullptr )
+        {
+            if( !simplifyConstruct->VisitVarDecl( arg ))
+                simplifyConstruct = nullptr;
+        }
         if( stringStatic != nullptr )
         {
             if( !stringStatic->VisitVarDecl( arg ))
diff --git a/compilerplugins/clang/simplifyconstruct.cxx b/compilerplugins/clang/simplifyconstruct.cxx
index 652a980cec6a..c3e28ce7bcda 100644
--- a/compilerplugins/clang/simplifyconstruct.cxx
+++ b/compilerplugins/clang/simplifyconstruct.cxx
@@ -31,6 +31,7 @@ public:
     virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
 
     bool VisitCXXConstructExpr(CXXConstructExpr const*);
+    bool VisitVarDecl(VarDecl const*);
 
     // ignore some contexts within which nullptr is fine
     bool TraverseReturnStmt(ReturnStmt*) { return true; }
@@ -69,6 +70,42 @@ bool SimplifyConstruct::VisitCXXConstructExpr(CXXConstructExpr const* constructE
     return true;
 }
 
+bool SimplifyConstruct::VisitVarDecl(VarDecl const* varDecl)
+{
+    if (ignoreLocation(varDecl))
+        return true;
+    // cannot use OUString s("xxx") style syntax in a parameter
+    if (isa<ParmVarDecl>(varDecl))
+        return true;
+    varDecl = varDecl->getCanonicalDecl();
+    if (!varDecl->getInit())
+        return true;
+    if (varDecl->getInitStyle() != VarDecl::InitializationStyle::CInit)
+        return true;
+    if (!varDecl->getType()->isRecordType())
+        return true;
+    if (isa<AutoType>(varDecl->getType()))
+        return true;
+
+    auto init = varDecl->getInit()->IgnoreImplicit();
+    auto functionalCast = dyn_cast<CXXFunctionalCastExpr>(init);
+    if (!functionalCast)
+        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();
+
+    return true;
+}
+
 loplugin::Plugin::Registration<SimplifyConstruct> simplifyconstruct("simplifyconstruct", true);
 }
 
diff --git a/compilerplugins/clang/test/simplifyconstruct.cxx b/compilerplugins/clang/test/simplifyconstruct.cxx
index ca4b3a1a198c..8fbffc8ba2d7 100644
--- a/compilerplugins/clang/test/simplifyconstruct.cxx
+++ b/compilerplugins/clang/test/simplifyconstruct.cxx
@@ -10,6 +10,8 @@
 #include <memory>
 #include <rtl/ref.hxx>
 
+namespace test1
+{
 struct Foo
 {
     void acquire();
@@ -27,8 +29,11 @@ class Foo1
     {
     }
 };
+}
 
 // no warning expected when using std::unique_ptr constructor with a custom deleter
+namespace test2
+{
 struct ITypeLib
 {
 };
@@ -43,5 +48,31 @@ void func2()
             p->Release();
     });
 }
+}
+
+namespace test3
+{
+struct Foo
+{
+    void acquire();
+    void release();
+};
+void f(Foo* f)
+{
+    // expected-error at +1 {{simplify [loplugin:simplifyconstruct]}}
+    rtl::Reference<Foo> x = rtl::Reference(f);
+}
+}
+
+// no warning expected
+namespace test4
+{
+struct Foo
+{
+    void acquire();
+    void release();
+};
+void f(Foo* f) { auto x = rtl::Reference(f); }
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/connectivity/source/commontools/RowFunctionParser.cxx b/connectivity/source/commontools/RowFunctionParser.cxx
index e93e7b01e424..811e0fb7c70f 100644
--- a/connectivity/source/commontools/RowFunctionParser.cxx
+++ b/connectivity/source/commontools/RowFunctionParser.cxx
@@ -212,7 +212,7 @@ public:
         rNodeStack.pop();
 
         // create combined ExpressionNode
-        std::shared_ptr<ExpressionNode> pNode = std::shared_ptr<ExpressionNode>( new BinaryFunctionExpression( meFunct, pFirstArg, pSecondArg ) );
+        std::shared_ptr<ExpressionNode> pNode( new BinaryFunctionExpression( meFunct, pFirstArg, pSecondArg ) );
         // check for constness
         rNodeStack.push( pNode );
     }
diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx
index b8a8037f8f48..f5fbc0c9dbc8 100644
--- a/cppu/qa/test_any.cxx
+++ b/cppu/qa/test_any.cxx
@@ -2012,7 +2012,7 @@ void Test::testInterface() {
 }
 
 void Test::testNull() {
-    css::uno::Any a = css::uno::Any(css::uno::Reference< Interface2a >());
+    css::uno::Any a { css::uno::Reference< Interface2a >() };
     CPPUNIT_ASSERT(bool(a.getValueType() == cppu::UnoType<Interface2a>::get()));
     {
         bool b = true;
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index bd6487186c50..2796a2ddd910 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2720,7 +2720,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog(weld::Window *pWindow,
         if ( graphics.getLength() > 0 )
         {
             m_aGraphics.push_back(graphics[0]);
-            Image img = Image(graphics[0]);
+            Image img(graphics[0]);
             m_xTbSymbol->InsertItem(m_aGraphics.size(), img, elem.first);
         }
     }
@@ -2765,7 +2765,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog(weld::Window *pWindow,
 
         if ( graphics.getLength() > 0 )
         {
-            Image img = Image(graphics[0]);
+            Image img(graphics[0]);
             if (!img.GetBitmapEx().IsEmpty())
             {
                 m_aGraphics.push_back(graphics[0]);
diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx b/cui/source/dialogs/screenshotannotationdlg.cxx
index 1d38a7d3b5f6..e567944d226c 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -58,9 +58,9 @@ namespace
 
     OUString lcl_AltDescr()
     {
-        OUString aTempl = OUString("<alt id=\"%1\">"
-                                   " " //FIXME real dialog title or something
-                                  "</alt>");
+        OUString aTempl("<alt id=\"%1\">"
+                        " " //FIXME real dialog title or something
+                        "</alt>");
         aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("alt_id") );
 
         return aTempl;
@@ -68,10 +68,10 @@ namespace
 
     OUString lcl_Image( const OUString& rScreenshotId, const Size& rSize )
     {
-        OUString aTempl = OUString("<image id=\"%1\" src=\"media/screenshots/%2.png\""
-                                    " width=\"%3cm\"  height=\"%4cm\">"
-                                    "%5"
-                                   "</image>");
+        OUString aTempl("<image id=\"%1\" src=\"media/screenshots/%2.png\""
+                           " width=\"%3cm\"  height=\"%4cm\">"
+                           "%5"
+                        "</image>");
         aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("img_id") );
         aTempl = aTempl.replaceFirst( "%2", rScreenshotId );
         aTempl = aTempl.replaceFirst( "%3", OUString::number( rSize.Width() ) );
@@ -83,8 +83,8 @@ namespace
 
     OUString lcl_ParagraphWithImage( const OUString& rScreenshotId, const Size& rSize )
     {
-        OUString aTempl = OUString( "<paragraph id=\"%1\" role=\"paragraph\">%2"
-                                    "</paragraph>"  SAL_NEWLINE_STRING );
+        OUString aTempl( "<paragraph id=\"%1\" role=\"paragraph\">%2"
+                         "</paragraph>"  SAL_NEWLINE_STRING );
         aTempl = aTempl.replaceFirst( "%1", lcl_genRandom("par_id") );
         aTempl = aTempl.replaceFirst( "%2", lcl_Image(rScreenshotId, rSize) );
 
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 59450974e1b0..021aaecd550f 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -667,7 +667,7 @@ void RequestHandler::EnableRequests()
             pGlobal->mState = State::RequestsEnabled;
         }
         // hit the compiler over the head
-        ProcessDocumentsRequest aEmptyReq = ProcessDocumentsRequest( boost::optional< OUString >() );
+        ProcessDocumentsRequest aEmptyReq { boost::optional< OUString >() };
         // trigger already queued requests
         RequestHandler::ExecuteCmdLineRequests(aEmptyReq, true);
     }
diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx
index 62de9ec5aac0..3f601f84d47a 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -101,7 +101,7 @@ namespace drawinglayer
                 if(bDoSaveForVisualControl)
                 {
                     SvFileStream aNew("c:\\test_content.png", StreamMode::WRITE|StreamMode::TRUNC);
-                    BitmapEx aContentEx = BitmapEx(aContent);
+                    BitmapEx aContentEx(aContent);
                     vcl::PNGWriter aPNGWriter(aContentEx);
                     aPNGWriter.Write(aNew);
                 }
@@ -132,7 +132,7 @@ namespace drawinglayer
                 if(bDoSaveForVisualControl)
                 {
                     SvFileStream aNew("c:\\test_alpha.png", StreamMode::WRITE|StreamMode::TRUNC);
-                    BitmapEx aAlphaEx = BitmapEx(aAlpha);
+                    BitmapEx aAlphaEx(aAlpha);
                     vcl::PNGWriter aPNGWriter(aAlphaEx);
                     aPNGWriter.Write(aNew);
                 }
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 01759a632ce8..bf79026a72c6 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1815,7 +1815,7 @@ bool SvxBoxItem::GetPresentation
     OUString&           rText, const IntlWrapper& rIntl
 )   const
 {
-    OUString cpDelimTmp = OUString(cpDelim);
+    OUString cpDelimTmp(cpDelim);
     switch ( ePres )
     {
         case SfxItemPresentation::Nameless:
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 0ee639ca2194..cfd4ca6f655e 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1234,7 +1234,7 @@ OUString SvxAutoCorrect::GetQuote( SvxAutoCorrDoc const & rDoc, sal_Int32 nInsPo
     const LanguageType eLang = GetDocLanguage( rDoc, nInsPos );
     sal_Unicode cRet = GetQuote( cInsChar, bSttQuote, eLang );
 
-    OUString sRet = OUString(cRet);
+    OUString sRet(cRet);
 
     if( '\"' == cInsChar )
     {
diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx
index 1dc03182aa15..979f13e3e78f 100644
--- a/filter/source/flash/swfwriter.cxx
+++ b/filter/source/flash/swfwriter.cxx
@@ -61,7 +61,7 @@ Writer::Writer( sal_Int32 nTWIPWidthOutput, sal_Int32 nTWIPHeightOutput, sal_Int
     // define an invisible button with the size of a page
     tools::Rectangle aRect( 0, 0, static_cast<long>( mnDocWidth * mnDocXScale ), static_cast<long>( mnDocHeight * mnDocYScale ) );
     tools::Polygon aPoly( aRect );
-    FillStyle aFill = FillStyle( COL_WHITE );
+    FillStyle aFill( COL_WHITE );
     sal_uInt16 nWhiteBackgroundShapeId = defineShape( aPoly, aFill );
 
     ::basegfx::B2DHomMatrix m; // #i73264#
diff --git a/i18npool/source/indexentry/genindex_data.cxx b/i18npool/source/indexentry/genindex_data.cxx
index 871b742d9b86..a6f054138df3 100644
--- a/i18npool/source/indexentry/genindex_data.cxx
+++ b/i18npool/source/indexentry/genindex_data.cxx
@@ -48,7 +48,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
     sal_Int32 i, j, k;
     sal_Int32 address[MAX_ADDRESS];
     for (i=0; i<MAX_ADDRESS; i++) address[i]=-1;
-    OUString sep=OUString('|');
+    OUString sep('|');
     OUStringBuffer result=sep;
     sal_Int32 max=0;
 
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx
index 64373f31c8b0..57134e19b35d 100644
--- a/jvmfwk/source/elements.cxx
+++ b/jvmfwk/source/elements.cxx
@@ -409,8 +409,7 @@ void NodeJava::write() const
     //The element must exist
     if (m_enabled)
     {
-        OString sExpression= OString(
-            "/jf:java/jf:enabled");
+        OString sExpression("/jf:java/jf:enabled");
         pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpression.getStr()),
                                          contextUser);
         if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
@@ -432,8 +431,7 @@ void NodeJava::write() const
     //The element must exist
     if (m_userClassPath)
     {
-        OString sExpression= OString(
-            "/jf:java/jf:userClassPath");
+        OString sExpression("/jf:java/jf:userClassPath");
         pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpression.getStr()),
                                          contextUser);
         if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
@@ -447,8 +445,7 @@ void NodeJava::write() const
     //set <javaInfo> element
     if (m_javaInfo)
     {
-        OString sExpression= OString(
-            "/jf:java/jf:javaInfo");
+        OString sExpression("/jf:java/jf:javaInfo");
         pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpression.getStr()),
                                                 contextUser);
         if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
@@ -460,8 +457,7 @@ void NodeJava::write() const
     //set <vmParameters> element
     if (m_vmParameters)
     {
-        OString sExpression= OString(
-            "/jf:java/jf:vmParameters");
+        OString sExpression("/jf:java/jf:vmParameters");
         pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpression.getStr()),
                                          contextUser);
         if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
@@ -500,8 +496,7 @@ void NodeJava::write() const
     //set <jreLocations> element
     if (m_JRELocations)
     {
-        OString sExpression= OString(
-            "/jf:java/jf:jreLocations");
+        OString sExpression("/jf:java/jf:jreLocations");
         pathObj = xmlXPathEvalExpression(reinterpret_cast<xmlChar const *>(sExpression.getStr()),
                                          contextUser);
         if ( ! pathObj || xmlXPathNodeSetIsEmpty(pathObj->nodesetval))
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx b/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
index c3ee592a5463..17120e5a4ada 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx
@@ -87,7 +87,7 @@ void LOKDocViewSigHandlers::commandChanged(LOKDocView* pDocView, char* pPayload,
         }
         else if (aKey == ".uno:TrackedChangeIndex")
         {
-            std::string aText = std::string("Current redline: ");
+            std::string aText("Current redline: ");
             if (aValue.empty())
                 aText += "none";
             else
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index 071cb8d310df..7c2c602a79fa 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -93,7 +93,7 @@ static void ReadThroughDic( const OUString &rMainURL, ConvDicXMLImport &rImport
     if (!xIn.is())
         return;
 
-    SvStreamPtr pStream = SvStreamPtr( utl::UcbStreamHelper::CreateStream( xIn ) );
+    SvStreamPtr pStream( utl::UcbStreamHelper::CreateStream( xIn ) );
 
     // prepare ParserInputSource
     xml::sax::InputSource aParserInput;
@@ -246,7 +246,7 @@ void ConvDic::Save()
     if (!xStream.is())
         return;
 
-    SvStreamPtr pStream = SvStreamPtr( utl::UcbStreamHelper::CreateStream( xStream ) );
+    SvStreamPtr pStream( utl::UcbStreamHelper::CreateStream( xStream ) );
 
     // get XML writer
     uno::Reference< xml::sax::XWriter > xSaxWriter = xml::sax::Writer::create(xContext);
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index b99f632c9842..f6a976679641 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -293,7 +293,7 @@ ErrCode DictionaryNeo::loadEntries(const OUString &rMainURL)
     if (!xStream.is())
         return ErrCode(sal_uInt32(-1));
 
-    SvStreamPtr pStream = SvStreamPtr( utl::UcbStreamHelper::CreateStream( xStream ) );
+    SvStreamPtr pStream( utl::UcbStreamHelper::CreateStream( xStream ) );
 
     // read header
     bool bNegativ;
@@ -427,7 +427,7 @@ ErrCode DictionaryNeo::saveEntries(const OUString &rURL)
     if (!xStream.is())
         return ErrCode(sal_uInt32(-1));
 
-    SvStreamPtr pStream = SvStreamPtr( utl::UcbStreamHelper::CreateStream( xStream ) );
+    SvStreamPtr pStream( utl::UcbStreamHelper::CreateStream( xStream ) );
 
     // Always write as the latest version, i.e. DIC_VERSION_7
 
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 9ca759a18da3..115fdca74669 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -820,7 +820,7 @@ static bool IsVers2OrNewer( const OUString& rFileURL, LanguageType& nLng, bool&
     if (!xStream.is())
         return false;
 
-    SvStreamPtr pStream = SvStreamPtr( utl::UcbStreamHelper::CreateStream( xStream ) );
+    SvStreamPtr pStream( utl::UcbStreamHelper::CreateStream( xStream ) );
 
     int nDicVersion = ReadDicVersion(pStream, nLng, bNeg, aDicName);
     return 2 == nDicVersion || nDicVersion >= 5;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index e259aa856906..a5e8f48f6dff 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1776,7 +1776,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
              && eState == beans::PropertyState_DIRECT_VALUE)
             || GetProperty(rXPropSet, "CharUnderlineColor")))
     {
-        ::Color color = ::Color(*o3tl::doAccess<sal_uInt32>(mAny));
+        ::Color color(*o3tl::doAccess<sal_uInt32>(mAny));
         // if color is automatic, then we shouldn't write information about color but to take color from character
         if( color != COL_AUTO )
         {
diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx
index 7fc2effb5f03..12532e03c01f 100644
--- a/sal/osl/unx/file_path_helper.cxx
+++ b/sal/osl/unx/file_path_helper.cxx
@@ -227,7 +227,7 @@ bool osl_searchPath(
 
     bool               bfound = false;
     OUString      fp(const_cast<rtl_uString*>(pustrFilePath));
-    OUString      pl = OUString(const_cast<rtl_uString*>(pustrSearchPathList));
+    OUString      pl(const_cast<rtl_uString*>(pustrSearchPathList));
     path_list_iterator pli(pl);
 
     while (!pli.done())
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index b36c3ddc1790..d797de1c5028 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -388,7 +388,7 @@ int ftruncate_with_name(int fd, sal_uInt64 uSize, rtl_String* path)
      * abstraction layer that keeps the pathname around.
      */
 
-    OString fn = OString(path);
+    OString fn(path);
 
 #ifdef MACOSX
     fn = macxp_resolveAliasAndConvert(fn);
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 53e4d82eeb8b..53e9e63fc548 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -1403,7 +1403,7 @@ BitmapEx& ScIconSetFormat::getBitmap(sc::IconSetBitmapMap & rIconSetBitmapMap,
     if (itr != rIconSetBitmapMap.end())
         return itr->second;
 
-    BitmapEx aBitmap = BitmapEx(sBitmap);
+    BitmapEx aBitmap(sBitmap);
     std::pair<OUString, BitmapEx> aPair(sBitmap, aBitmap);
     std::pair<std::map<OUString, BitmapEx>::iterator, bool> itrNew = rIconSetBitmapMap.insert(aPair);
     assert(itrNew.second);
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index d9d7da3d501c..8c55b0f2f790 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -924,7 +924,7 @@ size_t DynamicKernelStringArgument::Marshal( cl_kernel k, int argno, int, cl_pro
         {
             if (vRef.mpStringArray[i])
             {
-                const OUString tmp = OUString(vRef.mpStringArray[i]);
+                const OUString tmp(vRef.mpStringArray[i]);
                 pHashBuffer[i] = tmp.hashCode();
             }
             else
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 264a4d042488..d0038dd32379 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -1602,7 +1602,7 @@ XclExpColinfo::XclExpColinfo( const XclExpRoot& rRoot,
     // column flags
     ::set_flag( mnFlags, EXC_COLINFO_HIDDEN, rDoc.ColHidden(nScCol, nScTab) );
 
-    XclExpDefcolwidth defColWidth = XclExpDefcolwidth( rRoot );
+    XclExpDefcolwidth defColWidth( rRoot );
     mbCustomWidth = !defColWidth.IsDefWidth( mnWidth );
     set_flag(mnFlags, EXC_COLINFO_CUSTOMWIDTH, mbCustomWidth);
 
diff --git a/sc/source/ui/app/rfindlst.cxx b/sc/source/ui/app/rfindlst.cxx
index f0188a9fbeb3..9a27a0d0e298 100644
--- a/sc/source/ui/app/rfindlst.cxx
+++ b/sc/source/ui/app/rfindlst.cxx
@@ -54,8 +54,8 @@ Color ScRangeFindList::FindColor( const ScRange& rRef, const size_t nIndex )
 {
     sal_Int32 nOldCntr = 0;
     sal_Int32 nNewCntr = 0;
-    Color nOldColor = Color(0);
-    Color nNewColor = Color(0);
+    Color nOldColor(0);
+    Color nNewColor(0);
 
     DBG_ASSERT( (nIndex < maEntries.size()), "nIndex out of range!" );
 
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index f2ad828d95fe..0d3d52bb353e 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2802,7 +2802,7 @@ void ScViewData::WriteUserData(OUString& rData)
         rData += ";";                   // Numbering must not get mixed up under any circumstances
         if (i < static_cast<SCTAB>(maTabData.size()) && maTabData[i])
         {
-            OUString cTabSep = OUString(SC_OLD_TABSEP);                // like 3.1
+            OUString cTabSep(SC_OLD_TABSEP);                // like 3.1
             if ( maTabData[i]->nCurY > MAXROW_30 ||
                  maTabData[i]->nPosY[0] > MAXROW_30 || maTabData[i]->nPosY[1] > MAXROW_30 ||
                  ( maTabData[i]->eVSplitMode == SC_SPLIT_FIX &&
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 5b8f77f9a744..7c27e0a315cc 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -669,7 +669,7 @@ void SdOOXMLExportTest2::testPresetShapesExport()
 
     size_t i = 0;
     while(i < SAL_N_ELEMENTS( sShapeTypeAndValues )) {
-        OString sType = OString( sShapeTypeAndValues[ i++ ] );
+        OString sType( sShapeTypeAndValues[ i++ ] );
         for ( size_t j = 1 ; i < SAL_N_ELEMENTS( sShapeTypeAndValues ) && OString(sShapeTypeAndValues[i]).startsWith("adj") ; ++j ) {
             OString sXPath= sPattern.replaceFirst( sT, sType).replaceFirst( sN, OString::number(j) );
             assertXPath(pXmlDocCT, sXPath, sPropertyName , OUString::createFromAscii(sShapeTypeAndValues[ i++ ]) );
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 057e15e1908f..0c60e860bcfa 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2745,7 +2745,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportPPT(SvStream &rStream)
     bool bRet = false;
     try
     {
-        tools::SvRef<SotStorage> xStorage = tools::SvRef<SotStorage>(new SotStorage(rStream));
+        tools::SvRef<SotStorage> xStorage(new SotStorage(rStream));
         if (xStorage->GetError())
             return false;
 
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 12bb79851bea..6f0a3efbd62e 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -1859,7 +1859,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage(weld::Container* pPar
             {
                 sal_Int32 nColor = 0;
                 aDimColor >>= nColor;
-                Color aColor = Color(nColor);
+                Color aColor(nColor);
                 mxCLBDimColor->SelectEntry(aColor);
             }
             else
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 186c407e0095..3f9b7cef8378 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -532,7 +532,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl, weld::Button&, void)
             for ( sal_Int32 i = 0; i < aFilesArr.getLength(); i++ )
             {
                 // Store full path, show filename only. Use INetURLObject to display spaces in filename correctly
-                INetURLObject aUrl = INetURLObject(aFilesArr[i]);
+                INetURLObject aUrl(aFilesArr[i]);
                 m_xImagesLst->append(aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE), aUrl.GetLastName(INetURLObject::DecodeMechanism::WithCharset), "");
             }
         }
diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx
index b7976d9c55ca..f495ef6a4810 100644
--- a/sd/source/ui/slidesorter/view/SlsTheme.cxx
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
@@ -31,8 +31,8 @@
 
 namespace sd { namespace slidesorter { namespace view {
 
-const static Color Black = Color(0x000000);
-const static Color White = Color(0xffffff);
+const static Color Black(0x000000);
+const static Color White(0xffffff);
 
 static Color ChangeLuminance (Color aColor, const int nValue)
 {
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index b26578c5ea52..10141a85b467 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -842,7 +842,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
                     std::vector<OUString> aBackupList;
                     OUString aSidebarMode;
 
-                    OUStringBuffer aPath = OUStringBuffer( "org.openoffice.Office.UI.ToolbarMode/Applications/" );
+                    OUStringBuffer aPath( "org.openoffice.Office.UI.ToolbarMode/Applications/" );
                     aPath.append( lcl_getAppName( eApp ) );
                     aPath.append( "/Modes" );
 
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 56cb15663268..646b4bd77c30 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2795,7 +2795,7 @@ IMPL_LINK_NOARG(SfxHelpWindow_Impl, OpenHdl, Control*, bool)
     else
     {
         OUString aId;
-        OUString aAnchor = OUString('#');
+        OUString aAnchor('#');
         if ( comphelper::string::getTokenCount(aEntry, '#') == 2 )
         {
             sal_Int32 nIdx{ 0 };
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index d3fad16db845..4575fa31a386 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -270,7 +270,7 @@ void BackingWindow::initControls()
     mpHelpButton->SetControlForeground(maButtonsTextColor);
     mpExtensionsButton->SetControlForeground(maButtonsTextColor);
 
-    const Color aButtonsBackground = Color(officecfg::Office::Common::Help::StartCenter::StartCenterBackgroundColor::get());
+    const Color aButtonsBackground(officecfg::Office::Common::Help::StartCenter::StartCenterBackgroundColor::get());
 
     mpAllButtonsBox->SetBackground(aButtonsBackground);
     mpSmallButtonsBox->SetBackground(aButtonsBackground);
diff --git a/slideshow/source/engine/slide/userpaintoverlay.cxx b/slideshow/source/engine/slide/userpaintoverlay.cxx
index e1501a602ab1..f0ef80dc32e9 100644
--- a/slideshow/source/engine/slide/userpaintoverlay.cxx
+++ b/slideshow/source/engine/slide/userpaintoverlay.cxx
@@ -349,7 +349,7 @@ namespace slideshow
                         // render at given output position
                         pBitmap->move( aOutPosPixel );
 
-                        ::basegfx::B2DPolyPolygon aPolyPoly=::basegfx::B2DPolyPolygon(aPoly);
+                        ::basegfx::B2DPolyPolygon aPolyPoly(aPoly);
                         aViewTransform.translate(-aOutPosPixel.getX(), -aOutPosPixel.getY());
                         aPolyPoly.transform(aViewTransform);
                         // set clip so that we just redraw a part of the canvas
diff --git a/slideshow/source/engine/transitions/combtransition.cxx b/slideshow/source/engine/transitions/combtransition.cxx
index 4185b5033752..65c32b66e46f 100644
--- a/slideshow/source/engine/transitions/combtransition.cxx
+++ b/slideshow/source/engine/transitions/combtransition.cxx
@@ -117,7 +117,7 @@ void CombTransition::renderComb( double           t,
     const basegfx::B2DSize enteringSizePixel(
         getEnteringSlideSizePixel( rViewEntry.mpView) );
 
-    const basegfx::B2DVector aPushDirection = basegfx::B2DVector(
+    const basegfx::B2DVector aPushDirection(
         enteringSizePixel * maPushDirectionUnit );
     const basegfx::B2DPolyPolygon aClipPolygon1 =
         createClipPolygon( maPushDirectionUnit,
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 199c438c7ae9..a6922789dc5b 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -1132,8 +1132,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl
                                                                           StreamMode::STD_WRITE );
                 if ( pStream && !pStream->GetError() )
                 {
-                    uno::Reference< io::XStream > xStream =
-                        uno::Reference < io::XStream >( new ::utl::OStreamWrapper( std::move(pStream) ) );
+                    uno::Reference< io::XStream > xStream( new ::utl::OStreamWrapper( std::move(pStream) ) );
                     xResult = new OFSStreamContainer(xStream);
                 }
             }
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index 00a8df04ed9d..0f27d4c65a05 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -2167,7 +2167,7 @@ void VCLXProgressBar::setBackgroundColor( sal_Int32 nColor )
     VclPtr<vcl::Window> pWindow = GetWindow();
     if ( pWindow )
     {
-        Color aColor = Color( nColor );
+        Color aColor( nColor );
         pWindow->SetBackground( aColor );
         pWindow->SetControlBackground( aColor );
         pWindow->Invalidate();
@@ -2255,7 +2255,7 @@ void VCLXProgressBar::setProperty( const OUString& PropertyName, const css::uno:
                     sal_Int32 nColor = 0;
                     if ( Value >>= nColor )
                     {
-                        Color aColor = Color( nColor );
+                        Color aColor( nColor );
                         pWindow->SetControlForeground( aColor );
                     }
                 }
diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
index 363287dabcf9..b3800b6dfef5 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx
@@ -864,7 +864,7 @@ public:
         rNodeStack.pop();
 
         // create combined ExpressionNode
-        std::shared_ptr<ExpressionNode> pNode = std::shared_ptr<ExpressionNode>( new BinaryFunctionExpression( meFunct, pFirstArg, pSecondArg ) );
+        std::shared_ptr<ExpressionNode> pNode( new BinaryFunctionExpression( meFunct, pFirstArg, pSecondArg ) );
         // check for constness
         if( pFirstArg->isConstant() && pSecondArg->isConstant() )   // call the operator() at pNode, store result in constant value ExpressionNode.
             rNodeStack.push( std::shared_ptr<ExpressionNode>( new ConstantValueExpression( (*pNode)() ) ) );
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx
index c49e81b8973f..8ca89e14aab7 100644
--- a/svx/source/form/fmpgeimp.cxx
+++ b/svx/source/form/fmpgeimp.cxx
@@ -161,7 +161,7 @@ void FmFormPageImpl::initFrom( FmFormPageImpl& i_foreignImpl )
         MapControlModels aModelAssignment;
 
         typedef TreeVisitor< FormComponentPair, FormHierarchyComparator, FormComponentAssignment >   FormComponentVisitor;
-        FormComponentVisitor aVisitor = FormComponentVisitor( FormHierarchyComparator() );
+        FormComponentVisitor aVisitor{ FormHierarchyComparator() };
 
         FormComponentAssignment aAssignmentProcessor( aModelAssignment );
         aVisitor.process( FormComponentPair( xForeignForms, m_xForms ), aAssignmentProcessor );
diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx
index cffccb570087..4d9a7baecebd 100644
--- a/svx/source/items/algitem.cxx
+++ b/svx/source/items/algitem.cxx
@@ -199,7 +199,7 @@ bool SvxMarginItem::GetPresentation
     OUString&           rText, const IntlWrapper& rIntl
 )   const
 {
-    OUString cpDelimTmp = OUString(cpDelim);
+    OUString cpDelimTmp(cpDelim);
 
     switch ( ePres )
     {
diff --git a/svx/source/items/pageitem.cxx b/svx/source/items/pageitem.cxx
index bbf80d45d5c0..d7b1b619b57f 100644
--- a/svx/source/items/pageitem.cxx
+++ b/svx/source/items/pageitem.cxx
@@ -104,7 +104,7 @@ bool SvxPageItem::GetPresentation
 )   const
 {
     rText.clear();
-    OUString cpDelimTmp = OUString(cpDelim);
+    OUString cpDelimTmp(cpDelim);
 
     switch ( ePres )
     {
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 9589035e3d30..c5d179d36e87 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -2079,8 +2079,8 @@ void SwDocTest::testTableCellComparison()
     CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellRanges("A2", "Z2", "A1", "Z1", true) );
     CPPUNIT_ASSERT_EQUAL( +1, sw_CompareCellRanges("A6", "Z2", "A1", "Z1", true) );
 
-    OUString rCell1 = OUString("A1");
-    OUString rCell2 = OUString("C5");
+    OUString rCell1("A1");
+    OUString rCell2("C5");
 
     sw_NormalizeRange(rCell1, rCell2);
     CPPUNIT_ASSERT_EQUAL( OUString("A1"), rCell1 );
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 5579c802833b..e08e29403d9d 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1052,7 +1052,7 @@ DECLARE_ODFEXPORT_TEST(testShapeRelsize, "shape-relsize.odt")
 DECLARE_ODFEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.odt")
 {
     uno::Reference<drawing::XShape> xShape = getShape(1);
-    comphelper::SequenceAsHashMap aCustomShapeGeometry = comphelper::SequenceAsHashMap(getProperty< uno::Sequence<beans::PropertyValue> >(xShape, "CustomShapeGeometry"));
+    comphelper::SequenceAsHashMap aCustomShapeGeometry(getProperty< uno::Sequence<beans::PropertyValue> >(xShape, "CustomShapeGeometry"));
 
     // Test that the shape is a rounded rectangle.
     CPPUNIT_ASSERT_EQUAL(OUString("round-rectangle"), aCustomShapeGeometry["Type"].get<OUString>());
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index 82139b936f16..734ada046e6a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -868,7 +868,7 @@ DECLARE_OOXMLEXPORT_TEST(testCommentInitials, "comment_initials.odt")
 DECLARE_OOXMLEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.docx")
 {
     uno::Reference<drawing::XShape> xShape = getShape(1);
-    comphelper::SequenceAsHashMap aCustomShapeGeometry = comphelper::SequenceAsHashMap(getProperty< uno::Sequence<beans::PropertyValue> >(xShape, "CustomShapeGeometry"));
+    comphelper::SequenceAsHashMap aCustomShapeGeometry(getProperty< uno::Sequence<beans::PropertyValue> >(xShape, "CustomShapeGeometry"));
 
     // Test that the shape is a rounded rectangle.
     CPPUNIT_ASSERT_EQUAL(OUString("ooxml-roundRect"), aCustomShapeGeometry["Type"].get<OUString>());
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 359144d5169e..53f09826a2c1 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -483,7 +483,7 @@ DECLARE_RTFEXPORT_TEST(testFdo61507, "fdo61507.rtf")
         mxComponent, uno::UNO_QUERY);
     uno::Reference<document::XDocumentProperties> xDocumentProperties(
         xDocumentPropertiesSupplier->getDocumentProperties());
-    OUString aExpected = OUString(u"\u00C9\u00C1\u0150\u0170\u222D");
+    OUString aExpected(u"\u00C9\u00C1\u0150\u0170\u222D");
     CPPUNIT_ASSERT_EQUAL(aExpected, xDocumentProperties->getTitle());
 
     // Only "Hello.", no additional characters.
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 693038a268dd..c63fc4064685 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -6855,11 +6855,11 @@ void SwUiWriterTest::testTdf108423()
     pWrtShell->AutoCorrect(corr, cChar);
     // The word "i" should be capitalized due to autocorrect, followed by a typographical apostrophe
     sal_uLong nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
-    OUString sIApostrophe = OUString(u"I" + OUStringLiteral1(0x2019));
+    OUString sIApostrophe(u"I" + OUStringLiteral1(0x2019));
     CPPUNIT_ASSERT_EQUAL(sIApostrophe, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
     pWrtShell->Insert(" i");
     pWrtShell->AutoCorrect(corr, cChar);
-    OUString sText = OUString(sIApostrophe + u" " + sIApostrophe);
+    OUString sText(sIApostrophe + u" " + sIApostrophe);
     CPPUNIT_ASSERT_EQUAL(sText, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
 }
 
diff --git a/sw/source/core/crsr/DropDownFormFieldButton.cxx b/sw/source/core/crsr/DropDownFormFieldButton.cxx
index bef4c873dace..49cebffed0fa 100644
--- a/sw/source/core/crsr/DropDownFormFieldButton.cxx
+++ b/sw/source/core/crsr/DropDownFormFieldButton.cxx
@@ -199,8 +199,7 @@ void DropDownFormFieldButton::Paint(vcl::RenderContext& rRenderContext, const to
 
     //const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
     Color aLineColor = COL_BLACK;
-    Color aFillColor
-        = Color(lcl_GetFillColor(aLineColor.getBColor(), (m_pFieldPopup ? 0.5 : 0.75)));
+    Color aFillColor(lcl_GetFillColor(aLineColor.getBColor(), (m_pFieldPopup ? 0.5 : 0.75)));
 
     // Draw the frame around the field
     // GTK3 backend cuts down the frame's top and left border, to avoid that add a padding around the frame
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index fbd57a8e1b75..a116479520c3 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1461,7 +1461,7 @@ void SwTOXBaseSection::UpdateContent( SwTOXElement eMyType,
 
                     if( rOLEObj.IsOleRef() )    // Not yet loaded
                     {
-                        SvGlobalName aTmpName = SvGlobalName( rOLEObj.GetOleRef()->getClassID() );
+                        SvGlobalName aTmpName( rOLEObj.GetOleRef()->getClassID() );
                         SwTOOElements nObj = ::lcl_IsSOObject( aTmpName );
                         bInclude = ( (nMyOLEOptions & SwTOOElements::Other) && SwTOOElements::NONE == nObj )
                                    || (nMyOLEOptions & nObj);
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 2827659def58..740b3cc1f99b 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -465,8 +465,8 @@ sal_uInt16 SwAutoFormat::CalcLevel(const SwTextFrame & rFrame,
         ++nLvl;
     }
 
-    for (TextFrameIndex n = TextFrameIndex(0),
-                     nEnd = TextFrameIndex(rText.getLength()); n < nEnd; ++n)
+    for (TextFrameIndex n(0),
+                     nEnd(rText.getLength()); n < nEnd; ++n)
     {
         switch (rText[sal_Int32(n)])
         {
@@ -514,8 +514,8 @@ bool SwAutoFormat::IsNoAlphaLine(const SwTextFrame & rFrame) const
     // or better: determine via number of AlphaNum and !AlphaNum characters
     sal_Int32 nANChar = 0, nBlnk = 0;
 
-    for (TextFrameIndex n = TextFrameIndex(0),
-                     nEnd = TextFrameIndex(rStr.getLength()); n < nEnd; ++n)
+    for (TextFrameIndex n(0),
+                     nEnd(rStr.getLength()); n < nEnd; ++n)
         if (IsSpace(rStr[sal_Int32(n)]))
             ++nBlnk;
         else
@@ -741,8 +741,8 @@ sal_Int32 SwAutoFormat::GetTrailingBlanks( const OUString& rStr )
 bool SwAutoFormat::IsFirstCharCapital(const SwTextFrame& rFrame) const
 {
     const OUString& rText = rFrame.GetText();
-    for (TextFrameIndex n = TextFrameIndex(0),
-                     nEnd = TextFrameIndex(rText.getLength()); n < nEnd; ++n)
+    for (TextFrameIndex n(0),
+                     nEnd(rText.getLength()); n < nEnd; ++n)
         if (!IsSpace(rText[sal_Int32(n)]))
         {
             auto const pair = rFrame.MapViewToModel(n);
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index 1546e71d6d61..6ad230c05075 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -1427,7 +1427,7 @@ void SwGetRefFieldType::MergeWithOtherDoc( SwDoc& rDestDoc )
 
         // then there are RefFields in the DescDox - so all RefFields in the SourceDoc
         // need to be converted to have unique IDs for both documents
-        RefIdsMap aFntMap = RefIdsMap(OUString());
+        RefIdsMap aFntMap { OUString() };
         std::vector<std::unique_ptr<RefIdsMap>> aFieldMap;
 
         SwIterator<SwFormatField,SwFieldType> aIter( *this );
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index e3bb28798d84..e47dc10c3a25 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -1161,7 +1161,7 @@ bool SwTextFrame::UnitDown_(SwPaM *pPam, const SwTwips nOffset,
 
     if ( !IsEmpty() && !IsHiddenNow() )
     {
-        TextFrameIndex nFormat = TextFrameIndex(COMPLETE_STRING);
+        TextFrameIndex nFormat(COMPLETE_STRING);
         do
         {
             if (nFormat != TextFrameIndex(COMPLETE_STRING) && !IsFollow() &&
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index 76fb43c1eb9e..d6fbbababd9e 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -185,7 +185,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf,
     }
 
     bool bHyph = rInf.IsHyphenate() && !rInf.IsHyphForbud();
-    TextFrameIndex nHyphPos = TextFrameIndex(0);
+    TextFrameIndex nHyphPos(0);
 
     // nCutPos is the first character not fitting to the current line
     // nHyphPos is the first character not fitting to the current line,
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 011490cc3568..312a7a7b38d2 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -946,7 +946,7 @@ void SwScriptInfo::InitScriptInfo(const SwTextNode& rNode,
         // all of the characters in this group are weak. We have to assign
         // the scripts to these characters depending on the fonts which are
         // set for these characters to display them.
-        TextFrameIndex nEnd = TextFrameIndex(
+        TextFrameIndex nEnd(
             g_pBreakIt->GetBreakIter()->endOfScript(rText, sal_Int32(nChg), WEAK));
 
         if (nEnd > TextFrameIndex(rText.getLength()) || nEnd < TextFrameIndex(0))
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 22a401be9514..875d3c1b90a0 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -307,14 +307,14 @@ SwDoubleLinePortion::SwDoubleLinePortion(
     SwFontScript nTmp = SW_SCRIPTS;
     if( pBracket->cPre > 255 )
     {
-        OUString aText = OUString(pBracket->cPre);
+        OUString aText(pBracket->cPre);
         nTmp = SwScriptInfo::WhichFont(0, aText);
     }
     pBracket->nPreScript = nTmp;
     nTmp = SW_SCRIPTS;
     if( pBracket->cPost > 255 )
     {
-        OUString aText = OUString(pBracket->cPost);
+        OUString aText(pBracket->cPost);
         nTmp = SwScriptInfo::WhichFont(0, aText);
     }
     pBracket->nPostScript = nTmp;
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index ed39672d4f5a..ed312422a361 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2197,7 +2197,7 @@ TextFrameIndex SwFntObj::GetCursorOfst(SwDrawTextInfo &rInf)
 
             const long nGridWidthAdd = EvalGridWidthAdd( pGrid, rInf );
 
-            for (TextFrameIndex j = TextFrameIndex(0); j < rInf.GetLen(); j++)
+            for (TextFrameIndex j(0); j < rInf.GetLen(); j++)
             {
                 long nScr = pKernArray[sal_Int32(j)] + (nSpaceAdd + nGridWidthAdd) * (sal_Int32(j) + 1);
                 if( nScr >= rInf.GetOfst())
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 8ebd982fd635..a168f47203e3 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -235,7 +235,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken )
             {
                 SwContentNode *pCNd =
                     m_xDoc->GetNodes()[pStartNdIdx->GetIndex()+1]->GetContentNode();
-                SwNodeIndex aTmpSwNodeIndex = SwNodeIndex(*pCNd);
+                SwNodeIndex aTmpSwNodeIndex(*pCNd);
                 SwPosition aNewPos( aTmpSwNodeIndex, SwIndex( pCNd, 0 ) );
                 SaveDocContext(xCntxt.get(), HtmlContextFlags::MultiColMask, &aNewPos);
                 aId.clear();
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 9d152e0d6bfa..0f304387ab58 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -1166,7 +1166,7 @@ bool SwFieldVarPage::FillItemSet(SfxItemSet* )
             else
             {
                 nSubType--;
-                OUString sSeparator = OUString(m_xSeparatorED->get_text()[0]);
+                OUString sSeparator(m_xSeparatorED->get_text()[0]);
                 cSeparator = !sSeparator.isEmpty() ? sSeparator[0] : ' ';
             }
             break;
diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx
index 0fed4ca41936..e1284240e4e0 100644
--- a/sw/source/ui/vba/vbalisthelper.cxx
+++ b/sw/source/ui/vba/vbalisthelper.cxx
@@ -379,7 +379,7 @@ void SwVbaListHelper::CreateOutlineNumberForType1()
 void SwVbaListHelper::CreateOutlineNumberForType2()
 {
     sal_Int16 nParentNumbering = 0;
-    OUString sSuffix = OUString( '.' );
+    OUString sSuffix( '.' );
     uno::Sequence< beans::PropertyValue > aPropertyValues;
 
     for( sal_Int32 nLevel = 0; nLevel < LIST_LEVEL_COUNT; nLevel++ )
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 55a61ac36307..4442f1714727 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -1155,7 +1155,7 @@ void VCLXWindow::setBackground( sal_Int32 nColor )
 
     if ( GetWindow() )
     {
-        Color aColor = Color(nColor);
+        Color aColor(nColor);
         GetWindow()->SetBackground( aColor );
         GetWindow()->SetControlBackground( aColor );
 
@@ -1631,7 +1631,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
                 sal_Int32 nColor = 0;
                 if ( Value >>= nColor )
                 {
-                    Color aColor = Color( nColor );
+                    Color aColor( nColor );
                     pWindow->SetControlBackground( aColor );
                     pWindow->SetBackground( aColor );
                     switch ( eWinType )
@@ -1661,7 +1661,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
                 sal_Int32 nColor = 0;
                 if ( Value >>= nColor )
                 {
-                    Color aColor = Color( nColor );
+                    Color aColor( nColor );
                     pWindow->SetTextColor( aColor );
                     pWindow->SetControlForeground( aColor );
                 }
@@ -1677,7 +1677,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
                 sal_Int32 nColor = 0;
                 if ( Value >>= nColor )
                 {
-                    Color aColor = Color( nColor );
+                    Color aColor( nColor );
                     pWindow->SetTextLineColor( aColor );
                 }
             }
@@ -1690,7 +1690,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
                 sal_Int32 nColor = 0;
                 if ( Value >>= nColor )
                 {
-                    Color aColor = Color( nColor );
+                    Color aColor( nColor );
                     pWindow->SetFillColor( aColor );
                 }
             }
@@ -1703,7 +1703,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
                 sal_Int32 nColor = 0;
                 if ( Value >>= nColor )
                 {
-                    Color aColor = Color( nColor );
+                    Color aColor( nColor );
                     pWindow->SetLineColor( aColor );
                 }
             }
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index b25cdce8acba..e13b535ea4d0 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -123,7 +123,7 @@ namespace toolkit
             // for the real background (everything except the buttons and the thumb),
             // use an average between the desired color and "white"
             Color aWhite( COL_WHITE );
-            Color aBackground = Color( nBackgroundColor );
+            Color aBackground( nBackgroundColor );
             aBackground.SetRed( ( aBackground.GetRed() + aWhite.GetRed() ) / 2 );
             aBackground.SetGreen( ( aBackground.GetGreen() + aWhite.GetGreen() ) / 2 );
             aBackground.SetBlue( ( aBackground.GetBlue() + aWhite.GetBlue() ) / 2 );
@@ -132,19 +132,19 @@ namespace toolkit
             sal_Int32 nBackgroundLuminance = Color( nBackgroundColor ).GetLuminance();
             sal_Int32 nWhiteLuminance = COL_WHITE.GetLuminance();
 
-            Color aLightShadow = Color( nBackgroundColor );
+            Color aLightShadow( nBackgroundColor );
             aLightShadow.IncreaseLuminance( static_cast<sal_uInt8>( ( nWhiteLuminance - nBackgroundLuminance ) * 2 / 3 ) );
             aStyleSettings.SetLightBorderColor( aLightShadow );
 
-            Color aLight = Color( nBackgroundColor );
+            Color aLight( nBackgroundColor );
             aLight.IncreaseLuminance( static_cast<sal_uInt8>( ( nWhiteLuminance - nBackgroundLuminance ) * 1 / 3 ) );
             aStyleSettings.SetLightColor( aLight );
 
-            Color aShadow = Color( nBackgroundColor );
+            Color aShadow( nBackgroundColor );
             aShadow.DecreaseLuminance( static_cast<sal_uInt8>( nBackgroundLuminance * 1 / 3 ) );
             aStyleSettings.SetShadowColor( aShadow );
 
-            Color aDarkShadow = Color( nBackgroundColor );
+            Color aDarkShadow( nBackgroundColor );
             aDarkShadow.DecreaseLuminance( static_cast<sal_uInt8>( nBackgroundLuminance * 2 / 3 ) );
             aStyleSettings.SetDarkShadowColor( aDarkShadow );
         }
diff --git a/toolkit/source/helper/accessibilityclient.cxx b/toolkit/source/helper/accessibilityclient.cxx
index b9dff4bfee53..fbd29c4efa4f 100644
--- a/toolkit/source/helper/accessibilityclient.cxx
+++ b/toolkit/source/helper/accessibilityclient.cxx
@@ -172,8 +172,7 @@ namespace toolkit
             s_hAccessibleImplementationModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0 );
             if ( s_hAccessibleImplementationModule != nullptr )
             {
-                const OUString sFactoryCreationFunc =
-                    OUString("getStandardAccessibleFactory");
+                const OUString sFactoryCreationFunc("getStandardAccessibleFactory");
                 s_pAccessibleFactoryFunc = reinterpret_cast<GetStandardAccComponentFactory>(
                     osl_getFunctionSymbol( s_hAccessibleImplementationModule, sFactoryCreationFunc.pData ));
 
diff --git a/tools/source/xml/XmlWalker.cxx b/tools/source/xml/XmlWalker.cxx
index ca5c2c96eb2b..736cd07edeba 100644
--- a/tools/source/xml/XmlWalker.cxx
+++ b/tools/source/xml/XmlWalker.cxx
@@ -93,7 +93,7 @@ OString XmlWalker::attribute(const OString& sName)
 {
     xmlChar* xmlName = xmlCharStrdup(sName.getStr());
     xmlChar* xmlAttribute = xmlGetProp(mpImpl->mpCurrent, xmlName);
-    OString aAttributeContent = OString(reinterpret_cast<const char*>(xmlAttribute));
+    OString aAttributeContent(reinterpret_cast<const char*>(xmlAttribute));
     xmlFree(xmlAttribute);
     xmlFree(xmlName);
 
diff --git a/writerfilter/source/dmapper/LoggedResources.cxx b/writerfilter/source/dmapper/LoggedResources.cxx
index fa11d8430e12..e12aaae36fb3 100644
--- a/writerfilter/source/dmapper/LoggedResources.cxx
+++ b/writerfilter/source/dmapper/LoggedResources.cxx
@@ -185,10 +185,7 @@ void LoggedStream::utext(const sal_uInt8 * data, size_t len)
     mHelper.startElement("utext");
     mHelper.startElement("data");
 
-    OUString sText;
-    OUStringBuffer aBuffer = OUStringBuffer(sal::static_int_cast<int>(len));
-    aBuffer.append( reinterpret_cast<const sal_Unicode *>(data), len);
-    sText = aBuffer.makeStringAndClear();
+    OUString sText( reinterpret_cast<const sal_Unicode *>(data), len);
 
     LoggedResourcesHelper::chars(sText);
 
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 325e06feac8c..32be860859c0 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -773,8 +773,7 @@ TVChildTarget::getHierAccess( const Reference< XMultiServiceFactory >& sProvider
     if( sProvider.is() )
     {
         Sequence< Any > seq(1);
-        OUString sReaderService =
-            OUString( "com.sun.star.configuration.ConfigurationAccess" );
+        OUString sReaderService( "com.sun.star.configuration.ConfigurationAccess" );
 
         seq[0] <<= OUString::createFromAscii( file );
 
diff --git a/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx
index a1d4200214e5..4b14a35e0251 100644
--- a/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/sanextension_nssimpl.cxx
@@ -138,7 +138,7 @@ css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl:
                     m_Entries[i].Type = ExtAltNameType_REGISTERED_ID;
 
 
-                    OString nssOid = OString(CERT_GetOidString(&current->name.other));
+                    OString nssOid(CERT_GetOidString(&current->name.other));
                     OString unoOid = removeOIDFromString(nssOid);
                     m_Entries[i].Value <<= OStringToOUString( unoOid, RTL_TEXTENCODING_ASCII_US );
                     break;


More information about the Libreoffice-commits mailing list