Use a more transparent lexic for bullet label functions

This commit is contained in:
Juergen Spitzmueller 2022-03-05 09:00:47 +01:00
parent ad31043987
commit c02fe70797
3 changed files with 13 additions and 13 deletions

View File

@ -5158,7 +5158,7 @@ void Buffer::Impl::setLabel(ParIterator & it, UpdateType utype) const
switch(layout.labeltype) { switch(layout.labeltype) {
case LABEL_ITEMIZE: { case LABEL_ITEMIZE: {
par.params().labelString( par.params().labelString(
bp.user_defined_bullet(par.itemdepth).getUnicode()); bp.user_defined_bullet(par.itemdepth).getLabel());
break; break;
} }

View File

@ -54,7 +54,7 @@ Bullet::Bullet(int f, int c, int s)
Bullet::Bullet(docstring const & t) Bullet::Bullet(docstring const & t)
: font(MIN), character(MIN), size(MIN), user_text(1), text(t), unicode(t) : font(MIN), character(MIN), size(MIN), user_text(1), text(t), label(t)
{ {
testInvariant(); testInvariant();
} }
@ -98,7 +98,7 @@ void Bullet::setText(docstring const & t)
font = character = size = MIN; font = character = size = MIN;
user_text = 1; user_text = 1;
text = t; text = t;
unicode = t; label = t;
testInvariant(); testInvariant();
} }
@ -139,7 +139,7 @@ Bullet & Bullet::operator=(Bullet const & b)
size = b.size; size = b.size;
user_text = b.user_text; user_text = b.user_text;
text = b.text; text = b.text;
unicode = b.unicode; label = b.label;
this->testInvariant(); this->testInvariant();
return *this; return *this;
} }
@ -153,11 +153,11 @@ docstring const & Bullet::getText() const
} }
docstring const & Bullet::getUnicode() const docstring const & Bullet::getLabel() const
{ {
if (user_text == 0) if (user_text == 0)
generateText(); generateText();
return unicode; return label;
} }
@ -196,7 +196,7 @@ void Bullet::generateText() const
if ((font >= 0) && (character >= 0)) { if ((font >= 0) && (character >= 0)) {
text = bulletEntry(font, character); text = bulletEntry(font, character);
unicode = bulletUnicode(font, character); label = bulletLabel(font, character);
if (size >= 0) if (size >= 0)
text = bulletSize(size) + text; text = bulletSize(size) + text;
user_text = -1; user_text = -1;
@ -379,7 +379,7 @@ FontSize Bullet::bulletFontSize(int s)
} }
docstring const Bullet::bulletUnicode(int f, int c) docstring const Bullet::bulletLabel(int f, int c)
{ {
// see comment at bulletEntry // see comment at bulletEntry
static int UnicodeBulletPanel0[CHARMAX] = { static int UnicodeBulletPanel0[CHARMAX] = {

View File

@ -45,10 +45,10 @@ public:
int getSize() const; int getSize() const;
/// ///
FontSize getFontSize() const; FontSize getFontSize() const;
/// /// The text to be output
docstring const & getText() const; docstring const & getText() const;
/// /// The label displayed in the workarea
docstring const & getUnicode() const; docstring const & getLabel() const;
/// ///
Bullet & operator=(Bullet const &); Bullet & operator=(Bullet const &);
/// ///
@ -85,7 +85,7 @@ private:
/// ///
static FontSize bulletFontSize(int); static FontSize bulletFontSize(int);
/// ///
static docstring const bulletUnicode(int, int); static docstring const bulletLabel(int, int);
/// ///
int font; int font;
@ -111,7 +111,7 @@ private:
and size settings. and size settings.
*/ */
mutable docstring text; mutable docstring text;
mutable docstring unicode; mutable docstring label;
}; };