7
7
This file is part of the extensible drawing editor Ipe.
8
Copyright (C) 1993-2007 Otfried Cheong
8
Copyright (C) 1993-2009 Otfried Cheong
10
10
Ipe is free software; you can redistribute it and/or modify it
11
11
under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 2 of the License, or
12
the Free Software Foundation; either version 3 of the License, or
13
13
(at your option) any later version.
15
15
As a special exception, you have permission to link Ipe with the
35
35
#include "ipepage.h"
36
36
#include "ipetext.h"
37
37
#include "ipepdfparser.h"
38
#include "ipefontpool.h"
42
40
// --------------------------------------------------------------------
44
class IPE_EXPORT IpeLatex {
46
IpeLatex(const IpeStyleSheet *sheet);
49
int ScanObject(const IpeObject *obj);
50
int ScanPage(IpePage *page);
51
int CreateLatexSource(IpeStream &stream, IpeString preamble);
52
bool ReadPdf(IpeDataSource &source);
53
bool UpdateTextObjects();
54
IpeFontPool *TakeFontPool();
57
bool GetXForm(const IpePdfObj *xform);
58
bool GetEmbeddedFont(int fno, int objno);
59
void Warn(IpeString msg);
45
class TextCollectingVisitor;
49
Latex(const Cascade *sheet);
52
int scanObject(const Object *obj);
53
int scanPage(Page *page);
54
int createLatexSource(Stream &stream, String preamble);
55
bool readPdf(DataSource &source);
56
bool updateTextObjects();
57
FontPool *takeFontPool();
60
bool getXForm(const PdfObj *xform);
61
bool getEmbeddedFont(int fno, int objno);
62
void warn(String msg);
70
typedef std::list<SText> TextList;
71
typedef std::list<Text::XForm *> XFormList;
73
const Cascade *iCascade;
77
//! List of text objects scanned. Objects not owned.
78
TextList iTextObjects;
80
//! List of XForm objects read from PDF file. Objects owned!
83
//! The embedded fonts. Owned!
86
//! Maps /F<n> to object number;
87
std::map<int, int> iFontObjects;
89
friend class ipe::TextCollectingVisitor;
67
typedef std::list<SText> TextList;
68
typedef std::list<IpeText::XForm *> XFormList;
70
const IpeStyleSheet *iStyleSheet;
74
//! List of text objects scanned. Objects not owned.
75
TextList iTextObjects;
77
//! List of XForm objects read from PDF file. Objects owned!
80
//! The embedded fonts. Owned!
81
IpeFontPool *iFontPool;
83
//! Maps /F<n> to object number;
84
std::map<int, int> iFontObjects;
86
friend class TextCollectingVisitor;
89
94
// --------------------------------------------------------------------