]> Shamusworld >> Repos - architektonas/blobdiff - src/base/rs_filterdxf.cpp
Fixed Library Browser...
[architektonas] / src / base / rs_filterdxf.cpp
index 1d2f45c0f8ef4e95fdbb4ea84c9d3674062cabaa..c1b73c438920517dfd4dc9c265c677f11481977e 100644 (file)
@@ -3,7 +3,9 @@
 // Part of the Architektonas Project
 // Originally part of QCad Community Edition by Andrew Mustun
 // Extensively rewritten and refactored by James L. Hammons
-// (C) 2010 Underground Software
+// Portions copyright (C) 2001-2003 RibbonSoft
+// Copyright (C) 2010 Underground Software
+// See the README and GPLv2 files for licensing and warranty information
 //
 // JLH = James L. Hammons <jlhamm@acm.org>
 //
@@ -70,7 +72,7 @@ RS_FilterDXF::~RS_FilterDXF()
  * will be created or the graphics from which the entities are
  * taken to be stored in a file.
  */
-bool RS_FilterDXF::fileImport(RS_Graphic & g, const QString & file, RS2::FormatType /*type*/)
+bool RS_FilterDXF::fileImport(Drawing & g, const QString & file, RS2::FormatType /*type*/)
 {
        RS_DEBUG->print("RS_FilterDXF::fileImport");
        //RS_DEBUG->timestamp();
@@ -89,7 +91,7 @@ bool RS_FilterDXF::fileImport(RS_Graphic & g, const QString & file, RS2::FormatT
        RS_DEBUG->print("RS_FilterDXF::fileImport: reading file: OK");
        //graphic->setAutoUpdateBorders(true);
 
-       if (success == false)
+       if (!success)
        {
                RS_DEBUG->print(RS_Debug::D_WARNING, "Cannot open DXF file '%s'.",
                        (const char *)QFile::encodeName(file));
@@ -1073,7 +1075,7 @@ void RS_FilterDXF::setVariableVector(const char * key, double v1, double v2, dou
 
        // update document's variable list:
        if (currentContainer->rtti() == RS2::EntityGraphic)
-               ((RS_Graphic *)currentContainer)->addVariable(QString(key), Vector(v1, v2, v3), code);
+               ((Drawing *)currentContainer)->addVariable(QString(key), Vector(v1, v2, v3), code);
 }
 
 /**
@@ -1088,7 +1090,7 @@ void RS_FilterDXF::setVariableString(const char * key, const char * value, int c
 
     // update document's variable list:
     if (currentContainer->rtti()==RS2::EntityGraphic) {
-        ((RS_Graphic*)currentContainer)->addVariable(QString(key),
+        ((Drawing*)currentContainer)->addVariable(QString(key),
                 QString(value), code);
     }
 }
@@ -1103,7 +1105,7 @@ void RS_FilterDXF::setVariableInt(const char* key, int value, int code) {
 
     // update document's variable list:
     if (currentContainer->rtti()==RS2::EntityGraphic) {
-        ((RS_Graphic*)currentContainer)->addVariable(QString(key),
+        ((Drawing*)currentContainer)->addVariable(QString(key),
                 value, code);
     }
 }
@@ -1119,7 +1121,7 @@ void RS_FilterDXF::setVariableDouble(const char* key, double value, int code) {
     // update document's variable list:
     if (currentContainer->rtti() == RS2::EntityGraphic)
        {
-        ((RS_Graphic *)currentContainer)->addVariable(QString(key), value, code);
+        ((Drawing *)currentContainer)->addVariable(QString(key), value, code);
     }
 }
 
@@ -1129,7 +1131,7 @@ void RS_FilterDXF::setVariableDouble(const char* key, double value, int code) {
  *
  * @param file Full path to the DXF file that will be written.
  */
-bool RS_FilterDXF::fileExport(RS_Graphic & g, const QString & file, RS2::FormatType type)
+bool RS_FilterDXF::fileExport(Drawing & g, const QString & file, RS2::FormatType type)
 {
        RS_DEBUG->print("RS_FilterDXF::fileExport: exporting file '%s'...",
                (const char *)QFile::encodeName(file));