diff options
Diffstat (limited to 'sw/inc/fldbas.hxx')
-rw-r--r-- | sw/inc/fldbas.hxx | 218 |
1 files changed, 109 insertions, 109 deletions
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx index c3b8c1be4614..9bc2fb1b67b3 100644 --- a/sw/inc/fldbas.hxx +++ b/sw/inc/fldbas.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -28,7 +28,7 @@ #ifndef _FLDBAS_HXX #define _FLDBAS_HXX -#ifndef FIELDIDS_ONLY // SWG-Testreader!! +#ifndef FIELDIDS_ONLY // SWG-Testreader!! #include <i18npool/lang.h> #include <tools/debug.hxx> @@ -41,10 +41,10 @@ class SwDoc; class SvStringsDtor; class SvNumberFormatter; -#endif // FIELDIDS_ONLY +#endif // FIELDIDS_ONLY /*-------------------------------------------------------------------- - Beschreibung: die ID's fuer die Feldtypen + Beschreibung: die ID's fuer die Feldtypen --------------------------------------------------------------------*/ enum RES_FIELDS @@ -88,7 +88,7 @@ enum RES_FIELDS RES_JUMPEDITFLD, RES_SCRIPTFLD, RES_DATETIMEFLD, - RES_AUTHORITY, //Table of authorities + RES_AUTHORITY, //Table of authorities RES_COMBINED_CHARS, RES_DROPDOWN, RES_FIELDS_END @@ -101,7 +101,7 @@ enum RES_FIELDS enum SwFldTypesEnum { TYP_BEGIN, - TYP_DATEFLD = TYP_BEGIN, // 0 + TYP_DATEFLD = TYP_BEGIN, // 0 TYP_TIMEFLD, TYP_FILENAMEFLD, TYP_DBNAMEFLD, @@ -111,7 +111,7 @@ enum SwFldTypesEnum TYP_AUTHORFLD, TYP_SETFLD, TYP_GETFLD, - TYP_FORMELFLD, // 10 + TYP_FORMELFLD, // 10 TYP_HIDDENTXTFLD, TYP_SETREFFLD, TYP_GETREFFLD, @@ -121,7 +121,7 @@ enum SwFldTypesEnum TYP_HIDDENPARAFLD, TYP_DOCINFOFLD, TYP_DBFLD, - TYP_USERFLD, // 20 + TYP_USERFLD, // 20 TYP_POSTITFLD, TYP_TEMPLNAMEFLD, TYP_SEQFLD, @@ -131,7 +131,7 @@ enum SwFldTypesEnum TYP_CONDTXTFLD, TYP_NEXTPAGEFLD, TYP_PREVPAGEFLD, - TYP_EXTUSERFLD, // 30 + TYP_EXTUSERFLD, // 30 TYP_FIXDATEFLD, TYP_FIXTIMEFLD, TYP_SETINPFLD, @@ -140,7 +140,7 @@ enum SwFldTypesEnum TYP_GETREFPAGEFLD, TYP_INTERNETFLD, TYP_JUMPEDITFLD, - TYP_SCRIPTFLD, // 40 + TYP_SCRIPTFLD, // 40 TYP_AUTHORITY, TYP_COMBINED_CHARS, TYP_DROPDOWN, @@ -163,62 +163,62 @@ enum SwFileNameFormat enum SwVarFormat { - VVF_CMD = 0x0010, // Kommando anzeigen + VVF_CMD = 0x0010, // Kommando anzeigen VVF_INVISIBLE = 0x0040, // unsichtbar - VVF_XXP = 0x0400, // 1234% - VVF_XX_XXP = 0x0800, // 1.234,56% - VVF_CLEAR = 0x000f, + VVF_XXP = 0x0400, // 1234% + VVF_XX_XXP = 0x0800, // 1.234,56% + VVF_CLEAR = 0x000f, // ab hier neue Formate - VVF_SYS = 0x2000, //Zahlenformat aus der Systemeinstellung - VVF_X = 0x2100, // 1234 + VVF_SYS = 0x2000, //Zahlenformat aus der Systemeinstellung + VVF_X = 0x2100, // 1234 VVF_X_X = 0x2200, // 1234,5 - VVF_X_XX = 0x2300, // 1245,56 - VVF_XX_X = 0x2400, // 1.234,5 - VVF_XX_XX = 0x2500, // 1.234,56 - VVF_XX_XXX = 0x2600, // 1.234,567 - VVF_SYS_CUR = 0x2700, // W???hrungsformat aus der Systemeinstellung - VVF_CUR_X = 0x2800, // DM 1234 - VVF_CUR_XX_XX = 0x2900, // DM 1234,56 DM 1234,00 - VVF_CUR_XX_X0 = 0x2a00, // DM 1234,56 DM 1234,-- - VVF_X_CUR = 0x2b00, // 1234 DM - VVF_XX_XX_CUR = 0x2c00, // 1234,56 DM 1234,00 DM - VVF_XX_X0_CUR = 0x2d00, // 1234,56 DM 1234,-- DM + VVF_X_XX = 0x2300, // 1245,56 + VVF_XX_X = 0x2400, // 1.234,5 + VVF_XX_XX = 0x2500, // 1.234,56 + VVF_XX_XXX = 0x2600, // 1.234,567 + VVF_SYS_CUR = 0x2700, // W???hrungsformat aus der Systemeinstellung + VVF_CUR_X = 0x2800, // DM 1234 + VVF_CUR_XX_XX = 0x2900, // DM 1234,56 DM 1234,00 + VVF_CUR_XX_X0 = 0x2a00, // DM 1234,56 DM 1234,-- + VVF_X_CUR = 0x2b00, // 1234 DM + VVF_XX_XX_CUR = 0x2c00, // 1234,56 DM 1234,00 DM + VVF_XX_X0_CUR = 0x2d00, // 1234,56 DM 1234,-- DM // Kompatibilitaet: - VF_CMD = VVF_CMD, + VF_CMD = VVF_CMD, VF_INVISIBLE = VVF_INVISIBLE, - VF_XXP = VVF_XXP, - VF_XX_XXP = VVF_XX_XXP, - VF_VISIBLE = VVF_SYS, - VF_XX = VVF_X, - VF_XX_XX = VVF_XX_XX, - VF_XX_XX_CUR = VVF_SYS_CUR, - VF_CLEAR = VVF_CLEAR + VF_XXP = VVF_XXP, + VF_XX_XXP = VVF_XX_XXP, + VF_VISIBLE = VVF_SYS, + VF_XX = VVF_X, + VF_XX_XX = VVF_XX_XX, + VF_XX_XX_CUR = VVF_SYS_CUR, + VF_CLEAR = VVF_CLEAR }; typedef USHORT SwGetSetExpType; namespace nsSwGetSetExpType { - const SwGetSetExpType GSE_STRING = 0x0001; // String - const SwGetSetExpType GSE_EXPR = 0x0002; // Expression - const SwGetSetExpType GSE_INP = 0x0004; // InputField - const SwGetSetExpType GSE_SEQ = 0x0008; // Sequence - const SwGetSetExpType GSE_FORMULA = 0x0010; // Formel + const SwGetSetExpType GSE_STRING = 0x0001; // String + const SwGetSetExpType GSE_EXPR = 0x0002; // Expression + const SwGetSetExpType GSE_INP = 0x0004; // InputField + const SwGetSetExpType GSE_SEQ = 0x0008; // Sequence + const SwGetSetExpType GSE_FORMULA = 0x0010; // Formel } typedef USHORT SwExtendedSubType; namespace nsSwExtendedSubType { - const SwExtendedSubType SUB_CMD = 0x0100; // Kommando anzeigen - const SwExtendedSubType SUB_INVISIBLE = 0x0200; // unsichtbar - const SwExtendedSubType SUB_OWN_FMT = 0x0400; // SwDBField: Uebernimmt Formatierung nicht + const SwExtendedSubType SUB_CMD = 0x0100; // Kommando anzeigen + const SwExtendedSubType SUB_INVISIBLE = 0x0200; // unsichtbar + const SwExtendedSubType SUB_OWN_FMT = 0x0400; // SwDBField: Uebernimmt Formatierung nicht // aus Datenbank } enum SwInputFieldSubType { - INP_TXT = 0x01, + INP_TXT = 0x01, INP_USR = 0x02, INP_VAR = 0x03 }; @@ -226,8 +226,8 @@ enum SwInputFieldSubType enum SwUserType { - UF_STRING = 0x01, - UF_EXPR = 0x02 + UF_STRING = 0x01, + UF_EXPR = 0x02 }; enum SwDateTimeSubType @@ -237,7 +237,7 @@ enum SwDateTimeSubType TIMEFLD = 4 }; -#ifndef FIELDIDS_ONLY // SWG-Testreader!! +#ifndef FIELDIDS_ONLY // SWG-Testreader!! extern USHORT __FAR_DATA aTypeTab[]; @@ -246,14 +246,14 @@ extern USHORT __FAR_DATA aTypeTab[]; Beschreibung: Allgemeine Tools --------------------------------------------------------------------*/ -String GetResult(double nVal, sal_uInt32 nNumFmt, USHORT nLang = LANGUAGE_SYSTEM); +String GetResult(double nVal, sal_uInt32 nNumFmt, USHORT nLang = LANGUAGE_SYSTEM); void SetErrorStr(const String& rStr); -//String ExpandDate(const Date& rDate, ULONG nFmt, USHORT nLang); -//String ExpandTime(const Time& rTime, ULONG nFmt, USHORT nLang); +//String ExpandDate(const Date& rDate, ULONG nFmt, USHORT nLang); +//String ExpandTime(const Time& rTime, ULONG nFmt, USHORT nLang); String FormatNumber(USHORT nNum, sal_uInt32 nFormat); /*-------------------------------------------------------------------- - Beschreibung: Instanzen von SwFields und Abgeleiteten kommen 0-n mal vor. + Beschreibung: Instanzen von SwFields und Abgeleiteten kommen 0-n mal vor. Zu jeder Klasse SwFields existiert 1 Instanz der zugehoerigen Typenklasse Basisklasse aller Feldtypen ist SwFieldType @@ -265,10 +265,10 @@ class SW_DLLPUBLIC SwFieldType : public SwModify { USHORT nWhich; - friend void _FinitUI(); // um den Pointer zu loeschen! - static SvStringsDtor* pFldNames; + friend void _FinitUI(); // um den Pointer zu loeschen! + static SvStringsDtor* pFldNames; - static void _GetFldName(); // legt die FldNames an, fldmgr.cxx! + static void _GetFldName(); // legt die FldNames an, fldmgr.cxx! protected: // single argument ctors shall be explicit. @@ -279,17 +279,17 @@ public: #if OSL_DEBUG_LEVEL > 1 virtual ~SwFieldType(); #endif - static const String& GetTypeStr( USHORT nTypeId ); + static const String& GetTypeStr( USHORT nTypeId ); // nur in abgeleiteten Klassen - virtual const String& GetName() const; - virtual SwFieldType* Copy() const = 0; + virtual const String& GetName() const; + virtual SwFieldType* Copy() const = 0; virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const; virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich ); - USHORT Which() const { return nWhich; } + USHORT Which() const { return nWhich; } - inline void UpdateFlds() const; + inline void UpdateFlds() const; }; inline void SwFieldType::UpdateFlds() const @@ -308,25 +308,25 @@ class SW_DLLPUBLIC SwField { private: mutable String m_Cache; /// #i85766# cached expansion (for clipboard) - USHORT nLang; // Immer ueber SetLanguage aendern! + USHORT nLang; // Immer ueber SetLanguage aendern! BOOL bIsAutomaticLanguage; - sal_uInt32 nFormat; + sal_uInt32 nFormat; - SwFieldType* pType; + SwFieldType* pType; - virtual String Expand() const = 0; - virtual SwField* Copy() const = 0; + virtual String Expand() const = 0; + virtual SwField* Copy() const = 0; protected: - void SetFormat(sal_uInt32 nSet) {nFormat = nSet;} + void SetFormat(sal_uInt32 nSet) {nFormat = nSet;} SwField(SwFieldType* pTyp, sal_uInt32 nFmt = 0, USHORT nLang = LANGUAGE_SYSTEM); public: - virtual ~SwField(); + virtual ~SwField(); // Typ feststellen - inline SwFieldType* GetTyp() const; + inline SwFieldType* GetTyp() const; // neuen Typ setzen (wird fuer das Kopieren zwischen Dokumenten benutzt) virtual SwFieldType* ChgTyp( SwFieldType* ); @@ -338,7 +338,7 @@ public: String ExpandField(bool const bInClipboard) const; // liefert den Namen oder den Inhalt - virtual String GetCntnt(BOOL bName = FALSE) const; + virtual String GetCntnt(BOOL bName = FALSE) const; SwField * CopyField() const; @@ -351,31 +351,31 @@ public: #endif // TYP_ID - USHORT GetTypeId() const; - virtual USHORT GetSubType() const; + USHORT GetTypeId() const; + virtual USHORT GetSubType() const; virtual void SetSubType(USHORT); // Sprache an der Feldposition - inline USHORT GetLanguage() const; - virtual void SetLanguage(USHORT nLng); + inline USHORT GetLanguage() const; + virtual void SetLanguage(USHORT nLng); // Parameter fuer Dialog und BASIC erfragen - inline sal_uInt32 GetFormat() const; + inline sal_uInt32 GetFormat() const; virtual const String& GetPar1() const; - virtual String GetPar2() const; + virtual String GetPar2() const; - virtual String GetFormula() const; + virtual String GetFormula() const; - virtual void ChangeFormat(sal_uInt32 n); - virtual void SetPar1(const String& rStr); - virtual void SetPar2(const String& rStr); + virtual void ChangeFormat(sal_uInt32 n); + virtual void SetPar1(const String& rStr); + virtual void SetPar2(const String& rStr); virtual bool QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhichId ) const; virtual bool PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId ); // hat das Feld eine Action auf dem ClickHandler ? (z.B. INetFelder,..) - BOOL HasClickHdl() const; + BOOL HasClickHdl() const; // ist es ein Fix-Feld? - BOOL IsFixed() const; + BOOL IsFixed() const; BOOL IsAutomaticLanguage() const { return bIsAutomaticLanguage;} void SetAutomaticLanguage(BOOL bSet){bIsAutomaticLanguage = bSet;} @@ -383,67 +383,67 @@ public: virtual String GetDescription() const; }; -inline SwFieldType* SwField::GetTyp() const - { return pType; } +inline SwFieldType* SwField::GetTyp() const + { return pType; } inline sal_uInt32 SwField::GetFormat() const - { return nFormat; } + { return nFormat; } inline USHORT SwField::GetLanguage() const - { return nLang; } + { return nLang; } /*-------------------------------------------------------------------- - Beschreibung: Felder mit Values, die ueber der Numberformatter + Beschreibung: Felder mit Values, die ueber der Numberformatter formatiert werden muessen --------------------------------------------------------------------*/ class SwValueFieldType : public SwFieldType { - SwDoc* pDoc; - BOOL bUseFormat; // Numberformatter verwenden + SwDoc* pDoc; + BOOL bUseFormat; // Numberformatter verwenden protected: SwValueFieldType( SwDoc* pDocPtr, USHORT nWhichId ); SwValueFieldType( const SwValueFieldType& rTyp ); public: - inline SwDoc* GetDoc() const { return pDoc; } - inline void SetDoc(SwDoc* pNewDoc) { pDoc = pNewDoc; } + inline SwDoc* GetDoc() const { return pDoc; } + inline void SetDoc(SwDoc* pNewDoc) { pDoc = pNewDoc; } - inline BOOL UseFormat() const { return bUseFormat; } - inline void EnableFormat(BOOL bFormat = TRUE) { bUseFormat = bFormat; } + inline BOOL UseFormat() const { return bUseFormat; } + inline void EnableFormat(BOOL bFormat = TRUE) { bUseFormat = bFormat; } - String ExpandValue(const double& rVal, sal_uInt32 nFmt, USHORT nLng=0) const; - void DoubleToString(String &rValue, const double &rVal, LanguageType eLng) const; - void DoubleToString(String &rValue, const double &rVal, sal_uInt32 nFmt) const; + String ExpandValue(const double& rVal, sal_uInt32 nFmt, USHORT nLng=0) const; + void DoubleToString(String &rValue, const double &rVal, LanguageType eLng) const; + void DoubleToString(String &rValue, const double &rVal, sal_uInt32 nFmt) const; }; class SW_DLLPUBLIC SwValueField : public SwField { double fValue; -// String sExpand; +// String sExpand; protected: SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, USHORT nLang = LANGUAGE_SYSTEM, const double fVal = 0.0 ); SwValueField( const SwValueField& rFld ); public: - virtual ~SwValueField(); + virtual ~SwValueField(); - virtual SwFieldType* ChgTyp( SwFieldType* ); - virtual void SetLanguage(USHORT nLng); + virtual SwFieldType* ChgTyp( SwFieldType* ); + virtual void SetLanguage(USHORT nLng); // os: wozu war das denn da? -// virtual void ChangeFormat(ULONG n); +// virtual void ChangeFormat(ULONG n); - inline SwDoc* GetDoc() const { return ((SwValueFieldType*)GetTyp())->GetDoc(); } + inline SwDoc* GetDoc() const { return ((SwValueFieldType*)GetTyp())->GetDoc(); } - virtual double GetValue() const; - virtual void SetValue( const double& rVal ); + virtual double GetValue() const; + virtual void SetValue( const double& rVal ); - inline String ExpandValue(const double& rVal, sal_uInt32 nFmt, USHORT nLng=0) const + inline String ExpandValue(const double& rVal, sal_uInt32 nFmt, USHORT nLng=0) const { return ((SwValueFieldType*)GetTyp())->ExpandValue(rVal, nFmt, nLng); } - static sal_uInt32 GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFmt); + static sal_uInt32 GetSystemFormat(SvNumberFormatter* pFormatter, sal_uInt32 nFmt); }; class SW_DLLPUBLIC SwFormulaField : public SwValueField @@ -455,14 +455,14 @@ protected: SwFormulaField( const SwFormulaField& rFld ); public: - virtual String GetFormula() const; - void SetFormula(const String& rStr); + virtual String GetFormula() const; + void SetFormula(const String& rStr); - void SetExpandedFormula(const String& rStr); - String GetExpandedFormula() const; + void SetExpandedFormula(const String& rStr); + String GetExpandedFormula() const; }; -#endif // FIELDIDS_ONLY +#endif // FIELDIDS_ONLY #endif // _FLDBAS_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |