mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
MacroData has a buffer_ member, so use this instead of a dummy one.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30871 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d53c2ec215
commit
abb1ff4a66
@ -19,19 +19,16 @@
|
||||
#include "InsetMathNest.h"
|
||||
|
||||
#include "Buffer.h"
|
||||
#include "BufferList.h"
|
||||
#include "DocIterator.h"
|
||||
#include "InsetList.h"
|
||||
#include "Text.h"
|
||||
|
||||
#include "support/debug.h"
|
||||
#include "support/FileName.h"
|
||||
#include "support/lassert.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
using namespace std;
|
||||
using namespace lyx::support;
|
||||
|
||||
namespace lyx {
|
||||
|
||||
@ -70,19 +67,13 @@ void MacroData::expand(vector<MathData> const & args, MathData & to) const
|
||||
updateData();
|
||||
|
||||
// Hack. Any inset with a cell would do.
|
||||
static Buffer * buffer = 0;
|
||||
if (!buffer) {
|
||||
buffer = theBufferList().newBuffer(
|
||||
FileName::tempName().absFilename() + "_macrodata.internal");
|
||||
buffer->setUnnamed(true);
|
||||
}
|
||||
static InsetMathSqrt inset;
|
||||
|
||||
// FIXME UNICODE
|
||||
asArray(display_.empty() ? definition_ : display_, inset.cell(0));
|
||||
//lyxerr << "MathData::expand: args: " << args << endl;
|
||||
//lyxerr << "MathData::expand: ar: " << inset.cell(0) << endl;
|
||||
for (DocIterator it = doc_iterator_begin(buffer, &inset); it; it.forwardChar()) {
|
||||
for (DocIterator it = doc_iterator_begin(buffer_, &inset); it; it.forwardChar()) {
|
||||
if (!it.nextInset())
|
||||
continue;
|
||||
if (it.nextInset()->lyxCode() != MATH_MACROARG_CODE)
|
||||
|
Loading…
Reference in New Issue
Block a user