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
c17af77b
Commit
c17af77b
authored
Jan 30, 2013
by
Huw Davies
Committed by
Alexandre Julliard
Jan 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Add a helper to debug the run text.
parent
95938b7a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
15 deletions
+17
-15
caret.c
dlls/riched20/caret.c
+3
-3
editor.h
dlls/riched20/editor.h
+2
-0
list.c
dlls/riched20/list.c
+1
-1
para.c
dlls/riched20/para.c
+1
-1
run.c
dlls/riched20/run.c
+6
-6
wrap.c
dlls/riched20/wrap.c
+4
-4
No files found.
dlls/riched20/caret.c
View file @
c17af77b
...
...
@@ -374,15 +374,15 @@ BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start,
nCharsToDelete is a number of chars to delete from THIS run */
nChars
-=
nCharsToDelete
;
shift
-=
nCharsToDelete
;
TRACE
(
"Deleting %d (remaning %d) chars at %d in
'%s'
(%d)
\n
"
,
TRACE
(
"Deleting %d (remaning %d) chars at %d in
%s
(%d)
\n
"
,
nCharsToDelete
,
nChars
,
c
.
nOffset
,
debugstr_
w
(
run
->
strText
->
szData
),
run
->
strText
->
nLen
);
debugstr_
run
(
run
),
run
->
strText
->
nLen
);
/* nOfs is a character offset (from the start of the document
to the current (deleted) run */
add_undo_insert_run
(
editor
,
nOfs
+
nChars
,
run
->
strText
->
szData
+
c
.
nOffset
,
nCharsToDelete
,
run
->
nFlags
,
run
->
style
);
TRACE
(
"Post deletion string: %s (%d)
\n
"
,
debugstr_
w
(
run
->
strText
->
szData
),
run
->
strText
->
nLen
);
TRACE
(
"Post deletion string: %s (%d)
\n
"
,
debugstr_
run
(
run
),
run
->
strText
->
nLen
);
TRACE
(
"Shift value: %d
\n
"
,
shift
);
ME_StrDeleteV
(
run
->
strText
,
c
.
nOffset
,
nCharsToDelete
);
...
...
dlls/riched20/editor.h
View file @
c17af77b
...
...
@@ -56,6 +56,8 @@ static inline void * __WINE_ALLOC_SIZE(2) heap_realloc( void *ptr, size_t len )
(fe).lindex=-1;\
};
static
inline
const
char
*
debugstr_run
(
const
ME_Run
*
run
)
{
return
debugstr_w
(
run
->
strText
->
szData
);
}
/* style.c */
ME_Style
*
ME_MakeStyle
(
CHARFORMAT2W
*
style
)
DECLSPEC_HIDDEN
;
void
ME_AddRefStyle
(
ME_Style
*
item
)
DECLSPEC_HIDDEN
;
...
...
dlls/riched20/list.c
View file @
c17af77b
...
...
@@ -211,7 +211,7 @@ void ME_DumpDocument(ME_TextBuffer *buffer)
TRACE
(
" - StartRow
\n
"
);
break
;
case
diRun
:
TRACE
(
" - Run(
\"
%s
\"
, %d, flags=%x)
\n
"
,
debugstr_w
(
pItem
->
member
.
run
.
strText
->
szData
),
TRACE
(
" - Run(
%s, %d, flags=%x)
\n
"
,
debugstr_run
(
&
pItem
->
member
.
run
),
pItem
->
member
.
run
.
nCharOfs
,
pItem
->
member
.
run
.
nFlags
);
break
;
case
diTextEnd
:
...
...
dlls/riched20/para.c
View file @
c17af77b
...
...
@@ -410,7 +410,7 @@ ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp,
pTmp
=
ME_FindItemFwd
(
pTmp
,
diRunOrParagraphOrEnd
);
if
(
pTmp
->
type
!=
diRun
)
break
;
TRACE
(
"shifting
\"
%s
\"
by %d (previous %d)
\n
"
,
debugstr_w
(
pTmp
->
member
.
run
.
strText
->
szData
),
shift
,
pTmp
->
member
.
run
.
nCharOfs
);
TRACE
(
"shifting
%s by %d (previous %d)
\n
"
,
debugstr_run
(
&
pTmp
->
member
.
run
),
shift
,
pTmp
->
member
.
run
.
nCharOfs
);
pTmp
->
member
.
run
.
nCharOfs
+=
shift
;
pTmp
->
member
.
run
.
para
=
&
tp
->
member
.
para
;
}
while
(
1
);
...
...
dlls/riched20/run.c
View file @
c17af77b
...
...
@@ -64,7 +64,7 @@ void ME_PropagateCharOffset(ME_DisplayItem *p, int shift)
*/
if
(
p
->
type
==
diRun
)
/* propagate in all runs in this para */
{
TRACE
(
"PropagateCharOffset(%s, %d)
\n
"
,
debugstr_
w
(
p
->
member
.
run
.
strText
->
szData
),
shift
);
TRACE
(
"PropagateCharOffset(%s, %d)
\n
"
,
debugstr_
run
(
&
p
->
member
.
run
),
shift
);
do
{
p
->
member
.
run
.
nCharOfs
+=
shift
;
assert
(
p
->
member
.
run
.
nCharOfs
>=
0
);
...
...
@@ -121,9 +121,9 @@ void ME_CheckCharOffsets(ME_TextEditor *editor)
ofs
=
0
;
break
;
case
diRun
:
TRACE_
(
richedit_check
)(
"run, real ofs = %d (+ofsp = %d), counted = %d, len = %d, txt =
\"
%s
\"
, flags=%08x, fx&mask = %08x
\n
"
,
TRACE_
(
richedit_check
)(
"run, real ofs = %d (+ofsp = %d), counted = %d, len = %d, txt =
%s
, flags=%08x, fx&mask = %08x
\n
"
,
p
->
member
.
run
.
nCharOfs
,
p
->
member
.
run
.
nCharOfs
+
ofsp
,
ofsp
+
ofs
,
p
->
member
.
run
.
strText
->
nLen
,
debugstr_
w
(
p
->
member
.
run
.
strText
->
szData
),
p
->
member
.
run
.
strText
->
nLen
,
debugstr_
run
(
&
p
->
member
.
run
),
p
->
member
.
run
.
nFlags
,
p
->
member
.
run
.
style
->
fmt
.
dwMask
&
p
->
member
.
run
.
style
->
fmt
.
dwEffects
);
assert
(
ofs
==
p
->
member
.
run
.
nCharOfs
);
...
...
@@ -265,7 +265,7 @@ ME_DisplayItem *ME_SplitRun(ME_WrapContext *wc, ME_DisplayItem *item, int nVChar
run
=
&
item
->
member
.
run
;
TRACE
(
"Before split: %s(%d, %d)
\n
"
,
debugstr_
w
(
run
->
strText
->
szData
),
TRACE
(
"Before split: %s(%d, %d)
\n
"
,
debugstr_
run
(
run
),
run
->
pt
.
x
,
run
->
pt
.
y
);
ME_SplitRunSimple
(
editor
,
&
cursor
);
...
...
@@ -283,8 +283,8 @@ ME_DisplayItem *ME_SplitRun(ME_WrapContext *wc, ME_DisplayItem *item, int nVChar
ME_CheckCharOffsets
(
editor
);
TRACE
(
"After check after split
\n
"
);
TRACE
(
"After split: %s(%d, %d), %s(%d, %d)
\n
"
,
debugstr_
w
(
run
->
strText
->
szData
),
run
->
pt
.
x
,
run
->
pt
.
y
,
debugstr_
w
(
run2
->
strText
->
szData
),
run2
->
pt
.
x
,
run2
->
pt
.
y
);
debugstr_
run
(
run
),
run
->
pt
.
x
,
run
->
pt
.
y
,
debugstr_
run
(
run2
),
run2
->
pt
.
x
,
run2
->
pt
.
y
);
}
return
cursor
.
pRun
;
...
...
dlls/riched20/wrap.c
View file @
c17af77b
...
...
@@ -189,7 +189,7 @@ static void ME_WrapEndParagraph(ME_WrapContext *wc, ME_DisplayItem *p)
if (p->type == diRun)
{
ME_Run *run = &p->member.run;
TRACE("%s - (%d, %d)\n", debugstr_
w(run->strText->szData
), run->pt.x, run->pt.y);
TRACE("%s - (%d, %d)\n", debugstr_
run(run
), run->pt.x, run->pt.y);
}
p = p->next;
}
...
...
@@ -241,7 +241,7 @@ static ME_DisplayItem *ME_MaximizeSplit(ME_WrapContext *wc, ME_DisplayItem *p, i
/* this run is the end of spaces, so the run edge is a good point to split */
wc
->
pt
=
pp
->
member
.
run
.
pt
;
wc
->
bOverflown
=
TRUE
;
TRACE
(
"Split point is: %s|%s
\n
"
,
debugstr_
w
(
piter
->
member
.
run
.
strText
->
szData
),
debugstr_w
(
pp
->
member
.
run
.
strText
->
szData
));
TRACE
(
"Split point is: %s|%s
\n
"
,
debugstr_
run
(
&
piter
->
member
.
run
),
debugstr_run
(
&
pp
->
member
.
run
));
return
pp
;
}
wc
->
pt
=
piter
->
member
.
run
.
pt
;
...
...
@@ -266,7 +266,7 @@ static ME_DisplayItem *ME_SplitByBacktracking(ME_WrapContext *wc, ME_DisplayItem
if
(
pp
)
return
pp
;
}
TRACE
(
"Must backtrack to split at: %s
\n
"
,
debugstr_
w
(
p
->
member
.
run
.
strText
->
szData
));
TRACE
(
"Must backtrack to split at: %s
\n
"
,
debugstr_
run
(
&
p
->
member
.
run
));
if
(
wc
->
pLastSplittableRun
)
{
if
(
wc
->
pLastSplittableRun
->
member
.
run
.
nFlags
&
(
MERF_GRAPHICS
|
MERF_TAB
))
...
...
@@ -303,7 +303,7 @@ static ME_DisplayItem *ME_SplitByBacktracking(ME_WrapContext *wc, ME_DisplayItem
return
wc
->
pLastSplittableRun
;
}
}
TRACE
(
"Backtracking failed, trying desperate: %s
\n
"
,
debugstr_
w
(
p
->
member
.
run
.
strText
->
szData
));
TRACE
(
"Backtracking failed, trying desperate: %s
\n
"
,
debugstr_
run
(
&
p
->
member
.
run
));
/* OK, no better idea, so assume we MAY split words if we can split at all*/
if
(
idesp
)
return
ME_SplitRun
(
wc
,
piter
,
idesp
);
...
...
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