Skip to content
Permalink
Browse files
indentation update
  • Loading branch information
jef-n committed Jan 24, 2015
1 parent ee842bc commit e5a45571f23a6ec952523871dc7f51ee241d767a
@@ -33,7 +33,7 @@ double _ratioMU2LU( const QgsMapSettings& mapSettings, QgsMapLayer* layer )
return ratio;
}

double QgsTolerance::toleranceInProjectUnits(double tolerance, QgsMapLayer* layer, const QgsMapSettings& mapSettings, QgsTolerance::UnitType units )
double QgsTolerance::toleranceInProjectUnits( double tolerance, QgsMapLayer* layer, const QgsMapSettings& mapSettings, QgsTolerance::UnitType units )
{
// converts to map units
if ( units == ProjectUnits )
@@ -1342,7 +1342,7 @@ QStringList QgsServerProjectParser::wcsLayers() const
{
return wcsList;
}

QDomElement qgisElem = mXMLDoc->documentElement();
if ( qgisElem.isNull() )
{
@@ -51,7 +51,7 @@ class QgsSLDConfigParser : public QgsWMSConfigParser

/**Returns the xml fragment of layers styles*/
QDomDocument getStyles( QStringList& layerList ) const override;

/**Returns the xml fragment of layers styles description*/
QDomDocument describeLayer( QStringList& layerList, const QString& hrefString ) const override;

@@ -50,7 +50,7 @@ class QgsWMSConfigParser

/**Returns the xml fragment of layers styles*/
virtual QDomDocument getStyles( QStringList& layerList ) const = 0;

/**Returns the xml fragment of layers styles description*/
virtual QDomDocument describeLayer( QStringList& layerList, const QString& hrefString ) const = 0;

@@ -1680,7 +1680,7 @@ QDomDocument QgsWMSProjectParser::describeLayer( QStringList& layerList, const Q

QDomNode header = myDocument.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" );
myDocument.appendChild( header );

// Create the root element
QDomElement root = myDocument.createElementNS( "http://www.opengis.net/sld", "DescribeLayerResponse" );
root.setAttribute( "xsi:schemaLocation", "http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/DescribeLayer.xsd" );
@@ -1694,7 +1694,7 @@ QDomDocument QgsWMSProjectParser::describeLayer( QStringList& layerList, const Q
QDomElement versionNode = myDocument.createElement( "Version" );
versionNode.appendChild( myDocument.createTextNode( "1.1.0" ) );
root.appendChild( versionNode );

//Prepare url
QString wfsHrefString = mProjectParser->wfsServiceUrl();
if ( wfsHrefString.isEmpty() )
@@ -1726,11 +1726,11 @@ QDomDocument QgsWMSProjectParser::describeLayer( QStringList& layerList, const Q
{
QgsMapLayer* currentLayer = currentLayerList.at( j );
QString layerTypeName = mProjectParser->useLayerIDs() ? currentLayer->id() : currentLayer->name();

// Create the NamedLayer element
QDomElement layerNode = myDocument.createElement( "LayerDescription" );
root.appendChild( layerNode );

// store the owsType element
QDomElement typeNode = myDocument.createElement( "owsType" );
// store the se:OnlineResource element
@@ -1741,12 +1741,12 @@ QDomDocument QgsWMSProjectParser::describeLayer( QStringList& layerList, const Q
if ( currentLayer->type() == QgsMapLayer::VectorLayer )
{
typeNode.appendChild( myDocument.createTextNode( "wfs" ) );

if ( wfsLayers.indexOf( layerTypeName ) != -1 )
{
oResNode.setAttribute( "xlink:href", wfsHrefString );
}

// store the se:FeatureTypeName element
QDomElement typeNameNode = myDocument.createElement( "se:FeatureTypeName" );
typeNameNode.appendChild( myDocument.createTextNode( layerTypeName ) );
@@ -1755,12 +1755,12 @@ QDomDocument QgsWMSProjectParser::describeLayer( QStringList& layerList, const Q
else if ( currentLayer->type() == QgsMapLayer::RasterLayer )
{
typeNode.appendChild( myDocument.createTextNode( "wcs" ) );

if ( wcsLayers.indexOf( layerTypeName ) != -1 )
{
oResNode.setAttribute( "xlink:href", wcsHrefString );
}

// store the se:CoverageTypeName element
QDomElement typeNameNode = myDocument.createElement( "se:CoverageTypeName" );
typeNameNode.appendChild( myDocument.createTextNode( layerTypeName ) );
@@ -1769,10 +1769,10 @@ QDomDocument QgsWMSProjectParser::describeLayer( QStringList& layerList, const Q
layerNode.appendChild( typeNode );
layerNode.appendChild( oResNode );
layerNode.appendChild( nameNode );

}
}

return myDocument;
}

@@ -471,7 +471,7 @@ QDomDocument QgsWMSServer::getCapabilities( QString version, bool fullProjectInf
elem = doc.createElement( "Exception" );
appendFormats( doc, elem, QStringList() << ( version == "1.1.1" ? "application/vnd.ogc.se_xml" : "text/xml" ) );
capabilityElement.appendChild( elem );

//UserDefinedSymbolization element
if ( version == "1.3.0" )
{
@@ -1108,7 +1108,7 @@ QDomDocument QgsWMSServer::describeLayer()
{
throw QgsMapServiceException( "InvalidParameterValue", QString( "SLD_VERSION = %1 is not supported" ).arg( mParameters[ "SLD_VERSION" ] ) );
}

if ( !mParameters.contains( "LAYERS" ) )
{
throw QgsMapServiceException( "MissingParameterValue", "LAYERS is mandatory for DescribeLayer operation" );
@@ -1119,14 +1119,14 @@ QDomDocument QgsWMSServer::describeLayer()
{
throw QgsMapServiceException( "InvalidParameterValue", "Layers is empty" );
}

//Prepare url
QString hrefString = mConfigParser->serviceUrl();
if ( hrefString.isEmpty() )
{
hrefString = serviceUrl();
}

return mConfigParser->describeLayer( layersList, hrefString );
}

0 comments on commit e5a4557

Please sign in to comment.