Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
a64c22c8
Commit
a64c22c8
authored
Mar 16, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Store shift-enter (keyboard) and \line (rtf) as end of row (and emit…
richedit: Store shift-enter (keyboard) and \line (rtf) as end of row (and emit \line while saving in RTF).
parent
4fb2dfc9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
2 deletions
+29
-2
caret.c
dlls/riched20/caret.c
+15
-0
editor.c
dlls/riched20/editor.c
+4
-1
editor.h
dlls/riched20/editor.h
+1
-0
reader.c
dlls/riched20/reader.c
+5
-1
writer.c
dlls/riched20/writer.c
+4
-0
No files found.
dlls/riched20/caret.c
View file @
a64c22c8
...
...
@@ -411,6 +411,21 @@ void ME_InsertOLEFromCursor(ME_TextEditor *editor, const REOBJECT* reo, int nCur
}
void
ME_InsertEndRowFromCursor
(
ME_TextEditor
*
editor
,
int
nCursor
)
{
ME_Style
*
pStyle
=
ME_GetInsertStyle
(
editor
,
nCursor
);
ME_DisplayItem
*
di
;
WCHAR
space
=
' '
;
/* FIXME no no no */
if
(
ME_IsSelection
(
editor
))
ME_DeleteSelection
(
editor
);
di
=
ME_InternalInsertTextFromCursor
(
editor
,
nCursor
,
&
space
,
1
,
pStyle
,
MERF_ENDROW
);
ME_SendSelChange
(
editor
);
}
void
ME_InsertTableCellFromCursor
(
ME_TextEditor
*
editor
,
int
nCursor
)
{
...
...
dlls/riched20/editor.c
View file @
a64c22c8
...
...
@@ -2960,7 +2960,10 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
{
ME_Style
*
style
=
ME_GetInsertStyle
(
editor
,
0
);
ME_SaveTempStyle
(
editor
);
ME_InsertTextFromCursor
(
editor
,
0
,
&
wstr
,
1
,
style
);
if
(
wstr
==
'\r'
&&
(
GetKeyState
(
VK_SHIFT
)
&
0x8000
))
ME_InsertEndRowFromCursor
(
editor
,
0
);
else
ME_InsertTextFromCursor
(
editor
,
0
,
&
wstr
,
1
,
style
);
ME_ReleaseStyle
(
style
);
ME_CommitUndo
(
editor
);
}
...
...
dlls/riched20/editor.h
View file @
a64c22c8
...
...
@@ -186,6 +186,7 @@ void ME_MouseMove(ME_TextEditor *editor, int x, int y);
void
ME_DeleteTextAtCursor
(
ME_TextEditor
*
editor
,
int
nCursor
,
int
nChars
);
void
ME_InsertTextFromCursor
(
ME_TextEditor
*
editor
,
int
nCursor
,
const
WCHAR
*
str
,
int
len
,
ME_Style
*
style
);
void
ME_InsertEndRowFromCursor
(
ME_TextEditor
*
editor
,
int
nCursor
);
BOOL
ME_ArrowKey
(
ME_TextEditor
*
ed
,
int
nVKey
,
BOOL
extend
,
BOOL
ctrl
);
void
ME_InitContext
(
ME_Context
*
c
,
ME_TextEditor
*
editor
,
HDC
hDC
);
...
...
dlls/riched20/reader.c
View file @
a64c22c8
...
...
@@ -2596,10 +2596,13 @@ static void SpecialChar (RTF_Info *info)
}
break
;
}
case
rtfLine
:
RTFFlushOutputBuffer
(
info
);
ME_InsertEndRowFromCursor
(
info
->
editor
,
0
);
break
;
case
rtfPage
:
case
rtfSect
:
case
rtfRow
:
case
rtfLine
:
case
rtfPar
:
RTFPutUnicodeChar
(
info
,
'\n'
);
break
;
...
...
@@ -2648,6 +2651,7 @@ RTFFlushUnicodeOutputBuffer(RTF_Info *info)
}
}
static
void
RTFPutUnicodeString
(
RTF_Info
*
info
,
const
WCHAR
*
string
,
int
length
)
{
...
...
dlls/riched20/writer.c
View file @
a64c22c8
...
...
@@ -714,6 +714,10 @@ ME_StreamOutRTF(ME_TextEditor *editor, ME_OutStream *pStream, int nStart, int nC
nChars
--
;
if
(
editor
->
bEmulateVersion10
&&
nChars
)
nChars
--
;
}
else
if
(
p
->
member
.
run
.
nFlags
&
MERF_ENDROW
)
{
if
(
!
ME_StreamOutPrint
(
pStream
,
"
\\
line
\r\n
"
))
return
FALSE
;
nChars
--
;
}
else
{
int
nEnd
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment