From e58c0c049e6167b3123940e6a281c28a89bf3fa1 Mon Sep 17 00:00:00 2001
From: Roman Tolchenov <roman.tolchenov@stfc.ac.uk>
Date: Thu, 14 Apr 2011 10:21:20 +0000
Subject: [PATCH] The change is made. re #2802

---
 .../CurveFitting/src/PlotPeakByLogValue.cpp       | 15 +--------------
 Code/Mantid/Framework/DataHandling/src/Load.cpp   |  9 +++++++--
 2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/Code/Mantid/Framework/CurveFitting/src/PlotPeakByLogValue.cpp b/Code/Mantid/Framework/CurveFitting/src/PlotPeakByLogValue.cpp
index fed3dc03a8b..9b1b130f1f8 100644
--- a/Code/Mantid/Framework/CurveFitting/src/PlotPeakByLogValue.cpp
+++ b/Code/Mantid/Framework/CurveFitting/src/PlotPeakByLogValue.cpp
@@ -256,22 +256,9 @@ namespace Mantid
         std::string ext = data.name.substr(i);
         try
         {
-          API::IAlgorithm_sptr load;
-          if (ext.size() >= 2 && (ext == ".raw" || ext == ".RAW" || ext == ".add" || ext[1] == 's'))
-          {// raw file
-            load = createSubAlgorithm("LoadRaw");
-          }
-          else
-          {// nexus file
-            load = createSubAlgorithm("LoadNexus");
-          }
+          API::IAlgorithm_sptr load = createSubAlgorithm("Load");
           load->initialize();
           load->setPropertyValue("FileName",data.name);
-          //if (data.spec >= 0)
-          //{
-          //  load->setProperty("SpectrumMin",data.spec);
-          //  load->setProperty("SpectrumMax",data.spec);
-          //}
           load->execute();
           if (load->isExecuted())
           {
diff --git a/Code/Mantid/Framework/DataHandling/src/Load.cpp b/Code/Mantid/Framework/DataHandling/src/Load.cpp
index 0ea02446eee..5aceb22a4c3 100644
--- a/Code/Mantid/Framework/DataHandling/src/Load.cpp
+++ b/Code/Mantid/Framework/DataHandling/src/Load.cpp
@@ -10,6 +10,9 @@
 #include "MantidAPI/AlgorithmManager.h"
 #include "MantidKernel/FacilityInfo.h"
 
+#include <cctype>
+#include <algorithm>
+
 namespace Mantid
 {
   namespace DataHandling
@@ -45,7 +48,9 @@ namespace Mantid
     void Load::setPropertyValue(const std::string &name, const std::string &value)
     {
       IDataFileChecker_sptr loader;
-      if( name == "Filename" )
+      std::string NAME(name);
+      std::transform(name.begin(),name.end(),NAME.begin(),toupper);
+      if( NAME == "FILENAME" )
       {
         // This call makes resolving the filename easier
         IDataFileChecker::setPropertyValue(name, value);
@@ -64,7 +69,7 @@ namespace Mantid
       if( loader ) declareLoaderProperties(loader);
 
       // Set the property after some may have been redeclared
-      if( name != "Filename") IDataFileChecker::setPropertyValue(name, value);
+      if( NAME != "FILENAME") IDataFileChecker::setPropertyValue(name, value);
     }
 
     //--------------------------------------------------------------------------
-- 
GitLab