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
ca9ca58c
Commit
ca9ca58c
authored
Jun 17, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Jun 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Contexts have a default DocumentMgr of the one that creates them.
parent
2e52edf3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
3 deletions
+14
-3
context.c
dlls/msctf/context.c
+2
-1
documentmgr.c
dlls/msctf/documentmgr.c
+1
-1
msctf_internal.h
dlls/msctf/msctf_internal.h
+1
-1
inputprocessor.c
dlls/msctf/tests/inputprocessor.c
+10
-0
No files found.
dlls/msctf/context.c
View file @
ca9ca58c
...
...
@@ -709,7 +709,7 @@ static const ITfInsertAtSelectionVtbl Context_InsertAtSelectionVtbl =
InsertAtSelection_InsertEmbeddedAtSelection
,
};
HRESULT
Context_Constructor
(
TfClientId
tidOwner
,
IUnknown
*
punk
,
ITfContext
**
ppOut
,
TfEditCookie
*
pecTextStore
)
HRESULT
Context_Constructor
(
TfClientId
tidOwner
,
IUnknown
*
punk
,
ITf
DocumentMgr
*
mgr
,
ITf
Context
**
ppOut
,
TfEditCookie
*
pecTextStore
)
{
Context
*
This
;
EditCookie
*
cookie
;
...
...
@@ -733,6 +733,7 @@ HRESULT Context_Constructor(TfClientId tidOwner, IUnknown *punk, ITfContext **pp
This
->
refCount
=
1
;
This
->
tidOwner
=
tidOwner
;
This
->
connected
=
FALSE
;
This
->
manager
=
mgr
;
CompartmentMgr_Constructor
((
IUnknown
*
)
This
,
&
IID_IUnknown
,
(
IUnknown
**
)
&
This
->
CompartmentMgr
);
...
...
dlls/msctf/documentmgr.c
View file @
ca9ca58c
...
...
@@ -123,7 +123,7 @@ static HRESULT WINAPI DocumentMgr_CreateContext(ITfDocumentMgr *iface,
{
DocumentMgr
*
This
=
(
DocumentMgr
*
)
iface
;
TRACE
(
"(%p) 0x%x 0x%x %p %p %p
\n
"
,
This
,
tidOwner
,
dwFlags
,
punk
,
ppic
,
pecTextStore
);
return
Context_Constructor
(
tidOwner
,
punk
,
ppic
,
pecTextStore
);
return
Context_Constructor
(
tidOwner
,
punk
,
iface
,
ppic
,
pecTextStore
);
}
static
HRESULT
WINAPI
DocumentMgr_Push
(
ITfDocumentMgr
*
iface
,
ITfContext
*
pic
)
...
...
dlls/msctf/msctf_internal.h
View file @
ca9ca58c
...
...
@@ -33,7 +33,7 @@ extern ITfCompartmentMgr *globalCompartmentMgr;
extern
HRESULT
ThreadMgr_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
);
extern
HRESULT
DocumentMgr_Constructor
(
ITfThreadMgrEventSink
*
,
ITfDocumentMgr
**
ppOut
);
extern
HRESULT
Context_Constructor
(
TfClientId
tidOwner
,
IUnknown
*
punk
,
ITfContext
**
ppOut
,
TfEditCookie
*
pecTextStore
);
extern
HRESULT
Context_Constructor
(
TfClientId
tidOwner
,
IUnknown
*
punk
,
ITf
DocumentMgr
*
mgr
,
ITf
Context
**
ppOut
,
TfEditCookie
*
pecTextStore
);
extern
HRESULT
InputProcessorProfiles_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
);
extern
HRESULT
CategoryMgr_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
);
extern
HRESULT
Range_Constructor
(
ITfContext
*
context
,
ITextStoreACP
*
textstore
,
DWORD
lockType
,
DWORD
anchorStart
,
DWORD
anchorEnd
,
ITfRange
**
ppOut
);
...
...
dlls/msctf/tests/inputprocessor.c
View file @
ca9ca58c
...
...
@@ -1146,6 +1146,11 @@ static void test_startSession(void)
hr
=
ITfDocumentMgr_CreateContext
(
g_dm
,
cid
,
0
,
NULL
,
&
cxt3
,
&
editCookie
);
ok
(
SUCCEEDED
(
hr
),
"CreateContext Failed
\n
"
);
hr
=
ITfContext_GetDocumentMgr
(
cxt
,
&
dmtest
);
ok
(
hr
==
S_OK
,
"ITfContext_GetDocumentMgr failed with %x
\n
"
,
hr
);
ok
(
dmtest
==
g_dm
,
"Wrong documentmgr
\n
"
);
ITfDocumentMgr_Release
(
dmtest
);
cnt
=
check_context_refcount
(
cxt
);
test_OnPushContext
=
SINK_EXPECTED
;
test_ACP_AdviseSink
=
SINK_EXPECTED
;
...
...
@@ -1215,6 +1220,11 @@ static void test_startSession(void)
ok
(
check_context_refcount
(
cxt2
)
<
cnt
,
"Ref count did not decrease
\n
"
);
ok
(
test_OnPopContext
==
SINK_FIRED
,
"OnPopContext sink not fired
\n
"
);
dmtest
=
(
void
*
)
0xfeedface
;
hr
=
ITfContext_GetDocumentMgr
(
cxt2
,
&
dmtest
);
ok
(
hr
==
S_FALSE
,
"ITfContext_GetDocumentMgr wrong rc %x
\n
"
,
hr
);
ok
(
dmtest
==
NULL
,
"returned documentmgr should be null
\n
"
);
hr
=
ITfDocumentMgr_GetTop
(
g_dm
,
&
cxtTest
);
ok
(
SUCCEEDED
(
hr
),
"GetTop Failed
\n
"
);
ok
(
cxtTest
==
cxt
,
"Wrong context on top
\n
"
);
...
...
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