desktop/source/migration/migration.cxx | 2 - drawinglayer/source/primitive2d/texteffectprimitive2d.cxx | 16 +++++++------- fpicker/source/office/iodlg.cxx | 8 ++++++- fpicker/source/office/iodlg.hxx | 2 + sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx | 2 - 5 files changed, 19 insertions(+), 11 deletions(-)
New commits: commit 51d5b49113feee796d61db22e7db67ab8150d9e9 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun Aug 3 22:02:15 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Aug 4 12:38:14 2025 +0200 cid#1660519 Variable copied when it could be moved and cid#1660298 Variable copied when it could be moved cid#1660297 Variable copied when it could be moved Change-Id: I1e9ca4c5eb25606540f807cc4894c06646159dc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188904 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 5006bc1c5507..3c7e51d804fa 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -949,7 +949,7 @@ std::vector< MigrationModuleInfo > MigrationImpl::detectUIChangesForAllModules() } if (!aModuleInfo.sModuleShortName.isEmpty()) - vModulesInfo.push_back(aModuleInfo); + vModulesInfo.push_back(std::move(aModuleInfo)); } } diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx index e1893ec0fd38..115c7ac16272 100644 --- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx @@ -79,29 +79,29 @@ Primitive2DReference TextEffectPrimitive2D::create2DDecomposition( if (bDefaultTextColor) { // emboss/engrave in black, original forced to white - const basegfx::BColorModifierSharedPtr aBColorModifierToGray + basegfx::BColorModifierSharedPtr aBColorModifierToGray = std::make_shared<basegfx::BColorModifier_replace>(basegfx::BColor(0.0)); - const Primitive2DReference xModifiedColor(new ModifiedColorPrimitive2D( - Primitive2DContainer(getTextContent()), aBColorModifierToGray)); + Primitive2DReference xModifiedColor(new ModifiedColorPrimitive2D( + Primitive2DContainer(getTextContent()), std::move(aBColorModifierToGray))); aContainer.push_back( new TransformPrimitive2D(aTransform, Primitive2DContainer{ xModifiedColor })); // add original, too - const basegfx::BColorModifierSharedPtr aBColorModifierToWhite + basegfx::BColorModifierSharedPtr aBColorModifierToWhite = std::make_shared<basegfx::BColorModifier_replace>(basegfx::BColor(1.0)); aContainer.push_back(new ModifiedColorPrimitive2D( - Primitive2DContainer(getTextContent()), aBColorModifierToWhite)); + Primitive2DContainer(getTextContent()), std::move(aBColorModifierToWhite))); } else { // emboss/engrave in gray, keep original's color - const basegfx::BColorModifierSharedPtr aBColorModifierToGray + basegfx::BColorModifierSharedPtr aBColorModifierToGray = std::make_shared<basegfx::BColorModifier_replace>( basegfx::BColor(0.75)); // 192 - const Primitive2DReference xModifiedColor(new ModifiedColorPrimitive2D( - Primitive2DContainer(getTextContent()), aBColorModifierToGray)); + Primitive2DReference xModifiedColor(new ModifiedColorPrimitive2D( + Primitive2DContainer(getTextContent()), std::move(aBColorModifierToGray))); aContainer.push_back( new TransformPrimitive2D(aTransform, Primitive2DContainer{ xModifiedColor })); diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx index a1c46138ad46..80ee101c0d7a 100644 --- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx +++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx @@ -713,7 +713,7 @@ static void UpdateTree(SwDocShell& rDocSh, const SwEditShell& rEditSh, MetadataToTreeNode(xTextSection, aCurNode); // show section only if it has RDF metadata if (aCurNode.children.size() > 0) - aTextSectionsNode.children.push_back(aCurNode); + aTextSectionsNode.children.push_back(std::move(aCurNode)); } } catch (const lang::IllegalArgumentException&) commit 8364404bb08cb2f34424640e571ccc07e4cc9231 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun Aug 3 22:00:53 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Aug 4 12:38:03 2025 +0200 cid#1401342 silence Uncaught exception Change-Id: I991b01c97ce4bae87ff7244fc9ef507dde2c3d63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188903 Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 11c6ac1a73d2..25db81b4f78a 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -71,6 +71,7 @@ #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> #include "fpinteraction.hxx" #include <osl/process.h> +#include <o3tl/deleter.hxx> #include <o3tl/string_view.hxx> #include <officecfg/Office/Common.hxx> @@ -450,7 +451,7 @@ SvtFileDialog::SvtFileDialog(weld::Window* pParent, PickerFlags nStyle) m_xImpl->m_xEdFileName->grab_focus(); } -SvtFileDialog::~SvtFileDialog() +void SvtFileDialog::ImplDestroy() { if (!m_xImpl->m_aIniKey.isEmpty()) { @@ -489,6 +490,11 @@ SvtFileDialog::~SvtFileDialog() batch->commit(); } +SvtFileDialog::~SvtFileDialog() +{ + suppress_fun_call_w_exception(ImplDestroy()); +} + IMPL_LINK_NOARG(SvtFileDialog, NewFolderHdl_Impl, weld::Button&, void) { m_xFileView->EndInplaceEditing(); diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx index 0965380aabec..574ecbf248c9 100644 --- a/fpicker/source/office/iodlg.hxx +++ b/fpicker/source/office/iodlg.hxx @@ -147,6 +147,8 @@ private: void EnableControl(weld::Widget* pControl, bool bEnable); virtual bool PrepareExecute() override; + void ImplDestroy(); + public: SvtFileDialog( weld::Window* pParent, PickerFlags nBits ); virtual ~SvtFileDialog() override;