Changeset 261
- Timestamp:
- Dec 21, 2008, 8:03:13 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Lucide/SOURCE/plugins/lupoppler/lupoppler.cpp
r258 r261 103 103 extern "C" char * EXPENTRY getDescription() 104 104 { 105 return "PDF plugin, based on poppler library v0.10. 0";105 return "PDF plugin, based on poppler library v0.10.2"; 106 106 } 107 107 -
trunk/Lucide/changelog
r257 r261 1 1 1.XX: 2 - PDF plugin: Poppler (pdf rendering) library updated to version 0.10. 0.2 - PDF plugin: Poppler (pdf rendering) library updated to version 0.10.2. 3 3 - PDF plugin: freetype library updated to version 2.3.7. 4 4 -
trunk/poppler/mypoppler/poppler/Annot.cc
r257 r261 958 958 } 959 959 obj1.free(); 960 961 if (dict->lookup("OC", &obj1)->isDict()) { 962 optionalContent = new OCGs(&obj1, xrefA); 963 } else { 964 optionalContent = NULL; 965 } 966 obj1.free(); 960 961 optContentConfig = catalog ? catalog->getOptContentConfig() : NULL; 962 dict->lookupNF("OC", &oc); 963 if (!oc.isRef() && !oc.isNull()) { 964 error (-1, "Annotation OC value not null or dict: %i", oc.getType()); 965 } 967 966 } 968 967 … … 1014 1013 delete color; 1015 1014 1016 if (optionalContent) 1017 delete optionalContent; 1015 oc.free(); 1018 1016 } 1019 1017 … … 1148 1146 (!printing && (flags & annotFlagNoView))) { 1149 1147 return; 1148 } 1149 1150 // check the OC 1151 if (optContentConfig && oc.isRef()) { 1152 if (! optContentConfig->optContentIsVisible(&oc)) 1153 return; 1150 1154 } 1151 1155 -
trunk/poppler/mypoppler/poppler/Annot.h
r257 r261 510 510 AnnotColor *getColor() const { return color; } 511 511 int getTreeKey() const { return treeKey; } 512 OCGs *getOptionalContent() const { return optionalContent; }513 512 514 513 int getId() { return ref.num; } … … 543 542 GooString *appearState; // AS 544 543 int treeKey; // Struct Parent; 545 OCGs *optionalContent; // OC 544 OCGs *optContentConfig; // Optional content config 545 Object oc; // OC 546 546 547 547 XRef *xref; // the xref table for this PDF file -
trunk/poppler/mypoppler/poppler/CairoOutputDev.cc
r257 r261 400 400 void CairoOutputDev::updateFont(GfxState *state) { 401 401 cairo_font_face_t *font_face; 402 cairo_matrix_t matrix ;402 cairo_matrix_t matrix, invert_matrix; 403 403 404 404 LOG(printf ("updateFont() font=%s\n", state->getFont()->getName()->getCString())); … … 431 431 matrix.x0 = 0; 432 432 matrix.y0 = 0; 433 434 /* Make sure the font matrix is invertible before setting it. cairo 435 * will blow up if we give it a matrix that's not invertible, so we 436 * need to check before passing it to cairo_set_font_matrix. Ignoring it 437 * is likely to give better results than not rendering anything at 438 * all. See #18254. 439 */ 440 invert_matrix = matrix; 441 if (cairo_matrix_invert(&invert_matrix)) { 442 warning("font matrix not invertible\n"); 443 return; 444 } 445 433 446 cairo_set_font_matrix (cairo, &matrix); 434 447 } -
trunk/poppler/mypoppler/poppler/Catalog.cc
r257 r261 203 203 if (catDict.dictLookup("OCProperties", &optContentProps)->isDict()) { 204 204 optContent = new OCGs(&optContentProps, xref); 205 if (!optContent->isOk ()) { 206 delete optContent; 207 optContent = NULL; 208 } 205 209 } 206 210 optContentProps.free(); -
trunk/poppler/mypoppler/poppler/CharCodeToUnicode.cc
r257 r261 127 127 128 128 if (!(f = fopen(fileName->getCString(), "r"))) { 129 gfree(uBuf); 129 130 error(-1, "Couldn't open unicodeToUnicode file '%s'", 130 131 fileName->getCString()); -
trunk/poppler/mypoppler/poppler/Form.cc
r257 r261 6 6 // 7 7 // Copyright 2006-2008 Julien Rebetez <julienr@svn.gnome.org> 8 // Copyright 2007 Albert Astals Cid <aacid@kde.org>8 // Copyright 2007-2008 Albert Astals Cid <aacid@kde.org> 9 9 // Copyright 2007-2008 Carlos Garcia Campos <carlosgc@gnome.org> 10 10 // Copyright 2007 Adrian Johnson <ajohnson@redneon.com> … … 453 453 } 454 454 obj2.arrayGet(0, &obj3); 455 obj2.arrayGet( 0, &obj4);455 obj2.arrayGet(1, &obj4); 456 456 parent->_setChoiceExportVal(i, obj3.getString()->copy()); 457 457 parent->_setChoiceOptionName(i, obj4.getString()->copy()); -
trunk/poppler/mypoppler/poppler/Gfx.cc
r257 r261 497 497 printCommands = globalParams->getPrintCommands(); 498 498 profileCommands = globalParams->getProfileCommands(); 499 mcStack = NULL; 499 500 500 501 // start the resource stack … … 540 541 subPage = gTrue; 541 542 printCommands = globalParams->getPrintCommands(); 543 mcStack = NULL; 542 544 543 545 // start the resource stack … … 582 584 if (state) { 583 585 delete state; 586 } 587 while (mcStack) { 588 popMarkedContent(); 584 589 } 585 590 } … … 1563 1568 return; 1564 1569 } 1565 if (state->isPath() ) {1570 if (state->isPath() && !contentIsHidden()) { 1566 1571 if (state->getStrokeColorSpace()->getMode() == csPattern) { 1567 1572 doPatternStroke(); … … 1579 1584 } 1580 1585 state->closePath(); 1581 if (state->isPath() ) {1586 if (state->isPath() && !contentIsHidden()) { 1582 1587 if (state->getStrokeColorSpace()->getMode() == csPattern) { 1583 1588 doPatternStroke(); … … 1594 1599 return; 1595 1600 } 1596 if (state->isPath() ) {1601 if (state->isPath() && !contentIsHidden()) { 1597 1602 if (state->getFillColorSpace()->getMode() == csPattern) { 1598 1603 doPatternFill(gFalse); … … 1609 1614 return; 1610 1615 } 1611 if (state->isPath() ) {1616 if (state->isPath() && !contentIsHidden()) { 1612 1617 if (state->getFillColorSpace()->getMode() == csPattern) { 1613 1618 doPatternFill(gTrue); … … 1624 1629 return; 1625 1630 } 1626 if (state->isPath() ) {1631 if (state->isPath() && !contentIsHidden()) { 1627 1632 if (state->getFillColorSpace()->getMode() == csPattern) { 1628 1633 doPatternFill(gFalse); … … 1644 1649 return; 1645 1650 } 1646 if (state->isPath() ) {1651 if (state->isPath() && !contentIsHidden()) { 1647 1652 state->closePath(); 1648 1653 if (state->getFillColorSpace()->getMode() == csPattern) { … … 1665 1670 return; 1666 1671 } 1667 if (state->isPath() ) {1672 if (state->isPath() && !contentIsHidden()) { 1668 1673 if (state->getFillColorSpace()->getMode() == csPattern) { 1669 1674 doPatternFill(gTrue); … … 1685 1690 return; 1686 1691 } 1687 if (state->isPath() ) {1692 if (state->isPath() && !contentIsHidden()) { 1688 1693 state->closePath(); 1689 1694 if (state->getFillColorSpace()->getMode() == csPattern) { … … 1912 1917 m1[4] = m[4]; 1913 1918 m1[5] = m[5]; 1914 out->tilingPatternFill(state, tPat->getContentStream(), 1915 tPat->getPaintType(), tPat->getResDict(), 1916 m1, tPat->getBBox(), 1917 xi0, yi0, xi1, yi1, xstep, ystep); 1919 if (!contentIsHidden()) { 1920 out->tilingPatternFill(state, tPat->getContentStream(), 1921 tPat->getPaintType(), tPat->getResDict(), 1922 m1, tPat->getBBox(), 1923 xi0, yi0, xi1, yi1, xstep, ystep); 1924 } 1918 1925 } else { 1919 1926 for (yi = yi0; yi < yi1; ++yi) { … … 1984 1991 state->setFillColor(shading->getBackground()); 1985 1992 out->updateFillColor(state); 1986 out->fill(state); 1993 if (!contentIsHidden()) 1994 out->fill(state); 1987 1995 } 1988 1996 state->clearPath(); … … 2197 2205 x0 * matrix[1] + y1 * matrix[3] + matrix[5]); 2198 2206 state->closePath(); 2199 out->fill(state); 2207 if (!contentIsHidden()) 2208 out->fill(state); 2200 2209 state->clearPath(); 2201 2210 … … 2486 2495 state->lineTo(ux1, uy1); 2487 2496 state->closePath(); 2488 out->fill(state); 2497 if (!contentIsHidden()) 2498 out->fill(state); 2489 2499 state->clearPath(); 2490 2500 … … 2762 2772 2763 2773 // fill the path 2764 out->fill(state); 2774 if (!contentIsHidden()) 2775 out->fill(state); 2765 2776 state->clearPath(); 2766 2777 … … 2799 2810 } 2800 2811 state->closePath(); 2801 out->fill(state); 2812 if (!contentIsHidden()) 2813 out->fill(state); 2802 2814 state->clearPath(); 2803 2815 } … … 2831 2843 } 2832 2844 state->closePath(); 2833 out->fill(state); 2845 if (!contentIsHidden()) 2846 out->fill(state); 2834 2847 state->clearPath(); 2835 2848 } … … 2872 2885 state->lineTo(x2, y2); 2873 2886 state->closePath(); 2874 out->fill(state); 2887 if (!contentIsHidden()) 2888 out->fill(state); 2875 2889 state->clearPath(); 2876 2890 } else { … … 2952 2966 patch->x[0][0], patch->y[0][0]); 2953 2967 state->closePath(); 2954 out->fill(state); 2968 if (!contentIsHidden()) 2969 out->fill(state); 2955 2970 state->clearPath(); 2956 2971 } else { … … 3412 3427 originY *= state->getFontSize(); 3413 3428 state->textTransformDelta(originX, originY, &tOriginX, &tOriginY); 3414 out->drawChar(state, state->getCurX() + riseX, state->getCurY() + riseY, 3415 tdx, tdy, tOriginX, tOriginY, code, n, u, uLen); 3429 if (!contentIsHidden()) { 3430 out->drawChar(state, state->getCurX() + riseX, state->getCurY() + riseY, 3431 tdx, tdy, tOriginX, tOriginY, code, n, u, uLen); 3432 } 3416 3433 state->shift(tdx, tdy); 3417 3434 p += n; … … 3450 3467 } 3451 3468 state->textTransformDelta(dx, dy, &tdx, &tdy); 3452 out->drawString(state, s); 3469 if (!contentIsHidden()) 3470 out->drawString(state, s); 3453 3471 state->shift(tdx, tdy); 3454 3472 } … … 3644 3662 3645 3663 // draw it 3646 out->drawImageMask(state, ref, str, width, height, invert, inlineImg); 3664 if (!contentIsHidden()) 3665 out->drawImageMask(state, ref, str, width, height, invert, inlineImg); 3647 3666 3648 3667 } else { … … 3834 3853 // draw it 3835 3854 if (haveSoftMask) { 3836 out->drawSoftMaskedImage(state, ref, str, width, height, colorMap, 3837 maskStr, maskWidth, maskHeight, maskColorMap); 3855 if (!contentIsHidden()) { 3856 out->drawSoftMaskedImage(state, ref, str, width, height, colorMap, 3857 maskStr, maskWidth, maskHeight, maskColorMap); 3858 } 3838 3859 delete maskColorMap; 3839 } else if (haveExplicitMask ) {3860 } else if (haveExplicitMask && !contentIsHidden ()) { 3840 3861 out->drawMaskedImage(state, ref, str, width, height, colorMap, 3841 3862 maskStr, maskWidth, maskHeight, maskInvert); 3842 } else {3863 } else if (!contentIsHidden()) { 3843 3864 out->drawImage(state, ref, str, width, height, colorMap, 3844 3865 haveColorKeyMask ? maskColors : (int *)NULL, inlineImg); … … 4154 4175 //------------------------------------------------------------------------ 4155 4176 4177 struct MarkedContentStack { 4178 GBool ocSuppressed; // are we ignoring content based on OptionalContent? 4179 MarkedContentStack *next; // next object on stack 4180 }; 4181 4182 void Gfx::popMarkedContent() { 4183 MarkedContentStack *mc = mcStack; 4184 mcStack = mc->next; 4185 delete mc; 4186 } 4187 4188 void Gfx::pushMarkedContent() { 4189 MarkedContentStack *mc = new MarkedContentStack(); 4190 mc->ocSuppressed = gFalse; 4191 mc->next = mcStack; 4192 mcStack = mc; 4193 } 4194 4195 GBool Gfx::contentIsHidden() { 4196 return mcStack && mcStack->ocSuppressed; 4197 } 4198 4156 4199 void Gfx::opBeginMarkedContent(Object args[], int numArgs) { 4157 // TODO: we really need to be adding this to the markedContentStack 4200 // push a new stack entry 4201 pushMarkedContent(); 4202 4158 4203 OCGs *contentConfig = catalog->getOptContentConfig(); 4159 4160 4204 char* name0 = args[0].getName(); 4161 4205 if ( strncmp( name0, "OC", 2) == 0 && contentConfig) { … … 4169 4213 if ( markedContent.isRef() ) { 4170 4214 bool visible = contentConfig->optContentIsVisible( &markedContent ); 4171 ocSuppressed = !(visible); 4215 MarkedContentStack *mc = mcStack; 4216 mc->ocSuppressed = !(visible); 4172 4217 } 4173 4218 } else { … … 4178 4223 } 4179 4224 } 4180 4181 4225 4182 4226 if (printCommands) { … … 4196 4240 4197 4241 void Gfx::opEndMarkedContent(Object args[], int numArgs) { 4198 // TODO: we should turn this off based on the markedContentStack 4199 ocSuppressed = false; 4242 // pop the stack 4243 if (mcStack) 4244 popMarkedContent(); 4200 4245 out->endMarkedContent(state); 4201 4246 } … … 4210 4255 } 4211 4256 4212 if(numArgs == 2 ) {4257 if(numArgs == 2 && args[1].isDict()) { 4213 4258 out->markPoint(args[0].getName(),args[1].getDict()); 4214 4259 } else { -
trunk/poppler/mypoppler/poppler/Gfx.h
r257 r261 17 17 // Copyright (C) 2007 Iñigo MartÃnez <inigomartinez@gmail.com> 18 18 // Copyright (C) 2008 Brad Hards <bradh@kde.org> 19 // Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org> 19 20 // 20 21 // To see a description of the changes please see the Changelog file that … … 62 63 class AnnotColor; 63 64 class Catalog; 65 struct MarkedContentStack; 64 66 65 67 //------------------------------------------------------------------------ … … 172 174 GfxResources *res; // resource stack 173 175 int updateLevel; 174 GBool ocSuppressed; // are we ignoring content based on OptionalContent?175 176 176 177 GfxState *state; // current graphics state … … 182 183 int formDepth; 183 184 184 GooList *markedContentStack; // current BMC/EMC stack185 MarkedContentStack *mcStack; // current BMC/EMC stack 185 186 186 187 Parser *parser; // parser for page content stream(s) … … 330 331 void opEndMarkedContent(Object args[], int numArgs); 331 332 void opMarkPoint(Object args[], int numArgs); 333 GBool contentIsHidden(); 334 void pushMarkedContent(); 335 void popMarkedContent(); 332 336 333 337 void pushResources(Dict *resDict); -
trunk/poppler/mypoppler/poppler/GfxState.cc
r257 r261 1123 1123 // indexHigh is greater than 2^31, the loop below may overwrite 1124 1124 // past the end of the array 1125 error(-1, "Bad Indexed color space (invalid indexHigh value)"); 1126 delete baseA; 1127 goto err2; 1125 int previousValue = indexHighA; 1126 if (indexHighA < 0) indexHighA = 0; 1127 else indexHighA = 255; 1128 error(-1, "Bad Indexed color space (invalid indexHigh value, was %d using %d to try to recover)", previousValue, indexHighA); 1128 1129 } 1129 1130 obj1.free(); -
trunk/poppler/mypoppler/poppler/OptionalContent.cc
r257 r261 29 29 30 30 OCGs::OCGs(Object *ocgObject, XRef *xref) : 31 m_ orderArray(0), m_rBGroupsArray(), m_xref(xref)31 m_xref(xref) 32 32 { 33 33 // we need to parse the dictionary here, and build optionalContentGroups 34 ok = gTrue; 34 35 optionalContentGroups = new GooList(); 35 36 … … 39 40 error(-1, "Expected the optional content group list, but wasn't able to find it, or it isn't an Array"); 40 41 ocgList.free(); 42 ok = gFalse; 41 43 return; 42 44 } … … 50 52 break; 51 53 } 52 OptionalContentGroup *thisOptionalContentGroup = new OptionalContentGroup(ocg.getDict() , xref);54 OptionalContentGroup *thisOptionalContentGroup = new OptionalContentGroup(ocg.getDict()); 53 55 ocg.free(); 54 56 ocgList.arrayGetNF(i, &ocg); … … 67 69 defaultOcgConfig.free(); 68 70 ocgList.free(); 71 ok = gFalse; 69 72 return; 70 73 } … … 124 127 off.free(); 125 128 126 Object order;127 129 defaultOcgConfig.dictLookup("Order", &order); 128 if ( (order.isArray()) && (order.arrayGetLength() > 0) ) {129 m_orderArray = order.getArray();130 }131 132 Object rbgroups;133 130 defaultOcgConfig.dictLookup("RBGroups", &rbgroups); 134 if ( (rbgroups.isArray()) && (rbgroups.arrayGetLength() > 0) ) {135 m_rBGroupsArray = rbgroups.getArray();136 }137 131 138 132 ocgList.free(); … … 143 137 { 144 138 deleteGooList(optionalContentGroups, OptionalContentGroup); 139 order.free(); 140 rbgroups.free(); 145 141 } 146 142 … … 157 153 for (int i=0; i < optionalContentGroups->getLength(); ++i) { 158 154 ocg = (OptionalContentGroup*)optionalContentGroups->get(i); 159 if ( (ocg-> ref().num == ref.num) && (ocg->ref().gen == ref.gen) ) {155 if ( (ocg->getRef().num == ref.num) && (ocg->getRef().gen == ref.gen) ) { 160 156 return ocg; 161 157 } … … 204 200 } else if (ocg.isRef()) { 205 201 OptionalContentGroup* oc = findOcgByRef( ocg.getRef() ); 206 if ( !oc || oc-> state() == OptionalContentGroup::Off ) {202 if ( !oc || oc->getState() == OptionalContentGroup::Off ) { 207 203 result = false; 208 204 } else { … … 214 210 } else if ( dictType.isName("OCG") ) { 215 211 OptionalContentGroup* oc = findOcgByRef( dictRef->getRef() ); 216 if ( !oc || oc-> state() == OptionalContentGroup::Off ) {212 if ( !oc || oc->getState() == OptionalContentGroup::Off ) { 217 213 result=false; 218 214 } … … 231 227 if (ocgItem.isRef()) { 232 228 OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() ); 233 if ( oc && oc-> state() == OptionalContentGroup::Off ) {229 if ( oc && oc->getState() == OptionalContentGroup::Off ) { 234 230 return false; 235 231 } … … 246 242 if (ocgItem.isRef()) { 247 243 OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() ); 248 if ( oc && oc-> state() == OptionalContentGroup::On ) {244 if ( oc && oc->getState() == OptionalContentGroup::On ) { 249 245 return false; 250 246 } … … 261 257 if (ocgItem.isRef()) { 262 258 OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() ); 263 if ( oc && oc-> state() == OptionalContentGroup::On ) {259 if ( oc && oc->getState() == OptionalContentGroup::On ) { 264 260 return true; 265 261 } … … 276 272 if (ocgItem.isRef()) { 277 273 OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() ); 278 if ( oc && oc-> state() == OptionalContentGroup::Off ) {274 if ( oc && oc->getState() == OptionalContentGroup::Off ) { 279 275 return true; 280 276 } … … 286 282 //------------------------------------------------------------------------ 287 283 288 OptionalContentGroup::OptionalContentGroup(Dict *ocgDict , XRef *xrefA) : m_name(NULL)284 OptionalContentGroup::OptionalContentGroup(Dict *ocgDict) : m_name(NULL) 289 285 { 290 286 Object ocgName; 291 ocgDict->lookup NF("Name", &ocgName);287 ocgDict->lookup("Name", &ocgName); 292 288 if (!ocgName.isString()) { 293 289 error(-1, "Expected the name of the OCG, but wasn't able to find it, or it isn't a String"); … … 304 300 } 305 301 306 GooString* OptionalContentGroup:: name() const302 GooString* OptionalContentGroup::getName() const 307 303 { 308 304 return m_name; … … 314 310 } 315 311 316 Ref OptionalContentGroup:: ref() const312 Ref OptionalContentGroup::getRef() const 317 313 { 318 314 return m_ref; -
trunk/poppler/mypoppler/poppler/OptionalContent.h
r250 r261 4 4 // 5 5 // Copyright 2007 Brad Hards <bradh@kde.org> 6 // Copyright 2008 Carlos Garcia Campos <carlosgc@gnome.org> 6 7 // 7 8 // Released under the GPL (version 2, or later, at your option) … … 33 34 ~OCGs(); 34 35 36 // Is OCGS valid? 37 GBool isOk() { return ok; } 38 35 39 bool hasOCGs(); 36 40 GooList *getOCGs() const { return optionalContentGroups; } … … 38 42 OptionalContentGroup* findOcgByRef( const Ref &ref); 39 43 40 Array* getOrderArray() const { return m_orderArray; } 41 Array* getRBGroupsArray() const { return m_rBGroupsArray; } 44 Array* getOrderArray() 45 { return (order.isArray() && order.arrayGetLength() > 0) ? order.getArray() : NULL; } 46 Array* getRBGroupsArray() 47 { return (rbgroups.isArray() && rbgroups.arrayGetLength()) ? rbgroups.getArray() : NULL; } 42 48 43 49 bool optContentIsVisible( Object *dictRef ); 44 50 45 51 private: 52 GBool ok; 53 46 54 bool allOn( Array *ocgArray ); 47 55 bool allOff( Array *ocgArray ); … … 51 59 GooList *optionalContentGroups; 52 60 53 Array *m_orderArray;54 Array *m_rBGroupsArray;61 Object order; 62 Object rbgroups; 55 63 XRef *m_xref; 56 64 }; … … 62 70 enum State { On, Off }; 63 71 64 OptionalContentGroup(Dict *dict , XRef *xrefA);72 OptionalContentGroup(Dict *dict); 65 73 66 74 OptionalContentGroup(GooString *label); … … 68 76 ~OptionalContentGroup(); 69 77 70 GooString* name() const;78 GooString* getName() const; 71 79 72 Ref ref() const;80 Ref getRef() const; 73 81 void setRef(const Ref ref); 74 82 75 State state() { return m_state; };83 State getState() { return m_state; }; 76 84 void setState(State state) { m_state = state; }; 77 85 -
trunk/poppler/mypoppler/poppler/Page.cc
r257 r261 24 24 // Copyright (C) 2008 Iñigo MartÃnez <inigomartinez@gmail.com> 25 25 // Copyright (C) 2008 Brad Hards <bradh@kde.org> 26 // Copyright (C) 2008 Ilya Gorenbein <igorenbein@finjan.com> 26 27 // 27 28 // To see a description of the changes please see the Changelog file that … … 336 337 annots.free(); 337 338 contents.free(); 339 trans.free(); 340 thumb.free(); 341 actions.free(); 338 342 } 339 343 -
trunk/poppler/mypoppler/poppler/TextOutputDev.cc
r257 r261 13 13 // Copyright (C) 2005-2007 Kristian HÞgsberg <krh@redhat.com> 14 14 // Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru> 15 // Copyright (C) 2006 , 2007Carlos Garcia Campos <carlosgc@gnome.org>15 // Copyright (C) 2006-2008 Carlos Garcia Campos <carlosgc@gnome.org> 16 16 // Copyright (C) 2006, 2007 Ed Catmur <ed@catmur.co.uk> 17 17 // Copyright (C) 2006 Jeff Muizelaar <jeff@infidigm.net> … … 1942 1942 1943 1943 void TextPage::beginWord(GfxState *state, double x0, double y0) { 1944 GfxFont *gfxFont; 1944 1945 double *fontm; 1945 1946 double m[4], m2[4]; … … 1956 1957 // compute the rotation 1957 1958 state->getFontTransMat(&m[0], &m[1], &m[2], &m[3]); 1958 if (state->getFont()->getType() == fontType3) { 1959 gfxFont = state->getFont(); 1960 if (gfxFont && gfxFont->getType() == fontType3) { 1959 1961 fontm = state->getFont()->getFontMatrix(); 1960 1962 m2[0] = fontm[0] * m[0] + fontm[1] * m[2]; … … 3811 3813 child_selection = *selection; 3812 3814 if (style == selectionStyleWord) { 3813 child_selection.x1 = begin ->xMin;3815 child_selection.x1 = begin ? begin->xMin : xMin; 3814 3816 if (end && end->xMax != -1) { 3815 3817 child_selection.x2 = current->xMax; -
trunk/poppler/mypoppler/poppler/UnicodeTypeTable.cc
r257 r261 1168 1168 u = out[r]; out[r] = out[r - 1]; out[r - 1] = u; 1169 1169 swap = classes[r]; classes[r] = classes[r - 1]; classes[r - 1] = swap; 1170 if (indices) 1171 swap = idx[r]; idx[r] = idx[r - 1]; idx[r - 1] = swap; 1170 if (indices) { 1171 swap = idx[r]; 1172 idx[r] = idx[r - 1]; 1173 idx[r - 1] = swap; 1174 } 1172 1175 } 1173 1176 // canonical compose out[o, p)
Note: See TracChangeset
for help on using the changeset viewer.