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
3af44196
Commit
3af44196
authored
Sep 30, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Oct 01, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Added code to stream out table border properties.
This code was simply missing, since the table border properties are already stored and displayed.
parent
ee5342e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
85 additions
and
2 deletions
+85
-2
writer.c
dlls/riched20/writer.c
+85
-2
No files found.
dlls/riched20/writer.c
View file @
3af44196
...
...
@@ -196,11 +196,14 @@ ME_StreamOutRTFHeader(ME_OutStream *pStream, int dwFormat)
static
BOOL
ME_StreamOutRTFFontAndColorTbl
(
ME_OutStream
*
pStream
,
ME_DisplayItem
*
pFirstRun
,
const
ME_DisplayItem
*
pLastRun
)
ME_StreamOutRTFFontAndColorTbl
(
ME_OutStream
*
pStream
,
ME_DisplayItem
*
pFirstRun
,
ME_DisplayItem
*
pLastRun
)
{
ME_DisplayItem
*
item
=
pFirstRun
;
ME_FontTableItem
*
table
=
pStream
->
fonttbl
;
int
i
;
ME_DisplayItem
*
pLastPara
=
ME_GetParagraph
(
pLastRun
);
ME_DisplayItem
*
pCell
=
NULL
;
do
{
CHARFORMAT2W
*
fmt
=
&
item
->
member
.
run
.
style
->
fmt
;
...
...
@@ -246,6 +249,38 @@ ME_StreamOutRTFFontAndColorTbl(ME_OutStream *pStream, ME_DisplayItem *pFirstRun,
break
;
item
=
ME_FindItemFwd
(
item
,
diRun
);
}
while
(
item
);
item
=
ME_GetParagraph
(
pFirstRun
);
do
{
if
(
item
->
member
.
para
.
pCell
&&
item
->
member
.
para
.
pCell
)
{
pCell
=
item
->
member
.
para
.
pCell
;
if
(
pCell
)
{
ME_Border
*
borders
[
4
]
=
{
&
pCell
->
member
.
cell
.
border
.
top
,
&
pCell
->
member
.
cell
.
border
.
left
,
&
pCell
->
member
.
cell
.
border
.
bottom
,
&
pCell
->
member
.
cell
.
border
.
right
};
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
borders
[
i
]
->
width
>
0
)
{
int
j
;
COLORREF
crColor
=
borders
[
i
]
->
colorRef
;
for
(
j
=
1
;
j
<
pStream
->
nColorTblLen
;
j
++
)
if
(
pStream
->
colortbl
[
j
]
==
crColor
)
break
;
if
(
j
==
pStream
->
nColorTblLen
&&
j
<
STREAMOUT_COLORTBL_SIZE
)
{
pStream
->
colortbl
[
j
]
=
crColor
;
pStream
->
nColorTblLen
++
;
}
}
}
}
}
if
(
item
==
pLastPara
)
break
;
item
=
item
->
member
.
para
.
next_para
;
}
while
(
item
);
if
(
!
ME_StreamOutPrint
(
pStream
,
"{
\\
fonttbl"
))
return
FALSE
;
...
...
@@ -290,26 +325,74 @@ ME_StreamOutRTFTableProps(ME_TextEditor *editor, ME_OutStream *pStream,
{
ME_DisplayItem
*
cell
;
char
props
[
STREAMOUT_BUFFER_SIZE
]
=
""
;
int
i
;
const
char
sideChar
[
4
]
=
{
't'
,
'l'
,
'b'
,
'r'
};
if
(
!
ME_StreamOutPrint
(
pStream
,
"
\\
trowd"
))
return
FALSE
;
if
(
!
editor
->
bEmulateVersion10
)
{
/* v4.1 */
PARAFORMAT2
*
pFmt
=
ME_GetTableRowEnd
(
para
)
->
member
.
para
.
pFmt
;
para
=
ME_GetTableRowStart
(
para
);
cell
=
para
->
member
.
para
.
next_para
->
member
.
para
.
pCell
;
assert
(
cell
);
if
(
pFmt
->
dxOffset
)
sprintf
(
props
+
strlen
(
props
),
"
\\
trgaph%d"
,
pFmt
->
dxOffset
);
if
(
pFmt
->
dxStartIndent
)
sprintf
(
props
+
strlen
(
props
),
"
\\
trleft%d"
,
pFmt
->
dxStartIndent
);
do
{
ME_Border
*
borders
[
4
]
=
{
&
cell
->
member
.
cell
.
border
.
top
,
&
cell
->
member
.
cell
.
border
.
left
,
&
cell
->
member
.
cell
.
border
.
bottom
,
&
cell
->
member
.
cell
.
border
.
right
};
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
borders
[
i
]
->
width
)
{
int
j
;
COLORREF
crColor
=
borders
[
i
]
->
colorRef
;
sprintf
(
props
+
strlen
(
props
),
"
\\
clbrdr%c"
,
sideChar
[
i
]);
sprintf
(
props
+
strlen
(
props
),
"
\\
brdrs"
);
sprintf
(
props
+
strlen
(
props
),
"
\\
brdrw%d"
,
borders
[
i
]
->
width
);
for
(
j
=
1
;
j
<
pStream
->
nColorTblLen
;
j
++
)
{
if
(
pStream
->
colortbl
[
j
]
==
crColor
)
{
sprintf
(
props
+
strlen
(
props
),
"
\\
brdrcf%u"
,
j
);
break
;
}
}
}
}
sprintf
(
props
+
strlen
(
props
),
"
\\
cellx%d"
,
cell
->
member
.
cell
.
nRightBoundary
);
cell
=
cell
->
member
.
cell
.
next_cell
;
}
while
(
cell
->
member
.
cell
.
next_cell
);
}
else
{
/* v1.0 - 3.0 */
const
ME_Border
*
borders
[
4
]
=
{
&
para
->
member
.
para
.
border
.
top
,
&
para
->
member
.
para
.
border
.
left
,
&
para
->
member
.
para
.
border
.
bottom
,
&
para
->
member
.
para
.
border
.
right
};
PARAFORMAT2
*
pFmt
=
para
->
member
.
para
.
pFmt
;
int
i
;
assert
(
!
(
para
->
member
.
para
.
nFlags
&
(
MEPF_ROWSTART
|
MEPF_ROWEND
|
MEPF_CELL
)));
if
(
pFmt
->
dxOffset
)
sprintf
(
props
+
strlen
(
props
),
"
\\
trgaph%d"
,
pFmt
->
dxOffset
);
if
(
pFmt
->
dxStartIndent
)
sprintf
(
props
+
strlen
(
props
),
"
\\
trleft%d"
,
pFmt
->
dxStartIndent
);
for
(
i
=
0
;
i
<
4
;
i
++
)
{
if
(
borders
[
i
]
->
width
)
{
int
j
;
COLORREF
crColor
=
borders
[
i
]
->
colorRef
;
sprintf
(
props
+
strlen
(
props
),
"
\\
trbrdr%c"
,
sideChar
[
i
]);
sprintf
(
props
+
strlen
(
props
),
"
\\
brdrs"
);
sprintf
(
props
+
strlen
(
props
),
"
\\
brdrw%d"
,
borders
[
i
]
->
width
);
for
(
j
=
1
;
j
<
pStream
->
nColorTblLen
;
j
++
)
{
if
(
pStream
->
colortbl
[
j
]
==
crColor
)
{
sprintf
(
props
+
strlen
(
props
),
"
\\
brdrcf%u"
,
j
);
break
;
}
}
}
}
for
(
i
=
0
;
i
<
pFmt
->
cTabCount
;
i
++
)
{
sprintf
(
props
+
strlen
(
props
),
"
\\
cellx%d"
,
pFmt
->
rgxTabs
[
i
]
&
0x00FFFFFF
);
...
...
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