summaryrefslogtreecommitdiff
path: root/wizards/source/euro
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2001-09-21 13:45:18 +0000
committerBehrend Cornelius <bc@openoffice.org>2001-09-21 13:45:18 +0000
commit314c9347677d31143ee017582fe234c79def5099 (patch)
tree6db41e0530e6958c9ff369cdc5a887ca8cb82098 /wizards/source/euro
parent4dc1fa1fe73f9d9285bb4b745ce5fbfb1d6743d1 (diff)
#91710# several modifications
Diffstat (limited to 'wizards/source/euro')
-rw-r--r--wizards/source/euro/AutoPilotRun.xba1
-rw-r--r--wizards/source/euro/Common.xba36
-rw-r--r--wizards/source/euro/ConvertRun.xba53
3 files changed, 29 insertions, 61 deletions
diff --git a/wizards/source/euro/AutoPilotRun.xba b/wizards/source/euro/AutoPilotRun.xba
index 4b82c24be065..733e95f73593 100644
--- a/wizards/source/euro/AutoPilotRun.xba
+++ b/wizards/source/euro/AutoPilotRun.xba
@@ -33,7 +33,6 @@ Dim i As Integer
InitializeConverter(oLocale, 2)
ToggleGoOnButton()
DialogModel.cmdGoOn.DefaultButton = True
-&apos; YPos = DialogConvert.PosSize.Y + DialogConvert.PosSize.Height
DialogConvert.Execute
End If
End Sub
diff --git a/wizards/source/euro/Common.xba b/wizards/source/euro/Common.xba
index 866931d2300c..4f0e56a3ca07 100644
--- a/wizards/source/euro/Common.xba
+++ b/wizards/source/euro/Common.xba
@@ -8,11 +8,11 @@ Public PasswordModel as Object
Sub RetrieveDocumentObjects()
CurMimeType = oDocument.DocumentInfo.MimeType
-&apos; If Instr(1, CurMimeType, &quot;calc&quot;) &lt;&gt; 0 Then
+ If Instr(1, CurMimeType, &quot;calc&quot;) &lt;&gt; 0 Then
oSheets = oDocument.Sheets
oSheet = oDocument.Sheets.GetbyIndex(0)
-&apos; oAddressRanges = oDocument.createInstance(&quot;com.sun.star.sheet.SheetCellRanges&quot;)
-&apos; End If
+ oAddressRanges = oDocument.createInstance(&quot;com.sun.star.sheet.SheetCellRanges&quot;)
+ End If
oStatusline = oDocument.GetCurrentController.GetFrame.CreateStatusIndicator
&apos; Retrieve the indices for the cellformatations
oFormats = oDocument.NumberFormats
@@ -40,7 +40,7 @@ Function ConvertDocument()
GoOn = True
&apos; DocDisposed = True
InitializeProgressbar()
-&apos; If Instr(1, CurMimeType, &quot;calc&quot;) &lt;&gt; 0 Then
+ If Instr(1, CurMimeType, &quot;calc&quot;) &lt;&gt; 0 Then
bDocHasProtectedSheets = CheckSheetProtection(oSheets)
If bDocHasProtectedSheets Then
bDocHasProtectedSheets = UnprotectSheetsWithPassword(oSheets, bDoUnProtect)
@@ -61,18 +61,18 @@ Function ConvertDocument()
ReprotectSheets()
bRangeListDefined = False
End If
-&apos; Else
-&apos; oStatusline.SetValue(10)
-&apos; ConvertTextFields()
-&apos; oStatusline.SetValue(80)
-&apos; ConvertWriterTables()
-&apos; End If
+ Else
+ oStatusline.SetValue(10)
+ ConvertTextFields()
+ oStatusline.SetValue(80)
+ ConvertWriterTables()
+ End If
oStatusline.End
On Local Error Goto 0
End Function
-Sub SwitchNumberFormat(oObject as Object, oFormats as object, sNewSymbol as String)
+Sub SwitchNumberFormat(oObject as Object, oFormats as object)
Dim nFormatLanguage as Integer
Dim nFormatDecimals as Integer
Dim nFormatLeading as Integer
@@ -84,19 +84,21 @@ Dim i as Integer
Dim aNewStr as String
Dim iNumberFormat as Long
Dim AddToList as Boolean
+Dim sOldCurrSymbol as String
On Local Error Resume Next
iNumberFormat = oObject.NumberFormat
On Local Error GoTo NOKEY
aFormat() = oFormats.getByKey(iNumberFormat)
On Local Error GoTo 0
- &apos; Numberformat mit dem neuen Symbol als Basis für generateFormat
- aSimpleStr = &quot;0 [$&quot;+sNewSymbol &amp; aFormat.CurrencyExtension &amp; &quot;]&quot;
- nSimpleKey = Numberformat(oFormats, aSimpleStr, oLocale)
- If Err &lt;&gt; 0 Then
- Msgbox &quot;Error Reading the Number Format&quot;
- Resume CLERROR
+ sOldCurrSymbol = aFormat.CurrencySymbol
+ If sOldCurrSymbol = CurrValue(CurrIndex,5) Then
+ aSimpleStr = &quot;0 [$EUR]&quot;
+ Else
+ aSimpleStr = &quot;0 [$&quot; &amp; sEuroSign &amp; aFormat.CurrencyExtension &amp; &quot;]&quot;
End If
+ &apos; Numberformat mit dem neuen Symbol als Basis für generateFormat
+ nSimpleKey = Numberformat(oFormats, aSimpleStr, oLocale)
&apos; Typ und Währungssymbol des Numberformats heraussuchen
&apos; neues Währungsformat mit passenden Einstellungen setzen
nFormatDecimals = 2
diff --git a/wizards/source/euro/ConvertRun.xba b/wizards/source/euro/ConvertRun.xba
index 2461ef293c0a..c1144b8a97f6 100644
--- a/wizards/source/euro/ConvertRun.xba
+++ b/wizards/source/euro/ConvertRun.xba
@@ -48,7 +48,6 @@ Dim m as Integer
Dim MaxIndex as Integer
Listbox = DialogModel.lstSelection
If Ubound(Listbox.SelectedItems()) &gt; -1 Then
-&apos; ToggleWindow(False)
EnableStep1DialogControls(False, False, False)
oSelRanges = oDocument.createInstance(&quot;com.sun.star.sheet.SheetCellRanges&quot;)
@@ -78,8 +77,8 @@ Dim MaxIndex as Integer
Wend
Next i
Else
- a = -1
&apos; Hard Formatation is selected
+ a = -1
For n = 0 To Ubound(Listbox.SelectedItems())
m = Listbox.SelectedItems(n)
RangeName = Listbox.StringItemList(m)
@@ -103,7 +102,6 @@ Dim MaxIndex as Integer
End If
oDocument.CurrentController.Select(oSelRanges)
EnableStep1DialogControls(True, True, True)
-&apos; ToggleWindow(True)
End If
End Sub
@@ -136,7 +134,7 @@ Dim bDoEnableFrame as Boolean
.optDocRanges.Enabled = bDoEnableFrame
.optSelRange.Enabled = bDoEnableFrame
End With
- &apos; The CheckBox has the Value &apos;True&apos; when the Controls in the Frame are disabled
+ &apos; The CheckBox has the Value &apos;1&apos; when the Controls in the Frame are disabled
If bButtonsEnabled Then
bCurrIsSelected = Ubound(DialogModel.lstCurrencies.SelectedItems()) &lt;&gt; -1
&apos; Enable GoOnButton only when Currency is selected
@@ -245,46 +243,16 @@ Dim OldCurrIndex as Integer
Dim OldCurExtension(2) as String
oPreSelRange = AddSelectedRangeToSelRangesEnum()
bPreSelected = True
-
-&apos; bPreSelected = CheckIfRangeisCurrency(oRange)
-&apos; If bPreSelected Then
-&apos; OldCurrSymbolList() = CurrSymbolList()
-&apos; OldCurExtension() = CurExtension()
-&apos; OldCurrIndex = CurrIndex
-&apos; For i = 0 To 11
-&apos; CurrIndex = i
-&apos; CurExtension(0) = LangIDValue(CurrIndex,0,2)
-&apos; CurExtension(1) = LangIDValue(CurrIndex,1,2)
-&apos; CurExtension(2) = LangIDValue(CurrIndex,2,2)
-&apos; InitializeCurrencyValues(CurrIndex)
-&apos; bPreSelected = CheckFormatType(oRange)
-&apos; If bPreSelected Then
-&apos; Exit For
-&apos; End If
-&apos; Next i
-&apos; If Not bPreSelected Then
-&apos; CurrIndex = OldCurrIndex
-&apos; CurrSymbolList() = OldCurrSymbolList()
-&apos; CurExtension() = OldCurExtension()
-&apos; End If
-&apos; End If
-
-&apos; If CurrIndex &gt; -1 Then
- If bPreSelected Then
- DialogModel.optSelRange.State = 1
- AddRangeToListbox(oPreSelRange)
- Else
- DialogModel.optCellTemplates.State = 1
- CreateStyleEnumeration()
- End If
-&apos; End If
+ If bPreSelected Then
+ DialogModel.optSelRange.State = 1
+ AddRangeToListbox(oPreSelRange)
+ Else
+ DialogModel.optCellTemplates.State = 1
+ CreateStyleEnumeration()
+ End If
EnableStep1DialogControls(True, bPreSelected, True)
&apos; Todo: auf Integer umstellen
-&apos; If bPreselected Then
- DialogModel.chkComplete.State = Not(Abs(bPreSelected)) &apos;0
-&apos; Else
-&apos; DialogModel.chkComplete.State = 1
-&apos; End If
+ DialogModel.chkComplete.State = Not(Abs(bPreSelected))
DialogModel.optSelRange.Enabled = bPreSelected
End Sub
@@ -304,7 +272,6 @@ Sub CheckRangeSelection(Optional oEvent)
&apos; oPreSelRange = AddSelectedRangeToSelRangesEnum()
&apos; bPreSelected = CheckFormatType(oRange)
&apos; If bPreSelected Then
-&apos;
EmptySelection()
AddRangeToListbox(oPreSelRange)
&apos; End If