diff options
Diffstat (limited to 'src/attribute-rel-svg.cpp')
| -rw-r--r-- | src/attribute-rel-svg.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/attribute-rel-svg.cpp b/src/attribute-rel-svg.cpp index 3f5ce9395..80d924f80 100644 --- a/src/attribute-rel-svg.cpp +++ b/src/attribute-rel-svg.cpp @@ -26,6 +26,7 @@ #include "preferences.h" SPAttributeRelSVG * SPAttributeRelSVG::instance = NULL; +bool SPAttributeRelSVG::foundFile = false; /* * This functions checks whether an element -> attribute pair is allowed or not @@ -36,6 +37,9 @@ bool SPAttributeRelSVG::findIfValid(Glib::ustring attribute, Glib::ustring eleme SPAttributeRelSVG::instance = new SPAttributeRelSVG(); } + // Always valid if data file not found! + if( !foundFile ) return true; + // Strip of "svg:" from the element's name Glib::ustring temp = element; if ( temp.find("svg:") != std::string::npos ) { @@ -75,16 +79,14 @@ SPAttributeRelSVG::SPAttributeRelSVG() f.open(filepath.c_str(), std::ios::in); if (!f.is_open()) { - // Set the default preference of attribute checking to ignore - Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - prefs->setInt("/options/svgoutput/incorrect_attributes", 3); - // Display warning for file not open g_warning("Could not open the data file for XML attribute-element map construction: %s", filepath.c_str()); f.close(); return ; } + foundFile = true; + while (!f.eof()){ std::stringstream ss; std::string s; |
