Skip to content
Snippets Groups Projects
Commit c5f87a0c authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[BL] Remove unused XMLQt:insertStyleFileDefinition

XMLQtInterface::insertStyleFileDefinition
parent 3672dc7f
No related branches found
No related tags found
No related merge requests found
...@@ -95,25 +95,6 @@ int XMLQtInterface::isValid() const ...@@ -95,25 +95,6 @@ int XMLQtInterface::isValid() const
return 0; 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 bool XMLQtInterface::checkHash() const
{ {
QString md5FileName(_fileName + ".md5"); QString md5FileName(_fileName + ".md5");
......
...@@ -33,9 +33,6 @@ public: ...@@ -33,9 +33,6 @@ public:
explicit XMLQtInterface(QString schemaFile = ""); explicit XMLQtInterface(QString schemaFile = "");
virtual ~XMLQtInterface() = default; 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 /// Reads the file. In an overriden function in the child class be sure to call
/// XMLQtInterface::readFile(fileName). /// XMLQtInterface::readFile(fileName).
virtual int readFile(const QString &fileName); virtual int readFile(const QString &fileName);
......
...@@ -485,7 +485,6 @@ bool XmlGmlInterface::write() ...@@ -485,7 +485,6 @@ bool XmlGmlInterface::write()
INFO("XmlGmlInterface::write(): Surface vector is empty, no surfaces written to file."); INFO("XmlGmlInterface::write(): Surface vector is empty, no surfaces written to file.");
//insertStyleFileDefinition(filename);
std::string xml = doc.toString().toStdString(); std::string xml = doc.toString().toStdString();
_out << xml; _out << xml;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment