Ignore:
Timestamp:
Dec 27, 1999, 11:54:49 PM (26 years ago)
Author:
cbratschi
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/text.cpp

    r2092 r2221  
    1 /* $Id: text.cpp,v 1.5 1999-12-16 16:52:33 cbratschi Exp $ */
     1/* $Id: text.cpp,v 1.6 1999-12-27 22:52:39 cbratschi Exp $ */
    22
    33/*
     
    9999  LONG lTabs,xLeft,yTop;
    100100
    101   if (!lpchText || cchText == 0 || cchText < -1 || !lprc == NULL)
     101  if ((!lpchText) || (cchText == 0) || (cchText < -1) || (!lprc == NULL))
    102102  {
    103103    SetLastError(ERROR_INVALID_PARAMETER);
     
    138138      bTopBottomIsOkay = TRUE;
    139139
    140     if (lprc->left >= lprc->right || !bTopBottomIsOkay)
     140    if ((lprc->left >= lprc->right) || !bTopBottomIsOkay)
    141141    {
    142142      TEXTMETRICA txtMetrics;
     
    260260  BOOL done = FALSE;
    261261
    262   if (dwDTFormat & DT_END_ELLIPSIS && cchText > 1)
     262  if ((dwDTFormat & DT_END_ELLIPSIS) && (cchText > 1))
    263263  {
    264264    int textWidth,width;
     
    269269    width = rectPtr->right-rectPtr->left;
    270270    textWidth = rect.right-rect.left;
    271     if (textWidth > width && width > 0)
     271    if ((textWidth > width) && (width > 0))
    272272    {
    273273      char* newText;
     
    292292      done = TRUE;
    293293    }
    294   } else if (dwDTFormat & DT_PATH_ELLIPSIS && cchText > 1)
     294  } else if ((dwDTFormat & DT_PATH_ELLIPSIS) && (cchText > 1))
    295295  {
    296296    int textWidth,width;
     
    303303    width = rectPtr->right-rectPtr->left;
    304304    textWidth = rect.right-rect.left;
    305     if (textWidth > width && width > 0)
     305    if ((textWidth > width) && (width > 0))
    306306    {
    307307      char *newText,*slashPos;
     
    346346            OSLibWinDrawTabbedText(pHps,newTextLen,lTabs,newText,&rect,0,0,flCmd | DTOS_QUERYEXTENT);
    347347            textWidth = rect.right-rect.left;
    348             if (textWidth <= width || endLen == 0) break;
     348            if ((textWidth <= width) || (endLen == 0)) break;
    349349          } while (TRUE);
    350350        }
     
    363363          OSLibWinDrawTabbedText(pHps,newTextLen,lTabs,newText,&rect,0,0,flCmd | DTOS_QUERYEXTENT);
    364364          textWidth = rect.right-rect.left;
    365           if (textWidth <= width || preLen+endLen == 0) break;
     365          if ((textWidth <= width) || (preLen+endLen == 0)) break;
    366366          if (endLen > preLen)
    367367          {
     
    433433  POINTLOS2 widthHeight = {0,0};
    434434
    435   if (!pHps || nCount == 0 || nTabPositions < 0)
     435  if (!pHps || (nCount == 0) || (nTabPositions < 0))
    436436    return 0;
    437437
     
    441441    return 0;
    442442  }
    443   if (lpString == NULL || nCount >  512 || (nTabPositions > 0 && lpnTabStopPositions == NULL))
     443  if ((lpString == NULL) || (nCount >  512) || ((nTabPositions > 0) && (lpnTabStopPositions == NULL)))
    444444  {
    445445    SetLastError(ERROR_INVALID_PARAMETER);
     
    488488  DWORD dimensions;
    489489
    490   if (pHps == NULL || lpString == NULL)
     490  if ((pHps == NULL) || (lpString == NULL))
    491491  {
    492492    SetLastError(ERROR_INVALID_HANDLE);
     
    563563  LONG hits;
    564564
    565   if (!pHps || cbCount < 0 || (lpszString == NULL && cbCount != 0))
     565  if (!pHps || (cbCount < 0) || ((lpszString == NULL) && (cbCount != 0)))
    566566  {
    567567    SetLastError(ERROR_INVALID_HANDLE);
     
    637637  }
    638638
    639   if (lprc && (align & 0x18) == TA_BASELINE)
     639  if (lprc && ((align & 0x18) == TA_BASELINE))
    640640  {
    641641    //CB: if TA_BASELINE is set, GPI doesn't fill rect
     
    649649  hits = OSLibGpiCharStringPosAt(pHps,&ptl,&pmRect,flOptions,cbCount,lpszString,lpDx);
    650650
    651   if (lprc && (align & 0x18) == TA_BASELINE)
     651  if (lprc && ((align & 0x18) == TA_BASELINE))
    652652    OSLibGpiSetTextAlignment(pHps,pmHAlign,pmVAlign);
    653653
Note: See TracChangeset for help on using the changeset viewer.