From b32520f3e6b4ec4868d6e94d6fc20abb283c8308 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Tue, 8 Jun 2021 12:44:41 +0200 Subject: Simplify Sequences initializations (cui) Change-Id: Iaf6a27f3a8dd156e91751a2fe242e8388f8d6b6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116829 Tested-by: Jenkins Reviewed-by: Julien Nabet --- cui/source/customize/SvxNotebookbarConfigPage.cxx | 3 +-- cui/source/customize/SvxToolbarConfigPage.cxx | 9 ++++----- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'cui') diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index 978055e1a1bc..16d555a9a2e7 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -516,8 +516,7 @@ void SvxNotebookbarEntriesListBox::ChangedVisibility(int nRow) else sVisible = "False"; OUString sSetEntries = sUIItemId + ",visible," + sVisible; - Sequence sSeqOfEntries(1); - sSeqOfEntries[0] = sSetEntries; + Sequence sSeqOfEntries{ sSetEntries }; EditRegistryFile(sUIItemId, sSetEntries, sNotebookbarInterface); CustomNotebookbarGenerator::modifyCustomizedUIFile(sSeqOfEntries); OUString sUIPath = "modules/s" + m_pPage->GetAppName().toAsciiLowerCase() + "/ui/"; diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx index 57f78dcd6161..99a85d82f96e 100644 --- a/cui/source/customize/SvxToolbarConfigPage.cxx +++ b/cui/source/customize/SvxToolbarConfigPage.cxx @@ -508,8 +508,6 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OString&, rIdent, void) if (newgraphic.is()) { - css::uno::Sequence> aGraphicSeq(1); - css::uno::Sequence aURLSeq{ pEntry->GetCommand() }; if (!pEntry->GetBackupGraphic().is()) @@ -524,7 +522,9 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OString&, rIdent, void) } } - aGraphicSeq[0] = newgraphic; + css::uno::Sequence> aGraphicSeq{ + newgraphic + }; try { GetSaveInData()->GetImageManager()->replaceImages( @@ -558,8 +558,7 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OString&, rIdent, void) css::uno::Reference backup = pEntry->GetBackupGraphic(); - css::uno::Sequence> aGraphicSeq(1); - aGraphicSeq[0] = backup; + css::uno::Sequence> aGraphicSeq{ backup }; css::uno::Sequence aURLSeq{ pEntry->GetCommand() }; -- cgit v1.2.3