Changeset 94 for trunk


Ignore:
Timestamp:
Aug 7, 2006, 4:34:19 PM (15 years ago)
Author:
Eugene Romanenko
Message:

font substitution fixes, fixed missed 'Page' in NLS-file

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/BIN/Lucide.lng

    r91 r94  
    6969MSGS_OVERWRITE_FILE=File already exist. Overwrite?
    7070MSGS_FILE_SAVE_ERROR=Error saving file!
     71MSGS_PAGE=Page
    7172
    7273#
  • trunk/Lucide/SOURCE/gui/indexWindow.cpp

    r91 r94  
    4343#include "luutils.h"
    4444#include "tb_spl.h"
     45#include "messages.h"
    4546
    4647
     
    167168void IndexWindow::loadPagesList()
    168169{
     170    char *msgpage = newstrdupL( MSGS_PAGE );
    169171    CNRINFO ci;
    170172    ci.cb = sizeof( CNRINFO );
     
    174176    WinSendMsg( hWndIndex, CM_SETCNRINFO, MPFROMP( &ci ), MPFROMLONG( CMA_FLWINDOWATTR ) );
    175177
    176     char pgbuf[ 20 ];
     178    char pgbuf[ 64 ];
    177179    for ( int i = 0; i < totalpages; i++ )
    178180    {
    179         snprintf( pgbuf, sizeof(pgbuf), "Page %d", i + 1 );
     181        snprintf( pgbuf, sizeof(pgbuf), "%s %d", msgpage, i + 1 );
    180182        RECORDINSERT ri;
    181183        TreeRecord *pr = (TreeRecord *)WinSendMsg( hWndIndex, CM_ALLOCRECORD,
     
    198200        WinSendMsg( hWndIndex, CM_INSERTRECORD, MPFROMP( pr ), MPFROMP( &ri ) );
    199201    }
     202    delete msgpage;
    200203}
    201204
     
    225228        return true;
    226229    }
    227        
     230
    228231    SHORT atr = ( parent == NULL ) ? CMA_FIRST : CMA_FIRSTCHILD;
    229232    TreeRecord *pr = (TreeRecord *)WinSendMsg( hWndIndex, CM_QUERYRECORD,
  • trunk/Lucide/SOURCE/gui/messages.cpp

    r91 r94  
    6161const char *MSGS_OVERWRITE_FILE   = "MSGS_OVERWRITE_FILE";
    6262const char *MSGS_FILE_SAVE_ERROR  = "MSGS_FILE_SAVE_ERROR";
     63const char *MSGS_PAGE             = "MSGS_PAGE";
    6364
    6465// Settings dialog
  • trunk/Lucide/SOURCE/gui/messages.h

    r91 r94  
    6161extern const char *MSGS_OVERWRITE_FILE;
    6262extern const char *MSGS_FILE_SAVE_ERROR;
     63extern const char *MSGS_PAGE;
    6364
    6465// Settings dialog
  • trunk/Lucide/SOURCE/plugins/lujpeg/lujpeg.cpp

    r35 r94  
     1
     2/*
     3 *  This file was generated by the SOM Compiler.
     4 *  Generated using:
     5 *     SOM incremental update: 2.24
     6 */
     7
     8
    19/* ***** BEGIN LICENSE BLOCK *****
    210 * Version: CDDL 1.0/LGPL 2.1
     
    3543
    3644/*
    37  *  This file was generated by the SOM Compiler.
    38  *  Generated using:
    39  *     SOM incremental update: 2.24
    40  */
    41 
    42 /*
    4345 *  This file was generated by the SOM Compiler and Emitter Framework.
    4446 *  Generated using template emitter:
     
    5860#include <string.h>
    5961#include <jpeglib.h>
     62
    6063
    6164
     
    154157}
    155158
     159
    156160SOM_Scope short  SOMLINK getBpp(LuJpegDocument *somSelf,  Environment *ev)
    157161{
    158162    return 3;
    159163}
     164
    160165
    161166SOM_Scope long  SOMLINK getPageCount(LuJpegDocument *somSelf,
     
    164169    return 1;
    165170}
     171
    166172
    167173SOM_Scope void  SOMLINK getPageSize(LuJpegDocument *somSelf,
     
    179185    }
    180186}
     187
    181188
    182189SOM_Scope void  SOMLINK renderPageToPixbuf(LuJpegDocument *somSelf,
     
    207214        memcpy( dst, src, src_width * bpp );
    208215    }
    209     //long len = __min( pixbuf->getDataLen(ev), d->pb->getDataLen(ev) );
    210     //memcpy( pixbuf->getDataPtr(ev), d->pb->getDataPtr(ev), len );
    211 }
     216}
     217
    212218
    213219SOM_Scope void SOMLINK somDefaultInit(LuJpegDocument *somSelf,
     
    238244    JpegDocument *d = (JpegDocument *)somThis->data;
    239245    if ( d->pb != NULL ) {
    240             delete d->pb;
    241         }
     246        delete d->pb;
     247    }
    242248    delete d;
    243249    // end of local LuJpegDocument deinitialization code
  • trunk/Lucide/SOURCE/plugins/lujpeg/lujpeg.idl

    r27 r94  
    2121    implementation
    2222    {
    23 
    2423            void *data;
    2524       
  • trunk/Lucide/SOURCE/plugins/lujpeg/lujpeg.xh

    r61 r94  
    4848
    4949/* The API to the LuJpegDocument class object, and the methods it introduces. */
    50 SOMEXTERN struct LuJpegDocumentClassDataStructure {
     50SOMEXTERNS struct LuJpegDocumentClassDataStructure {
    5151        SOMClass *classObject;
    5252} SOMDLINK LuJpegDocumentClassData;
     
    5454
    5555/* The API to parentMtabs for LuJpegDocument, and the instance data it introduces. */
    56 SOMEXTERN struct LuJpegDocumentCClassDataStructure {
     56SOMEXTERNS struct LuJpegDocumentCClassDataStructure {
    5757        somMethodTabs parentMtab;
    5858        somDToken              instanceDataToken;
     
    151151typedef boolean   SOMLINK somTP_LuJpegDocument_isPostScriptExportable(LuJpegDocument *somSelf, Environment *ev);
    152152typedef somTP_LuJpegDocument_isPostScriptExportable *somTD_LuJpegDocument_isPostScriptExportable;
    153 typedef void   SOMLINK somTP_LuJpegDocument_exportToPostScript(LuJpegDocument *somSelf, Environment *ev,
     153typedef boolean   SOMLINK somTP_LuJpegDocument_exportToPostScript(LuJpegDocument *somSelf, Environment *ev,
    154154                string filename,
    155155                long first_page,
     
    157157                double width,
    158158                double height,
    159                 boolean duplex);
     159                boolean duplex,
     160                boolean* brkExport);
    160161typedef somTP_LuJpegDocument_exportToPostScript *somTD_LuJpegDocument_exportToPostScript;
    161162typedef boolean   SOMLINK somTP_LuJpegDocument_isHaveFontInfo(LuJpegDocument *somSelf, Environment *ev);
     
    587588
    588589/* method: exportToPostScript */
    589 void   exportToPostScript(Environment *ev,
     590boolean   exportToPostScript(Environment *ev,
    590591                string filename,
    591592                long first_page,
     
    593594                double width,
    594595                double height,
    595                 boolean duplex)
    596 {
    597    SOM_ResolveD(this,LuJpegDocument,LuDocument,exportToPostScript)
    598         (this, ev,filename,first_page,last_page,width,height,duplex);
     596                boolean duplex,
     597                boolean* brkExport)
     598{
     599   return SOM_ResolveD(this,LuJpegDocument,LuDocument,exportToPostScript)
     600        (this, ev,filename,first_page,last_page,width,height,duplex,brkExport);
    599601}
    600602
  • trunk/Lucide/SOURCE/plugins/lupoppler/lupoppler.xh

    r92 r94  
    4848
    4949/* The API to the LuPopplerDocument class object, and the methods it introduces. */
    50 SOMEXTERN struct LuPopplerDocumentClassDataStructure {
     50SOMEXTERNS struct LuPopplerDocumentClassDataStructure {
    5151        SOMClass *classObject;
    5252} SOMDLINK LuPopplerDocumentClassData;
     
    5454
    5555/* The API to parentMtabs for LuPopplerDocument, and the instance data it introduces. */
    56 SOMEXTERN struct LuPopplerDocumentCClassDataStructure {
     56SOMEXTERNS struct LuPopplerDocumentCClassDataStructure {
    5757        somMethodTabs parentMtab;
    5858        somDToken              instanceDataToken;
     
    6262 * -- Typedefs for LuPopplerDocument Method Procedures
    6363 */
    64 SOMEXTERNF {
     64SOMEXTERN {
    6565
    6666/*
  • trunk/poppler/fc-emulate-os2/fontconfig/fontconfig.cpp

    r71 r94  
    424424#define DEFAULT_MONOSPACED_FONT     "courier"
    425425
     426static bool isSansserif( const char *family )
     427{
     428    return ( ( strstr( family, "swiss" ) != NULL ) ||
     429             ( strstr( family, "sans" ) != NULL ) ||
     430             ( strcmp( family, "arial" ) == 0 ) ||
     431             ( strcmp( family, "tahoma" ) == 0 ) ||
     432             ( strcmp( family, "verdana" ) == 0 ) );
     433}
     434
    426435static string buildFontKey( FcPattern *p, bool useDefaultFonts )
    427436{
     
    435444        else
    436445        {
    437             if ( ( strstr( p->family, "swiss" ) != NULL ) ||
    438                  ( strstr( p->family, "sans" ) != NULL ) )
    439             {
     446            if ( isSansserif( p->family ) ) {
    440447                key = DEFAULT_SANSSERIF_FONT;
    441448            }
     
    443450                key = DEFAULT_SERIF_FONT;
    444451            }
     452        }
     453    }
     454    else
     455    {
     456        // use 'Symbol Set' (SYMB.PFB) instead of 'Symbol'
     457        if ( strcmp( p->family, "symbol" ) == 0 ) {
     458            key = "symbol set";
    445459        }
    446460    }
     
    481495    }
    482496
    483     //printf( "MATCHED STYLE: %s, FILENAME: %s\n", key.c_str(), pat->filename );
     497//printf( "MATCHED STYLE: %s, FILENAME: %s\n", key.c_str(), pat->filename );
    484498
    485499    FcFontSet *fs = new FcFontSet;
     
    526540                    const char *fcLang, FcType tLang, const char *lang, void * )
    527541{
    528     //printf( "FAMILY: %s, SLANT: %d, WEIGHT: %d, WIDTH: %d, SPACING: %d, LANG: %s\n",
    529     //        family, slant, weight, width, spacing, lang );
     542//printf( "FAMILY: %s, SLANT: %d, WEIGHT: %d, WIDTH: %d, SPACING: %d, LANG: %s\n",
     543//            family, slant, weight, width, spacing, lang );
    530544
    531545    FcPattern *p = new FcPattern;
Note: See TracChangeset for help on using the changeset viewer.