summaryrefslogtreecommitdiffstats
path: root/wizards
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2002-10-16 10:45:35 +0000
committerBehrend Cornelius <bc@openoffice.org>2002-10-16 10:45:35 +0000
commitaadd1daf27f535c1a17c0acbc3d8a5794d9e6e36 (patch)
tree525de29bd86c9524d9b330a3bb2275364d582800 /wizards
parent#104114# creation of new document modified (diff)
downloadcore-aadd1daf27f535c1a17c0acbc3d8a5794d9e6e36.tar.gz
core-aadd1daf27f535c1a17c0acbc3d8a5794d9e6e36.zip
#96771# Dateformats for other locales added
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/schedule/CalendarMain.xba30
-rw-r--r--wizards/source/schedule/DlgControl.xba20
-rw-r--r--wizards/source/schedule/LocalHolidays.xba6
-rw-r--r--wizards/source/schedule/OwnEvents.xba2
4 files changed, 43 insertions, 15 deletions
diff --git a/wizards/source/schedule/CalendarMain.xba b/wizards/source/schedule/CalendarMain.xba
index b2870aa28580..a75310d56f00 100644
--- a/wizards/source/schedule/CalendarMain.xba
+++ b/wizards/source/schedule/CalendarMain.xba
@@ -87,15 +87,14 @@ Dim iThisMonth as Integer
CalChoosenLand = -2
CalLoadOwnData()
-&apos; sCurLanguage = &quot;ja&quot;
With DlgCalModel
.cmdDelete.Enabled = False
.lstMonth.StringItemList() = cCalShortMonthNames()
Select Case sCurLangLocale
- Case &quot;ja&quot;
+ Case cLANGUAGE_JAPANESE
.lstOwnData.FontName = &quot;HG Mincho Light J&quot;
.txtEvent.FontName = &quot;HG Mincho Light J&quot;
- Case &quot;zh&quot;
+ Case cLANGUAGE_CHINESE
If oDocument.CharLocale.Country = &quot;CN&quot; Then
.lstOwnData.FontName = &quot;HG MSung Light SC&quot;
.txtEvent.FontName = &quot;HG MSung Light SC&quot;
@@ -136,30 +135,45 @@ Sub SetupNumberFormatter(sCurLangLocale as String, sCurCountryLocale as String)
Dim oFormats as Object
Dim DateFormatString as String
oFormats = oDocument.getNumberFormats()
-
Select Case sCurLangLocale
Case cLANGUAGE_GERMAN
DateFormatString = &quot;TT.MMM&quot;
Case cLANGUAGE_ENGLISH
- DateFormatString = &quot;DD/MMM&quot;
+ DateFormatString = &quot;MMM DD&quot;
Case cLANGUAGE_FRENCH
+ DateFormatString = &quot;JJ/MMM&quot;
Case cLANGUAGE_ITALIAN
+ DateFormatString = &quot;GG/MMM&quot;
Case cLANGUAGE_SPANISH
+ DateFormatString = &quot;DD/MMM&quot;
Case cLANGUAGE_PORTUGUESE
+ DateFormatString = &quot;DD-MMM&quot;
Case cLANGUAGE_DUTCH
+ DateFormatString = &quot;DD-MMM&quot;
Case cLANGUAGE_SWEDISH
+ DateFormatString = &quot;MMM DD&quot;
Case cLANGUAGE_DANISH
+ DateFormatString = &quot;DD-MMM&quot;
Case cLANGUAGE_POLISH
+ DateFormatString = &quot;MMM DD&quot;
Case cLANGUAGE_RUSSIAN
+ DateFormatString = &quot;MMM DD&quot;
Case cLANGUAGE_JAPANESE
+ DateFormatString = &quot;M月D日&quot;
Case cLANGUAGE_CHINESE
-&apos; If sCurCountryLocale = &quot;TW&quot; Then
-&apos; Else
-&apos; End If
+ If sCurCountryLocale = &quot;TW&quot; Then
+ DateFormatString = &quot;MMMMD&quot; &amp;&quot;&quot;&quot;&quot; &amp; &quot;日&quot; &amp; &quot;&quot;&quot;&quot;
+ Else
+ DateFormatString = &quot;M&quot; &amp; &quot;&quot;&quot;&quot; &amp; &quot;月&quot; &amp; &quot;&quot;&quot;&quot; &amp; &quot;D&quot; &amp;&quot;&quot;&quot;&quot; &amp; &quot;日&quot; &amp; &quot;&quot;&quot;&quot;
+ End If
Case cLANGUAGE_GREEK
+ DateFormatString = &quot;DD/MMM&quot;
Case cLANGUAGE_TURKISH
+ DateFormatString = &quot;DD/MMM&quot;
Case cLANGUAGE_POLISH
+ DateFormatString = &quot;MMM DD&quot;
Case cLANGUAGE_FINNISH
+ DateFormatString = &quot;PP.KKK&quot;
End Select
lDateFormat = AddNumberFormat(oFormats, DateFormatString, oDocument.CharLocale)
diff --git a/wizards/source/schedule/DlgControl.xba b/wizards/source/schedule/DlgControl.xba
index 1787fd735835..3489330cb7ed 100644
--- a/wizards/source/schedule/DlgControl.xba
+++ b/wizards/source/schedule/DlgControl.xba
@@ -16,14 +16,28 @@ End Sub
Sub CalcmdDeleteSelect()
Dim MsgBoxResult as Integer
+Dim bDoEnable as Boolean
+Dim iSel as Integer
+Dim MaxIndex as Integer
If Ubound(DlgCalModel.lstOwnData.SelectedItems()) &gt; -1 Then
MsgBoxResult = MsgBox(cCalSubcmdDeleteSelect_DeleteSelEntry$, 4+32, cCalSubcmdDeleteSelect_DeleteSelEntryTitle$)
If MsgBoxResult = 6 Then
+ iSel = DlgCalModel.lstOwnData.SelectedItems(0)
DlgCalModel.lstOwnData.StringItemList() = RemoveSelected(DlgCalModel.lstOwnData)
&apos; Flag to store the new data
bCalOwnDataChanged = True
- DlgCalModel.cmdDelete.Enabled = Ubound(DlgCalModel.lstOwnData.StringItemList()) &gt; -1
- Call CalClearInputMask()
+ bDoEnable = Ubound(DlgCalModel.lstOwnData.StringItemList()) &gt; -1
+ DlgCalModel.cmdDelete.Enabled = bDoEnable
+ If bDoEnable Then
+ MaxIndex = Ubound(DlgCalModel.lstOwnData.StringItemList())
+ If iSel &gt; MaxIndex Then
+ iSel = MaxIndex
+ End If
+ DlgCalendar.GetControl(&quot;lstOwnData&quot;).SelectItemPos(iSel, True)
+ CalUpdateNewEventFrame()
+ Else
+ Call CalClearInputMask()
+ End If
End If
End If
End Sub
@@ -145,7 +159,7 @@ Dim DateStr as String
.cmdInsert.Enabled = True
Else
Call CalClearInputMask()
- .cmdDelete.Enabled = False
+ .cmdDelete.Enabled = True
End If
End If
End With
diff --git a/wizards/source/schedule/LocalHolidays.xba b/wizards/source/schedule/LocalHolidays.xba
index d5bb35ceacdd..914ea67152f3 100644
--- a/wizards/source/schedule/LocalHolidays.xba
+++ b/wizards/source/schedule/LocalHolidays.xba
@@ -79,9 +79,9 @@ Dim lDate&amp;, VierterAdvent&amp;
&apos;New Year
CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;Nytårsdag&quot;, cHolidayType_Full)
lDate = CalEasterTable (YearInt)
- &apos;&quot;Fasching&quot;
+ &apos; carnival
CalInsertBankholiday(lDate-49, &quot;Fastelavn&quot;, cHolidayType_Half)
- &apos;&quot;Gründonnerstag&quot;
+ &apos;&quot;Maundy Tuesday
CalInsertBankholiday(lDate-3, &quot;Skærtorsdag&quot;, cHolidayType_Full)
&apos;&quot;Good Friday &quot;
CalInsertBankholiday(lDate-2, &quot;Langfredag&quot;, cHolidayType_Full)
@@ -540,7 +540,7 @@ End Sub
Sub FindWholeYearHolidays_CN(YearInt as Integer)
CalculateChineseNewYear(YearInt)
CalInsertBankholiday(DateSerial(YearInt, 1, 1), &quot;元旦&quot;, cHolidayType_Full) &apos; New Year
- CalInsertBankholiday(DateSerial(YearInt, 3, 8), &quot;妇女节&quot;, cHolidayType_Half) &apos; Women&apos;s Day
+ CalInsertBankholiday(DateSerial(YearInt, 3, 8), &quot;妇女节&quot;, cHolidayType_Half) &apos; Women&apos;s Day
CalInsertBankholiday(DateSerial(YearInt, 4, 5), &quot;清明节&quot;, cHolidayType_Half) &apos; Day of the deads
CalInsertBankholiday(DateSerial(YearInt, 5, 1), &quot;劳动节&quot;, cHolidayType_Full) &apos; International Labour Day
CalInsertBankholiday(DateSerial(YearInt, 6, 1), &quot;儿童节&quot;, cHolidayType_Half) &apos; Children&apos;s Day
diff --git a/wizards/source/schedule/OwnEvents.xba b/wizards/source/schedule/OwnEvents.xba
index 71c9835d156c..e43998bc894c 100644
--- a/wizards/source/schedule/OwnEvents.xba
+++ b/wizards/source/schedule/OwnEvents.xba
@@ -208,7 +208,7 @@ GETDATEFORMAT:
GetDateUnits() =SBDATEUNDEFINED
NODATEFORMAT:
If Err &lt;&gt; 0 Then
- MsgBox(&quot;Error: Datum : &apos; &quot; &amp; LocDateStr &amp; &quot;&apos; is not a valid Format&quot;, 16, sWizardTitle)
+ MsgBox(&quot;Error: Date : &apos; &quot; &amp; LocDateStr &amp; &quot;&apos; is not a valid Format&quot;, 16, sWizardTitle)
Resume GETRETURNVALUE
GETRETURNVALUE:
GetDateUnits() = SBDATEUNDEFINED