Dylan Smith : richedit: Removed redundant code for getting the insert style .

Alexandre Julliard julliard at winehq.org
Fri Jun 27 07:41:49 CDT 2008


Module: wine
Branch: master
Commit: 461830a83d46f1867a6097e1498eaf10ce0a2680
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=461830a83d46f1867a6097e1498eaf10ce0a2680

Author: Dylan Smith <dylan.ah.smith at gmail.com>
Date:   Thu Jun 26 16:17:17 2008 -0400

richedit: Removed redundant code for getting the insert style.

The function ME_GetInsertStyle already checks for the case where there
is a selection, so there is no need to duplicate this code for
ME_GetSelectionInsertStyle.

---

 dlls/riched20/caret.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)

diff --git a/dlls/riched20/caret.c b/dlls/riched20/caret.c
index dcaab0c..9f012be 100644
--- a/dlls/riched20/caret.c
+++ b/dlls/riched20/caret.c
@@ -1291,19 +1291,7 @@ void ME_DeleteSelection(ME_TextEditor *editor)
 
 ME_Style *ME_GetSelectionInsertStyle(ME_TextEditor *editor)
 {
-  ME_Style *style;
-  int from, to;
-
-  ME_GetSelection(editor, &from, &to);
-  if (from != to) {
-    ME_Cursor c;
-    ME_CursorFromCharOfs(editor, from, &c);
-    style = c.pRun->member.run.style;
-    ME_AddRefStyle(style); /* ME_GetInsertStyle has already done that */
-  }
-  else
-    style = ME_GetInsertStyle(editor, 0);
-  return style;
+  return ME_GetInsertStyle(editor, 0);
 }
 
 void ME_SendSelChange(ME_TextEditor *editor)




More information about the wine-cvs mailing list