diff options
author | Oliver Specht <os@openoffice.org> | 2001-02-21 11:13:10 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2001-02-21 11:13:10 +0000 |
commit | 4f3d101f696ee1e166089981f84ff4df75998371 (patch) | |
tree | d64b59eb62af1262cf6e440f7c05424dfd54a914 | |
parent | 6985f1e13cdf55cabb75179d2c07fadf0ba7390e (diff) |
use database struct instead of a combined string
-rw-r--r-- | sw/inc/dbfld.hxx | 47 | ||||
-rw-r--r-- | sw/inc/dbmgr.hxx | 8 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 17 | ||||
-rw-r--r-- | sw/inc/editsh.hxx | 13 | ||||
-rw-r--r-- | sw/inc/unofield.hxx | 5 | ||||
-rw-r--r-- | sw/inc/unoprnms.hxx | 5 |
6 files changed, 54 insertions, 41 deletions
diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx index c6fca4ada324..479e8e9d6f81 100644 --- a/sw/inc/dbfld.hxx +++ b/sw/inc/dbfld.hxx @@ -2,9 +2,9 @@ * * $RCSfile: dbfld.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $ + * last change: $Author: os $ $Date: 2001-02-21 12:13:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,6 +62,9 @@ #define _DBFLD_HXX #include "fldbas.hxx" +#ifndef _SWDBDATA_HXX +#include <swdbdata.hxx> +#endif class SwDoc; class SwTxtFld; @@ -73,12 +76,14 @@ class SwFrm; class SwDBFieldType : public SwValueFieldType { - String aName; // Syntax: Datenbankname.Feldname - long nRefCnt; + SwDBData aDBData; // + String sName; // only used in ::GetName() ! + String sColumn; + long nRefCnt; public: - SwDBFieldType(SwDoc* pDocPtr, const String& Name, const String& rSymDBName); + SwDBFieldType(SwDoc* pDocPtr, const String& rColumnName, const SwDBData& rDBData); virtual const String& GetName() const; virtual SwFieldType* Copy() const; @@ -87,8 +92,8 @@ public: void ReleaseRef(); inline long GetRefCount() { return nRefCnt; } - String GetColumnName(); - String GetDBName(); + const String& GetColumnName() const {return sColumn;} + const SwDBData& GetDBData() const {return aDBData;} virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const; virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty ); @@ -150,7 +155,7 @@ public: virtual const String& GetPar1() const; // DBName - inline String GetDBName() const { return ((SwDBFieldType*)GetTyp())->GetDBName(); } + inline const SwDBData& GetDBData() const { return ((SwDBFieldType*)GetTyp())->GetDBData(); } virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const; virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty ); }; @@ -172,25 +177,25 @@ inline void SwDBField::ChgBodyTxtFlag( BOOL bIsInBody ) class SwDBNameInfField : public SwField { - String sDBName; + SwDBData aDBData; protected: - const String& GetDBName() const {return sDBName;} - String& GetDBName() {return sDBName;} + const SwDBData& GetDBData() const {return aDBData;} + SwDBData& GetDBData() {return aDBData;} - SwDBNameInfField(SwFieldType* pTyp, const String& rDBName, ULONG nFmt = 0); + SwDBNameInfField(SwFieldType* pTyp, const SwDBData& rDBData, ULONG nFmt = 0); public: // DBName - inline const String& GetRealDBName() { return sDBName; } + inline const SwDBData& GetRealDBData() { return aDBData; } - String GetDBName(SwDoc* pDoc); - inline void SetDBName(const String& rDBName) { sDBName = rDBName; } + SwDBData GetDBData(SwDoc* pDoc); + inline void SetDBData(const SwDBData& rDBData) { aDBData = rDBData; } // Name oder Inhalt virtual String GetCntnt(BOOL bName = FALSE) const; - virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const; - virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty ); + virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, const String& rProperty ) const; + virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, const String& rProperty ); }; @@ -218,7 +223,7 @@ class SwDBNextSetField : public SwDBNameInfField public: SwDBNextSetField( SwDBNextSetFieldType*, - const String& rCond, const String& rDummy, const String& rDBName); + const String& rCond, const String& rDummy, const SwDBData& rDBData); virtual String Expand() const; virtual SwField* Copy() const; @@ -266,7 +271,7 @@ class SwDBNumSetField : public SwDBNameInfField BOOL bCondValid; public: - SwDBNumSetField(SwDBNumSetFieldType*, const String& rCond, const String& rDBNum, const String& rDBName); + SwDBNumSetField(SwDBNumSetFieldType*, const String& rCond, const String& rDBNum, const SwDBData& rDBData); virtual String Expand() const; virtual SwField* Copy() const; @@ -315,7 +320,7 @@ public: class SwDBNameField : public SwDBNameInfField { public: - SwDBNameField(SwDBNameFieldType*, const String& rDBName, ULONG nFmt = 0); + SwDBNameField(SwDBNameFieldType*, const SwDBData& rDBData, ULONG nFmt = 0); virtual String Expand() const; virtual SwField* Copy() const; @@ -344,7 +349,7 @@ class SwDBSetNumberField : public SwDBNameInfField long nNumber; public: - SwDBSetNumberField(SwDBSetNumberFieldType*, const String& rDBName, ULONG nFmt = 0); + SwDBSetNumberField(SwDBSetNumberFieldType*, const SwDBData& rDBData, ULONG nFmt = 0); virtual String Expand() const; virtual SwField* Copy() const; diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index ac90849029aa..94fc7214aeb5 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -2,9 +2,9 @@ * * $RCSfile: dbmgr.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: jp $ $Date: 2001-02-15 16:16:48 $ + * last change: $Author: os $ $Date: 2001-02-21 12:13:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -119,7 +119,7 @@ class ListBox; class Button; class SvNumberFormatter; class SwMailMergeDlg; - +struct SwDBData; // ----------------------------------------------------------------------- enum DBMgrOptions @@ -322,7 +322,7 @@ public: BOOL ShowInBeamer(const String& rDBName, const String& rTableName, BYTE nType, const String& rStatement); - const String& GetAddressDBName(); + const SwDBData& GetAddressDBName(); static String GetDBField( ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xColumnProp, diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 7451d9da5225..5a4152bc838a 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -2,9 +2,9 @@ * * $RCSfile: doc.hxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: jp $ $Date: 2001-02-08 14:31:37 $ + * last change: $Author: os $ $Date: 2001-02-21 12:13:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -91,6 +91,9 @@ #ifndef _ITABENUM_HXX #include <itabenum.hxx> #endif +#ifndef _SWDBDATA_HXX +#include <swdbdata.hxx> +#endif #ifndef _COM_SUN_STAR_LINGUISTIC2_XSPELLCHECKER1_HPP_ #include <com/sun/star/linguistic2/XSpellChecker1.hpp> @@ -281,7 +284,7 @@ class SwDoc AutoTimer aIdleTimer; // der eigene IdleTimer Timer aChartTimer; // der Timer fuers Update aller Charts Timer aOLEModifiedTimer; // Timer for update modified OLE-Objecs - String aDBName; // logischer Datenbankname + SwDBData aDBData; // database descriptor String sSectionPasswd; // Passwort fuer geschuetzte Bereiche String sTOIAutoMarkURL; // ::com::sun::star::util::URL of table of index AutoMark file SvStringsDtor aPatternNms; // Array fuer die Namen der Dokument-Vorlagen @@ -885,10 +888,10 @@ public: void GetAllUsedDB( SvStringsDtor& rDBNameList, const SvStringsDtor* pAllDBNames = 0 ); - void ChgDBName( const String& rNewName ); - String GetDBName(); - const String& GetDBDesc(); - const String& _GetDBDesc() const { return aDBName; } + void ChgDBData( const SwDBData& rNewData ); + SwDBData GetDBData(); + const SwDBData& GetDBDesc(); + const SwDBData& _GetDBDesc() const { return aDBData; } // Kopieren eines Bereiches im oder in ein anderes Dokument ! diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index b44b5166bd00..614dda2422ad 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -2,9 +2,9 @@ * * $RCSfile: editsh.hxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: jp $ $Date: 2001-02-20 09:21:22 $ + * last change: $Author: os $ $Date: 2001-02-21 12:13:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,6 +79,9 @@ #ifndef _ITABENUM_HXX #include <itabenum.hxx> #endif +#ifndef _SWDBDATA_HXX +#include <swdbdata.hxx> +#endif #ifndef _COM_SUN_STAR_LINGUISTIC2_XSPELLALTERNATIVES_HPP_ #include <com/sun/star/linguistic2/XSpellAlternatives.hpp> #endif @@ -381,9 +384,9 @@ public: void ChangeAuthorityData(const SwAuthEntry* pNewData); // Datenbankinfo - String GetDBName() const; - const String& GetDBDesc() const; - void ChgDBName(const String& rNewName); + SwDBData GetDBData() const; + const SwDBData& GetDBDesc() const; + void ChgDBData(const SwDBData& SwDBData); void ChangeDBFields( const SvStringsDtor& rOldNames, const String& rNewName ); void GetAllUsedDB( SvStringsDtor& rDBNameList, diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx index ad988116a843..688e265d1138 100644 --- a/sw/inc/unofield.hxx +++ b/sw/inc/unofield.hxx @@ -2,9 +2,9 @@ * * $RCSfile: unofield.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: os $ $Date: 2000-11-07 09:57:22 $ + * last change: $Author: os $ $Date: 2001-02-21 12:13:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -106,6 +106,7 @@ class SwXFieldMaster : public cppu::WeakImplHelper4 double fParam1; // Value / - sal_Int8 nParam1; // ChapterNumberingLevel sal_Bool bParam1; // IsExpression + sal_Int16 nParam2; public: // automatisch auskommentiert - [getImplementation] - Wird von OWeakObject nicht weiter untersttzt! diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx index 29cbc2fa6343..a0691e88531e 100644 --- a/sw/inc/unoprnms.hxx +++ b/sw/inc/unoprnms.hxx @@ -2,9 +2,9 @@ * * $RCSfile: unoprnms.hxx,v $ * - * $Revision: 1.40 $ + * $Revision: 1.41 $ * - * last change: $Author: dvo $ $Date: 2001-02-20 13:46:04 $ + * last change: $Author: os $ $Date: 2001-02-21 12:13:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -332,6 +332,7 @@ extern const SwPropNameLen __FAR_DATA UNO_NAME_COUNT_EMPTY_LINES extern const SwPropNameLen __FAR_DATA UNO_NAME_RESTART_AT_EACH_PAGE; extern const SwPropNameLen __FAR_DATA UNO_NAME_DATA_BASE_NAME ; extern const SwPropNameLen __FAR_DATA UNO_NAME_DATA_TABLE_NAME ; +extern const SwPropNameLen __FAR_DATA UNO_NAME_DATA_COMMAND_TYPE; extern const SwPropNameLen __FAR_DATA UNO_NAME_DATA_COLUMN_NAME ; extern const SwPropNameLen __FAR_DATA UNO_NAME_IS_DATA_BASE_FORMAT ; extern const SwPropNameLen __FAR_DATA UNO_NAME_DATE ; |