summaryrefslogtreecommitdiff
path: root/sw/source/core/fields/flddat.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/fields/flddat.cxx')
-rw-r--r--sw/source/core/fields/flddat.cxx63
1 files changed, 6 insertions, 57 deletions
diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx
index 253477f118e0..098d7a49ffb9 100644
--- a/sw/source/core/fields/flddat.cxx
+++ b/sw/source/core/fields/flddat.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-// #include <math.h>
#include <tools/datetime.hxx>
#include <svl/zforlist.hxx>
#include <com/sun/star/util/DateTime.hpp>
@@ -46,10 +46,6 @@ SwDateTimeFieldType::SwDateTimeFieldType(SwDoc* pInitDoc)
: SwValueFieldType( pInitDoc, RES_DATETIMEFLD )
{}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwFieldType* SwDateTimeFieldType::Copy() const
{
SwDateTimeFieldType *pTmp = new SwDateTimeFieldType(GetDoc());
@@ -80,10 +76,6 @@ SwDateTimeField::SwDateTimeField(SwDateTimeFieldType* pInitType, sal_uInt16 nSub
}
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
String SwDateTimeField::Expand() const
{
double fVal;
@@ -102,10 +94,6 @@ String SwDateTimeField::Expand() const
return ExpandValue(fVal, GetFormat(), GetLanguage());
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
SwField* SwDateTimeField::Copy() const
{
SwDateTimeField *pTmp =
@@ -119,36 +107,21 @@ SwField* SwDateTimeField::Copy() const
return pTmp;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
sal_uInt16 SwDateTimeField::GetSubType() const
{
return nSubType;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDateTimeField::SetSubType(sal_uInt16 nType)
{
nSubType = nType;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
void SwDateTimeField::SetPar2(const String& rStr)
{
nOffset = rStr.ToInt32();
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
String SwDateTimeField::GetPar2() const
{
if (nOffset)
@@ -157,19 +130,11 @@ String SwDateTimeField::GetPar2() const
return aEmptyStr;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
void SwDateTimeField::SetDateTime(const DateTime& rDT)
{
SetValue(GetDateTime(GetDoc(), rDT));
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
double SwDateTimeField::GetDateTime(SwDoc* pDoc, const DateTime& rDT)
{
SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter();
@@ -180,10 +145,6 @@ double SwDateTimeField::GetDateTime(SwDoc* pDoc, const DateTime& rDT)
return fResult;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
double SwDateTimeField::GetValue() const
{
if (IsFixed())
@@ -192,10 +153,6 @@ double SwDateTimeField::GetValue() const
return GetDateTime(GetDoc(), DateTime());
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
Date SwDateTimeField::GetDate(sal_Bool bUseOffset) const
{
SvNumberFormatter* pFormatter = GetDoc()->GetNumberFormatter();
@@ -211,10 +168,6 @@ Date SwDateTimeField::GetDate(sal_Bool bUseOffset) const
return aDate;
}
-/*--------------------------------------------------------------------
- Beschreibung:
- --------------------------------------------------------------------*/
-
Time SwDateTimeField::GetTime(sal_Bool bUseOffset) const
{
double fDummy;
@@ -226,10 +179,7 @@ Time SwDateTimeField::GetTime(sal_Bool bUseOffset) const
return (Time)aDT;
}
-/*-----------------04.03.98 11:05-------------------
-
---------------------------------------------------*/
-sal_Bool SwDateTimeField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
+bool SwDateTimeField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
{
switch( nWhichId )
{
@@ -269,12 +219,10 @@ sal_Bool SwDateTimeField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) cons
default:
return SwField::QueryValue(rVal, nWhichId);
}
- return sal_True;
+ return true;
}
-/*-----------------04.03.98 11:05-------------------
---------------------------------------------------*/
-sal_Bool SwDateTimeField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
+bool SwDateTimeField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
{
sal_Int32 nTmp = 0;
switch( nWhichId )
@@ -316,6 +264,7 @@ sal_Bool SwDateTimeField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
default:
return SwField::PutValue(rVal, nWhichId);
}
- return sal_True;
+ return true;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */