diff --git a/frameworks/bridge/arkts_frontend/koala_projects/arkoala/framework/docs/API_STYLE.md b/frameworks/bridge/arkts_frontend/koala_projects/arkoala/framework/docs/API_STYLE.md index 43d99bf605d833806222fe1cb08bfc324f38513a..a64d5fd79ef4ccf8b9aed1008c7eed0315598cbf 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/arkoala/framework/docs/API_STYLE.md +++ b/frameworks/bridge/arkts_frontend/koala_projects/arkoala/framework/docs/API_STYLE.md @@ -37,7 +37,7 @@ extern "C" DLL_EXPORT const ArkUIAnyAPI *GetArkUIAPI(int kind, int version); ArkUIAPI1* api1 = GetArkUIAPI(1, 5); if (api1) api1->op1(16); -// Find API 1, version 3. +// Find API 2, version 3. ArkUIAPI2* api2 = GetArkUIAPI(2, 3); if (api2) api2->op2(1, 2); ``` diff --git a/frameworks/bridge/arkts_frontend/koala_projects/interop/src/cpp/types/koala-types.h b/frameworks/bridge/arkts_frontend/koala_projects/interop/src/cpp/types/koala-types.h index 10300129515a8dfcecfd2098679585480f6f54b2..003bb2b3f6a95f13877fc23c02d67f073b3fadd1 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/interop/src/cpp/types/koala-types.h +++ b/frameworks/bridge/arkts_frontend/koala_projects/interop/src/cpp/types/koala-types.h @@ -154,16 +154,18 @@ struct KInteropNumber { return result; } inline double asDouble() { - if (tag == INTEROP_TAG_INT32) - return (double)i32; - else - return (double)f32; + if (tag == INTEROP_TAG_INT32) { + return (double)i32; + } else { + return (double)f32; + } } inline int32_t asInt32() { - if (tag == INTEROP_TAG_INT32) - return i32; - else - return (int32_t)f32; + if (tag == INTEROP_TAG_INT32) { + return i32; + } else { + return (int32_t)f32; + } } }; diff --git a/frameworks/bridge/arkts_frontend/koala_projects/interop/src/cpp/types/signatures.cc b/frameworks/bridge/arkts_frontend/koala_projects/interop/src/cpp/types/signatures.cc index 3750c592b742986acc3d1cc3f64691c1a28851f7..7f36c49afbd41ba2c7ce7945171287eedd0238ba 100644 --- a/frameworks/bridge/arkts_frontend/koala_projects/interop/src/cpp/types/signatures.cc +++ b/frameworks/bridge/arkts_frontend/koala_projects/interop/src/cpp/types/signatures.cc @@ -22,8 +22,16 @@ // For types with the same name on ets and jni #define KOALA_INTEROP_TYPEDEF(func, lang, CPP_TYPE, SIG_TYPE, CODE_TYPE) \ - if (std::strcmp(func, "sigType") == 0) if (type == CPP_TYPE) return SIG_TYPE; \ - if (std::strcmp(func, "codeType") == 0) if (type == CPP_TYPE) return CODE_TYPE; + if (std::strcmp(func, "sigType") == 0) { \ + if (type == CPP_TYPE) { \ + return SIG_TYPE; \ + } \ + } \ + if (std::strcmp(func, "codeType") == 0) { \ + if (type == CPP_TYPE) { \ + return CODE_TYPE; \ + } \ + } // For types with distinct names on ets and jni #define KOALA_INTEROP_TYPEDEF_LS(func, lang, CPP_TYPE, ETS_SIG_TYPE, ETS_CODE_TYPE, JNI_SIG_TYPE, JNI_CODE_TYPE) \ diff --git a/frameworks/core/components_ng/pattern/search/search_model_static.h b/frameworks/core/components_ng/pattern/search/search_model_static.h index 67a06074948ab6a8ab6b598e80b028a2faf1afbe..5a84595a0978a4f79e0eb88d3ed682ed01ea20a5 100644 --- a/frameworks/core/components_ng/pattern/search/search_model_static.h +++ b/frameworks/core/components_ng/pattern/search/search_model_static.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2025 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/frameworks/core/components_ng/pattern/symbol/symbol_model_static.cpp b/frameworks/core/components_ng/pattern/symbol/symbol_model_static.cpp index 264bf90e4a1eac58bd68690c7c978468bed2e6a3..f997940fcfae5cf536a140f087de26a363226bfa 100644 --- a/frameworks/core/components_ng/pattern/symbol/symbol_model_static.cpp +++ b/frameworks/core/components_ng/pattern/symbol/symbol_model_static.cpp @@ -13,9 +13,10 @@ * limitations under the License. */ +#include "core/components_ng/pattern/symbol/symbol_model_static.h" + #include "base/utils/utils.h" #include "core/components_ng/pattern/symbol/symbol_model_ng.h" -#include "core/components_ng/pattern/symbol/symbol_model_static.h" #include "core/components_ng/pattern/text/text_pattern.h" namespace OHOS::Ace::NG { diff --git a/frameworks/core/components_ng/pattern/symbol/symbol_model_static.h b/frameworks/core/components_ng/pattern/symbol/symbol_model_static.h index fcfdf199dbd06fe1cab6235e32a4f5c6c32296b5..af64d8044db9d1ddfb153efeec8b195a73807ba5 100644 --- a/frameworks/core/components_ng/pattern/symbol/symbol_model_static.h +++ b/frameworks/core/components_ng/pattern/symbol/symbol_model_static.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * Copyright (c) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/frameworks/core/interfaces/native/utility/converter.h b/frameworks/core/interfaces/native/utility/converter.h index 9f028fbb71be350c86f6aa4dece8938c934363ec..8432504d8ca44abead67cf879eef98c6c87dcd36 100644 --- a/frameworks/core/interfaces/native/utility/converter.h +++ b/frameworks/core/interfaces/native/utility/converter.h @@ -265,7 +265,7 @@ namespace Converter { template<> inline long Convert(const Ark_Number& src) { - LOGE("Ark_Number doesn`t support long type"); + LOGW("Ark_Number doesn`t support long type"); return static_cast(Convert(src)); } @@ -278,7 +278,7 @@ namespace Converter { template<> inline double Convert(const Ark_Number& src) { - LOGE("Ark_Number doesn`t support double type"); + LOGW("Ark_Number doesn`t support double type"); return src.tag == INTEROP_TAG_FLOAT32 ? static_cast(src.f32) : static_cast(src.i32); } @@ -327,7 +327,7 @@ namespace Converter { template<> inline ImageSourceInfo Convert(const Ark_DrawableDescriptor& value) { - LOGE("Convert [Ark_DrawableDescriptor] to [ImageSourceInfo] is not supported"); + LOGW("Convert [Ark_DrawableDescriptor] to [ImageSourceInfo] is not supported"); return ImageSourceInfo(); } @@ -345,7 +345,7 @@ namespace Converter { template<> inline ImageSourceInfo Convert(const Ark_LinearGradient_common& value) { - LOGE("Convert [Ark_LinearGradient] to [ImageSourceInfo] is not supported"); + LOGW("Convert [Ark_LinearGradient] to [ImageSourceInfo] is not supported"); return ImageSourceInfo(); } @@ -400,19 +400,19 @@ namespace Converter { template<> inline void AssignCast(std::optional& dst, const Ark_CustomObject& src) { - LOGE("ARKOALA Converter Ark_CustomObject -> Dimension is not implemented."); + LOGW("ARKOALA Converter Ark_CustomObject -> Dimension is not implemented."); } template<> inline void AssignCast(std::optional& dst, const Ark_Resource& src) { - LOGE("ARKOALA Converter -> Resource support (String) is not implemented."); + LOGW("ARKOALA Converter -> Resource support (String) is not implemented."); } template<> inline void AssignCast(std::optional& dst, const Ark_ColoringStrategy& src) { - LOGE("ARKOALA Converter Ark_ColoringStrategy -> Color is not implemented."); + LOGW("ARKOALA Converter Ark_ColoringStrategy -> Color is not implemented."); } template<> diff --git a/frameworks/core/interfaces/native/utility/reverse_converter_enums.cpp b/frameworks/core/interfaces/native/utility/reverse_converter_enums.cpp index df04098d919fc3df17ffe46ba7e756708e185dc7..3dba48db7fde162096b993ccc5b176429169a9f1 100644 --- a/frameworks/core/interfaces/native/utility/reverse_converter_enums.cpp +++ b/frameworks/core/interfaces/native/utility/reverse_converter_enums.cpp @@ -32,7 +32,7 @@ void AssignArkValue(Ark_AccessibilityHoverType& dst, const AccessibilityHoverAct case AccessibilityHoverAction::HOVER_CANCEL: dst = ARK_ACCESSIBILITY_HOVER_TYPE_HOVER_CANCEL; break; default: dst = static_cast(-1); - LOGE("Unexpected enum value in Ark_AccessibilityHoverType: %{public}d", src); + LOGW("Unexpected enum value in Ark_AccessibilityHoverType: %{public}d", src); break; } }