From 88987316ed0536de6c2c1e407fea4ecf77b5d5fc Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 23 Dec 2023 19:04:41 +0000 Subject: cid#1545470 COPY_INSTEAD_OF_MOVE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and cid#1545468 COPY_INSTEAD_OF_MOVE cid#1545446 COPY_INSTEAD_OF_MOVE cid#1545435 COPY_INSTEAD_OF_MOVE cid#1545419 COPY_INSTEAD_OF_MOVE cid#1545415 COPY_INSTEAD_OF_MOVE cid#1545410 COPY_INSTEAD_OF_MOVE cid#1545390 COPY_INSTEAD_OF_MOVE cid#1545384 COPY_INSTEAD_OF_MOVE cid#1545374 COPY_INSTEAD_OF_MOVE cid#1545371 COPY_INSTEAD_OF_MOVE cid#1545368 COPY_INSTEAD_OF_MOVE cid#1545366 COPY_INSTEAD_OF_MOVE cid#1545335 COPY_INSTEAD_OF_MOVE cid#1545331 COPY_INSTEAD_OF_MOVE cid#1545327 COPY_INSTEAD_OF_MOVE cid#1545308 COPY_INSTEAD_OF_MOVE cid#1545280 COPY_INSTEAD_OF_MOVE cid#1545199 COPY_INSTEAD_OF_MOVE Change-Id: If05a13125b05ccd93d34d0eced566e7b3b58aaef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161256 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- connectivity/source/inc/dbase/dindexnode.hxx | 6 +++--- cui/source/customize/CustomNotebookbarGenerator.cxx | 8 ++++---- cui/source/inc/CustomNotebookbarGenerator.hxx | 4 ++-- dbaccess/source/ui/querydesign/QueryDesignView.cxx | 3 +-- editeng/source/uno/unonrule.cxx | 19 +++++++------------ filter/source/graphicfilter/icgm/actimpr.cxx | 3 +-- include/vbahelper/vbacollectionimpl.hxx | 3 +-- sc/source/filter/xml/XMLTableShapeResizer.cxx | 2 +- sc/source/ui/docshell/docsh4.cxx | 2 +- sc/source/ui/unoobj/PivotTableDataProvider.cxx | 2 +- sfx2/source/view/viewsh.cxx | 8 ++++---- .../engine/animationnodes/paralleltimecontainer.cxx | 2 +- stoc/source/inspect/introspection.cxx | 4 ++-- svgio/source/svgreader/svgmasknode.cxx | 12 ++++++------ svl/source/fsstor/fsstorage.cxx | 3 +-- svtools/source/uno/wizard/wizardshell.cxx | 5 ++--- sw/source/uibase/shells/basesh.cxx | 6 +++--- sw/source/uibase/shells/txtnum.cxx | 12 ++++++------ toolkit/source/controls/unocontrols.cxx | 5 ++--- vcl/inc/jsdialog/jsdialogbuilder.hxx | 2 +- vcl/jsdialog/jsdialogbuilder.cxx | 3 ++- 21 files changed, 52 insertions(+), 62 deletions(-) diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx index 8369a15dfab5..c1db23f76b60 100644 --- a/connectivity/source/inc/dbase/dindexnode.hxx +++ b/connectivity/source/inc/dbase/dindexnode.hxx @@ -246,7 +246,7 @@ namespace connectivity::dbase ONDXKey& GetKey() { return aKey;} // Setting the child, via reference to retain the PagePos - void SetChild(ONDXPagePtr aCh = ONDXPagePtr(), ONDXPage* = nullptr); + void SetChild(const ONDXPagePtr& rCh = ONDXPagePtr(), ONDXPage* = nullptr); void Write(SvStream &rStream, const ONDXPage& rPage) const; void Read(SvStream &rStream, ODbaseIndex const &); @@ -293,9 +293,9 @@ namespace connectivity::dbase return !operator > (rKey); } - inline void ONDXNode::SetChild(ONDXPagePtr aCh, ONDXPage* pParent) + inline void ONDXNode::SetChild(const ONDXPagePtr& rCh, ONDXPage* pParent) { - aChild = aCh; + aChild = rCh; if (aChild.Is()) aChild->SetParent(pParent); } diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx b/cui/source/customize/CustomNotebookbarGenerator.cxx index ba5d881822fd..1d013654d8f7 100644 --- a/cui/source/customize/CustomNotebookbarGenerator.cxx +++ b/cui/source/customize/CustomNotebookbarGenerator.cxx @@ -265,16 +265,16 @@ Sequence CustomNotebookbarGenerator::getCustomizedUIItem(OUString sNot return aValues; } -void CustomNotebookbarGenerator::setCustomizedUIItem(Sequence sUIItemProperties, - OUString sNotebookbarConfigType) +void CustomNotebookbarGenerator::setCustomizedUIItem(const Sequence& rUIItemProperties, + const OUString& rNotebookbarConfigType) { OUString aPath = getAppNameRegistryPath(); const utl::OConfigurationTreeRoot aAppNode(::comphelper::getProcessComponentContext(), aPath, true); const utl::OConfigurationNode aModesNode = aAppNode.openNode("Modes"); - const utl::OConfigurationNode aModeNode(aModesNode.openNode(sNotebookbarConfigType)); + const utl::OConfigurationNode aModeNode(aModesNode.openNode(rNotebookbarConfigType)); - css::uno::Any aUIItemProperties(sUIItemProperties); + css::uno::Any aUIItemProperties(rUIItemProperties); aModeNode.setNodeValue("UIItemProperties", aUIItemProperties); aAppNode.commit(); } diff --git a/cui/source/inc/CustomNotebookbarGenerator.hxx b/cui/source/inc/CustomNotebookbarGenerator.hxx index b06848dbb955..a7149879aef0 100644 --- a/cui/source/inc/CustomNotebookbarGenerator.hxx +++ b/cui/source/inc/CustomNotebookbarGenerator.hxx @@ -35,8 +35,8 @@ public: static void getFileNameAndAppName(OUString& sAppName, OUString& sNotebookbarUIFileName); static void modifyCustomizedUIFile(const Sequence& sUIItemProperties); static void createCustomizedUIFile(); - static void setCustomizedUIItem(Sequence sUIItemProperties, - OUString sNotebookbarConfigType); + static void setCustomizedUIItem(const Sequence& rUIItemProperties, + const OUString& rNotebookbarConfigType); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 35474da27b76..0393dd28484e 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -656,8 +656,7 @@ namespace if ( field->isAggregateFunction() ) { OSL_ENSURE(!field->GetFunction().isEmpty(),"Function name must not be empty! ;-("); - OUStringBuffer aTmpStr2( field->GetFunction() + "(" + aTmpStr + ")"); - aTmpStr = aTmpStr2; + aTmpStr = field->GetFunction() + "(" + aTmpStr + ")"; } if (!rFieldAlias.isEmpty() && diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx index 5083f4d8e846..8a5518567053 100644 --- a/editeng/source/uno/unonrule.cxx +++ b/editeng/source/uno/unonrule.cxx @@ -180,26 +180,23 @@ Sequence SvxUnoNumberingRules::getNumberingRuleByIndex(sal Any aVal; { aVal <<= static_cast(rFmt.GetNumberingType()); - beans::PropertyValue aAlignProp( UNO_NAME_NRULE_NUMBERINGTYPE, -1, aVal, beans::PropertyState_DIRECT_VALUE); - pArray[nIdx++] = aAlignProp; + pArray[nIdx++] = beans::PropertyValue(UNO_NAME_NRULE_NUMBERINGTYPE, -1, aVal, beans::PropertyState_DIRECT_VALUE); } { SvxAdjust eAdj = rFmt.GetNumAdjust(); aVal <<= ConvertUnoAdjust(eAdj); - pArray[nIdx++] = beans::PropertyValue( UNO_NAME_NRULE_ADJUST, -1, aVal, beans::PropertyState_DIRECT_VALUE); + pArray[nIdx++] = beans::PropertyValue(UNO_NAME_NRULE_ADJUST, -1, aVal, beans::PropertyState_DIRECT_VALUE); } { aVal <<= rFmt.GetPrefix(); - beans::PropertyValue aPrefixProp( UNO_NAME_NRULE_PREFIX, -1, aVal, beans::PropertyState_DIRECT_VALUE); - pArray[nIdx++] = aPrefixProp; + pArray[nIdx++] = beans::PropertyValue(UNO_NAME_NRULE_PREFIX, -1, aVal, beans::PropertyState_DIRECT_VALUE); } { aVal <<= rFmt.GetSuffix(); - beans::PropertyValue aSuffixProp( UNO_NAME_NRULE_SUFFIX, -1, aVal, beans::PropertyState_DIRECT_VALUE); - pArray[nIdx++] = aSuffixProp; + pArray[nIdx++] = beans::PropertyValue(UNO_NAME_NRULE_SUFFIX, -1, aVal, beans::PropertyState_DIRECT_VALUE); } if(SVX_NUM_CHAR_SPECIAL == rFmt.GetNumberingType()) @@ -215,7 +212,7 @@ Sequence SvxUnoNumberingRules::getNumberingRuleByIndex(sal awt::FontDescriptor aDesc; SvxUnoFontDescriptor::ConvertFromFont( *rFmt.GetBulletFont(), aDesc ); aVal <<= aDesc; - pArray[nIdx++] = beans::PropertyValue( UNO_NAME_NRULE_BULLET_FONT, -1, aVal, beans::PropertyState_DIRECT_VALUE); + pArray[nIdx++] = beans::PropertyValue(UNO_NAME_NRULE_BULLET_FONT, -1, aVal, beans::PropertyState_DIRECT_VALUE); } { @@ -228,8 +225,7 @@ Sequence SvxUnoNumberingRules::getNumberingRuleByIndex(sal uno::Reference xBitmap(pGraphic->GetXGraphic(), uno::UNO_QUERY); aVal <<= xBitmap; - const beans::PropertyValue aGraphicProp("GraphicBitmap", -1, aVal, beans::PropertyState_DIRECT_VALUE); - pArray[nIdx++] = aGraphicProp; + pArray[nIdx++] = beans::PropertyValue("GraphicBitmap", -1, aVal, beans::PropertyState_DIRECT_VALUE); } } @@ -237,8 +233,7 @@ Sequence SvxUnoNumberingRules::getNumberingRuleByIndex(sal const Size aSize( rFmt.GetGraphicSize() ); const awt::Size aUnoSize( aSize.Width(), aSize.Height() ); aVal <<= aUnoSize; - const beans::PropertyValue aGraphicSizeProp("GraphicSize", -1, aVal, beans::PropertyState_DIRECT_VALUE ); - pArray[nIdx++] = aGraphicSizeProp; + pArray[nIdx++] = beans::PropertyValue("GraphicSize", -1, aVal, beans::PropertyState_DIRECT_VALUE); } aVal <<= static_cast(rFmt.GetStart()); diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index c77b55184c5a..f01f53b53d9f 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -387,8 +387,7 @@ void CGMImpressOutAct::InsertPage() { if ( mnCurrentPage ) // one side is always existing, therefore the first side will be left out { - uno::Reference< drawing::XDrawPage > xPage = maXDrawPages->insertNewByIndex( 0xffff ); - maXDrawPage = xPage; + maXDrawPage = maXDrawPages->insertNewByIndex(0xffff); if ( !ImplInitPage() ) mpCGM->mbStatus = false; if (mnCurrentPage > MAX_PAGES_FOR_FUZZING && utl::ConfigManager::IsFuzzing()) diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx index 2e5184721a83..9afcf08a3aa5 100644 --- a/include/vbahelper/vbacollectionimpl.hxx +++ b/include/vbahelper/vbacollectionimpl.hxx @@ -278,9 +278,8 @@ protected: void UpdateCollectionIndex( const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) { - css::uno::Reference< css::container::XNameAccess > xNameAccess( xIndexAccess, css::uno::UNO_QUERY_THROW ); + m_xNameAccess.set(xIndexAccess, css::uno::UNO_QUERY_THROW); m_xIndexAccess = xIndexAccess; - m_xNameAccess = xNameAccess; } public: diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx index 4ce1e6a0226e..39024952f5fd 100644 --- a/sc/source/filter/xml/XMLTableShapeResizer.cxx +++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx @@ -83,7 +83,7 @@ void ScMyOLEFixer::CreateChartListener(ScDocument& rDoc, return; OUString sName = !rName.isEmpty() ? rName : pCollection->getUniqueName(u"OLEFixer "); - ScChartListener* pCL(new ScChartListener(sName, rDoc, std::move(aRefTokens))); + ScChartListener* pCL(new ScChartListener(std::move(sName), rDoc, std::move(aRefTokens))); //for loading binary files e.g. //if we have the flat filter we need to set the dirty flag thus the visible charts get repainted diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index e86ec2f13577..08a37c9e1b62 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -2021,7 +2021,7 @@ void ScDocShell::ExecutePageStyle( const SfxViewShell& rCaller, nResId)); auto xRequest = std::make_shared(rReq); rReq.Ignore(); // the 'old' request is not relevant any more - pDlg->StartExecuteAsync([this, pDlg, pStyleSheet, xRequest](sal_Int32 nResult){ + pDlg->StartExecuteAsync([this, pDlg, pStyleSheet, xRequest=std::move(xRequest)](sal_Int32 nResult){ if ( nResult == RET_OK ) { const SfxItemSet* pOutSet = pDlg->GetOutputItemSet(); diff --git a/sc/source/ui/unoobj/PivotTableDataProvider.cxx b/sc/source/ui/unoobj/PivotTableDataProvider.cxx index e3c800128b0b..71be4e4d43ce 100644 --- a/sc/source/ui/unoobj/PivotTableDataProvider.cxx +++ b/sc/source/ui/unoobj/PivotTableDataProvider.cxx @@ -624,7 +624,7 @@ PivotTableDataProvider::assignLabelsToDataSequence(size_t nIndex) std::vector aLabelVector { ValueAndFormat(aLabel.makeStringAndClear()) }; rtl::Reference pSequence(new PivotTableDataSequence(m_pDocument, - sLabelID, std::move(aLabelVector))); + std::move(sLabelID), std::move(aLabelVector))); pSequence->setRole("values-y"); xDataSequence = pSequence; return xDataSequence; diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 93c18a16e2e2..4e6c653d52ac 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -828,9 +828,9 @@ private: void paragraphPropertiesToTree(boost::property_tree::ptree& aPayloadTree, bool force = false) const; void paragraphPropertiesToJson(std::string& aPayload, bool force = false) const; bool updateParagraphInfo(const uno::Reference& xAccText, - bool force, std::string msg = ""); + bool force, const std::string& msg = ""); void updateAndNotifyParagraph(const uno::Reference& xAccText, - bool force, std::string msg = ""); + bool force, const std::string& msg = ""); void resetParagraphInfo(); void onFocusedParagraphInWriterTable(const uno::Reference& xTable, sal_Int64& nChildIndex, @@ -1163,7 +1163,7 @@ void LOKDocumentFocusListener::disposing( const lang::EventObject& aEvent ) } bool LOKDocumentFocusListener::updateParagraphInfo(const uno::Reference& xAccText, - bool force, std::string msg) + bool force, const std::string& msg) { if (!xAccText.is()) return false; @@ -1218,7 +1218,7 @@ bool LOKDocumentFocusListener::updateParagraphInfo(const uno::Reference& xAccText, - bool force, std::string msg) + bool force, const std::string& msg) { if (updateParagraphInfo(xAccText, force, msg)) notifyFocusedParagraphChanged(force); diff --git a/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx b/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx index f4c0637163e2..43d3f16d1fb3 100644 --- a/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx +++ b/slideshow/source/engine/animationnodes/paralleltimecontainer.cxx @@ -39,7 +39,7 @@ void ParallelTimeContainer::activate_st() // deactivate ASAP: auto self(getSelf()); scheduleDeactivationEvent( - makeEvent( [self] () { self->deactivate(); }, + makeEvent( [self=std::move(self)] () { self->deactivate(); }, "ParallelTimeContainer::deactivate") ); } else { // use default diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index 08bd1485deba..da208ae3253d 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -2298,8 +2298,8 @@ css::uno::Reference Implementation::inspect( //aMethName = rxMethod->getName(); //aListenerName = aMethName.Copy( 3, aMethName.Len()-8-3 ); //Reference xListenerClass = reflection->forName( aListenerName ); - Type aListenerType( TypeClass_INTERFACE, xListenerClass->getName() ); - pAccess->maSupportedListenerSeq[ iAllSupportedListener ] = aListenerType; + pAccess->maSupportedListenerSeq[ iAllSupportedListener ] = + Type(TypeClass_INTERFACE, xListenerClass->getName()); iAllSupportedListener++; } } diff --git a/svgio/source/svgreader/svgmasknode.cxx b/svgio/source/svgreader/svgmasknode.cxx index 2f827aaee12d..d4942bc0b192 100644 --- a/svgio/source/svgreader/svgmasknode.cxx +++ b/svgio/source/svgreader/svgmasknode.cxx @@ -256,12 +256,12 @@ namespace svgio::svgreader // #i124852# if(pTransform) { - drawinglayer::primitive2d::Primitive2DReference xTransform( - new drawinglayer::primitive2d::TransformPrimitive2D( - *pTransform, - std::move(aMaskTarget))); - - aMaskTarget = drawinglayer::primitive2d::Primitive2DContainer { xTransform }; + aMaskTarget = drawinglayer::primitive2d::Primitive2DContainer { + drawinglayer::primitive2d::Primitive2DReference( + new drawinglayer::primitive2d::TransformPrimitive2D( + *pTransform, + std::move(aMaskTarget))) + }; } } diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index 501dd0fd7dd5..e2af002f150d 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -802,9 +802,8 @@ uno::Sequence< OUString > SAL_CALL FSStorage::getElementNames() // go through the list while ( xResultSet->next() ) { - OUString aName( xRow->getString( 1 ) ); aResult.realloc( ++nSize ); - aResult.getArray()[nSize-1] = aName; + aResult.getArray()[nSize-1] = xRow->getString(1); } } } diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index d9cbca5874dd..9a6870b2cdfe 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -201,9 +201,8 @@ namespace svt::uno weld::Container* pPageContainer = m_xAssistant->append_page(sIdent); auto xPage = std::make_unique(pPageContainer, this); - auto pController = std::make_shared(xPage->GetContainer(), m_xController, nPageId); - - m_aPageControllers[xPage.get()] = pController; + m_aPageControllers[xPage.get()] = + std::make_shared(xPage->GetContainer(), m_xController, nPageId); return xPage; } diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 39b7fb3c7227..c96945ccdf30 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -2971,16 +2971,16 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq) auto const& pTheme = pModel->getTheme(); if (pTheme) { - std::shared_ptr pChanger(new sw::ThemeColorChanger(pDocumentShell)); + std::shared_ptr xChanger(new sw::ThemeColorChanger(pDocumentShell)); auto pDialog = std::make_shared(pMDI, pTheme.get()); - weld::DialogController::runAsync(pDialog, [pDialog, pChanger](sal_uInt32 nResult) { + weld::DialogController::runAsync(pDialog, [pDialog, xChanger=std::move(xChanger)](sal_uInt32 nResult) { if (RET_OK != nResult) return; auto pColorSet = pDialog->getCurrentColorSet(); if (pColorSet) { - pChanger->apply(pColorSet); + xChanger->apply(pColorSet); if (comphelper::LibreOfficeKit::isActive()) { svx::ThemeColorPaletteManager aManager(pColorSet); diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx index e769b7f46347..2c25e966c300 100644 --- a/sw/source/uibase/shells/txtnum.cxx +++ b/sw/source/uibase/shells/txtnum.cxx @@ -197,17 +197,17 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) if ( pPageItem ) pDlg->SetCurPageId( pPageItem->GetValue() ); - auto pRequest = std::make_shared(rReq); + auto xRequest = std::make_shared(rReq); rReq.Ignore(); // the 'old' request is not relevant any more - pDlg->StartExecuteAsync([pDlg, pNumRuleAtCurrentSelection, pRequest, this](sal_Int32 nResult){ + pDlg->StartExecuteAsync([pDlg, pNumRuleAtCurrentSelection, xRequest=std::move(xRequest), this](sal_Int32 nResult){ if (RET_OK == nResult) { const SvxNumBulletItem* pBulletItem = pDlg->GetOutputItemSet()->GetItemIfSet(SID_ATTR_NUMBERING_RULE, false); if (pBulletItem) { - pRequest->AppendItem(*pBulletItem); - pRequest->Done(); + xRequest->AppendItem(*pBulletItem); + xRequest->Done(); SvxNumRule& rSetRule = const_cast(pBulletItem->GetNumRule()); rSetRule.UnLinkGraphics(); SwNumRule aSetRule(pNumRuleAtCurrentSelection != nullptr @@ -226,8 +226,8 @@ void SwTextShell::ExecEnterNum(SfxRequest &rReq) else if (pNumRuleAtCurrentSelection == nullptr && (pBulletItem = pDlg->GetInputItemSet()->GetItemIfSet(SID_ATTR_NUMBERING_RULE, false))) { - pRequest->AppendItem(*pBulletItem); - pRequest->Done(); + xRequest->AppendItem(*pBulletItem); + xRequest->Done(); const SvxNumRule& rSetRule = pBulletItem->GetNumRule(); SwNumRule aSetRule( GetShell().GetUniqueNumRuleName(), diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index d9bc55f8cb45..2b0ac450293c 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -4408,9 +4408,8 @@ void UnoPatternFieldControl::ImplSetPeerProperty( const OUString& rPropName, con if (xPF.is()) { // same comment as in UnoControl::ImplSetPeerProperty - see there - OUString sText( Text ); - ImplCheckLocalize( sText ); - xPF->setString( sText ); + ImplCheckLocalize( Text ); + xPF->setString( Text ); xPF->setMasks( EditMask, LiteralMask ); } } diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index d407443d0700..461926c460d1 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -121,7 +121,7 @@ public: void clearQueue(); void forceUpdate(); - void sendMessage(jsdialog::MessageType eType, VclPtr pWindow, + void sendMessage(jsdialog::MessageType eType, const VclPtr& pWindow, std::unique_ptr pData = nullptr); private: diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 97e7a400dfa6..a65e66f96cea 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -109,7 +109,8 @@ void JSDialogNotifyIdle::send(tools::JsonWriter& aJsonWriter) } } -void JSDialogNotifyIdle::sendMessage(jsdialog::MessageType eType, VclPtr pWindow, +void JSDialogNotifyIdle::sendMessage(jsdialog::MessageType eType, + const VclPtr& pWindow, std::unique_ptr pData) { std::scoped_lock aGuard(m_aQueueMutex); -- cgit