mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-14 04:21:56 +00:00
Fix bug 5374
http://bugzilla.lyx.org/show_bug.cgi?id=5374 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26983 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f3117747ff
commit
96007ce5ac
@ -801,7 +801,7 @@ void clearCutStack()
|
||||
docstring selection(size_t sel_index)
|
||||
{
|
||||
return sel_index < theCuts.size()
|
||||
? theCuts[sel_index].first.back().asString(AS_STR_INSETS)
|
||||
? theCuts[sel_index].first.back().asString(AS_STR_INSETS | AS_STR_NEWLINES)
|
||||
: docstring();
|
||||
}
|
||||
|
||||
|
@ -2422,7 +2422,8 @@ docstring Paragraph::asString(pos_type beg, pos_type end, int options) const
|
||||
|
||||
for (pos_type i = beg; i < end; ++i) {
|
||||
char_type const c = d->text_[i];
|
||||
if (isPrintable(c) || c == '\t')
|
||||
if (isPrintable(c) || c == '\t'
|
||||
|| (c == '\n' && options & AS_STR_NEWLINES))
|
||||
os.put(c);
|
||||
else if (c == META_INSET && options & AS_STR_INSETS)
|
||||
getInset(i)->textString(os);
|
||||
|
@ -78,7 +78,8 @@ enum AsStringParameter
|
||||
{
|
||||
AS_STR_NONE = 0, ///< No option, only printable characters.
|
||||
AS_STR_LABEL = 1, ///< Prefix with paragraph label.
|
||||
AS_STR_INSETS = 2 ///< Go into insets.
|
||||
AS_STR_INSETS = 2, ///< Go into insets.
|
||||
AS_STR_NEWLINES = 4 ///< Get also newline characters.
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user