sonopydnaef
![](http://forum.ru-board.com/board/avatars/meltingpot.gif)
Newbie | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору DevExpress 2014.vol.2.10 cxDrawTextUtils.pas fix "Out of memory" ... function cxMakeTextRows(AHandle: TCanvasHandle; AText: PWideChar; ATextLength: Integer; ... ANextLine := GetLineBreak(AHandle, P, ATextLength, W, ATextRowFormat, ATextRow, ACalcTextExtentsProc, AUserData); {<FIX>} if ANextLine <= P then ANextLine := P + SizeOf(WideChar); //Break; {</FIX>} Dec(ATextLength, ANextLine - P); P := ANextLine; cxCustomData.pas // fix "RowIndex вышел за границы диапазона" ... function TcxCustomDataControllerInfo.GetFocusedRecordIndex: Integer; {<FIX>} function _AlowRowIndex(ARowIndex: Integer): Boolean; { from "TcxCustomDataControllerInfo.CheckRowIndex" } begin Result := ((0 <= ARowIndex) and (ARowIndex < GetRowCount)); end; {</FIX>} begin if (FFocusingInfo.RowIndex <> -1) {<FIX>} and _AlowRowIndex(FFocusingInfo.RowIndex){</FIX>} then Result := GetRowInfo(FFocusingInfo.RowIndex).RecordIndex else Result := -1; end; cxSplitter.pas // fix AV ... procedure TcxCustomSplitter.SetControl(Value: TControl); function CanAssign: Boolean; var I: Integer; begin Result := not ((Value is TcxCustomSplitter) or (Value is TSplitter)); {<FIX>} if Result and (Parent = nil) then Exit; {</FIX>} if Result then ... dxmdaset.pas // fix sorting ... function TdxCustomMemData.InternalCompareValues(const ABuffer1, ABuffer2: Pointer; AMemField: TdxMemField; AIsCaseInsensitive: Boolean; ACount: Integer = -1): Integer; function CompareStrings: Integer; const AIgnoreCaseFlag: array [Boolean] of Cardinal = ({<FIX>}SORT_STRINGSORT{0}, NORM_IGNORECASE or SORT_STRINGSORT</FIX>); var AFlags: Cardinal; .. Добавлено: cxCalendar.pas // fix UseDelphiDateTimeFormats ... procedure TcxCustomDateEdit.PrepareEditValue( const ADisplayValue: TcxEditValue; out EditValue: TcxEditValue; AEditFocused: Boolean); var ATempValue: TDateTime; begin try ActiveProperties.InternalPrepareEditValue(ADisplayValue, EditValue); finally if not VarIsNull(EditValue) then begin if not VarIsNullDate(EditValue) and (ActiveProperties.Kind = ckDate) and ActiveProperties.SaveTime then begin ATempValue := Int(EditValue) + cxSign(EditValue) * FSavedTime; {<FIX>} if cxFormatController.UseDelphiDateTimeFormats and (VarType(EditValue) = varDate) then EditValue := VarAsType(ATempValue, varDate) else {</FIX>} EditValue := ATempValue; // restore varDate type end; ... cxContainer.pas // fix SetFocus ... procedure TcxCustomPopupWindow.Popup(AFocusedControl: TWinControl); ... procedure ShowPopupWindow; ... if FFocusedControl = nil then SetFocus else {<FIX>} if FFocusedControl.CanFocus then {</FIX>} FFocusedControl.SetFocus; SetWindowPos(Handle, GetPopupWindowShowingFlags, 0, 0, 0, 0, SWP_NOACTIVATE or SWP_NOMOVE or SWP_NOSIZE or SWP_SHOWWINDOW); ... cxCurrencyEdit.pas // fix IsDisplayValueValid function TcxCustomCurrencyEditProperties.IsDisplayValueValid( var DisplayValue: TcxEditValue; AEditFocused: Boolean): Boolean; var C, AIsOnGetTextAssigned: Boolean; D: Double; S: string; begin Result := not AEditFocused or (InternalGetEditFormat(C, AIsOnGetTextAssigned) <> '') or AIsOnGetTextAssigned; if not Result then begin S := Trim(VarToStr(DisplayValue)); Result := {<FIX>}(Nullable and (S='')) or{</FIX>} StrToFloatEx(S, D); if Result then DisplayValue := S; end; end; procedure TcxCustomCurrencyEditProperties.ValidateDisplayValue( var ADisplayValue: TcxEditValue; var AErrorText: TCaption; var AError: Boolean; AEdit: TcxCustomEdit); var AValue: Double; begin {<FIX>} if Nullable and (TrimLeft(VarToStr(ADisplayValue)) = '') then AError := False else {</FIX>} AError := not StrToFloatEx(VarToStr(ADisplayValue), AValue); inherited ValidateDisplayValue(ADisplayValue, AErrorText, AError, AEdit); end; cxDB.pas // fix SetFieldValue procedure SetFieldValue(AField: TField; const AValue: Variant); begin {<FIX>} case VarType(AValue) of varEmpty, varNull: AField.Clear; varDouble: if (AField is TDateTimeField) then TDateTimeField(AField).Value := AValue // bug in Delphi else AField.Value := AValue; else AField.Value := AValue; end; {</FIX>} end; ... cxGridCustomView.pas // fix AV DrawText ... procedure TcxCustomGridCellPainter.DrawText; var R: TRect; begin with Canvas, ViewInfo do if TextForPainting <> '' then begin R := TextAreaBounds; // can call font change {<FIX>}if Params.Font <> nil then{</FIX>} Font := Params.Font; ... function TcxCustomGridCellViewInfo.CalculateTextWidth(AAngle: Integer = 0): Integer; var R: TRect; begin CalculateParams; R := Rect(0, 0, cxMaxRectSize, cxMaxRectSize); {<FIX>}if Params.Font <> nil then{</FIX>} Canvas.Font := Params.Font; ... function TcxCustomGridCellViewInfo.CalculateTextHeight(AForPainting: Boolean; AAngle: Integer = 0): Integer; var R: TRect; begin CalculateParams; R := TextAreaBounds; {<FIX>}if Params.Font <> nil then{</FIX>} Canvas.Font := Params.Font; Добавлено: ps: VadimLou но проблему с группировкой это не решает | Всего записей: 13 | Зарегистр. 26-11-2014 | Отправлено: 14:58 08-12-2015 | Исправлено: sonopydnaef, 15:19 08-12-2015 |
|