mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix the bug reported by Markus Mayer, that paragraph styles like
itemize too readily enter into charstyle insets. * insetcharstyle.C (InsetCharStyle::doDispatch): force pasted paragraphs to document default style * insetcharstyle.h: add forceDefaultParagraphs to true git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13494 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e46d6cfc53
commit
23b74fa112
@ -14,7 +14,9 @@
|
||||
|
||||
#include "insetcharstyle.h"
|
||||
|
||||
#include "buffer.h"
|
||||
#include "BufferView.h"
|
||||
#include "bufferparams.h"
|
||||
#include "dispatchresult.h"
|
||||
#include "funcrequest.h"
|
||||
#include "FuncStatus.h"
|
||||
@ -233,7 +235,18 @@ void InsetCharStyle::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
else
|
||||
InsetText::doDispatch(cur, cmd);
|
||||
break;
|
||||
|
||||
case LFUN_PASTE:
|
||||
case LFUN_PASTESELECTION: {
|
||||
InsetCollapsable::doDispatch(cur, cmd);
|
||||
BufferParams const & bp = cur.buffer().params();
|
||||
LyXLayout_ptr const layout =
|
||||
bp.getLyXTextClass().defaultLayout();
|
||||
ParagraphList::iterator const end = paragraphs().end();
|
||||
for (ParagraphList::iterator par = paragraphs().begin();
|
||||
par != end; ++par)
|
||||
par->layout(layout);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
InsetCollapsable::doDispatch(cur, cmd);
|
||||
break;
|
||||
|
@ -69,6 +69,8 @@ public:
|
||||
///
|
||||
void getDrawFont(LyXFont &) const;
|
||||
///
|
||||
bool forceDefaultParagraphs(idx_type) const { return true; }
|
||||
///
|
||||
int latex(Buffer const &, std::ostream &,
|
||||
OutputParams const &) const;
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user