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
1e62b0e3
Commit
1e62b0e3
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: Support a couple of paragraphs attributes out of RTF stream reading.
parent
25115380
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
143 additions
and
0 deletions
+143
-0
editor.c
dlls/riched20/editor.c
+143
-0
No files found.
dlls/riched20/editor.c
View file @
1e62b0e3
...
...
@@ -4,6 +4,7 @@
* Copyright 2004 by Krzysztof Foltman
* Copyright 2005 by Cihan Altinay
* Copyright 2005 by Phil Krylov
* Copyright 2008 Eric Pouech
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -506,6 +507,148 @@ static void ME_RTFParAttrHook(RTF_Info *info)
if
(
fmt
.
cTabCount
<
MAX_TAB_STOPS
)
fmt
.
rgxTabs
[
fmt
.
cTabCount
++
]
=
info
->
rtfParam
;
break
;
case
rtfKeep
:
fmt
.
dwMask
=
PFM_KEEP
;
fmt
.
wEffects
=
PFE_KEEP
;
break
;
case
rtfNoWidowControl
:
fmt
.
dwMask
=
PFM_NOWIDOWCONTROL
;
fmt
.
wEffects
=
PFE_NOWIDOWCONTROL
;
break
;
case
rtfKeepNext
:
fmt
.
dwMask
=
PFM_KEEPNEXT
;
fmt
.
wEffects
=
PFE_KEEPNEXT
;
break
;
case
rtfSpaceAfter
:
fmt
.
dwMask
=
PFM_SPACEAFTER
;
fmt
.
dySpaceAfter
=
info
->
rtfParam
;
break
;
case
rtfSpaceBefore
:
fmt
.
dwMask
=
PFM_SPACEBEFORE
;
fmt
.
dySpaceBefore
=
info
->
rtfParam
;
break
;
case
rtfSpaceBetween
:
fmt
.
dwMask
=
PFM_LINESPACING
;
if
((
int
)
info
->
rtfParam
>
0
)
{
fmt
.
dyLineSpacing
=
info
->
rtfParam
;
fmt
.
bLineSpacingRule
=
3
;
}
else
{
fmt
.
dyLineSpacing
=
info
->
rtfParam
;
fmt
.
bLineSpacingRule
=
4
;
}
case
rtfSpaceMultiply
:
fmt
.
dwMask
=
PFM_LINESPACING
;
fmt
.
dyLineSpacing
=
info
->
rtfParam
*
20
;
fmt
.
bLineSpacingRule
=
5
;
break
;
case
rtfParBullet
:
fmt
.
dwMask
=
PFM_NUMBERING
;
fmt
.
wNumbering
=
PFN_BULLET
;
break
;
case
rtfParSimple
:
fmt
.
dwMask
=
PFM_NUMBERING
;
fmt
.
wNumbering
=
2
;
/* FIXME: MSDN says it's not used ?? */
break
;
case
rtfParNumDecimal
:
fmt
.
dwMask
=
PFM_NUMBERING
;
fmt
.
wNumbering
=
2
;
/* FIXME: MSDN says it's not used ?? */
break
;
case
rtfParNumIndent
:
fmt
.
dwMask
=
PFM_NUMBERINGTAB
;
fmt
.
wNumberingTab
=
info
->
rtfParam
;
break
;
case
rtfParNumStartAt
:
fmt
.
dwMask
=
PFM_NUMBERINGSTART
;
fmt
.
wNumberingStart
=
info
->
rtfParam
;
break
;
case
rtfBorderLeft
:
ME_GetSelectionParaFormat
(
info
->
editor
,
&
fmt
);
if
(
!
(
fmt
.
dwMask
&
PFM_BORDER
))
{
fmt
.
dwMask
|=
PFM_BORDER
;
fmt
.
wBorderSpace
=
0
;
fmt
.
wBorderWidth
=
1
;
fmt
.
wBorders
=
0
;
}
fmt
.
wBorders
|=
1
;
break
;
case
rtfBorderRight
:
ME_GetSelectionParaFormat
(
info
->
editor
,
&
fmt
);
if
(
!
(
fmt
.
dwMask
&
PFM_BORDER
))
{
fmt
.
dwMask
|=
PFM_BORDER
;
fmt
.
wBorderSpace
=
0
;
fmt
.
wBorderWidth
=
1
;
fmt
.
wBorders
=
0
;
}
fmt
.
wBorders
|=
2
;
break
;
case
rtfBorderTop
:
ME_GetSelectionParaFormat
(
info
->
editor
,
&
fmt
);
if
(
!
(
fmt
.
dwMask
&
PFM_BORDER
))
{
fmt
.
dwMask
|=
PFM_BORDER
;
fmt
.
wBorderSpace
=
0
;
fmt
.
wBorderWidth
=
1
;
fmt
.
wBorders
=
0
;
}
fmt
.
wBorders
|=
4
;
break
;
case
rtfBorderBottom
:
ME_GetSelectionParaFormat
(
info
->
editor
,
&
fmt
);
if
(
!
(
fmt
.
dwMask
&
PFM_BORDER
))
{
fmt
.
dwMask
|=
PFM_BORDER
;
fmt
.
wBorderSpace
=
0
;
fmt
.
wBorderWidth
=
1
;
fmt
.
wBorders
=
0
;
}
fmt
.
wBorders
|=
8
;
break
;
case
rtfBorderSingle
:
ME_GetSelectionParaFormat
(
info
->
editor
,
&
fmt
);
/* we assume that borders have been created before (RTF spec) */
fmt
.
wBorders
&=
~
0x70
;
fmt
.
wBorders
|=
1
<<
8
;
break
;
case
rtfBorderThick
:
ME_GetSelectionParaFormat
(
info
->
editor
,
&
fmt
);
/* we assume that borders have been created before (RTF spec) */
fmt
.
wBorders
&=
~
0x70
;
fmt
.
wBorders
|=
2
<<
8
;
break
;
case
rtfBorderShadow
:
ME_GetSelectionParaFormat
(
info
->
editor
,
&
fmt
);
/* we assume that borders have been created before (RTF spec) */
fmt
.
wBorders
&=
~
0x70
;
fmt
.
wBorders
|=
10
<<
8
;
break
;
case
rtfBorderDouble
:
ME_GetSelectionParaFormat
(
info
->
editor
,
&
fmt
);
/* we assume that borders have been created before (RTF spec) */
fmt
.
wBorders
&=
~
0x70
;
fmt
.
wBorders
|=
7
<<
8
;
break
;
case
rtfBorderDot
:
ME_GetSelectionParaFormat
(
info
->
editor
,
&
fmt
);
/* we assume that borders have been created before (RTF spec) */
fmt
.
wBorders
&=
~
0x70
;
fmt
.
wBorders
|=
11
<<
8
;
break
;
case
rtfBorderWidth
:
ME_GetSelectionParaFormat
(
info
->
editor
,
&
fmt
);
/* we assume that borders have been created before (RTF spec) */
fmt
.
wBorders
&=
~
0x70
;
fmt
.
wBorders
|=
((
info
->
rtfParam
/
15
)
&
7
)
<<
8
;
break
;
case
rtfBorderSpace
:
ME_GetSelectionParaFormat
(
info
->
editor
,
&
fmt
);
/* we assume that borders have been created before (RTF spec) */
fmt
.
wBorderSpace
=
info
->
rtfParam
;
break
;
}
if
(
fmt
.
dwMask
)
{
RTFFlushOutputBuffer
(
info
);
...
...
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