Ignore:
Timestamp:
May 25, 2006, 4:09:55 PM (16 years ago)
Author:
Eugene Romanenko
Message:

poppler updated to version 0.5.2, also needed changes to be compatible with new poppler

Location:
trunk/Lucide/SOURCE/plugins/ludoc
Files:
8 edited

Legend:

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

    r2 r27  
    4545{
    4646    return "NULL plugin, abstract base class for Lucide plugins.";
     47}
     48
     49
     50/*
     51 * SOM_Scope long  SOMLINK getBpp(LuDocument *somSelf,  Environment *ev)
     52 */
     53
     54/*
     55 * The prototype for getBpp was replaced by the following prototype:
     56 */
     57SOM_Scope short  SOMLINK getBpp(LuDocument *somSelf,  Environment *ev)
     58{
     59    // Abstract method does nothing
     60    return 0;
    4761}
    4862
  • trunk/Lucide/SOURCE/plugins/ludoc/ludoc.idl

    r2 r27  
    3838                      inout string error );
    3939
     40    /**
     41     * getBpp
     42     *
     43     * Return value: Number of bytes per pixel used for draw.
     44     **/
     45    short getBpp();
    4046
    4147    /**
     
    422428    implementation
    423429    {
    424         releaseorder: loadFile, isScalable, isRotable, getPageCount,
    425                       getPageSize, renderPageToPixbuf,
     430        releaseorder: loadFile, getBpp, isScalable, isRotable,
     431                      getPageCount, getPageSize, renderPageToPixbuf,
    426432                      isAsynchRenderingSupported, renderPageToPixbufAsynch,
    427433                      isHaveText, getSelectionRectangles, freeRectangles,
  • trunk/Lucide/SOURCE/plugins/ludoc/ludoc.xh

    r2 r27  
    143143        SOMClass *classObject;
    144144        somMToken loadFile;
     145        somMToken getBpp;
    145146        somMToken isScalable;
    146147        somMToken isRotable;
     
    189190                string* error);
    190191typedef somTP_LuDocument_loadFile *somTD_LuDocument_loadFile;
     192typedef short   SOMLINK somTP_LuDocument_getBpp(LuDocument *somSelf, Environment *ev);
     193typedef somTP_LuDocument_getBpp *somTD_LuDocument_getBpp;
    191194typedef boolean   SOMLINK somTP_LuDocument_isScalable(LuDocument *somSelf, Environment *ev);
    192195typedef somTP_LuDocument_isScalable *somTD_LuDocument_isScalable;
     
    490493
    491494
     495/* method: getBpp */
     496short   getBpp(Environment *ev)
     497{
     498   return SOM_ResolveD(this,LuDocument,LuDocument,getBpp)
     499        (this, ev);
     500}
     501
     502
    492503/* method: isScalable */
    493504boolean   isScalable(Environment *ev)
  • trunk/Lucide/SOURCE/plugins/ludoc/ludoc.xih

    r2 r27  
    3232#endif
    3333
    34 #define LuDocument_MaxNoMethods 29
     34#define LuDocument_MaxNoMethods 30
    3535
    3636/*
     
    9090  #define _somDumpSelfInt somSelf->somDumpSelfInt
    9191  #define _loadFile somSelf->loadFile
     92  #define _getBpp somSelf->getBpp
    9293  #define _isScalable somSelf->isScalable
    9394  #define _isRotable somSelf->isRotable
     
    156157
    157158/*
     159 * New Method: getBpp
     160 */
     161SOM_Scope short  SOMLINK getBpp(LuDocument *somSelf, Environment *ev);
     162#ifndef somMN_getBpp_defined
     163#define somMN_getBpp_defined
     164static char *somMN_getBpp = "getBpp";
     165static somId somId_getBpp = &somMN_getBpp;
     166#endif  /* somMN_getBpp_defined */
     167#ifndef somDS_getBpp_defined
     168#define somDS_getBpp_defined
     169static char *somDS_getBpp = "::LuDocument::getBpp";
     170static somId somDI_getBpp = &somDS_getBpp;
     171#endif  /* somDS_getBpp_defined */
     172
     173static somMethodInfo getBppMethodInfo = {12, 8, 0};
     174
     175static somApRdInfo getBppStubs = {0, 0, &getBppMethodInfo};
     176
     177/*
    158178 * New Method: isScalable
    159179 */
     
    699719         (somMethodProc *) ((void*) &loadFileStubs) },
    700720#endif
     721    {    &LuDocumentClassData.getBpp,
     722         &somId_getBpp,
     723         &somDI_getBpp,
     724         (somMethodProc *) getBpp,
     725         (somMethodProc *)((void*)-1),
     726#ifdef getBpp_somApRdDefault
     727         0},
     728#else
     729         (somMethodProc *) ((void*) &getBppStubs) },
     730#endif
    701731    {    &LuDocumentClassData.isScalable,
    702732         &somId_isScalable,
     
    9721002
    9731003static somStaticClassInfo LuDocumentSCI = {
    974     4, 25, 1, 0, 4, 0, /* layout version 4 */
     1004    4, 26, 1, 0, 4, 0, /* layout version 4 */
    9751005    LuDocument_MajorVersion, LuDocument_MinorVersion,
    9761006    0, LuDocument_MaxNoMethods, 1,
     
    9951025    0, /* number of SelectInheritedMethods */
    9961026    0, /* no SelectInheritedMethods */
    997     29, /* number of classdata entries */
     1027    30, /* number of classdata entries */
    9981028    0, /* no list provided currently */
    9991029    0, /* number of migrated methods */
  • trunk/Lucide/SOURCE/plugins/ludoc/lupixbuf.cpp

    r2 r27  
    55 *     SOM incremental update: 2.24
    66 */
     7
    78
    89/*
     
    2021
    2122
    22 SOM_Scope void SOMLINK LuPixbufInit(LuPixbuf *somSelf,  Environment *ev,
    23                                     somInitCtrl* ctrl, long w, long h)
     23
     24/*
     25 * SOM_Scope void SOMLINK LuPixbufInit(LuPixbuf *somSelf,  Environment *ev,
     26 *                                     somInitCtrl* ctrl, long w, long h)
     27 */
     28
     29/*
     30 * The prototype for LuPixbufInit was replaced by the following prototype:
     31 */
     32SOM_Scope void SOMLINK LuPixbufInit(LuPixbuf *somSelf,  Environment *ev,
     33                                    somInitCtrl* ctrl, long w,
     34                                    long h, short bpp)
    2435{
    2536    LuPixbufData *somThis;
     
    3243    somThis->width = w;
    3344    somThis->height = h;
    34     somThis->bpp = 3;
     45    somThis->bpp = bpp;
    3546    somThis->rowsize = ( somThis->width * somThis->bpp );
    36     somThis->rowsize = (somThis->rowsize + 3) &~3;
     47    if ( bpp != 4 ) {
     48            somThis->rowsize = (somThis->rowsize + 3) &~3;
     49        }
    3750    somThis->dlen = somThis->rowsize * somThis->height;
    3851    somThis->data = new char[ somThis->dlen ];
     
    5164    LuPixbufData *somThis = LuPixbufGetData(somSelf);
    5265    return somThis->height;
     66}
     67
     68SOM_Scope short  SOMLINK getBpp(LuPixbuf *somSelf,  Environment *ev)
     69{
     70    LuPixbufData *somThis = LuPixbufGetData(somSelf);
     71    return somThis->bpp;
    5372}
    5473
  • trunk/Lucide/SOURCE/plugins/ludoc/lupixbuf.idl

    r2 r27  
    1414interface LuPixbuf : SOMObject
    1515{
    16     void LuPixbufInit( inout somInitCtrl ctrl, in long w, in long h );
     16    void LuPixbufInit( inout somInitCtrl ctrl, in long w, in long h, in short bpp );
    1717    long getWidth();
    1818    long getHeight();
     19    short getBpp();
    1920    long getRowSize();
    2021    long getDataLen();
     
    2728    implementation
    2829    {
    29         releaseorder: LuPixbufInit, getWidth, getHeight, getRowSize,
     30        releaseorder: LuPixbufInit, getWidth, getHeight, getBpp, getRowSize,
    3031                                      getDataLen, getDataPtr, putAt;
    3132   
  • trunk/Lucide/SOURCE/plugins/ludoc/lupixbuf.xh

    r2 r27  
    5353        somMToken getWidth;
    5454        somMToken getHeight;
     55        somMToken getBpp;
    5556        somMToken getRowSize;
    5657        somMToken getDataLen;
     
    7374                somInitCtrl* ctrl,
    7475                long w,
    75                 long h);
     76                long h,
     77                short bpp);
    7678typedef somTP_LuPixbuf_LuPixbufInit *somTD_LuPixbuf_LuPixbufInit;
    7779typedef long   SOMLINK somTP_LuPixbuf_getWidth(LuPixbuf *somSelf, Environment *ev);
     
    7981typedef long   SOMLINK somTP_LuPixbuf_getHeight(LuPixbuf *somSelf, Environment *ev);
    8082typedef somTP_LuPixbuf_getHeight *somTD_LuPixbuf_getHeight;
     83typedef short   SOMLINK somTP_LuPixbuf_getBpp(LuPixbuf *somSelf, Environment *ev);
     84typedef somTP_LuPixbuf_getBpp *somTD_LuPixbuf_getBpp;
    8185typedef long   SOMLINK somTP_LuPixbuf_getRowSize(LuPixbuf *somSelf, Environment *ev);
    8286typedef somTP_LuPixbuf_getRowSize *somTD_LuPixbuf_getRowSize;
     
    275279#endif
    276280
    277 LuPixbuf(Environment *ev,long w,long h)
    278 {
    279    LuPixbufInit(ev,0,w,h);
     281LuPixbuf(Environment *ev,long w,long h,short bpp)
     282{
     283   LuPixbufInit(ev,0,w,h,bpp);
    280284}
    281285
     
    285289                somInitCtrl* ctrl,
    286290                long w,
    287                 long h)
     291                long h,
     292                short bpp)
    288293{
    289294   SOM_ResolveD(this,LuPixbuf,LuPixbuf,LuPixbufInit)
    290         (this, ev,ctrl,w,h);
     295        (this, ev,ctrl,w,h,bpp);
    291296}
    292297
     
    304309{
    305310   return SOM_ResolveD(this,LuPixbuf,LuPixbuf,getHeight)
     311        (this, ev);
     312}
     313
     314
     315/* method: getBpp */
     316short   getBpp(Environment *ev)
     317{
     318   return SOM_ResolveD(this,LuPixbuf,LuPixbuf,getBpp)
    306319        (this, ev);
    307320}
  • trunk/Lucide/SOURCE/plugins/ludoc/lupixbuf.xih

    r2 r27  
    3232#endif
    3333
    34 #define LuPixbuf_MaxNoMethods 7
     34#define LuPixbuf_MaxNoMethods 8
    3535
    3636/*
     
    120120  #define _getWidth somSelf->getWidth
    121121  #define _getHeight somSelf->getHeight
     122  #define _getBpp somSelf->getBpp
    122123  #define _getRowSize somSelf->getRowSize
    123124  #define _getDataLen somSelf->getDataLen
     
    145146                somInitCtrl* ctrl,
    146147                long w,
    147                 long h);
     148                long h,
     149                short bpp);
    148150#ifndef somMN_LuPixbufInit_defined
    149151#define somMN_LuPixbufInit_defined
     
    156158static somId somDI_LuPixbufInit = &somDS_LuPixbufInit;
    157159#endif  /* somDS_LuPixbufInit_defined */
    158 #define LuPixbufInit_somApRdDefault
     160
     161static somMethodInfo LuPixbufInitMethodInfo = {0, 24, 0};
     162
     163static somApRdInfo LuPixbufInitStubs = {0, 0, &LuPixbufInitMethodInfo};
    159164
    160165/*
     
    189194#endif  /* somDS_getHeight_defined */
    190195#define getHeight_somApRdDefault
     196
     197/*
     198 * New Method: getBpp
     199 */
     200SOM_Scope short  SOMLINK getBpp(LuPixbuf *somSelf, Environment *ev);
     201#ifndef somMN_getBpp_defined
     202#define somMN_getBpp_defined
     203static char *somMN_getBpp = "getBpp";
     204static somId somId_getBpp = &somMN_getBpp;
     205#endif  /* somMN_getBpp_defined */
     206#ifndef somDS_getBpp_defined
     207#define somDS_getBpp_defined
     208static char *somDS_getBpp = "::LuPixbuf::getBpp";
     209static somId somDI_getBpp = &somDS_getBpp;
     210#endif  /* somDS_getBpp_defined */
     211
     212static somMethodInfo getBppMethodInfo = {12, 8, 0};
     213
     214static somApRdInfo getBppStubs = {0, 0, &getBppMethodInfo};
    191215
    192216/*
     
    310334         (somMethodProc *) ((void*) &getHeightStubs) },
    311335#endif
     336    {    &LuPixbufClassData.getBpp,
     337         &somId_getBpp,
     338         &somDI_getBpp,
     339         (somMethodProc *) getBpp,
     340         (somMethodProc *)((void*)-1),
     341#ifdef getBpp_somApRdDefault
     342         0},
     343#else
     344         (somMethodProc *) ((void*) &getBppStubs) },
     345#endif
    312346    {    &LuPixbufClassData.getRowSize,
    313347         &somId_getRowSize,
     
    377411
    378412static somStaticClassInfo LuPixbufSCI = {
    379     4, 7, 1, 0, 0, 0, /* layout version 4 */
     413    4, 8, 1, 0, 0, 0, /* layout version 4 */
    380414    LuPixbuf_MajorVersion, LuPixbuf_MinorVersion,
    381415    sizeof(LuPixbufData), LuPixbuf_MaxNoMethods, 1,
     
    400434    0, /* number of SelectInheritedMethods */
    401435    0, /* no SelectInheritedMethods */
    402     7, /* number of classdata entries */
     436    8, /* number of classdata entries */
    403437    0, /* no list provided currently */
    404438    0, /* number of migrated methods */
Note: See TracChangeset for help on using the changeset viewer.