Fixed the problem with localized formula function names, for Deutsch translation.

This commit is contained in:
依瑪貓 2017-06-10 09:10:12 +08:00
parent 0d1c2ea2b2
commit b3df7ae1d2
2 changed files with 42 additions and 12 deletions

View File

@ -59,7 +59,7 @@ Sub subCreateReport ( _
aBaseStats As aStats, aQuery As aFindIVParam, maIVs () As aIV) aBaseStats As aStats, aQuery As aFindIVParam, maIVs () As aIV)
Dim oDoc As Object, oSheet As Object Dim oDoc As Object, oSheet As Object
Dim oRange As Object, oColumns As Object, oRows As Object Dim oRange As Object, oColumns As Object, oRows As Object
Dim oCell As Object, sFormula As String Dim oCell As Object, sFormula As String, sFormulaLocal As String
Dim nI As Integer, nJ As Integer, nCol As Integer Dim nI As Integer, nJ As Integer, nCol As Integer
Dim nLeadCols As Integer, nTotalCols As Integer Dim nLeadCols As Integer, nTotalCols As Integer
Dim nEvolved As Integer, fMaxLevel As Double Dim nEvolved As Integer, fMaxLevel As Double
@ -180,8 +180,10 @@ Sub subCreateReport ( _
sFormula = "=(" & sColIVAttack & "+" & sColIVDefense _ sFormula = "=(" & sColIVAttack & "+" & sColIVDefense _
& "+" & sColIVStamina & ")/45" & "+" & sColIVStamina & ")/45"
oCell.setFormula (sFormula) oCell.setFormula (sFormula)
sFormula = oCell.getPropertyValue ("FormulaLocal") sFormulaLocal = oCell.getPropertyValue ("FormulaLocal")
oCell.setPropertyValue ("FormulaLocal", sFormula) If sFormulaLocal <> sFormula Then
oCell.setPropertyValue ("FormulaLocal", sFormulaLocal)
End If
nCol = nLeadCols nCol = nLeadCols
If aBaseStats.bIsLastForm Then If aBaseStats.bIsLastForm Then
@ -189,8 +191,10 @@ Sub subCreateReport ( _
sFormula = fnGetCPFormula (aBaseStats, _ sFormula = fnGetCPFormula (aBaseStats, _
sColIVAttack, sColIVDefense, sColIVStamina, sMaxCPM) sColIVAttack, sColIVDefense, sColIVStamina, sMaxCPM)
oCell.setFormula (sFormula) oCell.setFormula (sFormula)
sFormula = oCell.getPropertyValue ("FormulaLocal") sFormulaLocal = oCell.getPropertyValue ("FormulaLocal")
oCell.setPropertyValue ("FormulaLocal", sFormula) If sFormulaLocal <> sFormula Then
oCell.setPropertyValue ("FormulaLocal", sFormulaLocal)
End If
nCol = nCol + 1 nCol = nCol + 1
End If End If
For nJ = 0 To nEvolved - 1 For nJ = 0 To nEvolved - 1
@ -198,16 +202,23 @@ Sub subCreateReport ( _
sFormula = fnGetCPFormula (maEvBaseStats (nJ), _ sFormula = fnGetCPFormula (maEvBaseStats (nJ), _
sColIVAttack, sColIVDefense, sColIVStamina, sCPM) sColIVAttack, sColIVDefense, sColIVStamina, sCPM)
oCell.setFormula (sFormula) oCell.setFormula (sFormula)
sFormula = oCell.getPropertyValue ("FormulaLocal") sFormulaLocal = oCell.getPropertyValue ("FormulaLocal")
oCell.setPropertyValue ("FormulaLocal", sFormula) If sFormulaLocal <> sFormula Then
oCell.setPropertyValue ("FormulaLocal", sFormulaLocal)
End If
nCol = nCol + 1 nCol = nCol + 1
If maEvBaseStats (nJ).bIsLastForm Then If maEvBaseStats (nJ).bIsLastForm Then
oCell = oSheet.getCellByPosition (nCol, nI + 1) oCell = oSheet.getCellByPosition (nCol, nI + 1)
sFormula = fnGetCPFormula (maEvBaseStats (nJ), _ sFormula = fnGetCPFormula (maEvBaseStats (nJ), _
sColIVAttack, sColIVDefense, sColIVStamina, sMaxCPM) sColIVAttack, sColIVDefense, _
sColIVStamina, sMaxCPM)
oCell.setFormula (sFormula) oCell.setFormula (sFormula)
sFormula = oCell.getPropertyValue ("FormulaLocal") sFormulaLocal = oCell.getPropertyValue ( _
oCell.setPropertyValue ("FormulaLocal", sFormula) "FormulaLocal")
If sFormulaLocal <> sFormula Then
oCell.setPropertyValue ( _
"FormulaLocal", sFormulaLocal)
End If
nCol = nCol + 1 nCol = nCol + 1
End If End If
Next nJ Next nJ

View File

@ -61,7 +61,7 @@ Sub subCreateReport ( _
aBaseStats As aStats, aQuery As aFindIVParam, maIVs () As aIV) aBaseStats As aStats, aQuery As aFindIVParam, maIVs () As aIV)
Dim oDoc As Object, oSheet As Object Dim oDoc As Object, oSheet As Object
Dim oRange As Object, oColumns As Object, oRows As Object Dim oRange As Object, oColumns As Object, oRows As Object
Dim oCell As Object, sFormula As String Dim oCell As Object, sFormula As String, sFormulaLocal As String
Dim nI As Integer, nJ As Integer, nCol As Integer Dim nI As Integer, nJ As Integer, nCol As Integer
Dim nLeadCols As Integer, nTotalCols As Integer Dim nLeadCols As Integer, nTotalCols As Integer
Dim nEvolved As Integer, fMaxLevel As Double Dim nEvolved As Integer, fMaxLevel As Double
@ -182,6 +182,10 @@ Sub subCreateReport ( _
sFormula = &quot;=(&quot; &amp; sColIVAttack &amp; &quot;+&quot; &amp; sColIVDefense _ sFormula = &quot;=(&quot; &amp; sColIVAttack &amp; &quot;+&quot; &amp; sColIVDefense _
&amp; &quot;+&quot; &amp; sColIVStamina &amp; &quot;)/45&quot; &amp; &quot;+&quot; &amp; sColIVStamina &amp; &quot;)/45&quot;
oCell.setFormula (sFormula) oCell.setFormula (sFormula)
sFormulaLocal = oCell.getPropertyValue (&quot;FormulaLocal&quot;)
If sFormulaLocal &lt;&gt; sFormula Then
oCell.setPropertyValue (&quot;FormulaLocal&quot;, sFormulaLocal)
End If
nCol = nLeadCols nCol = nLeadCols
If aBaseStats.bIsLastForm Then If aBaseStats.bIsLastForm Then
@ -189,6 +193,10 @@ Sub subCreateReport ( _
sFormula = fnGetCPFormula (aBaseStats, _ sFormula = fnGetCPFormula (aBaseStats, _
sColIVAttack, sColIVDefense, sColIVStamina, sMaxCPM) sColIVAttack, sColIVDefense, sColIVStamina, sMaxCPM)
oCell.setFormula (sFormula) oCell.setFormula (sFormula)
sFormulaLocal = oCell.getPropertyValue (&quot;FormulaLocal&quot;)
If sFormulaLocal &lt;&gt; sFormula Then
oCell.setPropertyValue (&quot;FormulaLocal&quot;, sFormulaLocal)
End If
nCol = nCol + 1 nCol = nCol + 1
End If End If
For nJ = 0 To nEvolved - 1 For nJ = 0 To nEvolved - 1
@ -196,12 +204,23 @@ Sub subCreateReport ( _
sFormula = fnGetCPFormula (maEvBaseStats (nJ), _ sFormula = fnGetCPFormula (maEvBaseStats (nJ), _
sColIVAttack, sColIVDefense, sColIVStamina, sCPM) sColIVAttack, sColIVDefense, sColIVStamina, sCPM)
oCell.setFormula (sFormula) oCell.setFormula (sFormula)
sFormulaLocal = oCell.getPropertyValue (&quot;FormulaLocal&quot;)
If sFormulaLocal &lt;&gt; sFormula Then
oCell.setPropertyValue (&quot;FormulaLocal&quot;, sFormulaLocal)
End If
nCol = nCol + 1 nCol = nCol + 1
If maEvBaseStats (nJ).bIsLastForm Then If maEvBaseStats (nJ).bIsLastForm Then
oCell = oSheet.getCellByPosition (nCol, nI + 1) oCell = oSheet.getCellByPosition (nCol, nI + 1)
sFormula = fnGetCPFormula (maEvBaseStats (nJ), _ sFormula = fnGetCPFormula (maEvBaseStats (nJ), _
sColIVAttack, sColIVDefense, sColIVStamina, sMaxCPM) sColIVAttack, sColIVDefense, _
sColIVStamina, sMaxCPM)
oCell.setFormula (sFormula) oCell.setFormula (sFormula)
sFormulaLocal = oCell.getPropertyValue ( _
&quot;FormulaLocal&quot;)
If sFormulaLocal &lt;&gt; sFormula Then
oCell.setPropertyValue ( _
&quot;FormulaLocal&quot;, sFormulaLocal)
End If
nCol = nCol + 1 nCol = nCol + 1
End If End If
Next nJ Next nJ