summaryrefslogtreecommitdiff
path: root/sw/source/core/fields/usrfld.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/fields/usrfld.cxx')
-rw-r--r--sw/source/core/fields/usrfld.cxx41
1 files changed, 21 insertions, 20 deletions
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index 1c01848e4c55..8909f588f842 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -29,22 +29,24 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
-#include <svx/svdmodel.hxx>
+#include <svx/svdmodel.hxx>
#include <calbck.hxx>
#include <calc.hxx>
#include <usrfld.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <editsh.hxx>
#include <dpage.hxx>
#include <unofldmid.h>
+
using namespace ::com::sun::star;
using ::rtl::OUString;
+
/*--------------------------------------------------------------------
Beschreibung: Benutzerfelder
--------------------------------------------------------------------*/
@@ -71,17 +73,14 @@ SwField* SwUserField::Copy() const
return pTmp;
}
-String SwUserField::GetCntnt(sal_Bool bName) const
+String SwUserField::GetFieldName() const
{
- if ( bName )
- { String aStr(SwFieldType::GetTypeStr(TYP_USERFLD));
- aStr += ' ';
- aStr += GetTyp()->GetName();
- aStr.AppendAscii(" = ");
- aStr += ((SwUserFieldType*)GetTyp())->GetContent();
- return aStr;
- }
- return Expand();
+ String aStr(SwFieldType::GetTypeStr(TYP_USERFLD));
+ aStr += ' ';
+ aStr += GetTyp()->GetName();
+ aStr.AppendAscii(" = ");
+ aStr += static_cast<SwUserFieldType*>(GetTyp())->GetContent();
+ return aStr;
}
double SwUserField::GetValue() const
@@ -128,19 +127,19 @@ void SwUserField::SetSubType(sal_uInt16 nSub)
nSubType = nSub & 0xff00;
}
-bool SwUserField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwUserField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
case FIELD_PROP_BOOL2:
{
- BOOL bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
+ sal_Bool bTmp = 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
case FIELD_PROP_BOOL1:
{
- BOOL bTmp = 0 == (nSubType & nsSwExtendedSubType::SUB_INVISIBLE);
+ sal_Bool bTmp = 0 == (nSubType & nsSwExtendedSubType::SUB_INVISIBLE);
rAny.setValue(&bTmp, ::getBooleanCppuType());
}
break;
@@ -153,7 +152,7 @@ bool SwUserField::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwUserField::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwUserField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{
@@ -299,11 +298,13 @@ void SwUserFieldType::SetContent( const String& rStr, sal_uInt32 nFmt )
sal_Bool bModified = GetDoc()->IsModified();
GetDoc()->SetModified();
if( !bModified ) // Bug 57028
- GetDoc()->SetUndoNoResetModified();
+ {
+ GetDoc()->GetIDocumentUndoRedo().SetUndoNoResetModified();
+ }
}
}
-bool SwUserFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
+bool SwUserFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -315,7 +316,7 @@ bool SwUserFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
break;
case FIELD_PROP_BOOL1:
{
- BOOL bExpression = 0 != (nsSwGetSetExpType::GSE_EXPR&nType);
+ sal_Bool bExpression = 0 != (nsSwGetSetExpType::GSE_EXPR&nType);
rAny.setValue(&bExpression, ::getBooleanCppuType());
}
break;
@@ -325,7 +326,7 @@ bool SwUserFieldType::QueryValue( uno::Any& rAny, USHORT nWhichId ) const
return true;
}
-bool SwUserFieldType::PutValue( const uno::Any& rAny, USHORT nWhichId )
+bool SwUserFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
switch( nWhichId )
{