mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
riched20-IText_Interface: Rebased patches (first part accepted upstream).
This commit is contained in:
parent
42f18b7237
commit
6aecd5a407
@ -727,20 +727,19 @@ quartz-MediaSeeking_Positions.ok:
|
||||
# |
|
||||
.INTERMEDIATE: riched20-IText_Interface.ok
|
||||
riched20-IText_Interface.ok:
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0001-riched20-Stub-for-ITextRange-interface-and-implement.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0002-riched20-Implement-ITextSelection-GetChar-and-ITextR.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0003-riched20-Implement-IText-Selection-Range-Get-Start-E.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0004-riched20-Implement-ITextRange-GetDuplicate.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0005-riched20-Implement-ITextRange-Collapse-and-ITextSele.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0006-riched20-Implement-IText-Selection-Range-Set-Start-E.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0007-riched20-Stub-for-ITextFont-interface-and-implement-.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0008-riched20-Stub-for-ITextPara-interface-and-implement-.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0009-riched20-Fix-ME_RunOfsFromCharOfs-when-nCharOfs-strl.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0010-riched20-Implement-ITextRange-GetText.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0011-riched20-Implement-ITextRange-SetRange.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0012-riched20-Implement-ITextRange-IsEqual.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0013-riched20-Implement-ITextRange-GetStoryLength.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0014-riched20-Implement-ITextSelection-GetStoryLength.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0001-riched20-Implement-ITextSelection-GetChar-and-ITextR.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0002-riched20-Implement-IText-Selection-Range-Get-Start-E.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0003-riched20-Implement-ITextRange-GetDuplicate.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0004-riched20-Implement-ITextRange-Collapse-and-ITextSele.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0005-riched20-Implement-IText-Selection-Range-Set-Start-E.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0006-riched20-Stub-for-ITextFont-interface-and-implement-.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0007-riched20-Stub-for-ITextPara-interface-and-implement-.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0008-riched20-Fix-ME_RunOfsFromCharOfs-when-nCharOfs-strl.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0009-riched20-Implement-ITextRange-GetText.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0010-riched20-Implement-ITextRange-SetRange.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0011-riched20-Implement-ITextRange-IsEqual.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0012-riched20-Implement-ITextRange-GetStoryLength.patch)
|
||||
$(call APPLY_FILE,riched20-IText_Interface/0013-riched20-Implement-ITextSelection-GetStoryLength.patch)
|
||||
@( \
|
||||
echo '+ { "riched20-IText_Interface", "Jactry Zeng", "Implement Stubs for ITextRange interface. [rev 3]" },'; \
|
||||
echo '+ { "riched20-IText_Interface", "Jactry Zeng", "Implement Stubs for ITextFont interface. [rev 2]" },'; \
|
||||
|
@ -1,4 +1,4 @@
|
||||
Author: Sebastian Lackner
|
||||
Subject: Ignore FIND_FIRST_EX_LARGE_FETCH flag in FindFirstFileExW.
|
||||
Revision: 1
|
||||
Fixes: [35121] Support for FIND_FIRST_EX_LARGE_FETCH in FindFirstFileExW.
|
||||
Fixes: [35121] Support for FIND_FIRST_EX_LARGE_FETCH flag in FindFirstFileExW
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d5bb58d2350486ac12970aef61dcec95f23dfbfe Mon Sep 17 00:00:00 2001
|
||||
From 10a86e0d87850cc77ee13b9e814dc8a9a558721b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Tue, 12 Aug 2014 20:25:18 +0200
|
||||
Subject: kernel32/tests: Add tests for GetFinalPathNameByHandle
|
||||
@ -8,7 +8,7 @@ Subject: kernel32/tests: Add tests for GetFinalPathNameByHandle
|
||||
1 file changed, 204 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
|
||||
index 492a34f..490f4bd 100644
|
||||
index ddfa019..55e9045 100644
|
||||
--- a/dlls/kernel32/tests/file.c
|
||||
+++ b/dlls/kernel32/tests/file.c
|
||||
@@ -34,6 +34,7 @@
|
||||
@ -37,7 +37,7 @@ index 492a34f..490f4bd 100644
|
||||
}
|
||||
|
||||
static void test__hread( void )
|
||||
@@ -4088,6 +4093,203 @@ todo_wine
|
||||
@@ -4145,6 +4150,203 @@ todo_wine
|
||||
}
|
||||
}
|
||||
|
||||
@ -241,13 +241,13 @@ index 492a34f..490f4bd 100644
|
||||
START_TEST(file)
|
||||
{
|
||||
InitFunctionPointers();
|
||||
@@ -4133,4 +4335,6 @@ START_TEST(file)
|
||||
test_OpenFileById();
|
||||
@@ -4191,4 +4393,6 @@ START_TEST(file)
|
||||
test_SetFileValidData();
|
||||
test_WriteFileGather();
|
||||
test_file_access();
|
||||
+ test_GetFinalPathNameByHandleA();
|
||||
+ test_GetFinalPathNameByHandleW();
|
||||
}
|
||||
--
|
||||
1.8.3.2
|
||||
2.1.0
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
From 347be1f6538c25517c48c9ff10bd888d13d241b8 Mon Sep 17 00:00:00 2001
|
||||
From b666d11bf12f72874ecce294cc66b783a78d6555 Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Sun, 10 Aug 2014 21:55:44 +0800
|
||||
Subject: riched20: Implement ITextSelection::GetChar and ITextRange::GetChar.
|
||||
|
||||
---
|
||||
dlls/riched20/richole.c | 28 ++++++++++++++---
|
||||
dlls/riched20/tests/richole.c | 70 +++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/riched20/richole.c | 28 ++++++++++++++---
|
||||
dlls/riched20/tests/richole.c | 70 +++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 94 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
|
||||
index 5e2ffd0..f39e0ae 100644
|
||||
index 826fa68..1ff35cf 100644
|
||||
--- a/dlls/riched20/richole.c
|
||||
+++ b/dlls/riched20/richole.c
|
||||
@@ -564,14 +564,29 @@ static HRESULT WINAPI ITextRange_fnSetText(ITextRange *me, BSTR bstr)
|
||||
@ -151,5 +151,5 @@ index f56a14a..152d144 100644
|
||||
+ test_ITextRange_GetChar();
|
||||
}
|
||||
--
|
||||
1.7.9.5
|
||||
2.1.0
|
||||
|
@ -1,862 +0,0 @@
|
||||
From e2f7556764c4ce3647b67ed687023919b891e9b0 Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Mon, 11 Aug 2014 13:29:06 +0800
|
||||
Subject: riched20: Stub for ITextRange interface and implement
|
||||
ITextDocument::Range.
|
||||
|
||||
---
|
||||
dlls/riched20/richole.c | 730 ++++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/riched20/tests/richole.c | 35 +-
|
||||
2 files changed, 762 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
|
||||
index 487fcda..5e2ffd0 100644
|
||||
--- a/dlls/riched20/richole.c
|
||||
+++ b/dlls/riched20/richole.c
|
||||
@@ -49,6 +49,7 @@ DEFINE_GUID(IID_ITextSelection, 0x8cc497c1, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0x
|
||||
|
||||
typedef struct ITextSelectionImpl ITextSelectionImpl;
|
||||
typedef struct IOleClientSiteImpl IOleClientSiteImpl;
|
||||
+typedef struct ITextRangeImpl ITextRangeImpl;
|
||||
|
||||
typedef struct IRichEditOleImpl {
|
||||
IRichEditOle IRichEditOle_iface;
|
||||
@@ -58,8 +59,18 @@ typedef struct IRichEditOleImpl {
|
||||
ME_TextEditor *editor;
|
||||
ITextSelectionImpl *txtSel;
|
||||
IOleClientSiteImpl *clientSite;
|
||||
+ struct list rangelist;
|
||||
} IRichEditOleImpl;
|
||||
|
||||
+struct ITextRangeImpl {
|
||||
+ ITextRange ITextRange_iface;
|
||||
+ LONG ref;
|
||||
+ LONG start, end;
|
||||
+ struct list entry;
|
||||
+
|
||||
+ IRichEditOleImpl *reOle;
|
||||
+};
|
||||
+
|
||||
struct ITextSelectionImpl {
|
||||
ITextSelection ITextSelection_iface;
|
||||
LONG ref;
|
||||
@@ -128,10 +139,13 @@ IRichEditOle_fnRelease(IRichEditOle *me)
|
||||
|
||||
if (!ref)
|
||||
{
|
||||
+ ITextRangeImpl *txtRge;
|
||||
TRACE ("Destroying %p\n", This);
|
||||
This->txtSel->reOle = NULL;
|
||||
ITextSelection_Release(&This->txtSel->ITextSelection_iface);
|
||||
IOleClientSite_Release(&This->clientSite->IOleClientSite_iface);
|
||||
+ LIST_FOR_EACH_ENTRY(txtRge, &This->rangelist, ITextRangeImpl, entry)
|
||||
+ txtRge->reOle = NULL;
|
||||
heap_free(This);
|
||||
}
|
||||
return ref;
|
||||
@@ -443,6 +457,682 @@ static const IRichEditOleVtbl revt = {
|
||||
IRichEditOle_fnImportDataObject
|
||||
};
|
||||
|
||||
+/* ITextRange interface */
|
||||
+static inline ITextRangeImpl *impl_from_ITextRange(ITextRange *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, ITextRangeImpl, ITextRange_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnQueryInterface(ITextRange *me, REFIID riid, void **ppvObj)
|
||||
+{
|
||||
+ *ppvObj = NULL;
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown)
|
||||
+ || IsEqualGUID(riid, &IID_IDispatch)
|
||||
+ || IsEqualGUID(riid, &IID_ITextRange))
|
||||
+ {
|
||||
+ *ppvObj = me;
|
||||
+ ITextRange_AddRef(me);
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI ITextRange_fnAddRef(ITextRange *me)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ return InterlockedIncrement(&This->ref);
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI ITextRange_fnRelease(ITextRange *me)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE ("%p ref=%u\n", This, ref);
|
||||
+ if (ref == 0)
|
||||
+ {
|
||||
+ This->reOle = NULL;
|
||||
+ list_remove(&This->entry);
|
||||
+ heap_free(This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetTypeInfoCount(ITextRange *me, UINT *pctinfo)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetTypeInfo(ITextRange *me, UINT iTInfo, LCID lcid,
|
||||
+ ITypeInfo **ppTInfo)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetIDsOfNames(ITextRange *me, REFIID riid, LPOLESTR *rgszNames,
|
||||
+ UINT cNames, LCID lcid, DISPID *rgDispId)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnInvoke(ITextRange *me, DISPID dispIdMember, REFIID riid,
|
||||
+ LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
|
||||
+ VARIANT *pVarResult, EXCEPINFO *pExcepInfo,
|
||||
+ UINT *puArgErr)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetText(ITextRange *me, BSTR *pbstr)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnSetText(ITextRange *me, BSTR bstr)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetChar(ITextRange *me, LONG *pch)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnSetChar(ITextRange *me, LONG ch)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetDuplicate(ITextRange *me, ITextRange **ppRange)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetFormattedText(ITextRange *me, ITextRange **ppRange)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnSetFormattedText(ITextRange *me, ITextRange *pRange)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetStart(ITextRange *me, LONG *pcpFirst)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnSetStart(ITextRange *me, LONG cpFirst)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetEnd(ITextRange *me, LONG *pcpLim)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnSetEnd(ITextRange *me, LONG cpLim)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetFont(ITextRange *me, ITextFont **pFont)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnSetFont(ITextRange *me, ITextFont *pFont)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetPara(ITextRange *me, ITextPara **ppPara)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnSetPara(ITextRange *me, ITextPara *pPara)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetStoryLength(ITextRange *me, LONG *pcch)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetStoryType(ITextRange *me, LONG *pValue)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnCollapse(ITextRange *me, LONG bStart)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnExpand(ITextRange *me, LONG Unit, LONG *pDelta)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetIndex(ITextRange *me, LONG Unit, LONG *pIndex)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnSetIndex(ITextRange *me, LONG Unit, LONG Index,
|
||||
+ LONG Extend)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnSetRange(ITextRange *me, LONG cpActive, LONG cpOther)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnInRange(ITextRange *me, ITextRange *pRange, LONG *pb)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnInStory(ITextRange *me, ITextRange *pRange, LONG *pb)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnIsEqual(ITextRange *me, ITextRange *pRange, LONG *pb)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnSelect(ITextRange *me)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnStartOf(ITextRange *me, LONG Unit, LONG Extend,
|
||||
+ LONG *pDelta)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnEndOf(ITextRange *me, LONG Unit, LONG Extend,
|
||||
+ LONG *pDelta)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnMove(ITextRange *me, LONG Unit, LONG Count, LONG *pDelta)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnMoveStart(ITextRange *me, LONG Unit, LONG Count,
|
||||
+ LONG *pDelta)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnMoveEnd(ITextRange *me, LONG Unit, LONG Count,
|
||||
+ LONG *pDelta)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnMoveWhile(ITextRange *me, VARIANT *Cset, LONG Count,
|
||||
+ LONG *pDelta)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnMoveStartWhile(ITextRange *me, VARIANT *Cset, LONG Count,
|
||||
+ LONG *pDelta)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnMoveEndWhile(ITextRange *me, VARIANT *Cset, LONG Count,
|
||||
+ LONG *pDelta)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnMoveUntil(ITextRange *me, VARIANT *Cset, LONG Count,
|
||||
+ LONG *pDelta)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnMoveStartUntil(ITextRange *me, VARIANT *Cset, LONG Count,
|
||||
+ LONG *pDelta)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnMoveEndUntil(ITextRange *me, VARIANT *Cset, LONG Count,
|
||||
+ LONG *pDelta)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnFindText(ITextRange *me, BSTR bstr, LONG cch, LONG Flags,
|
||||
+ LONG *pLength)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnFindTextStart(ITextRange *me, BSTR bstr, LONG cch,
|
||||
+ LONG Flags, LONG *pLength)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnFindTextEnd(ITextRange *me, BSTR bstr, LONG cch,
|
||||
+ LONG Flags, LONG *pLength)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnDelete(ITextRange *me, LONG Unit, LONG Count,
|
||||
+ LONG *pDelta)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnCut(ITextRange *me, VARIANT *pVar)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnCopy(ITextRange *me, VARIANT *pVar)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnPaste(ITextRange *me, VARIANT *pVar, LONG Format)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnCanPaste(ITextRange *me, VARIANT *pVar, LONG Format,
|
||||
+ LONG *pb)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnCanEdit(ITextRange *me, LONG *pb)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnChangeCase(ITextRange *me, LONG Type)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetPoint(ITextRange *me, LONG Type, LONG *cx, LONG *cy)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnSetPoint(ITextRange *me, LONG x, LONG y, LONG Type,
|
||||
+ LONG Extend)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnScrollIntoView(ITextRange *me, LONG Value)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI ITextRange_fnGetEmbeddedObject(ITextRange *me, IUnknown **ppv)
|
||||
+{
|
||||
+ ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ if (!This->reOle)
|
||||
+ return CO_E_RELEASED;
|
||||
+
|
||||
+ FIXME("not implemented %p\n", This);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const ITextRangeVtbl trvt = {
|
||||
+ ITextRange_fnQueryInterface,
|
||||
+ ITextRange_fnAddRef,
|
||||
+ ITextRange_fnRelease,
|
||||
+ ITextRange_fnGetTypeInfoCount,
|
||||
+ ITextRange_fnGetTypeInfo,
|
||||
+ ITextRange_fnGetIDsOfNames,
|
||||
+ ITextRange_fnInvoke,
|
||||
+ ITextRange_fnGetText,
|
||||
+ ITextRange_fnSetText,
|
||||
+ ITextRange_fnGetChar,
|
||||
+ ITextRange_fnSetChar,
|
||||
+ ITextRange_fnGetDuplicate,
|
||||
+ ITextRange_fnGetFormattedText,
|
||||
+ ITextRange_fnSetFormattedText,
|
||||
+ ITextRange_fnGetStart,
|
||||
+ ITextRange_fnSetStart,
|
||||
+ ITextRange_fnGetEnd,
|
||||
+ ITextRange_fnSetEnd,
|
||||
+ ITextRange_fnGetFont,
|
||||
+ ITextRange_fnSetFont,
|
||||
+ ITextRange_fnGetPara,
|
||||
+ ITextRange_fnSetPara,
|
||||
+ ITextRange_fnGetStoryLength,
|
||||
+ ITextRange_fnGetStoryType,
|
||||
+ ITextRange_fnCollapse,
|
||||
+ ITextRange_fnExpand,
|
||||
+ ITextRange_fnGetIndex,
|
||||
+ ITextRange_fnSetIndex,
|
||||
+ ITextRange_fnSetRange,
|
||||
+ ITextRange_fnInRange,
|
||||
+ ITextRange_fnInStory,
|
||||
+ ITextRange_fnIsEqual,
|
||||
+ ITextRange_fnSelect,
|
||||
+ ITextRange_fnStartOf,
|
||||
+ ITextRange_fnEndOf,
|
||||
+ ITextRange_fnMove,
|
||||
+ ITextRange_fnMoveStart,
|
||||
+ ITextRange_fnMoveEnd,
|
||||
+ ITextRange_fnMoveWhile,
|
||||
+ ITextRange_fnMoveStartWhile,
|
||||
+ ITextRange_fnMoveEndWhile,
|
||||
+ ITextRange_fnMoveUntil,
|
||||
+ ITextRange_fnMoveStartUntil,
|
||||
+ ITextRange_fnMoveEndUntil,
|
||||
+ ITextRange_fnFindText,
|
||||
+ ITextRange_fnFindTextStart,
|
||||
+ ITextRange_fnFindTextEnd,
|
||||
+ ITextRange_fnDelete,
|
||||
+ ITextRange_fnCut,
|
||||
+ ITextRange_fnCopy,
|
||||
+ ITextRange_fnPaste,
|
||||
+ ITextRange_fnCanPaste,
|
||||
+ ITextRange_fnCanEdit,
|
||||
+ ITextRange_fnChangeCase,
|
||||
+ ITextRange_fnGetPoint,
|
||||
+ ITextRange_fnSetPoint,
|
||||
+ ITextRange_fnScrollIntoView,
|
||||
+ ITextRange_fnGetEmbeddedObject
|
||||
+};
|
||||
+/* ITextRange interface */
|
||||
+
|
||||
static HRESULT WINAPI
|
||||
ITextDocument_fnQueryInterface(ITextDocument* me, REFIID riid,
|
||||
void** ppvObject)
|
||||
@@ -646,13 +1336,48 @@ ITextDocument_fnRedo(ITextDocument* me, LONG Count, LONG* prop)
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
+static HRESULT CreateITextRange(IRichEditOleImpl *reOle, LONG start, LONG end,
|
||||
+ ITextRangeImpl *txtRge, ITextRange** ppRange)
|
||||
+{
|
||||
+ txtRge->ITextRange_iface.lpVtbl = &trvt;
|
||||
+ txtRge->ref = 1;
|
||||
+ txtRge->reOle = reOle;
|
||||
+ txtRge->start = start;
|
||||
+ txtRge->end = end;
|
||||
+ list_add_head(&reOle->rangelist, &txtRge->entry);
|
||||
+ *ppRange = &txtRge->ITextRange_iface;
|
||||
+ return S_OK;
|
||||
+}
|
||||
+
|
||||
static HRESULT WINAPI
|
||||
ITextDocument_fnRange(ITextDocument* me, LONG cp1, LONG cp2,
|
||||
ITextRange** ppRange)
|
||||
{
|
||||
IRichEditOleImpl *This = impl_from_ITextDocument(me);
|
||||
- FIXME("stub %p\n",This);
|
||||
- return E_NOTIMPL;
|
||||
+ ITextRangeImpl *txtRge = NULL;
|
||||
+ const int len = ME_GetTextLength(This->editor) + 1;
|
||||
+
|
||||
+ TRACE("%p %p %d %d\n", This, ppRange, cp1, cp2);
|
||||
+ if (!ppRange)
|
||||
+ return E_INVALIDARG;
|
||||
+
|
||||
+ cp1 = max(cp1, 0);
|
||||
+ cp2 = max(cp2, 0);
|
||||
+ cp1 = min(cp1, len);
|
||||
+ cp2 = min(cp2, len);
|
||||
+ if (cp1 > cp2)
|
||||
+ {
|
||||
+ LONG tmp;
|
||||
+ tmp = cp1;
|
||||
+ cp1 = cp2;
|
||||
+ cp2 = tmp;
|
||||
+ }
|
||||
+ if (cp1 == len)
|
||||
+ cp1 = cp2 = len - 1;
|
||||
+ txtRge = heap_alloc(sizeof(ITextRangeImpl));
|
||||
+ if (!txtRge)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+ return CreateITextRange(This, cp1, cp2, txtRge, ppRange);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI
|
||||
@@ -1548,6 +2273,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj)
|
||||
}
|
||||
TRACE("Created %p\n",reo);
|
||||
*ppObj = reo;
|
||||
+ list_init(&reo->rangelist);
|
||||
|
||||
return 1;
|
||||
}
|
||||
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
|
||||
index 571e5cd..f56a14a 100644
|
||||
--- a/dlls/riched20/tests/richole.c
|
||||
+++ b/dlls/riched20/tests/richole.c
|
||||
@@ -86,10 +86,11 @@ static void create_interfaces(HWND *w, IRichEditOle **reOle, ITextDocument **txt
|
||||
static void release_interfaces(HWND *w, IRichEditOle **reOle, ITextDocument **txtDoc,
|
||||
ITextSelection **txtSel)
|
||||
{
|
||||
+ if(txtSel)
|
||||
+ ITextSelection_Release(*txtSel);
|
||||
ITextDocument_Release(*txtDoc);
|
||||
IRichEditOle_Release(*reOle);
|
||||
DestroyWindow(*w);
|
||||
- ITextSelection_Release(*txtSel);
|
||||
}
|
||||
|
||||
static ULONG get_refcount(IUnknown *iface)
|
||||
@@ -486,6 +487,37 @@ static void test_ITextSelection_GetText(void)
|
||||
release_interfaces(&w, &reOle, &txtDoc, &txtSel);
|
||||
}
|
||||
|
||||
+static void test_ITextDocument_Range(void)
|
||||
+{
|
||||
+ HWND w;
|
||||
+ IRichEditOle *reOle = NULL;
|
||||
+ ITextDocument *txtDoc = NULL;
|
||||
+ ITextRange *txtRge = NULL;
|
||||
+ ITextRange *pointer = NULL;
|
||||
+ HRESULT hres;
|
||||
+ ULONG refcount;
|
||||
+
|
||||
+ create_interfaces(&w, &reOle, &txtDoc, NULL);
|
||||
+ hres = ITextDocument_Range(txtDoc, 0, 0, &txtRge);
|
||||
+ ok(hres == S_OK, "ITextDocument_Range fails 0x%x.\n", hres);
|
||||
+ refcount = get_refcount((IUnknown *)txtRge);
|
||||
+ ok(refcount == 1, "get wrong refcount: returned %d expected 1\n", refcount);
|
||||
+
|
||||
+ pointer = txtRge;
|
||||
+ hres = ITextDocument_Range(txtDoc, 0, 0, &txtRge);
|
||||
+ ok(hres == S_OK, "ITextDocument_Range fails 0x%x.\n", hres);
|
||||
+ ok(pointer != txtRge, "A new pointer should be returned\n");
|
||||
+ ITextRange_Release(pointer);
|
||||
+
|
||||
+ hres = ITextDocument_Range(txtDoc, 0, 0, NULL);
|
||||
+ ok(hres == E_INVALIDARG, "ITextDocument_Range should fail 0x%x.\n", hres);
|
||||
+
|
||||
+ release_interfaces(&w, &reOle, &txtDoc, NULL);
|
||||
+ hres = ITextRange_CanEdit(txtRge, NULL);
|
||||
+ ok(hres == CO_E_RELEASED, "ITextRange after ITextDocument destroyed\n");
|
||||
+ ITextRange_Release(txtRge);
|
||||
+}
|
||||
+
|
||||
START_TEST(richole)
|
||||
{
|
||||
/* Must explicitly LoadLibrary(). The test has no references to functions in
|
||||
@@ -496,4 +528,5 @@ START_TEST(richole)
|
||||
test_Interfaces();
|
||||
test_ITextDocument_Open();
|
||||
test_ITextSelection_GetText();
|
||||
+ test_ITextDocument_Range();
|
||||
}
|
||||
--
|
||||
1.7.9.5
|
||||
|
@ -1,15 +1,15 @@
|
||||
From 86451a53a9707a545430c25ae124cabc198fd48e Mon Sep 17 00:00:00 2001
|
||||
From 0e8cefd6ed92eff52f8e76ed9838ceebb8540685 Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Mon, 11 Aug 2014 10:58:26 +0800
|
||||
Subject: riched20: Implement IText{Selection, Range}::Get{Start, End}.
|
||||
|
||||
---
|
||||
dlls/riched20/richole.c | 30 +++++++++++++++++-------
|
||||
dlls/riched20/tests/richole.c | 52 +++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/riched20/richole.c | 30 ++++++++++++++++++-------
|
||||
dlls/riched20/tests/richole.c | 52 +++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 74 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
|
||||
index f39e0ae..071496d 100644
|
||||
index 1ff35cf..a88aff2 100644
|
||||
--- a/dlls/riched20/richole.c
|
||||
+++ b/dlls/riched20/richole.c
|
||||
@@ -635,8 +635,11 @@ static HRESULT WINAPI ITextRange_fnGetStart(ITextRange *me, LONG *pcpFirst)
|
||||
@ -145,5 +145,5 @@ index 152d144..e46e2af 100644
|
||||
+ test_GetStart_GetEnd();
|
||||
}
|
||||
--
|
||||
1.7.9.5
|
||||
2.1.0
|
||||
|
@ -1,28 +1,26 @@
|
||||
From 7f4a575af2fa25ca40654127d6b499583c1e5dd9 Mon Sep 17 00:00:00 2001
|
||||
From ebde3fe20d6abe6643fdfbeb22adf6d5a8d12ea4 Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Sun, 10 Aug 2014 20:43:41 +0800
|
||||
Subject: riched20: Implement ITextRange::GetDuplicate.
|
||||
|
||||
---
|
||||
dlls/riched20/richole.c | 14 ++++++++++++--
|
||||
dlls/riched20/tests/richole.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 47 insertions(+), 2 deletions(-)
|
||||
dlls/riched20/richole.c | 9 +++++++--
|
||||
dlls/riched20/tests/richole.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 42 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
|
||||
index 071496d..96c1222 100644
|
||||
index a88aff2..869d65c 100644
|
||||
--- a/dlls/riched20/richole.c
|
||||
+++ b/dlls/riched20/richole.c
|
||||
@@ -599,14 +599,24 @@ static HRESULT WINAPI ITextRange_fnSetChar(ITextRange *me, LONG ch)
|
||||
@@ -599,14 +599,19 @@ static HRESULT WINAPI ITextRange_fnSetChar(ITextRange *me, LONG ch)
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
+static HRESULT CreateITextRange(IRichEditOleImpl *reOle, LONG start, LONG end,
|
||||
+ ITextRangeImpl *txtRge, ITextRange** ppRange);
|
||||
+static HRESULT CreateITextRange(IRichEditOleImpl *reOle, LONG start, LONG end, ITextRange** ppRange);
|
||||
+
|
||||
static HRESULT WINAPI ITextRange_fnGetDuplicate(ITextRange *me, ITextRange **ppRange)
|
||||
{
|
||||
ITextRangeImpl *This = impl_from_ITextRange(me);
|
||||
+ ITextRangeImpl *txtRge = NULL;
|
||||
if (!This->reOle)
|
||||
return CO_E_RELEASED;
|
||||
|
||||
@ -32,10 +30,7 @@ index 071496d..96c1222 100644
|
||||
+ if (!ppRange)
|
||||
+ return E_INVALIDARG;
|
||||
+
|
||||
+ txtRge = heap_alloc(sizeof *txtRge);
|
||||
+ if (!txtRge)
|
||||
+ return E_FAIL;
|
||||
+ return CreateITextRange(This->reOle, This->start, This->end, txtRge, ppRange);
|
||||
+ return CreateITextRange(This->reOle, This->start, This->end, ppRange);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ITextRange_fnGetFormattedText(ITextRange *me, ITextRange **ppRange)
|
||||
@ -92,5 +87,5 @@ index e46e2af..b90d6c5 100644
|
||||
test_GetStart_GetEnd();
|
||||
}
|
||||
--
|
||||
1.7.9.5
|
||||
2.1.0
|
||||
|
@ -1,19 +1,19 @@
|
||||
From 93048ac9d04e0002cfaefaa97e0ce276303cddb6 Mon Sep 17 00:00:00 2001
|
||||
From ea59c742bd3b26df12576787aabf3fb92fa02ab7 Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Sun, 10 Aug 2014 06:02:02 +0800
|
||||
Subject: riched20: Implement ITextRange::Collapse and
|
||||
ITextSelection::Collapse.
|
||||
|
||||
---
|
||||
dlls/riched20/richole.c | 27 +++++++++++---
|
||||
dlls/riched20/tests/richole.c | 80 +++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/riched20/richole.c | 27 ++++++++++++---
|
||||
dlls/riched20/tests/richole.c | 80 +++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 102 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
|
||||
index 96c1222..d178192 100644
|
||||
index 869d65c..0ce97ba 100644
|
||||
--- a/dlls/riched20/richole.c
|
||||
+++ b/dlls/riched20/richole.c
|
||||
@@ -745,14 +745,26 @@ static HRESULT WINAPI ITextRange_fnGetStoryType(ITextRange *me, LONG *pValue)
|
||||
@@ -740,14 +740,26 @@ static HRESULT WINAPI ITextRange_fnGetStoryType(ITextRange *me, LONG *pValue)
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@ index 96c1222..d178192 100644
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ITextRange_fnExpand(ITextRange *me, LONG Unit, LONG *pDelta)
|
||||
@@ -1745,11 +1757,16 @@ static HRESULT WINAPI ITextSelection_fnGetStoryType(ITextSelection *me, LONG *pV
|
||||
@@ -1740,11 +1752,16 @@ static HRESULT WINAPI ITextSelection_fnGetStoryType(ITextSelection *me, LONG *pV
|
||||
static HRESULT WINAPI ITextSelection_fnCollapse(ITextSelection *me, LONG bStart)
|
||||
{
|
||||
ITextSelectionImpl *This = impl_from_ITextSelection(me);
|
||||
@ -163,5 +163,5 @@ index b90d6c5..ce14406 100644
|
||||
+ test_ITextRange_Collapse();
|
||||
}
|
||||
--
|
||||
1.7.9.5
|
||||
2.1.0
|
||||
|
@ -1,18 +1,18 @@
|
||||
From 27bf1cd55b38e8f4a36dd18d5dedd7d29c1be409 Mon Sep 17 00:00:00 2001
|
||||
From 16ec02f83420cc404575c2668ec0f2efcc647a30 Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Fri, 8 Aug 2014 21:32:57 +0800
|
||||
Subject: riched20: Implement IText{Selection, Range}::Set{Start, End}.
|
||||
|
||||
---
|
||||
dlls/riched20/richole.c | 52 +++++++++++++---
|
||||
dlls/riched20/tests/richole.c | 135 +++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/riched20/richole.c | 52 +++++++++++++---
|
||||
dlls/riched20/tests/richole.c | 135 ++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 179 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
|
||||
index d178192..86a226b 100644
|
||||
index 0ce97ba..1a88d42 100644
|
||||
--- a/dlls/riched20/richole.c
|
||||
+++ b/dlls/riched20/richole.c
|
||||
@@ -652,14 +652,27 @@ static HRESULT WINAPI ITextRange_fnGetStart(ITextRange *me, LONG *pcpFirst)
|
||||
@@ -647,14 +647,27 @@ static HRESULT WINAPI ITextRange_fnGetStart(ITextRange *me, LONG *pcpFirst)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ index d178192..86a226b 100644
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ITextRange_fnGetEnd(ITextRange *me, LONG *pcpLim)
|
||||
@@ -675,14 +688,27 @@ static HRESULT WINAPI ITextRange_fnGetEnd(ITextRange *me, LONG *pcpLim)
|
||||
@@ -670,14 +683,27 @@ static HRESULT WINAPI ITextRange_fnGetEnd(ITextRange *me, LONG *pcpLim)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ index d178192..86a226b 100644
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ITextRange_fnGetFont(ITextRange *me, ITextFont **pFont)
|
||||
@@ -1663,11 +1689,16 @@ static HRESULT WINAPI ITextSelection_fnGetStart(ITextSelection *me, LONG *pcpFir
|
||||
@@ -1658,11 +1684,16 @@ static HRESULT WINAPI ITextSelection_fnGetStart(ITextSelection *me, LONG *pcpFir
|
||||
static HRESULT WINAPI ITextSelection_fnSetStart(ITextSelection *me, LONG cpFirst)
|
||||
{
|
||||
ITextSelectionImpl *This = impl_from_ITextSelection(me);
|
||||
@ -91,7 +91,7 @@ index d178192..86a226b 100644
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ITextSelection_fnGetEnd(ITextSelection *me, LONG *pcpLim)
|
||||
@@ -1687,11 +1718,16 @@ static HRESULT WINAPI ITextSelection_fnGetEnd(ITextSelection *me, LONG *pcpLim)
|
||||
@@ -1682,11 +1713,16 @@ static HRESULT WINAPI ITextSelection_fnGetEnd(ITextSelection *me, LONG *pcpLim)
|
||||
static HRESULT WINAPI ITextSelection_fnSetEnd(ITextSelection *me, LONG cpLim)
|
||||
{
|
||||
ITextSelectionImpl *This = impl_from_ITextSelection(me);
|
||||
@ -268,5 +268,5 @@ index ce14406..46cea63 100644
|
||||
+ test_ITextRange_SetEnd();
|
||||
}
|
||||
--
|
||||
1.7.9.5
|
||||
2.1.0
|
||||
|
@ -1,16 +1,16 @@
|
||||
From fbef39fb5b1f1cad842289bb8cb16d8df51d0d2c Mon Sep 17 00:00:00 2001
|
||||
From 5ffad86e91e2af5a3ba5dd1537e4535d9c04d455 Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Mon, 11 Aug 2014 13:51:55 +0800
|
||||
Subject: riched20: Stub for ITextFont interface and implement
|
||||
ITextRange::GetFont and ITextSelection::GetFont.
|
||||
|
||||
---
|
||||
dlls/riched20/richole.c | 804 ++++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/riched20/tests/richole.c | 93 +++++
|
||||
dlls/riched20/richole.c | 804 +++++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/riched20/tests/richole.c | 93 +++++
|
||||
2 files changed, 893 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
|
||||
index 86a226b..6a8cdbb 100644
|
||||
index 1a88d42..06d1d58 100644
|
||||
--- a/dlls/riched20/richole.c
|
||||
+++ b/dlls/riched20/richole.c
|
||||
@@ -46,10 +46,12 @@ DEFINE_GUID(IID_ITextHost2, 0x13e670f5,0x1a5a,0x11cf,0xab,0xeb,0x00,0xaa,0x00,0x
|
||||
@ -807,7 +807,7 @@ index 86a226b..6a8cdbb 100644
|
||||
/* ITextRange interface */
|
||||
static inline ITextRangeImpl *impl_from_ITextRange(ITextRange *iface)
|
||||
{
|
||||
@@ -711,14 +1465,42 @@ static HRESULT WINAPI ITextRange_fnSetEnd(ITextRange *me, LONG cpLim)
|
||||
@@ -706,14 +1460,42 @@ static HRESULT WINAPI ITextRange_fnSetEnd(ITextRange *me, LONG cpLim)
|
||||
return range_SetEnd(This->reOle->editor, cpLim, &This->start, &This->end);
|
||||
}
|
||||
|
||||
@ -852,7 +852,7 @@ index 86a226b..6a8cdbb 100644
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ITextRange_fnSetFont(ITextRange *me, ITextFont *pFont)
|
||||
@@ -1733,11 +2515,24 @@ static HRESULT WINAPI ITextSelection_fnSetEnd(ITextSelection *me, LONG cpLim)
|
||||
@@ -1728,11 +2510,24 @@ static HRESULT WINAPI ITextSelection_fnSetEnd(ITextSelection *me, LONG cpLim)
|
||||
static HRESULT WINAPI ITextSelection_fnGetFont(ITextSelection *me, ITextFont **pFont)
|
||||
{
|
||||
ITextSelectionImpl *This = impl_from_ITextSelection(me);
|
||||
@ -879,7 +879,7 @@ index 86a226b..6a8cdbb 100644
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ITextSelection_fnSetFont(ITextSelection *me, ITextFont *pFont)
|
||||
@@ -2371,6 +3166,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj)
|
||||
@@ -2366,6 +3161,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj)
|
||||
TRACE("Created %p\n",reo);
|
||||
*ppObj = reo;
|
||||
list_init(&reo->rangelist);
|
||||
@ -1004,5 +1004,5 @@ index 46cea63..3d308c5 100644
|
||||
+ test_ITextRange_GetFont();
|
||||
}
|
||||
--
|
||||
1.7.9.5
|
||||
2.1.0
|
||||
|
@ -1,16 +1,16 @@
|
||||
From fee736f4564aadedd78a1fa8f09a6bf7caa8706c Mon Sep 17 00:00:00 2001
|
||||
From e0b71ae473c149f60fef0845320d846f66f5770d Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Sun, 10 Aug 2014 22:17:57 +0800
|
||||
Subject: riched20: Stub for ITextPara interface and implement
|
||||
ITextRange::GetPara.
|
||||
|
||||
---
|
||||
dlls/riched20/richole.c | 684 ++++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/riched20/tests/richole.c | 47 +++
|
||||
dlls/riched20/richole.c | 684 +++++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/riched20/tests/richole.c | 47 +++
|
||||
2 files changed, 729 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
|
||||
index 6a8cdbb..241c681 100644
|
||||
index 06d1d58..c53e2fe 100644
|
||||
--- a/dlls/riched20/richole.c
|
||||
+++ b/dlls/riched20/richole.c
|
||||
@@ -47,11 +47,13 @@ DEFINE_GUID(IID_ITextDocument, 0x8cc497c0, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xa
|
||||
@ -706,7 +706,7 @@ index 6a8cdbb..241c681 100644
|
||||
/* ITextFont interface */
|
||||
static inline ITextFontImpl *impl_from_ITextFont(ITextFont *iface)
|
||||
{
|
||||
@@ -1513,14 +2164,42 @@ static HRESULT WINAPI ITextRange_fnSetFont(ITextRange *me, ITextFont *pFont)
|
||||
@@ -1508,14 +2159,42 @@ static HRESULT WINAPI ITextRange_fnSetFont(ITextRange *me, ITextFont *pFont)
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@ -751,7 +751,7 @@ index 6a8cdbb..241c681 100644
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ITextRange_fnSetPara(ITextRange *me, ITextPara *pPara)
|
||||
@@ -3167,6 +3846,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj)
|
||||
@@ -3162,6 +3841,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj)
|
||||
*ppObj = reo;
|
||||
list_init(&reo->rangelist);
|
||||
list_init(&reo->fontlist);
|
||||
@ -823,5 +823,5 @@ index 3d308c5..f7f27d1 100644
|
||||
+ test_ITextRange_GetPara();
|
||||
}
|
||||
--
|
||||
1.7.9.5
|
||||
2.1.0
|
||||
|
@ -1,10 +1,10 @@
|
||||
From 4c89684f20fd9963709307fc6419d6cbe0eacf0d Mon Sep 17 00:00:00 2001
|
||||
From 19d065a80722df99e348c67251eb888ccd3a4a98 Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Wed, 13 Aug 2014 14:57:52 +0800
|
||||
Subject: riched20: Fix ME_RunOfsFromCharOfs() when nCharOfs > strlen().
|
||||
|
||||
---
|
||||
dlls/riched20/run.c | 9 +++++++--
|
||||
dlls/riched20/run.c | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c
|
||||
@ -37,5 +37,5 @@ index 38d0270..ad08b82 100644
|
||||
|
||||
/******************************************************************************
|
||||
--
|
||||
1.7.9.5
|
||||
2.1.0
|
||||
|
@ -1,15 +1,15 @@
|
||||
From c76f8caf18ce72f26901f4a05b0ff13b5ea38e51 Mon Sep 17 00:00:00 2001
|
||||
From a6d1a620cbbc1483b2130e85fad2211e542a0b11 Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Wed, 13 Aug 2014 15:40:11 +0800
|
||||
Subject: riched20: Implement ITextRange::GetText.
|
||||
|
||||
---
|
||||
dlls/riched20/richole.c | 50 ++++++++++++++++++++++++-----------------
|
||||
dlls/riched20/tests/richole.c | 38 +++++++++++++++++++++++++++++++
|
||||
dlls/riched20/richole.c | 50 +++++++++++++++++++++++++------------------
|
||||
dlls/riched20/tests/richole.c | 38 ++++++++++++++++++++++++++++++++
|
||||
2 files changed, 67 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
|
||||
index 241c681..8b93aad 100644
|
||||
index c53e2fe..0ba1a46 100644
|
||||
--- a/dlls/riched20/richole.c
|
||||
+++ b/dlls/riched20/richole.c
|
||||
@@ -1949,14 +1949,40 @@ static HRESULT WINAPI ITextRange_fnInvoke(ITextRange *me, DISPID dispIdMember, R
|
||||
@ -55,7 +55,7 @@ index 241c681..8b93aad 100644
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ITextRange_fnSetText(ITextRange *me, BSTR bstr)
|
||||
@@ -3039,8 +3065,6 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
|
||||
@@ -3034,8 +3060,6 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
|
||||
{
|
||||
ITextSelectionImpl *This = impl_from_ITextSelection(me);
|
||||
ME_Cursor *start = NULL, *end = NULL;
|
||||
@ -64,7 +64,7 @@ index 241c681..8b93aad 100644
|
||||
|
||||
if (!This->reOle)
|
||||
return CO_E_RELEASED;
|
||||
@@ -3049,23 +3073,7 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
|
||||
@@ -3044,23 +3068,7 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
|
||||
return E_INVALIDARG;
|
||||
|
||||
ME_GetSelection(This->reOle->editor, &start, &end);
|
||||
@ -144,5 +144,5 @@ index f7f27d1..ae514ec 100644
|
||||
+ test_ITextRange_GetText();
|
||||
}
|
||||
--
|
||||
1.7.9.5
|
||||
2.1.0
|
||||
|
@ -1,18 +1,18 @@
|
||||
From 8403ff90bb26c427c34beb7094d1dbf61e56102f Mon Sep 17 00:00:00 2001
|
||||
From 5b91dcc229a35b8647200740b95df1a5ba8ff757 Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Wed, 13 Aug 2014 17:17:14 +0800
|
||||
Subject: riched20: Implement ITextRange::SetRange.
|
||||
|
||||
---
|
||||
dlls/riched20/richole.c | 41 +++++++++++++++++++++++++----------------
|
||||
dlls/riched20/tests/richole.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 60 insertions(+), 16 deletions(-)
|
||||
dlls/riched20/richole.c | 42 +++++++++++++++++++++++++-----------------
|
||||
dlls/riched20/tests/richole.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 60 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
|
||||
index 8b93aad..98f1b1e 100644
|
||||
index 0ba1a46..0cdfa8a 100644
|
||||
--- a/dlls/riched20/richole.c
|
||||
+++ b/dlls/riched20/richole.c
|
||||
@@ -2311,14 +2311,36 @@ static HRESULT WINAPI ITextRange_fnSetIndex(ITextRange *me, LONG Unit, LONG Inde
|
||||
@@ -2306,14 +2306,36 @@ static HRESULT WINAPI ITextRange_fnSetIndex(ITextRange *me, LONG Unit, LONG Inde
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@ -51,10 +51,10 @@ index 8b93aad..98f1b1e 100644
|
||||
}
|
||||
|
||||
static HRESULT WINAPI ITextRange_fnInRange(ITextRange *me, ITextRange *pRange, LONG *pb)
|
||||
@@ -2911,25 +2933,12 @@ ITextDocument_fnRange(ITextDocument* me, LONG cp1, LONG cp2,
|
||||
@@ -2908,26 +2930,12 @@ ITextDocument_fnRange(ITextDocument* me, LONG cp1, LONG cp2,
|
||||
ITextRange** ppRange)
|
||||
{
|
||||
IRichEditOleImpl *This = impl_from_ITextDocument(me);
|
||||
ITextRangeImpl *txtRge = NULL;
|
||||
- const int len = ME_GetTextLength(This->editor) + 1;
|
||||
|
||||
TRACE("%p %p %d %d\n", This, ppRange, cp1, cp2);
|
||||
@ -74,10 +74,11 @@ index 8b93aad..98f1b1e 100644
|
||||
- }
|
||||
- if (cp1 == len)
|
||||
- cp1 = cp2 = len - 1;
|
||||
-
|
||||
+ cp2range(This->editor, &cp1, &cp2);
|
||||
txtRge = heap_alloc(sizeof(ITextRangeImpl));
|
||||
if (!txtRge)
|
||||
return E_OUTOFMEMORY;
|
||||
return CreateITextRange(This, cp1, cp2, ppRange);
|
||||
}
|
||||
|
||||
diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c
|
||||
index ae514ec..6c7c15d 100644
|
||||
--- a/dlls/riched20/tests/richole.c
|
||||
@ -130,5 +131,5 @@ index ae514ec..6c7c15d 100644
|
||||
+ test_ITextRange_SetRange();
|
||||
}
|
||||
--
|
||||
1.7.9.5
|
||||
2.1.0
|
||||
|
@ -1,18 +1,18 @@
|
||||
From e17c9f4954b364347ef6b5eb258ec66f50362db6 Mon Sep 17 00:00:00 2001
|
||||
From 7649229a1c439ef7841ff50710520b87cc7fdaea Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Fri, 15 Aug 2014 14:27:21 +0800
|
||||
Subject: riched20: Implement ITextRange::IsEqual.
|
||||
|
||||
---
|
||||
dlls/riched20/richole.c | 19 +++++++++++++++--
|
||||
dlls/riched20/tests/richole.c | 47 +++++++++++++++++++++++++++++++++++++++++
|
||||
dlls/riched20/richole.c | 19 +++++++++++++++--
|
||||
dlls/riched20/tests/richole.c | 47 +++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 64 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
|
||||
index 98f1b1e..47ad0f9 100644
|
||||
index 0cdfa8a..f56926c 100644
|
||||
--- a/dlls/riched20/richole.c
|
||||
+++ b/dlls/riched20/richole.c
|
||||
@@ -2363,14 +2363,29 @@ static HRESULT WINAPI ITextRange_fnInStory(ITextRange *me, ITextRange *pRange, L
|
||||
@@ -2358,14 +2358,29 @@ static HRESULT WINAPI ITextRange_fnInStory(ITextRange *me, ITextRange *pRange, L
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
@ -108,5 +108,5 @@ index 6c7c15d..6642ca3 100644
|
||||
+ test_ITextRange_IsEqual();
|
||||
}
|
||||
--
|
||||
1.7.9.5
|
||||
2.1.0
|
||||
|
@ -1,18 +1,18 @@
|
||||
From 7c46ccadf6492585c2a2cd3fc9f06ab960fe30f4 Mon Sep 17 00:00:00 2001
|
||||
From b65c3bc3db95f9753ae10a3b1f6b999056bbb1eb Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Mon, 18 Aug 2014 14:38:50 +0800
|
||||
Subject: riched20: Implement ITextRange::GetStoryLength.
|
||||
|
||||
---
|
||||
dlls/riched20/richole.c | 6 ++++--
|
||||
dlls/riched20/tests/richole.c | 32 ++++++++++++++++++++++++++++++++
|
||||
dlls/riched20/richole.c | 6 ++++--
|
||||
dlls/riched20/tests/richole.c | 32 ++++++++++++++++++++++++++++++++
|
||||
2 files changed, 36 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
|
||||
index 47ad0f9..1af7804 100644
|
||||
index f56926c..18e7045 100644
|
||||
--- a/dlls/riched20/richole.c
|
||||
+++ b/dlls/riched20/richole.c
|
||||
@@ -2244,8 +2244,10 @@ static HRESULT WINAPI ITextRange_fnGetStoryLength(ITextRange *me, LONG *pcch)
|
||||
@@ -2239,8 +2239,10 @@ static HRESULT WINAPI ITextRange_fnGetStoryLength(ITextRange *me, LONG *pcch)
|
||||
if (!This->reOle)
|
||||
return CO_E_RELEASED;
|
||||
|
||||
@ -74,5 +74,5 @@ index 6642ca3..c4f58fd 100644
|
||||
+ test_ITextRange_GetStoryLength();
|
||||
}
|
||||
--
|
||||
1.7.9.5
|
||||
2.1.0
|
||||
|
@ -1,18 +1,18 @@
|
||||
From f9427d23ca1d7fac8f561fa8ed2563ea187451f4 Mon Sep 17 00:00:00 2001
|
||||
From 143bfdb6909528b343fb554a0200415d40e3fca0 Mon Sep 17 00:00:00 2001
|
||||
From: Jactry Zeng <wine@jactry.com>
|
||||
Date: Mon, 18 Aug 2014 14:47:14 +0800
|
||||
Subject: riched20: Implement ITextSelection::GetStoryLength.
|
||||
|
||||
---
|
||||
dlls/riched20/richole.c | 6 ++++--
|
||||
dlls/riched20/tests/richole.c | 30 ++++++++++++++++++++++++++++++
|
||||
dlls/riched20/richole.c | 6 ++++--
|
||||
dlls/riched20/tests/richole.c | 30 ++++++++++++++++++++++++++++++
|
||||
2 files changed, 34 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
|
||||
index 1af7804..ed70b8d 100644
|
||||
index 18e7045..8c64492 100644
|
||||
--- a/dlls/riched20/richole.c
|
||||
+++ b/dlls/riched20/richole.c
|
||||
@@ -3284,8 +3284,10 @@ static HRESULT WINAPI ITextSelection_fnGetStoryLength(ITextSelection *me, LONG *
|
||||
@@ -3278,8 +3278,10 @@ static HRESULT WINAPI ITextSelection_fnGetStoryLength(ITextSelection *me, LONG *
|
||||
if (!This->reOle)
|
||||
return CO_E_RELEASED;
|
||||
|
||||
@ -74,5 +74,5 @@ index c4f58fd..a14f88b 100644
|
||||
test_ITextRange_GetChar();
|
||||
test_ITextRange_GetDuplicate();
|
||||
--
|
||||
1.7.9.5
|
||||
2.1.0
|
||||
|
Loading…
Reference in New Issue
Block a user