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
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
October 2016
----- 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
451 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Added support for non-pixel style values in IHTMLStyle:: get_pixel* functions.
by Alexandre Julliard
07 Oct '16
07 Oct '16
Module: wine Branch: master Commit: 1dedd90e8c56ff61772915d575a43ad6c95813cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1dedd90e8c56ff61772915d57…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Oct 7 18:13:59 2016 +0200 mshtml: Added support for non-pixel style values in IHTMLStyle::get_pixel* functions. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlstyle.c | 11 +++-------- dlls/mshtml/tests/style.c | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index a445bc2..72fc1d3 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -700,7 +700,7 @@ static HRESULT get_nsstyle_pixel_val(HTMLStyle *This, styleid_t sid, LONG *p) hres = get_nsstyle_attr_nsval(This->nsstyle, sid, &str_value); if(hres == S_OK) { - WCHAR *ptr; + WCHAR *ptr = NULL; const PRUnichar *value; nsAString_GetData(&str_value, &value); @@ -711,15 +711,10 @@ static HRESULT get_nsstyle_pixel_val(HTMLStyle *This, styleid_t sid, LONG *p) /* Skip all digits. We have tests showing that we should not round the value. */ while(isdigitW(*++ptr)); } + } - if(*ptr && strcmpW(ptr, pxW)) { - nsAString_Finish(&str_value); - FIXME("%s: only px values are currently supported\n", debugstr_w(value)); - hres = E_NOTIMPL; - } - }else { + if(!ptr || (*ptr && strcmpW(ptr, pxW))) *p = 0; - } } nsAString_Finish(&str_value); diff --git a/dlls/mshtml/tests/style.c b/dlls/mshtml/tests/style.c index 7053a09..57207de 100644 --- a/dlls/mshtml/tests/style.c +++ b/dlls/mshtml/tests/style.c @@ -1099,6 +1099,11 @@ static void test_body_style(IHTMLStyle *style) ok(!strcmp_wa(V_BSTR(&v), "auto"), "V_BSTR(v)=%s\n", wine_dbgstr_w(V_BSTR(&v))); VariantClear(&v); + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelWidth(style, &l); + ok(hres == S_OK, "get_pixelWidth failed: %08x\n", hres); + ok(!l, "pixelWidth = %d\n", l); + V_VT(&v) = VT_I4; V_I4(&v) = 100; hres = IHTMLStyle_put_width(style, v); @@ -1361,6 +1366,17 @@ static void test_body_style(IHTMLStyle *style) ok(hres == S_OK, "get_pixelTop failed: %08x\n", hres); ok(l == 3, "pixelTop = %d\n", l); + V_VT(&v) = VT_BSTR; + V_BSTR(&v) = a2bstr("100%"); + hres = IHTMLStyle_put_top(style, v); + ok(hres == S_OK, "put_top failed: %08x\n", hres); + VariantClear(&v); + + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelTop(style, &l); + ok(hres == S_OK, "get_pixelTop failed: %08x\n", hres); + ok(!l, "pixelTop = %d\n", l); + V_VT(&v) = VT_NULL; hres = IHTMLStyle_put_top(style, v); ok(hres == S_OK, "put_top failed: %08x\n", hres); @@ -1433,6 +1449,17 @@ static void test_body_style(IHTMLStyle *style) ok(l == 70, "pixelHeight = %d\n", l); V_VT(&v) = VT_BSTR; + V_BSTR(&v) = a2bstr("50%"); + hres = IHTMLStyle_put_height(style, v); + ok(hres == S_OK, "put_height failed: %08x\n", hres); + VariantClear(&v); + + l = 0xdeadbeef; + hres = IHTMLStyle_get_pixelHeight(style, &l); + ok(hres == S_OK, "get_pixelHeight failed: %08x\n", hres); + ok(!l, "pixelHeight = %d\n", l); + + V_VT(&v) = VT_BSTR; V_BSTR(&v) = NULL; hres = IHTMLStyle_put_height(style, v); ok(hres == S_OK, "put_height failed: %08x\n", hres);
1
0
0
0
Jacek Caban : rpcrt4: Use NtReadFile in rpcrt4_conn_np_read.
by Alexandre Julliard
07 Oct '16
07 Oct '16
Module: wine Branch: master Commit: 2f0de6a1bc64f38b40729f29a8615f35535b5d9b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f0de6a1bc64f38b40729f29a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Oct 6 15:01:40 2016 +0200 rpcrt4: Use NtReadFile in rpcrt4_conn_np_read. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/rpcrt4/rpc_transport.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 54cef07..b2fbf9b 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -77,6 +77,8 @@ # define ioctlsocket ioctl #endif /* defined(__MINGW32__) || defined (_MSC_VER) */ +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "windef.h" #include "winbase.h" #include "winnls.h" @@ -445,22 +447,20 @@ static int rpcrt4_conn_np_read(RpcConnection *Connection, void *buffer, unsigned int count) { RpcConnection_np *npc = (RpcConnection_np *) Connection; + IO_STATUS_BLOCK io_status; char *buf = buffer; - BOOL ret = TRUE; unsigned int bytes_left = count; + NTSTATUS status; while (bytes_left) { - DWORD bytes_read; - ret = ReadFile(npc->pipe, buf, bytes_left, &bytes_read, NULL); - if (!ret && GetLastError() == ERROR_MORE_DATA) - ret = TRUE; - if (!ret || !bytes_read) - break; - bytes_left -= bytes_read; - buf += bytes_read; + status = NtReadFile(npc->pipe, NULL, NULL, NULL, &io_status, buf, bytes_left, NULL, NULL); + if (status && status != STATUS_BUFFER_OVERFLOW) + return -1; + bytes_left -= io_status.Information; + buf += io_status.Information; } - return ret ? count : -1; + return count; } static int rpcrt4_conn_np_write(RpcConnection *Connection,
1
0
0
0
Jacek Caban : mshtml: Update binding moniker in handle_redirect.
by Alexandre Julliard
07 Oct '16
07 Oct '16
Module: wine Branch: master Commit: a6ef2386a7220bb17c9408374d5ec24faca52d26 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a6ef2386a7220bb17c9408374…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Oct 7 16:04:49 2016 +0200 mshtml: Update binding moniker in handle_redirect. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/navigate.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index aa652dd..ad949fd 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -1423,11 +1423,18 @@ static HRESULT handle_redirect(nsChannelBSC *This, const WCHAR *new_url) nsRedirectCallback *callback; nsIChannelEventSink *sink; nsChannel *new_channel; + IMoniker *mon; nsresult nsres; HRESULT hres; TRACE("(%p)->(%s)\n", This, debugstr_w(new_url)); + hres = CreateURLMoniker(NULL, new_url, &mon); + if(FAILED(hres)) + return hres; + IMoniker_Release(This->bsc.mon); + This->bsc.mon = mon; + if(!This->nschannel || !This->nschannel->notif_callback) return S_OK;
1
0
0
0
Sebastian Lackner : ntoskrnl.exe: Fix parameters of IoBuildSynchronousFsdRequest in dispatch_flush.
by Alexandre Julliard
07 Oct '16
07 Oct '16
Module: wine Branch: master Commit: 14b2a6a190a84ca3dbb334ad518e137625ab316a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14b2a6a190a84ca3dbb334ad5…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Fri Oct 7 05:20:01 2016 +0200 ntoskrnl.exe: Fix parameters of IoBuildSynchronousFsdRequest in dispatch_flush. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index d107bd9..cf87f7a 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -358,7 +358,7 @@ static NTSTATUS dispatch_flush( const irp_params_t *params, void *in_buff, ULONG TRACE( "device %p file %p\n", device, file ); /* note: we abuse UserIosb to store the server irp handle */ - if (!(irp = IoBuildSynchronousFsdRequest( IRP_MJ_FLUSH_BUFFERS, device, in_buff, in_size, + if (!(irp = IoBuildSynchronousFsdRequest( IRP_MJ_FLUSH_BUFFERS, device, NULL, 0, NULL, NULL, irp_handle ))) return STATUS_NO_MEMORY;
1
0
0
0
Sebastian Lackner : ntoskrnl.exe: Remove checks if MajorFunction is NULL.
by Alexandre Julliard
07 Oct '16
07 Oct '16
Module: wine Branch: master Commit: 54c68c6533e6e1f3a463c6b76cd756d60983c66c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=54c68c6533e6e1f3a463c6b76…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Fri Oct 7 05:19:46 2016 +0200 ntoskrnl.exe: Remove checks if MajorFunction is NULL. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 35 +++++++++++++++-------------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 258f76d..d107bd9 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -172,7 +172,7 @@ static HANDLE get_device_manager(void) return ret; } -static NTSTATUS dispatch_irp( DEVICE_OBJECT *device, IRP *irp ) +static void dispatch_irp( DEVICE_OBJECT *device, IRP *irp ) { LARGE_INTEGER count; @@ -183,8 +183,6 @@ static NTSTATUS dispatch_irp( DEVICE_OBJECT *device, IRP *irp ) IoCallDriver( device, irp ); device->CurrentIrp = NULL; - - return STATUS_SUCCESS; } /* process a create request for a given file */ @@ -227,10 +225,8 @@ static NTSTATUS dispatch_create( const irp_params_t *params, void *in_buff, ULON irp->UserIosb = irp_handle; /* note: we abuse UserIosb to store the server irp handle */ irp->UserEvent = NULL; - if (device->DriverObject->MajorFunction[IRP_MJ_CREATE]) return dispatch_irp( device, irp ); + dispatch_irp( device, irp ); - irp->IoStatus.u.Status = STATUS_SUCCESS; - IoCompleteRequest( irp, IO_NO_INCREMENT ); return STATUS_SUCCESS; } @@ -267,12 +263,7 @@ static NTSTATUS dispatch_close( const irp_params_t *params, void *in_buff, ULONG irp->UserIosb = irp_handle; /* note: we abuse UserIosb to store the server irp handle */ irp->UserEvent = NULL; - if (!device->DriverObject->MajorFunction[IRP_MJ_CLOSE]) - { - irp->IoStatus.u.Status = STATUS_SUCCESS; - IoCompleteRequest( irp, IO_NO_INCREMENT ); - } - else dispatch_irp( device, irp ); + dispatch_irp( device, irp ); HeapFree( GetProcessHeap(), 0, file ); /* FIXME: async close processing not supported */ return STATUS_SUCCESS; @@ -292,7 +283,6 @@ static NTSTATUS dispatch_read( const irp_params_t *params, void *in_buff, ULONG if (!file) return STATUS_INVALID_HANDLE; device = file->DeviceObject; - if (!device->DriverObject->MajorFunction[IRP_MJ_READ]) return STATUS_NOT_SUPPORTED; TRACE( "device %p file %p size %u\n", device, file, out_size ); @@ -314,7 +304,9 @@ static NTSTATUS dispatch_read( const irp_params_t *params, void *in_buff, ULONG irpsp = IoGetNextIrpStackLocation( irp ); irpsp->Parameters.Read.Key = params->read.key; - return dispatch_irp( device, irp ); + dispatch_irp( device, irp ); + + return STATUS_SUCCESS; } /* process a write request for a given device */ @@ -330,7 +322,6 @@ static NTSTATUS dispatch_write( const irp_params_t *params, void *in_buff, ULONG if (!file) return STATUS_INVALID_HANDLE; device = file->DeviceObject; - if (!device->DriverObject->MajorFunction[IRP_MJ_WRITE]) return STATUS_NOT_SUPPORTED; TRACE( "device %p file %p size %u\n", device, file, in_size ); @@ -347,7 +338,9 @@ static NTSTATUS dispatch_write( const irp_params_t *params, void *in_buff, ULONG irpsp = IoGetNextIrpStackLocation( irp ); irpsp->Parameters.Write.Key = params->write.key; - return dispatch_irp( device, irp ); + dispatch_irp( device, irp ); + + return STATUS_SUCCESS; } /* process a flush request for a given device */ @@ -361,7 +354,6 @@ static NTSTATUS dispatch_flush( const irp_params_t *params, void *in_buff, ULONG if (!file) return STATUS_INVALID_HANDLE; device = file->DeviceObject; - if (!device->DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS]) return STATUS_NOT_SUPPORTED; TRACE( "device %p file %p\n", device, file ); @@ -373,7 +365,9 @@ static NTSTATUS dispatch_flush( const irp_params_t *params, void *in_buff, ULONG irp->Tail.Overlay.OriginalFileObject = file; irp->RequestorMode = UserMode; - return dispatch_irp( device, irp ); + dispatch_irp( device, irp ); + + return STATUS_SUCCESS; } /* process an ioctl request for a given device */ @@ -388,7 +382,6 @@ static NTSTATUS dispatch_ioctl( const irp_params_t *params, void *in_buff, ULONG if (!file) return STATUS_INVALID_HANDLE; device = file->DeviceObject; - if (!device->DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL]) return STATUS_NOT_SUPPORTED; TRACE( "ioctl %x device %p file %p in_size %u out_size %u\n", params->ioctl.code, device, file, in_size, out_size ); @@ -417,7 +410,9 @@ static NTSTATUS dispatch_ioctl( const irp_params_t *params, void *in_buff, ULONG irp->Tail.Overlay.OriginalFileObject = file; irp->RequestorMode = UserMode; - return dispatch_irp( device, irp ); + dispatch_irp( device, irp ); + + return STATUS_SUCCESS; } typedef NTSTATUS (*dispatch_func)( const irp_params_t *params, void *in_buff, ULONG in_size,
1
0
0
0
Sebastian Lackner : ntoskrnl.exe: Fix a copy & paste error in dispatch_close.
by Alexandre Julliard
07 Oct '16
07 Oct '16
Module: wine Branch: master Commit: d392a01208fe30799759907e579b79c208e4f315 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d392a01208fe30799759907e5…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Fri Oct 7 05:13:59 2016 +0200 ntoskrnl.exe: Fix a copy & paste error in dispatch_close. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index cc6ea0b..258f76d 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -259,11 +259,6 @@ static NTSTATUS dispatch_close( const irp_params_t *params, void *in_buff, ULONG irpsp->MajorFunction = IRP_MJ_CLOSE; irpsp->DeviceObject = device; irpsp->CompletionRoutine = NULL; - irpsp->Parameters.Create.SecurityContext = NULL; /* FIXME */ - irpsp->Parameters.Create.Options = params->create.options; - irpsp->Parameters.Create.ShareAccess = params->create.sharing; - irpsp->Parameters.Create.FileAttributes = 0; - irpsp->Parameters.Create.EaLength = 0; irp->Tail.Overlay.OriginalFileObject = file; irp->RequestorMode = UserMode;
1
0
0
0
Huw Davies : wordpad: Improve the indentation of bulleted lists.
by Alexandre Julliard
07 Oct '16
07 Oct '16
Module: wine Branch: master Commit: c8d96b96dac53f8e8d04df1e6855750f4a0588fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c8d96b96dac53f8e8d04df1e6…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Oct 7 10:49:37 2016 +0100 wordpad: Improve the indentation of bulleted lists. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/wordpad/wordpad.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/programs/wordpad/wordpad.c b/programs/wordpad/wordpad.c index bb34f2e..ea6e11d 100644 --- a/programs/wordpad/wordpad.c +++ b/programs/wordpad/wordpad.c @@ -2353,22 +2353,28 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam) case ID_BULLET: { - PARAFORMAT pf; + PARAFORMAT2 pf; pf.cbSize = sizeof(pf); pf.dwMask = PFM_NUMBERING; SendMessageW(hwndEditor, EM_GETPARAFORMAT, 0, (LPARAM)&pf); - pf.dwMask |= PFM_OFFSET; + pf.dwMask = PFM_NUMBERING | PFM_NUMBERINGSTART | PFM_NUMBERINGTAB | PFM_OFFSET | PFM_OFFSETINDENT; if(pf.wNumbering == PFN_BULLET) { pf.wNumbering = 0; + pf.wNumberingStart = 0; + pf.wNumberingTab = 0; pf.dxOffset = 0; + pf.dxStartIndent = -360; } else { pf.wNumbering = PFN_BULLET; - pf.dxOffset = 720; + pf.wNumberingStart = 1; + pf.wNumberingTab = 360; + pf.dxOffset = 360; + pf.dxStartIndent = 360; } SendMessageW(hwndEditor, EM_SETPARAFORMAT, 0, (LPARAM)&pf);
1
0
0
0
Huw Davies : riched20: Update the paragraph numbering style if the end-of-paragraph style changes.
by Alexandre Julliard
07 Oct '16
07 Oct '16
Module: wine Branch: master Commit: 123b0c699ac34559cb6b5b3b54e03f9522107986 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=123b0c699ac34559cb6b5b3b5…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Oct 7 10:49:36 2016 +0100 riched20: Update the paragraph numbering style if the end-of-paragraph style changes. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/run.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/riched20/run.c b/dlls/riched20/run.c index 984f8f5..496f0f9 100644 --- a/dlls/riched20/run.c +++ b/dlls/riched20/run.c @@ -753,12 +753,20 @@ void ME_SetCharFormat(ME_TextEditor *editor, ME_Cursor *start, ME_Cursor *end, C for (run = start_run; run != end_run; run = ME_FindItemFwd( run, diRun )) { ME_Style *new_style = ME_ApplyStyle(editor, run->member.run.style, pFmt); + ME_Paragraph *para = run->member.run.para; add_undo_set_char_fmt( editor, run->member.run.para->nCharOfs + run->member.run.nCharOfs, run->member.run.len, &run->member.run.style->fmt ); ME_ReleaseStyle(run->member.run.style); run->member.run.style = new_style; - run->member.run.para->nFlags |= MEPF_REWRAP; + + /* The para numbering style depends on the eop style */ + if ((run->member.run.nFlags & MERF_ENDPARA) && para->para_num.style) + { + ME_ReleaseStyle(para->para_num.style); + para->para_num.style = NULL; + } + para->nFlags |= MEPF_REWRAP; } }
1
0
0
0
Huw Davies : riched20: Add support for displaying bulleted lists.
by Alexandre Julliard
07 Oct '16
07 Oct '16
Module: wine Branch: master Commit: 8a428d52a7e1d2b3851cfe782169c5ed1d55545a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a428d52a7e1d2b3851cfe782…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Oct 7 10:49:35 2016 +0100 riched20: Add support for displaying bulleted lists. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editor.h | 2 ++ dlls/riched20/editstr.h | 9 +++++++++ dlls/riched20/list.c | 1 + dlls/riched20/paint.c | 20 ++++++++++++++++++++ dlls/riched20/para.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ dlls/riched20/wrap.c | 33 +++++++++++++++++++++++++++++---- 6 files changed, 110 insertions(+), 4 deletions(-) diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index 24c856b..7d46692 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -217,6 +217,8 @@ BOOL ME_SetSelectionParaFormat(ME_TextEditor *editor, const PARAFORMAT2 *pFmt) D void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) DECLSPEC_HIDDEN; void ME_MarkAllForWrapping(ME_TextEditor *editor) DECLSPEC_HIDDEN; void ME_SetDefaultParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) DECLSPEC_HIDDEN; +void para_num_init( ME_Context *c, ME_Paragraph *para ) DECLSPEC_HIDDEN; +void para_num_clear( struct para_num *pn ) DECLSPEC_HIDDEN; /* paint.c */ void ME_PaintContent(ME_TextEditor *editor, HDC hDC, const RECT *rcUpdate) DECLSPEC_HIDDEN; diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h index fb88f71..eb4d9f5 100644 --- a/dlls/riched20/editstr.h +++ b/dlls/riched20/editstr.h @@ -188,6 +188,14 @@ typedef struct tagME_BorderRect ME_Border right; } ME_BorderRect; +struct para_num +{ + ME_Style *style; + ME_String *text; + INT width; + POINT pt; +}; + typedef struct tagME_Paragraph { PARAFORMAT2 fmt; @@ -201,6 +209,7 @@ typedef struct tagME_Paragraph POINT pt; int nHeight, nWidth; int nRows; + struct para_num para_num; ME_Run *eop_run; /* ptr to the end-of-para run */ struct tagME_DisplayItem *prev_para, *next_para; } ME_Paragraph; diff --git a/dlls/riched20/list.c b/dlls/riched20/list.c index 15b944c..d321446 100644 --- a/dlls/riched20/list.c +++ b/dlls/riched20/list.c @@ -164,6 +164,7 @@ void ME_DestroyDisplayItem(ME_DisplayItem *item) if (item->type==diParagraph) { ME_DestroyString(item->member.para.text); + para_num_clear( &item->member.para.para_num ); } if (item->type==diRun) diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c index 8e51772..7c17513 100644 --- a/dlls/riched20/paint.c +++ b/dlls/riched20/paint.c @@ -898,6 +898,25 @@ static void ME_DrawTableBorders(ME_Context *c, ME_DisplayItem *paragraph) } } +static void draw_para_number( ME_Context *c, ME_DisplayItem *p ) +{ + ME_Paragraph *para = &p->member.para; + HFONT old_font; + int x, y; + + if (para->fmt.wNumbering) + { + old_font = ME_SelectStyleFont( c, para->para_num.style ); + + x = c->pt.x + para->para_num.pt.x; + y = c->pt.y + para->pt.y + para->para_num.pt.y; + + ExtTextOutW( c->hDC, x, y, 0, NULL, para->para_num.text->szData, para->para_num.text->nLen, NULL ); + + ME_UnselectStyleFont( c, para->para_num.style, old_font ); + } +} + static void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) { int align = SetTextAlign(c->hDC, TA_BASELINE); @@ -1023,6 +1042,7 @@ static void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph) } ME_DrawTableBorders(c, paragraph); + draw_para_number(c, paragraph); SetTextAlign(c->hDC, align); } diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index 0174252..3c62da2 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -128,6 +128,55 @@ static void ME_UpdateTableFlags(ME_DisplayItem *para) para->member.para.fmt.wEffects &= ~PFE_TABLE; } +void para_num_init( ME_Context *c, ME_Paragraph *para ) +{ + ME_Style *style; + CHARFORMAT2W cf; + static const WCHAR bullet_font[] = {'S','y','m','b','o','l',0}; + static const WCHAR bullet_str[] = {0xb7, 0}; + static const WCHAR spaceW[] = {' ', 0}; + HFONT old_font; + SIZE sz; + + if (para->para_num.style && para->para_num.text) return; + + if (!para->para_num.style) + { + style = para->eop_run->style; + + cf.cbSize = sizeof(cf); + cf.dwMask = CFM_FACE | CFM_CHARSET; + memcpy( cf.szFaceName, bullet_font, sizeof(bullet_font) ); + cf.bCharSet = SYMBOL_CHARSET; + style = ME_ApplyStyle( c->editor, style, &cf ); + + para->para_num.style = style; + } + + if (!para->para_num.text) + { + para->para_num.text = ME_MakeStringConst( bullet_str, 1 ); + } + + old_font = ME_SelectStyleFont( c, para->para_num.style ); + GetTextExtentPointW( c->hDC, para->para_num.text->szData, para->para_num.text->nLen, &sz ); + para->para_num.width = sz.cx; + GetTextExtentPointW( c->hDC, spaceW, 1, &sz ); + para->para_num.width += sz.cx; + ME_UnselectStyleFont( c, para->para_num.style, old_font ); +} + +void para_num_clear( struct para_num *pn ) +{ + if (pn->style) + { + ME_ReleaseStyle( pn->style ); + pn->style = NULL; + } + ME_DestroyString( pn->text ); + pn->text = NULL; +} + static BOOL ME_SetParaFormat(ME_TextEditor *editor, ME_Paragraph *para, const PARAFORMAT2 *pFmt) { PARAFORMAT2 copy; diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index 4c73c5d..e3a70f0 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -37,8 +37,10 @@ typedef struct tagME_WrapContext { ME_Style *style; ME_Context *context; - int nLeftMargin, nRightMargin, nFirstMargin; - int nAvailWidth; + int nLeftMargin, nRightMargin; + int nFirstMargin; /* Offset to first line's text, always to the text itself even if a para number is present */ + int nParaNumOffset; /* Offset to the para number */ + int nAvailWidth; /* Width avail for text to wrap into. Does not include any para number text */ int nRow; POINT pt; BOOL bOverflown, bWordWrap; @@ -303,7 +305,12 @@ static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd) BOOL bSkippingSpaces = TRUE; int ascent = 0, descent = 0, width=0, shift = 0, align = 0; - /* wrap text */ + /* Include height of para numbering label */ + if (wc->nRow == 0 && para->fmt.wNumbering) + { + ascent = para->para_num.style->tm.tmAscent; + descent = para->para_num.style->tm.tmDescent; + } for (p = pEnd->prev; p!=wc->pRowStart->prev; p = p->prev) { @@ -367,6 +374,13 @@ static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd) p->member.run.pt.x += row->member.row.nLMargin+shift; } } + + if (wc->nRow == 0 && para->fmt.wNumbering) + { + para->para_num.pt.x = wc->nParaNumOffset + shift; + para->para_num.pt.y = wc->pt.y + row->member.row.nBaseline; + } + ME_InsertBefore(wc->pRowStart, row); wc->nRow++; wc->pt.y += row->member.row.nHeight; @@ -869,6 +883,9 @@ static void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp) { } ME_PrepareParagraphForWrapping(c, tp); + /* Calculate paragraph numbering label */ + para_num_init( c, &tp->member.para ); + /* For now treating all non-password text as complex for better testing */ if (!c->editor->cPasswordMask /* && ScriptIsComplex( tp->member.para.text->szData, tp->member.para.text->nLen, SIC_COMPLEX ) == S_OK */) @@ -883,6 +900,7 @@ static void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp) { wc.pPara = tp; /* wc.para_style = tp->member.para.style; */ wc.style = NULL; + wc.nParaNumOffset = 0; if (tp->member.para.nFlags & MEPF_ROWEND) { wc.nFirstMargin = wc.nLeftMargin = wc.nRightMargin = 0; } else { @@ -890,8 +908,15 @@ static void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp) { if (tp->member.para.pCell) { dxStartIndent += ME_GetTableRowEnd(tp)->member.para.fmt.dxOffset; } + wc.nLeftMargin = ME_twips2pointsX(c, dxStartIndent + pFmt->dxOffset); wc.nFirstMargin = ME_twips2pointsX(c, dxStartIndent); - wc.nLeftMargin = wc.nFirstMargin + ME_twips2pointsX(c, pFmt->dxOffset); + if (pFmt->wNumbering) + { + wc.nParaNumOffset = wc.nFirstMargin; + dxStartIndent = max( ME_twips2pointsX(c, pFmt->wNumberingTab), + tp->member.para.para_num.width ); + wc.nFirstMargin += dxStartIndent; + } wc.nRightMargin = ME_twips2pointsX(c, pFmt->dxRightIndent); if (wc.nFirstMargin < 0)
1
0
0
0
Huw Davies : riched20: Maintain a ptr to the end-of-paragraph run.
by Alexandre Julliard
07 Oct '16
07 Oct '16
Module: wine Branch: master Commit: d132009ae99426bcab8adea89d17ff46e60f9401 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d132009ae99426bcab8adea89…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Oct 7 10:49:34 2016 +0100 riched20: Maintain a ptr to the end-of-paragraph run. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/editstr.h | 1 + dlls/riched20/para.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h index 0e60a3d..fb88f71 100644 --- a/dlls/riched20/editstr.h +++ b/dlls/riched20/editstr.h @@ -201,6 +201,7 @@ typedef struct tagME_Paragraph POINT pt; int nHeight, nWidth; int nRows; + ME_Run *eop_run; /* ptr to the end-of-para run */ struct tagME_DisplayItem *prev_para, *next_para; } ME_Paragraph; diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c index e246e37..0174252 100644 --- a/dlls/riched20/para.c +++ b/dlls/riched20/para.c @@ -81,6 +81,8 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor) run->member.run.len = eol_len; run->member.run.para = ¶->member.para; + para->member.para.eop_run = &run->member.run; + ME_InsertBefore(text->pLast, para); ME_InsertBefore(text->pLast, run); para->member.para.prev_para = text->pFirst; @@ -272,6 +274,10 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, ME_InsertBefore(run, new_para); ME_InsertBefore(new_para, end_run); + /* Fix up the paras' eop_run ptrs */ + new_para->member.para.eop_run = run_para->member.para.eop_run; + run_para->member.para.eop_run = &end_run->member.run; + if (!editor->bEmulateVersion10) { /* v4.1 */ if (paraFlags & (MEPF_ROWSTART|MEPF_CELL)) { @@ -429,6 +435,9 @@ ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp, pTmp->member.run.para = &tp->member.para; } while(1); + /* Fix up the para's eop_run ptr */ + tp->member.para.eop_run = pNext->member.para.eop_run; + ME_Remove(pRun); ME_DestroyDisplayItem(pRun);
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
46
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
44
45
46
Results per page:
10
25
50
100
200