winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
May 2015
----- 2025 -----
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
428 discussions
Start a n
N
ew thread
André Hentschel : dbghelp: Fix typo in trace output.
by Alexandre Julliard
20 May '15
20 May '15
Module: wine Branch: master Commit: 0d68edf03e2d1e09b18cfe2b465c7759b08257e8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d68edf03e2d1e09b18cfe2b4…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Wed May 20 14:31:46 2015 +0200 dbghelp: Fix typo in trace output. --- dlls/dbghelp/cpu_arm64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dbghelp/cpu_arm64.c b/dlls/dbghelp/cpu_arm64.c index d80e608..403cde7 100644 --- a/dlls/dbghelp/cpu_arm64.c +++ b/dlls/dbghelp/cpu_arm64.c @@ -134,7 +134,7 @@ static BOOL arm64_stack_walk(struct cpu_stack_walk* csw, LPSTACKFRAME64 frame, C wine_dbgstr_addr(&frame->AddrFrame), wine_dbgstr_addr(&frame->AddrReturn), wine_dbgstr_addr(&frame->AddrStack), - curr_mode == stm_start ? "start" : "ARM", + curr_mode == stm_start ? "start" : "ARM64", wine_dbgstr_longlong(curr_count), frame->FuncTableEntry);
1
0
0
0
Huw Davies : comctl32: Fix a typo in the TB_SAVERESTOREA handler.
by Alexandre Julliard
20 May '15
20 May '15
Module: wine Branch: master Commit: 5c4dc9fc56b81556a4253474cca57506122e273c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5c4dc9fc56b81556a4253474c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed May 20 12:02:10 2015 +0100 comctl32: Fix a typo in the TB_SAVERESTOREA handler. --- dlls/comctl32/toolbar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index ff52dc7..ecf0604 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -4204,7 +4204,7 @@ TOOLBAR_SaveRestoreA (TOOLBAR_INFO *infoPtr, WPARAM wParam, const TBSAVEPARAMSA len = MultiByteToWideChar(CP_ACP, 0, lpSave->pszSubKey, -1, NULL, 0); pszSubKey = Alloc(len * sizeof(WCHAR)); - if (pszSubKey) goto exit; + if (!pszSubKey) goto exit; MultiByteToWideChar(CP_ACP, 0, lpSave->pszSubKey, -1, pszSubKey, len); len = MultiByteToWideChar(CP_ACP, 0, lpSave->pszValueName, -1, NULL, 0);
1
0
0
0
Alexandre Julliard : iphlpapi/tests: Avoid sizeof in traces.
by Alexandre Julliard
20 May '15
20 May '15
Module: wine Branch: master Commit: 0de1c331d690e18e7e819252085f82082dbae723 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0de1c331d690e18e7e8192520…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed May 20 21:45:33 2015 +0900 iphlpapi/tests: Avoid sizeof in traces. --- dlls/iphlpapi/tests/iphlpapi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dlls/iphlpapi/tests/iphlpapi.c b/dlls/iphlpapi/tests/iphlpapi.c index bc70b51..db965d3 100644 --- a/dlls/iphlpapi/tests/iphlpapi.c +++ b/dlls/iphlpapi/tests/iphlpapi.c @@ -1044,7 +1044,6 @@ todo_wine { PICMP_ECHO_REPLY pong = (PICMP_ECHO_REPLY) replydata; trace ("send addr : %s\n", ntoa(address)); - trace ("send size : %u\n", sizeof(senddata)); trace ("reply addr : %s\n", ntoa(pong->Address)); trace ("reply size : %u\n", replysz); trace ("roundtrip : %u ms\n", pong->RoundTripTime);
1
0
0
0
Nikolay Sivov : riched20: Implement GetFont() for selection range.
by Alexandre Julliard
20 May '15
20 May '15
Module: wine Branch: master Commit: fa8c384b3bbcbc3ad7f47d5bbd345baee9042185 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fa8c384b3bbcbc3ad7f47d5bb…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 20 11:41:34 2015 +0300 riched20: Implement GetFont() for selection range. --- dlls/riched20/richole.c | 44 ++++++++++++++++++++++++++++++++++--------- dlls/riched20/tests/richole.c | 22 ++++++++++++++++++++-- 2 files changed, 55 insertions(+), 11 deletions(-) diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index 1fbbc0a..c9c75b8 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -49,6 +49,9 @@ DEFINE_GUID(IID_ITextSelection, 0x8cc497c1, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0x DEFINE_GUID(IID_ITextFont, 0x8cc497c3, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d); DEFINE_GUID(IID_ITextPara, 0x8cc497c4, 0xa1df, 0x11ce, 0x80, 0x98, 0x00, 0xaa, 0x00, 0x47, 0xbe, 0x5d); +/* private IID used to get back IRichEditOleImpl pointer */ +DEFINE_GUID(IID_Igetrichole, 0xe3ce5c7a, 0x8247, 0x4622, 0x81, 0xad, 0x11, 0x81, 0x02, 0xaa, 0x01, 0x30); + typedef struct ITextSelectionImpl ITextSelectionImpl; typedef struct IOleClientSiteImpl IOleClientSiteImpl; typedef struct ITextRangeImpl ITextRangeImpl; @@ -313,25 +316,29 @@ static HRESULT get_textfont_prop_for_pos(const IRichEditOleImpl *reole, int pos, static HRESULT get_textfont_prop(ITextRange *range, enum textfont_prop_id propid, textfont_prop_val *value) { - ITextRangeImpl *rng = impl_from_ITextRange(range); + IRichEditOleImpl *reole; textfont_prop_val v; + LONG start, end, i; HRESULT hr; - int i; - if (!rng->reOle) + ITextRange_QueryInterface(range, &IID_Igetrichole, (void**)&reole); + if (!reole) return CO_E_RELEASED; init_textfont_prop_value(propid, value); + ITextRange_GetStart(range, &start); + ITextRange_GetEnd(range, &end); + /* iterate trough a range to see if property value is consistent */ - hr = get_textfont_prop_for_pos(rng->reOle, rng->start, propid, &v); + hr = get_textfont_prop_for_pos(reole, start, propid, &v); if (FAILED(hr)) return hr; - for (i = rng->start + 1; i < rng->end; i++) { + for (i = start + 1; i < end; i++) { textfont_prop_val cur; - hr = get_textfont_prop_for_pos(rng->reOle, i, propid, &cur); + hr = get_textfont_prop_for_pos(reole, i, propid, &cur); if (FAILED(hr)) return hr; @@ -937,6 +944,8 @@ static const IRichEditOleVtbl revt = { /* ITextRange interface */ static HRESULT WINAPI ITextRange_fnQueryInterface(ITextRange *me, REFIID riid, void **ppvObj) { + ITextRangeImpl *This = impl_from_ITextRange(me); + *ppvObj = NULL; if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDispatch) @@ -946,6 +955,11 @@ static HRESULT WINAPI ITextRange_fnQueryInterface(ITextRange *me, REFIID riid, v ITextRange_AddRef(me); return S_OK; } + else if (IsEqualGUID(riid, &IID_Igetrichole)) + { + *ppvObj = This->reOle; + return S_OK; + } return E_NOINTERFACE; } @@ -3023,6 +3037,8 @@ static HRESULT WINAPI ITextSelection_fnQueryInterface( REFIID riid, void **ppvObj) { + ITextSelectionImpl *This = impl_from_ITextSelection(me); + *ppvObj = NULL; if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDispatch) @@ -3033,6 +3049,11 @@ static HRESULT WINAPI ITextSelection_fnQueryInterface( ITextSelection_AddRef(me); return S_OK; } + else if (IsEqualGUID(riid, &IID_Igetrichole)) + { + *ppvObj = This->reOle; + return S_OK; + } return E_NOINTERFACE; } @@ -3246,14 +3267,19 @@ static HRESULT WINAPI ITextSelection_fnSetEnd(ITextSelection *me, LONG cpLim) return E_NOTIMPL; } -static HRESULT WINAPI ITextSelection_fnGetFont(ITextSelection *me, ITextFont **pFont) +static HRESULT WINAPI ITextSelection_fnGetFont(ITextSelection *me, ITextFont **font) { ITextSelectionImpl *This = impl_from_ITextSelection(me); + + TRACE("(%p)->(%p)\n", This, font); + if (!This->reOle) return CO_E_RELEASED; - FIXME("not implemented\n"); - return E_NOTIMPL; + if (!font) + return E_INVALIDARG; + + return create_textfont((ITextRange*)me, font); } static HRESULT WINAPI ITextSelection_fnSetFont(ITextSelection *me, ITextFont *pFont) diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c index 6ff2fe3..a47d31f 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c @@ -114,7 +114,7 @@ static void test_Interfaces(void) { IRichEditOle *reOle = NULL, *reOle1 = NULL; ITextDocument *txtDoc = NULL; - ITextSelection *txtSel = NULL; + ITextSelection *txtSel = NULL, *txtSel2; IUnknown *punk; HRESULT hres; LRESULT res; @@ -147,7 +147,13 @@ static void test_Interfaces(void) hres = ITextDocument_GetSelection(txtDoc, NULL); ok(hres == E_INVALIDARG, "ITextDocument_GetSelection: 0x%x\n", hres); - ITextDocument_GetSelection(txtDoc, &txtSel); + hres = ITextDocument_GetSelection(txtDoc, &txtSel); + ok(hres == S_OK, "got 0x%08x\n", hres); + + hres = ITextDocument_GetSelection(txtDoc, &txtSel2); + ok(hres == S_OK, "got 0x%08x\n", hres); + ok(txtSel2 == txtSel, "got %p, %p\n", txtSel, txtSel2); + ITextSelection_Release(txtSel2); punk = NULL; hres = ITextSelection_QueryInterface(txtSel, &IID_ITextSelection, (void **) &punk); @@ -1216,6 +1222,7 @@ static void test_GetFont(void) IRichEditOle *reOle = NULL; ITextDocument *doc = NULL; ITextRange *range = NULL; + ITextSelection *selection; ITextFont *font, *font2; CHARFORMAT2A cf; LONG value; @@ -1227,6 +1234,17 @@ static void test_GetFont(void) create_interfaces(&hwnd, &reOle, &doc, NULL); SendMessageA(hwnd, WM_SETTEXT, 0, (LPARAM)test_text1); + hr = ITextDocument_GetSelection(doc, &selection); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = ITextSelection_GetFont(selection, &font); + ok(hr == S_OK, "got 0x%08x\n", hr); + hr = ITextSelection_GetFont(selection, &font2); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(font != font2, "got %p, %p\n", font, font2); + ITextFont_Release(font2); + ITextFont_Release(font); + ITextSelection_Release(selection); + EXPECT_REF(reOle, 3); EXPECT_REF(doc, 3);
1
0
0
0
Nikolay Sivov : riched20: Implement GetLanguageID().
by Alexandre Julliard
20 May '15
20 May '15
Module: wine Branch: master Commit: 72ef367992e4c9c39bdd9b13fb019a2ad9ec544c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=72ef367992e4c9c39bdd9b13f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 20 11:18:52 2015 +0300 riched20: Implement GetLanguageID(). --- dlls/riched20/richole.c | 9 +++++++-- dlls/riched20/tests/richole.c | 7 +++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index e4136b0..1fbbc0a 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -221,6 +221,7 @@ static inline BOOL is_equal_textfont_prop_value(enum textfont_prop_id propid, te case FONT_BOLD: case FONT_FORECOLOR: case FONT_ITALIC: + case FONT_LANGID: case FONT_STRIKETHROUGH: case FONT_SUBSCRIPT: case FONT_SUPERSCRIPT: @@ -241,6 +242,7 @@ static inline void init_textfont_prop_value(enum textfont_prop_id propid, textfo case FONT_BOLD: case FONT_FORECOLOR: case FONT_ITALIC: + case FONT_LANGID: case FONT_STRIKETHROUGH: case FONT_SUBSCRIPT: case FONT_SUPERSCRIPT: @@ -283,6 +285,9 @@ static HRESULT get_textfont_prop_for_pos(const IRichEditOleImpl *reole, int pos, case FONT_ITALIC: value->l = fmt.dwEffects & CFE_ITALIC ? tomTrue : tomFalse; break; + case FONT_LANGID: + value->l = fmt.lcid; + break; case FONT_SIZE: value->f = fmt.yHeight; break; @@ -1958,8 +1963,8 @@ static HRESULT WINAPI TextFont_SetKerning(ITextFont *iface, FLOAT value) static HRESULT WINAPI TextFont_GetLanguageID(ITextFont *iface, LONG *value) { ITextFontImpl *This = impl_from_ITextFont(iface); - FIXME("(%p)->(%p): stub\n", This, value); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, value); + return get_textfont_propl(This->range, FONT_LANGID, value); } static HRESULT WINAPI TextFont_SetLanguageID(ITextFont *iface, LONG value) diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c index a85f485..6ff2fe3 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c @@ -1272,6 +1272,13 @@ static void test_GetFont(void) ok(hr == S_OK, "got 0x%08x\n", hr); ok(size > 0.0, "size %.2f\n", size); + value = 0; + hr = ITextFont_GetLanguageID(font, &value); + ok(hr == S_OK, "got 0x%08x\n", hr); +todo_wine + ok(value == GetUserDefaultLCID(), "got lcid %x, user lcid %x\n", value, + GetUserDefaultLCID()); + /* range is non-italic */ value = tomTrue; hr = ITextFont_GetItalic(font, &value);
1
0
0
0
Nikolay Sivov : riched20: Implement GetSubscript()/GetSuperscript().
by Alexandre Julliard
20 May '15
20 May '15
Module: wine Branch: master Commit: 1e68433d784950fee5df68a5dd6dc52a6b0079c7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1e68433d784950fee5df68a5d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 20 10:46:11 2015 +0300 riched20: Implement GetSubscript()/GetSuperscript(). --- dlls/riched20/richole.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index b2e78f2..e4136b0 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -222,6 +222,8 @@ static inline BOOL is_equal_textfont_prop_value(enum textfont_prop_id propid, te case FONT_FORECOLOR: case FONT_ITALIC: case FONT_STRIKETHROUGH: + case FONT_SUBSCRIPT: + case FONT_SUPERSCRIPT: case FONT_UNDERLINE: return left->l == right->l; case FONT_SIZE: @@ -240,6 +242,8 @@ static inline void init_textfont_prop_value(enum textfont_prop_id propid, textfo case FONT_FORECOLOR: case FONT_ITALIC: case FONT_STRIKETHROUGH: + case FONT_SUBSCRIPT: + case FONT_SUPERSCRIPT: case FONT_UNDERLINE: v->l = tomUndefined; return; @@ -285,6 +289,12 @@ static HRESULT get_textfont_prop_for_pos(const IRichEditOleImpl *reole, int pos, case FONT_STRIKETHROUGH: value->l = fmt.dwEffects & CFE_STRIKEOUT ? tomTrue : tomFalse; break; + case FONT_SUBSCRIPT: + value->l = fmt.dwEffects & CFE_SUBSCRIPT ? tomTrue : tomFalse; + break; + case FONT_SUPERSCRIPT: + value->l = fmt.dwEffects & CFE_SUPERSCRIPT ? tomTrue : tomFalse; + break; case FONT_UNDERLINE: value->l = fmt.dwEffects & CFE_UNDERLINE ? tomTrue : tomFalse; break; @@ -2088,8 +2098,8 @@ static HRESULT WINAPI TextFont_SetStrikeThrough(ITextFont *iface, LONG value) static HRESULT WINAPI TextFont_GetSubscript(ITextFont *iface, LONG *value) { ITextFontImpl *This = impl_from_ITextFont(iface); - FIXME("(%p)->(%p): stub\n", This, value); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, value); + return get_textfont_propl(This->range, FONT_SUBSCRIPT, value); } static HRESULT WINAPI TextFont_SetSubscript(ITextFont *iface, LONG value) @@ -2102,8 +2112,8 @@ static HRESULT WINAPI TextFont_SetSubscript(ITextFont *iface, LONG value) static HRESULT WINAPI TextFont_GetSuperscript(ITextFont *iface, LONG *value) { ITextFontImpl *This = impl_from_ITextFont(iface); - FIXME("(%p)->(%p): stub\n", This, value); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, value); + return get_textfont_propl(This->range, FONT_SUPERSCRIPT, value); } static HRESULT WINAPI TextFont_SetSuperscript(ITextFont *iface, LONG value)
1
0
0
0
Nikolay Sivov : riched20: Implement GetStrikeThrough().
by Alexandre Julliard
20 May '15
20 May '15
Module: wine Branch: master Commit: 0f53b87367736fc40bdf6d1a604039d0a864f9ee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f53b87367736fc40bdf6d1a6…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 20 10:43:19 2015 +0300 riched20: Implement GetStrikeThrough(). --- dlls/riched20/richole.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index 9f8bc17..b2e78f2 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -221,6 +221,7 @@ static inline BOOL is_equal_textfont_prop_value(enum textfont_prop_id propid, te case FONT_BOLD: case FONT_FORECOLOR: case FONT_ITALIC: + case FONT_STRIKETHROUGH: case FONT_UNDERLINE: return left->l == right->l; case FONT_SIZE: @@ -238,6 +239,7 @@ static inline void init_textfont_prop_value(enum textfont_prop_id propid, textfo case FONT_BOLD: case FONT_FORECOLOR: case FONT_ITALIC: + case FONT_STRIKETHROUGH: case FONT_UNDERLINE: v->l = tomUndefined; return; @@ -280,6 +282,9 @@ static HRESULT get_textfont_prop_for_pos(const IRichEditOleImpl *reole, int pos, case FONT_SIZE: value->f = fmt.yHeight; break; + case FONT_STRIKETHROUGH: + value->l = fmt.dwEffects & CFE_STRIKEOUT ? tomTrue : tomFalse; + break; case FONT_UNDERLINE: value->l = fmt.dwEffects & CFE_UNDERLINE ? tomTrue : tomFalse; break; @@ -2069,8 +2074,8 @@ static HRESULT WINAPI TextFont_SetSpacing(ITextFont *iface, FLOAT value) static HRESULT WINAPI TextFont_GetStrikeThrough(ITextFont *iface, LONG *value) { ITextFontImpl *This = impl_from_ITextFont(iface); - FIXME("(%p)->(%p): stub\n", This, value); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, value); + return get_textfont_propl(This->range, FONT_STRIKETHROUGH, value); } static HRESULT WINAPI TextFont_SetStrikeThrough(ITextFont *iface, LONG value)
1
0
0
0
Nikolay Sivov : riched20: Implement GetForeColor().
by Alexandre Julliard
20 May '15
20 May '15
Module: wine Branch: master Commit: f875c804bd1dd72c970f639db530c2571f9d1e77 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f875c804bd1dd72c970f639db…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 20 10:35:44 2015 +0300 riched20: Implement GetForeColor(). --- dlls/riched20/richole.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index 8fecc8c..9f8bc17 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -219,6 +219,7 @@ static inline BOOL is_equal_textfont_prop_value(enum textfont_prop_id propid, te switch (propid) { case FONT_BOLD: + case FONT_FORECOLOR: case FONT_ITALIC: case FONT_UNDERLINE: return left->l == right->l; @@ -235,6 +236,7 @@ static inline void init_textfont_prop_value(enum textfont_prop_id propid, textfo switch (propid) { case FONT_BOLD: + case FONT_FORECOLOR: case FONT_ITALIC: case FONT_UNDERLINE: v->l = tomUndefined; @@ -269,6 +271,9 @@ static HRESULT get_textfont_prop_for_pos(const IRichEditOleImpl *reole, int pos, case FONT_BOLD: value->l = fmt.dwEffects & CFE_BOLD ? tomTrue : tomFalse; break; + case FONT_FORECOLOR: + value->l = fmt.dwEffects & CFE_AUTOCOLOR ? GetSysColor(COLOR_WINDOWTEXT) : fmt.crTextColor; + break; case FONT_ITALIC: value->l = fmt.dwEffects & CFE_ITALIC ? tomTrue : tomFalse; break; @@ -1868,8 +1873,8 @@ static HRESULT WINAPI TextFont_SetEmboss(ITextFont *iface, LONG value) static HRESULT WINAPI TextFont_GetForeColor(ITextFont *iface, LONG *value) { ITextFontImpl *This = impl_from_ITextFont(iface); - FIXME("(%p)->(%p): stub\n", This, value); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, value); + return get_textfont_propl(This->range, FONT_FORECOLOR, value); } static HRESULT WINAPI TextFont_SetForeColor(ITextFont *iface, LONG value)
1
0
0
0
Nikolay Sivov : riched20: Implement GetUnderline().
by Alexandre Julliard
20 May '15
20 May '15
Module: wine Branch: master Commit: d7a1700a29a52c8548847888faddaeb1c7660f36 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d7a1700a29a52c8548847888f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 20 10:30:06 2015 +0300 riched20: Implement GetUnderline(). --- dlls/riched20/richole.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index 95a92fe..8fecc8c 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -220,6 +220,7 @@ static inline BOOL is_equal_textfont_prop_value(enum textfont_prop_id propid, te { case FONT_BOLD: case FONT_ITALIC: + case FONT_UNDERLINE: return left->l == right->l; case FONT_SIZE: return left->f == right->f; @@ -235,6 +236,7 @@ static inline void init_textfont_prop_value(enum textfont_prop_id propid, textfo { case FONT_BOLD: case FONT_ITALIC: + case FONT_UNDERLINE: v->l = tomUndefined; return; case FONT_SIZE: @@ -273,6 +275,9 @@ static HRESULT get_textfont_prop_for_pos(const IRichEditOleImpl *reole, int pos, case FONT_SIZE: value->f = fmt.yHeight; break; + case FONT_UNDERLINE: + value->l = fmt.dwEffects & CFE_UNDERLINE ? tomTrue : tomFalse; + break; default: FIXME("unhandled font property %d\n", propid); return E_FAIL; @@ -2101,8 +2106,8 @@ static HRESULT WINAPI TextFont_SetSuperscript(ITextFont *iface, LONG value) static HRESULT WINAPI TextFont_GetUnderline(ITextFont *iface, LONG *value) { ITextFontImpl *This = impl_from_ITextFont(iface); - FIXME("(%p)->(%p): stub\n", This, value); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, value); + return get_textfont_propl(This->range, FONT_UNDERLINE, value); } static HRESULT WINAPI TextFont_SetUnderline(ITextFont *iface, LONG value)
1
0
0
0
Nikolay Sivov : riched20: Implement GetSize().
by Alexandre Julliard
20 May '15
20 May '15
Module: wine Branch: master Commit: c48e0519ac63ff6dae155dda22be46d44d7902ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c48e0519ac63ff6dae155dda2…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed May 20 10:26:21 2015 +0300 riched20: Implement GetSize(). --- dlls/riched20/richole.c | 98 ++++++++++++++++++++++++++++++++++++------- dlls/riched20/tests/richole.c | 17 +++++++- 2 files changed, 98 insertions(+), 17 deletions(-) diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c index aa2a6e3..95a92fe 100644 --- a/dlls/riched20/richole.c +++ b/dlls/riched20/richole.c @@ -208,7 +208,47 @@ static const DWORD textfont_prop_masks[] = { CFM_WEIGHT }; -static HRESULT get_textfont_prop_for_pos(const IRichEditOleImpl *reole, int pos, enum textfont_prop_id propid, LONG *value) +typedef union { + FLOAT f; + LONG l; +} textfont_prop_val; + +static inline BOOL is_equal_textfont_prop_value(enum textfont_prop_id propid, textfont_prop_val *left, + textfont_prop_val *right) +{ + switch (propid) + { + case FONT_BOLD: + case FONT_ITALIC: + return left->l == right->l; + case FONT_SIZE: + return left->f == right->f; + default: + FIXME("unhandled font property %d\n", propid); + return FALSE; + } +} + +static inline void init_textfont_prop_value(enum textfont_prop_id propid, textfont_prop_val *v) +{ + switch (propid) + { + case FONT_BOLD: + case FONT_ITALIC: + v->l = tomUndefined; + return; + case FONT_SIZE: + v->f = tomUndefined; + return; + default: + FIXME("unhandled font property %d\n", propid); + v->l = tomUndefined; + return; + } +} + +static HRESULT get_textfont_prop_for_pos(const IRichEditOleImpl *reole, int pos, enum textfont_prop_id propid, + textfont_prop_val *value) { ME_Cursor from, to; CHARFORMAT2W fmt; @@ -225,10 +265,13 @@ static HRESULT get_textfont_prop_for_pos(const IRichEditOleImpl *reole, int pos, switch (propid) { case FONT_BOLD: - *value = fmt.dwEffects & CFE_BOLD ? tomTrue : tomFalse; + value->l = fmt.dwEffects & CFE_BOLD ? tomTrue : tomFalse; break; case FONT_ITALIC: - *value = fmt.dwEffects & CFE_ITALIC ? tomTrue : tomFalse; + value->l = fmt.dwEffects & CFE_ITALIC ? tomTrue : tomFalse; + break; + case FONT_SIZE: + value->f = fmt.yHeight; break; default: FIXME("unhandled font property %d\n", propid); @@ -238,34 +281,31 @@ static HRESULT get_textfont_prop_for_pos(const IRichEditOleImpl *reole, int pos, return S_OK; } -static HRESULT get_textfont_prop(ITextRange *range, enum textfont_prop_id propid, LONG *value) +static HRESULT get_textfont_prop(ITextRange *range, enum textfont_prop_id propid, textfont_prop_val *value) { ITextRangeImpl *rng = impl_from_ITextRange(range); + textfont_prop_val v; HRESULT hr; - LONG v; int i; - if (!value) - return E_INVALIDARG; - - *value = tomUndefined; - if (!rng->reOle) return CO_E_RELEASED; + init_textfont_prop_value(propid, value); + /* iterate trough a range to see if property value is consistent */ hr = get_textfont_prop_for_pos(rng->reOle, rng->start, propid, &v); if (FAILED(hr)) return hr; for (i = rng->start + 1; i < rng->end; i++) { - LONG cur; + textfont_prop_val cur; hr = get_textfont_prop_for_pos(rng->reOle, i, propid, &cur); if (FAILED(hr)) return hr; - if (cur != v) + if (!is_equal_textfont_prop_value(propid, &v, &cur)) return S_OK; } @@ -273,6 +313,32 @@ static HRESULT get_textfont_prop(ITextRange *range, enum textfont_prop_id propid return S_OK; } +static HRESULT get_textfont_propf(ITextRange *range, enum textfont_prop_id propid, FLOAT *value) +{ + textfont_prop_val v; + HRESULT hr; + + if (!value) + return E_INVALIDARG; + + hr = get_textfont_prop(range, propid, &v); + *value = v.f; + return hr; +} + +static HRESULT get_textfont_propl(ITextRange *range, enum textfont_prop_id propid, LONG *value) +{ + textfont_prop_val v; + HRESULT hr; + + if (!value) + return E_INVALIDARG; + + hr = get_textfont_prop(range, propid, &v); + *value = v.l; + return hr; +} + static HRESULT WINAPI IRichEditOleImpl_inner_fnQueryInterface(IUnknown *iface, REFIID riid, LPVOID *ppvObj) { IRichEditOleImpl *This = impl_from_IUnknown(iface); @@ -1770,7 +1836,7 @@ static HRESULT WINAPI TextFont_GetBold(ITextFont *iface, LONG *value) { ITextFontImpl *This = impl_from_ITextFont(iface); TRACE("(%p)->(%p)\n", This, value); - return get_textfont_prop(This->range, FONT_BOLD, value); + return get_textfont_propl(This->range, FONT_BOLD, value); } static HRESULT WINAPI TextFont_SetBold(ITextFont *iface, LONG value) @@ -1840,7 +1906,7 @@ static HRESULT WINAPI TextFont_GetItalic(ITextFont *iface, LONG *value) { ITextFontImpl *This = impl_from_ITextFont(iface); TRACE("(%p)->(%p)\n", This, value); - return get_textfont_prop(This->range, FONT_ITALIC, value); + return get_textfont_propl(This->range, FONT_ITALIC, value); } static HRESULT WINAPI TextFont_SetItalic(ITextFont *iface, LONG value) @@ -1951,8 +2017,8 @@ static HRESULT WINAPI TextFont_SetShadow(ITextFont *iface, LONG value) static HRESULT WINAPI TextFont_GetSize(ITextFont *iface, FLOAT *value) { ITextFontImpl *This = impl_from_ITextFont(iface); - FIXME("(%p)->(%p): stub\n", This, value); - return E_NOTIMPL; + TRACE("(%p)->(%p)\n", This, value); + return get_textfont_propf(This->range, FONT_SIZE, value); } static HRESULT WINAPI TextFont_SetSize(ITextFont *iface, FLOAT value) diff --git a/dlls/riched20/tests/richole.c b/dlls/riched20/tests/richole.c index 6e80fd9..a85f485 100644 --- a/dlls/riched20/tests/richole.c +++ b/dlls/riched20/tests/richole.c @@ -1219,6 +1219,7 @@ static void test_GetFont(void) ITextFont *font, *font2; CHARFORMAT2A cf; LONG value; + float size; HRESULT hr; HWND hwnd; BOOL ret; @@ -1263,6 +1264,14 @@ static void test_GetFont(void) hr = ITextFont_GetItalic(font, NULL); ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + hr = ITextFont_GetSize(font, NULL); + ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); + + size = 0.0; + hr = ITextFont_GetSize(font, &size); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(size > 0.0, "size %.2f\n", size); + /* range is non-italic */ value = tomTrue; hr = ITextFont_GetItalic(font, &value); @@ -1270,8 +1279,9 @@ static void test_GetFont(void) ok(value == tomFalse, "got %d\n", value); cf.cbSize = sizeof(CHARFORMAT2A); - cf.dwMask = CFM_ITALIC; + cf.dwMask = CFM_ITALIC|CFM_SIZE; cf.dwEffects = CFE_ITALIC; + cf.yHeight = 24.0; SendMessageA(hwnd, EM_SETSEL, 2, 3); ret = SendMessageA(hwnd, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf); @@ -1283,6 +1293,11 @@ static void test_GetFont(void) ok(hr == S_OK, "got 0x%08x\n", hr); ok(value == tomUndefined, "got %d\n", value); + size = 0.0; + hr = ITextFont_GetSize(font, &size); + ok(hr == S_OK, "got 0x%08x\n", hr); + ok(size == tomUndefined, "size %.2f\n", size); + ITextFont_Release(font); ITextRange_Release(range); release_interfaces(&hwnd, &reOle, &doc, NULL);
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
43
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Results per page:
10
25
50
100
200