diff options
author | Behrend Cornelius <bc@openoffice.org> | 2002-10-16 10:45:35 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2002-10-16 10:45:35 +0000 |
commit | aadd1daf27f535c1a17c0acbc3d8a5794d9e6e36 (patch) | |
tree | 525de29bd86c9524d9b330a3bb2275364d582800 /wizards | |
parent | #104114# creation of new document modified (diff) | |
download | core-aadd1daf27f535c1a17c0acbc3d8a5794d9e6e36.tar.gz core-aadd1daf27f535c1a17c0acbc3d8a5794d9e6e36.zip |
#96771# Dateformats for other locales added
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/source/schedule/CalendarMain.xba | 30 | ||||
-rw-r--r-- | wizards/source/schedule/DlgControl.xba | 20 | ||||
-rw-r--r-- | wizards/source/schedule/LocalHolidays.xba | 6 | ||||
-rw-r--r-- | wizards/source/schedule/OwnEvents.xba | 2 |
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() -' sCurLanguage = "ja" With DlgCalModel .cmdDelete.Enabled = False .lstMonth.StringItemList() = cCalShortMonthNames() Select Case sCurLangLocale - Case "ja" + Case cLANGUAGE_JAPANESE .lstOwnData.FontName = "HG Mincho Light J" .txtEvent.FontName = "HG Mincho Light J" - Case "zh" + Case cLANGUAGE_CHINESE If oDocument.CharLocale.Country = "CN" Then .lstOwnData.FontName = "HG MSung Light SC" .txtEvent.FontName = "HG MSung Light SC" @@ -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 = "TT.MMM" Case cLANGUAGE_ENGLISH - DateFormatString = "DD/MMM" + DateFormatString = "MMM DD" Case cLANGUAGE_FRENCH + DateFormatString = "JJ/MMM" Case cLANGUAGE_ITALIAN + DateFormatString = "GG/MMM" Case cLANGUAGE_SPANISH + DateFormatString = "DD/MMM" Case cLANGUAGE_PORTUGUESE + DateFormatString = "DD-MMM" Case cLANGUAGE_DUTCH + DateFormatString = "DD-MMM" Case cLANGUAGE_SWEDISH + DateFormatString = "MMM DD" Case cLANGUAGE_DANISH + DateFormatString = "DD-MMM" Case cLANGUAGE_POLISH + DateFormatString = "MMM DD" Case cLANGUAGE_RUSSIAN + DateFormatString = "MMM DD" Case cLANGUAGE_JAPANESE + DateFormatString = "M月D日" Case cLANGUAGE_CHINESE -' If sCurCountryLocale = "TW" Then -' Else -' End If + If sCurCountryLocale = "TW" Then + DateFormatString = "MMMMD" &"""" & "日" & """" + Else + DateFormatString = "M" & """" & "月" & """" & "D" &"""" & "日" & """" + End If Case cLANGUAGE_GREEK + DateFormatString = "DD/MMM" Case cLANGUAGE_TURKISH + DateFormatString = "DD/MMM" Case cLANGUAGE_POLISH + DateFormatString = "MMM DD" Case cLANGUAGE_FINNISH + DateFormatString = "PP.KKK" 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()) > -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) ' Flag to store the new data bCalOwnDataChanged = True - DlgCalModel.cmdDelete.Enabled = Ubound(DlgCalModel.lstOwnData.StringItemList()) > -1 - Call CalClearInputMask() + bDoEnable = Ubound(DlgCalModel.lstOwnData.StringItemList()) > -1 + DlgCalModel.cmdDelete.Enabled = bDoEnable + If bDoEnable Then + MaxIndex = Ubound(DlgCalModel.lstOwnData.StringItemList()) + If iSel > MaxIndex Then + iSel = MaxIndex + End If + DlgCalendar.GetControl("lstOwnData").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&, VierterAdvent& 'New Year CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nytårsdag", cHolidayType_Full) lDate = CalEasterTable (YearInt) - '"Fasching" + ' carnival CalInsertBankholiday(lDate-49, "Fastelavn", cHolidayType_Half) - '"Gründonnerstag" + '"Maundy Tuesday CalInsertBankholiday(lDate-3, "Skærtorsdag", cHolidayType_Full) '"Good Friday " CalInsertBankholiday(lDate-2, "Langfredag", cHolidayType_Full) @@ -540,7 +540,7 @@ End Sub Sub FindWholeYearHolidays_CN(YearInt as Integer) CalculateChineseNewYear(YearInt) CalInsertBankholiday(DateSerial(YearInt, 1, 1), "元旦", cHolidayType_Full) ' New Year - CalInsertBankholiday(DateSerial(YearInt, 3, 8), "妇女节", cHolidayType_Half) ' Women's Day + CalInsertBankholiday(DateSerial(YearInt, 3, 8), "妇女节", cHolidayType_Half) ' Women's Day CalInsertBankholiday(DateSerial(YearInt, 4, 5), "清明节", cHolidayType_Half) ' Day of the deads CalInsertBankholiday(DateSerial(YearInt, 5, 1), "劳动节", cHolidayType_Full) ' International Labour Day CalInsertBankholiday(DateSerial(YearInt, 6, 1), "儿童节", cHolidayType_Half) ' Children'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 <> 0 Then - MsgBox("Error: Datum : ' " & LocDateStr & "' is not a valid Format", 16, sWizardTitle) + MsgBox("Error: Date : ' " & LocDateStr & "' is not a valid Format", 16, sWizardTitle) Resume GETRETURNVALUE GETRETURNVALUE: GetDateUnits() = SBDATEUNDEFINED |