Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
a247aa74
Kaydet (Commit)
a247aa74
authored
Kas 17, 2000
tarafından
Oliver Specht
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
DateTime field provides util::DateTime
üst
6e33a9a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
15 deletions
+42
-15
flddat.cxx
sw/source/core/fields/flddat.cxx
+42
-15
No files found.
sw/source/core/fields/flddat.cxx
Dosyayı görüntüle @
a247aa74
...
...
@@ -2,9 +2,9 @@
*
* $RCSfile: flddat.cxx,v $
*
* $Revision: 1.
1.1.1
$
* $Revision: 1.
2
$
*
* last change: $Author:
hr $ $Date: 2000-09-19 00:08:19
$
* last change: $Author:
os $ $Date: 2000-11-17 14:32:37
$
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
...
...
@@ -67,15 +67,15 @@
#include <math.h>
#ifndef _DATE_HXX //autogen
#include <tools/date.hxx>
#endif
#ifndef _TOOLS_TIME_HXX //autogen
#include <tools/time.hxx>
#ifndef _DATETIME_HXX
#include <tools/datetime.hxx>
#endif
#ifndef _ZFORLIST_HXX //autogen
#include <svtools/zforlist.hxx>
#endif
#ifndef _COM_SUN_STAR_UTIL_DATETIME_HPP_
#include <com/sun/star/util/DateTime.hpp>
#endif
#ifndef _UNOPRNMS_HXX
#include <unoprnms.hxx>
...
...
@@ -295,9 +295,7 @@ ULONG SwDateTimeField::GetTime(BOOL bUseOffset) const
--------------------------------------------------*/
BOOL
SwDateTimeField
::
QueryValue
(
uno
::
Any
&
rVal
,
const
String
&
rProperty
)
const
{
if
(
rProperty
.
EqualsAscii
(
UNO_NAME_DATETIME
))
rVal
<<=
GetValue
();
else
if
(
rProperty
.
EqualsAscii
(
UNO_NAME_IS_FIXED
))
if
(
rProperty
.
EqualsAscii
(
UNO_NAME_IS_FIXED
))
{
BOOL
bTmp
=
IsFixed
();
rVal
.
setValue
(
&
bTmp
,
::
getCppuBooleanType
());
...
...
@@ -311,6 +309,24 @@ BOOL SwDateTimeField::QueryValue( uno::Any& rVal, const String& rProperty ) cons
}
else
if
(
rProperty
.
EqualsAscii
(
UNO_NAME_ADJUST
))
rVal
<<=
(
sal_Int32
)
nOffset
;
else
if
(
rProperty
.
EqualsAscii
(
UNO_NAME_DATE_TIME_VALUE
))
{
ULONG
nDate
=
GetDate
();
ULONG
nTime
=
GetTime
();
DateTime
aDateTime
;
aDateTime
.
SetDate
(
nDate
);
aDateTime
.
SetTime
(
nTime
);
util
::
DateTime
DateTimeValue
;
DateTimeValue
.
HundredthSeconds
=
aDateTime
.
Get100Sec
();
DateTimeValue
.
Seconds
=
aDateTime
.
GetSec
();
DateTimeValue
.
Minutes
=
aDateTime
.
GetMin
();
DateTimeValue
.
Hours
=
aDateTime
.
GetHour
();
DateTimeValue
.
Day
=
aDateTime
.
GetDay
();
DateTimeValue
.
Month
=
aDateTime
.
GetMonth
();
DateTimeValue
.
Year
=
aDateTime
.
GetYear
();
rVal
<<=
DateTimeValue
;
}
#ifdef DBG_UTIL
else
...
...
@@ -323,11 +339,7 @@ BOOL SwDateTimeField::QueryValue( uno::Any& rVal, const String& rProperty ) cons
--------------------------------------------------*/
BOOL
SwDateTimeField
::
PutValue
(
const
uno
::
Any
&
rVal
,
const
String
&
rProperty
)
{
if
(
rProperty
.
EqualsAscii
(
UNO_NAME_DATETIME
))
{
SetValue
(
*
(
Double
*
)
rVal
.
getValue
());
}
else
if
(
rProperty
.
EqualsAscii
(
UNO_NAME_IS_FIXED
))
if
(
rProperty
.
EqualsAscii
(
UNO_NAME_IS_FIXED
))
{
BOOL
bFix
=
*
(
sal_Bool
*
)
rVal
.
getValue
();
if
(
bFix
)
...
...
@@ -353,6 +365,21 @@ BOOL SwDateTimeField::PutValue( const uno::Any& rVal, const String& rProperty )
rVal
>>=
nVal
;
nOffset
=
nVal
;
}
else
if
(
rProperty
.
EqualsAscii
(
UNO_NAME_DATE_TIME_VALUE
))
{
util
::
DateTime
aDateTimeValue
;
if
(
!
(
rVal
>>=
aDateTimeValue
))
return
FALSE
;
DateTime
aDateTime
;
aDateTime
.
Set100Sec
(
aDateTimeValue
.
HundredthSeconds
);
aDateTime
.
SetSec
(
aDateTimeValue
.
Seconds
);
aDateTime
.
SetMin
(
aDateTimeValue
.
Minutes
);
aDateTime
.
SetHour
(
aDateTimeValue
.
Hours
);
aDateTime
.
SetDay
(
aDateTimeValue
.
Day
);
aDateTime
.
SetMonth
(
aDateTimeValue
.
Month
);
aDateTime
.
SetYear
(
aDateTimeValue
.
Year
);
SetDateTime
(
aDateTime
.
GetDate
(),
aDateTime
.
GetTime
());
}
#ifdef DBG_UTIL
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment