summaryrefslogtreecommitdiff
path: root/sw/source/core/fields/macrofld.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2010-10-04 17:14:34 +0200
committerMichael Stahl <mst@openoffice.org>2010-10-04 17:14:34 +0200
commitf7c044dd301bfdfa165714b88b1d0af067d5b193 (patch)
tree5aaf3b473e3a2106451df9ebdc4731d9c6fec2a9 /sw/source/core/fields/macrofld.cxx
parentc4443211969706af9ddf418164d9e10bbda60dc3 (diff)
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.
Diffstat (limited to 'sw/source/core/fields/macrofld.cxx')
-rw-r--r--sw/source/core/fields/macrofld.cxx19
1 files changed, 7 insertions, 12 deletions
diff --git a/sw/source/core/fields/macrofld.cxx b/sw/source/core/fields/macrofld.cxx
index 70a0d2dcf689..f77bcf1fd457 100644
--- a/sw/source/core/fields/macrofld.cxx
+++ b/sw/source/core/fields/macrofld.cxx
@@ -28,20 +28,19 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <hintids.hxx>
#include <doc.hxx>
#include <docufld.hxx>
-#ifndef _UNOFLDMID_H
#include <unofldmid.h>
-#endif
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/uri/XUriReferenceFactory.hpp>
#include <com/sun/star/uri/XVndSunStarScriptUrl.hpp>
#include <comphelper/processfactory.hxx>
+
using namespace ::com::sun::star;
using ::rtl::OUString;
+
/*--------------------------------------------------------------------
Beschreibung: MacroFeldtypen
--------------------------------------------------------------------*/
@@ -79,16 +78,12 @@ SwField* SwMacroField::Copy() const
return new SwMacroField((SwMacroFieldType*)GetTyp(), aMacro, aText);
}
-String SwMacroField::GetCntnt(BOOL bName) const
+String SwMacroField::GetFieldName() const
{
- if(bName)
- {
- String aStr(GetTyp()->GetName());
- aStr += ' ';
- aStr += aMacro;
- return aStr;
- }
- return Expand();
+ String aStr(GetTyp()->GetName());
+ aStr += ' ';
+ aStr += aMacro;
+ return aStr;
}
String SwMacroField::GetLibName() const