dbaccess/source/ui/browser/brwctrlr.cxx | 3 +-- include/vcl/toolkit/treelistbox.hxx | 1 + lingucomponent/source/spellcheck/spell/sspellimp.cxx | 3 +-- sfx2/source/view/viewsh.cxx | 4 ++-- slideshow/source/engine/slideoverlaybutton.cxx | 12 +++++++----- slideshow/source/engine/slideoverlaybutton.hxx | 3 ++- sw/source/core/crsr/crstrvl.cxx | 4 ++-- sw/source/ui/vba/vbabookmarks.cxx | 3 +-- toolkit/source/awt/vclxwindow.cxx | 8 ++++---- vcl/inc/salvtables.hxx | 3 +-- vcl/inc/treeglue.hxx | 12 ++++++------ vcl/source/app/salvtables.cxx | 2 +- 12 files changed, 29 insertions(+), 29 deletions(-)
New commits: commit 5096d072becf9565b0edec66a872bdb74da1d10a Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sat Dec 30 15:25:34 2023 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Sat Dec 30 19:58:54 2023 +0100 cid#1545965 COPY_INSTEAD_OF_MOVE and cid#1545849 COPY_INSTEAD_OF_MOVE cid#1545814 COPY_INSTEAD_OF_MOVE cid#1545685 COPY_INSTEAD_OF_MOVE cid#1545583 COPY_INSTEAD_OF_MOVE cid#1545575 COPY_INSTEAD_OF_MOVE cid#1545517 COPY_INSTEAD_OF_MOVE cid#1545474 COPY_INSTEAD_OF_MOVE Change-Id: I79a47ee34dace3a4664bfece26c59e719f469cab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161448 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index ef78325898b9..8a316b331d1e 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1257,7 +1257,6 @@ sal_Bool SbaXDataBrowserController::approveParameter(const css::form::DatabasePa return true; } - Reference< css::container::XIndexAccess > xParameters = aEvent.Parameters; SolarMutexGuard aSolarGuard; // default handling: instantiate an interaction handler and let it handle the parameter request @@ -1268,7 +1267,7 @@ sal_Bool SbaXDataBrowserController::approveParameter(const css::form::DatabasePa rtl::Reference<OInteractionAbort> pAbort = new OInteractionAbort; // the request ParametersRequest aRequest; - aRequest.Parameters = xParameters; + aRequest.Parameters = aEvent.Parameters; aRequest.Connection = getConnection(Reference< XRowSet >(aEvent.Source, UNO_QUERY)); rtl::Reference<OInteractionRequest> pParamRequest = new OInteractionRequest(Any(aRequest)); // some knittings diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx index ecbd489fd853..4e3b4c991f2a 100644 --- a/include/vcl/toolkit/treelistbox.hxx +++ b/include/vcl/toolkit/treelistbox.hxx @@ -171,6 +171,7 @@ struct SvTreeListBoxImpl; typedef std::pair<vcl::RenderContext&, const SvTreeListEntry&> svtree_measure_args; typedef std::tuple<vcl::RenderContext&, const tools::Rectangle&, const SvTreeListEntry&> svtree_render_args; +typedef std::pair<SvTreeListEntry*, OUString> IterString; class VCL_DLLPUBLIC SvTreeListBox :public Control diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index 193ddb2c32cb..6f30702fce7d 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -479,8 +479,7 @@ Reference< XSpellAlternatives > OUString *pStr = aStr.getArray(); for (size_t ii = 0; ii < suglst.size(); ++ii) { - OUString cvtwrd(suglst[ii].c_str(), suglst[ii].size(), eEnc); - pStr[numsug + ii] = cvtwrd; + pStr[numsug + ii] = OUString(suglst[ii].c_str(), suglst[ii].size(), eEnc); } numsug += suglst.size(); } diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 4e6c653d52ac..ed7f52331269 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -688,7 +688,7 @@ void aboutTextFormatting(std::string msg, const uno::Reference<css::accessibilit } } -void aboutParagraph(std::string msg, const OUString& rsParagraphContent, sal_Int32 nCaretPosition, +void aboutParagraph(const std::string& msg, const OUString& rsParagraphContent, sal_Int32 nCaretPosition, sal_Int32 nSelectionStart, sal_Int32 nSelectionEnd, sal_Int32 nListPrefixLength, bool force = false) { @@ -701,7 +701,7 @@ void aboutParagraph(std::string msg, const OUString& rsParagraphContent, sal_Int ); } -void aboutParagraph(std::string msg, const uno::Reference<css::accessibility::XAccessibleText>& xAccText, +void aboutParagraph(const std::string& msg, const uno::Reference<css::accessibility::XAccessibleText>& xAccText, bool force = false) { if (!xAccText.is()) diff --git a/slideshow/source/engine/slideoverlaybutton.cxx b/slideshow/source/engine/slideoverlaybutton.cxx index 7dfc2d1af305..14b78337e489 100644 --- a/slideshow/source/engine/slideoverlaybutton.cxx +++ b/slideshow/source/engine/slideoverlaybutton.cxx @@ -36,13 +36,15 @@ namespace slideshow::internal { -SlideOverlayButtonSharedPtr SlideOverlayButton::create( - const css::uno::Reference<css::rendering::XBitmap>& xIconBitmap, css::awt::Point pPosition, - std::function<void(basegfx::B2DPoint)> clickHandler, ScreenUpdater& rScreenUpdater, - EventMultiplexer& rEventMultiplexer, const UnoViewContainer& rViewContainer) +SlideOverlayButtonSharedPtr +SlideOverlayButton::create(const css::uno::Reference<css::rendering::XBitmap>& xIconBitmap, + const css::awt::Point& rPosition, + const std::function<void(basegfx::B2DPoint)>& clickHandler, + ScreenUpdater& rScreenUpdater, EventMultiplexer& rEventMultiplexer, + const UnoViewContainer& rViewContainer) { SlideOverlayButtonSharedPtr pRet(new SlideOverlayButton( - xIconBitmap, pPosition, clickHandler, rScreenUpdater, rEventMultiplexer, rViewContainer)); + xIconBitmap, rPosition, clickHandler, rScreenUpdater, rEventMultiplexer, rViewContainer)); rEventMultiplexer.addViewHandler(pRet); // Set priority to 1000 so that the handler fires before the click handler on the slide diff --git a/slideshow/source/engine/slideoverlaybutton.hxx b/slideshow/source/engine/slideoverlaybutton.hxx index db733a2b2cd4..e872a821d3b7 100644 --- a/slideshow/source/engine/slideoverlaybutton.hxx +++ b/slideshow/source/engine/slideoverlaybutton.hxx @@ -50,7 +50,8 @@ public: static SlideOverlayButtonSharedPtr create(const css::uno::Reference<css::rendering::XBitmap>& xIconBitmap, - css::awt::Point pPosition, std::function<void(basegfx::B2DPoint)> clickHandler, + const css::awt::Point& rPosition, + const std::function<void(basegfx::B2DPoint)>& clickHandler, ScreenUpdater& rScreenUpdater, EventMultiplexer& rEventMultiplexer, const UnoViewContainer& rViewContainer); diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index db11d4ea334a..01899b6bdde3 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -938,9 +938,9 @@ void SwCursorShell::GotoFormControl(bool bNext) { auto pFieldMark = dynamic_cast<sw::mark::IFieldmark*>(*it); assert(pFieldMark); - std::pair<SwTextContentControl*, sw::mark::IFieldmark*> pFormControl(nullptr, pFieldMark); // legacy form fields do not have (functional) tabIndexes - use lowest priority for them - aFormMap[std::make_pair((*it)->GetMarkStart(), SAL_MAX_UINT32)] = pFormControl; + aFormMap[std::make_pair((*it)->GetMarkStart(), SAL_MAX_UINT32)] = + std::pair<SwTextContentControl*, sw::mark::IFieldmark*>(nullptr, pFieldMark); } if (aFormMap.begin() == aFormMap.end()) diff --git a/sw/source/ui/vba/vbabookmarks.cxx b/sw/source/ui/vba/vbabookmarks.cxx index de6cbfea2ef5..601ed759dff0 100644 --- a/sw/source/ui/vba/vbabookmarks.cxx +++ b/sw/source/ui/vba/vbabookmarks.cxx @@ -43,8 +43,7 @@ public: virtual uno::Any SAL_CALL nextElement( ) override { uno::Reference< container::XNamed > xNamed( m_xEnumeration->nextElement(), uno::UNO_QUERY_THROW ); - OUString aName = xNamed->getName(); - return uno::Any( uno::Reference< word::XBookmark > ( new SwVbaBookmark( m_xParent, m_xContext, mxModel, aName ) ) ); + return uno::Any(uno::Reference<word::XBookmark>(new SwVbaBookmark(m_xParent, m_xContext, mxModel, xNamed->getName()))); } }; diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 2448eaf64667..59908d52eb53 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -689,7 +689,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( aMEvt, *this ) ); aEvent.PopupTrigger = true; - Callback aCallback = [ this, aEvent ]() + Callback aCallback = [ this, aEvent=std::move(aEvent) ]() { this->mpImpl->getMouseListeners().mousePressed( aEvent ); }; ImplExecuteAsyncWithoutSolarLock( aCallback ); @@ -703,7 +703,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *pMouseEvt, *this ) ); bool const isEnter(pMouseEvt->IsEnterWindow()); - Callback aCallback = [ this, isEnter, aEvent ]() + Callback aCallback = [ this, isEnter, aEvent=std::move(aEvent) ]() { MouseListenerMultiplexer& rMouseListeners = this->mpImpl->getMouseListeners(); isEnter ? rMouseListeners.mouseEntered(aEvent) @@ -728,7 +728,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) if ( mpImpl->getMouseListeners().getLength() ) { awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *static_cast<MouseEvent*>(rVclWindowEvent.GetData()), *this ) ); - Callback aCallback = [ this, aEvent ]() + Callback aCallback = [ this, aEvent=std::move(aEvent) ]() { this->mpImpl->getMouseListeners().mousePressed( aEvent ); }; ImplExecuteAsyncWithoutSolarLock( aCallback ); } @@ -740,7 +740,7 @@ void VCLXWindow::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { awt::MouseEvent aEvent( VCLUnoHelper::createMouseEvent( *static_cast<MouseEvent*>(rVclWindowEvent.GetData()), *this ) ); - Callback aCallback = [ this, aEvent ]() + Callback aCallback = [ this, aEvent=std::move(aEvent) ]() { this->mpImpl->getMouseListeners().mouseReleased( aEvent ); }; ImplExecuteAsyncWithoutSolarLock( aCallback ); } diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx index 88025bde129c..cc7b34092d01 100644 --- a/vcl/inc/salvtables.hxx +++ b/vcl/inc/salvtables.hxx @@ -1543,8 +1543,7 @@ protected: DECL_LINK(StartDragHdl, SvTreeListBox*, bool); DECL_STATIC_LINK(SalInstanceTreeView, FinishDragHdl, SvTreeListBox*, void); DECL_LINK(EditingEntryHdl, SvTreeListEntry*, bool); - typedef std::pair<SvTreeListEntry*, OUString> IterString; - DECL_LINK(EditedEntryHdl, IterString, bool); + DECL_LINK(EditedEntryHdl, const IterString&, bool); DECL_LINK(VisibleRangeChangedHdl, SvTreeListBox*, void); DECL_LINK(CompareHdl, const SvSortData&, sal_Int32); DECL_LINK(PopupMenuHdl, const CommandEvent&, bool); diff --git a/vcl/inc/treeglue.hxx b/vcl/inc/treeglue.hxx index d445a533b43f..6e3930a017df 100644 --- a/vcl/inc/treeglue.hxx +++ b/vcl/inc/treeglue.hxx @@ -19,7 +19,7 @@ class LclHeaderTabListBox final : public SvHeaderTabListBox { private: Link<SvTreeListEntry*, bool> m_aEditingEntryHdl; - Link<std::pair<SvTreeListEntry*, OUString>, bool> m_aEditedEntryHdl; + Link<const IterString&, bool> m_aEditedEntryHdl; public: LclHeaderTabListBox(vcl::Window* pParent, WinBits nWinStyle) @@ -32,7 +32,7 @@ public: m_aEditingEntryHdl = rLink; } - void SetEditedEntryHdl(const Link<std::pair<SvTreeListEntry*, OUString>, bool>& rLink) + void SetEditedEntryHdl(const Link<const IterString&, bool>& rLink) { m_aEditedEntryHdl = rLink; } @@ -46,7 +46,7 @@ public: virtual bool EditedEntry(SvTreeListEntry* pEntry, const OUString& rNewText) override { - return m_aEditedEntryHdl.Call(std::pair<SvTreeListEntry*, OUString>(pEntry, rNewText)); + return m_aEditedEntryHdl.Call(IterString(pEntry, rNewText)); } }; @@ -56,7 +56,7 @@ class LclTabListBox final : public SvTabListBox Link<SvTreeListBox*, bool> m_aStartDragHdl; Link<SvTreeListBox*, void> m_aEndDragHdl; Link<SvTreeListEntry*, bool> m_aEditingEntryHdl; - Link<std::pair<SvTreeListEntry*, OUString>, bool> m_aEditedEntryHdl; + Link<const IterString&, bool> m_aEditedEntryHdl; public: LclTabListBox(vcl::Window* pParent, WinBits nWinStyle) @@ -71,7 +71,7 @@ public: { m_aEditingEntryHdl = rLink; } - void SetEditedEntryHdl(const Link<std::pair<SvTreeListEntry*, OUString>, bool>& rLink) + void SetEditedEntryHdl(const Link<const IterString&, bool>& rLink) { m_aEditedEntryHdl = rLink; } @@ -164,7 +164,7 @@ public: virtual bool EditedEntry(SvTreeListEntry* pEntry, const OUString& rNewText) override { - return m_aEditedEntryHdl.Call(std::pair<SvTreeListEntry*, OUString>(pEntry, rNewText)); + return m_aEditedEntryHdl.Call(IterString(pEntry, rNewText)); } }; diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index f51ce48a505c..bf76517fea68 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -5384,7 +5384,7 @@ IMPL_LINK(SalInstanceTreeView, EditingEntryHdl, SvTreeListEntry*, pEntry, bool) return signal_editing_started(SalInstanceTreeIter(pEntry)); } -IMPL_LINK(SalInstanceTreeView, EditedEntryHdl, IterString, rIterString, bool) +IMPL_LINK(SalInstanceTreeView, EditedEntryHdl, const IterString&, rIterString, bool) { return signal_editing_done( iter_string(SalInstanceTreeIter(rIterString.first), rIterString.second));