From: Jean-Marc Lasgouttes Date: Mon, 10 Aug 2009 12:51:27 +0000 (+0000) Subject: small simplification and speedup for InsetFoot::updateLabels X-Git-Tag: 2.0.0~5781 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1c867a17b204db4f521e020f1e1e9d3061988180;p=features.git small simplification and speedup for InsetFoot::updateLabels git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30966 a592a061-630c-0410-9148-cb99ea01b6c8 --- 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_); }