"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Plugins/Pdf/PDFWriter/PDFObjectParser.cpp" between
TeXmacs-1.99.4-src.tar.gz and TeXmacs-1.99.5-src.tar.gz

About: GNU TeXmacs is a what-you-see-is-what-you-get scientific text editor, which was both inspired by TeX and GNU Emacs.

PDFObjectParser.cpp  (TeXmacs-1.99.4-src):PDFObjectParser.cpp  (TeXmacs-1.99.5-src)
skipping to change at line 68 skipping to change at line 68
mCurrentPositionProvider = inCurrentPositionProvider; mCurrentPositionProvider = inCurrentPositionProvider;
ResetReadState(); ResetReadState();
} }
void PDFObjectParser::ResetReadState() void PDFObjectParser::ResetReadState()
{ {
mTokenBuffer.clear(); mTokenBuffer.clear();
mTokenizer.ResetReadState(); mTokenizer.ResetReadState();
} }
void PDFObjectParser::ResetReadState(const PDFParserTokenizer& inExternalTokeniz
er)
{
mTokenBuffer.clear();
mTokenizer.ResetReadState(inExternalTokenizer);
}
static const std::string scR = "R"; static const std::string scR = "R";
static const std::string scStream = "stream"; static const std::string scStream = "stream";
PDFObject* PDFObjectParser::ParseNewObject(IPDFParserExtender* inParserExtender) PDFObject* PDFObjectParser::ParseNewObject(IPDFParserExtender* inParserExtender)
{ {
PDFObject* pdfObject = NULL; PDFObject* pdfObject = NULL;
std::string token; std::string token;
do do
{ {
if(!GetNextToken(token)) if(!GetNextToken(token))
skipping to change at line 195 skipping to change at line 201
if(pdfObject) if(pdfObject)
{ {
// could be a stream. will be if the next token i s the "stream" keyword // could be a stream. will be if the next token i s the "stream" keyword
if(!GetNextToken(token)) if(!GetNextToken(token))
break; break;
if(scStream == token) if(scStream == token)
{ {
// yes, found a stream. record current po sition as the position where the stream starts. // yes, found a stream. record current po sition as the position where the stream starts.
// [tokenizer took care that the posiiton // remove from the current stream positio
should be that way with a special case] n the size of the tokenizer buffer, which is "read", but not used
pdfObject = new PDFStreamInput((PDFDictio pdfObject = new PDFStreamInput((PDFDictio
nary*)pdfObject,mCurrentPositionProvider->GetCurrentPosition()); nary*)pdfObject, mCurrentPositionProvider->GetCurrentPosition() - mTokenizer.Get
ReadBufferSize());
} }
else else
{ {
SaveTokenToBuffer(token); SaveTokenToBuffer(token);
} }
} }
break; break;
} }
// Symbol (legitimate keyword or error. determine if error based on semantics) // Symbol (legitimate keyword or error. determine if error based on semantics)
 End of changes. 2 change blocks. 
4 lines changed or deleted 12 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS