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
1e8df435
Commit
1e8df435
authored
Nov 17, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Nov 17, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Removed unused ME_AutoURLDetect function.
parent
103cfb90
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
90 deletions
+0
-90
editor.c
dlls/riched20/editor.c
+0
-89
editor.h
dlls/riched20/editor.h
+0
-1
No files found.
dlls/riched20/editor.c
View file @
1e8df435
...
...
@@ -4432,95 +4432,6 @@ LRESULT WINAPI REExtendedRegisterClass(void)
return
result
;
}
int
ME_AutoURLDetect
(
ME_TextEditor
*
editor
,
WCHAR
curChar
)
{
struct
prefix_s
{
const
char
*
text
;
int
length
;
}
prefixes
[
12
]
=
{
{
"http:"
,
5
},
{
"file:"
,
6
},
{
"mailto:"
,
8
},
{
"ftp:"
,
5
},
{
"https:"
,
7
},
{
"gopher:"
,
8
},
{
"nntp:"
,
6
},
{
"prospero:"
,
10
},
{
"telnet:"
,
8
},
{
"news:"
,
6
},
{
"wais:"
,
6
},
{
"www."
,
5
}
};
CHARRANGE
ins_pt
;
int
curf_ef
,
link_ef
,
def_ef
;
int
cur_prefx
,
prefx_cnt
;
int
sel_min
,
sel_max
;
int
car_pos
=
0
;
int
text_pos
=-
1
;
int
URLmin
,
URLmax
=
0
;
FINDTEXTA
ft
;
CHARFORMAT2W
cur_format
;
CHARFORMAT2W
default_format
;
CHARFORMAT2W
link
;
RichEditANSIWndProc
(
editor
->
hWnd
,
EM_EXGETSEL
,
(
WPARAM
)
0
,
(
LPARAM
)
&
ins_pt
);
sel_min
=
ins_pt
.
cpMin
;
sel_max
=
ins_pt
.
cpMax
;
if
(
sel_min
==
sel_max
)
car_pos
=
sel_min
;
if
(
sel_min
!=
sel_max
)
car_pos
=
ME_GetTextLength
(
editor
)
+
1
;
cur_format
.
cbSize
=
sizeof
(
cur_format
);
default_format
.
cbSize
=
sizeof
(
default_format
);
RichEditANSIWndProc
(
editor
->
hWnd
,
EM_GETCHARFORMAT
,
SCF_SELECTION
,
(
LPARAM
)
&
cur_format
);
RichEditANSIWndProc
(
editor
->
hWnd
,
EM_GETCHARFORMAT
,
SCF_DEFAULT
,
(
LPARAM
)
&
default_format
);
link
.
cbSize
=
sizeof
(
link
);
link
.
dwMask
=
CFM_LINK
;
link
.
dwEffects
=
CFE_LINK
;
curf_ef
=
cur_format
.
dwEffects
&
link
.
dwEffects
;
def_ef
=
default_format
.
dwEffects
&
link
.
dwEffects
;
link_ef
=
link
.
dwEffects
&
link
.
dwEffects
;
if
(
curf_ef
==
link_ef
)
{
if
(
curChar
==
'\n'
||
curChar
==
'\r'
||
curChar
==
' '
)
{
ME_SetSelection
(
editor
,
car_pos
,
car_pos
);
RichEditANSIWndProc
(
editor
->
hWnd
,
EM_SETCHARFORMAT
,
SCF_SELECTION
,
(
LPARAM
)
&
default_format
);
text_pos
=-
1
;
return
0
;
}
}
if
(
curf_ef
==
def_ef
)
{
cur_prefx
=
0
;
prefx_cnt
=
(
sizeof
(
prefixes
)
/
sizeof
(
struct
prefix_s
))
-
1
;
while
(
cur_prefx
<=
prefx_cnt
)
{
if
(
text_pos
==
-
1
)
{
ft
.
lpstrText
=
prefixes
[
cur_prefx
].
text
;
URLmin
=
max
(
0
,(
car_pos
-
prefixes
[
cur_prefx
].
length
));
URLmax
=
max
(
0
,
car_pos
);
if
((
car_pos
==
0
)
&&
(
ME_GetTextLength
(
editor
)
!=
0
))
{
URLmax
=
ME_GetTextLength
(
editor
)
+
1
;
}
ft
.
chrg
.
cpMin
=
URLmin
;
ft
.
chrg
.
cpMax
=
URLmax
;
text_pos
=
RichEditANSIWndProc
(
editor
->
hWnd
,
EM_FINDTEXT
,
FR_DOWN
,
(
LPARAM
)
&
ft
);
cur_prefx
++
;
}
if
(
text_pos
!=
-
1
)
{
ME_SetCharFormat
(
editor
,
text_pos
,
(
URLmax
-
text_pos
),
&
link
);
ME_RewrapRepaint
(
editor
);
break
;
}
}
}
return
0
;
}
static
BOOL
isurlspecial
(
WCHAR
c
)
{
static
const
WCHAR
special_chars
[]
=
{
'.'
,
'/'
,
'%'
,
'@'
,
'*'
,
'|'
,
'\\'
,
'+'
,
'#'
,
0
};
...
...
dlls/riched20/editor.h
View file @
1e8df435
...
...
@@ -280,7 +280,6 @@ void ME_RTFParAttrHook(struct _RTF_Info *info);
void
ME_RTFTblAttrHook
(
struct
_RTF_Info
*
info
);
void
ME_RTFSpecialCharHook
(
struct
_RTF_Info
*
info
);
void
ME_StreamInFill
(
ME_InStream
*
stream
);
int
ME_AutoURLDetect
(
ME_TextEditor
*
editor
,
WCHAR
curChar
);
extern
int
me_debug
;
extern
void
DoWrap
(
ME_TextEditor
*
editor
);
extern
BOOL
ME_FindNextURLCandidate
(
ME_TextEditor
*
editor
,
int
sel_min
,
int
sel_max
,
...
...
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