Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Side by Side Diff: experimental/PdfViewer/pdfparser/native/SkPdfObject.h

Issue 19543016: pdfviewer: fix typo (false != NULL) (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #ifndef EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFOBJECT_H_ 1 #ifndef EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFOBJECT_H_
2 #define EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFOBJECT_H_ 2 #define EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFOBJECT_H_
3 3
4 #include <stdint.h> 4 #include <stdint.h>
5 #include <string.h> 5 #include <string.h>
6 #include <string> 6 #include <string>
7 #include "SkTDArray.h" 7 #include "SkTDArray.h"
8 #include "SkTDict.h" 8 #include "SkTDict.h"
9 #include "SkRect.h" 9 #include "SkRect.h"
10 #include "SkMatrix.h" 10 #include "SkMatrix.h"
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 397
398 return fMap->set(key, value); 398 return fMap->set(key, value);
399 } 399 }
400 400
401 SkPdfObject* get(SkPdfObject* key) { 401 SkPdfObject* get(SkPdfObject* key) {
402 SkASSERT(fObjectType == kDictionary_PdfObjectType); 402 SkASSERT(fObjectType == kDictionary_PdfObjectType);
403 SkASSERT(key->fObjectType == kName_PdfObjectType); 403 SkASSERT(key->fObjectType == kName_PdfObjectType);
404 404
405 if (key->fObjectType != kName_PdfObjectType || fObjectType != kDictionar y_PdfObjectType) { 405 if (key->fObjectType != kName_PdfObjectType || fObjectType != kDictionar y_PdfObjectType) {
406 // TODO(edisonn): report err 406 // TODO(edisonn): report err
407 return false; 407 return NULL;
408 } 408 }
409 409
410 SkASSERT(key->fStr.fBuffer[key->fStr.fBytes] == '\0'); 410 SkASSERT(key->fStr.fBuffer[key->fStr.fBytes] == '\0');
411 411
412 return get((char*)key->fStr.fBuffer); 412 return get((char*)key->fStr.fBuffer);
413 } 413 }
414 414
415 SkPdfObject* get(const char* key) { 415 SkPdfObject* get(const char* key) {
416 SkASSERT(fObjectType == kDictionary_PdfObjectType); 416 SkASSERT(fObjectType == kDictionary_PdfObjectType);
417 SkASSERT(key); 417 SkASSERT(key);
418 if (fObjectType != kDictionary_PdfObjectType) { 418 if (fObjectType != kDictionary_PdfObjectType) {
419 // TODO(edisonn): report err 419 // TODO(edisonn): report err
420 return NULL; 420 return NULL;
421 } 421 }
422 SkPdfObject* ret = NULL; 422 SkPdfObject* ret = NULL;
423 fMap->find(key, &ret); 423 fMap->find(key, &ret);
424 return ret; 424 return ret;
425 } 425 }
426 426
427 const SkPdfObject* get(SkPdfObject* key) const { 427 const SkPdfObject* get(SkPdfObject* key) const {
428 SkASSERT(fObjectType == kDictionary_PdfObjectType); 428 SkASSERT(fObjectType == kDictionary_PdfObjectType);
429 SkASSERT(key->fObjectType == kName_PdfObjectType); 429 SkASSERT(key->fObjectType == kName_PdfObjectType);
430 430
431 if (key->fObjectType != kName_PdfObjectType || fObjectType != kDictionar y_PdfObjectType) { 431 if (key->fObjectType != kName_PdfObjectType || fObjectType != kDictionar y_PdfObjectType) {
432 // TODO(edisonn): report err 432 // TODO(edisonn): report err
433 return false; 433 return NULL;
434 } 434 }
435 435
436 SkASSERT(key->fStr.fBuffer[key->fStr.fBytes] == '\0'); 436 SkASSERT(key->fStr.fBuffer[key->fStr.fBytes] == '\0');
437 437
438 return get((char*)key->fStr.fBuffer); 438 return get((char*)key->fStr.fBuffer);
439 } 439 }
440 440
441 441
442 const SkPdfObject* get(const char* key) const { 442 const SkPdfObject* get(const char* key) const {
443 SkASSERT(fObjectType == kDictionary_PdfObjectType); 443 SkASSERT(fObjectType == kDictionary_PdfObjectType);
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 857
858 class SkPdfStream : public SkPdfObject {}; 858 class SkPdfStream : public SkPdfObject {};
859 class SkPdfArray : public SkPdfObject {}; 859 class SkPdfArray : public SkPdfObject {};
860 class SkPdfString : public SkPdfObject {}; 860 class SkPdfString : public SkPdfObject {};
861 class SkPdfHexString : public SkPdfObject {}; 861 class SkPdfHexString : public SkPdfObject {};
862 class SkPdfInteger : public SkPdfObject {}; 862 class SkPdfInteger : public SkPdfObject {};
863 class SkPdfReal : public SkPdfObject {}; 863 class SkPdfReal : public SkPdfObject {};
864 class SkPdfNumber : public SkPdfObject {}; 864 class SkPdfNumber : public SkPdfObject {};
865 865
866 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFOBJECT_H_ 866 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_NATIVE_SKPDFOBJECT_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698