From c02fe70797a0b613fae379a84a9a97a8dc4e022f Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 5 Mar 2022 09:00:47 +0100 Subject: [PATCH] Use a more transparent lexic for bullet label functions --- src/Buffer.cpp | 2 +- src/Bullet.cpp | 14 +++++++------- src/Bullet.h | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 0f7ecb08d7..54272a79d5 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -5158,7 +5158,7 @@ void Buffer::Impl::setLabel(ParIterator & it, UpdateType utype) const switch(layout.labeltype) { case LABEL_ITEMIZE: { par.params().labelString( - bp.user_defined_bullet(par.itemdepth).getUnicode()); + bp.user_defined_bullet(par.itemdepth).getLabel()); break; } diff --git a/src/Bullet.cpp b/src/Bullet.cpp index 1e617773ad..00a13ecd5c 100644 --- a/src/Bullet.cpp +++ b/src/Bullet.cpp @@ -54,7 +54,7 @@ Bullet::Bullet(int f, int c, int s) 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(); } @@ -98,7 +98,7 @@ void Bullet::setText(docstring const & t) font = character = size = MIN; user_text = 1; text = t; - unicode = t; + label = t; testInvariant(); } @@ -139,7 +139,7 @@ Bullet & Bullet::operator=(Bullet const & b) size = b.size; user_text = b.user_text; text = b.text; - unicode = b.unicode; + label = b.label; this->testInvariant(); 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) generateText(); - return unicode; + return label; } @@ -196,7 +196,7 @@ void Bullet::generateText() const if ((font >= 0) && (character >= 0)) { text = bulletEntry(font, character); - unicode = bulletUnicode(font, character); + label = bulletLabel(font, character); if (size >= 0) text = bulletSize(size) + text; 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 static int UnicodeBulletPanel0[CHARMAX] = { diff --git a/src/Bullet.h b/src/Bullet.h index 0de40c102f..662fa224d7 100644 --- a/src/Bullet.h +++ b/src/Bullet.h @@ -45,10 +45,10 @@ public: int getSize() const; /// FontSize getFontSize() const; - /// + /// The text to be output docstring const & getText() const; - /// - docstring const & getUnicode() const; + /// The label displayed in the workarea + docstring const & getLabel() const; /// Bullet & operator=(Bullet const &); /// @@ -85,7 +85,7 @@ private: /// static FontSize bulletFontSize(int); /// - static docstring const bulletUnicode(int, int); + static docstring const bulletLabel(int, int); /// int font; @@ -111,7 +111,7 @@ private: and size settings. */ mutable docstring text; - mutable docstring unicode; + mutable docstring label; };