[PDF] Fix substitute resources size calculation.

Review URL: http://codereview.appspot.com/4803041

git-svn-id: http://skia.googlecode.com/svn/trunk@1908 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
vandebo@chromium.org 2011-07-20 00:33:53 +00:00
parent 422b67d745
commit f5181a496d
2 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ public:
/** Set file offsets for the resources of substitute objects.
* @param fileOffset Accumulated offset of current document.
* @param firstPage Indicate whether this is for the first page only.
* @return Accumulated offset of resources of substitute objects.
* @return Total size of resources of substitute objects.
*/
off_t setSubstituteResourcesOffsets(off_t fileOffset, bool firstPage);

View File

@ -193,7 +193,7 @@ off_t SkPDFCatalog::setSubstituteResourcesOffsets(off_t fileOffset,
for (int i = 0; i < targetList->count(); ++i) {
offsetSum += setFileOffset((*targetList)[i], offsetSum);
}
return offsetSum;
return offsetSum - fileOffset;
}
void SkPDFCatalog::emitSubstituteResources(SkWStream *stream, bool firstPage) {