"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Plugins/Pdf/PDFWriter/PDFPageInput.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.

PDFPageInput.cpp  (TeXmacs-1.99.4-src):PDFPageInput.cpp  (TeXmacs-1.99.5-src)
skipping to change at line 76 skipping to change at line 76
PDFPageInput::~PDFPageInput() PDFPageInput::~PDFPageInput()
{ {
} }
bool PDFPageInput::operator!() bool PDFPageInput::operator!()
{ {
return !mPageObject; return !mPageObject;
} }
unsigned int PDFPageInput::GetRotate()
{
unsigned int result = 0;
RefCountPtr<PDFObject> rotation(QueryInheritedValue(mPageObject.GetPtr(),"Ro
tate"));
if (!rotation)
return result;
ParsedPrimitiveHelper helper(rotation.GetPtr());
if (!helper.IsNumber())
{
TRACE_LOG("PDFPageInput::GetRotate, Exception, pdf page rotation must be
numeric value. defaulting to 0");
}
else
{
result = static_cast<unsigned int>(helper.GetAsInteger());
if (result % 90)
{
TRACE_LOG("PDFPageInput::GetRotate, Exception, pdf page r
otation must be a multiple of 90. defaulting to 0");
result = 0;
}
}
return result;
}
PDFRectangle PDFPageInput::GetMediaBox() PDFRectangle PDFPageInput::GetMediaBox()
{ {
PDFRectangle result; PDFRectangle result;
PDFObjectCastPtr<PDFArray> mediaBox(QueryInheritedValue(mPageObject.GetPtr() ,"MediaBox")); PDFObjectCastPtr<PDFArray> mediaBox(QueryInheritedValue(mPageObject.GetPtr() ,"MediaBox"));
if(!mediaBox || mediaBox->GetLength() != 4) if(!mediaBox || mediaBox->GetLength() != 4)
{ {
TRACE_LOG("PDFPageInput::GetMediaBox, Exception, pdf page does not have correct media box. defaulting to A4"); TRACE_LOG("PDFPageInput::GetMediaBox, Exception, pdf page does not have correct media box. defaulting to A4");
result = PDFRectangle(0,0,595,842); result = PDFRectangle(0,0,595,842);
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 27 lines changed or added

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