]> git.lyx.org Git - features.git/blobdiff - src/BufferParams.cpp
Doc for inset-forall: how to open branch insets
[features.git] / src / BufferParams.cpp
index b1846beaa3a24a87aeef673a92aef08791f7ee2b..95aa9136d25c59ce5aad57f45b9ebb6bc17bd453 100644 (file)
@@ -633,45 +633,29 @@ bool BufferParams::spellignored(WordLangTuple const & wl) const
 
 Bullet & BufferParams::temp_bullet(lyx::size_type const index)
 {
-       if (index < 4)
-               return pimpl_->temp_bullets[index];
-       // Fallback bullet if we are too deeply nested
-       docstring const fb = from_ascii("?") + convert<docstring>(index + 1);
-       Bullet const & res = Bullet(fb);
-       return const_cast<Bullet&>(res);
+       LASSERT(index < 4, return pimpl_->temp_bullets[0]);
+       return pimpl_->temp_bullets[index];
 }
 
 
 Bullet const & BufferParams::temp_bullet(lyx::size_type const index) const
 {
-       if (index < 4)
-               return pimpl_->temp_bullets[index];
-       // Fallback bullet if we are too deeply nested
-       docstring const fb = from_ascii("?") + convert<docstring>(index + 1);
-       Bullet const & res = Bullet(fb);
-       return res;
+       LASSERT(index < 4, return pimpl_->temp_bullets[0]);
+       return pimpl_->temp_bullets[index];
 }
 
 
 Bullet & BufferParams::user_defined_bullet(lyx::size_type const index)
 {
-       if (index < 4)
-               return pimpl_->user_defined_bullets[index];
-       // Fallback bullet if we are too deeply nested
-       docstring const fb = from_ascii("?") + convert<docstring>(index + 1);
-       Bullet const & res = Bullet(fb);
-       return const_cast<Bullet&>(res);
+       LASSERT(index < 4, return pimpl_->temp_bullets[0]);
+       return pimpl_->user_defined_bullets[index];
 }
 
 
 Bullet const & BufferParams::user_defined_bullet(lyx::size_type const index) const
 {
-       if (index < 4)
-               return pimpl_->user_defined_bullets[index];
-       // Fallback bullet if we are too deeply nested
-       docstring const fb = from_ascii("?") + convert<docstring>(index + 1);
-       Bullet const & res = Bullet(fb);
-       return res;
+       LASSERT(index < 4, return pimpl_->temp_bullets[0]);
+       return pimpl_->user_defined_bullets[index];
 }