r126 - trunk/doc

jls17 at arinside.org jls17 at arinside.org
Sun Feb 14 15:10:42 CST 2010


Author: jls17
Date: Sun Feb 14 15:10:41 2010
New Revision: 126
URL: http://arinside.org/changeset/126

Log:
bugfix: keywords in server, schema and vui fields of open-window-actions were not resolved correctly; fixed #84;

Modified:
   trunk/doc/DocAlActionStruct.cpp
   trunk/doc/DocSchemaDetails.cpp
   trunk/doc/DocSchemaDetails.h

Modified: trunk/doc/DocAlActionStruct.cpp
==============================================================================
--- trunk/doc/DocAlActionStruct.cpp	Tue Feb  2 10:43:06 2010	(r125)
+++ trunk/doc/DocAlActionStruct.cpp	Sun Feb 14 15:10:41 2010	(r126)
@@ -1016,7 +1016,7 @@
 		if(action.serverName[0] == '$' && !openWindowServer.empty())
 		{
 			int fieldId = atoi(&action.serverName[1]);
-			strm << "$" << (fieldId < 0 ? CAREnum::Keyword(fieldId) : arIn->LinkToField(schemaInsideId, fieldId, rootLevel)) << "$ (Sample Server: " << arIn->LinkToServerInfo(openWindowServer, rootLevel) << ")";
+			strm << "$" << (fieldId < 0 ? CAREnum::Keyword(abs(fieldId)) : arIn->LinkToField(schemaInsideId, fieldId, rootLevel)) << "$ (Sample Server: " << arIn->LinkToServerInfo(openWindowServer, rootLevel) << ")";
 
 			if (fieldId > 0)
 			{
@@ -1037,7 +1037,7 @@
 		if (action.schemaName[0] == '$')
 		{
 			int fieldId = atoi(&action.schemaName[1]);
-			strm << "$" << (fieldId < 0 ? CAREnum::Keyword(fieldId) : arIn->LinkToField(schemaInsideId, fieldId, rootLevel)) << "$ (Sample Schema: " << arIn->LinkToSchema(openWindowSchema, rootLevel) << ")";
+			strm << "$" << (fieldId < 0 ? CAREnum::Keyword(abs(fieldId)) : arIn->LinkToField(schemaInsideId, fieldId, rootLevel)) << "$ (Sample Schema: " << arIn->LinkToSchema(openWindowSchema, rootLevel) << ")";
 
 			if (fieldId > 0)
 			{
@@ -1058,7 +1058,7 @@
 		if(action.vuiLabel[0] == '$')// == NULL || strcmp(action.vuiLabel, "")==0)
 		{
 			int fieldId = atoi(&action.vuiLabel[1]);
-			strm << "$" << (fieldId < 0 ? CAREnum::Keyword(fieldId) : arIn->LinkToField(schemaInsideId, fieldId, rootLevel)) << "$";
+			strm << "$" << (fieldId < 0 ? CAREnum::Keyword(abs(fieldId)) : arIn->LinkToField(schemaInsideId, fieldId, rootLevel)) << "$";
 
 			if (fieldId > 0)
 			{

Modified: trunk/doc/DocSchemaDetails.cpp
==============================================================================
--- trunk/doc/DocSchemaDetails.cpp	Tue Feb  2 10:43:06 2010	(r125)
+++ trunk/doc/DocSchemaDetails.cpp	Sun Feb 14 15:10:41 2010	(r126)
@@ -562,6 +562,21 @@
 	return false;
 }
 
+bool CDocSchemaDetails::IsSchemaInWFConnectStruct(const ARWorkflowConnectStruct& wfCS)
+{
+	if (wfCS.type == AR_WORKFLOW_CONN_SCHEMA_LIST && wfCS.u.schemaList != NULL)
+	{
+		for (unsigned int connectIndex = 0; connectIndex < wfCS.u.schemaList->numItems; ++connectIndex)
+		{
+			if (pSchema->name.compare(wfCS.u.schemaList->nameList[connectIndex]) == 0)
+			{
+				return true;
+			}
+		}
+	}
+	return false;
+}
+
 CTableRow CDocSchemaDetails::UniqueTblRow(string listItemName, int itemType)
 {			
 	CTableRow row("cssStdRow");		
@@ -1478,7 +1493,7 @@
 						else
 							pushSchema = action.pushFieldsList.pushFieldsList[0].field.schema;
 
-						if (pushSchema[0] == '@' || pSchema->name.compare(pushSchema) == 0)
+						if ((pushSchema[0] == '@' && IsSchemaInWFConnectStruct(al->schemaList)) || pSchema->name.compare(pushSchema) == 0)
 						{
 							bPushToForm = true;
 							break;
@@ -1504,7 +1519,7 @@
 							else
 								pushSchema = action.pushFieldsList.pushFieldsList[0].field.schema;
 
-							if (pushSchema[0] == '@' || pSchema->name.compare(pushSchema) == 0)
+							if ((pushSchema[0] == '@' && IsSchemaInWFConnectStruct(al->schemaList)) || pSchema->name.compare(pushSchema) == 0)
 							{
 								bPushToForm = true;
 								break;
@@ -1567,11 +1582,12 @@
 					else
 						openWindowSchema = action.schemaName;
 
-					if (!openWindowSchema.empty() && openWindowSchema.compare(AR_CURRENT_SCHEMA_TAG) == 0)
-						openWindowSchema.clear();
-
-					if(!openWindowSchema.empty() && openWindowSchema.compare(pSchema->name) == 0)
+					if ((openWindowSchema.compare(AR_CURRENT_SCHEMA_TAG) == 0 /*&& IsSchemaInWFConnectStruct(al->schemaList)*/) ||
+						openWindowSchema.compare(pSchema->name) == 0)
+					{
 						bPushToForm = true;
+						break;
+					}
 				}
 			}	
 
@@ -1593,11 +1609,12 @@
 						else
 							openWindowSchema = action.schemaName;
 
-						if (openWindowSchema.compare(AR_CURRENT_SCHEMA_TAG) == 0)
-							openWindowSchema.clear();
-
-						if(!openWindowSchema.empty() && openWindowSchema.compare(pSchema->name) == 0)
+						if ((openWindowSchema.compare(AR_CURRENT_SCHEMA_TAG) == 0 /*&& IsSchemaInWFConnectStruct(al->schemaList)*/) ||
+						openWindowSchema.compare(pSchema->name) == 0)
+						{
 							bPushToForm = true;
+							break;
+						}
 					}
 				}
 			}
@@ -1654,7 +1671,7 @@
 						else
 							pushSchema = action.pushFieldsList.pushFieldsList[0].field.schema;
 
-						if (pushSchema[0] == '@' || pSchema->name.compare(pushSchema) == 0)
+						if ((pushSchema[0] == '@' && IsSchemaInWFConnectStruct(filter->schemaList)) || pSchema->name.compare(pushSchema) == 0)
 						{
 							bPushToForm = true;
 							break;
@@ -1680,7 +1697,7 @@
 							else
 								pushSchema = action.pushFieldsList.pushFieldsList[0].field.schema;
 
-							if (pushSchema[0] == '@' || pSchema->name.compare(pushSchema) == 0)
+							if ((pushSchema[0] == '@' && IsSchemaInWFConnectStruct(filter->schemaList)) || pSchema->name.compare(pushSchema) == 0)
 							{
 								bPushToForm = true;
 								break;

Modified: trunk/doc/DocSchemaDetails.h
==============================================================================
--- trunk/doc/DocSchemaDetails.h	Tue Feb  2 10:43:06 2010	(r125)
+++ trunk/doc/DocSchemaDetails.h	Sun Feb 14 15:10:41 2010	(r126)
@@ -74,6 +74,7 @@
 	bool InAlList(string objName);
 	bool InFilterList(string objName);
 	bool InEscalList(string objName);
+	bool IsSchemaInWFConnectStruct(const ARWorkflowConnectStruct& wfCS);
 	list<string> uniqueAlList;
 	list<string> uniqueFilterList;
 	list<string> uniqueEscalList;


More information about the arinside-src mailing list