From c5f87a0cc3b3dd43a7d2855c47d83a696ed879d7 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <dmitri.naumov@ufz.de> Date: Wed, 27 Nov 2019 15:14:51 +0100 Subject: [PATCH] [BL] Remove unused XMLQt:insertStyleFileDefinition XMLQtInterface::insertStyleFileDefinition --- BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp | 19 ------------------- BaseLib/IO/XmlIO/Qt/XMLQtInterface.h | 3 --- GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp | 1 - 3 files changed, 23 deletions(-) diff --git a/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp b/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp index 29903132751..eaff3740f61 100644 --- a/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp +++ b/BaseLib/IO/XmlIO/Qt/XMLQtInterface.cpp @@ -95,25 +95,6 @@ int XMLQtInterface::isValid() const return 0; } -int XMLQtInterface::insertStyleFileDefinition(const QString &fileName) const -{ - std::string path = fileName.toStdString(); - std::fstream stream(path.c_str()); - std::string styleDef("\n<?xml-stylesheet type=\"text/xsl\" href=\"OpenGeoSysGLI.xsl\"?>"); - - if (!stream.is_open()) - { - WARN("XMLQtInterface::insertStyleFileDefinition(): Could not open file %s.", - path.c_str()); - return 0; - } - - stream.seekp(43 * sizeof(char),std::ios_base::beg); // go to the correct position in the stream - stream.write(styleDef.c_str(), 60 * sizeof(char)); // write new line with xml-stylesheet definition - stream.close(); - return 1; -} - bool XMLQtInterface::checkHash() const { QString md5FileName(_fileName + ".md5"); diff --git a/BaseLib/IO/XmlIO/Qt/XMLQtInterface.h b/BaseLib/IO/XmlIO/Qt/XMLQtInterface.h index d0a70baf141..c33a025246a 100644 --- a/BaseLib/IO/XmlIO/Qt/XMLQtInterface.h +++ b/BaseLib/IO/XmlIO/Qt/XMLQtInterface.h @@ -33,9 +33,6 @@ public: explicit XMLQtInterface(QString schemaFile = ""); virtual ~XMLQtInterface() = default; - /// As QXMLStreamWriter seems currently unable to include style-file links into xml-files, this method will workaround this issue and include the stylefile link. - int insertStyleFileDefinition(const QString &fileName) const; - /// Reads the file. In an overriden function in the child class be sure to call /// XMLQtInterface::readFile(fileName). virtual int readFile(const QString &fileName); diff --git a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp index 5257d7c3436..3d600256106 100644 --- a/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp +++ b/GeoLib/IO/XmlIO/Qt/XmlGmlInterface.cpp @@ -485,7 +485,6 @@ bool XmlGmlInterface::write() INFO("XmlGmlInterface::write(): Surface vector is empty, no surfaces written to file."); - //insertStyleFileDefinition(filename); std::string xml = doc.toString().toStdString(); _out << xml; -- GitLab