

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
8 messages in org.openoffice.fr.progRe: [prog] [Erreur] dans Delphi_OOo_v...| From | Sent On | Attachments |
|---|---|---|
| Agrillo Mario | May 26, 2006 12:10 pm | |
| Bernard Marcelly | May 27, 2006 2:09 am | |
| Agrillo Mario | May 27, 2006 12:53 pm | |
| pac | May 27, 2006 2:23 pm | |
| Bernard Marcelly | May 28, 2006 12:27 am | |
| Agrillo Mario | May 28, 2006 11:48 am | |
| Bernard Marcelly | May 29, 2006 5:50 am | |
| Agrillo Mario | May 29, 2006 11:50 am | .jpg, .jpg, .jpg |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [prog] [Erreur] dans Delphi_OOo_v10fr | Actions... |
|---|---|---|
| From: | Agrillo Mario (mari...@hotmail.com) | |
| Date: | May 27, 2006 12:53:22 pm | |
| List: | org.openoffice.fr.prog | |
Bonsoir Bernard en cherchant à me documenter sur VarTypeAsText , j'ai découvert ce site http://www.scitools.com/udelphi_example_reports/32697.html#11 ou j'ai pu copier cette fonction que j'ai utilisée mais j'ai toujours une erreur " Indice de tableau de variants hors limite "
Mario
function VarTypeAsText(const AType: TVarType): string; const CText: array [varEmpty..varInt64] of string = ('Empty', 'Null', 'Smallint', //Do not localize 'Integer', 'Single', 'Double', 'Currency', 'Date', 'OleStr', 'Dispatch', //Do not localize 'Error', 'Boolean', 'Variant', 'Unknown', 'Decimal', '$0F', 'ShortInt', //Do not localize 'Byte', 'Word', 'LongWord', 'Int64'); //Do not localize var LHandler: TCustomVariantType; begin if AType and varTypeMask <= varInt64 then Result := CText[AType and varTypeMask] else if AType = varString then Result := 'String' //Do not localize else if AType = varAny then Result := 'Any' //Do not localize else if FindCustomVariantType(AType, LHandler) then Result := Copy(LHandler.ClassName, 2, High(Integer)) else Result := HexDisplayPrefix + IntToHex(AType and varTypeMask, 4);
if AType and varArray <> 0 then Result := 'Array ' + Result; //Do not localize if AType and varByRef <> 0 then Result := 'ByRef ' + Result; //Do not localize end;
Bernard Marcelly a écrit :
Bonjour Agrillo Mario Message du 2006-05-26 21:11:
Bonjour j'ai utilisé Delphi_OOo_v10fr pour ouvrir un document OO avec Delphi 6 et voilà les messages d'erreurs qui se sont affichés à la compilation de EssaiOpen dans " unit OOoXray3 "
[Erreur] OOoXray3.pas(103): Identificateur non déclaré : 'VarTypeAsText' [Erreur fatale] EssaiOpen.dpr(10): Impossible de compiler l'unité utilisée 'OOoXray3.pas'
Dans Delphi 7, VarTypeAsText() est une fonction de l'unité Variants, qui est listée dans la clause uses de l'interface. Voici la description de l'aide:
Unité Variants
Catégorie routines de gestion des variants
Syntaxe Delphi : function VarTypeAsText(const AType: TVarType): string;
Description VarTypeAsText renvoie une chaîne de type short qui nomme le type variant indiqué par AType.
Tu peux faire une fonction équivalente, qui renvoie un string correspondant au type variant reçu. Regarde l'aide de VarType qui liste tous les types. Par exemple pour le type variant = varSmallInt il faut renvoyer la chaîne 'smallInt'. Un simple Case fera l'affaire.
Bonne journée Bernard








.jpg, .jpg, .jpg