Changeset 250 for trunk/Lucide


Ignore:
Timestamp:
Jun 30, 2008, 10:13:07 AM (13 years ago)
Author:
Eugene Romanenko
Message:

PDF plugin: poppler library updated to version 0.8.3

Location:
trunk/Lucide
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/SOURCE/plugins/lupoppler/lupoppler.cpp

    r227 r250  
    4646#include <goo\GooList.h>
    4747#include <splash\SplashBitmap.h>
    48 #include <UGooString.h>
    4948#include <GlobalParams.h>
    5049#include <ErrorCodes.h>
     
    6261#include "cpconv.h"
    6362
     63#ifdef __GNUC__
     64#define __min(a,b)  (((a) < (b)) ? (a) : (b))
     65#endif
     66
    6467typedef std::vector<LuRectangle> RectList;
    6568
     
    98101extern "C" char * EXPENTRY getDescription()
    99102{
    100     return "PDF plugin, based on poppler library v0.5.4";
     103    return "PDF plugin, based on poppler library v0.8.3";
    101104}
    102105
     
    287290    rowstride = __min( splash_rowstride, pixbuf_rowstride );
    288291
    289     int i, j;
     292    int i, j, k, l, m;
    290293    for ( i = 0, j = ( height - 1 ); i < height; i++, j-- )
    291294    {
    292295        dst = pixbuf_data + i * pixbuf_rowstride;
    293296        src = ((char *)color_ptr) + j * splash_rowstride;
    294         memcpy( dst, src, rowstride );
     297        //memcpy( dst, src, rowstride );
     298       
     299        // source 4 Bpp, dest 3 Bpp
     300        for ( k = 0, l = 0, m = 0; k < width; k++ ) {
     301                dst[ l++ ] = src[ m++ ];
     302                dst[ l++ ] = src[ m++ ];
     303                dst[ l++ ] = src[ m++ ];
     304                m++;
     305        }
    295306    }
    296307
     
    488499    poppler_selection.y2 = selection->y2;
    489500
    490     GooList *list = text_dev->getSelectionRegion( &poppler_selection, 1.0 );
     501    GooList *list = text_dev->getSelectionRegion( &poppler_selection, selectionStyleWord, 1.0 );
    491502    int len = list->getLength();
    492503
     
    546557
    547558    DosRequestMutexSem( document->mutex, SEM_INDEFINITE_WAIT );
    548     sel_text = text_dev->getSelectionText( &pdf_selection );
     559    sel_text = text_dev->getSelectionText( &pdf_selection, selectionStyleWord );
    549560
    550561    delete document->text;
     
    602613{
    603614    LinkDest *link_dest;
    604     UGooString *named_dest;
     615    GooString *named_dest;
    605616
    606617    if ( !link->isOk() ) {
     
    625636{
    626637    LinkDest *link_dest;
    627     UGooString *named_dest;
     638    GooString *named_dest;
    628639
    629640    if ( !link->isOk() ) {
     
    787798    PDFDoc *doc = ((PopplerDocument *)somThis->data)->doc;
    788799
    789     PSOutputDev *out = new PSOutputDev( filename, doc->getXRef(), doc->getCatalog(),
     800    PSOutputDev *out = new PSOutputDev( filename, doc->getXRef(), doc->getCatalog(), "",
    790801                                (first_page <= last_page) ? (first_page + 1) : (last_page + 1),
    791802                                (first_page <= last_page) ? (last_page + 1) : (first_page + 1),
     
    13501361    for ( i = 0, j = ( height - 1 ); i < height; i++, j-- )
    13511362    {
    1352         src = data + ( j * rowstride );
     1363        src = (char*)(data + ( j * rowstride ));
    13531364        dst = pixbuf_data + (i * pixbuf_rowstride);
    13541365        for ( int k = 0; k < pixbuf_rowstride; k += bpp )
     
    15111522
    15121523    if ( !globalParams ) {
    1513         globalParams = new GlobalParams( NULL );
     1524        globalParams = new GlobalParams();
    15141525    }
    15151526
     
    15641575    white[1] = 255;
    15651576    white[2] = 255;
    1566     document->output_dev = new SplashOutputDev( splashModeBGR8, 4, gFalse, white );
     1577    document->output_dev = new SplashOutputDev( splashModeXBGR8, 4, gFalse, white );
    15671578    document->output_dev->startDoc( document->doc->getXRef() );
    15681579
  • trunk/Lucide/changelog

    r247 r250  
     11.XX:
     2  - PDF plugin: Poppler (pdf rendering) library updated to version 0.8.3.
     3
    141.20:
    25  - JPG plugin: added support for quality image scaling. 
Note: See TracChangeset for help on using the changeset viewer.