Stay on the safe side: prevent filename clashing.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25599 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-07-14 09:00:11 +00:00
parent e61643b43b
commit d6e9c4eec0

View File

@ -366,7 +366,8 @@ void putClipboard(ParagraphList const & paragraphs,
// a DocumentClass, via new, that is never deleted. If we were to go to
// some kind of garbage collection there, or a shared_ptr, then this
// would not be needed.
static Buffer * buffer = theBufferList().newBuffer("");
static Buffer * buffer = theBufferList().newBuffer(
FileName::tempName().absFilename());
buffer->setUnnamed(true);
buffer->paragraphs() = paragraphs;
buffer->params().setDocumentClass(docclass);