diff -r d6dafc5d983f -r 1627c337e51e javauis/m2g_qt/src/jni/M2GSVGAnimationElement.cpp --- a/javauis/m2g_qt/src/jni/M2GSVGAnimationElement.cpp Fri Oct 15 12:29:39 2010 +0300 +++ b/javauis/m2g_qt/src/jni/M2GSVGAnimationElement.cpp Fri Oct 29 11:49:32 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -65,43 +65,43 @@ { M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGAnimationElement ) _beginElementAt - begin"); TInt err = KM2GNotOk; - + if (aSvgProxyHandle && aDocumentHandle) + { + MM2GSVGProxy* aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle); + TInt16 restartAttribute; + + TRAP(err, aProxy->GetEnumTraitL( + STATIC_CAST(TM2GSvgElementHandle, aElementHandle), + STATIC_CAST(TM2GSvgAttrType, KM2GRestartAttribute), + restartAttribute); + ) + + TInt isActive; + TRAP(err, aProxy->IsActiveL(STATIC_CAST(TM2GSvgElementHandle, aElementHandle), isActive);) + + if (isActive && (restartAttribute == KM2GRestartWhenNotActive)) { - MM2GSVGProxy* aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle); - TInt16 restartAttribute; - - TRAP(err, aProxy->GetEnumTraitL( - STATIC_CAST(TM2GSvgElementHandle, aElementHandle), - STATIC_CAST(TM2GSvgAttrType, KM2GRestartAttribute), - restartAttribute); - ) - - TInt isActive; - TRAP(err, aProxy->IsActiveL(STATIC_CAST(TM2GSvgElementHandle, aElementHandle), isActive); ) - - if (isActive && (restartAttribute == KM2GRestartWhenNotActive)) - { - M2G_DEBUG_1("M2G_DEBUG: M2GSVGAnimationElement::DoBeginElementAtL() - active & restart att:%d", restartAttribute); - } - else if ((aCurrentTime != 0) && (restartAttribute == KM2GRestartNever)) - { - // Cannot restart even if animation hasn't ended? - M2G_DEBUG_1("M2G_DEBUG: M2GSVGAnimationElement::DoBeginElementAtL() - not active & restart att:%d", restartAttribute); - } - else - { - M2G_DEBUG_2("M2G_DEBUG: M2GSVGAnimationElement::DoBeginElementAtL() - offset:%f & current:%f", aOffset, aCurrentTime); - TRAP(err, aProxy->BeginElementAtL( - STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle), - STATIC_CAST(TM2GSvgElementHandle, aElementHandle), - (aOffset+aCurrentTime) ); - ) - } + M2G_DEBUG_1("M2G_DEBUG: M2GSVGAnimationElement::DoBeginElementAtL() - active & restart att:%d", restartAttribute); + } + else if ((aCurrentTime != 0) && (restartAttribute == KM2GRestartNever)) + { + // Cannot restart even if animation hasn't ended? + M2G_DEBUG_1("M2G_DEBUG: M2GSVGAnimationElement::DoBeginElementAtL() - not active & restart att:%d", restartAttribute); } + else + { + M2G_DEBUG_2("M2G_DEBUG: M2GSVGAnimationElement::DoBeginElementAtL() - offset:%f & current:%f", aOffset, aCurrentTime); + TRAP(err, aProxy->BeginElementAtL( + STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle), + STATIC_CAST(TM2GSvgElementHandle, aElementHandle), + (aOffset+aCurrentTime)); + ) + } + } M2GGeneral::CheckErrorCode(aJni, err); M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGAnimationElement ) _beginElementAt - end"); - + } // ----------------------------------------------------------------------------- // Java_com_nokia_microedition_m2g_M2GSVGAnimationElement::_endElementAt @@ -125,13 +125,13 @@ { M2G_DEBUG_0("M2G_DEBUG: JNI ( M2GSVGAnimationElement ) _endElementAt - begin"); TInt err = KM2GNotOk; - + MM2GSVGProxy* aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle); - + TRAP(err, aProxy->EndElementAtL(STATIC_CAST(TM2GSvgDocumentHandle, aDocumentHandle), - STATIC_CAST(TM2GSvgElementHandle, aElementHandle), - aOffset); - ) + STATIC_CAST(TM2GSvgElementHandle, aElementHandle), + aOffset); + ) M2GGeneral::CheckErrorCode(aJni, err); @@ -159,12 +159,12 @@ TInt err = KM2GNotOk; TInt active = 0; MM2GSVGProxy* aProxy = JavaUnhand< MM2GSVGProxy >(aSvgProxyHandle); - + TRAP(err, aProxy->IsActiveL( - STATIC_CAST(TM2GSvgElementHandle, aElementHandle), - active); + STATIC_CAST(TM2GSvgElementHandle, aElementHandle), + active); ) - + M2GGeneral::CheckErrorCode(aJni, err); M2G_DEBUG_1("M2G_DEBUG: JNI ( M2GSVGAnimationElement ) _isActive: %d - end", active); return STATIC_CAST(jboolean, (active == 1 ? ETrue : EFalse));