[mapguide-commits] r7265 - in sandbox/adsk/2.5k: . Common/CoordinateSystem

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Dec 13 03:57:05 PST 2012


Author: baertelchen
Date: 2012-12-13 03:57:05 -0800 (Thu, 13 Dec 2012)
New Revision: 7265

Modified:
   sandbox/adsk/2.5k/
   sandbox/adsk/2.5k/Common/CoordinateSystem/
   sandbox/adsk/2.5k/Common/CoordinateSystem/CoordSysCategoryDictionary.cpp
Log:
Fix "Remove redundant call to CS-Map's CSupdCategories() function in MgCoordinateSystemCategoryDictionary::Remove" (as part of RFC 127)

This is a merge of changeset 7264.

I've changed CS-Map's [CS_ctdel()] function to write all content into the CSD file. That is, calling CSupdCategories(NULL) isn't required anymore.

I've also fixed another problem in [MgCoordinateSystemCategoryDictionary::Modify] which got modified due to RFC127. An category which got updated a 2nd time got actually never written to disk. Instead, the code basically picked the category definition from CSMAP and then did write that one again - instead of taking the category instance that was passed to [MgCoordinateSystemCategoryDictionary::Modify].

Changes reviewed by Hugues.


Property changes on: sandbox/adsk/2.5k
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/sandbox/rfc94:5099-5163
/trunk/MgDev:7190-7200,7207,7235
   + /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/sandbox/rfc94:5099-5163
/trunk/MgDev:7190-7200,7207,7235,7264


Property changes on: sandbox/adsk/2.5k/Common/CoordinateSystem
___________________________________________________________________
Deleted: svn:mergeinfo
   - /branches/2.4/MgDev/Common/CoordinateSystem:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/sandbox/rfc94/Common/CoordinateSystem:5099-5163
/trunk/MgDev/Common/CoordinateSystem:7190-7200,7207,7235

Modified: sandbox/adsk/2.5k/Common/CoordinateSystem/CoordSysCategoryDictionary.cpp
===================================================================
--- sandbox/adsk/2.5k/Common/CoordinateSystem/CoordSysCategoryDictionary.cpp	2012-12-13 11:43:53 UTC (rev 7264)
+++ sandbox/adsk/2.5k/Common/CoordinateSystem/CoordSysCategoryDictionary.cpp	2012-12-13 11:57:05 UTC (rev 7265)
@@ -375,14 +375,6 @@
         throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemCategoryDictionary.Remove", __LINE__, __WFILE__, &arguments, L"MgCoordinateSystemInternalException", NULL);
     }
 
-    int updateCategoriesResult = CSupdCategories(NULL);
-    if (updateCategoriesResult)
-    {
-        MgStringCollection arguments;
-        arguments.Add(sName);
-        throw new MgCoordinateSystemInitializationFailedException(L"MgCoordinateSystemCategoryDictionary.Remove", __LINE__, __WFILE__, &arguments, L"MgCoordinateSystemInternalException", NULL);
-    }
-
     long position = iter->second;
     CCategoryName const& categoryName = List().at(position);
     if (0 != CS_stricmp(categoryName.Name(), pName)) //is the category name at the index what we think it is?
@@ -454,15 +446,8 @@
 
         invalidIndexOnFailure = true;
 
-        pCategory = CS_ctdef(pName);
-        if (NULL == pCategory)
-        {
-            MgStringCollection arguments;
-            arguments.Add(str);
-            throw new MgCoordinateSystemLoadFailedException(L"MgCoordinateSystemCategoryDictionary.Modify", __LINE__, __WFILE__, &arguments, L"MgCoordinateSystemNotFoundException", NULL);
-        }
-
-        int updateResult = CS_ctupd(pCategory);
+        cs_Ctdef_ const* pDef = pCategoryDef->GetCategoryDef();
+        int updateResult = CS_ctupd(pDef);
         if (updateResult < 0)
         {
             MgStringCollection arguments;



More information about the mapguide-commits mailing list