mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
Add list of branches.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25011 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a43de95180
commit
ebcc4db6de
@ -502,6 +502,8 @@ QString guiName(string const & type, BufferParams const & bp)
|
||||
return qt_("List of Citations");
|
||||
if (type == "label")
|
||||
return qt_("Labels and References");
|
||||
if (type == "branch")
|
||||
return qt_("List of Branches");
|
||||
|
||||
FloatList const & floats = bp.documentClass().floats();
|
||||
if (floats.typeExist(type))
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "Lexer.h"
|
||||
#include "OutputParams.h"
|
||||
#include "TextClass.h"
|
||||
#include "TocBackend.h"
|
||||
|
||||
#include "support/debug.h"
|
||||
#include "support/gettext.h"
|
||||
@ -273,6 +274,17 @@ void InsetBranch::string2params(string const & in, InsetBranchParams & params)
|
||||
}
|
||||
|
||||
|
||||
void InsetBranch::addToToc(DocIterator const & cpit)
|
||||
{
|
||||
DocIterator pit = cpit;
|
||||
pit.push_back(CursorSlice(*this));
|
||||
|
||||
Toc & toc = buffer().tocBackend().toc("branch");
|
||||
docstring const str = params_.branch + ": " + text_.getPar(0).asString();
|
||||
toc.push_back(TocItem(pit, 0, str));
|
||||
}
|
||||
|
||||
|
||||
void InsetBranchParams::write(ostream & os) const
|
||||
{
|
||||
os << "Branch " << to_utf8(branch) << '\n';
|
||||
|
@ -78,6 +78,8 @@ private:
|
||||
///
|
||||
void validate(LaTeXFeatures &) const;
|
||||
///
|
||||
void addToToc(DocIterator const &);
|
||||
///
|
||||
InsetBranchParams const & params() const { return params_; }
|
||||
///
|
||||
void setParams(InsetBranchParams const & params) { params_ = params; }
|
||||
|
Loading…
Reference in New Issue
Block a user