#include "Language.h"
#include "LaTeX.h"
#include "Layout.h"
+#include "LayoutPtr.h"
#include "LyX.h"
-#include "lyxlayout_ptr_fwd.h"
#include "TextClass.h"
#include "TextClassList.h"
#include "Paragraph.h"
#include "insets/InsetInclude.h"
#include "support/filetools.h"
-#include "support/fs_extras.h"
#include "support/lyxlib.h"
-#include <boost/bind.hpp>
-
using std::min;
using std::string;
namespace Alert = frontend::Alert;
-bool checkIfLoaded(FileName const & fn)
-{
- return theBufferList().getBuffer(fn.absFilename());
-}
-
-
Buffer * checkAndLoadLyXFile(FileName const & filename)
{
// File already open?
if (theBufferList().close(checkBuffer, false))
// Load it again.
return checkAndLoadLyXFile(filename);
- else
- // The file could not be closed.
- return 0;
+ // The file could not be closed.
+ return 0;
}
if (filename.isReadable()) {
Paragraph & prev_par = *prev_it;
depth_type const prev_depth = getDepth(prev_it);
if (labeltype == prev_par.layout()->labeltype) {
- if (prev_depth < min_depth) {
+ if (prev_depth < min_depth)
return prev_par.itemdepth + 1;
- }
- else if (prev_depth == min_depth) {
+ if (prev_depth == min_depth)
return prev_par.itemdepth;
- }
}
min_depth = std::min(min_depth, prev_depth);
// small optimization: if we are at depth 0, we won't
// find anything else
- if (prev_depth == 0) {
+ if (prev_depth == 0)
return 0;
- }
}
}
cbuf.tocBackend().update();
if (!childonly)
cbuf.structureChanged();
- // FIXME
- // the embedding signal is emitted with structureChanged signal
- // this is inaccurate so these two will be separated later.
- //cbuf.embeddedFiles().update();
- //cbuf.embeddingChanged();
}