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
bcbf9eeb
Commit
bcbf9eeb
authored
Jan 27, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Start implementing object reading out RTF stream.
parent
e5f91bab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
editor.c
dlls/riched20/editor.c
+42
-0
No files found.
dlls/riched20/editor.c
View file @
bcbf9eeb
...
...
@@ -849,6 +849,47 @@ skip_group:
RTFRouteToken
(
info
);
/* feed "}" back to router */
}
/* for now, lookup the \result part and use it, whatever the object */
static
void
ME_RTFReadObjectGroup
(
RTF_Info
*
info
)
{
for
(;;)
{
RTFGetToken
(
info
);
if
(
info
->
rtfClass
==
rtfEOF
)
return
;
if
(
RTFCheckCM
(
info
,
rtfGroup
,
rtfEndGroup
))
break
;
if
(
RTFCheckCM
(
info
,
rtfGroup
,
rtfBeginGroup
))
{
RTFGetToken
(
info
);
if
(
info
->
rtfClass
==
rtfEOF
)
return
;
if
(
RTFCheckCMM
(
info
,
rtfControl
,
rtfDestination
,
rtfObjResult
))
{
int
level
=
1
;
while
(
RTFGetToken
(
info
)
!=
rtfEOF
)
{
if
(
info
->
rtfClass
==
rtfGroup
)
{
if
(
info
->
rtfMajor
==
rtfBeginGroup
)
level
++
;
else
if
(
info
->
rtfMajor
==
rtfEndGroup
&&
--
level
<
0
)
break
;
}
RTFRouteToken
(
info
);
}
}
else
RTFSkipGroup
(
info
);
continue
;
}
if
(
!
RTFCheckCM
(
info
,
rtfControl
,
rtfObjAttr
))
{
FIXME
(
"Non supported attribute: %d %d %d
\n
"
,
info
->
rtfClass
,
info
->
rtfMajor
,
info
->
rtfMinor
);
return
;
}
}
RTFRouteToken
(
info
);
/* feed "}" back to router */
}
static
void
ME_RTFReadHook
(
RTF_Info
*
info
)
{
switch
(
info
->
rtfClass
)
{
...
...
@@ -988,6 +1029,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
RTFInit
(
&
parser
);
RTFSetReadHook
(
&
parser
,
ME_RTFReadHook
);
RTFSetDestinationCallback
(
&
parser
,
rtfPict
,
ME_RTFReadPictGroup
);
RTFSetDestinationCallback
(
&
parser
,
rtfObject
,
ME_RTFReadObjectGroup
);
BeginFile
(
&
parser
);
/* do the parsing */
...
...
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