diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
commit | 940b4d1848e8c70ab7642901a68594e8016caffc (patch) | |
tree | eb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /wizards/source/depot | |
parent | Initial commit. (diff) | |
download | libreoffice-1ad18e38974bb28c3d98d0be8f7d8c18fc56de29.tar.xz libreoffice-1ad18e38974bb28c3d98d0be8f7d8c18fc56de29.zip |
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | wizards/source/depot/CommonLang.xba | 368 | ||||
-rw-r--r-- | wizards/source/depot/Currency.xba | 195 | ||||
-rw-r--r-- | wizards/source/depot/Depot.xba | 517 | ||||
-rw-r--r-- | wizards/source/depot/Dialog2.xdl | 53 | ||||
-rw-r--r-- | wizards/source/depot/Dialog3.xdl | 62 | ||||
-rw-r--r-- | wizards/source/depot/Dialog4.xdl | 34 | ||||
-rw-r--r-- | wizards/source/depot/Internet.xba | 356 | ||||
-rw-r--r-- | wizards/source/depot/Lang_de.xba | 175 | ||||
-rw-r--r-- | wizards/source/depot/Lang_en.xba | 175 | ||||
-rw-r--r-- | wizards/source/depot/Lang_es.xba | 175 | ||||
-rw-r--r-- | wizards/source/depot/Lang_fr.xba | 175 | ||||
-rw-r--r-- | wizards/source/depot/Lang_it.xba | 175 | ||||
-rw-r--r-- | wizards/source/depot/Lang_ja.xba | 175 | ||||
-rw-r--r-- | wizards/source/depot/Lang_ko.xba | 175 | ||||
-rw-r--r-- | wizards/source/depot/Lang_sv.xba | 174 | ||||
-rw-r--r-- | wizards/source/depot/Lang_tw.xba | 175 | ||||
-rw-r--r-- | wizards/source/depot/Lang_zh.xba | 175 | ||||
-rw-r--r-- | wizards/source/depot/dialog.xlb | 7 | ||||
-rw-r--r-- | wizards/source/depot/script.xlb | 19 | ||||
-rw-r--r-- | wizards/source/depot/tools.xba | 217 |
20 files changed, 3577 insertions, 0 deletions
diff --git a/wizards/source/depot/CommonLang.xba b/wizards/source/depot/CommonLang.xba new file mode 100644 index 000000000..ec2f62733 --- /dev/null +++ b/wizards/source/depot/CommonLang.xba @@ -0,0 +1,368 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="CommonLang" script:language="StarBasic">REM ***** BASIC ***** + + +' Column A has the index 1 +Public Const SBCOLUMNNAME1 = 3 ' Stock names, sheet 1 +Public Const SBCOLUMNID1 = 4 ' Stock ID, sheet 1 +Public Const SBCOLUMNQUANTITY1 = 5 ' Stock quantity sheet 1 +Public Const SBCOLUMNRATE1 = 7 ' Price for stocks, sheet 1 +Public Const SBCOLUMNNAME2 = 3 ' Stock names, sheet 2 +Public Const SBCOLUMNDATE2 = 4 ' Transaction dates, sheet 2 +Public Const SBCOLUMNQUANTITY2 = 5 ' Transaction quantity, sheet 2 +Public Const SBCOLUMNRATE2 = 6 ' Price for stocks, sheet 2 +Public Const SBCOLUMNPROVPERCENT2 = 7 ' Provision in %, sheet 2 +Public Const SBCOLUMNPROVMIN2 = 8 ' Minimum provision, sheet 2 +Public Const SBCOLUMNPROVFIX2 = 9 ' Fixed provision, sheet 2 +Public Const SBCOLUMNPROCEEDS2 = 12 ' Profit, sheet 2 +Public Const SBCOLUMNQTYSOLD2 = 14 ' Quantity sold, sheet 2 +Public Const SBCOLUMNQTYREST2 = 15 ' Quantity not sold yet, sheet 2 +Public Const SBCOLUMNPRCREST2 = 16 ' Proportional price for quantity not sold yet, sheet 2 +Public Const SBCOLUMNREALPROC2 = 17 ' Realized proceeds, sheet 2 +Public Const SBCOLUMNDIVIDEND2 = 18 ' Dividend paid, sheet 2 +Public Const SBCOLUMNREALPROFIT2 = 19 ' Realized profit, sheet 2 +Public Const SBROWFIRSTTRANSACT2 = 8 ' First data row, sheet 2 +Public Const SBROWHEADER1 = 6 ' Headline, sheet 1 +Public Const SBMSGOK = 0 +Public Const SBMSGYESNO = 4 +Public Const SBMSGSTOP = 16 +Public Const SBMSGQUESTION = 32 +Public Const SBMSGDEFAULTBTN2 = 256 +Public Const SBHASID = 1 ' 0 = no ID, 1 = stocks have an ID +Public Const SBDIALOGSELL = 1 ' Step for main dialog +Public Const SBDIALOGBUY = 2 ' Step for main dialog +Public Const SBBINARY = 0 +Public TransactMode as Integer +Public Const LIFO = -1 +Public Const FIFO = 1 + +Public Const HANDLEDIVIDEND = 1 +Public Const HANDLESPLIT = 2 + +Global oDocument as Object +Global oDocFormats() as Object +Global oController as Object +Global oFirstSheet as Object +Global oBankSheet as Object +Global oMovementSheet as Object +Global sDocLanguage as String +Global sDocCountry as String +Global oSheets as Object +Global oDocLocale as New com.sun.star.lang.Locale +Global bEnableMarket as Boolean +Global bEnableInternet as Boolean +Global oMarketModel as Object +Global oInternetModel as Object + +Global sCurCurrency$, sCurExtension$, sCurChartSource$, sCurStockIDLabel$, sCurSeparator$ + +Public oNumberFormatter as Object +Public bDebugmode as Boolean +Global GlobListindex as Integer +Public blabla() as String +Public SplitDate as Date +Public oChartSheet as Object +Public oBackgroundSheet as Object +Public Const SBDATECOLUMN = 3 +Public Const SBVALUECOLUMN = 4 +Public Const SBSTARTROW = 25 +Public Const SBCHARTPERIOD = 14 +Public Const SBINTERVAL = "d" +Public sColumnHeader as String +Public StartDate as Date +Public EndDate as Date +Public iCurRow as Integer +Public iMaxRow as Integer +Public iStartDay as Integer +Public iStartMonth as Integer +Public iStartYear as Integer +Public iEndDay as Integer +Public iEndMonth as Integer +Public iEndYear as Integer +Public oStatusLine as Object +Public Today as Date +Public sInterval as String +Public ShortMonths(11,1) +Public iStep as Integer +Public sDepotCurrency as String +Public iValueCol as Integer + +Public DlgReference as Object +Public DlgTransaction as Object +Public DlgStockRates as Object +Public DlgStartUp as Object +Public TransactModel as Object +Public StockRatesModel as Object +Public StartUpModel as Object +Public StockRatesTitle(1 To 3) +Public TransactTitle(1 To 2) +Public NullList() +Public sStartupWelcome$, sStartupChooseMarket$, sStartupHint$ + +Public sMarket(7,10) as String +Public sCountryMarket(7,10) as String + +Public cDlgCaption1$, cDlgCaption2$ +Public sMsgError$, sMsgNoName$, sMsgNoQuantity$, sMsgNoDividend$, sMsgNoExchangeRate$ +Public sMsgNoValidExchangeDate$, sMsgWrongExchangeDate$, sMsgSellTooMuch$, sMsgConfirm$ +Public sMsgFreeStock$, sMsgTotalLoss$, sMsgEndDatebeforeNow$, sMsgStartDatebeforeEndDate$ + +Public sOk$, sCancel$ +Public sMsgAuthorization$, sMsgDeleteAll$ +Public SellMethod$ +Public cSplit$ +Global HistoryChartSource as String +Public DateCellStyle as String +Public CurrCellStyle as String +Public sStartDate$, sEndDate$, sHistory$ +Public sInsertStockname$ +Public sProductname$, sTitle$ +Public sInsertStocks$, sStockname$, sNoInternetUpdate$, sMarketplace$, sNoInternetDataAvailable$ +Public sCheckInternetSettings as String + +Sub LoadLanguage() + LoadDepotDialogs() + Select Case sDocLanguage + Case "de" + LoadGermanLanguage() + Case "en" + LoadEnglishLanguage() + Case "fr" + LoadFrenchLanguage() + Case "it" + LoadItalianLanguage() + Case "es" + LoadSpanishLanguage() + Case "sv" + LoadSwedishLanguage() + Case "ja" + LoadJapaneseLanguage() + Case "ko" + LoadKoreanLanguage() + Case "zh" + If sDocCountry = "CN" Then + LoadChineseSimpleLanguage() + Else + LoadChineseTradLanguage() + End If + End Select + InitializeStartUpModel() +End Sub + +Sub CompleteMarketList() +Dim EuroIndex as Integer +Dim LocCountry as String +Dim LocLanguage as String +Dim sLangList() as String +Dim sCountryList() as String +Dim sExtensionList() as String +Dim MaxIndex as Integer +Dim bIsLocale as Boolean + + GlobListIndex = -1 + For n = 0 To 5 + LocLanguage = sMarket(n,6) + LocCountry = sMarket(n,7) + If Instr(1,LocLanguage,";",SBBINARY) = 0 Then + bIsLocale = CheckDocLocale(LocLanguage, LocCountry) + Else + EuroIndex = 0 + sLangList() = ArrayoutofString(LocLanguage, ";", MaxIndex) + sCountryList() = ArrayoutofString(LocCountry, ";", MaxIndex) + sExtensionList() = ArrayoutofString(sMarket(n,8), ";", MaxIndex) + For m = 0 To MaxIndex + bIsLocale = CheckDocLocale(sLangList(m), sCountryList(m)) + If bIsLocale Then + EuroIndex = m + Exit For + End If + Next m + sMarket(n,6) = sLangList(EuroIndex) + sMarket(n,7) = sCountryList(EuroIndex) + sMarket(n,8) = sExtensionList(EuroIndex) + End If + If bIsLocale Then + GlobListIndex = n + Exit For + End If + Next n +End Sub + +Sub LocalizedCurrencies() + If GlobListIndex = -1 Then + sCountryMarket(0,0) = "Euro" + sCountryMarket(0,1) = chr(8364) + sCountryMarket(0,2) = "Paris" + sCountryMarket(0,3) = "http://fr.finance.yahoo.com/d/quotes.csv?s=<StockID>.PA&f=s4l1t1c1ghov&e=.csv" + sCountryMarket(0,5) = "Code" + sCountryMarket(0,6) = "fr" + sCountryMarket(0,7) = "FR" + sCountryMarket(0,8) = "40C" + sCountryMarket(0,9) = "59/9" + sCountryMarket(0,10) = "1" + + sCountryMarket(1,0) = "Euro" + sCountryMarket(1,1) = chr(8364) + sCountryMarket(1,2) = "Milano" + sCountryMarket(1,3) = "http://it.finance.yahoo.com/d/quotes.csv?s=<StockID>.MI&f=sl1d1t1c1ohgv&e=.csv" + sCountryMarket(1,5) = "Codice" + sCountryMarket(1,6) = "it" + sCountryMarket(1,7) = "IT" + sCountryMarket(1,8) = "410" + sCountryMarket(1,9) = "44" + sCountryMarket(1,10) = "1" + + sCountryMarket(2,0) = "Euro" + sCountryMarket(2,1) = chr(8364) + sCountryMarket(2,2) = "Madrid" + sCountryMarket(2,3) = "http://es.finance.yahoo.com/d/quotes.csv?s=<StockID>&m=MC&f=sl1d1t1c1ohgv&e=.csv" + sCountryMarket(2,5) = "Simbolo" + sCountryMarket(2,6) = "es" + sCountryMarket(2,7) = "ES" + sCountryMarket(2,8) = "40A" + sCountryMarket(2,9) = "44" + sCountryMarket(2,10) = "1" + + sCountryMarket(3,0) = "Dansk krone" + sCountryMarket(3,1) = "kr" + sCountryMarket(3,2) = "København" + sCountryMarket(3,3) = "http://dk.finance.yahoo.com/d/quotes.csv?s=<StockID.CO&f=sl1d1t1c1ohgv&e=.csv" + sCountryMarket(3,5) = "Aktiesymbol" + sCountryMarket(3,6) = "da" + sCountryMarket(3,7) = "DK" + sCountryMarket(3,8) = "406" + sCountryMarket(3,9) = "44" + sCountryMarket(3,10) = "1" + + sCountryMarket(4,0) = "Svensk krona" + sCountryMarket(4,1) = "kr" + sCountryMarket(4,2) = "Stockholm" + sCountryMarket(4,3) = "http://se.finance.yahoo.com/d/quotes.csv?s=<StockID>.L&f=sl1d1t1c1ohgv&e=.c" + sCountryMarket(4,5) = "Kod" + sCountryMarket(4,6) = "sv" + sCountryMarket(4,7) = "SE" + sCountryMarket(4,8) = "41D" + sCountryMarket(4,9) = "44" + sCountryMarket(4,10) = "1" + + ' Taiwan Dollar + sCountryMarket(5,0) = "新臺幣" + sCountryMarket(5,1) = "¥" + sCountryMarket(5,2) = "代號" + sCountryMarket(5,3) = "http://tw.finance.yahoo.com/d/quotes.csv?s=<StockID>.TW&f=sl1d1t1c1ohgv&e=.csv" + sCountryMarket(5,5) = "代號" + sCountryMarket(5,6) = "zh" + sCountryMarket(5,7) = "TW" + sCountryMarket(5,8) = "404" + sCountryMarket(5,9) = "44" + sCountryMarket(5,10) = "1" + + ' Chinese Yuan + sCountryMarket(6,0) = "人民币" + sCountryMarket(6,1) = "¥" + sCountryMarket(6,2) = "代号" + sCountryMarket(6,3) = "http://cn.finance.yahoo.com/d/quotes.csv?s=<StockID>.SS&f=sl1d1t1c1ohgv&e=.csv" + sCountryMarket(6,5) = "代号" + sCountryMarket(6,6) = "zh" + sCountryMarket(6,7) = "CN" + sCountryMarket(6,8) = "804" + sCountryMarket(6,9) = "44" + sCountryMarket(6,10) = "1" + + ' korean Won + sCountryMarket(7,0) = "한국 원화" + sCountryMarket(7,1) = "₩" + sCountryMarket(7,2) = "서울" + sCountryMarket(7,3) = "http://kr.finance.yahoo.com/d/quotes.csv?s=<StockID>.KS&f=snl1d1t1c1ohgv&e=.csv" + sCountryMarket(7,5) = "종목 코드" + sCountryMarket(7,6) = "ko" + sCountryMarket(7,7) = "KR" + sCountryMarket(7,8) = "412" + sCountryMarket(7,9) = "44" + sCountryMarket(7,10) = "2" + + +' sCountryMarket(5,0) = "Российский рубль" +' sCountryMarket(5,1) = "р." +' sCountryMarket(5,2) = "" +' sCountryMarket(5,3) = "" +' sCountryMarket(5,5) = "" +' sCountryMarket(5,6) = "ru" +' sCountryMarket(5,7) = "RU" +' sCountryMarket(5,8) = "-419" +' sCountryMarket(5,9) = "" +' +' sCountryMarket(6,0) = "Złoty polski" +' sCountryMarket(6,1) = "zł" +' sCountryMarket(6,2) = "" +' sCountryMarket(6,3) = "" +' sCountryMarket(6,5) = "" 'Still Todo!! +' sCountryMarket(6,6) = "pl" +' sCountryMarket(6,7) = "PL" +' sCountryMarket(6,8) = "-415" +' sCountryMarket(6,9) = "" +' +' sCountryMarket(7,0) = "Türkische Lira" +' sCountryMarket(7,1) = "TL" +' sCountryMarket(7,2) = "" +' sCountryMarket(7,3) = "" +' sCountryMarket(7,5) = "" 'Still Todo!! +' sCountryMarket(7,6) = "tr" +' sCountryMarket(7,7) = "TR" +' sCountryMarket(7,8) = "-41F" +' sCountryMarket(7,9) = "" + + Dim n as Integer + Dim m as Integer +' Dim sCountryMarket(6,9) as String + + For n = 0 To Ubound(sCountryMarket(),1) + If sDocLanguage = sCountryMarket(n,6) and sDocCountry = sCountryMarket(n,7) Then + GlobListIndex = 6 + For m = 0 To 10 + sMarket(6,m) = sCountryMarket(n,m) + Next m + Exit For + End If + Next n + End If +End Sub + +Sub LoadDepotDialogs() + DlgTransaction = LoadDialog("Depot", "Dialog2") + DlgStockRates = LoadDialog("Depot", "Dialog3") + DlgStartUp = LoadDialog("Depot", "Dialog4") + TransactModel = DlgTransaction.Model + StockRatesModel = DlgStockRates.Model + StartUpModel = DlgStartUp.Model +End Sub + + +Sub InitializeStartUpModel() + With StartUpModel + .lblWelcome.Label = sStartupWelcome & Chr(13) & chr(13) & sStartUpChooseMarket + sStartUpHint = ReplaceString(sStartUpHint, sHistory, "<History>") + .lblHint.Label = sStartupHint +' .cmdGoOn.Enabled = Ubound(StartUpModel.lstMarkets.SelectedItems()) <> -1 + .cmdGoOn.Label = sOK + .cmdCancel.Label = sCancel + End With +End Sub</script:module> diff --git a/wizards/source/depot/Currency.xba b/wizards/source/depot/Currency.xba new file mode 100644 index 000000000..d728424d3 --- /dev/null +++ b/wizards/source/depot/Currency.xba @@ -0,0 +1,195 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Currency" script:language="StarBasic">REM ***** BASIC ***** +Option Explicit + +Dim bDoUnLoad as Boolean + + +Sub Startup() +Dim i as Integer +Dim a as Integer +Dim ListString as String +Dim MarketListBoxControl as Object + Initialize(False) + MarketListBoxControl = DlgStartUp.GetControl("lstMarkets") + a = 0 + For i = 0 To Ubound(sMarket(),1) + ListString = sMarket(i,0) + If sMarket(i,0) <> "" Then + If sMarket(i,3) = "" Then + ListString = ListString & " (" & sNoInternetUpdate & ")" + Else + ListString = ListString & " (" & sMarketplace & " " & sMarket(i,2) & ")" + End If + MarketListBoxControl.AddItem(ListString, a) + a = a + 1 + End If + Next i + MarketListBoxControl.SelectItemPos(GlobListIndex, True) + DlgStartUp.Title = sDepotCurrency + DlgStartUp.Model.cmdGoOn.DefaultButton = True + DlgStartUp.GetControl("lstMarkets").SetFocus() + DlgStartUp.Execute() + DlgStartUp.Dispose() +End Sub + + +Sub EnableGoOnButton() + StartUpModel.cmdGoOn.Enabled = True + StartUpModel.cmdGoOn.DefaultButton = True +End Sub + + +Sub CloseStartUpDialog() + DlgStartUp.EndExecute() +' oDocument.Dispose() +End Sub + + +Sub DisposeDocument() + If bDoUnload Then + oDocument.Dispose() + End If +End Sub + + +Sub ChooseMarket(Optional aEvent) +Dim Index as Integer +Dim bIsDocLanguage as Boolean +Dim bIsDocCountry as Boolean + oInternetModel = GetControlModel(oDocument.Sheets(0), "CmdInternet") + If Not IsMissing(aEvent) Then + Index = StartupModel.lstMarkets.SelectedItems(0) + oInternetModel.Tag = Index + Else + Index = oInternetModel.Tag + End If + oMarketModel = GetControlModel(oDocument.Sheets(0), "CmdHistory") + sCurCurrency = sMarket(Index,1) + If Index = 0 Then + HistoryChartSource = sMarket(Index,4) + End If + sCurStockIDLabel = sMarket(Index,5) + sCurExtension = sMarket(Index,8) + iValueCol = Val(sMarket(Index,10)) + If Instr(sCurExtension,";") <> 0 Then + ' Take the german extension as the stock place is Frankfurt + sCurExtension = "407" + End If + sCurChartSource = sMarket(Index,3) + bIsDocLanguage = Instr(1, sMarket(Index,6), sDocLanguage, SBBINARY) <> 0 + bIsDocCountry = Instr(1, sMarket(Index,7), sDocCountry, SBBINARY) <> 0 OR SDocCountry = "" + sCurSeparator = sMarket(Index,9) + TransactModel.txtRate.CurrencySymbol = sCurCurrency + TransactModel.txtFix.CurrencySymbol = sCurCurrency + TransactModel.txtMinimum.CurrencySymbol = sCurCurrency + bEnableMarket = Index = 0 + bEnableInternet = sCurChartSource <> "" + oMarketModel.Enabled = bEnableMarket + oInternetModel.Enabled = bEnableInternet + If Not IsMissing(aEvent) Then + ConvertStylesCurrencies() + bDoUnload = False + DlgStartUp.EndExecute() + End If +End Sub + + +Sub ConvertStylesCurrencies() +Dim m as integer +Dim aStyleFormat as Object +Dim StyleName as String +Dim bAddToList as Boolean +Dim oStyle as Object +Dim oStyles as Object + UnprotectSheets(oSheets) + oFirstSheet.GetCellByPosition(SBCOLUMNID1, SBROWHEADER1).SetString(sCurStockIDLabel) + oStyles = oDocument.StyleFamilies.GetbyIndex(0) + For m = 0 To oStyles.count-1 + oStyle = oStyles.GetbyIndex(m) + StyleName = oStyle.Name + bAddToList = CheckFormatType(oStyle) + If bAddToList Then + SwitchNumberFormat(ostyle, oDocFormats, sCurCurrency, sCurExtension) + End If + Next m + ProtectSheets(oSheets) +End Sub + + +Sub SwitchNumberFormat(oObject as Object, oFormats as object, sNewSymbol as String, sNewExtension as String) +Dim nFormatLanguage as Integer +Dim nFormatDecimals as Integer +Dim nFormatLeading as Integer +Dim bFormatLeading as Integer +Dim bFormatNegRed as Integer +Dim bFormatThousands as Integer +Dim aNewStr as String +Dim iNumberFormat as Long +Dim sSimpleStr as String +Dim nSimpleKey as Long +Dim aFormat() +Dim oLocale as New com.sun.star.lang.Locale + ' Numberformat with the new Symbol as Base for new Format + sSimpleStr = "0 [$" & sNewSymbol & "-" & sNewExtension & "]" + nSimpleKey = Numberformat(oFormats, sSimpleStr, oDocLocale) + On Local Error Resume Next + iNumberFormat = oObject.NumberFormat + If Err <> 0 Then + Msgbox "Error Reading the Number Format" + Resume CLERROR + End If + + On Local Error GoTo NOKEY + aFormat() = oFormats.getByKey(iNumberFormat) + On Local Error GoTo 0 + ' set new currency format with according settings + nFormatDecimals = aFormat.Decimals + nFormatLeading = aFormat.LeadingZeros + bFormatNegRed = aFormat.NegativeRed + bFormatThousands = aFormat.ThousandsSeparator + oLocale = aFormat.Locale + aNewStr = oFormats.generateFormat(nSimpleKey, oLocale, bFormatThousands, bFormatNegRed, nFormatDecimals, nFormatLeading) + oObject.NumberFormat = Numberformat(oFormats, aNewStr, oLocale) + NOKEY: + If Err <> 0 Then + Resume CLERROR + End If + CLERROR: +End Sub + + +Function Numberformat( oFormats as Object, aFormatStr as String, oLocale as Variant ) +Dim nRetkey + nRetKey = oFormats.queryKey(aFormatStr, oLocale, True) + If nRetKey = -1 Then + nRetKey = oFormats.addNew( aFormatStr, oLocale ) + If nRetKey = -1 Then nRetKey = 0 + End If + Numberformat = nRetKey +End Function + + +Function CheckFormatType(oStyle as Object) +Dim oFormatofObject as Object + oFormatofObject = oDocFormats.getByKey(oStyle.NumberFormat) + CheckFormatType = INT(oFormatOfObject.Type) AND com.sun.star.util.NumberFormat.CURRENCY +End Function</script:module> diff --git a/wizards/source/depot/Depot.xba b/wizards/source/depot/Depot.xba new file mode 100644 index 000000000..6a8b1419c --- /dev/null +++ b/wizards/source/depot/Depot.xba @@ -0,0 +1,517 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Depot" script:language="StarBasic">Option Explicit + + +Sub Initialize(Optional bChooseMarketPlace as Boolean) +Dim bEnableHistory as Boolean + GlobalScope.BasicLibraries.LoadLibrary("Tools") +' oMarketModel = GetControlModel(oDocument.Sheets(0), "CmdHistory") +' bEnableHistory = oMarketModel.Enabled + ToggleWindow(False) + Today = Date() + bDebugmode = False + oDocument = ThisComponent + oController = oDocument.GetCurrentController + oSheets = oDocument.Sheets + oFirstSheet = oSheets(0) + oMovementSheet = oSheets(1) + oBankSheet = oSheets(2) + oDocFormats = oDocument.NumberFormats + oNumberFormatter = CreateUnoService("com.sun.star.util.NumberFormatter") + oNumberFormatter.AttachNumberFormatsSupplier(oDocument) + oDocLocale = oDocument.CharLocale + sDocLanguage = oDocLocale.Language + sDocCountry = oDocLocale.Country + LoadLanguage() + ToggleWindow(True) +' oMarketModel.Enabled = bEnableHistory + If Not IsMissing(bChooseMarketPlace) Then + If bChoosemarketPlace Then + ChooseMarket() + End If + Else + ChooseMarket() + End If + If Not IsMissing(bChooseMarketPlace) Then + If bChooseMarketPlace Then + oMarketModel.Enabled = bEnableMarket + oInternetModel.Enabled = bEnableInternet + End If + End If +End Sub + + +Sub Buy() + Initialize(True) + FillListbox(DlgTransaction.GetControl("lstBuyStocks"), TransactTitle(SBDIALOGBUY), False) + SetupTransactionControls(SBDIALOGBUY) + EnableTransactionControls(False) + DlgTransaction.Execute() +End Sub + + +Sub Sell() + Initialize(True) + If FillListbox(DlgTransaction.GetControl("lstSellStocks"), TransactTitle(SBDIALOGSELL), True) Then + SetupTransactionControls(SBDIALOGSELL) + EnableTransactionControls(False) + DlgTransaction.Execute() + End If +End Sub + + +Sub Reset() +Dim TransactionCount as Integer +Dim StockCount, iStartRow, i as Integer +Dim oRows, oRange as Object +Dim StockName as String + Initialize(True) + ' Delete transactions and reset overview + If MsgBox(sMsgDeleteAll, SBMSGYESNO+SBMSGQUESTION+SBMSGDEFAULTBTN2, sMsgAuthorization) = 6 Then + ' Assumption: If and only if there is an overview, then there are transactions, too + UnprotectSheets(oSheets) + StockCount = GetStocksCount(iStartRow) + + For i = 1 To StockCount + StockName = oFirstSheet.GetCellbyPosition(SBCOLUMNNAME1, iStartRow + i).String + If oSheets.HasbyName(StockName) Then + oSheets.RemoveByName(StockName) + End If + Next + oDocument.AddActionLock + RemoveStockRows(oFirstSheet, iStartRow + 1, StockCount) + TransactionCount = GetTransactionCount(iStartRow) + RemoveStockRows(oMovementSheet, iStartRow + 2, TransactionCount) + ProtectSheets(oSheets) + oDocument.RemoveActionLock + End If +End Sub + + +Sub TransactionOk +Dim Sold as Long +Dim RestQuantity, Value, PartialValue, Profit +Dim iNewRow as Integer, iRow as Integer +Dim iStockRow as Long, iRestQuantity as Long +Dim oNameCell as Object +Dim CellStockName as String, SelStockName as String +Dim CurRate as Double +Dim TransactDate as Date +Dim LocStockName as String + ' Check for rate entered + If TransactModel.txtRate.Value = 0 Then + If TransactModel.Step = SBDIALOGBUY Then + If MsgBox(sMsgFreeStock, SBMSGYESNO+SBMSGQUESTION, sMsgConfirm)=7 Then + Exit Sub + End If + Else + If MsgBox(sMsgTotalLoss, SBMSGYESNO+SBMSGQUESTION, sMsgConfirm)=7 Then + Exit Sub + End If + End If + End If + CurRate = TransactModel.txtRate.Value + TransactDate = CDateFromUNODate(TransactModel.txtDate.Date) + DlgTransaction.EndExecute() + UnprotectSheets(oSheets) + + iNewRow = DuplicateRow(oMovementSheet, "HiddenRow3") + + If TransactModel.Step = SBDIALOGBUY Then + CellStockName = TransactModel.lstBuyStocks.Text + If Instr(1,CellStockName,"$") <> 0 Then + CellStockName = "'" & CellStockName & "'" + End If + oMovementSheet.GetCellByPosition(SBCOLUMNNAME2, iNewRow).String = CellStockName + oMovementSheet.GetCellByPosition(SBCOLUMNQUANTITY2, iNewRow).Value = TransactModel.txtQuantity.Value + Else + CellStockName = DlgTransaction.GetControl("lstSellStocks").GetSelectedItem() + oMovementSheet.GetCellByPosition(SBCOLUMNNAME2, iNewRow).String = CellStockName + oMovementSheet.GetCellByPosition(SBCOLUMNQUANTITY2, iNewRow).Value = -TransactModel.txtQuantity.Value + End If + + oMovementSheet.GetCellByPosition(SBCOLUMNDATE2, iNewRow).Value = CDateFromUNODate(TransactModel.txtDate.Date) + oMovementSheet.GetCellByPosition(SBCOLUMNRATE2, iNewRow).Value = TransactModel.txtRate.Value + oMovementSheet.GetCellByPosition(SBCOLUMNPROVPERCENT2, iNewRow).Value = TransactModel.txtCommission.EffectiveValue + oMovementSheet.GetCellByPosition(SBCOLUMNPROVMIN2, iNewRow).Value = TransactModel.txtMinimum.Value + oMovementSheet.GetCellByPosition(SBCOLUMNPROVFIX2, iNewRow).Value = TransactModel.txtFix.Value + + ' Buy stocks: Update overview for new stocks + If TransactModel.Step = SBDIALOGBUY Then + iStockRow = GetStockRowIndex(CellStockName) + If iStockRow = -1 Then + iNewRow = DuplicateRow(oFirstSheet, "HiddenRow2") + oFirstSheet.GetCellByPosition(SBCOLUMNNAME1, iNewRow).String = CellStockName + oFirstSheet.GetCellByPosition(SBCOLUMNID1, iNewRow).String = TransactModel.txtStockID.Text + iStockRow = GetStockRowIndex(CellStockName) + End If + ' Sell stocks: Get transaction value, then update Transaction sheet + ElseIf TransactModel.Step = SBDIALOGSELL Then + Profit = oMovementSheet.GetCellByPosition(SBCOLUMNPROCEEDS2, iNewRow).Value + Value = Profit + Sold = TransactModel.txtQuantity.Value + SelStockName = DlgTransaction.GetControl("lstSellStocks").GetSelectedItem() + ' Go to first name + If TransactMode = FIFO Then + iRow = SBROWFIRSTTRANSACT2 + Else + iRow = iNewRow-1 + End If + + ' Check that no transaction after split date exists else cancel split + Do While Sold > 0 + oNameCell = oMovementSheet.GetCellByPosition(SBCOLUMNNAME2, iRow) + CellStockName = oNameCell.String + If CellStockName = SelStockName Then + ' Update transactions: Note quantity sold + RestQuantity = oMovementSheet.GetCellByPosition(SBCOLUMNQTYREST2, iRow).Value + ' If there still is a rest left ... + If RestQuantity > 0 Then + If RestQuantity < Sold Then + ' Recalculate profit of new transaction + Profit = Profit - oMovementSheet.GetCellByPosition(SBCOLUMNPRCREST2, iRow).Value + AddValueToCellContent(SBCOLUMNQTYSOLD2, iRow, RestQuantity) + PartialValue = RestQuantity / Sold * Value + AddValueToCellContent(SBCOLUMNREALPROC2, iRow, PartialValue) + Sold = Sold - RestQuantity + Value = Value - PartialValue + Else + ' Recalculate profit of neTransactModel.lstBuyStocks.Textw transaction + PartialValue = oMovementSheet.GetCellByPosition(SBCOLUMNPRCREST2, iRow).Value + Profit = Profit - PartialValue/RestQuantity * Sold + ' Update sold shares cell + AddValueToCellContent(SBCOLUMNQTYSOLD2, iRow, Sold) + ' Update sales turnover cell + AddValueToCellContent(SBCOLUMNREALPROC2, iRow, Value) + ' Update variables for rest of transaction + Sold = 0 + Value = 0 + End If + End If + End If + iRow = iRow + TransactMode + Loop + oMovementSheet.GetCellByPosition(SBCOLUMNREALPROFIT2,iNewRow).Value = Profit + iStockRow = GetStockRowIndex(SelStockName) + iRestQuantity = oFirstSheet.GetCellbyPosition(SBCOLUMNQUANTITY1, iStockRow).Value +' If iRestQuantity = 0 Then +' If oSheets.HasbyName(SelStockName) Then +' oSheets.RemoveByName(SelStockName) +' End If +' Else + +' End If + End If + InsertCurrentValue(CurRate, iStockRow,TransactDate) + ProtectSheets(oSheets) +End Sub + + +Sub SelectStockname(aEvent as Object) +Dim iCurRow as Integer +Dim CurStockName as String + With TransactModel + ' Find row with stock name + If TransactModel.Step = SBDIALOGBUY Then + CurStockName = .lstBuyStocks.Text + iCurRow = GetStockRowIndex(CurStockName) + .txtQuantity.ValueMax = 10000000 + Else + Dim ListBoxList() as String + ListBoxList() = GetSelectedListboxItems(aEvent.Source.getModel()) + CurStockName = ListBoxList(0) +' CurStockName = DlgTransaction.GetControl(aEvent.Source.getModel.Name).GetSelectedItem() + iCurRow = GetStockRowIndex(CurStockName) + Dim fdouble as Double + fdouble = oFirstSheet.GetCellByPosition(SBCOLUMNQUANTITY1, iCurRow).Value + .txtQuantity.Value = fdouble + .txtQuantity.ValueMax = oFirstSheet.GetCellByPosition(SBCOLUMNQUANTITY1, iCurRow).Value + .txtRate.Value = oFirstSheet.GetCellbyPosition(SBCOLUMNRATE1, iCurRow).Value + End If + .txtStockID.Enabled = .Step = SBDIALOGBUY + .lblStockID.Enabled = .Step = SBDIALOGBUY + ' Default settings for quantity and rate + .txtStockID.Text = GetStockID(CurStockName, iCurRow) + End With + EnableTransactionControls(CurStockName <> "") + TransactModel.cmdGoOn.DefaultButton = True +End Sub + + + +Sub HandleStocks(Mode as Integer, oDialog as Object) +Dim DividendPerShare, DividendTotal, RestQuantity, OldValue +Dim SelStockName, CellStockName as String +Dim oNameCell as Object, oDateCell as Object +Dim iRow as Integer +Dim oDividendCell as Object +Dim Amount +Dim OldNumber, NewNumber as Integer +Dim NoteText as String +Dim TotalStocksCount as Long +Dim oModel as Object + oDocument.AddActionLock + oDialog.EndExecute() + oModel = oDialog.Model + SelStockName = DlgStockRates.GetControl("lstStockNames").GetSelectedItem() + Select Case Mode + Case HANDLEDIVIDEND + Dim bTakeTotal as Boolean + ' Update transactions: Enter dividend paid for all Buy transactions not sold completely + bTakeTotal = oModel.optTotal.State = 1 + If bTakeTotal Then + DividendTotal = oModel.txtDividend.Value + iRow = GetStockRowIndex(SelStockName) + TotalStocksCount = oFirstSheet.GetCellByPosition(SBCOLUMNQUANTITY1,iRow).Value + DividendPerShare = DividendTotal/TotalStocksCount + Else + DividendPerShare = oModel.txtDividend.Value + End If + + Case HANDLESPLIT + ' Store entered values in variables + OldNumber = oModel.txtOldRate.Value + NewNumber = oModel.txtNewRate.Value + SplitDate = CDateFromUNODate(oModel.txtDate.Date) + iRow = SBROWFIRSTTRANSACT2 + NoteText = cSplit & SplitDate & ", " & oModel.txtOldRate.Value & oModel.lblColon.Label & oModel.txtNewRate.Value + Do + oNameCell = oMovementSheet.GetCellByPosition(SBCOLUMNNAME2, iRow) + CellStockName = oNameCell.String + If CellStockName = SelStockName Then + oDateCell = oMovementSheet.GetCellByPosition(SBCOLUMNDATE2, iRow) + If oDateCell.Value >= SplitDate Then + MsgBox sMsgWrongExchangeDate, SBMSGOK + SBMSGSTOP, sMsgError + Exit Sub + End If + End If + iRow = iRow + 1 + Loop Until CellStockName = "" + End Select + iRow = SBROWFIRSTTRANSACT2 + UnprotectSheets(oSheets) + Do + oNameCell = oMovementSheet.GetCellByPosition(SBCOLUMNNAME2, iRow) + CellStockName = oNameCell.String + If CellStockName = SelStockName Then + Select Case Mode + Case HANDLEDIVIDEND + RestQuantity = oMovementSheet.GetCellByPosition(SBCOLUMNQTYREST2, iRow).Value + If RestQuantity > 0 Then + oDividendCell = oMovementSheet.GetCellByPosition(SBCOLUMNDIVIDEND2, iRow) + OldValue = oDividendCell.Value + oDividendCell.Value = OldValue + RestQuantity * DividendPerShare + End If + Case HANDLESPLIT + oDateCell = oMovementSheet.GetCellByPosition(SBCOLUMNDATE2, iRow) + SplitCellValue(oMovementSheet, NewNumber, OldNumber, SBCOLUMNQUANTITY2, iRow, NoteText) + SplitCellValue(oMovementSheet, OldNumber, NewNumber, SBCOLUMNRATE2, iRow, "") + SplitCellValue(oMovementSheet, NewNumber, OldNumber, SBCOLUMNQTYSOLD2, iRow, "") + End Select + End If + iRow = iRow + 1 + Loop Until CellStockName = "" + If Mode = HANDLESPLIT Then + CalculateChartafterSplit(SelStockName, NewNumber, OldNumber, NoteText, SplitDate) + End If + oDocument.CalculateAll() + ProtectSheets(oSheets) + oDocument.RemoveActionLock +End Sub + + +Sub CancelStockRate() + DlgStockRates.EndExecute() +End Sub + + +Sub CancelTransaction() + DlgTransaction.EndExecute() +End Sub + + +Sub CommitStockRate() +Dim CurStep as Integer + CurStep = StockRatesModel.Step + Select Case CurStep + Case 1 + ' Check for quantity entered + If StockRatesModel.txtDividend.Value = 0 Then + MsgBox sMsgNoDividend, SBMSGSTOP+SBMSGSTOP, sMsgError + Exit Sub + End If + HandleStocks(HANDLEDIVIDEND, DlgStockRates) + Case 2 + HandleStocks(HANDLESPLIT, DlgStockRates) + Case 3 + InsertCompanyHistory() + End Select +End Sub + + +Sub EnableTransactionControls(bEnable as Boolean) + With TransactModel + .lblQuantity.Enabled = bEnable + .txtQuantity.Enabled = bEnable + .lblRate.Enabled = bEnable + .txtRate.Enabled = bEnable + .lblDate.Enabled = bEnable + .txtDate.Enabled = bEnable + .lblCommission.Enabled = bEnable + .txtCommission.Enabled = bEnable + .lblMinimum.Enabled = bEnable + .txtMinimum.Enabled = bEnable + .lblFix.Enabled = bEnable + .txtFix.Enabled = bEnable + If TransactModel.Step = SBDIALOGSELL Then + .cmdGoOn.Enabled = Ubound(TransactModel.lstSellStocks.SelectedItems()) > -1 + DlgTransaction.GetControl("lstSellStocks").SetFocus() + Else + .cmdGoOn.Enabled = TransactModel.lstBuyStocks.Text <> "" + DlgTransaction.GetControl("lstBuyStocks").SetFocus() + End If + If bEnable Then + TransactModel.cmdGoOn.DefaultButton = True + End If + End With +End Sub + + +Sub SetupTransactionControls(CurStep as Integer) + DlgReference = DlgTransaction + With TransactModel + .txtDate.Date = CDateToUNODate(Date()) + .txtDate.DateMax = CDateToUNODate(Date()) + .txtStockID.Enabled = False + .lblStockID.Enabled = False + .lblStockID.Label = sCurStockIDLabel + .txtRate.CurrencySymbol = sCurCurrency + .txtFix.CurrencySymbol = sCurCurrency + .Step = CurStep + End With + DlgTransaction.Title = TransactTitle(CurStep) + CellValuetoControl(oBankSheet, TransactModel.txtCommission, "ProvisionPercent") + CellValuetoControl(oBankSheet, TransactModel.txtMinimum, "ProvisionMinimum") + CellValuetoControl(oBankSheet, TransactModel.txtFix, "ProvisionFix") +End Sub + + +Sub AddShortCuttoControl() +Dim SelCompany as String +Dim iRow, SelIndex as Integer + SelIndex = DlgTransaction.GetControl("lstBuyStocks").GetSelectedItemPos() + If SelIndex <> -1 Then + SelCompany = TransactModel.lstBuyStocks.StringItemList(SelIndex) + iRow = GetStockRowIndex(SelCompany) + If iRow <> -1 Then + TransactModel.txtStockID.Text = oFirstSheet.GetCellByPosition(SBCOLUMNID1,iRow).String + TransactModel.txtRate.Value = oFirstSheet.GetCellByPosition(SBCOLUMNRATE1,iRow).Value + Else + TransactModel.txtStockID.Text = "" + TransactModel.txtRate.Value = 0 + End If + Else + TransactModel.txtStockID.Text = "" + TransactModel.txtRate.Value = 0 + End If +End Sub + + +Sub OpenStockRatePage(aEvent) +Dim CurStep as Integer + Initialize(True) + CurStep = aEvent.Source.Model.Tag + If FillListbox(DlgStockRates.GetControl("lstStockNames"), StockRatesTitle(CurStep), True) Then + StockRatesModel.Step = CurStep + ToggleStockRateControls(False, CurStep) + InitializeStockRatesControls(CurStep) + DlgStockRates.Execute() + End If +End Sub + + +Sub SelectStockNameForRates() +Dim StockName as String + StockName = DlgStockRates.GetControl("lstStockNames").GetSelectedItem() + If StockName <> "" Then + StockRatesModel.txtStockID.Text = GetStockID(StockName) + ToggleStockRateControls(True, StockRatesModel.Step) + End If + StockRatesModel.cmdGoOn.DefaultButton = True +End Sub + + +Sub ToggleStockRateControls(bDoEnable as Boolean, CurStep as Integer) + With StockRatesModel + .lblStockID.Enabled = False + .txtStockID.Enabled = False + .cmdGoOn.Enabled = Ubound(StockRatesModel.lstStockNames.SelectedItems()) <> -1 + Select Case CurStep + Case 1 + .optPerShare.Enabled = bDoEnable + .optTotal.Enabled = bDoEnable + .lblDividend.Enabled = bDoEnable + .txtDividend.Enabled = bDoEnable + Case 2 + .lblExchangeRate.Enabled = bDoEnable + .lblDate.Enabled = bDoEnable + .lblColon.Enabled = bDoEnable + .txtOldRate.Enabled = bDoEnable + .txtNewRate.Enabled = bDoEnable + .txtDate.Enabled = bDoEnable + Case 3 + .lblStartDate.Enabled = bDoEnable + .lblEndDate.Enabled = bDoEnable + .txtStartDate.Enabled = bDoEnable + .txtEndDate.Enabled = bDoEnable + .hlnInterval.Enabled = bDoEnable + .optDaily.Enabled = bDoEnable + .optWeekly.Enabled = bDoEnable + End Select + End With +End Sub + + +Sub InitializeStockRatesControls(CurStep as Integer) + DlgReference = DlgStockRates + DlgStockRates.Title = StockRatesTitle(CurStep) + With StockRatesModel + .txtStockID.Text = "" + .lblStockID.Label = sCurStockIDLabel + Select Case CurStep + Case 1 + .txtDividend.Value = 0 + .optPerShare.State = 1 + .txtDividend.CurrencySymbol = sCurCurrency + Case 2 + .txtOldRate.Value = 1 + .txtNewRate.Value = 1 + .txtDate.Date = CDateToUNODate(Date()) + Case 3 + .txtStartDate.DateMax = CDateToUNODate(CDate(Date())-1) + .txtEndDate.DateMax = CDateToUNODate(CDate(Date())-1) + .txtStartDate.Date = CDateToUNODate(CDate(Date())-8) + .txtEndDate.Date = CDateToUNODate(CDate(Date())-1) + .optDaily.State = 1 + End Select + End With +End Sub +</script:module>
\ No newline at end of file diff --git a/wizards/source/depot/Dialog2.xdl b/wizards/source/depot/Dialog2.xdl new file mode 100644 index 000000000..94851c3e4 --- /dev/null +++ b/wizards/source/depot/Dialog2.xdl @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Dialog2" dlg:tab-index="0" dlg:left="91" dlg:top="24" dlg:width="220" dlg:height="128" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_DIALOG_SELLBUY" dlg:closeable="true" dlg:moveable="true"> + <dlg:bulletinboard> + <dlg:text dlg:id="lblStockNames" dlg:tab-index="0" dlg:left="6" dlg:top="6" dlg:width="102" dlg:height="8" dlg:value="lblStockNames"/> + <dlg:menulist dlg:id="lstSellStocks" dlg:tab-index="1" dlg:left="6" dlg:top="17" dlg:width="102" dlg:height="12" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_1_LSTSELLSTOCKS" dlg:spin="true"> + <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Depot.Depot.SelectStockname?language=Basic&location=application" script:language="Script"/> + </dlg:menulist> + <dlg:combobox dlg:id="lstBuyStocks" dlg:tab-index="2" dlg:left="6" dlg:top="17" dlg:width="102" dlg:height="12" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_2_LSTBUYSTOCKS" dlg:spin="true"> + <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Depot.Depot.SelectStockname?language=Basic&location=application" script:language="Script"/> + </dlg:combobox> + <dlg:text dlg:id="lblStockID" dlg:tab-index="3" dlg:left="150" dlg:top="6" dlg:width="66" dlg:height="8" dlg:value="lblStockID"/> + <dlg:textfield dlg:id="txtStockID" dlg:tab-index="4" dlg:left="150" dlg:top="17" dlg:width="40" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SELLBUY"/> + <dlg:text dlg:id="lblQuantity" dlg:tab-index="5" dlg:left="6" dlg:top="36" dlg:width="57" dlg:height="8" dlg:value="lblQuantity"/> + <dlg:numericfield dlg:id="txtQuantity" dlg:tab-index="6" dlg:left="6" dlg:top="47" dlg:width="46" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_TXTQUANTITY" dlg:decimal-accuracy="0" dlg:value-min="1"/> + <dlg:currencyfield dlg:id="txtRate" dlg:tab-index="7" dlg:left="68" dlg:top="47" dlg:width="40" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_TXTRATE" dlg:value-min="0"/> + <dlg:datefield dlg:id="txtDate" dlg:tab-index="8" dlg:left="150" dlg:top="47" dlg:width="50" dlg:height="12" dlg:tag="Dialog2" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_TXTDATE" dlg:strict-format="true" dlg:spin="true"> + <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Depot.tools.CheckInputDate?language=Basic&location=application" script:language="Script"/> + </dlg:datefield> + <dlg:text dlg:id="lblRate" dlg:tab-index="9" dlg:left="68" dlg:top="36" dlg:width="77" dlg:height="8" dlg:value="lblRate"/> + <dlg:text dlg:id="lblDate" dlg:tab-index="10" dlg:left="150" dlg:top="37" dlg:width="66" dlg:height="8" dlg:value="lblDate"/> + <dlg:formattedfield dlg:id="txtCommission" dlg:tab-index="11" dlg:left="6" dlg:top="90" dlg:width="40" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_TXTCOMMISSION" dlg:format-code="0,00%" dlg:format-locale="de;DE"/> + <dlg:text dlg:id="lblCommission" dlg:tab-index="12" dlg:left="6" dlg:top="79" dlg:width="60" dlg:height="8" dlg:value="lblCommission"/> + <dlg:currencyfield dlg:id="txtFix" dlg:tab-index="13" dlg:left="68" dlg:top="90" dlg:width="40" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_TXTFIX" dlg:value-min="0"/> + <dlg:currencyfield dlg:id="txtMinimum" dlg:tab-index="14" dlg:left="150" dlg:top="90" dlg:width="40" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_TXTMINIMUM" dlg:value-min="0"/> + <dlg:text dlg:id="lblFix" dlg:tab-index="15" dlg:left="68" dlg:top="79" dlg:width="71" dlg:height="8" dlg:value="lblFix"/> + <dlg:text dlg:id="lblMinimum" dlg:tab-index="16" dlg:left="150" dlg:top="79" dlg:width="66" dlg:height="8" dlg:value="lblMinimum"/> + <dlg:button dlg:id="cmdCancel" dlg:tab-index="17" dlg:left="58" dlg:top="109" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SELLBUY" dlg:value="cmdCancel"> + <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Depot.Depot.CancelTransaction?language=Basic&location=application" script:language="Script"/> + </dlg:button> + <dlg:button dlg:id="cmdGoOn" dlg:tab-index="18" dlg:left="111" dlg:top="109" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SELLBUY" dlg:value="cmdGoOn"> + <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Depot.Depot.TransactionOk?language=Basic&location=application" script:language="Script"/> + </dlg:button> + <dlg:fixedline dlg:id="hlnCommission" dlg:tab-index="19" dlg:left="6" dlg:top="66" dlg:width="210" dlg:height="8" dlg:value="hlnCommission"/> + </dlg:bulletinboard> +</dlg:window>
\ No newline at end of file diff --git a/wizards/source/depot/Dialog3.xdl b/wizards/source/depot/Dialog3.xdl new file mode 100644 index 000000000..3b8904700 --- /dev/null +++ b/wizards/source/depot/Dialog3.xdl @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Dialog3" dlg:left="161" dlg:top="81" dlg:width="176" dlg:height="119" dlg:page="3" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_DIALOG_SPLIT" dlg:closeable="true" dlg:moveable="true"> + <dlg:bulletinboard> + <dlg:text dlg:id="lblStockNames" dlg:tab-index="0" dlg:left="6" dlg:top="6" dlg:width="98" dlg:height="8" dlg:value="lblStockNames"/> + <dlg:menulist dlg:id="lstStockNames" dlg:tab-index="1" dlg:left="5" dlg:top="17" dlg:width="102" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_LSTSTOCKNAMES" dlg:spin="true"> + <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Depot.Depot.SelectStockNameForRates?language=Basic&location=application" script:language="Script"/> + </dlg:menulist> + <dlg:textfield dlg:id="txtStockID" dlg:tab-index="2" dlg:left="120" dlg:top="17" dlg:width="50" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_TXTSTOCKID_SPLIT"/> + <dlg:datefield dlg:id="txtStartDate" dlg:tab-index="3" dlg:left="63" dlg:top="37" dlg:width="50" dlg:height="12" dlg:page="3" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_3_TXTSTARTDATE" dlg:spin="true"> + <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Depot.tools.CheckInputDate?language=Basic&location=application" script:language="Script"/> + </dlg:datefield> + <dlg:datefield dlg:id="txtEndDate" dlg:tab-index="4" dlg:left="63" dlg:top="53" dlg:width="50" dlg:height="12" dlg:page="3" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_3_TXTENDDATE" dlg:spin="true"> + <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Depot.tools.CheckInputDate?language=Basic&location=application" script:language="Script"/> + </dlg:datefield> + <dlg:radiogroup> + <dlg:radio dlg:id="optDaily" dlg:tab-index="5" dlg:left="12" dlg:top="83" dlg:width="75" dlg:height="10" dlg:page="3" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_3_OPTDAILY" dlg:value="optDaily"/> + <dlg:radio dlg:id="optWeekly" dlg:tab-index="6" dlg:left="101" dlg:top="83" dlg:width="69" dlg:height="10" dlg:page="3" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_3_OPTWEEKLY" dlg:value="optWeekly"/> + </dlg:radiogroup> + <dlg:datefield dlg:id="txtDate" dlg:tab-index="7" dlg:left="71" dlg:top="73" dlg:width="50" dlg:height="12" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_2_TXTDATE" dlg:spin="true"> + <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Depot.tools.CheckInputDate?language=Basic&location=application" script:language="Script"/> + </dlg:datefield> + <dlg:radiogroup> + <dlg:radio dlg:id="optPerShare" dlg:tab-index="8" dlg:left="6" dlg:top="37" dlg:width="69" dlg:height="10" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_1_OPTPERSHARE" dlg:value="optPerShare"/> + <dlg:radio dlg:id="optTotal" dlg:tab-index="9" dlg:left="6" dlg:top="51" dlg:width="69" dlg:height="10" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_1_OPTTOTAL" dlg:value="optTotal"/> + </dlg:radiogroup> + <dlg:currencyfield dlg:id="txtDividend" dlg:tab-index="10" dlg:left="6" dlg:top="80" dlg:width="50" dlg:height="12" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_1_TXTDIVIDEND" dlg:value-min="0" dlg:spin="true"/> + <dlg:button dlg:id="cmdCancel" dlg:tab-index="11" dlg:left="41" dlg:top="98" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_SPLIT" dlg:value="cmdCancel"> + <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Depot.Depot.CancelStockRate?language=Basic&location=application" script:language="Script"/> + </dlg:button> + <dlg:button dlg:id="cmdGoOn" dlg:tab-index="12" dlg:left="94" dlg:top="98" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_SPLIT" dlg:value="cmdGoOn"> + <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Depot.Depot.CommitStockRate?language=Basic&location=application" script:language="Script"/> + </dlg:button> + <dlg:text dlg:id="lblStockID" dlg:tab-index="13" dlg:left="120" dlg:top="6" dlg:width="50" dlg:height="8" dlg:value="lblStockID"/> + <dlg:text dlg:id="lblDividend" dlg:tab-index="14" dlg:left="6" dlg:top="68" dlg:width="73" dlg:height="8" dlg:page="1" dlg:value="lblDividend"/> + <dlg:text dlg:id="lblExchangeRate" dlg:tab-index="15" dlg:left="6" dlg:top="39" dlg:width="92" dlg:height="8" dlg:page="2" dlg:value="lblExchangeRate"/> + <dlg:text dlg:id="lblColon" dlg:tab-index="16" dlg:left="40" dlg:top="55" dlg:width="5" dlg:height="8" dlg:page="2" dlg:value=" :"/> + <dlg:text dlg:id="lblDate" dlg:tab-index="17" dlg:left="5" dlg:top="75" dlg:width="66" dlg:height="8" dlg:page="2" dlg:value="lblDate"/> + <dlg:fixedline dlg:id="hlnInterval" dlg:tab-index="18" dlg:left="6" dlg:top="72" dlg:width="164" dlg:height="8" dlg:page="3" dlg:value="hlnInterval"/> + <dlg:text dlg:id="lblStartDate" dlg:tab-index="19" dlg:left="6" dlg:top="39" dlg:width="53" dlg:height="8" dlg:page="3" dlg:value="lblStartDate"/> + <dlg:text dlg:id="lblEndDate" dlg:tab-index="20" dlg:left="6" dlg:top="55" dlg:width="53" dlg:height="8" dlg:page="3" dlg:value="lblEndDate"/> + <dlg:numericfield dlg:id="txtOldRate" dlg:tab-index="21" dlg:left="6" dlg:top="53" dlg:width="30" dlg:height="12" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_2_TXTOLDRATE" dlg:decimal-accuracy="0" dlg:value-min="1" dlg:spin="true"/> + <dlg:numericfield dlg:id="txtNewRate" dlg:tab-index="22" dlg:left="50" dlg:top="53" dlg:width="30" dlg:height="12" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_2_TXTNEWRATE" dlg:decimal-accuracy="0" dlg:value-min="1" dlg:spin="true"/> + </dlg:bulletinboard> +</dlg:window>
\ No newline at end of file diff --git a/wizards/source/depot/Dialog4.xdl b/wizards/source/depot/Dialog4.xdl new file mode 100644 index 000000000..057eb9d17 --- /dev/null +++ b/wizards/source/depot/Dialog4.xdl @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Dialog4" dlg:left="161" dlg:top="81" dlg:width="160" dlg:height="120" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_DIALOG_HISTORY" dlg:closeable="true" dlg:moveable="true"> + <dlg:bulletinboard> + <dlg:text dlg:id="lblWelcome" dlg:tab-index="0" dlg:left="6" dlg:top="6" dlg:width="148" dlg:height="49" dlg:value="lblWelcome" dlg:multiline="true"/> + <dlg:text dlg:id="lblHint" dlg:tab-index="1" dlg:left="6" dlg:top="73" dlg:width="148" dlg:height="26" dlg:value="lblHint" dlg:multiline="true"/> + <dlg:button dlg:id="cmdCancel" dlg:tab-index="2" dlg:left="28" dlg:top="100" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_CMDCANCEL_HISTORY" dlg:value="cmdCancel"> + <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Depot.Currency.CloseStartUpDialog?language=Basic&location=application" script:language="Script"/> + </dlg:button> + <dlg:button dlg:id="cmdGoOn" dlg:tab-index="3" dlg:left="84" dlg:top="100" dlg:width="52" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_0_CMDGOON_HISTORY" dlg:value="cmdGoOn"> + <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Depot.Currency.ChooseMarket?language=Basic&location=application" script:language="Script"/> + </dlg:button> + <dlg:menulist dlg:id="lstMarkets" dlg:tab-index="4" dlg:left="6" dlg:top="57" dlg:width="148" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGDEPOT_LSTMARKETS" dlg:spin="true"> + <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Depot.Currency.EnableGoOnButton?language=Basic&location=application" script:language="Script"/> + </dlg:menulist> + </dlg:bulletinboard> +</dlg:window>
\ No newline at end of file diff --git a/wizards/source/depot/Internet.xba b/wizards/source/depot/Internet.xba new file mode 100644 index 000000000..d3393bc72 --- /dev/null +++ b/wizards/source/depot/Internet.xba @@ -0,0 +1,356 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Internet" script:language="StarBasic">REM ***** BASIC ***** +Option Explicit +Public sNewSheetName as String + +Function CheckHistoryControls() +Dim bLocGoOn as Boolean +Dim Firstdate as Date +Dim LastDate as Date + LastDate = CDateFromUNODate(StockRatesModel.txtEndDate.Date) + FirstDate = CDateFromUNODate(StockRatesModel.txtStartDate.Date) + bLocGoOn = FirstDate <> 0 And LastDate <> 0 + If bLocGoOn Then + If FirstDate >= LastDate Then + Msgbox(sMsgStartDatebeforeEndDate,16, sProductname) + bLocGoOn = False + End If + End If + CheckHistoryControls = bLocGoon +End Function + + +Sub InsertCompanyHistory() +Dim StockName as String +Dim CurRow as Integer +Dim sMsgInternetError as String +Dim CurRate as Double +Dim oCell as Object +Dim sStockID as String +Dim ChartSource as String + If CheckHistoryControls() Then + StartDate = CDateFromUNODate(StockRatesModel.txtStartDate.Date) + EndDate = CDateFromUNODate(StockRatesModel.txtEndDate.Date) + DlgStockRates.EndExecute() + If StockRatesModel.optDaily.State = 1 Then + sInterval = "d" + iStep = 1 + ElseIf StockRatesModel.optWeekly.State = 1 Then + sInterval = "w" + iStep = 7 + StartDate = StartDate - WeekDay(StartDate) + 2 + EndDate = EndDate - WeekDay(EndDate) + 2 + End If + iEndDay = Day(EndDate) + iEndMonth = Month(EndDate) + iEndYear = Year(EndDate) + iStartDay = Day(StartDate) + iStartMonth = Month(StartDate) + iStartYear = Year(StartDate) +' oDocument.AddActionLock() + UnprotectSheets(oSheets) + InitializeStatusline("", 10, 1) + oBackGroundSheet = oSheets.GetbyName("Background") + StockName = DlgStockRates.GetControl("lstStockNames").GetSelectedItem() + CurRow = GetStockRowIndex(Stockname) + sStockID = oFirstSheet.GetCellByPosition(SBCOLUMNID1, CurRow).String + ChartSource = ReplaceString(HistoryChartSource, sStockID, "<StockID>") + ChartSource = ReplaceString(ChartSource, iStartDay, "<StartDay>") + ChartSource = ReplaceString(ChartSource, cStr(iStartMonth-1), "<StartMonth>") + ChartSource = ReplaceString(ChartSource, iStartYear, "<StartYear>") + ChartSource = ReplaceString(ChartSource, iEndDay, "<EndDay>") + ChartSource = ReplaceString(ChartSource, cStr(iEndMonth-1), "<EndMonth>") + ChartSource = ReplaceString(ChartSource, iEndYear, "<EndYear>") + ChartSource = ReplaceString(ChartSource, sInterval, "<interval>") + oStatusLine.SetValue(2) + If GetCurrentRate(ChartSource, CurRate, 1) Then + oStatusLine.SetValue(8) + UpdateValue(StockName, Today, CurRate) + oStatusLine.SetValue(9) + UpdateChart(StockName) + oStatusLine.SetValue(10) + Else + sMsgInternetError = Stockname & ": " & sNoInternetDataAvailable & chr(13) & sCheckInternetSettings + Msgbox(sMsgInternetError, 16, sProductname) + End If + ProtectSheets(oSheets) + oStatusLine.End + If oSheets.HasbyName(sNewSheetName) Then + oController.ActiveSheet = oSheets.GetByName(sNewSheetName) + End If +' oDocument.RemoveActionLock() + End If +End Sub + + + +Sub InternetUpdate() +Dim i as Integer +Dim StocksCount as Integer +Dim iStartRow as Integer +Dim sUrl as String +Dim StockName as String +Dim CurRate as Double +Dim oCell as Object +Dim sMsgInternetError as String +Dim sStockID as String +Dim ChartSource as String +' oDocument.AddActionLock() + Initialize(True) + UnprotectSheets(oSheets) + StocksCount = GetStocksCount(iStartRow) + InitializeStatusline("", StocksCount + 1, 1) + Today = CDate(Date) + For i = iStartRow + 1 To iStartRow + StocksCount + StockName = oFirstSheet.GetCellbyPosition(SBCOLUMNNAME1, i).String + sStockID = oFirstSheet.GetCellByPosition(SBCOLUMNID1, i).String + ChartSource = ReplaceString(sCurChartSource, sStockID, "<StockID>") + If GetCurrentRate(ChartSource, CurRate, 0) Then + InsertCurrentValue(CurRate, i, Now) + Else + sMsgInternetError = Stockname & ": " & sNoInternetDataAvailable & chr(13) & sCheckInternetSettings + Msgbox(sMsgInternetError, 16, sProductname) + End If + oStatusline.SetValue(i - iStartRow + 1) + Next + ProtectSheets(oSheets) + oStatusLine.End +' oDocument.RemoveActionLock +End Sub + + + +Function GetCurrentRate(sUrl as String, fValue As Double, iValueRow as Integer) as Boolean +Dim sFilter As String +Dim sOptions As String +Dim oLinkSheet As Object +Dim sDate as String + If oSheets.hasByName("Link") Then + oLinkSheet = oSheets.getByName("Link") + Else + oLinkSheet = oDocument.createInstance("com.sun.star.sheet.Spreadsheet") + oSheets.insertByName("Link", oLinkSheet) + oLinkSheet.IsVisible = False + End If + + sFilter = "Text - txt - csv (StarCalc)" + sOptions = sCurSeparator & ",34,SYSTEM,1,1/10/2/10/3/10/4/10/5/10/6/10/7/10/8/10/9/10" + + oLinkSheet.LinkMode = com.sun.star.sheet.SheetLinkMode.NONE + oLinkSheet.link(sUrl, "", sFilter, sOptions, 1 ) + fValue = oLinkSheet.getCellByPosition(iValueCol, iValueRow).Value + If fValue = 0 Then + Dim sValue as String + sValue = oLinkSheet.getCellByPosition(1, iValueRow).String + sValue = ReplaceString(sValue, ".",",") + fValue = Val(sValue) + End If + GetCurrentRate = fValue <> 0 +End Function + + + +Sub UpdateValue(ByVal sName As String, fDate As Double, fValue As Double ) +Dim oSheet As Object +Dim iColumn As Long +Dim iRow As Long +Dim i as Long +Dim oCell As Object +Dim LastDate as Date +Dim bLeaveLoop as Boolean +Dim RemoveCount as Long +Dim iLastRow as Long +Dim iLastLinkRow as Long +Dim dDate as Date +Dim CurDate as Date +Dim oLinkSheet as Object +Dim StartIndex as Long +Dim iCellValue as Long + ' Insert Sheet with Company - Chart + sName = CheckNewSheetname(oSheets, sName) + If NOT oSheets.hasByName(sName) Then + oSheets.CopybyName("Background", sName, oSheets.Count) + oSheet = oSheets.getByName(sName) + iCurRow = SBSTARTROW + iMaxRow = iCurRow + oCell = oSheet.getCellByPosition(SBDATECOLUMN, iCurRow) + oCell.Value = fDate + End If + sNewSheetName = sName + oLinkSheet = oSheets.GetByName("Link") + oSheet = oSheets.getByName(sName) + iLastRow = GetLastUsedRow(oSheet)- 2 + iLastLinkRow = GetLastUsedRow(oLinkSheet) + iCurRow = iLastRow + bLeaveLoop = False + RemoveCount = 0 + ' Delete all Cells in Date Area + Do + oCell = oSheet.GetCellbyPosition(SBDATECOLUMN,iCurRow) + If oCell.CellStyle = sColumnHeader Then + bLeaveLoop = True + StartIndex = iCurRow + iCurRow = iCurRow + 1 + Else + RemoveCount = RemoveCount + 1 + iCurRow = iCurRow - 1 + End If + Loop Until bLeaveLoop + If RemoveCount > 1 Then + oSheet.Rows.RemoveByIndex(iCurRow, RemoveCount-1) + End If + For i = 1 To iLastLinkRow + oCell = oSheet.GetCellbyPosition(SBDATECOLUMN,iCurRow) + iCellValue = oLinkSheet.GetCellByPosition(0,i).Value + If iCellValue > 0 Then + oCell.SetValue(oLinkSheet.GetCellByPosition(0,i).Value) + Else + oCell.SetValue(StringToDate(oLinkSheet.GetCellByPosition(0,i).String)) + End If + oCell = oSheet.GetCellbyPosition(SBVALUECOLUMN,iCurRow) + oCell.SetValue(oLinkSheet.GetCellByPosition(4,i).Value) + If i < iLastLinkRow Then + iCurRow = iCurRow + 1 + oSheet.Rows.InsertByIndex(iCurRow,1) + End If + Next i + iMaxRow = iCurRow +End Sub + + +Function StringToDate(DateString as String) as Date +Dim ShortMonths(11) +Dim DateList() as String +Dim MaxIndex as Integer +Dim i as Integer + ShortMonths(0) = "Jan" + ShortMonths(1) = "Feb" + ShortMonths(2) = "Mar" + ShortMonths(3) = "Apr" + ShortMonths(4) = "May" + ShortMonths(5) = "Jun" + ShortMonths(6) = "Jul" + ShortMonths(7) = "Aug" + ShortMonths(8) = "Sep" + ShortMonths(9) = "Oct" + ShortMonths(10) = "Nov" + ShortMonths(11) = "Dec" + For i = 0 To 11 + DateString = ReplaceString(DateString,CStr(i+1),ShortMonths(i)) + Next i + DateString = ReplaceString(DateString, ".", "-") + StringToDate = CDate(DateString) +End Function + + +Sub UpdateChart(sName As String) +Dim oSheet As Object +Dim oCell As Object, oCursor As Object +Dim oChartRange As Object +Dim oEmbeddedChart As Object, oCharts As Object +Dim oChart As Object, oDiagram As Object +Dim oYAxis As Object, oXAxis As Object +Dim fMin As Double, fMax As Double +Dim nDateFormat As Long +Dim aPos As Variant +Dim aSize As Variant +Dim oContainerChart as Object +Dim mRangeAddresses(0) as New com.sun.star.table.CellRangeAddress + mRangeAddresses(0).Sheet = GetSheetIndex(oSheets, sNewSheetName) + mRangeAddresses(0).StartColumn = SBDATECOLUMN + mRangeAddresses(0).StartRow = SBSTARTROW-1 + mRangeAddresses(0).EndColumn = SBVALUECOLUMN + mRangeAddresses(0).EndRow = iMaxRow + + oSheet = oDocument.Sheets.getByName(sNewSheetName) + oCharts = oSheet.Charts + + If Not oCharts.hasElements Then + oSheet.GetCellbyPosition(2,2).SetString(sName) + oChartRange = oSheet.getCellRangeByPosition(SBDATECOLUMN,6,5,SBSTARTROW-3) + aPos = oChartRange.Position + aSize = oChartRange.Size + + Dim oRectangleShape As New com.sun.star.awt.Rectangle + oRectangleShape.X = aPos.X + oRectangleShape.Y = aPos.Y + oRectangleShape.Width = aSize.Width + oRectangleShape.Height = aSize.Height + oCharts.addNewByName(sName, oRectangleShape, mRangeAddresses(), True, False) + oContainerChart = oCharts.getByName(sName) + oChart = oContainerChart.EmbeddedObject + oChart.Title.String = "" + oChart.HasLegend = False + oChart.diagram = oChart.createInstance("com.sun.star.chart.XYDiagram") + oDiagram = oChart.Diagram + oDiagram.DataRowSource = com.sun.star.chart.ChartDataRowSource.COLUMNS + oChart.Area.LineStyle = com.sun.star.drawing.LineStyle.SOLID + oXAxis = oDiagram.XAxis + oXAxis.TextBreak = False + nDateFormat = oXAxis.NumberFormats.getStandardFormat(com.sun.star.util.NumberFormat.DATE, oDocLocale) + + oYAxis = oDiagram.getYAxis() + oYAxis.AutoOrigin = True + Else + oChart = oCharts(0) + oChart.Ranges = mRangeAddresses() + oChart.HasRowHeaders = False + oEmbeddedChart = oChart.EmbeddedObject + oDiagram = oEmbeddedChart.Diagram + oXAxis = oDiagram.XAxis + End If + oXAxis.AutoStepMain = False + oXAxis.AutoStepHelp = False + oXAxis.StepMain = iStep + oXAxis.StepHelp = iStep + fMin = oSheet.getCellByPosition(SBDATECOLUMN,SBSTARTROW).Value + fMax = oSheet.getCellByPosition(SBDATECOLUMN,iMaxRow).Value + oXAxis.Min = fMin + oXAxis.Max = fMax + oXAxis.AutoMin = False + oXAxis.AutoMax = False +End Sub + + +Sub CalculateChartafterSplit(SheetName, NewNumber, OldNumber, NoteText, SplitDate) +Dim oSheet as Object +Dim i as Integer +Dim oValueCell as Object +Dim oDateCell as Object +Dim bLeaveLoop as Boolean + If oSheets.HasbyName(SheetName) Then + oSheet = oSheets.GetbyName(SheetName) + i = 0 + bLeaveLoop = False + Do + oValueCell = oSheet.GetCellbyPosition(SBVALUECOLUMN, SBSTARTROW + i) + If oValueCell.CellStyle = CurrCellStyle Then + SplitCellValue(oSheet, OldNumber, NewNumber, SBVALUECOLUMN, SBSTARTROW + i, "") + i = i + 1 + Else + bLeaveLoop = True + End If + Loop Until bLeaveLoop + oDateCell = oSheet.GetCellbyPosition(SBDATECOLUMN, SBSTARTROW + i-1) + oDateCell.Annotation.SetString(NoteText) + End If +End Sub +</script:module> diff --git a/wizards/source/depot/Lang_de.xba b/wizards/source/depot/Lang_de.xba new file mode 100644 index 000000000..a8b4c55ca --- /dev/null +++ b/wizards/source/depot/Lang_de.xba @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_de" script:language="StarBasic">Option Explicit + +Sub LoadGermanLanguage() + + sProductname = GetProductname + sOK = "~OK" + sCancel = "Abbrechen" + sColumnHeader = "Spaltenkopf" + sInsertStockName = "Bitte fügen Sie zunächst einige Aktien in Ihr Depot ein!" + sTitle = "<PRODUCTNAME>: Aktienverwaltung" + sTitle = ReplaceString(sTitle, sProductName, "<PRODUCTNAME>") + sMsgError = "Eingabefehler" + sMsgNoName = sInsertStockname + sMsgNoQuantity = "Bitte geben Sie eine Stückzahl größer als 0 ein" + sMsgNoDividend = "Bitte geben Sie eine Dividende je Stück oder eine Gesamtdividende ein" + sMsgNoExchangeRate = "Bitte geben Sie eine korrekte Umtauschrate ein (alte Aktien -> neue Aktien)." + sMsgNoValidExchangeDate = "Bitte geben Sie ein gültiges Datum für den Aktiensplitt ein." + sMsgWrongExchangeDate = "Splitt nicht möglich, da bereits Transaktionen nach dem Splitt-Datum existieren." + sMsgSellTooMuch = "So viele Aktien können Sie nicht verkaufen. Maximum: " + sMsgConfirm = "Bestätigung erforderlich" + sMsgFreeStock = "Beabsichtigen Sie die Eingabe von Gratisaktien?" + sMsgTotalLoss = "Beabsichtigen Sie die Eingabe eines Totalverlustes?" + sMsgAuthorization = "Sicherheitsabfrage" + sMsgDeleteAll = "Wollen Sie alle Bewegungen löschen und die Depotübersicht rücksetzen?" + cSplit = "Aktiensplitt am " + sHistory = "Historie" + TransactTitle(1) = "Aktien verkaufen" + TransactTitle(2) = "Aktien kaufen" + StockRatesTitle(1) = "Dividendenzahlung" + StockRatesTitle(2) = "Aktiensplitt" + StockRatesTitle(3) = sHistory + sDepotCurrency = "Depotwährung" + sStockName = "Aktienname" + TransactMode = LIFO ' Possible values: "FIFO" and "LIFO" + DateCellStyle = "Ergebnis Datum" + CurrCellStyle = "Ergebnis Euro mit Dezimalen" + sStartDate = "Startdatum:" + sEndDate = "Enddatum:" + sStartUpWelcome = "Diese Vorlage ermöglicht Ihnen eine effiziente Verwaltung Ihres Aktiendepots" + sStartUpChooseMarket = "Wählen Sie zunächst Ihre Referenz-Währung und damit den Börsenplatz für das Internet Update aus!" + sStartUpHint = "Leider steht Ihnen die <History>- Funktion nur für den amerikanischen Markt zur Verfügung!" + sStartupHint = ReplaceString(sStartUpHint, sHistory, "<History>") + sNoInternetUpdate = "ohne Internet Update" + sMarketPlace = "Börsenplatz:" + sNoInternetDataAvailable = "Internet-Kurse konnten nicht empfangen werden!" + sCheckInternetSettings = "Mögliche Ursachen sind: <BR> Ihre Internet Einstellungen müssen überprüft werden.<BR> Sie haben eine falsche Kennung (z.B. Symbol, WKN) für die Aktie eingegeben." + sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), "<BR>") + + sMsgEndDatebeforeNow = "Das Enddatum muss vor dem heutigen Tag liegen!" + sMsgStartDatebeforeEndDate = "Das Startdatum muss vor dem Enddatum liegen!" + + sMarket(0,0) = "Amerikanischer Dollar" + sMarket(0,1) = "$" + sMarket(0,2) = "New York" + sMarket(0,3) = "http://finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(0,4) = "http://ichart.finance.yahoo.com/table.csv?" &_ + "s=<StockID>&d=<EndMonth>&e=<EndDay>&f=<Endyear>&g=d&" &_ + "a=<StartMonth>&b=<StartDay>&c=<Startyear>&ignore=.csv" + sMarket(0,5) = "Symbol" + sMarket(0,6) = "en" + sMarket(0,7) = "US" + sMarket(0,8) = "409" + sMarket(0,9) = "44" + sMarket(0,10) = "1" + + sMarket(1,0) = "Euro" + sMarket(1,1) = chr(8364) + sMarket(1,2) = "Frankfurt" + sMarket(1,3) = "http://de.finance.yahoo.com/d/quotes.csv?s=<StockID>.F&f=sl1t1c1ghpv&e=.csv" + sMarket(1,5) = "WKN" + sMarket(1,6) = "de;nl;pt;el" + sMarket(1,7) = "DE;NL;PT;GR" + sMarket(1,8) = "407;413;816;408" + sMarket(1,9) = "59/9" + sMarket(1,10) = "1" + + sMarket(2,0) = "Englisches Pfund" + sMarket(2,1) = "£" + sMarket(2,2) = "London" + sMarket(2,3) = "http://uk.finance.yahoo.com/d/quotes.csv?s=<StockID>.L&m=*&f=sl1t1c1ghov&e=.csv" + sMarket(2,5) = "Symbol" + sMarket(2,6) = "en" + sMarket(2,7) = "GB" + sMarket(2,8) = "809" + sMarket(2,9) = "44" + sMarket(2,10) = "1" + + sMarket(3,0) = "Japanischer Yen" + sMarket(3,1) = "¥" + sMarket(3,2) = "Tokyo" + sMarket(3,3) = "" + sMarket(3,5) = "Code" + sMarket(3,6) = "ja" + sMarket(3,7) = "JP" + sMarket(3,8) = "411" + sMarket(3,9) = "" + sMarket(3,10) = "" + + sMarket(4,0) = "Hongkong Dollar" + sMarket(4,1) = "HK$" + sMarket(4,2) = "Hongkong" + sMarket(4,3) = "http://hk.finance.yahoo.com/d/quotes.csv?s=<StockID>.HK&f=sl1d1t1c1ohgv&e=.csv" + sMarket(4,5) = "Nummer" + sMarket(4,6) = "zh" + sMarket(4,7) = "HK" + sMarket(4,8) = "C04" + sMarket(4,9) = "44" + sMarket(4,10) = "1" + + sMarket(5,0) = "Australischer Dollar" + sMarket(5,1) = "$" + sMarket(5,2) = "Sydney" + sMarket(5,3) = "http://au.finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(5,5) = "Symbol" + sMarket(5,6) = "en" + sMarket(5,7) = "AU" + sMarket(5,8) = "C09" + sMarket(5,9) = "44" + sMarket(5,10) = "1" + +' ****************************End of the default subset********************************* + CompleteMarketList() + + LocalizedCurrencies() + + With TransactModel + .lblStockNames.Label = sStockname + .lblQuantity.Label = "Menge" + .lblRate.Label = "Kurs" + .lblDate.Label = "Transaktionsdatum" + .hlnCommission.Label = "Sonstige Ausgaben" + .lblCommission.Label = "Provision" + .lblMinimum.Label = "Mindestprovision" + .lblFix.Label = "Festbetrag/Spesen" + .cmdGoOn.Label = sOK + .cmdCancel.Label = sCancel + End With + + With StockRatesModel + .optPerShare.Label = "Dividende/Aktie" + .optTotal.Label = "Dividende gesamt" + .lblDividend.Label = "Betrag" + .lblExchangeRate.Label = "Umtauschrate (alt->neu)" + .lblColon.Label = ":" + .lblDate.Label = "Umtauschdatum:" + .lblStockNames.Label = sStockname + .lblStartDate.Label = sStartDate + .lblEndDate.Label = sEndDate + .optDaily.Label = "~Täglich" + .optWeekly.Label = "~Wöchentlich" + .hlnInterval.Label = "Zeitraum" + .cmdGoOn.Label = sOk + .cmdCancel.Label = sCancel + End With +End Sub +</script:module>
\ No newline at end of file diff --git a/wizards/source/depot/Lang_en.xba b/wizards/source/depot/Lang_en.xba new file mode 100644 index 000000000..b97efb156 --- /dev/null +++ b/wizards/source/depot/Lang_en.xba @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_en" script:language="StarBasic">Option Explicit + +Sub LoadEnglishLanguage() + + sProductname = GetProductname + sOK = "~OK" + sCancel = "Cancel" + sColumnHeader = "Column Header" + sInsertStockName = "Please enter shares in your portfolio." + sTitle = "<PRODUCTNAME>: Stocks Manager" + sTitle = ReplaceString(sTitle, sProductName, "<PRODUCTNAME>") + sMsgError = "Input Error" + sMsgNoName = sInsertStockname + sMsgNoQuantity = "Please enter a quantity larger than 0" + sMsgNoDividend = "Please enter the dividend per share or the total dividend" + sMsgNoExchangeRate = "Please enter the correct exchange rate (old shares -> new shares)" + sMsgNoValidExchangeDate = "Please enter a valid date for the split." + sMsgWrongExchangeDate = "Splitting not possible, as transactions already exist after the split date." + sMsgSellTooMuch = "You cannot sell that many shares. Maximum: " + sMsgConfirm = "Confirmation Required" + sMsgFreeStock = "Do you intend to enter free shares?" + sMsgTotalLoss = "Do you intend to enter a total loss?" + sMsgAuthorization = "Security Query" + sMsgDeleteAll = "Do you want to delete all movements and reset the portfolio overview?" + cSplit = "Stock split on " + sHistory = "History" + TransactTitle(1) = "StarOffice Stocks Manager: Selling Shares" + TransactTitle(2) = "StarOffice Stocks Manager: Buying Shares" + StockRatesTitle(1) = "StarOffice Stocks Manager: Dividend Payment" + StockRatesTitle(2) = "Stock Split" + StockRatesTitle(3) = sHistory + sDepotCurrency = "Portfolio Currency" + sStockName = "Name of Stock" + TransactMode = LIFO ' Possible values: "FIFO" and "LIFO" + DateCellStyle = "Result Date" + CurrCellStyle = "1" + sStartDate = "Start date:" + sEndDate = "End date:" + sStartUpWelcome = "This template enables you to manage your stock portfolio efficiently." + sStartUpChooseMarket = "First, select your reference currency and thus the stock exchange for the Internet update." + sStartUpHint = "Unfortunately, the only <History> function available to you is that for the American market." + sStartupHint = ReplaceString(sStartUpHint, sHistory, "<History>") + sNoInternetUpdate = "without Internet update" + sMarketPlace = "Stock exchange:" + sNoInternetDataAvailable = "No prices could be received from the Internet!" + sCheckInternetSettings = "Possible causes could be: <BR>Your Internet settings have to be modified. <BR>The Symbol (e.g. Code, Ticker Symbol) entered for the stock was incorrect." + sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), "<BR>") + + sMsgEndDatebeforeNow = "The end date has to be before today's date." + sMsgStartDatebeforeEndDate = "The start date has to be before the end date." + + sMarket(0,0) = "American Dollar" + sMarket(0,1) = "$" + sMarket(0,2) = "New York" + sMarket(0,3) = "http://finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(0,4) = "http://ichart.finance.yahoo.com/table.csv?" &_ + "s=<StockID>&d=<EndMonth>&e=<EndDay>&f=<Endyear>&g=d&" &_ + "a=<StartMonth>&b=<StartDay>&c=<Startyear>&ignore=.csv" + sMarket(0,5) = "Symbol" + sMarket(0,6) = "en" + sMarket(0,7) = "US" + sMarket(0,8) = "409" + sMarket(0,9) = "44" + sMarket(0,10) = "1" + + sMarket(1,0) = "Euro" + sMarket(1,1) = chr(8364) + sMarket(1,2) = "Frankfurt" + sMarket(1,3) = "http://de.finance.yahoo.com/d/quotes.csv?s=<StockID>.F&f=sl1t1c1ghpv&e=.csv" + sMarket(1,5) = "Ticker Symbol" + sMarket(1,6) = "de;nl;pt;el" + sMarket(1,7) = "DE;NL;PT;GR" + sMarket(1,8) = "407;413;816;408" + sMarket(1,9) = "59/9" + sMarket(1,10) = "1" + + sMarket(2,0) = "British Pound" + sMarket(2,1) = "£" + sMarket(2,2) = "London" + sMarket(2,3) = "http://uk.finance.yahoo.com/d/quotes.csv?s=<StockID>.L&m=*&f=sl1t1c1ghov&e=.csv" + sMarket(2,5) = "Symbol" + sMarket(2,6) = "en" + sMarket(2,7) = "GB" + sMarket(2,8) = "809" + sMarket(2,9) = "44" + sMarket(2,10) = "1" + + sMarket(3,0) = "Japanese Yen" + sMarket(3,1) = "¥" + sMarket(3,2) = "Tokyo" + sMarket(3,3) = "" + sMarket(3,5) = "Code" + sMarket(3,6) = "ja" + sMarket(3,7) = "JP" + sMarket(3,8) = "411" + sMarket(3,9) = "" + sMarket(3,10) = "" + + sMarket(4,0) = "Hong Kong Dollar" + sMarket(4,1) = "HK$" + sMarket(4,2) = "Hong Kong" + sMarket(4,3) = "http://hk.finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(4,5) = "Number" + sMarket(4,6) = "zh" + sMarket(4,7) = "HK" + sMarket(4,8) = "C04" + sMarket(4,9) = "44" + sMarket(4,10) = "1" + + sMarket(5,0) = "Australian Dollar" + sMarket(5,1) = "$" + sMarket(5,2) = "Sydney" + sMarket(5,3) = "http://au.finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(5,5) = "Symbol" + sMarket(5,6) = "en" + sMarket(5,7) = "AU" + sMarket(5,8) = "C09" + sMarket(5,9) = "44" + sMarket(5,10) = "1" + +' ****************************End of the default subset********************************* + CompleteMarketList() + + LocalizedCurrencies() + + With TransactModel + .lblStockNames.Label = sStockname + .lblQuantity.Label = "Quantity" + .lblRate.Label = "Price" + .lblDate.Label = "Transaction Date" + .hlnCommission.Label = "Other expenditures" + .lblCommission.Label = "Commission" + .lblMinimum.Label = "Min. Commission" + .lblFix.Label = "Fixed Costs/Charges" + .cmdGoOn.Label = sOK + .cmdCancel.Label = sCancel + End With + + With StockRatesModel + .optPerShare.Label = "Dividends/Stocks" + .optTotal.Label = "Total Dividends" + .lblDividend.Label = "Amount" + .lblExchangeRate.Label = "Exchange Rate (old->new)" + .lblColon.Label = ":" + .lblDate.Label = "Exchange Date:" + .lblStockNames.Label = sStockname + .lblStartDate.Label = sStartDate + .lblEndDate.Label = sEndDate + .optDaily.Label = "~Daily" + .optWeekly.Label = "~Weekly" + .hlnInterval.Label = "Time period" + .cmdGoOn.Label = sOk + .cmdCancel.Label = sCancel + End With +End Sub +</script:module>
\ No newline at end of file diff --git a/wizards/source/depot/Lang_es.xba b/wizards/source/depot/Lang_es.xba new file mode 100644 index 000000000..b6bf01c43 --- /dev/null +++ b/wizards/source/depot/Lang_es.xba @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_es" script:language="StarBasic">Option Explicit + +Sub LoadSpanishLanguage() + + sProductname = GetProductname + sOK = "~Aceptar" + sCancel = "Cancelar" + sColumnHeader = "Título de columna" + sInsertStockName = "Introduzca primero algunas acciones en su depósito." + sTitle = "<PRODUCTNAME>: Administración de acciones" + sTitle = ReplaceString(sTitle, sProductName, "<PRODUCTNAME>") + sMsgError = "Error de entrada" + sMsgNoName = sInsertStockname + sMsgNoQuantity = "Indique una cantidad mayor que 0" + sMsgNoDividend = "Indique un dividendo por unidad o un dividendo total" + sMsgNoExchangeRate = "Indique aquí un cambio correcto (acción vieja -> nueva acción)" + sMsgNoValidExchangeDate = "Indique una fecha correcta para el fraccionamiento de la acción." + sMsgWrongExchangeDate = "El fraccionamiento no es posible porque existen transacciones después de la fecha de fraccionamiento." + sMsgSellTooMuch = "No puede vender tantas acciones. Como máximo: " + sMsgConfirm = "Confirmación necesaria" + sMsgFreeStock = "¿Tiene previsto considerar acciones gratis?" + sMsgTotalLoss = "¿Tiene previsto introducir una pérdida total?" + sMsgAuthorization = "Pregunta de seguridad" + sMsgDeleteAll = "¿Desea borrar todos los movimientos y reiniciar el balance de depósito?" + cSplit = "Fraccionamiento el " + sHistory = "Historia" + TransactTitle(1) = "Vender acciones" + TransactTitle(2) = "Comprar acciones" + StockRatesTitle(1) = "Pago de dividendos" + StockRatesTitle(2) = "Fraccionamiento" + StockRatesTitle(3) = sHistory + sDepotCurrency = "Moneda del depósito" + sStockName = "Nombre de la acción" + TransactMode = LIFO ' Possible values: "FIFO" and "LIFO" + DateCellStyle = "Resultado Fecha" + CurrCellStyle = "1" + sStartDate = "Fecha de inicio:" + sEndDate = "Fecha final:" + sStartUpWelcome = "Esta plantilla le permite administrar eficientemente su depósito de acciones" + sStartUpChooseMarket = "Seleccione primero la moneda de referencia y la plaza bursátil para la actualización a través de Internet." + sStartUpHint = "La función <History> está disponible únicamente para el mercado americano." + sStartupHint = ReplaceString(sStartUpHint, sHistory, "<History>") + sNoInternetUpdate = "Sin actualización por Internet" + sMarketPlace = "Plaza bursátil:" + sNoInternetDataAvailable = "No se pudieron recibir las cotizaciones por Internet." + sCheckInternetSettings = "Causas posibles: <BR> Debe comprobar la configuración de Internet.<BR> Ha indicado un código incorrecto (p.ej. número, símbolo, etc.) para la acción." + sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), "<BR>") + + sMsgEndDatebeforeNow = "La fecha final debe ser anterior a la fecha de hoy." + sMsgStartDatebeforeEndDate = "La fecha inicial debe ser anterior a la fecha final." + + sMarket(0,0) = "Dólar estadounidense" + sMarket(0,1) = "$" + sMarket(0,2) = "Nueva York" + sMarket(0,3) = "http://finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(0,4) = "http://ichart.finance.yahoo.com/table.csv?" &_ + "s=<StockID>&d=<EndMonth>&e=<EndDay>&f=<Endyear>&g=d&" &_ + "a=<StartMonth>&b=<StartDay>&c=<Startyear>&ignore=.csv" + sMarket(0,5) = "Símbolo" + sMarket(0,6) = "en" + sMarket(0,7) = "US" + sMarket(0,8) = "409" + sMarket(0,9) = "44" + sMarket(0,10) = "1" + + sMarket(1,0) = "Euro" + sMarket(1,1) = chr(8364) + sMarket(1,2) = "Frankfurt" + sMarket(1,3) = "http://de.finance.yahoo.com/d/quotes.csv?s=<StockID>.F&f=sl1t1c1ghpv&e=.csv" + sMarket(1,5) = "Código" + sMarket(1,6) = "de;nl;pt;el" + sMarket(1,7) = "DE;NL;PT;GR" + sMarket(1,8) = "407;413;816;408" + sMarket(1,9) = "59/9" + sMarket(1,10) = "1" + + sMarket(2,0) = "Libra esterlina" + sMarket(2,1) = "£" + sMarket(2,2) = "Londres" + sMarket(2,3) = "http://uk.finance.yahoo.com/d/quotes.csv?s=<StockID>.L&m=*&f=sl1t1c1ghov&e=.csv" + sMarket(2,5) = "Símbolo" + sMarket(2,6) = "en" + sMarket(2,7) = "GB" + sMarket(2,8) = "809" + sMarket(2,9) = "44" + sMarket(2,10) = "1" + + sMarket(3,0) = "Yen japonés" + sMarket(3,1) = "¥" + sMarket(3,2) = "Tokio" + sMarket(3,3) = "" + sMarket(3,5) = "Código" + sMarket(3,6) = "ja" + sMarket(3,7) = "JP" + sMarket(3,8) = "411" + sMarket(3,9) = "" + sMarket(3,10) = "" + + sMarket(4,0) = "Dólar hongkonés" + sMarket(4,1) = "HK$" + sMarket(4,2) = "Hong Kong" + sMarket(4,3) = "http://hk.finance.yahoo.com/d/quotes.csv?s=<StockID>.HK&f=sl1d1t1c1ohgv&e=.csv" + sMarket(4,5) = "Número" + sMarket(4,6) = "zh" + sMarket(4,7) = "HK" + sMarket(4,8) = "C04" + sMarket(4,9) = "44" + sMarket(4,10) = "1" + + sMarket(5,0) = "Dólar australiano" + sMarket(5,1) = "$" + sMarket(5,2) = "Sidney" + sMarket(5,3) = "http://au.finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(5,5) = "Símbolo" + sMarket(5,6) = "en" + sMarket(5,7) = "AU" + sMarket(5,8) = "C09" + sMarket(5,9) = "44" + sMarket(5,10) = "1" + +' ****************************End of the default subset********************************* + CompleteMarketList() + + LocalizedCurrencies() + + With TransactModel + .lblStockNames.Label = sStockname + .lblQuantity.Label = "Cantidad" + .lblRate.Label = "Cotización" + .lblDate.Label = "Fecha de operación" + .hlnCommission.Label = "Otros gastos" + .lblCommission.Label = "Provisión" + .lblMinimum.Label = "Provisión mínima" + .lblFix.Label = "Cantidad fija/comisión" + .cmdGoOn.Label = sOK + .cmdCancel.Label = sCancel + End With + + With StockRatesModel + .optPerShare.Label = "Dividendos/Acción" + .optTotal.Label = "Dividendos totales" + .lblDividend.Label = "Importe" + .lblExchangeRate.Label = "Cambio (vieja->nueva)" + .lblColon.Label = ":" + .lblDate.Label = "Fecha de cambio:" + .lblStockNames.Label = sStockname + .lblStartDate.Label = sStartDate + .lblEndDate.Label = sEndDate + .optDaily.Label = "~Diario" + .optWeekly.Label = "~Semanal" + .hlnInterval.Label = "Periodo" + .cmdGoOn.Label = sOk + .cmdCancel.Label = sCancel + End With +End Sub +</script:module>
\ No newline at end of file diff --git a/wizards/source/depot/Lang_fr.xba b/wizards/source/depot/Lang_fr.xba new file mode 100644 index 000000000..27f9a685c --- /dev/null +++ b/wizards/source/depot/Lang_fr.xba @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_fr" script:language="StarBasic">Option Explicit + +Sub LoadFrenchLanguage() + + sProductname = GetProductname + sOK = "~OK" + sCancel = "Annuler" + sColumnHeader = "En-tête de colonne" + sInsertStockName = "Saisissez quelques actions dans votre portefeuille !" + sTitle = "<PRODUCTNAME> : Gestion d'actions" + sTitle = ReplaceString(sTitle, sProductName, "<PRODUCTNAME>") + sMsgError = "Erreur de saisie" + sMsgNoName = sInsertStockname + sMsgNoQuantity = "Saisissez une quantité supérieure à 0 !" + sMsgNoDividend = "Vous devez saisir le montant des dividendes perçus (soit les dividendes par action, soit la somme totale perçue)." + sMsgNoExchangeRate = "Saisissez un taux correct de conversion (anciennes actions -> nouvelles actions)." + sMsgNoValidExchangeDate = "Saisissez une date correcte pour le split d'action." + sMsgWrongExchangeDate = "Split impossible car il y a déjà eu des transactions après la date du split !" + sMsgSellTooMuch = "Impossible de vendre autant d'actions ! Maximum : " + sMsgConfirm = "Confirmation required" + sMsgFreeStock = "S'agit-il d'actions gratuites ?" + sMsgTotalLoss = "Prévoyez-vous une perte totale ?" + sMsgAuthorization = "Requête de sécurité" + sMsgDeleteAll = "Voulez-vous supprimer tous les mouvements et remettre le portefeuille d'actions à zéro ?" + cSplit = "Split d'action le " + sHistory = "Historique" + TransactTitle(1) = "Vente d'actions" + TransactTitle(2) = "Achat d'actions" + StockRatesTitle(1) = "Versement des dividendes" + StockRatesTitle(2) = "Split d'action" + StockRatesTitle(3) = sHistory + sDepotCurrency = "Monnaie du portefeuille" + sStockName = "Nom de l'action" + TransactMode = LIFO ' Possible values: "FIFO" and "LIFO" + DateCellStyle = "Résultat date" + CurrCellStyle = "1" + sStartDate = "Date de début :" + sEndDate = "Date de fin :" + sStartUpWelcome = "Utilisez ce modèle pour une gestion efficiente de votre portefeuille d'actions !" + sStartUpChooseMarket = "Commencez par choisir une monnaie de référence et ainsi la place boursière pour la mise à jour Internet !" + sStartUpHint = "La fonction <History> n'est cependant disponible que pour le marché américain." + sStartupHint = ReplaceString(sStartUpHint, sHistory, "<History>") + sNoInternetUpdate = "Sans mise à jour Internet" + sMarketPlace = "Place boursière :" + sNoInternetDataAvailable = "Réception des cours Internet impossible !" + sCheckInternetSettings = "Causes possibles : <BR> Problème de paramétrage Internet : vérifiez les paramètres !<BR> Vous avez saisi un identificateur (par ex. symbole ou code) incorrect pour l'action." + sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), "<BR>") + + sMsgEndDatebeforeNow = "La date spécifiée pour la fin doit précéder celle de ce jour !" + sMsgStartDatebeforeEndDate = "La date spécifiée pour le début doit succéder à celle de ce jour !" + + sMarket(0,0) = "Dollar Américain" + sMarket(0,1) = "$" + sMarket(0,2) = "New York" + sMarket(0,3) = "http://finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(0,4) = "http://ichart.finance.yahoo.com/table.csv?" &_ + "s=<StockID>&d=<EndMonth>&e=<EndDay>&f=<Endyear>&g=d&" &_ + "a=<StartMonth>&b=<StartDay>&c=<Startyear>&ignore=.csv" + sMarket(0,5) = "Symbole" + sMarket(0,6) = "en" + sMarket(0,7) = "US" + sMarket(0,8) = "409" + sMarket(0,9) = "44" + sMarket(0,10) = "1" + + sMarket(1,0) = "Euro" + sMarket(1,1) = chr(8364) + sMarket(1,2) = "Francfort" + sMarket(1,3) = "http://de.finance.yahoo.com/d/quotes.csv?s=<StockID>.F&f=sl1t1c1ghpv&e=.csv" + sMarket(1,5) = "Code" + sMarket(1,6) = "de;nl;pt;el" + sMarket(1,7) = "DE;NL;PT;GR" + sMarket(1,8) = "407;413;816;408" + sMarket(1,9) = "59/9" + sMarket(1,10) = "1" + + sMarket(2,0) = "Livre Sterling" + sMarket(2,1) = "£" + sMarket(2,2) = "Londres" + sMarket(2,3) = "http://uk.finance.yahoo.com/d/quotes.csv?s=<StockID>.L&m=*&f=sl1t1c1ghov&e=.csv" + sMarket(2,5) = "Symbole" + sMarket(2,6) = "en" + sMarket(2,7) = "GB" + sMarket(2,8) = "809" + sMarket(2,9) = "44" + sMarket(2,10) = "1" + + sMarket(3,0) = "Yen Japonais" + sMarket(3,1) = "¥" + sMarket(3,2) = "Tokyo" + sMarket(3,3) = "" + sMarket(3,5) = "Code" + sMarket(3,6) = "ja" + sMarket(3,7) = "JP" + sMarket(3,8) = "411" + sMarket(3,9) = "" + sMarket(3,10) = "" + + sMarket(4,0) = "Dollar de Hong Kong" + sMarket(4,1) = "HK$" + sMarket(4,2) = "Hong Kong" + sMarket(4,3) = "http://hk.finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(4,5) = "Numéro" + sMarket(4,6) = "zh" + sMarket(4,7) = "HK" + sMarket(4,8) = "C04" + sMarket(4,9) = "44" + sMarket(4,10) = "1" + + sMarket(5,0) = "Dollar Australien" + sMarket(5,1) = "$" + sMarket(5,2) = "Sydney" + sMarket(5,3) = "http://au.finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(5,5) = "Symbole" + sMarket(5,6) = "en" + sMarket(5,7) = "AU" + sMarket(5,8) = "C09" + sMarket(5,9) = "44" + sMarket(5,10) = "1" + +' ****************************End of the default subset********************************* + CompleteMarketList() + + LocalizedCurrencies() + + With TransactModel + .lblStockNames.Label = sStockname + .lblQuantity.Label = "Quantité" + .lblRate.Label = "Cours" + .lblDate.Label = "Date de transaction" + .hlnCommission.Label = "Dépenses diverses" + .lblCommission.Label = "Commission" + .lblMinimum.Label = "Commission minimale" + .lblFix.Label = "Montant fixe/frais" + .cmdGoOn.Label = sOK + .cmdCancel.Label = sCancel + End With + + With StockRatesModel + .optPerShare.Label = "Dividende/action" + .optTotal.Label = "Dividende total" + .lblDividend.Label = "Montant" + .lblExchangeRate.Label = "Taux de conversion (ancien->nouveau)" + .lblColon.Label = ":" + .lblDate.Label = "Date de la conversion:" + .lblStockNames.Label = sStockname + .lblStartDate.Label = sStartDate + .lblEndDate.Label = sEndDate + .optDaily.Label = "~Quotidien" + .optWeekly.Label = "~Hebdomadaire" + .hlnInterval.Label = "Période" + .cmdGoOn.Label = sOk + .cmdCancel.Label = sCancel + End With +End Sub +</script:module> diff --git a/wizards/source/depot/Lang_it.xba b/wizards/source/depot/Lang_it.xba new file mode 100644 index 000000000..a8d21bf25 --- /dev/null +++ b/wizards/source/depot/Lang_it.xba @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_it" script:language="StarBasic">Option Explicit + +Sub LoadItalianLanguage() + + sProductname = GetProductname + sOK = "~OK" + sCancel = "Annulla" + sColumnHeader = "Intestazione colonna" + sInsertStockName = "Inserite un nome di azioni" + sTitle = "<PRODUCTNAME>: Gestione delle azioni" + sTitle = ReplaceString(sTitle, sProductName, "<PRODUCTNAME>") + sMsgError = "Errore dati immessi" + sMsgNoName = sInsertStockname + sMsgNoQuantity = "Inserite il numero delle azioni" + sMsgNoDividend = "Inserite un dividendo a unità oppure un dividendo totale" + sMsgNoExchangeRate = "Indicate un corretto tasso di cambio (vecchie azioni -> nuove azioni)." + sMsgNoValidExchangeDate = "Indicate la data di frazionamento delle azioni." + sMsgWrongExchangeDate = "Il frazionamento non è possibile perché sono ancora in atto transazioni dopo la data indicata." + sMsgSellTooMuch = "Non potete vendere così tante azioni. Massimo: " + sMsgConfirm = "È necessaria una conferma" + sMsgFreeStock = "Confermate la digitazione di azioni gratuite?" + sMsgTotalLoss = "Confermate la digitazione di perdita totale?" + sMsgAuthorization = "Domanda di sicurezza" + sMsgDeleteAll = "Eliminare tutti i movimenti e ripristinare la panoramica dei depositi?" + cSplit = "Frazionamento delle azioni il: " + sHistory = "Cronologia" + TransactTitle(1) = "Vendita di azioni" + TransactTitle(2) = "Acquisto di azioni" + StockRatesTitle(1) = "Pagamento dei dividendi" + StockRatesTitle(2) = "Frazionamento azioni" + StockRatesTitle(3) = sHistory + sDepotCurrency = "Valuta deposito" + sStockName = "Nome delle azioni" + TransactMode = LIFO ' Possible values: "FIFO" and "LIFO" + DateCellStyle = "Risultato data" + CurrCellStyle = "1" + sStartDate = "Data d'inizio:" + sEndDate = "Data finale:" + sStartUpWelcome = "Questo modello vi permette una gestione efficace delle vostre azioni." + sStartUpChooseMarket = "Selezionate la valuta di riferimento e la Borsa per il collegamento Internet." + sStartUpHint = "La funzione <History> è disponibile solo per il mercato americano." + sStartupHint = ReplaceString(sStartUpHint, sHistory, "<History>") + sNoInternetUpdate = "Senza aggiornamento Internet" + sMarketPlace = "Borsa:" + sNoInternetDataAvailable = "Impossibile ricevere le quotazioni Internet" + sCheckInternetSettings = "Possibili cause: <BR> le impostazioni Internet devono essere modificate.<BR> Avete indicato un indice (ad es. simbolo o codice) errato per le azioni." + sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), "<BR>") + + sMsgEndDatebeforeNow = "La data finale dev'essere anteriore alla data odierna." + sMsgStartDatebeforeEndDate = "La data d'inizio deve precedere la data finale." + + sMarket(0,0) = "Dollaro USA" + sMarket(0,1) = "$" + sMarket(0,2) = "New York" + sMarket(0,3) = "http://finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(0,4) = "http://ichart.finance.yahoo.com/table.csv?" &_ + "s=<StockID>&d=<EndMonth>&e=<EndDay>&f=<Endyear>&g=d&" &_ + "a=<StartMonth>&b=<StartDay>&c=<Startyear>&ignore=.csv" + sMarket(0,5) = "Simbolo" + sMarket(0,6) = "en" + sMarket(0,7) = "US" + sMarket(0,8) = "409" + sMarket(0,9) = "44" + sMarket(0,10) = "1" + + sMarket(1,0) = "Euro" + sMarket(1,1) = chr(8364) + sMarket(1,2) = "Francoforte" + sMarket(1,3) = "http://de.finance.yahoo.com/d/quotes.csv?s=<StockID>.F&f=sl1t1c1ghpv&e=.csv" + sMarket(1,5) = "Numero identificazione titoli" + sMarket(1,6) = "de;nl;pt;el" + sMarket(1,7) = "DE;NL;PT;GR" + sMarket(1,8) = "407;413;816;408" + sMarket(1,9) = "59/9" + sMarket(1,10) = "1" + + sMarket(2,0) = "Sterlina inglese" + sMarket(2,1) = "£" + sMarket(2,2) = "Londra" + sMarket(2,3) = "http://uk.finance.yahoo.com/d/quotes.csv?s=<StockID>.L&m=*&f=sl1t1c1ghov&e=.csv" + sMarket(2,5) = "Simbolo" + sMarket(2,6) = "en" + sMarket(2,7) = "GB" + sMarket(2,8) = "809" + sMarket(2,9) = "44" + sMarket(2,10) = "1" + + sMarket(3,0) = "Yen" + sMarket(3,1) = "¥" + sMarket(3,2) = "Tokyo" + sMarket(3,3) = "" + sMarket(3,5) = "Codice" + sMarket(3,6) = "ja" + sMarket(3,7) = "JP" + sMarket(3,8) = "411" + sMarket(3,9) = "" + sMarket(3,10) = "" + + sMarket(4,0) = "Dollaro Hong Kong" + sMarket(4,1) = "HK$" + sMarket(4,2) = "Hong Kong" + sMarket(4,3) = "http://hk.finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(4,5) = "Numero" + sMarket(4,6) = "zh" + sMarket(4,7) = "HK" + sMarket(4,8) = "C04" + sMarket(4,9) = "44" + sMarket(4,10) = "1" + + sMarket(5,0) = "Dollaro australiano" + sMarket(5,1) = "$" + sMarket(5,2) = "Sydney" + sMarket(5,3) = "http://au.finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(5,5) = "Simbolo" + sMarket(5,6) = "en" + sMarket(5,7) = "AU" + sMarket(5,8) = "C09" + sMarket(5,9) = "44" + sMarket(5,10) = "1" + +' ****************************End of the default subset********************************* + CompleteMarketList() + + LocalizedCurrencies() + + With TransactModel + .lblStockNames.Label = sStockname + .lblQuantity.Label = "Quantità" + .lblRate.Label = "Quotazione" + .lblDate.Label = "Data della transazione" + .hlnCommission.Label = "Spese extra" + .lblCommission.Label = "Commissioni" + .lblMinimum.Label = "Commissione minima" + .lblFix.Label = "Importo fisso/Spese" + .cmdGoOn.Label = sOK + .cmdCancel.Label = sCancel + End With + + With StockRatesModel + .optPerShare.Label = "Dividendo/Azione" + .optTotal.Label = "Dividendo totale" + .lblDividend.Label = "Importo" + .lblExchangeRate.Label = "Tasso di cambio (vecchio->nuovo)" + .lblColon.Label = ":" + .lblDate.Label = "Data di cambio:" + .lblStockNames.Label = sStockname + .lblStartDate.Label = sStartDate + .lblEndDate.Label = sEndDate + .optDaily.Label = "~Giornaliero" + .optWeekly.Label = "~Settimanale" + .hlnInterval.Label = "Durata" + .cmdGoOn.Label = sOk + .cmdCancel.Label = sCancel + End With +End Sub +</script:module> diff --git a/wizards/source/depot/Lang_ja.xba b/wizards/source/depot/Lang_ja.xba new file mode 100644 index 000000000..114a0bf08 --- /dev/null +++ b/wizards/source/depot/Lang_ja.xba @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_ja" script:language="StarBasic">Option Explicit + +Sub LoadJapaneseLanguage() + + sProductname = GetProductname + sOK = "~OK" + sCancel = "キャンセル" + sColumnHeader = "列番号" + sInsertStockName = "最初に株の銘柄を入力してください。" + sTitle = "<PRODUCTNAME>: 株管理" + sTitle = ReplaceString(sTitle, sProductName, "<PRODUCTNAME>") + sMsgError = "入力フィールド" + sMsgNoName = sInsertStockname + sMsgNoQuantity = "0 より大きな額を入力してください。" + sMsgNoDividend = "1株当たりの配当金額または総配当金額を入力してください。" + sMsgNoExchangeRate = "交換比率(旧株->新株)を入力してください。" + sMsgNoValidExchangeDate = "株式分割日を入力してください。" + sMsgWrongExchangeDate = "分割日以降に取引がすでに存在するので、分割できません。" + sMsgSellTooMuch = "売却できる株式数を超えています。最大値: " + sMsgConfirm = "ご確認ください" + sMsgFreeStock = "無料株式を入力しますか?" + sMsgTotalLoss = "全損の入力を行いますか?" + sMsgAuthorization = "確認ダイアログ" + sMsgDeleteAll = "すべての移動を取り消し、ポートフォリオの概要をリセットしますか?" + cSplit = "株式分割日 " + sHistory = "履歴" + TransactTitle(1) = "株を買う" + TransactTitle(2) = "株を買う" + StockRatesTitle(1) = "配当額" + StockRatesTitle(2) = "株式分割" + StockRatesTitle(3) = sHistory + sDepotCurrency = "ポートフォリオの通貨" + sStockName = "株式名" + TransactMode = LIFO ' Possible values: "FIFO" and "LIFO" + DateCellStyle = "結果(日付)" + CurrCellStyle = "1" + sStartDate = "開始日:" + sEndDate = "終了日:" + sStartUpWelcome = "このテンプレートを使えば、株式のポートフォリオをより効率的に管理できます。" + sStartUpChooseMarket = "まず、インターネットにより情報を更新する基準通貨と、対応する証券取引所を選択します。" + sStartUpHint = "残念ながら、<History> 機能を使用できるのは米国市場に限られています。" + sStartupHint = ReplaceString(sStartUpHint, sHistory, "<History>") + sNoInternetUpdate = "インターネットによる情報の更新を行いません" + sMarketPlace = "証券取引所:" + sNoInternetDataAvailable = "インターネットから株価情報を受信できない場合があります!" + sCheckInternetSettings = "考えられる原因は次のとおりです。<BR>インターネット設定の変更が必要です。<BR>入力した株式のが間違っています。" + sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), "<BR>") + + sMsgEndDatebeforeNow = "終了日は、今日の日付より前であることが必要です。" + sMsgStartDatebeforeEndDate = "開始日は、終了日より前であることが必要です。" + + sMarket(0,0) = "米ドル" + sMarket(0,1) = "$" + sMarket(0,2) = "ニューヨーク" + sMarket(0,3) = "http://finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(0,4) = "http://ichart.finance.yahoo.com/table.csv?" &_ + "s=<StockID>&d=<EndMonth>&e=<EndDay>&f=<Endyear>&g=d&" &_ + "a=<StartMonth>&b=<StartDay>&c=<Startyear>&ignore=.csv" + sMarket(0,5) = "シンボル" + sMarket(0,6) = "en" + sMarket(0,7) = "US" + sMarket(0,8) = "409" + sMarket(0,9) = "44" + sMarket(0,10) = "1" + + sMarket(1,0) = "ユーロ" + sMarket(1,1) = chr(8364) + sMarket(1,2) = "フランクフルト" + sMarket(1,3) = "http://de.finance.yahoo.com/d/quotes.csv?s=<StockID>.F&f=sl1t1c1ghpv&e=.csv" + sMarket(1,5) = "銘柄コード" + sMarket(1,6) = "de;nl;pt;el" + sMarket(1,7) = "DE;NL;PT;GR" + sMarket(1,8) = "407;413;816;408" + sMarket(1,9) = "59/9" + sMarket(1,10) = "1" + + sMarket(2,0) = "英ポンド" + sMarket(2,1) = "£" + sMarket(2,2) = "ロンドン" + sMarket(2,3) = "http://uk.finance.yahoo.com/d/quotes.csv?s=<StockID>.L&m=*&f=sl1t1c1ghov&e=.csv" + sMarket(2,5) = "シンボル" + sMarket(2,6) = "en" + sMarket(2,7) = "GB" + sMarket(2,8) = "809" + sMarket(2,9) = "44" + sMarket(2,10) = "1" + + sMarket(3,0) = "日本円" + sMarket(3,1) = "¥" + sMarket(3,2) = "東京" + sMarket(3,3) = "" + sMarket(3,5) = "コード" + sMarket(3,6) = "ja" + sMarket(3,7) = "JP" + sMarket(3,8) = "411" + sMarket(3,9) = "" + sMarket(3,10) = "" + + sMarket(4,0) = "香港ドル" + sMarket(4,1) = "HK$" + sMarket(4,2) = "香港" + sMarket(4,3) = "http://hk.finance.yahoo.com/d/quotes.csv?s=<StockID>.HK&f=sl1d1t1c1ohgv&e=.csv" + sMarket(4,5) = "番号" + sMarket(4,6) = "zh" + sMarket(4,7) = "HK" + sMarket(4,8) = "C04" + sMarket(4,9) = "44" + sMarket(4,10) = "1" + + sMarket(5,0) = "オーストリア・ドル" + sMarket(5,1) = "$" + sMarket(5,2) = "シドニー" + sMarket(5,3) = "http://au.finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(5,5) = "シンボル" + sMarket(5,6) = "en" + sMarket(5,7) = "AU" + sMarket(5,8) = "C09" + sMarket(5,9) = "44" + sMarket(5,10) = "1" + +' ****************************End of the default subset********************************* + CompleteMarketList() + + LocalizedCurrencies() + + With TransactModel + .lblStockNames.Label = sStockname + .lblQuantity.Label = "株数" + .lblRate.Label = "価格" + .lblDate.Label = "取引日" + .hlnCommission.Label = "その他の経費n" + .lblCommission.Label = "手数料" + .lblMinimum.Label = "最低手数料" + .lblFix.Label = "固定費/諸経費" + .cmdGoOn.Label = sOK + .cmdCancel.Label = sCancel + End With + + With StockRatesModel + .optPerShare.Label = "配当金/株式数" + .optTotal.Label = "配当金の総額" + .lblDividend.Label = "金額" + .lblExchangeRate.Label = "交換比率(旧株->新株)" + .lblColon.Label = ":" + .lblDate.Label = "交換日:" + .lblStockNames.Label = sStockname + .lblStartDate.Label = sStartDate + .lblEndDate.Label = sEndDate + .optDaily.Label = "~毎日" + .optWeekly.Label = "~毎週" + .hlnInterval.Label = "期間" + .cmdGoOn.Label = sOk + .cmdCancel.Label = sCancel + End With +End Sub +</script:module>
\ No newline at end of file diff --git a/wizards/source/depot/Lang_ko.xba b/wizards/source/depot/Lang_ko.xba new file mode 100644 index 000000000..fcc3224e1 --- /dev/null +++ b/wizards/source/depot/Lang_ko.xba @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_ko" script:language="StarBasic">Option Explicit + +Sub LoadKoreanLanguage() + + sProductname = GetProductname + sOK = "~확인" + sCancel = "취소" + sColumnHeader = "열 머리글" + sInsertStockName = "주식 종목을 삽입해주십시오." + sTitle = "<PRODUCTNAME>: 주식 매수" + sTitle = ReplaceString(sTitle, sProductName, "<PRODUCTNAME>") + sMsgError = "입력 오류" + sMsgNoName = sInsertStockname + sMsgNoQuantity = "0 이하의 매수를 입력해주십시오." + sMsgNoDividend = "한 주당 배당분 또는 총배당분을 입력해주십시오." + sMsgNoExchangeRate = "정확한 환율을 입력해주십시오 (구주를 신주로 소급 시)." + sMsgNoValidExchangeDate = "유효한 배당 결제일을 입력해주십시오." + sMsgWrongExchangeDate = "배당 기준일이 경과하여 배당할 수 없습니다." + sMsgSellTooMuch = "이렇게 많은 주식을 팔 수 없습니다. 최대 매도수: " + sMsgConfirm = "확인 필요" + sMsgFreeStock = "공짜 주식을 입력하시겠습니까?" + sMsgTotalLoss = "주가 폭락세를 입력하시겠습니까?" + sMsgAuthorization = "안정성 조회" + sMsgDeleteAll = "모든 주가 움직임을 삭제하고 계좌 현황을 원래대로 하시겠습니까?" + cSplit = "주식 배당일 " + sHistory = "내역" + TransactTitle(1) = "주식 관리: 주식 매도" + TransactTitle(2) = "주식 관리: 주식 매수" + StockRatesTitle(1) = "주식 관리: 배당금 지불" + StockRatesTitle(2) = "주식 관리: 주식 배분" + StockRatesTitle(3) = sHistory + sDepotCurrency = "주식 계좌 통화" + sStockName = "주식 종목명" + TransactMode = LIFO ' Possible values: "FIFO" and "LIFO" + DateCellStyle = "결과, 날짜" + CurrCellStyle = "1" + sStartDate = "매매일:" + sEndDate = "만기일:" + sStartUpWelcome = "이 템플릿을 사용하여 주식 투자 관리를 효율적으로 할 수 있습니다." + sStartUpChooseMarket = "인터넷 업데이트를 위해 우선 관련 통화와 증권 장소를 선택하십시오." + sStartUpHint = "<내역> 기능은 미국 시장용으로만 사용할 수 있습니다." + sStartupHint = ReplaceString(sStartUpHint, sHistory, "<History>") + sNoInternetUpdate = "인터넷 업데이트 없음" + sMarketPlace = "증권 장소:" + sNoInternetDataAvailable = "인터넷 시세는 받을 수 없었습니다." + sCheckInternetSettings = "원인: <BR> 인터넷 설정을 점검해야만 합니다.<BR> 옳지 않은 암호<예를 들어 잘못된 문자 또는 종목 코드>를 입력했습니다." + sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), "<BR>") + + sMsgEndDatebeforeNow = "만기일은 오늘 날짜 전에 기입되어야 합니다." + sMsgStartDatebeforeEndDate = "매매일은 만기일 전에 기입되어야 합니다." + + sMarket(0,0) = "미국 달러" + sMarket(0,1) = "$" + sMarket(0,2) = "뉴욕" + sMarket(0,3) = "http://finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(0,4) = "http://ichart.finance.yahoo.com/table.csv?" &_ + "s=<StockID>&d=<EndMonth>&e=<EndDay>&f=<Endyear>&g=d&" &_ + "a=<StartMonth>&b=<StartDay>&c=<Startyear>&ignore=.csv" + sMarket(0,5) = "기호" + sMarket(0,6) = "en" + sMarket(0,7) = "US" + sMarket(0,8) = "409" + sMarket(0,9) = "44" + sMarket(0,10) = "1" + + sMarket(1,0) = "유로" + sMarket(1,1) = chr(8364) + sMarket(1,2) = "프랑크푸르트" + sMarket(1,3) = "http://de.finance.yahoo.com/d/quotes.csv?s=<StockID>.F&f=sl1t1c1ghpv&e=.csv" + sMarket(1,5) = "WKN" + sMarket(1,6) = "de;nl;pt;el" + sMarket(1,7) = "DE;NL;PT;GR" + sMarket(1,8) = "407;413;816;408" + sMarket(1,9) = "59/9" + sMarket(1,10) = "1" + + sMarket(2,0) = "영국 파운드" + sMarket(2,1) = "£" + sMarket(2,2) = "런던" + sMarket(2,3) = "http://uk.finance.yahoo.com/d/quotes.csv?s=<StockID>.L&m=*&f=sl1t1c1ghov&e=.csv" + sMarket(2,5) = "기호" + sMarket(2,6) = "en" + sMarket(2,7) = "GB" + sMarket(2,8) = "809" + sMarket(2,9) = "44" + sMarket(2,10) = "1" + + sMarket(3,0) = "엔화" + sMarket(3,1) = "¥" + sMarket(3,2) = "도쿄" + sMarket(3,3) = "" + sMarket(3,5) = "코드" + sMarket(3,6) = "ja" + sMarket(3,7) = "JP" + sMarket(3,8) = "411" + sMarket(3,9) = "" + sMarket(3,10) = "" + + sMarket(4,0) = "홍콩 달러" + sMarket(4,1) = "HK$" + sMarket(4,2) = "홍콩" + sMarket(4,3) = "http://hk.finance.yahoo.com/d/quotes.csv?s=<StockID>.HK&f=sl1d1t1c1ohgv&e=.csv" + sMarket(4,5) = "번호" + sMarket(4,6) = "zh" + sMarket(4,7) = "HK" + sMarket(4,8) = "C04" + sMarket(4,9) = "44" + sMarket(4,10) = "1" + + sMarket(5,0) = "호주 달러" + sMarket(5,1) = "$" + sMarket(5,2) = "시드니" + sMarket(5,3) = "http://au.finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(5,5) = "기호" + sMarket(5,6) = "en" + sMarket(5,7) = "AU" + sMarket(5,8) = "C09" + sMarket(5,9) = "44" + sMarket(5,10) = "1" + +' ****************************End of the default subset********************************* + CompleteMarketList() + + LocalizedCurrencies() + + With TransactModel + .lblStockNames.Label = sStockname + .lblQuantity.Label = "수량" + .lblRate.Label = "시세" + .lblDate.Label = "배당 결산일" + .hlnCommission.Label = "기타 지출" + .lblCommission.Label = "수수료" + .lblMinimum.Label = "최저 수수료" + .lblFix.Label = "약정 금액/기타 경비" + .cmdGoOn.Label = sOK + .cmdCancel.Label = sCancel + End With + + With StockRatesModel + .optPerShare.Label = "배당분/주" + .optTotal.Label = "배당분 합계" + .lblDividend.Label = "금액" + .lblExchangeRate.Label = "환율(구주->신주)" + .lblColon.Label = ":" + .lblDate.Label = "환율일자" + .lblStockNames.Label = sStockname + .lblStartDate.Label = sStartDate + .lblEndDate.Label = sEndDate + .optDaily.Label = "~매일" + .optWeekly.Label = "~매주" + .hlnInterval.Label = "기간" + .cmdGoOn.Label = sOk + .cmdCancel.Label = sCancel + End With +End Sub +</script:module>
\ No newline at end of file diff --git a/wizards/source/depot/Lang_sv.xba b/wizards/source/depot/Lang_sv.xba new file mode 100644 index 000000000..cbe67e1c2 --- /dev/null +++ b/wizards/source/depot/Lang_sv.xba @@ -0,0 +1,174 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_sv" script:language="StarBasic">Option Explicit + +Sub LoadSwedishLanguage() + sProductname = GetProductname + sOK = "~OK" + sCancel = "Avbryt" + sColumnHeader = "Kolumnhuvud" + sInsertStockName = "Infoga först några aktier i Din portfölj!" + sTitle = "<PRODUCTNAME>: Aktieförvaltning" + sTitle = ReplaceString(sTitle, sProductName, "<PRODUCTNAME>") + sMsgError = "Inmatningsfel" + sMsgNoName = sInsertStockname + sMsgNoQuantity = "Var vänlig och mata in ett större antal än 0" + sMsgNoDividend = "Var vänlig och mata in utdelning per styck eller den totala utdelningen" + sMsgNoExchangeRate = "Var vänlig och mata in en korrekt omräkningskurs (gamla aktier -> nya aktier)." + sMsgNoValidExchangeDate = "Var vänlig och mata in ett giltigt datum för aktiesplitten." + sMsgWrongExchangeDate = "Split är inte möjlig eftersom det redan finns transaktioner efter splitdatum." + sMsgSellTooMuch = "Så många aktier kan Du inte sälja. Maximum: " + sMsgConfirm = "Bekräftelse krävs" + sMsgFreeStock = "Avser Du att mata in gratisaktier?" + sMsgTotalLoss = "Avser Du att mata in en totalförlust?" + sMsgAuthorization = "Säkerhetskontroll" + sMsgDeleteAll = "Vill Du ta bort alla rörelser och återställa portföljöversikten?" + cSplit = "Aktiesplit den " + sHistory = "Historik" + TransactTitle(1) = "Sälja aktier" + TransactTitle(2) = "Köpa aktier" + StockRatesTitle(1) = "Aktieutdelning" + StockRatesTitle(2) = "Aktiesplit" + StockRatesTitle(3) = sHistory + sDepotCurrency = "Portföljvaluta" + sStockName = "Aktienamn" + TransactMode = LIFO ' Possible values: "FIFO" and "LIFO" + DateCellStyle = "Resultat datum" + CurrCellStyle = "1" + sStartDate = "Startdatum:" + sEndDate = "Slutdatum:" + sStartUpWelcome = "Med hjälp av den här mallen kan Du förvalta Din aktieportfölj effektivt" + sStartUpChooseMarket = "Välj först Din referensvaluta och därigenom börs för Internet-uppdateringen!" + sStartUpHint = "Tyvärr är <History>-funktionen bara tillgänglig för den amerikanska marknaden!" + sStartupHint = ReplaceString(sStartUpHint, sHistory, "<History>") + sNoInternetUpdate = "utan Internet-uppdatering" + sMarketPlace = "Börs:" + sNoInternetDataAvailable = "Det gick inte att ta emot Internet-kurser!" + sCheckInternetSettings = "Detta kan bero på att: <BR> Dina Internet-inställningar måste ändras.<BR> Du har angivit ett felaktigt ID (t.ex. symbol, värdepappersnr.) för aktien." + sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), "<BR>") + + sMsgEndDatebeforeNow = "Slutdatum måste ligga före idag!" + sMsgStartDatebeforeEndDate = "Startdatum måste ligga före slutdatum!" + + sMarket(0,0) = "Amerikansk dollar" + sMarket(0,1) = "$" + sMarket(0,2) = "New York" + sMarket(0,3) = "http://finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(0,4) = "http://ichart.finance.yahoo.com/table.csv?" &_ + "s=<StockID>&d=<EndMonth>&e=<EndDay>&f=<Endyear>&g=d&" &_ + "a=<StartMonth>&b=<StartDay>&c=<Startyear>&ignore=.csv" + sMarket(0,5) = "Symbol" + sMarket(0,6) = "en" + sMarket(0,7) = "US" + sMarket(0,8) = "409" + sMarket(0,9) = "44" + sMarket(0,10) = "1" + + sMarket(1,0) = "Euro" + sMarket(1,1) = chr(8364) + sMarket(1,2) = "Frankfurt" + sMarket(1,3) = "http://de.finance.yahoo.com/d/quotes.csv?s=<StockID>.F&f=sl1t1c1ghpv&e=.csv" + sMarket(1,5) = "Värdepappersnr" + sMarket(1,6) = "de;nl;pt;el" + sMarket(1,7) = "DE;NL;PT;GR" + sMarket(1,8) = "407;413;816;408" + sMarket(1,9) = "59/9" + sMarket(1,10) = "1" + + sMarket(2,0) = "Engelskt pund" + sMarket(2,1) = "£" + sMarket(2,2) = "London" + sMarket(2,3) = "http://uk.finance.yahoo.com/d/quotes.csv?s=<StockID>.L&m=*&f=sl1t1c1ghov&e=.csv" + sMarket(2,5) = "Symbol" + sMarket(2,6) = "en" + sMarket(2,7) = "GB" + sMarket(2,8) = "809" + sMarket(2,9) = "44" + sMarket(2,10) = "1" + + sMarket(3,0) = "Japansk yen" + sMarket(3,1) = "¥" + sMarket(3,2) = "Tokyo" + sMarket(3,3) = "" + sMarket(3,5) = "Kod" + sMarket(3,6) = "ja" + sMarket(3,7) = "JP" + sMarket(3,8) = "411" + sMarket(3,9) = "" + sMarket(3,10) = "" + + sMarket(4,0) = "Hongkongdollar" + sMarket(4,1) = "HK$" + sMarket(4,2) = "Hongkong" + sMarket(4,3) = "http://hk.finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(4,5) = "Nummer" + sMarket(4,6) = "zh" + sMarket(4,7) = "HK" + sMarket(4,8) = "C04" + sMarket(4,9) = "44" + sMarket(4,10) = "1" + + sMarket(5,0) = "Australisk dollar" + sMarket(5,1) = "$" + sMarket(5,2) = "Sydney" + sMarket(5,3) = "http://au.finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(5,5) = "Symbol" + sMarket(5,6) = "en" + sMarket(5,7) = "AU" + sMarket(5,8) = "C09" + sMarket(5,9) = "44" + sMarket(5,10) = "1" + +' ****************************End of the default subset********************************* + CompleteMarketList() + + LocalizedCurrencies() + + With TransactModel + .lblStockNames.Label = sStockname + .lblQuantity.Label = "Antal" + .lblRate.Label = "Kurs" + .lblDate.Label = "Transaktionsdatum" + .hlnCommission.Label = "Övriga utgifter" + .lblCommission.Label = "Provision" + .lblMinimum.Label = "Minimiprovision" + .lblFix.Label = "Fast belopp/omkostnader" + .cmdGoOn.Label = sOK + .cmdCancel.Label = sCancel + End With + + With StockRatesModel + .optPerShare.Label = "Utdelning per aktie" + .optTotal.Label = "Utdelning totalt" + .lblDividend.Label = "Belopp" + .lblExchangeRate.Label = "Omräkningskurs (gammal->ny)" + .lblColon.Label = ":" + .lblDate.Label = "Omräkningsdatum:" + .lblStockNames.Label = sStockname + .lblStartDate.Label = sStartDate + .lblEndDate.Label = sEndDate + .optDaily.Label = "~Dagligen" + .optWeekly.Label = "~Varje vecka" + .hlnInterval.Label = "Period" + .cmdGoOn.Label = sOk + .cmdCancel.Label = sCancel + End With +End Sub +</script:module>
\ No newline at end of file diff --git a/wizards/source/depot/Lang_tw.xba b/wizards/source/depot/Lang_tw.xba new file mode 100644 index 000000000..a4df8c1b6 --- /dev/null +++ b/wizards/source/depot/Lang_tw.xba @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_tw" script:language="StarBasic">Option Explicit + +Sub LoadChineseTradLanguage() + + sProductname = GetProductname + sOK = "確定" + sCancel = "取消" + sColumnHeader = "欄標簽" + sInsertStockName = "請先填入股票名稱!" + sTitle = "<PRODUCTNAME>: 股票管理" + sTitle = ReplaceString(sTitle, sProductName, "<PRODUCTNAME>") + sMsgError = "輸入無效" + sMsgNoName = sInsertStockname + sMsgNoQuantity = "請輸入大於0的交易股數" + sMsgNoDividend = "請輸入每股股息金額或股息總額" + sMsgNoExchangeRate = "請鍵入正確的換算比率(舊股票 -> 新股票)。" + sMsgNoValidExchangeDate = "請輸入股票分割的日期。" + sMsgWrongExchangeDate = "無法分割股票,因為分割日期之後已經買進或賣出股票。" + sMsgSellTooMuch = "最多能出售的股票數: " + sMsgConfirm = "需要确認" + sMsgFreeStock = "需要輸入一個贈送的股票?" + sMsgTotalLoss = "要輸入一個全部損失的股票?" + sMsgAuthorization = "安全詢問" + sMsgDeleteAll = "您要刪除所有的交易資料,重新建立一個股票一覽表?" + cSplit = "股票分割的日期 " + sHistory = "紀錄" + TransactTitle(1) = "出售股票" + TransactTitle(2) = "購買股票" + StockRatesTitle(1) = "支付股息" + StockRatesTitle(2) = "股票分割" + StockRatesTitle(3) = sHistory + sDepotCurrency = "股票的貨幣" + sStockName = "股票名稱" + TransactMode = LIFO ' Possible values: "FIFO" and "LIFO" + DateCellStyle = "結果 日期" + CurrCellStyle = "1" + sStartDate = "交割日期:" + sEndDate = "到期日期:" + sStartUpWelcome = "這個樣式用於高效能地管理股票交易。" + sStartUpChooseMarket = "請先選一個參照的貨幣和一個可直接從 Internet 更新資料的贈券交易所。" + sStartUpHint = "很遺憾,<History>-功能僅適用於美國的交易所。" + sStartupHint = ReplaceString(sStartUpHint, sHistory, "<History>") + sNoInternetUpdate = "不透過 internet 更新" + sMarketPlace = "證券交易所:" + sNoInternetDataAvailable = "無法接受 Internet 股票價格!" + sCheckInternetSettings = "可能的原因:<BR>Internet 設定不正確,需要重新設定。<BR>輸入了一個錯誤的股票代碼。" + sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), "<BR>") + + sMsgEndDatebeforeNow = "到期日期必須是在今日之前!" + sMsgStartDatebeforeEndDate = "交割日期必須是在到期日期之前!" + + sMarket(0,0) = "美元" + sMarket(0,1) = "$" + sMarket(0,2) = "紐約" + sMarket(0,3) = "http://finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(0,4) = "http://ichart.finance.yahoo.com/table.csv?" &_ + "s=<StockID>&d=<EndMonth>&e=<EndDay>&f=<Endyear>&g=d&" &_ + "a=<StartMonth>&b=<StartDay>&c=<Startyear>&ignore=.csv" + sMarket(0,5) = "股票符號" + sMarket(0,6) = "en" + sMarket(0,7) = "US" + sMarket(0,8) = "409" + sMarket(0,9) = "44" + sMarket(0,10) = "1" + + sMarket(1,0) = "歐元" + sMarket(1,1) = chr(8364) + sMarket(1,2) = "法蘭克福" + sMarket(1,3) = "http://de.finance.yahoo.com/d/quotes.csv?s=<StockID>.F&f=sl1t1c1ghpv&e=.csv" + sMarket(1,5) = "股代碼" + sMarket(1,6) = "de;nl;pt;el" + sMarket(1,7) = "DE;NL;PT;GR" + sMarket(1,8) = "407;413;816;408" + sMarket(1,9) = "59/9" + sMarket(1,10) = "1" + + sMarket(2,0) = "英鎊" + sMarket(2,1) = "£" + sMarket(2,2) = "倫敦" + sMarket(2,3) = "http://uk.finance.yahoo.com/d/quotes.csv?s=<StockID>.L&m=*&f=sl1t1c1ghov&e=.csv" + sMarket(2,5) = "股票符號" + sMarket(2,6) = "en" + sMarket(2,7) = "GB" + sMarket(2,8) = "809" + sMarket(2,9) = "44" + sMarket(2,10) = "1" + + sMarket(3,0) = "日元" + sMarket(3,1) = "¥" + sMarket(3,2) = "東京" + sMarket(3,3) = "" + sMarket(3,5) = "代碼" + sMarket(3,6) = "ja" + sMarket(3,7) = "JP" + sMarket(3,8) = "411" + sMarket(3,9) = "" + sMarket(3,10) = "" + + sMarket(4,0) = "港幣" + sMarket(4,1) = "HK$" + sMarket(4,2) = "香港" + sMarket(4,3) = "http://hk.finance.yahoo.com/d/quotes.csv?s=<StockID>.HK&f=sl1d1t1c1ohgv&e=.csv" + sMarket(4,5) = "編號" + sMarket(4,6) = "zh" + sMarket(4,7) = "HK" + sMarket(4,8) = "C04" + sMarket(4,9) = "44" + sMarket(4,10) = "1" + + sMarket(5,0) = "澳元" + sMarket(5,1) = "$" + sMarket(5,2) = "悉尼" + sMarket(5,3) = "http://au.finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(5,5) = "股票符號" + sMarket(5,6) = "en" + sMarket(5,7) = "AU" + sMarket(5,8) = "C09" + sMarket(5,9) = "44" + sMarket(5,10) = "1" + +' ****************************End of the default subset********************************* + CompleteMarketList() + + LocalizedCurrencies() + + With TransactModel + .lblStockNames.Label = sStockname + .lblQuantity.Label = "數量" + .lblRate.Label = "股票價格" + .lblDate.Label = "交易日期" + .hlnCommission.Label = "其它的支出費用" + .lblCommission.Label = "手續費" + .lblMinimum.Label = "最低手續費" + .lblFix.Label = "固定金額/費用" + .cmdGoOn.Label = sOK + .cmdCancel.Label = sCancel + End With + + With StockRatesModel + .optPerShare.Label = "每股股息" + .optTotal.Label = "股息總計" + .lblDividend.Label = "金額" + .lblExchangeRate.Label = "轉換比率(舊股票 -> 新股票)" + .lblColon.Label = ":" + .lblDate.Label = "轉換日期:" + .lblStockNames.Label = sStockname + .lblStartDate.Label = sStartDate + .lblEndDate.Label = sEndDate + .optDaily.Label = "每日" + .optWeekly.Label = "每週" + .hlnInterval.Label = "時間週期" + .cmdGoOn.Label = sOk + .cmdCancel.Label = sCancel + End With +End Sub +</script:module>
\ No newline at end of file diff --git a/wizards/source/depot/Lang_zh.xba b/wizards/source/depot/Lang_zh.xba new file mode 100644 index 000000000..a4dde61b4 --- /dev/null +++ b/wizards/source/depot/Lang_zh.xba @@ -0,0 +1,175 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Lang_zh" script:language="StarBasic">Option Explicit + +Sub LoadChineseSimpleLanguage() + + sProductname = GetProductname + sOK = "确定" + sCancel = "取消" + sColumnHeader = "列标题" + sInsertStockName = "请首先往您的帐号内输入一些股票名称!" + sTitle = "<PRODUCTNAME>:股票管理" + sTitle = ReplaceString(sTitle, sProductName, "<PRODUCTNAME>") + sMsgError = "输入错误" + sMsgNoName = sInsertStockname + sMsgNoQuantity = "请输入大于0的交易股数" + sMsgNoDividend = "请输入每股的红利金额或红利总额" + sMsgNoExchangeRate = "请输入一个正确的兑换率(旧股-> 新股)。" + sMsgNoValidExchangeDate = "请输入拆股生效日期。" + sMsgWrongExchangeDate = "因为在拆股生效后已经进行了股票交易,所以无法拆股。" + sMsgSellTooMuch = "您最多能出售的股票数为: " + sMsgConfirm = "需要确认" + sMsgFreeStock = "您想要输入赠送股票?" + sMsgTotalLoss = "您想要输入总亏损值?" + sMsgAuthorization = "安全查询" + sMsgDeleteAll = "您要删除所有的交易信息并重新建立股票帐号一览表吗?" + cSplit = "股票拆股日期 " + sHistory = "记录" + TransactTitle(1) = "出售股票" + TransactTitle(2) = "购买股票" + StockRatesTitle(1) = "支付红利" + StockRatesTitle(2) = "股票拆股" + StockRatesTitle(3) = sHistory + sDepotCurrency = "股票交易的货币" + sStockName = "股票名称" + TransactMode = LIFO ' Possible values: "FIFO" and "LIFO" + DateCellStyle = "结果 日期" + CurrCellStyle = "1" + sStartDate = "起始日期:" + sEndDate = "终止日期:" + sStartUpWelcome = "这个样式能够帮助您有效地管理自己的股票帐号" + sStartUpChooseMarket = "请首先选择采用的参考货币以及要直接用国际互联网来更新资料的证券交易所!" + sStartUpHint = "很遗憾,<History>功能仅可供美国市场使用!" + sStartupHint = ReplaceString(sStartUpHint, sHistory, "<History>") + sNoInternetUpdate = "不通过国际互联网更新" + sMarketPlace = "交易所:" + sNoInternetDataAvailable = "无法获得国际互联网上的行情!" + sCheckInternetSettings = "可能的原因是:<BR>您的国际互联网设定不正确,需要重新设定。<BR>输入了一个错误的股票号码。" + sCheckInternetSettings = ReplaceString(sCheckInternetSettings, chr(13), "<BR>") + + sMsgEndDatebeforeNow = "终止日期必须在今天之前!" + sMsgStartDatebeforeEndDate = "起始日期必须在终止日期之前!" + + sMarket(0,0) = "美元" + sMarket(0,1) = "$" + sMarket(0,2) = "纽约" + sMarket(0,3) = "http://finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(0,4) = "http://ichart.finance.yahoo.com/table.csv?" &_ + "s=<StockID>&d=<EndMonth>&e=<EndDay>&f=<Endyear>&g=d&" &_ + "a=<StartMonth>&b=<StartDay>&c=<Startyear>&ignore=.csv" + sMarket(0,5) = "图标" + sMarket(0,6) = "en" + sMarket(0,7) = "US" + sMarket(0,8) = "409" + sMarket(0,9) = "44" + sMarket(0,10) = "1" + + sMarket(1,0) = "欧元" + sMarket(1,1) = chr(8364) + sMarket(1,2) = "法兰克福" + sMarket(1,3) = "http://de.finance.yahoo.com/d/quotes.csv?s=<StockID>.F&f=sl1t1c1ghpv&e=.csv" + sMarket(1,5) = "代码" + sMarket(1,6) = "de;nl;pt;el" + sMarket(1,7) = "DE;NL;PT;GR" + sMarket(1,8) = "407;413;816;408" + sMarket(1,9) = "59/9" + sMarket(1,10) = "1" + + sMarket(2,0) = "英镑" + sMarket(2,1) = "£" + sMarket(2,2) = "伦敦" + sMarket(2,3) = "http://uk.finance.yahoo.com/d/quotes.csv?s=<StockID>.L&m=*&f=sl1t1c1ghov&e=.csv" + sMarket(2,5) = "股票代码" + sMarket(2,6) = "en" + sMarket(2,7) = "GB" + sMarket(2,8) = "809" + sMarket(2,9) = "44" + sMarket(2,10) = "1" + + sMarket(3,0) = "日元" + sMarket(3,1) = "¥" + sMarket(3,2) = "东京" + sMarket(3,3) = "" + sMarket(3,5) = "代码" + sMarket(3,6) = "ja" + sMarket(3,7) = "JP" + sMarket(3,8) = "411" + sMarket(3,9) = "" + sMarket(3,10) = "" + + sMarket(4,0) = "港币" + sMarket(4,1) = "HK$" + sMarket(4,2) = "香港" + sMarket(4,3) = "http://hk.finance.yahoo.com/d/quotes.csv?s=<StockID>.HK&f=sl1d1t1c1ohgv&e=.csv" + sMarket(4,5) = "编号" + sMarket(4,6) = "zh" + sMarket(4,7) = "HK" + sMarket(4,8) = "C04" + sMarket(4,9) = "44" + sMarket(4,10) = "1" + + sMarket(5,0) = "澳元" + sMarket(5,1) = "$" + sMarket(5,2) = "悉尼" + sMarket(5,3) = "http://au.finance.yahoo.com/d/quotes.csv?s=<StockID>&f=sl1d1t1c1ohgv&e=.csv" + sMarket(5,5) = "股票代码" + sMarket(5,6) = "en" + sMarket(5,7) = "AU" + sMarket(5,8) = "C09" + sMarket(5,9) = "44" + sMarket(5,10) = "1" + +' ****************************End of the default subset********************************* + CompleteMarketList() + + LocalizedCurrencies() + + With TransactModel + .lblStockNames.Label = sStockname + .lblQuantity.Label = "数量" + .lblRate.Label = "股票牌价" + .lblDate.Label = "交易日期" + .hlnCommission.Label = "其它支出费用" + .lblCommission.Label = "手续费" + .lblMinimum.Label = "最低手续费" + .lblFix.Label = "固定金额/费用" + .cmdGoOn.Label = sOK + .cmdCancel.Label = sCancel + End With + + With StockRatesModel + .optPerShare.Label = "每股红利" + .optTotal.Label = "红利总计" + .lblDividend.Label = "金额" + .lblExchangeRate.Label = "兑换率(旧->新)" + .lblColon.Label = ":" + .lblDate.Label = "兑换日期:" + .lblStockNames.Label = sStockname + .lblStartDate.Label = sStartDate + .lblEndDate.Label = sEndDate + .optDaily.Label = "每天" + .optWeekly.Label = "每周" + .hlnInterval.Label = "时间周期" + .cmdGoOn.Label = sOk + .cmdCancel.Label = sCancel + End With +End Sub +</script:module>
\ No newline at end of file diff --git a/wizards/source/depot/dialog.xlb b/wizards/source/depot/dialog.xlb new file mode 100644 index 000000000..764ea3f35 --- /dev/null +++ b/wizards/source/depot/dialog.xlb @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Depot" library:readonly="true" library:passwordprotected="false"> + <library:element library:name="Dialog2"/> + <library:element library:name="Dialog3"/> + <library:element library:name="Dialog4"/> +</library:library> diff --git a/wizards/source/depot/script.xlb b/wizards/source/depot/script.xlb new file mode 100644 index 000000000..372665b22 --- /dev/null +++ b/wizards/source/depot/script.xlb @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Depot" library:readonly="true" library:passwordprotected="false"> + <library:element library:name="Depot"/> + <library:element library:name="CommonLang"/> + <library:element library:name="Currency"/> + <library:element library:name="Internet"/> + <library:element library:name="Lang_de"/> + <library:element library:name="tools"/> + <library:element library:name="Lang_en"/> + <library:element library:name="Lang_fr"/> + <library:element library:name="Lang_it"/> + <library:element library:name="Lang_es"/> + <library:element library:name="Lang_sv"/> + <library:element library:name="Lang_zh"/> + <library:element library:name="Lang_tw"/> + <library:element library:name="Lang_ko"/> + <library:element library:name="Lang_ja"/> +</library:library> diff --git a/wizards/source/depot/tools.xba b/wizards/source/depot/tools.xba new file mode 100644 index 000000000..daadf4988 --- /dev/null +++ b/wizards/source/depot/tools.xba @@ -0,0 +1,217 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<!-- + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you 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 . +--> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="tools" script:language="StarBasic">REM ***** BASIC ***** +Option Explicit + +Sub RemoveSheet() + If oSheets.HasbyName("Link") then + oSheets.RemovebyName("Link") + End If +End Sub + + +Sub InitializeStatusLine(StatusText as String, MaxValue as Integer, FirstValue as Integer) + oStatusline = oDocument.GetCurrentController.GetFrame.CreateStatusIndicator() + oStatusLine.Start(StatusText, MaxValue) + oStatusline.SetValue(FirstValue) +End Sub + + +Sub MakeRangeVisible(oSheet as Object, RangeName as String, BIsVisible as Boolean) +Dim oRangeAddress, oColumns as Object +Dim i, iStartColumn, iEndColumn as Integer + oRangeAddress = oSheet.GetCellRangeByName(RangeName).RangeAddress + iStartColumn = oRangeAddress.StartColumn + iEndColumn = oRangeAddress.EndColumn + oColumns = oSheet.Columns + For i = iStartColumn To iEndColumn + oSheet.Columns(i).IsVisible = bIsVisible + Next i +End Sub + + +Function GetRowIndex(oSheet as Object, RowName as String) +Dim oRange as Object + oRange = oSheet.GetCellRangeByName(RowName) + GetRowIndex = oRange.RangeAddress.StartRow +End Function + + +Function GetTransactionCount(iStartRow as Integer) +Dim iEndRow as Integer + iStartRow = GetRowIndex(oMovementSheet, "ColumnsToHide") + iEndRow = GetRowIndex(oMovementSheet, "HiddenRow3" ) + GetTransactionCount = iEndRow -iStartRow - 2 +End Function + + +Function GetStocksCount(iStartRow as Integer) +Dim iEndRow as Integer + iStartRow = GetRowIndex(oFirstSheet, "HiddenRow1") + iEndRow = GetRowIndex(oFirstSheet, "HiddenRow2") + GetStocksCount = iEndRow -iStartRow - 1 +End Function + + +Function FillListbox(ListboxControl as Object, MsgTitle as String, bShowMessage) as Boolean +Dim i, StocksCount as Integer +Dim iStartRow as Integer +Dim oCell as Object + ' Add stock names to empty list box + StocksCount = GetStocksCount(iStartRow) + If StocksCount > 0 Then + ListboxControl.Model.StringItemList() = NullList() + For i = 1 To StocksCount + oCell = oFirstSheet.GetCellByPosition(SBCOLUMNNAME1,iStartRow + i) + ListboxControl.AddItem(oCell.String, i-1) + Next + FillListbox() = True + Else + If bShowMessage Then + Msgbox(sInsertStockName, 16, MsgTitle) + FillListbox() = False + End If + End If +End Function + + +Sub CellValuetoControl(oSheet, oControl as Object, CellName as String) +Dim oCell as Object +Dim StringValue + oCell = GetCellByName(oSheet, CellName) + If oControl.PropertySetInfo.HasPropertyByName("EffectiveValue") Then + oControl.EffectiveValue = oCell.Value + Else + oControl.Value = oCell.Value + End If +' If oCell.FormulaResultType = 1 Then +' StringValue = oNumberFormatter.GetInputString(oCell.NumberFormat, oCell.Value) +' oControl.Text = DeleteStr(StringValue, "%") +' Else +' oControl.Text = oCell.String +' End If +End Sub + + +Sub RemoveStockRows(oSheet as Object, iStartRow, RowCount as Integer) + If RowCount > 0 Then + oSheet.Rows.RemoveByIndex(iStartRow, RowCount) + End If +End Sub + + +Sub AddValueToCellContent(iCellCol, iCellRow as Integer, AddValue) +Dim oCell as Object +Dim OldValue + oCell = oMovementSheet.GetCellByPosition(iCellCol, iCellRow) + OldValue = oCell.Value + oCell.Value = OldValue + AddValue +End Sub + + +Sub CheckInputDate(aEvent as Object) +Dim oRefDialog as Object +Dim oRefModel as Object +Dim oDateModel as Object + oDateModel = aEvent.Source.Model + oRefModel = DlgReference.GetControl("cmdGoOn").Model + oRefModel.Enabled = oDateModel.Date <> 0 +End Sub + + + +' Updates the cell with the CurrentValue after checking if the +' Newdate is later than the one that is referred to in the annotation +' of the cell +Sub InsertCurrentValue(CurValue as Double, iRow as Integer, Newdate as Date) +Dim oCell as Object +Dim OldDate as Date + oCell = oFirstSheet.GetCellByPosition(SBCOLUMNRATE1, iRow) + OldDate = CDate(oCell.Annotation.Text.String) + If NewDate >= OldDate Then + oCell.SetValue(CurValue) + oCell.Annotation.Text.SetString(CStr(NewDate)) + End If +End Sub + + +Sub SplitCellValue(oSheet, FirstNumber, SecondNumber, iCol, iRow, NoteText) +Dim oCell as Object +Dim OldValue + oCell = oSheet.GetCellByPosition(iCol, iRow) + OldValue = oCell.Value + oCell.Value = OldValue * FirstNumber / SecondNumber + If NoteText <> "" Then + oCell.Annotation.SetString(NoteText) + End If +End Sub + + +Function GetStockRowIndex(ByVal Stockname) as Integer +Dim i, StocksCount as Integer +Dim iStartRow as Integer +Dim oCell as Object + StocksCount = GetStocksCount(iStartRow) + For i = 1 To StocksCount + oCell = oFirstSheet.GetCellByPosition(SBCOLUMNNAME1,iStartRow + i) + If oCell.String = Stockname Then + GetStockRowIndex = iStartRow + i + Exit Function + End If + Next + GetStockRowIndex = -1 +End Function + + +Function GetStockID(StockName as String, Optional iFirstRow as Integer) as String +Dim CellStockName as String +Dim i as Integer +Dim iCount as Integer +Dim iLastRow as Integer + If IsMissing(iFirstRow) Then + iFirstRow = GetRowIndex(oFirstSheet, "HiddenRow1") + End If + iCount = GetStocksCount(iFirstRow) + iLastRow = iFirstRow + iCount + For i = iFirstRow To iLastRow + CellStockName = oFirstSheet.GetCellByPosition(SBCOLUMNNAME1, i).String + If CellStockname = StockName Then + Exit For + End If + Next i + If i > iLastRow Then + GetStockID() = "" + Else + If Not IsMissing(iFirstRow) Then + iFirstRow = i + End If + GetStockID() = oFirstSheet.GetCellByPosition(SBCOLUMNID1, i).String + End If +End Function + + +Function CheckDocLocale(LocLanguage as String, LocCountry as String) +Dim bIsDocLanguage as Boolean +Dim bIsDocCountry as Boolean + bIsDocLanguage = Instr(1, LocLanguage, sDocLanguage, SBBINARY) <> 0 + bIsDocCountry = Instr(1, LocCountry, sDocCountry, SBBINARY) <> 0 OR SDocCountry = "" + CheckDocLocale = (bIsDocLanguage And bIsDocCountry) +End Function +</script:module> |