Module: wine Branch: master Commit: b456420096ccb50b070e1f58d9bb5b2953e241db URL: https://source.winehq.org/git/wine.git/?a=commit;h=b456420096ccb50b070e1f58d... Author: Huw Davies <huw(a)codeweavers.com> Date: Mon Mar 15 10:03:19 2021 +0000 riched20: Remove unused code from ITextHost_TxGetPropertyBits. Currently TxGetPropertyBits is only called during text services creation, so the editor is not set. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/txthost.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/dlls/riched20/txthost.c b/dlls/riched20/txthost.c index 1acf1d1e207..278b0a64379 100644 --- a/dlls/riched20/txthost.c +++ b/dlls/riched20/txthost.c @@ -375,28 +375,14 @@ DECLSPEC_HIDDEN HRESULT __thiscall ITextHostImpl_TxGetPropertyBits( ITextHost *i struct host *host = impl_from_ITextHost( iface ); DWORD style; DWORD dwBits = 0; + DWORD dwScrollBar; - if (host->editor) - { - style = host->editor->styleFlags; - if (host->editor->mode & TM_RICHTEXT) - dwBits |= TXTBIT_RICHTEXT; - if (host->editor->bWordWrap) - dwBits |= TXTBIT_WORDWRAP; - if (style & ECO_AUTOWORDSELECTION) - dwBits |= TXTBIT_AUTOWORDSEL; - } - else - { - DWORD dwScrollBar; - - style = GetWindowLongW( host->window, GWL_STYLE ); - ITextHostImpl_TxGetScrollBars(iface, &dwScrollBar); + style = GetWindowLongW( host->window, GWL_STYLE ); + ITextHostImpl_TxGetScrollBars(iface, &dwScrollBar); - dwBits |= TXTBIT_RICHTEXT|TXTBIT_AUTOWORDSEL; - if (!(dwScrollBar & ES_AUTOHSCROLL)) - dwBits |= TXTBIT_WORDWRAP; - } + dwBits |= TXTBIT_RICHTEXT|TXTBIT_AUTOWORDSEL; + if (!(dwScrollBar & ES_AUTOHSCROLL)) + dwBits |= TXTBIT_WORDWRAP; /* Bits that correspond to window styles. */ if (style & ES_MULTILINE)