/foundation/arkui/ace_engine/test/unittest/adapter/ohos/capability/ |
H A D | html_convert_test.cpp | 186 auto spanString = AceType::MakeRefPtr<SpanString>("0123456789"); in HWTEST_F() local 187 spanString->AddSpan(AceType::MakeRefPtr<FontSpan>(testFont1, 0, 3)); in HWTEST_F() 188 spanString->AddSpan(AceType::MakeRefPtr<FontSpan>(testFont2, 3, 5)); in HWTEST_F() 189 spanString->AddSpan(AceType::MakeRefPtr<FontSpan>(testEmptyFont, 5, 8)); in HWTEST_F() 192 spanString->EncodeTlv(buffer); in HWTEST_F() 197 auto out = convert.ToHtml(*spanString); in HWTEST_F() 207 EXPECT_EQ(items.size(), spanString->GetSpanItems().size()); in HWTEST_F() 269 auto spanString = AceType::MakeRefPtr<SpanString>("01234中文56789"); in HWTEST_F() local 271 spanString->EncodeTlv(buff); in HWTEST_F() 275 auto htmlFromSpan = toHtml.ToHtml(*spanString); in HWTEST_F() 289 auto spanString = AceType::MakeRefPtr<SpanString>("0123456789"); HWTEST_F() local 335 auto spanString = AceType::MakeRefPtr<SpanString>("段落标题\\n正文第一段开始"); HWTEST_F() local 362 auto spanString = AceType::MakeRefPtr<SpanString>("向上到顶适中向下到底"); HWTEST_F() local [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/rich_editor/ |
H A D | rich_editor_styled_string_controller.cpp | 24 auto spanString = AceType::DynamicCast<SpanString>(value); in SetStyledString() local 25 if (spanString) { in SetStyledString() 26 richEditorPattern->SetStyledString(spanString); in SetStyledString() 39 auto spanString = styledString->GetSubSpanString(0, length); in GetStyledString() local 40 mutableSpanString->AppendSpanString(spanString); in GetStyledString()
|
H A D | rich_editor_controller.cpp | 136 auto spanString = AceType::DynamicCast<SpanString>(spanStringBase); in FromStyledString() local 137 CHECK_NULL_RETURN(spanString, SelectionInfo()); in FromStyledString() 138 return richEditorPattern->FromStyledString(spanString); in FromStyledString()
|
H A D | rich_editor_pattern.cpp | 3875 RefPtr<SpanString> spanString = MakeRefPtr<SpanString>(""); 3877 SetSubSpansWithAIWrite(spanString, realStart, realEnd); 3879 SetSubSpans(spanString, realStart, realEnd); 3881 SetSubMap(spanString); 3882 return spanString; 3885 SelectionInfo RichEditorPattern::FromStyledString(const RefPtr<SpanString>& spanString) 3890 if (spanString && !spanString->GetSpanItems().empty()) { 3891 auto spans = spanString->GetSpanItems(); 3999 void RichEditorPattern::SetSubSpansWithAIWrite(RefPtr<SpanString>& spanString, int32_ 10996 RefPtr<SpanString> spanString = ToStyledString(0, textSize); GetAIWriteInfo() local 11077 auto spanString = MakeRefPtr<MutableSpanString>(customSpan); ReplacePlaceholderWithCustomSpan() local 11107 auto spanString = MakeRefPtr<SpanString>(options); ReplacePlaceholderWithImageSpan() local 11133 AddSpansAndReplacePlaceholder(RefPtr<SpanString>& spanString) AddSpansAndReplacePlaceholder() argument 11163 InsertSpanByBackData(RefPtr<SpanString>& spanString) InsertSpanByBackData() argument 11185 RefPtr<SpanString> spanString = SpanString::DecodeTlv(buffer); HandleAIWriteResult() local [all...] |
H A D | rich_editor_pattern.h | 578 SelectionInfo FromStyledString(const RefPtr<SpanString>& spanString); 769 void InsertSpanByBackData(RefPtr<SpanString>& spanString); 770 void AddSpansAndReplacePlaceholder(RefPtr<SpanString>& spanString); 772 void SetSubSpansWithAIWrite(RefPtr<SpanString>& spanString, int32_t start, int32_t end); 1251 void SetSubSpans(RefPtr<SpanString>& spanString, int32_t start, int32_t end); 1252 void SetSubMap(RefPtr<SpanString>& spanString); 1254 void AddSpanByPasteData(const RefPtr<SpanString>& spanString); 1255 void CompleteStyledString(RefPtr<SpanString>& spanString); 1256 void InsertStyledStringByPaste(const RefPtr<SpanString>& spanString); 1257 void HandleOnDragInsertStyledString(const RefPtr<SpanString>& spanString); [all...] |
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text/ |
H A D | text_controller.cpp | 38 auto spanString = AceType::DynamicCast<SpanString>(value); in SetStyledString() local 39 if (spanString) { in SetStyledString() 40 textPattern->SetStyledString(spanString); in SetStyledString()
|
H A D | text_model_ng.cpp | 68 auto spanString = AceType::DynamicCast<SpanString>(spanBase); in Create() local 69 if (spanString) { in Create() 70 auto spans = spanString->GetSpanItems(); in Create() 476 auto spanString = AceType::DynamicCast<SpanString>(spanBase); in InitSpanStringController() local 477 if (spanString) { in InitSpanStringController() 478 auto spans = spanString->GetSpanItems(); in InitSpanStringController()
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text/span/ |
H A D | mutable_span_string.h | 42 void ReplaceSpanString(int32_t start, int32_t length, const RefPtr<SpanString>& spanString); 43 void InsertSpanString(int32_t start, const RefPtr<SpanString>& spanString); 44 void AppendSpanString(const RefPtr<SpanString>& spanString); 58 void ApplyInsertSpanStringToSpans(int32_t start, const RefPtr<SpanString>& spanString); 59 void ApplyInsertSpanStringToSpanBase(int32_t start, const RefPtr<SpanString>& spanString);
|
H A D | mutable_span_string.cpp | 413 void MutableSpanString::ReplaceSpanString(int32_t start, int32_t length, const RefPtr<SpanString>& spanString) in ReplaceSpanString() argument 424 InsertSpanString(start, spanString); in ReplaceSpanString() 439 void MutableSpanString::ApplyInsertSpanStringToSpans(int32_t start, const RefPtr<SpanString>& spanString) in ApplyInsertSpanStringToSpans() argument 441 auto offset = spanString->GetLength(); in ApplyInsertSpanStringToSpans() 461 auto otherSpans = spanString->GetSpanItems(); in ApplyInsertSpanStringToSpans() 473 void MutableSpanString::ApplyInsertSpanStringToSpanBase(int32_t start, const RefPtr<SpanString>& spanString) in ApplyInsertSpanStringToSpanBase() argument 475 auto offset = spanString->GetLength(); in ApplyInsertSpanStringToSpanBase() 476 auto otherSpansMap = spanString->GetSpansMap(); in ApplyInsertSpanStringToSpanBase() 506 void MutableSpanString::InsertSpanString(int32_t start, const RefPtr<SpanString>& spanString) in InsertSpanString() argument 509 if (start > len || spanString in InsertSpanString() 539 AppendSpanString(const RefPtr<SpanString>& spanString) AppendSpanString() argument 541 InsertSpanString(GetLength(), spanString); AppendSpanString() local [all...] |
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/style_string/ |
H A D | js_span_string.cpp | 49 RefPtr<SpanString> spanString; member 146 RefPtr<SpanString> spanString; in Constructor() local 148 spanString = AceType::MakeRefPtr<SpanString>(data); in Constructor() 152 spanString = AceType::MakeRefPtr<SpanString>(data); in Constructor() 157 spanString->BindWithSpans(spanBases); in Constructor() 164 spanString = AceType::MakeRefPtr<SpanString>(attachment); in Constructor() 167 spanString = AceType::MakeRefPtr<SpanString>(customSpan); in Constructor() 174 jsSpanString->SetController(spanString); in Constructor() 178 void JSSpanString::Destructor(JSSpanString* spanString) in Destructor() argument 180 if (spanString ! in Destructor() 225 auto spanString = jsSpanString->GetController(); IsEqualToSpanString() local 244 auto spanString = spanString_->GetSubSpanString(start, length); GetSubSpanString() local 697 SetController(const RefPtr<SpanString>& spanString) SetController() argument 781 auto* spanString = JSRef<JSObject>::Cast(arg)->Unwrap<JSSpanString>(); ToHtml() local 798 auto* spanString = JSRef<JSObject>::Cast(arg)->Unwrap<JSSpanString>(); Marshalling() local 882 RefPtr<MutableSpanString> spanString; Constructor() local 915 Destructor(JSMutableSpanString* spanString) Destructor() argument 1192 auto* spanString = JSRef<JSObject>::Cast(info[2])->Unwrap<JSSpanString>(); ReplaceSpanString() local 1218 auto* spanString = JSRef<JSObject>::Cast(info[1])->Unwrap<JSSpanString>(); InsertSpanString() local 1247 auto* spanString = JSRef<JSObject>::Cast(info[0])->Unwrap<JSSpanString>(); AppendSpanString() local [all...] |
H A D | js_span_string.h | 38 static void Destructor(JSSpanString* spanString); 96 void SetController(const RefPtr<SpanString>& spanString); 114 static void Destructor(JSMutableSpanString* spanString);
|
H A D | js_span_object.h | 299 void AddStyledString(const WeakPtr<SpanStringBase>& spanString); 300 void RemoveStyledString(const WeakPtr<SpanStringBase>& spanString); 324 void AddStyledString(const WeakPtr<SpanStringBase>& spanString) override; 325 void RemoveStyledString(const WeakPtr<SpanStringBase>& spanString) override;
|
H A D | js_span_object.cpp | 957 void JSNativeCustomSpan::AddStyledString(const WeakPtr<SpanStringBase>& spanString) in AddStyledString() argument 959 spanStringBaseSet_.insert(spanString); in AddStyledString() 962 void JSNativeCustomSpan::RemoveStyledString(const WeakPtr<SpanStringBase>& spanString) in RemoveStyledString() argument 964 spanStringBaseSet_.erase(spanString); in RemoveStyledString() 968 void JSCustomSpan::AddStyledString(const WeakPtr<SpanStringBase>& spanString) in AddStyledString() argument 971 customSpan_->AddStyledString(spanString); in AddStyledString() 974 void JSCustomSpan::RemoveStyledString(const WeakPtr<SpanStringBase>& spanString) in RemoveStyledString() argument 977 customSpan_->RemoveStyledString(spanString); in RemoveStyledString()
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/text/ |
H A D | span_string_test_ng.cpp | 131 auto spanString = AceType::MakeRefPtr<SpanString>("0123456789"); in HWTEST_F() local 132 EXPECT_EQ(spanString->GetString(), "0123456789"); in HWTEST_F() 133 EXPECT_EQ(spanString->GetLength(), 10); in HWTEST_F() 342 auto spanString = AceType::MakeRefPtr<MutableSpanString>(customSpan); in HWTEST_F() local 343 auto spans = spanString->GetSpans(0, spanString->GetLength()); in HWTEST_F() 351 spanString->AppendSpanString(spanString); in HWTEST_F() 352 spans = spanString->GetSpans(0, spanString in HWTEST_F() 384 auto spanString = AceType::MakeRefPtr<MutableSpanString>(customSpan); HWTEST_F() local 859 auto spanString = AceType::MakeRefPtr<MutableSpanString>("01234567891"); HWTEST_F() local 1052 auto spanString = AceType::MakeRefPtr<MutableSpanString>("0123456789"); HWTEST_F() local 1432 auto spanString = AceType::MakeRefPtr<MutableSpanString>("0123456789"); HWTEST_F() local 1471 auto spanString = AceType::MakeRefPtr<MutableSpanString>("0123456789"); HWTEST_F() local [all...] |
H A D | span_accessibility_test_ng.cpp | 126 auto spanString = AceType::MakeRefPtr<MutableSpanString>("01234567891"); in HWTEST_F() local 127 spanString->BindWithSpans(spanBases); in HWTEST_F() 128 pattern->SetSpanItemChildren(spanString->GetSpanItems()); in HWTEST_F()
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/rich_editor/ |
H A D | rich_editor_pattern_test_ng.cpp | 1537 RefPtr<SpanString> spanString; in HWTEST_F() local 1539 selection = richEditorPattern->FromStyledString(spanString).GetSelection(); in HWTEST_F() 1543 spanString = AceType::MakeRefPtr<SpanString>(INIT_VALUE_1); in HWTEST_F() 1544 ASSERT_NE(spanString, nullptr); in HWTEST_F() 1545 selection = richEditorPattern->FromStyledString(spanString).GetSelection(); in HWTEST_F() 1550 spanString->AppendSpanItem(imageSpanItem); in HWTEST_F() 1551 selection = richEditorPattern->FromStyledString(spanString).GetSelection(); in HWTEST_F() 1572 auto spanString = AceType::MakeRefPtr<SpanString>(INIT_VALUE_1); in HWTEST_F() local 1573 ASSERT_NE(spanString, nullptr); in HWTEST_F() 1576 EXPECT_NE(spanString in HWTEST_F() 1590 auto spanString = AceType::MakeRefPtr<SpanString>(INIT_VALUE_1); HWTEST_F() local 1732 auto spanString = AceType::MakeRefPtr<SpanString>(INIT_VALUE_1); HWTEST_F() local 1759 auto spanString = AceType::MakeRefPtr<SpanString>(INIT_VALUE_1); HWTEST_F() local [all...] |
H A D | rich_editor_pattern_testfive_ng.cpp | 325 auto spanString = AceType::MakeRefPtr<MutableSpanString>("click here"); in HWTEST_F() local 326 spanString->AddSpan(AceType::MakeRefPtr<UrlSpan>(address, 0, 10)); in HWTEST_F() 327 richEditorPattern->SetStyledString(spanString); in HWTEST_F()
|
H A D | rich_editor_styled_string_test_ng.cpp | 1049 auto spanString = AceType::MakeRefPtr<MutableSpanString>("0123456789"); in HWTEST_F() local 1051 // 1: Create UrlSpan and add to spanString in HWTEST_F() 1053 spanString->AddSpan(AceType::MakeRefPtr<UrlSpan>(address, 8, 10)); in HWTEST_F() 1055 // 2: Test subSpanString and spanString is equal in HWTEST_F() 1056 auto subSpanString = spanString->GetSubSpanString(0, 10); in HWTEST_F() 1057 EXPECT_TRUE(subSpanString->IsEqualToSpanString(spanString)); in HWTEST_F() 1060 auto firstSpans = spanString->GetSpans(8, 1); in HWTEST_F()
|
/foundation/arkui/ace_engine_lite/frameworks/src/core/components/ |
H A D | text_component.cpp | 402 SpannableString spanString(textValue_); in SetRichTextSpan() 403 spanString.SetTextStyle(stringStyleSpan_.style, in SetRichTextSpan() 406 uiLabel_.SetText(&spanString); in SetRichTextSpan()
|
/foundation/arkui/ace_engine/frameworks/core/interfaces/native/node/ |
H A D | node_api.cpp | 2100 if (descriptor->spanString) { in DestroyArkUIStyledStringDescriptor() 2101 auto* spanString = reinterpret_cast<SpanString*>(descriptor->spanString); in DestroyArkUIStyledStringDescriptor() local 2102 delete spanString; in DestroyArkUIStyledStringDescriptor() 2103 descriptor->spanString = nullptr; in DestroyArkUIStyledStringDescriptor() 2115 SpanString* spanString = new SpanString(""); in UnmarshallStyledStringDescriptor() local 2116 spanString->DecodeTlvExt(vec, spanString); in UnmarshallStyledStringDescriptor() 2117 descriptor->spanString = reinterpret_cast<void*>(spanString); in UnmarshallStyledStringDescriptor() [all...] |
/foundation/arkui/ace_engine/adapter/ohos/capability/html/ |
H A D | span_to_html.cpp | 535 std::string SpanToHtml::ToHtml(const SpanString& spanString) in ToHtml() argument 537 auto items = spanString.GetSpanItems(); in ToHtml() 581 auto spanString = SpanString::DecodeTlv(values); in ToHtml() local 582 return ToHtml(*spanString); in ToHtml()
|
H A D | span_to_html.h | 23 static std::string ToHtml(const SpanString& spanString);
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/text_input/ |
H A D | text_field_pattern_testthree.cpp | 525 RefPtr<SpanString> spanString = SpanString::DecodeTlv(info.selectBuffer); in HWTEST_F() local 526 ASSERT_NE(spanString, nullptr); in HWTEST_F() 527 auto textContent = spanString->GetString(); in HWTEST_F()
|
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/models/ |
H A D | text_model_impl.h | 30 void Create(const RefPtr<SpanStringBase>& spanString) override {}
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/web/ |
H A D | web_pattern_test_handle_ng.cpp | 640 std::vector<uint8_t> spanString; in HWTEST_F() local 642 .WillOnce(Return(spanString)); in HWTEST_F() 685 std::vector<uint8_t> spanString; in HWTEST_F() local 687 .WillOnce(Return(spanString)); in HWTEST_F() 735 std::vector<uint8_t> spanString; in HWTEST_F() local 737 .WillOnce(Return(spanString)); in HWTEST_F() 785 std::vector<uint8_t> spanString; in HWTEST_F() local 787 .WillOnce(Return(spanString)); in HWTEST_F() 830 std::vector<uint8_t> spanString = { 10, 20, 30 }; in HWTEST_F() local 832 .WillOnce(Return(spanString)); in HWTEST_F() [all...] |