From 6c9dee0fc2ad666fe3178bd6290fcecd4c7ef170 Mon Sep 17 00:00:00 2001 From: freemanBao Date: Sat, 6 Sep 2025 17:22:57 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90RichEditor=E3=80=91=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=91=8A=E8=AD=A6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: freemanBao Change-Id: I0a64fe27530ff593fef79caf2e72710c3d147f1f --- .../core/components_ng/pattern/rich_editor/selection_info.h | 1 - .../core/pattern/rich_editor/rich_editor_event_test_ng.cpp | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frameworks/core/components_ng/pattern/rich_editor/selection_info.h b/frameworks/core/components_ng/pattern/rich_editor/selection_info.h index 1200ec879ed..e62403b7afe 100644 --- a/frameworks/core/components_ng/pattern/rich_editor/selection_info.h +++ b/frameworks/core/components_ng/pattern/rich_editor/selection_info.h @@ -110,7 +110,6 @@ struct SymbolSpanStyle { && lineSpacing == rhs.lineSpacing && symbolColor == rhs.symbolColor && fontFeature == rhs.fontFeature - && fontFeature == rhs.fontFeature && fontWeight == rhs.fontWeight && renderingStrategy == rhs.renderingStrategy && effectStrategy == rhs.effectStrategy; diff --git a/test/unittest/core/pattern/rich_editor/rich_editor_event_test_ng.cpp b/test/unittest/core/pattern/rich_editor/rich_editor_event_test_ng.cpp index b45097414c9..45db89d9214 100644 --- a/test/unittest/core/pattern/rich_editor/rich_editor_event_test_ng.cpp +++ b/test/unittest/core/pattern/rich_editor/rich_editor_event_test_ng.cpp @@ -585,7 +585,7 @@ HWTEST_F(RichEditorEventTestNg, RichEditorEventHub002, TestSize.Level1) RichEditorAbstractSpanResult result; FONT_FEATURES_LIST fontFeature; RefPtr valueResource; - SymbolSpanStyle symbolSpanStyle; + SymbolSpanStyle symbolSpanStyle = SymbolSpanStyle(TEXT_STYLE_1); result.SetSpanRangeEnd(1); result.SetFontFeature(fontFeature); @@ -609,6 +609,7 @@ HWTEST_F(RichEditorEventTestNg, RichEditorEventHub002, TestSize.Level1) EXPECT_EQ(result.GetValueResource(), valueResource); EXPECT_EQ(result.GetValueString(), TEST_STR); EXPECT_EQ(result.GetSymbolSpanStyle().lineHeight, 0.0); + EXPECT_EQ(result.GetSymbolSpanStyle(), SymbolSpanStyle(TEXT_STYLE_1)); EXPECT_EQ(result.GetFontWeight(), 0); EXPECT_EQ(result.GetFontFamily(), ""); EXPECT_EQ(result.GetTextDecoration(), TextDecoration::UNDERLINE); -- Gitee