summaryrefslogtreecommitdiffstats
path: root/kghostview/dscparse
diff options
context:
space:
mode:
Diffstat (limited to 'kghostview/dscparse')
-rw-r--r--kghostview/dscparse/dscparse.cpp26
-rw-r--r--kghostview/dscparse/dscparse.h14
-rw-r--r--kghostview/dscparse/dscparse_adapter.cpp2
-rw-r--r--kghostview/dscparse/dscparse_adapter.h12
4 files changed, 27 insertions, 27 deletions
diff --git a/kghostview/dscparse/dscparse.cpp b/kghostview/dscparse/dscparse.cpp
index b5d2c3a7..b02fb117 100644
--- a/kghostview/dscparse/dscparse.cpp
+++ b/kghostview/dscparse/dscparse.cpp
@@ -41,7 +41,7 @@
* %%PaperWeight: (ignored)
*
* Other additions for defaults or page section
- % %%ViewingOrientation: xx xy yx yy
+ % %%ViewingQt::Orientation: xx xy yx yy
*/
#include <stdio.h> /* for sprintf(), not file I/O */
@@ -1736,7 +1736,7 @@ dsc_parse_viewing_orientation(CDSC *dsc, CDSCCTM **pctm)
*pctm = NULL;
}
- n = IS_DSC(dsc->line, "%%+") ? 3 : 21; /* %%ViewingOrientation: */
+ n = IS_DSC(dsc->line, "%%+") ? 3 : 21; /* %%ViewingQt::Orientation: */
while (IS_WHITE(dsc->line[n]))
n++;
@@ -2026,7 +2026,7 @@ dsc_scan_comments(CDSC *dsc)
continued ? 3 : 10))
return CDSC_ERROR;
}
- else if (IS_DSC(line, "%%Orientation:")) {
+ else if (IS_DSC(line, "%%Qt::Orientation:")) {
dsc->id = CDSC_ORIENTATION;
if (dsc_parse_orientation(dsc, &(dsc->page_orientation),
continued ? 3 : 14))
@@ -2197,7 +2197,7 @@ dsc_scan_comments(CDSC *dsc)
dsc_unknown(dsc);
}
else if (IS_DSC(line, "%%Requirements:")) {
- dsc->id = CDSC_REQUIREMENTS;
+ dsc->id = CDSC_RETQUIREMENTS;
/* ignore */
}
else if (IS_DSC(line, "%%DocumentNeededFonts:")) {
@@ -2328,9 +2328,9 @@ dsc_scan_defaults(CDSC *dsc)
dsc->id = CDSC_PAGEMEDIA;
dsc_parse_media(dsc, &dsc->page_media);
}
- else if (IS_DSC(line, "%%PageOrientation:")) {
+ else if (IS_DSC(line, "%%PageQt::Orientation:")) {
dsc->id = CDSC_PAGEORIENTATION;
- /* This can override %%Orientation: */
+ /* This can override %%Qt::Orientation: */
if (dsc_parse_orientation(dsc, &(dsc->page_orientation), 18))
return CDSC_ERROR;
}
@@ -2339,7 +2339,7 @@ dsc_scan_defaults(CDSC *dsc)
if (dsc_parse_bounding_box(dsc, &(dsc->page_bbox), 18))
return CDSC_ERROR;
}
- else if (IS_DSC(line, "%%ViewingOrientation:")) {
+ else if (IS_DSC(line, "%%ViewingQt::Orientation:")) {
dsc->id = CDSC_VIEWINGORIENTATION;
if (dsc_parse_viewing_orientation(dsc, &dsc->viewing_orientation))
return CDSC_ERROR;
@@ -2849,7 +2849,7 @@ dsc_scan_page(CDSC *dsc)
dsc_unknown(dsc);
}
}
- else if (IS_DSC(line, "%%PageOrientation:")) {
+ else if (IS_DSC(line, "%%PageQt::Orientation:")) {
dsc->id = CDSC_PAGEORIENTATION;
if (dsc_parse_orientation(dsc,
&(dsc->page[dsc->page_count-1].orientation) ,18))
@@ -2860,7 +2860,7 @@ dsc_scan_page(CDSC *dsc)
if (dsc_parse_bounding_box(dsc, &dsc->page[dsc->page_count-1].bbox, 18))
return CDSC_NOTDSC;
}
- else if (IS_DSC(line, "%%ViewingOrientation:")) {
+ else if (IS_DSC(line, "%%ViewingQt::Orientation:")) {
dsc->id = CDSC_VIEWINGORIENTATION;
if (dsc_parse_viewing_orientation(dsc,
&dsc->page[dsc->page_count-1].viewing_orientation))
@@ -2938,7 +2938,7 @@ dsc_scan_page(CDSC *dsc)
* %%DocumentSuppliedFonts:
* %%DocumentSuppliedProcSets:
* %%DocumentSuppliedResources:
- * %%Orientation:
+ * %%Qt::Orientation:
* %%Pages:
* %%PageOrder:
*
@@ -2946,7 +2946,7 @@ dsc_scan_page(CDSC *dsc)
* %%Trailer
* %%EOF
* %%BoundingBox:
- * %%Orientation:
+ * %%Qt::Orientation:
* %%Pages:
* %%PageOrder:
* In addition to these, we support
@@ -2957,7 +2957,7 @@ dsc_scan_page(CDSC *dsc)
* %%PageCustomColors:
* %%PageFiles:
* %%PageFonts:
- * %%PageOrientation:
+ * %%PageQt::Orientation:
* %%PageProcessColors:
* %%PageResources:
*/
@@ -3052,7 +3052,7 @@ dsc_scan_trailer(CDSC *dsc)
continued ? 3 : 10))
return CDSC_ERROR;
}
- else if (IS_DSC(line, "%%Orientation:")) {
+ else if (IS_DSC(line, "%%Qt::Orientation:")) {
dsc->id = CDSC_ORIENTATION;
if (dsc_parse_orientation(dsc, &(dsc->page_orientation), continued ? 3 : 14))
return CDSC_ERROR;
diff --git a/kghostview/dscparse/dscparse.h b/kghostview/dscparse/dscparse.h
index 10d2746c..dbac949e 100644
--- a/kghostview/dscparse/dscparse.h
+++ b/kghostview/dscparse/dscparse.h
@@ -98,7 +98,7 @@ typedef enum {
CDSC_FOR = 207, /* %%For: */
CDSC_LANGUAGELEVEL = 208, /* %%LanguageLevel: */
CDSC_BOUNDINGBOX = 209, /* %%BoundingBox: */
- CDSC_ORIENTATION = 210, /* %%Orientation: */
+ CDSC_ORIENTATION = 210, /* %%Qt::Orientation: */
CDSC_PAGEORDER = 211, /* %%PageOrder: */
CDSC_DOCUMENTMEDIA = 212, /* %%DocumentMedia: */
CDSC_DOCUMENTPAPERSIZES = 213, /* %%DocumentPaperSizes: */
@@ -106,7 +106,7 @@ typedef enum {
CDSC_DOCUMENTPAPERCOLORS = 215, /* %%DocumentPaperColors: */
CDSC_DOCUMENTPAPERWEIGHTS = 216, /* %%DocumentPaperWeights: */
CDSC_DOCUMENTDATA = 217, /* %%DocumentData: */
- CDSC_REQUIREMENTS = 218, /* IGNORED %%Requirements: */
+ CDSC_RETQUIREMENTS = 218, /* IGNORED %%Requirements: */
CDSC_DOCUMENTNEEDEDFONTS = 219, /* IGNORED %%DocumentNeededFonts: */
CDSC_DOCUMENTSUPPLIEDFONTS = 220, /* IGNORED %%DocumentSuppliedFonts: */
CDSC_HIRESBOUNDINGBOX = 221, /* %%HiResBoundingBox: */
@@ -119,7 +119,7 @@ typedef enum {
/* Defaults section */
CDSC_BEGINDEFAULTS = 401, /* %%BeginDefaults */
CDSC_ENDDEFAULTS = 402, /* %%EndDefaults */
-/* also %%PageMedia, %%PageOrientation, %%PageBoundingBox */
+/* also %%PageMedia, %%PageQt::Orientation, %%PageBoundingBox */
/* Prolog section */
CDSC_BEGINPROLOG = 501, /* %%BeginProlog */
@@ -150,16 +150,16 @@ typedef enum {
CDSC_ENDPAGESETUP = 703, /* IGNORED %%EndPageSetup */
CDSC_PAGEMEDIA = 704, /* %%PageMedia: */
/* also %%PaperColor, %%PaperForm, %%PaperWeight, %%PaperSize */
- CDSC_PAGEORIENTATION = 705, /* %%PageOrientation: */
+ CDSC_PAGEORIENTATION = 705, /* %%PageQt::Orientation: */
CDSC_PAGEBOUNDINGBOX = 706, /* %%PageBoundingBox: */
/* also %%Begin/EndFont, %%Begin/EndFeature */
/* also %%Begin/EndResource, %%Begin/EndProcSet */
CDSC_INCLUDEFONT = 707, /* IGNORED %%IncludeFont: */
- CDSC_VIEWINGORIENTATION = 708, /* %%ViewingOrientation: */
+ CDSC_VIEWINGORIENTATION = 708, /* %%ViewingQt::Orientation: */
/* Trailer section */
CDSC_TRAILER = 800, /* %%Trailer */
-/* also %%Pages, %%BoundingBox, %%Orientation, %%PageOrder, %%DocumentMedia */
+/* also %%Pages, %%BoundingBox, %%Qt::Orientation, %%PageOrder, %%DocumentMedia */
/* %%Page is recognised as an error */
/* also %%DocumentNeededFonts, %%DocumentSuppliedFonts */
@@ -229,7 +229,7 @@ typedef struct CDSCMEDIA_S {
#define CDSC_KNOWN_MEDIA 46
extern const CDSCMEDIA dsc_known_media[CDSC_KNOWN_MEDIA];
-typedef struct CDSCCTM_S { /* used for %%ViewingOrientation */
+typedef struct CDSCCTM_S { /* used for %%ViewingQt::Orientation */
float xx;
float xy;
float yx;
diff --git a/kghostview/dscparse/dscparse_adapter.cpp b/kghostview/dscparse/dscparse_adapter.cpp
index b04e89bc..17ae0231 100644
--- a/kghostview/dscparse/dscparse_adapter.cpp
+++ b/kghostview/dscparse/dscparse_adapter.cpp
@@ -111,7 +111,7 @@ unsigned int KDSCError::lineNumber() const
KDSCErrorHandler::Response KDSCOkErrorHandler::error( const KDSCError& err )
{
cout << "KDSC: error in line " << err.lineNumber() << endl;
- cout << err.line() << endl;
+ cout << err.line().data() << endl;
return Ok;
}
diff --git a/kghostview/dscparse/dscparse_adapter.h b/kghostview/dscparse/dscparse_adapter.h
index c5c1cbf9..5fefa631 100644
--- a/kghostview/dscparse/dscparse_adapter.h
+++ b/kghostview/dscparse/dscparse_adapter.h
@@ -185,7 +185,7 @@ public:
For = CDSC_FOR,
LanguageLevel = CDSC_LANGUAGELEVEL,
BoundingBox = CDSC_BOUNDINGBOX,
- Orientation = CDSC_ORIENTATION,
+ Qt::Orientation = CDSC_ORIENTATION,
PageOrder = CDSC_PAGEORDER,
DocumentMedia = CDSC_DOCUMENTMEDIA,
DocumentPaperSizes = CDSC_DOCUMENTPAPERSIZES,
@@ -193,7 +193,7 @@ public:
DocumentPaperColors = CDSC_DOCUMENTPAPERCOLORS,
DocumentPaperWeights = CDSC_DOCUMENTPAPERWEIGHTS,
DocumentData = CDSC_DOCUMENTDATA,
- Requirements = CDSC_REQUIREMENTS,
+ Requirements = CDSC_RETQUIREMENTS,
DocumentNeededFonts = CDSC_DOCUMENTNEEDEDFONTS,
DocumentSuppliedFonts = CDSC_DOCUMENTSUPPLIEDFONTS,
HiResBoundingBox = CDSC_HIRESBOUNDINGBOX,
@@ -206,7 +206,7 @@ public:
// Defaults section
BeginDefaults = CDSC_BEGINDEFAULTS,
EndDefaults = CDSC_ENDDEFAULTS,
- // also %%PageMedia, %%PageOrientation, %%PageBoundingBox
+ // also %%PageMedia, %%PageQt::Orientation, %%PageBoundingBox
// Prolog section
BeginProlog = CDSC_BEGINPROLOG,
@@ -237,16 +237,16 @@ public:
EndPageSetup = CDSC_ENDPAGESETUP,
PageMedia = CDSC_PAGEMEDIA,
// also %%PaperColor, %%PaperForm, %%PaperWeight, %%PaperSize
- PageOrientation = CDSC_PAGEORIENTATION,
+ PageQt::Orientation = CDSC_PAGEORIENTATION,
PageBoundingBox = CDSC_PAGEBOUNDINGBOX,
// also %%Begin/EndFont, %%Begin/EndFeature
// also %%Begin/EndResource, %%Begin/EndProcSet
IncludeFont = CDSC_INCLUDEFONT,
- ViewingOrientation = CDSC_VIEWINGORIENTATION,
+ ViewingQt::Orientation = CDSC_VIEWINGORIENTATION,
// Trailer section
Trailer = CDSC_TRAILER,
- // also %%Pages, %%BoundingBox, %%Orientation, %%PageOrder,
+ // also %%Pages, %%BoundingBox, %%Qt::Orientation, %%PageOrder,
// %%DocumentMedia
// %%Page is recognised as an error
// also %%DocumentNeededFonts, %%DocumentSuppliedFonts