namespace lyx {
-
+
// Implementation is in LyX.cpp
extern void dispatch(FuncRequest const & action);
using support::sum;
using std::endl;
+using std::find;
using std::string;
using std::istringstream;
using std::ostream;
incfile = mangled;
else if (!isValidLaTeXFilename(incfile)) {
frontend::Alert::warning(_("Invalid filename"),
- _("The following filename is likely to cause trouble "
+ _("The following filename is likely to cause trouble "
"when running the exported file through LaTeX: ") +
from_utf8(incfile));
}
Alert::warning(_("Different textclasses"), text);
//return 0;
}
-
+
// Make sure modules used in child are all included in master
//FIXME It might be worth loading the children's modules into the master
//over in BufferParams rather than doing this check.
vector<string>::const_iterator end = childModules.end();
for (; it != end; ++it) {
string const module = *it;
- vector<string>::const_iterator found =
+ vector<string>::const_iterator found =
find(masterModules.begin(), masterModules.end(), module);
if (found != masterModules.end()) {
docstring text = bformat(_("Included file `%1$s'\n"
"uses module `%2$s'\n"
"which is not used in parent file."),
- makeDisplayPath(included_file.absFilename()), from_utf8(module));
+ makeDisplayPath(included_file.absFilename()), from_utf8(module));
Alert::warning(_("Module not found"), text);
}
}
}
-bool InsetInclude::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetInclude::metrics(MetricsInfo & mi, Dimension & dim) const
{
BOOST_ASSERT(mi.base.bv);
Box b(0, dim.wid, -dim.asc, dim.des);
button_.setBox(b);
-
- bool const changed = dim_ != dim;
- dim_ = dim;
- return changed;
}
void InsetInclude::draw(PainterInfo & pi, int x, int y) const
{
- setPosCache(pi, x, y);
-
BOOST_ASSERT(pi.base.bv);
bool use_preview = false;
Toc & toc = toclist["listing"];
docstring const str = convert<docstring>(toc.size() + 1)
+ ". " + from_utf8(caption);
- // This inset does not have a valid ParConstIterator
+ // This inset does not have a valid ParConstIterator
// so it has to use the iterator of its parent paragraph
toc.push_back(TocItem(pit, 0, str));
}
}
-void InsetInclude::updateLabels(Buffer const & buffer,
+void InsetInclude::updateLabels(Buffer const & buffer,
ParIterator const &)
{
Buffer const * const childbuffer = getChildBuffer(buffer, params_);
void InsetInclude::registerEmbeddedFiles(Buffer const & buffer,
- EmbeddedFiles & files, ParConstIterator const & pit) const
+ EmbeddedFiles & files) const
{
// include and input are temprarily not considered.
if (isVerbatim(params_) || isListings(params_))
files.registerFile(includedFilename(buffer, params_).absFilename(),
- EmbeddedFile::AUTO, pit);
+ false, this);
}