From f7c044dd301bfdfa165714b88b1d0af067d5b193 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 4 Oct 2010 17:14:34 +0200 Subject: sw34bf01: #i85766# #i112425#: prevent expansion of fields in temp documents: SwField subclasses: make Expand()/Copy() methods private, like in SwField. SwField+subclasses: replace method GetCntnt(BOOL) with GetFieldName(). SwTblField: refactor Expand() and GetCntnt(BOOL): create new private method. --- sw/inc/dbfld.hxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sw/inc/dbfld.hxx') diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx index 4114c0cfe0d3..c13c766e1147 100644 --- a/sw/inc/dbfld.hxx +++ b/sw/inc/dbfld.hxx @@ -24,8 +24,8 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _DBFLD_HXX -#define _DBFLD_HXX +#ifndef SW_DBFLD_HXX +#define SW_DBFLD_HXX #include "swdllapi.h" #include "fldbas.hxx" @@ -79,6 +79,9 @@ class SW_DLLPUBLIC SwDBField : public SwValueField BOOL bValidValue : 1; BOOL bInitialized : 1; + virtual String Expand() const; + virtual SwField* Copy() const; + public: SwDBField(SwDBFieldType*, ULONG nFmt = 0); virtual ~SwDBField(); @@ -87,14 +90,11 @@ public: // Der aktuelle Text inline void SetExpansion(const String& rStr); - virtual String Expand() const; - virtual SwField* Copy() const; virtual USHORT GetSubType() const; virtual void SetSubType(USHORT nType); - // Name oder Inhalt - virtual String GetCntnt(BOOL bName = FALSE) const; + virtual String GetFieldName() const; // fuer Berechnungen in Ausdruecken void ChgValue( double d, BOOL bVal ); @@ -157,8 +157,8 @@ public: SwDBData GetDBData(SwDoc* pDoc); void SetDBData(const SwDBData& rDBData); // #111840# - // Name oder Inhalt - virtual String GetCntnt(BOOL bName = FALSE) const; + virtual String GetFieldName() const; + virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nWhich ) const; virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhich ); virtual USHORT GetSubType() const; @@ -335,4 +335,4 @@ inline void SwDBSetNumberField::SetSetNumber(long nNum) { nNumber = nNum; } -#endif // _DBFLD_HXX +#endif // SW_DBFLD_HXX -- cgit