Added first uno control image.
This commit is contained in:
@ -1,6 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="0Main" script:language="StarBasic">' 0Main: The main module for the Pokémon GO IV calculator
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="0Main" script:language="StarBasic">' Copyright (c) 2016 imacat.
|
||||
'
|
||||
' Licensed under the Apache License, Version 2.0 (the "License");
|
||||
' you may not use this file except in compliance with the License.
|
||||
' You may obtain a copy of the License at
|
||||
'
|
||||
' http://www.apache.org/licenses/LICENSE-2.0
|
||||
'
|
||||
' Unless required by applicable law or agreed to in writing, software
|
||||
' distributed under the License is distributed on an "AS IS" BASIS,
|
||||
' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
' See the License for the specific language governing permissions and
|
||||
' limitations under the License.
|
||||
|
||||
' 0Main: The main module for the Pokémon GO IV calculator
|
||||
' by imacat <imacat@mail.imacat.idv.tw>, 2016-11-27
|
||||
|
||||
Option Explicit
|
||||
@ -81,6 +95,9 @@ Function fnAskParam As aFindIVParam
|
||||
oDialog.getControl ("cbxBest3").setVisible (False)
|
||||
oDialog.getControl ("lstApprasal2").setVisible (False)
|
||||
|
||||
' TODO: To be removed.
|
||||
oDialog.getControl ("imgTeam").getModel.setPropertyValue ("ImageURL", fnGetImageUrl ("TeamValor"))
|
||||
|
||||
If oDialog.execute = 0 Then
|
||||
aQuery.bIsCancelled = True
|
||||
fnAskParam = aQuery
|
||||
|
@ -1,6 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="1Data" script:language="StarBasic">' 1Data: The Pokémon GO data for IV calculation
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="1Data" script:language="StarBasic">' Copyright (c) 2016 imacat.
|
||||
'
|
||||
' Licensed under the Apache License, Version 2.0 (the "License");
|
||||
' you may not use this file except in compliance with the License.
|
||||
' You may obtain a copy of the License at
|
||||
'
|
||||
' http://www.apache.org/licenses/LICENSE-2.0
|
||||
'
|
||||
' Unless required by applicable law or agreed to in writing, software
|
||||
' distributed under the License is distributed on an "AS IS" BASIS,
|
||||
' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
' See the License for the specific language governing permissions and
|
||||
' limitations under the License.
|
||||
|
||||
' 1Data: The Pokémon GO data for IV calculation
|
||||
' by imacat <imacat@mail.imacat.idv.tw>, 2016-12-06
|
||||
' Generated with 9Load.subReadDataSheets ()
|
||||
|
||||
|
58
oxt/PokemonGoIV/8Registry.xba
Normal file
58
oxt/PokemonGoIV/8Registry.xba
Normal file
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="8Registry" script:language="StarBasic">' 8Registry: Utilities used from other modules to access to PokemonGoIV private configuration
|
||||
' Taken from TextToColumns, 2016-12-07
|
||||
|
||||
Option Explicit
|
||||
|
||||
Const BASE_KEY As String = "/org.openoffice.Office.Addons.PokemonGoIV.AddonConfiguration/"
|
||||
|
||||
' fnGetImageUrl: Returns the image URL for the UNO image controls.
|
||||
Function fnGetImageUrl (sName As String) As String
|
||||
Dim oRegKey As Object
|
||||
|
||||
oRegKey = fnGetRegistryKeyContent (BASE_KEY & "FileResources/" & sName)
|
||||
fnGetImageUrl = fnExpandMacroFieldExpression (oRegKey.Url)
|
||||
End Function
|
||||
|
||||
' fnGetRegistryKeyContent: Returns the registry key content
|
||||
Function fnGetRegistryKeyContent (sKeyName as string, Optional bforUpdate as Boolean)
|
||||
Dim oConfigProvider As Object
|
||||
Dim aNodePath (0) As New com.sun.star.beans.PropertyValue
|
||||
|
||||
oConfigProvider = createUnoService ( _
|
||||
"com.sun.star.configuration.ConfigurationProvider")
|
||||
aNodePath(0).Name = "nodepath"
|
||||
aNodePath(0).Value = sKeyName
|
||||
If IsMissing (bForUpdate) Then
|
||||
fnGetRegistryKeyContent = oConfigProvider.createInstanceWithArguments ("com.sun.star.configuration.ConfigurationAccess", aNodePath())
|
||||
Else
|
||||
If bForUpdate Then
|
||||
fnGetRegistryKeyContent = oConfigProvider.createInstanceWithArguments ("com.sun.star.configuration.ConfigurationUpdateAccess", aNodePath())
|
||||
Else
|
||||
fnGetRegistryKeyContent = oConfigProvider.createInstanceWithArguments ("com.sun.star.configuration.ConfigurationAccess", aNodePath())
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
' fnExpandMacroFieldExpression
|
||||
Function fnExpandMacroFieldExpression (sURL As String) As String
|
||||
Dim sTemp As String
|
||||
Dim oSM As Object
|
||||
Dim oMacroExpander As Object
|
||||
|
||||
' Gets the service manager
|
||||
oSM = getProcessServiceManager
|
||||
' Gets the macro expander
|
||||
oMacroExpander = oSM.DefaultContext.getValueByName ( _
|
||||
"/singletons/com.sun.star.util.theMacroExpander")
|
||||
|
||||
'cut the vnd.sun.star.expand: part
|
||||
sTemp = Join (Split (sURL, "vnd.sun.star.expand:"))
|
||||
|
||||
'Expand the macrofield expression
|
||||
sTemp = oMacroExpander.ExpandMacros (sTemp)
|
||||
sTemp = Trim (sTemp)
|
||||
fnExpandMacroFieldExpression = sTemp
|
||||
End Function
|
||||
</script:module>
|
@ -1,6 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="9Load" script:language="StarBasic">' 9Load: The Pokémon GO data sheets loader
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="9Load" script:language="StarBasic">' Copyright (c) 2016 imacat.
|
||||
'
|
||||
' Licensed under the Apache License, Version 2.0 (the "License");
|
||||
' you may not use this file except in compliance with the License.
|
||||
' You may obtain a copy of the License at
|
||||
'
|
||||
' http://www.apache.org/licenses/LICENSE-2.0
|
||||
'
|
||||
' Unless required by applicable law or agreed to in writing, software
|
||||
' distributed under the License is distributed on an "AS IS" BASIS,
|
||||
' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
' See the License for the specific language governing permissions and
|
||||
' limitations under the License.
|
||||
|
||||
' 9Load: The Pokémon GO data sheets loader
|
||||
' by imacat <imacat@mail.imacat.idv.tw>, 2016-11-28
|
||||
|
||||
Option Explicit
|
||||
@ -11,6 +25,20 @@ Sub subReadDataSheets
|
||||
Dim sOutput as String, mData As Variant
|
||||
|
||||
sOutput = "" _
|
||||
& "' Copyright (c) 2016 imacat." & Chr (10) _
|
||||
& "' " & Chr (10) _
|
||||
& "' Licensed under the Apache License, Version 2.0 (the ""License"");" & Chr (10) _
|
||||
& "' you may not use this file except in compliance with the License." & Chr (10) _
|
||||
& "' You may obtain a copy of the License at" & Chr (10) _
|
||||
& "' " & Chr (10) _
|
||||
& "' http://www.apache.org/licenses/LICENSE-2.0" & Chr (10) _
|
||||
& "' " & Chr (10) _
|
||||
& "' Unless required by applicable law or agreed to in writing, software" & Chr (10) _
|
||||
& "' distributed under the License is distributed on an ""AS IS"" BASIS," & Chr (10) _
|
||||
& "' WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied." & Chr (10) _
|
||||
& "' See the License for the specific language governing permissions and" & Chr (10) _
|
||||
& "' limitations under the License." & Chr (10) _
|
||||
& Chr (10) _
|
||||
& "' 1Data: The Pokémon GO data for IV calculation" & Chr (10) _
|
||||
& "' by imacat <imacat@mail.imacat.idv.tw>, " & Format (Date (), "yyyy-mm-dd") & Chr (10) _
|
||||
& "' Generated with 9Load.subReadDataSheets ()" & Chr (10) _
|
||||
|
@ -1,8 +1,8 @@
|
||||
# Strings for Dialog Library PokemonGoIV
|
||||
2.DlgMain.HelpText=
|
||||
3.DlgMain.Title=Pok\u00c3\u00a9mon GO IV Calculator
|
||||
3.DlgMain.Title=Pok\u00e9mon GO IV Calculator
|
||||
22.DlgMain.txtPokemon.HelpText=
|
||||
23.DlgMain.txtPokemon.Label=~Pok\u00c3\u00a9mon:
|
||||
23.DlgMain.txtPokemon.Label=~Pok\u00e9mon:
|
||||
26.DlgMain.txtCP.HelpText=
|
||||
27.DlgMain.txtCP.Label=~CP:
|
||||
28.DlgMain.numCP.HelpText=
|
||||
@ -14,7 +14,7 @@
|
||||
40.DlgMain.txtPlayerLevel.HelpText=
|
||||
41.DlgMain.txtPlayerLevel.Label=Player ~level:
|
||||
46.DlgMain.cbxIsNew.HelpText=
|
||||
47.DlgMain.cbxIsNew.Label=This Pok\u00c3\u00a9mon is ~newly-caught and was not powered-up yet.
|
||||
47.DlgMain.cbxIsNew.Label=This Pok\u00e9mon has not been powered-up yet.
|
||||
50.DlgMain.grpApprasals.HelpText=
|
||||
51.DlgMain.grpApprasals.Label=Team Leader Apprasal
|
||||
85.DlgMain.btnOK.HelpText=
|
||||
@ -39,3 +39,5 @@
|
||||
195.DlgMain.txtBestAfter.HelpText=
|
||||
201.DlgMain.cbxBest2.HelpText=
|
||||
203.DlgMain.cbxBest3.HelpText=
|
||||
205.DlgMain.imgTeam.HelpText=
|
||||
207.DlgMain.imgTeam.HelpText=
|
||||
|
@ -14,7 +14,7 @@
|
||||
40.DlgMain.txtPlayerLevel.HelpText=
|
||||
41.DlgMain.txtPlayerLevel.Label=\u73a9\u5bb6\u7b49\u7d1a(~L)\uff1a
|
||||
46.DlgMain.cbxIsNew.HelpText=
|
||||
47.DlgMain.cbxIsNew.Label=\u6211\u525b\u6293\u5230\u9019\u96bb\u5bf6\u53ef\u5922\uff0c\u9084\u6c92\u5f37\u5316\u904e(~N)\u3002
|
||||
47.DlgMain.cbxIsNew.Label=\u9019\u96bb\u5bf6\u53ef\u5922\u9084\u6c92\u5f37\u5316\u904e(~N)\u3002
|
||||
50.DlgMain.grpApprasals.HelpText=
|
||||
51.DlgMain.grpApprasals.Label=\u968a\u9577\u8a55\u50f9
|
||||
85.DlgMain.btnOK.HelpText=
|
||||
@ -39,3 +39,5 @@
|
||||
195.DlgMain.txtBestAfter.HelpText=
|
||||
201.DlgMain.cbxBest2.HelpText=
|
||||
203.DlgMain.cbxBest3.HelpText=
|
||||
205.DlgMain.imgTeam.HelpText=
|
||||
207.DlgMain.imgTeam.HelpText=
|
||||
|
@ -5,6 +5,7 @@
|
||||
<dlg:style dlg:style-id="0" dlg:background-color="0xff0000" dlg:text-color="0xffffff" dlg:font-weight="100"/>
|
||||
<dlg:style dlg:style-id="1" dlg:background-color="0xff" dlg:text-color="0xffffff"/>
|
||||
<dlg:style dlg:style-id="2" dlg:background-color="0xffff00"/>
|
||||
<dlg:style dlg:style-id="3" dlg:border="none"/>
|
||||
</dlg:styles>
|
||||
<dlg:bulletinboard>
|
||||
<dlg:text dlg:id="txtPokemon" dlg:tab-index="16" dlg:left="5" dlg:top="6" dlg:width="30" dlg:height="8" dlg:help-text="&22.DlgMain.txtPokemon.HelpText" dlg:value="&23.DlgMain.txtPokemon.Label"/>
|
||||
@ -260,6 +261,7 @@
|
||||
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:PokemonGoIV.0Main.subRdoTeamYellowItemChanged_itemStateChanged?language=Basic&location=application" script:language="Script"/>
|
||||
</dlg:radio>
|
||||
</dlg:radiogroup>
|
||||
<dlg:img dlg:style-id="3" dlg:id="imgTeam" dlg:tab-index="25" dlg:left="130" dlg:top="55" dlg:width="20" dlg:height="20" dlg:help-text="&207.DlgMain.imgTeam.HelpText"/>
|
||||
<dlg:menulist dlg:id="lstApprasal1" dlg:tab-index="9" dlg:left="10" dlg:top="79" dlg:width="200" dlg:height="12" dlg:help-text="&164.DlgMain.lstApprasal1.HelpText" dlg:spin="true"/>
|
||||
<dlg:text dlg:id="txtBestBefore" dlg:tab-index="23" dlg:left="10" dlg:top="96" dlg:width="20" dlg:height="8" dlg:help-text="&194.DlgMain.txtBestBefore.HelpText"/>
|
||||
<dlg:menulist dlg:id="lstBest" dlg:tab-index="10" dlg:left="30" dlg:top="94" dlg:width="35" dlg:height="12" dlg:help-text="&193.DlgMain.lstBest.HelpText" dlg:spin="true">
|
||||
|
@ -4,4 +4,5 @@
|
||||
<library:element library:name="0Main"/>
|
||||
<library:element library:name="1Data"/>
|
||||
<library:element library:name="9Load"/>
|
||||
<library:element library:name="8Registry"/>
|
||||
</library:library>
|
Reference in New Issue
Block a user