From 1c867a17b204db4f521e020f1e1e9d3061988180 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 10 Aug 2009 12:51:27 +0000 Subject: [PATCH] small simplification and speedup for InsetFoot::updateLabels git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30966 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetFoot.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/insets/InsetFoot.cpp b/src/insets/InsetFoot.cpp index c5ecf4879b..d1e0097c42 100644 --- a/src/insets/InsetFoot.cpp +++ b/src/insets/InsetFoot.cpp @@ -26,14 +26,11 @@ #include "support/debug.h" #include "support/docstream.h" #include "support/gettext.h" -#include "support/lstrings.h" using namespace std; namespace lyx { -using support::bformat; - InsetFoot::InsetFoot(Buffer const & buf) : InsetFootlike(buf) {} @@ -43,14 +40,12 @@ void InsetFoot::updateLabels(ParIterator const & it) { BufferParams const & bp = buffer().masterBuffer()->params(); Counters & cnts = bp.documentClass().counters(); - docstring const foot = from_ascii("footnote"); - Paragraph const & outer = it.paragraph(); + static docstring const foot = from_ascii("footnote"); + Paragraph const & outer = it.paragraph(); if (!outer.layout().intitle && cnts.hasCounter(foot)) { cnts.step(foot); - // FIXME: the counter should format itself. - custom_label_= bformat(from_utf8("%1$s %2$s"), - translateIfPossible(getLayout().labelstring()), - cnts.theCounter(foot, outer.getParLanguage(bp)->code())); + custom_label_= translateIfPossible(getLayout().labelstring()) + + ' ' + cnts.theCounter(foot, outer.getParLanguage(bp)->code()); setLabel(custom_label_); } -- 2.39.2