1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE script:module PUBLIC
"-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3 <script:module xmlns:
script=
"http://openoffice.org/2000/script" script:
name=
"GermanHolidays" script:
language=
"StarBasic">Option Explicit
6 Call CalAutopilotTable()
9 Function CalGetGermanLandAtMousePos(byval X as single, byval Y as single) as Integer
11 If (X
>73)And(X
<130)And(Y
>=
117)And(Y
<181) Then
12 CalChoosenLand = CalBLBayern
14 ElseIf (X
>41)And(X
<89)And(Y
>=
136)And(Y
<183) Then
15 CalChoosenLand = CalBLBadenWuert
17 ElseIf (X
>18)And(X
<35)And(Y
>136)And(Y
<147) Then
18 CalChoosenLand = CalBLSaarland
20 ElseIf (X
>13)And(X
<42)And(Y
>111)And(Y
<146) Then
21 CalChoosenLand = CalBLRheinlandPfalz
23 ElseIf (X
>15)And(X
<=
60)And(Y
>=
69)And(Y
<112) Then
24 CalChoosenLand = CalBLNordrheinWest
26 ElseIf (X
>=
42)And(X
<78)And(Y
>=
95)And(Y
<136) Then
27 CalChoosenLand = CalBLHessen
29 ElseIf (X
>=
78)And(X
<112)And(Y
>=
95)And(Y
<117) Then
30 CalChoosenLand = CalBLThueringen
32 ElseIf (X
>=
112)And(X
<158)And(Y
>=
88)And(Y
<114) Then
33 CalChoosenLand = CalBLSachsen
35 ElseIf (X
>77)And(X
<84)And(Y
>35)And(Y
<42) Then
36 CalChoosenLand = CalBLHamburg
38 ElseIf (X
>56)And(X
<60)And(Y
>36)And(Y
<41) Then
39 CalChoosenLand = CalBLBremen
41 ElseIf (X
>58)And(X
<63)And(Y
>44)And(Y
<52) Then
42 CalChoosenLand = CalBLBremen
44 ElseIf (X
>52)And(X
<95)And(Y
>8)And(Y
<40) Then
45 CalChoosenLand = CalBLSchlHolstein
47 ElseIf (X
>90)And(X
<149)And(Y
>23)And(Y
<48) Then
48 CalChoosenLand = CalBLMeckPomm
50 ElseIf (X
>28)And(X
<90)And(Y
>35)And(Y
<69) Then
51 CalChoosenLand = CalBLNiedersachsen
53 ElseIf (X
>60)And(X
<90)And(Y
>=
69)And(Y
<95) Then
54 CalChoosenLand = CalBLNiedersachsen
56 ElseIf (X
>=
90)And(X
<=
115)And(Y
>47)And(Y
<95) Then
57 CalChoosenLand = CalBLSachsenAnhalt
59 ElseIf (X
>129)And(X
<139)And(Y
>60)And(Y
<66) Then
60 CalChoosenLand = CalBLBerlin
62 ElseIf (X
>115)And(X
<151)And(Y
>=
48)And(Y
<88) Then
63 CalChoosenLand = CalBLBrandenburg
65 CalGetGermanLandAtMousePos = CalChoosenLand
70 Sub CalFindWholeYearHolidays_GERMANY(ByVal iSelYear as Integer, ByVal iCountry as Integer)
72 Dim OsternDate
&, VierterAdvent
&
74 If (iCountry
< 1) Or (iCountry
> 16) Then
75 iCountry = CalBLHamburg
77 OsternDate
& = CalEasterTable
&(iSelYear)
80 CalInsertBankholiday(DateSerial(iSelYear,
1,
1),
"Neujahr
", cHolidayType_Full)
82 If (iCountry = CalBLBayern) Or (iCountry = CalBLBadenWuert) Or (iCountry = CalBLSachsenAnhalt) Then
83 CalInsertBankholiday(DateSerial(iSelYear,
1,
6),
"Hl.
3 Könige
", cHolidayType_Full)
86 CalInsertBankholiday(OsternDate
&-
2,
"Karfreitag
", cHolidayType_Full)
87 CalInsertBankholiday(OsternDate
&,
"Ostersonntag
", cHolidayType_Full)
88 CalInsertBankholiday(OsternDate
&+
1,
"Ostermontag
", cHolidayType_Full)
89 CalInsertBankholiday(DateSerial(iSelYear,
5,
1),
"Maifeiertag
", cHolidayType_Full)
90 CalInsertBankholiday(OsternDate
&+
39,
"Christi Himmelfahrt
", cHolidayType_Full)
91 CalInsertBankholiday(OsternDate
&+
49,
"Pfingstsonntag
", cHolidayType_Full)
92 CalInsertBankholiday(OsternDate
&+
50,
"Pfingstmontag
", cHolidayType_Full)
94 If (iCountry = CalBLBadenWuert) Or (iCountry = CalBLBayern) Or (iCountry = CalBLHessen) Or (iCountry = CalBLNordRheinWest) Or (iCountry = CalBLRheinlandPfalz) Or (iCountry = CalBLSaarland) Or (iCountry = CalBLSachsen) Or (iCountry = CalBLThueringen) Then
95 CalInsertBankholiday(OsternDate
&+
60,
"Fronleichnam
", cHolidayType_Full)
98 If (iCountry = CalBLBayern) Or (iCountry = CalBLSaarland) Then
99 CalInsertBankholiday(DateSerial(iSelYear,
8,
15),
"Mariä Himmelfahrt
", cHolidayType_Full)
102 CalInsertBankholiday(DateSerial(iSelYear,
10,
3),
"Tag der dt. Einheit
", cHolidayType_Full)
104 If (iCountry=CalBLBrandenburg) Or (iCountry=CalBLMeckPomm) Or (iCountry=CalBLSachsenAnhalt) Or (iCountry=CalBLSachsen) Or (iCountry=CalBLThueringen) Then
105 CalInsertBankholiday(DateSerial(iSelYear,
10,
31),
"Reformationstag
", cHolidayType_Full)
108 If (iCountry = CalBLBadenWuert) Or (iCountry = CalBLBayern) Or (iCountry = CalBLNordRheinWest) Or (iCountry = CalBLRheinlandPfalz) Or (iCountry = CalBLSaarland) Or (iCountry = CalBLSachsen) Or (iCountry = CalBLThueringen) Then
109 CalInsertBankholiday(DateSerial(iSelYear,
11,
1),
"Allerheiligen
", cHolidayType_Full)
112 vierterAdvent = DateSerial(iSelYear,
12,
24)
113 While WeekDay(vierterAdvent)
<> So
114 vierterAdvent = vierterAdvent -
1
117 If iCountry = CalBLSachsen Then
118 CalInsertBankholiday(vierterAdvent-
32,
"Buß- und Bettag
", cHolidayType_Full)
120 CalInsertBankholiday(vierterAdvent-
32,
"Buß- und Bettag
", cHolidayType_Half)
122 CalInsertBankholiday(vierterAdvent-
21,
"1. Advent
", cHolidayType_Full)
123 CalInsertBankholiday(vierterAdvent-
14,
"2. Advent
", cHolidayType_Full)
124 CalInsertBankholiday(vierterAdvent-
7,
"3. Advent
", cHolidayType_Full)
125 CalInsertBankholiday(vierterAdvent,
"4. Advent
", cHolidayType_Full)
127 CalInsertBankholiday(Dateserial(iSelYear,
12,
24),
"Heiligabend
", cHolidayType_Half)
128 CalInsertBankholiday(Dateserial(iSelYear,
12,
25),
"1. Weihnachtstag
", cHolidayType_Full)
129 CalInsertBankholiday(Dateserial(iSelYear,
12,
26),
"2. Weihnachtstag
", cHolidayType_Full)
130 CalInsertBankholiday(Dateserial(iSelYear,
12,
31),
"Sylvester
", cHolidayType_Half)