mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
* src/paragraph_funcs.cpp (breakParagraph): change parameter 'flag' to
simpler 'keep_layout' * src/Text.cpp (breakParagraph): change parameter keep_layout to inverse_logic. * src/Text3.cpp (dispatch): remove LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT; implement "inverse" flag to LFUN_BREAK_PARAGRAPH. * src/LyXAction.cpp: * src/insets/InsetCaption.cpp (doDispatch): * src/insets/InsetFlex.cpp (doDispatch): * src/insets/InsetTabular.cpp (doDispatch): * src/insets/InsetIndex.cpp (doDispatch): * src/lfuns.h: remove all traces of LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT. * lib/bind/cua.bind: * lib/bind/xemacs.bind: * lib/bind/emacs.bind: * lib/bind/mac.bind: adapt bindings. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20846 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2d03368a13
commit
1a53e1099a
@ -194,7 +194,7 @@
|
||||
|
||||
\bind "C-Delete" "word-delete-forward"
|
||||
\bind "C-BackSpace" "word-delete-backward"
|
||||
\bind "M-Return" "break-paragraph-keep-layout"
|
||||
\bind "M-Return" "break-paragraph inverse"
|
||||
\bind "C-Return" "break-line"
|
||||
\bind "C-k" "line-delete-forward"
|
||||
\bind "C-space" "space-insert protected"
|
||||
|
@ -208,7 +208,7 @@
|
||||
\bind "C-Delete" "word-delete-forward"
|
||||
\bind "M-d" "word-delete-forward"
|
||||
\bind "C-BackSpace" "word-delete-backward"
|
||||
\bind "M-Return" "break-paragraph-keep-layout"
|
||||
\bind "M-Return" "break-paragraph inverse"
|
||||
\bind "C-Return" "break-line"
|
||||
\bind "C-S-L" "ligature-break-insert"
|
||||
\bind "C-space" "space-insert protected"
|
||||
|
@ -176,7 +176,7 @@
|
||||
|
||||
\bind "M-Delete" "word-delete-forward"
|
||||
\bind "M-BackSpace" "word-delete-backward"
|
||||
\bind "M-Return" "break-paragraph-keep-layout"
|
||||
\bind "M-Return" "break-paragraph inverse"
|
||||
\bind "C-Return" "break-line"
|
||||
\bind "C-k" "line-delete-forward"
|
||||
\bind "M-space" "space-insert protected"
|
||||
|
@ -219,7 +219,7 @@
|
||||
\bind "C-Delete" "word-delete-forward"
|
||||
\bind "M-d" "word-delete-forward"
|
||||
\bind "C-BackSpace" "word-delete-backward"
|
||||
\bind "M-Return" "break-paragraph-keep-layout"
|
||||
\bind "M-Return" "break-paragraph inverse"
|
||||
\bind "C-Return" "break-line"
|
||||
\bind "C-S-L" "ligature-break-insert"
|
||||
\bind "C-space" "space-insert protected"
|
||||
@ -330,7 +330,7 @@
|
||||
|
||||
\bind "C-c percent" "layout Comment"
|
||||
|
||||
\bind "C-c Return" "break-paragraph-keep-layout"
|
||||
\bind "C-c Return" "break-paragraph inverse"
|
||||
#
|
||||
## End AucTeX
|
||||
#
|
||||
|
@ -16,7 +16,7 @@ de/TOC.lyx: $(srcdir)/de/Customization.lyx $(srcdir)/de/EmbeddedObjects.lyx $(sr
|
||||
TOC.lyx: $(srcdir)/Customization.lyx $(srcdir)/EmbeddedObjects.lyx $(srcdir)/Extended.lyx $(srcdir)/FAQ.lyx $(srcdir)/Intro.lyx $(srcdir)/Tutorial.lyx $(srcdir)/UserGuide.lyx
|
||||
PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py en .
|
||||
|
||||
es/TOC.lyx: $(srcdir)/Customization.lyx $(srcdir)/es/EmbeddedObjects.lyx $(srcdir)/es/Extended.lyx $(srcdir)/FAQ.lyx $(srcdir)/es/Intro.lyx $(srcdir)/es/Tutorial.lyx $(srcdir)/es/UserGuide.lyx
|
||||
es/TOC.lyx: $(srcdir)/Customization.lyx $(srcdir)/FAQ.lyx $(srcdir)/es/EmbeddedObjects.lyx $(srcdir)/es/Extended.lyx $(srcdir)/es/Intro.lyx $(srcdir)/es/Tutorial.lyx $(srcdir)/es/UserGuide.lyx
|
||||
PYTHONPATH=$(top_builddir)/lib/lyx2lyx python -tt $(srcdir)/doc_toc.py es .
|
||||
|
||||
eu/TOC.lyx: $(srcdir)/EmbeddedObjects.lyx $(srcdir)/eu/Customization.lyx $(srcdir)/eu/Extended.lyx $(srcdir)/eu/FAQ.lyx $(srcdir)/eu/Intro.lyx $(srcdir)/eu/Tutorial.lyx $(srcdir)/eu/UserGuide.lyx
|
||||
|
@ -105,7 +105,6 @@ void LyXAction::init()
|
||||
{ LFUN_BOOKMARK_CLEAR, "bookmark-clear", NoBuffer },
|
||||
{ LFUN_BREAK_LINE, "break-line", Noop },
|
||||
{ LFUN_BREAK_PARAGRAPH, "break-paragraph", Noop },
|
||||
{ LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT, "break-paragraph-keep-layout", Noop },
|
||||
{ LFUN_BREAK_PARAGRAPH_SKIP, "break-paragraph-skip", Noop },
|
||||
{ LFUN_BUILD_PROGRAM, "build-program", ReadOnly },
|
||||
{ LFUN_BUFFER_AUTO_SAVE, "buffer-auto-save", Noop },
|
||||
|
12
src/Text.cpp
12
src/Text.cpp
@ -357,7 +357,7 @@ double Text::spacing(Buffer const & buffer,
|
||||
}
|
||||
|
||||
|
||||
void Text::breakParagraph(Cursor & cur, bool keep_layout)
|
||||
void Text::breakParagraph(Cursor & cur, bool inverse_logic)
|
||||
{
|
||||
BOOST_ASSERT(this == cur.text());
|
||||
|
||||
@ -382,11 +382,9 @@ void Text::breakParagraph(Cursor & cur, bool keep_layout)
|
||||
cpar.eraseChar(cur.pos(), cur.buffer().params().trackChanges);
|
||||
|
||||
// What should the layout for the new paragraph be?
|
||||
int preserve_layout = 0;
|
||||
if (keep_layout)
|
||||
preserve_layout = 2;
|
||||
else
|
||||
preserve_layout = layout->isEnvironment();
|
||||
bool keep_layout = inverse_logic ?
|
||||
!layout->isEnvironment()
|
||||
: layout->isEnvironment();
|
||||
|
||||
// We need to remember this before we break the paragraph, because
|
||||
// that invalidates the layout variable
|
||||
@ -396,7 +394,7 @@ void Text::breakParagraph(Cursor & cur, bool keep_layout)
|
||||
bool const isempty = cpar.allowEmpty() && cpar.empty();
|
||||
|
||||
lyx::breakParagraph(cur.buffer().params(), paragraphs(), cpit,
|
||||
cur.pos(), preserve_layout);
|
||||
cur.pos(), keep_layout);
|
||||
|
||||
// After this, neither paragraph contains any rows!
|
||||
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
Font const & font, bool toggleall = false);
|
||||
|
||||
/// what you expect when pressing \<enter\> at cursor position
|
||||
void breakParagraph(Cursor & cur, bool keep_layout = false);
|
||||
void breakParagraph(Cursor & cur, bool inverse_logic = false);
|
||||
|
||||
/// set layout over selection
|
||||
void setLayout(Buffer const & buffer, pit_type start, pit_type end,
|
||||
|
@ -562,13 +562,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
|
||||
case LFUN_BREAK_PARAGRAPH:
|
||||
cap::replaceSelection(cur);
|
||||
breakParagraph(cur, false);
|
||||
cur.resetAnchor();
|
||||
break;
|
||||
|
||||
case LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT:
|
||||
cap::replaceSelection(cur);
|
||||
breakParagraph(cur, true);
|
||||
breakParagraph(cur, cmd.argument() == "inverse");
|
||||
cur.resetAnchor();
|
||||
break;
|
||||
|
||||
@ -1856,7 +1850,6 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
case LFUN_CHAR_DELETE_BACKWARD:
|
||||
case LFUN_DELETE_BACKWARD_SKIP:
|
||||
case LFUN_BREAK_PARAGRAPH:
|
||||
case LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT:
|
||||
case LFUN_BREAK_PARAGRAPH_SKIP:
|
||||
case LFUN_PARAGRAPH_SPACING:
|
||||
case LFUN_INSET_INSERT:
|
||||
|
@ -198,7 +198,6 @@ bool InsetCaption::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
switch (cmd.action) {
|
||||
|
||||
case LFUN_BREAK_PARAGRAPH:
|
||||
case LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT:
|
||||
case LFUN_BREAK_PARAGRAPH_SKIP:
|
||||
status.enabled(false);
|
||||
return true;
|
||||
|
@ -136,7 +136,6 @@ bool InsetFlex::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
switch (cmd.action) {
|
||||
// paragraph breaks not allowed in flex insets
|
||||
case LFUN_BREAK_PARAGRAPH:
|
||||
case LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT:
|
||||
case LFUN_BREAK_PARAGRAPH_SKIP:
|
||||
status.enabled(false);
|
||||
return true;
|
||||
|
@ -102,7 +102,6 @@ bool InsetIndex::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
switch (cmd.action) {
|
||||
// paragraph breaks not allowed
|
||||
case LFUN_BREAK_PARAGRAPH:
|
||||
case LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT:
|
||||
case LFUN_BREAK_PARAGRAPH_SKIP:
|
||||
status.enabled(false);
|
||||
return true;
|
||||
|
@ -3736,7 +3736,6 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
// disable in non-fixed-width cells
|
||||
case LFUN_BREAK_LINE:
|
||||
case LFUN_BREAK_PARAGRAPH:
|
||||
case LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT:
|
||||
case LFUN_BREAK_PARAGRAPH_SKIP: {
|
||||
if (tabular.getPWidth(cur.idx()).zero()) {
|
||||
status.enabled(false);
|
||||
|
98
src/lfuns.h
98
src/lfuns.h
@ -127,285 +127,283 @@ enum kb_action {
|
||||
LFUN_CHAR_DELETE_BACKWARD,
|
||||
LFUN_BREAK_LINE,
|
||||
LFUN_BREAK_PARAGRAPH,
|
||||
LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT,
|
||||
// 65
|
||||
LFUN_QUOTE_INSERT,
|
||||
// 65
|
||||
LFUN_ACCENT_CIRCUMFLEX,
|
||||
LFUN_MATH_SUBSCRIPT,
|
||||
LFUN_MATH_SUPERSCRIPT,
|
||||
LFUN_ACCENT_GRAVE,
|
||||
// 70
|
||||
LFUN_ACCENT_ACUTE,
|
||||
// 70
|
||||
LFUN_ACCENT_TILDE,
|
||||
LFUN_ACCENT_CEDILLA,
|
||||
LFUN_ACCENT_MACRON,
|
||||
LFUN_ACCENT_UNDERBAR,
|
||||
// 75
|
||||
LFUN_ACCENT_UNDERDOT,
|
||||
// 75
|
||||
LFUN_ACCENT_CIRCLE,
|
||||
LFUN_ACCENT_TIE,
|
||||
LFUN_ACCENT_BREVE,
|
||||
LFUN_ACCENT_CARON,
|
||||
// 80
|
||||
LFUN_ACCENT_SPECIAL_CARON,
|
||||
// 80
|
||||
LFUN_ACCENT_HUNGARIAN_UMLAUT,
|
||||
LFUN_ACCENT_UMLAUT,
|
||||
LFUN_ACCENT_DOT,
|
||||
LFUN_ACCENT_OGONEK,
|
||||
// 85
|
||||
LFUN_SELF_INSERT,
|
||||
// 85
|
||||
LFUN_GETBUFNAME,
|
||||
LFUN_SERVER_GET_XY,
|
||||
LFUN_SERVER_SET_XY,
|
||||
LFUN_SERVER_CHAR_AFTER,
|
||||
// 90
|
||||
LFUN_LINEATCURSOR,
|
||||
// 90
|
||||
LFUN_SERVER_GET_LAYOUT,
|
||||
LFUN_SERVER_GET_FONT,
|
||||
LFUN_SERVER_GET_NAME,
|
||||
LFUN_SERVER_NOTIFY,
|
||||
// 95
|
||||
LFUN_SERVER_GOTO_FILE_ROW,
|
||||
// 95
|
||||
LFUN_NOTE_INSERT,
|
||||
LFUN_ENVIRONMENT_INSERT, // unused as of 20060905
|
||||
LFUN_KEYMAP_OFF,
|
||||
LFUN_KEYMAP_PRIMARY,
|
||||
// 100
|
||||
LFUN_KEYMAP_SECONDARY,
|
||||
// 100
|
||||
LFUN_KEYMAP_TOGGLE,
|
||||
LFUN_MATH_INSERT,
|
||||
LFUN_MATH_MATRIX,
|
||||
LFUN_MATH_LIMITS,
|
||||
// 105
|
||||
LFUN_MATH_DELIM, // Alejandro 180696
|
||||
// 105
|
||||
LFUN_MATH_DISPLAY, // Alejandro 180696
|
||||
LFUN_MATH_MODE, // Alejandro 040696
|
||||
LFUN_MATH_NUMBER, // Alejandro 040696
|
||||
LFUN_MATH_NONUMBER, // Alejandro 180696
|
||||
// 110
|
||||
LFUN_MATH_SIZE, // Alejandro 150896
|
||||
// 110
|
||||
LFUN_MATH_MACRO, // ale970510
|
||||
LFUN_MATH_EXTERN, // Andre' 20010424
|
||||
LFUN_MATH_MUTATE, // Andre' 20010523
|
||||
LFUN_MATH_IMPORT_SELECTION, // Andre' 20010704
|
||||
// 115
|
||||
LFUN_MATH_SPACE, // Andre' 20010725
|
||||
// 115
|
||||
LFUN_WORD_DELETE_FORWARD,
|
||||
LFUN_WORD_DELETE_BACKWARD,
|
||||
LFUN_LINE_DELETE,
|
||||
LFUN_MARK_OFF,
|
||||
// 120
|
||||
LFUN_MARK_ON,
|
||||
// 120
|
||||
LFUN_LAYOUT,
|
||||
LFUN_LAYOUT_PARAGRAPH,
|
||||
LFUN_DROP_LAYOUTS_CHOICE, // used in bindings as of 20060905
|
||||
LFUN_FONT_TYPEWRITER, // changed from FONT_CODE 20070920
|
||||
// 125
|
||||
LFUN_FONT_SANS,
|
||||
// 125
|
||||
LFUN_FONT_DEFAULT,
|
||||
LFUN_FONT_UNDERLINE,
|
||||
LFUN_FONT_SIZE,
|
||||
LFUN_FONT_STATE,
|
||||
// 130
|
||||
LFUN_WORD_UPCASE,
|
||||
// 130
|
||||
LFUN_WORD_LOWCASE,
|
||||
LFUN_WORD_CAPITALIZE,
|
||||
LFUN_LABEL_INSERT,
|
||||
LFUN_DEPTH_DECREMENT,
|
||||
// 135
|
||||
LFUN_DEPTH_INCREMENT,
|
||||
// 135
|
||||
LFUN_MENU_OPEN, // used in bindings as of 20060905
|
||||
LFUN_CANCEL,
|
||||
LFUN_META_PREFIX,
|
||||
LFUN_COMMAND_EXECUTE,
|
||||
// 140
|
||||
LFUN_FILE_INSERT,
|
||||
// 140
|
||||
LFUN_FILE_INSERT_PLAINTEXT, // CFO-G 1997-11-19
|
||||
LFUN_FILE_INSERT_PLAINTEXT_PARA,// Levon 2001-02-14
|
||||
LFUN_FILE_NEW, // for scripting purposes
|
||||
LFUN_FILE_OPEN,
|
||||
// 145
|
||||
LFUN_PARAGRAPH_UP, // Asger 1996-10-01
|
||||
// 145
|
||||
LFUN_PARAGRAPH_UP_SELECT, // Asger 1996-10-01
|
||||
LFUN_PARAGRAPH_DOWN, // Asger 1996-10-01
|
||||
LFUN_PARAGRAPH_DOWN_SELECT, // Asger 1996-10-01
|
||||
LFUN_BREAK_PARAGRAPH_SKIP,
|
||||
// 150
|
||||
LFUN_DELETE_BACKWARD_SKIP,
|
||||
// 150
|
||||
LFUN_DELETE_FORWARD_SKIP,
|
||||
LFUN_BUFFER_NEW_TEMPLATE, // Asger 1997-02-02
|
||||
LFUN_BUFFER_RELOAD, // Asger 1997-02-02
|
||||
LFUN_RECONFIGURE, // Asger 1997-02-14
|
||||
// 155
|
||||
LFUN_INDEX_PRINT, // Lgb 97-02-27
|
||||
// 155
|
||||
LFUN_CELL_SPLIT,
|
||||
LFUN_BUFFER_CHILD_OPEN, // Ale 970528
|
||||
LFUN_TOC_INSERT, // Lgb 97-05-27
|
||||
LFUN_FLOAT_LIST, // Lgb 20010503
|
||||
// 160
|
||||
LFUN_BUFFER_TOGGLE_READ_ONLY, // Lgb 97-05-27
|
||||
// 160
|
||||
LFUN_VC_REGISTER, // Lgb 97-07-01
|
||||
LFUN_VC_CHECK_IN, // Lgb 97-07-01
|
||||
LFUN_VC_CHECK_OUT, // Lgb 97-07-01
|
||||
LFUN_VC_REVERT, // Lgb 97-07-01
|
||||
// 165
|
||||
LFUN_VC_UNDO_LAST, // Lgb 97-07-01
|
||||
// 165
|
||||
LFUN_BUFFER_EXPORT, // Lgb 97-07-29
|
||||
LFUN_LABEL_GOTO, // Ale 970806
|
||||
LFUN_DOTS_INSERT, // Asger 970929
|
||||
LFUN_END_OF_SENTENCE_PERIOD_INSERT, // Asger 970929
|
||||
// 170
|
||||
LFUN_TOGGLE_CURSOR_FOLLOWS_SCROLLBAR, // ARRae 971202
|
||||
// 170
|
||||
LFUN_BUFFER_CHKTEX, // Asger 971030
|
||||
LFUN_HTML_INSERT, // CFO-G 971121; must co-exist with URL_INSERT as of 20060905
|
||||
LFUN_URL_INSERT, // CFO-G 971121
|
||||
LFUN_WORD_FIND_FORWARD, // Etienne 980216
|
||||
// 175
|
||||
LFUN_WORD_FIND_BACKWARD, // Etienne 980220
|
||||
// 175
|
||||
LFUN_APPENDIX, // ettrich 980505
|
||||
LFUN_BUFFER_IMPORT, // Asger 980724
|
||||
LFUN_MENU_SEPARATOR_INSERT, // Asger 990220
|
||||
LFUN_COMMAND_SEQUENCE, // Andre' 991111
|
||||
// 180
|
||||
LFUN_PREFERENCES_SAVE, // Lgb 991127
|
||||
// 180
|
||||
LFUN_HELP_OPEN, // Jug 990627
|
||||
LFUN_DATE_INSERT, // jdblair 20000131
|
||||
LFUN_LANGUAGE, // Dekel 20000203
|
||||
LFUN_ERT_INSERT, // Jug 20000218
|
||||
// 185
|
||||
LFUN_FOOTNOTE_INSERT, // Jug 20000307
|
||||
// 185
|
||||
LFUN_PARAGRAPH_SPACING, // Lgb 20000411
|
||||
LFUN_TABULAR_INSERT, // Jug 20000412
|
||||
LFUN_LOFVIEW, // Dekel 20000519
|
||||
LFUN_LOTVIEW, // Dekel 20000519
|
||||
// 190
|
||||
LFUN_LOAVIEW, // Dekel 20000519
|
||||
// 190
|
||||
LFUN_SET_COLOR, // SLior 20000611
|
||||
LFUN_MARGINALNOTE_INSERT, // Lgb 20000626
|
||||
LFUN_FLOAT_INSERT, // Lgb 20000627
|
||||
LFUN_FLOAT_WIDE_INSERT, // Lgb 20010531
|
||||
// 195
|
||||
LFUN_CAPTION_INSERT, // Lgb 20000718; inactive as of 20060905
|
||||
// 195
|
||||
LFUN_BUFFER_SWITCH,
|
||||
LFUN_TABULAR_FEATURE, // Jug 20000728
|
||||
LFUN_LAYOUT_TABULAR, // Jug 20000731
|
||||
LFUN_BUFFER_UPDATE, // Dekel 20000805
|
||||
// 200
|
||||
LFUN_INDEX_INSERT, // Angus 20000803
|
||||
// 200
|
||||
LFUN_SCREEN_FONT_UPDATE, // ARRae 20000813
|
||||
LFUN_PARAGRAPH_GOTO, // Dekel 20000826
|
||||
LFUN_REFERENCE_NEXT, // Dekel 20010114
|
||||
LFUN_BOOKMARK_SAVE, // Dekel 20010127
|
||||
// 205
|
||||
LFUN_BOOKMARK_GOTO, // Dekel 20010127
|
||||
// 205
|
||||
LFUN_SELECT_FILE_SYNC, // Levon 20010214
|
||||
LFUN_MESSAGE, // Lgb 20010408; for scripting purposes, output in minibuffer
|
||||
LFUN_CHARS_TRANSPOSE, // Lgb 20010425
|
||||
LFUN_ESCAPE, // Lgb 20010517
|
||||
// 210
|
||||
LFUN_THESAURUS_ENTRY, // Levon 20010720
|
||||
// 210
|
||||
LFUN_OPTIONAL_INSERT, // Martin 12 Aug 2002
|
||||
LFUN_MOUSE_PRESS, // André 9 Aug 2002
|
||||
LFUN_MOUSE_MOTION, // André 9 Aug 2002
|
||||
LFUN_MOUSE_RELEASE, // André 9 Aug 2002
|
||||
// 215
|
||||
LFUN_MOUSE_DOUBLE, // André 9 Aug 2002
|
||||
// 215
|
||||
LFUN_MOUSE_TRIPLE, // André 9 Aug 2002
|
||||
LFUN_WRAP_INSERT, // Dekel 7 Apr 2002
|
||||
LFUN_CHANGES_TRACK, // Levon 20021001 (cool date !)
|
||||
LFUN_CHANGES_MERGE, // Levon 20021016
|
||||
// 220
|
||||
LFUN_CHANGE_ACCEPT, // Levon 20021016
|
||||
// 220
|
||||
LFUN_CHANGE_REJECT, // Levon 20021016
|
||||
LFUN_ALL_CHANGES_ACCEPT, // Levon 20021016
|
||||
LFUN_ALL_CHANGES_REJECT, // Levon 20021016
|
||||
LFUN_BIBITEM_INSERT, // André 14 Feb 2003
|
||||
// 225
|
||||
LFUN_DIALOG_SHOW,
|
||||
// 225
|
||||
LFUN_DIALOG_SHOW_NEW_INSET,
|
||||
LFUN_DIALOG_UPDATE,
|
||||
LFUN_DIALOG_HIDE,
|
||||
LFUN_DIALOG_TOGGLE, // JSpitzm 20070430
|
||||
// 230
|
||||
LFUN_DIALOG_DISCONNECT_INSET,
|
||||
// 230
|
||||
LFUN_INSET_APPLY,
|
||||
LFUN_INSET_INSERT,
|
||||
LFUN_INSET_MODIFY,
|
||||
LFUN_INSET_DIALOG_UPDATE,
|
||||
// 235
|
||||
LFUN_INSET_SETTINGS,
|
||||
// 235
|
||||
LFUN_PARAGRAPH_PARAMS_APPLY,
|
||||
LFUN_PARAGRAPH_UPDATE,
|
||||
LFUN_EXTERNAL_EDIT,
|
||||
LFUN_BRANCH_INSERT,
|
||||
// 240
|
||||
LFUN_BOX_INSERT,
|
||||
// 240
|
||||
LFUN_LINE_INSERT,
|
||||
LFUN_PAGEBREAK_INSERT,
|
||||
LFUN_REPEAT,
|
||||
LFUN_FINISHED_LEFT,
|
||||
// 245
|
||||
LFUN_FINISHED_RIGHT,
|
||||
// 245
|
||||
LFUN_FLEX_INSERT,
|
||||
LFUN_WORD_FIND,
|
||||
LFUN_WORD_REPLACE,
|
||||
LFUN_BUFFER_EXPORT_CUSTOM,
|
||||
// 250
|
||||
LFUN_BUFFER_PRINT,
|
||||
// 250
|
||||
LFUN_NEXT_INSET_TOGGLE,
|
||||
LFUN_ALL_INSETS_TOGGLE,
|
||||
LFUN_BUFFER_LANGUAGE,
|
||||
LFUN_TEXTCLASS_APPLY,
|
||||
// 255
|
||||
LFUN_TEXTCLASS_LOAD,
|
||||
// 255
|
||||
LFUN_BUFFER_SAVE_AS_DEFAULT,
|
||||
LFUN_BUFFER_PARAMS_APPLY,
|
||||
LFUN_LYXRC_APPLY,
|
||||
LFUN_GRAPHICS_EDIT,
|
||||
// 260
|
||||
LFUN_INSET_REFRESH,
|
||||
// 260
|
||||
LFUN_BUFFER_NEXT,
|
||||
LFUN_BUFFER_PREVIOUS,
|
||||
LFUN_WORDS_COUNT,
|
||||
LFUN_CHANGES_OUTPUT, // jspitzm 20050121
|
||||
// 265
|
||||
LFUN_BIBTEX_DATABASE_ADD,
|
||||
// 265
|
||||
LFUN_BIBTEX_DATABASE_DEL,
|
||||
LFUN_CITATION_INSERT,
|
||||
LFUN_OUTLINE_UP, // Vermeer 20060323
|
||||
LFUN_OUTLINE_DOWN,
|
||||
// 270
|
||||
LFUN_OUTLINE_IN,
|
||||
// 270
|
||||
LFUN_OUTLINE_OUT,
|
||||
LFUN_PARAGRAPH_MOVE_DOWN, // Edwin 20060408
|
||||
LFUN_PARAGRAPH_MOVE_UP, // Edwin 20060408
|
||||
LFUN_BUFFER_TOGGLE_COMPRESSION, // bpeng 20060427
|
||||
// 275
|
||||
LFUN_MATH_BIGDELIM,
|
||||
// 275
|
||||
LFUN_CLIPBOARD_PASTE,
|
||||
LFUN_INSET_DISSOLVE, // jspitzm 20060807
|
||||
LFUN_CHANGE_NEXT,
|
||||
LFUN_WINDOW_NEW, // Abdel 20061021
|
||||
// 280
|
||||
LFUN_WINDOW_CLOSE, // Abdel 20061023
|
||||
// 280
|
||||
LFUN_UNICODE_INSERT, // Lgb 20061022
|
||||
LFUN_BOOKMARK_CLEAR, // bpeng 20061031
|
||||
LFUN_NOMENCL_INSERT, // Ugras
|
||||
LFUN_NOMENCL_PRINT, // Ugras
|
||||
// 285
|
||||
LFUN_CLEARPAGE_INSERT, // Ugras 20061125
|
||||
// 285
|
||||
LFUN_CLEARDOUBLEPAGE_INSERT, // Ugras 20061125
|
||||
LFUN_LISTING_INSERT, // Herbert 20011110, bpeng 20070502
|
||||
LFUN_TOOLBAR_TOGGLE, // Edwin 20070521
|
||||
LFUN_BUFFER_WRITE_ALL, // rgh, gpothier 200707XX
|
||||
// 290
|
||||
LFUN_PARAGRAPH_PARAMS, // rgh, 200708XX
|
||||
// 290
|
||||
LFUN_LAYOUT_MODULES_CLEAR, // rgh, 20070825
|
||||
LFUN_LAYOUT_MODULE_ADD, // rgh, 20070825
|
||||
LFUN_LAYOUT_RELOAD, // rgh, 20070903
|
||||
LFUN_MASTER_BUFFER_VIEW, // Tommaso, 20070920
|
||||
// 295
|
||||
LFUN_MASTER_BUFFER_UPDATE, // Tommaso, 20070920
|
||||
LFUN_MASTER_BUFFER_VIEW, // Tommaso, 20070920
|
||||
LFUN_MASTER_BUFFER_UPDATE, // Tommaso, 20070920
|
||||
|
||||
LFUN_LASTACTION // end of the table
|
||||
};
|
||||
|
@ -62,7 +62,8 @@ static bool moveItem(Paragraph & fromPar, pos_type fromPos,
|
||||
|
||||
|
||||
void breakParagraph(BufferParams const & bparams,
|
||||
ParagraphList & pars, pit_type par_offset, pos_type pos, int flag)
|
||||
ParagraphList & pars, pit_type par_offset, pos_type pos,
|
||||
bool keep_layout)
|
||||
{
|
||||
// create a new paragraph, and insert into the list
|
||||
ParagraphList::iterator tmp =
|
||||
@ -78,7 +79,7 @@ void breakParagraph(BufferParams const & bparams,
|
||||
tmp->setInsetOwner(par.inInset());
|
||||
|
||||
// layout stays the same with latex-environments
|
||||
if (flag) {
|
||||
if (keep_layout) {
|
||||
tmp->layout(par.layout());
|
||||
tmp->setLabelWidthString(par.params().labelWidthString());
|
||||
tmp->params().depth(par.params().depth());
|
||||
@ -92,7 +93,7 @@ void breakParagraph(BufferParams const & bparams,
|
||||
|
||||
bool const isempty = (par.allowEmpty() && par.empty());
|
||||
|
||||
if (!isempty && (par.size() > pos || par.empty() || flag == 2)) {
|
||||
if (!isempty && (par.size() > pos || par.empty())) {
|
||||
tmp->layout(par.layout());
|
||||
tmp->params().align(par.params().align());
|
||||
tmp->setLabelWidthString(par.params().labelWidthString());
|
||||
@ -144,7 +145,7 @@ void breakParagraph(BufferParams const & bparams,
|
||||
}
|
||||
|
||||
// layout stays the same with latex-environments
|
||||
if (flag) {
|
||||
if (keep_layout) {
|
||||
par.layout(tmp->layout());
|
||||
par.setLabelWidthString(tmp->params().labelWidthString());
|
||||
par.params().depth(tmp->params().depth());
|
||||
|
@ -27,9 +27,9 @@ class ParagraphList;
|
||||
/**
|
||||
* This breaks a paragraph at the specified position.
|
||||
* The new paragraph will:
|
||||
* get the default layout, when flag == 0
|
||||
* will inherit the existing one, except for depth, when flag == 1
|
||||
* will inherit the existing one, including depth, when flag == 2
|
||||
* - Decrease depth by one (or chenge layout to default layout when
|
||||
* keep_layout == false
|
||||
* - keep current depth and layout when keep_layout == true
|
||||
* Be aware that the old or new paragraph does not contain any rows
|
||||
* after this.
|
||||
*/
|
||||
@ -37,7 +37,7 @@ void breakParagraph(BufferParams const & bparams,
|
||||
ParagraphList & paragraphs,
|
||||
pit_type par,
|
||||
pos_type pos,
|
||||
int flag);
|
||||
bool keep_layout);
|
||||
|
||||
///
|
||||
void breakParagraphConservative(BufferParams const & bparams,
|
||||
|
Loading…
Reference in New Issue
Block a user