summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-10-10 12:18:13 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-10-10 16:57:12 +0200
commit3b21fed4b153e3bbf1d47c3073f31a3735538596 (patch)
treedc9fb83579f454713d8cd44df3d8627bc826e564 /sw/source
parentee68b450b75c68b2b129564c799766abba7087c9 (diff)
optimize adding a block of entries at one time
Change-Id: I9a59154fa445cf3c44ede3ceb1d09f408d906530 Reviewed-on: https://gerrit.libreoffice.org/61618 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/ui/dbui/customizeaddresslistdialog.cxx4
-rw-r--r--sw/source/ui/frmdlg/column.cxx3
-rw-r--r--sw/source/ui/misc/outline.cxx2
-rw-r--r--sw/source/ui/table/tautofmt.cxx4
-rw-r--r--sw/source/uibase/misc/numberingtypelistbox.cxx3
-rw-r--r--sw/source/uibase/utlui/uitool.cxx2
6 files changed, 10 insertions, 8 deletions
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index ee0ad8e15c0e..af6162bfd0f5 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -103,7 +103,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, weld::Button&, rButto
}
- m_xFieldsLB->insert_text(sNew, nPos);
+ m_xFieldsLB->insert_text(nPos, sNew);
m_xFieldsLB->select(nPos);
}
UpdateButtons();
@@ -135,7 +135,7 @@ IMPL_LINK(SwCustomizeAddressListDialog, UpDownHdl_Impl, weld::Button&, rButton,
--nPos;
else
++nPos;
- m_xFieldsLB->insert_text(aTemp, nPos);
+ m_xFieldsLB->insert_text(nPos, aTemp);
m_xFieldsLB->select(nPos);
//align m_xNewData
OUString sHeader = m_xNewData->aDBColumnHeaders[nOldPos];
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index 8c8b155b3a46..d7a327bc2dad 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -189,7 +189,8 @@ SwColumnDlg::SwColumnDlg(weld::Window* pParent, SwWrtShell& rSh)
{
const OUString sPageStr = pApplyToLB->get_text(nPagePos) + pPageDesc->GetName();
pApplyToLB->remove(nPagePos);
- pApplyToLB->insert(nPagePos, OUString::number(LISTBOX_PAGE), sPageStr, nullptr, nullptr);
+ OUString sId(OUString::number(LISTBOX_PAGE));
+ pApplyToLB->insert(nPagePos, sPageStr, &sId, nullptr, nullptr);
}
else
pApplyToLB->remove( nPagePos );
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 7b70104318fd..8cf7246243d7 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -91,7 +91,7 @@ void SwNumNamesDlg::SetUserNames(const OUString *pList[])
if(pList[i])
{
m_xFormBox->remove(i);
- m_xFormBox->insert_text(*pList[i], i);
+ m_xFormBox->insert_text(i, *pList[i]);
if (i == nSelect && nSelect < SwChapterNumRules::nMaxRules)
nSelect++;
}
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index 5e666a2e31bc..a395be977d54 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -236,7 +236,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl, weld::Button&, void)
break;
m_xTableTable->InsertAutoFormat(n, std::move(pNewData));
- m_xLbFormat->insert_text(aFormatName, m_nDfltStylePos + n);
+ m_xLbFormat->insert_text(m_nDfltStylePos + n, aFormatName);
m_xLbFormat->select(m_nDfltStylePos + n);
bFormatInserted = true;
m_xBtnAdd->set_sensitive(false);
@@ -336,7 +336,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl, weld::Button&, void)
}
m_xTableTable->InsertAutoFormat( n, std::move(p) );
- m_xLbFormat->insert_text(aFormatName, m_nDfltStylePos + n);
+ m_xLbFormat->insert_text(m_nDfltStylePos + n, aFormatName);
m_xLbFormat->select(m_nDfltStylePos + n);
if ( !m_bCoreDataChanged )
diff --git a/sw/source/uibase/misc/numberingtypelistbox.cxx b/sw/source/uibase/misc/numberingtypelistbox.cxx
index 396546199d2c..66ec98433785 100644
--- a/sw/source/uibase/misc/numberingtypelistbox.cxx
+++ b/sw/source/uibase/misc/numberingtypelistbox.cxx
@@ -113,7 +113,8 @@ void SwNumberingTypeListBox::Reload(SwInsertNumTypes nTypeFlags)
}
if (bInsert)
{
- m_xWidget->insert(nPos, OUString::number(nValue), SvxNumberingTypeTable::GetString(i), nullptr, nullptr);
+ OUString sId(OUString::number(nValue));
+ m_xWidget->insert(nPos, SvxNumberingTypeTable::GetString(i), &sId, nullptr, nullptr);
}
}
if (nTypeFlags & SwInsertNumTypes::Extended)
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index ff9438a8111f..79036c5ebdf8 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -687,7 +687,7 @@ void InsertStringSorted(const OUString& rId, const OUString& rEntry, weld::Combo
break;
++nOffset;
}
- rToFill.insert(nOffset, rId, rEntry, nullptr, nullptr);
+ rToFill.insert(nOffset, rEntry, &rId, nullptr, nullptr);
}
void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted, bool bWithDefault)