Changeset 2221 for trunk/src/gdi32/text.cpp
- Timestamp:
- Dec 27, 1999, 11:54:49 PM (26 years ago)
- 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:33cbratschi Exp $ */1 /* $Id: text.cpp,v 1.6 1999-12-27 22:52:39 cbratschi Exp $ */ 2 2 3 3 /* … … 99 99 LONG lTabs,xLeft,yTop; 100 100 101 if ( !lpchText || cchText == 0 || cchText < -1 || !lprc == NULL)101 if ((!lpchText) || (cchText == 0) || (cchText < -1) || (!lprc == NULL)) 102 102 { 103 103 SetLastError(ERROR_INVALID_PARAMETER); … … 138 138 bTopBottomIsOkay = TRUE; 139 139 140 if ( lprc->left >= lprc->right|| !bTopBottomIsOkay)140 if ((lprc->left >= lprc->right) || !bTopBottomIsOkay) 141 141 { 142 142 TEXTMETRICA txtMetrics; … … 260 260 BOOL done = FALSE; 261 261 262 if ( dwDTFormat & DT_END_ELLIPSIS && cchText > 1)262 if ((dwDTFormat & DT_END_ELLIPSIS) && (cchText > 1)) 263 263 { 264 264 int textWidth,width; … … 269 269 width = rectPtr->right-rectPtr->left; 270 270 textWidth = rect.right-rect.left; 271 if ( textWidth > width && width > 0)271 if ((textWidth > width) && (width > 0)) 272 272 { 273 273 char* newText; … … 292 292 done = TRUE; 293 293 } 294 } else if ( dwDTFormat & DT_PATH_ELLIPSIS && cchText > 1)294 } else if ((dwDTFormat & DT_PATH_ELLIPSIS) && (cchText > 1)) 295 295 { 296 296 int textWidth,width; … … 303 303 width = rectPtr->right-rectPtr->left; 304 304 textWidth = rect.right-rect.left; 305 if ( textWidth > width && width > 0)305 if ((textWidth > width) && (width > 0)) 306 306 { 307 307 char *newText,*slashPos; … … 346 346 OSLibWinDrawTabbedText(pHps,newTextLen,lTabs,newText,&rect,0,0,flCmd | DTOS_QUERYEXTENT); 347 347 textWidth = rect.right-rect.left; 348 if ( textWidth <= width || endLen == 0) break;348 if ((textWidth <= width) || (endLen == 0)) break; 349 349 } while (TRUE); 350 350 } … … 363 363 OSLibWinDrawTabbedText(pHps,newTextLen,lTabs,newText,&rect,0,0,flCmd | DTOS_QUERYEXTENT); 364 364 textWidth = rect.right-rect.left; 365 if ( textWidth <= width || preLen+endLen == 0) break;365 if ((textWidth <= width) || (preLen+endLen == 0)) break; 366 366 if (endLen > preLen) 367 367 { … … 433 433 POINTLOS2 widthHeight = {0,0}; 434 434 435 if (!pHps || nCount == 0 || nTabPositions < 0)435 if (!pHps || (nCount == 0) || (nTabPositions < 0)) 436 436 return 0; 437 437 … … 441 441 return 0; 442 442 } 443 if ( lpString == NULL || nCount > 512 || (nTabPositions > 0 && lpnTabStopPositions == NULL))443 if ((lpString == NULL) || (nCount > 512) || ((nTabPositions > 0) && (lpnTabStopPositions == NULL))) 444 444 { 445 445 SetLastError(ERROR_INVALID_PARAMETER); … … 488 488 DWORD dimensions; 489 489 490 if ( pHps == NULL || lpString == NULL)490 if ((pHps == NULL) || (lpString == NULL)) 491 491 { 492 492 SetLastError(ERROR_INVALID_HANDLE); … … 563 563 LONG hits; 564 564 565 if (!pHps || cbCount < 0 || (lpszString == NULL && cbCount != 0))565 if (!pHps || (cbCount < 0) || ((lpszString == NULL) && (cbCount != 0))) 566 566 { 567 567 SetLastError(ERROR_INVALID_HANDLE); … … 637 637 } 638 638 639 if (lprc && ( align & 0x18) == TA_BASELINE)639 if (lprc && ((align & 0x18) == TA_BASELINE)) 640 640 { 641 641 //CB: if TA_BASELINE is set, GPI doesn't fill rect … … 649 649 hits = OSLibGpiCharStringPosAt(pHps,&ptl,&pmRect,flOptions,cbCount,lpszString,lpDx); 650 650 651 if (lprc && ( align & 0x18) == TA_BASELINE)651 if (lprc && ((align & 0x18) == TA_BASELINE)) 652 652 OSLibGpiSetTextAlignment(pHps,pmHAlign,pmVAlign); 653 653
Note:
See TracChangeset
for help on using the changeset viewer.