[mapguide-commits] r5160 - in trunk/MgDev/Common: MdfModel MdfParser PlatformBase/Exception PlatformBase/MapLayer Renderers Schema

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Sep 20 10:02:07 EDT 2010


Author: waltweltonlair
Date: 2010-09-20 14:02:07 +0000 (Mon, 20 Sep 2010)
New Revision: 5160

Modified:
   trunk/MgDev/Common/MdfModel/TileWatermarkPosition.cpp
   trunk/MgDev/Common/MdfModel/TileWatermarkPosition.h
   trunk/MgDev/Common/MdfModel/WatermarkAppearance.cpp
   trunk/MgDev/Common/MdfModel/WatermarkAppearance.h
   trunk/MgDev/Common/MdfModel/WatermarkDefinition.cpp
   trunk/MgDev/Common/MdfModel/WatermarkDefinition.h
   trunk/MgDev/Common/MdfModel/WatermarkInstance.cpp
   trunk/MgDev/Common/MdfModel/WatermarkInstance.h
   trunk/MgDev/Common/MdfModel/WatermarkOffsetUnit.h
   trunk/MgDev/Common/MdfModel/WatermarkPosition.cpp
   trunk/MgDev/Common/MdfModel/WatermarkPosition.h
   trunk/MgDev/Common/MdfModel/WatermarkXOffset.cpp
   trunk/MgDev/Common/MdfModel/WatermarkXOffset.h
   trunk/MgDev/Common/MdfModel/WatermarkYOffset.cpp
   trunk/MgDev/Common/MdfModel/WatermarkYOffset.h
   trunk/MgDev/Common/MdfModel/XYWatermarkPosition.cpp
   trunk/MgDev/Common/MdfModel/XYWatermarkPosition.h
   trunk/MgDev/Common/MdfParser/IOTileWatermarkPosition.cpp
   trunk/MgDev/Common/MdfParser/IOTileWatermarkPosition.h
   trunk/MgDev/Common/MdfParser/IOWatermarkAppearance.cpp
   trunk/MgDev/Common/MdfParser/IOWatermarkAppearance.h
   trunk/MgDev/Common/MdfParser/IOWatermarkDefinition.cpp
   trunk/MgDev/Common/MdfParser/IOWatermarkDefinition.h
   trunk/MgDev/Common/MdfParser/IOWatermarkInstance.cpp
   trunk/MgDev/Common/MdfParser/IOWatermarkInstance.h
   trunk/MgDev/Common/MdfParser/IOWatermarkOffsetUnit.cpp
   trunk/MgDev/Common/MdfParser/IOWatermarkOffsetUnit.h
   trunk/MgDev/Common/MdfParser/IOWatermarkXOffset.cpp
   trunk/MgDev/Common/MdfParser/IOWatermarkXOffset.h
   trunk/MgDev/Common/MdfParser/IOWatermarkYOffset.cpp
   trunk/MgDev/Common/MdfParser/IOWatermarkYOffset.h
   trunk/MgDev/Common/MdfParser/IOXYWatermarkPosition.cpp
   trunk/MgDev/Common/MdfParser/IOXYWatermarkPosition.h
   trunk/MgDev/Common/PlatformBase/Exception/InvalidWatermarkDefinitionException.cpp
   trunk/MgDev/Common/PlatformBase/Exception/InvalidWatermarkDefinitionException.h
   trunk/MgDev/Common/PlatformBase/MapLayer/Watermark.cpp
   trunk/MgDev/Common/PlatformBase/MapLayer/Watermark.h
   trunk/MgDev/Common/Renderers/RenderUtil.cpp
   trunk/MgDev/Common/Renderers/RenderUtil.h
   trunk/MgDev/Common/Schema/LayerDefinition-1.4.0.xsd
   trunk/MgDev/Common/Schema/MapDefinition-1.1.0.xsd
   trunk/MgDev/Common/Schema/WatermarkDefinition-1.0.0.xsd
Log:
Add svn:eol-style attribute to new watermark files.


Modified: trunk/MgDev/Common/MdfModel/TileWatermarkPosition.cpp
===================================================================
--- trunk/MgDev/Common/MdfModel/TileWatermarkPosition.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/TileWatermarkPosition.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,227 +1,227 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-//-------------------------------------------------------------------------
-// DESCRIPTION:
-// The TileWatermarkPosition class implementation.
-// TileWatermarkPosition class is one implementation of WatermarkPosition to 
-// define the position of watermark.
-//-------------------------------------------------------------------------
-
-#include "stdafx.h"
-#include <cmath>
-#include "TileWatermarkPosition.h"
-
-using namespace MDFMODEL_NAMESPACE;
-
-const double TileWatermarkPosition::doubleTolerance = 0.01;
-
-//-------------------------------------------------------------------------
-// PURPOSE: Construct and initialize an instance of the TileWatermarkPosition class.
-//-------------------------------------------------------------------------
-TileWatermarkPosition::TileWatermarkPosition()
-{
-    this->m_tileWidth = 150.0;
-    this->m_tileHeight = 150.0;
-    this->m_horizontalPosition = NULL;
-    this->m_verticalPosition = NULL;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Destructor. Release any dynamically allocated resources.
-//-------------------------------------------------------------------------
-TileWatermarkPosition::~TileWatermarkPosition()
-{
-    delete this->m_horizontalPosition;
-    delete this->m_verticalPosition;
-}
-
-//-------------------------------------------------------------------------
-// Get the tile width 
-//-------------------------------------------------------------------------
-double TileWatermarkPosition::GetTileWidth() const
-{
-    return this->m_tileWidth;
-}
-
-//-------------------------------------------------------------------------
-// Set the tile width 
-//-------------------------------------------------------------------------
-void TileWatermarkPosition::SetTileWidth(const double& dTileWidth)
-{
-    this->m_tileWidth = dTileWidth;
-}
-
-//-------------------------------------------------------------------------
-// Get the tile height 
-//-------------------------------------------------------------------------
-double TileWatermarkPosition::GetTileHeight() const
-{
-    return this->m_tileHeight;
-}
-
-//-------------------------------------------------------------------------
-// Set the tile height 
-//-------------------------------------------------------------------------
-void TileWatermarkPosition::SetTileHeight(const double& dTileHeight)
-{
-    this->m_tileHeight = dTileHeight;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the HorizontalPosition property.
-//          The WatermarkXOffset is the type of offset used in the position of watermark.
-// RETURNS: The pointer of WatermarkXOffset.
-//-------------------------------------------------------------------------
-const WatermarkXOffset* TileWatermarkPosition::GetHorizontalPosition() const
-{
-    return this->m_horizontalPosition;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the HorizontalPosition property.
-//          The WatermarkXOffset is the type of offset used in the position of watermark.
-// RETURNS: The pointer of WatermarkXOffset.
-//-------------------------------------------------------------------------
-WatermarkXOffset* TileWatermarkPosition::GetHorizontalPosition()
-{
-    return this->m_horizontalPosition;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the HorizontalPosition property.
-//          The WatermarkXOffset is the type of offset used in the position of watermark.
-// PARAMETERS:
-//        Input:
-//          pXPosition - Adopted WatermarkXOffset object that is created on the heap.
-//                             It may be NULL.
-//-------------------------------------------------------------------------
-void TileWatermarkPosition::AdoptHorizontalPosition(WatermarkXOffset* pHorizontalPosition)
-{
-    if (this->m_horizontalPosition != pHorizontalPosition)
-    {
-        delete this->m_horizontalPosition;
-        this->m_horizontalPosition = pHorizontalPosition;
-    }
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the HorizontalPosition property.
-//          The WatermarkXOffset is the type of offset used in the position of watermark.
-// RETURNS: The pointer to the orphaned WatermarkXOffset object. It may be NULL.
-//-------------------------------------------------------------------------
-WatermarkXOffset* TileWatermarkPosition::OrphanHorizontalPosition()
-{
-    WatermarkXOffset* pRet = this->m_horizontalPosition;
-    this->m_horizontalPosition = NULL;
-    return pRet;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the VerticalPosition property.
-//          The WatermarkYOffset is the type of offset used in the position of watermark.
-// RETURNS: The pointer of WatermarkYOffset.
-//-------------------------------------------------------------------------
-const WatermarkYOffset* TileWatermarkPosition::GetVerticalPosition() const
-{
-    return this->m_verticalPosition;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the VerticalPosition property.
-//          The WatermarkYOffset is the type of offset used in the position of watermark.
-// RETURNS: The pointer of WatermarkYOffset.
-//-------------------------------------------------------------------------
-WatermarkYOffset* TileWatermarkPosition::GetVerticalPosition()
-{
-    return this->m_verticalPosition;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the VerticalPosition property.
-//          The WatermarkYOffset is the type of offset used in the position of watermark.
-// PARAMETERS:
-//        Input:
-//          pYPosition - Adopted WatermarkYOffset object that is created on the heap.
-//                             It may be NULL.
-//-------------------------------------------------------------------------
-void TileWatermarkPosition::AdoptVerticalPosition(WatermarkYOffset* pVerticalPosition)
-{
-    if (this->m_verticalPosition != pVerticalPosition)
-    {
-        delete this->m_verticalPosition;
-        this->m_verticalPosition = pVerticalPosition;
-    }
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the VerticalPosition property.
-//          The WatermarkYOffset is the type of offset used in the position of watermark.
-// RETURNS: The pointer to the orphaned WatermarkYOffset object. It may be NULL.
-//-------------------------------------------------------------------------
-WatermarkYOffset* TileWatermarkPosition::OrphanVerticalPosition()
-{
-    WatermarkYOffset* pRet = this->m_verticalPosition;
-    this->m_verticalPosition = NULL;
-    return pRet;
-}
-
-//-------------------------------------------------------------------------
-// Determines whether this position is the same as the supplied one.
-//-------------------------------------------------------------------------
-bool TileWatermarkPosition::Equals(WatermarkPosition* another)
-{
-    TileWatermarkPosition* anotherPosition = dynamic_cast<TileWatermarkPosition*>(another);
-    if (!anotherPosition)
-        return false;
-
-    // check width / height
-    if (fabs(this->m_tileWidth - anotherPosition->m_tileWidth) > doubleTolerance)
-        return false;
-    if (fabs(this->m_tileHeight - anotherPosition->m_tileHeight) > doubleTolerance)
-        return false;
-    
-    // check horizontal position
-    if (!this->m_horizontalPosition)
-    {
-        if (anotherPosition->m_horizontalPosition)
-            return false;
-    }
-    else if (!this->m_horizontalPosition->Equals(anotherPosition->m_horizontalPosition))
-        return false;
-
-    // check vertical position
-    if (!this->m_verticalPosition)
-    {
-        if (anotherPosition->m_verticalPosition)
-            return false;
-    }
-    else if (!this->m_verticalPosition->Equals(anotherPosition->m_verticalPosition))
-        return false;
-
-    // all checks passed
-    return true;
-}
-
-#ifdef _WIN32
-#ifdef _DEBUG
-int TileWatermarkPosition::DumpMemoryLeaks()
-{
-    return _CrtDumpMemoryLeaks();
-}
-#endif
-#endif
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+//-------------------------------------------------------------------------
+// DESCRIPTION:
+// The TileWatermarkPosition class implementation.
+// TileWatermarkPosition class is one implementation of WatermarkPosition to 
+// define the position of watermark.
+//-------------------------------------------------------------------------
+
+#include "stdafx.h"
+#include <cmath>
+#include "TileWatermarkPosition.h"
+
+using namespace MDFMODEL_NAMESPACE;
+
+const double TileWatermarkPosition::doubleTolerance = 0.01;
+
+//-------------------------------------------------------------------------
+// PURPOSE: Construct and initialize an instance of the TileWatermarkPosition class.
+//-------------------------------------------------------------------------
+TileWatermarkPosition::TileWatermarkPosition()
+{
+    this->m_tileWidth = 150.0;
+    this->m_tileHeight = 150.0;
+    this->m_horizontalPosition = NULL;
+    this->m_verticalPosition = NULL;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Destructor. Release any dynamically allocated resources.
+//-------------------------------------------------------------------------
+TileWatermarkPosition::~TileWatermarkPosition()
+{
+    delete this->m_horizontalPosition;
+    delete this->m_verticalPosition;
+}
+
+//-------------------------------------------------------------------------
+// Get the tile width 
+//-------------------------------------------------------------------------
+double TileWatermarkPosition::GetTileWidth() const
+{
+    return this->m_tileWidth;
+}
+
+//-------------------------------------------------------------------------
+// Set the tile width 
+//-------------------------------------------------------------------------
+void TileWatermarkPosition::SetTileWidth(const double& dTileWidth)
+{
+    this->m_tileWidth = dTileWidth;
+}
+
+//-------------------------------------------------------------------------
+// Get the tile height 
+//-------------------------------------------------------------------------
+double TileWatermarkPosition::GetTileHeight() const
+{
+    return this->m_tileHeight;
+}
+
+//-------------------------------------------------------------------------
+// Set the tile height 
+//-------------------------------------------------------------------------
+void TileWatermarkPosition::SetTileHeight(const double& dTileHeight)
+{
+    this->m_tileHeight = dTileHeight;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the HorizontalPosition property.
+//          The WatermarkXOffset is the type of offset used in the position of watermark.
+// RETURNS: The pointer of WatermarkXOffset.
+//-------------------------------------------------------------------------
+const WatermarkXOffset* TileWatermarkPosition::GetHorizontalPosition() const
+{
+    return this->m_horizontalPosition;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the HorizontalPosition property.
+//          The WatermarkXOffset is the type of offset used in the position of watermark.
+// RETURNS: The pointer of WatermarkXOffset.
+//-------------------------------------------------------------------------
+WatermarkXOffset* TileWatermarkPosition::GetHorizontalPosition()
+{
+    return this->m_horizontalPosition;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the HorizontalPosition property.
+//          The WatermarkXOffset is the type of offset used in the position of watermark.
+// PARAMETERS:
+//        Input:
+//          pXPosition - Adopted WatermarkXOffset object that is created on the heap.
+//                             It may be NULL.
+//-------------------------------------------------------------------------
+void TileWatermarkPosition::AdoptHorizontalPosition(WatermarkXOffset* pHorizontalPosition)
+{
+    if (this->m_horizontalPosition != pHorizontalPosition)
+    {
+        delete this->m_horizontalPosition;
+        this->m_horizontalPosition = pHorizontalPosition;
+    }
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the HorizontalPosition property.
+//          The WatermarkXOffset is the type of offset used in the position of watermark.
+// RETURNS: The pointer to the orphaned WatermarkXOffset object. It may be NULL.
+//-------------------------------------------------------------------------
+WatermarkXOffset* TileWatermarkPosition::OrphanHorizontalPosition()
+{
+    WatermarkXOffset* pRet = this->m_horizontalPosition;
+    this->m_horizontalPosition = NULL;
+    return pRet;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the VerticalPosition property.
+//          The WatermarkYOffset is the type of offset used in the position of watermark.
+// RETURNS: The pointer of WatermarkYOffset.
+//-------------------------------------------------------------------------
+const WatermarkYOffset* TileWatermarkPosition::GetVerticalPosition() const
+{
+    return this->m_verticalPosition;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the VerticalPosition property.
+//          The WatermarkYOffset is the type of offset used in the position of watermark.
+// RETURNS: The pointer of WatermarkYOffset.
+//-------------------------------------------------------------------------
+WatermarkYOffset* TileWatermarkPosition::GetVerticalPosition()
+{
+    return this->m_verticalPosition;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the VerticalPosition property.
+//          The WatermarkYOffset is the type of offset used in the position of watermark.
+// PARAMETERS:
+//        Input:
+//          pYPosition - Adopted WatermarkYOffset object that is created on the heap.
+//                             It may be NULL.
+//-------------------------------------------------------------------------
+void TileWatermarkPosition::AdoptVerticalPosition(WatermarkYOffset* pVerticalPosition)
+{
+    if (this->m_verticalPosition != pVerticalPosition)
+    {
+        delete this->m_verticalPosition;
+        this->m_verticalPosition = pVerticalPosition;
+    }
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the VerticalPosition property.
+//          The WatermarkYOffset is the type of offset used in the position of watermark.
+// RETURNS: The pointer to the orphaned WatermarkYOffset object. It may be NULL.
+//-------------------------------------------------------------------------
+WatermarkYOffset* TileWatermarkPosition::OrphanVerticalPosition()
+{
+    WatermarkYOffset* pRet = this->m_verticalPosition;
+    this->m_verticalPosition = NULL;
+    return pRet;
+}
+
+//-------------------------------------------------------------------------
+// Determines whether this position is the same as the supplied one.
+//-------------------------------------------------------------------------
+bool TileWatermarkPosition::Equals(WatermarkPosition* another)
+{
+    TileWatermarkPosition* anotherPosition = dynamic_cast<TileWatermarkPosition*>(another);
+    if (!anotherPosition)
+        return false;
+
+    // check width / height
+    if (fabs(this->m_tileWidth - anotherPosition->m_tileWidth) > doubleTolerance)
+        return false;
+    if (fabs(this->m_tileHeight - anotherPosition->m_tileHeight) > doubleTolerance)
+        return false;
+    
+    // check horizontal position
+    if (!this->m_horizontalPosition)
+    {
+        if (anotherPosition->m_horizontalPosition)
+            return false;
+    }
+    else if (!this->m_horizontalPosition->Equals(anotherPosition->m_horizontalPosition))
+        return false;
+
+    // check vertical position
+    if (!this->m_verticalPosition)
+    {
+        if (anotherPosition->m_verticalPosition)
+            return false;
+    }
+    else if (!this->m_verticalPosition->Equals(anotherPosition->m_verticalPosition))
+        return false;
+
+    // all checks passed
+    return true;
+}
+
+#ifdef _WIN32
+#ifdef _DEBUG
+int TileWatermarkPosition::DumpMemoryLeaks()
+{
+    return _CrtDumpMemoryLeaks();
+}
+#endif
+#endif


Property changes on: trunk/MgDev/Common/MdfModel/TileWatermarkPosition.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/TileWatermarkPosition.h
===================================================================
--- trunk/MgDev/Common/MdfModel/TileWatermarkPosition.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/TileWatermarkPosition.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,88 +1,88 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef TILEWATERMARKPOSITION_H_
-#define TILEWATERMARKPOSITION_H_
-
-#include "MdfModel.h"
-#include "WatermarkPosition.h"
-#include "WatermarkXOffset.h"
-#include "WatermarkYOffset.h"
-
-BEGIN_NAMESPACE_MDFMODEL
-
-    //-------------------------------------------------------------------------
-    // DESCRIPTION:
-    // The TileWatermarkPosition class is one concrete implementation of WatermarkPosition.
-    // It will repeat the source both in X and Y dimension.  Tile is the unit of repeat.
-    // Within tile it uses X-Y as the position of watermark.
-    //------------------------------------------------------------------------
-    class MDFMODEL_API TileWatermarkPosition : public WatermarkPosition
-    {
-    public:
-        // Construction, destruction, initialization.
-        TileWatermarkPosition();
-        virtual ~TileWatermarkPosition();
-
-        // Operations
-
-        // Property: TileWidth
-        double GetTileWidth() const;
-        void SetTileWidth(const double& dTileWidth);
-
-        // Property: TileHeight
-        double GetTileHeight() const;
-        void SetTileHeight(const double& dTileHeight);
-        
-        // Property: HorizontalPosition
-        const WatermarkXOffset* GetHorizontalPosition() const;
-        WatermarkXOffset* GetHorizontalPosition();
-        void AdoptHorizontalPosition(WatermarkXOffset* pHorizontalPosition);
-        WatermarkXOffset* OrphanHorizontalPosition();
-        
-        // Property: VerticalPosition
-        const WatermarkYOffset* GetVerticalPosition() const;
-        WatermarkYOffset* GetVerticalPosition();
-        void AdoptVerticalPosition(WatermarkYOffset* pVerticalPosition);
-        WatermarkYOffset* OrphanVerticalPosition();
-
-        virtual bool Equals(WatermarkPosition* another);
-
-//#ifdef _WIN32
-#if _DEBUG
-        // for memory leak testing
-        static int DumpMemoryLeaks();
-#endif
-//#endif
-
-    private:
-        // Hidden TileWatermarkPosition copy constructor and assignment operator.
-        TileWatermarkPosition(const TileWatermarkPosition&);
-        TileWatermarkPosition& operator=(const TileWatermarkPosition&);
-
-        // Data members
-        // See corresponding properties for descriptions
-        double m_tileWidth;
-        double m_tileHeight;
-        WatermarkXOffset* m_horizontalPosition;
-        WatermarkYOffset* m_verticalPosition;
-
-        static const double doubleTolerance;
-    };
-
-END_NAMESPACE_MDFMODEL
-#endif // TILEWATERMARKPOSITION_H_
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef TILEWATERMARKPOSITION_H_
+#define TILEWATERMARKPOSITION_H_
+
+#include "MdfModel.h"
+#include "WatermarkPosition.h"
+#include "WatermarkXOffset.h"
+#include "WatermarkYOffset.h"
+
+BEGIN_NAMESPACE_MDFMODEL
+
+    //-------------------------------------------------------------------------
+    // DESCRIPTION:
+    // The TileWatermarkPosition class is one concrete implementation of WatermarkPosition.
+    // It will repeat the source both in X and Y dimension.  Tile is the unit of repeat.
+    // Within tile it uses X-Y as the position of watermark.
+    //------------------------------------------------------------------------
+    class MDFMODEL_API TileWatermarkPosition : public WatermarkPosition
+    {
+    public:
+        // Construction, destruction, initialization.
+        TileWatermarkPosition();
+        virtual ~TileWatermarkPosition();
+
+        // Operations
+
+        // Property: TileWidth
+        double GetTileWidth() const;
+        void SetTileWidth(const double& dTileWidth);
+
+        // Property: TileHeight
+        double GetTileHeight() const;
+        void SetTileHeight(const double& dTileHeight);
+        
+        // Property: HorizontalPosition
+        const WatermarkXOffset* GetHorizontalPosition() const;
+        WatermarkXOffset* GetHorizontalPosition();
+        void AdoptHorizontalPosition(WatermarkXOffset* pHorizontalPosition);
+        WatermarkXOffset* OrphanHorizontalPosition();
+        
+        // Property: VerticalPosition
+        const WatermarkYOffset* GetVerticalPosition() const;
+        WatermarkYOffset* GetVerticalPosition();
+        void AdoptVerticalPosition(WatermarkYOffset* pVerticalPosition);
+        WatermarkYOffset* OrphanVerticalPosition();
+
+        virtual bool Equals(WatermarkPosition* another);
+
+//#ifdef _WIN32
+#if _DEBUG
+        // for memory leak testing
+        static int DumpMemoryLeaks();
+#endif
+//#endif
+
+    private:
+        // Hidden TileWatermarkPosition copy constructor and assignment operator.
+        TileWatermarkPosition(const TileWatermarkPosition&);
+        TileWatermarkPosition& operator=(const TileWatermarkPosition&);
+
+        // Data members
+        // See corresponding properties for descriptions
+        double m_tileWidth;
+        double m_tileHeight;
+        WatermarkXOffset* m_horizontalPosition;
+        WatermarkYOffset* m_verticalPosition;
+
+        static const double doubleTolerance;
+    };
+
+END_NAMESPACE_MDFMODEL
+#endif // TILEWATERMARKPOSITION_H_


Property changes on: trunk/MgDev/Common/MdfModel/TileWatermarkPosition.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/WatermarkAppearance.cpp
===================================================================
--- trunk/MgDev/Common/MdfModel/WatermarkAppearance.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/WatermarkAppearance.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,113 +1,113 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-//-------------------------------------------------------------------------
-// DESCRIPTION:
-// The WatermarkAppearance class implementation.
-// WatermarkAppearance class is to define the appearance of watermark.
-//-------------------------------------------------------------------------
-
-#include "stdafx.h"
-#include <cmath>
-#include "WatermarkAppearance.h"
-
-using namespace MDFMODEL_NAMESPACE;
-
-const double WatermarkAppearance::doubleTolerance = 0.01;
-
-//-------------------------------------------------------------------------
-// PURPOSE: Construct and initialize an instance of the WatermarkAppearance class.
-//-------------------------------------------------------------------------
-WatermarkAppearance::WatermarkAppearance()
-{
-    this->m_transparency = 0.0;
-    this->m_rotation = 0.0;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Destructor. Release any dynamically allocated resources.
-//-------------------------------------------------------------------------
-WatermarkAppearance::~WatermarkAppearance()
-{
-}
-
-//-------------------------------------------------------------------------
-// Returns the transparency (0 - 100).  Zero means fully opaque, and 100
-// means fully transparent. 
-//-------------------------------------------------------------------------
-double WatermarkAppearance::GetTransparency() const
-{
-    return this->m_transparency;
-}
-
-//-------------------------------------------------------------------------
-// Set the transparency (0 - 100).  Zero means fully opaque, and 100
-// means fully transparent.  If the parameter is more than 100, treat it
-// as 100.  If the parameter is less than 0, treat it as 0.
-//-------------------------------------------------------------------------
-void WatermarkAppearance::SetTransparency(const double& dTransparency)
-{
-    if (dTransparency > 100.0)
-        this->m_transparency = 100.0;
-    else if (dTransparency < 0.0)
-        this->m_transparency = 0.0;
-    else
-        this->m_transparency = dTransparency;
-}
-
-//-------------------------------------------------------------------------
-// Returns the rotation (0 - 360).  Zero means no rotation, while 90 means
-// rotating 90 degrees anticlockwise.
-//-------------------------------------------------------------------------
-double WatermarkAppearance::GetRotation() const
-{
-    return this->m_rotation;
-}
-
-//-------------------------------------------------------------------------
-// Set the rotation (0 - 360).  Zero means no rotation, while 90 means
-// rotating 90 degrees anticlockwise.  If the parameter is more than 360,
-// treat it as 360.  If the parameter is less than 0, treat it as 0.
-//-------------------------------------------------------------------------
-void WatermarkAppearance::SetRotation(const double& dRotation)
-{
-    if (dRotation > 360.0)
-        this->m_rotation = 360.0;
-    else if (dRotation < 0.0)
-        this->m_rotation = 0.0;
-    else
-        this->m_rotation = dRotation;
-}
-
-//-------------------------------------------------------------------------
-// Determines whether this appearance is the same as the supplied one.
-//-------------------------------------------------------------------------
-bool WatermarkAppearance::Equals(WatermarkAppearance* another)
-{
-    return another &&
-           fabs(this->m_transparency - another->m_transparency) < doubleTolerance &&
-           fabs(this->m_rotation - another->m_rotation) < doubleTolerance;
-}
-
-#ifdef _WIN32
-#ifdef _DEBUG
-int WatermarkAppearance::DumpMemoryLeaks()
-{
-    return _CrtDumpMemoryLeaks();
-}
-#endif
-#endif
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+//-------------------------------------------------------------------------
+// DESCRIPTION:
+// The WatermarkAppearance class implementation.
+// WatermarkAppearance class is to define the appearance of watermark.
+//-------------------------------------------------------------------------
+
+#include "stdafx.h"
+#include <cmath>
+#include "WatermarkAppearance.h"
+
+using namespace MDFMODEL_NAMESPACE;
+
+const double WatermarkAppearance::doubleTolerance = 0.01;
+
+//-------------------------------------------------------------------------
+// PURPOSE: Construct and initialize an instance of the WatermarkAppearance class.
+//-------------------------------------------------------------------------
+WatermarkAppearance::WatermarkAppearance()
+{
+    this->m_transparency = 0.0;
+    this->m_rotation = 0.0;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Destructor. Release any dynamically allocated resources.
+//-------------------------------------------------------------------------
+WatermarkAppearance::~WatermarkAppearance()
+{
+}
+
+//-------------------------------------------------------------------------
+// Returns the transparency (0 - 100).  Zero means fully opaque, and 100
+// means fully transparent. 
+//-------------------------------------------------------------------------
+double WatermarkAppearance::GetTransparency() const
+{
+    return this->m_transparency;
+}
+
+//-------------------------------------------------------------------------
+// Set the transparency (0 - 100).  Zero means fully opaque, and 100
+// means fully transparent.  If the parameter is more than 100, treat it
+// as 100.  If the parameter is less than 0, treat it as 0.
+//-------------------------------------------------------------------------
+void WatermarkAppearance::SetTransparency(const double& dTransparency)
+{
+    if (dTransparency > 100.0)
+        this->m_transparency = 100.0;
+    else if (dTransparency < 0.0)
+        this->m_transparency = 0.0;
+    else
+        this->m_transparency = dTransparency;
+}
+
+//-------------------------------------------------------------------------
+// Returns the rotation (0 - 360).  Zero means no rotation, while 90 means
+// rotating 90 degrees anticlockwise.
+//-------------------------------------------------------------------------
+double WatermarkAppearance::GetRotation() const
+{
+    return this->m_rotation;
+}
+
+//-------------------------------------------------------------------------
+// Set the rotation (0 - 360).  Zero means no rotation, while 90 means
+// rotating 90 degrees anticlockwise.  If the parameter is more than 360,
+// treat it as 360.  If the parameter is less than 0, treat it as 0.
+//-------------------------------------------------------------------------
+void WatermarkAppearance::SetRotation(const double& dRotation)
+{
+    if (dRotation > 360.0)
+        this->m_rotation = 360.0;
+    else if (dRotation < 0.0)
+        this->m_rotation = 0.0;
+    else
+        this->m_rotation = dRotation;
+}
+
+//-------------------------------------------------------------------------
+// Determines whether this appearance is the same as the supplied one.
+//-------------------------------------------------------------------------
+bool WatermarkAppearance::Equals(WatermarkAppearance* another)
+{
+    return another &&
+           fabs(this->m_transparency - another->m_transparency) < doubleTolerance &&
+           fabs(this->m_rotation - another->m_rotation) < doubleTolerance;
+}
+
+#ifdef _WIN32
+#ifdef _DEBUG
+int WatermarkAppearance::DumpMemoryLeaks()
+{
+    return _CrtDumpMemoryLeaks();
+}
+#endif
+#endif


Property changes on: trunk/MgDev/Common/MdfModel/WatermarkAppearance.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/WatermarkAppearance.h
===================================================================
--- trunk/MgDev/Common/MdfModel/WatermarkAppearance.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/WatermarkAppearance.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,69 +1,69 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef WATERMARKAPPEARANCE_H_
-#define WATERMARKAPPEARANCE_H_
-
-#include "MdfModel.h"
-#include "MdfRootObject.h"
-
-BEGIN_NAMESPACE_MDFMODEL
-
-    //-------------------------------------------------------------------------
-    // DESCRIPTION:
-    // The WatermarkAppearance class is to define the appearance of watermark.
-    //------------------------------------------------------------------------
-    class MDFMODEL_API WatermarkAppearance : public MdfRootObject
-    {
-    public:
-        // Construction, destruction, initialization.
-        WatermarkAppearance();
-        virtual ~WatermarkAppearance();
-
-        // Operations
-        // Property: Transparency
-        double GetTransparency() const;
-        void SetTransparency(const double& dTransparency);
-
-        // Property: Rotation
-        double GetRotation() const;
-        void SetRotation(const double& dRotation);
-
-        virtual bool Equals(WatermarkAppearance* another);
-
-//#ifdef _WIN32
-#if _DEBUG
-        // for memory leak testing
-        static int DumpMemoryLeaks();
-#endif
-//#endif
-
-    private:
-        // Hidden WatermarkAppearance copy constructor and assignment operator.
-        WatermarkAppearance(const WatermarkAppearance&);
-        WatermarkAppearance& operator=(const WatermarkAppearance&);
-
-        // Data members
-        // See corresponding properties for descriptions
-        double m_transparency;
-        double m_rotation;
-
-        static const double doubleTolerance;
-    };
-
-END_NAMESPACE_MDFMODEL
-#endif // WATERMARKAPPEARANCE_H_
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef WATERMARKAPPEARANCE_H_
+#define WATERMARKAPPEARANCE_H_
+
+#include "MdfModel.h"
+#include "MdfRootObject.h"
+
+BEGIN_NAMESPACE_MDFMODEL
+
+    //-------------------------------------------------------------------------
+    // DESCRIPTION:
+    // The WatermarkAppearance class is to define the appearance of watermark.
+    //------------------------------------------------------------------------
+    class MDFMODEL_API WatermarkAppearance : public MdfRootObject
+    {
+    public:
+        // Construction, destruction, initialization.
+        WatermarkAppearance();
+        virtual ~WatermarkAppearance();
+
+        // Operations
+        // Property: Transparency
+        double GetTransparency() const;
+        void SetTransparency(const double& dTransparency);
+
+        // Property: Rotation
+        double GetRotation() const;
+        void SetRotation(const double& dRotation);
+
+        virtual bool Equals(WatermarkAppearance* another);
+
+//#ifdef _WIN32
+#if _DEBUG
+        // for memory leak testing
+        static int DumpMemoryLeaks();
+#endif
+//#endif
+
+    private:
+        // Hidden WatermarkAppearance copy constructor and assignment operator.
+        WatermarkAppearance(const WatermarkAppearance&);
+        WatermarkAppearance& operator=(const WatermarkAppearance&);
+
+        // Data members
+        // See corresponding properties for descriptions
+        double m_transparency;
+        double m_rotation;
+
+        static const double doubleTolerance;
+    };
+
+END_NAMESPACE_MDFMODEL
+#endif // WATERMARKAPPEARANCE_H_


Property changes on: trunk/MgDev/Common/MdfModel/WatermarkAppearance.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/WatermarkDefinition.cpp
===================================================================
--- trunk/MgDev/Common/MdfModel/WatermarkDefinition.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/WatermarkDefinition.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,215 +1,215 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-//-------------------------------------------------------------------------
-// DESCRIPTION:
-// The WatermarkDefinition class implementation.
-//
-// All the data objects in the WatermarkDefinition (Content, Appearance,
-// Position, etc.) are accessible.  While unfettered access to all the stored
-// objects is provided, these data are still owned by the WatermarkDefinition
-// object.
-//   * Methods that have a prefix of "Adopt" imply that the object passed
-//     to them has to be created on the heap and the WaterDefinition object
-//     is now responsible for their deletion.
-//   * Methods that have a prefix of "Orphan" imply that the returned pointer
-//     points to an object on the heap and it's the caller's responsibility
-//     to delete it.
-//   * Methods that have a "Get" prefix simply give access without a change
-//     of ownership.
-//-------------------------------------------------------------------------
-
-#include "stdafx.h"
-#include "WatermarkDefinition.h"
-
-using namespace MDFMODEL_NAMESPACE;
-
-//-------------------------------------------------------------------------
-// PURPOSE: Construct and initialize an instance of the WatermarkDefinition class.
-//-------------------------------------------------------------------------
-WatermarkDefinition::WatermarkDefinition()
-{
-    this->m_content = NULL;
-    this->m_appearance = NULL;
-    this->m_position = NULL;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Destructor. Release any dynamically allocated resources.
-//-------------------------------------------------------------------------
-WatermarkDefinition::~WatermarkDefinition()
-{
-    delete this->m_content;
-    delete this->m_appearance;
-    delete this->m_position;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the content property.
-//          The SymbolDefinition is the type of source content used in watermark.
-// RETURNS: The pointer of symbol definition.
-//-------------------------------------------------------------------------
-const SymbolDefinition* WatermarkDefinition::GetContent() const
-{
-    return this->m_content;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the content property.
-//          The SymbolDefinition is the type of source content used in watermark.
-// RETURNS: The pointer of symbol definition.
-//-------------------------------------------------------------------------
-SymbolDefinition* WatermarkDefinition::GetContent()
-{
-    return this->m_content;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the content property.
-//          The SymbolDefinition is the type of source content used in watermark.
-// PARAMETERS:
-//        Input:
-//          pContent - Adopted SymbolDefinition object that is created on the heap.
-//                             It may be NULL.
-//-------------------------------------------------------------------------
-void WatermarkDefinition::AdoptContent(SymbolDefinition* pContent)
-{
-    if (this->m_content != pContent)
-    {
-        delete this->m_content;
-        this->m_content = pContent;
-    }
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the content property.
-//          The SymbolDefinition is the type of source content used in watermark.
-// RETURNS: The pointer to the orphaned SymbolDefinition object. It may be NULL.
-//-------------------------------------------------------------------------
-SymbolDefinition* WatermarkDefinition::OrphanContent()
-{
-    SymbolDefinition* pRet = this->m_content;
-    this->m_content = NULL;
-    return pRet;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the appearance property.
-//          The WatermarkAppearance is the type of appearance in watermark.
-// RETURNS: The pointer of watermark appearance.
-//-------------------------------------------------------------------------
-const WatermarkAppearance* WatermarkDefinition::GetAppearance() const
-{
-    return this->m_appearance;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the appearance property.
-//          The WatermarkAppearance is the type of appearance in watermark.
-// RETURNS: The pointer of watermark appearance.
-//-------------------------------------------------------------------------
-WatermarkAppearance* WatermarkDefinition::GetAppearance()
-{
-    return this->m_appearance;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the appearance property.
-//          The WatermarkAppearance is the type of appearance in watermark.
-// PARAMETERS:
-//        Input:
-//          pAppearance - Adopted WatermarkAppearance object that is created on the heap.
-//                             It may be NULL.
-//-------------------------------------------------------------------------
-void WatermarkDefinition::AdoptAppearance(WatermarkAppearance* pAppearance)
-{
-    if (this->m_appearance != pAppearance)
-    {
-        delete this->m_appearance;
-        this->m_appearance = pAppearance;
-    }
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the appearance property.
-//          The WatermarkAppearance is the type of appearance in watermark.
-// RETURNS: The pointer to the orphaned WatermarkAppearance object. It may be NULL.
-//-------------------------------------------------------------------------
-WatermarkAppearance* WatermarkDefinition::OrphanAppearance()
-{
-    WatermarkAppearance* pRet = this->m_appearance;
-    this->m_appearance = NULL;
-    return pRet;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the position property.
-//          The WatermarkPosition is the type of position in watermark.
-// RETURNS: The pointer of watermark position.
-//-------------------------------------------------------------------------
-const WatermarkPosition* WatermarkDefinition::GetPosition() const
-{
-    return this->m_position;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the position property.
-//          The WatermarkPosition is the type of position in watermark.
-// RETURNS: The pointer of watermark position.
-//-------------------------------------------------------------------------
-WatermarkPosition* WatermarkDefinition::GetPosition()
-{
-    return this->m_position;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the position property.
-//          The WatermarkPosition is the type of position in watermark.
-// PARAMETERS:
-//        Input:
-//          pPosition - Adopted WatermarkPosition object that is created on the heap.
-//                             It may be NULL.
-//-------------------------------------------------------------------------
-void WatermarkDefinition::AdoptPosition(WatermarkPosition* pPosition)
-{
-    if (this->m_position != pPosition)
-    {
-        delete this->m_position;
-        this->m_position = pPosition;
-    }
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the position property.
-//          The WatermarkPosition is the type of position in watermark.
-// RETURNS: The pointer to the orphaned WatermarkPosition object. It may be NULL.
-//-------------------------------------------------------------------------
-WatermarkPosition* WatermarkDefinition::OrphanPosition()
-{
-    WatermarkPosition* pRet = this->m_position;
-    this->m_position = NULL;
-    return pRet;
-}
-
-#ifdef _WIN32
-#ifdef _DEBUG
-int WatermarkDefinition::DumpMemoryLeaks()
-{
-    return _CrtDumpMemoryLeaks();
-}
-#endif
-#endif
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+//-------------------------------------------------------------------------
+// DESCRIPTION:
+// The WatermarkDefinition class implementation.
+//
+// All the data objects in the WatermarkDefinition (Content, Appearance,
+// Position, etc.) are accessible.  While unfettered access to all the stored
+// objects is provided, these data are still owned by the WatermarkDefinition
+// object.
+//   * Methods that have a prefix of "Adopt" imply that the object passed
+//     to them has to be created on the heap and the WaterDefinition object
+//     is now responsible for their deletion.
+//   * Methods that have a prefix of "Orphan" imply that the returned pointer
+//     points to an object on the heap and it's the caller's responsibility
+//     to delete it.
+//   * Methods that have a "Get" prefix simply give access without a change
+//     of ownership.
+//-------------------------------------------------------------------------
+
+#include "stdafx.h"
+#include "WatermarkDefinition.h"
+
+using namespace MDFMODEL_NAMESPACE;
+
+//-------------------------------------------------------------------------
+// PURPOSE: Construct and initialize an instance of the WatermarkDefinition class.
+//-------------------------------------------------------------------------
+WatermarkDefinition::WatermarkDefinition()
+{
+    this->m_content = NULL;
+    this->m_appearance = NULL;
+    this->m_position = NULL;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Destructor. Release any dynamically allocated resources.
+//-------------------------------------------------------------------------
+WatermarkDefinition::~WatermarkDefinition()
+{
+    delete this->m_content;
+    delete this->m_appearance;
+    delete this->m_position;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the content property.
+//          The SymbolDefinition is the type of source content used in watermark.
+// RETURNS: The pointer of symbol definition.
+//-------------------------------------------------------------------------
+const SymbolDefinition* WatermarkDefinition::GetContent() const
+{
+    return this->m_content;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the content property.
+//          The SymbolDefinition is the type of source content used in watermark.
+// RETURNS: The pointer of symbol definition.
+//-------------------------------------------------------------------------
+SymbolDefinition* WatermarkDefinition::GetContent()
+{
+    return this->m_content;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the content property.
+//          The SymbolDefinition is the type of source content used in watermark.
+// PARAMETERS:
+//        Input:
+//          pContent - Adopted SymbolDefinition object that is created on the heap.
+//                             It may be NULL.
+//-------------------------------------------------------------------------
+void WatermarkDefinition::AdoptContent(SymbolDefinition* pContent)
+{
+    if (this->m_content != pContent)
+    {
+        delete this->m_content;
+        this->m_content = pContent;
+    }
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the content property.
+//          The SymbolDefinition is the type of source content used in watermark.
+// RETURNS: The pointer to the orphaned SymbolDefinition object. It may be NULL.
+//-------------------------------------------------------------------------
+SymbolDefinition* WatermarkDefinition::OrphanContent()
+{
+    SymbolDefinition* pRet = this->m_content;
+    this->m_content = NULL;
+    return pRet;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the appearance property.
+//          The WatermarkAppearance is the type of appearance in watermark.
+// RETURNS: The pointer of watermark appearance.
+//-------------------------------------------------------------------------
+const WatermarkAppearance* WatermarkDefinition::GetAppearance() const
+{
+    return this->m_appearance;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the appearance property.
+//          The WatermarkAppearance is the type of appearance in watermark.
+// RETURNS: The pointer of watermark appearance.
+//-------------------------------------------------------------------------
+WatermarkAppearance* WatermarkDefinition::GetAppearance()
+{
+    return this->m_appearance;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the appearance property.
+//          The WatermarkAppearance is the type of appearance in watermark.
+// PARAMETERS:
+//        Input:
+//          pAppearance - Adopted WatermarkAppearance object that is created on the heap.
+//                             It may be NULL.
+//-------------------------------------------------------------------------
+void WatermarkDefinition::AdoptAppearance(WatermarkAppearance* pAppearance)
+{
+    if (this->m_appearance != pAppearance)
+    {
+        delete this->m_appearance;
+        this->m_appearance = pAppearance;
+    }
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the appearance property.
+//          The WatermarkAppearance is the type of appearance in watermark.
+// RETURNS: The pointer to the orphaned WatermarkAppearance object. It may be NULL.
+//-------------------------------------------------------------------------
+WatermarkAppearance* WatermarkDefinition::OrphanAppearance()
+{
+    WatermarkAppearance* pRet = this->m_appearance;
+    this->m_appearance = NULL;
+    return pRet;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the position property.
+//          The WatermarkPosition is the type of position in watermark.
+// RETURNS: The pointer of watermark position.
+//-------------------------------------------------------------------------
+const WatermarkPosition* WatermarkDefinition::GetPosition() const
+{
+    return this->m_position;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the position property.
+//          The WatermarkPosition is the type of position in watermark.
+// RETURNS: The pointer of watermark position.
+//-------------------------------------------------------------------------
+WatermarkPosition* WatermarkDefinition::GetPosition()
+{
+    return this->m_position;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the position property.
+//          The WatermarkPosition is the type of position in watermark.
+// PARAMETERS:
+//        Input:
+//          pPosition - Adopted WatermarkPosition object that is created on the heap.
+//                             It may be NULL.
+//-------------------------------------------------------------------------
+void WatermarkDefinition::AdoptPosition(WatermarkPosition* pPosition)
+{
+    if (this->m_position != pPosition)
+    {
+        delete this->m_position;
+        this->m_position = pPosition;
+    }
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the position property.
+//          The WatermarkPosition is the type of position in watermark.
+// RETURNS: The pointer to the orphaned WatermarkPosition object. It may be NULL.
+//-------------------------------------------------------------------------
+WatermarkPosition* WatermarkDefinition::OrphanPosition()
+{
+    WatermarkPosition* pRet = this->m_position;
+    this->m_position = NULL;
+    return pRet;
+}
+
+#ifdef _WIN32
+#ifdef _DEBUG
+int WatermarkDefinition::DumpMemoryLeaks()
+{
+    return _CrtDumpMemoryLeaks();
+}
+#endif
+#endif


Property changes on: trunk/MgDev/Common/MdfModel/WatermarkDefinition.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/WatermarkDefinition.h
===================================================================
--- trunk/MgDev/Common/MdfModel/WatermarkDefinition.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/WatermarkDefinition.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,81 +1,81 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef WATERMARKDEFINITION_H_
-#define WATERMARKDEFINITION_H_
-
-#include "MdfModel.h"
-#include "MdfRootObject.h"
-#include "SymbolDefinition.h"
-#include "WatermarkAppearance.h"
-#include "WatermarkPosition.h"
-
-BEGIN_NAMESPACE_MDFMODEL
-
-    //-------------------------------------------------------------------------
-    // DESCRIPTION:
-    // The WatermarkDefinition class is the root document node of the MdfModel. Through its
-    // interface, one can get access to all the data in the WatermarkDefinition.
-    //------------------------------------------------------------------------
-    class MDFMODEL_API WatermarkDefinition : public MdfRootObject
-    {
-    public:
-        // Construction, destruction, initialization.
-        WatermarkDefinition();
-        virtual ~WatermarkDefinition();
-
-        // Operations
-        
-        // Property: Content
-        const SymbolDefinition* GetContent() const;
-        SymbolDefinition* GetContent();
-        void AdoptContent(SymbolDefinition* pContent);
-        SymbolDefinition* OrphanContent();
-        
-        // Property: Appearance
-        const WatermarkAppearance* GetAppearance() const;
-        WatermarkAppearance* GetAppearance();
-        void AdoptAppearance(WatermarkAppearance* pAppearance);
-        WatermarkAppearance* OrphanAppearance();
-        
-        // Property: Position
-        const WatermarkPosition* GetPosition() const;
-        WatermarkPosition* GetPosition();
-        void AdoptPosition(WatermarkPosition* pPosition);
-        WatermarkPosition* OrphanPosition();
-
-//#ifdef _WIN32
-#if _DEBUG
-        // for memory leak testing
-        static int DumpMemoryLeaks();
-#endif
-//#endif
-
-    private:
-        // Hidden WatermarkDefinition copy constructor and assignment operator.
-        WatermarkDefinition(const WatermarkDefinition&);
-        WatermarkDefinition& operator=(const WatermarkDefinition&);
-
-        // Data members
-        // See corresponding properties for descriptions
-        SymbolDefinition* m_content;
-        WatermarkAppearance* m_appearance;
-        WatermarkPosition* m_position;
-    };
-
-END_NAMESPACE_MDFMODEL
-#endif // WATERMARKDEFINITION_H_
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef WATERMARKDEFINITION_H_
+#define WATERMARKDEFINITION_H_
+
+#include "MdfModel.h"
+#include "MdfRootObject.h"
+#include "SymbolDefinition.h"
+#include "WatermarkAppearance.h"
+#include "WatermarkPosition.h"
+
+BEGIN_NAMESPACE_MDFMODEL
+
+    //-------------------------------------------------------------------------
+    // DESCRIPTION:
+    // The WatermarkDefinition class is the root document node of the MdfModel. Through its
+    // interface, one can get access to all the data in the WatermarkDefinition.
+    //------------------------------------------------------------------------
+    class MDFMODEL_API WatermarkDefinition : public MdfRootObject
+    {
+    public:
+        // Construction, destruction, initialization.
+        WatermarkDefinition();
+        virtual ~WatermarkDefinition();
+
+        // Operations
+        
+        // Property: Content
+        const SymbolDefinition* GetContent() const;
+        SymbolDefinition* GetContent();
+        void AdoptContent(SymbolDefinition* pContent);
+        SymbolDefinition* OrphanContent();
+        
+        // Property: Appearance
+        const WatermarkAppearance* GetAppearance() const;
+        WatermarkAppearance* GetAppearance();
+        void AdoptAppearance(WatermarkAppearance* pAppearance);
+        WatermarkAppearance* OrphanAppearance();
+        
+        // Property: Position
+        const WatermarkPosition* GetPosition() const;
+        WatermarkPosition* GetPosition();
+        void AdoptPosition(WatermarkPosition* pPosition);
+        WatermarkPosition* OrphanPosition();
+
+//#ifdef _WIN32
+#if _DEBUG
+        // for memory leak testing
+        static int DumpMemoryLeaks();
+#endif
+//#endif
+
+    private:
+        // Hidden WatermarkDefinition copy constructor and assignment operator.
+        WatermarkDefinition(const WatermarkDefinition&);
+        WatermarkDefinition& operator=(const WatermarkDefinition&);
+
+        // Data members
+        // See corresponding properties for descriptions
+        SymbolDefinition* m_content;
+        WatermarkAppearance* m_appearance;
+        WatermarkPosition* m_position;
+    };
+
+END_NAMESPACE_MDFMODEL
+#endif // WATERMARKDEFINITION_H_


Property changes on: trunk/MgDev/Common/MdfModel/WatermarkDefinition.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/WatermarkInstance.cpp
===================================================================
--- trunk/MgDev/Common/MdfModel/WatermarkInstance.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/WatermarkInstance.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,301 +1,301 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-//-------------------------------------------------------------------------
-// DESCRIPTION:
-// WatermarkInstance Class implementation.
-//-------------------------------------------------------------------------
-
-#include "stdafx.h"
-#include "WatermarkInstance.h"
-
-using namespace MDFMODEL_NAMESPACE;
-
-//-------------------------------------------------------------------------
-// PURPOSE: Construct and initialize an instance of the WatermarkInstance class.
-// PARAMETERS:
-//     Input:
-//          strName - the unique WatermarkInstance name. Cannot be an empty string.
-//          strResourceId - the resource ID for the watermark definition.
-//-------------------------------------------------------------------------
-WatermarkInstance::WatermarkInstance(const MdfString& strName, const MdfString& strResourceId)
-{
-    this->m_strName = strName;
-    this->m_strResourceId = strResourceId;
-    this->m_usage = All;
-    this->m_appearanceOverride = NULL;
-    this->m_positionOverride = NULL;
-    this->m_pWatermarkDefinition = NULL;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Destructor. Release any dynamically allocated resources.
-//-------------------------------------------------------------------------
-WatermarkInstance::~WatermarkInstance()
-{
-    delete this->m_appearanceOverride;
-    delete this->m_positionOverride;
-    delete this->m_pWatermarkDefinition;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor for the unique WatermarkInstance name.
-//-------------------------------------------------------------------------
-const MdfString& WatermarkInstance::GetName() const
-{
-    return this->m_strName;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor to the WatermarkInstance name.
-// PARAMETERS:
-//     Input:
-//          strName - unique WatermarkInstance name
-//-------------------------------------------------------------------------
-void WatermarkInstance::SetName(const MdfString& strName)
-{
-    this->m_strName = strName;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor for the WatermarkDefinition resource ID that this WatermarkInstance references.
-// RETURNS:
-//-------------------------------------------------------------------------
-const MdfString& WatermarkInstance::GetResourceId() const
-{
-    return this->m_strResourceId;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor to the WatermarkDefinition Uri that this WatermarkInstance references.
-// PARAMETERS:
-//      Input:
-//          strResourceId - the watermark resource ID for this WatermarkInstance
-//-------------------------------------------------------------------------
-void WatermarkInstance::SetResourceId(const MdfString& strResourceId)
-{
-    this->m_strResourceId = strResourceId;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Gets a value determining the meaning of the Usage property value.
-// RETURNS: The type of value stored in the Usage property.
-//-------------------------------------------------------------------------
-const WatermarkInstance::Usage WatermarkInstance::GetUsage() const
-{
-    return this->m_usage;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Sets a value determining the meaning of the Usage property value.
-// PARAMETERS:
-//          unit - The type of value stored in the Usage property.
-//-------------------------------------------------------------------------
-void WatermarkInstance::SetUsage(WatermarkInstance::Usage usage)
-{
-    this->m_usage = usage;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the appearance override property.
-//          The WatermarkAppearance is the type of appearance override in watermark instance.
-// RETURNS: The pointer of watermark appearance override.
-//-------------------------------------------------------------------------
-const WatermarkAppearance* WatermarkInstance::GetAppearanceOverride() const
-{
-    return this->m_appearanceOverride;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the appearance override property.
-//          The WatermarkAppearance is the type of appearance override in watermark instance.
-// RETURNS: The pointer of watermark appearance override.
-//-------------------------------------------------------------------------
-WatermarkAppearance* WatermarkInstance::GetAppearanceOverride()
-{
-    return this->m_appearanceOverride;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the appearance override property.
-//          The WatermarkAppearance is the type of appearance override in watermark instance.
-// PARAMETERS:
-//        Input:
-//          pAppearanceOverride - Adopted WatermarkAppearance object that is created on the heap.
-//                             It may be NULL.
-//-------------------------------------------------------------------------
-void WatermarkInstance::AdoptAppearanceOverride(WatermarkAppearance* pAppearanceOverride)
-{
-    if (this->m_appearanceOverride != pAppearanceOverride)
-    {
-        delete this->m_appearanceOverride;
-        this->m_appearanceOverride = pAppearanceOverride;
-    }
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the appearance override property.
-//          The WatermarkAppearance is the type of appearance override in watermark instance.
-// RETURNS: The pointer to the orphaned WatermarkAppearance object. It may be NULL.
-//-------------------------------------------------------------------------
-WatermarkAppearance* WatermarkInstance::OrphanAppearanceOverride()
-{
-    WatermarkAppearance* pRet = this->m_appearanceOverride;
-    this->m_appearanceOverride = NULL;
-    return pRet;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the position override property.
-//          The WatermarkPosition is the type of position override in watermark instance.
-// RETURNS: The pointer of watermark position override.
-//-------------------------------------------------------------------------
-const WatermarkPosition* WatermarkInstance::GetPositionOverride() const
-{
-    return this->m_positionOverride;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the position override property.
-//          The WatermarkPosition is the type of position override in watermark instance.
-// RETURNS: The pointer of watermark position override.
-//-------------------------------------------------------------------------
-WatermarkPosition* WatermarkInstance::GetPositionOverride()
-{
-    return this->m_positionOverride;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the position property override.
-//          The WatermarkPosition is the type of position override in watermark instance.
-// PARAMETERS:
-//        Input:
-//          pPosition - Adopted WatermarkPosition object that is created on the heap.
-//                             It may be NULL.
-//-------------------------------------------------------------------------
-void WatermarkInstance::AdoptPositionOverride(WatermarkPosition* pPositionOverride)
-{
-    if (this->m_positionOverride != pPositionOverride)
-    {
-        delete this->m_positionOverride;
-        this->m_positionOverride = pPositionOverride;
-    }
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the position property override.
-//          The WatermarkPosition is the type of position override in watermark instance.
-// RETURNS: The pointer to the orphaned WatermarkPosition object. It may be NULL.
-//-------------------------------------------------------------------------
-WatermarkPosition* WatermarkInstance::OrphanPositionOverride()
-{
-    WatermarkPosition* pRet = this->m_positionOverride;
-    this->m_positionOverride = NULL;
-    return pRet;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the watermark definition property.
-//          The WatermarkDefinition is the type of watermark definition.
-// RETURNS: The pointer of watermark definition.
-//-------------------------------------------------------------------------
-const WatermarkDefinition* WatermarkInstance::GetWatermarkDefinition() const
-{
-    return this->m_pWatermarkDefinition;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the watermark definition property.
-//          The WatermarkDefinition is the type of watermark definition.
-// RETURNS: The pointer of watermark definition.
-//-------------------------------------------------------------------------
-WatermarkDefinition* WatermarkInstance::GetWatermarkDefinition()
-{
-    return this->m_pWatermarkDefinition;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the watermark definition property.
-//          The WatermarkDefinition is the type of watermark definition.
-// PARAMETERS:
-//        Input:
-//          pWatermarkDefinition - Adopted WatermarkDefinition object that is created on the heap.
-//                             It may be NULL.
-//-------------------------------------------------------------------------
-void WatermarkInstance::AdoptWatermarkDefinition(WatermarkDefinition* pWatermarkDefinition)
-{
-    if (this->m_pWatermarkDefinition != pWatermarkDefinition)
-    {
-        delete this->m_pWatermarkDefinition;
-        this->m_pWatermarkDefinition = pWatermarkDefinition;
-    }
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the watermark definition property.
-//          The WatermarkDefinition is the type of watermark definition.
-// RETURNS: The pointer to the orphaned WatermarkDefinition object. It may be NULL.
-//-------------------------------------------------------------------------
-WatermarkDefinition* WatermarkInstance::OrphanWatermarkDefinition()
-{
-    WatermarkDefinition* pRet = this->m_pWatermarkDefinition;
-    this->m_pWatermarkDefinition = NULL;
-    return pRet;
-}
-
-//-------------------------------------------------------------------------
-// Determines whether this instance is the same as the supplied one.
-//-------------------------------------------------------------------------
-bool WatermarkInstance::Equals(WatermarkInstance* another)
-{
-    if (!another)
-        return false;
-
-    // check resource ID
-    if (::wcscmp(this->m_strResourceId.c_str(), another->m_strResourceId.c_str())) 
-        return false;
-
-    // check appearance
-    if (!this->m_appearanceOverride)
-    {
-        if (another->m_appearanceOverride)
-            return false;
-    }
-    else if (!this->m_appearanceOverride->Equals(another->m_appearanceOverride))
-        return false;
-
-    // check position
-    if (!this->m_positionOverride)
-    {
-        if (another->m_positionOverride)
-            return false;
-    }
-    else if (!this->m_positionOverride->Equals(another->m_positionOverride))
-        return false;
-
-    // all checks passed
-    return true;
-}
-
-#ifdef _WIN32
-#ifdef _DEBUG
-int WatermarkInstance::DumpMemoryLeaks()
-{
-    return _CrtDumpMemoryLeaks();
-}
-#endif
-#endif
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+//-------------------------------------------------------------------------
+// DESCRIPTION:
+// WatermarkInstance Class implementation.
+//-------------------------------------------------------------------------
+
+#include "stdafx.h"
+#include "WatermarkInstance.h"
+
+using namespace MDFMODEL_NAMESPACE;
+
+//-------------------------------------------------------------------------
+// PURPOSE: Construct and initialize an instance of the WatermarkInstance class.
+// PARAMETERS:
+//     Input:
+//          strName - the unique WatermarkInstance name. Cannot be an empty string.
+//          strResourceId - the resource ID for the watermark definition.
+//-------------------------------------------------------------------------
+WatermarkInstance::WatermarkInstance(const MdfString& strName, const MdfString& strResourceId)
+{
+    this->m_strName = strName;
+    this->m_strResourceId = strResourceId;
+    this->m_usage = All;
+    this->m_appearanceOverride = NULL;
+    this->m_positionOverride = NULL;
+    this->m_pWatermarkDefinition = NULL;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Destructor. Release any dynamically allocated resources.
+//-------------------------------------------------------------------------
+WatermarkInstance::~WatermarkInstance()
+{
+    delete this->m_appearanceOverride;
+    delete this->m_positionOverride;
+    delete this->m_pWatermarkDefinition;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor for the unique WatermarkInstance name.
+//-------------------------------------------------------------------------
+const MdfString& WatermarkInstance::GetName() const
+{
+    return this->m_strName;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor to the WatermarkInstance name.
+// PARAMETERS:
+//     Input:
+//          strName - unique WatermarkInstance name
+//-------------------------------------------------------------------------
+void WatermarkInstance::SetName(const MdfString& strName)
+{
+    this->m_strName = strName;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor for the WatermarkDefinition resource ID that this WatermarkInstance references.
+// RETURNS:
+//-------------------------------------------------------------------------
+const MdfString& WatermarkInstance::GetResourceId() const
+{
+    return this->m_strResourceId;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor to the WatermarkDefinition Uri that this WatermarkInstance references.
+// PARAMETERS:
+//      Input:
+//          strResourceId - the watermark resource ID for this WatermarkInstance
+//-------------------------------------------------------------------------
+void WatermarkInstance::SetResourceId(const MdfString& strResourceId)
+{
+    this->m_strResourceId = strResourceId;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Gets a value determining the meaning of the Usage property value.
+// RETURNS: The type of value stored in the Usage property.
+//-------------------------------------------------------------------------
+const WatermarkInstance::Usage WatermarkInstance::GetUsage() const
+{
+    return this->m_usage;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Sets a value determining the meaning of the Usage property value.
+// PARAMETERS:
+//          unit - The type of value stored in the Usage property.
+//-------------------------------------------------------------------------
+void WatermarkInstance::SetUsage(WatermarkInstance::Usage usage)
+{
+    this->m_usage = usage;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the appearance override property.
+//          The WatermarkAppearance is the type of appearance override in watermark instance.
+// RETURNS: The pointer of watermark appearance override.
+//-------------------------------------------------------------------------
+const WatermarkAppearance* WatermarkInstance::GetAppearanceOverride() const
+{
+    return this->m_appearanceOverride;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the appearance override property.
+//          The WatermarkAppearance is the type of appearance override in watermark instance.
+// RETURNS: The pointer of watermark appearance override.
+//-------------------------------------------------------------------------
+WatermarkAppearance* WatermarkInstance::GetAppearanceOverride()
+{
+    return this->m_appearanceOverride;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the appearance override property.
+//          The WatermarkAppearance is the type of appearance override in watermark instance.
+// PARAMETERS:
+//        Input:
+//          pAppearanceOverride - Adopted WatermarkAppearance object that is created on the heap.
+//                             It may be NULL.
+//-------------------------------------------------------------------------
+void WatermarkInstance::AdoptAppearanceOverride(WatermarkAppearance* pAppearanceOverride)
+{
+    if (this->m_appearanceOverride != pAppearanceOverride)
+    {
+        delete this->m_appearanceOverride;
+        this->m_appearanceOverride = pAppearanceOverride;
+    }
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the appearance override property.
+//          The WatermarkAppearance is the type of appearance override in watermark instance.
+// RETURNS: The pointer to the orphaned WatermarkAppearance object. It may be NULL.
+//-------------------------------------------------------------------------
+WatermarkAppearance* WatermarkInstance::OrphanAppearanceOverride()
+{
+    WatermarkAppearance* pRet = this->m_appearanceOverride;
+    this->m_appearanceOverride = NULL;
+    return pRet;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the position override property.
+//          The WatermarkPosition is the type of position override in watermark instance.
+// RETURNS: The pointer of watermark position override.
+//-------------------------------------------------------------------------
+const WatermarkPosition* WatermarkInstance::GetPositionOverride() const
+{
+    return this->m_positionOverride;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the position override property.
+//          The WatermarkPosition is the type of position override in watermark instance.
+// RETURNS: The pointer of watermark position override.
+//-------------------------------------------------------------------------
+WatermarkPosition* WatermarkInstance::GetPositionOverride()
+{
+    return this->m_positionOverride;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the position property override.
+//          The WatermarkPosition is the type of position override in watermark instance.
+// PARAMETERS:
+//        Input:
+//          pPosition - Adopted WatermarkPosition object that is created on the heap.
+//                             It may be NULL.
+//-------------------------------------------------------------------------
+void WatermarkInstance::AdoptPositionOverride(WatermarkPosition* pPositionOverride)
+{
+    if (this->m_positionOverride != pPositionOverride)
+    {
+        delete this->m_positionOverride;
+        this->m_positionOverride = pPositionOverride;
+    }
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the position property override.
+//          The WatermarkPosition is the type of position override in watermark instance.
+// RETURNS: The pointer to the orphaned WatermarkPosition object. It may be NULL.
+//-------------------------------------------------------------------------
+WatermarkPosition* WatermarkInstance::OrphanPositionOverride()
+{
+    WatermarkPosition* pRet = this->m_positionOverride;
+    this->m_positionOverride = NULL;
+    return pRet;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the watermark definition property.
+//          The WatermarkDefinition is the type of watermark definition.
+// RETURNS: The pointer of watermark definition.
+//-------------------------------------------------------------------------
+const WatermarkDefinition* WatermarkInstance::GetWatermarkDefinition() const
+{
+    return this->m_pWatermarkDefinition;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the watermark definition property.
+//          The WatermarkDefinition is the type of watermark definition.
+// RETURNS: The pointer of watermark definition.
+//-------------------------------------------------------------------------
+WatermarkDefinition* WatermarkInstance::GetWatermarkDefinition()
+{
+    return this->m_pWatermarkDefinition;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the watermark definition property.
+//          The WatermarkDefinition is the type of watermark definition.
+// PARAMETERS:
+//        Input:
+//          pWatermarkDefinition - Adopted WatermarkDefinition object that is created on the heap.
+//                             It may be NULL.
+//-------------------------------------------------------------------------
+void WatermarkInstance::AdoptWatermarkDefinition(WatermarkDefinition* pWatermarkDefinition)
+{
+    if (this->m_pWatermarkDefinition != pWatermarkDefinition)
+    {
+        delete this->m_pWatermarkDefinition;
+        this->m_pWatermarkDefinition = pWatermarkDefinition;
+    }
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the watermark definition property.
+//          The WatermarkDefinition is the type of watermark definition.
+// RETURNS: The pointer to the orphaned WatermarkDefinition object. It may be NULL.
+//-------------------------------------------------------------------------
+WatermarkDefinition* WatermarkInstance::OrphanWatermarkDefinition()
+{
+    WatermarkDefinition* pRet = this->m_pWatermarkDefinition;
+    this->m_pWatermarkDefinition = NULL;
+    return pRet;
+}
+
+//-------------------------------------------------------------------------
+// Determines whether this instance is the same as the supplied one.
+//-------------------------------------------------------------------------
+bool WatermarkInstance::Equals(WatermarkInstance* another)
+{
+    if (!another)
+        return false;
+
+    // check resource ID
+    if (::wcscmp(this->m_strResourceId.c_str(), another->m_strResourceId.c_str())) 
+        return false;
+
+    // check appearance
+    if (!this->m_appearanceOverride)
+    {
+        if (another->m_appearanceOverride)
+            return false;
+    }
+    else if (!this->m_appearanceOverride->Equals(another->m_appearanceOverride))
+        return false;
+
+    // check position
+    if (!this->m_positionOverride)
+    {
+        if (another->m_positionOverride)
+            return false;
+    }
+    else if (!this->m_positionOverride->Equals(another->m_positionOverride))
+        return false;
+
+    // all checks passed
+    return true;
+}
+
+#ifdef _WIN32
+#ifdef _DEBUG
+int WatermarkInstance::DumpMemoryLeaks()
+{
+    return _CrtDumpMemoryLeaks();
+}
+#endif
+#endif


Property changes on: trunk/MgDev/Common/MdfModel/WatermarkInstance.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/WatermarkInstance.h
===================================================================
--- trunk/MgDev/Common/MdfModel/WatermarkInstance.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/WatermarkInstance.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,116 +1,116 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef WATERMARKINSTANCE_H_
-#define WATERMARKINSTANCE_H_
-
-#include "MdfModel.h"
-#include "MdfRootObject.h"
-#include "MdfOwnerCollection.h"
-#include "WatermarkDefinition.h"
-#include "WatermarkAppearance.h"
-#include "WatermarkPosition.h"
-
-BEGIN_NAMESPACE_MDFMODEL
-
-    //-------------------------------------------------------------------------
-    // DESCRIPTION:
-    // WatermarkInstance defines how a watermark should be made part of a layer / map.
-    // It is important to note, that multiple WatermarkInstance can hold onto the same
-    // reference of a WatermarkDefinition object. It is the user's responsibility to ensure
-    // that duplicated WatermarkDefinitions are deleted.
-    //------------------------------------------------------------------------
-    class MDFMODEL_API WatermarkInstance : public MdfRootObject
-    {
-    public:
-
-        // Describes the content of the Usage property
-        enum Usage
-        {
-            WMS = 1,
-            Viewer = 2,
-            All = WMS | Viewer
-        };
-
-        // Construction, destruction, initialization.
-        WatermarkInstance(const MdfString& strName, const MdfString& strWatermarkResourceID);
-        virtual ~WatermarkInstance();
-
-        // Operations
-
-        // Property : Name
-        // The name of WatermarkInstance.  Must be a unique WatermarkInstance name.
-        const MdfString& GetName() const;
-        void SetName(const MdfString& strName);
-
-        // Property : ResourceId
-        // The Watermark resource ID that this WatermarkInstance refers to for its WatermarkDefinition object.
-        const MdfString& GetResourceId() const;
-        void SetResourceId(const MdfString& strResourceId);
-
-        // Property: Usage
-        const Usage GetUsage() const;
-        void SetUsage(Usage usage);
-
-        // Property: AppearanceOverride
-        const WatermarkAppearance* GetAppearanceOverride() const;
-        WatermarkAppearance* GetAppearanceOverride();
-        void AdoptAppearanceOverride(WatermarkAppearance* pAppearanceOverride);
-        WatermarkAppearance* OrphanAppearanceOverride();
-
-        // Property: PositionOverride
-        const WatermarkPosition* GetPositionOverride() const;
-        WatermarkPosition* GetPositionOverride();
-        void AdoptPositionOverride(WatermarkPosition* pPositionOverride);
-        WatermarkPosition* OrphanPositionOverride();
-
-        // Property : WatermarkDefinition
-        // WatermarkDefinition that this WatermarkInstance refers to.
-        const WatermarkDefinition* GetWatermarkDefinition() const;
-        WatermarkDefinition* GetWatermarkDefinition();
-        void AdoptWatermarkDefinition(WatermarkDefinition* pWatermarkDefinition);
-        WatermarkDefinition* OrphanWatermarkDefinition();
-
-        bool Equals(WatermarkInstance* another);
-
-//#ifdef _WIN32
-#if _DEBUG
-        // for memory leak testing
-        static int DumpMemoryLeaks();
-#endif
-//#endif
-
-    private:
-        // Hidden WatermarkInstance copy constructor and assignment operator.
-        WatermarkInstance(const WatermarkInstance&);
-        WatermarkInstance& operator=(const WatermarkInstance&);
-
-        // Data members
-        // See corresponding properties for descriptions
-        MdfString m_strName;
-        MdfString m_strResourceId;
-        Usage m_usage;
-        WatermarkAppearance* m_appearanceOverride;
-        WatermarkPosition* m_positionOverride;
-        WatermarkDefinition* m_pWatermarkDefinition;
-    };
-
-    typedef MdfOwnerCollection<WatermarkInstance> WatermarkInstanceCollection;
-    EXPIMP_TEMPLATE template class MDFMODEL_API MdfOwnerCollection<WatermarkInstance>;
-
-END_NAMESPACE_MDFMODEL
-#endif // WATERMARKINSTANCE_H_
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef WATERMARKINSTANCE_H_
+#define WATERMARKINSTANCE_H_
+
+#include "MdfModel.h"
+#include "MdfRootObject.h"
+#include "MdfOwnerCollection.h"
+#include "WatermarkDefinition.h"
+#include "WatermarkAppearance.h"
+#include "WatermarkPosition.h"
+
+BEGIN_NAMESPACE_MDFMODEL
+
+    //-------------------------------------------------------------------------
+    // DESCRIPTION:
+    // WatermarkInstance defines how a watermark should be made part of a layer / map.
+    // It is important to note, that multiple WatermarkInstance can hold onto the same
+    // reference of a WatermarkDefinition object. It is the user's responsibility to ensure
+    // that duplicated WatermarkDefinitions are deleted.
+    //------------------------------------------------------------------------
+    class MDFMODEL_API WatermarkInstance : public MdfRootObject
+    {
+    public:
+
+        // Describes the content of the Usage property
+        enum Usage
+        {
+            WMS = 1,
+            Viewer = 2,
+            All = WMS | Viewer
+        };
+
+        // Construction, destruction, initialization.
+        WatermarkInstance(const MdfString& strName, const MdfString& strWatermarkResourceID);
+        virtual ~WatermarkInstance();
+
+        // Operations
+
+        // Property : Name
+        // The name of WatermarkInstance.  Must be a unique WatermarkInstance name.
+        const MdfString& GetName() const;
+        void SetName(const MdfString& strName);
+
+        // Property : ResourceId
+        // The Watermark resource ID that this WatermarkInstance refers to for its WatermarkDefinition object.
+        const MdfString& GetResourceId() const;
+        void SetResourceId(const MdfString& strResourceId);
+
+        // Property: Usage
+        const Usage GetUsage() const;
+        void SetUsage(Usage usage);
+
+        // Property: AppearanceOverride
+        const WatermarkAppearance* GetAppearanceOverride() const;
+        WatermarkAppearance* GetAppearanceOverride();
+        void AdoptAppearanceOverride(WatermarkAppearance* pAppearanceOverride);
+        WatermarkAppearance* OrphanAppearanceOverride();
+
+        // Property: PositionOverride
+        const WatermarkPosition* GetPositionOverride() const;
+        WatermarkPosition* GetPositionOverride();
+        void AdoptPositionOverride(WatermarkPosition* pPositionOverride);
+        WatermarkPosition* OrphanPositionOverride();
+
+        // Property : WatermarkDefinition
+        // WatermarkDefinition that this WatermarkInstance refers to.
+        const WatermarkDefinition* GetWatermarkDefinition() const;
+        WatermarkDefinition* GetWatermarkDefinition();
+        void AdoptWatermarkDefinition(WatermarkDefinition* pWatermarkDefinition);
+        WatermarkDefinition* OrphanWatermarkDefinition();
+
+        bool Equals(WatermarkInstance* another);
+
+//#ifdef _WIN32
+#if _DEBUG
+        // for memory leak testing
+        static int DumpMemoryLeaks();
+#endif
+//#endif
+
+    private:
+        // Hidden WatermarkInstance copy constructor and assignment operator.
+        WatermarkInstance(const WatermarkInstance&);
+        WatermarkInstance& operator=(const WatermarkInstance&);
+
+        // Data members
+        // See corresponding properties for descriptions
+        MdfString m_strName;
+        MdfString m_strResourceId;
+        Usage m_usage;
+        WatermarkAppearance* m_appearanceOverride;
+        WatermarkPosition* m_positionOverride;
+        WatermarkDefinition* m_pWatermarkDefinition;
+    };
+
+    typedef MdfOwnerCollection<WatermarkInstance> WatermarkInstanceCollection;
+    EXPIMP_TEMPLATE template class MDFMODEL_API MdfOwnerCollection<WatermarkInstance>;
+
+END_NAMESPACE_MDFMODEL
+#endif // WATERMARKINSTANCE_H_


Property changes on: trunk/MgDev/Common/MdfModel/WatermarkInstance.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/WatermarkOffsetUnit.h
===================================================================
--- trunk/MgDev/Common/MdfModel/WatermarkOffsetUnit.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/WatermarkOffsetUnit.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,43 +1,43 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef WATERMARKOFFSETUNIT_H_
-#define WATERMARKOFFSETUNIT_H_     
-
-#include "MdfModel.h"
-
-BEGIN_NAMESPACE_MDFMODEL
-
-    namespace WatermarkOffset
-    {
-        //-------------------------------------------------------------------------
-        // DESCRIPTION:
-        // The WatermarkOffsetUnit enum is to describe the content of the Unit
-        // property in watermark offset.
-        //------------------------------------------------------------------------
-        enum WatermarkOffsetUnit
-        {
-            Inches,
-            Centimeters,
-            Millimeters,
-            Pixels,
-            Points
-        };
-    }
-
-END_NAMESPACE_MDFMODEL
-#endif // WATERMARKOFFSETUNIT_H_
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef WATERMARKOFFSETUNIT_H_
+#define WATERMARKOFFSETUNIT_H_     
+
+#include "MdfModel.h"
+
+BEGIN_NAMESPACE_MDFMODEL
+
+    namespace WatermarkOffset
+    {
+        //-------------------------------------------------------------------------
+        // DESCRIPTION:
+        // The WatermarkOffsetUnit enum is to describe the content of the Unit
+        // property in watermark offset.
+        //------------------------------------------------------------------------
+        enum WatermarkOffsetUnit
+        {
+            Inches,
+            Centimeters,
+            Millimeters,
+            Pixels,
+            Points
+        };
+    }
+
+END_NAMESPACE_MDFMODEL
+#endif // WATERMARKOFFSETUNIT_H_


Property changes on: trunk/MgDev/Common/MdfModel/WatermarkOffsetUnit.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/WatermarkPosition.cpp
===================================================================
--- trunk/MgDev/Common/MdfModel/WatermarkPosition.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/WatermarkPosition.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,40 +1,40 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-//-------------------------------------------------------------------------
-// DESCRIPTION:
-// The WatermarkPosition class implementation.
-//-------------------------------------------------------------------------
-
-#include "stdafx.h"
-#include "WatermarkPosition.h"
-
-using namespace MDFMODEL_NAMESPACE;
-
-//-------------------------------------------------------------------------
-// PURPOSE: Construct and initialize an instance of the WatermarkPosition class.
-//-------------------------------------------------------------------------
-WatermarkPosition::WatermarkPosition()
-{
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Destructor. Release any dynamically allocated resources.
-//-------------------------------------------------------------------------
-WatermarkPosition::~WatermarkPosition()
-{
-}
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+//-------------------------------------------------------------------------
+// DESCRIPTION:
+// The WatermarkPosition class implementation.
+//-------------------------------------------------------------------------
+
+#include "stdafx.h"
+#include "WatermarkPosition.h"
+
+using namespace MDFMODEL_NAMESPACE;
+
+//-------------------------------------------------------------------------
+// PURPOSE: Construct and initialize an instance of the WatermarkPosition class.
+//-------------------------------------------------------------------------
+WatermarkPosition::WatermarkPosition()
+{
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Destructor. Release any dynamically allocated resources.
+//-------------------------------------------------------------------------
+WatermarkPosition::~WatermarkPosition()
+{
+}


Property changes on: trunk/MgDev/Common/MdfModel/WatermarkPosition.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/WatermarkPosition.h
===================================================================
--- trunk/MgDev/Common/MdfModel/WatermarkPosition.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/WatermarkPosition.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,46 +1,46 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef WATERMARKPOSITION_H_
-#define WATERMARKPOSITION_H_
-
-#include "MdfModel.h"
-#include "MdfRootObject.h"
-
-BEGIN_NAMESPACE_MDFMODEL
-
-    //-------------------------------------------------------------------------
-    // DESCRIPTION:
-    // The WatermarkPosition class is the abstract class of position.
-    // It doesn't contain any field inside itself.
-    //------------------------------------------------------------------------
-    class MDFMODEL_API WatermarkPosition : public MdfRootObject
-    {
-    public:
-        // Destruction
-        virtual ~WatermarkPosition();
-
-        virtual bool Equals(WatermarkPosition* another) = 0;
-
-    protected:
-        // Construction, initialization
-        // Default constructor is protected to make this class abstract.
-        WatermarkPosition();
-    };
-
-END_NAMESPACE_MDFMODEL
-#endif // WATERMARKPOSITION_H_
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef WATERMARKPOSITION_H_
+#define WATERMARKPOSITION_H_
+
+#include "MdfModel.h"
+#include "MdfRootObject.h"
+
+BEGIN_NAMESPACE_MDFMODEL
+
+    //-------------------------------------------------------------------------
+    // DESCRIPTION:
+    // The WatermarkPosition class is the abstract class of position.
+    // It doesn't contain any field inside itself.
+    //------------------------------------------------------------------------
+    class MDFMODEL_API WatermarkPosition : public MdfRootObject
+    {
+    public:
+        // Destruction
+        virtual ~WatermarkPosition();
+
+        virtual bool Equals(WatermarkPosition* another) = 0;
+
+    protected:
+        // Construction, initialization
+        // Default constructor is protected to make this class abstract.
+        WatermarkPosition();
+    };
+
+END_NAMESPACE_MDFMODEL
+#endif // WATERMARKPOSITION_H_


Property changes on: trunk/MgDev/Common/MdfModel/WatermarkPosition.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/WatermarkXOffset.cpp
===================================================================
--- trunk/MgDev/Common/MdfModel/WatermarkXOffset.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/WatermarkXOffset.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,121 +1,121 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-//-------------------------------------------------------------------------
-// DESCRIPTION:
-// The WatermarkXOffset class implementation.
-// WatermarkXOffset class is to define the offset of watermark at one dimension.
-//-------------------------------------------------------------------------
-
-#include "stdafx.h"
-#include <cmath>
-#include "WatermarkXOffset.h"
-
-using namespace MDFMODEL_NAMESPACE;
-
-const double WatermarkXOffset::doubleTolerance = 0.01;
-
-//-------------------------------------------------------------------------
-// PURPOSE: Construct and initialize an instance of the WatermarkXOffset class.
-//-------------------------------------------------------------------------
-WatermarkXOffset::WatermarkXOffset()
-{
-    this->m_offset = 0.0;
-    this->m_unit = WatermarkOffset::Points;
-    this->m_alignment = Center;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Destructor. Release any dynamically allocated resources.
-//-------------------------------------------------------------------------
-WatermarkXOffset::~WatermarkXOffset()
-{
-}
-
-//-------------------------------------------------------------------------
-// Get the offset length.
-//-------------------------------------------------------------------------
-double WatermarkXOffset::GetOffset() const
-{
-    return this->m_offset;
-}
-
-//-------------------------------------------------------------------------
-// Set the offset length.
-//-------------------------------------------------------------------------
-void WatermarkXOffset::SetOffset(const double& dOffset)
-{
-    this->m_offset = dOffset;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Gets a value determining the meaning of the Unit property value.
-// RETURNS: The type of value stored in the Unit property.
-//-------------------------------------------------------------------------
-WatermarkOffset::WatermarkOffsetUnit WatermarkXOffset::GetUnit() const
-{
-    return this->m_unit;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Sets a value determining the meaning of the Unit property value.
-// PARAMETERS:
-//          unit - The type of value stored in the Unit property.
-//-------------------------------------------------------------------------
-void WatermarkXOffset::SetUnit(WatermarkOffset::WatermarkOffsetUnit unit)
-{
-    this->m_unit = unit;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Gets a value determining the meaning of the Alignment property value.
-// RETURNS: The type of value stored in the Alignment property.
-//-------------------------------------------------------------------------
-WatermarkXOffset::HorizontalAlignment WatermarkXOffset::GetAlignment() const
-{
-    return this->m_alignment;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Sets a value determining the meaning of the Alignment property value.
-// PARAMETERS:
-//          alignment - The type of value stored in the Alignment property.
-//-------------------------------------------------------------------------
-void WatermarkXOffset::SetAlignment(WatermarkXOffset::HorizontalAlignment alignment)
-{
-    this->m_alignment = alignment;
-}
-
-//-------------------------------------------------------------------------
-// Determines whether this offset is the same as the supplied one.
-//-------------------------------------------------------------------------
-bool WatermarkXOffset::Equals(WatermarkXOffset* another)
-{
-    return another &&
-           fabs(this->m_offset - another->m_offset) < doubleTolerance &&
-           this->m_unit == another->m_unit &&
-           this->m_alignment == another->m_alignment;
-}
-
-#ifdef _WIN32
-#ifdef _DEBUG
-int WatermarkXOffset::DumpMemoryLeaks()
-{
-    return _CrtDumpMemoryLeaks();
-}
-#endif
-#endif
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+//-------------------------------------------------------------------------
+// DESCRIPTION:
+// The WatermarkXOffset class implementation.
+// WatermarkXOffset class is to define the offset of watermark at one dimension.
+//-------------------------------------------------------------------------
+
+#include "stdafx.h"
+#include <cmath>
+#include "WatermarkXOffset.h"
+
+using namespace MDFMODEL_NAMESPACE;
+
+const double WatermarkXOffset::doubleTolerance = 0.01;
+
+//-------------------------------------------------------------------------
+// PURPOSE: Construct and initialize an instance of the WatermarkXOffset class.
+//-------------------------------------------------------------------------
+WatermarkXOffset::WatermarkXOffset()
+{
+    this->m_offset = 0.0;
+    this->m_unit = WatermarkOffset::Points;
+    this->m_alignment = Center;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Destructor. Release any dynamically allocated resources.
+//-------------------------------------------------------------------------
+WatermarkXOffset::~WatermarkXOffset()
+{
+}
+
+//-------------------------------------------------------------------------
+// Get the offset length.
+//-------------------------------------------------------------------------
+double WatermarkXOffset::GetOffset() const
+{
+    return this->m_offset;
+}
+
+//-------------------------------------------------------------------------
+// Set the offset length.
+//-------------------------------------------------------------------------
+void WatermarkXOffset::SetOffset(const double& dOffset)
+{
+    this->m_offset = dOffset;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Gets a value determining the meaning of the Unit property value.
+// RETURNS: The type of value stored in the Unit property.
+//-------------------------------------------------------------------------
+WatermarkOffset::WatermarkOffsetUnit WatermarkXOffset::GetUnit() const
+{
+    return this->m_unit;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Sets a value determining the meaning of the Unit property value.
+// PARAMETERS:
+//          unit - The type of value stored in the Unit property.
+//-------------------------------------------------------------------------
+void WatermarkXOffset::SetUnit(WatermarkOffset::WatermarkOffsetUnit unit)
+{
+    this->m_unit = unit;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Gets a value determining the meaning of the Alignment property value.
+// RETURNS: The type of value stored in the Alignment property.
+//-------------------------------------------------------------------------
+WatermarkXOffset::HorizontalAlignment WatermarkXOffset::GetAlignment() const
+{
+    return this->m_alignment;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Sets a value determining the meaning of the Alignment property value.
+// PARAMETERS:
+//          alignment - The type of value stored in the Alignment property.
+//-------------------------------------------------------------------------
+void WatermarkXOffset::SetAlignment(WatermarkXOffset::HorizontalAlignment alignment)
+{
+    this->m_alignment = alignment;
+}
+
+//-------------------------------------------------------------------------
+// Determines whether this offset is the same as the supplied one.
+//-------------------------------------------------------------------------
+bool WatermarkXOffset::Equals(WatermarkXOffset* another)
+{
+    return another &&
+           fabs(this->m_offset - another->m_offset) < doubleTolerance &&
+           this->m_unit == another->m_unit &&
+           this->m_alignment == another->m_alignment;
+}
+
+#ifdef _WIN32
+#ifdef _DEBUG
+int WatermarkXOffset::DumpMemoryLeaks()
+{
+    return _CrtDumpMemoryLeaks();
+}
+#endif
+#endif


Property changes on: trunk/MgDev/Common/MdfModel/WatermarkXOffset.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/WatermarkXOffset.h
===================================================================
--- trunk/MgDev/Common/MdfModel/WatermarkXOffset.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/WatermarkXOffset.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,88 +1,88 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef WATERMARKXOFFSET_H_
-#define WATERMARKXOFFSET_H_
-
-#include "MdfModel.h"
-#include "MdfRootObject.h"
-#include "WatermarkOffsetUnit.h"
-
-BEGIN_NAMESPACE_MDFMODEL
-
-    //-------------------------------------------------------------------------
-    // DESCRIPTION:
-    // The WatermarkXOffest class is to define the offset in X-axis of the watermark.
-    //------------------------------------------------------------------------
-    class MDFMODEL_API WatermarkXOffset : public MdfRootObject
-    {
-    public:
-
-        // Describes the content of the Alignment property
-        enum HorizontalAlignment
-        {
-            Left,
-            Center,
-            Right
-        };
-
-        // Construction, destruction, initialization.
-        WatermarkXOffset();
-        virtual ~WatermarkXOffset();
-
-        // Operations
-        // Property: Offset
-        double GetOffset() const;
-        void SetOffset(const double& dOffset);
-
-        // Property : Unit
-        WatermarkOffset::WatermarkOffsetUnit GetUnit() const;
-        void SetUnit(WatermarkOffset::WatermarkOffsetUnit unit);
-
-        // Property : Alignment
-        HorizontalAlignment GetAlignment() const;
-        void SetAlignment(HorizontalAlignment alignment);
-
-        virtual bool Equals(WatermarkXOffset* another);
-
-//#ifdef _WIN32
-#if _DEBUG
-        // for memory leak testing
-        static int DumpMemoryLeaks();
-#endif
-//#endif
-
-    private:
-        // Hidden WatermarkXOffset copy constructor and assignment operator.
-        WatermarkXOffset(const WatermarkXOffset&);
-        WatermarkXOffset& operator=(const WatermarkXOffset&);
-
-        // Data members
-        // See corresponding properties for descriptions
-        double m_offset;
-
-        // The meaning of the string in the Unit property.
-        WatermarkOffset::WatermarkOffsetUnit m_unit;
-
-        // The meaning of the string in the Alignment property.
-        HorizontalAlignment m_alignment;
-
-        static const double doubleTolerance;
-    };
-
-END_NAMESPACE_MDFMODEL
-#endif // WATERMARKXOFFSET_H_
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef WATERMARKXOFFSET_H_
+#define WATERMARKXOFFSET_H_
+
+#include "MdfModel.h"
+#include "MdfRootObject.h"
+#include "WatermarkOffsetUnit.h"
+
+BEGIN_NAMESPACE_MDFMODEL
+
+    //-------------------------------------------------------------------------
+    // DESCRIPTION:
+    // The WatermarkXOffest class is to define the offset in X-axis of the watermark.
+    //------------------------------------------------------------------------
+    class MDFMODEL_API WatermarkXOffset : public MdfRootObject
+    {
+    public:
+
+        // Describes the content of the Alignment property
+        enum HorizontalAlignment
+        {
+            Left,
+            Center,
+            Right
+        };
+
+        // Construction, destruction, initialization.
+        WatermarkXOffset();
+        virtual ~WatermarkXOffset();
+
+        // Operations
+        // Property: Offset
+        double GetOffset() const;
+        void SetOffset(const double& dOffset);
+
+        // Property : Unit
+        WatermarkOffset::WatermarkOffsetUnit GetUnit() const;
+        void SetUnit(WatermarkOffset::WatermarkOffsetUnit unit);
+
+        // Property : Alignment
+        HorizontalAlignment GetAlignment() const;
+        void SetAlignment(HorizontalAlignment alignment);
+
+        virtual bool Equals(WatermarkXOffset* another);
+
+//#ifdef _WIN32
+#if _DEBUG
+        // for memory leak testing
+        static int DumpMemoryLeaks();
+#endif
+//#endif
+
+    private:
+        // Hidden WatermarkXOffset copy constructor and assignment operator.
+        WatermarkXOffset(const WatermarkXOffset&);
+        WatermarkXOffset& operator=(const WatermarkXOffset&);
+
+        // Data members
+        // See corresponding properties for descriptions
+        double m_offset;
+
+        // The meaning of the string in the Unit property.
+        WatermarkOffset::WatermarkOffsetUnit m_unit;
+
+        // The meaning of the string in the Alignment property.
+        HorizontalAlignment m_alignment;
+
+        static const double doubleTolerance;
+    };
+
+END_NAMESPACE_MDFMODEL
+#endif // WATERMARKXOFFSET_H_


Property changes on: trunk/MgDev/Common/MdfModel/WatermarkXOffset.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/WatermarkYOffset.cpp
===================================================================
--- trunk/MgDev/Common/MdfModel/WatermarkYOffset.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/WatermarkYOffset.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,121 +1,121 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-//-------------------------------------------------------------------------
-// DESCRIPTION:
-// The WatermarkYOffset class implementation.
-// WatermarkYOffset class is to define the offset of watermark at one dimension.
-//-------------------------------------------------------------------------
-
-#include "stdafx.h"
-#include <cmath>
-#include "WatermarkYOffset.h"
-
-using namespace MDFMODEL_NAMESPACE;
-
-const double WatermarkYOffset::doubleTolerance = 0.01;
-
-//-------------------------------------------------------------------------
-// PURPOSE: Construct and initialize an instance of the WatermarkYOffset class.
-//-------------------------------------------------------------------------
-WatermarkYOffset::WatermarkYOffset()
-{
-    this->m_offset = 0.0;
-    this->m_unit = WatermarkOffset::Points;
-    this->m_alignment = Center;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Destructor. Release any dynamically allocated resources.
-//-------------------------------------------------------------------------
-WatermarkYOffset::~WatermarkYOffset()
-{
-}
-
-//-------------------------------------------------------------------------
-// Get the offset length.
-//-------------------------------------------------------------------------
-double WatermarkYOffset::GetOffset() const
-{
-    return this->m_offset;
-}
-
-//-------------------------------------------------------------------------
-// Set the offset length.
-//-------------------------------------------------------------------------
-void WatermarkYOffset::SetOffset(const double& dOffset)
-{
-    this->m_offset = dOffset;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Gets a value determining the meaning of the Unit property value.
-// RETURNS: The type of value stored in the Unit property.
-//-------------------------------------------------------------------------
-WatermarkOffset::WatermarkOffsetUnit WatermarkYOffset::GetUnit() const
-{
-    return this->m_unit;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Sets a value determining the meaning of the Unit property value.
-// PARAMETERS:
-//          unit - The type of value stored in the Unit property.
-//-------------------------------------------------------------------------
-void WatermarkYOffset::SetUnit(WatermarkOffset::WatermarkOffsetUnit unit)
-{
-    this->m_unit = unit;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Gets a value determining the meaning of the Alignment property value.
-// RETURNS: The type of value stored in the Alignment property.
-//-------------------------------------------------------------------------
-WatermarkYOffset::VerticalAlignment WatermarkYOffset::GetAlignment() const
-{
-    return this->m_alignment;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Sets a value determining the meaning of the Alignment property value.
-// PARAMETERS:
-//          alignment - The type of value stored in the Alignment property.
-//-------------------------------------------------------------------------
-void WatermarkYOffset::SetAlignment(WatermarkYOffset::VerticalAlignment alignment)
-{
-    this->m_alignment = alignment;
-}
-
-//-------------------------------------------------------------------------
-// Determines whether this offset is the same as the supplied one.
-//-------------------------------------------------------------------------
-bool WatermarkYOffset::Equals(WatermarkYOffset* another)
-{
-    return another &&
-           fabs(this->m_offset - another->m_offset) < doubleTolerance &&
-           this->m_unit == another->m_unit &&
-           this->m_alignment == another->m_alignment;
-}
-
-#ifdef _WIN32
-#ifdef _DEBUG
-int WatermarkYOffset::DumpMemoryLeaks()
-{
-    return _CrtDumpMemoryLeaks();
-}
-#endif
-#endif
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+//-------------------------------------------------------------------------
+// DESCRIPTION:
+// The WatermarkYOffset class implementation.
+// WatermarkYOffset class is to define the offset of watermark at one dimension.
+//-------------------------------------------------------------------------
+
+#include "stdafx.h"
+#include <cmath>
+#include "WatermarkYOffset.h"
+
+using namespace MDFMODEL_NAMESPACE;
+
+const double WatermarkYOffset::doubleTolerance = 0.01;
+
+//-------------------------------------------------------------------------
+// PURPOSE: Construct and initialize an instance of the WatermarkYOffset class.
+//-------------------------------------------------------------------------
+WatermarkYOffset::WatermarkYOffset()
+{
+    this->m_offset = 0.0;
+    this->m_unit = WatermarkOffset::Points;
+    this->m_alignment = Center;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Destructor. Release any dynamically allocated resources.
+//-------------------------------------------------------------------------
+WatermarkYOffset::~WatermarkYOffset()
+{
+}
+
+//-------------------------------------------------------------------------
+// Get the offset length.
+//-------------------------------------------------------------------------
+double WatermarkYOffset::GetOffset() const
+{
+    return this->m_offset;
+}
+
+//-------------------------------------------------------------------------
+// Set the offset length.
+//-------------------------------------------------------------------------
+void WatermarkYOffset::SetOffset(const double& dOffset)
+{
+    this->m_offset = dOffset;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Gets a value determining the meaning of the Unit property value.
+// RETURNS: The type of value stored in the Unit property.
+//-------------------------------------------------------------------------
+WatermarkOffset::WatermarkOffsetUnit WatermarkYOffset::GetUnit() const
+{
+    return this->m_unit;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Sets a value determining the meaning of the Unit property value.
+// PARAMETERS:
+//          unit - The type of value stored in the Unit property.
+//-------------------------------------------------------------------------
+void WatermarkYOffset::SetUnit(WatermarkOffset::WatermarkOffsetUnit unit)
+{
+    this->m_unit = unit;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Gets a value determining the meaning of the Alignment property value.
+// RETURNS: The type of value stored in the Alignment property.
+//-------------------------------------------------------------------------
+WatermarkYOffset::VerticalAlignment WatermarkYOffset::GetAlignment() const
+{
+    return this->m_alignment;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Sets a value determining the meaning of the Alignment property value.
+// PARAMETERS:
+//          alignment - The type of value stored in the Alignment property.
+//-------------------------------------------------------------------------
+void WatermarkYOffset::SetAlignment(WatermarkYOffset::VerticalAlignment alignment)
+{
+    this->m_alignment = alignment;
+}
+
+//-------------------------------------------------------------------------
+// Determines whether this offset is the same as the supplied one.
+//-------------------------------------------------------------------------
+bool WatermarkYOffset::Equals(WatermarkYOffset* another)
+{
+    return another &&
+           fabs(this->m_offset - another->m_offset) < doubleTolerance &&
+           this->m_unit == another->m_unit &&
+           this->m_alignment == another->m_alignment;
+}
+
+#ifdef _WIN32
+#ifdef _DEBUG
+int WatermarkYOffset::DumpMemoryLeaks()
+{
+    return _CrtDumpMemoryLeaks();
+}
+#endif
+#endif


Property changes on: trunk/MgDev/Common/MdfModel/WatermarkYOffset.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/WatermarkYOffset.h
===================================================================
--- trunk/MgDev/Common/MdfModel/WatermarkYOffset.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/WatermarkYOffset.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,88 +1,88 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef WATERMARKYOFFSET_H_
-#define WATERMARKYOFFSET_H_
-
-#include "MdfModel.h"
-#include "MdfRootObject.h"
-#include "WatermarkOffsetUnit.h"
-
-BEGIN_NAMESPACE_MDFMODEL
-
-    //-------------------------------------------------------------------------
-    // DESCRIPTION:
-    // The WatermarkYOffest class is to define the offset in Y-axis of the watermark.
-    //------------------------------------------------------------------------
-    class MDFMODEL_API WatermarkYOffset : public MdfRootObject
-    {
-    public:
-
-        // Describes the content of the Alignment property
-        enum VerticalAlignment
-        {
-            Top,
-            Center,
-            Bottom
-        };
-
-        // Construction, destruction, initialization.
-        WatermarkYOffset();
-        virtual ~WatermarkYOffset();
-
-        // Operations
-        // Property: Offset
-        double GetOffset() const;
-        void SetOffset(const double& dOffset);
-
-        // Property : Unit
-        WatermarkOffset::WatermarkOffsetUnit GetUnit() const;
-        void SetUnit(WatermarkOffset::WatermarkOffsetUnit unit);
-
-        // Property : Alignment
-        VerticalAlignment GetAlignment() const;
-        void SetAlignment(VerticalAlignment alignment);
-
-        virtual bool Equals(WatermarkYOffset* another);
-
-//#ifdef _WIN32
-#if _DEBUG
-        // for memory leak testing
-        static int DumpMemoryLeaks();
-#endif
-//#endif
-
-    private:
-        // Hidden WatermarkYOffset copy constructor and assignment operator.
-        WatermarkYOffset(const WatermarkYOffset&);
-        WatermarkYOffset& operator=(const WatermarkYOffset&);
-
-        // Data members
-        // See corresponding properties for descriptions
-        double m_offset;
-
-        // The meaning of the string in the Unit property.
-        WatermarkOffset::WatermarkOffsetUnit m_unit;
-
-        // The meaning of the string in the Alignment property.
-        VerticalAlignment m_alignment;
-
-        static const double doubleTolerance;
-    };
-
-END_NAMESPACE_MDFMODEL
-#endif // WATERMARKYOFFSET_H_
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef WATERMARKYOFFSET_H_
+#define WATERMARKYOFFSET_H_
+
+#include "MdfModel.h"
+#include "MdfRootObject.h"
+#include "WatermarkOffsetUnit.h"
+
+BEGIN_NAMESPACE_MDFMODEL
+
+    //-------------------------------------------------------------------------
+    // DESCRIPTION:
+    // The WatermarkYOffest class is to define the offset in Y-axis of the watermark.
+    //------------------------------------------------------------------------
+    class MDFMODEL_API WatermarkYOffset : public MdfRootObject
+    {
+    public:
+
+        // Describes the content of the Alignment property
+        enum VerticalAlignment
+        {
+            Top,
+            Center,
+            Bottom
+        };
+
+        // Construction, destruction, initialization.
+        WatermarkYOffset();
+        virtual ~WatermarkYOffset();
+
+        // Operations
+        // Property: Offset
+        double GetOffset() const;
+        void SetOffset(const double& dOffset);
+
+        // Property : Unit
+        WatermarkOffset::WatermarkOffsetUnit GetUnit() const;
+        void SetUnit(WatermarkOffset::WatermarkOffsetUnit unit);
+
+        // Property : Alignment
+        VerticalAlignment GetAlignment() const;
+        void SetAlignment(VerticalAlignment alignment);
+
+        virtual bool Equals(WatermarkYOffset* another);
+
+//#ifdef _WIN32
+#if _DEBUG
+        // for memory leak testing
+        static int DumpMemoryLeaks();
+#endif
+//#endif
+
+    private:
+        // Hidden WatermarkYOffset copy constructor and assignment operator.
+        WatermarkYOffset(const WatermarkYOffset&);
+        WatermarkYOffset& operator=(const WatermarkYOffset&);
+
+        // Data members
+        // See corresponding properties for descriptions
+        double m_offset;
+
+        // The meaning of the string in the Unit property.
+        WatermarkOffset::WatermarkOffsetUnit m_unit;
+
+        // The meaning of the string in the Alignment property.
+        VerticalAlignment m_alignment;
+
+        static const double doubleTolerance;
+    };
+
+END_NAMESPACE_MDFMODEL
+#endif // WATERMARKYOFFSET_H_


Property changes on: trunk/MgDev/Common/MdfModel/WatermarkYOffset.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/XYWatermarkPosition.cpp
===================================================================
--- trunk/MgDev/Common/MdfModel/XYWatermarkPosition.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/XYWatermarkPosition.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,184 +1,184 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-//-------------------------------------------------------------------------
-// DESCRIPTION:
-// The XYWatermarkPosition class implementation.
-// XYWatermarkPosition class is one implementation of WatermarkPosition to 
-// define the position of watermark.
-//-------------------------------------------------------------------------
-
-#include "stdafx.h"
-#include "XYWatermarkPosition.h"
-
-using namespace MDFMODEL_NAMESPACE;
-
-//-------------------------------------------------------------------------
-// PURPOSE: Construct and initialize an instance of the XYWatermarkPosition class.
-//-------------------------------------------------------------------------
-XYWatermarkPosition::XYWatermarkPosition()
-{
-    this->m_XPosition = NULL;
-    this->m_YPosition = NULL;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Destructor. Release any dynamically allocated resources.
-//-------------------------------------------------------------------------
-XYWatermarkPosition::~XYWatermarkPosition()
-{
-    delete this->m_XPosition;
-    delete this->m_YPosition;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the XPosition property.
-//          The WatermarkXOffset is the type of offset used in the position of watermark.
-// RETURNS: The pointer of WatermarkXOffset.
-//-------------------------------------------------------------------------
-const WatermarkXOffset* XYWatermarkPosition::GetXPosition() const
-{
-    return this->m_XPosition;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the XPosition property.
-//          The WatermarkXOffset is the type of offset used in the position of watermark.
-// RETURNS: The pointer of WatermarkXOffset.
-//-------------------------------------------------------------------------
-WatermarkXOffset* XYWatermarkPosition::GetXPosition()
-{
-    return this->m_XPosition;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the XPosition property.
-//          The WatermarkXOffset is the type of offset used in the position of watermark.
-// PARAMETERS:
-//        Input:
-//          pXPosition - Adopted WatermarkXOffset object that is created on the heap.
-//                             It may be NULL.
-//-------------------------------------------------------------------------
-void XYWatermarkPosition::AdoptXPosition(WatermarkXOffset* pXPosition)
-{
-    if (this->m_XPosition != pXPosition)
-    {
-        delete this->m_XPosition;
-        this->m_XPosition = pXPosition;
-    }
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the XPosition property.
-//          The WatermarkXOffset is the type of offset used in the position of watermark.
-// RETURNS: The pointer to the orphaned WatermarkXOffset object. It may be NULL.
-//-------------------------------------------------------------------------
-WatermarkXOffset* XYWatermarkPosition::OrphanXPosition()
-{
-    WatermarkXOffset* pRet = this->m_XPosition;
-    this->m_XPosition = NULL;
-    return pRet;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the YPosition property.
-//          The WatermarkYOffset is the type of offset used in the position of watermark.
-// RETURNS: The pointer of WatermarkYOffset.
-//-------------------------------------------------------------------------
-const WatermarkYOffset* XYWatermarkPosition::GetYPosition() const
-{
-    return this->m_YPosition;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the YPosition property.
-//          The WatermarkYOffset is the type of offset used in the position of watermark.
-// RETURNS: The pointer of WatermarkYOffset.
-//-------------------------------------------------------------------------
-WatermarkYOffset* XYWatermarkPosition::GetYPosition()
-{
-    return this->m_YPosition;
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the YPosition property.
-//          The WatermarkYOffset is the type of offset used in the position of watermark.
-// PARAMETERS:
-//        Input:
-//          pYPosition - Adopted WatermarkYOffset object that is created on the heap.
-//                             It may be NULL.
-//-------------------------------------------------------------------------
-void XYWatermarkPosition::AdoptYPosition(WatermarkYOffset* pYPosition)
-{
-    if (this->m_YPosition != pYPosition)
-    {
-        delete this->m_YPosition;
-        this->m_YPosition = pYPosition;
-    }
-}
-
-//-------------------------------------------------------------------------
-// PURPOSE: Accessor method for the YPosition property.
-//          The WatermarkYOffset is the type of offset used in the position of watermark.
-// RETURNS: The pointer to the orphaned WatermarkYOffset object. It may be NULL.
-//-------------------------------------------------------------------------
-WatermarkYOffset* XYWatermarkPosition::OrphanYPosition()
-{
-    WatermarkYOffset* pRet = this->m_YPosition;
-    this->m_YPosition = NULL;
-    return pRet;
-}
-
-//-------------------------------------------------------------------------
-// Determines whether this position is the same as the supplied one.
-//-------------------------------------------------------------------------
-bool XYWatermarkPosition::Equals(WatermarkPosition* another)
-{
-    XYWatermarkPosition* anotherPosition = dynamic_cast<XYWatermarkPosition*>(another);
-    if (!anotherPosition)
-        return false;
-    
-    // check X position
-    if (!this->m_XPosition)
-    {
-        if (anotherPosition->m_XPosition)
-            return false;
-    }
-    else if (!this->m_XPosition->Equals(anotherPosition->m_XPosition))
-        return false;
-
-    // check Y position
-    if (!this->m_YPosition)
-    {
-        if (anotherPosition->m_YPosition)
-            return false;
-    }
-    else if (!this->m_YPosition->Equals(anotherPosition->m_YPosition))
-        return false;
-
-    // all checks passed
-    return true;
-}
-
-#ifdef _WIN32
-#ifdef _DEBUG
-int XYWatermarkPosition::DumpMemoryLeaks()
-{
-    return _CrtDumpMemoryLeaks();
-}
-#endif
-#endif
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+//-------------------------------------------------------------------------
+// DESCRIPTION:
+// The XYWatermarkPosition class implementation.
+// XYWatermarkPosition class is one implementation of WatermarkPosition to 
+// define the position of watermark.
+//-------------------------------------------------------------------------
+
+#include "stdafx.h"
+#include "XYWatermarkPosition.h"
+
+using namespace MDFMODEL_NAMESPACE;
+
+//-------------------------------------------------------------------------
+// PURPOSE: Construct and initialize an instance of the XYWatermarkPosition class.
+//-------------------------------------------------------------------------
+XYWatermarkPosition::XYWatermarkPosition()
+{
+    this->m_XPosition = NULL;
+    this->m_YPosition = NULL;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Destructor. Release any dynamically allocated resources.
+//-------------------------------------------------------------------------
+XYWatermarkPosition::~XYWatermarkPosition()
+{
+    delete this->m_XPosition;
+    delete this->m_YPosition;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the XPosition property.
+//          The WatermarkXOffset is the type of offset used in the position of watermark.
+// RETURNS: The pointer of WatermarkXOffset.
+//-------------------------------------------------------------------------
+const WatermarkXOffset* XYWatermarkPosition::GetXPosition() const
+{
+    return this->m_XPosition;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the XPosition property.
+//          The WatermarkXOffset is the type of offset used in the position of watermark.
+// RETURNS: The pointer of WatermarkXOffset.
+//-------------------------------------------------------------------------
+WatermarkXOffset* XYWatermarkPosition::GetXPosition()
+{
+    return this->m_XPosition;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the XPosition property.
+//          The WatermarkXOffset is the type of offset used in the position of watermark.
+// PARAMETERS:
+//        Input:
+//          pXPosition - Adopted WatermarkXOffset object that is created on the heap.
+//                             It may be NULL.
+//-------------------------------------------------------------------------
+void XYWatermarkPosition::AdoptXPosition(WatermarkXOffset* pXPosition)
+{
+    if (this->m_XPosition != pXPosition)
+    {
+        delete this->m_XPosition;
+        this->m_XPosition = pXPosition;
+    }
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the XPosition property.
+//          The WatermarkXOffset is the type of offset used in the position of watermark.
+// RETURNS: The pointer to the orphaned WatermarkXOffset object. It may be NULL.
+//-------------------------------------------------------------------------
+WatermarkXOffset* XYWatermarkPosition::OrphanXPosition()
+{
+    WatermarkXOffset* pRet = this->m_XPosition;
+    this->m_XPosition = NULL;
+    return pRet;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the YPosition property.
+//          The WatermarkYOffset is the type of offset used in the position of watermark.
+// RETURNS: The pointer of WatermarkYOffset.
+//-------------------------------------------------------------------------
+const WatermarkYOffset* XYWatermarkPosition::GetYPosition() const
+{
+    return this->m_YPosition;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the YPosition property.
+//          The WatermarkYOffset is the type of offset used in the position of watermark.
+// RETURNS: The pointer of WatermarkYOffset.
+//-------------------------------------------------------------------------
+WatermarkYOffset* XYWatermarkPosition::GetYPosition()
+{
+    return this->m_YPosition;
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the YPosition property.
+//          The WatermarkYOffset is the type of offset used in the position of watermark.
+// PARAMETERS:
+//        Input:
+//          pYPosition - Adopted WatermarkYOffset object that is created on the heap.
+//                             It may be NULL.
+//-------------------------------------------------------------------------
+void XYWatermarkPosition::AdoptYPosition(WatermarkYOffset* pYPosition)
+{
+    if (this->m_YPosition != pYPosition)
+    {
+        delete this->m_YPosition;
+        this->m_YPosition = pYPosition;
+    }
+}
+
+//-------------------------------------------------------------------------
+// PURPOSE: Accessor method for the YPosition property.
+//          The WatermarkYOffset is the type of offset used in the position of watermark.
+// RETURNS: The pointer to the orphaned WatermarkYOffset object. It may be NULL.
+//-------------------------------------------------------------------------
+WatermarkYOffset* XYWatermarkPosition::OrphanYPosition()
+{
+    WatermarkYOffset* pRet = this->m_YPosition;
+    this->m_YPosition = NULL;
+    return pRet;
+}
+
+//-------------------------------------------------------------------------
+// Determines whether this position is the same as the supplied one.
+//-------------------------------------------------------------------------
+bool XYWatermarkPosition::Equals(WatermarkPosition* another)
+{
+    XYWatermarkPosition* anotherPosition = dynamic_cast<XYWatermarkPosition*>(another);
+    if (!anotherPosition)
+        return false;
+    
+    // check X position
+    if (!this->m_XPosition)
+    {
+        if (anotherPosition->m_XPosition)
+            return false;
+    }
+    else if (!this->m_XPosition->Equals(anotherPosition->m_XPosition))
+        return false;
+
+    // check Y position
+    if (!this->m_YPosition)
+    {
+        if (anotherPosition->m_YPosition)
+            return false;
+    }
+    else if (!this->m_YPosition->Equals(anotherPosition->m_YPosition))
+        return false;
+
+    // all checks passed
+    return true;
+}
+
+#ifdef _WIN32
+#ifdef _DEBUG
+int XYWatermarkPosition::DumpMemoryLeaks()
+{
+    return _CrtDumpMemoryLeaks();
+}
+#endif
+#endif


Property changes on: trunk/MgDev/Common/MdfModel/XYWatermarkPosition.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfModel/XYWatermarkPosition.h
===================================================================
--- trunk/MgDev/Common/MdfModel/XYWatermarkPosition.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfModel/XYWatermarkPosition.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,75 +1,75 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef XYWATERMARKPOSITION_H_
-#define XYWATERMARKPOSITION_H_
-
-#include "MdfModel.h"
-#include "WatermarkPosition.h"
-#include "WatermarkXOffset.h"
-#include "WatermarkYOffset.h"
-
-BEGIN_NAMESPACE_MDFMODEL
-
-    //-------------------------------------------------------------------------
-    // DESCRIPTION:
-    // The XYWatermarkPosition class is one concrete implementation of WatermarkPosition.
-    // It uses X-Y as the position of watermark.
-    //------------------------------------------------------------------------
-    class MDFMODEL_API XYWatermarkPosition : public WatermarkPosition
-    {
-    public:
-        // Construction, destruction, initialization.
-        XYWatermarkPosition();
-        virtual ~XYWatermarkPosition();
-
-        // Operations
-        
-        // Property: XPosition
-        const WatermarkXOffset* GetXPosition() const;
-        WatermarkXOffset* GetXPosition();
-        void AdoptXPosition(WatermarkXOffset* pXPosition);
-        WatermarkXOffset* OrphanXPosition();
-        
-        // Property: YPosition
-        const WatermarkYOffset* GetYPosition() const;
-        WatermarkYOffset* GetYPosition();
-        void AdoptYPosition(WatermarkYOffset* pYPosition);
-        WatermarkYOffset* OrphanYPosition();
-
-        virtual bool Equals(WatermarkPosition* another);
-
-//#ifdef _WIN32
-#if _DEBUG
-        // for memory leak testing
-        static int DumpMemoryLeaks();
-#endif
-//#endif
-
-    private:
-        // Hidden XYWatermarkPosition copy constructor and assignment operator.
-        XYWatermarkPosition(const XYWatermarkPosition&);
-        XYWatermarkPosition& operator=(const XYWatermarkPosition&);
-
-        // Data members
-        // See corresponding properties for descriptions
-        WatermarkXOffset* m_XPosition;
-        WatermarkYOffset* m_YPosition;
-    };
-
-END_NAMESPACE_MDFMODEL
-#endif // XYWATERMARKPOSITION_H_
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef XYWATERMARKPOSITION_H_
+#define XYWATERMARKPOSITION_H_
+
+#include "MdfModel.h"
+#include "WatermarkPosition.h"
+#include "WatermarkXOffset.h"
+#include "WatermarkYOffset.h"
+
+BEGIN_NAMESPACE_MDFMODEL
+
+    //-------------------------------------------------------------------------
+    // DESCRIPTION:
+    // The XYWatermarkPosition class is one concrete implementation of WatermarkPosition.
+    // It uses X-Y as the position of watermark.
+    //------------------------------------------------------------------------
+    class MDFMODEL_API XYWatermarkPosition : public WatermarkPosition
+    {
+    public:
+        // Construction, destruction, initialization.
+        XYWatermarkPosition();
+        virtual ~XYWatermarkPosition();
+
+        // Operations
+        
+        // Property: XPosition
+        const WatermarkXOffset* GetXPosition() const;
+        WatermarkXOffset* GetXPosition();
+        void AdoptXPosition(WatermarkXOffset* pXPosition);
+        WatermarkXOffset* OrphanXPosition();
+        
+        // Property: YPosition
+        const WatermarkYOffset* GetYPosition() const;
+        WatermarkYOffset* GetYPosition();
+        void AdoptYPosition(WatermarkYOffset* pYPosition);
+        WatermarkYOffset* OrphanYPosition();
+
+        virtual bool Equals(WatermarkPosition* another);
+
+//#ifdef _WIN32
+#if _DEBUG
+        // for memory leak testing
+        static int DumpMemoryLeaks();
+#endif
+//#endif
+
+    private:
+        // Hidden XYWatermarkPosition copy constructor and assignment operator.
+        XYWatermarkPosition(const XYWatermarkPosition&);
+        XYWatermarkPosition& operator=(const XYWatermarkPosition&);
+
+        // Data members
+        // See corresponding properties for descriptions
+        WatermarkXOffset* m_XPosition;
+        WatermarkYOffset* m_YPosition;
+    };
+
+END_NAMESPACE_MDFMODEL
+#endif // XYWATERMARKPOSITION_H_


Property changes on: trunk/MgDev/Common/MdfModel/XYWatermarkPosition.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOTileWatermarkPosition.cpp
===================================================================
--- trunk/MgDev/Common/MdfParser/IOTileWatermarkPosition.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOTileWatermarkPosition.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,142 +1,142 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "stdafx.h"
-#include "IOTileWatermarkPosition.h"
-#include "IOWatermarkXOffset.h"
-#include "IOWatermarkYOffset.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-using namespace MDFPARSER_NAMESPACE;
-
-CREATE_ELEMENT_MAP;
-ELEM_MAP_ENTRY(1, TilePosition);
-ELEM_MAP_ENTRY(2, TileWidth);
-ELEM_MAP_ENTRY(3, TileHeight);
-ELEM_MAP_ENTRY(4, HorizontalPosition);
-ELEM_MAP_ENTRY(5, VerticalPosition);
-
-
-IOTileWatermarkPosition::IOTileWatermarkPosition(Version& version) : SAX2ElementHandler(version)
-{
-    this->m_position = NULL;
-}
-
-
-IOTileWatermarkPosition::IOTileWatermarkPosition(TileWatermarkPosition* position, Version& version) : SAX2ElementHandler(version)
-{
-    this->m_position = position;
-}
-
-
-IOTileWatermarkPosition::~IOTileWatermarkPosition()
-{
-}
-
-
-void IOTileWatermarkPosition::StartElement(const wchar_t* name, HandlerStack* handlerStack)
-{
-    this->m_currElemName = name;
-    this->m_currElemId = _ElementIdFromName(name);
-
-    switch (this->m_currElemId)
-    {
-    case eTilePosition:
-        this->m_startElemName = name;
-        break;
-
-    case eHorizontalPosition:
-        {
-            WatermarkXOffset* xOffset = new WatermarkXOffset();
-            this->m_position->AdoptHorizontalPosition(xOffset);
-            IOWatermarkXOffset* IO = new IOWatermarkXOffset(xOffset, this->m_version);
-            handlerStack->push(IO);
-            IO->StartElement(name, handlerStack);
-        }
-        break;
-
-    case eVerticalPosition:
-        {
-            WatermarkYOffset* yOffset = new WatermarkYOffset();
-            this->m_position->AdoptVerticalPosition(yOffset);
-            IOWatermarkYOffset* IO = new IOWatermarkYOffset(yOffset, this->m_version);
-            handlerStack->push(IO);
-            IO->StartElement(name, handlerStack);
-        }
-        break;
-
-    case eUnknown:
-        ParseUnknownXml(name, handlerStack);
-        break;
-    }
-}
-
-
-void IOTileWatermarkPosition::ElementChars(const wchar_t* ch)
-{
-    switch (this->m_currElemId)
-    {
-    case eTileWidth:
-        this->m_position->SetTileWidth(wstrToDouble(ch));
-        break;
-
-    case eTileHeight:
-        this->m_position->SetTileHeight(wstrToDouble(ch));
-        break;
-    }
-}
-
-
-void IOTileWatermarkPosition::EndElement(const wchar_t* name, HandlerStack* handlerStack)
-{
-    if (this->m_startElemName == name)
-    {
-        this->m_position->SetUnknownXml(this->m_unknownXml);
-
-        this->m_position = NULL;
-        this->m_startElemName = L"";
-        handlerStack->pop();
-        delete this;
-    }
-}
-
-
-void IOTileWatermarkPosition::Write(MdfStream& fd, TileWatermarkPosition* position, Version* version)
-{
-    fd << tab() << startStr(sTilePosition) << std::endl;
-    inctab();
-
-    // Property: TileWidth
-    fd << tab() << startStr(sTileWidth);
-    fd << DoubleToStr(position->GetTileWidth());
-    fd << endStr(sTileWidth) << std::endl;
-
-    // Property: TileHeight
-    fd << tab() << startStr(sTileHeight);
-    fd << DoubleToStr(position->GetTileHeight());
-    fd << endStr(sTileHeight) << std::endl;
-
-    // Property: HorizontalPosition
-    IOWatermarkXOffset::Write(fd, position->GetHorizontalPosition(), sHorizontalPosition, version);
-
-    // Property: VerticalPosition
-    IOWatermarkYOffset::Write(fd, position->GetVerticalPosition(), sVerticalPosition, version);
-
-    dectab();
-    fd << tab() << endStr(sTilePosition) << std::endl;
-}
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "IOTileWatermarkPosition.h"
+#include "IOWatermarkXOffset.h"
+#include "IOWatermarkYOffset.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+using namespace MDFPARSER_NAMESPACE;
+
+CREATE_ELEMENT_MAP;
+ELEM_MAP_ENTRY(1, TilePosition);
+ELEM_MAP_ENTRY(2, TileWidth);
+ELEM_MAP_ENTRY(3, TileHeight);
+ELEM_MAP_ENTRY(4, HorizontalPosition);
+ELEM_MAP_ENTRY(5, VerticalPosition);
+
+
+IOTileWatermarkPosition::IOTileWatermarkPosition(Version& version) : SAX2ElementHandler(version)
+{
+    this->m_position = NULL;
+}
+
+
+IOTileWatermarkPosition::IOTileWatermarkPosition(TileWatermarkPosition* position, Version& version) : SAX2ElementHandler(version)
+{
+    this->m_position = position;
+}
+
+
+IOTileWatermarkPosition::~IOTileWatermarkPosition()
+{
+}
+
+
+void IOTileWatermarkPosition::StartElement(const wchar_t* name, HandlerStack* handlerStack)
+{
+    this->m_currElemName = name;
+    this->m_currElemId = _ElementIdFromName(name);
+
+    switch (this->m_currElemId)
+    {
+    case eTilePosition:
+        this->m_startElemName = name;
+        break;
+
+    case eHorizontalPosition:
+        {
+            WatermarkXOffset* xOffset = new WatermarkXOffset();
+            this->m_position->AdoptHorizontalPosition(xOffset);
+            IOWatermarkXOffset* IO = new IOWatermarkXOffset(xOffset, this->m_version);
+            handlerStack->push(IO);
+            IO->StartElement(name, handlerStack);
+        }
+        break;
+
+    case eVerticalPosition:
+        {
+            WatermarkYOffset* yOffset = new WatermarkYOffset();
+            this->m_position->AdoptVerticalPosition(yOffset);
+            IOWatermarkYOffset* IO = new IOWatermarkYOffset(yOffset, this->m_version);
+            handlerStack->push(IO);
+            IO->StartElement(name, handlerStack);
+        }
+        break;
+
+    case eUnknown:
+        ParseUnknownXml(name, handlerStack);
+        break;
+    }
+}
+
+
+void IOTileWatermarkPosition::ElementChars(const wchar_t* ch)
+{
+    switch (this->m_currElemId)
+    {
+    case eTileWidth:
+        this->m_position->SetTileWidth(wstrToDouble(ch));
+        break;
+
+    case eTileHeight:
+        this->m_position->SetTileHeight(wstrToDouble(ch));
+        break;
+    }
+}
+
+
+void IOTileWatermarkPosition::EndElement(const wchar_t* name, HandlerStack* handlerStack)
+{
+    if (this->m_startElemName == name)
+    {
+        this->m_position->SetUnknownXml(this->m_unknownXml);
+
+        this->m_position = NULL;
+        this->m_startElemName = L"";
+        handlerStack->pop();
+        delete this;
+    }
+}
+
+
+void IOTileWatermarkPosition::Write(MdfStream& fd, TileWatermarkPosition* position, Version* version)
+{
+    fd << tab() << startStr(sTilePosition) << std::endl;
+    inctab();
+
+    // Property: TileWidth
+    fd << tab() << startStr(sTileWidth);
+    fd << DoubleToStr(position->GetTileWidth());
+    fd << endStr(sTileWidth) << std::endl;
+
+    // Property: TileHeight
+    fd << tab() << startStr(sTileHeight);
+    fd << DoubleToStr(position->GetTileHeight());
+    fd << endStr(sTileHeight) << std::endl;
+
+    // Property: HorizontalPosition
+    IOWatermarkXOffset::Write(fd, position->GetHorizontalPosition(), sHorizontalPosition, version);
+
+    // Property: VerticalPosition
+    IOWatermarkYOffset::Write(fd, position->GetVerticalPosition(), sVerticalPosition, version);
+
+    dectab();
+    fd << tab() << endStr(sTilePosition) << std::endl;
+}


Property changes on: trunk/MgDev/Common/MdfParser/IOTileWatermarkPosition.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOTileWatermarkPosition.h
===================================================================
--- trunk/MgDev/Common/MdfParser/IOTileWatermarkPosition.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOTileWatermarkPosition.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,48 +1,48 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _IOTILEWATERMARKPOSITION_H
-#define _IOTILEWATERMARKPOSITION_H
-
-#include "SAX2ElementHandler.h"
-#include "TileWatermarkPosition.h"
-#include "Version.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-
-BEGIN_NAMESPACE_MDFPARSER
-
-class IOTileWatermarkPosition : public SAX2ElementHandler
-{
-    public:
-        IOTileWatermarkPosition(Version& version);
-        IOTileWatermarkPosition(TileWatermarkPosition* position, Version& version);
-        virtual ~IOTileWatermarkPosition();
-
-        virtual void StartElement(const wchar_t* name, HandlerStack* handlerStack);
-        virtual void ElementChars(const wchar_t* ch);
-        virtual void EndElement(const wchar_t* name, HandlerStack* handlerStack);
-
-        static void Write(MdfStream& fd, TileWatermarkPosition* position, Version* version);
-
-    private:
-        TileWatermarkPosition* m_position;
-};
-
-END_NAMESPACE_MDFPARSER
-#endif // _IOTILEWATERMARKPOSITION_H
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _IOTILEWATERMARKPOSITION_H
+#define _IOTILEWATERMARKPOSITION_H
+
+#include "SAX2ElementHandler.h"
+#include "TileWatermarkPosition.h"
+#include "Version.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+
+BEGIN_NAMESPACE_MDFPARSER
+
+class IOTileWatermarkPosition : public SAX2ElementHandler
+{
+    public:
+        IOTileWatermarkPosition(Version& version);
+        IOTileWatermarkPosition(TileWatermarkPosition* position, Version& version);
+        virtual ~IOTileWatermarkPosition();
+
+        virtual void StartElement(const wchar_t* name, HandlerStack* handlerStack);
+        virtual void ElementChars(const wchar_t* ch);
+        virtual void EndElement(const wchar_t* name, HandlerStack* handlerStack);
+
+        static void Write(MdfStream& fd, TileWatermarkPosition* position, Version* version);
+
+    private:
+        TileWatermarkPosition* m_position;
+};
+
+END_NAMESPACE_MDFPARSER
+#endif // _IOTILEWATERMARKPOSITION_H


Property changes on: trunk/MgDev/Common/MdfParser/IOTileWatermarkPosition.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOWatermarkAppearance.cpp
===================================================================
--- trunk/MgDev/Common/MdfParser/IOWatermarkAppearance.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOWatermarkAppearance.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,123 +1,123 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "stdafx.h"
-#include "IOWatermarkAppearance.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-using namespace MDFPARSER_NAMESPACE;
-
-CREATE_ELEMENT_MAP;
-ELEM_MAP_ENTRY(1, Appearance);
-ELEM_MAP_ENTRY(2, AppearanceOverride);
-ELEM_MAP_ENTRY(3, Transparency);
-ELEM_MAP_ENTRY(4, Rotation);
-
-
-IOWatermarkAppearance::IOWatermarkAppearance(Version& version) : SAX2ElementHandler(version)
-{
-    this->m_appearance = NULL;
-}
-
-
-IOWatermarkAppearance::IOWatermarkAppearance(WatermarkAppearance* appearance, Version& version) : SAX2ElementHandler(version)
-{
-    this->m_appearance = appearance;
-}
-
-
-IOWatermarkAppearance::~IOWatermarkAppearance()
-{
-}
-
-
-void IOWatermarkAppearance::StartElement(const wchar_t* name, HandlerStack* handlerStack)
-{
-    this->m_currElemName = name;
-    this->m_currElemId = _ElementIdFromName(name);
-
-    switch (this->m_currElemId)
-    {
-    case eAppearance:
-        this->m_startElemName = name;
-        break;
-
-    case eAppearanceOverride:
-        this->m_startElemName = name;
-        break;
-
-    case eUnknown:
-        ParseUnknownXml(name, handlerStack);
-        break;
-    }
-}
-
-
-void IOWatermarkAppearance::ElementChars(const wchar_t* ch)
-{
-    switch (this->m_currElemId)
-    {
-    case eTransparency:
-        this->m_appearance->SetTransparency(wstrToDouble(ch));
-        break;
-
-    case eRotation:
-        this->m_appearance->SetRotation(wstrToDouble(ch));
-        break;
-    }
-}
-
-
-void IOWatermarkAppearance::EndElement(const wchar_t* name, HandlerStack* handlerStack)
-{
-    if (this->m_startElemName == name)
-    {
-        this->m_appearance->SetUnknownXml(this->m_unknownXml);
-
-        this->m_appearance = NULL;
-        this->m_startElemName = L"";
-        handlerStack->pop();
-        delete this;
-    }
-}
-
-
-void IOWatermarkAppearance::Write(MdfStream& fd, WatermarkAppearance* appearance, Version* version, const std::string& name)
-{
-    fd << tab() << startStr(name) << std::endl;
-    inctab();
-
-    // Property: Transparency (optional)
-    if (appearance->GetTransparency() != 0.0)
-    {
-        fd << tab() << startStr(sTransparency);
-        fd << DoubleToStr(appearance->GetTransparency());
-        fd << endStr(sTransparency) << std::endl;
-    }
-
-    // Property: Rotation (optional)
-    if (appearance->GetRotation() != 0.0)
-    {
-        fd << tab() << startStr(sRotation);
-        fd << DoubleToStr(appearance->GetRotation());
-        fd << endStr(sRotation) << std::endl;
-    }
-
-    dectab();
-    fd << tab() << endStr(name) << std::endl;
-}
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "IOWatermarkAppearance.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+using namespace MDFPARSER_NAMESPACE;
+
+CREATE_ELEMENT_MAP;
+ELEM_MAP_ENTRY(1, Appearance);
+ELEM_MAP_ENTRY(2, AppearanceOverride);
+ELEM_MAP_ENTRY(3, Transparency);
+ELEM_MAP_ENTRY(4, Rotation);
+
+
+IOWatermarkAppearance::IOWatermarkAppearance(Version& version) : SAX2ElementHandler(version)
+{
+    this->m_appearance = NULL;
+}
+
+
+IOWatermarkAppearance::IOWatermarkAppearance(WatermarkAppearance* appearance, Version& version) : SAX2ElementHandler(version)
+{
+    this->m_appearance = appearance;
+}
+
+
+IOWatermarkAppearance::~IOWatermarkAppearance()
+{
+}
+
+
+void IOWatermarkAppearance::StartElement(const wchar_t* name, HandlerStack* handlerStack)
+{
+    this->m_currElemName = name;
+    this->m_currElemId = _ElementIdFromName(name);
+
+    switch (this->m_currElemId)
+    {
+    case eAppearance:
+        this->m_startElemName = name;
+        break;
+
+    case eAppearanceOverride:
+        this->m_startElemName = name;
+        break;
+
+    case eUnknown:
+        ParseUnknownXml(name, handlerStack);
+        break;
+    }
+}
+
+
+void IOWatermarkAppearance::ElementChars(const wchar_t* ch)
+{
+    switch (this->m_currElemId)
+    {
+    case eTransparency:
+        this->m_appearance->SetTransparency(wstrToDouble(ch));
+        break;
+
+    case eRotation:
+        this->m_appearance->SetRotation(wstrToDouble(ch));
+        break;
+    }
+}
+
+
+void IOWatermarkAppearance::EndElement(const wchar_t* name, HandlerStack* handlerStack)
+{
+    if (this->m_startElemName == name)
+    {
+        this->m_appearance->SetUnknownXml(this->m_unknownXml);
+
+        this->m_appearance = NULL;
+        this->m_startElemName = L"";
+        handlerStack->pop();
+        delete this;
+    }
+}
+
+
+void IOWatermarkAppearance::Write(MdfStream& fd, WatermarkAppearance* appearance, Version* version, const std::string& name)
+{
+    fd << tab() << startStr(name) << std::endl;
+    inctab();
+
+    // Property: Transparency (optional)
+    if (appearance->GetTransparency() != 0.0)
+    {
+        fd << tab() << startStr(sTransparency);
+        fd << DoubleToStr(appearance->GetTransparency());
+        fd << endStr(sTransparency) << std::endl;
+    }
+
+    // Property: Rotation (optional)
+    if (appearance->GetRotation() != 0.0)
+    {
+        fd << tab() << startStr(sRotation);
+        fd << DoubleToStr(appearance->GetRotation());
+        fd << endStr(sRotation) << std::endl;
+    }
+
+    dectab();
+    fd << tab() << endStr(name) << std::endl;
+}


Property changes on: trunk/MgDev/Common/MdfParser/IOWatermarkAppearance.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOWatermarkAppearance.h
===================================================================
--- trunk/MgDev/Common/MdfParser/IOWatermarkAppearance.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOWatermarkAppearance.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,48 +1,48 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _IOWATERMARKAPPEARANCE_H
-#define _IOWATERMARKAPPEARANCE_H
-
-#include "SAX2ElementHandler.h"
-#include "WatermarkAppearance.h"
-#include "Version.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-
-BEGIN_NAMESPACE_MDFPARSER
-
-class IOWatermarkAppearance : public SAX2ElementHandler
-{
-    public:
-        IOWatermarkAppearance(Version& version);
-        IOWatermarkAppearance(WatermarkAppearance* appearance, Version& version);
-        virtual ~IOWatermarkAppearance();
-
-        virtual void StartElement(const wchar_t* name, HandlerStack* handlerStack);
-        virtual void ElementChars(const wchar_t* ch);
-        virtual void EndElement(const wchar_t* name, HandlerStack* handlerStack);
-
-        static void Write(MdfStream& fd, WatermarkAppearance* appearance, Version* version, const std::string& name);
-
-    private:
-        WatermarkAppearance* m_appearance;
-};
-
-END_NAMESPACE_MDFPARSER
-#endif // _IOWATERMARKAPPEARANCE_H
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _IOWATERMARKAPPEARANCE_H
+#define _IOWATERMARKAPPEARANCE_H
+
+#include "SAX2ElementHandler.h"
+#include "WatermarkAppearance.h"
+#include "Version.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+
+BEGIN_NAMESPACE_MDFPARSER
+
+class IOWatermarkAppearance : public SAX2ElementHandler
+{
+    public:
+        IOWatermarkAppearance(Version& version);
+        IOWatermarkAppearance(WatermarkAppearance* appearance, Version& version);
+        virtual ~IOWatermarkAppearance();
+
+        virtual void StartElement(const wchar_t* name, HandlerStack* handlerStack);
+        virtual void ElementChars(const wchar_t* ch);
+        virtual void EndElement(const wchar_t* name, HandlerStack* handlerStack);
+
+        static void Write(MdfStream& fd, WatermarkAppearance* appearance, Version* version, const std::string& name);
+
+    private:
+        WatermarkAppearance* m_appearance;
+};
+
+END_NAMESPACE_MDFPARSER
+#endif // _IOWATERMARKAPPEARANCE_H


Property changes on: trunk/MgDev/Common/MdfParser/IOWatermarkAppearance.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOWatermarkDefinition.cpp
===================================================================
--- trunk/MgDev/Common/MdfParser/IOWatermarkDefinition.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOWatermarkDefinition.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,245 +1,245 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "stdafx.h"
-#include "IOWatermarkDefinition.h"
-#include "IOSimpleSymbolDefinition.h"
-#include "IOCompoundSymbolDefinition.h"
-#include "IOWatermarkAppearance.h"
-#include "IOXYWatermarkPosition.h"
-#include "IOTileWatermarkPosition.h"
-#include "IOUnknown.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-using namespace MDFPARSER_NAMESPACE;
-
-CREATE_ELEMENT_MAP;
-ELEM_MAP_ENTRY(1, WatermarkDefinition);
-ELEM_MAP_ENTRY(2, Content);
-ELEM_MAP_ENTRY(3, SimpleSymbolDefinition);
-ELEM_MAP_ENTRY(4, CompoundSymbolDefinition);
-ELEM_MAP_ENTRY(5, Appearance);
-ELEM_MAP_ENTRY(6, Position);
-ELEM_MAP_ENTRY(7, XYPosition);
-ELEM_MAP_ENTRY(8, TilePosition);
-ELEM_MAP_ENTRY(9, ExtendedData1);
-
-
-IOWatermarkDefinition::IOWatermarkDefinition(Version& version) : SAX2ElementHandler(version)
-{
-    this->m_watermark = NULL;
-}
-
-
-IOWatermarkDefinition::IOWatermarkDefinition(WatermarkDefinition* watermark, Version& version) : SAX2ElementHandler(version)
-{
-    this->m_watermark = watermark;
-}
-
-
-IOWatermarkDefinition::~IOWatermarkDefinition()
-{
-}
-
-
-void IOWatermarkDefinition::StartElement(const wchar_t* name, HandlerStack* handlerStack)
-{
-    this->m_currElemName = name;
-    this->m_currElemId = _ElementIdFromName(name);
-
-    switch (this->m_currElemId)
-    {
-    case eWatermarkDefinition:
-        this->m_startElemName = name;
-        break;
-
-    case eSimpleSymbolDefinition:
-        {
-            Version sdVersion;
-            if (!IOWatermarkDefinition::GetSymbolDefinitionVersion(&this->m_version, sdVersion))
-                return;
-
-            SimpleSymbolDefinition* simpleSymbol = new SimpleSymbolDefinition();
-            this->m_watermark->AdoptContent(simpleSymbol);
-            IOSimpleSymbolDefinition* IO = new IOSimpleSymbolDefinition(simpleSymbol, sdVersion);
-            handlerStack->push(IO);
-            IO->StartElement(name, handlerStack);
-        }
-        break;
-
-    case eCompoundSymbolDefinition:
-        {
-            Version sdVersion;
-            if (!IOWatermarkDefinition::GetSymbolDefinitionVersion(&this->m_version, sdVersion))
-                return;
-
-            CompoundSymbolDefinition* compoundSymbol = new CompoundSymbolDefinition();
-            this->m_watermark->AdoptContent(compoundSymbol);
-            IOCompoundSymbolDefinition* IO = new IOCompoundSymbolDefinition(compoundSymbol, sdVersion);
-            handlerStack->push(IO);
-            IO->StartElement(name, handlerStack);
-        }
-        break;
-
-    case eAppearance:
-        {
-            WatermarkAppearance* appearance = new WatermarkAppearance();
-            this->m_watermark->AdoptAppearance(appearance);
-            IOWatermarkAppearance* IO = new IOWatermarkAppearance(appearance, this->m_version);
-            handlerStack->push(IO);
-            IO->StartElement(name, handlerStack);
-        }
-        break;
-
-    case eXYPosition:
-        {
-            XYWatermarkPosition* position = new XYWatermarkPosition();
-            this->m_watermark->AdoptPosition(position);
-            IOXYWatermarkPosition* IO = new IOXYWatermarkPosition(position, this->m_version);
-            handlerStack->push(IO);
-            IO->StartElement(name, handlerStack);
-        }
-        break;
-
-    case eTilePosition:
-        {
-            TileWatermarkPosition* position = new TileWatermarkPosition();
-            this->m_watermark->AdoptPosition(position);
-            IOTileWatermarkPosition* IO = new IOTileWatermarkPosition(position, this->m_version);
-            handlerStack->push(IO);
-            IO->StartElement(name, handlerStack);
-        }
-        break;
-
-    case eExtendedData1:
-        this->m_procExtData = true;
-        break;
-
-    case eUnknown:
-        ParseUnknownXml(name, handlerStack);
-        break;
-    }
-}
-
-
-void IOWatermarkDefinition::ElementChars(const wchar_t* ch)
-{
-}
-
-
-void IOWatermarkDefinition::EndElement(const wchar_t* name, HandlerStack* handlerStack)
-{
-    if (this->m_startElemName == name)
-    {
-        this->m_watermark->SetUnknownXml(this->m_unknownXml);
-
-        this->m_watermark = NULL;
-        this->m_startElemName = L"";
-        handlerStack->pop();
-        delete this;
-    }
-    else if (eExtendedData1 == _ElementIdFromName(name))
-    {
-        this->m_procExtData = false;
-    }
-}
-
-
-// Determine which SymbolDefinition schema version to use based
-// on the supplied WaterDefinition version:
-// * WD version <= 1.0.0  =>  SD version 1.1.0
-bool IOWatermarkDefinition::GetSymbolDefinitionVersion(Version* wdVersion, Version& sdVersion)
-{
-    sdVersion = Version(1, 1, 0);
-    return true;
-}
-
-
-void IOWatermarkDefinition::Write(MdfStream& fd, WatermarkDefinition* watermark, Version* version)
-{
-    // verify the WatermarkDefinition version
-    MdfString strVersion;
-    if (version)
-    {
-        if (*version == Version(1, 0, 0))
-        {
-            // WatermarkDefinition in MapGuide 2012
-            strVersion = version->ToString();
-        }
-        else
-        {
-            // unsupported WatermarkDefinition version
-            // TODO - need a way to return error information
-            _ASSERT(false);
-            return;
-        }
-    }
-    else
-    {
-        // use the current highest version
-        strVersion = L"1.0.0";
-    }
-
-    fd << tab() << "<WatermarkDefinition xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"WatermarkDefinition-" << EncodeString(strVersion) << ".xsd\" version=\"" << EncodeString(strVersion) << "\">" << std::endl; // NOXLATE
-    inctab();
-
-    // Property: Content
-    fd << tab() << startStr(sContent) << std::endl;
-    inctab();
-
-    SymbolDefinition* symbol = watermark->GetContent();
-    Version sdVersion;
-    if (IOWatermarkDefinition::GetSymbolDefinitionVersion(version, sdVersion))
-    {
-        SimpleSymbolDefinition* simpleSymbol = dynamic_cast<SimpleSymbolDefinition*>(symbol);
-        CompoundSymbolDefinition* compoundSymbol = dynamic_cast<CompoundSymbolDefinition*>(symbol);
-
-        if (simpleSymbol)
-            IOSimpleSymbolDefinition::Write(fd, simpleSymbol, false, &sdVersion);
-        else if (compoundSymbol)
-            IOCompoundSymbolDefinition::Write(fd, compoundSymbol, false, &sdVersion);
-    }
-
-    dectab();
-    fd << endStr(sContent) << std::endl;
-
-    // Property: Appearance
-    IOWatermarkAppearance::Write(fd, watermark->GetAppearance(), version, sAppearance);
-
-    // Property: Position
-    fd << tab() << startStr(sPosition) << std::endl;
-    inctab();
-
-    WatermarkPosition* position = watermark->GetPosition();
-    XYWatermarkPosition* xyPosition = dynamic_cast<XYWatermarkPosition*>(position);
-    TileWatermarkPosition* tilePosition = dynamic_cast<TileWatermarkPosition*>(position);
-
-    if (xyPosition)
-        IOXYWatermarkPosition::Write(fd, xyPosition, version);
-    else if (tilePosition)
-        IOTileWatermarkPosition::Write(fd, tilePosition, version);
-
-    dectab();
-    fd << endStr(sPosition) << std::endl;
-
-    // Write any unknown XML / extended data
-    IOUnknown::Write(fd, watermark->GetUnknownXml(), version);
-
-    dectab();
-    fd << tab() << "</WatermarkDefinition>" << std::endl; // NOXLATE
-}
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "IOWatermarkDefinition.h"
+#include "IOSimpleSymbolDefinition.h"
+#include "IOCompoundSymbolDefinition.h"
+#include "IOWatermarkAppearance.h"
+#include "IOXYWatermarkPosition.h"
+#include "IOTileWatermarkPosition.h"
+#include "IOUnknown.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+using namespace MDFPARSER_NAMESPACE;
+
+CREATE_ELEMENT_MAP;
+ELEM_MAP_ENTRY(1, WatermarkDefinition);
+ELEM_MAP_ENTRY(2, Content);
+ELEM_MAP_ENTRY(3, SimpleSymbolDefinition);
+ELEM_MAP_ENTRY(4, CompoundSymbolDefinition);
+ELEM_MAP_ENTRY(5, Appearance);
+ELEM_MAP_ENTRY(6, Position);
+ELEM_MAP_ENTRY(7, XYPosition);
+ELEM_MAP_ENTRY(8, TilePosition);
+ELEM_MAP_ENTRY(9, ExtendedData1);
+
+
+IOWatermarkDefinition::IOWatermarkDefinition(Version& version) : SAX2ElementHandler(version)
+{
+    this->m_watermark = NULL;
+}
+
+
+IOWatermarkDefinition::IOWatermarkDefinition(WatermarkDefinition* watermark, Version& version) : SAX2ElementHandler(version)
+{
+    this->m_watermark = watermark;
+}
+
+
+IOWatermarkDefinition::~IOWatermarkDefinition()
+{
+}
+
+
+void IOWatermarkDefinition::StartElement(const wchar_t* name, HandlerStack* handlerStack)
+{
+    this->m_currElemName = name;
+    this->m_currElemId = _ElementIdFromName(name);
+
+    switch (this->m_currElemId)
+    {
+    case eWatermarkDefinition:
+        this->m_startElemName = name;
+        break;
+
+    case eSimpleSymbolDefinition:
+        {
+            Version sdVersion;
+            if (!IOWatermarkDefinition::GetSymbolDefinitionVersion(&this->m_version, sdVersion))
+                return;
+
+            SimpleSymbolDefinition* simpleSymbol = new SimpleSymbolDefinition();
+            this->m_watermark->AdoptContent(simpleSymbol);
+            IOSimpleSymbolDefinition* IO = new IOSimpleSymbolDefinition(simpleSymbol, sdVersion);
+            handlerStack->push(IO);
+            IO->StartElement(name, handlerStack);
+        }
+        break;
+
+    case eCompoundSymbolDefinition:
+        {
+            Version sdVersion;
+            if (!IOWatermarkDefinition::GetSymbolDefinitionVersion(&this->m_version, sdVersion))
+                return;
+
+            CompoundSymbolDefinition* compoundSymbol = new CompoundSymbolDefinition();
+            this->m_watermark->AdoptContent(compoundSymbol);
+            IOCompoundSymbolDefinition* IO = new IOCompoundSymbolDefinition(compoundSymbol, sdVersion);
+            handlerStack->push(IO);
+            IO->StartElement(name, handlerStack);
+        }
+        break;
+
+    case eAppearance:
+        {
+            WatermarkAppearance* appearance = new WatermarkAppearance();
+            this->m_watermark->AdoptAppearance(appearance);
+            IOWatermarkAppearance* IO = new IOWatermarkAppearance(appearance, this->m_version);
+            handlerStack->push(IO);
+            IO->StartElement(name, handlerStack);
+        }
+        break;
+
+    case eXYPosition:
+        {
+            XYWatermarkPosition* position = new XYWatermarkPosition();
+            this->m_watermark->AdoptPosition(position);
+            IOXYWatermarkPosition* IO = new IOXYWatermarkPosition(position, this->m_version);
+            handlerStack->push(IO);
+            IO->StartElement(name, handlerStack);
+        }
+        break;
+
+    case eTilePosition:
+        {
+            TileWatermarkPosition* position = new TileWatermarkPosition();
+            this->m_watermark->AdoptPosition(position);
+            IOTileWatermarkPosition* IO = new IOTileWatermarkPosition(position, this->m_version);
+            handlerStack->push(IO);
+            IO->StartElement(name, handlerStack);
+        }
+        break;
+
+    case eExtendedData1:
+        this->m_procExtData = true;
+        break;
+
+    case eUnknown:
+        ParseUnknownXml(name, handlerStack);
+        break;
+    }
+}
+
+
+void IOWatermarkDefinition::ElementChars(const wchar_t* ch)
+{
+}
+
+
+void IOWatermarkDefinition::EndElement(const wchar_t* name, HandlerStack* handlerStack)
+{
+    if (this->m_startElemName == name)
+    {
+        this->m_watermark->SetUnknownXml(this->m_unknownXml);
+
+        this->m_watermark = NULL;
+        this->m_startElemName = L"";
+        handlerStack->pop();
+        delete this;
+    }
+    else if (eExtendedData1 == _ElementIdFromName(name))
+    {
+        this->m_procExtData = false;
+    }
+}
+
+
+// Determine which SymbolDefinition schema version to use based
+// on the supplied WaterDefinition version:
+// * WD version <= 1.0.0  =>  SD version 1.1.0
+bool IOWatermarkDefinition::GetSymbolDefinitionVersion(Version* wdVersion, Version& sdVersion)
+{
+    sdVersion = Version(1, 1, 0);
+    return true;
+}
+
+
+void IOWatermarkDefinition::Write(MdfStream& fd, WatermarkDefinition* watermark, Version* version)
+{
+    // verify the WatermarkDefinition version
+    MdfString strVersion;
+    if (version)
+    {
+        if (*version == Version(1, 0, 0))
+        {
+            // WatermarkDefinition in MapGuide 2012
+            strVersion = version->ToString();
+        }
+        else
+        {
+            // unsupported WatermarkDefinition version
+            // TODO - need a way to return error information
+            _ASSERT(false);
+            return;
+        }
+    }
+    else
+    {
+        // use the current highest version
+        strVersion = L"1.0.0";
+    }
+
+    fd << tab() << "<WatermarkDefinition xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"WatermarkDefinition-" << EncodeString(strVersion) << ".xsd\" version=\"" << EncodeString(strVersion) << "\">" << std::endl; // NOXLATE
+    inctab();
+
+    // Property: Content
+    fd << tab() << startStr(sContent) << std::endl;
+    inctab();
+
+    SymbolDefinition* symbol = watermark->GetContent();
+    Version sdVersion;
+    if (IOWatermarkDefinition::GetSymbolDefinitionVersion(version, sdVersion))
+    {
+        SimpleSymbolDefinition* simpleSymbol = dynamic_cast<SimpleSymbolDefinition*>(symbol);
+        CompoundSymbolDefinition* compoundSymbol = dynamic_cast<CompoundSymbolDefinition*>(symbol);
+
+        if (simpleSymbol)
+            IOSimpleSymbolDefinition::Write(fd, simpleSymbol, false, &sdVersion);
+        else if (compoundSymbol)
+            IOCompoundSymbolDefinition::Write(fd, compoundSymbol, false, &sdVersion);
+    }
+
+    dectab();
+    fd << endStr(sContent) << std::endl;
+
+    // Property: Appearance
+    IOWatermarkAppearance::Write(fd, watermark->GetAppearance(), version, sAppearance);
+
+    // Property: Position
+    fd << tab() << startStr(sPosition) << std::endl;
+    inctab();
+
+    WatermarkPosition* position = watermark->GetPosition();
+    XYWatermarkPosition* xyPosition = dynamic_cast<XYWatermarkPosition*>(position);
+    TileWatermarkPosition* tilePosition = dynamic_cast<TileWatermarkPosition*>(position);
+
+    if (xyPosition)
+        IOXYWatermarkPosition::Write(fd, xyPosition, version);
+    else if (tilePosition)
+        IOTileWatermarkPosition::Write(fd, tilePosition, version);
+
+    dectab();
+    fd << endStr(sPosition) << std::endl;
+
+    // Write any unknown XML / extended data
+    IOUnknown::Write(fd, watermark->GetUnknownXml(), version);
+
+    dectab();
+    fd << tab() << "</WatermarkDefinition>" << std::endl; // NOXLATE
+}


Property changes on: trunk/MgDev/Common/MdfParser/IOWatermarkDefinition.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOWatermarkDefinition.h
===================================================================
--- trunk/MgDev/Common/MdfParser/IOWatermarkDefinition.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOWatermarkDefinition.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,51 +1,51 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _IOWATERMARKDEFINITION_H
-#define _IOWATERMARKDEFINITION_H
-
-#include "SAX2ElementHandler.h"
-#include "WatermarkDefinition.h"
-#include "Version.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-
-BEGIN_NAMESPACE_MDFPARSER
-
-class IOWatermarkDefinition : public SAX2ElementHandler
-{
-    public:
-        IOWatermarkDefinition(Version& version);
-        IOWatermarkDefinition(WatermarkDefinition* watermark, Version& version);
-        virtual ~IOWatermarkDefinition();
-
-        virtual void StartElement(const wchar_t* name, HandlerStack* handlerStack);
-        virtual void ElementChars(const wchar_t* ch);
-        virtual void EndElement(const wchar_t* name, HandlerStack* handlerStack);
-
-        static void Write(MdfStream& fd, WatermarkDefinition* watermark, Version* version);
-
-    private:
-        static bool GetSymbolDefinitionVersion(Version* wdVersion, Version& sdVersion);
-
-    private:
-        WatermarkDefinition* m_watermark;
-};
-
-END_NAMESPACE_MDFPARSER
-#endif // _IOWATERMARKDEFINITION_H
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _IOWATERMARKDEFINITION_H
+#define _IOWATERMARKDEFINITION_H
+
+#include "SAX2ElementHandler.h"
+#include "WatermarkDefinition.h"
+#include "Version.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+
+BEGIN_NAMESPACE_MDFPARSER
+
+class IOWatermarkDefinition : public SAX2ElementHandler
+{
+    public:
+        IOWatermarkDefinition(Version& version);
+        IOWatermarkDefinition(WatermarkDefinition* watermark, Version& version);
+        virtual ~IOWatermarkDefinition();
+
+        virtual void StartElement(const wchar_t* name, HandlerStack* handlerStack);
+        virtual void ElementChars(const wchar_t* ch);
+        virtual void EndElement(const wchar_t* name, HandlerStack* handlerStack);
+
+        static void Write(MdfStream& fd, WatermarkDefinition* watermark, Version* version);
+
+    private:
+        static bool GetSymbolDefinitionVersion(Version* wdVersion, Version& sdVersion);
+
+    private:
+        WatermarkDefinition* m_watermark;
+};
+
+END_NAMESPACE_MDFPARSER
+#endif // _IOWATERMARKDEFINITION_H


Property changes on: trunk/MgDev/Common/MdfParser/IOWatermarkDefinition.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOWatermarkInstance.cpp
===================================================================
--- trunk/MgDev/Common/MdfParser/IOWatermarkInstance.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOWatermarkInstance.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,208 +1,208 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "stdafx.h"
-#include "IOWatermarkInstance.h"
-#include "IOWatermarkAppearance.h"
-#include "IOXYWatermarkPosition.h"
-#include "IOTileWatermarkPosition.h"
-#include "IOUnknown.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-using namespace MDFPARSER_NAMESPACE;
-
-CREATE_ELEMENT_MAP;
-ELEM_MAP_ENTRY(1, Watermark);
-ELEM_MAP_ENTRY(2, Name);
-ELEM_MAP_ENTRY(3, ResourceId);
-ELEM_MAP_ENTRY(4, Usage);
-ELEM_MAP_ENTRY(5, AppearanceOverride);
-ELEM_MAP_ENTRY(6, PositionOverride);
-ELEM_MAP_ENTRY(7, XYPosition);
-ELEM_MAP_ENTRY(8, TilePosition);
-ELEM_MAP_ENTRY(9, ExtendedData1);
-
-
-IOWatermarkInstance::IOWatermarkInstance(Version& version) : SAX2ElementHandler(version)
-{
-    this->m_watermark = NULL;
-}
-
-
-IOWatermarkInstance::IOWatermarkInstance(WatermarkInstance* watermark, Version& version) : SAX2ElementHandler(version)
-{
-    this->m_watermark = watermark;
-}
-
-
-IOWatermarkInstance::~IOWatermarkInstance()
-{
-}
-
-
-void IOWatermarkInstance::StartElement(const wchar_t* name, HandlerStack* handlerStack)
-{
-    this->m_currElemName = name;
-    this->m_currElemId = _ElementIdFromName(name);
-
-    switch (this->m_currElemId)
-    {
-    case eWatermark:
-        this->m_startElemName = name;
-        break;
-
-    case eAppearanceOverride:
-        {
-            WatermarkAppearance* appearance = new WatermarkAppearance();
-            this->m_watermark->AdoptAppearanceOverride(appearance);
-            IOWatermarkAppearance* IO = new IOWatermarkAppearance(appearance, this->m_version);
-            handlerStack->push(IO);
-            IO->StartElement(name, handlerStack);
-        }
-        break;
-
-    case eXYPosition:
-        {
-            XYWatermarkPosition* position = new XYWatermarkPosition();
-            this->m_watermark->AdoptPositionOverride(position);
-            IOXYWatermarkPosition* IO = new IOXYWatermarkPosition(position, this->m_version);
-            handlerStack->push(IO);
-            IO->StartElement(name, handlerStack);
-        }
-        break;
-
-    case eTilePosition:
-        {
-            TileWatermarkPosition* position = new TileWatermarkPosition();
-            this->m_watermark->AdoptPositionOverride(position);
-            IOTileWatermarkPosition* IO = new IOTileWatermarkPosition(position, this->m_version);
-            handlerStack->push(IO);
-            IO->StartElement(name, handlerStack);
-        }
-        break;
-
-    case eExtendedData1:
-        this->m_procExtData = true;
-        break;
-
-    case eUnknown:
-        ParseUnknownXml(name, handlerStack);
-        break;
-    }
-}
-
-
-void IOWatermarkInstance::ElementChars(const wchar_t* ch)
-{
-    switch (this->m_currElemId)
-    {
-    case eName:
-        this->m_watermark->SetName(ch);
-        break;
-
-    case eResourceId:
-        this->m_watermark->SetResourceId(ch);
-        break;
-
-    case eUsage:
-        if (::wcscmp(ch, L"WMS") == 0) // NOXLATE
-            this->m_watermark->SetUsage(WatermarkInstance::WMS);
-        else if (::wcscmp(ch, L"Viewer") == 0) // NOXLATE
-            this->m_watermark->SetUsage(WatermarkInstance::Viewer);
-        else
-            this->m_watermark->SetUsage(WatermarkInstance::All); // treat as "All" if string is incorrect
-        break;
-    }
-}
-
-
-void IOWatermarkInstance::EndElement(const wchar_t* name, HandlerStack* handlerStack)
-{
-    if (this->m_startElemName == name)
-    {
-        this->m_watermark->SetUnknownXml(this->m_unknownXml);
-
-        this->m_watermark = NULL;
-        this->m_startElemName = L"";
-        handlerStack->pop();
-        delete this;
-    }
-    else if (eExtendedData1 == _ElementIdFromName(name))
-    {
-        this->m_procExtData = false;
-    }
-}
-
-
-void IOWatermarkInstance::Write(MdfStream& fd, WatermarkInstance* watermark, Version* version)
-{
-    fd << tab() << startStr(sWatermark) << std::endl;
-    inctab();
-
-    // Property: Name
-    fd << tab() << startStr(sName);
-    fd << EncodeString(watermark->GetName());
-    fd << endStr(sName) << std::endl;
-
-    // Property: ResourceId
-    fd << tab() << startStr(sResourceId);
-    fd << EncodeString(watermark->GetResourceId());
-    fd << endStr(sResourceId) << std::endl;
-
-    // Property: Usage (optional)
-    WatermarkInstance::Usage usage = watermark->GetUsage();
-    if (usage != WatermarkInstance::All)
-    {
-        fd << tab() << startStr(sUsage);
-        if (usage == WatermarkInstance::WMS)
-            fd << "WMS"; // NOXLATE
-        else if (usage == WatermarkInstance::Viewer)
-            fd << "Viewer"; // NOXLATE
-        fd << endStr(sUsage) << std::endl;
-    }
-
-    // Property: AppearanceOverride (optional)
-    WatermarkAppearance* appearanceOverride = watermark->GetAppearanceOverride();
-    if (appearanceOverride)
-        IOWatermarkAppearance::Write(fd, appearanceOverride, version, sAppearanceOverride);
-    
-    // Property: PositionOverride (optional)
-    WatermarkPosition* positionOverride = watermark->GetPositionOverride();
-    if (positionOverride)
-    {
-        fd << tab() << startStr(sPositionOverride) << std::endl;
-        inctab();
-
-        XYWatermarkPosition* xyPositionOverride = dynamic_cast<XYWatermarkPosition*>(positionOverride);
-        TileWatermarkPosition* tilePositionOverride = dynamic_cast<TileWatermarkPosition*>(positionOverride);
-
-        if (xyPositionOverride)
-            IOXYWatermarkPosition::Write(fd, xyPositionOverride, version);
-        else if (tilePositionOverride)
-            IOTileWatermarkPosition::Write(fd, tilePositionOverride, version);
-
-        dectab();
-        fd << endStr(sPositionOverride) << std::endl;
-    }
-
-    // Write any unknown XML / extended data
-    IOUnknown::Write(fd, watermark->GetUnknownXml(), version);
-
-    dectab();
-    fd << tab() << endStr(sWatermark) << std::endl;
-}
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "IOWatermarkInstance.h"
+#include "IOWatermarkAppearance.h"
+#include "IOXYWatermarkPosition.h"
+#include "IOTileWatermarkPosition.h"
+#include "IOUnknown.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+using namespace MDFPARSER_NAMESPACE;
+
+CREATE_ELEMENT_MAP;
+ELEM_MAP_ENTRY(1, Watermark);
+ELEM_MAP_ENTRY(2, Name);
+ELEM_MAP_ENTRY(3, ResourceId);
+ELEM_MAP_ENTRY(4, Usage);
+ELEM_MAP_ENTRY(5, AppearanceOverride);
+ELEM_MAP_ENTRY(6, PositionOverride);
+ELEM_MAP_ENTRY(7, XYPosition);
+ELEM_MAP_ENTRY(8, TilePosition);
+ELEM_MAP_ENTRY(9, ExtendedData1);
+
+
+IOWatermarkInstance::IOWatermarkInstance(Version& version) : SAX2ElementHandler(version)
+{
+    this->m_watermark = NULL;
+}
+
+
+IOWatermarkInstance::IOWatermarkInstance(WatermarkInstance* watermark, Version& version) : SAX2ElementHandler(version)
+{
+    this->m_watermark = watermark;
+}
+
+
+IOWatermarkInstance::~IOWatermarkInstance()
+{
+}
+
+
+void IOWatermarkInstance::StartElement(const wchar_t* name, HandlerStack* handlerStack)
+{
+    this->m_currElemName = name;
+    this->m_currElemId = _ElementIdFromName(name);
+
+    switch (this->m_currElemId)
+    {
+    case eWatermark:
+        this->m_startElemName = name;
+        break;
+
+    case eAppearanceOverride:
+        {
+            WatermarkAppearance* appearance = new WatermarkAppearance();
+            this->m_watermark->AdoptAppearanceOverride(appearance);
+            IOWatermarkAppearance* IO = new IOWatermarkAppearance(appearance, this->m_version);
+            handlerStack->push(IO);
+            IO->StartElement(name, handlerStack);
+        }
+        break;
+
+    case eXYPosition:
+        {
+            XYWatermarkPosition* position = new XYWatermarkPosition();
+            this->m_watermark->AdoptPositionOverride(position);
+            IOXYWatermarkPosition* IO = new IOXYWatermarkPosition(position, this->m_version);
+            handlerStack->push(IO);
+            IO->StartElement(name, handlerStack);
+        }
+        break;
+
+    case eTilePosition:
+        {
+            TileWatermarkPosition* position = new TileWatermarkPosition();
+            this->m_watermark->AdoptPositionOverride(position);
+            IOTileWatermarkPosition* IO = new IOTileWatermarkPosition(position, this->m_version);
+            handlerStack->push(IO);
+            IO->StartElement(name, handlerStack);
+        }
+        break;
+
+    case eExtendedData1:
+        this->m_procExtData = true;
+        break;
+
+    case eUnknown:
+        ParseUnknownXml(name, handlerStack);
+        break;
+    }
+}
+
+
+void IOWatermarkInstance::ElementChars(const wchar_t* ch)
+{
+    switch (this->m_currElemId)
+    {
+    case eName:
+        this->m_watermark->SetName(ch);
+        break;
+
+    case eResourceId:
+        this->m_watermark->SetResourceId(ch);
+        break;
+
+    case eUsage:
+        if (::wcscmp(ch, L"WMS") == 0) // NOXLATE
+            this->m_watermark->SetUsage(WatermarkInstance::WMS);
+        else if (::wcscmp(ch, L"Viewer") == 0) // NOXLATE
+            this->m_watermark->SetUsage(WatermarkInstance::Viewer);
+        else
+            this->m_watermark->SetUsage(WatermarkInstance::All); // treat as "All" if string is incorrect
+        break;
+    }
+}
+
+
+void IOWatermarkInstance::EndElement(const wchar_t* name, HandlerStack* handlerStack)
+{
+    if (this->m_startElemName == name)
+    {
+        this->m_watermark->SetUnknownXml(this->m_unknownXml);
+
+        this->m_watermark = NULL;
+        this->m_startElemName = L"";
+        handlerStack->pop();
+        delete this;
+    }
+    else if (eExtendedData1 == _ElementIdFromName(name))
+    {
+        this->m_procExtData = false;
+    }
+}
+
+
+void IOWatermarkInstance::Write(MdfStream& fd, WatermarkInstance* watermark, Version* version)
+{
+    fd << tab() << startStr(sWatermark) << std::endl;
+    inctab();
+
+    // Property: Name
+    fd << tab() << startStr(sName);
+    fd << EncodeString(watermark->GetName());
+    fd << endStr(sName) << std::endl;
+
+    // Property: ResourceId
+    fd << tab() << startStr(sResourceId);
+    fd << EncodeString(watermark->GetResourceId());
+    fd << endStr(sResourceId) << std::endl;
+
+    // Property: Usage (optional)
+    WatermarkInstance::Usage usage = watermark->GetUsage();
+    if (usage != WatermarkInstance::All)
+    {
+        fd << tab() << startStr(sUsage);
+        if (usage == WatermarkInstance::WMS)
+            fd << "WMS"; // NOXLATE
+        else if (usage == WatermarkInstance::Viewer)
+            fd << "Viewer"; // NOXLATE
+        fd << endStr(sUsage) << std::endl;
+    }
+
+    // Property: AppearanceOverride (optional)
+    WatermarkAppearance* appearanceOverride = watermark->GetAppearanceOverride();
+    if (appearanceOverride)
+        IOWatermarkAppearance::Write(fd, appearanceOverride, version, sAppearanceOverride);
+    
+    // Property: PositionOverride (optional)
+    WatermarkPosition* positionOverride = watermark->GetPositionOverride();
+    if (positionOverride)
+    {
+        fd << tab() << startStr(sPositionOverride) << std::endl;
+        inctab();
+
+        XYWatermarkPosition* xyPositionOverride = dynamic_cast<XYWatermarkPosition*>(positionOverride);
+        TileWatermarkPosition* tilePositionOverride = dynamic_cast<TileWatermarkPosition*>(positionOverride);
+
+        if (xyPositionOverride)
+            IOXYWatermarkPosition::Write(fd, xyPositionOverride, version);
+        else if (tilePositionOverride)
+            IOTileWatermarkPosition::Write(fd, tilePositionOverride, version);
+
+        dectab();
+        fd << endStr(sPositionOverride) << std::endl;
+    }
+
+    // Write any unknown XML / extended data
+    IOUnknown::Write(fd, watermark->GetUnknownXml(), version);
+
+    dectab();
+    fd << tab() << endStr(sWatermark) << std::endl;
+}


Property changes on: trunk/MgDev/Common/MdfParser/IOWatermarkInstance.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOWatermarkInstance.h
===================================================================
--- trunk/MgDev/Common/MdfParser/IOWatermarkInstance.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOWatermarkInstance.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,48 +1,48 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _IOWATERMARKINSTANCE_H
-#define _IOWATERMARKINSTANCE_H
-
-#include "SAX2ElementHandler.h"
-#include "WatermarkInstance.h"
-#include "Version.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-
-BEGIN_NAMESPACE_MDFPARSER
-
-class IOWatermarkInstance : public SAX2ElementHandler
-{
-    public:
-        IOWatermarkInstance(Version& version);
-        IOWatermarkInstance(WatermarkInstance* watermark, Version& version);
-        virtual ~IOWatermarkInstance();
-
-        virtual void StartElement(const wchar_t* name, HandlerStack* handlerStack);
-        virtual void ElementChars(const wchar_t* ch);
-        virtual void EndElement(const wchar_t* name, HandlerStack* handlerStack);
-
-        static void Write(MdfStream& fd, WatermarkInstance* watermark, Version* version);
-
-    private:
-        WatermarkInstance* m_watermark;
-};
-
-END_NAMESPACE_MDFPARSER
-#endif // _IOWATERMARKINSTANCE_H
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _IOWATERMARKINSTANCE_H
+#define _IOWATERMARKINSTANCE_H
+
+#include "SAX2ElementHandler.h"
+#include "WatermarkInstance.h"
+#include "Version.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+
+BEGIN_NAMESPACE_MDFPARSER
+
+class IOWatermarkInstance : public SAX2ElementHandler
+{
+    public:
+        IOWatermarkInstance(Version& version);
+        IOWatermarkInstance(WatermarkInstance* watermark, Version& version);
+        virtual ~IOWatermarkInstance();
+
+        virtual void StartElement(const wchar_t* name, HandlerStack* handlerStack);
+        virtual void ElementChars(const wchar_t* ch);
+        virtual void EndElement(const wchar_t* name, HandlerStack* handlerStack);
+
+        static void Write(MdfStream& fd, WatermarkInstance* watermark, Version* version);
+
+    private:
+        WatermarkInstance* m_watermark;
+};
+
+END_NAMESPACE_MDFPARSER
+#endif // _IOWATERMARKINSTANCE_H


Property changes on: trunk/MgDev/Common/MdfParser/IOWatermarkInstance.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOWatermarkOffsetUnit.cpp
===================================================================
--- trunk/MgDev/Common/MdfParser/IOWatermarkOffsetUnit.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOWatermarkOffsetUnit.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,56 +1,56 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "stdafx.h"
-#include "IOWatermarkOffsetUnit.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-using namespace MDFPARSER_NAMESPACE;
-
-
-WatermarkOffset::WatermarkOffsetUnit IOWatermarkOffsetUnit::ParseWatermarkOffsetUnit(const wchar_t* ch)
-{
-    if (::wcscmp(ch, L"Inches") == 0) // NOXLATE
-        return WatermarkOffset::Inches;
-    else if (::wcscmp(ch, L"Centimeters") == 0) // NOXLATE
-        return WatermarkOffset::Centimeters;
-    else if (::wcscmp(ch, L"Millimeters") == 0) // NOXLATE
-        return WatermarkOffset::Millimeters;
-    else if (::wcscmp(ch, L"Points") == 0) // NOXLATE
-        return WatermarkOffset::Points;
-    else // treat as "Pixels" if string is incorrect
-        return WatermarkOffset::Pixels;    
-}
-
-
-void IOWatermarkOffsetUnit::Write(MdfStream& fd, WatermarkOffset::WatermarkOffsetUnit offsetUnit)
-{
-    // Property: Unit
-    fd << tab() << startStr("Unit"); // NOXLATE
-    if (offsetUnit == WatermarkOffset::Inches)
-        fd << "Inches"; // NOXLATE
-    else if (offsetUnit == WatermarkOffset::Centimeters)
-        fd << "Centimeters"; // NOXLATE
-    else if (offsetUnit == WatermarkOffset::Millimeters)
-        fd << "Millimeters"; // NOXLATE
-    else if (offsetUnit == WatermarkOffset::Points)
-        fd << "Points"; // NOXLATE
-    else  // treat "Pixels" as default value
-        fd << "Pixels"; // NOXLATE
-    fd << endStr("Unit") << std::endl; // NOXLATE
-}
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "IOWatermarkOffsetUnit.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+using namespace MDFPARSER_NAMESPACE;
+
+
+WatermarkOffset::WatermarkOffsetUnit IOWatermarkOffsetUnit::ParseWatermarkOffsetUnit(const wchar_t* ch)
+{
+    if (::wcscmp(ch, L"Inches") == 0) // NOXLATE
+        return WatermarkOffset::Inches;
+    else if (::wcscmp(ch, L"Centimeters") == 0) // NOXLATE
+        return WatermarkOffset::Centimeters;
+    else if (::wcscmp(ch, L"Millimeters") == 0) // NOXLATE
+        return WatermarkOffset::Millimeters;
+    else if (::wcscmp(ch, L"Points") == 0) // NOXLATE
+        return WatermarkOffset::Points;
+    else // treat as "Pixels" if string is incorrect
+        return WatermarkOffset::Pixels;    
+}
+
+
+void IOWatermarkOffsetUnit::Write(MdfStream& fd, WatermarkOffset::WatermarkOffsetUnit offsetUnit)
+{
+    // Property: Unit
+    fd << tab() << startStr("Unit"); // NOXLATE
+    if (offsetUnit == WatermarkOffset::Inches)
+        fd << "Inches"; // NOXLATE
+    else if (offsetUnit == WatermarkOffset::Centimeters)
+        fd << "Centimeters"; // NOXLATE
+    else if (offsetUnit == WatermarkOffset::Millimeters)
+        fd << "Millimeters"; // NOXLATE
+    else if (offsetUnit == WatermarkOffset::Points)
+        fd << "Points"; // NOXLATE
+    else  // treat "Pixels" as default value
+        fd << "Pixels"; // NOXLATE
+    fd << endStr("Unit") << std::endl; // NOXLATE
+}


Property changes on: trunk/MgDev/Common/MdfParser/IOWatermarkOffsetUnit.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOWatermarkOffsetUnit.h
===================================================================
--- trunk/MgDev/Common/MdfParser/IOWatermarkOffsetUnit.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOWatermarkOffsetUnit.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,37 +1,37 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _IOWATERMARKOFFSETUNIT_H
-#define _IOWATERMARKOFFSETUNIT_H
-
-#include "WatermarkOffsetUnit.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-
-BEGIN_NAMESPACE_MDFPARSER
-
-class IOWatermarkOffsetUnit
-{
-    public:
-        static WatermarkOffset::WatermarkOffsetUnit ParseWatermarkOffsetUnit(const wchar_t* ch);
-
-        static void Write(MdfStream& fd, WatermarkOffset::WatermarkOffsetUnit offsetUnit);
-};
-
-END_NAMESPACE_MDFPARSER
-#endif // _IOWATERMARKOFFSETUNIT_H
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _IOWATERMARKOFFSETUNIT_H
+#define _IOWATERMARKOFFSETUNIT_H
+
+#include "WatermarkOffsetUnit.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+
+BEGIN_NAMESPACE_MDFPARSER
+
+class IOWatermarkOffsetUnit
+{
+    public:
+        static WatermarkOffset::WatermarkOffsetUnit ParseWatermarkOffsetUnit(const wchar_t* ch);
+
+        static void Write(MdfStream& fd, WatermarkOffset::WatermarkOffsetUnit offsetUnit);
+};
+
+END_NAMESPACE_MDFPARSER
+#endif // _IOWATERMARKOFFSETUNIT_H


Property changes on: trunk/MgDev/Common/MdfParser/IOWatermarkOffsetUnit.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOWatermarkXOffset.cpp
===================================================================
--- trunk/MgDev/Common/MdfParser/IOWatermarkXOffset.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOWatermarkXOffset.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,137 +1,137 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "stdafx.h"
-#include "IOWatermarkXOffset.h"
-#include "IOWatermarkOffsetUnit.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-using namespace MDFPARSER_NAMESPACE;
-
-CREATE_ELEMENT_MAP;
-ELEM_MAP_ENTRY(1, XPosition);
-ELEM_MAP_ENTRY(2, HorizontalPosition);
-ELEM_MAP_ENTRY(3, Offset);
-ELEM_MAP_ENTRY(4, Unit);
-ELEM_MAP_ENTRY(5, Alignment);
-
-
-IOWatermarkXOffset::IOWatermarkXOffset(Version& version) : SAX2ElementHandler(version)
-{
-    this->m_XOffset = NULL;
-}
-
-
-IOWatermarkXOffset::IOWatermarkXOffset(WatermarkXOffset* xOffset, Version& version) : SAX2ElementHandler(version)
-{
-    this->m_XOffset = xOffset;
-}
-
-
-IOWatermarkXOffset::~IOWatermarkXOffset()
-{
-}
-
-
-void IOWatermarkXOffset::StartElement(const wchar_t* name, HandlerStack* handlerStack)
-{
-    this->m_currElemName = name;
-    this->m_currElemId = _ElementIdFromName(name);
-
-    switch (this->m_currElemId)
-    {
-    case eXPosition:
-        this->m_startElemName = name;
-        break;
-
-    case eHorizontalPosition:
-        this->m_startElemName = name;
-        break;
-
-    case eUnknown:
-        ParseUnknownXml(name, handlerStack);
-        break;
-    }
-}
-
-
-void IOWatermarkXOffset::ElementChars(const wchar_t* ch)
-{
-    switch (this->m_currElemId)
-    {
-    case eOffset:
-        this->m_XOffset->SetOffset(wstrToDouble(ch));
-        break;
-
-    case eUnit:
-        this->m_XOffset->SetUnit(IOWatermarkOffsetUnit::ParseWatermarkOffsetUnit(ch));
-        break;
-
-    case eAlignment:
-        if (::wcscmp(ch, L"Left") == 0) // NOXLATE
-            this->m_XOffset->SetAlignment(WatermarkXOffset::Left);
-        else if (::wcscmp(ch, L"Right") == 0) // NOXLATE
-            this->m_XOffset->SetAlignment(WatermarkXOffset::Right);
-        else
-            this->m_XOffset->SetAlignment(WatermarkXOffset::Center); // treat as "Center" if string is incorrect
-        break;
-    }
-}
-
-
-void IOWatermarkXOffset::EndElement(const wchar_t* name, HandlerStack* handlerStack)
-{
-    if (this->m_startElemName == name)
-    {
-        this->m_XOffset->SetUnknownXml(this->m_unknownXml);
-
-        this->m_XOffset = NULL;
-        this->m_startElemName = L"";
-        handlerStack->pop();
-        delete this;
-    }
-}
-
-
-void IOWatermarkXOffset::Write(MdfStream& fd, WatermarkXOffset* xOffset, const std::string& name, Version* version)
-{
-    fd << tab() << startStr(name) << std::endl;
-    inctab();
-
-    // Property: Offset
-    fd << tab() << startStr(sOffset);
-    fd << DoubleToStr(xOffset->GetOffset());
-    fd << endStr(sOffset) << std::endl;
-
-    // Property: Unit
-    IOWatermarkOffsetUnit::Write(fd, xOffset->GetUnit());
-
-    // Property: Alignment
-    fd << tab() << startStr(sAlignment);
-    WatermarkXOffset::HorizontalAlignment alignment = xOffset->GetAlignment();
-    if (alignment == WatermarkXOffset::Left)
-        fd << "Left"; // NOXLATE
-    else if (alignment == WatermarkXOffset::Right)
-        fd << "Right"; // NOXLATE
-    else // treat "Center" as default value
-        fd << "Center"; // NOXLATE
-    fd << endStr(sAlignment) << std::endl;
-
-    dectab();
-    fd << tab() << endStr(name) << std::endl;
-}
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "IOWatermarkXOffset.h"
+#include "IOWatermarkOffsetUnit.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+using namespace MDFPARSER_NAMESPACE;
+
+CREATE_ELEMENT_MAP;
+ELEM_MAP_ENTRY(1, XPosition);
+ELEM_MAP_ENTRY(2, HorizontalPosition);
+ELEM_MAP_ENTRY(3, Offset);
+ELEM_MAP_ENTRY(4, Unit);
+ELEM_MAP_ENTRY(5, Alignment);
+
+
+IOWatermarkXOffset::IOWatermarkXOffset(Version& version) : SAX2ElementHandler(version)
+{
+    this->m_XOffset = NULL;
+}
+
+
+IOWatermarkXOffset::IOWatermarkXOffset(WatermarkXOffset* xOffset, Version& version) : SAX2ElementHandler(version)
+{
+    this->m_XOffset = xOffset;
+}
+
+
+IOWatermarkXOffset::~IOWatermarkXOffset()
+{
+}
+
+
+void IOWatermarkXOffset::StartElement(const wchar_t* name, HandlerStack* handlerStack)
+{
+    this->m_currElemName = name;
+    this->m_currElemId = _ElementIdFromName(name);
+
+    switch (this->m_currElemId)
+    {
+    case eXPosition:
+        this->m_startElemName = name;
+        break;
+
+    case eHorizontalPosition:
+        this->m_startElemName = name;
+        break;
+
+    case eUnknown:
+        ParseUnknownXml(name, handlerStack);
+        break;
+    }
+}
+
+
+void IOWatermarkXOffset::ElementChars(const wchar_t* ch)
+{
+    switch (this->m_currElemId)
+    {
+    case eOffset:
+        this->m_XOffset->SetOffset(wstrToDouble(ch));
+        break;
+
+    case eUnit:
+        this->m_XOffset->SetUnit(IOWatermarkOffsetUnit::ParseWatermarkOffsetUnit(ch));
+        break;
+
+    case eAlignment:
+        if (::wcscmp(ch, L"Left") == 0) // NOXLATE
+            this->m_XOffset->SetAlignment(WatermarkXOffset::Left);
+        else if (::wcscmp(ch, L"Right") == 0) // NOXLATE
+            this->m_XOffset->SetAlignment(WatermarkXOffset::Right);
+        else
+            this->m_XOffset->SetAlignment(WatermarkXOffset::Center); // treat as "Center" if string is incorrect
+        break;
+    }
+}
+
+
+void IOWatermarkXOffset::EndElement(const wchar_t* name, HandlerStack* handlerStack)
+{
+    if (this->m_startElemName == name)
+    {
+        this->m_XOffset->SetUnknownXml(this->m_unknownXml);
+
+        this->m_XOffset = NULL;
+        this->m_startElemName = L"";
+        handlerStack->pop();
+        delete this;
+    }
+}
+
+
+void IOWatermarkXOffset::Write(MdfStream& fd, WatermarkXOffset* xOffset, const std::string& name, Version* version)
+{
+    fd << tab() << startStr(name) << std::endl;
+    inctab();
+
+    // Property: Offset
+    fd << tab() << startStr(sOffset);
+    fd << DoubleToStr(xOffset->GetOffset());
+    fd << endStr(sOffset) << std::endl;
+
+    // Property: Unit
+    IOWatermarkOffsetUnit::Write(fd, xOffset->GetUnit());
+
+    // Property: Alignment
+    fd << tab() << startStr(sAlignment);
+    WatermarkXOffset::HorizontalAlignment alignment = xOffset->GetAlignment();
+    if (alignment == WatermarkXOffset::Left)
+        fd << "Left"; // NOXLATE
+    else if (alignment == WatermarkXOffset::Right)
+        fd << "Right"; // NOXLATE
+    else // treat "Center" as default value
+        fd << "Center"; // NOXLATE
+    fd << endStr(sAlignment) << std::endl;
+
+    dectab();
+    fd << tab() << endStr(name) << std::endl;
+}


Property changes on: trunk/MgDev/Common/MdfParser/IOWatermarkXOffset.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOWatermarkXOffset.h
===================================================================
--- trunk/MgDev/Common/MdfParser/IOWatermarkXOffset.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOWatermarkXOffset.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,48 +1,48 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _IOWATERMARKXOFFSET_H
-#define _IOWATERMARKXOFFSET_H
-
-#include "SAX2ElementHandler.h"
-#include "WatermarkXOffset.h"
-#include "Version.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-
-BEGIN_NAMESPACE_MDFPARSER
-
-class IOWatermarkXOffset : public SAX2ElementHandler
-{
-    public:
-        IOWatermarkXOffset(Version& version);
-        IOWatermarkXOffset(WatermarkXOffset* xOffset, Version& version);
-        virtual ~IOWatermarkXOffset();
-
-        virtual void StartElement(const wchar_t* name, HandlerStack* handlerStack);
-        virtual void ElementChars(const wchar_t* ch);
-        virtual void EndElement(const wchar_t* name, HandlerStack* handlerStack);
-
-        static void Write(MdfStream& fd, WatermarkXOffset* xOffset, const std::string& name, Version* version);
-
-    private:
-        WatermarkXOffset* m_XOffset;
-};
-
-END_NAMESPACE_MDFPARSER
-#endif // _IOWATERMARKXOFFSET_H
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _IOWATERMARKXOFFSET_H
+#define _IOWATERMARKXOFFSET_H
+
+#include "SAX2ElementHandler.h"
+#include "WatermarkXOffset.h"
+#include "Version.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+
+BEGIN_NAMESPACE_MDFPARSER
+
+class IOWatermarkXOffset : public SAX2ElementHandler
+{
+    public:
+        IOWatermarkXOffset(Version& version);
+        IOWatermarkXOffset(WatermarkXOffset* xOffset, Version& version);
+        virtual ~IOWatermarkXOffset();
+
+        virtual void StartElement(const wchar_t* name, HandlerStack* handlerStack);
+        virtual void ElementChars(const wchar_t* ch);
+        virtual void EndElement(const wchar_t* name, HandlerStack* handlerStack);
+
+        static void Write(MdfStream& fd, WatermarkXOffset* xOffset, const std::string& name, Version* version);
+
+    private:
+        WatermarkXOffset* m_XOffset;
+};
+
+END_NAMESPACE_MDFPARSER
+#endif // _IOWATERMARKXOFFSET_H


Property changes on: trunk/MgDev/Common/MdfParser/IOWatermarkXOffset.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOWatermarkYOffset.cpp
===================================================================
--- trunk/MgDev/Common/MdfParser/IOWatermarkYOffset.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOWatermarkYOffset.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,137 +1,137 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "stdafx.h"
-#include "IOWatermarkYOffset.h"
-#include "IOWatermarkOffsetUnit.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-using namespace MDFPARSER_NAMESPACE;
-
-CREATE_ELEMENT_MAP;
-ELEM_MAP_ENTRY(1, YPosition);
-ELEM_MAP_ENTRY(2, VerticalPosition);
-ELEM_MAP_ENTRY(3, Offset);
-ELEM_MAP_ENTRY(4, Unit);
-ELEM_MAP_ENTRY(5, Alignment);
-
-
-IOWatermarkYOffset::IOWatermarkYOffset(Version& version) : SAX2ElementHandler(version)
-{
-    this->m_YOffset = NULL;
-}
-
-
-IOWatermarkYOffset::IOWatermarkYOffset(WatermarkYOffset* yOffset, Version& version) : SAX2ElementHandler(version)
-{
-    this->m_YOffset = yOffset;
-}
-
-
-IOWatermarkYOffset::~IOWatermarkYOffset()
-{
-}
-
-
-void IOWatermarkYOffset::StartElement(const wchar_t* name, HandlerStack* handlerStack)
-{
-    this->m_currElemName = name;
-    this->m_currElemId = _ElementIdFromName(name);
-
-    switch (this->m_currElemId)
-    {
-    case eYPosition:
-        this->m_startElemName = name;
-        break;
-
-    case eVerticalPosition:
-        this->m_startElemName = name;
-        break;
-
-    case eUnknown:
-        ParseUnknownXml(name, handlerStack);
-        break;
-    }
-}
-
-
-void IOWatermarkYOffset::ElementChars(const wchar_t* ch)
-{
-    switch (this->m_currElemId)
-    {
-    case eOffset:
-        this->m_YOffset->SetOffset(wstrToDouble(ch));
-        break;
-
-    case eUnit:
-        this->m_YOffset->SetUnit(IOWatermarkOffsetUnit::ParseWatermarkOffsetUnit(ch));
-        break;
-
-    case eAlignment:
-        if (::wcscmp(ch, L"Top") == 0) // NOXLATE
-            this->m_YOffset->SetAlignment(WatermarkYOffset::Top);
-        else if (::wcscmp(ch, L"Bottom") == 0) // NOXLATE
-            this->m_YOffset->SetAlignment(WatermarkYOffset::Bottom);
-        else
-            this->m_YOffset->SetAlignment(WatermarkYOffset::Center); // treat as "Center" if string is incorrect
-        break;
-    }
-}
-
-
-void IOWatermarkYOffset::EndElement(const wchar_t* name, HandlerStack* handlerStack)
-{
-    if (this->m_startElemName == name)
-    {
-        this->m_YOffset->SetUnknownXml(this->m_unknownXml);
-
-        this->m_YOffset = NULL;
-        this->m_startElemName = L"";
-        handlerStack->pop();
-        delete this;
-    }
-}
-
-
-void IOWatermarkYOffset::Write(MdfStream& fd, WatermarkYOffset* yOffset, const std::string& name, Version* version)
-{
-    fd << tab() << startStr(name) << std::endl;
-    inctab();
-
-    // Property: Offset
-    fd << tab() << startStr(sOffset);
-    fd << DoubleToStr(yOffset->GetOffset());
-    fd << endStr(sOffset) << std::endl;
-
-    // Property: Unit
-    IOWatermarkOffsetUnit::Write(fd, yOffset->GetUnit());
-
-    // Property: Alignment
-    fd << tab() << startStr(sAlignment);
-    WatermarkYOffset::VerticalAlignment alignment = yOffset->GetAlignment();
-    if (alignment == WatermarkYOffset::Top)
-        fd << "Top"; // NOXLATE
-    else if (alignment == WatermarkYOffset::Bottom)
-        fd << "Bottom"; // NOXLATE
-    else // treat "Center" as default value
-        fd << "Center"; // NOXLATE
-    fd << endStr(sAlignment) << std::endl;
-
-    dectab();
-    fd << tab() << endStr(name) << std::endl;
-}
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "IOWatermarkYOffset.h"
+#include "IOWatermarkOffsetUnit.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+using namespace MDFPARSER_NAMESPACE;
+
+CREATE_ELEMENT_MAP;
+ELEM_MAP_ENTRY(1, YPosition);
+ELEM_MAP_ENTRY(2, VerticalPosition);
+ELEM_MAP_ENTRY(3, Offset);
+ELEM_MAP_ENTRY(4, Unit);
+ELEM_MAP_ENTRY(5, Alignment);
+
+
+IOWatermarkYOffset::IOWatermarkYOffset(Version& version) : SAX2ElementHandler(version)
+{
+    this->m_YOffset = NULL;
+}
+
+
+IOWatermarkYOffset::IOWatermarkYOffset(WatermarkYOffset* yOffset, Version& version) : SAX2ElementHandler(version)
+{
+    this->m_YOffset = yOffset;
+}
+
+
+IOWatermarkYOffset::~IOWatermarkYOffset()
+{
+}
+
+
+void IOWatermarkYOffset::StartElement(const wchar_t* name, HandlerStack* handlerStack)
+{
+    this->m_currElemName = name;
+    this->m_currElemId = _ElementIdFromName(name);
+
+    switch (this->m_currElemId)
+    {
+    case eYPosition:
+        this->m_startElemName = name;
+        break;
+
+    case eVerticalPosition:
+        this->m_startElemName = name;
+        break;
+
+    case eUnknown:
+        ParseUnknownXml(name, handlerStack);
+        break;
+    }
+}
+
+
+void IOWatermarkYOffset::ElementChars(const wchar_t* ch)
+{
+    switch (this->m_currElemId)
+    {
+    case eOffset:
+        this->m_YOffset->SetOffset(wstrToDouble(ch));
+        break;
+
+    case eUnit:
+        this->m_YOffset->SetUnit(IOWatermarkOffsetUnit::ParseWatermarkOffsetUnit(ch));
+        break;
+
+    case eAlignment:
+        if (::wcscmp(ch, L"Top") == 0) // NOXLATE
+            this->m_YOffset->SetAlignment(WatermarkYOffset::Top);
+        else if (::wcscmp(ch, L"Bottom") == 0) // NOXLATE
+            this->m_YOffset->SetAlignment(WatermarkYOffset::Bottom);
+        else
+            this->m_YOffset->SetAlignment(WatermarkYOffset::Center); // treat as "Center" if string is incorrect
+        break;
+    }
+}
+
+
+void IOWatermarkYOffset::EndElement(const wchar_t* name, HandlerStack* handlerStack)
+{
+    if (this->m_startElemName == name)
+    {
+        this->m_YOffset->SetUnknownXml(this->m_unknownXml);
+
+        this->m_YOffset = NULL;
+        this->m_startElemName = L"";
+        handlerStack->pop();
+        delete this;
+    }
+}
+
+
+void IOWatermarkYOffset::Write(MdfStream& fd, WatermarkYOffset* yOffset, const std::string& name, Version* version)
+{
+    fd << tab() << startStr(name) << std::endl;
+    inctab();
+
+    // Property: Offset
+    fd << tab() << startStr(sOffset);
+    fd << DoubleToStr(yOffset->GetOffset());
+    fd << endStr(sOffset) << std::endl;
+
+    // Property: Unit
+    IOWatermarkOffsetUnit::Write(fd, yOffset->GetUnit());
+
+    // Property: Alignment
+    fd << tab() << startStr(sAlignment);
+    WatermarkYOffset::VerticalAlignment alignment = yOffset->GetAlignment();
+    if (alignment == WatermarkYOffset::Top)
+        fd << "Top"; // NOXLATE
+    else if (alignment == WatermarkYOffset::Bottom)
+        fd << "Bottom"; // NOXLATE
+    else // treat "Center" as default value
+        fd << "Center"; // NOXLATE
+    fd << endStr(sAlignment) << std::endl;
+
+    dectab();
+    fd << tab() << endStr(name) << std::endl;
+}


Property changes on: trunk/MgDev/Common/MdfParser/IOWatermarkYOffset.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOWatermarkYOffset.h
===================================================================
--- trunk/MgDev/Common/MdfParser/IOWatermarkYOffset.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOWatermarkYOffset.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,48 +1,48 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _IOWATERMARKYOFFSET_H
-#define _IOWATERMARKYOFFSET_H
-
-#include "SAX2ElementHandler.h"
-#include "WatermarkYOffset.h"
-#include "Version.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-
-BEGIN_NAMESPACE_MDFPARSER
-
-class IOWatermarkYOffset : public SAX2ElementHandler
-{
-    public:
-        IOWatermarkYOffset(Version& version);
-        IOWatermarkYOffset(WatermarkYOffset* yOffset, Version& version);
-        virtual ~IOWatermarkYOffset();
-
-        virtual void StartElement(const wchar_t* name, HandlerStack* handlerStack);
-        virtual void ElementChars(const wchar_t* ch);
-        virtual void EndElement(const wchar_t* name, HandlerStack* handlerStack);
-
-        static void Write(MdfStream& fd, WatermarkYOffset* xOffset, const std::string& name, Version* version);
-
-    private:
-        WatermarkYOffset* m_YOffset;
-};
-
-END_NAMESPACE_MDFPARSER
-#endif // _IOWATERMARKYOFFSET_H
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _IOWATERMARKYOFFSET_H
+#define _IOWATERMARKYOFFSET_H
+
+#include "SAX2ElementHandler.h"
+#include "WatermarkYOffset.h"
+#include "Version.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+
+BEGIN_NAMESPACE_MDFPARSER
+
+class IOWatermarkYOffset : public SAX2ElementHandler
+{
+    public:
+        IOWatermarkYOffset(Version& version);
+        IOWatermarkYOffset(WatermarkYOffset* yOffset, Version& version);
+        virtual ~IOWatermarkYOffset();
+
+        virtual void StartElement(const wchar_t* name, HandlerStack* handlerStack);
+        virtual void ElementChars(const wchar_t* ch);
+        virtual void EndElement(const wchar_t* name, HandlerStack* handlerStack);
+
+        static void Write(MdfStream& fd, WatermarkYOffset* xOffset, const std::string& name, Version* version);
+
+    private:
+        WatermarkYOffset* m_YOffset;
+};
+
+END_NAMESPACE_MDFPARSER
+#endif // _IOWATERMARKYOFFSET_H


Property changes on: trunk/MgDev/Common/MdfParser/IOWatermarkYOffset.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOXYWatermarkPosition.cpp
===================================================================
--- trunk/MgDev/Common/MdfParser/IOXYWatermarkPosition.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOXYWatermarkPosition.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,120 +1,120 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "stdafx.h"
-#include "IOXYWatermarkPosition.h"
-#include "IOWatermarkXOffset.h"
-#include "IOWatermarkYOffset.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-using namespace MDFPARSER_NAMESPACE;
-
-CREATE_ELEMENT_MAP;
-ELEM_MAP_ENTRY(1, XYPosition);
-ELEM_MAP_ENTRY(2, XPosition);
-ELEM_MAP_ENTRY(3, YPosition);
-
-
-IOXYWatermarkPosition::IOXYWatermarkPosition(Version& version) : SAX2ElementHandler(version)
-{
-    this->m_position = NULL;
-}
-
-
-IOXYWatermarkPosition::IOXYWatermarkPosition(XYWatermarkPosition* position, Version& version) : SAX2ElementHandler(version)
-{
-    this->m_position = position;
-}
-
-
-IOXYWatermarkPosition::~IOXYWatermarkPosition()
-{
-}
-
-
-void IOXYWatermarkPosition::StartElement(const wchar_t* name, HandlerStack* handlerStack)
-{
-    this->m_currElemName = name;
-    this->m_currElemId = _ElementIdFromName(name);
-
-    switch (this->m_currElemId)
-    {
-    case eXYPosition:
-        this->m_startElemName = name;
-        break;
-
-    case eXPosition:
-        {
-            WatermarkXOffset* xOffset = new WatermarkXOffset();
-            this->m_position->AdoptXPosition(xOffset);
-            IOWatermarkXOffset* IO = new IOWatermarkXOffset(xOffset, this->m_version);
-            handlerStack->push(IO);
-            IO->StartElement(name, handlerStack);
-        }
-        break;
-
-    case eYPosition:
-        {
-            WatermarkYOffset* yOffset = new WatermarkYOffset();
-            this->m_position->AdoptYPosition(yOffset);
-            IOWatermarkYOffset* IO = new IOWatermarkYOffset(yOffset, this->m_version);
-            handlerStack->push(IO);
-            IO->StartElement(name, handlerStack);
-        }
-        break;
-
-    case eUnknown:
-        ParseUnknownXml(name, handlerStack);
-        break;
-    }
-}
-
-
-void IOXYWatermarkPosition::ElementChars(const wchar_t* ch)
-{
-}
-
-
-void IOXYWatermarkPosition::EndElement(const wchar_t* name, HandlerStack* handlerStack)
-{
-    if (this->m_startElemName == name)
-    {
-        this->m_position->SetUnknownXml(this->m_unknownXml);
-
-        this->m_position = NULL;
-        this->m_startElemName = L"";
-        handlerStack->pop();
-        delete this;
-    }
-}
-
-
-void IOXYWatermarkPosition::Write(MdfStream& fd, XYWatermarkPosition* position, Version* version)
-{
-    fd << tab() << startStr(sXYPosition) << std::endl;
-    inctab();
-
-    // Property: XPosition
-    IOWatermarkXOffset::Write(fd, position->GetXPosition(), sXPosition, version);
-
-    // Property: YPosition
-    IOWatermarkYOffset::Write(fd, position->GetYPosition(), sYPosition, version);
-
-    dectab();
-    fd << tab() << endStr(sXYPosition) << std::endl;
-}
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "IOXYWatermarkPosition.h"
+#include "IOWatermarkXOffset.h"
+#include "IOWatermarkYOffset.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+using namespace MDFPARSER_NAMESPACE;
+
+CREATE_ELEMENT_MAP;
+ELEM_MAP_ENTRY(1, XYPosition);
+ELEM_MAP_ENTRY(2, XPosition);
+ELEM_MAP_ENTRY(3, YPosition);
+
+
+IOXYWatermarkPosition::IOXYWatermarkPosition(Version& version) : SAX2ElementHandler(version)
+{
+    this->m_position = NULL;
+}
+
+
+IOXYWatermarkPosition::IOXYWatermarkPosition(XYWatermarkPosition* position, Version& version) : SAX2ElementHandler(version)
+{
+    this->m_position = position;
+}
+
+
+IOXYWatermarkPosition::~IOXYWatermarkPosition()
+{
+}
+
+
+void IOXYWatermarkPosition::StartElement(const wchar_t* name, HandlerStack* handlerStack)
+{
+    this->m_currElemName = name;
+    this->m_currElemId = _ElementIdFromName(name);
+
+    switch (this->m_currElemId)
+    {
+    case eXYPosition:
+        this->m_startElemName = name;
+        break;
+
+    case eXPosition:
+        {
+            WatermarkXOffset* xOffset = new WatermarkXOffset();
+            this->m_position->AdoptXPosition(xOffset);
+            IOWatermarkXOffset* IO = new IOWatermarkXOffset(xOffset, this->m_version);
+            handlerStack->push(IO);
+            IO->StartElement(name, handlerStack);
+        }
+        break;
+
+    case eYPosition:
+        {
+            WatermarkYOffset* yOffset = new WatermarkYOffset();
+            this->m_position->AdoptYPosition(yOffset);
+            IOWatermarkYOffset* IO = new IOWatermarkYOffset(yOffset, this->m_version);
+            handlerStack->push(IO);
+            IO->StartElement(name, handlerStack);
+        }
+        break;
+
+    case eUnknown:
+        ParseUnknownXml(name, handlerStack);
+        break;
+    }
+}
+
+
+void IOXYWatermarkPosition::ElementChars(const wchar_t* ch)
+{
+}
+
+
+void IOXYWatermarkPosition::EndElement(const wchar_t* name, HandlerStack* handlerStack)
+{
+    if (this->m_startElemName == name)
+    {
+        this->m_position->SetUnknownXml(this->m_unknownXml);
+
+        this->m_position = NULL;
+        this->m_startElemName = L"";
+        handlerStack->pop();
+        delete this;
+    }
+}
+
+
+void IOXYWatermarkPosition::Write(MdfStream& fd, XYWatermarkPosition* position, Version* version)
+{
+    fd << tab() << startStr(sXYPosition) << std::endl;
+    inctab();
+
+    // Property: XPosition
+    IOWatermarkXOffset::Write(fd, position->GetXPosition(), sXPosition, version);
+
+    // Property: YPosition
+    IOWatermarkYOffset::Write(fd, position->GetYPosition(), sYPosition, version);
+
+    dectab();
+    fd << tab() << endStr(sXYPosition) << std::endl;
+}


Property changes on: trunk/MgDev/Common/MdfParser/IOXYWatermarkPosition.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/MdfParser/IOXYWatermarkPosition.h
===================================================================
--- trunk/MgDev/Common/MdfParser/IOXYWatermarkPosition.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/MdfParser/IOXYWatermarkPosition.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,48 +1,48 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _IOXYWATERMARKPOSITION_H
-#define _IOXYWATERMARKPOSITION_H
-
-#include "SAX2ElementHandler.h"
-#include "XYWatermarkPosition.h"
-#include "Version.h"
-
-using namespace XERCES_CPP_NAMESPACE;
-using namespace MDFMODEL_NAMESPACE;
-
-BEGIN_NAMESPACE_MDFPARSER
-
-class IOXYWatermarkPosition : public SAX2ElementHandler
-{
-    public:
-        IOXYWatermarkPosition(Version& version);
-        IOXYWatermarkPosition(XYWatermarkPosition* position, Version& version);
-        virtual ~IOXYWatermarkPosition();
-
-        virtual void StartElement(const wchar_t* name, HandlerStack* handlerStack);
-        virtual void ElementChars(const wchar_t* ch);
-        virtual void EndElement(const wchar_t* name, HandlerStack* handlerStack);
-
-        static void Write(MdfStream& fd, XYWatermarkPosition* position, Version* version);
-
-    private:
-        XYWatermarkPosition* m_position;
-};
-
-END_NAMESPACE_MDFPARSER
-#endif // _IOXYWATERMARKPOSITION_H
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _IOXYWATERMARKPOSITION_H
+#define _IOXYWATERMARKPOSITION_H
+
+#include "SAX2ElementHandler.h"
+#include "XYWatermarkPosition.h"
+#include "Version.h"
+
+using namespace XERCES_CPP_NAMESPACE;
+using namespace MDFMODEL_NAMESPACE;
+
+BEGIN_NAMESPACE_MDFPARSER
+
+class IOXYWatermarkPosition : public SAX2ElementHandler
+{
+    public:
+        IOXYWatermarkPosition(Version& version);
+        IOXYWatermarkPosition(XYWatermarkPosition* position, Version& version);
+        virtual ~IOXYWatermarkPosition();
+
+        virtual void StartElement(const wchar_t* name, HandlerStack* handlerStack);
+        virtual void ElementChars(const wchar_t* ch);
+        virtual void EndElement(const wchar_t* name, HandlerStack* handlerStack);
+
+        static void Write(MdfStream& fd, XYWatermarkPosition* position, Version* version);
+
+    private:
+        XYWatermarkPosition* m_position;
+};
+
+END_NAMESPACE_MDFPARSER
+#endif // _IOXYWATERMARKPOSITION_H


Property changes on: trunk/MgDev/Common/MdfParser/IOXYWatermarkPosition.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/PlatformBase/Exception/InvalidWatermarkDefinitionException.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/Exception/InvalidWatermarkDefinitionException.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/PlatformBase/Exception/InvalidWatermarkDefinitionException.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,40 +1,40 @@
-//
-//  Copyright (C) 2004-2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "PlatformBase.h"
-
-IMPLEMENT_EXCEPTION_DEFAULTS(MgInvalidWatermarkDefinitionException, MgApplicationException)
-
-///////////////////////////////////////////////////////////////////////////////
-/// \brief
-/// Construct a MgInvalidWatermarkDefinitionException object.
-///
-MgInvalidWatermarkDefinitionException::MgInvalidWatermarkDefinitionException(CREFSTRING methodName,
-    INT32 lineNumber, CREFSTRING fileName, MgStringCollection* whatArguments,
-    CREFSTRING whyMessageId, MgStringCollection* whyArguments) throw() :
-    MgApplicationException(methodName, lineNumber, fileName,
-        whatArguments, whyMessageId, whyArguments)
-{
-}
-
-///////////////////////////////////////////////////////////////////////////////
-/// \brief
-/// Destruct the object.
-///
-MgInvalidWatermarkDefinitionException::~MgInvalidWatermarkDefinitionException() throw()
-{
-}
+//
+//  Copyright (C) 2004-2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "PlatformBase.h"
+
+IMPLEMENT_EXCEPTION_DEFAULTS(MgInvalidWatermarkDefinitionException, MgApplicationException)
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Construct a MgInvalidWatermarkDefinitionException object.
+///
+MgInvalidWatermarkDefinitionException::MgInvalidWatermarkDefinitionException(CREFSTRING methodName,
+    INT32 lineNumber, CREFSTRING fileName, MgStringCollection* whatArguments,
+    CREFSTRING whyMessageId, MgStringCollection* whyArguments) throw() :
+    MgApplicationException(methodName, lineNumber, fileName,
+        whatArguments, whyMessageId, whyArguments)
+{
+}
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Destruct the object.
+///
+MgInvalidWatermarkDefinitionException::~MgInvalidWatermarkDefinitionException() throw()
+{
+}


Property changes on: trunk/MgDev/Common/PlatformBase/Exception/InvalidWatermarkDefinitionException.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/PlatformBase/Exception/InvalidWatermarkDefinitionException.h
===================================================================
--- trunk/MgDev/Common/PlatformBase/Exception/InvalidWatermarkDefinitionException.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/PlatformBase/Exception/InvalidWatermarkDefinitionException.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,71 +1,71 @@
-//
-//  Copyright (C) 2004-2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef MG_INVALID_WATERMARK_DEFINITION_EXCEPTION_H_
-#define MG_INVALID_WATERMARK_DEFINITION_EXCEPTION_H_
-
-/// \ingroup Exceptions_Module
-
-#include "PlatformBase.h"
-
-///////////////////////////////////////////////////////////////////////////////
-/// \brief
-/// Thrown when a watermark definition resource is invalid.
-///
-class MG_PLATFORMBASE_API MgInvalidWatermarkDefinitionException : public MgApplicationException
-{
-    DECLARE_CLASSNAME(MgInvalidWatermarkDefinitionException)
-
-EXTERNAL_API:
-
-    ///////////////////////////////////////////////////////////////////////////
-    /// \brief
-    /// Construct a MgInvalidWatermarkDefinitionException object.
-    ///
-    /// \param methodName
-    /// Name of the method where the exception occurred.
-    /// \param lineNumber
-    /// Line number where the exception occurred.
-    /// \param fileName
-    /// File name where the exception occurred.
-    /// \param whatArguments
-    /// Collection of arguments used to format the message that describes what the exception is.
-    /// \param whyMessageId
-    /// ID of the message that describes why the exception occurs.
-    /// \param whyArguments
-    /// Collection of arguments used to format the message that describes why the exception occurs.
-    ///
-    MgInvalidWatermarkDefinitionException(CREFSTRING methodName, INT32 lineNumber,
-        CREFSTRING fileName, MgStringCollection* whatArguments,
-        CREFSTRING whyMessageId, MgStringCollection* whyArguments) throw();
-
-    ///////////////////////////////////////////////////////////////////////////
-    /// \brief
-    /// Destructor for a MgInvalidWatermarkDefinitionException object.
-    ///
-    virtual ~MgInvalidWatermarkDefinitionException() throw();
-
-INTERNAL_API:
-
-    DECLARE_EXCEPTION_DEFAULTS(MgInvalidWatermarkDefinitionException)
-
-CLASS_ID:
-
-    static const INT32 m_cls_id = PlatformBase_Exception_MgInvalidWatermarkDefinitionException;
-};
-
-#endif
+//
+//  Copyright (C) 2004-2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef MG_INVALID_WATERMARK_DEFINITION_EXCEPTION_H_
+#define MG_INVALID_WATERMARK_DEFINITION_EXCEPTION_H_
+
+/// \ingroup Exceptions_Module
+
+#include "PlatformBase.h"
+
+///////////////////////////////////////////////////////////////////////////////
+/// \brief
+/// Thrown when a watermark definition resource is invalid.
+///
+class MG_PLATFORMBASE_API MgInvalidWatermarkDefinitionException : public MgApplicationException
+{
+    DECLARE_CLASSNAME(MgInvalidWatermarkDefinitionException)
+
+EXTERNAL_API:
+
+    ///////////////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Construct a MgInvalidWatermarkDefinitionException object.
+    ///
+    /// \param methodName
+    /// Name of the method where the exception occurred.
+    /// \param lineNumber
+    /// Line number where the exception occurred.
+    /// \param fileName
+    /// File name where the exception occurred.
+    /// \param whatArguments
+    /// Collection of arguments used to format the message that describes what the exception is.
+    /// \param whyMessageId
+    /// ID of the message that describes why the exception occurs.
+    /// \param whyArguments
+    /// Collection of arguments used to format the message that describes why the exception occurs.
+    ///
+    MgInvalidWatermarkDefinitionException(CREFSTRING methodName, INT32 lineNumber,
+        CREFSTRING fileName, MgStringCollection* whatArguments,
+        CREFSTRING whyMessageId, MgStringCollection* whyArguments) throw();
+
+    ///////////////////////////////////////////////////////////////////////////
+    /// \brief
+    /// Destructor for a MgInvalidWatermarkDefinitionException object.
+    ///
+    virtual ~MgInvalidWatermarkDefinitionException() throw();
+
+INTERNAL_API:
+
+    DECLARE_EXCEPTION_DEFAULTS(MgInvalidWatermarkDefinitionException)
+
+CLASS_ID:
+
+    static const INT32 m_cls_id = PlatformBase_Exception_MgInvalidWatermarkDefinitionException;
+};
+
+#endif


Property changes on: trunk/MgDev/Common/PlatformBase/Exception/InvalidWatermarkDefinitionException.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/PlatformBase/MapLayer/Watermark.cpp
===================================================================
--- trunk/MgDev/Common/PlatformBase/MapLayer/Watermark.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/PlatformBase/MapLayer/Watermark.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,74 +1,74 @@
-//
-//  Copyright (C) 2004-2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "Watermark.h"
-#include "MdfModel.h"
-#include "SAX2Parser.h"
-
-using namespace std;
-
-//static method to create the watermark definition
-MdfModel::WatermarkDefinition* MgWatermark::GetWatermarkDefinition(MgResourceService* svcResource, MgResourceIdentifier* resId)
-{
-    // get and parse the watermark definition
-    Ptr<MgByteReader> reader = svcResource->GetResourceContent(resId, L"");
-    Ptr<MgByteSink> sink = new MgByteSink(reader);
-    Ptr<MgByte> bytes = sink->ToBuffer();
-
-    assert(bytes->GetLength() > 0);
-
-    MdfParser::SAX2Parser parser;
-    parser.ParseString((const char*)bytes->Bytes(), bytes->GetLength());
-
-    if (!parser.GetSucceeded())
-    {
-        STRING errorMsg = parser.GetErrorMessage();
-        MgStringCollection arguments;
-        arguments.Add(errorMsg);
-        throw new MgInvalidWatermarkDefinitionException(L"MgWatermark::GetWatermarkDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
-    }
-
-    // detach the watermark definition from the parser - it's
-    // now the caller's responsibility to delete it
-    MdfModel::WatermarkDefinition* wdef = parser.DetachWatermarkDefinition();
-    assert(wdef != NULL);
-
-    return wdef;
-}
-
-//static method to create the watermark definition
-MdfModel::WatermarkDefinition* MgWatermark::GetWatermarkDefinition(CREFSTRING resourceContent)
-{
-    // get and parse the watermark definition
-    MdfParser::SAX2Parser parser;
-    parser.ParseString(resourceContent.c_str(), resourceContent.length());
-
-    if (!parser.GetSucceeded())
-    {
-        STRING errorMsg = parser.GetErrorMessage();
-        MgStringCollection arguments;
-        arguments.Add(errorMsg);
-        throw new MgInvalidWatermarkDefinitionException(L"MgWatermark::GetWatermarkDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
-    }
-
-    // detach the watermark definition from the parser - it's
-    // now the caller's responsibility to delete it
-    MdfModel::WatermarkDefinition* wdef = parser.DetachWatermarkDefinition();
-    assert(wdef != NULL);
-
-    return wdef;
-}
+//
+//  Copyright (C) 2004-2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "Watermark.h"
+#include "MdfModel.h"
+#include "SAX2Parser.h"
+
+using namespace std;
+
+//static method to create the watermark definition
+MdfModel::WatermarkDefinition* MgWatermark::GetWatermarkDefinition(MgResourceService* svcResource, MgResourceIdentifier* resId)
+{
+    // get and parse the watermark definition
+    Ptr<MgByteReader> reader = svcResource->GetResourceContent(resId, L"");
+    Ptr<MgByteSink> sink = new MgByteSink(reader);
+    Ptr<MgByte> bytes = sink->ToBuffer();
+
+    assert(bytes->GetLength() > 0);
+
+    MdfParser::SAX2Parser parser;
+    parser.ParseString((const char*)bytes->Bytes(), bytes->GetLength());
+
+    if (!parser.GetSucceeded())
+    {
+        STRING errorMsg = parser.GetErrorMessage();
+        MgStringCollection arguments;
+        arguments.Add(errorMsg);
+        throw new MgInvalidWatermarkDefinitionException(L"MgWatermark::GetWatermarkDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
+    }
+
+    // detach the watermark definition from the parser - it's
+    // now the caller's responsibility to delete it
+    MdfModel::WatermarkDefinition* wdef = parser.DetachWatermarkDefinition();
+    assert(wdef != NULL);
+
+    return wdef;
+}
+
+//static method to create the watermark definition
+MdfModel::WatermarkDefinition* MgWatermark::GetWatermarkDefinition(CREFSTRING resourceContent)
+{
+    // get and parse the watermark definition
+    MdfParser::SAX2Parser parser;
+    parser.ParseString(resourceContent.c_str(), resourceContent.length());
+
+    if (!parser.GetSucceeded())
+    {
+        STRING errorMsg = parser.GetErrorMessage();
+        MgStringCollection arguments;
+        arguments.Add(errorMsg);
+        throw new MgInvalidWatermarkDefinitionException(L"MgWatermark::GetWatermarkDefinition", __LINE__, __WFILE__, &arguments, L"", NULL);
+    }
+
+    // detach the watermark definition from the parser - it's
+    // now the caller's responsibility to delete it
+    MdfModel::WatermarkDefinition* wdef = parser.DetachWatermarkDefinition();
+    assert(wdef != NULL);
+
+    return wdef;
+}


Property changes on: trunk/MgDev/Common/PlatformBase/MapLayer/Watermark.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/PlatformBase/MapLayer/Watermark.h
===================================================================
--- trunk/MgDev/Common/PlatformBase/MapLayer/Watermark.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/PlatformBase/MapLayer/Watermark.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,37 +1,37 @@
-//
-//  Copyright (C) 2004-2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef _MG_WATERMARK_H_
-#define _MG_WATERMARK_H_
-
-BEGIN_NAMESPACE_MDFMODEL
-class WatermarkDefinition;
-END_NAMESPACE_MDFMODEL
-
-//Currently the only reason MgWatermark exists is that 
-//the rendering service can get the WatermarkDefinition.
-//So it's only an internal API.
-
-class MG_PLATFORMBASE_API MgWatermark
-{
-INTERNAL_API:
-
-    static MdfModel::WatermarkDefinition* GetWatermarkDefinition(MgResourceService* svcResource, MgResourceIdentifier* resId);
-    static MdfModel::WatermarkDefinition* GetWatermarkDefinition(CREFSTRING resourceContent);
-};
-
-#endif
+//
+//  Copyright (C) 2004-2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef _MG_WATERMARK_H_
+#define _MG_WATERMARK_H_
+
+BEGIN_NAMESPACE_MDFMODEL
+class WatermarkDefinition;
+END_NAMESPACE_MDFMODEL
+
+//Currently the only reason MgWatermark exists is that 
+//the rendering service can get the WatermarkDefinition.
+//So it's only an internal API.
+
+class MG_PLATFORMBASE_API MgWatermark
+{
+INTERNAL_API:
+
+    static MdfModel::WatermarkDefinition* GetWatermarkDefinition(MgResourceService* svcResource, MgResourceIdentifier* resId);
+    static MdfModel::WatermarkDefinition* GetWatermarkDefinition(CREFSTRING resourceContent);
+};
+
+#endif


Property changes on: trunk/MgDev/Common/PlatformBase/MapLayer/Watermark.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/Renderers/RenderUtil.cpp
===================================================================
--- trunk/MgDev/Common/Renderers/RenderUtil.cpp	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/Renderers/RenderUtil.cpp	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,73 +1,73 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#include "stdafx.h"
-#include "RendererStyles.h"
-#include "AGGImageIO.h"
-#include "RenderUtil.h"
-
-void RenderUtil::DrawScreenRaster(SE_Renderer* render,
-                                 unsigned char* data, int length,
-                                 RS_ImageFormat format, int native_width, int native_height,
-                                 double x, double y, double w, double h, double angledeg,
-                                 double alpha)
-{
-    if (format == RS_ImageFormat_Unknown)
-        return;
-
-    if (alpha <= 0.0)
-        return;
-
-    if (alpha >= 1.0)
-    {
-        render->DrawScreenRaster(data, length, format, native_width, native_height, x, y, w, h, angledeg);
-        return;
-    }
-
-    // if it's PNG, decode it and come back around
-    if (format == RS_ImageFormat_PNG)
-    {
-        unsigned int* decoded = AGGImageIO::DecodePNG(data, length, native_width, native_height);
-        if (decoded)
-        {
-            DrawScreenRaster(render, 
-                             (unsigned char*)decoded, 
-                             native_width * native_height * 4, 
-                             RS_ImageFormat_ARGB, 
-                             native_width, 
-                             native_height, 
-                             x, y, 
-                             w, h, 
-                             angledeg, alpha);
-        }
-
-        delete [] decoded;
-    }
-    else if (format == RS_ImageFormat_ABGR || format == RS_ImageFormat_ARGB)
-    {
-        // set alpha value for each pixel
-        unsigned char* end = data + 4 * native_width * native_height;
-        for (unsigned char* pixel = data; pixel < end; pixel += 4)
-            pixel[3] = (unsigned char)((float)pixel[3] * (float)alpha);
-        render->DrawScreenRaster(data, length, format, native_width, native_height, x, y, w, h, angledeg);
-    }
-    else
-    {
-        // TODO: set alpha for other format
-        render->DrawScreenRaster(data, length, format, native_width, native_height, x, y, w, h, angledeg);
-    }
-}
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "stdafx.h"
+#include "RendererStyles.h"
+#include "AGGImageIO.h"
+#include "RenderUtil.h"
+
+void RenderUtil::DrawScreenRaster(SE_Renderer* render,
+                                 unsigned char* data, int length,
+                                 RS_ImageFormat format, int native_width, int native_height,
+                                 double x, double y, double w, double h, double angledeg,
+                                 double alpha)
+{
+    if (format == RS_ImageFormat_Unknown)
+        return;
+
+    if (alpha <= 0.0)
+        return;
+
+    if (alpha >= 1.0)
+    {
+        render->DrawScreenRaster(data, length, format, native_width, native_height, x, y, w, h, angledeg);
+        return;
+    }
+
+    // if it's PNG, decode it and come back around
+    if (format == RS_ImageFormat_PNG)
+    {
+        unsigned int* decoded = AGGImageIO::DecodePNG(data, length, native_width, native_height);
+        if (decoded)
+        {
+            DrawScreenRaster(render, 
+                             (unsigned char*)decoded, 
+                             native_width * native_height * 4, 
+                             RS_ImageFormat_ARGB, 
+                             native_width, 
+                             native_height, 
+                             x, y, 
+                             w, h, 
+                             angledeg, alpha);
+        }
+
+        delete [] decoded;
+    }
+    else if (format == RS_ImageFormat_ABGR || format == RS_ImageFormat_ARGB)
+    {
+        // set alpha value for each pixel
+        unsigned char* end = data + 4 * native_width * native_height;
+        for (unsigned char* pixel = data; pixel < end; pixel += 4)
+            pixel[3] = (unsigned char)((float)pixel[3] * (float)alpha);
+        render->DrawScreenRaster(data, length, format, native_width, native_height, x, y, w, h, angledeg);
+    }
+    else
+    {
+        // TODO: set alpha for other format
+        render->DrawScreenRaster(data, length, format, native_width, native_height, x, y, w, h, angledeg);
+    }
+}


Property changes on: trunk/MgDev/Common/Renderers/RenderUtil.cpp
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/Renderers/RenderUtil.h
===================================================================
--- trunk/MgDev/Common/Renderers/RenderUtil.h	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/Renderers/RenderUtil.h	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,38 +1,38 @@
-//
-//  Copyright (C) 2010 by Autodesk, Inc.
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of version 2.1 of the GNU Lesser
-//  General Public License as published by the Free Software Foundation.
-//
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
-//
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
-#ifndef RENDERUTIL_H
-#define RENDERUTIL_H
-
-#include <vector>
-
-#include "SE_Renderer.h"
-
-class RenderUtil
-{
-public:
-    // Draw screen raster with alpha
-    // Alpha is a value between 0 and 1.
-    // 0 means completely transparent, while 1 means completely opaque.
-    static void DrawScreenRaster(SE_Renderer* render,
-                                 unsigned char* data, int length,
-                                 RS_ImageFormat format, int native_width, int native_height,
-                                 double x, double y, double w, double h, double angledeg,
-                                 double alpha);
-};
-
-#endif      //RENDERUTIL_H
+//
+//  Copyright (C) 2010 by Autodesk, Inc.
+//
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of version 2.1 of the GNU Lesser
+//  General Public License as published by the Free Software Foundation.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifndef RENDERUTIL_H
+#define RENDERUTIL_H
+
+#include <vector>
+
+#include "SE_Renderer.h"
+
+class RenderUtil
+{
+public:
+    // Draw screen raster with alpha
+    // Alpha is a value between 0 and 1.
+    // 0 means completely transparent, while 1 means completely opaque.
+    static void DrawScreenRaster(SE_Renderer* render,
+                                 unsigned char* data, int length,
+                                 RS_ImageFormat format, int native_width, int native_height,
+                                 double x, double y, double w, double h, double angledeg,
+                                 double alpha);
+};
+
+#endif      //RENDERUTIL_H


Property changes on: trunk/MgDev/Common/Renderers/RenderUtil.h
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/Schema/LayerDefinition-1.4.0.xsd
===================================================================
--- trunk/MgDev/Common/Schema/LayerDefinition-1.4.0.xsd	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/Schema/LayerDefinition-1.4.0.xsd	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,1242 +1,1242 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.4.0">
-  <xs:include schemaLocation="SymbolDefinition-1.1.0.xsd"/>
-  <xs:include schemaLocation="PlatformCommon-1.0.0.xsd"/>
-  <xs:include schemaLocation="WatermarkDefinition-1.0.0.xsd"/>
-  <xs:element name="LayerDefinition">
-    <xs:annotation>
-      <xs:documentation>The specification of the data source and stylization for a layer.</xs:documentation>
-    </xs:annotation>
-    <xs:complexType>
-      <xs:complexContent>
-        <xs:extension base="LayerDefinitionType">
-          <xs:attribute name="version" type="xs:string" use="required" fixed="1.4.0"/>
-        </xs:extension>
-      </xs:complexContent>
-    </xs:complexType>
-  </xs:element>
-  <xs:complexType name="LayerDefinitionType">
-    <xs:annotation>
-      <xs:documentation>Encapsulates the definition of a map layer.</xs:documentation>
-    </xs:annotation>
-    <xs:choice>
-      <xs:element name="DrawingLayerDefinition" type="DrawingLayerDefinitionType">
-        <xs:annotation>
-          <xs:documentation>A layer with a drawing (i.e., DWF) data source.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="VectorLayerDefinition" type="VectorLayerDefinitionType">
-        <xs:annotation>
-          <xs:documentation>A layer with a vector data source; and stylization specification for the datum's geometry types.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="GridLayerDefinition" type="GridLayerDefinitionType">
-        <xs:annotation>
-          <xs:documentation>A layer with a raster or grid data source.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-    </xs:choice>
-  </xs:complexType>
-  <xs:annotation>
-    <xs:documentation>******************** Common types for all layer types ********************</xs:documentation>
-  </xs:annotation>
-  <xs:complexType name="BaseLayerDefinitionType">
-    <xs:annotation>
-      <xs:documentation>Specifies common properties for all layer types.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="ResourceId" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>Link to the drawing data source.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Opacity" default="1.0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Opacity at which to display the rendered data.</xs:documentation>
-        </xs:annotation>
-        <xs:simpleType>
-          <xs:restriction base="xs:double">
-            <xs:minInclusive value="0.0"/>
-            <xs:maxInclusive value="1.0"/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:element>
-      <xs:element name="Watermarks" type="WatermarkInstanceCollectionType" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>The collection of watermarks used in the layer.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:annotation>
-    <xs:documentation>******************** Drawing layer ********************</xs:documentation>
-  </xs:annotation>
-  <xs:complexType name="DrawingLayerDefinitionType">
-    <xs:annotation>
-      <xs:documentation>A layer with a drawing (i.e., DWF) data source.</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="BaseLayerDefinitionType">
-        <xs:sequence>
-          <xs:element name="Sheet" type="xs:string">
-            <xs:annotation>
-              <xs:documentation>The sheet of the DWF to use.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="LayerFilter" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>The layers to show from the specified sheet.  Show all layers if this is not specified.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="MinScale" type="xs:double" default="0.0" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>The zoomed in part of the scale range.  Defaults to 0 if not specified.  Inclusive.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="MaxScale" type="xs:double" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>The zoomed out part of the scale range.  Defaults to the application's maximum value if not specified.  Exclusive.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:annotation>
-    <xs:documentation>******************** Vector layer ********************</xs:documentation>
-  </xs:annotation>
-  <xs:complexType name="VectorLayerDefinitionType">
-    <xs:annotation>
-      <xs:documentation>A layer with a vector data source; and stylization specification for the datum's geometry types.</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="BaseLayerDefinitionType">
-        <xs:sequence>
-          <xs:element name="FeatureName" type="xs:string">
-            <xs:annotation>
-              <xs:documentation>Either a feature class or named extension.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="FeatureNameType" type="FeatureNameType"/>
-          <xs:element name="Filter" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>A boolean FDO expression that specifies which features to return.  No filter means pass all features through.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="PropertyMapping" type="NameStringPairType" minOccurs="0" maxOccurs="unbounded">
-            <xs:annotation>
-              <xs:documentation>Specifies which properties to expose to the user and its corresponding friendly name.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="Geometry" type="xs:string">
-            <xs:annotation>
-              <xs:documentation>Specifies the geometry property that should be used to get the geometries.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="Url" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>An optional URL associated with each feature.  This is a string FDO expression.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="ToolTip" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>The text to put into the tooltip for displayed features.  This is a string FDO expression.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="VectorScaleRange" type="VectorScaleRangeType" maxOccurs="unbounded">
-            <xs:annotation>
-              <xs:documentation>The stylization to be applied to the features for a given scale range.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:simpleType name="FeatureNameType">
-    <xs:annotation>
-      <xs:documentation>Enumeration describing whether the features are coming from a feature class or named extension</xs:documentation>
-    </xs:annotation>
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="FeatureClass"/>
-      <xs:enumeration value="NamedExtension"/>
-    </xs:restriction>
-  </xs:simpleType>
-  <xs:complexType name="VectorScaleRangeType">
-    <xs:annotation>
-      <xs:documentation>The stylization to be applied to the vector features for a given scale range.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="MinScale" type="xs:double" default="0.0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>The zoomed in part of the scale range.  Defaults to 0 if not specified.  Inclusive.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="MaxScale" type="xs:double" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>The zoomed out part of the scale range.  Defaults to the application's maximum value if not specified.  Exclusive.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:annotation>
-          <xs:documentation>Note that where there is no style specified for a particular geometry type a default styling should be used.</xs:documentation>
-        </xs:annotation>
-        <xs:element name="AreaTypeStyle" type="AreaTypeStyleType">
-          <xs:annotation>
-            <xs:documentation>Style specification of a polygon geometry type.</xs:documentation>
-          </xs:annotation>
-        </xs:element>
-        <xs:element name="LineTypeStyle" type="LineTypeStyleType">
-          <xs:annotation>
-            <xs:documentation>Style specification of a line geometry type.</xs:documentation>
-          </xs:annotation>
-        </xs:element>
-        <xs:element name="PointTypeStyle" type="PointTypeStyleType">
-          <xs:annotation>
-            <xs:documentation>Style specification of a point geometry type.</xs:documentation>
-          </xs:annotation>
-        </xs:element>
-        <xs:element name="CompositeTypeStyle" type="CompositeTypeStyle">
-          <xs:annotation>
-            <xs:documentation>A composite style definition.</xs:documentation>
-          </xs:annotation>
-        </xs:element>
-      </xs:choice>
-      <xs:element name="ElevationSettings" type="ElevationSettingsType" minOccurs="0"/>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="ElevationSettingsType">
-    <xs:sequence>
-      <xs:element name="ZOffset" type="xs:string" minOccurs="0"/>
-      <xs:element name="ZExtrusion" type="xs:string" minOccurs="0"/>
-      <xs:element name="ZOffsetType" type="ElevationTypeType" default="RelativeToGround" minOccurs="0"/>
-      <xs:element name="Unit" type="LengthUnitType" default="Centimeters" minOccurs="0"/>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:simpleType name="ElevationTypeType">
-    <xs:annotation>
-      <xs:documentation>The possible interpretations of a z offset value.</xs:documentation>
-    </xs:annotation>
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="RelativeToGround"/>
-      <xs:enumeration value="Absolute"/>
-    </xs:restriction>
-  </xs:simpleType>
-  <xs:complexType name="PointTypeStyleType">
-    <xs:annotation>
-      <xs:documentation>Style specification of a point geometry type.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="DisplayAsText" type="xs:boolean">
-        <xs:annotation>
-          <xs:documentation>Create a text layer.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="AllowOverpost" type="xs:boolean">
-        <xs:annotation>
-          <xs:documentation>Allows labels from any map layer (including the current layer) to obscure features on the current layer.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="PointRule" type="PointRuleType" maxOccurs="unbounded">
-        <xs:annotation>
-          <xs:documentation>One or more PointRules defining the PointTypeStyle.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ShowInLegend" type="xs:boolean" default="true" minOccurs="0"/>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="PointRuleType">
-    <xs:annotation>
-      <xs:documentation>Style rule for a point geometry type.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="LegendLabel" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The label for the Rule to be displayed in the legend.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Filter" type="xs:string" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>A filter for the Rule.  This is a boolean FDO expression.  Any features that pass this filter are styled using this rule's stylization.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Label" type="TextSymbolType" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>A label for the Rule.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:choice minOccurs="0">
-        <xs:element name="PointSymbolization2D" type="PointSymbolization2DType"/>
-      </xs:choice>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="PointSymbolizationType">
-    <xs:annotation>
-      <xs:documentation>Base point symbolization type.</xs:documentation>
-    </xs:annotation>
-  </xs:complexType>
-  <xs:complexType name="PointSymbolization2DType">
-    <xs:annotation>
-      <xs:documentation>The different types of point geometries.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:choice>
-        <xs:element name="Mark" type="MarkSymbolType">
-          <xs:annotation>
-            <xs:documentation>A predefined shape such as a square or circle.</xs:documentation>
-          </xs:annotation>
-        </xs:element>
-        <xs:element name="Image" type="ImageSymbolType">
-          <xs:annotation>
-            <xs:documentation>A raster or image symbol.  Note that these do not scale well, but sometimes this is all that you have.  Supported formats are application specific.</xs:documentation>
-          </xs:annotation>
-        </xs:element>
-        <xs:element name="Font" type="FontSymbolType">
-          <xs:annotation>
-            <xs:documentation>A symbol specified using a font character.</xs:documentation>
-          </xs:annotation>
-        </xs:element>
-        <xs:element name="W2D" type="W2DSymbolType">
-          <xs:annotation>
-            <xs:documentation>A vector symbol defined using a W2D stream.</xs:documentation>
-          </xs:annotation>
-        </xs:element>
-        <xs:element name="Block" type="BlockSymbolType">
-          <xs:annotation>
-            <xs:documentation>A vector symbol specifed from a block.</xs:documentation>
-          </xs:annotation>
-        </xs:element>
-      </xs:choice>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="LineTypeStyleType">
-    <xs:annotation>
-      <xs:documentation>Style specification of a line geometry type.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="LineRule" type="LineRuleType" maxOccurs="unbounded">
-        <xs:annotation>
-          <xs:documentation>Rules to define a theme.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ShowInLegend" type="xs:boolean" default="true" minOccurs="0"/>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="LineRuleType">
-    <xs:annotation>
-      <xs:documentation>Style rule for a line geometry type.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="LegendLabel" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The label for the Rule to be displayed in the legend.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Filter" type="xs:string" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>A filter for the Rule.  This is a boolean FDO expression.  Any features that pass this filter are styled using this rule's stylization.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Label" type="TextSymbolType" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>A label for the Rule.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:choice minOccurs="0" maxOccurs="unbounded">
-        <xs:element name="LineSymbolization2D" type="StrokeType"/>
-      </xs:choice>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="AreaSymbolizationType">
-    <xs:annotation>
-      <xs:documentation>Symbolization characteristics for areas.</xs:documentation>
-    </xs:annotation>
-  </xs:complexType>
-  <xs:complexType name="AreaSymbolizationFillType">
-    <xs:annotation>
-      <xs:documentation>Describes the style of a polygon.</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="AreaSymbolizationType">
-        <xs:sequence>
-          <xs:element name="Fill" type="FillType" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>The style of the polygon fill.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="Stroke" type="StrokeType" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>The style of the polygon edge.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:complexType name="AreaTypeStyleType">
-    <xs:annotation>
-      <xs:documentation>Style specification of a polygon geometry type.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="AreaRule" type="AreaRuleType" maxOccurs="unbounded">
-        <xs:annotation>
-          <xs:documentation>Rules to define a theme.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ShowInLegend" type="xs:boolean" default="true" minOccurs="0"/>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="AreaRuleType">
-    <xs:annotation>
-      <xs:documentation>Style rule for an area geometry type.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="LegendLabel" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The label for the Rule to be displayed in the legend.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Filter" type="xs:string" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>A filter for the Rule.  This is a boolean FDO expression.  Any features that pass this filter are styled using this rule's stylization.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Label" type="TextSymbolType" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>A label for the Rule.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:choice>
-        <xs:element name="AreaSymbolization2D" type="AreaSymbolizationFillType">
-          <xs:annotation>
-            <xs:documentation>The stylization of the polygon geometry.</xs:documentation>
-          </xs:annotation>
-        </xs:element>
-      </xs:choice>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="StrokeType">
-    <xs:annotation>
-      <xs:documentation>Encapsulates the stylization of a line.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="LineStyle" type="xs:string"/>
-      <xs:element name="Thickness" type="xs:string"/>
-      <xs:element name="Color" type="xs:string"/>
-      <xs:element name="Unit" type="LengthUnitType">
-        <xs:annotation>
-          <xs:documentation>Unit of measurement that the thickness is specified in</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="SizeContext" type="SizeContextType">
-        <xs:annotation>
-          <xs:documentation>Whether the sizes are with respect to the earth or the user's display device.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="FillType">
-    <xs:annotation>
-      <xs:documentation>Encapsulates the stylization of a polygon's fill.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="FillPattern" type="xs:string"/>
-      <xs:element name="ForegroundColor" type="xs:string"/>
-      <xs:element name="BackgroundColor" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The background color.  Not applicable to solid fills.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:simpleType name="BackgroundStyleType">
-    <xs:annotation>
-      <xs:documentation>The possible background styles of a TextSymbol.</xs:documentation>
-    </xs:annotation>
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="Transparent"/>
-      <xs:enumeration value="Opaque"/>
-      <xs:enumeration value="Ghosted"/>
-    </xs:restriction>
-  </xs:simpleType>
-  <xs:simpleType name="SizeContextType">
-    <xs:annotation>
-      <xs:documentation>Whether the sizes are specified as sizes on the earth or on the user's display device.</xs:documentation>
-    </xs:annotation>
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="MappingUnits"/>
-      <xs:enumeration value="DeviceUnits"/>
-    </xs:restriction>
-  </xs:simpleType>
-  <xs:simpleType name="LengthUnitType">
-    <xs:annotation>
-      <xs:documentation>The measurement units that linear sizes are specified in.</xs:documentation>
-    </xs:annotation>
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="Millimeters"/>
-      <xs:enumeration value="Centimeters"/>
-      <xs:enumeration value="Meters"/>
-      <xs:enumeration value="Kilometers"/>
-      <xs:enumeration value="Inches"/>
-      <xs:enumeration value="Feet"/>
-      <xs:enumeration value="Yards"/>
-      <xs:enumeration value="Miles"/>
-      <xs:enumeration value="Points"/>
-    </xs:restriction>
-  </xs:simpleType>
-  <xs:complexType name="TextSymbolType">
-    <xs:annotation>
-      <xs:documentation>Encapsulates the text label stylization used to label features, and for FontSymbols.</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="SymbolType">
-        <xs:sequence>
-          <xs:element name="Text" type="xs:string">
-            <xs:annotation>
-              <xs:documentation>The text of the TextSymbol.  This is a string FDO expression.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="FontName" type="xs:string">
-            <xs:annotation>
-              <xs:documentation>The font to use.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="ForegroundColor" type="xs:string">
-            <xs:annotation>
-              <xs:documentation>The color of the text.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="BackgroundColor" type="xs:string">
-            <xs:annotation>
-              <xs:documentation>The text background color.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="BackgroundStyle" type="BackgroundStyleType">
-            <xs:annotation>
-              <xs:documentation>The background style</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="HorizontalAlignment" type="xs:string" default="'Center'" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>A string FDO expression for the horizontal alignment.  Must evaluate to one of the HorizontalAlignmentType enums.  Only applicable to text styles.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="VerticalAlignment" type="xs:string" default="'Baseline'" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>A string FDO expression for the vertical alignment.  Must evaluate to one of the VerticalAlignmentType enums.  Only applicable to text and line styles.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="Bold" type="xs:string" default="false" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>Specifies if the label should be in a bold font.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="Italic" type="xs:string" default="false" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>Specifies if the font should be italicized.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="Underlined" type="xs:string" default="false" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>Specifies if the text should be underlined.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="AdvancedPlacement" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>Optional element which specifies that a more advanced labeling algorithm should be used with the AJAX viewer.</xs:documentation>
-            </xs:annotation>
-            <xs:complexType>
-              <xs:sequence>
-                <xs:element name="ScaleLimit" type="xs:double" minOccurs="0">
-                  <xs:annotation>
-                    <xs:documentation>The maximum amount any label is allowed to shrink in order to fit into the feature.  For example, 0.8 means that the label can shrink until it is 80% of the original size.  1.0 means that the label cannot shrink.  If not specified, the application should assume 1.0.  If set to 0.0 or less then the advanced placement option is disabled.</xs:documentation>
-                  </xs:annotation>
-                </xs:element>
-              </xs:sequence>
-            </xs:complexType>
-          </xs:element>
-          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:complexType name="SymbolType">
-    <xs:annotation>
-      <xs:documentation>Defines common properties for all symbols.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Unit" type="LengthUnitType">
-        <xs:annotation>
-          <xs:documentation>The units that the sizes are specified in.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="SizeContext" type="SizeContextType">
-        <xs:annotation>
-          <xs:documentation>Whether the sizes are with respect to the earth or the user's display device.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="SizeX" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>Width of the symbol.  This is a double FDO expression.  Does not apply to font symbols.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="SizeY" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>Height of the symbol.  This is a double FDO expression.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Rotation" type="xs:string" default="0.0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Amount to rotate the symbol in degrees.  This is a double FDO expression.  Does not apply to line labels.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="MaintainAspect" type="xs:boolean" default="true" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Hint for the UI only.  When the user enters a constant size for the width or height, the other dimension should be adjusted accordingly.  Does not apply to font symbols or labels.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="InsertionPointX" type="xs:string" default="0.5" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>X offset for the symbol specified in symbol space.  Does not apply to labels.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="InsertionPointY" type="xs:double" default="0.5" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Y offset for the symbol specified in symbol space.  Does not apply to labels.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="MarkSymbolType">
-    <xs:annotation>
-      <xs:documentation>Stylization of a predefined shape (ShapeType).</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="SymbolType">
-        <xs:sequence>
-          <xs:element name="Shape" type="ShapeType"/>
-          <xs:element name="Fill" type="FillType" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>No fill is drawn if not specified.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="Edge" type="StrokeType" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>No edge is drawn if not specified.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:complexType name="NameStringPairType">
-    <xs:annotation>
-      <xs:documentation>Used by vector layer definition to hold properties that can be displayed to the end user, and the friendly name to display it as.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Name" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The name of the property to expose.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Value" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The name to show the end user.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:simpleType name="ShapeType">
-    <xs:annotation>
-      <xs:documentation>SLD supports square, circle, triangle, star, cross, and X.</xs:documentation>
-    </xs:annotation>
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="Square"/>
-      <xs:enumeration value="Circle"/>
-      <xs:enumeration value="Triangle"/>
-      <xs:enumeration value="Star"/>
-      <xs:enumeration value="Cross"/>
-      <xs:enumeration value="X"/>
-    </xs:restriction>
-  </xs:simpleType>
-  <xs:complexType name="ImageSymbolType">
-    <xs:annotation>
-      <xs:documentation>Symbols that are comprised of a raster.</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="SymbolType">
-        <xs:sequence>
-          <xs:choice>
-            <xs:element name="Image">
-              <xs:annotation>
-                <xs:documentation>Reference to the image.</xs:documentation>
-              </xs:annotation>
-              <xs:complexType>
-                <xs:sequence>
-                  <xs:element name="ResourceId">
-                    <xs:annotation>
-                      <xs:documentation>The reference to the resource.</xs:documentation>
-                    </xs:annotation>
-                  </xs:element>
-                  <xs:element name="LibraryItemName" minOccurs="0">
-                    <xs:annotation>
-                      <xs:documentation>If ResourceId specifies a library, this identifies the name of a library item.</xs:documentation>
-                    </xs:annotation>
-                  </xs:element>
-                </xs:sequence>
-              </xs:complexType>
-            </xs:element>
-            <xs:element name="Content" type="xs:hexBinary">
-              <xs:annotation>
-                <xs:documentation>BinHex data for image.</xs:documentation>
-              </xs:annotation>
-            </xs:element>
-          </xs:choice>
-          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:complexType name="FontSymbolType">
-    <xs:annotation>
-      <xs:documentation>Symbols that are specified by a font and character.</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="SymbolType">
-        <xs:sequence>
-          <xs:element name="FontName" type="xs:string">
-            <xs:annotation>
-              <xs:documentation>If the font is not installed, the actual font used is application dependent.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="Character" type="xs:string"/>
-          <xs:element name="Bold" type="xs:boolean" minOccurs="0"/>
-          <xs:element name="Italic" type="xs:boolean" minOccurs="0"/>
-          <xs:element name="Underlined" type="xs:boolean" minOccurs="0"/>
-          <xs:element name="ForegroundColor" type="xs:string"/>
-          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:complexType name="W2DSymbolType">
-    <xs:annotation>
-      <xs:documentation>A symbol using a W2D stream.</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="SymbolType">
-        <xs:sequence>
-          <xs:element name="W2DSymbol">
-            <xs:complexType>
-              <xs:sequence>
-                <xs:element name="ResourceId">
-                  <xs:annotation>
-                    <xs:documentation>The reference to the symbol library.</xs:documentation>
-                  </xs:annotation>
-                </xs:element>
-                <xs:element name="LibraryItemName">
-                  <xs:annotation>
-                    <xs:documentation>The W2D stream in the symbol library.</xs:documentation>
-                  </xs:annotation>
-                </xs:element>
-              </xs:sequence>
-            </xs:complexType>
-          </xs:element>
-          <xs:element name="FillColor" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>If specified all polygon fills in the symbol are drawn in this color.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="LineColor" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>If specified all lines in the symbol are drawn in this color.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="TextColor" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>If specified all text in the symbol is drawn in this color.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:complexType name="BlockSymbolType">
-    <xs:annotation>
-      <xs:documentation>A block symbol.</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="SymbolType">
-        <xs:sequence>
-          <xs:element name="DrawingName" type="xs:string"/>
-          <xs:element name="BlockName" type="xs:string"/>
-          <xs:element name="BlockColor" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>Static color.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="LayerColor" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>Static color.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:complexType name="CompositeTypeStyle">
-    <xs:annotation>
-      <xs:documentation>A style specification consisting of composite rules.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="CompositeRule" type="CompositeRule" maxOccurs="unbounded">
-        <xs:annotation>
-          <xs:documentation>One or more CompositeRules defining the CompositeTypeStyle.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ShowInLegend" type="xs:boolean" default="true" minOccurs="0"/>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="CompositeRule">
-    <xs:annotation>
-      <xs:documentation>A style rule containing a composite symbolization.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="LegendLabel" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The label for the Rule to be displayed in the legend.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Filter" type="xs:string" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>A filter for the Rule.  This is a boolean FDO expression.  Any features that pass this filter are styled using this rule's stylization.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="CompositeSymbolization" type="CompositeSymbolization">
-        <xs:annotation>
-          <xs:documentation>The symbolization for the Rule.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="CompositeSymbolization">
-    <xs:annotation>
-      <xs:documentation>Stylization attributes of a point, line, or area feature.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="SymbolInstance" type="SymbolInstance" minOccurs="0" maxOccurs="unbounded">
-        <xs:annotation>
-          <xs:documentation>The symbol instances used for stylization.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="ThemeLabel">
-    <xs:annotation>
-      <xs:documentation>Provides legend labeling information for a theme.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Description" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The legend description for the theme.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="CategoryFormat" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The default legend format to use for each category in the theme.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="Override">
-    <xs:annotation>
-      <xs:documentation>A parameter override.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="SymbolName" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The name of the symbol definition containing the parameter being overridden.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ParameterIdentifier" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The identifier of the parameter being overridden.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ParameterValue" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The override value for the parameter.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ThemeLabel" type="ThemeLabel" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>An optional theme label for this override.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="ParameterOverrides">
-    <xs:annotation>
-      <xs:documentation>A collection of parameter overrides.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Override" type="Override" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:simpleType name="UsageContextType">
-    <xs:annotation>
-      <xs:documentation>Enumerates the allowed UsageContext values.</xs:documentation>
-    </xs:annotation>
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="Unspecified"/>
-      <xs:enumeration value="Point"/>
-      <xs:enumeration value="Line"/>
-      <xs:enumeration value="Area"/>
-    </xs:restriction>
-  </xs:simpleType>
-  <xs:simpleType name="GeometryContextType">
-    <xs:annotation>
-      <xs:documentation>Enumerates the allowed GeometryContext values.</xs:documentation>
-    </xs:annotation>
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="Unspecified"/>
-      <xs:enumeration value="Point"/>
-      <xs:enumeration value="LineString"/>
-      <xs:enumeration value="Polygon"/>
-    </xs:restriction>
-  </xs:simpleType>
-  <xs:complexType name="SymbolInstance">
-    <xs:annotation>
-      <xs:documentation>An instance of a symbol.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:choice>
-        <xs:element name="ResourceId" type="xs:string">
-          <xs:annotation>
-            <xs:documentation>A library reference to an existing SymbolDefinition, either simple or compound.</xs:documentation>
-          </xs:annotation>
-        </xs:element>
-        <xs:element name="SimpleSymbolDefinition" type="SimpleSymbolDefinition">
-          <xs:annotation>
-            <xs:documentation>An inlined SimpleSymbolDefinition.</xs:documentation>
-          </xs:annotation>
-        </xs:element>
-        <xs:element name="CompoundSymbolDefinition" type="CompoundSymbolDefinition">
-          <xs:annotation>
-            <xs:documentation>An inlined CompoundSymbolDefinition.</xs:documentation>
-          </xs:annotation>
-        </xs:element>
-      </xs:choice>
-      <xs:element name="ParameterOverrides" type="ParameterOverrides">
-        <xs:annotation>
-          <xs:documentation>Specifies all parameter overrides for this symbol instance.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ScaleX" type="xs:string" default="1.0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>The additional amount to scale the symbol horizontally in symbol space.  Defaults to 1 if not specified.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ScaleY" type="xs:string" default="1.0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>The additional amount to scale the symbol vertically in symbol space.  Defaults to 1 if not specified.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="InsertionOffsetX" type="xs:string" default="0.0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Specifies the additional amount to offset the symbol horizontally, in mm in device units, after scaling and rotation have been applied.  Applies only to point symbols.  Defaults to 0 if not specified.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="InsertionOffsetY" type="xs:string" default="0.0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Specifies the additional amount to offset the symbol vertically, in mm in device units, after scaling and rotation have been applied.  Applies only to point symbols.  Defaults to 0 if not specified.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="SizeContext" type="SizeContextType" default="DeviceUnits" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Specifies whether the symbol sizes are with respect to the map or the user's display device.  Defaults to device units.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="DrawLast" type="xs:string" default="false" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Boolean value which specifies whether the symbol is drawn as part of a final rendering pass (e.g. for labeling).  This must evaluate to True or False (default).</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="CheckExclusionRegion" type="xs:string" default="false" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Boolean value which specifies whether to render this symbol only if its graphical extent does not overlap the exclusion region.  If the positioning algorithm generates multiple candidate symbol positions and this setting is True, then only the first non-overlapping candidate is rendered.  This must evaluate to True or False (default).</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="AddToExclusionRegion" type="xs:string" default="false" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Boolean value which specifies whether the graphical extent for this symbol instance is added to the exclusion region (if it is rendered).  Symbols which check the exclusion region will not draw on top of this symbol.  This must evaluate to True or False (default).</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="PositioningAlgorithm" type="xs:string" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Specifies the algorithm used to generate candidate positions for the symbol.  If specified this must evaluate to one of: Default, EightSurrounding, or PathLabels.  Default means generate one position using the feature geometry (used for normal rendering).  EightSurrounding means generate eight candidate labels surrounding the feature geometry (used when labeling point features).  PathLabels means generate periodic labels which follow the feature geometry (used when labeling linestring features).</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="RenderingPass" type="xs:string" default="0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>The optional rendering pass in which this symbol instance draws.  If specified this must be greater than or equal to zero.  Defaults to 0.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="UsageContext" type="UsageContextType" default="Unspecified" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Specifies which usage in the symbol should be the active one.  Defaults to Unspecified.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="GeometryContext" type="GeometryContextType" default="Unspecified" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Specifies which geometry type this symbol instance applies to.  Defaults to Unspecified.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:annotation>
-    <xs:documentation>******************** Grid layer ********************</xs:documentation>
-  </xs:annotation>
-  <xs:complexType name="GridLayerDefinitionType">
-    <xs:annotation>
-      <xs:documentation>A layer for raster or grid data.</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="BaseLayerDefinitionType">
-        <xs:sequence>
-          <xs:element name="FeatureName" type="xs:string"/>
-          <xs:element name="Geometry" type="xs:string">
-            <xs:annotation>
-              <xs:documentation>Specifies the geometry property that should be used to get the geometries.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="Filter" type="xs:string" minOccurs="0">
-            <xs:annotation>
-              <xs:documentation>A boolean FDO expression that specifies which features to return.  No filter means pass all features through.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="GridScaleRange" type="GridScaleRangeType" maxOccurs="unbounded"/>
-          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:complexType name="ChannelBandType">
-    <xs:annotation>
-      <xs:documentation>Defines how to scale numbers into a color channel.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Band" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>Name of the band.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="LowBand" type="xs:double" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Default is low value found in band.  Band values less than this are snapped to this number.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="HighBand" type="xs:double" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Default is high value found in band.  Band values greater than this are snapped to this number.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="LowChannel" type="xs:unsignedByte" default="0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Default is 0.  Range is 0:255.  LowBand is mapped to this number.  LowChannel can be greater than HighChannel.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="HighChannel" type="xs:unsignedByte" default="255" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Default is 255.  Range is 0:255.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="GridColorBandsType">
-    <xs:annotation>
-      <xs:documentation>Specifies a color using distinct RGB values.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="RedBand" type="ChannelBandType"/>
-      <xs:element name="GreenBand" type="ChannelBandType"/>
-      <xs:element name="BlueBand" type="ChannelBandType"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="GridColorType">
-    <xs:annotation>
-      <xs:documentation>The color to use for a grid rule.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:choice minOccurs="0">
-        <xs:element name="ExplicitColor" type="xs:string">
-          <xs:annotation>
-            <xs:documentation>Explicit ARGB color.</xs:documentation>
-          </xs:annotation>
-        </xs:element>
-        <xs:element name="Band" type="xs:string"/>
-        <xs:element name="Bands" type="GridColorBandsType"/>
-      </xs:choice>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="GridColorRuleType">
-    <xs:annotation>
-      <xs:documentation>Encapsulate a style for a grid source.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="LegendLabel" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The label for the Rule to be displayed in the legend.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Filter" type="xs:string" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>A filter for the Rule.  This is a boolean FDO expression.  Any features that pass this filter are styled using this rule's stylization.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Label" type="TextSymbolType" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>A label for the Rule.  Does not apply to GridColorRule.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Color" type="GridColorType"/>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="HillShadeType">
-    <xs:annotation>
-      <xs:documentation>Specifies how to shade given a band and a light source.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Band" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>Name of the band used for the computation.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Azimuth" type="xs:double">
-        <xs:annotation>
-          <xs:documentation>Azimuth of the sun in degrees.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Altitude" type="xs:double">
-        <xs:annotation>
-          <xs:documentation>Altitude of the sun in degrees.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ScaleFactor" type="xs:double" default="1.0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>The scale factor applied to the band prior to computing hillshade.  Defaults to 1 if not specified.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="GridColorStyleType">
-    <xs:annotation>
-      <xs:documentation>Specifies how to style each pixel.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="HillShade" type="HillShadeType" minOccurs="0"/>
-      <xs:element name="TransparencyColor" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>If a pixel color prior to factoring in HillShade is this value then the pixel is transparent.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="BrightnessFactor" type="xs:double" default="0.0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Default is 0.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ContrastFactor" type="xs:double" default="0.0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Default is 0.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ColorRule" type="GridColorRuleType" minOccurs="0" maxOccurs="unbounded"/>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="GridSurfaceStyleType">
-    <xs:annotation>
-      <xs:documentation>Specifies how to calculate pixel elevations.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Band" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>Band to use for 3D data.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ZeroValue" type="xs:double" default="0.0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Determines which input value is mapped to zero elevation.  Defaults to 0 if not specified.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ScaleFactor" type="xs:double" default="1.0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Determines how to scale the inputs into a consistent elevation.  Defaults to 1 if not specified.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="DefaultColor" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The default color to use if no ColorStyle is defined at a pixel.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="GridScaleRangeType">
-    <xs:annotation>
-      <xs:documentation>The stylization for a specified scale range.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="MinScale" type="xs:double" default="0.0" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>The zoomed in part of the scale range.  Defaults to 0 if not specified.  Inclusive.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="MaxScale" type="xs:double" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>The zoomed out part of the scale range.  Defaults to the application's maximum value if not specified.  Exclusive.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="SurfaceStyle" type="GridSurfaceStyleType" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Defines the height field of the grid.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ColorStyle" type="GridColorStyleType" minOccurs="0"/>
-      <xs:element name="RebuildFactor" type="xs:double">
-        <xs:annotation>
-          <xs:documentation>When the user has zoomed in by this amount, a request for more detailed raster data is made.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-</xs:schema>
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.4.0">
+  <xs:include schemaLocation="SymbolDefinition-1.1.0.xsd"/>
+  <xs:include schemaLocation="PlatformCommon-1.0.0.xsd"/>
+  <xs:include schemaLocation="WatermarkDefinition-1.0.0.xsd"/>
+  <xs:element name="LayerDefinition">
+    <xs:annotation>
+      <xs:documentation>The specification of the data source and stylization for a layer.</xs:documentation>
+    </xs:annotation>
+    <xs:complexType>
+      <xs:complexContent>
+        <xs:extension base="LayerDefinitionType">
+          <xs:attribute name="version" type="xs:string" use="required" fixed="1.4.0"/>
+        </xs:extension>
+      </xs:complexContent>
+    </xs:complexType>
+  </xs:element>
+  <xs:complexType name="LayerDefinitionType">
+    <xs:annotation>
+      <xs:documentation>Encapsulates the definition of a map layer.</xs:documentation>
+    </xs:annotation>
+    <xs:choice>
+      <xs:element name="DrawingLayerDefinition" type="DrawingLayerDefinitionType">
+        <xs:annotation>
+          <xs:documentation>A layer with a drawing (i.e., DWF) data source.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="VectorLayerDefinition" type="VectorLayerDefinitionType">
+        <xs:annotation>
+          <xs:documentation>A layer with a vector data source; and stylization specification for the datum's geometry types.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="GridLayerDefinition" type="GridLayerDefinitionType">
+        <xs:annotation>
+          <xs:documentation>A layer with a raster or grid data source.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:choice>
+  </xs:complexType>
+  <xs:annotation>
+    <xs:documentation>******************** Common types for all layer types ********************</xs:documentation>
+  </xs:annotation>
+  <xs:complexType name="BaseLayerDefinitionType">
+    <xs:annotation>
+      <xs:documentation>Specifies common properties for all layer types.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="ResourceId" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>Link to the drawing data source.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Opacity" default="1.0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Opacity at which to display the rendered data.</xs:documentation>
+        </xs:annotation>
+        <xs:simpleType>
+          <xs:restriction base="xs:double">
+            <xs:minInclusive value="0.0"/>
+            <xs:maxInclusive value="1.0"/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:element>
+      <xs:element name="Watermarks" type="WatermarkInstanceCollectionType" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>The collection of watermarks used in the layer.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:annotation>
+    <xs:documentation>******************** Drawing layer ********************</xs:documentation>
+  </xs:annotation>
+  <xs:complexType name="DrawingLayerDefinitionType">
+    <xs:annotation>
+      <xs:documentation>A layer with a drawing (i.e., DWF) data source.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="BaseLayerDefinitionType">
+        <xs:sequence>
+          <xs:element name="Sheet" type="xs:string">
+            <xs:annotation>
+              <xs:documentation>The sheet of the DWF to use.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="LayerFilter" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>The layers to show from the specified sheet.  Show all layers if this is not specified.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="MinScale" type="xs:double" default="0.0" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>The zoomed in part of the scale range.  Defaults to 0 if not specified.  Inclusive.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="MaxScale" type="xs:double" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>The zoomed out part of the scale range.  Defaults to the application's maximum value if not specified.  Exclusive.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:annotation>
+    <xs:documentation>******************** Vector layer ********************</xs:documentation>
+  </xs:annotation>
+  <xs:complexType name="VectorLayerDefinitionType">
+    <xs:annotation>
+      <xs:documentation>A layer with a vector data source; and stylization specification for the datum's geometry types.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="BaseLayerDefinitionType">
+        <xs:sequence>
+          <xs:element name="FeatureName" type="xs:string">
+            <xs:annotation>
+              <xs:documentation>Either a feature class or named extension.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="FeatureNameType" type="FeatureNameType"/>
+          <xs:element name="Filter" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>A boolean FDO expression that specifies which features to return.  No filter means pass all features through.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="PropertyMapping" type="NameStringPairType" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>Specifies which properties to expose to the user and its corresponding friendly name.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Geometry" type="xs:string">
+            <xs:annotation>
+              <xs:documentation>Specifies the geometry property that should be used to get the geometries.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Url" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>An optional URL associated with each feature.  This is a string FDO expression.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ToolTip" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>The text to put into the tooltip for displayed features.  This is a string FDO expression.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="VectorScaleRange" type="VectorScaleRangeType" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>The stylization to be applied to the features for a given scale range.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:simpleType name="FeatureNameType">
+    <xs:annotation>
+      <xs:documentation>Enumeration describing whether the features are coming from a feature class or named extension</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="FeatureClass"/>
+      <xs:enumeration value="NamedExtension"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:complexType name="VectorScaleRangeType">
+    <xs:annotation>
+      <xs:documentation>The stylization to be applied to the vector features for a given scale range.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="MinScale" type="xs:double" default="0.0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>The zoomed in part of the scale range.  Defaults to 0 if not specified.  Inclusive.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="MaxScale" type="xs:double" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>The zoomed out part of the scale range.  Defaults to the application's maximum value if not specified.  Exclusive.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:annotation>
+          <xs:documentation>Note that where there is no style specified for a particular geometry type a default styling should be used.</xs:documentation>
+        </xs:annotation>
+        <xs:element name="AreaTypeStyle" type="AreaTypeStyleType">
+          <xs:annotation>
+            <xs:documentation>Style specification of a polygon geometry type.</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="LineTypeStyle" type="LineTypeStyleType">
+          <xs:annotation>
+            <xs:documentation>Style specification of a line geometry type.</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="PointTypeStyle" type="PointTypeStyleType">
+          <xs:annotation>
+            <xs:documentation>Style specification of a point geometry type.</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="CompositeTypeStyle" type="CompositeTypeStyle">
+          <xs:annotation>
+            <xs:documentation>A composite style definition.</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+      </xs:choice>
+      <xs:element name="ElevationSettings" type="ElevationSettingsType" minOccurs="0"/>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="ElevationSettingsType">
+    <xs:sequence>
+      <xs:element name="ZOffset" type="xs:string" minOccurs="0"/>
+      <xs:element name="ZExtrusion" type="xs:string" minOccurs="0"/>
+      <xs:element name="ZOffsetType" type="ElevationTypeType" default="RelativeToGround" minOccurs="0"/>
+      <xs:element name="Unit" type="LengthUnitType" default="Centimeters" minOccurs="0"/>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:simpleType name="ElevationTypeType">
+    <xs:annotation>
+      <xs:documentation>The possible interpretations of a z offset value.</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="RelativeToGround"/>
+      <xs:enumeration value="Absolute"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:complexType name="PointTypeStyleType">
+    <xs:annotation>
+      <xs:documentation>Style specification of a point geometry type.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="DisplayAsText" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Create a text layer.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="AllowOverpost" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Allows labels from any map layer (including the current layer) to obscure features on the current layer.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="PointRule" type="PointRuleType" maxOccurs="unbounded">
+        <xs:annotation>
+          <xs:documentation>One or more PointRules defining the PointTypeStyle.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ShowInLegend" type="xs:boolean" default="true" minOccurs="0"/>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="PointRuleType">
+    <xs:annotation>
+      <xs:documentation>Style rule for a point geometry type.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="LegendLabel" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The label for the Rule to be displayed in the legend.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Filter" type="xs:string" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>A filter for the Rule.  This is a boolean FDO expression.  Any features that pass this filter are styled using this rule's stylization.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Label" type="TextSymbolType" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>A label for the Rule.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:choice minOccurs="0">
+        <xs:element name="PointSymbolization2D" type="PointSymbolization2DType"/>
+      </xs:choice>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="PointSymbolizationType">
+    <xs:annotation>
+      <xs:documentation>Base point symbolization type.</xs:documentation>
+    </xs:annotation>
+  </xs:complexType>
+  <xs:complexType name="PointSymbolization2DType">
+    <xs:annotation>
+      <xs:documentation>The different types of point geometries.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:choice>
+        <xs:element name="Mark" type="MarkSymbolType">
+          <xs:annotation>
+            <xs:documentation>A predefined shape such as a square or circle.</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="Image" type="ImageSymbolType">
+          <xs:annotation>
+            <xs:documentation>A raster or image symbol.  Note that these do not scale well, but sometimes this is all that you have.  Supported formats are application specific.</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="Font" type="FontSymbolType">
+          <xs:annotation>
+            <xs:documentation>A symbol specified using a font character.</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="W2D" type="W2DSymbolType">
+          <xs:annotation>
+            <xs:documentation>A vector symbol defined using a W2D stream.</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="Block" type="BlockSymbolType">
+          <xs:annotation>
+            <xs:documentation>A vector symbol specifed from a block.</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+      </xs:choice>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="LineTypeStyleType">
+    <xs:annotation>
+      <xs:documentation>Style specification of a line geometry type.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="LineRule" type="LineRuleType" maxOccurs="unbounded">
+        <xs:annotation>
+          <xs:documentation>Rules to define a theme.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ShowInLegend" type="xs:boolean" default="true" minOccurs="0"/>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="LineRuleType">
+    <xs:annotation>
+      <xs:documentation>Style rule for a line geometry type.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="LegendLabel" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The label for the Rule to be displayed in the legend.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Filter" type="xs:string" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>A filter for the Rule.  This is a boolean FDO expression.  Any features that pass this filter are styled using this rule's stylization.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Label" type="TextSymbolType" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>A label for the Rule.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element name="LineSymbolization2D" type="StrokeType"/>
+      </xs:choice>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="AreaSymbolizationType">
+    <xs:annotation>
+      <xs:documentation>Symbolization characteristics for areas.</xs:documentation>
+    </xs:annotation>
+  </xs:complexType>
+  <xs:complexType name="AreaSymbolizationFillType">
+    <xs:annotation>
+      <xs:documentation>Describes the style of a polygon.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="AreaSymbolizationType">
+        <xs:sequence>
+          <xs:element name="Fill" type="FillType" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>The style of the polygon fill.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Stroke" type="StrokeType" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>The style of the polygon edge.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:complexType name="AreaTypeStyleType">
+    <xs:annotation>
+      <xs:documentation>Style specification of a polygon geometry type.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="AreaRule" type="AreaRuleType" maxOccurs="unbounded">
+        <xs:annotation>
+          <xs:documentation>Rules to define a theme.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ShowInLegend" type="xs:boolean" default="true" minOccurs="0"/>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="AreaRuleType">
+    <xs:annotation>
+      <xs:documentation>Style rule for an area geometry type.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="LegendLabel" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The label for the Rule to be displayed in the legend.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Filter" type="xs:string" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>A filter for the Rule.  This is a boolean FDO expression.  Any features that pass this filter are styled using this rule's stylization.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Label" type="TextSymbolType" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>A label for the Rule.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:choice>
+        <xs:element name="AreaSymbolization2D" type="AreaSymbolizationFillType">
+          <xs:annotation>
+            <xs:documentation>The stylization of the polygon geometry.</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+      </xs:choice>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="StrokeType">
+    <xs:annotation>
+      <xs:documentation>Encapsulates the stylization of a line.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="LineStyle" type="xs:string"/>
+      <xs:element name="Thickness" type="xs:string"/>
+      <xs:element name="Color" type="xs:string"/>
+      <xs:element name="Unit" type="LengthUnitType">
+        <xs:annotation>
+          <xs:documentation>Unit of measurement that the thickness is specified in</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="SizeContext" type="SizeContextType">
+        <xs:annotation>
+          <xs:documentation>Whether the sizes are with respect to the earth or the user's display device.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="FillType">
+    <xs:annotation>
+      <xs:documentation>Encapsulates the stylization of a polygon's fill.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="FillPattern" type="xs:string"/>
+      <xs:element name="ForegroundColor" type="xs:string"/>
+      <xs:element name="BackgroundColor" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The background color.  Not applicable to solid fills.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:simpleType name="BackgroundStyleType">
+    <xs:annotation>
+      <xs:documentation>The possible background styles of a TextSymbol.</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="Transparent"/>
+      <xs:enumeration value="Opaque"/>
+      <xs:enumeration value="Ghosted"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:simpleType name="SizeContextType">
+    <xs:annotation>
+      <xs:documentation>Whether the sizes are specified as sizes on the earth or on the user's display device.</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="MappingUnits"/>
+      <xs:enumeration value="DeviceUnits"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:simpleType name="LengthUnitType">
+    <xs:annotation>
+      <xs:documentation>The measurement units that linear sizes are specified in.</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="Millimeters"/>
+      <xs:enumeration value="Centimeters"/>
+      <xs:enumeration value="Meters"/>
+      <xs:enumeration value="Kilometers"/>
+      <xs:enumeration value="Inches"/>
+      <xs:enumeration value="Feet"/>
+      <xs:enumeration value="Yards"/>
+      <xs:enumeration value="Miles"/>
+      <xs:enumeration value="Points"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:complexType name="TextSymbolType">
+    <xs:annotation>
+      <xs:documentation>Encapsulates the text label stylization used to label features, and for FontSymbols.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="SymbolType">
+        <xs:sequence>
+          <xs:element name="Text" type="xs:string">
+            <xs:annotation>
+              <xs:documentation>The text of the TextSymbol.  This is a string FDO expression.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="FontName" type="xs:string">
+            <xs:annotation>
+              <xs:documentation>The font to use.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ForegroundColor" type="xs:string">
+            <xs:annotation>
+              <xs:documentation>The color of the text.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="BackgroundColor" type="xs:string">
+            <xs:annotation>
+              <xs:documentation>The text background color.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="BackgroundStyle" type="BackgroundStyleType">
+            <xs:annotation>
+              <xs:documentation>The background style</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="HorizontalAlignment" type="xs:string" default="'Center'" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>A string FDO expression for the horizontal alignment.  Must evaluate to one of the HorizontalAlignmentType enums.  Only applicable to text styles.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="VerticalAlignment" type="xs:string" default="'Baseline'" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>A string FDO expression for the vertical alignment.  Must evaluate to one of the VerticalAlignmentType enums.  Only applicable to text and line styles.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Bold" type="xs:string" default="false" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies if the label should be in a bold font.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Italic" type="xs:string" default="false" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies if the font should be italicized.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Underlined" type="xs:string" default="false" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Specifies if the text should be underlined.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="AdvancedPlacement" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Optional element which specifies that a more advanced labeling algorithm should be used with the AJAX viewer.</xs:documentation>
+            </xs:annotation>
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="ScaleLimit" type="xs:double" minOccurs="0">
+                  <xs:annotation>
+                    <xs:documentation>The maximum amount any label is allowed to shrink in order to fit into the feature.  For example, 0.8 means that the label can shrink until it is 80% of the original size.  1.0 means that the label cannot shrink.  If not specified, the application should assume 1.0.  If set to 0.0 or less then the advanced placement option is disabled.</xs:documentation>
+                  </xs:annotation>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:complexType name="SymbolType">
+    <xs:annotation>
+      <xs:documentation>Defines common properties for all symbols.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Unit" type="LengthUnitType">
+        <xs:annotation>
+          <xs:documentation>The units that the sizes are specified in.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="SizeContext" type="SizeContextType">
+        <xs:annotation>
+          <xs:documentation>Whether the sizes are with respect to the earth or the user's display device.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="SizeX" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>Width of the symbol.  This is a double FDO expression.  Does not apply to font symbols.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="SizeY" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>Height of the symbol.  This is a double FDO expression.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Rotation" type="xs:string" default="0.0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Amount to rotate the symbol in degrees.  This is a double FDO expression.  Does not apply to line labels.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="MaintainAspect" type="xs:boolean" default="true" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Hint for the UI only.  When the user enters a constant size for the width or height, the other dimension should be adjusted accordingly.  Does not apply to font symbols or labels.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="InsertionPointX" type="xs:string" default="0.5" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>X offset for the symbol specified in symbol space.  Does not apply to labels.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="InsertionPointY" type="xs:double" default="0.5" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Y offset for the symbol specified in symbol space.  Does not apply to labels.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="MarkSymbolType">
+    <xs:annotation>
+      <xs:documentation>Stylization of a predefined shape (ShapeType).</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="SymbolType">
+        <xs:sequence>
+          <xs:element name="Shape" type="ShapeType"/>
+          <xs:element name="Fill" type="FillType" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>No fill is drawn if not specified.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Edge" type="StrokeType" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>No edge is drawn if not specified.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:complexType name="NameStringPairType">
+    <xs:annotation>
+      <xs:documentation>Used by vector layer definition to hold properties that can be displayed to the end user, and the friendly name to display it as.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Name" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The name of the property to expose.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Value" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The name to show the end user.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:simpleType name="ShapeType">
+    <xs:annotation>
+      <xs:documentation>SLD supports square, circle, triangle, star, cross, and X.</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="Square"/>
+      <xs:enumeration value="Circle"/>
+      <xs:enumeration value="Triangle"/>
+      <xs:enumeration value="Star"/>
+      <xs:enumeration value="Cross"/>
+      <xs:enumeration value="X"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:complexType name="ImageSymbolType">
+    <xs:annotation>
+      <xs:documentation>Symbols that are comprised of a raster.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="SymbolType">
+        <xs:sequence>
+          <xs:choice>
+            <xs:element name="Image">
+              <xs:annotation>
+                <xs:documentation>Reference to the image.</xs:documentation>
+              </xs:annotation>
+              <xs:complexType>
+                <xs:sequence>
+                  <xs:element name="ResourceId">
+                    <xs:annotation>
+                      <xs:documentation>The reference to the resource.</xs:documentation>
+                    </xs:annotation>
+                  </xs:element>
+                  <xs:element name="LibraryItemName" minOccurs="0">
+                    <xs:annotation>
+                      <xs:documentation>If ResourceId specifies a library, this identifies the name of a library item.</xs:documentation>
+                    </xs:annotation>
+                  </xs:element>
+                </xs:sequence>
+              </xs:complexType>
+            </xs:element>
+            <xs:element name="Content" type="xs:hexBinary">
+              <xs:annotation>
+                <xs:documentation>BinHex data for image.</xs:documentation>
+              </xs:annotation>
+            </xs:element>
+          </xs:choice>
+          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:complexType name="FontSymbolType">
+    <xs:annotation>
+      <xs:documentation>Symbols that are specified by a font and character.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="SymbolType">
+        <xs:sequence>
+          <xs:element name="FontName" type="xs:string">
+            <xs:annotation>
+              <xs:documentation>If the font is not installed, the actual font used is application dependent.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Character" type="xs:string"/>
+          <xs:element name="Bold" type="xs:boolean" minOccurs="0"/>
+          <xs:element name="Italic" type="xs:boolean" minOccurs="0"/>
+          <xs:element name="Underlined" type="xs:boolean" minOccurs="0"/>
+          <xs:element name="ForegroundColor" type="xs:string"/>
+          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:complexType name="W2DSymbolType">
+    <xs:annotation>
+      <xs:documentation>A symbol using a W2D stream.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="SymbolType">
+        <xs:sequence>
+          <xs:element name="W2DSymbol">
+            <xs:complexType>
+              <xs:sequence>
+                <xs:element name="ResourceId">
+                  <xs:annotation>
+                    <xs:documentation>The reference to the symbol library.</xs:documentation>
+                  </xs:annotation>
+                </xs:element>
+                <xs:element name="LibraryItemName">
+                  <xs:annotation>
+                    <xs:documentation>The W2D stream in the symbol library.</xs:documentation>
+                  </xs:annotation>
+                </xs:element>
+              </xs:sequence>
+            </xs:complexType>
+          </xs:element>
+          <xs:element name="FillColor" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>If specified all polygon fills in the symbol are drawn in this color.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="LineColor" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>If specified all lines in the symbol are drawn in this color.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="TextColor" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>If specified all text in the symbol is drawn in this color.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:complexType name="BlockSymbolType">
+    <xs:annotation>
+      <xs:documentation>A block symbol.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="SymbolType">
+        <xs:sequence>
+          <xs:element name="DrawingName" type="xs:string"/>
+          <xs:element name="BlockName" type="xs:string"/>
+          <xs:element name="BlockColor" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Static color.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="LayerColor" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>Static color.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:complexType name="CompositeTypeStyle">
+    <xs:annotation>
+      <xs:documentation>A style specification consisting of composite rules.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="CompositeRule" type="CompositeRule" maxOccurs="unbounded">
+        <xs:annotation>
+          <xs:documentation>One or more CompositeRules defining the CompositeTypeStyle.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ShowInLegend" type="xs:boolean" default="true" minOccurs="0"/>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="CompositeRule">
+    <xs:annotation>
+      <xs:documentation>A style rule containing a composite symbolization.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="LegendLabel" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The label for the Rule to be displayed in the legend.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Filter" type="xs:string" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>A filter for the Rule.  This is a boolean FDO expression.  Any features that pass this filter are styled using this rule's stylization.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="CompositeSymbolization" type="CompositeSymbolization">
+        <xs:annotation>
+          <xs:documentation>The symbolization for the Rule.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="CompositeSymbolization">
+    <xs:annotation>
+      <xs:documentation>Stylization attributes of a point, line, or area feature.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="SymbolInstance" type="SymbolInstance" minOccurs="0" maxOccurs="unbounded">
+        <xs:annotation>
+          <xs:documentation>The symbol instances used for stylization.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="ThemeLabel">
+    <xs:annotation>
+      <xs:documentation>Provides legend labeling information for a theme.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Description" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The legend description for the theme.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="CategoryFormat" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The default legend format to use for each category in the theme.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="Override">
+    <xs:annotation>
+      <xs:documentation>A parameter override.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="SymbolName" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The name of the symbol definition containing the parameter being overridden.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ParameterIdentifier" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The identifier of the parameter being overridden.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ParameterValue" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The override value for the parameter.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ThemeLabel" type="ThemeLabel" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>An optional theme label for this override.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="ParameterOverrides">
+    <xs:annotation>
+      <xs:documentation>A collection of parameter overrides.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Override" type="Override" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:simpleType name="UsageContextType">
+    <xs:annotation>
+      <xs:documentation>Enumerates the allowed UsageContext values.</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="Unspecified"/>
+      <xs:enumeration value="Point"/>
+      <xs:enumeration value="Line"/>
+      <xs:enumeration value="Area"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:simpleType name="GeometryContextType">
+    <xs:annotation>
+      <xs:documentation>Enumerates the allowed GeometryContext values.</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="Unspecified"/>
+      <xs:enumeration value="Point"/>
+      <xs:enumeration value="LineString"/>
+      <xs:enumeration value="Polygon"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:complexType name="SymbolInstance">
+    <xs:annotation>
+      <xs:documentation>An instance of a symbol.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:choice>
+        <xs:element name="ResourceId" type="xs:string">
+          <xs:annotation>
+            <xs:documentation>A library reference to an existing SymbolDefinition, either simple or compound.</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="SimpleSymbolDefinition" type="SimpleSymbolDefinition">
+          <xs:annotation>
+            <xs:documentation>An inlined SimpleSymbolDefinition.</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="CompoundSymbolDefinition" type="CompoundSymbolDefinition">
+          <xs:annotation>
+            <xs:documentation>An inlined CompoundSymbolDefinition.</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+      </xs:choice>
+      <xs:element name="ParameterOverrides" type="ParameterOverrides">
+        <xs:annotation>
+          <xs:documentation>Specifies all parameter overrides for this symbol instance.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ScaleX" type="xs:string" default="1.0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>The additional amount to scale the symbol horizontally in symbol space.  Defaults to 1 if not specified.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ScaleY" type="xs:string" default="1.0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>The additional amount to scale the symbol vertically in symbol space.  Defaults to 1 if not specified.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="InsertionOffsetX" type="xs:string" default="0.0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Specifies the additional amount to offset the symbol horizontally, in mm in device units, after scaling and rotation have been applied.  Applies only to point symbols.  Defaults to 0 if not specified.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="InsertionOffsetY" type="xs:string" default="0.0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Specifies the additional amount to offset the symbol vertically, in mm in device units, after scaling and rotation have been applied.  Applies only to point symbols.  Defaults to 0 if not specified.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="SizeContext" type="SizeContextType" default="DeviceUnits" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Specifies whether the symbol sizes are with respect to the map or the user's display device.  Defaults to device units.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="DrawLast" type="xs:string" default="false" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Boolean value which specifies whether the symbol is drawn as part of a final rendering pass (e.g. for labeling).  This must evaluate to True or False (default).</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="CheckExclusionRegion" type="xs:string" default="false" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Boolean value which specifies whether to render this symbol only if its graphical extent does not overlap the exclusion region.  If the positioning algorithm generates multiple candidate symbol positions and this setting is True, then only the first non-overlapping candidate is rendered.  This must evaluate to True or False (default).</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="AddToExclusionRegion" type="xs:string" default="false" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Boolean value which specifies whether the graphical extent for this symbol instance is added to the exclusion region (if it is rendered).  Symbols which check the exclusion region will not draw on top of this symbol.  This must evaluate to True or False (default).</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="PositioningAlgorithm" type="xs:string" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Specifies the algorithm used to generate candidate positions for the symbol.  If specified this must evaluate to one of: Default, EightSurrounding, or PathLabels.  Default means generate one position using the feature geometry (used for normal rendering).  EightSurrounding means generate eight candidate labels surrounding the feature geometry (used when labeling point features).  PathLabels means generate periodic labels which follow the feature geometry (used when labeling linestring features).</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="RenderingPass" type="xs:string" default="0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>The optional rendering pass in which this symbol instance draws.  If specified this must be greater than or equal to zero.  Defaults to 0.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="UsageContext" type="UsageContextType" default="Unspecified" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Specifies which usage in the symbol should be the active one.  Defaults to Unspecified.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="GeometryContext" type="GeometryContextType" default="Unspecified" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Specifies which geometry type this symbol instance applies to.  Defaults to Unspecified.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:annotation>
+    <xs:documentation>******************** Grid layer ********************</xs:documentation>
+  </xs:annotation>
+  <xs:complexType name="GridLayerDefinitionType">
+    <xs:annotation>
+      <xs:documentation>A layer for raster or grid data.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="BaseLayerDefinitionType">
+        <xs:sequence>
+          <xs:element name="FeatureName" type="xs:string"/>
+          <xs:element name="Geometry" type="xs:string">
+            <xs:annotation>
+              <xs:documentation>Specifies the geometry property that should be used to get the geometries.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Filter" type="xs:string" minOccurs="0">
+            <xs:annotation>
+              <xs:documentation>A boolean FDO expression that specifies which features to return.  No filter means pass all features through.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="GridScaleRange" type="GridScaleRangeType" maxOccurs="unbounded"/>
+          <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:complexType name="ChannelBandType">
+    <xs:annotation>
+      <xs:documentation>Defines how to scale numbers into a color channel.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Band" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>Name of the band.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="LowBand" type="xs:double" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Default is low value found in band.  Band values less than this are snapped to this number.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="HighBand" type="xs:double" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Default is high value found in band.  Band values greater than this are snapped to this number.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="LowChannel" type="xs:unsignedByte" default="0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Default is 0.  Range is 0:255.  LowBand is mapped to this number.  LowChannel can be greater than HighChannel.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="HighChannel" type="xs:unsignedByte" default="255" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Default is 255.  Range is 0:255.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="GridColorBandsType">
+    <xs:annotation>
+      <xs:documentation>Specifies a color using distinct RGB values.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="RedBand" type="ChannelBandType"/>
+      <xs:element name="GreenBand" type="ChannelBandType"/>
+      <xs:element name="BlueBand" type="ChannelBandType"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="GridColorType">
+    <xs:annotation>
+      <xs:documentation>The color to use for a grid rule.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:choice minOccurs="0">
+        <xs:element name="ExplicitColor" type="xs:string">
+          <xs:annotation>
+            <xs:documentation>Explicit ARGB color.</xs:documentation>
+          </xs:annotation>
+        </xs:element>
+        <xs:element name="Band" type="xs:string"/>
+        <xs:element name="Bands" type="GridColorBandsType"/>
+      </xs:choice>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="GridColorRuleType">
+    <xs:annotation>
+      <xs:documentation>Encapsulate a style for a grid source.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="LegendLabel" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The label for the Rule to be displayed in the legend.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Filter" type="xs:string" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>A filter for the Rule.  This is a boolean FDO expression.  Any features that pass this filter are styled using this rule's stylization.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Label" type="TextSymbolType" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>A label for the Rule.  Does not apply to GridColorRule.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Color" type="GridColorType"/>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="HillShadeType">
+    <xs:annotation>
+      <xs:documentation>Specifies how to shade given a band and a light source.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Band" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>Name of the band used for the computation.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Azimuth" type="xs:double">
+        <xs:annotation>
+          <xs:documentation>Azimuth of the sun in degrees.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Altitude" type="xs:double">
+        <xs:annotation>
+          <xs:documentation>Altitude of the sun in degrees.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ScaleFactor" type="xs:double" default="1.0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>The scale factor applied to the band prior to computing hillshade.  Defaults to 1 if not specified.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="GridColorStyleType">
+    <xs:annotation>
+      <xs:documentation>Specifies how to style each pixel.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="HillShade" type="HillShadeType" minOccurs="0"/>
+      <xs:element name="TransparencyColor" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>If a pixel color prior to factoring in HillShade is this value then the pixel is transparent.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="BrightnessFactor" type="xs:double" default="0.0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Default is 0.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ContrastFactor" type="xs:double" default="0.0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Default is 0.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ColorRule" type="GridColorRuleType" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="GridSurfaceStyleType">
+    <xs:annotation>
+      <xs:documentation>Specifies how to calculate pixel elevations.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Band" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>Band to use for 3D data.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ZeroValue" type="xs:double" default="0.0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Determines which input value is mapped to zero elevation.  Defaults to 0 if not specified.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ScaleFactor" type="xs:double" default="1.0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Determines how to scale the inputs into a consistent elevation.  Defaults to 1 if not specified.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="DefaultColor" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The default color to use if no ColorStyle is defined at a pixel.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="GridScaleRangeType">
+    <xs:annotation>
+      <xs:documentation>The stylization for a specified scale range.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="MinScale" type="xs:double" default="0.0" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>The zoomed in part of the scale range.  Defaults to 0 if not specified.  Inclusive.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="MaxScale" type="xs:double" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>The zoomed out part of the scale range.  Defaults to the application's maximum value if not specified.  Exclusive.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="SurfaceStyle" type="GridSurfaceStyleType" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Defines the height field of the grid.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ColorStyle" type="GridColorStyleType" minOccurs="0"/>
+      <xs:element name="RebuildFactor" type="xs:double">
+        <xs:annotation>
+          <xs:documentation>When the user has zoomed in by this amount, a request for more detailed raster data is made.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+</xs:schema>


Property changes on: trunk/MgDev/Common/Schema/LayerDefinition-1.4.0.xsd
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/Schema/MapDefinition-1.1.0.xsd
===================================================================
--- trunk/MgDev/Common/Schema/MapDefinition-1.1.0.xsd	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/Schema/MapDefinition-1.1.0.xsd	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,231 +1,231 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1.0">
-  <xs:include schemaLocation="WatermarkDefinition-1.0.0.xsd"/>
-  <xs:complexType name="Box2DType">
-    <xs:annotation>
-      <xs:documentation>Box2D encapsulates the the coordinates of a box in 2-D space</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="MinX" type="xs:double">
-        <xs:annotation>
-          <xs:documentation>Minimum x-coordinate</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="MaxX" type="xs:double">
-        <xs:annotation>
-          <xs:documentation>Maximum x-coordinate</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="MinY" type="xs:double">
-        <xs:annotation>
-          <xs:documentation>Minimum y-coordinate</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="MaxY" type="xs:double">
-        <xs:annotation>
-          <xs:documentation>Maximum y-coordinate</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="BaseMapLayerType">
-    <xs:annotation>
-      <xs:documentation>BaseMapLayerType encapsulates the properties of a BaseMapLayer.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Name" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>Name of the MapLayer</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ResourceId" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>ResourceId of the MapLayer</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Selectable" type="xs:boolean">
-        <xs:annotation>
-          <xs:documentation>Whether or not the Layer can be selected</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ShowInLegend" type="xs:boolean">
-        <xs:annotation>
-          <xs:documentation>Whether or not the Layer should be shown in the legend</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="LegendLabel" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>Label to be shown for the Layer in the legend</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ExpandInLegend" type="xs:boolean">
-        <xs:annotation>
-          <xs:documentation>Whether or not the Layer should be expanded in the legend.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="MapLayerType">
-    <xs:annotation>
-      <xs:documentation>MapLayerType encapsulates the properties of a map layer, including its group and options about how it should be displayed.</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="BaseMapLayerType">
-        <xs:sequence>
-          <xs:element name="Visible" type="xs:boolean">
-            <xs:annotation>
-              <xs:documentation>Whether this layer's visiblity should be visible or not when it first comes into range</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="Group" type="xs:string">
-            <xs:annotation>
-              <xs:documentation>Group of which the MapLayer is a member of</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:complexType name="MapLayerGroupCommonType">
-    <xs:annotation>
-      <xs:documentation>MapLayerGroupCommonType is a common subclass of MapLayerGroupCommonType and BaseMapLayerGroupCommonType</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Name" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The name of this LayerGroup</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Visible" type="xs:boolean">
-        <xs:annotation>
-          <xs:documentation>Whether this group's visiblity should be visible or not when it first comes into range</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ShowInLegend" type="xs:boolean">
-        <xs:annotation>
-          <xs:documentation>Whether or not the LayerGroup should be shown in the legend</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ExpandInLegend" type="xs:boolean">
-        <xs:annotation>
-          <xs:documentation>Whether or not the LayerGroup should be initially expanded in the legend</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="LegendLabel" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>Label to be shown for the LayerGroup in the legend</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="MapLayerGroupType">
-    <xs:annotation>
-      <xs:documentation>MapLayerGroupType encapsulates the properties of a MapLayerGroup.  Its extension to MapLayerGroupCommonType is that the MapLayerGroup itself can also be in a MapLayerGroup.</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="MapLayerGroupCommonType">
-        <xs:sequence>
-          <xs:element name="Group" type="xs:string">
-            <xs:annotation>
-              <xs:documentation>The group that contains the MapLayerGroup</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:complexType name="BaseMapLayerGroupCommonType">
-    <xs:annotation>
-      <xs:documentation>BaseMapLayerGroupCommonType encapsulates the properties of a BaseMapLayerGroup. It extends MapLayerGroupCommonType by holding the layers in the group.  The base map layer groups defines what layers are used to render a tile set in the HTML viewer.</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="MapLayerGroupCommonType">
-        <xs:sequence>
-          <xs:element name="BaseMapLayer" type="BaseMapLayerType" minOccurs="0" maxOccurs="unbounded">
-            <xs:annotation>
-              <xs:documentation>The layers that are part of this group. The order of the layers represents the draw order, layers first is the list are drawn over top of layers later in the list.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:complexType name="MapDefinitionType">
-    <xs:annotation>
-      <xs:documentation>MapDefinitionType encapsulates a MapDefinition, which houses a collection of MapLayers and their groups.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Name" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The name of the MapDefinition</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="CoordinateSystem" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The coordinate system as WKT used by the MapDefinition</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Extents" type="Box2DType">
-        <xs:annotation>
-          <xs:documentation>A bounding box around the area of the MapDefinition</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="BackgroundColor" type="xs:hexBinary">
-        <xs:annotation>
-          <xs:documentation>The background color to be used with the MapDefinition</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Metadata" type="xs:string" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>Metadata regarding the MapDefinition</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="MapLayer" type="MapLayerType" minOccurs="0" maxOccurs="unbounded">
-        <xs:annotation>
-          <xs:documentation>Zero or more MapLayers that make up the MapDefinition. The order of the layers represents the draw order, layers first is the list are drawn over top of layers later in the list.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="MapLayerGroup" type="MapLayerGroupType" minOccurs="0" maxOccurs="unbounded">
-        <xs:annotation>
-          <xs:documentation>Zero or more MapLayerGroups that make up the MapDefinition</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="BaseMapDefinition" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>The base map.</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-          <xs:sequence>
-            <xs:element name="FiniteDisplayScale" type="xs:double" maxOccurs="unbounded">
-              <xs:annotation>
-                <xs:documentation>The display scales that the base map layers will have tiles available. Applies to the HTML viewer.</xs:documentation>
-              </xs:annotation>
-            </xs:element>
-            <xs:element name="BaseMapLayerGroup" type="BaseMapLayerGroupCommonType" minOccurs="0" maxOccurs="unbounded">
-              <xs:annotation>
-                <xs:documentation>A group of layers that is used to compose a tiled layer in the HTML viewer</xs:documentation>
-              </xs:annotation>
-            </xs:element>
-          </xs:sequence>
-        </xs:complexType>
-      </xs:element>
-      <xs:element name="Watermarks" type="WatermarkInstanceCollectionType" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>The collection of watermarks used in the map.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:element name="MapDefinition">
-    <xs:annotation>
-      <xs:documentation>A MapDefinition defines the collection of layers, groupings of layers, and base map</xs:documentation>
-    </xs:annotation>
-    <xs:complexType>
-      <xs:complexContent>
-        <xs:extension base="MapDefinitionType">
-          <xs:attribute name="version" type="xs:string" use="required" fixed="1.1.0"/>
-        </xs:extension>
-      </xs:complexContent>
-    </xs:complexType>
-  </xs:element>
-</xs:schema>
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1.0">
+  <xs:include schemaLocation="WatermarkDefinition-1.0.0.xsd"/>
+  <xs:complexType name="Box2DType">
+    <xs:annotation>
+      <xs:documentation>Box2D encapsulates the the coordinates of a box in 2-D space</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="MinX" type="xs:double">
+        <xs:annotation>
+          <xs:documentation>Minimum x-coordinate</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="MaxX" type="xs:double">
+        <xs:annotation>
+          <xs:documentation>Maximum x-coordinate</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="MinY" type="xs:double">
+        <xs:annotation>
+          <xs:documentation>Minimum y-coordinate</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="MaxY" type="xs:double">
+        <xs:annotation>
+          <xs:documentation>Maximum y-coordinate</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="BaseMapLayerType">
+    <xs:annotation>
+      <xs:documentation>BaseMapLayerType encapsulates the properties of a BaseMapLayer.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Name" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>Name of the MapLayer</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ResourceId" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>ResourceId of the MapLayer</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Selectable" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Whether or not the Layer can be selected</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ShowInLegend" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Whether or not the Layer should be shown in the legend</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="LegendLabel" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>Label to be shown for the Layer in the legend</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExpandInLegend" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Whether or not the Layer should be expanded in the legend.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="MapLayerType">
+    <xs:annotation>
+      <xs:documentation>MapLayerType encapsulates the properties of a map layer, including its group and options about how it should be displayed.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="BaseMapLayerType">
+        <xs:sequence>
+          <xs:element name="Visible" type="xs:boolean">
+            <xs:annotation>
+              <xs:documentation>Whether this layer's visiblity should be visible or not when it first comes into range</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="Group" type="xs:string">
+            <xs:annotation>
+              <xs:documentation>Group of which the MapLayer is a member of</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:complexType name="MapLayerGroupCommonType">
+    <xs:annotation>
+      <xs:documentation>MapLayerGroupCommonType is a common subclass of MapLayerGroupCommonType and BaseMapLayerGroupCommonType</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Name" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The name of this LayerGroup</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Visible" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Whether this group's visiblity should be visible or not when it first comes into range</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ShowInLegend" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Whether or not the LayerGroup should be shown in the legend</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ExpandInLegend" type="xs:boolean">
+        <xs:annotation>
+          <xs:documentation>Whether or not the LayerGroup should be initially expanded in the legend</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="LegendLabel" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>Label to be shown for the LayerGroup in the legend</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="MapLayerGroupType">
+    <xs:annotation>
+      <xs:documentation>MapLayerGroupType encapsulates the properties of a MapLayerGroup.  Its extension to MapLayerGroupCommonType is that the MapLayerGroup itself can also be in a MapLayerGroup.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="MapLayerGroupCommonType">
+        <xs:sequence>
+          <xs:element name="Group" type="xs:string">
+            <xs:annotation>
+              <xs:documentation>The group that contains the MapLayerGroup</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:complexType name="BaseMapLayerGroupCommonType">
+    <xs:annotation>
+      <xs:documentation>BaseMapLayerGroupCommonType encapsulates the properties of a BaseMapLayerGroup. It extends MapLayerGroupCommonType by holding the layers in the group.  The base map layer groups defines what layers are used to render a tile set in the HTML viewer.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="MapLayerGroupCommonType">
+        <xs:sequence>
+          <xs:element name="BaseMapLayer" type="BaseMapLayerType" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+              <xs:documentation>The layers that are part of this group. The order of the layers represents the draw order, layers first is the list are drawn over top of layers later in the list.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:complexType name="MapDefinitionType">
+    <xs:annotation>
+      <xs:documentation>MapDefinitionType encapsulates a MapDefinition, which houses a collection of MapLayers and their groups.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Name" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The name of the MapDefinition</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="CoordinateSystem" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The coordinate system as WKT used by the MapDefinition</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Extents" type="Box2DType">
+        <xs:annotation>
+          <xs:documentation>A bounding box around the area of the MapDefinition</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="BackgroundColor" type="xs:hexBinary">
+        <xs:annotation>
+          <xs:documentation>The background color to be used with the MapDefinition</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Metadata" type="xs:string" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>Metadata regarding the MapDefinition</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="MapLayer" type="MapLayerType" minOccurs="0" maxOccurs="unbounded">
+        <xs:annotation>
+          <xs:documentation>Zero or more MapLayers that make up the MapDefinition. The order of the layers represents the draw order, layers first is the list are drawn over top of layers later in the list.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="MapLayerGroup" type="MapLayerGroupType" minOccurs="0" maxOccurs="unbounded">
+        <xs:annotation>
+          <xs:documentation>Zero or more MapLayerGroups that make up the MapDefinition</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="BaseMapDefinition" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>The base map.</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+          <xs:sequence>
+            <xs:element name="FiniteDisplayScale" type="xs:double" maxOccurs="unbounded">
+              <xs:annotation>
+                <xs:documentation>The display scales that the base map layers will have tiles available. Applies to the HTML viewer.</xs:documentation>
+              </xs:annotation>
+            </xs:element>
+            <xs:element name="BaseMapLayerGroup" type="BaseMapLayerGroupCommonType" minOccurs="0" maxOccurs="unbounded">
+              <xs:annotation>
+                <xs:documentation>A group of layers that is used to compose a tiled layer in the HTML viewer</xs:documentation>
+              </xs:annotation>
+            </xs:element>
+          </xs:sequence>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="Watermarks" type="WatermarkInstanceCollectionType" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>The collection of watermarks used in the map.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:element name="MapDefinition">
+    <xs:annotation>
+      <xs:documentation>A MapDefinition defines the collection of layers, groupings of layers, and base map</xs:documentation>
+    </xs:annotation>
+    <xs:complexType>
+      <xs:complexContent>
+        <xs:extension base="MapDefinitionType">
+          <xs:attribute name="version" type="xs:string" use="required" fixed="1.1.0"/>
+        </xs:extension>
+      </xs:complexContent>
+    </xs:complexType>
+  </xs:element>
+</xs:schema>


Property changes on: trunk/MgDev/Common/Schema/MapDefinition-1.1.0.xsd
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: trunk/MgDev/Common/Schema/WatermarkDefinition-1.0.0.xsd
===================================================================
--- trunk/MgDev/Common/Schema/WatermarkDefinition-1.0.0.xsd	2010-09-20 07:40:56 UTC (rev 5159)
+++ trunk/MgDev/Common/Schema/WatermarkDefinition-1.0.0.xsd	2010-09-20 14:02:07 UTC (rev 5160)
@@ -1,284 +1,284 @@
-<?xml version="1.0" encoding="utf-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.0">
-  <xs:include schemaLocation="SymbolDefinition-1.1.0.xsd"/>
-  <xs:element name="WatermarkDefinition">
-    <xs:annotation>
-      <xs:documentation>The specification of a watermark.</xs:documentation>
-    </xs:annotation>
-    <xs:complexType>
-      <xs:complexContent>
-        <xs:extension base="WatermarkDefinitionType">
-          <xs:attribute name="version" type="xs:string" use="required" fixed="1.0.0"/>
-        </xs:extension>
-      </xs:complexContent>
-    </xs:complexType>
-  </xs:element>
-  <xs:simpleType name="UnitType">
-    <xs:annotation>
-      <xs:documentation>Enumerates the allowed length units for a watermark position.</xs:documentation>
-    </xs:annotation>
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="Inches"/>
-      <xs:enumeration value="Centimeters"/>
-      <xs:enumeration value="Millimeters"/>
-      <xs:enumeration value="Pixels"/>
-      <xs:enumeration value="Points"/>
-    </xs:restriction>
-  </xs:simpleType>
-  <xs:simpleType name="HorizontalAlignmentType">
-    <xs:annotation>
-      <xs:documentation>Enumerates the allowed horizontal alignment values for a watermark position.</xs:documentation>
-    </xs:annotation>
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="Left"/>
-      <xs:enumeration value="Center"/>
-      <xs:enumeration value="Right"/>
-    </xs:restriction>
-  </xs:simpleType>
-  <xs:complexType name="HorizontalPositionType">
-    <xs:annotation>
-      <xs:documentation>Defines the horizontal position of a watermark.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Offset" type="xs:double" default="0.0">
-        <xs:annotation>
-          <xs:documentation>The horizontal offset for the position.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Unit" type="UnitType" default="Points">
-        <xs:annotation>
-          <xs:documentation>The unit for the offset.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Alignment" type="HorizontalAlignmentType" default="Center">
-        <xs:annotation>
-          <xs:documentation>The horizontal alignment for the position.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:simpleType name="VerticalAlignmentType">
-    <xs:annotation>
-      <xs:documentation>Enumerates the allowed vertical alignments for a watermark position.</xs:documentation>
-    </xs:annotation>
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="Top"/>
-      <xs:enumeration value="Center"/>
-      <xs:enumeration value="Bottom"/>
-    </xs:restriction>
-  </xs:simpleType>
-  <xs:complexType name="VerticalPositionType">
-    <xs:annotation>
-      <xs:documentation>Defines the vertical position of a watermark.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Offset" type="xs:double" default="0.0">
-        <xs:annotation>
-          <xs:documentation>The vertical offset for the position.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Unit" type="UnitType" default="Points">
-        <xs:annotation>
-          <xs:documentation>The unit for the offset.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Alignment" type="VerticalAlignmentType"  default="Center">
-        <xs:annotation>
-          <xs:documentation>The vertical alignment for the position.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="PositionType" abstract="true">
-    <xs:annotation>
-      <xs:documentation>Abstract base type used with all watermark positions.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="XYPositionType">
-    <xs:annotation>
-      <xs:documentation>Positions a watermark at a single X/Y location.</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="PositionType">
-        <xs:sequence>
-          <xs:element name="XPosition" type="HorizontalPositionType">
-            <xs:annotation>
-              <xs:documentation>The position along the X-axis.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="YPosition" type="VerticalPositionType">
-            <xs:annotation>
-              <xs:documentation>The position along the Y-axis.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:complexType name="TilePositionType">
-    <xs:annotation>
-      <xs:documentation>Positions a watermark according to a regular grid.</xs:documentation>
-    </xs:annotation>
-    <xs:complexContent>
-      <xs:extension base="PositionType">
-        <xs:sequence>
-          <xs:element name="TileWidth" type="xs:double" default="150.0">
-            <xs:annotation>
-              <xs:documentation>The width of each tile in the grid.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="TileHeight" type="xs:double" default="150.0">
-            <xs:annotation>
-              <xs:documentation>The height of each tile in the grid.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="HorizontalPosition" type="HorizontalPositionType">
-            <xs:annotation>
-              <xs:documentation>The horizontal position of the watermark within a tile.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-          <xs:element name="VerticalPosition" type="VerticalPositionType">
-            <xs:annotation>
-              <xs:documentation>The vertical position of the watermark within a tile.</xs:documentation>
-            </xs:annotation>
-          </xs:element>
-        </xs:sequence>
-      </xs:extension>
-    </xs:complexContent>
-  </xs:complexType>
-  <xs:complexType name="WatermarkAppearanceType">
-    <xs:annotation>
-      <xs:documentation>Defines the appearance of a watermark.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Transparency" minOccurs="0" default="0.0">
-        <xs:annotation>
-          <xs:documentation>The transparency of the watermark in the range 0-100.  The default value is 0 (opaque).</xs:documentation>
-        </xs:annotation>
-        <xs:simpleType>
-          <xs:restriction base="xs:double">
-            <xs:minInclusive value="0.0"/>
-            <xs:maxInclusive value="100.0"/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:element>
-      <xs:element name="Rotation" minOccurs="0" default="0.0">
-        <xs:annotation>
-          <xs:documentation>The rotation of the watermark, in degrees, in the range 0-360.  The default value is 0.</xs:documentation>
-        </xs:annotation>
-        <xs:simpleType>
-          <xs:restriction base="xs:double">
-            <xs:minInclusive value="0.0"/>
-            <xs:maxInclusive value="360.0"/>
-          </xs:restriction>
-        </xs:simpleType>
-      </xs:element>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="WatermarkDefinitionType">
-    <xs:annotation>
-      <xs:documentation>A watermark definition containing content, appearance, and position information.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Content">
-        <xs:annotation>
-          <xs:documentation>A symbol definition defining the content of the watermark.</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-          <xs:choice>
-            <xs:element name="SimpleSymbolDefinition" type="SimpleSymbolDefinition" />
-            <xs:element name="CompoundSymbolDefinition" type="CompoundSymbolDefinition" />
-          </xs:choice>
-        </xs:complexType>
-      </xs:element>
-      <xs:element name="Appearance" type="WatermarkAppearanceType">
-        <xs:annotation>
-          <xs:documentation>The appearance of the watermark.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Position">
-        <xs:annotation>
-          <xs:documentation>The position of the watermark.</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-          <xs:choice>
-            <xs:element name="XYPosition" type="XYPositionType" />
-            <xs:element name="TilePosition" type="TilePositionType" />
-          </xs:choice>
-        </xs:complexType>
-      </xs:element>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:simpleType name="UsageType">
-    <xs:annotation>
-      <xs:documentation>Specifies the context in which the watermark is displayed.</xs:documentation>
-    </xs:annotation>
-    <xs:restriction base="xs:string">
-      <xs:enumeration value="WMS">
-        <xs:annotation>
-          <xs:documentation>Watermark is displayed in WMS.</xs:documentation>
-        </xs:annotation>
-      </xs:enumeration>
-      <xs:enumeration value="Viewer">
-        <xs:annotation>
-          <xs:documentation>Watermark is displayed in AJAX or Fusion viewers.</xs:documentation>
-        </xs:annotation>
-      </xs:enumeration>
-      <xs:enumeration value="All">
-        <xs:annotation>
-          <xs:documentation>Watermark is displayed in all contexts.</xs:documentation>
-        </xs:annotation>
-      </xs:enumeration>
-    </xs:restriction>
-  </xs:simpleType>
-  <xs:complexType name="WatermarkType">
-    <xs:annotation>
-      <xs:documentation>A watermark instance used in a map definition or layer definition.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Name" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>The name of the watermark.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="ResourceId" type="xs:string">
-        <xs:annotation>
-          <xs:documentation>A library reference to an existing WatermarkDefinition.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="Usage" type="UsageType" minOccurs="0" default="All">
-        <xs:annotation>
-          <xs:documentation>The context in which the watermark is displayed.  Defaults to All.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="AppearanceOverride" type="WatermarkAppearanceType" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>If specified, overrides the appearance of the watermark definition.</xs:documentation>
-        </xs:annotation>
-      </xs:element>
-      <xs:element name="PositionOverride" minOccurs="0">
-        <xs:annotation>
-          <xs:documentation>If specified, overrides the position of the watermark definition.</xs:documentation>
-        </xs:annotation>
-        <xs:complexType>
-          <xs:choice>
-            <xs:element name="XYPosition" type="XYPositionType" />
-            <xs:element name="TilePosition" type="TilePositionType" />
-          </xs:choice>
-        </xs:complexType>
-      </xs:element>
-      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
-    </xs:sequence>
-  </xs:complexType>
-  <xs:complexType name="WatermarkInstanceCollectionType">
-    <xs:annotation>
-      <xs:documentation>A collection of watermarks used by a map definition or layer definition.</xs:documentation>
-    </xs:annotation>
-    <xs:sequence>
-      <xs:element name="Watermark" type="WatermarkType" minOccurs="0" maxOccurs="unbounded" />
-    </xs:sequence>
-  </xs:complexType>
-</xs:schema>
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.0">
+  <xs:include schemaLocation="SymbolDefinition-1.1.0.xsd"/>
+  <xs:element name="WatermarkDefinition">
+    <xs:annotation>
+      <xs:documentation>The specification of a watermark.</xs:documentation>
+    </xs:annotation>
+    <xs:complexType>
+      <xs:complexContent>
+        <xs:extension base="WatermarkDefinitionType">
+          <xs:attribute name="version" type="xs:string" use="required" fixed="1.0.0"/>
+        </xs:extension>
+      </xs:complexContent>
+    </xs:complexType>
+  </xs:element>
+  <xs:simpleType name="UnitType">
+    <xs:annotation>
+      <xs:documentation>Enumerates the allowed length units for a watermark position.</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="Inches"/>
+      <xs:enumeration value="Centimeters"/>
+      <xs:enumeration value="Millimeters"/>
+      <xs:enumeration value="Pixels"/>
+      <xs:enumeration value="Points"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:simpleType name="HorizontalAlignmentType">
+    <xs:annotation>
+      <xs:documentation>Enumerates the allowed horizontal alignment values for a watermark position.</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="Left"/>
+      <xs:enumeration value="Center"/>
+      <xs:enumeration value="Right"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:complexType name="HorizontalPositionType">
+    <xs:annotation>
+      <xs:documentation>Defines the horizontal position of a watermark.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Offset" type="xs:double" default="0.0">
+        <xs:annotation>
+          <xs:documentation>The horizontal offset for the position.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Unit" type="UnitType" default="Points">
+        <xs:annotation>
+          <xs:documentation>The unit for the offset.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Alignment" type="HorizontalAlignmentType" default="Center">
+        <xs:annotation>
+          <xs:documentation>The horizontal alignment for the position.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:simpleType name="VerticalAlignmentType">
+    <xs:annotation>
+      <xs:documentation>Enumerates the allowed vertical alignments for a watermark position.</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="Top"/>
+      <xs:enumeration value="Center"/>
+      <xs:enumeration value="Bottom"/>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:complexType name="VerticalPositionType">
+    <xs:annotation>
+      <xs:documentation>Defines the vertical position of a watermark.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Offset" type="xs:double" default="0.0">
+        <xs:annotation>
+          <xs:documentation>The vertical offset for the position.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Unit" type="UnitType" default="Points">
+        <xs:annotation>
+          <xs:documentation>The unit for the offset.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Alignment" type="VerticalAlignmentType"  default="Center">
+        <xs:annotation>
+          <xs:documentation>The vertical alignment for the position.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="PositionType" abstract="true">
+    <xs:annotation>
+      <xs:documentation>Abstract base type used with all watermark positions.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="XYPositionType">
+    <xs:annotation>
+      <xs:documentation>Positions a watermark at a single X/Y location.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="PositionType">
+        <xs:sequence>
+          <xs:element name="XPosition" type="HorizontalPositionType">
+            <xs:annotation>
+              <xs:documentation>The position along the X-axis.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="YPosition" type="VerticalPositionType">
+            <xs:annotation>
+              <xs:documentation>The position along the Y-axis.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:complexType name="TilePositionType">
+    <xs:annotation>
+      <xs:documentation>Positions a watermark according to a regular grid.</xs:documentation>
+    </xs:annotation>
+    <xs:complexContent>
+      <xs:extension base="PositionType">
+        <xs:sequence>
+          <xs:element name="TileWidth" type="xs:double" default="150.0">
+            <xs:annotation>
+              <xs:documentation>The width of each tile in the grid.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="TileHeight" type="xs:double" default="150.0">
+            <xs:annotation>
+              <xs:documentation>The height of each tile in the grid.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="HorizontalPosition" type="HorizontalPositionType">
+            <xs:annotation>
+              <xs:documentation>The horizontal position of the watermark within a tile.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+          <xs:element name="VerticalPosition" type="VerticalPositionType">
+            <xs:annotation>
+              <xs:documentation>The vertical position of the watermark within a tile.</xs:documentation>
+            </xs:annotation>
+          </xs:element>
+        </xs:sequence>
+      </xs:extension>
+    </xs:complexContent>
+  </xs:complexType>
+  <xs:complexType name="WatermarkAppearanceType">
+    <xs:annotation>
+      <xs:documentation>Defines the appearance of a watermark.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Transparency" minOccurs="0" default="0.0">
+        <xs:annotation>
+          <xs:documentation>The transparency of the watermark in the range 0-100.  The default value is 0 (opaque).</xs:documentation>
+        </xs:annotation>
+        <xs:simpleType>
+          <xs:restriction base="xs:double">
+            <xs:minInclusive value="0.0"/>
+            <xs:maxInclusive value="100.0"/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:element>
+      <xs:element name="Rotation" minOccurs="0" default="0.0">
+        <xs:annotation>
+          <xs:documentation>The rotation of the watermark, in degrees, in the range 0-360.  The default value is 0.</xs:documentation>
+        </xs:annotation>
+        <xs:simpleType>
+          <xs:restriction base="xs:double">
+            <xs:minInclusive value="0.0"/>
+            <xs:maxInclusive value="360.0"/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:element>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="WatermarkDefinitionType">
+    <xs:annotation>
+      <xs:documentation>A watermark definition containing content, appearance, and position information.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Content">
+        <xs:annotation>
+          <xs:documentation>A symbol definition defining the content of the watermark.</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+          <xs:choice>
+            <xs:element name="SimpleSymbolDefinition" type="SimpleSymbolDefinition" />
+            <xs:element name="CompoundSymbolDefinition" type="CompoundSymbolDefinition" />
+          </xs:choice>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="Appearance" type="WatermarkAppearanceType">
+        <xs:annotation>
+          <xs:documentation>The appearance of the watermark.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Position">
+        <xs:annotation>
+          <xs:documentation>The position of the watermark.</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+          <xs:choice>
+            <xs:element name="XYPosition" type="XYPositionType" />
+            <xs:element name="TilePosition" type="TilePositionType" />
+          </xs:choice>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:simpleType name="UsageType">
+    <xs:annotation>
+      <xs:documentation>Specifies the context in which the watermark is displayed.</xs:documentation>
+    </xs:annotation>
+    <xs:restriction base="xs:string">
+      <xs:enumeration value="WMS">
+        <xs:annotation>
+          <xs:documentation>Watermark is displayed in WMS.</xs:documentation>
+        </xs:annotation>
+      </xs:enumeration>
+      <xs:enumeration value="Viewer">
+        <xs:annotation>
+          <xs:documentation>Watermark is displayed in AJAX or Fusion viewers.</xs:documentation>
+        </xs:annotation>
+      </xs:enumeration>
+      <xs:enumeration value="All">
+        <xs:annotation>
+          <xs:documentation>Watermark is displayed in all contexts.</xs:documentation>
+        </xs:annotation>
+      </xs:enumeration>
+    </xs:restriction>
+  </xs:simpleType>
+  <xs:complexType name="WatermarkType">
+    <xs:annotation>
+      <xs:documentation>A watermark instance used in a map definition or layer definition.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Name" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>The name of the watermark.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="ResourceId" type="xs:string">
+        <xs:annotation>
+          <xs:documentation>A library reference to an existing WatermarkDefinition.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="Usage" type="UsageType" minOccurs="0" default="All">
+        <xs:annotation>
+          <xs:documentation>The context in which the watermark is displayed.  Defaults to All.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="AppearanceOverride" type="WatermarkAppearanceType" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>If specified, overrides the appearance of the watermark definition.</xs:documentation>
+        </xs:annotation>
+      </xs:element>
+      <xs:element name="PositionOverride" minOccurs="0">
+        <xs:annotation>
+          <xs:documentation>If specified, overrides the position of the watermark definition.</xs:documentation>
+        </xs:annotation>
+        <xs:complexType>
+          <xs:choice>
+            <xs:element name="XYPosition" type="XYPositionType" />
+            <xs:element name="TilePosition" type="TilePositionType" />
+          </xs:choice>
+        </xs:complexType>
+      </xs:element>
+      <xs:element name="ExtendedData1" type="ExtendedDataType" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:complexType name="WatermarkInstanceCollectionType">
+    <xs:annotation>
+      <xs:documentation>A collection of watermarks used by a map definition or layer definition.</xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element name="Watermark" type="WatermarkType" minOccurs="0" maxOccurs="unbounded" />
+    </xs:sequence>
+  </xs:complexType>
+</xs:schema>


Property changes on: trunk/MgDev/Common/Schema/WatermarkDefinition-1.0.0.xsd
___________________________________________________________________
Added: svn:eol-style
   + native



More information about the mapguide-commits mailing list