diff --git a/frameworks/inputmethod_controller/src/input_method_controller.cpp b/frameworks/inputmethod_controller/src/input_method_controller.cpp index c477697..6c2087c 100644 --- a/frameworks/inputmethod_controller/src/input_method_controller.cpp +++ b/frameworks/inputmethod_controller/src/input_method_controller.cpp @@ -295,7 +295,8 @@ using namespace MessageID; return; } - if (cursorInfo_.left == cursorInfo.left && cursorInfo_.top == cursorInfo.top && cursorInfo_.height == cursorInfo.height) { + if (cursorInfo_.left == cursorInfo.left && cursorInfo_.top == cursorInfo.top + && cursorInfo_.height == cursorInfo.height) { return; } cursorInfo_ = cursorInfo; diff --git a/interfaces/kits/js/napi/src/js_input_method_engine.cpp b/interfaces/kits/js/napi/src/js_input_method_engine.cpp index efaed8a..6b4261a 100644 --- a/interfaces/kits/js/napi/src/js_input_method_engine.cpp +++ b/interfaces/kits/js/napi/src/js_input_method_engine.cpp @@ -121,7 +121,7 @@ namespace MiscServices { NativeValue* nativeString = nullptr; nativeString = info.argv[ARGC_ZERO]; - std::string textString; + std::string textString; if (!AbilityRuntime::ConvertFromJsValue(engine, nativeString, textString)) { IMSA_HILOGI("JsInputMethodEngine::OnInsertText Failed to convert parameter to string"); return engine.CreateUndefined(); @@ -146,7 +146,7 @@ namespace MiscServices { nativeString = info.argv[ARGC_ZERO]; int32_t number; - if(!AbilityRuntime::ConvertFromJsValue(engine, nativeString, number)) { + if (!AbilityRuntime::ConvertFromJsValue(engine, nativeString, number)) { IMSA_HILOGI("JsInputMethodEngine::OnDeleteForward Failed to convert parameter to string"); return engine.CreateUndefined(); } @@ -339,7 +339,7 @@ NativeValue* JsInputMethodEngineInit(NativeEngine* engine, NativeValue* exportOb AbilityRuntime::BindNativeFunction(*engine, *object, "MoveCursor", JsInputMethodEngine::MoveCursor); AbilityRuntime::BindNativeFunction(*engine, *object, "HideKeyboardSelf", JsInputMethodEngine::HideKeyboardSelf); AbilityRuntime::BindNativeFunction(*engine, *object, "GetTextBeforeCursor", - JsInputMethodEngine::GetTextBeforeCursor); + JsInputMethodEngine::GetTextBeforeCursor); AbilityRuntime::BindNativeFunction(*engine, *object, "GetTextAfterCursor", JsInputMethodEngine::GetTextAfterCursor); AbilityRuntime::BindNativeFunction(*engine, *object, "SendFunctionKey", JsInputMethodEngine::SendFunctionKey); diff --git a/interfaces/kits/js/napi/src/js_input_method_engine_listener.cpp b/interfaces/kits/js/napi/src/js_input_method_engine_listener.cpp index 71dec2b..70bd8c6 100644 --- a/interfaces/kits/js/napi/src/js_input_method_engine_listener.cpp +++ b/interfaces/kits/js/napi/src/js_input_method_engine_listener.cpp @@ -18,7 +18,8 @@ namespace OHOS { namespace MiscServices { - void JsInputMethodEngineListener::RegisterListenerWithType(NativeEngine& engine, std::string type, NativeValue* value) + void JsInputMethodEngineListener::RegisterListenerWithType(NativeEngine& engine, + std::string type, NativeValue* value) { // should do type check if (IfCallbackRegistered(type, value)) { diff --git a/unitest/src/input_method_ability_test.cpp b/unitest/src/input_method_ability_test.cpp index 7e5fff1..2dc3860 100644 --- a/unitest/src/input_method_ability_test.cpp +++ b/unitest/src/input_method_ability_test.cpp @@ -20,7 +20,6 @@ #include #include #include "global.h" -#include "input_method_ability.h" #include "input_method_agent_stub.h" #include "input_method_core_stub.h" #include "input_control_channel_stub.h"