[PATCH 3/5] riched20: Remove unused code from ITextHost_TxGetPropertyBits.
Huw Davies
huw at codeweavers.com
Mon Mar 15 05:03:19 CDT 2021
Currently TxGetPropertyBits is only called during text services
creation, so the editor is not set.
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
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)
--
2.23.0
More information about the wine-devel
mailing list