aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/TextHostControlService.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-02-21 18:44:40 +0800
committercrupest <crupest@outlook.com>2022-02-21 18:44:40 +0800
commitced1a63686e6c64cb574d74a34d1bbd07d0a668e (patch)
tree4082e4689e5e7cede8d59a0538d0f1ae37064acb /src/ui/controls/TextHostControlService.cpp
parent6b00fca7c662301bf657a99cb1e89f21541a46bc (diff)
downloadcru-ced1a63686e6c64cb574d74a34d1bbd07d0a668e.tar.gz
cru-ced1a63686e6c64cb574d74a34d1bbd07d0a668e.tar.bz2
cru-ced1a63686e6c64cb574d74a34d1bbd07d0a668e.zip
...
Diffstat (limited to 'src/ui/controls/TextHostControlService.cpp')
-rw-r--r--src/ui/controls/TextHostControlService.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/controls/TextHostControlService.cpp b/src/ui/controls/TextHostControlService.cpp
index 81365a8b..15d9102c 100644
--- a/src/ui/controls/TextHostControlService.cpp
+++ b/src/ui/controls/TextHostControlService.cpp
@@ -2,7 +2,7 @@
#include "../Helper.h"
#include "cru/common/Base.h"
-#include "cru/common/Logger.h"
+#include "cru/common/log/Logger.h"
#include "cru/common/String.h"
#include "cru/common/StringUtil.h"
#include "cru/platform/graphics/Font.h"
@@ -226,7 +226,7 @@ void TextHostControlService::SetText(String text, bool stop_composition) {
void TextHostControlService::InsertText(gsl::index position, StringView text,
bool stop_composition) {
if (!Utf16IsValidInsertPosition(this->text_, position)) {
- log::TagError(log_tag, u"Invalid text insert position.");
+ CRU_LOG_ERROR(u"Invalid text insert position.");
return;
}
this->text_.insert(this->text_.cbegin() + position, text);
@@ -240,7 +240,7 @@ void TextHostControlService::InsertText(gsl::index position, StringView text,
void TextHostControlService::DeleteChar(gsl::index position,
bool stop_composition) {
if (!Utf16IsValidInsertPosition(this->text_, position)) {
- log::TagError(log_tag, u"Invalid text delete position.");
+ CRU_LOG_ERROR(u"Invalid text delete position.");
return;
}
if (position == static_cast<gsl::index>(this->text_.size())) return;
@@ -253,7 +253,7 @@ void TextHostControlService::DeleteChar(gsl::index position,
gsl::index TextHostControlService::DeleteCharPrevious(gsl::index position,
bool stop_composition) {
if (!Utf16IsValidInsertPosition(this->text_, position)) {
- log::TagError(log_tag, u"Invalid text delete position.");
+ CRU_LOG_ERROR(u"Invalid text delete position.");
return 0;
}
if (position == 0) return 0;
@@ -269,11 +269,11 @@ void TextHostControlService::DeleteText(TextRange range,
if (range.count == 0) return;
range = range.Normalize();
if (!Utf16IsValidInsertPosition(this->text_, range.GetStart())) {
- log::TagError(log_tag, u"Invalid text delete start position.");
+ CRU_LOG_ERROR(u"Invalid text delete start position.");
return;
}
if (!Utf16IsValidInsertPosition(this->text_, range.GetStart())) {
- log::TagError(log_tag, u"Invalid text delete end position.");
+ CRU_LOG_ERROR(u"Invalid text delete end position.");
return;
}
this->text_.erase(this->text_.cbegin() + range.GetStart(),
@@ -465,7 +465,7 @@ void TextHostControlService::UpdateInputMethodPosition() {
right_bottom.y += 5;
if constexpr (debug_flags::text_service) {
- log::TagDebug(log_tag,
+ CRU_LOG_DEBUG(
u"Calculate input method candidate window position: {}.",
right_bottom);
}