3062 { |
3062 { |
3063 CXnProperty* pathProperty = aNode.BorderImageL(); |
3063 CXnProperty* pathProperty = aNode.BorderImageL(); |
3064 CFbsBitmap* returnValue = NULL; |
3064 CFbsBitmap* returnValue = NULL; |
3065 CFbsBitmap* bitmapMask = NULL; |
3065 CFbsBitmap* bitmapMask = NULL; |
3066 |
3066 |
|
3067 if ( !pathProperty ) |
|
3068 { |
|
3069 return NULL; |
|
3070 } |
|
3071 |
3067 CXnDomList& propertyValueList = pathProperty->Property()->PropertyValueList(); |
3072 CXnDomList& propertyValueList = pathProperty->Property()->PropertyValueList(); |
3068 TInt count = propertyValueList.Length(); |
3073 TInt count = propertyValueList.Length(); |
3069 |
3074 |
3070 for ( TInt i = 0; i < propertyValueList.Length(); ++i ) |
3075 for ( TInt i = 0; i < count; ++i ) |
3071 { |
3076 { |
3072 CXnDomPropertyValue* value = static_cast< CXnDomPropertyValue* >( |
3077 CXnDomPropertyValue* value = static_cast< CXnDomPropertyValue* >( |
3073 propertyValueList.Item( i ) ); |
3078 propertyValueList.Item( i ) ); |
3074 |
3079 |
3075 if ( value->PrimitiveValueType() == CXnDomPropertyValue::EUri ) |
3080 if ( value->PrimitiveValueType() == CXnDomPropertyValue::EUri ) |
3091 |
3096 |
3092 CleanupStack::PopAndDestroy( utfPath ); |
3097 CleanupStack::PopAndDestroy( utfPath ); |
3093 } |
3098 } |
3094 else if ( value->PrimitiveValueType() == CXnDomPropertyValue::EPercentage ) |
3099 else if ( value->PrimitiveValueType() == CXnDomPropertyValue::EPercentage ) |
3095 { |
3100 { |
3096 CXnDomPropertyValue* tmpValue = NULL; |
3101 if ( returnValue ) |
3097 tmpValue = value->CloneL(); |
3102 { |
3098 CXnProperty* tmpProperty = NULL; |
3103 CXnDomPropertyValue* tmpValue = NULL; |
3099 CleanupStack::PushL( tmpValue ); |
3104 tmpValue = value->CloneL(); |
3100 tmpProperty = CXnProperty::NewL( |
3105 CXnProperty* tmpProperty = NULL; |
3101 KNullDesC8, |
3106 CleanupStack::PushL( tmpValue ); |
3102 tmpValue, |
3107 tmpProperty = CXnProperty::NewL( |
3103 aNode.UiEngine()->ODT()->DomDocument().StringPool() ); |
3108 KNullDesC8, |
3104 CleanupStack::Pop( tmpValue ); |
3109 tmpValue, |
3105 TSize imageSize = returnValue->SizeInPixels(); |
3110 aNode.UiEngine()->ODT()->DomDocument().StringPool() ); |
3106 CleanupStack::PushL( tmpProperty ); |
3111 CleanupStack::Pop( tmpValue ); |
3107 TInt intValue = static_cast< TInt >( value->FloatValueL() ); |
3112 TSize imageSize = returnValue->SizeInPixels(); |
3108 TInt dividerValue = 0; |
3113 CleanupStack::PushL( tmpProperty ); |
3109 |
3114 TInt intValue = static_cast< TInt >( value->FloatValueL() ); |
3110 switch ( i ) |
3115 TInt dividerValue = 0; |
3111 { |
3116 |
3112 case 1: |
3117 switch ( i ) |
3113 { |
3118 { |
3114 dividerValue = aNode.UiEngine()->VerticalPixelValueL( |
3119 case 1: |
3115 tmpProperty, imageSize.iHeight ); |
3120 { |
3116 aBorderBitmapDividerTop = dividerValue; |
3121 dividerValue = aNode.UiEngine()->VerticalPixelValueL( |
3117 break; |
3122 tmpProperty, imageSize.iHeight ); |
|
3123 aBorderBitmapDividerTop = dividerValue; |
|
3124 break; |
|
3125 } |
|
3126 case 2: |
|
3127 { |
|
3128 dividerValue = aNode.UiEngine()->HorizontalPixelValueL( |
|
3129 tmpProperty, imageSize.iWidth ); |
|
3130 aBorderBitmapDividerRight = dividerValue; |
|
3131 break; |
|
3132 } |
|
3133 case 3: |
|
3134 { |
|
3135 dividerValue = aNode.UiEngine()->VerticalPixelValueL( |
|
3136 tmpProperty, imageSize.iHeight ); |
|
3137 aBorderBitmapDividerBottom = dividerValue; |
|
3138 break; |
|
3139 } |
|
3140 case 4: |
|
3141 { |
|
3142 dividerValue = aNode.UiEngine()->HorizontalPixelValueL( |
|
3143 tmpProperty, imageSize.iWidth ); |
|
3144 aBorderBitmapDividerLeft = dividerValue; |
|
3145 break; |
|
3146 } |
3118 } |
3147 } |
3119 case 2: |
3148 |
3120 { |
3149 CleanupStack::PopAndDestroy( tmpProperty ); |
3121 dividerValue = aNode.UiEngine()->HorizontalPixelValueL( |
3150 } |
3122 tmpProperty, imageSize.iWidth ); |
|
3123 aBorderBitmapDividerRight = dividerValue; |
|
3124 break; |
|
3125 } |
|
3126 case 3: |
|
3127 { |
|
3128 dividerValue = aNode.UiEngine()->VerticalPixelValueL( |
|
3129 tmpProperty, imageSize.iHeight ); |
|
3130 aBorderBitmapDividerBottom = dividerValue; |
|
3131 break; |
|
3132 } |
|
3133 case 4: |
|
3134 { |
|
3135 dividerValue = aNode.UiEngine()->HorizontalPixelValueL( |
|
3136 tmpProperty, imageSize.iWidth ); |
|
3137 aBorderBitmapDividerLeft = dividerValue; |
|
3138 break; |
|
3139 } |
|
3140 } |
|
3141 |
|
3142 CleanupStack::PopAndDestroy( tmpProperty ); |
|
3143 } |
3151 } |
3144 else if ( value->PrimitiveValueType() == CXnDomPropertyValue::EString || |
3152 else if ( value->PrimitiveValueType() == CXnDomPropertyValue::EString || |
3145 value->PrimitiveValueType() == CXnDomPropertyValue::EIdent ) |
3153 value->PrimitiveValueType() == CXnDomPropertyValue::EIdent ) |
3146 { |
3154 { |
3147 } |
3155 } |