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
29e4c61d
Kaydet (Commit)
29e4c61d
authored
Kas 18, 2011
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use new possessive genitive case month names locale data API
üst
a7dbdbf8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
94 additions
and
61 deletions
+94
-61
userlist.cxx
sc/source/core/tool/userlist.cxx
+1
-1
zforfind.cxx
svl/source/numbers/zforfind.cxx
+2
-2
calendarwrapper.hxx
unotools/inc/unotools/calendarwrapper.hxx
+11
-4
localedatawrapper.hxx
unotools/inc/unotools/localedatawrapper.hxx
+6
-5
calendarwrapper.cxx
unotools/source/i18n/calendarwrapper.cxx
+46
-23
localedatawrapper.cxx
unotools/source/i18n/localedatawrapper.cxx
+28
-26
No files found.
sc/source/core/tool/userlist.cxx
Dosyayı görüntüle @
29e4c61d
...
@@ -221,7 +221,7 @@ ScUserList::ScUserList()
...
@@ -221,7 +221,7 @@ ScUserList::ScUserList()
sal_Unicode
cDelimiter
=
ScGlobal
::
cListDelimiter
;
sal_Unicode
cDelimiter
=
ScGlobal
::
cListDelimiter
;
uno
::
Sequence
<
i18n
::
CalendarItem
>
xCal
;
uno
::
Sequence
<
i18n
::
CalendarItem
>
xCal
;
uno
::
Sequence
<
i18n
::
Calendar
>
xCalendars
(
uno
::
Sequence
<
i18n
::
Calendar
2
>
xCalendars
(
ScGlobal
::
pLocaleData
->
getAllCalendars
()
);
ScGlobal
::
pLocaleData
->
getAllCalendars
()
);
for
(
sal_Int32
j
=
0
;
j
<
xCalendars
.
getLength
();
++
j
)
for
(
sal_Int32
j
=
0
;
j
<
xCalendars
.
getLength
();
++
j
)
...
...
svl/source/numbers/zforfind.cxx
Dosyayı görüntüle @
29e4c61d
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
#endif
#endif
#if NF_TEST_CALENDAR
#if NF_TEST_CALENDAR
#include <comphelper/processfactory.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/i18n/X
ExtendedCalendar
.hpp>
#include <com/sun/star/i18n/X
Calendar3
.hpp>
#endif
#endif
...
@@ -1379,7 +1379,7 @@ input for the following reasons:
...
@@ -1379,7 +1379,7 @@ input for the following reasons:
sal_Int32
nZoneInMillis
,
nDST1InMillis
,
nDST2InMillis
;
sal_Int32
nZoneInMillis
,
nDST1InMillis
,
nDST2InMillis
;
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xSMgr
=
uno
::
Reference
<
lang
::
XMultiServiceFactory
>
xSMgr
=
::
comphelper
::
getProcessServiceFactory
();
::
comphelper
::
getProcessServiceFactory
();
uno
::
Reference
<
::
com
::
sun
::
star
::
i18n
::
X
ExtendedCalendar
>
xCal
(
uno
::
Reference
<
::
com
::
sun
::
star
::
i18n
::
X
Calendar3
>
xCal
(
xSMgr
->
createInstance
(
::
rtl
::
OUString
(
xSMgr
->
createInstance
(
::
rtl
::
OUString
(
RTL_CONSTASCII_USTRINGPARAM
(
RTL_CONSTASCII_USTRINGPARAM
(
"com.sun.star.i18n.LocaleCalendar"
)
)
),
"com.sun.star.i18n.LocaleCalendar"
)
)
),
...
...
unotools/inc/unotools/calendarwrapper.hxx
Dosyayı görüntüle @
29e4c61d
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
#include <tools/string.hxx>
#include <tools/string.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/i18n/Calendar.hpp>
#include <com/sun/star/i18n/Calendar
2
.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/Locale.hpp>
#include "unotools/unotoolsdllapi.h"
#include "unotools/unotoolsdllapi.h"
...
@@ -45,7 +45,7 @@ namespace com { namespace sun { namespace star {
...
@@ -45,7 +45,7 @@ namespace com { namespace sun { namespace star {
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
com
{
namespace
sun
{
namespace
star
{
namespace
i18n
{
namespace
i18n
{
class
X
ExtendedCalendar
;
class
X
Calendar3
;
}
}
}}}
}}}
...
@@ -53,7 +53,7 @@ namespace com { namespace sun { namespace star {
...
@@ -53,7 +53,7 @@ namespace com { namespace sun { namespace star {
class
UNOTOOLS_DLLPUBLIC
CalendarWrapper
class
UNOTOOLS_DLLPUBLIC
CalendarWrapper
{
{
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xSMgr
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xSMgr
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
i18n
::
X
ExtendedCalendar
>
xC
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
i18n
::
X
Calendar3
>
xC
;
DateTime
aEpochStart
;
// 1Jan1970
DateTime
aEpochStart
;
// 1Jan1970
...
@@ -68,7 +68,6 @@ public:
...
@@ -68,7 +68,6 @@ public:
void
loadDefaultCalendar
(
const
::
com
::
sun
::
star
::
lang
::
Locale
&
rLocale
);
void
loadDefaultCalendar
(
const
::
com
::
sun
::
star
::
lang
::
Locale
&
rLocale
);
void
loadCalendar
(
const
::
rtl
::
OUString
&
rUniqueID
,
const
::
com
::
sun
::
star
::
lang
::
Locale
&
rLocale
);
void
loadCalendar
(
const
::
rtl
::
OUString
&
rUniqueID
,
const
::
com
::
sun
::
star
::
lang
::
Locale
&
rLocale
);
::
com
::
sun
::
star
::
i18n
::
Calendar
getLoadedCalendar
()
const
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
getAllCalendars
(
const
::
com
::
sun
::
star
::
lang
::
Locale
&
rLocale
)
const
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
getAllCalendars
(
const
::
com
::
sun
::
star
::
lang
::
Locale
&
rLocale
)
const
;
::
rtl
::
OUString
getUniqueID
()
const
;
::
rtl
::
OUString
getUniqueID
()
const
;
/// set UTC date/time
/// set UTC date/time
...
@@ -80,6 +79,7 @@ public:
...
@@ -80,6 +79,7 @@ public:
/// convenience method to get local date/time
/// convenience method to get local date/time
double
getLocalDateTime
()
const
;
double
getLocalDateTime
()
const
;
// wrapper implementations of XCalendar
// wrapper implementations of XCalendar
void
setValue
(
sal_Int16
nFieldIndex
,
sal_Int16
nValue
);
void
setValue
(
sal_Int16
nFieldIndex
,
sal_Int16
nValue
);
...
@@ -102,11 +102,18 @@ public:
...
@@ -102,11 +102,18 @@ public:
fields DST_OFFSET and DST_OFFSET_SECOND_MILLIS into account. */
fields DST_OFFSET and DST_OFFSET_SECOND_MILLIS into account. */
sal_Int32
getDSTOffsetInMillis
()
const
;
sal_Int32
getDSTOffsetInMillis
()
const
;
// wrapper implementations of XExtendedCalendar
// wrapper implementations of XExtendedCalendar
String
getDisplayString
(
sal_Int32
nCalendarDisplayCode
,
sal_Int16
nNativeNumberMode
)
const
;
String
getDisplayString
(
sal_Int32
nCalendarDisplayCode
,
sal_Int16
nNativeNumberMode
)
const
;
// wrapper implementations of XCalendar3
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
CalendarItem
>
getGenitiveMonths
()
const
;
::
com
::
sun
::
star
::
i18n
::
Calendar2
getLoadedCalendar
()
const
;
// convenience methods
// convenience methods
/// get epoch start (should be 01Jan1970)
/// get epoch start (should be 01Jan1970)
...
...
unotools/inc/unotools/localedatawrapper.hxx
Dosyayı görüntüle @
29e4c61d
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#define _UNOTOOLS_LOCALEDATAWRAPPER_HXX
#define _UNOTOOLS_LOCALEDATAWRAPPER_HXX
#include <tools/string.hxx>
#include <tools/string.hxx>
#include <com/sun/star/i18n/XLocaleData
2
.hpp>
#include <com/sun/star/i18n/XLocaleData
3
.hpp>
#include <com/sun/star/i18n/LocaleItem.hpp>
#include <com/sun/star/i18n/LocaleItem.hpp>
#include <com/sun/star/i18n/reservedWords.hpp>
#include <com/sun/star/i18n/reservedWords.hpp>
#include <unotools/readwritemutexguard.hxx>
#include <unotools/readwritemutexguard.hxx>
...
@@ -67,9 +67,9 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
...
@@ -67,9 +67,9 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper
static
sal_uInt8
nLocaleDataChecking
;
// 0:=dontknow, 1:=yes, 2:=no
static
sal_uInt8
nLocaleDataChecking
;
// 0:=dontknow, 1:=yes, 2:=no
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xSMgr
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
lang
::
XMultiServiceFactory
>
xSMgr
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
i18n
::
XLocaleData
2
>
xLD
;
::
com
::
sun
::
star
::
uno
::
Reference
<
::
com
::
sun
::
star
::
i18n
::
XLocaleData
3
>
xLD
;
::
com
::
sun
::
star
::
lang
::
Locale
aLocale
;
::
com
::
sun
::
star
::
lang
::
Locale
aLocale
;
::
boost
::
shared_ptr
<
::
com
::
sun
::
star
::
i18n
::
Calendar
>
xDefaultCalendar
;
::
boost
::
shared_ptr
<
::
com
::
sun
::
star
::
i18n
::
Calendar
2
>
xDefaultCalendar
;
::
com
::
sun
::
star
::
i18n
::
LocaleDataItem
aLocaleDataItem
;
::
com
::
sun
::
star
::
i18n
::
LocaleDataItem
aLocaleDataItem
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
aReservedWordSeq
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
aReservedWordSeq
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int32
>
aGrouping
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
sal_Int32
>
aGrouping
;
...
@@ -153,7 +153,8 @@ public:
...
@@ -153,7 +153,8 @@ public:
::
com
::
sun
::
star
::
i18n
::
LanguageCountryInfo
getLanguageCountryInfo
()
const
;
::
com
::
sun
::
star
::
i18n
::
LanguageCountryInfo
getLanguageCountryInfo
()
const
;
::
com
::
sun
::
star
::
i18n
::
LocaleDataItem
getLocaleItem
()
const
;
::
com
::
sun
::
star
::
i18n
::
LocaleDataItem
getLocaleItem
()
const
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
Calendar
>
getAllCalendars
()
const
;
/// NOTE: this wraps XLocaleData3::getAllCalendars2() in fact.
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
Calendar2
>
getAllCalendars
()
const
;
/// NOTE: this wraps XLocaleData2::getAllCurrencies2() in fact.
/// NOTE: this wraps XLocaleData2::getAllCurrencies2() in fact.
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
Currency2
>
getAllCurrencies
()
const
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
Currency2
>
getAllCurrencies
()
const
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
FormatElement
>
getAllFormats
()
const
;
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
FormatElement
>
getAllFormats
()
const
;
...
@@ -179,7 +180,7 @@ public:
...
@@ -179,7 +180,7 @@ public:
MeasurementSystem
mapMeasurementStringToEnum
(
const
String
&
rMS
)
const
;
MeasurementSystem
mapMeasurementStringToEnum
(
const
String
&
rMS
)
const
;
/// Convenience method to obtain the default calendar.
/// Convenience method to obtain the default calendar.
const
::
boost
::
shared_ptr
<
::
com
::
sun
::
star
::
i18n
::
Calendar
>
getDefaultCalendar
()
const
;
const
::
boost
::
shared_ptr
<
::
com
::
sun
::
star
::
i18n
::
Calendar
2
>
getDefaultCalendar
()
const
;
/// Convenience method to obtain the day names of the default calendar.
/// Convenience method to obtain the day names of the default calendar.
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
CalendarItem
>
getDefaultCalendarDays
()
const
;
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
CalendarItem
>
getDefaultCalendarDays
()
const
;
...
...
unotools/source/i18n/calendarwrapper.cxx
Dosyayı görüntüle @
29e4c61d
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
#include <tools/debug.hxx>
#include <tools/debug.hxx>
#include <instance.hxx>
#include <instance.hxx>
#include <com/sun/star/i18n/CalendarFieldIndex.hpp>
#include <com/sun/star/i18n/CalendarFieldIndex.hpp>
#include <com/sun/star/i18n/X
ExtendedCalendar
.hpp>
#include <com/sun/star/i18n/X
Calendar3
.hpp>
#define CALENDAR_LIBRARYNAME "i18n"
#define CALENDAR_LIBRARYNAME "i18n"
#define CALENDAR_SERVICENAME "com.sun.star.i18n.LocaleCalendar"
#define CALENDAR_SERVICENAME "com.sun.star.i18n.LocaleCalendar"
...
@@ -54,7 +54,7 @@ CalendarWrapper::CalendarWrapper(
...
@@ -54,7 +54,7 @@ CalendarWrapper::CalendarWrapper(
xSMgr
(
xSF
),
xSMgr
(
xSF
),
aEpochStart
(
Date
(
1
,
1
,
1970
)
)
aEpochStart
(
Date
(
1
,
1
,
1970
)
)
{
{
xC
=
Reference
<
X
ExtendedCalendar
>
(
intl_createInstance
(
xSMgr
,
CALENDAR_SERVICENAME
,
"CalendarWrapper"
),
uno
::
UNO_QUERY
);
xC
=
Reference
<
X
Calendar3
>
(
intl_createInstance
(
xSMgr
,
CALENDAR_SERVICENAME
,
"CalendarWrapper"
),
uno
::
UNO_QUERY
);
}
}
CalendarWrapper
::~
CalendarWrapper
()
CalendarWrapper
::~
CalendarWrapper
()
...
@@ -107,27 +107,6 @@ void CalendarWrapper::loadCalendar( const ::rtl::OUString& rUniqueID, const ::co
...
@@ -107,27 +107,6 @@ void CalendarWrapper::loadCalendar( const ::rtl::OUString& rUniqueID, const ::co
}
}
::
com
::
sun
::
star
::
i18n
::
Calendar
CalendarWrapper
::
getLoadedCalendar
()
const
{
try
{
if
(
xC
.
is
()
)
return
xC
->
getLoadedCalendar
();
}
catch
(
Exception
&
e
)
{
#ifdef DBG_UTIL
ByteString
aMsg
(
"getLoadedCalendar: Exception caught
\n
"
);
aMsg
+=
ByteString
(
String
(
e
.
Message
),
RTL_TEXTENCODING_UTF8
);
DBG_ERRORFILE
(
aMsg
.
GetBuffer
()
);
#else
(
void
)
e
;
#endif
}
return
::
com
::
sun
::
star
::
i18n
::
Calendar
();
}
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
CalendarWrapper
::
getAllCalendars
(
const
::
com
::
sun
::
star
::
lang
::
Locale
&
rLocale
)
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
rtl
::
OUString
>
CalendarWrapper
::
getAllCalendars
(
const
::
com
::
sun
::
star
::
lang
::
Locale
&
rLocale
)
const
{
{
try
try
...
@@ -609,4 +588,48 @@ String CalendarWrapper::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_In
...
@@ -609,4 +588,48 @@ String CalendarWrapper::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_In
return
String
();
return
String
();
}
}
// --- XCalendar3 ------------------------------------------------------------
::
com
::
sun
::
star
::
i18n
::
Calendar2
CalendarWrapper
::
getLoadedCalendar
()
const
{
try
{
if
(
xC
.
is
()
)
return
xC
->
getLoadedCalendar2
();
}
catch
(
Exception
&
e
)
{
#ifdef DBG_UTIL
ByteString
aMsg
(
"getLoadedCalendar2: Exception caught
\n
"
);
aMsg
+=
ByteString
(
String
(
e
.
Message
),
RTL_TEXTENCODING_UTF8
);
DBG_ERRORFILE
(
aMsg
.
GetBuffer
()
);
#else
(
void
)
e
;
#endif
}
return
::
com
::
sun
::
star
::
i18n
::
Calendar2
();
}
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
CalendarItem
>
CalendarWrapper
::
getGenitiveMonths
()
const
{
try
{
if
(
xC
.
is
()
)
return
xC
->
getGenitiveMonths
();
}
catch
(
Exception
&
e
)
{
#ifdef DBG_UTIL
ByteString
aMsg
(
"getGenitiveMonths: Exception caught
\n
"
);
aMsg
+=
ByteString
(
String
(
e
.
Message
),
RTL_TEXTENCODING_UTF8
);
DBG_ERRORFILE
(
aMsg
.
GetBuffer
()
);
#else
(
void
)
e
;
#endif
}
return
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
CalendarItem
>
(
0
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
unotools/source/i18n/localedatawrapper.cxx
Dosyayı görüntüle @
29e4c61d
...
@@ -84,7 +84,7 @@ LocaleDataWrapper::LocaleDataWrapper(
...
@@ -84,7 +84,7 @@ LocaleDataWrapper::LocaleDataWrapper(
bReservedWordValid
(
sal_False
)
bReservedWordValid
(
sal_False
)
{
{
setLocale
(
rLocale
);
setLocale
(
rLocale
);
xLD
=
Reference
<
XLocaleData
2
>
(
xLD
=
Reference
<
XLocaleData
3
>
(
intl_createInstance
(
xSMgr
,
"com.sun.star.i18n.LocaleData"
,
intl_createInstance
(
xSMgr
,
"com.sun.star.i18n.LocaleData"
,
"LocaleDataWrapper"
),
uno
::
UNO_QUERY
);
"LocaleDataWrapper"
),
uno
::
UNO_QUERY
);
}
}
...
@@ -182,27 +182,6 @@ void LocaleDataWrapper::invalidateData()
...
@@ -182,27 +182,6 @@ void LocaleDataWrapper::invalidateData()
}
}
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
Calendar
>
LocaleDataWrapper
::
getAllCalendars
()
const
{
try
{
if
(
xLD
.
is
()
)
return
xLD
->
getAllCalendars
(
getLocale
()
);
}
catch
(
Exception
&
e
)
{
#ifdef DBG_UTIL
ByteString
aMsg
(
"getAllCalendars: Exception caught
\n
"
);
aMsg
+=
ByteString
(
String
(
e
.
Message
),
RTL_TEXTENCODING_UTF8
);
DBG_ERRORFILE
(
aMsg
.
GetBuffer
()
);
#else
(
void
)
e
;
#endif
}
return
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
Calendar
>
(
0
);
}
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
Currency2
>
LocaleDataWrapper
::
getAllCurrencies
()
const
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
Currency2
>
LocaleDataWrapper
::
getAllCurrencies
()
const
{
{
try
try
...
@@ -603,12 +582,12 @@ void LocaleDataWrapper::getDefaultCalendarImpl()
...
@@ -603,12 +582,12 @@ void LocaleDataWrapper::getDefaultCalendarImpl()
{
{
if
(
!
xDefaultCalendar
)
if
(
!
xDefaultCalendar
)
{
{
Sequence
<
Calendar
>
xCals
=
getAllCalendars
();
Sequence
<
Calendar
2
>
xCals
=
getAllCalendars
();
sal_Int32
nCount
=
xCals
.
getLength
();
sal_Int32
nCount
=
xCals
.
getLength
();
sal_Int32
nDef
=
0
;
sal_Int32
nDef
=
0
;
if
(
nCount
>
1
)
if
(
nCount
>
1
)
{
{
const
Calendar
*
pArr
=
xCals
.
getArray
();
const
Calendar
2
*
pArr
=
xCals
.
getArray
();
for
(
sal_Int32
i
=
0
;
i
<
nCount
;
++
i
)
for
(
sal_Int32
i
=
0
;
i
<
nCount
;
++
i
)
{
{
if
(
pArr
[
i
].
Default
)
if
(
pArr
[
i
].
Default
)
...
@@ -618,12 +597,12 @@ void LocaleDataWrapper::getDefaultCalendarImpl()
...
@@ -618,12 +597,12 @@ void LocaleDataWrapper::getDefaultCalendarImpl()
}
}
}
}
}
}
xDefaultCalendar
.
reset
(
new
Calendar
(
xCals
[
nDef
]));
xDefaultCalendar
.
reset
(
new
Calendar
2
(
xCals
[
nDef
]));
}
}
}
}
const
::
boost
::
shared_ptr
<
::
com
::
sun
::
star
::
i18n
::
Calendar
>
LocaleDataWrapper
::
getDefaultCalendar
()
const
const
::
boost
::
shared_ptr
<
::
com
::
sun
::
star
::
i18n
::
Calendar
2
>
LocaleDataWrapper
::
getDefaultCalendar
()
const
{
{
::
utl
::
ReadWriteGuard
aGuard
(
aMutex
);
::
utl
::
ReadWriteGuard
aGuard
(
aMutex
);
if
(
!
xDefaultCalendar
)
if
(
!
xDefaultCalendar
)
...
@@ -1950,4 +1929,27 @@ void LocaleDataWrapper::evaluateLocaleDataChecking()
...
@@ -1950,4 +1929,27 @@ void LocaleDataWrapper::evaluateLocaleDataChecking()
}
}
}
}
// --- XLocaleData3 ----------------------------------------------------------
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
Calendar2
>
LocaleDataWrapper
::
getAllCalendars
()
const
{
try
{
if
(
xLD
.
is
()
)
return
xLD
->
getAllCalendars2
(
getLocale
()
);
}
catch
(
Exception
&
e
)
{
#ifdef DBG_UTIL
ByteString
aMsg
(
"getAllCalendars: Exception caught
\n
"
);
aMsg
+=
ByteString
(
String
(
e
.
Message
),
RTL_TEXTENCODING_UTF8
);
DBG_ERRORFILE
(
aMsg
.
GetBuffer
()
);
#else
(
void
)
e
;
#endif
}
return
::
com
::
sun
::
star
::
uno
::
Sequence
<
::
com
::
sun
::
star
::
i18n
::
Calendar2
>
(
0
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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