equal
deleted
inserted
replaced
1040 // Find the KConfigurationElement to step over any optional xml elements |
1040 // Find the KConfigurationElement to step over any optional xml elements |
1041 ChspsDomDepthIterator* pluginIter = ChspsDomDepthIterator::NewL( *document.RootNode() ); |
1041 ChspsDomDepthIterator* pluginIter = ChspsDomDepthIterator::NewL( *document.RootNode() ); |
1042 CleanupStack::PushL( pluginIter ); |
1042 CleanupStack::PushL( pluginIter ); |
1043 ChspsDomNode* pluginNode = pluginIter->First(); |
1043 ChspsDomNode* pluginNode = pluginIter->First(); |
1044 TBool steppingtoConfNode(EFalse); |
1044 TBool steppingtoConfNode(EFalse); |
1045 while(pluginNode && !steppingtoConfNode) |
1045 while( pluginNode && !steppingtoConfNode ) |
1046 { |
1046 { |
1047 const TDesC8& pluginNodeName = pluginNode->Name(); |
1047 const TDesC8& pluginNodeName = pluginNode->Name(); |
1048 |
1048 |
1049 if( pluginNodeName == KConfigurationElement ) |
1049 if( pluginNodeName == KConfigurationElement ) |
1050 { |
1050 { |
1055 pluginNode = pluginIter->NextL(); |
1055 pluginNode = pluginIter->NextL(); |
1056 } |
1056 } |
1057 } |
1057 } |
1058 CleanupStack::PopAndDestroy( pluginIter ); |
1058 CleanupStack::PopAndDestroy( pluginIter ); |
1059 |
1059 |
1060 // Copy the plugin configuration to the main document. |
1060 if ( pluginNode ) |
1061 ChspsDomNode* rootCopy = pluginNode->CloneL( node->StringPool()); |
1061 { |
1062 rootCopy->SetParent( node ); |
1062 // Copy the plugin configuration to the main document. |
1063 node->AddChildL( rootCopy ); |
1063 ChspsDomNode* rootCopy = pluginNode->CloneL( node->StringPool()); |
|
1064 rootCopy->SetParent( node ); |
|
1065 node->AddChildL( rootCopy ); |
|
1066 } |
|
1067 else |
|
1068 { |
|
1069 // configuration is corrupted |
|
1070 User::Leave( KErrCorrupt ); |
|
1071 } |
1064 } |
1072 } |
1065 |
1073 |
1066 CleanupStack::PopAndDestroy( pluginOdt ); |
1074 CleanupStack::PopAndDestroy( pluginOdt ); |
1067 } |
1075 } |
1068 } |
1076 } |