Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
54b53b60
Commit
54b53b60
authored
Aug 13, 2009
by
Dylan Smith
Committed by
Alexandre Julliard
Aug 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Use ME_Cursor instead of offsets for stream out functions.
parent
bd470428
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
clipboard.c
dlls/riched20/clipboard.c
+3
-6
editor.h
dlls/riched20/editor.h
+1
-1
writer.c
dlls/riched20/writer.c
+0
-0
No files found.
dlls/riched20/clipboard.c
View file @
54b53b60
...
...
@@ -375,7 +375,7 @@ static DWORD CALLBACK ME_AppendToHGLOBAL(DWORD_PTR dwCookie, LPBYTE lpBuff, LONG
return
0
;
}
static
HGLOBAL
get_rtf_text
(
ME_TextEditor
*
editor
,
const
CHARRANGE
*
lpchrg
)
static
HGLOBAL
get_rtf_text
(
ME_TextEditor
*
editor
,
const
ME_Cursor
*
start
,
int
nChars
)
{
EDITSTREAM
es
;
ME_GlobalDestStruct
gds
;
...
...
@@ -384,7 +384,7 @@ static HGLOBAL get_rtf_text(ME_TextEditor *editor, const CHARRANGE *lpchrg)
gds
.
nLength
=
0
;
es
.
dwCookie
=
(
DWORD_PTR
)
&
gds
;
es
.
pfnCallback
=
ME_AppendToHGLOBAL
;
ME_StreamOutRange
(
editor
,
SF_RTF
,
lpchrg
->
cpMin
,
lpchrg
->
cpMax
,
&
es
);
ME_StreamOutRange
(
editor
,
SF_RTF
,
start
,
nChars
,
&
es
);
GlobalReAlloc
(
gds
.
hData
,
gds
.
nLength
+
1
,
0
);
return
gds
.
hData
;
}
...
...
@@ -410,10 +410,7 @@ HRESULT ME_GetDataObject(ME_TextEditor *editor, const ME_Cursor *start,
obj
->
fmtetc
=
GlobalAlloc
(
GMEM_ZEROINIT
,
obj
->
fmtetc_cnt
*
sizeof
(
FORMATETC
));
InitFormatEtc
(
obj
->
fmtetc
[
0
],
CF_UNICODETEXT
,
TYMED_HGLOBAL
);
if
(
editor
->
mode
&
TM_RICHTEXT
)
{
CHARRANGE
chrg
;
chrg
.
cpMin
=
ME_GetCursorOfs
(
start
);
chrg
.
cpMax
=
chrg
.
cpMin
+
nChars
;
obj
->
rtf
=
get_rtf_text
(
editor
,
&
chrg
);
obj
->
rtf
=
get_rtf_text
(
editor
,
start
,
nChars
);
InitFormatEtc
(
obj
->
fmtetc
[
1
],
cfRTF
,
TYMED_HGLOBAL
);
}
...
...
dlls/riched20/editor.h
View file @
54b53b60
...
...
@@ -329,7 +329,7 @@ BOOL ME_Redo(ME_TextEditor *editor);
void
ME_EmptyUndoStack
(
ME_TextEditor
*
editor
);
/* writer.c */
LRESULT
ME_StreamOutRange
(
ME_TextEditor
*
editor
,
DWORD
dwFormat
,
int
nStart
,
int
nTo
,
EDITSTREAM
*
stream
);
LRESULT
ME_StreamOutRange
(
ME_TextEditor
*
editor
,
DWORD
dwFormat
,
const
ME_Cursor
*
start
,
int
nChars
,
EDITSTREAM
*
stream
);
LRESULT
ME_StreamOut
(
ME_TextEditor
*
editor
,
DWORD
dwFormat
,
EDITSTREAM
*
stream
);
/* clipboard.c */
...
...
dlls/riched20/writer.c
View file @
54b53b60
This diff is collapsed.
Click to expand it.
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