librecad/librecad-dxflib25.diff

94 lines
3.7 KiB
Diff

From: Jan Engelhardt <jengelh@medozas.de>
Date: 2011-10-18 03:35:40.929010289 +0200
Upstream: tbd subject-to-review
Make librecad work with RibbonSoft dxflib-2.5.x.
Review notes: not sure if processCodeValuePair() {} is right,
but it seems that is the same as was done with dxflib 2.2.
---
src/lib/filters/rs_filterdxf.cpp | 14 +++++++-------
src/lib/filters/rs_filterdxf.h | 1 +
2 files changed, 8 insertions(+), 7 deletions(-)
Index: LibreCAD-LibreCAD-a5c34b2/src/lib/filters/rs_filterdxf.cpp
===================================================================
--- LibreCAD-LibreCAD-a5c34b2.orig/src/lib/filters/rs_filterdxf.cpp
+++ LibreCAD-LibreCAD-a5c34b2/src/lib/filters/rs_filterdxf.cpp
@@ -1197,7 +1197,7 @@ bool RS_FilterDXF::fileExport(RS_Graphic
exportVersion = DL_Codes::AC1015;
}
- //DL_WriterA* dw = dxf.out(file, VER_R12);
+ //DL_WriterA* dw = dxf.out(file, DL_VERSION_R12);
DL_WriterA* dw = dxf.out((const char*)QFile::encodeName(file), exportVersion);
if (dw==NULL) {
@@ -1687,7 +1687,7 @@ void RS_FilterDXF::writePolyline(DL_Writ
first = false;
}
- //if (dxf.getVersion()==VER_R12) {
+ //if (dxf.getVersion() == DL_VERSION_R12) {
if (nextEntity!=NULL) {
if (nextEntity->rtti()==RS2::EntityArc) {
bulge = ((RS_Arc*)nextEntity)->getBulge();
@@ -1724,7 +1724,7 @@ void RS_FilterDXF::writeSpline(DL_Writer
const DL_Attributes& attrib) {
// split spline into atomic entities for DXF R12:
- if (dxf.getVersion()==VER_R12) {
+ if (dxf.getVersion() == DL_VERSION_R12) {
writeAtomicEntities(dw, s, attrib, RS2::ResolveNone);
return;
}
@@ -1879,7 +1879,7 @@ void RS_FilterDXF::writeInsert(DL_Writer
void RS_FilterDXF::writeText(DL_WriterA& dw, RS_Text* t,
const DL_Attributes& attrib) {
- if (dxf.getVersion()==VER_R12) {
+ if (dxf.getVersion() == DL_VERSION_R12) {
int hJust=0;
int vJust=0;
if (t->getHAlign()==RS2::HAlignLeft) {
@@ -1956,7 +1956,7 @@ void RS_FilterDXF::writeDimension(DL_Wri
const DL_Attributes& attrib) {
// split hatch into atomic entities:
- if (dxf.getVersion()==VER_R12) {
+ if (dxf.getVersion() == DL_VERSION_R12) {
writeAtomicEntities(dw, d, attrib, RS2::ResolveNone);
return;
}
@@ -2123,7 +2123,7 @@ void RS_FilterDXF::writeHatch(DL_WriterA
const DL_Attributes& attrib) {
// split hatch into atomic entities:
- if (dxf.getVersion()==VER_R12) {
+ if (dxf.getVersion() == DL_VERSION_R12) {
writeAtomicEntities(dw, h, attrib, RS2::ResolveAll);
return;
}
@@ -2226,7 +2226,7 @@ void RS_FilterDXF::writeSolid(DL_WriterA
const DL_Attributes& attrib) {
// split solid into line entities:
- //if (dxf.getVersion()==VER_R12) {
+ //if (dxf.getVersion() == DL_VERSION_R12) {
for (int i=0; i<3; ++i) {
dxf.writeLine(
dw,
Index: LibreCAD-LibreCAD-a5c34b2/src/lib/filters/rs_filterdxf.h
===================================================================
--- LibreCAD-LibreCAD-a5c34b2.orig/src/lib/filters/rs_filterdxf.h
+++ LibreCAD-LibreCAD-a5c34b2/src/lib/filters/rs_filterdxf.h
@@ -79,6 +79,7 @@ public:
virtual bool fileImport(RS_Graphic& g, const QString& file, RS2::FormatType /*type*/);
// Methods from DL_CreationInterface:
+ virtual void processCodeValuePair(unsigned int, char *) {};
virtual void addLayer(const DL_LayerData& data);
virtual void addBlock(const DL_BlockData& data);
virtual void endBlock();