summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-02 11:28:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-02 11:28:37 +0200
commit4730b23b1da929b802d527611e974ff1b1e6d6c5 (patch)
tree0809450a51e0aae057f19a1acd84dad5ec77a9b5 /sw
parent42460fd4eb4757dcdf3b3e533aafabda77751321 (diff)
use std::vector::insert when inserting multiple of the same thing
instead of looping Change-Id: I7b8c1663e303449302e0b96dc5b483367c2a52ba
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/frmdlg/cption.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 4d0bac6b27ef..ae9cf890278e 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -366,10 +366,8 @@ void SwCaptionDialog::DrawSample()
RES_SETEXPFLD, sFieldTypeName ));
if( pFieldType && pFieldType->GetOutlineLvl() < MAXLEVEL )
{
- sal_Int8 nLvl = pFieldType->GetOutlineLvl();
SwNumberTree::tNumberVector aNumVector;
- for( sal_Int8 i = 0; i <= nLvl; ++i )
- aNumVector.push_back(1);
+ aNumVector.insert(aNumVector.end(), pFieldType->GetOutlineLvl(), 1);
OUString sNumber( rSh.GetOutlineNumRule()->
MakeNumString(aNumVector, false ));