Abdelrazak Younes ha scritto:
What about the buffer().isInternal() or buffer().internal() method ?
Afterward, implementation may be changed as appropriate.
OK for the new buffer().isInternal() but this method should be used in the same commit. I guess this is in TocBackend.cpp:

-     buffer_->inset().addToToc(dit);
+    if ( buffer_->isInternal())
+        buffer_->inset().addToToc(dit);

Or something like that...
if ( ! buffer_->isInternal() )
 buffer_->inset().addToToc(dit);

However, the problem still remains of how to declare a buffer as internal. As of now, we have in GuiWorkArea.cpp:

   buffer_ = theBufferList().newBuffer(
       support::FileName::tempName().absFilename() + "_embedded.internal");
   buffer_->setUnnamed(true);

So, the lightest change w.r.t. current code is simply a:

 bool Buffer::isInternal() {
    return fileName().extension() == "internal"
 }

Bye,

   T.

Reply via email to