X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Frs_filtercxf.cpp;h=09a0e723ca5a3af2b6ee14697a0dd9b0add02543;hb=bd2b29c8735d83ab48df13c3efee53f63570473e;hp=887bf5d2184e8f8b2e29e45537069f5848b895a3;hpb=16ce54abf01ca3032e42a5bb11a4afcf9014dcca;p=architektonas diff --git a/src/base/rs_filtercxf.cpp b/src/base/rs_filtercxf.cpp index 887bf5d..09a0e72 100644 --- a/src/base/rs_filtercxf.cpp +++ b/src/base/rs_filtercxf.cpp @@ -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 // @@ -18,7 +20,6 @@ #include #include -//#include "rs_regexp.h" #include "rs_font.h" #include "rs_utility.h" #include "rs_system.h" @@ -46,7 +47,7 @@ RS_FilterCXF::~RS_FilterCXF() * will be created or the graphics from which the entities are * taken to be stored in a file. */ -bool RS_FilterCXF::fileImport(RS_Graphic & g, const QString & file, RS2::FormatType /*type*/) +bool RS_FilterCXF::fileImport(Drawing & g, const QString & file, RS2::FormatType /*type*/) { RS_DEBUG->print("CXF Filter: importing file '%s'...", file.toLatin1().data()); @@ -54,11 +55,11 @@ bool RS_FilterCXF::fileImport(RS_Graphic & g, const QString & file, RS2::FormatT bool success = false; // Load font file as we normally do, but the font doesn't own the - // letters (we'll add them to the graphic instead. Hence 'false'). + // letters (we'll add them to the graphic instead. Hence 'false'). RS_Font font(file, false); success = font.loadFont(); - if (success == false) + if (!success) { RS_DEBUG->print(RS_Debug::D_WARNING, "Cannot open CXF file '%s'.", file.toLatin1().data()); return false; @@ -75,15 +76,15 @@ bool RS_FilterCXF::fileImport(RS_Graphic & g, const QString & file, RS2::FormatT RS_BlockList * letterList = font.getLetterList(); - for(uint i=0; igetName().at(0).unicode(), 16); while (uCode.length() < 4) - uCode="0"+uCode; + uCode = "0" + uCode; //ch->setName("[" + uCode + "] " + ch->getName()); //letterList->rename(ch, QString("[%1]").arg(ch->getName())); @@ -104,9 +105,9 @@ bool RS_FilterCXF::fileImport(RS_Graphic & g, const QString & file, RS2::FormatT * * @param file Full path to the CXF file that will be written. */ -bool RS_FilterCXF::fileExport(RS_Graphic & g, const QString & file, RS2::FormatType /*type*/) +bool RS_FilterCXF::fileExport(Drawing & g, const QString & file, RS2::FormatType /*type*/) { - RS_DEBUG->print("CXF Filter: exporting file '%s'...", file.toLatin1().data()); + RS_DEBUG->print("CXF Filter: exporting file '%s'...", file.toAscii().data()); // crashes under windoze xp: //std::ofstream fout;