diff options
author | Behrend Cornelius <bc@openoffice.org> | 2001-12-12 11:50:15 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2001-12-12 11:50:15 +0000 |
commit | 1a9ca7e70698984dd83a1eba1c7187ba20ec04c3 (patch) | |
tree | f0414a7d21bdf6061bd1ad05201655b850502a69 | |
parent | eadb9f5396cdfc6f9e5f3188396d31ea91f532c0 (diff) |
#95295# Coordinates of graphic now with Corrfactor
-rw-r--r-- | wizards/source/schedule/CalendarMain.xba | 2 | ||||
-rw-r--r-- | wizards/source/schedule/DlgCalendar.xdl | 2 | ||||
-rw-r--r-- | wizards/source/schedule/DlgControl.xba | 7 | ||||
-rw-r--r-- | wizards/source/schedule/GermanHolidays.xba | 16 |
4 files changed, 15 insertions, 12 deletions
diff --git a/wizards/source/schedule/CalendarMain.xba b/wizards/source/schedule/CalendarMain.xba index 764cc4172..80d57713e 100644 --- a/wizards/source/schedule/CalendarMain.xba +++ b/wizards/source/schedule/CalendarMain.xba @@ -111,6 +111,8 @@ Dim iThisMonth as Integer DlgCalendar.GetControl("lstHolidays").SelectItemPos(0,True) DlgCalModel.cmdGoOn.DefaultButton = True ToggleWindow(True) + fHeightCorrFactor = DlgCalendar.GetControl("imgCountry").Size.Height/198 + fWidthCorrFactor = DlgCalendar.GetControl("imgCountry").Size.Width/166 DlgCalendar.Execute() DlgCalendar.Dispose() Exit Sub diff --git a/wizards/source/schedule/DlgCalendar.xdl b/wizards/source/schedule/DlgCalendar.xdl index 9817ad87e..2c9d3156d 100644 --- a/wizards/source/schedule/DlgCalendar.xdl +++ b/wizards/source/schedule/DlgCalendar.xdl @@ -2,7 +2,7 @@ <!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> <dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Dialog1" dlg:left="160" dlg:top="81" dlg:width="208" dlg:height="156" dlg:page="1" dlg:help-url="HID:34700"> <dlg:styles> - <dlg:style dlg:style-id="0" dlg:background-color="0xffffff"/> + <dlg:style dlg:style-id="0" dlg:background-color="0xffffff" dlg:border="none"/> <dlg:style dlg:style-id="1" dlg:font-name="Cumberland" dlg:font-stylename="Standard" dlg:font-family="modern" dlg:font-charset="ansi"/> <dlg:style dlg:style-id="2" dlg:font-name="Cumberland" dlg:font-stylename="Standard" dlg:font-family="modern" dlg:font-charset="ansi"/> </dlg:styles> diff --git a/wizards/source/schedule/DlgControl.xba b/wizards/source/schedule/DlgControl.xba index c8fea5450..20c7c4964 100644 --- a/wizards/source/schedule/DlgControl.xba +++ b/wizards/source/schedule/DlgControl.xba @@ -4,6 +4,9 @@ Dim CalBitmap As Object Public bSelectByMouseMove as Boolean +Public fHeightCorrFactor as Double +Public fWidthCorrFactor as Double + ' Todo: Adjustmentlistener an der Scrollbar anmelden @@ -56,7 +59,7 @@ Dim ListIndex as Integer Case cLANGUAGE_GERMAN If bSelectByMouseMove Then ' oStatusLine.SetText("Position: " & aEvent.X & " ; " & aEvent.Y) - ListIndex = CalGetGermanLandAtMousePos(aEvent.X, aEvent.Y, Land$) + ListIndex = CalGetGermanLandAtMousePos(CInt(aEvent.X/fWidthCorrFactor), CInt(aEvent.Y/fHeightCorrFactor), Land$) DlgCalendar.GetControl("lstHolidays").SelectItemPos(ListIndex, True) End If End Select @@ -88,8 +91,6 @@ Dim NullList() as String .txtEvent.Text = "" .txtOwnEventDay.SetPropertyToDefault("Value") .cmdInsert.Enabled = False -' Todo: Wie kriegt man den Focus auf dieses verdammte Control? -' .txtEvent.DefaultButton = True End With DlgCalendar.GetControl("lstOwnEventMonth").SelectItemPos(0,True) CurOwnMonth = 1 diff --git a/wizards/source/schedule/GermanHolidays.xba b/wizards/source/schedule/GermanHolidays.xba index eff2cf33d..14003c19f 100644 --- a/wizards/source/schedule/GermanHolidays.xba +++ b/wizards/source/schedule/GermanHolidays.xba @@ -29,22 +29,22 @@ Function CalGetGermanLandAtMousePos(byval X as single, byval Y as single) as Int ElseIf (X>=78)And(X<112)And(Y>=95)And(Y<117) Then CalChoosenLand = CalBLThueringen - ElseIf (X>=112)And(X<155)And(Y>=88)And(Y<114) Then + ElseIf (X>=112)And(X<158)And(Y>=88)And(Y<114) Then CalChoosenLand = CalBLSachsen - ElseIf (X>76)And(X<80)And(Y>35)And(Y<42) Then + ElseIf (X>77)And(X<84)And(Y>35)And(Y<42) Then CalChoosenLand = CalBLHamburg - ElseIf (X>55)And(X<59)And(Y>36)And(Y<41) Then + ElseIf (X>56)And(X<60)And(Y>36)And(Y<41) Then CalChoosenLand = CalBLBremen - ElseIf (X>57)And(X<62)And(Y>44)And(Y<52) Then + ElseIf (X>58)And(X<63)And(Y>44)And(Y<52) Then CalChoosenLand = CalBLBremen ElseIf (X>52)And(X<95)And(Y>8)And(Y<40) Then CalChoosenLand = CalBLSchlHolstein - ElseIf (X>90)And(X<146)And(Y>23)And(Y<48) Then + ElseIf (X>90)And(X<149)And(Y>23)And(Y<48) Then CalChoosenLand = CalBLMeckPomm ElseIf (X>28)And(X<90)And(Y>35)And(Y<69) Then @@ -53,13 +53,13 @@ Function CalGetGermanLandAtMousePos(byval X as single, byval Y as single) as Int ElseIf (X>60)And(X<90)And(Y>=69)And(Y<95) Then CalChoosenLand = CalBLNiedersachsen - ElseIf (X>=90)And(X<=112)And(Y>47)And(Y<95) Then + ElseIf (X>=90)And(X<=115)And(Y>47)And(Y<95) Then CalChoosenLand = CalBLSachsenAnhalt - ElseIf (X>127)And(X<135)And(Y>60)And(Y<66) Then + ElseIf (X>129)And(X<139)And(Y>60)And(Y<66) Then CalChoosenLand = CalBLBerlin - ElseIf (X>112)And(X<146)And(Y>=48)And(Y<88) Then + ElseIf (X>115)And(X<151)And(Y>=48)And(Y<88) Then CalChoosenLand = CalBLBrandenburg End If CalGetGermanLandAtMousePos = CalChoosenLand |