[mapguide-commits] r7232 - in branches/2.4/MgDev: . Common/PlatformBase/MapLayer Common/Stylization Server/src/Services/Feature Server/src/Services/Mapping Server/src/UnitTesting Web/src/mapadmin/HelpDocs Web/src/mapviewerphp Web/src/viewerfiles
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Nov 26 21:19:37 PST 2012
Author: jng
Date: 2012-11-26 21:19:36 -0800 (Mon, 26 Nov 2012)
New Revision: 7232
Modified:
branches/2.4/MgDev/
branches/2.4/MgDev/Common/PlatformBase/MapLayer/LayerCollection.cpp
branches/2.4/MgDev/Common/PlatformBase/MapLayer/LayerGroupCollection.cpp
branches/2.4/MgDev/Common/Stylization/SE_Renderer.cpp
branches/2.4/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp
branches/2.4/MgDev/Server/src/Services/Mapping/MappingUtil.cpp
branches/2.4/MgDev/Server/src/UnitTesting/TestMisc.cpp
branches/2.4/MgDev/Server/src/UnitTesting/TestMisc.h
branches/2.4/MgDev/Web/src/mapadmin/HelpDocs/
branches/2.4/MgDev/Web/src/mapadmin/HelpDocs/configuring_servers.htm
branches/2.4/MgDev/Web/src/mapviewerphp/quickplotgeneratepicture.php
branches/2.4/MgDev/Web/src/viewerfiles/
branches/2.4/MgDev/Web/src/viewerfiles/quickplot.js
Log:
#2189, #2190: Backport to 2.4
Property changes on: branches/2.4/MgDev
___________________________________________________________________
Modified: svn:mergeinfo
- /sandbox/rfc94:5099-5163
/trunk/MgDev:6611,6690,6746
+ /sandbox/rfc94:5099-5163
/trunk/MgDev:6611,6690,6746,7230-7231
Modified: branches/2.4/MgDev/Common/PlatformBase/MapLayer/LayerCollection.cpp
===================================================================
--- branches/2.4/MgDev/Common/PlatformBase/MapLayer/LayerCollection.cpp 2012-11-27 04:54:58 UTC (rev 7231)
+++ branches/2.4/MgDev/Common/PlatformBase/MapLayer/LayerCollection.cpp 2012-11-27 05:19:36 UTC (rev 7232)
@@ -149,9 +149,9 @@
Ptr<MgLayerBase> layer = SAFE_ADDREF(value);
//value is released by m_layers base class
- m_layers->Remove(value);
+ removed = m_layers->Remove(value);
- if (m_owner)
+ if (m_owner && removed)
m_owner->OnLayerRemoved(layer);
}
catch (MgException* e)
Modified: branches/2.4/MgDev/Common/PlatformBase/MapLayer/LayerGroupCollection.cpp
===================================================================
--- branches/2.4/MgDev/Common/PlatformBase/MapLayer/LayerGroupCollection.cpp 2012-11-27 04:54:58 UTC (rev 7231)
+++ branches/2.4/MgDev/Common/PlatformBase/MapLayer/LayerGroupCollection.cpp 2012-11-27 05:19:36 UTC (rev 7232)
@@ -130,9 +130,9 @@
Ptr<MgLayerGroup> group = SAFE_ADDREF(value);
//value is released by m_groups base class
- m_groups->Remove(value);
+ removed = m_groups->Remove(value);
- if (m_owner)
+ if (m_owner && removed)
m_owner->OnGroupRemoved(group);
}
catch (MgException* e)
Property changes on: branches/2.4/MgDev/Common/Stylization/SE_Renderer.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /sandbox/adsk/2.4j/Common/Stylization/SE_Renderer.cpp:6327-6445
/sandbox/rfc94/Common/Stylization/SE_Renderer.cpp:5099-5163
/trunk/MgDev/Common/Stylization/SE_Renderer.cpp:6250-6326,6611,6690,6746
+ /sandbox/adsk/2.4j/Common/Stylization/SE_Renderer.cpp:6327-6445
/sandbox/rfc94/Common/Stylization/SE_Renderer.cpp:5099-5163
/trunk/MgDev/Common/Stylization/SE_Renderer.cpp:6250-6326,6611,6690,6746,7230-7231
Property changes on: branches/2.4/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /sandbox/adsk/2.4j/Server/src/Services/Feature/ServerFeatureUtil.cpp:6327-6481
/sandbox/rfc94/Server/src/Services/Feature/ServerFeatureUtil.cpp:5099-5163
/trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp:6250-6326,6611,6690,6746
+ /sandbox/adsk/2.4j/Server/src/Services/Feature/ServerFeatureUtil.cpp:6327-6481
/sandbox/rfc94/Server/src/Services/Feature/ServerFeatureUtil.cpp:5099-5163
/trunk/MgDev/Server/src/Services/Feature/ServerFeatureUtil.cpp:6250-6326,6611,6690,6746,7230-7231
Property changes on: branches/2.4/MgDev/Server/src/Services/Mapping/MappingUtil.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /sandbox/adsk/2.4j/Server/src/Services/Mapping/MappingUtil.cpp:6327-6535
/sandbox/rfc94/Server/src/Services/Mapping/MappingUtil.cpp:5099-5163
/trunk/MgDev/Server/src/Services/Mapping/MappingUtil.cpp:6250-6326,6611,6690,6746
+ /sandbox/adsk/2.4j/Server/src/Services/Mapping/MappingUtil.cpp:6327-6535
/sandbox/rfc94/Server/src/Services/Mapping/MappingUtil.cpp:5099-5163
/trunk/MgDev/Server/src/Services/Mapping/MappingUtil.cpp:6250-6326,6611,6690,6746,7230-7231
Modified: branches/2.4/MgDev/Server/src/UnitTesting/TestMisc.cpp
===================================================================
--- branches/2.4/MgDev/Server/src/UnitTesting/TestMisc.cpp 2012-11-27 04:54:58 UTC (rev 7231)
+++ branches/2.4/MgDev/Server/src/UnitTesting/TestMisc.cpp 2012-11-27 05:19:36 UTC (rev 7232)
@@ -507,4 +507,36 @@
{
throw;
}
+}
+
+void TestMisc::TestCase_MapLayerCollections()
+{
+ try
+ {
+ Ptr<MgResourceIdentifier> mapRes1 = new MgResourceIdentifier(L"Library://UnitTests/Maps/Sheboygan.MapDefinition");
+ Ptr<MgMap> map1 = new MgMap(m_siteConnection);
+ map1->Create(mapRes1, L"UnitTestSheboygan1");
+
+ Ptr<MgLayerGroup> detachedGroup = new MgLayerGroup(L"DetachedGroup");
+ Ptr<MgResourceIdentifier> ldf = new MgResourceIdentifier(L"Library://UnitTests/Layers/Parcels.LayerDefinition");
+ Ptr<MgLayer> detachedLayer = new MgLayer(ldf, m_svcResource);
+ detachedLayer->SetName(L"DetachedLayer");
+
+ Ptr<MgLayerCollection> mapLayers = map1->GetLayers();
+ Ptr<MgLayerGroupCollection> mapGroups = map1->GetLayerGroups();
+
+ //Remove() should be returning false when passing in layers/groups that don't belong
+ CPPUNIT_ASSERT(!mapLayers->Remove(detachedLayer));
+ CPPUNIT_ASSERT(!mapGroups->Remove(detachedGroup));
+ }
+ catch (MgException* e)
+ {
+ STRING message = e->GetDetails(TEST_LOCALE);
+ SAFE_RELEASE(e);
+ CPPUNIT_FAIL(MG_WCHAR_TO_CHAR(message.c_str()));
+ }
+ catch (...)
+ {
+ throw;
+ }
}
\ No newline at end of file
Modified: branches/2.4/MgDev/Server/src/UnitTesting/TestMisc.h
===================================================================
--- branches/2.4/MgDev/Server/src/UnitTesting/TestMisc.h 2012-11-27 04:54:58 UTC (rev 7231)
+++ branches/2.4/MgDev/Server/src/UnitTesting/TestMisc.h 2012-11-27 05:19:36 UTC (rev 7232)
@@ -28,6 +28,7 @@
CPPUNIT_TEST(TestCase_CommonExceptionMessages);
CPPUNIT_TEST(TestCase_611);
CPPUNIT_TEST(TestCase_1304);
+ CPPUNIT_TEST(TestCase_MapLayerCollections);
CPPUNIT_TEST(TestEnd); // This must be the very last unit test
CPPUNIT_TEST_SUITE_END();
@@ -44,6 +45,7 @@
void TestCase_CommonExceptionMessages();
void TestCase_611();
void TestCase_1304();
+ void TestCase_MapLayerCollections();
private:
Ptr<MgSiteConnection> m_siteConnection;
Property changes on: branches/2.4/MgDev/Web/src/mapadmin/HelpDocs
___________________________________________________________________
Modified: svn:mergeinfo
- /sandbox/adsk/2.4j/Web/src/mapadmin/HelpDocs:6413
/sandbox/rfc94/Web/src/mapadmin/HelpDocs:5099-5163
/trunk/MgDev/Web/src/mapadmin/HelpDocs:6611,6690,6746
+ /sandbox/adsk/2.4j/Web/src/mapadmin/HelpDocs:6413
/sandbox/rfc94/Web/src/mapadmin/HelpDocs:5099-5163
/trunk/MgDev/Web/src/mapadmin/HelpDocs:6611,6690,6746,7230-7231
Property changes on: branches/2.4/MgDev/Web/src/mapadmin/HelpDocs/configuring_servers.htm
___________________________________________________________________
Modified: svn:mergeinfo
- /sandbox/adsk/2.4j/Web/src/mapadmin/HelpDocs/configuring_servers.htm:6327-6435
/sandbox/rfc94/Web/src/mapadmin/HelpDocs/configuring_servers.htm:5099-5163
/trunk/MgDev/Web/src/mapadmin/HelpDocs/configuring_servers.htm:6250-6326,6611,6690,6746
+ /sandbox/adsk/2.4j/Web/src/mapadmin/HelpDocs/configuring_servers.htm:6327-6435
/sandbox/rfc94/Web/src/mapadmin/HelpDocs/configuring_servers.htm:5099-5163
/trunk/MgDev/Web/src/mapadmin/HelpDocs/configuring_servers.htm:6250-6326,6611,6690,6746,7230-7231
Property changes on: branches/2.4/MgDev/Web/src/mapviewerphp/quickplotgeneratepicture.php
___________________________________________________________________
Modified: svn:mergeinfo
- /sandbox/adsk/2.4jbeta2/Web/src/mapviewerphp/quickplotgeneratepicture.php:6334-6374
/sandbox/rfc94/Web/src/mapviewerphp/quickplotgeneratepicture.php:5099-5163
/trunk/MgDev/Web/src/mapviewerphp/quickplotgeneratepicture.php:6611,6690,6746
+ /sandbox/adsk/2.4jbeta2/Web/src/mapviewerphp/quickplotgeneratepicture.php:6334-6374
/sandbox/rfc94/Web/src/mapviewerphp/quickplotgeneratepicture.php:5099-5163
/trunk/MgDev/Web/src/mapviewerphp/quickplotgeneratepicture.php:6611,6690,6746,7230-7231
Property changes on: branches/2.4/MgDev/Web/src/viewerfiles
___________________________________________________________________
Modified: svn:mergeinfo
- /sandbox/adsk/2.2gp/Web/src/viewerfiles:5392
/trunk/MgDev/Web/src/viewerfiles:6611,6690,6746
+ /sandbox/adsk/2.2gp/Web/src/viewerfiles:5392
/trunk/MgDev/Web/src/viewerfiles:6611,6690,6746,7230-7231
Property changes on: branches/2.4/MgDev/Web/src/viewerfiles/quickplot.js
___________________________________________________________________
Modified: svn:mergeinfo
- /sandbox/adsk/2.2gp/Web/src/viewerfiles/quickplot.js:5392
/sandbox/adsk/2.4j/Web/src/viewerfiles/quickplot.js:6327-6474
/trunk/MgDev/Web/src/viewerfiles/quickplot.js:6250-6326,6611,6690,6746
+ /sandbox/adsk/2.2gp/Web/src/viewerfiles/quickplot.js:5392
/sandbox/adsk/2.4j/Web/src/viewerfiles/quickplot.js:6327-6474
/trunk/MgDev/Web/src/viewerfiles/quickplot.js:6250-6326,6611,6690,6746,7230-7231
More information about the mapguide-commits
mailing list