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
July
June
May
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
August 2017
----- 2025 -----
July 2025
June 2025
May 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
351 discussions
Start a n
N
ew thread
Huw Davies : riched20: Add support for pasting EMFs.
by Alexandre Julliard
24 Aug '17
24 Aug '17
Module: wine Branch: master Commit: adf53a9cdb4ac1999b0c17164ea92d16858d212c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=adf53a9cdb4ac1999b0c17164…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Aug 21 12:31:51 2017 +0100 riched20: Add support for pasting EMFs. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index b66d8e8..a7b1bc7 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2241,6 +2241,23 @@ static HRESULT paste_text(ME_TextEditor *editor, FORMATETC *fmt, STGMEDIUM *med) return hr; } +static HRESULT paste_emf(ME_TextEditor *editor, FORMATETC *fmt, STGMEDIUM *med) +{ + HRESULT hr; + SIZEL sz = {0, 0}; + + hr = insert_static_object( editor, med->u.hEnhMetaFile, NULL, &sz ); + if (SUCCEEDED(hr)) + { + ME_CommitUndo( editor ); + ME_UpdateRepaint( editor, FALSE ); + } + else + ReleaseStgMedium( med ); + + return hr; +} + static struct paste_format { FORMATETC fmt; @@ -2250,6 +2267,7 @@ static struct paste_format { {{ -1, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }, paste_rtf, rtfW }, {{ CF_UNICODETEXT, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }, paste_text }, + {{ CF_ENHMETAFILE, NULL, DVASPECT_CONTENT, -1, TYMED_ENHMF }, paste_emf }, {{ 0 }} };
1
0
0
0
Huw Davies : riched20: Use the implementation of EM_PASTESPECIAL for EM_CANPASTE.
by Alexandre Julliard
24 Aug '17
24 Aug '17
Module: wine Branch: master Commit: bbf34a4ab17c872f119626fc43c09a1f61f0e650 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bbf34a4ab17c872f119626fc4…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Aug 21 12:31:50 2017 +0100 riched20: Use the implementation of EM_PASTESPECIAL for EM_CANPASTE. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 383b307..b66d8e8 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -4039,14 +4039,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, return 1; } case EM_CANPASTE: - { - UINT nRTFFormat = RegisterClipboardFormatA("Rich Text Format"); - if (IsClipboardFormatAvailable(nRTFFormat)) - return TRUE; - if (IsClipboardFormatAvailable(CF_UNICODETEXT)) - return TRUE; - return FALSE; - } + return paste_special( editor, 0, NULL, TRUE ); case WM_PASTE: case WM_MBUTTONDOWN: wParam = 0;
1
0
0
0
Huw Davies : riched20: Use the implementation of EM_PASTESPECIAL for WM_PASTE.
by Alexandre Julliard
24 Aug '17
24 Aug '17
Module: wine Branch: master Commit: 46fef3daa1b52f7d3df3faffa8b913585f61ca24 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=46fef3daa1b52f7d3df3faffa…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Aug 21 12:31:49 2017 +0100 riched20: Use the implementation of EM_PASTESPECIAL for WM_PASTE. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 5f9da92..383b307 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2309,33 +2309,6 @@ done: return hr == S_OK; } -static BOOL ME_Paste(ME_TextEditor *editor) -{ - DWORD dwFormat = 0; - EDITSTREAM es; - ME_GlobalDestStruct gds; - UINT nRTFFormat = RegisterClipboardFormatA("Rich Text Format"); - UINT cf = 0; - - if (IsClipboardFormatAvailable(nRTFFormat)) - cf = nRTFFormat, dwFormat = SF_RTF; - else if (IsClipboardFormatAvailable(CF_UNICODETEXT)) - cf = CF_UNICODETEXT, dwFormat = SF_TEXT|SF_UNICODE; - else - return FALSE; - - if (!OpenClipboard(editor->hWnd)) - return FALSE; - gds.hData = GetClipboardData(cf); - gds.nLength = 0; - es.dwCookie = (DWORD_PTR)&gds; - es.pfnCallback = dwFormat == SF_RTF ? ME_ReadFromHGLOBALRTF : ME_ReadFromHGLOBALUnicode; - ME_StreamIn(editor, dwFormat|SFF_SELECTION, &es, FALSE); - - CloseClipboard(); - return TRUE; -} - static BOOL ME_Copy(ME_TextEditor *editor, const ME_Cursor *start, int nChars) { LPDATAOBJECT dataObj = NULL; @@ -2649,7 +2622,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey) break; case 'V': if (ctrl_is_down) - return ME_Paste(editor); + return paste_special( editor, 0, NULL, FALSE ); break; case 'C': case 'X': @@ -4076,8 +4049,9 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, } case WM_PASTE: case WM_MBUTTONDOWN: - ME_Paste(editor); - return 0; + wParam = 0; + lParam = 0; + /* fall through */ case EM_PASTESPECIAL: paste_special( editor, wParam, (REPASTESPECIAL *)lParam, FALSE ); return 0;
1
0
0
0
Huw Davies : riched20: Add support for EM_PASTESPECIAL.
by Alexandre Julliard
24 Aug '17
24 Aug '17
Module: wine Branch: master Commit: 9bec53fbad3b773db991dea9091fb0390592020d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9bec53fbad3b773db991dea90…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Aug 21 12:31:48 2017 +0100 riched20: Add support for EM_PASTESPECIAL. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 104 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 103 insertions(+), 1 deletion(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 9174ece..5f9da92 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2209,6 +2209,106 @@ static DWORD CALLBACK ME_ReadFromHGLOBALRTF(DWORD_PTR dwCookie, LPBYTE lpBuff, L return 0; } +static const WCHAR rtfW[] = {'R','i','c','h',' ','T','e','x','t',' ','F','o','r','m','a','t',0}; + +static HRESULT paste_rtf(ME_TextEditor *editor, FORMATETC *fmt, STGMEDIUM *med) +{ + EDITSTREAM es; + ME_GlobalDestStruct gds; + HRESULT hr; + + gds.hData = med->u.hGlobal; + gds.nLength = 0; + es.dwCookie = (DWORD_PTR)&gds; + es.pfnCallback = ME_ReadFromHGLOBALRTF; + hr = ME_StreamIn( editor, SF_RTF | SFF_SELECTION, &es, FALSE ) == 0 ? E_FAIL : S_OK; + ReleaseStgMedium( med ); + return hr; +} + +static HRESULT paste_text(ME_TextEditor *editor, FORMATETC *fmt, STGMEDIUM *med) +{ + EDITSTREAM es; + ME_GlobalDestStruct gds; + HRESULT hr; + + gds.hData = med->u.hGlobal; + gds.nLength = 0; + es.dwCookie = (DWORD_PTR)&gds; + es.pfnCallback = ME_ReadFromHGLOBALUnicode; + hr = ME_StreamIn( editor, SF_TEXT | SF_UNICODE | SFF_SELECTION, &es, FALSE ) == 0 ? E_FAIL : S_OK; + ReleaseStgMedium( med ); + return hr; +} + +static struct paste_format +{ + FORMATETC fmt; + HRESULT (*paste)(ME_TextEditor *, FORMATETC *, STGMEDIUM *); + const WCHAR *name; +} paste_formats[] = +{ + {{ -1, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }, paste_rtf, rtfW }, + {{ CF_UNICODETEXT, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }, paste_text }, + {{ 0 }} +}; + +static void init_paste_formats(void) +{ + struct paste_format *format; + static int done; + + if (!done) + { + for (format = paste_formats; format->fmt.cfFormat; format++) + { + if (format->name) + format->fmt.cfFormat = RegisterClipboardFormatW( format->name ); + } + done = 1; + } +} + +static BOOL paste_special(ME_TextEditor *editor, UINT cf, REPASTESPECIAL *ps, BOOL check_only) +{ + HRESULT hr; + STGMEDIUM med; + struct paste_format *format; + IDataObject *data; + + init_paste_formats(); + + if (ps && ps->dwAspect != DVASPECT_CONTENT) + FIXME("Ignoring aspect %x\n", ps->dwAspect); + + hr = OleGetClipboard( &data ); + if (hr != S_OK) return FALSE; + + if (cf == CF_TEXT) cf = CF_UNICODETEXT; + + hr = S_FALSE; + for (format = paste_formats; format->fmt.cfFormat; format++) + { + if (cf && cf != format->fmt.cfFormat) continue; + hr = IDataObject_QueryGetData( data, &format->fmt ); + if (hr == S_OK) + { + if (!check_only) + { + hr = IDataObject_GetData( data, &format->fmt, &med ); + if (hr != S_OK) goto done; + hr = format->paste( editor, &format->fmt, &med ); + } + break; + } + } + +done: + IDataObject_Release( data ); + + return hr == S_OK; +} + static BOOL ME_Paste(ME_TextEditor *editor) { DWORD dwFormat = 0; @@ -3410,7 +3510,6 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, UNSUPPORTED_MSG(EM_GETTYPOGRAPHYOPTIONS) UNSUPPORTED_MSG(EM_GETUNDONAME) UNSUPPORTED_MSG(EM_GETWORDBREAKPROCEX) - UNSUPPORTED_MSG(EM_PASTESPECIAL) UNSUPPORTED_MSG(EM_SELECTIONTYPE) UNSUPPORTED_MSG(EM_SETBIDIOPTIONS) UNSUPPORTED_MSG(EM_SETEDITSTYLE) @@ -3979,6 +4078,9 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, case WM_MBUTTONDOWN: ME_Paste(editor); return 0; + case EM_PASTESPECIAL: + paste_special( editor, wParam, (REPASTESPECIAL *)lParam, FALSE ); + return 0; case WM_CUT: case WM_COPY: {
1
0
0
0
Huw Davies : riched20: Don' t create a special richedit ole instance for the RTF parser.
by Alexandre Julliard
24 Aug '17
24 Aug '17
Module: wine Branch: master Commit: 417c80d6fe1bdbf7cf314dec9cdae3b115dc4622 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=417c80d6fe1bdbf7cf314dec9…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Aug 21 12:31:47 2017 +0100 riched20: Don't create a special richedit ole instance for the RTF parser. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 27 +++++++++++++-------------- dlls/riched20/rtf.h | 1 - 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 51b0cad..9174ece 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -1122,8 +1122,8 @@ void ME_RTFSpecialCharHook(RTF_Info *info) } } -static BOOL ME_RTFInsertOleObject(RTF_Info *info, HENHMETAFILE hemf, HBITMAP hbmp, - const SIZEL* sz) +static HRESULT insert_static_object(ME_TextEditor *editor, HENHMETAFILE hemf, HBITMAP hbmp, + const SIZEL* sz) { LPOLEOBJECT lpObject = NULL; LPSTORAGE lpStorage = NULL; @@ -1133,7 +1133,7 @@ static BOOL ME_RTFInsertOleObject(RTF_Info *info, HENHMETAFILE hemf, HBITMAP hbm STGMEDIUM stgm; FORMATETC fm; CLSID clsid; - BOOL ret = FALSE; + HRESULT hr = E_FAIL; DWORD conn; if (hemf) @@ -1155,13 +1155,14 @@ static BOOL ME_RTFInsertOleObject(RTF_Info *info, HENHMETAFILE hemf, HBITMAP hbm fm.lindex = -1; fm.tymed = stgm.tymed; - if (!info->lpRichEditOle) + if (!editor->reOle) { - CreateIRichEditOle(NULL, info->editor, (VOID**)&info->lpRichEditOle); + if (!CreateIRichEditOle(NULL, editor, (LPVOID *)&editor->reOle)) + return hr; } if (OleCreateDefaultHandler(&CLSID_NULL, NULL, &IID_IOleObject, (void**)&lpObject) == S_OK && - IRichEditOle_GetClientSite(info->lpRichEditOle, &lpClientSite) == S_OK && + IRichEditOle_GetClientSite(editor->reOle, &lpClientSite) == S_OK && IOleObject_SetClientSite(lpObject, lpClientSite) == S_OK && IOleObject_GetUserClassID(lpObject, &clsid) == S_OK && IOleObject_QueryInterface(lpObject, &IID_IOleCache, (void**)&lpOleCache) == S_OK && @@ -1184,8 +1185,8 @@ static BOOL ME_RTFInsertOleObject(RTF_Info *info, HENHMETAFILE hemf, HBITMAP hbm reobject.dwFlags = 0; /* FIXME */ reobject.dwUser = 0; - ME_InsertOLEFromCursor(info->editor, &reobject, 0); - ret = TRUE; + ME_InsertOLEFromCursor(editor, &reobject, 0); + hr = S_OK; } if (lpObject) IOleObject_Release(lpObject); @@ -1194,7 +1195,7 @@ static BOOL ME_RTFInsertOleObject(RTF_Info *info, HENHMETAFILE hemf, HBITMAP hbm if (lpDataObject) IDataObject_Release(lpDataObject); if (lpOleCache) IOleCache_Release(lpOleCache); - return ret; + return hr; } static void ME_RTFReadShpPictGroup( RTF_Info *info ) @@ -1353,11 +1354,11 @@ static void ME_RTFReadPictGroup(RTF_Info *info) { case gfx_enhmetafile: if ((hemf = SetEnhMetaFileBits( size, buffer ))) - ME_RTFInsertOleObject( info, hemf, NULL, &sz ); + insert_static_object( info->editor, hemf, NULL, &sz ); break; case gfx_metafile: if ((hemf = SetWinMetaFileBits( size, buffer, NULL, &mfp ))) - ME_RTFInsertOleObject( info, hemf, NULL, &sz ); + insert_static_object( info->editor, hemf, NULL, &sz ); break; case gfx_dib: { @@ -1371,7 +1372,7 @@ static void ME_RTFReadPictGroup(RTF_Info *info) if ((hbmp = CreateDIBitmap( hdc, &bi->bmiHeader, CBM_INIT, (char*)(bi + 1) + nc * sizeof(RGBQUAD), bi, DIB_RGB_COLORS)) ) - ME_RTFInsertOleObject( info, NULL, hbmp, &sz ); + insert_static_object( info->editor, NULL, hbmp, &sz ); ReleaseDC( 0, hdc ); break; } @@ -1727,8 +1728,6 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre } ME_CheckTablesForCorruption(editor); RTFDestroy(&parser); - if (parser.lpRichEditOle) - IRichEditOle_Release(parser.lpRichEditOle); if (parser.stackTop > 0) { diff --git a/dlls/riched20/rtf.h b/dlls/riched20/rtf.h index cc53c61..66d88b5 100644 --- a/dlls/riched20/rtf.h +++ b/dlls/riched20/rtf.h @@ -1175,7 +1175,6 @@ struct _RTF_Info { RTFState stack[maxStack]; int stackTop; BOOL styleChanged; - LPRICHEDITOLE lpRichEditOle; RTFTable *tableDef; int nestingLevel;
1
0
0
0
Huw Davies : riched20: Initialize ME_TextEditor members in ME_MakeEditor() .
by Alexandre Julliard
24 Aug '17
24 Aug '17
Module: wine Branch: master Commit: 1bc48be4a78a1991c0d6c04d7a12f0cc438f0211 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1bc48be4a78a1991c0d6c04d7…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Aug 21 12:31:46 2017 +0100 riched20: Initialize ME_TextEditor members in ME_MakeEditor(). Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 2 ++ dlls/riched20/txtsrv.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 3cd80be..51b0cad 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2898,6 +2898,7 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) ed->reOle = NULL; ed->bEmulateVersion10 = bEmulateVersion10; ed->styleFlags = 0; + ed->exStyleFlags = 0; ITextHost_TxGetPropertyBits(texthost, (TXTBIT_RICHTEXT|TXTBIT_MULTILINE| TXTBIT_READONLY|TXTBIT_USEPASSWORD| @@ -2958,6 +2959,7 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) } ME_CheckCharOffsets(ed); + SetRectEmpty(&ed->rcFormat); ed->bDefaultFormatRect = TRUE; ITextHost_TxGetSelectionBarWidth(ed->texthost, &selbarwidth); if (selbarwidth) { diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c index 2a2149e..eb61e4e 100644 --- a/dlls/riched20/txtsrv.c +++ b/dlls/riched20/txtsrv.c @@ -414,8 +414,6 @@ HRESULT WINAPI CreateTextServices(IUnknown *pUnkOuter, ITextHost *pITextHost, I ITextImpl->IUnknown_inner.lpVtbl = &textservices_inner_vtbl; ITextImpl->ITextServices_iface.lpVtbl = &textservices_vtbl; ITextImpl->editor = ME_MakeEditor(pITextHost, FALSE); - ITextImpl->editor->exStyleFlags = 0; - SetRectEmpty(&ITextImpl->editor->rcFormat); if (pUnkOuter) ITextImpl->outer_unk = pUnkOuter;
1
0
0
0
Huw Davies : riched20: Retrieve the default paragraph alignment from the text host.
by Alexandre Julliard
24 Aug '17
24 Aug '17
Module: wine Branch: master Commit: 5cc8c9fe83d6d6deb95f2ec743f6c629480e2a96 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5cc8c9fe83d6d6deb95f2ec74…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Aug 21 12:31:45 2017 +0100 riched20: Retrieve the default paragraph alignment from the text host. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 9 ++------- dlls/riched20/editor.h | 2 +- dlls/riched20/editstr.h | 1 - dlls/riched20/para.c | 14 +++++++++++++- dlls/riched20/txthost.c | 15 +++++++++++++-- dlls/riched20/txtsrv.c | 2 +- 6 files changed, 30 insertions(+), 13 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index f5b9e4c..3cd80be 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -2884,7 +2884,7 @@ static BOOL ME_ShowContextMenu(ME_TextEditor *editor, int x, int y) return TRUE; } -ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10, DWORD csStyle) +ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) { ME_TextEditor *ed = ALLOC_OBJ(ME_TextEditor); int i; @@ -2898,11 +2898,6 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10, DWORD ed->reOle = NULL; ed->bEmulateVersion10 = bEmulateVersion10; ed->styleFlags = 0; - ed->alignStyle = PFA_LEFT; - if (csStyle & ES_RIGHT) - ed->alignStyle = PFA_RIGHT; - if (csStyle & ES_CENTER) - ed->alignStyle = PFA_CENTER; ITextHost_TxGetPropertyBits(texthost, (TXTBIT_RICHTEXT|TXTBIT_MULTILINE| TXTBIT_READONLY|TXTBIT_USEPASSWORD| @@ -4799,7 +4794,7 @@ static BOOL create_windowed_editor(HWND hwnd, CREATESTRUCTW *create, BOOL emulat if (!host) return FALSE; - editor = ME_MakeEditor( host, emulate_10, create->style ); + editor = ME_MakeEditor( host, emulate_10 ); if (!editor) { ITextHost_Release( host ); diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 237036c..53c41a9 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -255,7 +255,7 @@ void ME_DeleteReObject(REOBJECT* reo) DECLSPEC_HIDDEN; void ME_GetITextDocumentInterface(IRichEditOle *iface, LPVOID *ppvObj) DECLSPEC_HIDDEN; /* editor.c */ -ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10, DWORD csStyle) DECLSPEC_HIDDEN; +ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10) DECLSPEC_HIDDEN; void ME_DestroyEditor(ME_TextEditor *editor) DECLSPEC_HIDDEN; LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode, HRESULT* phresult) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h index eafe2b7..2bf680e 100644 --- a/dlls/riched20/editstr.h +++ b/dlls/riched20/editstr.h @@ -382,7 +382,6 @@ typedef struct tagME_TextEditor ME_TextBuffer *pBuffer; ME_Cursor *pCursors; DWORD styleFlags; - DWORD alignStyle; DWORD exStyleFlags; int nCursors; SIZE sizeWindow; diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index 6c023f2..f2a70e5 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -863,10 +863,22 @@ void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) void ME_SetDefaultParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) { + const PARAFORMAT2 *host_fmt; + HRESULT hr; + ZeroMemory(pFmt, sizeof(PARAFORMAT2)); pFmt->cbSize = sizeof(PARAFORMAT2); pFmt->dwMask = PFM_ALL2; - pFmt->wAlignment = editor->alignStyle; + pFmt->wAlignment = PFA_LEFT; pFmt->sStyle = -1; pFmt->bOutlineLevel = TRUE; + + hr = ITextHost_TxGetParaFormat( editor->texthost, (const PARAFORMAT **)&host_fmt ); + if (SUCCEEDED(hr)) + { + /* Just use the alignment for now */ + if (host_fmt->dwMask & PFM_ALIGNMENT) + pFmt->wAlignment = host_fmt->wAlignment; + ITextHost_OnTxParaFormatChange( editor->texthost, (PARAFORMAT *)pFmt ); + } } diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index ccd554d..b479bde 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -38,6 +38,7 @@ typedef struct ITextHostImpl { LONG ref; HWND hWnd; BOOL bEmulateVersion10; + PARAFORMAT2 para_fmt; } ITextHostImpl; static const ITextHostVtbl textHostVtbl; @@ -53,6 +54,14 @@ ITextHost *ME_CreateTextHost(HWND hwnd, CREATESTRUCTW *cs, BOOL bEmulateVersion1 texthost->ref = 1; texthost->hWnd = hwnd; texthost->bEmulateVersion10 = bEmulateVersion10; + memset( &texthost->para_fmt, 0, sizeof(texthost->para_fmt) ); + texthost->para_fmt.cbSize = sizeof(texthost->para_fmt); + texthost->para_fmt.dwMask = PFM_ALIGNMENT; + texthost->para_fmt.wAlignment = PFA_LEFT; + if (cs->style & ES_RIGHT) + texthost->para_fmt.wAlignment = PFA_RIGHT; + if (cs->style & ES_CENTER) + texthost->para_fmt.wAlignment = PFA_CENTER; return &texthost->ITextHost_iface; } @@ -260,9 +269,11 @@ DECLSPEC_HIDDEN HRESULT WINAPI ITextHostImpl_TxGetCharFormat(ITextHost *iface, } DECLSPEC_HIDDEN HRESULT WINAPI ITextHostImpl_TxGetParaFormat(ITextHost *iface, - const PARAFORMAT **ppPF) + const PARAFORMAT **fmt) { - return E_NOTIMPL; + ITextHostImpl *This = impl_from_ITextHost(iface); + *fmt = (const PARAFORMAT *)&This->para_fmt; + return S_OK; } DECLSPEC_HIDDEN COLORREF WINAPI ITextHostImpl_TxGetSysColor(ITextHost *iface, diff --git a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c index 307b484..2a2149e 100644 --- a/dlls/riched20/txtsrv.c +++ b/dlls/riched20/txtsrv.c @@ -413,7 +413,7 @@ HRESULT WINAPI CreateTextServices(IUnknown *pUnkOuter, ITextHost *pITextHost, I ITextImpl->pMyHost = pITextHost; ITextImpl->IUnknown_inner.lpVtbl = &textservices_inner_vtbl; ITextImpl->ITextServices_iface.lpVtbl = &textservices_vtbl; - ITextImpl->editor = ME_MakeEditor(pITextHost, FALSE, ES_LEFT); + ITextImpl->editor = ME_MakeEditor(pITextHost, FALSE); ITextImpl->editor->exStyleFlags = 0; SetRectEmpty(&ITextImpl->editor->rcFormat);
1
0
0
0
Huw Davies : riched20: Move the editor initialization out of CreateTextHost().
by Alexandre Julliard
24 Aug '17
24 Aug '17
Module: wine Branch: master Commit: 4cb7578d0b32dd8f8aec58077156076c9d1810ee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4cb7578d0b32dd8f8aec58077…
Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Aug 21 12:31:44 2017 +0100 riched20: Move the editor initialization out of CreateTextHost(). Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.c | 32 ++++++++++++++++++++++++++------ dlls/riched20/txthost.c | 23 +++++++---------------- 2 files changed, 33 insertions(+), 22 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index 1ce444e..f5b9e4c 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -4792,6 +4792,30 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam, return 0L; } +static BOOL create_windowed_editor(HWND hwnd, CREATESTRUCTW *create, BOOL emulate_10) +{ + ITextHost *host = ME_CreateTextHost( hwnd, create, emulate_10 ); + ME_TextEditor *editor; + + if (!host) return FALSE; + + editor = ME_MakeEditor( host, emulate_10, create->style ); + if (!editor) + { + ITextHost_Release( host ); + return FALSE; + } + + editor->exStyleFlags = GetWindowLongW( hwnd, GWL_EXSTYLE ); + editor->styleFlags |= GetWindowLongW( hwnd, GWL_STYLE ) & ES_WANTRETURN; + editor->hWnd = hwnd; /* FIXME: Remove editor's dependence on hWnd */ + editor->hwndParent = create->hwndParent; + + SetWindowLongPtrW( hwnd, 0, (LONG_PTR)editor ); + + return TRUE; +} + static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, BOOL unicode) { @@ -4808,11 +4832,9 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam, if (msg == WM_NCCREATE) { CREATESTRUCTW *pcs = (CREATESTRUCTW *)lParam; - ITextHost *texthost; TRACE("WM_NCCREATE: hWnd %p style 0x%08x\n", hWnd, pcs->style); - texthost = ME_CreateTextHost(hWnd, pcs, FALSE); - return texthost != NULL; + return create_windowed_editor( hWnd, pcs, FALSE ); } else { @@ -4938,12 +4960,10 @@ LRESULT WINAPI RichEdit10ANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM { if (msg == WM_NCCREATE && !GetWindowLongPtrW(hWnd, 0)) { - ITextHost *texthost; CREATESTRUCTW *pcs = (CREATESTRUCTW *)lParam; TRACE("WM_NCCREATE: hWnd %p style 0x%08x\n", hWnd, pcs->style); - texthost = ME_CreateTextHost(hWnd, pcs, TRUE); - return texthost != NULL; + return create_windowed_editor( hWnd, pcs, TRUE ); } return RichEditANSIWndProc(hWnd, msg, wParam, lParam); } diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index 0e51ecf..ccd554d 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -45,23 +45,14 @@ static const ITextHostVtbl textHostVtbl; ITextHost *ME_CreateTextHost(HWND hwnd, CREATESTRUCTW *cs, BOOL bEmulateVersion10) { ITextHostImpl *texthost; + texthost = CoTaskMemAlloc(sizeof(*texthost)); - if (texthost) - { - ME_TextEditor *editor; - - texthost->ITextHost_iface.lpVtbl = &textHostVtbl; - texthost->ref = 1; - texthost->hWnd = hwnd; - texthost->bEmulateVersion10 = bEmulateVersion10; - - editor = ME_MakeEditor(&texthost->ITextHost_iface, bEmulateVersion10, cs->style); - editor->exStyleFlags = GetWindowLongW(hwnd, GWL_EXSTYLE); - editor->styleFlags |= GetWindowLongW(hwnd, GWL_STYLE) & ES_WANTRETURN; - editor->hWnd = hwnd; /* FIXME: Remove editor's dependence on hWnd */ - editor->hwndParent = cs->hwndParent; - SetWindowLongPtrW(hwnd, 0, (LONG_PTR)editor); - } + if (!texthost) return NULL; + + texthost->ITextHost_iface.lpVtbl = &textHostVtbl; + texthost->ref = 1; + texthost->hWnd = hwnd; + texthost->bEmulateVersion10 = bEmulateVersion10; return &texthost->ITextHost_iface; }
1
0
0
0
Anton Romanov : windowscodecs: PNGEncoder: Return 32bppRGBA pixel format by default.
by Alexandre Julliard
24 Aug '17
24 Aug '17
Module: wine Branch: master Commit: 267bca1f3b17ee22ba24972ad10757d997d01a20 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=267bca1f3b17ee22ba24972ad…
Author: Anton Romanov <theli.ua(a)gmail.com> Date: Sun Aug 20 23:40:50 2017 -0700 windowscodecs: PNGEncoder: Return 32bppRGBA pixel format by default. Signed-off-by: Anton Romanov <theli.ua(a)gmail.com> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/pngformat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c index e8325c7..815125fd 100644 --- a/dlls/windowscodecs/pngformat.c +++ b/dlls/windowscodecs/pngformat.c @@ -1327,6 +1327,7 @@ struct png_pixelformat { }; static const struct png_pixelformat formats[] = { + {&GUID_WICPixelFormat32bppBGRA, 32, 8, PNG_COLOR_TYPE_RGB_ALPHA, 0, 1}, {&GUID_WICPixelFormat24bppBGR, 24, 8, PNG_COLOR_TYPE_RGB, 0, 1}, {&GUID_WICPixelFormatBlackWhite, 1, 1, PNG_COLOR_TYPE_GRAY, 0, 0}, {&GUID_WICPixelFormat2bppGray, 2, 2, PNG_COLOR_TYPE_GRAY, 0, 0}, @@ -1334,7 +1335,6 @@ static const struct png_pixelformat formats[] = { {&GUID_WICPixelFormat8bppGray, 8, 8, PNG_COLOR_TYPE_GRAY, 0, 0}, {&GUID_WICPixelFormat16bppGray, 16, 16, PNG_COLOR_TYPE_GRAY, 0, 0}, {&GUID_WICPixelFormat32bppBGR, 32, 8, PNG_COLOR_TYPE_RGB, 1, 1}, - {&GUID_WICPixelFormat32bppBGRA, 32, 8, PNG_COLOR_TYPE_RGB_ALPHA, 0, 1}, {&GUID_WICPixelFormat48bppRGB, 48, 16, PNG_COLOR_TYPE_RGB, 0, 0}, {&GUID_WICPixelFormat64bppRGBA, 64, 16, PNG_COLOR_TYPE_RGB_ALPHA, 0, 0}, {NULL},
1
0
0
0
Nikolay Sivov : po: Update Russian translation.
by Alexandre Julliard
24 Aug '17
24 Aug '17
Module: wine Branch: master Commit: 20b908b6da8910500824cf69a86e074c9b1f1ed7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=20b908b6da8910500824cf69a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Aug 21 15:26:21 2017 +0300 po: Update Russian translation. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/ru.po | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/po/ru.po b/po/ru.po index d6bda1d..9b15ef9 100644 --- a/po/ru.po +++ b/po/ru.po @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
http://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2017-08-08 21:25+0300\n" +"PO-Revision-Date: 2017-08-21 15:10+0300\n" "Last-Translator: Nikolay Sivov <nsivov(a)codeweavers.com>\n" "Language-Team: Russian\n" "Language: ru\n" @@ -11983,17 +11983,6 @@ msgid "Icons (*.ico)" msgstr "Значки (*.ico)" #: reg.rc:35 -#, fuzzy -#| msgid "" -#| "Usage:\n" -#| " REG [operation] [parameters]\n" -#| "\n" -#| "Supported operations:\n" -#| " ADD | DELETE | QUERY\n" -#| "\n" -#| "For help on a specific operation, type:\n" -#| " REG [operation] /?\n" -#| "\n" msgid "" "Usage:\n" " REG [operation] [parameters]\n" @@ -12009,7 +11998,7 @@ msgstr "" " REG [операция] [параметры]\n" "\n" "Поддерживаемые операции:\n" -" ADD | DELETE | QUERY\n" +" ADD | DELETE | IMPORT | QUERY\n" "\n" "Для получения справки по конкретной операции используйте:\n" " REG [операция] /?\n" @@ -12137,25 +12126,19 @@ msgstr "(значение не задано)" #: reg.rc:66 msgid "REG IMPORT file.reg\n" -msgstr "" +msgstr "REG IMPORT file.reg\n" #: reg.rc:67 -#, fuzzy -#| msgid "regedit: The file '%1' was not found.\n" msgid "reg: The file '%1' was not found.\n" -msgstr "regedit: файл «%1» не найден.\n" +msgstr "reg: файл «%1» не найден.\n" #: reg.rc:68 -#, fuzzy -#| msgid "regedit: Unable to open the registry key '%1'.\n" msgid "reg: Unable to open the registry key '%1'.\n" -msgstr "regedit: не удалось открыть ключ «%1».\n" +msgstr "reg: не удалось открыть ключ «%1».\n" #: reg.rc:69 -#, fuzzy -#| msgid "regedit: Unrecognized escape sequence [\\%1!c!]\n" msgid "reg: Unrecognized escape sequence [\\%1!c!]\n" -msgstr "regedit: неизвестная управляющая последовательность [\\%1!c!]\n" +msgstr "reg: неизвестная управляющая последовательность [\\%1!c!]\n" #: regedit.rc:34 msgid "&Registry"
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
36
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
Results per page:
10
25
50
100
200