summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-06-08 12:44:41 +0200
committerJulien Nabet <serval2412@yahoo.fr>2021-06-08 17:07:06 +0200
commitb32520f3e6b4ec4868d6e94d6fc20abb283c8308 (patch)
treedfd4e18d34f2962f0ec60ac0a7aea915be1e4918 /cui/source
parentb60a9bec769339f5f0fe008ef4985263d0cf689e (diff)
Simplify Sequences initializations (cui)
Change-Id: Iaf6a27f3a8dd156e91751a2fe242e8388f8d6b6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116829 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/customize/SvxNotebookbarConfigPage.cxx3
-rw-r--r--cui/source/customize/SvxToolbarConfigPage.cxx9
2 files changed, 5 insertions, 7 deletions
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<OUString> sSeqOfEntries(1);
- sSeqOfEntries[0] = sSetEntries;
+ Sequence<OUString> 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<css::uno::Reference<css::graphic::XGraphic>> aGraphicSeq(1);
-
css::uno::Sequence<OUString> 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<css::uno::Reference<css::graphic::XGraphic>> aGraphicSeq{
+ newgraphic
+ };
try
{
GetSaveInData()->GetImageManager()->replaceImages(
@@ -558,8 +558,7 @@ IMPL_LINK(SvxToolbarConfigPage, ModifyItemHdl, const OString&, rIdent, void)
css::uno::Reference<css::graphic::XGraphic> backup = pEntry->GetBackupGraphic();
- css::uno::Sequence<css::uno::Reference<css::graphic::XGraphic>> aGraphicSeq(1);
- aGraphicSeq[0] = backup;
+ css::uno::Sequence<css::uno::Reference<css::graphic::XGraphic>> aGraphicSeq{ backup };
css::uno::Sequence<OUString> aURLSeq{ pEntry->GetCommand() };