diff options
Diffstat (limited to 'wizards/source')
135 files changed, 0 insertions, 24665 deletions
diff --git a/wizards/source/config/delzip b/wizards/source/config/delzip deleted file mode 100644 index e69de29bb..000000000 --- a/wizards/source/config/delzip +++ /dev/null diff --git a/wizards/source/config/dialog.xlc b/wizards/source/config/dialog.xlc deleted file mode 100644 index 34064e83e..000000000 --- a/wizards/source/config/dialog.xlc +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd"> -<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink"> - <library:library library:name="Standard" library:link="false"/> -</library:libraries> diff --git a/wizards/source/config/script.xlc b/wizards/source/config/script.xlc deleted file mode 100644 index 34064e83e..000000000 --- a/wizards/source/config/script.xlc +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd"> -<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink"> - <library:library library:name="Standard" library:link="false"/> -</library:libraries> diff --git a/wizards/source/configshare/delzip b/wizards/source/configshare/delzip deleted file mode 100644 index e69de29bb..000000000 --- a/wizards/source/configshare/delzip +++ /dev/null diff --git a/wizards/source/configshare/dialog.xlc b/wizards/source/configshare/dialog.xlc deleted file mode 100644 index b63ebd6d7..000000000 --- a/wizards/source/configshare/dialog.xlc +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd"> -<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink"> - <library:library library:name="FormWizard" xlink:href="$(INST)/share/basic/FormWizard/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="Template" xlink:href="$(INST)/share/basic/Template/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="Tools" xlink:href="$(INST)/share/basic/Tools/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="Schedule" xlink:href="$(INST)/share/basic/Schedule/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="Gimmicks" xlink:href="$(INST)/share/basic/Gimmicks/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="ImportWizard" xlink:href="$(INST)/share/basic/ImportWizard/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="Euro" xlink:href="$(INST)/share/basic/Euro/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="Depot" xlink:href="$(INST)/share/basic/Depot/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="ScriptBindingLibrary" xlink:href="$(INST)/share/basic/ScriptBindingLibrary/dialog.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> -</library:libraries>
\ No newline at end of file diff --git a/wizards/source/configshare/script.xlc b/wizards/source/configshare/script.xlc deleted file mode 100644 index aaf1b0d93..000000000 --- a/wizards/source/configshare/script.xlc +++ /dev/null @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE library:libraries PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "libraries.dtd"> -<library:libraries xmlns:library="http://openoffice.org/2000/library" xmlns:xlink="http://www.w3.org/1999/xlink"> - <library:library library:name="FormWizard" xlink:href="$(INST)/share/basic/FormWizard/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="Template" xlink:href="$(INST)/share/basic/Template/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="Tools" xlink:href="$(INST)/share/basic/Tools/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="Schedule" xlink:href="$(INST)/share/basic/Schedule/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="Gimmicks" xlink:href="$(INST)/share/basic/Gimmicks/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="ImportWizard" xlink:href="$(INST)/share/basic/ImportWizard/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="Euro" xlink:href="$(INST)/share/basic/Euro/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="Depot" xlink:href="$(INST)/share/basic/Depot/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> - <library:library library:name="ScriptBindingLibrary" xlink:href="$(INST)/share/basic/ScriptBindingLibrary/script.xlb/" xlink:type="simple" library:link="true" library:readonly="false"/> -</library:libraries>
\ No newline at end of file diff --git a/wizards/source/depot/CommonLang.xba b/wizards/source/depot/CommonLang.xba deleted file mode 100644 index a1cb283da..000000000 --- a/wizards/source/depot/CommonLang.xba +++ /dev/null @@ -1,351 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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 proce 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>
\ No newline at end of file diff --git a/wizards/source/depot/Currency.xba b/wizards/source/depot/Currency.xba deleted file mode 100644 index c432fecc2..000000000 --- a/wizards/source/depot/Currency.xba +++ /dev/null @@ -1,178 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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>
\ No newline at end of file diff --git a/wizards/source/depot/Depot.xba b/wizards/source/depot/Depot.xba deleted file mode 100644 index 358f3eaea..000000000 --- a/wizards/source/depot/Depot.xba +++ /dev/null @@ -1,500 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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 = CDateFromISO(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 = CDateFromISO(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 = CDateFromISO(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 = CDateToISO(Date()) - .txtDate.DateMax = CDateToISO(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 = CDateToISO(Date()) - Case 3 - .txtStartDate.DateMax = CDateToISO(CDate(Date())-1) - .txtEndDate.DateMax = CDateToISO(CDate(Date())-1) - .txtStartDate.Date = CDateToISO(CDate(Date())-8) - .txtEndDate.Date = CDateToISO(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 deleted file mode 100644 index 652acaa19..000000000 --- a/wizards/source/depot/Dialog2.xdl +++ /dev/null @@ -1,36 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="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 deleted file mode 100644 index 87bda0197..000000000 --- a/wizards/source/depot/Dialog3.xdl +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="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 deleted file mode 100644 index f5c86ce47..000000000 --- a/wizards/source/depot/Dialog4.xdl +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="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 deleted file mode 100644 index f8b646d54..000000000 --- a/wizards/source/depot/Internet.xba +++ /dev/null @@ -1,339 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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 = CDateFromISO(StockRatesModel.txtEndDate.Date) - FirstDate = CDateFromISO(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 = CDateFromISO(StockRatesModel.txtStartDate.Date) - EndDate = CDateFromISO(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 Integer -Dim oCell As Object -Dim LastDate as Date -Dim bLeaveLoop as Boolean -Dim RemoveCount as Integer -Dim iLastRow as Integer -Dim iLastLinkRow as Integer -Dim dDate as Date -Dim CurDate as Date -Dim oLinkSheet as Object -Dim StartIndex as Integer -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>
\ No newline at end of file diff --git a/wizards/source/depot/Lang_de.xba b/wizards/source/depot/Lang_de.xba deleted file mode 100644 index 1fe55bcca..000000000 --- a/wizards/source/depot/Lang_de.xba +++ /dev/null @@ -1,158 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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 deleted file mode 100644 index 347c5c254..000000000 --- a/wizards/source/depot/Lang_en.xba +++ /dev/null @@ -1,158 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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 deleted file mode 100644 index e12bf4b25..000000000 --- a/wizards/source/depot/Lang_es.xba +++ /dev/null @@ -1,158 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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 deleted file mode 100644 index 372b97440..000000000 --- a/wizards/source/depot/Lang_fr.xba +++ /dev/null @@ -1,158 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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 requise" - 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>
\ No newline at end of file diff --git a/wizards/source/depot/Lang_it.xba b/wizards/source/depot/Lang_it.xba deleted file mode 100644 index 2450bed82..000000000 --- a/wizards/source/depot/Lang_it.xba +++ /dev/null @@ -1,158 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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>
\ No newline at end of file diff --git a/wizards/source/depot/Lang_ja.xba b/wizards/source/depot/Lang_ja.xba deleted file mode 100644 index 4b4a53de3..000000000 --- a/wizards/source/depot/Lang_ja.xba +++ /dev/null @@ -1,158 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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 deleted file mode 100644 index 1b701dcba..000000000 --- a/wizards/source/depot/Lang_ko.xba +++ /dev/null @@ -1,158 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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 deleted file mode 100644 index bbfe930b6..000000000 --- a/wizards/source/depot/Lang_sv.xba +++ /dev/null @@ -1,157 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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 deleted file mode 100644 index fbe54a413..000000000 --- a/wizards/source/depot/Lang_tw.xba +++ /dev/null @@ -1,158 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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 deleted file mode 100644 index 94e05bfe5..000000000 --- a/wizards/source/depot/Lang_zh.xba +++ /dev/null @@ -1,158 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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 deleted file mode 100644 index 764ea3f35..000000000 --- a/wizards/source/depot/dialog.xlb +++ /dev/null @@ -1,7 +0,0 @@ -<?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 deleted file mode 100644 index 372665b22..000000000 --- a/wizards/source/depot/script.xlb +++ /dev/null @@ -1,19 +0,0 @@ -<?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 deleted file mode 100644 index 639980541..000000000 --- a/wizards/source/depot/tools.xba +++ /dev/null @@ -1,200 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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 refered 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>
\ No newline at end of file diff --git a/wizards/source/euro/AutoPilotRun.xba b/wizards/source/euro/AutoPilotRun.xba deleted file mode 100644 index e1f2fe076..000000000 --- a/wizards/source/euro/AutoPilotRun.xba +++ /dev/null @@ -1,414 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="AutoPilotRun" script:language="StarBasic">Option Explicit - -Public SourceDir as String -Public TargetDir as String -Public TargetStemDir as String -Public SourceFile as String -Public TargetFile as String -Public Source as String -Public SubstFile as String -Public SubstDir as String -Public NoArgs() -Public TypeList(14) as String -Public GoOn as Boolean -Public DoUnprotect as Integer -Public Password as String -Public DocIndex as Integer -Public oPathSettings as Object -Public oUcb as Object -Public TotDocCount as Integer -Public sTotDocCount as String -Public OpenProperties(1) as New com.sun.star.beans.PropertyValue - - -Sub StartAutoPilot() -Dim i As Integer -Dim oFactoryKey as Object - BasicLibraries.LoadLibrary("Tools") - BasicLibraries.LoadLibrary("ImportWizard") - If InitResources("Euro Converter", "eur") Then - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - oLocale = GetStarOfficeLocale() - InitializeConverter(oLocale, 2) - ToggleGoOnButton() - oFactoryKey = GetRegistryKeyContent("org.openoffice.Setup/Office/Factories") - DialogModel.chkTextDocuments.Enabled = oFactoryKey.hasbyName("com.sun.star.text.TextDocument") - DialogModel.cmdGoOn.DefaultButton = True - DialogModel.lstCurrencies.TabIndex = 12 - DialogConvert.GetControl("optWholeDir").SetFocus() - DialogConvert.Execute() - DialogConvert.Dispose() - End If -End Sub - - -Sub ConvertDocuments() -Dim FilesList() -Dim bDisposable as Boolean - - If Source <> "" And TargetDir <> "" Then - If DialogModel.optSingleFile.State = 1 Then - SourceFile = Source - TotDocCount = 1 - Else - SourceDir = Source - TargetStemDir = TargetDir - TypeList(0) = "calc8" - TypeList(1) = "calc_StarOffice_XML_Calc" - TypeList(2) = "calc_StarCalc_30" - TypeList(3) = "calc_StarCalc_40" - TypeList(4) = "calc_StarCalc_50" - If DialogModel.chkTextDocuments.State = 1 Then - ReDim Preserve TypeList(13) as String - - TypeList(5) = "writer8" - TypeList(6) = "writerglobal8" - TypeList(7) = "writer_StarOffice_XML_Writer" - TypeList(8) = "writer_globaldocument_StarOffice_XML_Writer_GlobalDocument" - TypeList(9) = "writer_StarWriter_30" - TypeList(10) = "writer_StarWriter_40" - TypeList(11) = "writer_globaldocument_StarWriter_40GlobalDocument" - TypeList(12) = "writer_StarWriter_50" - TypeList(13) = "writer_globaldocument_StarWriter_50GlobalDocument" - End If - FilesList() = ReadDirectories(SourceDir, bRecursive, True, False, TypeList()) - TotDocCount = Ubound(FilesList(),1) + 1 - End If - InitializeProgressPage(DialogModel) -' ChangeToNextProgressStep() - sTotDocCount = CStr(TotDocCount) - OpenProperties(0).Name = "Hidden" - OpenProperties(0).Value = True - OpenProperties(1).Name = "AsTemplate" - OpenProperties(1).Value = False - For DocIndex = 0 To TotDocCount - 1 - If InitializeDocument(FilesList(), bDisposable) Then - If StoreDocument() Then - ConvertDocument() - oDocument.Store - End If - If bDisposable Then - oDocument.Dispose() - End If - End If - Next DocIndex - DialogModel.cmdBack.Enabled = True - DialogModel.cmdGoOn.Enabled = True - DialogModel.cmdGoOn.Label = sReady - DialogModel.cmdCancel.Label = sEnd - End If -End Sub - - -Function InitializeDocument(FilesList(), bDisposable as Boolean) as Boolean -' The Autopilot is started from step No. 2 -Dim sViewPath as String -Dim bIsReadOnly as Boolean -Dim sExtension as String - On Local Error Goto NEXTFILE - If Not bCancelTask Then - If DialogModel.optWholeDir.State = 1 Then - SourceFile = FilesList(DocIndex,0) - TargetFile = ReplaceString(SourceFile,TargetStemDir,SourceDir) - TargetDir = DirectorynameoutofPath(TargetFile, "/") - Else - SourceFile = Source - TargetFile = TargetDir & "/" & FileNameoutofPath(SourceFile, "/") - End If - If CreateFolder(TargetDir) Then - sExtension = GetFileNameExtension(SourceFile, "/") - oDocument = OpenDocument(SourceFile, OpenProperties(), bDisposable) - If (oDocument.IsReadOnly) AND (UCase(SourceFile) = UCase(TargetFile)) Then - bIsReadOnly = True - Msgbox(sMsgDOCISREADONLY, 16, GetProductName()) - Else - bIsReadOnly = False - RetrieveDocumentObjects() - sViewPath = CutPathView(SourceFile, 60) - DialogModel.lblCurDocument.Label = Str(DocIndex+1) & "/" & sTotDocCount & " (" & sViewPath & ")" - End If - InitializeDocument() = Not bIsReadOnly - Else - InitializeDocument() = False - End If - Else - InitializeDocument() = False - End If -NEXTFILE: - If Err <> 0 Then - InitializeDocument() = False - Resume LETSGO -LETSGO: - End If -End Function - - -Sub ChangeToNextProgressStep() - DialogModel.lblCurProgress.FontWeight = com.sun.star.awt.FontWeight.NORMAL - DialogConvert.GetControl("lblCurProgress").Visible = True -End Sub - - -Function StoreDocument() as Boolean -Dim sCurFileExists as String -Dim iOverWrite as Integer - If (TargetFile <> "") And (Not bCancelTask) Then - On Local Error Goto NOSAVING - If oUcb.Exists(TargetFile) Then - sCurFileExists = ReplaceString(sMsgFileExists, ConvertFromUrl(TargetFile), "<1>") - sCurFileExists = ReplaceString(sCurFileExists, chr(13), "<CR>") - iOverWrite = Msgbox (sCurFileExists, 32 + 3, sMsgDLGTITLE) - Select Case iOverWrite - Case 1 ' OK - Case 2 ' Abort - bCancelTask = True - StoreDocument() = False - Exit Function - Case 7 ' No - StoreDocument() = False - Exit Function - End Select - End If - If TargetFile <> SourceFile Then - oDocument.StoreAsUrl(TargetFile,NoArgs) - Else - oDocument.Store - End If - StoreDocument() = True - NOSAVING: - If Err <> 0 Then - StoreDocument() = False - Resume CLERROR - End If - CLERROR: - End If -End Function - - -Sub SwapExtent() - DialogModel.chkRecursive.Enabled = DialogModel.optWholeDir.State = 1 - If DialogModel.optWholeDir.State = 1 Then - DialogModel.lblSource.Label = sSOURCEDIR - If Not IsNull(SubstFile) Then - SubstFile = DialogModel.txtSource.Text - DialogModel.txtSource.Text = SubstDir - End If - Else - DialogModel.LblSource.Label = sSOURCEFILE - If Not IsNull(SubstDir) Then - SubstDir = DialogModel.txtSource.Text - DialogModel.txtSource.Text = SubstFile - End If - End If - ToggleGoOnButton() -End Sub - - -Function InitializeThirdStep() as Boolean -Dim TextBoxText as String - Source = AssignFileName(DialogModel.txtSource.Text, DialogModel.lblSource.Label, True) - If CheckTextBoxPath(DialogModel.txtTarget, True, True, sMsgDLGTITLE, True) Then - TargetDir = AssignFileName(DialogModel.txtTarget.Text, DialogModel.lblTarget.Label, False) - Else - TargetDir = "" - End If - If Source <> "" And TargetDir <> "" Then - bRecursive = DialogModel.chkRecursive.State = 1 - bDoUnprotect = DialogModel.chkProtect.State = 1 - DialogModel.lblRetrieval.FontWeight = com.sun.star.awt.FontWeight.BOLD - DialogModel.lblRetrieval.Label = sPrgsRETRIEVAL - DialogModel.lblCurProgress.Label = sPrgsCONVERTING - If DialogModel.optWholeDir.State = 1 Then - TextBoxText = sSOURCEDIR & " " & ConvertFromUrl(Source) & chr(13) - If DialogModel.chkRecursive.State = 1 Then - TextBoxText = TextBoxText & DeleteStr(sInclusiveSubDir,"~") & chr(13) - End If - Else - TextBoxText = sSOURCEFILE & " " & ConvertFromUrl(Source) & chr(13) - End If - TextBoxText = TextBoxText & sTARGETDIR & " " & ConvertFromUrl(TargetDir) & chr(13) - If DialogModel.chkProtect.State = 1 Then - TextBoxText = TextboxText & sPrgsUNPROTECT - End If - DialogModel.txtConfig.Text = TextBoxText - ToggleProgressStep() - DialogModel.cmdGoOn.Enabled = False - InitializeThirdStep() = True - Else - InitializeThirdStep() = False - End If -End Function - - -Sub ToggleProgressStep(Optional aEvent as Object) -Dim bMakeVisible as Boolean -Dim LocStep as Integer - ' If the Sub is call by the 'cmdBack' Button then set the 'bMakeVisible' variable accordingly - bMakeVisible = IsMissing(aEvent) - If bMakeVisible Then - DialogModel.Step = 3 - Else - DialogModel.Step = 2 - End If - DialogConvert.GetControl("lblCurrencies").Visible = Not bMakeVisible - DialogConvert.GetControl("lstCurrencies").Visible = Not bMakeVisible - DialogConvert.GetControl("cmdBack").Visible = bMakeVisible - DialogConvert.GetControl("cmdGoOn").Visible = bMakeVisible - DialogModel.imgPreview.ImageUrl = BitmapDir & "euro_" & DialogModel.Step & ".bmp" -End Sub - - -Sub EnableStep2DialogControls(OnValue as Boolean) - With DialogModel - .hlnExtent.Enabled = OnValue - .optWholeDir.Enabled = OnValue - .optSingleFile.Enabled = OnValue - .chkProtect.Enabled = OnValue - .cmdCallSourceDialog.Enabled = OnValue - .cmdCallTargetDialog.Enabled = OnValue - .lblSource.Enabled = OnValue - .lblTarget.Enabled = OnValue - .txtSource.Enabled = OnValue - .txtTarget.Enabled = OnValue - .imgPreview.Enabled = OnValue - .lstCurrencies.Enabled = OnValue - .lblCurrencies.Enabled = OnValue - If OnValue Then - ToggleGoOnButton() - .chkRecursive.Enabled = .optWholeDir.State = 1 - Else - .cmdGoOn.Enabled = False - .chkRecursive.Enabled = False - End If - End With -End Sub - - -Sub InitializeProgressPage() - DialogConvert.GetControl("lblRetrieval").Visible = False - DialogConvert.GetControl("lblCurProgress").Visible = False - DialogModel.lblRetrieval.FontWeight = com.sun.star.awt.FontWeight.NORMAL - DialogModel.lblCurProgress.FontWeight = com.sun.star.awt.FontWeight.BOLD - DialogConvert.GetControl("lblRetrieval").Visible = True - DialogConvert.GetControl("lblCurProgress").Visible = True -End Sub - - -Function AssignFileName(sPath as String, ByVal HeaderString, bCheckFileType as Boolean) as String -Dim bIsValid as Boolean -Dim sLocMimeType as String -Dim sNoDirMessage as String - HeaderString = DeleteStr(HeaderString, ":") - sPath = ConvertToUrl(Trim(sPath)) - bIsValid = oUcb.Exists(sPath) - If bIsValid Then - If DialogModel.optSingleFile.State = 1 Then - If bCheckFileType Then - sLocMimeType = GetRealFileContent(sPath) - If DialogModel.chkTextDocuments.State = 1 Then - If (Instr(1, sLocMimeType, "text") = 0) And (Instr(1, sLocMimeType, "calc") = 0) Then - Msgbox(sMsgFileInvalid, 48, sMsgDLGTITLE) - bIsValid = False - End If - Else - If (Instr(1, sLocMimeType, "spreadsheet") = 0) And (Instr(1, sLocMimeType, "calc")) = 0 Then - Msgbox(sMsgFileInvalid, 48, sMsgDLGTITLE) - bIsValid = False - End If - End If - End If - Else - If Not oUcb.IsFolder(sPath) Then - sNoDirMessage = ReplaceString(sMsgNODIRECTORY,sPath,"<1>") - Msgbox(sNoDirMessage,48, sMsgDLGTITLE) - bIsValid = False - Else - sPath = RTrimStr(sPath,"/") - sPath = sPath & "/" - End If - End if - Else - Msgbox(HeaderString & " '" & ConvertFromUrl(sPath) & "' " & sMsgNOTTHERE,48, sMsgDLGTITLE) - End If - If bIsValid Then - AssignFileName() = sPath - Else - AssignFilename() = "" - End If -End Function - - -Sub ToggleGoOnButton() -Dim bDoEnable as Boolean -Dim sLocMimeType as String -Dim sPath as String - bDoEnable = Ubound(DialogModel.lstCurrencies.SelectedItems()) > -1 - If bDoEnable Then - ' Check if Source is set correctly - sPath = ConvertToUrl(Trim(DialogModel.txtSource.Text)) - bDoEnable = oUcb.Exists(sPath) - End If - DialogModel.cmdGoOn.Enabled = bDoEnable -End Sub - - -Sub CallFolderPicker() - GetFolderName(DialogModel.txtTarget) - ToggleGoOnButton() -End Sub - - -Sub CallFilePicker() - If DialogModel.optSingleFile.State = 1 Then - Dim oMasterKey as Object - Dim oTypes() as Object - Dim oUIKey() as Object - - oMasterKey = GetRegistryKeyContent("org.openoffice.TypeDetection.Types") - oTypes() = oMasterKey.Types - oUIKey = GetRegistryKeyContent("org.openoffice.Office.UI/FilterClassification/LocalFilters") - If DialogModel.chkTextDocuments.State = 1 Then - Dim FilterNames(11,1) as String - FilterNames(6,0) = oTypes.GetByName("writer_StarOffice_XML_Writer").UIName - FilterNames(6,1) = "*.sxw" - FilterNames(7,0) = oTypes.GetByName("writer_StarOffice_XML_Writer_Template").UIName - FilterNames(7,1) = "*.stw" - FilterNames(8,0) = oUIKey.Classes.GetByName("sw3to5").DisplayName - FilterNames(8,1) = "*.sdw" - FilterNames(9,0) = oUIKey.Classes.GetByName("sw3to5templ").DisplayName - Filternames(9,1) = "*.vor" - FilterNames(10,0) = oTypes.GetByName("writer8").UIName - FilterNames(10,1) = "*.odt" - FilterNames(11,0) = oTypes.GetByName("writer8_template").UIName - FilterNames(11,1) = "*.ott" - Else - ReDim FilterNames(5,1) as String - End If - FilterNames(0,0) = oTypes.GetByName("calc_StarOffice_XML_Calc").UIName - Filternames(0,1) = "*.sxc" - FilterNames(1,0) = oTypes.GetByName("calc_StarOffice_XML_Calc_Template").UIName - Filternames(1,1) = "*.stc" - FilterNames(2,0) = oUIKey.Classes.GetByName("sc345").DisplayName - FilterNames(2,1) = "*.sdc" - FilterNames(3,0) = oUIKey.Classes.GetByName("sc345templ").DisplayName - Filternames(3,1) = "*.vor" - FilterNames(4,0) = oTypes.GetByName("calc8").UIName - Filternames(4,1) = "*.ods" - FilterNames(5,0) = oTypes.GetByName("calc8_template").UIName - Filternames(5,1) = "*.ots" - GetFileName(DialogModel.txtSource, Filternames()) - Else - GetFolderName(DialogModel.txtSource) - End If - ToggleGoOnButton() -End Sub - - -Sub PreviousStep() - DialogModel.Step = 2 - DialogModel.cmdGoOn.Label = sGOON - DialogModel.cmdCancel.Label = sCANCEL -End Sub -</script:module> diff --git a/wizards/source/euro/Common.xba b/wizards/source/euro/Common.xba deleted file mode 100644 index 42a5c643d..000000000 --- a/wizards/source/euro/Common.xba +++ /dev/null @@ -1,272 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Common" script:language="StarBasic"> REM ***** BASIC ***** -Public DialogModel as Object -Public DialogConvert as Object -Public DialogPassword as Object -Public PasswordModel as Object - -Sub RetrieveDocumentObjects() - CurMimeType = Tools.GetDocumentType(oDocument) - If Instr(1, CurMimeType, "calc") <> 0 Then - oSheets = oDocument.Sheets - oSheet = oDocument.Sheets.GetbyIndex(0) - oAddressRanges = oDocument.createInstance("com.sun.star.sheet.SheetCellRanges") - End If - ' Retrieve the indices for the cellformatations - oFormats = oDocument.NumberFormats -End Sub - - -Sub CancelTask() -' If Not DocDisposed Then -' ReprotectSheets() -' End If - If DialogModel.Step = 3 And (Not bCancelTask) Then - If Msgbox(sMsgCancelConversion, 36, sMsgCancelTitle) = 6 Then - bCancelTask = True - DialogConvert.EndExecute - Else - bCancelTask = False - End If - Else - DialogConvert.EndExecute() - End If -End Sub - - -Function ConvertDocument() - GoOn = True -' DocDisposed = True - InitializeProgressbar() - If Instr(1, CurMimeType, "calc") <> 0 Then - bDocHasProtectedSheets = CheckSheetProtection(oSheets) - If bDocHasProtectedSheets Then - bDocHasProtectedSheets = UnprotectSheetsWithPassword(oSheets, bDoUnProtect) - End If - If Not bDocHasProtectedSheets Then - If Not bRangeListDefined Then - TotCellCount = 0 - CreateRangeEnumeration(True) - Else - IncreaseStatusvalue(SBRelGet/3) - End If - RangeIndex = Ubound(RangeList()) - If RangeIndex > -1 Then - ConvertThehardWay(RangeList(), True, False) - MakeStyleEnumeration(True) - oDocument.calculateAll() - End If - ReprotectSheets() - bRangeListDefined = False - End If - Else - DialogModel.ProgressBar.ProgressValue = 10 ' oStatusline.SetValue(10) - ConvertTextFields() - DialogModel.ProgressBar.ProgressValue = 80 ' oStatusline.SetValue(80) - ConvertWriterTables() - End If - EndStatusLine() - On Local Error Goto 0 -End Function - - -Sub SwitchNumberFormat(oObject as Object, oFormats as object) -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 i as Integer -Dim aNewStr as String -Dim iNumberFormat as Long -Dim AddToList as Boolean -Dim sOldCurrSymbol as String - On Local Error Resume Next - iNumberFormat = oObject.NumberFormat - On Local Error GoTo NOKEY - aFormat() = oFormats.getByKey(iNumberFormat) - On Local Error GoTo 0 - sOldCurrSymbol = aFormat.CurrencySymbol - If sOldCurrSymbol = CurrValue(CurrIndex,5) Then - aSimpleStr = "0 [$EUR]" - Else - aSimpleStr = "0 [$" & sEuroSign & aFormat.CurrencyExtension & "]" - End If - - nSimpleKey = Numberformat(oFormats, aSimpleStr, oLocale) - ' set new Currency format with according settings - nFormatDecimals = 2 - nFormatLeading = aFormat.LeadingZeros - bFormatNegRed = aFormat.NegativeRed - bFormatThousands = aFormat.ThousandsSeparator - aNewStr = oFormats.generateFormat( nSimpleKey, aFormat.Locale, bFormatThousands, bFormatNegRed, nFormatDecimals, nFormatLeading) - oObject.NumberFormat = Numberformat(oFormats, aNewStr, aFormat.Locale) - NOKEY: - If Err <> 0 Then - Resume CLERROR - End If - CLERROR: -End Sub - - -Function Numberformat( oFormats as Object, aFormatStr as String, oLocale as Object) -Dim nRetkey -Dim l as String -Dim c as String - nRetKey = oFormats.queryKey( aFormatStr, oLocale, True ) - If nRetKey = -1 Then - l = oLocale.Language - c = oLocale.Country - nRetKey = oFormats.addNew( aFormatStr, oLocale ) - If nRetKey = -1 Then nRetKey = 0 - End If - Numberformat = nRetKey -End Function - - -Function CheckFormatType( FormatObject as object) -Dim i as Integer -Dim LocCurrIndex as Integer -Dim nFormatFormatString as String -Dim FormatLangID as Integer -Dim sFormatCurrExt as String -Dim oFormatofObject() as Object - - ' Retrieve the Format of the Object - On Local Error GoTo NOKEY - oFormatofObject = oFormats.getByKey(FormatObject.NumberFormat) - On Local Error GoTo 0 - If NOT INT(oFormatofObject.Type) AND com.sun.star.util.NumberFormat.CURRENCY Then - CheckFormatType = False - Exit Function - End If - If FieldinArray(CurrSymbolList(),2,oFormatofObject.CurrencySymbol) Then - ' If the Currencysymbol of the object ist the one needed, then check the Currency extension - sFormatCurrExt = oFormatofObject.CurrencyExtension - - If FieldInList(CurExtension(),2,sFormatCurrExt) Then - ' The Currency - extension also fits - CheckFormatType = True - Else - ' The Currency - symbol is Euro-conforming (like 'DEM'), so there is no Currency-Extension - CheckFormatType = oFormatofObject.CurrencySymbol = CurrsymbolList(2) - End If - Else - ' The Currency Symbol of the object is not the desired one - If oFormatofObject.CurrencySymbol = "" Then - ' Format is "automatic" - CheckFormatType = CheckLocale(oFormatofObject.Locale) - Else - CheckFormatType = False - End If - End If - - NOKEY: - If Err <> 0 Then - CheckFormatType = False - Resume CLERROR - End If - CLERROR: -End Function - - -Sub StartConversion() - GoOn = True - Select Case DialogModel.Step - Case 1 - If DialogModel.chkComplete.State = 1 Then - ConvertWholeDocument() - Else - ConvertRangesorStylesofDocument() - End If - Case 2 - bCancelTask = False - If InitializeThirdStep() Then - ConvertDocuments() - bCancelTask = True - End If - Case 3 - DialogConvert.EndExecute() - End Select -End Sub - - -Sub IncreaseStatusValue(AddStatusValue as Integer) - StatusValue = Int(StatusValue + AddStatusValue) - If DialogModel.Step = 3 Then - DialogModel.ProgressBar.ProgressValue = StatusValue - Else - oStatusline.SetValue(StatusValue) - End If -End Sub - - -Sub SelectCurrency() -Dim AddtoList as Boolean -Dim NullList() -Dim OldCurrIndex as Integer - bRangeListDefined = False - OldCurrIndex = CurrIndex - CurrIndex = DialogModel.lstCurrencies.SelectedItems(0) - If OldCurrIndex <> CurrIndex Then - InitializeCurrencyValues(CurrIndex) - CurExtension(0) = LangIDValue(CurrIndex,0,2) - CurExtension(1) = LangIDValue(CurrIndex,1,2) - CurExtension(2) = LangIDValue(CurrIndex,2,2) - If DialogModel.Step = 1 Then - EnableStep1DialogControls(False,False, False) - If DialogModel.optCellTemplates.State = 1 Then - EnableStep1DialogControls(False, False, False) - CreateStyleEnumeration() - ElseIf ((DialogModel.optSheetRanges.State = 1) OR (DialogModel.optDocRanges.State = 1)) AND (DialogModel.Step = 1) Then - CreateRangeEnumeration(False) - If Ubound(RangeList()) = -1 Then - DialogModel.lstSelection.StringItemList() = NullList() - End If - ElseIf DialogModel.optSelRange.State= 1 Then - 'Preselected Range - End If - EnableStep1DialogControls(True, True, True) - ElseIf DialogModel.Step = 2 Then - EnableStep2DialogControls(True) - End If - End If -End Sub - - -Sub FillUpCurrencyListbox() -Dim i as Integer -Dim MaxIndex as Integer - MaxIndex = Ubound(CurrValue(),1) - Dim LocList(MaxIndex) as String - For i = 0 To MaxIndex - LocList(i) = CurrValue(i,0) - Next i - DialogModel.lstCurrencies.StringItemList() = LocList() - If CurrIndex > -1 Then - SelectListboxItem(DialogModel.lstCurrencies, CurrIndex) - End If -End Sub - - -Sub InitializeProgressbar() - CurCellCount = 0 - If Not IsNull(oStatusLine) Then - oStatusline.Start(sStsPROGRESS, 100) - Else - DialogModel.ProgressBar.ProgressValue = 0 - End If - StatusValue = 0 -End Sub - - -Sub EndStatusLine() - If Not IsNull(oStatusLine) Then - oStatusline.End - Else - DialogModel.ProgressBar.ProgressValue = 100 - End If -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/euro/ConvertRun.xba b/wizards/source/euro/ConvertRun.xba deleted file mode 100644 index a15c88412..000000000 --- a/wizards/source/euro/ConvertRun.xba +++ /dev/null @@ -1,317 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ConvertRun" script:language="StarBasic">Option Explicit - -Public oPreSelRange as Object - -Sub Main() - BasicLibraries.LoadLibrary("Tools") - If InitResources("Euro Converter", "eur") Then - bDoUnProtect = False - bPreSelected = True - oDocument = ThisComponent - RetrieveDocumentObjects() ' Statusline, SheetsCollection etc. - InitializeConverter(oDocument.CharLocale, 1) - GetPreSelectedRange() - If GoOn Then - DialogModel.lstCurrencies.TabIndex = 2 - DialogConvert.GetControl("chkComplete").SetFocus() - DialogConvert.Execute - End If - DialogConvert.Dispose - End If -End Sub - - -Sub SelectListItem() -Dim Listbox as Object -Dim oListSheet as Object -Dim CurStyleName as String -Dim oCursheet as Object -Dim oTempRanges as Object -Dim sCurSheetName as String -Dim RangeName as String -Dim oSheetRanges as Object -Dim ListIndex as Integer -Dim a as Integer -Dim i as Integer -Dim n as Integer -Dim m as Integer -Dim MaxIndex as Integer - Listbox = DialogModel.lstSelection - If Ubound(Listbox.SelectedItems()) > -1 Then - EnableStep1DialogControls(False, False, False) - oSelRanges = oDocument.createInstance("com.sun.star.sheet.SheetCellRanges") - - ' Is the sheet the basis, then the sheetobject has to be created - If DialogModel.optDocRanges.State = 1 Then - ' Document is the basis for the conversion - ListIndex = Listbox.SelectedItems(0) - oCurSheet = RetrieveSheetoutofRangeName(Listbox.StringItemList(ListIndex)) - oDocument.CurrentController.SetActiveSheet(oCurSheet) - Else - oCurSheet = oDocument.CurrentController.ActiveSheet - End If - sCurSheetName = oCurSheet.Name - If DialogModel.optCellTemplates.State = 1 Then - Dim CurIndex as Integer - For i = 0 To Ubound(Listbox.SelectedItems()) - CurIndex = Listbox.SelectedItems(i) - CurStylename = Listbox.StringItemList(CurIndex) - oSheetRanges = oCursheet.CellFormatRanges.createEnumeration - While oSheetRanges.hasMoreElements - oRange = oSheetRanges.NextElement - If oRange.getPropertyState("NumberFormat") = 1 Then - If oRange.CellStyle = CurStyleName Then - oSelRanges.InsertbyName("",oRange) - End If - End If - Wend - Next i - Else - ' Hard Formatation is selected - a = -1 - For n = 0 To Ubound(Listbox.SelectedItems()) - m = Listbox.SelectedItems(n) - RangeName = Listbox.StringItemList(m) - oListSheet = RetrieveSheetoutofRangeName(RangeName) - a = a + 1 - MaxIndex = Ubound(SelRangeList()) - If a > MaxIndex Then - Redim Preserve SelRangeList(MaxIndex + SBRANGEUBOUND) - End If - SelRangeList(a) = RangeName - If oListSheet.Name = sCurSheetName Then - oRange = RetrieveRangeoutofRangeName(RangeName) - oSelRanges.InsertbyName("",oRange) - End If - Next n - End If - If a > -1 Then - ReDim Preserve SelRangeList(a) - Else - ReDim SelRangeList() - End If - oDocument.CurrentController.Select(oSelRanges) - EnableStep1DialogControls(True, True, True) - End If -End Sub - - -' Procedure that is called by an event -Sub RetrieveEnableValue() -Dim EnableValue as Boolean - EnableValue = Not DialogModel.lstSelection.Enabled - EnableStep1DialogControls(True, EnableValue, True) -End Sub - - -Sub EnableStep1DialogControls(bCurrEnabled as Boolean, bFrameEnabled as Boolean, bButtonsEnabled as Boolean) -Dim bCurrIsSelected as Boolean -Dim bObjectIsSelected as Boolean -Dim bConvertWholeDoc as Boolean -Dim bDoEnableFrame as Boolean - bConvertWholeDoc = DialogModel.chkComplete.State = 1 - bDoEnableFrame = bFrameEnabled And (NOT bConvertWholeDoc) - - ' Controls around the Selection Listbox - With DialogModel - .lblCurrencies.Enabled = bCurrEnabled - .lstCurrencies.Enabled = bCurrEnabled - .lstSelection.Enabled = bDoEnableFrame - .lblSelection.Enabled = bDoEnableFrame - .hlnSelection.Enabled = bDoEnableFrame - .optCellTemplates.Enabled = bDoEnableFrame - .optSheetRanges.Enabled = bDoEnableFrame - .optDocRanges.Enabled = bDoEnableFrame - .optSelRange.Enabled = bDoEnableFrame - End With - ' The CheckBox has the Value '1' when the Controls in the Frame are disabled - If bButtonsEnabled Then - bCurrIsSelected = Ubound(DialogModel.lstCurrencies.SelectedItems()) <> -1 - ' Enable GoOnButton only when Currency is selected - DialogModel.cmdGoOn.Enabled = bCurrIsSelected - DialogModel.chkComplete.Enabled = bCurrIsSelected - If bDoEnableFrame AND DialogModel.cmdGoOn.Enabled Then - ' If FrameControls are enabled, check if Listbox is Empty - bObjectIsSelected = Ubound(DialogModel.lstSelection.SelectedItems()) <> -1 - DialogModel.cmdGoOn.Enabled = bObjectIsSelected - End If - Else - DialogModel.cmdGoOn.Enabled = False - DialogModel.chkComplete.Enabled = False - End If -End Sub - - -Sub ConvertRangesOrStylesOfDocument() -Dim i as Integer -Dim ItemName as String -Dim SelList() as String -Dim oSheetRanges as Object - - bDocHasProtectedSheets = CheckSheetProtection(oSheets) - If bDocHasProtectedSheets Then - bDocHasProtectedSheets = UnprotectSheetsWithPassWord(oSheets, bDoUnProtect) - DialogModel.cmdGoOn.Enabled = False - End If - If Not bDocHasProtectedSheets Then - EnableStep1DialogControls(False, False, False) - InitializeProgressBar() - If DialogModel.optSelRange.State = 1 Then - SelectListItem() - End If - SelList() = DialogConvert.GetControl("lstSelection").SelectedItems() - If DialogModel.optCellTemplates.State = 1 Then - ' Option 'Soft' Formatation is selected - AssignRangestoStyle(DialogModel.lstSelection.StringItemList(), SelList()) - ConverttheSoftWay(SelList(), True) - ElseIf DialogModel.optSelRange.State = 1 Then - oSheetRanges = oPreSelRange.CellFormatRanges.createEnumeration - While oSheetRanges.hasMoreElements - oRange = oSheetRanges.NextElement - If CheckFormatType(oRange) Then - ConvertCellCurrencies(oRange) - SwitchNumberFormat(oRange, oFormats, sEuroSign) - End If - Wend - Else - ConverttheHardWay(SelList(), False, True) - End If - oStatusline.End - EnableStep1DialogControls(True, False, True) - DialogModel.cmdGoOn.Enabled = True - oDocument.CurrentController.Select(oSelRanges) - End If -End Sub - - -Sub ConvertWholeDocument() -Dim s as Integer - DialogModel.cmdGoOn.Enabled = False - DialogModel.chkComplete.Enabled = False - GoOn = ConvertDocument() - EmptyListbox(DialogModel.lstSelection()) - EnableStep1DialogControls(True, True, True) -End Sub - - -' Everything previously selected will be deselected -Sub EmptySelection() -Dim RangeName as String -Dim i as Integer -Dim MaxIndex as Integer -Dim EmptySelRangeList() as String - - If Not IsNull(oSelRanges) Then - If oSelRanges.HasElements Then - EmptySelRangeList() = ArrayOutofString(oSelRanges.RangeAddressesasString, ";", MaxIndex) - For i = 0 To MaxIndex - oSelRanges.RemovebyName(EmptySelRangeList(i)) - Next i - End If - oDocument.CurrentController.Select(oSelRanges) - Else - oSelRanges = oDocument.createInstance("com.sun.star.sheet.SheetCellRanges") - End If -End Sub - - -Function AddSelectedRangeToSelRangesEnum() as Object -Dim oLocRange as Object - osheet = oDocument.CurrentController.GetActiveSheet - oSelRanges = oDocument.createInstance("com.sun.star.sheet.SheetCellRanges") - ' Check if a Currency-Range has been selected - oLocRange = oDocument.CurrentController.Selection - bPreSelected = oLocRange.SupportsService("com.sun.star.sheet.SheetCellRange") - If bPreSelected Then - oSelRanges.InsertbyName("",oLocRange) - AddSelectedRangeToSelRangesEnum() = oLocRange - End If -End Function - - -Sub GetPreSelectedRange() -Dim i as Integer -Dim OldCurrSymbolList(2) as String -Dim OldCurrIndex as Integer -Dim OldCurExtension(2) as String - oPreSelRange = AddSelectedRangeToSelRangesEnum() - - DialogModel.chkComplete.State = Abs(Not(bPreSelected)) - If bPreSelected Then - DialogModel.optSelRange.State = 1 - AddRangeToListbox(oPreSelRange) - Else - DialogModel.optCellTemplates.State = 1 - CreateStyleEnumeration() - End If - EnableStep1DialogControls(True, bPreSelected, True) - DialogModel.optSelRange.Enabled = bPreSelected -End Sub - - -Sub AddRangeToListbox(oLocRange as Object) - EmptyListBox(DialogModel.lstSelection) - PreName = RetrieveRangeNamefromAddress(oLocRange) - AddSingleItemToListbox(DialogModel.lstSelection, Prename)', 0) - SelectListboxItem(DialogModel.lstCurrencies, CurrIndex) - TotCellCount = CountRangeCells(oLocRange) -End Sub - - -Sub CheckRangeSelection(Optional oEvent) - EmptySelection() - AddRangeToListbox(oPreSelRange) - oPreSelRange = AddSelectedRangeToSelRangesEnum() -End Sub - - -' Checks if a Field (LocField) is already defined in an Array -' Returns 'True' or 'False' -Function FieldinList(LocList(), MaxIndex as integer, ByVal LocField ) As Boolean -Dim i as integer - LocField = Ucase(LocField) - For i = Lbound(LocList()) to MaxIndex - If Ucase(LocList(i)) = LocField then - FieldInList = True - Exit Function - End if - Next - FieldInList = False -End Function - - -Function CheckLocale(oLocale) as Boolean -Dim i as Integer -Dim LocCountry as String -Dim LocLanguage as String - LocCountry = oLocale.Country - LocLanguage = oLocale.Language - For i = 0 To 1 - If LocLanguage = LangIDValue(CurrIndex,i,0) AND LocCountry = LangIDValue(CurrIndex,i,1) Then - CheckLocale = True - Exit Function - End If - Next i - CheckLocale = False -End Function - - -Sub SetOptionValuestoNull() - With DialogModel - .optCellTemplates.State = 0 - .optSheetRanges.State = 0 - .optDocRanges.State = 0 - .optSelRange.State = 0 - End With -End Sub - - - -Sub SetStatusLineText(sStsREPROTECT as String) - If Not IsNull(oStatusLine) Then - oStatusline.SetText(sStsREPROTECT) - End If -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/euro/DlgConvert.xdl b/wizards/source/euro/DlgConvert.xdl deleted file mode 100644 index 18f3caef0..000000000 --- a/wizards/source/euro/DlgConvert.xdl +++ /dev/null @@ -1,77 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DialogConvert" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_DIALOG" dlg:closeable="true" dlg:moveable="true"> - <dlg:bulletinboard> - <dlg:text dlg:id="lblCurrencies" dlg:tab-index="1" dlg:left="170" dlg:top="39" dlg:width="89" dlg:height="8" dlg:value="lblCurrencies"/> - <dlg:checkbox dlg:id="chkComplete" dlg:tab-index="0" dlg:left="12" dlg:top="43" dlg:width="129" dlg:height="10" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_CHECKBOX1" dlg:value="chkComplete" dlg:checked="true"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Euro.ConvertRun.RetrieveEnableValue?language=Basic&location=application" script:language="Script"/> - </dlg:checkbox> - <dlg:menulist dlg:id="lstCurrencies" dlg:tab-index="2" dlg:left="170" dlg:top="51" dlg:width="90" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_COMBOBOX1" dlg:spin="true" dlg:linecount="12"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Euro.Common.SelectCurrency?language=Basic&location=application" script:language="Script"/> - </dlg:menulist> - <dlg:radiogroup> - <dlg:radio dlg:id="optCellTemplates" dlg:tab-index="3" dlg:left="12" dlg:top="96" dlg:width="129" dlg:height="10" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON1" dlg:value="optCellTemplates"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.Soft.CreateStyleEnumeration?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - <dlg:radio dlg:id="optSheetRanges" dlg:tab-index="4" dlg:left="12" dlg:top="110" dlg:width="130" dlg:height="10" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON2" dlg:value="optSheetRanges"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.Hard.CreateRangeList?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - <dlg:radio dlg:id="optDocRanges" dlg:tab-index="5" dlg:left="12" dlg:top="124" dlg:width="130" dlg:height="10" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON3" dlg:value="optDocRanges"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.Hard.CreateRangeList?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - <dlg:radio dlg:id="optSelRange" dlg:tab-index="6" dlg:left="12" dlg:top="138" dlg:width="130" dlg:height="10" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_OPTIONBUTTON4" dlg:value="optSelRange"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.ConvertRun.CheckRangeSelection?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - </dlg:radiogroup> - <dlg:text dlg:id="lblSelection" dlg:tab-index="7" dlg:left="170" dlg:top="84" dlg:width="73" dlg:height="8" dlg:page="1" dlg:value="lblSelection"/> - <dlg:menulist dlg:id="lstSelection" dlg:tab-index="8" dlg:left="170" dlg:top="96" dlg:width="90" dlg:height="52" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_LISTBOX1" dlg:multiselection="true"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Euro.ConvertRun.SelectListItem?language=Basic&location=application" script:language="Script"/> - </dlg:menulist> - <dlg:radiogroup> - <dlg:radio dlg:id="optSingleFile" dlg:tab-index="9" dlg:left="12" dlg:top="51" dlg:width="146" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_OBFILE" dlg:value="optSingleFile"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.AutoPilotRun.SwapExtent?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - <dlg:radio dlg:id="optWholeDir" dlg:tab-index="10" dlg:left="12" dlg:top="65" dlg:width="146" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_OBDIR" dlg:value="optWholeDir" dlg:checked="true"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.AutoPilotRun.SwapExtent?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - </dlg:radiogroup> - <dlg:textfield dlg:id="txtConfig" dlg:tab-index="11" dlg:left="6" dlg:top="50" dlg:width="258" dlg:height="55" dlg:page="3" dlg:vscroll="true" dlg:multiline="true" dlg:readonly="true"/> - <dlg:textfield dlg:id="txtSource" dlg:tab-index="12" dlg:left="80" dlg:top="82" dlg:width="165" dlg:height="12" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_TBSOURCE"> - <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Euro.AutoPilotRun.ToggleGoOnButton?language=Basic&location=application" script:language="Script"/> - </dlg:textfield> - <dlg:button dlg:id="cmdCallSourceDialog" dlg:tab-index="13" dlg:left="249" dlg:top="81" dlg:width="15" dlg:height="14" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_CBSOURCEOPEN" dlg:value="..."> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.AutoPilotRun.CallFilePicker?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:checkbox dlg:id="chkRecursive" dlg:tab-index="14" dlg:left="12" dlg:top="98" dlg:width="252" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_CHECKRECURSIVE" dlg:value="chkRecursive" dlg:checked="false"/> - <dlg:checkbox dlg:id="chkTextDocuments" dlg:tab-index="15" dlg:left="12" dlg:top="112" dlg:width="251" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_CHKTEXTDOCUMENTS" dlg:value="chkTextDocuments" dlg:checked="false"/> - <dlg:checkbox dlg:id="chkProtect" dlg:tab-index="16" dlg:left="12" dlg:top="126" dlg:width="251" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_CHKPROTECT" dlg:value="chkProtect" dlg:checked="false"/> - <dlg:textfield dlg:id="txtTarget" dlg:tab-index="17" dlg:left="80" dlg:top="143" dlg:width="165" dlg:height="12" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_TBTARGET"/> - <dlg:button dlg:id="cmdCallTargetDialog" dlg:tab-index="18" dlg:left="249" dlg:top="142" dlg:width="15" dlg:height="14" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_CBTARGETOPEN" dlg:value="..."> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.AutoPilotRun.CallFolderPicker?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:progressmeter dlg:id="ProgressBar" dlg:tab-index="19" dlg:left="85" dlg:top="152" dlg:width="179" dlg:height="10" dlg:page="3"/> - <dlg:text dlg:id="lblHint" dlg:tab-index="20" dlg:left="6" dlg:top="166" dlg:width="258" dlg:height="20" dlg:value="lblHint" dlg:multiline="true"/> - <dlg:text dlg:id="lblTarget" dlg:tab-index="21" dlg:left="6" dlg:top="145" dlg:width="73" dlg:height="8" dlg:page="2" dlg:value="lblTarget"/> - <dlg:text dlg:id="lblSource" dlg:tab-index="22" dlg:left="6" dlg:top="84" dlg:width="73" dlg:height="8" dlg:page="2" dlg:value="lblSource"/> - <dlg:text dlg:id="lblCurProgress" dlg:tab-index="23" dlg:left="16" dlg:top="130" dlg:width="208" dlg:height="8" dlg:page="3"/> - <dlg:text dlg:id="lblRetrieval" dlg:tab-index="24" dlg:left="9" dlg:top="119" dlg:width="216" dlg:height="8" dlg:page="3" dlg:value="lblRetrieval"/> - <dlg:text dlg:id="lblConfig" dlg:tab-index="25" dlg:left="6" dlg:top="39" dlg:width="94" dlg:height="8" dlg:page="3" dlg:value="lblConfig"/> - <dlg:text dlg:id="lblCurDocument" dlg:tab-index="26" dlg:left="16" dlg:top="141" dlg:width="208" dlg:height="8" dlg:page="3"/> - <dlg:img dlg:id="imgPreview" dlg:tab-index="27" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="26" dlg:src="file:///D:/office630np/share/template/german/wizard/bitmap/euro_2.bmp"/> - <dlg:fixedline dlg:id="hlnSelection" dlg:tab-index="28" dlg:left="7" dlg:top="72" dlg:width="258" dlg:height="8" dlg:page="1" dlg:value="hlnSelection"/> - <dlg:fixedline dlg:id="hlnExtent" dlg:tab-index="29" dlg:left="6" dlg:top="39" dlg:width="156" dlg:height="8" dlg:page="2" dlg:value="hlnExtent"/> - <dlg:fixedline dlg:id="hlnProgress" dlg:tab-index="30" dlg:left="6" dlg:top="108" dlg:width="258" dlg:height="8" dlg:page="3" dlg:value="hlnProgress"/> - <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="31" dlg:left="6" dlg:top="152" dlg:width="258" dlg:height="9" dlg:page="1"/> - <dlg:text dlg:id="lblProgress" dlg:tab-index="32" dlg:left="6" dlg:top="153" dlg:width="79" dlg:height="8" dlg:page="3" dlg:value="lblProgress"/> - <dlg:button dlg:id="cmdCancel" dlg:tab-index="33" dlg:left="6" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_CBCANCEL" dlg:value="cmdCancel"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.Common.CancelTask?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdHelp" dlg:tab-index="34" dlg:left="63" dlg:top="190" dlg:width="53" dlg:height="14" dlg:value="cmdHelp" dlg:button-type="help"/> - <dlg:button dlg:id="cmdBack" dlg:tab-index="35" dlg:left="155" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_CBBACK" dlg:value="cmdBack"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.AutoPilotRun.PreviousStep?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdGoOn" dlg:tab-index="36" dlg:left="211" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGCONVERT_CBGOON" dlg:value="cmdGoOn"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.Common.StartConversion?language=Basic&location=application" script:language="Script"/> - </dlg:button> - </dlg:bulletinboard> -</dlg:window>
\ No newline at end of file diff --git a/wizards/source/euro/DlgPassword.xdl b/wizards/source/euro/DlgPassword.xdl deleted file mode 100644 index 976891a48..000000000 --- a/wizards/source/euro/DlgPassword.xdl +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DlgPassword" dlg:left="77" dlg:top="93" dlg:width="310" dlg:height="65" dlg:closeable="true" dlg:moveable="true" dlg:title="DlgPassword"> - <dlg:bulletinboard> - <dlg:button dlg:id="cmdGoOn" dlg:tab-index="0" dlg:left="251" dlg:top="6" dlg:width="53" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGPASSWORD_CMDGOON" dlg:value="cmdGoOn"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.Protect.ReadPassword?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdCancel" dlg:tab-index="1" dlg:left="251" dlg:top="24" dlg:width="53" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGPASSWORD_CMDCANCEL" dlg:value="cmdCancel"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Euro.Protect.RejectPassword?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdHelp" dlg:tab-index="2" dlg:left="251" dlg:top="45" dlg:width="53" dlg:height="14" dlg:tag="34692" dlg:value="cmdHelp" dlg:button-type="help"/> - <dlg:textfield dlg:id="txtPassword" dlg:tab-index="3" dlg:left="11" dlg:top="18" dlg:width="232" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGPASSWORD_TXTPASSWORD" dlg:echochar="*"/> - <dlg:fixedline dlg:id="hlnPassword" dlg:tab-index="4" dlg:left="6" dlg:top="6" dlg:width="238" dlg:height="8" dlg:value="hlnPassword"/> - </dlg:bulletinboard> -</dlg:window>
\ No newline at end of file diff --git a/wizards/source/euro/Hard.xba b/wizards/source/euro/Hard.xba deleted file mode 100644 index c500946bd..000000000 --- a/wizards/source/euro/Hard.xba +++ /dev/null @@ -1,229 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Hard" script:language="StarBasic">REM ***** BASIC ***** -Option Explicit - - -Sub CreateRangeList() -Dim MaxIndex as Integer - MaxIndex = -1 - EnableStep1DialogControls(False, False, False) - EmptySelection() - DialogModel.lblSelection.Label = sCURRRANGES - EmptyListbox(DialogModel.lstSelection) - oDocument.CurrentController.Select(oSelRanges) - If (DialogModel.optSheetRanges.State = 1) AND (DialogModel.chkComplete.State <> 1) Then - ' Conversion on a sheet? - SetStatusLineText(sStsRELRANGES) - osheet = oDocument.CurrentController.GetActiveSheet - oRanges = osheet.CellFormatRanges.createEnumeration() - MaxIndex = AddSheetRanges(oRanges, MaxIndex, oSheet, False) - If MaxIndex > -1 Then - ReDim Preserve RangeList(MaxIndex) - End If - Else - CreateRangeEnumeration(False) - bRangeListDefined = True - End If - EnableStep1DialogControls(True, True, True) - SetStatusLineText("") -End Sub - - -Sub CreateRangeEnumeration(bAutopilot as Boolean) -Dim i as Integer -Dim MaxIndex as integer -Dim sStatustext as String - MaxIndex = -1 - If Not bRangeListDefined Then - ' Cellranges are not yet defined - oSheets = oDocument.Sheets - For i = 0 To oSheets.Count-1 - oSheet = oSheets.GetbyIndex(i) - If bAutopilot Then - IncreaseStatusValue(SBRELGET/osheets.Count) - Else - sStatustext = ReplaceString(sStsRELSHEETRANGES,Str(i+1),"%1Number%1") - sStatustext = ReplaceString(sStatusText,oSheets.Count,"%2TotPageCount%2") - SetStatusLineText(sStatusText) - End If - oRanges = osheet.CellFormatRanges.createEnumeration - MaxIndex = AddSheetRanges(oRanges, MaxIndex, oSheet, bAutopilot) - Next i - Else - If Not bAutoPilot Then - SetStatusLineText(sStsRELRANGES) - ' cellranges already defined - For i = 0 To Ubound(RangeList()) - If RangeList(i) <> "" Then - AddSingleItemToListBox(DialogModel.lstSelection, RangeList(i)) - End If - Next - End If - End If - If MaxIndex > -1 Then - ReDim Preserve RangeList(MaxIndex) - Else - ReDim RangeList() - End If - Rangeindex = MaxIndex -End Sub - - -Function AddSheetRanges(oRanges as Object, r as Integer, oSheet as Object, bAutopilot) -Dim RangeName as String -Dim AddtoList as Boolean -Dim iCurStep as Integer -Dim MaxIndex as Integer - iCurStep = DialogModel.Step - While oRanges.hasMoreElements - oRange = oRanges.NextElement - AddToList = CheckFormatType(oRange) - If AddToList Then - RangeName = RetrieveRangeNamefromAddress(oRange) - TotCellCount = TotCellCount + CountRangeCells(oRange) - If Not bAutoPilot Then - AddSingleItemToListbox(DialogModel.lstSelection, RangeName) - End If - ' The Ranges are only passed to an Array when the whole Document is the basis - ' Redimension the RangeList Array if necessary - MaxIndex = Ubound(RangeList()) - r = r + 1 - If r > MaxIndex Then - MaxIndex = MaxIndex + SBRANGEUBOUND - ReDim Preserve RangeList(MaxIndex) - End If - RangeList(r) = RangeName - End If - Wend - AddSheetRanges = r -End Function - - -' adds a section to the collection -Sub SelectRange() -Dim i as Integer -Dim RangeName as String -Dim SelItem as String -Dim CurRange as String -Dim SheetRangeName as String -Dim DescriptionList() as String -Dim MaxRangeIndex as Integer -Dim StatusValue as Integer - StatusValue = 0 - MaxRangeIndex = Ubound(SelRangeList()) - CurSheetName = oSheet.Name - For i = 0 To MaxRangeIndex - SelItem = SelRangeList(i) - ' Is the Range already included in the collection? - oRange = RetrieveRangeoutOfRangename(SelItem) - TotCellCount = TotCellCount + CountRangeCells(oRange) - DescriptionList() = ArrayOutofString(SelItem,".",1) - SheetRangeName = DeleteStr(DescriptionList(0),"'") - If SheetRangeName = CurSheetName Then - oSelRanges.InsertbyName("",oRange) - End If - IncreaseStatusValue(SBRELGET/MaxRangeIndex) - Next i -End Sub - - -Sub ConvertThehardWay(ListboxList(), SwitchFormat as Boolean, bRemove as Boolean) -Dim i as Integer -Dim AddCells as Long -Dim OldStatusValue as Single -Dim RangeName as String -Dim LastIndex as Integer -Dim oSelListbox as Object - - oSelListbox = DialogConvert.GetControl("lstSelection") - Lastindex = Ubound(ListboxList()) - If TotCellCount > 0 Then - OldStatusValue = StatusValue - ' hard format - For i = 0 To LastIndex - RangeName = ListboxList(i) - oRange = RetrieveRangeoutofRangeName(RangeName) - ConvertCellCurrencies(oRange) - If bRemove Then - If oSelRanges.HasbyName(RangeName) Then - oSelRanges.RemovebyName(RangeName) - oDocument.CurrentController.Select(oSelRanges) - End If - End If - If SwitchFormat Then - If oRange.getPropertyState("NumberFormat") <> 1 Then - ' Range is hard formatted - SwitchNumberFormat(oRange, oFormats, sEuroSign) - End If - Else - SwitchNumberFormat(oRange, oFormats, sEuroSign) - End If - AddCells = CountRangeCells(oRange) - CurCellCount = AddCells - IncreaseStatusValue((CurCellCount/TotCellCount)*(100-OldStatusValue)) - If bRemove Then - RemoveListBoxItemByName(oSelListbox.Model,Rangename) - End If - Next - End If -End Sub - - -Sub ConvertCellCurrencies(oRange as Object) -Dim oValues as Object -Dim oCells as Object -Dim oCell as Object - oValues = oRange.queryContentCells(com.sun.star.sheet.CellFlags.VALUE) - If (oValues.Count > 0) Then - oCells = oValues.Cells.createEnumeration - While oCells.hasMoreElements - oCell = oCells.nextElement - ModifyObjectValuewithCurrFactor(oCell) - Wend - End If -End Sub - - -Sub ModifyObjectValuewithCurrFactor(oDocObject as Object) -Dim oDocObjectValue as double - oDocObjectValue = oDocObject.Value - oDocObject.Value = Round(oDocObjectValue/CurrFactor, 2) -End Sub - - -Function CheckIfRangeisCurrency(FormatObject as Object) -Dim oFormatofObject() as Object - ' Retrieve the Format of the Object - On Local Error GoTo NOKEY - oFormatofObject() = oFormats.getByKey(FormatObject.NumberFormat) - On Local Error GoTo 0 - CheckIfRangeIsCurrency = INT(oFormatofObject.Type) AND com.sun.star.util.NumberFormat.CURRENCY - Exit Function -NOKEY: - CheckIfRangeisCurrency = False - Resume CLERROR - CLERROR: -End Function - - -Function CountColumnsForRow(IndexArray() as String, Row as Integer) -Dim i as Integer -Dim NoNulls as Boolean - For i = 1 To Ubound(IndexArray,2) - If IndexArray(Row,i)= "" Then - NoNulls = False - Exit For - End If - Next - CountColumnsForRow = i -End Function - - -Function CountRangeCells(oRange as Object) As Long -Dim oRangeAddress as Object -Dim LocCellCount as Long - oRangeAddress = oRange.RangeAddress - LocCellCount = (oRangeAddress.EndColumn - oRangeAddress.StartColumn + 1) * (oRangeAddress.EndRow - oRangeAddress.StartRow + 1) - CountRangeCells = LocCellCount -End Function</script:module>
\ No newline at end of file diff --git a/wizards/source/euro/Init.xba b/wizards/source/euro/Init.xba deleted file mode 100644 index 2de1252c7..000000000 --- a/wizards/source/euro/Init.xba +++ /dev/null @@ -1,604 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Init" script:language="StarBasic">Option Explicit -REM ***** BASIC ***** - - - -Public Const SBRANGEUBOUND = 20 -Public StyleRangeAssignmentList(SBRANGEUBOUND)as String -Public SelRangeList(SBRANGEUBOUND) as String -Public RangeList(SBRANGEUBOUND) as String -Public UnprotectList() as String -Public FilterNames(2,1) as String -Public bDoUnProtect as Boolean -Public bCancelTask as Boolean - -Public sREADY as String -Public sPROTECT as String -Public sCONTINUE as String - -Public sSELTEMPL as String -Public sSELCELL as String -Public sCURRRANGES as String -Public sTEMPLATES as String - -Public sSOURCEFILE as String -Public sSOURCEDIR as String -Public sTARGETDIR as String - -Public sStsPROGRESS as String -Public sStsCELLPROGRSS as String -Public sStsRELRANGES as String -Public sStsRELSHEETRANGES as String -Public sStsREPROTECT as String - -Public sMsgSELDIR as String -Public sMsgSELFILE as String -Public sMsgTARGETDIR as String -Public sMsgNOTTHERE as String -Public sMsgDLGTITLE as String -Public sMsgUNPROTECT as String -Public sMsgPWPROTECT as String -Public sMsgWRONGPW as String -Public sMsgSHEETPROTECTED as String -Public sMsgWARNING as String -Public sMsgSHEETSNOPROTECT as String -Public sMsgSHEETNOPROTECT as String -Public sMsgCHOOSECURRENCY as String -Public sMsgPASSWORD as String -Public sMsgOK as String -Public sMsgCANCEL as String -Public sMsgFileInvalid as String -Public sMsgNODIRECTORY as String -Public sMsgDOCISREADONLY as String -Public sMsgFileExists as String -Public sMsgCancelConversion as String -Public sMsgCancelTitle as String -Public sCurrPORTUGUESE as String -Public sCurrDUTCH as String -Public sCurrFRENCH as String -Public sCurrSPANISH as String -Public sCurrITALIAN as String -Public sCurrGERMAN as String -Public sCurrBELGIAN as String -Public sCurrIRISH as String -Public sCurrLUXEMBOURG as String -Public sCurrAUSTRIAN as String -Public sCurrFINNISH as String -Public sCurrGREEK as String -Public sCurrSLOVENIAN as String -Public sCurrCYPRIOT as String -Public sCurrMALTESE as String -Public sCurrSLOVAK as String -Public sCurrUNKNOWN as String -Public sCurrSYSUNKNOWN as String - -Public sPrgsRETRIEVAL as String -Public sPrgsCONVERTING as String -Public sPrgsUNPROTECT as String -Public sInclusiveSubDir as String - -Public Const SBCOUNTRYCOUNT = 15 -Public CurMimeType as String -Public CurCellCount as Long -Public oSheets as Object -Public oStyles as Object -Public oStyle as Object -Public oFormats as Object -Public aSimpleStr as String -Public nSimpleKey as Long -Public aFormat() as Variant -Public oRanges as Object -Public oRange as Object -Public nLanguage as integer -Public nFormatLanguage as integer -Public aCellFormat as Variant -Public oDocument as Object -Public StartCol, StartRow, EndCol, EndRow as String -Public oSheet as Object -Public IntStartCol, IntStartRow, IntEndCol, IntEndRow as integer -Public oSelRanges as Object -Public nFormatType as Integer -Public sFormatCurrency as String -Public sFormatLanguage as String -Public CurSheetName as String -Public oStatusLine as Object -Public Const SBRELGET = 50 -Public StatusValue as Single -Public TotCellCount as Long -Public StyleIndex as Integer -Public RangeIndex as Integer -Public CurrIndex as Integer -Public ActLangNumber(1) as Integer -Public CurExtension(2) as String -Public Currfactor as Double -Public CurrSymbolList(2) as String -Public CurrLanguage as String -Public CurrValue(15,5) -Public LangIDValue(15,2,2) as String -Public PreName as String -Public Separator as String -Public BitmapDir as String -Public TypeIndex as Integer, CSIndex as Integer, LangIndex as Integer, FSIndex as Integer -Public oLocale as New com.sun.star.lang.Locale -Public sEuroSign as String -Public oPointer as Object -Public sDocType as String -Public bPreSelected as Boolean -Public bRecursive as Boolean -Public bCancelProtection as Boolean -Public CurrRoundMode as Boolean -Public bRangeListDefined as Boolean -Public bDocHasProtectedSheets as Boolean -Public sGOON as String -Public sHELP as String -Public sCANCEL as String -Dim sEnd as String - -Sub InitializeResources() -Dim LocWorkPath as String - With DialogModel - ' Strings that are also needed by the Password Dialog - sGoOn = GetResText(1003) - sHelp = GetResText(1001) - sCANCEL = GetResText(1418) - sEnd = GetResText(1000) - sPROTECT = GetResText(1005) - sCONTINUE = GetResText(1007) - sSELTEMPL = GetResText(1106) - sSELCELL = GetResText(1107) - sCURRRANGES = GetResText(1108) - sTEMPLATES = GetResText(1109) - sStsPROGRESS = GetResText(1300) - sStsCELLPROGRSS = GetResText(1301) - sStsRELSHEETRANGES = GetResText(1302) - sStsRELRANGES = GetResText(1303) - sStsREPROTECT = GetResText(1304) - sREADY = GetResText(1400) - sMsgSELDIR = GetResText(1401) - sMsgSELFILE = GetResText(1402) - sMsgTARGETDIR = GetResText(1403) - sMsgNOTTHERE = GetResText(1404) - sMsgDLGTITLE = GetResText(1405) - sMsgUNPROTECT = GetResText(1406) - sMsgPWPROTECT = GetResText(1407) - sMsgWRONGPW = GetResText(1408) - sMsgSHEETPROTECTED = GetResText(1409) - sMsgWARNING = GetResText(1410) - sMsgSHEETSNOPROTECT = GetResText(1411) - sMsgSHEETNOPROTECT = GetResText(1412) - sMsgCHOOSECURRENCY = GetResText(1415) - sMsgPASSWORD = GetResText(1416) - sMsgOK = GetResText(1417) - sMsgCANCEL = GetResText(1418) - sMsgFILEINVALID = GetResText(1419) - sMsgFILEINVALID = ReplaceString(sMsgFILEINVALID,"%PRODUCTNAME", GetProductname()) - SMsgNODIRECTORY = GetResText(1420) - sMsgDOCISREADONLY = GetResText(1421) - sMsgFileExists = GetResText(1422) - sMsgCancelConversion = GetResText(1423) - sMsgCancelTitle = GetResText(1424) - sCurrPORTUGUESE = GetResText(1500) - sCurrDUTCH = GetResText(1501) - sCurrFRENCH = GetResText(1502) - sCurrSPANISH = GetResText(1503) - sCurrITALIAN = GetResText(1504) - sCurrGERMAN = GetResText(1505) - sCurrBELGIAN = GetResText(1506) - sCurrIRISH = GetResText(1507) - sCurrLUXEMBOURG = GetResText(1508) - sCurrAUSTRIAN = GetResText(1509) - sCurrFINNISH = GetResText(1510) - sCurrGREEK = GetResText(1511) - sCurrSLOVENIAN = GetResText(1512) - sCurrCYPRIOT = GetResText(1513) - sCurrMALTESE = GetResText(1514) - sCurrSLOVAK = GetResText(1515) - sCurrUNKNOWN = GetResText(1516) - sCurrSYSUNKNOWN = GetResText(1517) - .cmdCancel.Label = sCANCEL - .cmdHelp.Label = sHELP - .cmdBack.Label = GetResText(1002) - .cmdGoOn.Label = sGOON - .lblHint.Label = GetResText(1004) - .lblCurrencies.Label = GetResText(1006) - .cmdBack.Enabled = False - If .Step = 1 Then - .chkComplete.Label = GetResText(1100) - .hlnSelection.Label = GetResText(1101) - .optCellTemplates.Label = GetResText(1102) - .optSheetRanges.Label = GetResText(1103) - .optDocRanges.Label = GetResText(1104) - .optSelRange.Label = GetResText(1105) - sCURRRANGES = GetResText(1108) - .lblSelection.Label = sCURRRANGES - Else - .lblProgress.Label = sStsPROGRESS - .hlnExtent.Label = GetResText(1200) - .optSingleFile.Label = GetResText(1201) - .optWholeDir.Label = GetResText(1202) - .chkProtect.Label = GetResText(1207) - .chkTextDocuments.Label = GetResText(1210) - - sSOURCEFILE = GetResText(1203) - sSOURCEDIR = GetResText(1204) - .lblSource.Label = sSOURCEDIR - sInclusiveSubDir = GetResText(1205) - .chkRecursive.Label = sInclusiveSubDir - sTARGETDIR = GetResText(1206) - .lblTarget.Label = STARGETDIR - - LocWorkPath = GetPathSettings("Work") - If Not oUcb.Exists(LocWorkPath) Then - ShowNoOfficePathError() - Stop - End If - - .txtSource.Text = ConvertfromUrl(LocWorkPath) - - SubstDir = .txtSource.Text - .txtTarget.Text = .txtSource.Text - .hlnProgress.Label = GetResText(1600) - .lblConfig.Label = GetResText(1603) - sPrgsRETRIEVAL = GetResText(1601) - sPrgsCONVERTING = GetResText(1602) - sPrgsUNPROTECT = GetResText(1604) - End If - End With -End Sub - -Sub InitializeLanguages() - sEuroSign = chr(8364) - -' CURRENCIES_PORTUGUESE - LangIDValue(0,0,0) = "pt" - LangIDValue(0,0,1) = "" - LangIDValue(0,0,2) = "-816" - -' CURRENCIES_DUTCH - LangIDValue(1,0,0) = "nl" - LangIDValue(1,0,1) = "" - LangIDValue(1,0,2) = "-413" - -' CURRENCIES_FRENCH - LangIDValue(2,0,0) = "fr" - LangIDValue(2,0,1) = "" - LangIDValue(2,0,2) = "-40C" - -' CURRENCIES_SPANISH - LangIDValue(3,0,0) = "es" - LangIDValue(3,0,1) = "" - LangIDValue(3,0,2) = "-40A" - - 'Spanish modern - LangIDValue(3,1,0) = "es" - LangIDValue(3,1,1) = "" - LangIDValue(3,1,2) = "-C0A" - - 'Spanish katalanic - LangIDValue(3,2,0) = "es" - LangIDValue(3,2,1) = "" - LangIDValue(3,2,2) = "-403" - -' CURRENCIES_ITALIAN - LangIDValue(4,0,0) = "it" - LangIDValue(4,0,1) = "" - LangIDValue(4,0,2) = "-410" - -' CURRENCIES_GERMAN - LangIDValue(5,0,0) = "de" - LangIDValue(5,0,1) = "DE" - LangIDValue(5,0,2) = "-407" - -' CURRENCIES_BELGIAN - LangIDValue(6,0,0) = "fr" - LangIDValue(6,0,1) = "BE" - LangIDValue(6,0,2) = "-80C" - - LangIDValue(6,1,0) = "nl" - LangIDValue(6,1,1) = "BE" - LangIDValue(6,1,2) = "-813" - -' CURRENCIES_IRISH - LangIDValue(7,0,0) = "en" - LangIDValue(7,0,1) = "IE" - LangIDValue(7,0,2) = "-1809" - - LangIDValue(7,1,0) = "ga" - LangIDValue(7,1,1) = "IE" - LangIDValue(7,1,2) = "-83C" - -' CURRENCIES_LUXEMBOURG - LangIDValue(8,0,0) = "fr" - LangIDValue(8,0,1) = "LU" - LangIDValue(8,0,2) = "-140C" - - LangIDValue(8,1,0) = "de" - LangIDValue(8,1,1) = "LU" - LangIDValue(8,1,2) = "-1007" - -' CURRENCIES_AUSTRIAN - LangIDValue(9,0,0) = "de" - LangIDValue(9,0,1) = "AT" - LangIDValue(9,0,2) = "-C07" - -' CURRENCIES_FINNISH - LangIDValue(10,0,0) = "fi" - LangIDValue(10,0,1) = "FI" - LangIDValue(10,0,2) = "-40B" - - LangIDValue(10,1,0) = "sv" - LangIDValue(10,1,1) = "FI" - LangIDValue(10,1,2) = "-81D" - -' CURRENCIES_GREEK - LangIDValue(11,0,0) = "el" - LangIDValue(11,0,1) = "GR" - LangIDValue(11,0,2) = "-408" - -' CURRENCIES_SLOVENIAN - LangIDValue(12,0,0) = "sl" - LangIDValue(12,0,1) = "SI" - LangIDValue(12,0,2) = "-424" - -' CURRENCIES_CYPRIOT - LangIDValue(13,0,0) = "el" - LangIDValue(13,0,1) = "CY" - LangIDValue(13,0,2) = "-408" - -' CURRENCIES_MALTESE - LangIDValue(14,0,0) = "mt" - LangIDValue(14,0,1) = "MT" - LangIDValue(14,0,2) = "-43A" - -' CURRENCIES_SLOVAK - LangIDValue(15,0,0) = "sk" - LangIDValue(15,0,1) = "SK" - LangIDValue(15,0,2) = "-41B" - -End Sub - - - -Sub InitializeCurrencies() -Dim i as Integer - GoOn = True - - CurrValue(0,0) = sCurrPORTUGUESE - ' real conversion rate - CurrValue(0,1) = 200.482 - ' rounded conversion rate - CurrValue(0,2) = 200 - CurrValue(0,3) = "Esc." - CurrValue(0,4) = "Esc." - CurrValue(0,5) = "PTE" - - CurrValue(1,0) = sCurrDUTCH - ' real conversion rate - CurrValue(1,1) = 2.20371 - ' rounded conversion rate - CurrValue(1,2) = 2 - CurrValue(1,3) = "F" - CurrValue(1,4) = "fl" - CurrValue(1,5) = "NLG" - - CurrValue(2,0) = sCurrFRENCH - ' real conversion rate - CurrValue(2,1) = 6.55957 - ' rounded conversion rate - CurrValue(2,2) = 7 - CurrValue(2,3) = "F" - CurrValue(2,4) = "F" - CurrValue(2,5) = "FRF" - - CurrValue(3,0) = sCurrSPANISH - ' real conversion rate - CurrValue(3,1) = 166.386 - ' rounded conversion rate - CurrValue(3,2) = 170 - CurrValue(3,3) = "Pts" - CurrValue(3,4) = "Pts" - CurrValue(3,5) = "ESP" - - CurrValue(4,0) = sCurrITALIAN - ' real conversion rate - CurrValue(4,1) = 1936.27 - ' rounded conversion rate - CurrValue(4,2) = 2000 - CurrValue(4,3) = "L." - CurrValue(4,4) = "L." - CurrValue(4,5) = "ITL" - - CurrValue(5,0) = sCurrGERMAN - ' real conversion rate - CurrValue(5,1) = 1.95583 - ' rounded conversion rate - CurrValue(5,2) = 2 - CurrValue(5,3) = "DM" - CurrValue(5,4) = "DM" - CurrValue(5,5) = "DEM" - - CurrValue(6,0) = sCurrBELGIAN - ' real conversion rate - CurrValue(6,1) = 40.3399 - ' rounded conversion rate - CurrValue(6,2) = 40 - CurrValue(6,3) = "FB" - CurrValue(6,4) = "BF" - CurrValue(6,5) = "BEF" - - CurrValue(7,0) = sCurrIRISH - ' real conversion rate - CurrValue(7,1) = 0.787564 - ' rounded conversion rate - CurrValue(7,2) = 0.8 - CurrValue(7,3) = "IR£" - CurrValue(7,4) = "£" - CurrValue(7,5) = "IEP" - - CurrValue(8,0) = sCurrLUXEMBOURG - ' real conversion rate - CurrValue(8,1) = 40.3399 - ' rounded conversion rate - CurrValue(8,2) = 40 - CurrValue(8,3) = "F" - CurrValue(8,4) = "F" - CurrValue(8,5) = "LUF" - - CurrValue(9,0) = sCurrAUSTRIAN - ' real conversion rate - CurrValue(9,1) = 13.7603 - ' rounded conversion rate - CurrValue(9,2) = 15 - CurrValue(9,3) = "öS" - CurrValue(9,4) = "S" - CurrValue(9,5) = "ATS" - - CurrValue(10,0) = sCurrFINNISH - ' real conversion rate - CurrValue(10,1) = 5.94573 - ' rounded conversion rate - CurrValue(10,2) = 6 - CurrValue(10,3) = "mk" - CurrValue(10,4) = "mk" - CurrValue(10,5) = "FIM" - - CurrValue(11,0) = sCurrGREEK - ' real conversion rate - CurrValue(11,1) = 340.750 - ' rounded conversion rate - CurrValue(11,2) = 400 - CurrValue(11,3) = chr(916) & chr(961) & chr(967) - CurrValue(11,4) = chr(916) & chr(961) & chr(967) - CurrValue(11,5) = "GRD" - - CurrValue(12,0) = sCurrSLOVENIAN - ' real conversion rate - CurrValue(12,1) = 239.64 - ' rounded conversion rate - CurrValue(12,2) = 240 - CurrValue(12,3) = "SIT" - CurrValue(12,4) = "SIT" - CurrValue(12,5) = "SIT" - - CurrValue(13,0) = sCurrCYPRIOT - ' real conversion rate - CurrValue(13,1) = 0.585274 - ' rounded conversion rate - CurrValue(13,2) = 0.6 - CurrValue(13,3) = "£C" - CurrValue(13,4) = "£" - CurrValue(13,5) = "CYP" - - CurrValue(14,0) = sCurrMALTESE - ' real conversion rate - CurrValue(14,1) = 0.429300 - ' rounded conversion rate - CurrValue(14,2) = 0.4 - CurrValue(14,3) = chr(8356) - CurrValue(14,4) = "Lm" - CurrValue(14,5) = "MTL" - - CurrValue(15,0) = sCurrSLOVAK - ' real conversion rate - CurrValue(15,1) = 30.1260 - ' rounded conversion rate - CurrValue(15,2) = 30 - CurrValue(15,3) = "Sk" - CurrValue(15,4) = "Sk" - CurrValue(15,5) = "SKK" - - i = -1 - CurrSymbolList(0) = "" - CurrSymbolList(1) = "" - InitializeCurrencyValues(CurrIndex) -End Sub - - -Sub InitializeControls() - If CurrIndex = -1 Then - If DialogModel.Step = 1 Then - EnableStep1DialogControls(True, False, False) - ElseIf DialogModel.Step = 2 Then - EnableStep2DialogControls(True) - End If - End If -End Sub - - -Sub InitializeConverter(oLocale, iDialogPage as Integer) -Dim Isthere as Boolean - bCancelProtection = False - bRangeListDefined = False - PWIndex = -1 - If iDialogPage = 1 Then - ToggleWindow(False) - sDocType = Tools.GetDocumentType(ThisComponent) - If sDocType = "sCalc" Then - bDocHasProtectedSheets = CheckSheetProtection(oSheets) - End If - oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator() - End If - DialogConvert = LoadDialog("Euro", "DlgConvert") - DialogModel = DialogConvert.Model - DialogPassword = LoadDialog("Euro", "DlgPassword") - PasswordModel = DialogPassword.Model - DialogModel.Step = iDialogPage - InitializeResources() - InitializeLanguages() - InitializeLocales(oLocale) - InitializeCurrencies() - InitializeControls() - BitmapDir = GetOfficeSubPath("Template", "../wizard/bitmap") - If BitmapDir = "" Then - Stop - End If - FillUpCurrencyListbox() - DialogModel.imgPreview.ImageUrl = BitmapDir & "euro_" & DialogModel.Step & ".bmp" - DialogConvert.Title = sMsgDLGTITLE - DialogModel.cmdGoOn.DefaultButton = True - If iDialogPage = 1 Then - ToggleWindow(True) - End If -End Sub - - -Sub InitializeCurrencyValues(CurrIndex) - If CurrIndex <> -1 Then - CurrLanguage = CurrValue(CurrIndex,0) - CurrFactor = CurrValue(CurrIndex,1) - CurrSymbolList(0) = CurrValue(CurrIndex,3) - CurrSymbolList(1) = CurrValue(CurrIndex,4) - CurrSymbolList(2) = CurrValue(CurrIndex,5) - End If -End Sub - - -Function InitializeLocales(oLocale) as Boolean -Dim i as Integer, n as Integer, m as Integer -Dim sLanguage as String, sCountry as String -Dim bTakeThisLocale as Boolean - sLanguage = oLocale.Language - sCountry = oLocale.Country - For n = 0 To SBCOUNTRYCOUNT - 1 - For m = 0 TO 1 - If DialogModel.Step = 2 Then - bTakeThisLocale = LangIDValue(n,m,0) = sLanguage - Else - bTakeThisLocale = LangIDValue(n,m,0) = sLanguage - End If - If bTakeThisLocale Then - CurrIndex = n - For i = 0 To 2 - CurExtension(i) = LangIDValue(CurrIndex,i,2) - Next i - InitializeLocales = True - Exit Function - End If - Next m - Next n - CurrIndex = -1 - InitializeLocales = False -End Function -</script:module> diff --git a/wizards/source/euro/Protect.xba b/wizards/source/euro/Protect.xba deleted file mode 100644 index 8a852e9c3..000000000 --- a/wizards/source/euro/Protect.xba +++ /dev/null @@ -1,175 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Protect" script:language="StarBasic">REM ***** BASIC ***** -Option Explicit - -Public PWIndex as Integer - - -Function UnprotectSheetsWithPassWord(oSheets as Object, bDoUnProtect as Boolean) -Dim i as Integer -Dim MaxIndex as Integer -Dim iMsgResult as Integer - PWIndex = -1 - If bDocHasProtectedSheets Then - If Not bDoUnprotect Then - ' At First query if sheets shall generally be unprotected - iMsgResult = Msgbox(sMsgUNPROTECT,36,sMsgDLGTITLE) - bDoUnProtect = iMsgResult = 6 - End If - If bDoUnProtect Then - MaxIndex = oSheets.Count-1 - For i = 0 To MaxIndex - bDocHasProtectedSheets = Not UnprotectSheet(oSheets(i)) - If bDocHasProtectedSheets Then - ReprotectSheets() - Exit For - End If - Next i - If PWIndex = -1 Then - ReDim UnProtectList() as String - Else - ReDim Preserve UnProtectList(PWIndex) as String - End If - Else - Msgbox (sMsgSHEETSNOPROTECT, 64, sMsgDLGTITLE) - End If - End If - UnProtectSheetsWithPassword = bDocHasProtectedSheets -End Function - - -Function UnprotectSheet(oListSheet as Object) -Dim ListSheetName as String -Dim sStatustext as String -Dim i as Integer -Dim bOneSheetIsUnprotected as Boolean - i = -1 - ListSheetName = oListSheet.Name - If oListSheet.IsProtected Then - oListSheet.Unprotect("") - If oListSheet.IsProtected Then - ' Sheet is protected by a Password - bOneSheetIsUnProtected = UnprotectSheetWithDialog(oListSheet, ListSheetName) - UnProtectSheet() = bOneSheetIsUnProtected - Else - ' The Sheet could be unprotected without a password - AddSheettoUnprotectionlist(ListSheetName,"") - UnprotectSheet() = True - End If - Else - UnprotectSheet() = True - End If -End Function - - -Function UnprotectSheetWithDialog(oListSheet as Object, ListSheetName as String) as Boolean -Dim PWIsCorrect as Boolean -Dim QueryText as String - oDocument.CurrentController.SetActiveSheet(oListSheet) - QueryText = ReplaceString(sMsgPWPROTECT,"'" & ListSheetName & "'", "%1TableName%1") - '"Please insert the password to unprotect the sheet '" & ListSheetName'" - Do - ExecutePasswordDialog(QueryText) - If bCancelProtection Then - bCancelProtection = False - Msgbox (sMsgSHEETSNOPROTECT, 64, sMsgDLGTITLE) - UnprotectSheetWithDialog() = False - exit Function - End If - oListSheet.Unprotect(Password) - If oListSheet.IsProtected Then - PWIsCorrect = False - Msgbox (sMsgWRONGPW, 64, sMsgDLGTITLE) - Else - ' Sheet could be unprotected - AddSheettoUnprotectionlist(ListSheetName,Password) - PWIsCorrect = True - End If - Loop Until PWIsCorrect - UnprotectSheetWithDialog() = True -End Function - - -Sub ExecutePasswordDialog(QueryText as String) - With PasswordModel - .Title = QueryText - .hlnPassword.Label = sMsgPASSWORD - .cmdCancel.Label = sMsgCANCEL - .cmdHelp.Label = sHELP - .cmdGoOn.Label = sMsgOK - .cmdGoOn.DefaultButton = True - End With - DialogPassword.Execute -End Sub - -Sub ReadPassword() - Password = PasswordModel.txtPassword.Text - DialogPassword.EndExecute -End Sub - - -Sub RejectPassword() - bCancelProtection = True - DialogPassword.EndExecute -End Sub - - -' Reprotects the previousliy protected sheets -' The passwordinformation is stored in the List 'UnProtectList()' -Sub ReprotectSheets() -Dim i as Integer -Dim oProtectSheet as Object -Dim ProtectList() as String -Dim SheetName as String -Dim SheetPassword as String - If PWIndex > -1 Then - SetStatusLineText(sStsREPROTECT) - For i = 0 To PWIndex - ProtectList() = ArrayOutOfString(UnProtectList(i),";") - SheetName = ProtectList(0) - If Ubound(ProtectList()) > 0 Then - SheetPassWord = ProtectList(1) - Else - SheetPassword = "" - End If - oProtectSheet = oSheets.GetbyName(SheetName) - If Not oProtectSheet.IsProtected Then - oProtectSheet.Protect(SheetPassWord) - End If - Next i - SetStatusLineText("") - End If - PWIndex = -1 - ReDim UnProtectList() -End Sub - - -' Add a Sheet to the list of sheets that finally have to be -' unprotected -Sub AddSheettoUnprotectionlist(ListSheetName as String, Password as String) -Dim MaxIndex as Integer - MaxIndex = Ubound(UnProtectList()) - PWIndex = PWIndex + 1 - If PWIndex > MaxIndex Then - ReDim Preserve UnprotectList(MaxIndex + SBRANGEUBOUND) - End If - UnprotectList(PWIndex) = ListSheetName & ";" & Password -End Sub - - -Function CheckSheetProtection(oSheets as Object) as Boolean -Dim MaxIndex as Integer -Dim i as Integer -Dim bProtectedSheets as Boolean - bProtectedSheets = False - MaxIndex = oSheets.Count-1 - For i = 0 To MaxIndex - bProtectedSheets = oSheets(i).IsProtected - If bProtectedSheets Then - CheckSheetProtection() = True - Exit Function - End If - Next i - CheckSheetProtection() = False -End Function</script:module>
\ No newline at end of file diff --git a/wizards/source/euro/Soft.xba b/wizards/source/euro/Soft.xba deleted file mode 100644 index b4088e931..000000000 --- a/wizards/source/euro/Soft.xba +++ /dev/null @@ -1,239 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Soft" script:language="StarBasic">Option Explicit -REM ***** BASIC ***** - - -Sub CreateStyleEnumeration() - EmptySelection() - EmptyListbox(DialogModel.lstSelection) - CurSheetName = oDocument.CurrentController.GetActiveSheet.Name - MakeStyleEnumeration(False) - DialogModel.lblSelection.Label = sTEMPLATES -End Sub - - -Sub MakeStyleEnumeration(bAddToListbox as Boolean) -Dim m as integer -Dim aStyleFormat as Object -Dim Stylename as String - StyleIndex = -1 - oStyles = oDocument.StyleFamilies.GetbyIndex(0) - For m = 0 To oStyles.count-1 - oStyle = oStyles.GetbyIndex(m) - StyleName = oStyle.Name - If CheckFormatType(oStyle) Then - If Not bAddToListBox Then - AddSingleItemToListbox(DialogModel.lstSelection, Stylename) - Else - SwitchNumberFormat(ostyle, oFormats, sEuroSign) - End If - StyleIndex = StyleIndex + 1 - If StyleIndex > Ubound(StyleRangeAssignMentList()) Then - Redim Preserve StyleRangeAssignmentList(StyleIndex) - End If - StyleRangeAssignmentList(StyleIndex) = "<STYLENAME>" & Stylename & "</STYLENAME>" & _ - "<DEFINED>FALSE</DEFINED>" & "<RANGES></RANGES>" &_ - "<CELLCOUNT>0</CELLCOUNT>" &_ - "<SELECTED>FALSE</SELECTED>" - End If - Next m - If StyleIndex > -1 Then - Redim Preserve StyleRangeAssignmentList(StyleIndex) - Else - ReDim StyleRangeAssignmentList() - End If -End Sub - - -Sub AssignRangestoStyle(StyleList(), SelList()) -Dim i as Integer -Dim n as integer -Dim LastIndex as Integer -Dim CurStyleName as String -Dim AssignString as String - LastIndex = Ubound(StyleList()) - StatusValue = 0 - SetStatusLineText(sStsRELRANGES) - For i = 0 To LastIndex - CurStyleName = StyleList(i) - n = PartStringInArray(StyleRangeAssignmentList(), CurStyleName, 0) - AssignString = StyleRangeAssignmentlist(n) - If IndexInArray(CurStyleName, SelList()) <> -1 Then - ' Style is selected - If FindPartString(AssignString, "<DEFINED>", "</DEFINED>", 1) = "FALSE" Then - AssignString = ReplaceString(AssignString, "<SELECTED>TRUE</SELECTED>", "<SELECTED>FALSE</SELECTED>") - AssignCellFormatRanges(n, AssignString, CurStyleName) - End If - Else - ' Style is not selected - If FindPartString(AssignString, "<SELECTED>", "</SELECTED>", 1) = "FALSE" Then - DeselectStyle(CurStyleName, n) - End If - End If - IncreaseStatusvalue(SBRELGET/(LastIndex+1)) - Next i -End Sub - - -Sub AssignCellFormatRanges(n as Integer, AssignString as String, CurStyleName as String) -Dim oRanges() as Object -Dim oRange as Object -Dim oRangeAddress -Dim oSheet as Object -Dim StyleCellCount as Long -Dim i as Integer -Dim MaxIndex as Integer -Dim RangeString as String -Dim SheetName as String -Dim RangeName as String -Dim CellCountString as String - StyleCellCount = 0 - RangeString = "<RANGES>" - MaxIndex = oSheets.Count-1 - For i = 0 To MaxIndex - oSheet = oSheets(i) - SheetName = oSheet.Name - oRanges = osheet.CellFormatRanges.CreateEnumeration - While oRanges.hasMoreElements - oRange = oRanges.NextElement - If oRange.getPropertyState("NumberFormat") = 1 Then - If oRange.CellStyle = CurStyleName Then - oRangeAddress = oRange.RangeAddress - RangeName = RetrieveRangeNamefromAddress(oRange) - RangeString = RangeString & RangeName & "," - StyleCellCount = StyleCellCount + CountRangeCells(oRange) - End If - End If - Wend - Next i - If StyleCellCount > 0 Then - TotCellCount = TotCellCount + StyleCellCount - RangeString = RTrimStr(RangeString,",") - RangeString = RangeString & "</RANGES>" - CellCountString = "<CELLCOUNT>" & StyleCellCount & "</CELLCOUNT" - AssignString = ReplaceString(AssignString, RangeString,"<RANGES></RANGES>") - AssignString = ReplaceString(AssignString, CellCountString,"<CELLCOUNT>0</CELLCOUNT>") - End If - AssignString = ReplaceString(AssignString, "<DEFINED>TRUE</DEFINED>", "<DEFINED>FALSE</DEFINED>") - StyleRangeAssignmentList(n) = AssignString -End Sub - - -' deletes a styletemplate from the Collection that selects the ranges -Sub DeselectStyle(DeSelStyleName as String, n as Integer) -Dim i as Integer -Dim RangeName as String -Dim SelectString as String -Dim AssignString as String -Dim StyleRangeList() as String -Dim MaxIndex as Integer - SelectString ="<SELECTED>FALSE</SELECTED>" - AssignString = StyleRangeAssignmentList(n) - RangeString = FindPartString(AssignString,"<RANGES>","</RANGES>",1) - StyleRangeList() = ArrayoutofString(RangeString,",") - MaxIndex = Ubound(StyleRangeList()) - For i = 0 To MaxIndex - RangeName = StyleRangeList(i) - If oSelRanges.HasbyName(RangeName) Then - oSelRanges.RemovebyName(RangeName) - End If - Next i - AssignString = ReplaceString(AssignString, "<SELECTED>FALSE</SELECTED>", "<SELECTED>TRUE</SELECTED>") - StyleRangeAssignmentList(n) = AssignString -End Sub - - -Function RetrieveRangeNamefromAddress(oRange as Object) as String -Dim Rangename as String -Dim oAddressRanges as Object - oAddressRanges = oDocument.createInstance("com.sun.star.sheet.SheetCellRanges") - oAddressRanges.InsertbyName("",oRange) - Rangename = oAddressRanges.RangeAddressesasString -' Msgbox "Adresse: " & oRangeAddress.StartColumn & " ; " & oRangeAddress.EndColumn & " ; " & oRangeAddress.StartRow & " ; " & oRangeAddress.EndRow & chr(13) & RangeName -' oAddressRanges.RemovebyName(RangeName) - RetrieveRangeNamefromAddress = Rangename -End Function - - -' creates a sheet object from an according sectionname -Function RetrieveSheetoutofRangeName(TableText as String) -Dim DescriptionList() as String -Dim SheetName as String -Dim MaxIndex as integer - ' find out in which sheet the range is - DescriptionList() = ArrayOutofString(TableText,".",MaxIndex) - SheetName = DescriptionList(0) - SheetName = DeleteStr(SheetName,"'") - ' set the viewcursor on this sheet - RetrieveSheetoutofRangeName = oSheets.GetbyName(SheetName) -End Function - - -' creates a rangeobject from an according rangename -Function RetrieveRangeoutofRangeName(TableText as String) - oSheet = RetrieveSheetoutofRangeName(TableText) - oRange = oSheet.GetCellRangebyName(TableText) - RetrieveRangeoutofRangeName = oRange -End Function - - -Sub ConvertTheSoftWay(StyleList(), bDeSelect as Boolean) -Dim i as Integer -Dim l as Integer -Dim s as Integer -Dim n as Integer -Dim CurStyleName as String -Dim RangeName as String -Dim OldStatusValue as Integer -Dim LastIndex as Integer -Dim oSelListbox as Object -Dim StyleRangeList() as String -Dim MaxIndex as Integer - oSelListbox = DialogConvert.GetControl("lstSelection") - LastIndex = Ubound(StyleList()) - OldStatusValue = StatusValue - For i = 0 To LastIndex - CurStyleName = StyleList(i) - oStyle = oStyles.GetbyName(CurStyleName) - StyleRangeList() = GetAssignedRanges(CurStyleName, n) - MaxIndex = Ubound(StyleRangeList()) - For s = 0 To MaxIndex - RangeName = StyleRangeList(s) - oRange = RetrieveRangeoutofRangeName(RangeName) - If oRange.getPropertyState("NumberFormat") = 1 Then - ' Range is hard formatted - ConvertCellCurrencies(oRange) - CurCellCount = CountRangeCells(oRange) - End If - IncreaseStatusvalue((CurCellCount/TotCellCount)*(95-OldStatusValue)) - If bDeSelect Then - ' Note: On Problems see Bug #73157 - If oSelRanges.HasbyName(RangeName) Then - oSelRanges.RemovebyName(RangeName) - oDocument.CurrentController.Select(oSelRanges) - End If - End If - Next s - SwitchNumberFormat(ostyle, oFormats, sEuroSign) - StyleRangeAssignmentList(n) = "" - l = GetItemPos(oSelListBox.Model, CurStyleName) - oSelListbox.RemoveItems(l,1) - Next -End Sub - - -Function GetAssignedRanges(CurStyleName as String, n as Integer) -Dim StyleRangeList() as String -Dim RangeString as String -Dim AssignString as String - n = PartStringInArray(StyleRangeAssignmentList(), CurStyleName, 0) - If n <> -1 Then - AssignString = StyleRangeAssignmentList(n) - RangeString = FindPartString(AssignString,"<RANGES>", "</RANGES>",1) - If RangeString <> "" Then - StyleRangeList() = ArrayoutofString(RangeString,",") - End If - End If - GetAssignedRanges() = StyleRangeList() -End Function</script:module>
\ No newline at end of file diff --git a/wizards/source/euro/Writer.xba b/wizards/source/euro/Writer.xba deleted file mode 100644 index 0d153b705..000000000 --- a/wizards/source/euro/Writer.xba +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Writer" script:language="StarBasic">REM ***** BASIC ***** - - -Sub ConvertWriterTables() -Dim CellString as String -Dim oParagraphs as Object -Dim oPara as Object -Dim i as integer -Dim sCellNames() -Dim oCell as Object - oParagraphs = oDocument.Text.CreateEnumeration - While oParagraphs.HasMoreElements - oPara = oParagraphs.NextElement - If NOT oPara.supportsService("com.sun.star.text.Paragraph") Then - ' Note: As cells might be splitted or merged - ' you cannot refer to them via their indices - sCellNames = oPara.CellNames - For i = 0 To Ubound(sCellNames) - If sCellNames(i) <> "" Then - oCell = oPara.getCellByName(sCellNames(i)) - If CheckFormatType(oCell) Then - SwitchNumberFormat(oCell, oFormats, sEuroSign) - ModifyObjectValuewithCurrFactor(oCell) - End If - End If - Next - End If - Wend -End Sub - - -Sub ModifyObjectValuewithCurrFactor(oDocObject as Object) - oDocObjectValue = oDocObject.Value - oDocObject.Value = oDocObjectValue/CurrFactor -End Sub - - -Sub ConvertTextFields() -Dim oTextFields as Object -Dim oTextField as Object -Dim FieldValue -Dim oDocObjectValue as double -Dim InstanceNames(500) as String -Dim CurInstanceName as String -Dim MaxIndex as Integer - MaxIndex = 0 - oTextfields = oDocument.getTextfields.CreateEnumeration - While oTextFields.hasmoreElements - oTextField = oTextFields.NextElement - If oTextField.PropertySetInfo.HasPropertybyName("NumberFormat") Then - If CheckFormatType(oTextField) Then - If oTextField.PropertySetInfo.HasPropertybyName("Value") Then - If Not oTextField.SupportsService("com.sun.star.text.TextField.GetExpression") Then - oTextField.Content = CStr(Round(oTextField.Value/CurrFactor,2)) - End If - ElseIf oTextField.TextFieldMaster.PropertySetInfo.HasPropertyByName("Value") Then - CurInstanceName = oTextField.TextFieldMaster.InstanceName - If Not FieldinArray(InstanceNames(), MaxIndex, CurInstanceName) Then - oTextField.TextFieldMaster.Content = CStr(Round(oTextField.TextFieldMaster.Value/CurrFactor,2)) - InstanceNames(MaxIndex) = CurInstanceName - MaxIndex = MaxIndex + 1 - End If - End If - SwitchNumberFormat(oTextField, oFormats, sEuroSign) - End If - End If - Wend - oDocument.GetTextFields.refresh() -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/euro/delzip b/wizards/source/euro/delzip deleted file mode 100644 index e69de29bb..000000000 --- a/wizards/source/euro/delzip +++ /dev/null diff --git a/wizards/source/euro/dialog.xlb b/wizards/source/euro/dialog.xlb deleted file mode 100644 index c461ce54f..000000000 --- a/wizards/source/euro/dialog.xlb +++ /dev/null @@ -1,6 +0,0 @@ -<?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="Euro" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="DlgConvert"/> - <library:element library:name="DlgPassword"/> -</library:library> diff --git a/wizards/source/euro/euro.src b/wizards/source/euro/euro.src deleted file mode 100644 index 86fd356ed..000000000 --- a/wizards/source/euro/euro.src +++ /dev/null @@ -1,476 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#define STEP_ZERO 1000 -#define STEP_CONVERTER 1100 -#define STEP_AUTOPILOT 1200 -#define STATUSLINE 1300 -#define MESSAGES 1400 -#define CURRENCIES 1500 -#define STEP_LASTPAGE 1600 -// -------------------------------------------------------------------- -String STEP_ZERO -{ -Text [ en-US ] = "~Cancel"; -}; - -String STEP_ZERO + 1 -{ -Text [ en-US ] = "~Help"; -}; - -String STEP_ZERO + 2 -{ -Text [ en-US ] = "<<~Back"; -}; - -String STEP_ZERO + 3 -{ -Text [ en-US ] = "~Convert"; -}; - -String STEP_ZERO + 4 -{ -Text [ en-US ] = "Note: Currency amounts from external links and currency conversion factors in formulas cannot be converted."; -}; - -String STEP_ZERO + 5 -{ -Text [ en-US ] = "First, unprotect all sheets."; -}; - -String STEP_ZERO + 6 -{ -Text [ en-US ] = "Currencies:"; -}; - - -String STEP_ZERO + 7 -{ -Text [ en-US ] = "C~ontinue>>"; -}; - - -String STEP_ZERO + 8 -{ -Text [ en-US ] = "C~lose"; -}; - -String STEP_CONVERTER -{ -Text [ en-US ] = "~Entire document"; -}; - -String STEP_CONVERTER + 1 -{ -Text [ en-US ] = "Selection"; -}; - -String STEP_CONVERTER + 2 -{ -Text [ en-US ] = "Cell S~tyles"; -}; - -String STEP_CONVERTER + 3 -{ -Text [ en-US ] = "Currency cells in the current ~sheet"; -}; - -String STEP_CONVERTER + 4 -{ -Text [ en-US ] = "Currency cells in the entire ~document"; -}; - -String STEP_CONVERTER + 5 -{ -Text [ en-US ] = "~Selected range"; -}; - -String STEP_CONVERTER + 6 -{ -Text [ en-US ] = "Select Cell Styles"; -}; - -String STEP_CONVERTER + 7 -{ -Text [ en-US ] = "Select currency cells"; -}; - -String STEP_CONVERTER + 8 -{ -Text [ en-US ] = "Currency ranges:"; -}; - -String STEP_CONVERTER + 9 -{ -Text [ en-US ] = "Templates:"; -}; - - -String STEP_AUTOPILOT -{ -Text [ en-US ] = "Extent"; -}; - -String STEP_AUTOPILOT + 1 -{ -Text [ en-US ] = "~Single %PRODUCTNAME Calc document"; -}; - -String STEP_AUTOPILOT + 2 -{ -Text [ en-US ] = "Complete ~directory"; -}; - -String STEP_AUTOPILOT + 3 -{ -Text [ en-US ] = "Source Document:"; -}; - -String STEP_AUTOPILOT + 4 -{ -Text [ en-US ] = "Source directory:"; -}; - -String STEP_AUTOPILOT + 5 -{ -Text [ en-US ] = "~Including subfolders"; -}; - -String STEP_AUTOPILOT + 6 -{ -Text [ en-US ] = "Target directory:"; -}; - - -String STEP_AUTOPILOT + 7 -{ -Text [ en-US ] = "Temporarily unprotect sheet without query"; -}; - - -String STEP_AUTOPILOT + 10 -{ -Text [ en-US ] = "Also convert fields and tables in text documents"; -}; - - -String STATUSLINE -{ -Text [ en-US ] = "Conversion status: "; -}; - -String STATUSLINE + 1 -{ -Text [ en-US ] = "Conversion status of the cell templates:"; -}; - -String STATUSLINE + 2 -{ -Text [ en-US ] = "Registration of the relevant ranges: Sheet %1Number%1 of %2TotPageCount%2"; -}; - - -String STATUSLINE + 3 -{ -Text [ en-US ] = "Entry of the ranges to be converted..."; -}; - - - -String STATUSLINE + 4 -{ -Text [ en-US ] = "Sheet protection for each sheet will be restored..."; -}; - - -String STATUSLINE + 5 -{ -Text [ en-US ] = "Conversion of the currency units in the cell templates..."; -}; - - - -String MESSAGES -{ -Text [ en-US ] = "~Finish"; -}; - -String MESSAGES + 1 -{ -Text [ en-US ] = "Select directory"; -}; - -String MESSAGES + 2 -{ -Text [ en-US ] = "Select file"; -}; - -String MESSAGES + 3 -{ -Text [ en-US ] = "Select target directory"; -}; - -String MESSAGES + 4 -{ -Text [ en-US ] = "non-existant"; -}; - - -String MESSAGES + 5 -{ -Text [ en-US ] = "Euro Converter"; -}; - - - -String MESSAGES + 6 -{ -Text [ en-US ] = "Should protected spreadsheets be temporarily unprotected?"; -}; - - -String MESSAGES + 7 -{ -Text [ en-US ] = "Enter the password to unprotect the table %1TableName%1"; -}; - - -String MESSAGES + 8 -{ -Text [ en-US ] = "Wrong Password!"; -}; - - -String MESSAGES + 9 -{ -Text [ en-US ] = "Protected Sheet"; -}; - - -String MESSAGES + 10 -{ -Text [ en-US ] = "Warning!"; -}; - - -String MESSAGES + 11 -{ -Text [ en-US ] = "Protection for the sheets will not be removed."; -}; - - -String MESSAGES + 12 -{ -Text [ en-US ] = "Sheet cannot be unprotected"; -}; - - -String MESSAGES + 13 -{ -Text [ en-US ] = "The Wizard cannot edit this document as cell formats cannot be modified in documents containing protected spreadsheets."; -}; - - - -String MESSAGES + 14 -{ -Text [ en-US ] = "Please note that the Euro Converter will, otherwise, not be able to edit this document!"; -}; - - - -String MESSAGES + 15 -{ -Text [ en-US ] = "Please choose a currency to be converted first!"; -}; - -String MESSAGES + 16 -{ -Text [ en-US ] = "Password:"; -}; - -String MESSAGES + 17 -{ -Text [ en-US ] = "OK"; -}; - -String MESSAGES + 18 -{ -Text [ en-US ] = "Cancel"; -}; - - - String MESSAGES + 19 -{ -Text [ en-US ] = "Please select a %PRODUCTNAME Calc document for editing!"; -}; - - -String MESSAGES + 20 -{ -Text [ en-US ] = "'<1>' is not a directory!"; -}; - - -String MESSAGES + 21 -{ -Text [ en-US ] = "Document is read-only!"; -}; - - -String MESSAGES + 22 -{ - Text [ en-US ] = "The '<1>' file already exists.<CR>Do you want to overwrite it?"; -}; - - -String MESSAGES + 23 -{ - Text [ en-US ] = "Do you really want to terminate conversion at this point?"; -}; - -String MESSAGES + 24 -{ - Text [ en-US ] = "Cancel Wizard"; -}; - - String CURRENCIES -{ -Text [ en-US ] = "Portuguese Escudo"; -}; - -String CURRENCIES + 1 -{ -Text [ en-US ] = "Dutch Guilder"; -}; - -String CURRENCIES + 2 -{ -Text [ en-US ] = "French Franc"; -}; - -String CURRENCIES + 3 -{ -Text [ en-US ] = "Spanish Peseta"; -}; - -String CURRENCIES + 4 -{ -Text [ en-US ] = "Italian Lira"; -}; - -String CURRENCIES + 5 -{ -Text [ en-US ] = "German Mark"; -}; - -String CURRENCIES + 6 -{ -Text [ en-US ] = "Belgian Franc"; -}; - -String CURRENCIES + 7 -{ -Text [ en-US ] = "Irish Punt"; -}; - -String CURRENCIES + 8 -{ -Text [ en-US ] = "Luxembourg Franc"; -}; - -String CURRENCIES + 9 -{ -Text [ en-US ] = "Austrian Schilling"; -}; - -String CURRENCIES + 10 -{ -Text [ en-US ] = "Finnish Mark"; -}; - -String CURRENCIES + 11 -{ -Text [ en-US ] = "Greek Drachma"; -}; - -String CURRENCIES + 12 -{ -Text [ en-US ] = "Slovenian Tolar"; -}; - -String CURRENCIES + 13 -{ -Text [ en-US ] = "Cypriot Pound"; -}; - -String CURRENCIES + 14 -{ -Text [ en-US ] = "Maltese Lira"; -}; - -String CURRENCIES + 15 -{ -Text [ en-US ] = "Slovak Koruna"; -}; - -String CURRENCIES + 16 -{ -Text [ en-US ] = "The currency set for the document is not a European currency!"; -}; - -String CURRENCIES + 17 -{ -Text [ en-US ] = "The language set for your operating system is not a language of the European Monetary Union."; -}; - -String STEP_LASTPAGE -{ -Text [ en-US ] = "Progress"; -}; - - -String STEP_LASTPAGE + 1 -{ -Text [ en-US ] = "Retrieving the relevant documents..."; -}; - -String STEP_LASTPAGE + 2 -{ -Text [ en-US ] = "Converting the documents..."; -}; - -String STEP_LASTPAGE + 3 -{ -Text [ en-US ] = "Settings:"; -}; - -String STEP_LASTPAGE + 4 -{ -Text [ en-US ] = "Sheet is always unprotected"; -}; diff --git a/wizards/source/euro/script.xlb b/wizards/source/euro/script.xlb deleted file mode 100644 index 1bc4927c2..000000000 --- a/wizards/source/euro/script.xlb +++ /dev/null @@ -1,12 +0,0 @@ -<?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="Euro" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="ConvertRun"/> - <library:element library:name="AutoPilotRun"/> - <library:element library:name="Hard"/> - <library:element library:name="Soft"/> - <library:element library:name="Init"/> - <library:element library:name="Common"/> - <library:element library:name="Writer"/> - <library:element library:name="Protect"/> -</library:library> diff --git a/wizards/source/formwizard/DBMeta.xba b/wizards/source/formwizard/DBMeta.xba deleted file mode 100644 index 2d8dc2838..000000000 --- a/wizards/source/formwizard/DBMeta.xba +++ /dev/null @@ -1,330 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="DBMeta" script:language="StarBasic">REM ***** BASIC ***** -Option Explicit - - -Public iCommandTypes() as Integer -Public CurCommandType as Integer -Public oDataSource as Object -Public bEnableBinaryOptionGroup as Boolean -'Public bSelectContent as Boolean - - -Function GetDatabaseNames(baddFirstListItem as Boolean) -Dim sDatabaseList() - If oDBContext.HasElements Then - Dim LocDBList() as String - Dim MaxIndex as Integer - Dim i as Integer - LocDBList = oDBContext.ElementNames() - MaxIndex = Ubound(LocDBList()) - If baddfirstListItem Then - ReDim Preserve sDatabaseList(MaxIndex + 1) - sDatabaseList(0) = sSelectDatasource - a = 1 - Else - ReDim Preserve sDatabaseList(MaxIndex) - a = 0 - End If - For i = 0 To MaxIndex - sDatabaseList(a) = oDBContext.ElementNames(i) - a = a + 1 - Next i - End If - GetDatabaseNames() = sDatabaseList() -End Function - - -Sub GetSelectedDBMetaData(sDBName as String) -Dim OldsDBname as String -Dim DBIndex as Integer -Dim LocList() as String -' If bStartUp Then -' bStartUp = false -' Exit Sub -' End Sub - ToggleDatabasePage(False) - With DialogModel - If GetConnection(sDBName) Then - If GetDBMetaData() Then - LocList() = AddListToList(Array(sSelectDBTable), TableNames()) - .lstTables.StringItemList() = AddListToList(LocList(), QueryNames()) -' bSelectContent = True - .lstTables.SelectedItems() = Array(0) - iCommandTypes() = CreateCommandTypeList() - EmptyFieldsListboxes() - End If - End If - bEnableBinaryOptionGroup = False - .lstTables.Enabled = True - .lblTables.Enabled = True -' Else -' DialogModel.lstTables.StringItemList = Array(sSelectDBTable) -' EmptyFieldsListboxes() -' End If - ToggleDatabasePage(True) - End With -End Sub - - -Function GetConnection(sDBName as String) -Dim oInteractionHandler as Object -Dim bExitLoop as Boolean -Dim bGetConnection as Boolean -Dim iMsg as Integer -Dim Nulllist() - If Not IsNull(oDBConnection) Then - oDBConnection.Dispose() - End If - oDataSource = oDBContext.GetByName(sDBName) -' If Not oDBContext.hasbyName(sDBName) Then -' GetConnection() = False -' Exit Function -' End If - If Not oDataSource.IsPasswordRequired Then - oDBConnection = oDBContext.GetByName(sDBName).GetConnection("","") - GetConnection() = True - Else - oInteractionHandler = createUnoService("com.sun.star.task.InteractionHandler") - oDataSource = oDBContext.GetByName(sDBName) - On Local Error Goto NOCONNECTION - Do - bExitLoop = True - oDBConnection = oDataSource.ConnectWithCompletion(oInteractionHandler) - NOCONNECTION: - bGetConnection = Err = 0 - If bGetConnection Then - bGetConnection = Not IsNull(oDBConnection) - If Not bGetConnection Then - Exit Do - End If - End If - If Not bGetConnection Then - iMsg = Msgbox (sMsgNoConnection,32 + 2, sMsgWizardName) - bExitLoop = iMsg = SBCANCEL - Resume CLERROR - CLERROR: - End If - Loop Until bExitLoop - On Local Error Goto 0 - If Not bGetConnection Then - DialogModel.lstTables.StringItemList() = Array(sSelectDBTable) - DialogModel.lstFields.StringItemList() = NullList() - DialogModel.lstSelFields.StringItemList() = NullList() - End If - GetConnection() = bGetConnection - End If -End Function - - -Function GetDBMetaData() - If oDBContext.HasElements Then - Tablenames() = oDBConnection.Tables.ElementNames() - Querynames() = oDBConnection.Queries.ElementNames() - GetDBMetaData = True - Else - MsgBox(sMsgErrNoDatabase, 64, sMsgWizardName) - GetDBMetaData = False - End If -End Function - - -Sub GetTableMetaData() -Dim iType as Long -Dim m as Integer -Dim Found as Boolean -Dim i as Integer -Dim sFieldName as String -Dim n as Integer -Dim WidthIndex as Integer -Dim oField as Object - MaxIndex = Ubound(DialogModel.lstSelFields.StringItemList()) - Dim ColumnMap(MaxIndex)as Integer - FieldNames() = DialogModel.lstSelFields.StringItemList() - ' Build a structure which maps the position of a selected field (within the selection) to the the column position within - ' the table. So we ensure that the controls are placed in the same order the according fields are selected. - For i = 0 To Ubound(FieldNames()) - sFieldName = FieldNames(i) - Found = False - n = 0 - While (n< MaxIndex And (Not Found)) - If (FieldNames(n) = sFieldName) Then - Found = True - ColumnMap(n) = i - End If - n = n + 1 - Wend - Next i - For n = 0 to MaxIndex - sFieldname = FieldNames(n) - oField = oColumns.GetByName(sFieldName) - iType = oField.Type - FieldMetaValues(n,0) = oField.Type - FieldMetaValues(n,1) = AssignFieldLength(oField.Precision) - FieldMetaValues(n,2) = GetValueoutofList(iType, WidthList(),1, WidthIndex) - FieldMetaValues(n,3) = WidthList(WidthIndex,3) - FieldMetaValues(n,4) = oField.FormatKey - FieldMetaValues(n,5) = oField.DefaultValue - FieldMetaValues(n,6) = oField.IsCurrency - FieldMetaValues(n,7) = oField.Scale -' If oField.Description <> "" Then -'' Todo: What's wrong with this line? -' Msgbox oField.Helptext -' End If - FieldMetaValues(n,8) = oField.Description - Next - ReDim oDBShapeList(MaxIndex) as Object - ReDim oTCShapeList(MaxIndex) as Object - ReDim oDBModelList(MaxIndex) as Object - ReDim oGroupShapeList(MaxIndex) as Object -End Sub - - -Function GetSpecificFieldNames() as Integer -Dim n as Integer -Dim m as Integer -Dim s as Integer -Dim iType as Integer -Dim oField as Object -Dim MaxIndex as Integer -Dim EmptyList() - If Ubound(DialogModel.lstTables.StringItemList()) > -1 Then - FieldNames() = oColumns.GetElementNames() - MaxIndex = Ubound(FieldNames()) - If MaxIndex <> -1 Then - Dim ResultFieldNames(MaxIndex) - ReDim ImgFieldNames(MaxIndex) - m = 0 - For n = 0 To MaxIndex - oField = oColumns.GetByName(FieldNames(n)) - iType = oField.Type - If GetIndexInMultiArray(WidthList(), iType, 0) <> -1 Then - ResultFieldNames(m) = FieldNames(n) - m = m + 1 - End If - If GetIndexInMultiArray(ImgWidthList(), iType, 0) <> -1 Then - ImgFieldNames(s) = FieldNames(n) - s = s + 1 - End If - Next n - If s <> 0 Then - Redim Preserve ImgFieldNames(s-1) - bEnableBinaryOptionGroup = True - Else - bEnableBinaryOptionGroup = False - End If - If (DialogModel.optBinariesasGraphics.State = 1) And (s <> 0) Then - ResultFieldNames() = AddListToList(ResultFieldNames(), ImgFieldNames()) - Else - Redim Preserve ResultFieldNames(m-1) - End If - FieldNames() = ResultFieldNames() - DialogModel.lstFields.StringItemList = FieldNames() - InitializeListboxProcedures(DialogModel, DialogModel.lstFields, DialogModel.lstSelFields) - End If - GetSpecificFieldNames = MaxIndex - Else - GetSpecificFieldNames = -1 - End If -End Function - - -Sub CreateDBForm() - If oDrawPage.Forms.Count = 0 Then - oDBForm = oDocument.CreateInstance("com.sun.star.form.component.Form") - oDrawpage.Forms.InsertByIndex (0, oDBForm) - Else - oDBForm = oDrawPage.Forms.GetByIndex(0) - End If - oDBForm.Name = "Standard" - oDBForm.DataSourceName = sDBName - oDBForm.Command = TableName - oDBForm.CommandType = CurCommandType -End Sub - - -Sub AddOrRemoveBinaryFieldsToWidthList() -Dim LocWidthList() -Dim MaxIndex as Integer -Dim OldMaxIndex as Integer -Dim s as Integer -Dim n as Integer -Dim m as Integer - If Not bDebug Then - On Local Error GoTo WIZARDERROR - End If - If DialogModel.optBinariesasGraphics.State = 1 Then - OldMaxIndex = Ubound(WidthList(),1) - If OldMaxIndex = 15 Then - MaxIndex = Ubound(WidthList(),1) + Ubound(ImgWidthList(),1) + 1 - ReDim Preserve WidthList(MaxIndex,4) - s = 0 - For n = OldMaxIndex + 1 To MaxIndex - For m = 0 To 3 - WidthList(n,m) = ImgWidthList(s,m) - Next m - s = s + 1 - Next n - MergeList(DialogModel.lstFields, ImgFieldNames()) - End If - Else - ReDim Preserve WidthList(15, 4) - RemoveListItems(DialogModel.lstFields(), DialogModel.lstSelFields(), ImgFieldNames()) - End If - DialogModel.lstSelFields.Tag = True -WIZARDERROR: - If Err <> 0 Then - Msgbox(sMsgErrMsg, 16, GetProductName()) - Resume LOCERROR - LOCERROR: - End If -End Sub - - -Function CreateCommandTypeList() -Dim MaxTableIndex as Integer -Dim MaxQueryIndex as Integer -Dim MaxIndex as Integer -Dim i as Integer -Dim a as Integer - MaxTableIndex = Ubound(TableNames() - MaxQueryIndex = Ubound(QueryNames() - MaxIndex = MaxTableIndex + MaxQueryIndex + 1 - If MaxIndex > -1 Then - Dim LocCommandTypes(MaxIndex) as Integer - For i = 0 To MaxTableIndex - LocCommandTypes(i) = com.sun.star.sdb.CommandType.TABLE - Next i - a = i - For i = 0 To MaxQueryIndex - LocCommandTypes(a) = com.sun.star.sdb.CommandType.QUERY - a = a + 1 - Next i - End If - CreateCommandTypeList() = LocCommandTypes() -End Function - - -Sub GetCurrentMetaValues(Index as Integer) - CurFieldType = FieldMetaValues(Index,0) - CurFieldLength = FieldMetaValues(Index,1) - CurControlType = FieldMetaValues(Index,2) - CurControlName = FieldMetaValues(Index,3) - CurFormatKey = FieldMetaValues(Index,4) - CurDefaultValue = FieldMetaValues(Index,5) - CurIsCurrency = FieldMetaValues(Index,6) - CurScale = FieldMetaValues(Index,7) - CurHelpText = FieldMetaValues(Index,8) - CurFieldName = FieldNames(Index) -End Sub - - -Function AssignFieldLength(FieldLength as Long) as Integer - If FieldLength >= 65535 Then - AssignFieldLength() = -1 - Else - AssignFieldLength() = FieldLength - End If -End Function -</script:module>
\ No newline at end of file diff --git a/wizards/source/formwizard/DlgFormDB.xdl b/wizards/source/formwizard/DlgFormDB.xdl deleted file mode 100644 index 269b7e618..000000000 --- a/wizards/source/formwizard/DlgFormDB.xdl +++ /dev/null @@ -1,102 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DlgFormDB" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGFORM_DIALOG" dlg:closeable="true" dlg:moveable="true"> - <dlg:bulletinboard> - <dlg:text dlg:id="lblSelFields" dlg:tab-index="10" dlg:left="154" dlg:top="70" dlg:width="110" dlg:height="8" dlg:page="1" dlg:value="lblSelFields"/> - <dlg:menulist dlg:id="lstTables" dlg:tab-index="3" dlg:left="6" dlg:top="51" dlg:width="110" dlg:height="12" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGFORM_MASTER_LBTABLES" dlg:spin="true"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:FormWizard.FormWizard.FormGetFields?language=Basic&location=application" script:language="Script"/> - <script:event script:event-name="on-mousedown" script:macro-name="vnd.sun.star.script:FormWizard.FormWizard.DeleteFirstTableListBoxEntry?language=Basic&location=application" script:language="Script"/> - </dlg:menulist> - <dlg:img dlg:id="imgTheme" dlg:tab-index="1" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="26" dlg:scale-image="false"/> - <dlg:button dlg:id="cmdCancel" dlg:tab-index="33" dlg:left="6" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34401" dlg:value="cmdCancel" dlg:button-type="cancel"/> - <dlg:button dlg:id="cmdHelp" dlg:tab-index="34" dlg:left="63" dlg:top="190" dlg:width="53" dlg:height="14" dlg:tag="34400" dlg:value="cmdHelp" dlg:button-type="help"/> - <dlg:button dlg:id="cmdBack" dlg:tab-index="35" dlg:left="155" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGFORM_CMDPREV" dlg:value="cmdBack"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.FormWizard.PreviousStep?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdGoOn" dlg:tab-index="36" dlg:left="211" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGFORM_CMDNEXT" dlg:value="cmdGoOn"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.FormWizard.NextStep?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:text dlg:id="lblTables" dlg:tab-index="2" dlg:left="6" dlg:top="40" dlg:width="72" dlg:height="8" dlg:page="1" dlg:value="lblTables"/> - <dlg:text dlg:id="lblFields" dlg:tab-index="4" dlg:left="6" dlg:top="70" dlg:width="109" dlg:height="8" dlg:page="1" dlg:value="lblFields"/> - <dlg:button dlg:id="cmdMoveSelected" dlg:tab-index="6" dlg:left="122" dlg:top="84" dlg:width="25" dlg:height="14" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGFORM_OPTONEXISTINGRELATION" dlg:value="->"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormMoveSelected?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdMoveAll" dlg:tab-index="7" dlg:left="122" dlg:top="101" dlg:width="25" dlg:height="14" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGFORM_OPTSELECTMANUALLY" dlg:value="=>>"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormMoveAll?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdRemoveSelected" dlg:tab-index="8" dlg:left="122" dlg:top="118" dlg:width="25" dlg:height="14" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGFORM_lstRELATIONS" dlg:value="<-"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormRemoveSelected?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdRemoveAll" dlg:tab-index="9" dlg:left="122" dlg:top="135" dlg:width="25" dlg:height="14" dlg:page="1" dlg:help-url="HID:34425" dlg:value="<<="> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormRemoveAll?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:radiogroup> - <dlg:radio dlg:id="optIgnoreBinaries" dlg:tab-index="14" dlg:left="122" dlg:top="169" dlg:width="104" dlg:height="10" dlg:page="1" dlg:help-url="HID:34427" dlg:value="optIgnoreBinaries" dlg:checked="true"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.DBMeta.AddOrRemoveBinaryFieldsToWidthList?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - <dlg:radio dlg:id="optBinariesasGraphics" dlg:tab-index="13" dlg:left="12" dlg:top="169" dlg:width="104" dlg:height="10" dlg:page="1" dlg:help-url="HID:34426" dlg:value="optBinariesasGraphics"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.DBMeta.AddOrRemoveBinaryFieldsToWidthList?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - </dlg:radiogroup> - <dlg:menulist dlg:id="lstFields" dlg:tab-index="5" dlg:left="6" dlg:top="81" dlg:width="110" dlg:height="70" dlg:page="1" dlg:help-url="HID:34420" dlg:multiselection="true"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormMoveSelected?language=Basic&location=application" script:language="Script"/> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormSetMoveRights?language=Basic&location=application" script:language="Script"/> - </dlg:menulist> - <dlg:menulist dlg:id="lstSelFields" dlg:tab-index="11" dlg:left="154" dlg:top="81" dlg:width="110" dlg:height="70" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGFORM_CHKCREATESUBFORM" dlg:multiselection="true"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormRemoveSelected?language=Basic&location=application" script:language="Script"/> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Tools.Listbox.FormSetMoveRights?language=Basic&location=application" script:language="Script"/> - </dlg:menulist> - <dlg:text dlg:id="lblStyles" dlg:tab-index="25" dlg:left="150" dlg:top="39" dlg:width="114" dlg:height="8" dlg:page="2" dlg:value="lblStyles"/> - <dlg:button dlg:id="cmdArrange1" dlg:tab-index="16" dlg:left="12" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="1" dlg:help-url="HID:WIZARDS_HID_DLGFORM_SUB_LBTABLES"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeArrangemode?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdArrange2" dlg:tab-index="17" dlg:left="39" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="2" dlg:help-url="HID:WIZARDS_HID_DLGFORM_SUB_FIELDSAVAILABLE"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeArrangemode?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdArrange3" dlg:tab-index="18" dlg:left="66" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="3" dlg:help-url="HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVESELECTED"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeArrangemode?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdArrange4" dlg:tab-index="19" dlg:left="93" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="4" dlg:help-url="HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEALL"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeArrangemode?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdArrange5" dlg:tab-index="20" dlg:left="120" dlg:top="50" dlg:width="23" dlg:height="25" dlg:page="2" dlg:tag="5" dlg:help-url="HID:WIZARDS_HID_DLGFORM_SUB_CMDREMOVESELECTED"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeArrangemode?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:menulist dlg:id="lstStyles" dlg:tab-index="26" dlg:left="150" dlg:top="50" dlg:width="114" dlg:height="86" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK2"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:FormWizard.tools.ImportStyles?language=Basic&location=application" script:language="Script"/> - </dlg:menulist> - <dlg:radiogroup> - <dlg:radio dlg:id="optBorder0" dlg:tab-index="22" dlg:left="12" dlg:top="95" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEUP" dlg:value="optBorder0"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeBorderLayouts?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - <dlg:radio dlg:id="optBorder1" dlg:tab-index="23" dlg:left="12" dlg:top="109" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGFORM_SUB_CMDMOVEDOWN" dlg:value="optBorder1"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeBorderLayouts?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - <dlg:radio dlg:id="optBorder2" dlg:tab-index="24" dlg:left="12" dlg:top="123" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:34440" dlg:value="optBorder2"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeBorderLayouts?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - </dlg:radiogroup> - <dlg:fixedline dlg:id="hlnBinaries" dlg:tab-index="12" dlg:left="6" dlg:top="158" dlg:width="258" dlg:height="8" dlg:page="1" dlg:value="hlnBinaries"/> - <dlg:radiogroup> - <dlg:radio dlg:id="optTiled" dlg:tab-index="31" dlg:left="156" dlg:top="154" dlg:width="81" dlg:height="10" dlg:page="2" dlg:tag="11" dlg:help-url="HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK2" dlg:value="optTiled" dlg:checked="true"> - <script:event script:event-name="on-mouseup" script:macro-name="vnd.sun.star.script:WebWizard.Common.SetBackGraphicStyle?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - <dlg:radio dlg:id="optArea" dlg:tab-index="32" dlg:left="156" dlg:top="168" dlg:width="81" dlg:height="10" dlg:page="2" dlg:tag="10" dlg:help-url="HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK3" dlg:value="optArea"> - <script:event script:event-name="on-mouseup" script:macro-name="vnd.sun.star.script:WebWizard.Common.SetBackGraphicStyle?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - </dlg:radiogroup> - <dlg:fixedline dlg:id="hlnBackground" dlg:tab-index="30" dlg:left="150" dlg:top="143" dlg:width="114" dlg:height="8" dlg:page="2" dlg:value="hlnBackground"/> - <dlg:fixedline dlg:id="hlnAlign" dlg:tab-index="27" dlg:left="6" dlg:top="143" dlg:width="137" dlg:height="8" dlg:page="2" dlg:value="hlnAlign"/> - <dlg:fixedline dlg:id="hlnBorderLayout" dlg:tab-index="21" dlg:left="6" dlg:top="83" dlg:width="137" dlg:height="8" dlg:page="2" dlg:value="hlnBorderLayout"/> - <dlg:fixedline dlg:id="hlnArrangements" dlg:tab-index="15" dlg:left="6" dlg:top="39" dlg:width="137" dlg:height="8" dlg:page="2" dlg:value="hlnArrangements"/> - <dlg:radiogroup> - <dlg:radio dlg:id="optAlign0" dlg:tab-index="28" dlg:left="12" dlg:top="154" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGFORM_LINKER_LSTSLAVELINK1" dlg:value="optAlign0"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeLabelAlignments?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - <dlg:radio dlg:id="optAlign2" dlg:tab-index="29" dlg:left="12" dlg:top="168" dlg:width="131" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGFORM_LINKER_LSTMASTERLINK1" dlg:value="optAlign2"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:FormWizard.Layouter.ChangeLabelAlignments?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - </dlg:radiogroup> - <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="0" dlg:left="6" dlg:top="180" dlg:width="258" dlg:height="6"/> - </dlg:bulletinboard> -</dlg:window>
\ No newline at end of file diff --git a/wizards/source/formwizard/FormWizard.xba b/wizards/source/formwizard/FormWizard.xba deleted file mode 100644 index 99103d933..000000000 --- a/wizards/source/formwizard/FormWizard.xba +++ /dev/null @@ -1,427 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="FormWizard" script:language="StarBasic">Option Explicit - -Public DocumentName as String -Public FormPath as String -Public WizardPath as String -Public WebWizardPath as String -Public WorkPath as String -Public TempPath as String -Public TexturePath as String -Public sQueryName as String -Public oDBConnection as Object -Public bWithBackGraphic as Boolean -Public bNeedFieldRefresh as Boolean -Public oDBForm as Object -Public oColumns() as Object -Public sDatabaseList() as String -Public TableNames() as String -Public QueryNames() as String -Public FieldNames() as String -Public ImgFieldNames() as String -Public oDBContext as Object -Public oUcb as Object -Public oDocInfo as Object -Public WidthList(15,3) -Public ImgWidthList(3,3) -Public sDBName as String -Public Tablename as String -Public Const SBSIZETEXT = "The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog." -Public bDisposeDoc as Boolean -Public bDebug as Boolean -'Public bStartUp as Boolean -Public bConnectionIsovergiven as Boolean -Public FormName As String -Public sFormUrl as String -Public oFormDocuments - - -' The macro can be called in 4 possible scenarios: -' Scenario 1. No parameters at given -' Scenario 2: Only Datasourcename is given, but no connection and no Content -' Scenario 3: a data source and a connection are given -' Scenario 4: all parameters (data source name, connection, object type and object) are given - -Sub Main() -Dim oLocDBContext as Object -Dim oLocConnection as Object - -' Scenario 1. No parameters at given - MainWithDefault() - -' Scenario 2: Only Datasourcename is given, but no connection and no Content -' MainWithDefault("Bibliography") - -' Scenario 3: a data source and a connection are given -' oLocDBContext = CreateUnoService("com.sun.star.sdb.DatabaseContext") -' oLocConnection = oLocDBContext.GetByName("Bibliography").GetConnection("","") -' MainWithDefault("Bibliography", oLocConnection) - -' Scenario 4: all parameters (data source name, connection, object type and object) are given -' oLocDBContext = CreateUnoService("com.sun.star.sdb.DatabaseContext") -' oLocConnection = oLocDBContext.GetByName("Bibliography").GetConnection("","") -' MainWithDefault("Bibliography", oLocConnection, com.sun.star.sdb.CommandType.TABLE, "biblio") -End Sub - - -Sub MainWithDefault(Optional DatasourceName as String, Optional oConnection as Object, Optional CommandType as Integer, Optional sContent as String) -Dim i as Integer -Dim SelCount as Integer -Dim RetValue as Integer -Dim SelList(0) as Integer -Dim LocList() as String - SelList(0) = 0 - BasicLibraries.LoadLibrary("Tools") - BasicLibraries.LoadLibrary("WebWizard") - bDebug = False - If Not bDebug Then - On Local Error GoTo WIZARDERROR - End If - OpenFormDocument() - CurArrangement = 0 - bControlsareCreated = False - bEnableBinaryOptionGroup = False - bDisposeDoc = True - MaxIndex = -1 - If Not InitResources("Formwizard","dbw") Then - Exit Sub - End If - oDBContext = CreateUnoService("com.sun.star.sdb.DatabaseContext") - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - If GetFormWizardPaths() = False Then - Exit Sub - End If - oDocument.GetCurrentController().Frame.ComponentWindow.Enable = False - oProgressBar.Value = 10 - LoadLanguage() - oProgressBar.Value = 20 - InitializeWidthList() - oProgressBar.Value = 30 - Styles() = getListBoxArrays(oUcb, "/stl") - CurIndex = GetCurIndex(DialogModel, Styles(), 2) - oProgressBar.Value = 40 - ConfigurePageStyle() - oProgressBar.Value = 50 - InitializeLabelValues() - bNeedFieldRefresh = True - SetDialogLanguage() -' bStartUp = true - With DialogModel - .cmdBack.Enabled = False - .cmdGoOn.Enabled = False - .lblTables.Enabled = False - .lstSelFields.Tag = False - .Step = 1 - End With - oProgressBar.Value = 60 - bConnectionIsovergiven = Not IsMissing(oConnection) - If Not IsMissing(DataSourceName) Then - sDBName = DataSourceName - If Not IsMissing(oConnection) Then - ' Scenario 3: a data source and a connection are given - Set oDBConnection = oConnection - oDataSource = oDBContext.GetByName(DataSourceName) - DialogModel.lstTables.Enabled = True - DialogModel.lblTables.Enabled = True - If GetDBMetaData() Then - LocList() = AddListToList(TableNames(), QueryNames()) - iCommandTypes = CreateCommandTypeList() - If Not IsMissing(sContent) Then - ' Scenario 4: all parameters (data source name, connection, object type and object) are given - DialogModel.lstTables.StringItemList() = LocList() - iCommandTypes() = CreateCommandTypeList() - SelCount = CountItemsInArray(DialogModel.lstTables.StringItemList(), sContent) - If SelCount = 1 Then - DlgFormDB.GetControl("lstTables").SelectItem(sContent, True) - Else - If CommandType = com.sun.star.sdb.CommandType.QUERY Then - SelIndex = IndexInArray(sContent, QueryNames() - DlgFormDB.GetControl("lstTables").SelectItemPos(SelIndex, True) - ElseIf CommandType = com.sun.star.sdb.CommandType.TABLE Then - SelIndex = IndexInArray(sContent, TableNames() - DlgFormDB.GetControl("lstTables").SelectItemPos(Ubound(QueryNames()+1 + SelIndex, True) - End If - End If - CurCommandType = CommandType - FillUpFieldsListbox(False) - Else - LocList() = AddListToList(Array(sSelectDBTable), LocList()) - DialogModel.lstTables.StringItemList() = LocList() -' bSelectContent = True - DialogModel.lstTables.SelectedItems() = Array(0) - - End If - End If - Else - ' Scenario 2: Only Datasourcename is given, but no connection and no Content - GetSelectedDBMetaData(sDBName) - End If - Else - ' Scenario 1: No parameters are given - ToggleListboxControls(DialogModel, False) - End If - oProgressBar.Value = 80 - bWithBackGraphic = LoadNewStyles(oDocument, DialogModel, CurIndex, Styles(CurIndex, 8), Styles(), TexturePath) - DlgFormDB.Title = WizardTitle(1) - DialogModel.lstStyles.StringItemList() = ArrayfromMultiArray(Styles, 1) - DialogModel.lstStyles.SelectedItems() = SelList() - ControlCaptionsToStandardLayout() - oDocument.GetCurrentController().Frame.ComponentWindow.Enable = True - oProgressBar.Value = 90 - DialogModel.imgTheme.ImageURL = FormPath & "FormWizard_1.bmp" - DialogModel.imgTheme.BackGroundColor = RGB(0,60,126) - ToggleDatabasePage(True) - oProgressBar.Value = 100 - DlgFormDB.GetControl("lstTables").SetFocus() - oProgressbar.End - RetValue = DlgFormDB.Execute() - DlgFormDB.Dispose() - If bDisposeDoc Then - Dim aPropertyValues(2) as new com.sun.star.beans.PropertyValue - oFormDocuments = oDataSource.getFormDocuments() - DlgFormDB.Dispose() - oDocument.dispose() - Dim bLinkExists as Boolean - i = 1 - Dim FormBaseName as String - FormBaseName = FormName - Do - bLinkExists = oFormDocuments.HasbyHierarchicalName(FormName) - If bLinkExists Then - i = i + 1 - FormName = FormBaseName & "_" & i - End If - Loop Until Not bLinkExists - aPropertyValues(0).Name = "Name" - aPropertyValues(0).Value = FormName - aPropertyValues(1).Name = "Parent" - aPropertyValues(1).Value = oFormDocuments() - aPropertyValues(2).Name = "URL" - aPropertyValues(2).Value = sFormUrl - Dim oDBDocument - oDBDocument = oFormDocuments.createInstanceWithArguments("com.sun.star.sdb.DocumentDefinition", aPropertyValues()) - oFormDocuments.insertbyName(FormName, oDBDocument) - ElseIf RetValue = 0 Then - RemoveNirwanaShapes() - End If - If ((Not IsNull(oDBConnection)) And (Not bConnectionIsovergiven)) Then - oDBConnection.Dispose() - End If -WIZARDERROR: - If Err <> 0 Then - Msgbox(sMsgErrMsg, 16, GetProductName()) - Resume LOCERROR - LOCERROR: - End If -End Sub - - -Sub FormGetFields() -Dim i as Integer -' If bSelectContent Then -' bSelectContent = False -' Exit Sub -' End If - DeleteFirstListBoxEntry("lstTables", sSelectDBTable) - ToggleDatabasePage(False) - FillUpFieldsListbox(True) - ToggleDatabasePage(True) -End Sub - - -Sub FillUpFieldsListbox(bGetCommandType as Boolean) -Dim SelIndex as Integer -Dim QueryIndex as Integer - If Not bDebug Then - On Local Error GoTo NOFIELDS - End If - SelIndex = DlgFormDB.GetControl("lstTables").getSelectedItemPos() '.SelectedItems()) - If SelIndex > -1 Then - If bGetCommandType Then - CurCommandType = iCommandTypes(SelIndex) - End If - If CurCommandType = com.sun.star.sdb.CommandType.QUERY Then - QueryIndex = SelIndex - Ubound(Tablenames()) - 1 - Tablename = QueryNames(QueryIndex) - oColumns = oDBConnection.Queries.GetByName(TableName).Columns - Else - Tablename = Tablenames(SelIndex) - oColumns = oDBConnection.Tables.GetByName(Tablename).Columns - End If - If GetSpecificFieldNames() <> -1 Then - ToggleListboxControls(DialogModel, True) - Exit Sub - End If - End If - EmptyFieldsListboxes() -NOFIELDS: - If Err <> 0 Then - MsgBox sMsgErrCouldNotOpenObject, 16, sMsgWizardName - End If -End Sub - - -Sub PreviousStep() - If Not bDebug Then - On Local Error GoTo WIZARDERROR - End If - With DialogModel - .Step = 1 - .cmdBack.Enabled = False - .cmdGoOn.Enabled = True - .lstSelFields.Tag = Not bControlsareCreated - .cmdGoOn.Label = sGoOn - .imgTheme.ImageUrl = FormPath & "FormWizard_1.bmp" - End With - FormSetMoveRights() -WIZARDERROR: - If Err <> 0 Then - Msgbox(sMsgErrMsg, 16, GetProductName()) - Resume LOCERROR - LOCERROR: - End If -End Sub - - -Sub NextStep() - If Not bDebug Then - On Local Error GoTo WIZARDERROR - End If - Select Case DialogModel.Step - Case 1 - bControlsAreCreated = Not (cBool(DialogModel.lstSelFields.Tag)) - If Not bControlsAreCreated Then - GetTableMetaData() - CreateDBForm() - RemoveShapes() - InitializeLayoutSettings() - oDBForm.Load - End If - DialogModel.cmdGoOn.Label = sReady - DialogModel.cmdBack.Enabled = True - DialogModel.Step = 2 - bDisposeDoc = False - Case 2 - StoreForm() - DlgFormDB.EndExecute() - exit Sub - End Select - DialogModel.imgTheme.ImageUrl = FormPath & "FormWizard_" & DialogModel.Step & ".bmp" - DlgFormDB.Title = WizardTitle(DialogModel.Step) -WIZARDERROR: - If Err <> 0 Then - Msgbox(sMsgErrMsg, 16, GetProductName()) - Resume LOCERROR - LOCERROR: - End If -End Sub - - -Sub InitializeLayoutSettings() - SwitchArrangementButtons(cTabled) - SwitchAlignMode(SBALIGNLEFT) - SwitchBorderMode(SB3DBORDER) - ToggleBorderGroup(bControlsAreCreated) - ToggleAlignGroup(bControlsAreCreated) - ArrangeControls() - If OldAlignMode <> 0 Then - DlgFormDB.GetControl("optAlign2").Model.State = 0 - End If -End Sub - - -Sub ToggleDatabasePage(bDoEnable as Boolean) - With DialogModel - .cmdBack.Enabled = False - .cmdHelp.Enabled = bDoEnable - .cmdGoOn.Enabled = Ubound(DialogModel.lstSelFields.StringItemList()) <> -1 - .hlnBinaries.Enabled = ((bDoEnable = True) And (bEnableBinaryOptionGroup = True)) - .optIgnoreBinaries.Enabled = ((bDoEnable = True) And (bEnableBinaryOptionGroup = True)) - .optBinariesasGraphics.Enabled = ((bDoEnable = True) And (bEnableBinaryOptionGroup = True)) - End With -End Sub - - -' This Sub is called from the Procedure "StoreDocument" in the "Tools" Library -Sub CommitLastDocumentChanges(sTargetPath as String) -Dim i as Integer -Dim sBookmarkName as String -Dim oDBBookmarks as Object -Dim bLinkExists as Boolean -Dim sBaseBookmarkName as String - sBookmarkName = GetFileNamewithoutExtension(FileNameoutofPath(sTargetPath)) - sBaseBookmarkName = sBookmarkName - oDBBookmarks = oDataSource.GetBookmarks() - i = 1 - Do - bLinkExists = oDBBookmarks.HasbyName(sBookmarkName) - If bLinkExists Then - i = i + 1 - sBookmarkName = sBaseBookmarkName & "_" & i - Else - oDBBookmarks.insertByName(sBookmarkName, sTargetPath) - End If - Loop Until Not bLinkExists - bDisposeDoc = False - GroupShapesTogether() - ToggleDesignMode(oDocument) - oDBForm.Reload() -End Sub - - -Sub StoreFormInDatabase() - Dim NoArgs() as new com.sun.star.beans.PropertyValue - FormName = "Form_" & sDBName & "_" & TableName & ".sxw" - sFormUrl = TempPath & "/" & FormName - oDocument.StoreAsUrl(sFormUrl, NoArgs()) - bdisposeDoc = true - DlgFormDB.Endexecute() -End Sub - - - -Sub StoreForm() -Dim sTargetPath as String -Dim TypeNames(0,2) as String -Dim oMasterKey as Object -Dim oTypes() as Object - oMasterKey = GetRegistryKeyContent("org.openoffice.TypeDetection.Types/") - oTypes() = oMasterKey.Types - TypeNames(0,0) = GetFilterName("StarOffice XML (Writer)") - TypeNames(0,1) = "*.sxw" - TypeNames(0,2) = "" - StoreFormInDatabase() -' sTargetPath = StoreDocument(oDocument, TypeNames(), "Form_" & sDBName & "_" & TableName & ".sxw", WorkPath, 1) -End Sub - - - -Sub EmptyFieldsListboxes() -Dim NullList() as String - ToggleListboxControls(DialogModel, False) - DialogModel.lstFields.StringItemList() = NullList() - DialogModel.lstSelFields.StringItemList() = NullList() - bEnableBinaryOptionGroup = False -End Sub - - -Sub DeleteFirstTableListBoxEntry() - DeleteFirstListBoxEntry("lstTables", sSelectDBTable) -End Sub - -Sub DeleteFirstListboxEntry(ListBoxName as String, DelEntryName as String) -Dim oListbox as Object -Dim sFirstItem as String -dim iSelPos as Integer - oListBox = DlgFormDB.getControl(ListBoxName) - sFirstItem = oListBox.getItem(0) - If sFirstItem = DelEntryName Then - iSelPos = oListBox.getSelectedItemPos() - oListBox.removeItems(0, 1) - If iSelPos > 0 Then - oListBox.selectItemPos(iSelPos-1, True) - End If - End If -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/formwizard/Language.xba b/wizards/source/formwizard/Language.xba deleted file mode 100644 index 2f2b7e3ec..000000000 --- a/wizards/source/formwizard/Language.xba +++ /dev/null @@ -1,285 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Language" script:language="StarBasic">Option Explicit - - -Global Const RID_COMMON = 1000 -Global Const RID_FORM = 2200 - -Public Const SBCANCEL = 2 -Public Const SBREPEAT = 4 -Public LabelDiffHeight as Long -Public BasicLabelDiffHeight as Long - -Public WizardTitle(1 To 3) as String -Public DlgFormDB as Object -Public DialogModel as Object - -Dim sMsgWizardName as String -Dim sMsgErrMsg as String -Dim sMsgErrNoDatabase as String -Dim sMsgErrNoTableInDatabase as String -Dim sMsgErrTitleSuggestedExist as String -Dim sMsgErrTitleSyntaxError as String -Dim sMsgErrTitleAsTableExist as String -Dim sMsgProgressText as String -Dim sMsgCreatedForm as String -Dim sMsgErrCouldNotOpenObject as String -Dim sMsgErrNameToLong as String -Dim sTimeAppendix as String -Dim sDateAppendix as String -Public sGoOn as String -Public sReady as String -Public sMsgNoConnection as String -Public sWriterFilterName as String -Public XPixelFactor as Long -Public YPixelFactor as Long -Public sSelectDatasource as String -Public sSelectDBTable as String - - - -Sub LoadLanguage () - sMsgWizardName = GetResText(RID_FORM + 0) - sMsgErrMsg = GetResText(RID_COMMON + 6) - sMsgErrNoDatabase = GetResText(RID_COMMON + 8) - sMsgErrNoTableInDatabase = GetResText(RID_COMMON + 9) - sMsgErrTitleSuggestedExist = GetResText(RID_COMMON + 10) - sMsgErrTitleAsTableExist = GetResText(RID_COMMON + 10) - sMsgErrTitleSyntaxError = GetResText(RID_COMMON + 11) - sMsgNoConnection = GetResText(RID_COMMON + 14 - sMsgProgressText = GetResText(RID_FORM + 2) - sMsgCreatedForm = GetResText(RID_FORM + 26) - sMsgErrNameToLong = GetResText (RID_FORM + 27) - sMsgErrCouldNotOpenObject = GetResText (RID_COMMON + 13) - - ' Internal Logic - sDateAppendix = GetResText(RID_FORM + 4) - sTimeAppendix = GetResText(RID_FORM + 5) - - sReady = GetResText(RID_COMMON + 0) -End Sub - - -Sub SetDialogLanguage () -Dim i as Integer -Dim ButtonHelpText as String -Dim CmdButton as Object -Dim IDArray as Variant -Dim FNameAddOn as String -Dim slblSelFields as String -Dim slblFields as String - - DlgFormDB = LoadDialog("FormWizard", "DlgFormDB") - DialogModel = DlgFormDB.Model - - With DialogModel - .cmdCancel.Label = GetResText(RID_COMMON + 1) - .cmdBack.Label = GetResText(RID_COMMON + 2) - .cmdHelp.Label = GetResText(RID_COMMON + 20) - sGoOn = GetResText(RID_COMMON + 3) - .cmdGoOn.Label = sGoOn - .lblTables.Label = GetResText(RID_FORM + 6) - - slblFields = GetResText(RID_FORM + 12) - slblSelFields = GetResText(RID_FORM + 13) - .lblFields.Label = slblFields - .lblSelFields.Label = slblSelFields - - .lblStyles.Label = GetResText(RID_FORM + 21) - .hlnBorderLayout.Label = GetResText(RID_FORM + 28) - .hlnAlign.Label = GetResText(RID_FORM + 32) - .hlnArrangements.Label = GetResText(RID_FORM + 35) - - WizardTitle(1) = sMsgWizardName & " - " & GetResText(RID_FORM + 45) - WizardTitle(2) = sMsgWizardName & " - " & GetResText(RID_FORM + 46) - WizardTitle(3) = sMsgWizardName & " - " & GetResText(RID_FORM + 47) - - .hlnBinaries.Label = GetResText(RID_FORM + 50) - .optIgnoreBinaries.Label = GetResText(RID_FORM + 51) - .optBinariesasGraphics.Label = GetResText(RID_FORM + 52) - - .hlnBackground.Label = GetResText(RID_FORM + 55) - .optTiled.Label = GetResText(RID_FORM + 56) - .optArea.Label = GetResText(RID_FORM + 57) - - .optBorder0.Label = GetResText(RID_FORM + 29) - .optBorder1.Label = GetResText(RID_FORM + 30) - .optBorder2.Label = GetResText(RID_FORM + 31) - .optBorder1.State = 1 - - .optAlign0.Label = GetResText(RID_FORM + 33) - .optAlign2.Label = GetResText(RID_FORM + 34) - .optAlign0.State = 1 - - //FIXME: Remove this unused FNameAddOn through the file - FNameAddOn = "" - - IDArray = Array(36, 37, 40, 38, 39) - For i = 1 To 5 - ButtonHelpText = GetResText(RID_FORM + IDArray(i-1) - cmdButton = DlgFormDB.getControl("cmdArrange" & i) - cmdButton.Model.ImageURL = FormPath & "Arrange_" & i & FNameAddOn & ".gif" - cmdButton.Model.HelpText = ButtonHelpText - cmdButton.getPeer().setProperty("AccessibleName", ButtonHelpText) - Next i -' .cmdArrange1.ImageURL = FormPath & "Arrange_1" & FNameAddOn & ".gif" -' .cmdArrange1.HelpText = GetResText(RID_FORM + 36) -' -' .cmdArrange2.ImageURL = FormPath & "Arrange_2" & FNameAddOn & ".gif" -' .cmdArrange2.HelpText = GetResText(RID_FORM + 37) -' -' .cmdArrange3.ImageURL = FormPath & "Arrange_3" & FNameAddOn & ".gif" -' .cmdArrange3.HelpText = GetResText(RID_FORM + 40) -' -' .cmdArrange4.ImageURL = FormPath & "Arrange_4" & FNameAddOn & ".gif" -' .cmdArrange4.HelpText = GetResText(RID_FORM + 38) -' -' .cmdArrange5.ImageURL = FormPath & "Arrange_5" & FNameAddOn & ".gif" -' .cmdArrange5.HelpText = GetResText(RID_FORM + 39) - sWriterFilterName = GetResText(RID_FORM + 70) - End With - DlgFormDB.GetControl("cmdMoveSelected").getPeer().setProperty("AccessibleName", GetResText(RID_COMMON + 39) - DlgFormDB.GetControl("cmdRemoveSelected").getPeer().setProperty("AccessibleName", GetResText(RID_COMMON + 40) - DlgFormDB.GetControl("cmdMoveAll").getPeer().setProperty("AccessibleName", GetResText(RID_COMMON + 41) - DlgFormDB.GetControl("cmdRemoveAll").getPeer().setProperty("AccessibleName", GetResText(RID_COMMON + 42) - DlgFormDB.getControl("lstFields").getPeer().setProperty("AccessibleName", DeleteStr(slblFields, "~")) - DlgFormDB.getControl("lstSelFields").getPeer().setProperty("AccessibleName", DeleteStr(slblSelFields, "~")) - - sSelectDatasource = GetResText(RID_COMMON + 37) - sSelectDBTable = GetResText(RID_COMMON + 38) -End Sub - - - -Sub InitializeWidthList() - - If Ubound(WidthList(),1) > 16 Then - ReDim WidthList(16,4) - End If - - WidthList(0,0) = com.sun.star.sdbc.DataType.BIT ' = -7; - WidthList(0,1) = cCheckbox - WidthList(0,2) = False - WidthList(0,3) = "CheckBox" - - WidthList(1,0) = com.sun.star.sdbc.DataType.TINYINT ' = -6; - WidthList(1,1) = cNumericBox - WidthList(1,2) = False - WidthList(1,3) = "FormattedField" - - WidthList(2,0) = com.sun.star.sdbc.DataType.SMALLINT ' = 5; - WidthList(2,1) = cNumericBox - WidthList(2,2) = False - WidthList(2,3) = "FormattedField" - - WidthList(3,0) = com.sun.star.sdbc.DataType.INTEGER ' = 4; - WidthList(3,1) = cNumericBox - WidthList(3,2) = False - WidthList(3,3) = "FormattedField" - - WidthList(4,0) = com.sun.star.sdbc.DataType.BIGINT ' = -5; - WidthList(4,1) = cNumericBox - WidthList(4,2) = False - WidthList(4,3) = "FormattedField" - - WidthList(5,0) = com.sun.star.sdbc.DataType.FLOAT ' = 6; - WidthList(5,1) = cNumericBox - WidthList(5,2) = False - WidthList(5,3) = "FormattedField" - - WidthList(6,0) = com.sun.star.sdbc.DataType.REAL ' = 7; - WidthList(6,1) = cNumericBox - WidthList(6,2) = False - WidthList(6,3) = "FormattedField" - - WidthList(7,0) = com.sun.star.sdbc.DataType.DOUBLE ' = 8; - WidthList(7,1) = cNumericBox - WidthList(7,2) = False - WidthList(7,3) = "FormattedField" - - WidthList(8,0) = com.sun.star.sdbc.DataType.NUMERIC ' = 2; - WidthList(8,1) = cNumericBox - WidthList(8,2) = False - WidthList(8,3) = "FormattedField" - - WidthList(9,0) = com.sun.star.sdbc.DataType.DECIMAL ' = 3; (including decimal places) - WidthList(9,1) = cNumericBox - WidthList(9,2) = False - WidthList(9,3) = "FormattedField" - - WidthList(10,0) = com.sun.star.sdbc.DataType.CHAR ' = 1; - WidthList(10,1) = cTextBox - WidthList(10,2) = False - WidthList(10,3) = "TextField" - - WidthList(11,0) = com.sun.star.sdbc.DataType.VARCHAR ' = 12; - WidthList(11,1) = cTextBox - WidthList(11,2) = True - WidthList(11,3) = "TextField" - - WidthList(12,0) = com.sun.star.sdbc.DataType.LONGVARCHAR ' = -1; - WidthList(12,1) = cTextBox - WidthList(12,2) = True - WidthList(12,3) = "TextField" - - WidthList(13,0) = com.sun.star.sdbc.DataType.DATE ' = 91; - WidthList(13,1) = cDateBox - WidthList(13,2) = False - WidthList(13,3) = "DateField" - - WidthList(14,0) = com.sun.star.sdbc.DataType.TIME ' = 92; - WidthList(14,1) = cTimeBox - WidthList(14,2) = False - WidthList(14,3) = "TimeField" - - WidthList(15,0) = com.sun.star.sdbc.DataType.TIMESTAMP ' = 93; - WidthList(15,1) = cDateBox - WidthList(15,2) = False - WidthList(15,3) = "DateField" - - WidthList(16,0) = com.sun.star.sdbc.DataType.BOOLEAN ' = 16; - WidthList(16,1) = cCheckbox - WidthList(16,2) = False - WidthList(16,3) = "CheckBox" - - ImgWidthList(0,0) = com.sun.star.sdbc.DataType.BINARY ' = -2; - ImgWidthList(0,1) = cImageControl - ImgWidthList(0,2) = False - ImgWidthList(0,3) = "ImageControl" - - ImgWidthList(1,0) = com.sun.star.sdbc.DataType.VARBINARY ' = -3; - ImgWidthList(1,1) = cImageControl - ImgWidthList(1,2) = False - ImgWidthList(1,3) = "ImageControl" - - ImgWidthList(2,0) = com.sun.star.sdbc.DataType.LONGVARBINARY ' = -4; - ImgWidthList(2,1) = cImageControl - ImgWidthList(2,2) = False - ImgWidthList(2,3) = "ImageControl" - - ImgWidthList(3,0) = com.sun.star.sdbc.DataType.BLOB ' = 2004; - ImgWidthList(3,1) = cImageControl - ImgWidthList(3,2) = False - ImgWidthList(3,3) = "ImageControl" - -' Note: the following Fieldtypes are ignored -'ExcludeList(0) = com.sun.star.sdbc.DataType.SQLNULL -'ExcludeList(1) = com.sun.star.sdbc.DataType.OTHER -'ExcludeList(2) = com.sun.star.sdbc.DataType.OBJECT -'ExcludeList(3) = com.sun.star.sdbc.DataType.DISTINCT -'ExcludeList(4) = com.sun.star.sdbc.DataType.STRUCT -'ExcludeList(5) = com.sun.star.sdbc.DataType.ARRAY -'ExcludeList(6) = com.sun.star.sdbc.DataType.CLOB -'ExcludeList(7) = com.sun.star.sdbc.DataType.REF - - oModelService(cLabel) = "com.sun.star.form.component.FixedText" - oModelService(cTextBox) = "com.sun.star.form.component.TextField" - oModelService(cCheckBox) = "com.sun.star.form.component.CheckBox" - oModelService(cDateBox) = "com.sun.star.form.component.DateField" - oModelService(cTimeBox) = "com.sun.star.form.component.TimeField" - oModelService(cNumericBox) = "com.sun.star.form.component.FormattedField" - oModelService(cGridControl) = "com.sun.star.form.component.GridControl" - oModelService(cImageControl) = "com.sun.star.form.component.DatabaseImageControl" -End Sub -</script:module> diff --git a/wizards/source/formwizard/Layouter.xba b/wizards/source/formwizard/Layouter.xba deleted file mode 100644 index ae10314bb..000000000 --- a/wizards/source/formwizard/Layouter.xba +++ /dev/null @@ -1,380 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Layouter" script:language="StarBasic">Option Explicit - -Public oProgressbar as Object -Public ProgressValue as Integer -Public oDocument as Object -Public oController as Object -Public oForm as Object -Public oDrawPage as Object -Public oPageStyle as Object - -Public nMaxColRightX as Long -Public nMaxTCWidth as Long -Public nMaxRowRightX as Long -Public nMaxRowY as Long -Public nSecMaxRowY as Long -Public MaxIndex as Integer -Public CurIndex as Integer - -Public Const cVertDistance = 200 -Public Const cHoriDistance = 300 - -Public nPageWidth as Long -Public nPageHeight as Long -Public nFormWidth as Long -Public nFormHeight as Long -Public nMaxHoriPos as Long -Public nMaxVertPos as Long - -Public CONST SBALIGNLEFT = 0 -Public CONST SBALIGNRIGHT = 2 - -Public Const SBNOBORDER = 0 -Public Const SB3DBORDER = 1 -Public Const SBSIMPLEBORDER = 2 - -Public CurArrangement as Integer -Public CurBorderType as Integer -Public CurAlignmode as Integer - -Public OldAlignMode as Integer -Public OldBorderType as Integer -Public OldArrangement as Integer - -Public Const cColumnarLeft = 1 -Public Const cColumnarTop = 2 -Public Const cTabled = 3 -Public Const cLeftJustified = 4 -Public Const cTopJustified = 5 - -Public Const cXOffset = 1000 -Public Const cYOffset = 700 -' This is the viewed space that we lose because of the symbol bars -Public Const cSymbolMargin = 2000 -Public Const MaxFieldIndex = 200 - -Public Const cControlCollectionCount = 9 -Public Const cLabel = 1 -Public Const cTextBox = 2 -Public Const cCheckBox = 3 -Public Const cDateBox = 4 -Public Const cTimeBox = 5 -Public Const cNumericBox = 6 -Public Const cCurrencyBox = 7 -Public Const cGridControl = 8 -Public Const cImageControl = 9 - -Public Styles(100, 8) as String - -Public CurControlType as Integer -Public CurFieldlength as Double -Public CurFieldType as Integer -Public CurFieldName as String -Public CurControlName as String -Public CurFormatKey as Long -Public CurDefaultValue -Public CurIsCurrency as Boolean -Public CurScale as Integer -Public CurHelpText as String - -Public FieldMetaValues(MaxFieldIndex, 8) -' Description of this List: -' CurFieldType = FieldMetaValues(Index,0) -' CurFieldLength = FieldMetaValues(Index,1) -' CurControlType = FieldMetaValues(Index,2) (ControlType eg. cLabel, cTextbox usw.) -' CurControlName = FieldMetaValues(Index,3) -' CurFormatKey = FieldMetaValues(Index,4) -' CurDefaultValue = FieldMetaValues(Index,5) -' CurIsCurrency = FieldMetaValues(Index,6) -' CurScale = FieldMetaValues(Index,7) -' CurHelpText = FieldMetaValues(Index,8) - -Public FieldNames(MaxFieldIndex) as string -Public oModelService(cControlCollectionCount) as String -Public oGridModel as Object - - -Function InsertControl(oContainer as Object, oControlObject as object, aPoint as Object, aSize as Object) -Dim oShape as object - oShape = oDocument.CreateInstance ("com.sun.star.drawing.ControlShape") - oShape.Size = aSize - oShape.Position = aPoint - oShape.AnchorType = com.sun.star.text.TextContentAnchorType.AT_PARAGRAPH - oShape.control = oControlObject - oContainer.Add(oShape) - InsertControl() = oShape -End Function - - -Function ArrangeControls() -Dim oShape as Object -Dim i as Integer - oProgressbar = oDocument.GetCurrentController.GetFrame.CreateStatusIndicator - oProgressbar.Start("", MaxIndex) - If oDBForm.HasbyName("Grid1") Then - RemoveShapes() - End If - ToggleLayoutPage(False) - Select Case CurArrangement - Case cTabled - PositionGridControl(MaxIndex) - Case Else - PositionControls(MaxIndex) - End Select - ToggleLayoutPage(True) - oProgressbar.End -End Function - - -Sub OpenFormDocument() -Dim NoArgs() as new com.sun.star.beans.PropertyValue -Dim oViewSettings as Object - oDocument = CreateNewDocument("swriter") - oProgressbar = oDocument.GetCurrentController.GetFrame.CreateStatusIndicator() - oProgressbar.Start("", 100) - oDocument.ApplyFormDesignMode = False - oController = oDocument.GetCurrentController - oViewSettings = oDocument.CurrentController.ViewSettings - oViewSettings.ShowTableBoundaries = False - oViewSettings.ShowOnlineLayout = True - oDrawPage = oDocument.DrawPage - oPageStyle = oDocument.StyleFamilies.GetByName("PageStyles").GetByName("Standard") -End Sub - - -Sub InitializeLabelValues() -Dim oLabelModel as Object -Dim oTBModel as Object -Dim oLabelShape as Object -Dim oTBShape as Object -Dim aTBSize As New com.sun.star.awt.Size -Dim aLabelSize As New com.sun.star.awt.Size -Dim aPoint As New com.sun.star.awt.Point -Dim aSize As New com.sun.star.awt.Size -Dim oLocControl as Object -Dim oLocPeer as Object - oLabelModel = CreateUnoService("com.sun.star.form.component.FixedText") - oTBModel = CreateUnoService("com.sun.star.form.component.TextField") - - Set oLabelShape = InsertControl(oDrawPage, oLabelModel, aPoint, aLabelSize) - Set oTBShape = InsertControl(oDrawPage, oTBModel, aPoint, aSize) - - oLocPeer = oController.GetControl(oLabelModel).Peer - XPixelFactor = 100000/oLocPeer.GetInfo.PixelPerMeterX - YPixelFactor = 100000/oLocPeer.GetInfo.PixelPerMeterY - aLabelSize = GetPeerSize(oLabelModel, oLocControl, "The quick brown fox...") - nTCHeight = (aLabelSize.Height+1) * YPixelFactor - aTBSize = GetPeerSize(oTBModel, oLocControl, "The quick brown fox...") - nDBRefHeight = (aTBSize.Height+1) * YPixelFactor - BasicLabelDiffHeight = Clng((nDBRefHeight - nTCHeight)/2) - oDrawPage.Remove(oLabelShape) - oDrawPage.Remove(oTBShape) -End Sub - - -Sub ConfigurePageStyle() -Dim aPageSize As New com.sun.star.awt.Size -Dim aSize As New com.sun.star.awt.Size - oPageStyle.IsLandscape = True - aPageSize = oPageStyle.Size - nPageWidth = aPageSize.Width - nPageHeight = aPageSize.Height - aSize.Width = nPageHeight - aSize.Height = nPageWidth - oPageStyle.Size = aSize - nPageWidth = nPageHeight - nPageHeight = oPageStyle.Size.Height - nFormWidth = nPageWidth - oPageStyle.RightMargin - oPageStyle.LeftMargin - 2 * cXOffset - nFormHeight = nPageHeight - oPageStyle.TopMargin - oPageStyle.BottomMargin - 2 * cYOffset - cSymbolMargin -End Sub - - -' Modify the Borders of the Controls -Sub ChangeBorderLayouts(oEvent as Object) -Dim oModel as Object -Dim i as Integer -Dim oCurModel as Object -Dim sLocText as String -Dim oGroupShape as Object -Dim s as Integer - If Not bDebug Then - On Local Error GoTo WIZARDERROR - End If - oModel = oEvent.Source.Model - SwitchBorderMode(Val(Right(oModel.Name,1))) - ToggleLayoutPage(False) - If CurArrangement = cTabled Then - oGridModel.Border = CurBorderType - Else - If OldBorderType <> CurBorderType Then - For i = 0 To MaxIndex - If oDBShapeList(i).SupportsService("com.sun.star.drawing.GroupShape") Then - oGroupShape = oDBShapeList(i) - For s = 0 To oGroupShape.Count-1 - oGroupShape(s).Control.Border = CurBorderType - Next s - Else - If oDBModelList(i).PropertySetInfo.HasPropertyByName("Border") Then - oDBModelList(i).Border = CurBorderType - End If - End If - Next i - End If - End If - ToggleLayoutPage(True) -WIZARDERROR: - If Err <> 0 Then - Msgbox(sMsgErrMsg, 16, GetProductName()) - Resume LOCERROR - LOCERROR: - DlgFormDB.Dispose() - End If -End Sub - - -Sub ChangeLabelAlignments(oEvent as Object) -Dim i as Integer -Dim oSize as New com.sun.star.awt.Size -Dim oModel as Object - If Not bDebug Then - On Local Error GoTo WIZARDERROR - End If - oModel = oEvent.Source.Model - SwitchAlignMode(Val(Right(oModel.Name,1))) - ToggleLayoutPage(False) - If OldAlignMode <> CurAlignMode Then - For i = 0 To MaxIndex - oTCShapeList(i).GetControl.Align = CurAlignmode - Next i - End If - If CurAlignmode = com.sun.star.awt.TextAlign.RIGHT Then - For i = 0 To Ubound(oTCShapeList()) - oSize = oTCShapeList(i).Size - oSize.Width = oDBShapeList(i).Position.X - oTCShapeList(i).Position.X - cHoriDistance - oTCShapeList(i).Size = oSize - Next i - End If - -WIZARDERROR: - If Err <> 0 Then - Msgbox(sMsgErrMsg, 16, GetProductName()) - Resume LOCERROR - LOCERROR: - End If - ToggleLayoutPage(True) -End Sub - - -Sub ChangeArrangemode(oEvent as Object) -Dim oModel as Object - If Not bDebug Then - On Local Error GoTo WIZARDERROR - End If - oModel = oEvent.Source.Model - SwitchArrangementButtons(Val(Right(oModel.Name,1))) - oModel.State = 1 - DlgFormDB.GetControl("cmdArrange" & OldArrangement).Model.State = 0 - If CurArrangement <> OldArrangement Then - ArrangeControls() - Select Case CurArrangement - Case cTabled - ToggleBorderGroup(False) - ToggleAlignGroup(False) - Case Else ' cColumnarTop,cLeftJustified, cTopJustified - ToggleAlignGroup(CurArrangement = cColumnarLeft) - If CurArrangement = cColumnarTop Then - If CurAlignMode = com.sun.star.awt.TextAlign.RIGHT Then - DialogModel.optAlign0.State = 1 - CurAlignMode = com.sun.star.awt.TextAlign.LEFT - OldAlignMode = com.sun.star.awt.TextAlign.RIGHT - End If - End If - ControlCaptionstoStandardLayout() - oDBForm.Load - End Select - End If -WIZARDERROR: - If Err <> 0 Then - Msgbox(sMsgErrMsg, 16, GetProductName()) - Resume LOCERROR - LOCERROR: - End If -End Sub - - -Sub ToggleBorderGroup(bDoEnable as Boolean) - With DialogModel - .hlnBorderLayout.Enabled = bDoEnable - .optBorder0.Enabled = bDoEnable ' 0: No border - .optBorder1.Enabled = bDoEnable ' 1: 3D border - .optBorder2.Enabled = bDoEnable ' 2: simple border - End With -End Sub - - -Sub ToggleAlignGroup(ByVal bDoEnable as Boolean) - With DialogModel - If bDoEnable Then - bDoEnable = CurArrangement = cColumnarLeft - End If - .hlnAlign.Enabled = bDoEnable - .optAlign0.Enabled = bDoEnable - .optAlign2.Enabled = bDoEnable - End With -End Sub - - -Sub ToggleLayoutPage(bDoEnable as Boolean, Optional FocusControlName as String) - DialogModel.Enabled = bDoEnable - If bDoEnable Then - If Not bDebug Then - oDocument.UnlockControllers() - End If - ToggleOptionButtons(DialogModel,(bWithBackGraphic = True)) - ToggleAlignGroup(bDoEnable) - ToggleBorderGroup(bDoEnable) - Else - If Not bDebug Then - oDocument.LockControllers() - End If - End If - If Not IsMissing(FocusControlName) Then - DlgFormDB.GetControl(FocusControlName).SetFocus() - End If -End Sub - - -Sub DestroyControlShapes(oDrawPage as Object) -Dim i as Integer -Dim oShape as Object - For i = oDrawPage.Count-1 To 0 Step -1 - oShape = oDrawPage.GetByIndex(i) - If oShape.ShapeType = "com.sun.star.drawing.ControlShape" Then - oShape.Dispose() - End If - Next i -End Sub - - -Sub SwitchArrangementButtons(ByVal LocArrangement as Integer) - OldArrangement = CurArrangement - CurArrangement = LocArrangement - If OldArrangement <> 0 Then - DlgFormDB.GetControl("cmdArrange" & OldArrangement).Model.State = 0 - End If - DlgFormDB.GetControl("cmdArrange" & CurArrangement).Model.State = 1 -End Sub - - -Sub SwitchBorderMode(ByVal LocBorderType as Integer) - OldBorderType = CurBorderType - CurBorderType = LocBorderType -End Sub - - -Sub SwitchAlignMode(ByVal LocAlignMode as Integer) - OldAlignMode = CurAlignMode - CurAlignMode = LocAlignMode -End Sub</script:module>
\ No newline at end of file diff --git a/wizards/source/formwizard/dbwizres.src b/wizards/source/formwizard/dbwizres.src deleted file mode 100644 index 160bb08d9..000000000 --- a/wizards/source/formwizard/dbwizres.src +++ /dev/null @@ -1,3518 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/// common - -#define RID_COMMON_START 500 -#define RID_DB_COMMON_START 1000 - -// db wizards - -#define RID_DB_FORM_WIZARD_START 2200 -#define RID_DB_QUERY_WIZARD_START 2300 -#define RID_DB_REPORT_WIZARD_START 2400 -#define RID_DB_TABLE_WIZARD_START 2500 - - -#define RID_LETTERWIZARDDIALOG_START 3000 -#define RID_LETTERWIZARDGREETING_START 3080 -#define RID_LETTERWIZARDSALUTATION_START 3090 -#define RID_LETTERWIZARDROADMAP_START 3100 -#define RID_LETTERWIZARDLANGUAGE_START 3110 - - -#define RID_FAXWIZARDDIALOG_START 3200 -#define RID_FAXWIZARDCOMMUNICATION_START 3270 -#define RID_FAXWIZARDGREETING_START 3280 -#define RID_FAXWIZARDSALUTATION_START 3290 -#define RID_FAXWIZARDROADMAP_START 3300 - -// web wizard - -#define RID_WEBWIZARDDIALOG_START 4000 -#define RID_WEBWIZARDDIALOG_FTP 4200 - -// agenda wizard - -#define RID_AGENDAWIZARDDIALOG_START 5000 - - - -// ============================================================================ - -String RID_COMMON_START + 0 -{ - Text [ en-US ] = "The directory '%1' could not be created.<BR>There may not be enough space left on your hard disk."; -}; - -String RID_COMMON_START + 1 -{ - Text [ en-US] = "The text document could not be created.<BR>Please check if the module 'PRODUCTNAME Writer' is installed."; -}; - -String RID_COMMON_START + 2 -{ - Text [ en-US] = "The spreadsheet could not be created.<BR>Please check if the module 'PRODUCTNAME Calc' is installed."; -}; - -String RID_COMMON_START + 3 -{ - Text [ en-US] = "The presentation could not be created.<BR>Please check if the module 'PRODUCTNAME Impress' is installed."; -}; - -String RID_COMMON_START + 4 -{ - Text [ en-US] = "The drawing could not be created.<BR>Please check if the module 'PRODUCTNAME Draw' is installed."; -}; - -String RID_COMMON_START + 5 -{ - Text [ en-US] = "The formula could not be created.<BR>Please check if the module 'PRODUCTNAME Math' is installed."; -}; - -String RID_COMMON_START + 6 -{ - Text [ en-US] = "The files required could not be found.<BR>Please start the %PRODUCTNAME Setup and choose 'Repair'."; -}; - -String RID_COMMON_START + 7 -{ - Text [ en-US] = "The file '<PATH>' already exists.<BR><BR>Would you like to overwrite the existing file?"; -}; - -String RID_COMMON_START + 8 -{ - Text [ en-US] = "Yes"; -}; - -String RID_COMMON_START + 9 -{ - Text [ en-US] = "Yes to All"; -}; - -String RID_COMMON_START + 10 -{ - Text [ en-US] = "No"; -}; - -String RID_COMMON_START + 11 -{ - Text [ en-US] = "Cancel"; -}; - -String RID_COMMON_START + 12 -{ - Text [ en-US] = "~Finish"; -}; - -String RID_COMMON_START + 13 -{ - Text [ en-US] = "< ~Back"; -}; - -String RID_COMMON_START + 14 -{ - Text [ en-US] = "~Next >"; -}; - -String RID_COMMON_START + 15 -{ - Text [ en-US ] = "~Help"; -}; - -String RID_COMMON_START + 16 -{ - Text [ en-US] = "Steps"; -}; - -String RID_COMMON_START + 17 -{ - Text [ en-US] = "Close"; -}; - -String RID_COMMON_START + 18 -{ - Text [ en-US] = "OK"; -}; - -String RID_COMMON_START + 19 -{ - Text [ en-US] = "The file already exists. Do you want to overwrite it?"; -}; - -String RID_COMMON_START + 20 -{ - Text [ en-US] = "Template created via <wizard_name> on <current_date>."; -}; - -String RID_COMMON_START + 21 -{ - Text [ en-US] = "The wizard could not be run, because important files were not found.\nUnder 'Tools - Options - %PRODUCTNAME - Paths' click the 'Default' button to reset the paths to the original default settings.\nThen run the wizard again."; -}; - - -// end of common section ====================================================== - - -String RID_DB_COMMON_START + 0 -{ - Text [ en-US] = "C~reate"; -}; -String RID_DB_COMMON_START + 1 -{ - Text [ en-US] = "~Cancel"; -}; - -String RID_DB_COMMON_START + 2 -{ - Text [ en-US] = "<< ~Back"; -}; - -String RID_DB_COMMON_START + 3 -{ - Text [ en-US] = "~Next >>"; -}; -String RID_DB_COMMON_START + 4 -{ - Text [ en-US] = "~Database"; -}; -String RID_DB_COMMON_START + 5 -{ - Text [ en-US] = "~Table name"; -}; - -String RID_DB_COMMON_START + 6 -{ - Text [ en-US] = "An error occurred while running the wizard. The wizard will be terminated."; -}; - - -String RID_DB_COMMON_START + 14 -{ - Text [ en-US ] = "No connection to the database could be established."; -}; - -String RID_DB_COMMON_START + 20 -{ - Text [ en-US ] = "~Help"; -}; - -String RID_DB_COMMON_START + 21 -{ - Text [ en-US ] = "~Stop"; -}; - - -String RID_DB_COMMON_START + 30 -{ - Text[ en-US ] = "The document could not be saved."; -}; - - -String RID_DB_COMMON_START + 33 -{ - Text[ en-US ] = "Exiting the wizard"; -}; - -String RID_DB_COMMON_START + 34 -{ - Text[ en-US ] = "Connecting to data source..."; -}; - -String RID_DB_COMMON_START + 35 -{ - Text[ en-US ] = "The connection to the data source could not be established."; -}; - - -String RID_DB_COMMON_START + 36 -{ - Text[ en-US ] = "The file path entered is not valid."; -}; - - -String RID_DB_COMMON_START + 37 -{ - Text[ en-US ] = "Please select a data source"; -}; - -String RID_DB_COMMON_START + 38 -{ - Text[ en-US ] = "Please select a table or query"; -}; - -String RID_DB_COMMON_START + 39 -{ - Text[ en-US ] = "Add field"; -}; - -String RID_DB_COMMON_START + 40 -{ - Text[ en-US ] = "Remove field"; -}; - -String RID_DB_COMMON_START + 41 -{ - Text[ en-US ] = "Add all fields"; -}; - -String RID_DB_COMMON_START + 42 -{ - Text[ en-US ] = "Remove all fields"; -}; - -String RID_DB_COMMON_START + 43 -{ - Text[ en-US ] = "Move field up"; -}; - -String RID_DB_COMMON_START + 44 -{ - Text[ en-US ] = "Move field down"; -}; - -String RID_DB_COMMON_START + 45 -{ - Text [ en-US] = "The field names from '%NAME' could not be retrieved."; -}; - - - -// ============================================================================ -// Form Wizard -// ============================================================================ - -String RID_DB_FORM_WIZARD_START + 0 -{ - Text [ en-US ] = "Form Wizard"; -}; - -String RID_DB_FORM_WIZARD_START + 1 -{ - Text [ en-US ] = "Fields in ~the form"; -}; - -String RID_DB_FORM_WIZARD_START + 2 -{ - Text [ en-US ] = "Binary fields are always listed and selectable from the left list.\nIf possible, they are interpreted as images."; -}; - -String RID_DB_FORM_WIZARD_START + 3 -{ - Text [ en-US ] = "A subform is a form that is inserted in another form.\nUse subforms to show data from tables or queries with a one-to-many relationship."; -}; - -String RID_DB_FORM_WIZARD_START + 4 -{ - Text [ en-US ] = "~Add Subform"; -}; - -String RID_DB_FORM_WIZARD_START + 5 -{ - Text [ en-US ] = "~Subform based on existing relation"; -}; - -String RID_DB_FORM_WIZARD_START + 6 -{ - Text [ en-US ] = "Tables or queries"; -}; - -String RID_DB_FORM_WIZARD_START + 7 -{ - Text [ en-US ] = "Subform based on ~manual selection of fields"; -}; - -String RID_DB_FORM_WIZARD_START + 8 -{ - Text [ en-US ] = "~Which relation do you want to add?"; -}; - -String RID_DB_FORM_WIZARD_START + 9 -{ - Text [ en-US ] = "Fields in the ~subform"; -}; - -String RID_DB_FORM_WIZARD_START + 12 -{ - Text [ en-US ] = "~Available fields"; -}; - -String RID_DB_FORM_WIZARD_START + 13 -{ - Text [ en-US ] = "Fields in form"; -}; - - -String RID_DB_FORM_WIZARD_START + 19 -{ - Text [ en-US ] = "The join '<FIELDNAME1>' and '<FIELDNAME2>' has been selected twice.\nBut joins may only be used once."; -}; - -String RID_DB_FORM_WIZARD_START + 20 -{ - Text [ en-US ] = "~First joined subform field"; -}; - -String RID_DB_FORM_WIZARD_START + 21 -{ - Text [ en-US ] = "~Second joined subform field"; -}; - -String RID_DB_FORM_WIZARD_START + 22 -{ - Text [ en-US ] = "~Third joined subform field"; -}; - -String RID_DB_FORM_WIZARD_START + 23 -{ - Text [ en-US ] = "~Fourth joined subform field"; -}; - -String RID_DB_FORM_WIZARD_START + 24 -{ - Text [ en-US ] = "F~irst joined main form field"; -}; - -String RID_DB_FORM_WIZARD_START + 25 -{ - Text [ en-US ] = "S~econd joined main form field"; -}; - -String RID_DB_FORM_WIZARD_START + 26 -{ - Text [ en-US ] = "T~hird joined main form field"; -}; - -String RID_DB_FORM_WIZARD_START + 27 -{ - Text [ en-US ] = "F~ourth joined main form field"; -}; - - - -String RID_DB_FORM_WIZARD_START + 28 -{ - Text [ en-US ] = "Field border"; -}; - -String RID_DB_FORM_WIZARD_START + 29 -{ - Text [ en-US ] = "No border"; -}; - - -String RID_DB_FORM_WIZARD_START + 30 -{ - Text [ en-US ] = "3D look"; -}; - -String RID_DB_FORM_WIZARD_START + 31 -{ - Text [ en-US ] = "Flat"; -}; - -String RID_DB_FORM_WIZARD_START + 32 -{ - Text [ en-US ] = "Label placement"; -}; - -String RID_DB_FORM_WIZARD_START + 33 -{ - Text [ en-US ] = "Align left"; -}; - -String RID_DB_FORM_WIZARD_START + 34 -{ - Text [ en-US ] = "Align right"; -}; - -String RID_DB_FORM_WIZARD_START + 35 -{ - Text [ en-US ] = "Arrangement of DB fields"; -}; - -String RID_DB_FORM_WIZARD_START + 36 -{ - Text [ en-US ] = "Columnar - Labels Left"; -}; - -String RID_DB_FORM_WIZARD_START + 37 -{ - Text [ en-US ] = "Columnar - Labels on Top"; -}; - -String RID_DB_FORM_WIZARD_START + 38 -{ - Text [ en-US ] = "In Blocks - Labels Left"; -}; - -String RID_DB_FORM_WIZARD_START + 39 -{ - Text [ en-US ] = "In Blocks - Labels Above"; -}; - -String RID_DB_FORM_WIZARD_START + 40 -{ - Text [ en-US ] = "As Data Sheet"; -}; - - -String RID_DB_FORM_WIZARD_START + 41 -{ - Text [ en-US ] = "Arrangement of the main form"; -}; - -String RID_DB_FORM_WIZARD_START + 42 -{ - Text [ en-US ] = "Arrangement of the subform"; -}; - - -String RID_DB_FORM_WIZARD_START + 44 -{ - Text [ en-US ] = "The form is to be ~used for entering new data only."; -}; - -String RID_DB_FORM_WIZARD_START + 45 -{ - Text [ en-US ] = "Existing data will not be displayed "; -}; - -String RID_DB_FORM_WIZARD_START + 46 -{ - Text [ en-US ] = "T~he form is to display all data"; -}; - -String RID_DB_FORM_WIZARD_START + 47 -{ - Text [ en-US ] = "Do not allow ~modification of existing data"; -}; - -String RID_DB_FORM_WIZARD_START + 48 -{ - Text [ en-US ] = "Do not allow ~deletion of existing data"; -}; - -String RID_DB_FORM_WIZARD_START + 49 -{ - Text [ en-US ] = "Do not allow ~addition of new data"; -}; - - - -String RID_DB_FORM_WIZARD_START + 50 -{ - Text [ en-US ] = "Name of ~the form"; -}; - - - -String RID_DB_FORM_WIZARD_START + 51 -{ - Text [ en-US ] = "How do you want to proceed after creating the form?"; -}; - - -String RID_DB_FORM_WIZARD_START + 52 -{ - Text [ en-US ] = "~Work with the form"; -}; - -String RID_DB_FORM_WIZARD_START + 53 -{ - Text [ en-US ] = "~Modify the form"; -}; - - -String RID_DB_FORM_WIZARD_START + 55 -{ - Text [ en-US ] = "~Page Styles"; -}; - - - -String RID_DB_FORM_WIZARD_START + 80 -{ - Text [ en-US ] = "Field selection"; -}; - - -String RID_DB_FORM_WIZARD_START + 81 -{ - Text [ en-US ] = "Set up a subform"; -}; - - -String RID_DB_FORM_WIZARD_START + 82 -{ - Text [ en-US ] = "Add subform fields"; -}; - -String RID_DB_FORM_WIZARD_START + 83 -{ - Text [ en-US ] = "Get joined fields"; -}; - -String RID_DB_FORM_WIZARD_START + 84 -{ - Text [ en-US ] = "Arrange controls"; -}; - -String RID_DB_FORM_WIZARD_START + 85 -{ - Text [ en-US ] = "Set data entry"; -}; - -String RID_DB_FORM_WIZARD_START + 86 -{ - Text [ en-US ] = "Apply styles"; -}; - -String RID_DB_FORM_WIZARD_START + 87 -{ - Text [ en-US ] = "Set name"; -}; - -String RID_DB_FORM_WIZARD_START + 88 -{ - Text [ en-US ] = "(Date)"; -}; - -String RID_DB_FORM_WIZARD_START + 89 -{ - Text [ en-US ] = "(Time)"; -}; - - -String RID_DB_FORM_WIZARD_START + 90 -{ - Text [ en-US ] = "Select the fields of your form"; -}; - - -String RID_DB_FORM_WIZARD_START + 91 -{ - Text [ en-US ] = "Decide if you want to set up a subform"; -}; - -String RID_DB_FORM_WIZARD_START + 92 -{ - Text [ en-US ] = "Select the fields of your subform"; -}; - -String RID_DB_FORM_WIZARD_START + 93 -{ - Text [ en-US ] = "Select the joins between your forms"; -}; - -String RID_DB_FORM_WIZARD_START + 94 -{ - Text [ en-US ] = "Arrange the controls on your form"; -}; - -String RID_DB_FORM_WIZARD_START + 95 -{ - Text [ en-US ] = "Select the data entry mode"; -}; - -String RID_DB_FORM_WIZARD_START + 96 -{ - Text [ en-US ] = "Apply the style of your form"; -}; - -String RID_DB_FORM_WIZARD_START + 97 -{ - Text [ en-US ] = "Set the name of the form"; -}; - -String RID_DB_FORM_WIZARD_START + 98 -{ - Text [ en-US ] = "A form with the name '%FORMNAME' already exists.\nChoose another name."; -}; - - -// ============================================================================ - -String RID_DB_QUERY_WIZARD_START + 0 -{ - Text [ en-US ] = "Query Wizard"; -}; - -String RID_DB_QUERY_WIZARD_START + 1 -{ - Text [ en-US] = "Query"; -}; - - -String RID_DB_QUERY_WIZARD_START + 2 -{ - Text [ en-US] = "Query Wizard"; -}; - - -String RID_DB_QUERY_WIZARD_START + 3 -{ - Text [ en-US] = "~Tables"; -}; - -String RID_DB_QUERY_WIZARD_START + 4 -{ - Text [ en-US] = "A~vailable fields"; -}; - - -String RID_DB_QUERY_WIZARD_START + 5 -{ - Text [ en-US] = "Name ~of the query"; -}; - -String RID_DB_QUERY_WIZARD_START + 6 -{ - Text [ en-US] = "Display ~Query"; -}; - -String RID_DB_QUERY_WIZARD_START + 7 -{ - Text [ en-US] = "~Modify Query"; -}; - -String RID_DB_QUERY_WIZARD_START + 8 -{ - Text [ en-US] = "~How do you want to proceed after creating the query?"; -}; - - -String RID_DB_QUERY_WIZARD_START + 9 -{ - Text [ en-US] = "Match ~all of the following"; -}; - -String RID_DB_QUERY_WIZARD_START + 10 -{ - Text [ en-US] = "~Match any of the following"; -}; - -String RID_DB_QUERY_WIZARD_START + 11 -{ - Text [ en-US] = "~Detailed query (Shows all records of the query.)"; -}; - -String RID_DB_QUERY_WIZARD_START + 12 -{ - Text [ en-US] = "~Summary query (Shows only results of aggregate functions.)"; -}; - - -String RID_DB_QUERY_WIZARD_START + 16 -{ - Text [ en-US] = "Aggregate functions"; -}; - - -String RID_DB_QUERY_WIZARD_START + 17 -{ - Text [ en-US] = "Fields"; -}; - -String RID_DB_QUERY_WIZARD_START + 18 -{ - Text [ en-US] = "~Group by"; -}; - - -String RID_DB_QUERY_WIZARD_START + 19 -{ - Text [ en-US] = "Field"; -}; - -String RID_DB_QUERY_WIZARD_START + 20 -{ - Text [ en-US] = "Alias"; -}; - -String RID_DB_QUERY_WIZARD_START + 21 -{ - Text [ en-US] = "Table: "; -}; - - -String RID_DB_QUERY_WIZARD_START + 22 -{ - Text [ en-US] = "Query: "; -}; - - -String RID_DB_QUERY_WIZARD_START + 24 -{ - Text [ en-US] = "Condition"; -}; - -String RID_DB_QUERY_WIZARD_START + 25 -{ - Text [ en-US] = "Value"; -}; - -// -------------------------------------- -// don't change anything to the next 10 values -// they are list elements and need to be as follows -String RID_DB_QUERY_WIZARD_START + 26 -{ - Text [ en-US] = "is equal to"; -}; - -String RID_DB_QUERY_WIZARD_START + 27 -{ - Text [ en-US] = "is not equal to"; -}; - - -String RID_DB_QUERY_WIZARD_START + 28 -{ - Text [ en-US] = "is smaller than"; -}; - -String RID_DB_QUERY_WIZARD_START + 29 -{ - Text [ en-US] = "is greater than"; -}; - -String RID_DB_QUERY_WIZARD_START + 30 -{ - Text [ en-US] = "is equal or less than "; -}; - -String RID_DB_QUERY_WIZARD_START + 31 -{ - Text [ en-US] = "is equal or greater than"; -}; - -String RID_DB_QUERY_WIZARD_START + 32 -{ - Text [ en-US] = "like"; -}; - -String RID_DB_QUERY_WIZARD_START + 33 -{ - Text [ en-US] = "not like"; -}; - -String RID_DB_QUERY_WIZARD_START + 34 -{ - Text [ en-US] = "is null"; -}; - -String RID_DB_QUERY_WIZARD_START + 35 -{ - Text [ en-US] = "is not null"; -}; -// -------------------------------------- - -String RID_DB_QUERY_WIZARD_START + 36 -{ - Text [ en-US] = "true"; -}; - -String RID_DB_QUERY_WIZARD_START + 37 -{ - Text [ en-US] = "false"; -}; - -String RID_DB_QUERY_WIZARD_START + 38 -{ - Text [ en-US] = "and"; -}; - -String RID_DB_QUERY_WIZARD_START + 39 -{ - Text [ en-US] = "or"; -}; - - -String RID_DB_QUERY_WIZARD_START + 40 -{ - Text [ en-US] = "get the sum of"; -}; - -String RID_DB_QUERY_WIZARD_START + 41 -{ - Text [ en-US] = "get the average of"; -}; - - -String RID_DB_QUERY_WIZARD_START + 42 -{ - Text [ en-US] = "get the minimum of"; -}; - -String RID_DB_QUERY_WIZARD_START + 43 -{ - Text [ en-US] = "get the maximum of"; -}; - - -String RID_DB_QUERY_WIZARD_START + 44 -{ - Text [ en-US] = "get the sum of <FIELD>"; -}; - -String RID_DB_QUERY_WIZARD_START + 45 -{ - Text [ en-US] = "get the average of <FIELD>"; -}; - -String RID_DB_QUERY_WIZARD_START + 46 -{ - Text [ en-US] = "get the minimum of <FIELD>"; -}; - -String RID_DB_QUERY_WIZARD_START + 47 -{ - Text [ en-US] = "get the maximum of <FIELD>"; -}; - - -String RID_DB_QUERY_WIZARD_START + 48 -{ - Text [ en-US] = "(none)"; -}; - -String RID_DB_QUERY_WIZARD_START + 50 -{ - Text [ en-US] = "Fie~lds in the Query: "; -}; - - -String RID_DB_QUERY_WIZARD_START + 51 -{ - Text [ en-US] = "Sorting order: "; -}; - - -String RID_DB_QUERY_WIZARD_START + 52 -{ - Text [ en-US] = "No sorting fields were assigned."; - }; - - -String RID_DB_QUERY_WIZARD_START + 53 -{ - Text [ en-US] = "Search conditions: "; - }; - -String RID_DB_QUERY_WIZARD_START + 54 -{ - Text [ en-US] = "No conditions were assigned."; - }; - - -String RID_DB_QUERY_WIZARD_START + 55 -{ - Text [ en-US] = "Aggregate functions: "; - }; - - -String RID_DB_QUERY_WIZARD_START + 56 -{ - Text [ en-US] = "No aggregate functions were assigned."; - }; - - -String RID_DB_QUERY_WIZARD_START + 57 -{ - Text [ en-US] = "Grouped by: "; -}; - -String RID_DB_QUERY_WIZARD_START + 58 -{ - Text [ en-US] = "No Groups were assigned."; -}; - - -String RID_DB_QUERY_WIZARD_START + 59 -{ - Text [ en-US ] = "Grouping conditions: "; -}; - - -String RID_DB_QUERY_WIZARD_START + 60 -{ - Text [ en-US] = "No grouping conditions were assigned."; -}; - - -String RID_DB_QUERY_WIZARD_START + 70 -{ - Text [ en-US] = "Select the fields (columns) for your query"; -}; - -String RID_DB_QUERY_WIZARD_START + 71 -{ - Text [ en-US] = "Select the sorting order"; -}; - - -String RID_DB_QUERY_WIZARD_START + 72 -{ - Text [ en-US] = "Select the search conditions"; -}; - - -String RID_DB_QUERY_WIZARD_START + 73 -{ - Text [ en-US] = "Select the type of query"; -}; - -String RID_DB_QUERY_WIZARD_START + 74 -{ - Text [ en-US] = "Select the groups"; -}; - -String RID_DB_QUERY_WIZARD_START + 75 -{ - Text [ en-US] = "Select the grouping conditions"; -}; - - -String RID_DB_QUERY_WIZARD_START + 76 -{ - Text [ en-US] = "Assign aliases if desired"; -}; - - -String RID_DB_QUERY_WIZARD_START + 77 -{ - Text [ en-US] = "Check the overview and decide how to proceed"; -}; - - -String RID_DB_QUERY_WIZARD_START + 80 -{ - Text [ en-US] = "Field selection"; -}; - - -String RID_DB_QUERY_WIZARD_START + 81 -{ - Text [ en-US] = "Sorting order"; -}; - -String RID_DB_QUERY_WIZARD_START + 82 -{ - Text [ en-US] = "Search conditions"; -}; - -String RID_DB_QUERY_WIZARD_START + 83 -{ - Text [ en-US] = "Detail or summary"; -}; - -String RID_DB_QUERY_WIZARD_START + 84 -{ - Text [ en-US] = "Grouping"; -}; - -String RID_DB_QUERY_WIZARD_START + 85 -{ - Text [ en-US] = "Grouping conditions"; -}; - -String RID_DB_QUERY_WIZARD_START + 86 -{ - Text [ en-US] = "Aliases"; -}; - -String RID_DB_QUERY_WIZARD_START + 87 -{ - Text [ en-US] = "Overview"; -}; - - -String RID_DB_QUERY_WIZARD_START + 88 -{ - Text [ en-US] = "A field that has not been assigned an aggregate function must be used in a group."; -}; - - -String RID_DB_QUERY_WIZARD_START + 89 -{ - Text [ en-US] = "The condition '<FIELDNAME> <LOGICOPERATOR> <VALUE>' was chosen twice. Each condition can only be chosen once"; -}; - -String RID_DB_QUERY_WIZARD_START + 90 -{ - Text [ en-US] = "The aggregate function <FUNCTION> has been assigned twice to the fieldname '<NUMERICFIELD>'."; -}; - -String RID_DB_QUERY_WIZARD_START + 91 -{ - Text [ en-US] = ", "; -}; - -String RID_DB_QUERY_WIZARD_START + 92 -{ - Text [ en-US] = "<FIELDTITLE> (<FIELDNAME>)"; -}; - - -String RID_DB_QUERY_WIZARD_START + 93 -{ - Text [ en-US] = "<FIELDNAME> (<SORTMODE>)"; -}; - -String RID_DB_QUERY_WIZARD_START + 94 -{ - Text [ en-US] = "<FIELDNAME> <LOGICOPERATOR> <VALUE>"; -}; - -String RID_DB_QUERY_WIZARD_START + 95 -{ - Text [ en-US] = "<CALCULATEDFUNCTION> <FIELDNAME>"; -}; - - -String RID_DB_QUERY_WIZARD_START + 96 -{ - Text [ en-US] = "<FIELDNAME> <LOGICOPERATOR> <VALUE>"; -}; - - - - -// ============================================================================ - -String RID_DB_REPORT_WIZARD_START + 0 -{ - Text [ en-US ] = "Report Wizard"; -}; - - -String RID_DB_REPORT_WIZARD_START + 3 -{ - Text [ en-US ] = "~Table"; -}; - -String RID_DB_REPORT_WIZARD_START + 4 -{ - Text [ en-US ] = "Colu~mns"; -}; - - -String RID_DB_REPORT_WIZARD_START + 7 -{ - Text [ en-US ] = "Report_"; -}; - -String RID_DB_REPORT_WIZARD_START + 8 -{ - Text [ en-US ] = "- undefined -"; -}; - -String RID_DB_REPORT_WIZARD_START + 9 -{ - Text [ en-US ] = "~Fields in report"; -}; - - - -String RID_DB_REPORT_WIZARD_START + 11 -{ - Text [ en-US ] = "Grouping"; -}; - -String RID_DB_REPORT_WIZARD_START + 12 -{ - Text [ en-US ] = "Sort options"; -}; - -String RID_DB_REPORT_WIZARD_START + 13 -{ - Text [ en-US ] = "Choose layout"; -}; - - -String RID_DB_REPORT_WIZARD_START + 14 -{ - Text [ en-US ] = "Create report"; -}; - - -String RID_DB_REPORT_WIZARD_START + 15 -{ - Text [ en-US ] = "Layout of data"; -}; - -String RID_DB_REPORT_WIZARD_START + 16 -{ - Text [ en-US ] = "Layout of headers and footers"; -}; - - -String RID_DB_REPORT_WIZARD_START + 19 -{ - Text [ en-US ] = "Fields"; -}; - -String RID_DB_REPORT_WIZARD_START + 20 -{ - Text [ en-US ] = "~Sort by"; -}; - - -String RID_DB_REPORT_WIZARD_START + 21 -{ - Text [ en-US ] = "T~hen by"; -}; - - -String RID_DB_REPORT_WIZARD_START + 22 -{ - Text [ en-US ] = "Orientation"; -}; - -String RID_DB_REPORT_WIZARD_START + 23 -{ - Text [ en-US ] = "Portrait"; -}; - -String RID_DB_REPORT_WIZARD_START + 24 -{ - Text [ en-US ] = "Landscape"; -}; - - - -String RID_DB_REPORT_WIZARD_START + 28 -{ - Text [ en-US ] = "Which fields do you want to have in your report?"; -}; - - -String RID_DB_REPORT_WIZARD_START + 29 -{ - Text [ en-US ] = "Do you want to add grouping levels?"; -}; - - -String RID_DB_REPORT_WIZARD_START + 30 -{ - Text [ en-US ] = "According to which fields do you want to sort the data?"; -}; - - -String RID_DB_REPORT_WIZARD_START + 31 -{ - Text [ en-US ] = "How do you want your report to look?"; -}; - - -String RID_DB_REPORT_WIZARD_START + 32 -{ - Text [ en-US ] = "Decide how you want to proceed"; -}; - - -String RID_DB_REPORT_WIZARD_START + 33 -{ - Text [ en-US ] = "Title of report"; -}; - - -String RID_DB_REPORT_WIZARD_START + 34 -{ - Text [ en-US ] = "Display report"; -}; - -String RID_DB_REPORT_WIZARD_START + 35 -{ - Text [ en-US ] = "Create report"; -}; - -String RID_DB_REPORT_WIZARD_START + 36 -{ - Text [ en-US ] = "Ascending"; -}; - -String RID_DB_REPORT_WIZARD_START + 37 -{ - Text [ en-US ] = "Descending"; -}; - - -String RID_DB_REPORT_WIZARD_START + 40 -{ - Text [ en-US ] = "~Dynamic report"; -}; - - -String RID_DB_REPORT_WIZARD_START + 41 -{ - Text [ en-US ] = "~Create report now"; -}; - -String RID_DB_REPORT_WIZARD_START + 42 -{ - Text [ en-US ] = "~Modify report layout"; -}; - -String RID_DB_REPORT_WIZARD_START + 43 -{ - Text [ en-US ] = "Static report"; -}; - - -String RID_DB_REPORT_WIZARD_START + 44 -{ - Text [ en-US ] = "Save as"; -}; - - - -String RID_DB_REPORT_WIZARD_START + 50 -{ - Text [ en-US ] = "Groupings"; -}; - -String RID_DB_REPORT_WIZARD_START + 51 -{ - Text [ en-US ] = "Then b~y"; -}; - -String RID_DB_REPORT_WIZARD_START + 52 -{ - Text [ en-US ] = "~Then by"; -}; - -String RID_DB_REPORT_WIZARD_START + 53 -{ - Text [ en-US ] = "Asc~ending"; -}; - -String RID_DB_REPORT_WIZARD_START + 54 -{ - Text [ en-US ] = "Ascend~ing"; -}; - -String RID_DB_REPORT_WIZARD_START + 55 -{ - Text [ en-US ] = "Ascendin~g"; -}; - -String RID_DB_REPORT_WIZARD_START + 56 -{ - Text [ en-US ] = "De~scending"; -}; - -String RID_DB_REPORT_WIZARD_START + 57 -{ - Text [ en-US ] = "Des~cending"; -}; - -String RID_DB_REPORT_WIZARD_START + 58 -{ - Text [ en-US ] = "De~scending"; -}; - - -String RID_DB_REPORT_WIZARD_START + 60 -{ - Text [ en-US ] = "Binary fields cannot be displayed in the report."; -}; - - -String RID_DB_REPORT_WIZARD_START + 61 -{ - Text [ en-US ] = "The table '<TABLENAME>' does not exist."; -}; - -String RID_DB_REPORT_WIZARD_START + 62 -{ - Text [ en-US ] = "Creating Report..."; -}; - -String RID_DB_REPORT_WIZARD_START + 63 -{ - Text [ en-US ] = "Number of records inserted: <COUNT>"; -}; - -String RID_DB_REPORT_WIZARD_START + 64 -{ - Text [ en-US ] = "The form '<REPORTFORM>' does not exist."; -}; - -String RID_DB_REPORT_WIZARD_START + 65 -{ - Text [ en-US ] = "The query with the statement <BR>'<STATEMENT>' <BR> could not be run. <BR> Check your data source."; -}; - -String RID_DB_REPORT_WIZARD_START + 66 -{ - Text [ en-US ] = "The following hidden control in the form '<REPORTFORM>' could not be read: '<CONTROLNAME>'."; -}; - -String RID_DB_REPORT_WIZARD_START + 67 -{ - Text [ en-US ] = "Importing data..."; -}; - - -String RID_DB_REPORT_WIZARD_START + 68 -{ - Text [ en-US ] = "Labeling fields"; -}; - - -String RID_DB_REPORT_WIZARD_START + 69 -{ - Text [ en-US ] = "How do you want to label the fields?"; -}; - -String RID_DB_REPORT_WIZARD_START + 70 -{ - Text [ en-US ] = "Label"; -}; - - -String RID_DB_REPORT_WIZARD_START + 71 -{ - Text [ en-US ] = "Field"; -}; - - -String RID_DB_REPORT_WIZARD_START + 72 -{ - Text [ en-US ] = "An error occurred in the wizard.<BR>The template '%PATH' could be erroneous.<BR>Either the required sections or tables do not exist or exist under the wrong name.<BR>See the Help for more detailed information.<BR>Please select another template."; -}; - - -String RID_DB_REPORT_WIZARD_START + 73 -{ - Text [ en-US ] = "There is an invalid user field in a table."; -}; - - -String RID_DB_REPORT_WIZARD_START + 74 -{ - Text [ en-US ] = "The sort criterium '<FIELDNAME>' was chosen twice. Each criterium can only be chosen once."; -}; - - -String RID_DB_REPORT_WIZARD_START + 75 -{ - Text [ en-US ] = "Note: The dummy text will be replaced by data from the database when the report is created."; -}; - - -String RID_DB_REPORT_WIZARD_START + 76 -{ - Text [ en-US ] = "A report '%REPORTNAME' already exists in the database. Please assign another name."; -}; - - -String RID_DB_REPORT_WIZARD_START + 78 -{ - Text [ en-US ] = "How do you want to proceed after creating the report?"; -}; - -String RID_DB_REPORT_WIZARD_START + 79 -{ - Text [ en-US ] = "What kind of report do you want to create?"; -}; - -String RID_DB_REPORT_WIZARD_START + 80 -{ - Text [ en-US ] = "Tabular"; -}; -String RID_DB_REPORT_WIZARD_START + 81 -{ - Text [ en-US ] = "Columnar, single-column"; -}; -String RID_DB_REPORT_WIZARD_START + 82 -{ - Text [ en-US ] = "Columnar, two columns"; -}; -String RID_DB_REPORT_WIZARD_START + 83 -{ - Text [ en-US ] = "Columnar, three columns"; -}; -String RID_DB_REPORT_WIZARD_START + 84 -{ - Text [ en-US ] = "In blocks, labels left"; -}; -String RID_DB_REPORT_WIZARD_START + 85 -{ - Text [ en-US ] = "In blocks, labels above"; -}; -String RID_DB_REPORT_WIZARD_START + 86 -{ - Text [ en-US ] = "Title:"; -}; -String RID_DB_REPORT_WIZARD_START + 87 -{ - Text [ en-US ] = "Author:"; -}; -String RID_DB_REPORT_WIZARD_START + 88 -{ - Text [ en-US ] = "Date:"; -}; -String RID_DB_REPORT_WIZARD_START + 89 -{ - Text [ en-US ] = "Page #page# of #count#"; - Text [ x-comment ] = "Please don't translate the words #page# and #count#, these are placeholders."; -}; -String RID_DB_REPORT_WIZARD_START + 90 -{ - Text [ en-US ] = "Page number:"; -}; -String RID_DB_REPORT_WIZARD_START + 91 -{ - Text [ en-US ] = "Page count:"; -}; -String RID_DB_REPORT_WIZARD_START + 92 -{ - Text [ en-US ] = "No valid report template was found."; -}; - -// ============================================================================ - -String RID_DB_TABLE_WIZARD_START + 1 -{ - Text [ en-US] = "Table Wizard"; -}; - -String RID_DB_TABLE_WIZARD_START + 2 -{ - Text [ en-US] = "Select fields"; -}; - -String RID_DB_TABLE_WIZARD_START + 3 -{ - Text [ en-US] = "Set types and formats"; -}; - -String RID_DB_TABLE_WIZARD_START + 4 -{ - Text [ en-US] = "Set primary key"; -}; - -String RID_DB_TABLE_WIZARD_START + 5 -{ - Text [ en-US] = "Create table"; -}; - - -String RID_DB_TABLE_WIZARD_START + 8 -{ - Text [ en-US] = "Select fields for your table"; -}; - -String RID_DB_TABLE_WIZARD_START + 9 -{ - Text [ en-US] = "Set field types and formats"; -}; - -String RID_DB_TABLE_WIZARD_START + 10 -{ - Text [ en-US] = "Set primary key"; -}; - -String RID_DB_TABLE_WIZARD_START + 11 -{ - Text [ en-US] = "Create table"; -}; - - -String RID_DB_TABLE_WIZARD_START + 14 -{ - Text [ en-US] = "This wizard helps you to create a table for your database. After selecting a table category and a sample table, choose the fields you want to include in your table. You can include fields from more than one sample table."; -}; - -String RID_DB_TABLE_WIZARD_START + 15 -{ - Text [ en-US] = "Ca~tegory"; -}; - - -String RID_DB_TABLE_WIZARD_START + 16 -{ - Text [ en-US] = "B~usiness"; -}; - -String RID_DB_TABLE_WIZARD_START + 17 -{ - Text [ en-US] = "P~ersonal"; -}; - -String RID_DB_TABLE_WIZARD_START + 18 -{ - Text [ en-US] = "~Sample tables"; -}; - - -String RID_DB_TABLE_WIZARD_START + 19 -{ - Text [ en-US] = "A~vailable fields"; -}; - - -String RID_DB_TABLE_WIZARD_START + 20 -{ - Text [ en-US] = "Field information"; -}; - -String RID_DB_TABLE_WIZARD_START + 21 -{ - Text [ en-US] = "+"; -}; - -String RID_DB_TABLE_WIZARD_START + 22 -{ - Text [ en-US] = "-"; -}; - -String RID_DB_TABLE_WIZARD_START + 23 -{ - Text [ en-US] = "Field name"; -}; - -String RID_DB_TABLE_WIZARD_START + 24 -{ - Text [ en-US] = "Field type"; -}; - - -String RID_DB_TABLE_WIZARD_START + 25 -{ - Text [ en-US] = "~Selected fields"; -}; - - -String RID_DB_TABLE_WIZARD_START + 26 -{ - Text [ en-US] = "A primary key uniquely identifies each record in a database table. Primary keys ease the linking of information in separate tables, and it is recommended that you have a primary key in every table. Without a primary key, it will not be possible to enter data into this table."; -}; - -String RID_DB_TABLE_WIZARD_START + 27 -{ - Text [ en-US] = "~Create a primary key"; -}; - - -String RID_DB_TABLE_WIZARD_START + 28 -{ - Text [ en-US] = "~Automatically add a primary key"; -}; - -String RID_DB_TABLE_WIZARD_START + 29 -{ - Text [ en-US] = "~Use an existing field as a primary key"; -}; - -String RID_DB_TABLE_WIZARD_START + 30 -{ - Text [ en-US] = "Define p~rimary key as a combination of several fields "; -}; - -String RID_DB_TABLE_WIZARD_START + 31 -{ - Text [ en-US] = "F~ieldname"; -}; - - -String RID_DB_TABLE_WIZARD_START + 32 -{ - Text [ en-US] = "~Primary key fields"; -}; - - -String RID_DB_TABLE_WIZARD_START + 33 -{ - Text [ en-US] = "Auto ~value"; -}; - - -String RID_DB_TABLE_WIZARD_START + 34 -{ - Text [ en-US] = "What do you want to name your table?"; -}; - -String RID_DB_TABLE_WIZARD_START + 35 -{ - Text [ en-US] = "Congratulations. You have entered all the information needed to create your table."; -}; - - -String RID_DB_TABLE_WIZARD_START + 36 -{ - Text [ en-US] = "What do you want to do next?"; -}; - -String RID_DB_TABLE_WIZARD_START + 37 -{ - Text [ en-US] = "Modify the table design"; -}; - -String RID_DB_TABLE_WIZARD_START + 38 -{ - Text [ en-US] = "Insert data immediately"; -}; - -String RID_DB_TABLE_WIZARD_START + 39 -{ - Text [ en-US] = "C~reate a form based on this table"; -}; - -String RID_DB_TABLE_WIZARD_START + 40 -{ - Text [ en-US] = "The table you have created could not be opened."; -}; - -String RID_DB_TABLE_WIZARD_START + 41 -{ - Text [ en-US] = "The table name '%TABLENAME' contains a character ('%SPECIALCHAR') that might not be supported by the database."; -}; - - -String RID_DB_TABLE_WIZARD_START + 42 -{ - Text [ en-US] = "The field name '%FIELDNAME' contains a special character ('%SPECIALCHAR') that might not be supported by the database."; -}; - - -String RID_DB_TABLE_WIZARD_START + 43 -{ - Text [ en-US] = "Field"; -}; - -String RID_DB_TABLE_WIZARD_START + 44 -{ - Text [ en-US] = "MyTable"; -}; - -String RID_DB_TABLE_WIZARD_START + 45 -{ - Text [ en-US] = "Add a Field"; -}; - -String RID_DB_TABLE_WIZARD_START + 46 -{ - Text [ en-US] = "Remove the selected Field"; -}; - -String RID_DB_TABLE_WIZARD_START + 47 -{ - Text [ en-US] = "The field cannot be inserted because this would exceed the maximum number of %COUNT possible fields in the database table"; -}; - -String RID_DB_TABLE_WIZARD_START + 48 -{ - Text [ en-US] = "The name '%TABLENAME' already exists.\nPlease enter another name."; -}; - -String RID_DB_TABLE_WIZARD_START + 49 -{ - Text [ en-US] = "Catalog of the table"; -}; - -String RID_DB_TABLE_WIZARD_START + 50 -{ - Text [ en-US] = "Schema of the table"; -}; - -String RID_DB_TABLE_WIZARD_START + 51 -{ - Text [ en-US] = "The field '%FIELDNAME' already exists."; -}; - - - -// ============================================================================ -// ============================ ====================== -// ====================== LETTER WIZARD RESOURCES ================ -// ============================ ====================== -// ============================================================================ - - -String RID_LETTERWIZARDDIALOG_START + 1 -{ - Text [ en-US] = "Letter Wizard"; -}; - -String RID_LETTERWIZARDDIALOG_START + 2 -{ - Text [ en-US] = "Label9"; -}; - -String RID_LETTERWIZARDDIALOG_START + 3 -{ - Text [ en-US] = "~Business letter"; -}; - -String RID_LETTERWIZARDDIALOG_START + 4 -{ - Text [ en-US] = "~Formal personal letter"; -}; - -String RID_LETTERWIZARDDIALOG_START + 5 -{ - Text [ en-US] = "~Personal letter"; -}; - -String RID_LETTERWIZARDDIALOG_START + 6 -{ - Text [ en-US] = "~Use letterhead paper with pre-printed elements"; -}; - -String RID_LETTERWIZARDDIALOG_START + 7 -{ - Text [ en-US] = "~Logo"; -}; - -String RID_LETTERWIZARDDIALOG_START + 8 -{ - Text [ en-US] = "Return address"; -}; - -String RID_LETTERWIZARDDIALOG_START + 9 -{ - Text [ en-US] = "~Include footer"; -}; - -String RID_LETTERWIZARDDIALOG_START + 10 -{ - Text [ en-US] = "~Return address in envelope window"; -}; - -String RID_LETTERWIZARDDIALOG_START + 11 -{ - Text [ en-US] = "~Logo"; -}; - -String RID_LETTERWIZARDDIALOG_START + 12 -{ - Text [ en-US] = "~Return address in envelope window"; -}; - -String RID_LETTERWIZARDDIALOG_START + 13 -{ - Text [ en-US] = "Letter Signs"; -}; - -String RID_LETTERWIZARDDIALOG_START + 14 -{ - Text [ en-US] = "S~ubject line"; -}; - -String RID_LETTERWIZARDDIALOG_START + 15 -{ - Text [ en-US] = "Salu~tation"; -}; - -String RID_LETTERWIZARDDIALOG_START + 16 -{ - Text [ en-US] = "Fold ~marks"; -}; - -String RID_LETTERWIZARDDIALOG_START + 17 -{ - Text [ en-US] = "~Complimentary close"; -}; - -String RID_LETTERWIZARDDIALOG_START + 18 -{ - Text [ en-US] = "~Footer"; -}; - -String RID_LETTERWIZARDDIALOG_START + 19 -{ - Text [ en-US] = "~Use user data for return address"; -}; - -String RID_LETTERWIZARDDIALOG_START + 20 -{ - Text [ en-US] = "~New sender address:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 21 -{ - Text [ en-US] = "Use placeholders for ~recipient's address"; -}; - -String RID_LETTERWIZARDDIALOG_START + 22 -{ - Text [ en-US] = "Use address database for ~mail merge"; -}; - -String RID_LETTERWIZARDDIALOG_START + 23 -{ - Text [ en-US] = "Include ~only on second and following pages"; -}; - -String RID_LETTERWIZARDDIALOG_START + 24 -{ - Text [ en-US] = "~Include page number"; -}; - -String RID_LETTERWIZARDDIALOG_START + 25 -{ - Text [ en-US] = "Letter Template"; -}; - -String RID_LETTERWIZARDDIALOG_START + 26 -{ - Text [ en-US] = "Create a ~letter from this template"; -}; - -String RID_LETTERWIZARDDIALOG_START + 27 -{ - Text [ en-US] = "Make ~manual changes to this letter template"; -}; - -String RID_LETTERWIZARDDIALOG_START + 28 -{ - Text [ en-US] = "Page design"; -}; - -String RID_LETTERWIZARDDIALOG_START + 29 -{ - Text [ en-US] = "Page design"; -}; - -String RID_LETTERWIZARDDIALOG_START + 30 -{ - Text [ en-US] = "Page design"; -}; - -String RID_LETTERWIZARDDIALOG_START + 31 -{ - Text [ en-US] = "This wizard helps you to create a letter template. You can then use the template as the basis for writing letters as often as desired."; -}; - -String RID_LETTERWIZARDDIALOG_START + 32 -{ - Text [ en-US] = "~Height:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 33 -{ - Text [ en-US] = "~Width:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 34 -{ - Text [ en-US] = "S~pacing to left margin:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 35 -{ - Text [ en-US] = "Spacing ~to top margin:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 36 -{ - Text [ en-US] = "Height:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 37 -{ - Text [ en-US] = "Width:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 38 -{ - Text [ en-US] = "S~pacing to left margin:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 39 -{ - Text [ en-US] = "Spacing ~to top margin:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 40 -{ - Text [ en-US] = "Height:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 41 -{ - Text [ en-US] = "Use a typical letter format for this country:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 42 -{ - Text [ en-US] = "Sender's address"; -}; - -String RID_LETTERWIZARDDIALOG_START + 43 -{ - Text [ en-US] = "Name:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 44 -{ - Text [ en-US] = "Street:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 45 -{ - Text [ en-US] = "ZIP code/State/City:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 46 -{ - Text [ en-US] = "Recipient's address"; -}; - -String RID_LETTERWIZARDDIALOG_START + 47 -{ - Text [ en-US] = "Footer"; -}; - -String RID_LETTERWIZARDDIALOG_START + 48 -{ - Text [ en-US] = "This wizard creates a letter template which enables you to create multiple letters with the same layout and settings."; -}; - -String RID_LETTERWIZARDDIALOG_START + 49 -{ - Text [ en-US] = "To create another new letter out of the template just navigate to the template location and double-click it."; -}; - -String RID_LETTERWIZARDDIALOG_START + 50 -{ - Text [ en-US] = "Template name:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 51 -{ - Text [ en-US] = "Location and file name:"; -}; - -String RID_LETTERWIZARDDIALOG_START + 52 -{ - Text [ en-US] = "How do you want to proceed?"; -}; - -String RID_LETTERWIZARDDIALOG_START + 53 -{ - Text [ en-US] = "Please choose the type of letter and page design"; -}; - -String RID_LETTERWIZARDDIALOG_START + 54 -{ - Text [ en-US] = "Select the items to be printed"; -}; - -String RID_LETTERWIZARDDIALOG_START + 55 -{ - Text [ en-US] = "Specify items already on your letterhead paper"; -}; - -String RID_LETTERWIZARDDIALOG_START + 56 -{ - Text [ en-US] = "Specify the sender and recipient information"; -}; - -String RID_LETTERWIZARDDIALOG_START + 57 -{ - Text [ en-US] = "Fill in the information you would like in the footer"; -}; - -String RID_LETTERWIZARDDIALOG_START + 58 -{ - Text [ en-US] = "Please specify last settings"; -}; - -//====================== Letter Wizard Greeting Start -String RID_LETTERWIZARDSALUTATION_START + 1 -{ - Text [ en-US] = "To Whom it May Concern"; -}; - -String RID_LETTERWIZARDSALUTATION_START + 2 -{ - Text [ en-US] = "Dear Sir or Madam"; -}; - -String RID_LETTERWIZARDSALUTATION_START + 3 -{ - Text [ en-US] = "Hello"; -}; - -//====================== Letter Wizard Greeting Start -String RID_LETTERWIZARDGREETING_START + 1 -{ - Text [ en-US] = "Sincerely"; -}; - -String RID_LETTERWIZARDGREETING_START + 2 -{ - Text [ en-US] = "Best regards"; -}; - -String RID_LETTERWIZARDGREETING_START + 3 -{ - Text [ en-US] = "Cheers"; -}; - - -//====================== Letter Wizard Roadmap Start -String RID_LETTERWIZARDROADMAP_START + 1 -{ - Text [ en-US] = "Page design"; -}; - -String RID_LETTERWIZARDROADMAP_START + 2 -{ - Text [ en-US] = "Letterhead layout"; -}; - -String RID_LETTERWIZARDROADMAP_START + 3 -{ - Text [ en-US] = "Printed items"; -}; - -String RID_LETTERWIZARDROADMAP_START + 4 -{ - Text [ en-US] = "Recipient and sender"; -}; - -String RID_LETTERWIZARDROADMAP_START + 5 -{ - Text [ en-US] = "Footer"; -}; - -String RID_LETTERWIZARDROADMAP_START + 6 -{ - Text [ en-US] = "Name and location"; -}; - - -// ============================================================================ -// ============================ ====================== -// ====================== FAX WIZARD RESOURCES ================ -// ============================ ====================== -// ============================================================================ - - -String RID_FAXWIZARDDIALOG_START + 1 -{ - Text [ en-US] = "Fax Wizard"; -}; - -String RID_FAXWIZARDDIALOG_START + 2 -{ - Text [ en-US] = "Label9"; -}; - -String RID_FAXWIZARDDIALOG_START + 3 -{ - Text [ en-US] = "~Business Fax"; -}; - -String RID_FAXWIZARDDIALOG_START + 4 -{ - Text [ en-US] = "~Personal Fax"; -}; - -String RID_FAXWIZARDDIALOG_START + 5 -{ - Text [ en-US] = "~Logo"; -}; - -String RID_FAXWIZARDDIALOG_START + 6 -{ - Text [ en-US] = "S~ubject line"; -}; - -String RID_FAXWIZARDDIALOG_START + 7 -{ - Text [ en-US] = "S~alutation"; -}; - -String RID_FAXWIZARDDIALOG_START + 8 -{ - Text [ en-US] = "~Complimentary close"; -}; - -String RID_FAXWIZARDDIALOG_START + 9 -{ - Text [ en-US] = "~Footer"; -}; - -String RID_FAXWIZARDDIALOG_START + 10 -{ - Text [ en-US] = "~Use user data for return address"; -}; - -String RID_FAXWIZARDDIALOG_START + 11 -{ - Text [ en-US] = "~New return address"; -}; - -String RID_FAXWIZARDDIALOG_START + 12 -{ - Text [ en-US] = "My Fax Template"; -}; - -String RID_FAXWIZARDDIALOG_START + 13 -{ - Text [ en-US] = "Create a ~fax from this template"; -}; - -String RID_FAXWIZARDDIALOG_START + 14 -{ - Text [ en-US] = "Make ~manual changes to this fax template"; -}; - -String RID_FAXWIZARDDIALOG_START + 15 -{ - Text [ en-US] = "Page design"; -}; - -String RID_FAXWIZARDDIALOG_START + 16 -{ - Text [ en-US] = "Page design"; -}; - -String RID_FAXWIZARDDIALOG_START + 17 -{ - Text [ en-US] = "This wizard helps you to create a fax template. The template can then be used to create a fax whenever needed."; -}; - -String RID_FAXWIZARDDIALOG_START + 18 -{ - Text [ en-US] = "Return address"; -}; - -String RID_FAXWIZARDDIALOG_START + 19 -{ - Text [ en-US] = "Name:"; -}; - -String RID_FAXWIZARDDIALOG_START + 20 -{ - Text [ en-US] = "Street:"; -}; - -String RID_FAXWIZARDDIALOG_START + 21 -{ - Text [ en-US] = "ZIP code/State/City:"; -}; - -String RID_FAXWIZARDDIALOG_START + 22 -{ - Text [ en-US] = "Footer"; -}; - -String RID_FAXWIZARDDIALOG_START + 23 -{ - Text [ en-US] = "This wizard creates a fax template which enables you to create multiple faxes with the same layout and settings."; -}; - -String RID_FAXWIZARDDIALOG_START + 24 -{ - Text [ en-US] = "To create another new fax out of the template, go to the location where you saved the template and double-click the file."; -}; - -String RID_FAXWIZARDDIALOG_START + 25 -{ - Text [ en-US] = "Template Name:"; -}; - -String RID_FAXWIZARDDIALOG_START + 26 -{ - Text [ en-US] = "Location and file name:"; -}; - -String RID_FAXWIZARDDIALOG_START + 27 -{ - Text [ en-US] = "What do you want to do next?"; -}; - -String RID_FAXWIZARDDIALOG_START + 28 -{ - Text [ en-US] = "Choose the type of fax and a page design"; -}; - -String RID_FAXWIZARDDIALOG_START + 29 -{ - Text [ en-US] = "Select items to include in the fax template"; -}; - -String RID_FAXWIZARDDIALOG_START + 30 -{ - Text [ en-US] = "Specify sender and recipient information"; -}; - -String RID_FAXWIZARDDIALOG_START + 31 -{ - Text [ en-US] = "Enter text for the footer"; -}; - -String RID_FAXWIZARDDIALOG_START + 32 -{ - Text [ en-US] = "Choose a name and save the template"; -}; - -String RID_FAXWIZARDDIALOG_START + 33 -{ - Text [ en-US] = "Include ~only on second and following pages"; -}; - -String RID_FAXWIZARDDIALOG_START + 34 -{ - Text [ en-US] = "~Include page number"; -}; - -String RID_FAXWIZARDDIALOG_START + 35 -{ - Text [ en-US] = "~Date"; -}; - -String RID_FAXWIZARDDIALOG_START + 36 -{ - Text [ en-US] = "~Type of message"; -}; - -String RID_FAXWIZARDDIALOG_START + 37 -{ - Text [ en-US] = "Fax Number:"; -}; - -String RID_FAXWIZARDDIALOG_START + 38 -{ - Text [ en-US] = "Use placeholders for ~recipient's address"; -}; - -String RID_FAXWIZARDDIALOG_START + 39 -{ - Text [ en-US] = "Use address database for ~mail merge"; -}; - -String RID_FAXWIZARDDIALOG_START + 40 -{ - Text [ en-US] = "~New return address"; -}; - -//====================== Fax Wizard Communication Start -String RID_FAXWIZARDCOMMUNICATION_START + 1 -{ - Text [ en-US] = "Important Information!"; -}; - -String RID_FAXWIZARDCOMMUNICATION_START + 2 -{ - Text [ en-US] = "For your information"; -}; - -String RID_FAXWIZARDCOMMUNICATION_START + 3 -{ - Text [ en-US] = "News!"; -}; - -//====================== Fax Wizard Salutation Start -String RID_FAXWIZARDSALUTATION_START + 1 -{ - Text [ en-US] = "To whom it may concern,"; -}; - -String RID_FAXWIZARDSALUTATION_START + 2 -{ - Text [ en-US] = "Dear Sir or Madam,"; -}; - -String RID_FAXWIZARDSALUTATION_START + 3 -{ - Text [ en-US] = "Hello,"; -}; - -String RID_FAXWIZARDSALUTATION_START + 4 -{ - Text [ en-US] = "Hi,"; -}; - - -//====================== Fax Wizard Greeting Start -String RID_FAXWIZARDGREETING_START + 1 -{ - Text [ en-US] = "Sincerely"; -}; - -String RID_FAXWIZARDGREETING_START + 2 -{ - Text [ en-US] = "Yours faithfully"; -}; - -String RID_FAXWIZARDGREETING_START + 3 -{ - Text [ en-US] = "Regards"; -}; - -String RID_FAXWIZARDGREETING_START + 4 -{ - Text [ en-US] = "Love"; -}; - - -//====================== Fax Wizard Roadmap Start -String RID_FAXWIZARDROADMAP_START + 1 -{ - Text [ en-US] = "Page design"; -}; - -String RID_FAXWIZARDROADMAP_START + 2 -{ - Text [ en-US] = "Items to include"; -}; - -String RID_FAXWIZARDROADMAP_START + 3 -{ - Text [ en-US] = "Sender and Recipient"; -}; - -String RID_FAXWIZARDROADMAP_START + 4 -{ - Text [ en-US] = "Footer"; -}; - -String RID_FAXWIZARDROADMAP_START + 5 -{ - Text [ en-US] = "Name and location"; -}; - - - - -// ============================================================================ -// ============================ ====================== -// ====================== WEB WIZARD RESOURCES ================ -// ============================ ====================== -// ============================================================================ - - -String RID_WEBWIZARDDIALOG_START +1 -{ - Text [ en-US ] = "Web Wizard"; -}; - -String RID_WEBWIZARDDIALOG_START +2 -{ - Text [ en-US ] = "This Web Wizard is to aid you in publishing documents on the Internet.\n\nIt will convert the documents so that they can be viewed by a web browser. In addition, it will generate a Table of Contents page with links for easy access to the documents. The Web Wizard will also allow you to customize the design and layout of your web site.\n\nYou will be able to keep the documents you have published on the web up-to-date and add or remove documents at any time."; -}; - -String RID_WEBWIZARDDIALOG_START +4 -{ - Text [ en-US ] = "~Delete"; -}; - -String RID_WEBWIZARDDIALOG_START +5 -{ - Text [ en-US ] = "Introduction"; -}; - -String RID_WEBWIZARDDIALOG_START +6 -{ - Text [ en-US ] = "Select the documents you want to publish"; -}; - -String RID_WEBWIZARDDIALOG_START +8 -{ - Text [ en-US ] = "Document information "; -}; - -String RID_WEBWIZARDDIALOG_START +9 -{ - Text [ en-US ] = "~Title:"; -}; - -String RID_WEBWIZARDDIALOG_START +10 -{ - Text [ en-US ] = "~Summary: "; -}; - -String RID_WEBWIZARDDIALOG_START +11 -{ - Text [ en-US ] = "Au~thor:"; -}; - -String RID_WEBWIZARDDIALOG_START +12 -{ - Text [ en-US ] = "~Export to file format:"; -}; - -String RID_WEBWIZARDDIALOG_START +13 -{ - Text [ en-US ] = "Enter general information for your web site"; -}; - -String RID_WEBWIZARDDIALOG_START +14 -{ - Text [ en-US ] = "Title:"; -}; - -String RID_WEBWIZARDDIALOG_START +16 -{ - Text [ en-US ] = "Description:"; -}; - -String RID_WEBWIZARDDIALOG_START +18 -{ - Text [ en-US ] = "Created:"; -}; - -String RID_WEBWIZARDDIALOG_START +20 -{ - Text [ en-US ] = "E-mail:"; -}; - -String RID_WEBWIZARDDIALOG_START +21 -{ - Text [ en-US ] = "Copyright notice:"; -}; - -String RID_WEBWIZARDDIALOG_START +22 -{ - Text [ en-US ] = "Modified:"; -}; - - -String RID_WEBWIZARDDIALOG_START +24 -{ - Text [ en-US ] = "~Preview"; -}; - -String RID_WEBWIZARDDIALOG_START +25 -{ - Text [ en-US ] = "Where do you want to publish your web site?"; -}; - -String RID_WEBWIZARDDIALOG_START +26 -{ - Text [ en-US ] = "Publish the new web site:"; -}; - -String RID_WEBWIZARDDIALOG_START +27 -{ - Text [ en-US ] = "To a ~local folder"; -}; - -String RID_WEBWIZARDDIALOG_START +28 -{ - Text [ en-US ] = "..."; -}; - -String RID_WEBWIZARDDIALOG_START +29 -{ - Text [ en-US ] = "To a ~web server via FTP"; -}; - -String RID_WEBWIZARDDIALOG_START +31 -{ - Text [ en-US ] = "~Configure..."; -}; - -String RID_WEBWIZARDDIALOG_START +32 -{ - Text [ en-US ] = "To a ZIP ~archive"; -}; - -String RID_WEBWIZARDDIALOG_START +33 -{ - Text [ en-US ] = "..."; -}; - -String RID_WEBWIZARDDIALOG_START +34 -{ - Text [ en-US ] = "~Save settings (recommended)"; -}; - -String RID_WEBWIZARDDIALOG_START +35 -{ - Text [ en-US ] = "Save ~as:"; -}; - -String RID_WEBWIZARDDIALOG_START +36 -{ - Text [ en-US ] = "~Choose settings for the Web Wizard"; -}; - -String RID_WEBWIZARDDIALOG_START +37 -{ - Text [ en-US ] = "Web site content "; -}; - -String RID_WEBWIZARDDIALOG_START +38 -{ - Text [ en-US ] = "~Add..."; -}; - -String RID_WEBWIZARDDIALOG_START +39 -{ - Text [ en-US ] = "Remo~ve"; -}; - -String RID_WEBWIZARDDIALOG_START +40 -{ - Text [ en-US ] = "Choose a layout for the table of contents of your web site"; -}; - -String RID_WEBWIZARDDIALOG_START +41 -{ - Text [ en-US ] = "Select a style for the table of contents page"; -}; - -String RID_WEBWIZARDDIALOG_START +42 -{ - Text [ en-US ] = "~Style:"; -}; - -String RID_WEBWIZARDDIALOG_START +48 -{ - Text [ en-US ] = "~Layouts: "; -}; - -String RID_WEBWIZARDDIALOG_START +50 -{ - Text [ en-US ] = "~Description"; -}; - -String RID_WEBWIZARDDIALOG_START +51 -{ - Text [ en-US ] = "~Author"; -}; - -String RID_WEBWIZARDDIALOG_START +52 -{ - Text [ en-US ] = "Cr~eation date"; -}; - -String RID_WEBWIZARDDIALOG_START +53 -{ - Text [ en-US ] = "~Last change date"; -}; - -String RID_WEBWIZARDDIALOG_START +54 -{ - Text [ en-US ] = "~File name"; -}; - -String RID_WEBWIZARDDIALOG_START +55 -{ - Text [ en-US ] = "File forma~t"; -}; - -String RID_WEBWIZARDDIALOG_START +56 -{ - Text [ en-US ] = "File format ~icon"; -}; - -String RID_WEBWIZARDDIALOG_START +57 -{ - Text [ en-US ] = "Number ~of pages"; -}; - -String RID_WEBWIZARDDIALOG_START +58 -{ - Text [ en-US ] = "~Size in KB"; -}; - -String RID_WEBWIZARDDIALOG_START +59 -{ - Text [ en-US ] = "Click 'Preview' to see a preview in your browser:"; -}; - -String RID_WEBWIZARDDIALOG_START +60 -{ - Text [ en-US ] = "Customize the selected layout"; -}; - -String RID_WEBWIZARDDIALOG_START +61 -{ - Text [ en-US ] = "Include the following information for each document in the table of contents:"; -}; - -String RID_WEBWIZARDDIALOG_START +62 -{ - Text [ en-US ] = "Optimize the layout for screen resolution:"; -}; - -String RID_WEBWIZARDDIALOG_START +64 -{ - Text [ en-US ] = "~640x480"; -}; - -String RID_WEBWIZARDDIALOG_START +65 -{ - Text [ en-US ] = "~800x600"; -}; - -String RID_WEBWIZARDDIALOG_START +66 -{ - Text [ en-US ] = "~1024x768"; -}; - -String RID_WEBWIZARDDIALOG_START +70 -{ - Text [ en-US ] = "Generating Your Web Site"; -}; - -String RID_WEBWIZARDDIALOG_START +71 -{ - Text [ en-US ] = "%START - %END/%TOTAL"; -}; - -String RID_WEBWIZARDDIALOG_START +72 -{ - Text [ en-US ] = "myWebsite"; -}; - -String RID_WEBWIZARDDIALOG_START +73 -{ - Text [ en-US ] = "FTP target '%FILENAME' is a file."; -}; - - -String RID_WEBWIZARDDIALOG_START +74 -{ - Text [ en-US ] = "The local target '%FILENAME' is a file."; -}; - -String RID_WEBWIZARDDIALOG_START +75 -{ - Text [ en-US ] = "The ZIP target '%FILENAME' already exists. Do you want to overwrite the existing target? "; -}; - -String RID_WEBWIZARDDIALOG_START +76 -{ - Text [ en-US ] = "The FTP target directory '%FILENAME' is not empty. Some files might be overwritten. Do you want to continue?"; -}; - -String RID_WEBWIZARDDIALOG_START +77 -{ - Text [ en-US ] = "The local target directory '%FILENAME' is not empty. Some files might be overwritten. Do you want to continue?"; -}; - -String RID_WEBWIZARDDIALOG_START +78 -{ - Text [ en-US ] = "Settings already exist under the given name. Do you want to overwrite the existing settings? "; -}; - -String RID_WEBWIZARDDIALOG_START +79 -{ - Text [ en-US ] = "Exporting documents..."; -}; - -String RID_WEBWIZARDDIALOG_START +80 -{ - Text [ en-US ] = "Preparing export..."; -}; - -String RID_WEBWIZARDDIALOG_START +81 -{ - Text [ en-US ] = "Copying layout files..."; -}; - -String RID_WEBWIZARDDIALOG_START +82 -{ - Text [ en-US ] = "Preparing table of contents generation..."; -}; - -String RID_WEBWIZARDDIALOG_START +83 -{ - Text [ en-US ] = "Generating table of contents..."; -}; - -String RID_WEBWIZARDDIALOG_START +84 -{ - Text [ en-US ] = "Initializing..."; -}; - -String RID_WEBWIZARDDIALOG_START +86 -{ - Text [ en-US ] = "Preparing to publish..."; -}; - -String RID_WEBWIZARDDIALOG_START +87 -{ - Text [ en-US ] = "Publishing to local directory..."; -}; - -String RID_WEBWIZARDDIALOG_START +88 -{ - Text [ en-US ] = "Publishing to FTP destination..."; -}; - -String RID_WEBWIZARDDIALOG_START +89 -{ - Text [ en-US ] = "Publishing to a ZIP archive..."; -}; - -String RID_WEBWIZARDDIALOG_START + 90 -{ - Text [ en-US ] = "Finishing..."; -}; - -String RID_WEBWIZARDDIALOG_START + 94 -{ - Text [ en-US ] = "Graphic files"; -}; - -String RID_WEBWIZARDDIALOG_START + 95 -{ - Text [ en-US ] = "All files"; -}; - -String RID_WEBWIZARDDIALOG_START + 96 -{ - Text [ en-US ] = "~ZIP archive files"; -}; - -String RID_WEBWIZARDDIALOG_START + 98 -{ - Text [ en-US ] = "Background images"; -}; - -String RID_WEBWIZARDDIALOG_START + 99 -{ - Text [ en-US ] = "Choose a background image: "; -}; - -String RID_WEBWIZARDDIALOG_START + 100 -{ - Text [ en-US ] = "Icon sets"; -}; - -String RID_WEBWIZARDDIALOG_START + 101 -{ - Text [ en-US ] = "Choose an icon set:"; -}; - -String RID_WEBWIZARDDIALOG_START +102 -{ - Text [ en-US ] = "Other..."; -}; - -String RID_WEBWIZARDDIALOG_START +103 -{ - Text [ en-US ] = "None"; -}; - -String RID_WEBWIZARDDIALOG_START +104 -{ - Text [ en-US ] = "Your web site was created successfully into: %FILENAME"; -}; - -String RID_WEBWIZARDDIALOG_START +105 -{ - Text [ en-US ] = "One or more errors occurred when generating the web site."; -}; - -String RID_WEBWIZARDDIALOG_START +106 -{ - Text [ en-US ] = "An error occurred while generating the table of contents page(s). "; -}; - -String RID_WEBWIZARDDIALOG_START +107 -{ - Text [ en-US ] = "An error occurred while copying the layout files. "; -}; - -String RID_WEBWIZARDDIALOG_START +108 -{ - Text [ en-US ] = "An error occurred while gathering document information for '%FILENAME'. "; -}; - -String RID_WEBWIZARDDIALOG_START +109 -{ - Text [ en-US ] = "An error occurred while exporting the document '%FILENAME'."; -}; - -String RID_WEBWIZARDDIALOG_START +110 -{ - Text [ en-US ] = "An error occurred while creating a directory for exporting '%FILENAME'."; -}; - -String RID_WEBWIZARDDIALOG_START +111 -{ - Text [ en-US ] = "A security error occurred while exporting the document '%FILENAME'."; -}; - -String RID_WEBWIZARDDIALOG_START +112 -{ - Text [ en-US ] = "An input/output error occurred while exporting the document '%FILENAME'."; -}; - -String RID_WEBWIZARDDIALOG_START +113 -{ - Text [ en-US ] = "An error occurred while copying media files to the temporary directory."; -}; - -String RID_WEBWIZARDDIALOG_START +114 -{ - Text [ en-US ] = "The web site could not be copied to the following destination: %URL"; -}; - -String RID_WEBWIZARDDIALOG_START +115 -{ - Text [ en-US ] = "An unexpected error occurred: %ERROR"; -}; - -String RID_WEBWIZARDDIALOG_START +116 -{ - Text [ en-US ] = "An unexpected error occurred while validating the file: '%FILENAME'"; -}; - -String RID_WEBWIZARDDIALOG_START +117 -{ - Text [ en-US ] = "%FILENAME' is a folder."; -}; - -String RID_WEBWIZARDDIALOG_START +118 -{ - Text [ en-US ] = "Loading Web Wizard Settings..."; -}; - -String RID_WEBWIZARDDIALOG_START +119 -{ - Text [ en-US ] = "An unexpected error occurred."; -}; - -String RID_WEBWIZARDDIALOG_START +120 -{ - Text [ en-US ] = "Validating documents..."; -}; - -String RID_WEBWIZARDDIALOG_START +121 -{ - Text [ en-US ] = "My Archive"; -}; - -String RID_WEBWIZARDDIALOG_START +122 -{ - Text [ en-US ] = "Introduction "; -}; - -String RID_WEBWIZARDDIALOG_START +123 -{ - Text [ en-US ] = "Documents "; -}; - -String RID_WEBWIZARDDIALOG_START +124 -{ - Text [ en-US ] = "Main layout"; -}; - -String RID_WEBWIZARDDIALOG_START +125 -{ - Text [ en-US ] = "Layout details"; -}; - -String RID_WEBWIZARDDIALOG_START +126 -{ - Text [ en-US ] = "Style"; -}; - -String RID_WEBWIZARDDIALOG_START +127 -{ - Text [ en-US ] = "Web site information"; -}; - -String RID_WEBWIZARDDIALOG_START +128 -{ - Text [ en-US ] = "Preview"; -}; - -String RID_WEBWIZARDDIALOG_START +130 -{ - Text [ en-US ] = "The selected settings will be deleted.\n\nDo you really want to delete these settings? "; -}; - -String RID_WEBWIZARDDIALOG_START +131 -{ - Text [ en-US ] = "%NUMBER pages"; -}; - -String RID_WEBWIZARDDIALOG_START +132 -{ - Text [ en-US ] = "%NUMBER slides"; -}; - -String RID_WEBWIZARDDIALOG_START +133 -{ - Text [ en-US ] = "Created: %DATE"; -}; - -String RID_WEBWIZARDDIALOG_START +134 -{ - Text [ en-US ] = "Last modified: %DATE"; -}; - -String RID_WEBWIZARDDIALOG_START +135 -{ - Text [ en-US ] = "Web Wizard Settings"; -}; - -String RID_WEBWIZARDDIALOG_START +136 -{ - Text [ en-US ] = "Background image:"; -}; - -String RID_WEBWIZARDDIALOG_START +137 -{ - Text [ en-US ] = "Icon set:"; -}; - -String RID_WEBWIZARDDIALOG_START +138 -{ - Text [ en-US ] = "The icon set is used for presentations in HTML format."; -}; - -String RID_WEBWIZARDDIALOG_START +139 -{ - Text [ en-US ] = "HTML Metadata"; -}; - -String RID_WEBWIZARDDIALOG_START +140 -{ - Text [ en-US ] = "Choose..."; -}; - -String RID_WEBWIZARDDIALOG_START +141 -{ - Text [ en-US ] = "Choose..."; -}; - -String RID_WEBWIZARDDIALOG_START +142 -{ - Text [ en-US ] = "<default>"; -}; - -String RID_WEBWIZARDDIALOG_START +143 -{ - Text [ en-US ] = "Publishing via FTP Proxy is not supported."; -}; - -String RID_WEBWIZARDDIALOG_START +144 -{ - Text [ en-US ] = "<no background image>"; -}; - -String RID_WEBWIZARDDIALOG_START +145 -{ - Text [ en-US ] = "<no icon set>"; -}; - -String RID_WEBWIZARDDIALOG_START +146 -{ - Text [ en-US ] = "The FTP directory '%FILENAME' could not be created."; -}; - -String RID_WEBWIZARDDIALOG_START +147 -{ - Text [ en-US ] = "The FTP directory '%FILENAME' does not exist. \nCreate the directory now?"; -}; - -String RID_WEBWIZARDDIALOG_START +148 -{ - Text [ en-US ] = "The Zip file '%FILENAME' cannot be created: a directory of the same name already exists."; -}; - -String RID_WEBWIZARDDIALOG_START +149 -{ - Text [ en-US ] = "The local directory '%FILENAME' cannot be created. \nPlease check your write-access."; -}; - -String RID_WEBWIZARDDIALOG_START +150 -{ - Text [ en-US ] = "The local directory '%FILENAME' does not exist. \nCreate the directory now?"; -}; - -String RID_WEBWIZARDDIALOG_START +151 -{ - Text [ en-US ] = "Size: %NUMBERKB"; -}; - - -String RID_WEBWIZARDDIALOG_START +152 -{ - Text [ en-US ] = "File not found. Would you like to specify a new file location?"; -}; - - - -// ============================================================================ -// ================= WEB WIZARD FTP DIALOG RESOURCES ============= -// ============================================================================ - - - - -String RID_WEBWIZARDDIALOG_FTP +0 -{ - Text [ en-US ] = "FTP Connection"; -}; - -String RID_WEBWIZARDDIALOG_FTP +1 -{ - Text [ en-US ] = "~User name:"; -}; - -String RID_WEBWIZARDDIALOG_FTP +2 -{ - Text [ en-US ] = "~Password:"; -}; - -String RID_WEBWIZARDDIALOG_FTP +3 -{ - Text [ en-US ] = "Connect"; -}; - -String RID_WEBWIZARDDIALOG_FTP +4 -{ - Text [ en-US ] = "1. Enter FTP connection information."; -}; - -String RID_WEBWIZARDDIALOG_FTP +5 -{ - Text [ en-US ] = "~Server name or IP address:"; -}; - -String RID_WEBWIZARDDIALOG_FTP +6 -{ - Text [ en-US ] = "2. Connect to the server."; -}; - -String RID_WEBWIZARDDIALOG_FTP +7 -{ - Text [ en-US ] = "3. ~Choose a remote directory (optional)."; -}; - -String RID_WEBWIZARDDIALOG_FTP +8 -{ - Text [ en-US ] = "..."; -}; - -String RID_WEBWIZARDDIALOG_FTP +9 -{ - Text [ en-US ] = "Connection status is unknown"; -}; - -String RID_WEBWIZARDDIALOG_FTP +10 -{ - Text [ en-US ] = "Connection was established successfully"; -}; - -String RID_WEBWIZARDDIALOG_FTP +11 -{ - Text [ en-US ] = "Username or password is wrong"; -}; - -String RID_WEBWIZARDDIALOG_FTP +12 -{ - Text [ en-US ] = "Could not resolve server name"; -}; - -String RID_WEBWIZARDDIALOG_FTP +13 -{ - Text [ en-US ] = "You do not have sufficient user rights"; -}; - -String RID_WEBWIZARDDIALOG_FTP +14 -{ - Text [ en-US ] = "Cannot connect to server"; -}; - -String RID_WEBWIZARDDIALOG_FTP +15 -{ - Text [ en-US ] = "Unexpected error"; -}; - -String RID_WEBWIZARDDIALOG_FTP +16 -{ - Text [ en-US ] = "FTP publishing directory"; -}; - -String RID_WEBWIZARDDIALOG_FTP +17 -{ - Text [ en-US ] = "This is not an FTP folder"; -}; - -String RID_WEBWIZARDDIALOG_FTP +18 -{ - Text [ en-US ] = "Connecting..."; -}; - - -// ============================================================================ -// ============================ ====================== -// ====================== AGENDA WIZARD RESOURCES ================ -// ============================ ====================== -// ============================================================================ - -String RID_AGENDAWIZARDDIALOG_START +1 -{ - Text [en-US ] = "Agenda Wizard"; -}; - -String RID_AGENDAWIZARDDIALOG_START +2 -{ - Text [en-US ] = "Make ~manual changes to this agenda template"; -}; - -String RID_AGENDAWIZARDDIALOG_START +3 -{ - Text [en-US ] = "Template name:"; -}; - -String RID_AGENDAWIZARDDIALOG_START + 4 -{ - Text [en-US ] = "Location and file name:"; -}; - -String RID_AGENDAWIZARDDIALOG_START +5 -{ - Text [en-US ] = "What do you want to do next?"; -}; - -String RID_AGENDAWIZARDDIALOG_START +6 -{ - Text [en-US ] = "Please choose the page design for the agenda"; -}; - -String RID_AGENDAWIZARDDIALOG_START +7 -{ - Text [en-US ] = "Please select the headings you wish to include in your agenda template"; -}; - -String RID_AGENDAWIZARDDIALOG_START +8 -{ - Text [en-US ] = "Please enter general information for the event"; -}; - -String RID_AGENDAWIZARDDIALOG_START +9 -{ - Text [en-US ] = "Please specify items for the agenda"; -}; - -String RID_AGENDAWIZARDDIALOG_START +10 -{ - Text [en-US ] = "Please select the names you wish to include in your agenda template"; -}; - -String RID_AGENDAWIZARDDIALOG_START +11 -{ - Text [en-US ] = "Choose a name and save the template"; -}; - -String RID_AGENDAWIZARDDIALOG_START +12 -{ - Text [en-US ] = "Include form for recording minutes"; -}; - -String RID_AGENDAWIZARDDIALOG_START +13 -{ - Text [en-US ] = "This wizard helps you to create an agenda template. The template can then be used to create an agenda whenever needed."; -}; - -String RID_AGENDAWIZARDDIALOG_START +14 -{ - Text [en-US ] = "Time:"; -}; - -String RID_AGENDAWIZARDDIALOG_START +15 -{ - Text [en-US ] = "Name:"; -}; - -String RID_AGENDAWIZARDDIALOG_START + 16 -{ - Text [en-US ] = "Location:"; -}; - -String RID_AGENDAWIZARDDIALOG_START +17 -{ - Text [en-US ] = "Placeholders will be used in empty fields. You can replace placeholders with text later."; -}; - -String RID_AGENDAWIZARDDIALOG_START +18 -{ - Text [en-US ] = "..."; -}; - -String RID_AGENDAWIZARDDIALOG_START +19 -{ - Text [en-US ] = "Create an ~agenda from this template"; -}; - -String RID_AGENDAWIZARDDIALOG_START +20 -{ - Text [en-US ] = "To create a new agenda out of the template, go to the location where you saved the template and double-click the file."; -}; - -String RID_AGENDAWIZARDDIALOG_START +21 -{ - Text [en-US ] = "Agenda item"; -}; - -String RID_AGENDAWIZARDDIALOG_START +22 -{ - Text [en-US ] = "Responsible"; -}; - -String RID_AGENDAWIZARDDIALOG_START +23 -{ - Text [en-US ] = "Duration"; -}; - -String RID_AGENDAWIZARDDIALOG_START +24 -{ - Text [en-US ] = "Meeting called by"; -}; - -String RID_AGENDAWIZARDDIALOG_START +25 -{ - Text [en-US ] = "Chairperson"; -}; - -String RID_AGENDAWIZARDDIALOG_START +26 -{ - Text [en-US ] = "Minute keeper"; -}; - -String RID_AGENDAWIZARDDIALOG_START +27 -{ - Text [en-US ] = "Moderator"; -}; - -String RID_AGENDAWIZARDDIALOG_START +28 -{ - Text [en-US ] = "Attendees"; -}; - -String RID_AGENDAWIZARDDIALOG_START +29 -{ - Text [en-US ] = "Observers"; -}; - -String RID_AGENDAWIZARDDIALOG_START +30 -{ - Text [en-US ] = "Facility personnel"; -}; - -String RID_AGENDAWIZARDDIALOG_START +31 -{ - Text [en-US ] = "The agenda template will include placeholders for the names of the selected people. When creating an agenda from the template, you can replace these placeholder with the appropriate names."; -}; - -String RID_AGENDAWIZARDDIALOG_START +32 -{ - Text [en-US ] = "Type of meeting"; -}; - -String RID_AGENDAWIZARDDIALOG_START +33 -{ - Text [en-US ] = "Please read"; -}; - -String RID_AGENDAWIZARDDIALOG_START +34 -{ - Text [en-US ] = "Please bring"; -}; - -String RID_AGENDAWIZARDDIALOG_START +35 -{ - Text [en-US ] = "Notes"; -}; - -String RID_AGENDAWIZARDDIALOG_START +36 -{ - Text [en-US ] = "The agenda template will include placeholders for the selected items."; -}; - -String RID_AGENDAWIZARDDIALOG_START +38 -{ - Text [en-US ] = "Date:"; -}; - -String RID_AGENDAWIZARDDIALOG_START +39 -{ - Text [en-US ] = "This wizard creates an agenda template which enables you to create multiple agendas with the same layout and settings."; -}; - -String RID_AGENDAWIZARDDIALOG_START +40 -{ - Text [en-US ] = "Page design:"; -}; - -String RID_AGENDAWIZARDDIALOG_START +41 -{ - Text [en-US ] = "myAgendaTemplate.stw"; -}; - -String RID_AGENDAWIZARDDIALOG_START +42 -{ - Text [en-US ] = "My Agenda Template"; -}; - -String RID_AGENDAWIZARDDIALOG_START +43 -{ - Text [en-US ] = "An unexpected error occurred while saving the agenda template."; -}; - -String RID_AGENDAWIZARDDIALOG_START +44 -{ - Text [en-US ] = "Name"; -}; - -String RID_AGENDAWIZARDDIALOG_START +45 -{ - Text [en-US ] = "Date"; -}; - -String RID_AGENDAWIZARDDIALOG_START +46 -{ - Text [en-US ] = "Time"; -}; - -String RID_AGENDAWIZARDDIALOG_START + 47 -{ - Text [en-US ] = "Location"; -}; - -String RID_AGENDAWIZARDDIALOG_START +48 -{ - Text [en-US ] = "Click to replace this text"; -}; - -String RID_AGENDAWIZARDDIALOG_START +50 -{ - Text [en-US ] = "Page design"; -}; - -String RID_AGENDAWIZARDDIALOG_START +51 -{ - Text [en-US ] = "General information"; -}; - -String RID_AGENDAWIZARDDIALOG_START +52 -{ - Text [en-US ] = "Headings to include"; -}; - -String RID_AGENDAWIZARDDIALOG_START +53 -{ - Text [en-US ] = "Names"; -}; - -String RID_AGENDAWIZARDDIALOG_START +54 -{ - Text [en-US ] = "Agenda items"; -}; - -String RID_AGENDAWIZARDDIALOG_START +55 -{ - Text [en-US ] = "Name and location"; -}; - -String RID_AGENDAWIZARDDIALOG_START +56 -{ - Text [en-US ] = "An unexpected error occurred while opening the agenda template."; -}; - -String RID_AGENDAWIZARDDIALOG_START +57 -{ - Text [en-US ] = "Type of meeting"; -}; - -String RID_AGENDAWIZARDDIALOG_START +58 -{ - Text [en-US ] = "Please bring"; -}; - -String RID_AGENDAWIZARDDIALOG_START +59 -{ - Text [en-US ] = "Please read"; -}; - -String RID_AGENDAWIZARDDIALOG_START +60 -{ - Text [en-US ] = "Notes"; -}; - -String RID_AGENDAWIZARDDIALOG_START +61 -{ - Text [en-US ] = "Meeting called by"; -}; - -String RID_AGENDAWIZARDDIALOG_START +62 -{ - Text [en-US ] = "Chairperson"; -}; - -String RID_AGENDAWIZARDDIALOG_START +63 -{ - Text [en-US ] = "Attendees"; -}; - -String RID_AGENDAWIZARDDIALOG_START +64 -{ - Text [en-US ] = "Minute keeper"; -}; - -String RID_AGENDAWIZARDDIALOG_START +65 -{ - Text [en-US ] = "Moderator"; -}; - -String RID_AGENDAWIZARDDIALOG_START +66 -{ - Text [en-US ] = "Observers"; -}; - -String RID_AGENDAWIZARDDIALOG_START +67 -{ - Text [en-US ] = "Facility personnel"; -}; - -String RID_AGENDAWIZARDDIALOG_START +68 -{ - Text [en-US ] = "Insert"; -}; - -String RID_AGENDAWIZARDDIALOG_START +69 -{ - Text [en-US ] = "Remove"; -}; - -String RID_AGENDAWIZARDDIALOG_START +70 -{ - Text [en-US ] = "Move up"; -}; - -String RID_AGENDAWIZARDDIALOG_START +71 -{ - Text [en-US ] = "Move down"; -}; - diff --git a/wizards/source/formwizard/delzip b/wizards/source/formwizard/delzip deleted file mode 100644 index e69de29bb..000000000 --- a/wizards/source/formwizard/delzip +++ /dev/null diff --git a/wizards/source/formwizard/develop.xba b/wizards/source/formwizard/develop.xba deleted file mode 100644 index a12d1af37..000000000 --- a/wizards/source/formwizard/develop.xba +++ /dev/null @@ -1,533 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="develop" script:language="StarBasic">REM ***** BASIC ***** -Option Explicit - -Public oDBShapeList() as Object -Public oTCShapeList() as Object -Public oDBModelList() as Object -Public oGroupShapeList() as Object - -Public oGridShape as Object -Public a as Integer -Public StartA as Integer -Public bIsFirstRun as Boolean -Public bIsVeryFirstRun as Boolean -Public bControlsareCreated as Boolean -Public nDBRefHeight as Long -Public nXTCPos&, nYTCPos&, nXDBPos&, nYDBPos&, nTCHeight&, nTCWidth&, nDBHeight&, nDBWidth& - -Dim iReduceWidth as Integer - -Function PositionControls(Maxindex as Integer) -Dim oTCModel as Object -Dim oDBModel as Object -Dim i as Integer - InitializePosSizes() - bIsFirstRun = True - bIsVeryFirstRun = True - a = 0 - StartA = 0 - nMaxRowY = 0 - nSecMaxRowY = 0 - If CurArrangement = cLeftJustified Or cTopJustified Then - DialogModel.optAlign0.State = 1 - End If - For i = 0 To MaxIndex - GetCurrentMetaValues(i) - oTCModel = InsertTextControl(i) - If CurFieldType = com.sun.star.sdbc.DataType.TIMESTAMP Then - InsertTimeStampShape(i) - Else - InsertDBControl(i) - bIsVeryFirstRun = False - oDBModelList(i).LabelControl = oTCModel - End If - GetLabelDiffHeight(i+1) - ResetPosSizes(i) - oProgressbar.Value = i - Next i - ControlCaptionstoStandardLayout() - bControlsareCreated = True -End Function - - -Sub ResetPosSizes(LastIndex as Integer) - Select Case CurArrangement - Case cColumnarLeft - nYDBPos = nYDBPos + nDBHeight + cVertDistance - If (nYDBPos > cYOffset + nFormHeight) Or (LastIndex = MaxIndex) Then - RepositionColumnarLeftControls(LastIndex) - nXTCPos = nMaxColRightX + 2 * cHoriDistance - nXDBPos = nXTCPos + cHoriDistance + nMaxTCWidth - nYDBPos = cYOffset - bIsFirstRun = True - StartA = LastIndex + 1 - a = 0 - Else - a = a + 1 - End If - nYTCPos = nYDBPos + LABELDIFFHEIGHT - Case cColumnarTop - nYTCPos = nYDBPos + nDBHeight + cVertDistance - If nYTCPos > cYOffset + nFormHeight Then - nXDBPos = nMaxColRightX + cHoriDistance - nXTCPos = nXDBPos - nYDBPos = cYOffset + nTCHeight + cVertDistance - nYTCPos = cYOffset - bIsFirstRun = True - StartA = LastIndex + 1 - a = 0 - Else - a = a + 1 - End If - Case cLeftJustified,cTopJustified - If nMaxColRightX > cXOffset + nFormWidth Then - Dim nOldYTCPos as Long - nOldYTCPos = nYTCPos - CheckJustifiedPosition() - Else - nXTCPos = nMaxColRightX + CHoriDistance - If CurArrangement = cLeftJustified Then - nYTCPos = nYDBPos + LabelDiffHeight - End If - End If - a = a + 1 - End Select -End Sub - - -Sub RepositionColumnarLeftControls(LastIndex as Integer) -Dim aSize As New com.sun.star.awt.Size -Dim aPoint As New com.sun.star.awt.Point -Dim i as Integer - aSize = GetSize(nMaxTCWidth, nTCHeight) - bIsFirstRun = True - For i = StartA To LastIndex - If i = StartA Then - nXTCPos = oTCShapeList(i).Position.X - nXDBPos = nXTCPos + nMaxTCWidth + cHoriDistance - End If - ResetDBShape(oDBShapeList(i), nXDBPos) - CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, True) - Next i -End Sub - - -Sub ResetDBShape(oLocDBShape as Object, iXPos as Long) -Dim aSize As New com.sun.star.awt.Size -Dim aPoint As New com.sun.star.awt.Point - nYDBPos = oLocDBShape.Position.Y - nDBWidth = oLocDBShape.Size.Width - nDBHeight = oLocDBShape.Size.Height - aPoint = GetPoint(iXPos,nYDBPos) - oLocDBShape.SetPosition(aPoint) -End Sub - - -Sub InitializePosSizes() - nXTCPos = cXOffset - nTCWidth = 2000 - nDBWidth = 2000 - nDBHeight = nDBRefHeight - iReduceWidth = 0 - Select Case CurArrangement - Case cColumnarLeft, cLeftJustified - GetLabelDiffHeight(0) - nYTCPos = cYOffset + LABELDIFFHEIGHT - nXDBPos = cXOffset + 3050 - nYDBPos = cYOffset - Case cColumnarTop, cTopJustified - nXDBPos = cXOffset - nYTCPos = cYOffset - End Select -End Sub - - -Function InsertTextControl(i as Integer) as Object -Dim oShape as Object -Dim oModel as Object -Dim aPoint as New com.sun.star.awt.Point -Dim aSize As New com.sun.star.awt.Size - If bControlsareCreated Then - Set oShape = oTCShapeList(i) - Set oModel = oShape.GetControl - If CurArrangement = cLeftJustified Then - nTCWidth = GetPreferredWidth(oModel, True, CurFieldname) - Else - nTCWidth = oShape.Size.Width - End If - oShape.Position = GetPoint(nXTCPos, nYTCPos) - If CurArrangement = cColumnarTop Then - oModel.Align = com.sun.star.awt.TextAlign.LEFT - End If - Else - oModel = CreateUnoService(oModelService(cLabel)) - aPoint = GetPoint(nXTCPos, nYTCPos) - aSize = GetSize(nTCWidth,nTCHeight) - Set oShape = InsertControl(oDrawPage, oModel, aPoint, aSize) - Set oTCShapeList(i)= oShape - If bIsVeryFirstRun Then - If CurArrangement = cColumnarTop Then - nYDBPos = nYTCPos + nTCHeight - End If - End If - nTCWidth = GetPreferredWidth(oModel, True, CurFieldName) - End If - If CurArrangement = cColumnarLeft Then - ' Note This If Sequence must be called before retrieving the outer Points - If bIsFirstRun Then - nMaxTCWidth = nTCWidth - bIsFirstRun = False - ElseIf nTCWidth > nMaxTCWidth Then - nMaxTCWidth = nTCWidth - End If - End If - CheckOuterPoints(oShape.Position.X, nTCWidth, nYTCPos, nTCHeight, False) - Select Case CurArrangement - Case cLeftJustified - nXDBPos = nMaxColRightX - Case cColumnarTop,cTopJustified - oModel.Align = com.sun.star.awt.TextAlign.LEFT - nXDBPos = nXTCPos - nYDBPos = nYTCPos + nTCHeight - If CurFieldLength = 20 And nDBWidth > 2 * nTCWidth Then - iReduceWidth = iReduceWidth + 1 - End If - End Select - oShape.SetSize(GetSize(nTCWidth,nTCHeight)) - If CurHelpText <> "" Then - oModel.HelpText = CurHelptext - End If - InsertTextControl = oModel -End Function - - -Sub InsertDBControl(i as Integer) -Dim aPoint as New com.sun.star.awt.Point -Dim aSize As New com.sun.star.awt.Size -Dim oControl as Object -Dim iColRightX as Long - - aPoint = GetPoint(nXDBPos, nYDBPos) - If bControlsAreCreated Then - oDBShapeList(i).Position = aPoint - Else - oDBModelList(i) = CreateUnoService(oModelService(CurControlType)) - oDBShapeList(i) = InsertControl(oDrawPage, oDBModelList(i), aPoint, aSize) - SetNumerics(oDBModelList(i), CurFieldType) - If CurControlType = cCheckBox Then - oDBModelList(i).Label = "" - End If - oDBModelList(i).DataField = CurFieldName - End If - nDBHeight = GetDBHeight(oDBModelList(i)) - nDBWidth = GetPreferredWidth(oDBModelList(i),True) - aSize = GetSize(nDBWidth,nDBHeight) - oDBShapeList(i).SetSize(aSize) - CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, True) -End Sub - - -Function InsertTimeStampShape(i as Integer) as Object -Dim oDateModel as Object -Dim oTimeModel as Object -Dim oDateShape as Object -Dim oTimeShape as Object -Dim oDateTimeShape as Object -Dim aPoint as New com.sun.star.awt.Point -Dim aSize as New com.sun.star.awt.Size -Dim nDateWidth as Long -Dim nTimeWidth as Long -Dim oGroupShape as Object - aPoint = GetPoint(nXDBPos, nYDBPos) - If bControlsAreCreated Then - oDBShapeList(i).Position = aPoint - nDBWidth = oDBShapeList(i).Size.Width - nDBHeight = oDBShapeList(i).Size.Height - Else - oGroupShape = oDocument.CreateInstance("com.sun.star.drawing.GroupShape") - oGroupShape.AnchorType = com.sun.star.text.TextContentAnchorType.AT_PARAGRAPH - oDrawPage.Add(oGroupShape) - CurFieldType = com.sun.star.sdbc.DataType.DATE - oDateModel = CreateUnoService("com.sun.star.form.component.DateField") - oDateModel.DataField = CurFieldName - oDateShape = InsertControl(oGroupShape, oDateModel, aPoint, aSize) - SetNumerics(oDateModel, CurFieldType) - nDBHeight = GetDBHeight(oDateModel) - nDateWidth = GetPreferredWidth(oDateModel,True) - aSize = GetSize(nDateWidth,nDBHeight) - oDateShape.SetSize(aSize) - - CurFieldType = com.sun.star.sdbc.DataType.TIME - oTimeModel = CreateUnoService("com.sun.star.form.component.TimeField") - oTimeModel.DataField = CurFieldName - oTimeShape = InsertControl(oGroupShape, oTimeModel, aPoint, aSize) - oTimeShape.Position = GetPoint(nXDBPos + 10 + nDateWidth,nYDBPos) - nTimeWidth = GetPreferredWidth(oTimeModel) - aSize = GetSize(nTimeWidth,nDBHeight) - oTimeShape.SetSize(aSize) - nDBWidth = nDateWidth + nTimeWidth + 10 - oGroupShape.Position = aPoint - oGroupShape.Size = GetSize(nDBWidth, nDBHeight) - Set oDBShapeList(i)= oGroupShape - End If - CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, True) - InsertTimeStampShape() = oDBShapeList(i) -End Function - - -' Note: on all Controls except for the checkbox the Label has to be set -' a bit under the DBControl because its Height is also smaller -Sub GetLabelDiffHeight(Index as Integer) - If (CurArrangement = cLeftJustified) Or (CurArrangement = cColumnarLeft) Then - If Index <= Ubound(FieldMetaValues()) Then - If FieldMetaValues(Index,2) = cCheckBox Then - LabelDiffHeight = 0 - Else - LabelDiffHeight = BasicLabelDiffHeight - End If - End If - End If -End Sub - - -Sub CheckJustifiedPosition() -Dim nLeftDist as Long -Dim nRightDist as Long -Dim oLocDBShape as Object -Dim oLocTextShape as Object -Dim nBaseWidth as Long - nBaseWidth = nFormWidth + cXOffset - nLeftDist = nMaxColRightX - nBaseWidth - nRightDist = nBaseWidth - nXTCPos + cHoriDistance - If nLeftDist < 0.5 * nRightDist and iReduceWidth > 2 Then - ' Fieldwidths in the line can be made smaller - AdjustLineWidth(StartA, a, nLeftDist, - 1) - If CurArrangement = cLeftjustified Then - nYDBPos = nMaxRowY + cVertDistance - nYTCPos = nYDBPos + LABELDIFFHEIGHT - nXTCPos = cXOffset - Else - nYTCPos = nMaxRowY + cVertDistance - nYDBPos = nYTCPos + nTCHeight - nXTCPos = cXOffset - nXDBPos = cXOffset - End If - bIsFirstRun = True - StartA = a + 1 - Else - Set oLocDBShape = oDBShapeList(a) - Set oLocTextShape = oTCShapeList(a) - If CurArrangement = cLeftJustified Then - If nYDBPos + nDBHeight = nMaxRowY Then - ' The last Control was the highes in the row - nYDBPos = nSecMaxRowY + cVertDistance - Else - nYDBPos = nMaxRowY + cVertDistance - End If - nYTCPos = nYDBPos + LABELDIFFHEIGHT - nXDBPos = cXOffset + nTCWidth - oLocTextShape.Position = GetPoint(cXOffset, nYTCPos) - oLocDBShape.Position = GetPoint(nXDBPos, nYDBPos) - ' PosSizes for the next two Controls - nXTCPos = oLocDBShape.Position.X + oLocDBShape.Size.Width + cHoriDistance - bIsFirstRun = True - CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, True) - nXDBPos = nMaxColRightX + cHoriDistance - Else ' cTopJustified - If nYDBPos + nDBHeight = nMaxRowY Then - ' The last Control was the highest in the row - nYTCPos = nSecMaxRowY + cVertDistance - Else - nYTCPos = nMaxRowY + cVertDistance - End If - nYDBPos = nYTCPOS + nTCHeight - nXDBPos = cXOffset - nXTCPos = cXOffset - oLocTextShape.Position = GetPoint(cXOffset, nYTCPos) - oLocDBShape.Position = GetPoint(cXOffset, nYDBPos) - bIsFirstRun = True - If nDBWidth > nTCWidth Then - CheckOuterPoints(nXDBPos, nDBWidth, nYDBPos, nDBHeight, True) - Else - CheckOuterPoints(nXDBPos, nTCWidth, nYDBPos, nDBHeight, True) - End If - nXTCPos = nMaxColRightX + cHoriDistance - nXDBPos = nXTCPos - End If - AdjustLineWidth(StartA, a-1, nRightDist, 1) - StartA = a - End If - iReduceWidth = 0 -End Sub - - - -Function GetCorrWidth(StartIndex as Integer, EndIndex as Integer, nDist as Long, Widthfactor as Integer) as Integer -Dim ShapeCount as Integer - If WidthFactor > 0 Then - ShapeCount = EndIndex-StartIndex + 1 - Else - ShapeCount = iReduceWidth - End If - GetCorrWidth() = (nDist)/ShapeCount -End Function - - -Sub AdjustLineWidth(StartIndex as Integer, EndIndex as Integer, nDist as Long, Widthfactor as Integer) -Dim i as Integer -Dim oLocDBShape as Object -Dim oLocTCShape as Object -Dim CorrWidth as Integer -Dim bAdjustPos as Boolean -Dim iLocTCPosX as Long -Dim iLocDBPosX as Long - CorrWidth = GetCorrWidth(StartIndex, EndIndex, nDist, Widthfactor) - bAdjustPos = False - iLocTCPosX = cXOffset - For i = StartIndex To EndIndex - Set oLocDBShape = oDBShapeList(i) - Set oLocTCShape = oTCShapeList(i) - If bAdjustPos Then - oLocTCShape.Position = GetPoint(iLocTCPosX, oLocTCShape.Position.Y) - If CurArrangement = cLeftJustified Then - iLocDBPosX = oLocTCShape.Position.X + oLocTCShape.Size.Width - oLocDBShape.Position = GetPoint(iLocDBPosX, oLocDBShape.Position.Y) - Else - oLocDBShape.Position = GetPoint(iLocTCPosX, oLocTCShape.Position.Y + nTCHeight) - End If - Else - bAdjustPos = True - End If - If CDbl(FieldMetaValues(i,1)) > 20 or WidthFactor > 0 Then - If (CurArrangement = cTopJustified) And (oLocTCShape.Size.Width > oLocDBShape.Size.Width) Then - oLocDBShape.Size = GetSize(oLocTCShape.Size.Width + WidthFactor * CorrWidth, oLocDBShape.Size.Height) - Else - oLocDBShape.Size = GetSize(oLocDBShape.Size.Width + WidthFactor * CorrWidth, oLocDBShape.Size.Height) - End If - End If - iLocTCPosX = oLocDBShape.Position.X + oLocDBShape.Size.Width + cHoriDistance - If CurArrangement = cTopJustified Then - If oLocTCShape.Size.Width > oLocDBShape.Size.Width Then - iLocTCPosX = oLocDBShape.Position.X + oLocTCShape.Size.Width + cHoriDistance - End If - End If - Next i -End Sub - - -Sub CheckOuterPoints(nXPos, nWidth, nYPos, nHeight, bIsDBField as Boolean) -Dim nColRightX as Long -Dim nRowY as Long -Dim nOldMaxRowY as Long - If CurArrangement = cLeftJustified Or CurArrangement = cTopJustified Then - If bIsDBField Then - ' Only at DBControls you can measure the Value of nMaxRowY - If bIsFirstRun Then - nMaxRowY = nYPos + nHeight - nSecMaxRowY = nMaxRowY - Else - nRowY = nYPos + nHeight - If nRowY >= nMaxRowY Then - nOldMaxRowY = nMaxRowY - nSecMaxRowY = nOldMaxRowY - nMaxRowY = nRowY - End If - End If - End If - End If - ' Find the outer right point - If bIsFirstRun Then - nMaxColRightX = nXPos + nWidth - bIsFirstRun = False - Else - nColRightX = nXPos + nWidth - If nColRightX > nMaxColRightX Then - nMaxColRightX = nColRightX - End If - End If -End Sub - - -Function PositionGridControl(MaxIndex as Integer) -Dim oControl as Object -Dim n as Integer -Dim oColumn as Object -Dim aPoint as New com.sun.star.awt.Point -Dim aSize as New com.sun.star.awt.Size - If bControlsareCreated Then - ShapesToNirwana() - End If - oGridModel = CreateUnoService(oModelService(cGridControl)) - oGridModel.Name = "Grid1" - aPoint = GetPoint(cXOffset, cYOffset) - aSize = GetSize(nFormWidth, nFormHeight) - oDBForm.InsertByName (oGridModel.Name, oGridModel) - oGridShape = InsertControl(oDrawPage, oGridModel, aPoint, aSize) - For n = 0 to MaxIndex - GetCurrentMetaValues(n) - If CurFieldType = com.sun.star.sdbc.DataType.TIMESTAMP Then - oColumn = SetupGridColumn(oGridModel,"DateField", False, com.sun.star.sdbc.DataType.DATE, CurFieldName & " " & sDateAppendix) - oColumn = SetupGridColumn(oGridModel,"TimeField", False, com.sun.star.sdbc.DataType.TIME, CurFieldName & " " & sTimeAppendix) - Else - If CurControlType = cImageControl Then - oColumn = SetupGridColumn(oGridModel,"TextField", True, CurFieldType, CurFieldName) - Else - oColumn = SetupGridColumn(oGridModel, CurControlName, False, CurFieldType, CurFieldName) - End If - End If - oProgressbar.Value = n - next n -End Function - - -Function SetupGridColumn(oGridModel as Object, ControlName as String, bHidden as Boolean, iLocFieldType as Integer, ColName as String) as Object -Dim oColumn as Object - CurControlName = ControlName - oColumn = oGridModel.CreateColumn(CurControlName) - oColumn.Name = CalcUniqueContentName(oGridModel, CurControlName) - oColumn.Hidden = bHidden - SetNumerics(oColumn, iLocFieldType) - oColumn.DataField = CurFieldName - oColumn.Label = ColName - oColumn.Width = 0 ' Width of column is adjusted to Columname - oGridModel.insertByName(oColumn.Name, oColumn) -End Function - - -Sub ControlCaptionstoStandardLayout() -Dim i as Integer -Dim iBorderType as Integer -Dim oCurModel as Object -Dim oStyle as Object -Dim iStandardColor as Long - If CurArrangement <> cTabled Then - oStyle = oDocument.StyleFamilies.GetByName("ParagraphStyles").GetByName("Standard") - iStandardColor = oStyle.CharColor - For i = 0 To MaxIndex - oCurModel = oTCShapeList(i).GetControl - If i = 0 Then - If oCurModel.TextColor = iStandardColor Then - Exit Sub - End If - End If - oCurModel.TextColor = iStandardColor - Next i - End If -End Sub - - -Sub GroupShapesTogether() -Dim i as Integer - If CurArrangement <> cTabled Then - For i = 0 To MaxIndex - oGroupShapeList(i) = CreateUnoService("com.sun.star.drawing.ShapeCollection") - oGroupShapeList(i).Add(oTCShapeList(i)) - oGroupShapeList(i).Add(oDBShapeList(i)) - oDrawPage.Group(oGroupShapeList(i)) - Next i - Else - RemoveNirwanaShapes() - End If -End Sub</script:module>
\ No newline at end of file diff --git a/wizards/source/formwizard/dialog.xlb b/wizards/source/formwizard/dialog.xlb deleted file mode 100644 index d680f2929..000000000 --- a/wizards/source/formwizard/dialog.xlb +++ /dev/null @@ -1,5 +0,0 @@ -<?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="FormWizard" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="DlgFormDB"/> -</library:library> diff --git a/wizards/source/formwizard/script.xlb b/wizards/source/formwizard/script.xlb deleted file mode 100644 index 0b79b7f07..000000000 --- a/wizards/source/formwizard/script.xlb +++ /dev/null @@ -1,10 +0,0 @@ -<?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="FormWizard" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="FormWizard"/> - <library:element library:name="Layouter"/> - <library:element library:name="Language"/> - <library:element library:name="DBMeta"/> - <library:element library:name="tools"/> - <library:element library:name="develop"/> -</library:library> diff --git a/wizards/source/formwizard/tools.xba b/wizards/source/formwizard/tools.xba deleted file mode 100644 index 8b40b8379..000000000 --- a/wizards/source/formwizard/tools.xba +++ /dev/null @@ -1,349 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="tools" script:language="StarBasic">REM ***** BASIC ***** -Option Explicit -Public Const SBMAXTEXTSIZE = 50 - - -Function SetProgressValue(iValue as Integer) - If iValue = 0 Then - oProgressbar.End - End If - ProgressValue = iValue - oProgressbar.Value = iValue -End Function - - -Function GetPreferredWidth(oModel as Object, bGetMaxWidth as Boolean, Optional LocText) -Dim aPeerSize as new com.sun.star.awt.Size -Dim nWidth as Integer -Dim oControl as Object - If Not IsMissing(LocText) Then - ' Label - aPeerSize = GetPeerSize(oModel, oControl, LocText) - ElseIf CurControlType = cImageControl Then - GetPreferredWidth() = 2000 - Exit Function - Else - aPeerSize = GetPeerSize(oModel, oControl) - End If - nWidth = aPeerSize.Width - ' We increase the preferred Width a bit so that the control does not become too small - ' when we change the border from "3D" to "Flat" - GetPreferredWidth = (nWidth + 10) * XPixelFactor ' PixelTo100thmm(nWidth) -End Function - - -Function GetPreferredHeight(oModel as Object, Optional LocText) -Dim aPeerSize as new com.sun.star.awt.Size -Dim nHeight as Integer -Dim oControl as Object - If Not IsMissing(LocText) Then - ' Label - aPeerSize = GetPeerSize(oModel, oControl, LocText) - ElseIf CurControlType = cImageControl Then - GetPreferredHeight() = 2000 - Exit Function - Else - aPeerSize = GetPeerSize(oModel, oControl) - End If - nHeight = aPeerSize.Height - ' We increase the preferred Height a bit so that the control does not become too small - ' when we change the border from "3D" to "Flat" - GetPreferredHeight = (nHeight+1) * YPixelFactor ' PixelTo100thmm(nHeight) -End Function - - -Function GetPeerSize(oModel as Object, oControl as Object, Optional LocText) -Dim oPeer as Object -Dim aPeerSize as new com.sun.star.awt.Size -Dim NullValue - oControl = oController.GetControl(oModel) - oPeer = oControl.GetPeer() - If oControl.Model.PropertySetInfo.HasPropertybyName("EffectiveMax") Then - If oControl.Model.EffectiveMax = 0 Then - ' This is relevant for decimal fields - oControl.Model.EffectiveValue = 999.9999 - Else - oControl.Model.EffectiveValue = oControl.Model.EffectiveMax - End If - GetPeerSize() = oPeer.PreferredSize() - oControl.Model.EffectiveValue = NullValue - ElseIf Not IsMissing(LocText) Then - oControl.Text = LocText - GetPeerSize() = oPeer.PreferredSize() - ElseIf CurFieldType = com.sun.star.sdbc.DataType.BIT Then - GetPeerSize() = oPeer.PreferredSize() - ElseIf CurFieldType = com.sun.star.sdbc.DataType.BOOLEAN Then - GetPeerSize() = oPeer.PreferredSize() - ElseIf CurFieldType = com.sun.star.sdbc.DataType.DATE Then - oControl.Model.Date = Date - GetPeerSize() = oPeer.PreferredSize() - oControl.Model.Date = NullValue - ElseIf CurFieldType = com.sun.star.sdbc.DataType.TIME Then - oControl.Time = Time - GetPeerSize() = oPeer.PreferredSize() - oControl.Time = NullValue - Else - If oControl.MaxTextLen > SBMAXTEXTSIZE Then - oControl.Text = Mid(SBSIZETEXT,1, SBMAXTEXTSIZE) - Else - oControl.Text = Mid(SBSIZETEXT,1, oControl.MaxTextLen) - End If - GetPeerSize() = oPeer.PreferredSize() - oControl.Text = "" - End If -End Function - - -Function TwipToCM(BYVAL nValue as long) as String - TwipToCM = trim(str(nValue / 567)) + "cm" -End function - - -Function TwipTo100telMM(BYVAL nValue as long) as long - TwipTo100telMM = nValue / 0.567 -End function - - -Function TwipToPixel(BYVAL nValue as long) as long ' not an exact calculation - TwipToPixel = nValue / 15 -End function - - -Function PixelTo100thMMX(oControl as Object) as long - oPeer = oControl.GetPeer() - PixelTo100mmX = Clng(Peer.GetInfo.PixelPerMeterX/100000) - -' PixelTo100thMM = nValue * 28 ' not an exact calculation -End function - - -Function PixelTo100thMMY(oControl as Object) as long - oPeer = oControl.GetPeer() - PixelTo100mmX = Clng(Peer.GetInfo.PixelPerMeterY/100000) - -' PixelTo100thMM = nValue * 28 ' not an exact calculation -End function - - -Function GetPoint(xPos, YPos) as New com.sun.star.awt.Point -Dim aPoint as New com.sun.star.awt.Point - aPoint.X = xPos - aPoint.Y = yPos - GetPoint() = aPoint -End Function - - -Function GetSize(iWidth, iHeight) As New com.sun.star.awt.Size -Dim aSize As New com.sun.star.awt.Size - aSize.Width = iWidth - aSize.Height = iHeight - GetSize() = aSize -End Function - - -Sub ImportStyles() -Dim OldIndex as Integer - If Not bDebug Then - On Local Error GoTo WIZARDERROR - End If - OldIndex = CurIndex - CurIndex = GetCurIndex(DialogModel.lstStyles, Styles(),8) - If CurIndex <> OldIndex Then - ToggleLayoutPage(False) - Dim sImportPath as String - sImportPath = Styles(CurIndex, 8) - bWithBackGraphic = LoadNewStyles(oDocument, DialogModel, CurIndex, sImportPath, Styles(), TexturePath) - ControlCaptionsToStandardLayout() - ToggleLayoutPage(True, "lstStyles") - End If -WIZARDERROR: - If Err <> 0 Then - Msgbox(sMsgErrMsg, 16, GetProductName()) - Resume LOCERROR - LOCERROR: - End If -End Sub - - - -Function SetNumerics(ByVal oLocObject as Object, iLocFieldType as Integer) as Object - If CurControlType = cNumericBox Then - oLocObject.TreatAsNumber = True - Select Case iLocFieldType - Case com.sun.star.sdbc.DataType.BIGINT - oLocObject.EffectiveMax = 2147483647 * 2147483647 - oLocObject.EffectiveMin = -(-2147483648 * -2147483648) -' oLocObject.DecimalAccuracy = 0 - Case com.sun.star.sdbc.DataType.INTEGER - oLocObject.EffectiveMax = 2147483647 - oLocObject.EffectiveMin = -2147483648 - Case com.sun.star.sdbc.DataType.SMALLINT - oLocObject.EffectiveMax = 32767 - oLocObject.EffectiveMin = -32768 - Case com.sun.star.sdbc.DataType.TINYINT - oLocObject.EffectiveMax = 127 - oLocObject.EffectiveMin = -128 - Case com.sun.star.sdbc.DataType.FLOAT, com.sun.star.sdbc.DataType.REAL, com.sun.star.sdbc.DataType.DOUBLE, com.sun.star.sdbc.DataType.DECIMAL, com.sun.star.sdbc.DataType.NUMERIC -'Todo: oLocObject.DecimalAccuracy = ... - oLocObject.EffectiveDefault = CurDefaultValue -' Todo: HelpText??? - End Select - If oLocObject.PropertySetinfo.HasPropertyByName("Width")Then ' Note: an Access AutoincrementField does not provide this property Width - oLocObject.Width = CurFieldLength + CurScale + 1 - End If - If CurIsCurrency Then -'Todo: How do you set currencies? - End If - ElseIf CurControlType = cTextBox Then 'com.sun.star.sdbc.DataType.CHAR, com.sun.star.sdbc.DataType.VARCHAR, com.sun.star.sdbc.DataType.LONGVARCHAR - If CurFieldLength = 0 Then 'Or oLocObject.MaxTextLen > SBMAXTEXTSIZE - oLocObject.MaxTextLen = SBMAXTEXTSIZE - CurFieldLength = SBMAXTEXTSIZE - Else - oLocObject.MaxTextLen = CurFieldLength - End If - oLocObject.DefaultText = CurDefaultValue - ElseIf CurControlType = cDateBox Then -' Todo Why does this not work?: oLocObject.DefaultDate = CurDefaultValue - ElseIf CurControlType = cTimeBox Then ' com.sun.star.sdbc.DataType.DATE, com.sun.star.sdbc.DataType.TIME - oLocObject.DefaultTime = CurDefaultValue -' Todo: Property TimeFormat? frome where? - ElseIf CurControlType = cCheckBox Then -' Todo Why does this not work?: oLocObject.DefautState = CurDefaultValue - End If - If oLocObject.PropertySetInfo.HasPropertybyName("FormatKey") Then - On Local Error Resume Next - oLocObject.FormatKey = CurFormatKey - End If -End Function - - -' Destroy all Shapes in Nirwana -Sub RemoveShapes() -Dim n as Integer -Dim oControl as Object -Dim oShape as Object - For n = oDrawPage.Count-1 To 0 Step -1 - oShape = oDrawPage(n) - If oShape.Position.Y > -2000 Then - oDrawPage.Remove(oShape) - End If - Next n -End Sub - - -' Destroy all Shapes in Nirwana -Sub RemoveNirwanaShapes() -Dim n as Integer -Dim oControl as Object -Dim oShape as Object - For n = oDrawPage.Count-1 To 0 Step -1 - oShape = oDrawPage(n) - If oShape.Position.Y < -2000 Then - oDrawPage.Remove(oShape) - End If - Next n -End Sub - - - -' Note: as Shapes cannot be removed from the DrawPage without destroying -' the object we have to park them somewhere beyond the visible area of the page -Sub ShapesToNirwana() -Dim n as Integer -Dim oControl as Object - For n = 0 To oDrawPage.Count-1 - oDrawPage(n).Position = GetPoint(-20, -10000) - Next n -End Sub - - -Function CalcUniqueContentName(BYVAL oContainer as Object, sBaseName as String) as String - -Dim nPostfix as Integer -Dim sReturn as String - nPostfix = 2 - sReturn = sBaseName - while (oContainer.hasByName(sReturn)) - sReturn = sBaseName & nPostfix - nPostfix = nPostfix + 1 - Wend - CalcUniqueContentName = sReturn -End Function - - -Function CountItemsInArray(BigArray(), SearchItem) -Dim i as Integer -Dim MaxIndex as Integer -Dim ResCount as Integer - ResCount = 0 - MaxIndex = Ubound(BigArray()) - For i = 0 To MaxIndex - If SearchItem = BigArray(i) Then - ResCount = ResCount + 1 - End If - Next i - CountItemsInArray() = ResCount -End Function - - -Function GetDBHeight(oDBModel as Object) - If CurControlType = cImageControl Then - nDBHeight = 2000 - Else - If CurFieldType = com.sun.star.sdbc.DataType.LONGVARCHAR Then - oDBModel.MultiLine = True - nDBHeight = nDBRefHeight * 4 - Else - nDBHeight = nDBRefHeight - End If - End If - GetDBHeight() = nDBHeight -End Function - - -Function GetFormWizardPaths() as Boolean - FormPath = GetOfficeSubPath("Template","../wizard/bitmap") - If FormPath <> "" Then - WebWizardPath = GetOfficeSubPath("Template","wizard/web") - If WebWizardPath <> "" Then - WizardPath = GetOfficeSubPath("Template","wizard/") - If Wizardpath <> "" Then - TexturePath = GetOfficeSubPath("Gallery", "www-back/") - If TexturePath <> "" Then - WorkPath = GetPathSettings("Work") - If WorkPath <> "" Then - TempPath = GetPathSettings("Temp") - If TempPath <> "" Then - GetFormWizardPaths = True - Exit Function - End If - End If - End If - End If - End If - End If - DisposeDocument(oDocument) - GetFormWizardPaths() = False -End Function - - -Function GetFilterName(sApplicationKey as String) as String -Dim oArgs() -Dim oFactory -Dim i as Integer -Dim Maxindex as Integer -Dim UIName as String - oFactory = createUnoService("com.sun.star.document.FilterFactory") - oArgs() = oFactory.getByName(sApplicationKey) - MaxIndex = Ubound(oArgs()) - For i = 0 to MaxIndex - If (oArgs(i).Name="UIName") Then - UIName = oArgs(i).Value - Exit For - End If - next i - GetFilterName() = UIName -End Function -</script:module> diff --git a/wizards/source/gimmicks/AutoText.xba b/wizards/source/gimmicks/AutoText.xba deleted file mode 100644 index 5d3cc18e5..000000000 --- a/wizards/source/gimmicks/AutoText.xba +++ /dev/null @@ -1,97 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="AutoText" script:language="StarBasic">' BASIC -Option Explicit -Dim oDocument as Object -Dim sDocumentTitle as String - - -Sub Main() -Dim oTable as Object -Dim oRows as Object -Dim oDocuText as Object -Dim oAutoTextCursor as Object -Dim oAutoTextContainer as Object -Dim oAutogroup as Object -Dim oAutoText as Object -Dim oCharStyles as Object -Dim oContentStyle as Object -Dim oHeaderStyle as Object -Dim oGroupTitleStyle as Object -Dim n, m, iAutoCount as Integer - BasicLibraries.LoadLibrary("Tools") - sDocumentTitle = "Installed AutoTexts" - - ' Open a new empty document - oDocument = CreateNewDocument("swriter") - If Not IsNull(oDocument) Then - oDocument.DocumentProperties.Title = sDocumentTitle - oDocuText = oDocument.Text - - ' Create The Character-templates - oCharStyles = oDocument.StyleFamilies.GetByName("CharacterStyles") - - ' The Characterstyle for the Header that describes the Title of Autotextgroups - oGroupTitleStyle = oDocument.createInstance("com.sun.star.style.CharacterStyle") - oCharStyles.InsertbyName("AutoTextGroupTitle", oGroupTitleStyle) - - oGroupTitleStyle.CharWeight = com.sun.star.awt.FontWeight.BOLD - oGroupTitleStyle.CharHeight = 14 - - ' The Characterstyle for the Header that describes the Title of Autotextgroups - oHeaderStyle = oDocument.createInstance("com.sun.star.style.CharacterStyle") - oCharStyles.InsertbyName("AutoTextHeading", oHeaderStyle) - oHeaderStyle.CharWeight = com.sun.star.awt.FontWeight.BOLD - - ' "Ordinary" Table Content - oContentStyle = oDocument.createInstance("com.sun.star.style.CharacterStyle") - oCharStyles.InsertbyName("TableContent", oContentStyle) - - oAutoTextContainer = CreateUnoService("com.sun.star.text.AutoTextContainer") - - oAutoTextCursor = oDocuText.CreateTextCursor() - - oAutoTextCursor.CharStyleName = "AutoTextGroupTitle" - ' Link the Title with the following table - oAutoTextCursor.ParaKeepTogether = True - - For n = 0 To oAutoTextContainer.Count - 1 - oAutoGroup = oAutoTextContainer.GetByIndex(n) - - oAutoTextCursor.SetString(oAutoGroup.Title) - oAutoTextCursor.CollapseToEnd() - oDocuText.insertControlCharacter(oAutoTextCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False) - oTable = oDocument.CreateInstance("com.sun.star.text.TextTable") - ' Divide the table if necessary - oTable.Split = True -' oTable.KeepTogether = False - oTable.RepeatHeadLine = True - oAutoTextCursor.Text.InsertTextContent(oAutoTextCursor,oTable,False) - InsertStringToCell("AutoText Name",oTable.GetCellbyPosition(0,0), "AutoTextHeading") - InsertStringToCell("AutoText Shortcut",oTable.GetCellbyPosition(1,0), "AutoTextHeading") - ' Insert one row at the bottom of the table - oRows = oTable.Rows - iAutoCount = oAutoGroup.Count - For m = 0 To iAutoCount-1 - ' Insert the name and the title of all Autotexts - oAutoText = oAutoGroup.GetByIndex(m) - InsertStringToCell(oAutoGroup.Titles(m), oTable.GetCellbyPosition(0, m + 1), "TableContent") - InsertStringToCell(oAutoGroup.ElementNames(m), oTable.GetCellbyPosition(1, m + 1), "TableContent") - If m < iAutoCount-1 Then - oRows.InsertbyIndex(m + 2,1) - End If - Next m - oDocuText.insertControlCharacter(oAutoTextCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False) - oAutoTextCursor.CollapseToEnd() - Next n - End If -End Sub - - -Sub InsertStringToCell(sCellString as String, oCell as Object, sCellStyle as String) -Dim oCellCursor as Object - oCellCursor = oCell.CreateTextCursor() - oCellCursor.CharStyleName = sCellStyle - oCell.Text.insertString(oCellCursor,sCellString,False) - oDocument.CurrentController.Select(oCellCursor) -End Sub</script:module> diff --git a/wizards/source/gimmicks/ChangeAllChars.xba b/wizards/source/gimmicks/ChangeAllChars.xba deleted file mode 100644 index aa0abaa1c..000000000 --- a/wizards/source/gimmicks/ChangeAllChars.xba +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ChangeAllChars" script:language="StarBasic">' This macro replaces all characters in a writer-documet through "x" or "X" signs. -' It works on the currently activated document. -Private const UPPERREPLACECHAR = "X" -Private const LOWERREPLACECHAR = "x" - -Private MSGBOXTITLE -Private NOTSAVEDTEXT -Private WARNING - -Sub ChangeAllChars ' Change all chars in the active document -Dim oSheets, oPages as Object -Dim i as Integer -Const MBYES = 6 -Const MBABORT = 2 -Const MBNO = 7 - BasicLibraries.LoadLibrary("Tools") - MSGBOXTITLE = "Change All Characters to an '" & UPPERREPLACECHAR & "'" - NOTSAVEDTEXT = "This document has already been modified: All characters will be changed to an " & UPPERREPLACECHAR & "'. Should the document be saved now?" - WARNING = "This macro changes all characters and numbers to an '" & UPPERREPLACECHAR & "' in this document." - - On Local Error GoTo NODOCUMENT - oDocument = StarDesktop.ActiveFrame.Controller.Model - NODOCUMENT: - If Err <> 0 Then - Msgbox(WARNING & chr(13) & "First, activate a Writer document." , 16, GetProductName()) - Exit Sub - End If - On Local Error Goto 0 - - sDocType = GetDocumentType(oDocument) - - If oDocument.IsModified And oDocument.Url <> "" Then - Status = MsgBox(NOTSAVEDTEXT, 3+32, MSGBOXTITLE) - Select Case Status - Case MBYES - oDocument.Store - Case MBABORT, MBNO - End - End Select - Else - Status = MsgBox(WARNING, 3+32, MSGBOXTITLE) - If Status = MBNO Or Status = MBABORT Then ' No, Abort - End - End If - End If - - Select Case sDocType - Case "swriter" - ReplaceAllStrings(oDocument) - - Case Else - Msgbox("This macro only works with Writer documents.", 16, GetProductName()) - End Select -End Sub - - -Sub ReplaceAllStrings(oContainer as Object) - ReplaceStrings(oContainer, "[a-z]", LOWERREPLACECHAR) - ReplaceStrings(oContainer, "[à-þ]", LOWERREPLACECHAR) - ReplaceStrings(oContainer, "[A-Z]", UPPERREPLACECHAR) - ReplaceStrings(oContainer, "[À-ß]", UPPERREPLACECHAR) - ReplaceStrings(oContainer, "[0-9]", UPPERREPLACECHAR) -End Sub - - -Sub ReplaceStrings(oContainer as Object, sSearchString, sReplaceString as String) - oReplaceDesc = oContainer.createReplaceDescriptor() - oReplaceDesc.SearchCaseSensitive = True - oReplaceDesc.SearchRegularExpression = True - oReplaceDesc.Searchstring = sSearchString - oReplaceDesc.ReplaceString = sReplaceString - oReplCount = oContainer.ReplaceAll(oReplaceDesc) -End Sub</script:module>
\ No newline at end of file diff --git a/wizards/source/gimmicks/GetTexts.xba b/wizards/source/gimmicks/GetTexts.xba deleted file mode 100644 index c98e7d51f..000000000 --- a/wizards/source/gimmicks/GetTexts.xba +++ /dev/null @@ -1,522 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="GetTexts" script:language="StarBasic">Option Explicit -' Macro-Description: -' This Macro extracts the Strings out of the currently activated document und inserts them into a logdocument -' The aim of the macro is to provide the programmer an insight into the StarOffice API -' It focusses on how document-Objects are accessed. -' Therefor not only texts of the document-body are retrieved but also Texts of general -' document Objects like, Annotations, charts and general Document Information - -Public oLogDocument, oLogText, oLogCursor, oLogHeaderStyle, oLogBodyTextStyle as Object -Public oDocument as Object -Public LogArray(1000) as String -Public LogIndex as Integer -Public oLocHeaderStyle as Object - -Sub Main -Dim sDocType as String -Dim oHyperCursor as Object -Dim oCharStyles as Object - BasicLibraries.LoadLibrary("Tools") - On Local Error GoTo NODOCUMENT - oDocument = StarDesktop.ActiveFrame.Controller.Model - sDocType = GetDocumentType(oDocument) - NODOCUMENT: - If Err <> 0 Then - Msgbox("This macro extracts all data from the active Writer, Calc or Draw document." & chr(13) &_ - "To start this macro you have to activate a document first." , 16, GetProductName) - Exit Sub - End If - On Local Error Goto 0 - - ' Open a new document where all the texts are inserted - oLogDocument = CreateNewDocument("swriter") - If Not IsNull(oLogDocument) Then - oLogText = oLogDocument.Text - - ' create and define the character styles of the Log-document - oCharStyles = oLogDocument.StyleFamilies.GetByName("CharacterStyles") - oLogHeaderStyle = oLogDocument.createInstance("com.sun.star.style.CharacterStyle") - oCharStyles.InsertbyName("Log Header", oLogHeaderStyle) - - oLogHeaderStyle.charWeight = com.sun.star.awt.FontWeight.BOLD - oLogBodyTextStyle = oLogDocument.createInstance("com.sun.star.style.CharacterStyle") - oCharStyles.InsertbyName("Log Body", oLogBodyTextStyle) - - ' Insert the title of the activated document as a hyperlink - oHyperCursor = oLogText.createTextCursor() - oHyperCursor.CharWeight = com.sun.star.awt.FontWeight.BOLD - oHyperCursor.gotoStart(False) - oHyperCursor.HyperLinkURL = oDocument.URL - oHyperCursor.HyperLinkTarget = oDocument.URL - If oDocument.DocumentProperties.Title <> "" Then - oHyperCursor.HyperlinkName = oDocument.DocumentProperties.Title - End If - oLogText.insertString(oHyperCursor, oDocument.DocumentProperties.Title, False) - oLogText.insertControlCharacter(oHyperCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False) - - oLogCursor = oLogText.createTextCursor() - oLogCursor.GotoEnd(False) - ' "Switch off" the Hyperlink - Properties - oLogCursor.SetPropertyToDefault("HyperLinkURL") - oLogCursor.SetPropertyToDefault("HyperLinkTarget") - oLogCursor.SetPropertyToDefault("HyperLinkName") - LogIndex = 0 - - ' Get the Properties of the document - GetDocumentProps() - - Select Case sDocType - Case "swriter" - GetWriterStrings() - Case "scalc" - GetCalcStrings() - Case "sdraw", "simpress" - GetDrawStrings() - Case Else - Msgbox("This macro only works with a Writer, Calc or Draw/Impress document.", 16, GetProductName()) - End Select - End If -End Sub - - -' ***********************************************Calc-Documents************************************************** - -Sub GetCalcStrings() -Dim i, n as integer -Dim oSheet as Object -Dim SheetName as String -Dim oSheets as Object - ' Create a sequence of all sheets within the document - oSheets = oDocument.Sheets - - For i = 0 to osheets.Count - 1 - oSheet = osheets.GetbyIndex(i) - SheetName = oSheet.Name - MakeLogHeadLine("Sheet No. " & i & "(" & SheetName & ")" ) - - ' Check the "body" of the sheet - GetCellTexts(oSheet) - - If oSheet.IsScenario then - MakeLogHeadLine("Scenario Comments from " & SheetName & "'") - WriteStringtoLogFile(osheet.ScenarioComment) - End if - - GetAnnotations(oSheet, "Annotations from '" & SheetName & "'") - - GetChartStrings(oSheet, "Charts from '" & SheetName & "'") - - GetControlStrings(oSheet.DrawPage, "Controls from '" & SheetName & "'") - Next - - ' Pictures - GetCalcGraphicNames() - - GetNamedRanges() -End Sub - - -Sub GetCellTexts(oSheet as Object) -Dim BigRange, BigEnum, oCell as Object - BigRange = oDocument.CreateInstance("com.sun.star.sheet.SheetCellRanges") - BigRange.InsertbyName("",oSheet) - BigEnum = BigRange.GetCells.CreateEnumeration - While BigEnum.hasmoreElements - oCell = BigEnum.NextElement - If oCell.String <> "" And Val(oCell.String) = 0then - WriteStringtoLogFile(oCell.String) - End If - Wend -End Sub - - -Sub GetAnnotations(oSheet as Object, HeaderLine as String) -Dim oNotes as Object -Dim n as Integer - oNotes = oSheet.getAnnotations - If oNotes.hasElements() then - MakeLogHeadLine(HeaderLine) - For n = 0 to oNotes.Count-1 - WriteStringtoLogFile(oNotes.GetbyIndex(n).String) - Next - End if -End Sub - - -Sub GetNamedRanges() -Dim i as integer - MakeLogHeadLine("Named Ranges") - For i = 0 To oDocument.NamedRanges.Count - 1 - WriteStringtoLogFile(oDocument.NamedRanges.GetbyIndex(i).Name) - Next -End Sub - - -Sub GetCalcGraphicNames() -Dim n,m as integer - MakeLogHeadLine("Graphics") - For n = 0 To oDocument.Drawpages.count-1 - For m = 0 To oDocument.Drawpages.GetbyIndex(n).Count - 1 - WriteStringtoLogFile(oDocument.DrawPages.GetbyIndex(n).GetbyIndex(m).Text.String) - Next m - Next n -End Sub - - -' ***********************************************Writer-Documents************************************************** - -Sub GetParagraphTexts(oParaObject as Object, HeadLine as String) -Dim ParaEnum as Object -Dim oPara as Object -Dim oTextPortEnum as Object -Dim oTextPortion as Object -Dim i as integer -Dim oCellNames() -Dim oCell as Object - - MakeLogHeadLine(HeadLine) - ParaEnum = oParaObject.Text.CreateEnumeration - - While ParaEnum.HasMoreElements - oPara = ParaEnum.NextElement - - ' Note: The Enumeration ParaEnum lists all tables and Paragraphs. - ' Therefor we have to find out what kind of object "oPara" actually is - If oPara.supportsService("com.sun.star.text.Paragraph") Then - ' "oPara" is a Paragraph - oTextPortEnum = oPara.createEnumeration - While oTextPortEnum.hasmoreElements - oTextPortion = oTextPortEnum.nextElement() - WriteStringToLogFile(oTextPortion.String) - Wend - Else - ' "oPara" is a table - oCellNames = oPara.CellNames - For i = 0 To Ubound(oCellNames()) - If oCellNames(i) <> "" Then - oCell = oPara.getCellByName(oCellNames(i)) - WriteStringToLogFile(oCell.String) - End If - Next - End If - Wend -End Sub - - - -Sub GetChartStrings(oSheet as Object, HeaderLine as String) -Dim i as Integer -Dim aChartObject as Object -Dim aChartDiagram as Object - - MakeLogHeadLine(HeaderLine) - - For i = 0 to oSheet.Charts.Count-1 - aChartObject = oSheet.Charts.GetByIndex(i).EmbeddedObject - If aChartObject.HasSubTitle then - WriteStringToLogFile(aChartObject.SubTitle.String) - End If - - If aChartObject.HasMainTitle then - WriteStringToLogFile(aChartObject.Title.String) - End If - - aChartDiagram = aChartObject.Diagram - - If aChartDiagram.hasXAxisTitle Then - WriteStringToLogFile(aChartDiagram.XAxisTitle) - End If - - If aChartDiagram.hasYAxisTitle Then - WriteStringToLogFile(aChartDiagram.YAxisTitle) - End If - - If aChartDiagram.hasZAxisTitle Then - WriteStringToLogFile(aChartDiagram.ZAxisTitle) - End If - Next i -End Sub - - - -Sub GetFrameTexts() -Dim i as integer -Dim oTextFrame as object -Dim oFrameEnum as Object -Dim oFramePort as Object -Dim oFrameTextEnum as Object -Dim oFrameTextPort as Object - - MakeLogHeadLine("Text Frames") - For i = 0 to oDocument.TextFrames.Count-1 - oTextFrame = oDocument.TextFrames.GetbyIndex(i) - WriteStringToLogFile(oTextFrame.Name) - - ' Is the frame bound to the Page - If oTextFrame.AnchorType = com.sun.star.text.TextContentAnchorType.AT_PAGE Then - GetParagraphTexts(oTextFrame, "Text Frame Contents") - End If - - oFrameEnum = oTextFrame.CreateEnumeration - While oFrameEnum.HasMoreElements - oFramePort = oFrameEnum.NextElement - If oFramePort.supportsService("com.sun.star.text.Paragraph") then - oFrameTextEnum = oFramePort.createEnumeration - While oFrameTextEnum.HasMoreElements - oFrameTextPort = oFrameTextEnum.NextElement - If oFrameTextPort.SupportsService("com.sun.star.text.TextFrame") Then - WriteStringtoLogFile(oFrameTextPort.String) - End If - Wend - Else - WriteStringtoLogFile(oFramePort.Name) - End if - Wend - Next -End Sub - - -Sub GetTextFieldStrings() -Dim aTextField as Object -Dim i as integer -Dim CurElement as Object - MakeLogHeadLine("Text Fields") - aTextfield = oDocument.getTextfields.CreateEnumeration - While aTextField.hasmoreElements - CurElement = aTextField.NextElement - If CurElement.PropertySetInfo.hasPropertybyName("Content") Then - WriteStringtoLogFile(CurElement.Content) - ElseIf CurElement.PropertySetInfo.hasPropertybyName("PlaceHolder") Then - WriteStringtoLogFile(CurElement.PlaceHolder) - WriteStringtoLogFile(CurElement.Hint) - ElseIf Curelement.TextFieldMaster.PropertySetInfo.HasPropertybyName("Content") then - WriteStringtoLogFile(CurElement.TextFieldMaster.Content) - End If - Wend -End Sub - - - -Sub GetLinkedFileNames() -Dim oDocSections as Object -Dim LinkedFileName as String -Dim i as Integer - If Right(oDocument.URL,3) = "sgl" Then - MakeLogHeadLine("Sub-documents") - oDocSections = oDocument.TextSections - For i = 0 to oDocSections.Count - 1 - LinkedFileName = oDocSections.GetbyIndex(i).FileLink.FileURL - If LinkedFileName <> "" Then - WriteStringToLogFile(LinkedFileName) - End If - Next i - End If -End Sub - - -Sub GetSectionNames() -Dim i as integer -Dim oDocSections as Object - MakeLogHeadLine("Sections") - oDocSections = oDocument.TextSections - For i = 0 to oDocSections.Count-1 - WriteStringtoLogFile(oDocSections.GetbyIndex(i).Name) - Next -End Sub - - -Sub GetWriterStrings() - GetParagraphTexts(oDocument, "Document Body") - GetGraphicNames() - GetStyles() - GetControlStrings(oDocument.DrawPage, "Controls") - GetTextFieldStrings() - GetSectionNames() - GetFrameTexts() - GetHyperLinks - GetLinkedFileNames() -End Sub - - -' ***********************************************Draw-Documents************************************************** - -Sub GetDrawPageTitles(LocObject as Object) -Dim n as integer -Dim oPage as Object - - For n = 0 to LocObject.Count - 1 - oPage = LocObject.GetbyIndex(n) - WriteStringtoLogFile(oPage.Name) - ' Is the Page a DrawPage and not a MasterPage? - If oPage.supportsService("com.sun.star.drawing.DrawPage")then - ' Get the Name of the NotesPage (only relevant for Impress-Documents) - If oDocument.supportsService("com.sun.star.presentation.PresentationDocument") then - WriteStringtoLogFile(oPage.NotesPage.Name) - End If - End If - Next -End Sub - - -Sub GetPageStrings(oPages as Object) -Dim m, n, s as Integer -Dim oPage, oPageElement, oShape as Object - For n = 0 to oPages.Count-1 - oPage = oPages.GetbyIndex(n) - If oPage.HasElements then - For m = 0 to oPage.Count-1 - oPageElement = oPage.GetByIndex(m) - If HasUnoInterfaces(oPageElement,"com.sun.star.container.XIndexAccess") Then - ' The Object "oPageElement" a group of Shapes, that can be accessed by their index - For s = 0 To oPageElement.Count - 1 - WriteStringToLogFile(oPageElement.GetByIndex(s).String) - Next s - ElseIf HasUnoInterfaces(oPageElement, "com.sun.star.text.XText") Then - WriteStringtoLogFile(oPageElement.String) - End If - Next - End If - Next -End Sub - - -Sub GetDrawStrings() -Dim oDPages, oMPages as Object - - oDPages = oDocument.DrawPages - oMPages = oDocument.Masterpages - - MakeLogHeadLine("Titles") - GetDrawPageTitles(oDPages) - GetDrawPageTitles(oMPages) - - MakeLogHeadLine("Document Body") - GetPageStrings(oDPages) - GetPageStrings(oMPages) -End Sub - - -' ***********************************************Misc************************************************** - -Sub GetDocumentProps() -Dim oDocuProps as Object - MakeLogHeadLine("Document Properties") - oDocuProps = oDocument.DocumentProperties - WriteStringToLogFile(oDocuProps.Title) - WriteStringToLogFile(oDocuProps.Description) - WriteStringToLogFile(oDocuProps.Subject) - WriteStringToLogFile(oDocuProps.Author) -' WriteStringToLogFile(oDocuProps.UserDefinedProperties.ReplyTo) -' WriteStringToLogFile(oDocuProps.UserDefinedProperties.Recipient) -' WriteStringToLogFile(oDocuProps.UserDefinedProperties.References) -' WriteStringToLogFile(oDocuProps.Keywords) -End Sub - - -Sub GetHyperlinks() -Dim i as integer -Dim oCrsr as Object -Dim oAllHyperLinks as Object -Dim SrchAttributes(0) as new com.sun.star.beans.PropertyValue -Dim oSearchDesc as Object - - MakeLogHeadLine("Hyperlinks") - ' create a Search-Descriptor - oSearchDesc = oDocument.CreateSearchDescriptor - oSearchDesc.Valuesearch = False - - ' define the Search-attributes - srchattributes(0).Name = "HyperLinkURL" - srchattributes(0).Value = "" - oSearchDesc.SetSearchAttributes(SrchAttributes()) - - oAllHyperLinks = oDocument.findAll(oSearchDesc()) - - For i = 0 to oAllHyperLinks.Count - 1 - oFound = oAllHyperLinks(i) - oCrsr = oFound.Text.createTextCursorByRange(oFound) - WriteStringToLogFile(oCrs.HyperLinkURL) 'Url - WriteStringToLogFile(oCrs.HyperLinkTarget) 'Name - WriteStringToLogFile(oCrs.HyperLinkName) 'Frame - Next i -End Sub - - -Sub GetGraphicNames() -Dim i as integer -Dim oDocGraphics as Object - MakeLogHeadLine("Graphics") - oDocGraphics = oDocument.GraphicObjects - For i = 0 to oDocGraphics.count - 1 - WriteStringtoLogFile(oDocGraphics.GetbyIndex(i).Name) - Next -End Sub - - -Sub GetStyles() -Dim m,n as integer - MakeLogHeadLine("User-defined Templates") - - ' Check all StyleFamilies(i.e. PageStyles, ParagraphStyles, CharacterStyles, cellStyles) - For n = 0 to oDocument.StyleFamilies.Count - 1 - For m = 0 to oDocument.StyleFamilies.getbyIndex(n).Count-1 - If oDocument.StyleFamilies.GetbyIndex(n).getbyIndex(m).IsUserDefined then - WriteStringtoLogFile(oDocument.StyleFamilies.GetbyIndex(n).getbyIndex(m).Name) - End If - Next - Next -End Sub - - -Sub GetControlStrings(oDPage as Object, HeaderLine as String) -Dim aForm as Object -Dim m,n as integer - MakeLogHeadLine(HeaderLine) - 'SearchFor all possible Controls - For n = 0 to oDPage.Forms.Count - 1 - aForm = oDPage.Forms(n) - For m = 0 to aForm.Count-1 - GetControlContent(aForm.GetbyIndex(m)) - Next - Next -End Sub - - -Sub GetControlContent(LocControl as Object) -Dim i as integer - - If LocControl.PropertySetInfo.HasPropertybyName("Label") then - WriteStringtoLogFile(LocControl.Label) - - ElseIf LocControl.SupportsService("com.sun.star.form.component.ListBox") then - For i = 0 to Ubound(LocControl.StringItemList()) - WriteStringtoLogFile(LocControl.StringItemList(i)) - Next - End If - If LocControl.PropertySetInfo.HasPropertybyName("HelpText") then - WriteStringtoLogFile(LocControl.Helptext) - End If -End Sub - -' ***********************************************LogDocument************************************************** - -Sub WriteStringtoLogFile( sString as String) - If (Not FieldInArray(LogArray(),LogIndex,sString))AND (NOT ISNULL(sString)) Then - LogArray(LogIndex) = sString - LogIndex = LogIndex + 1 - oLogText.insertString(oLogCursor,sString,False) - oLogText.insertControlCharacter(oLogCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False) - End If -End Sub - - -Sub MakeLogHeadLine(HeadText as String) - oLogCursor.CharStyleName = "Log Header" - oLogText.insertControlCharacter(oLogCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False) - oLogText.insertString(oLogCursor,HeadText,False) - oLogText.insertControlCharacter(oLogCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False) - oLogCursor.CharStyleName = "Log Body" -End Sub -</script:module> diff --git a/wizards/source/gimmicks/ReadDir.xba b/wizards/source/gimmicks/ReadDir.xba deleted file mode 100644 index 370f8cbc1..000000000 --- a/wizards/source/gimmicks/ReadDir.xba +++ /dev/null @@ -1,305 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ReadDir" script:language="StarBasic">Option Explicit -Public Const SBPAGEX = 800 -Public Const SBPAGEY = 800 -Public Const SBRELDIST = 1.3 - -' Names of the second Dimension of the Array iLevelPos -Public Const SBBASEX = 0 -Public Const SBBASEY = 1 - -Public Const SBOLDSTARTX = 2 -Public Const SBOLDSTARTY = 3 - -Public Const SBOLDENDX = 4 -Public Const SBOLDENDY = 5 - -Public Const SBNEWSTARTX = 6 -Public Const SBNEWSTARTY = 7 - -Public Const SBNEWENDX = 8 -Public Const SBNEWENDY = 9 - -Public ConnectLevel As Integer -Public iLevelPos(1,9) As Long -Public Source as String -Public iCurLevel as Integer -Public nConnectLevel as Integer -Public nOldWidth, nOldHeight As Long -Public nOldX, nOldY, nOldLevel As Integer -Public oOldLeavingLine As Object -Public oOldArrivingLine As Object -Public DlgReadDir as Object -Dim oProgressBar as Object -Dim oDocument As Object -Dim oPage As Object - - -Sub Main() -Dim oStandardTemplate as Object - BasicLibraries.LoadLibrary("Tools") - oDocument = CreateNewDocument("sdraw") - If Not IsNull(oDocument) Then - oPage = oDocument.DrawPages(0) - oStandardTemplate = oDocument.StyleFamilies.GetByName("graphics").GetByName("standard") - oStandardTemplate.CharHeight = 10 - oStandardTemplate.TextLeftDistance = 100 - oStandardTemplate.TextRightDistance = 100 - oStandardTemplate.TextUpperDistance = 50 - oStandardTemplate.TextLowerDistance = 50 - DlgReadDir = LoadDialog("Gimmicks","ReadFolderDlg") - oProgressBar = DlgReadDir.Model.ProgressBar1 - DlgReadDir.Model.TextField1.Text = ConvertFromUrl(GetPathSettings("Work")) - DlgReadDir.Model.cmdGoOn.DefaultButton = True - DlgReadDir.GetControl("TextField1").SetFocus() - DlgReadDir.Execute - End If -End Sub - - -Sub TreeInfo() -Dim oCurTextShape As Object -Dim i as Integer -Dim bStartUpRun As Boolean -Dim CurFilename as String -Dim BaseLevel as Integer -Dim oController as Object -Dim MaxFileIndex as Integer -Dim FileNames() as String - ToggleDialogControls(False) - oProgressBar.ProgressValueMin = 0 - oProgressBar.ProgressValueMax = 100 - bStartUpRun = True - nOldHeight = 200 - nOldY = SBPAGEY - nOldX = SBPAGEX - nOldWidth = SBPAGEX - oController = oDocument.GetCurrentController - Source = ConvertToURL(DlgReadDir.Model.TextField1.Text) - BaseLevel = CountCharsInString(Source, "/", 1) - oProgressBar.ProgressValue = 5 - DlgReadDir.Model.Label3.Enabled = True - FileNames() = ReadSourceDirectory(Source) - DlgReadDir.Model.Label4.Enabled = True - DlgReadDir.Model.Label3.Enabled = False - oProgressBar.ProgressValue = 12 - FileNames() = BubbleSortList(FileNames()) - DlgReadDir.Model.Label5.Enabled = True - DlgReadDir.Model.Label4.Enabled = False - oProgressBar.ProgressValue = 20 - MaxFileIndex = Ubound(FileNames(),1) - For i = 0 To MaxFileIndex - oProgressBar.ProgressValue = 20 + (i/MaxFileIndex * 80) - CurFilename = FileNames(i,1) - SetNewLevels(FileNames(i,0), BaseLevel) - oCurTextShape = CreateTextShape(oPage, CurFilename) - CheckPageWidth(oCurTextShape.Size.Width) - iLevelPos(iCurLevel,SBBASEY) = oCurTextShape.Position.Y - If i = 0 Then - AdjustPageHeight(oCurTextShape.Size.Height, MaxFileIndex + 1) - End If - ' The Current TextShape has To be connected with a TextShape one Level higher - ' except for a TextShape In Level 0: - If Not bStartUpRun Then - ' A leaving Line Is only drawn when level is not 0 - If iCurLevel<> 0 Then - ' Determine the Coordinates of the arriving Line - iLevelPos(iCurLevel,SBOLDSTARTX) = iLevelPos(nConnectLevel,SBNEWSTARTX) - iLevelPos(iCurLevel,SBOLDSTARTY) = oCurTextShape.Position.Y + 0.5 * oCurTextShape.Size.Height - - iLevelPos(iCurLevel,SBOLDENDX) = iLevelPos(iCurLevel,SBBASEX) - iLevelPos(iCurLevel,SBOLDENDY) = oCurTextShape.Position.Y + 0.5 * oCurTextShape.Size.Height - - oOldArrivingLine = DrawLine(iCurLevel, SBOLDSTARTX, SBOLDSTARTY, SBOLDENDX, SBOLDENDY, oPage) - - ' Determine the End-Coordinates of the last leaving Line - iLevelPos(nConnectLevel,SBNEWENDX) = iLevelPos(nConnectLevel,SBNEWSTARTX) - iLevelPos(nConnectLevel,SBNEWENDY) = oCurTextShape.Position.Y + 0.5 * oCurTextShape.Size.Height - Else - ' On Level 0 the last Leaving Line's Endpoint is the upper edge of the TextShape - iLevelPos(nConnectLevel,SBNEWENDY) = oCurTextShape.Position.Y - iLevelPos(nConnectLevel,SBNEWENDX) = iLevelPos(nConnectLevel,SBNEWSTARTX) - End If - ' Draw the Connectors To the previous TextShapes - oOldLeavingLine = DrawLine(nConnectLevel, SBNEWSTARTX, SBNEWSTARTY, SBNEWENDX, SBNEWENDY, oPage) - Else - ' StartingPoint of the leaving Edge - bStartUpRun = FALSE - End If - - ' Determine the beginning Coordinates of the leaving Line - iLevelPos(iCurLevel,SBNEWSTARTX) = iLevelPos(iCurLevel,SBBASEX) + 0.5 * oCurTextShape.Size.Width - iLevelPos(iCurLevel,SBNEWSTARTY) = iLevelPos(iCurLevel,SBBASEY) + oCurTextShape.Size.Height - - ' Save the values For the Next run - nOldHeight = oCurTextShape.Size.Height - nOldX = oCurTextShape.Position.X - nOldWidth = oCurTextShape.Size.Width - nOldLevel = iCurLevel - Next i - ToggleDialogControls(True) - DlgReadDir.Model.cmdGoOn.Enabled = False -End Sub - - -Function CreateTextShape(oPage as Object, Filename as String) -Dim oTextShape As Object -Dim aPoint As New com.sun.star.awt.Point - - aPoint.X = CalculateXPoint() - aPoint.Y = nOldY + SBRELDIST * nOldHeight - nOldY = aPoint.Y - - oTextShape = oDocument.createInstance("com.sun.star.drawing.TextShape") - oTextShape.LineStyle = 1 - oTextShape.Position = aPoint - - oPage.add(oTextShape) - oTextShape.TextAutoGrowWidth = TRUE - oTextShape.TextAutoGrowHeight = TRUE - oTextShape.String = FileName - - ' Configure Size And Position of the TextShape according to its Scripting - aPoint.X = iLevelPos(iCurLevel,SBBASEX) - oTextShape.Position = aPoint - CreateTextShape() = oTextShape -End Function - - -Function CalculateXPoint() - ' The current level Is lower than the Old one - If (iCurLevel< nOldLevel) And (iCurLevel<> 0) Then - ' ClearArray(iLevelPos(),iCurLevel+1) - Elseif iCurLevel= 0 Then - iLevelPos(iCurLevel,SBBASEX) = SBPAGEX - ' The current level Is higher than the old one - Elseif iCurLevel> nOldLevel Then - iLevelPos(iCurLevel,SBBASEX) = iLevelPos(iCurLevel-1,SBBASEX) + nOldWidth + 100 - End If - CalculateXPoint = iLevelPos(iCurLevel,SBBASEX) -End Function - - -Function DrawLine(nLevel, nStartX, nStartY, nEndX, nEndY As Integer, oPage as Object) -Dim oConnect As Object -Dim aPoint As New com.sun.star.awt.Point -Dim aSize As New com.sun.star.awt.Size - aPoint.X = iLevelPos(nLevel,nStartX) - aPoint.Y = iLevelPos(nLevel,nStartY) - aSize.Width = iLevelPos(nLevel,nEndX) - iLevelPos(nLevel,nStartX) - aSize.Height = iLevelPos(nLevel,nEndY) - iLevelPos(nLevel,nStartY) - oConnect = oDocument.createInstance("com.sun.star.drawing.LineShape") - oConnect.Position = aPoint - oConnect.Size = aSize - oPage.Add(oConnect) - DrawLine() = oConnect -End Function - - -Sub GetSourceDirectory() - GetFolderName(DlgReadDir.Model.TextField1) -End Sub - - -Function ReadSourceDirectory(ByVal Source As String) -Dim i as Integer -Dim m as Integer -Dim n as Integer -Dim s as integer -Dim FileName as string -Dim FileNameList(100,1) as String -Dim DirList(0) as String -Dim oUCBobject as Object -Dim DirContent() as String -Dim SystemPath as String -Dim PathSeparator as String -Dim MaxFileIndex as Integer - PathSeparator = GetPathSeparator() - oUcbobject = createUnoService("com.sun.star.ucb.SimpleFileAccess") - m = 0 - s = 0 - DirList(0) = Source - FileNameList(n,0) = Source - SystemPath = ConvertFromUrl(Source) - FileNameList(n,1) = FileNameoutofPath(SystemPath, PathSeparator) - n = 1 - Do - Source = DirList(m) - m = m + 1 - DirContent() = oUcbObject.GetFolderContents(Source,True) - If Ubound(DirContent()) <> -1 Then - MaxFileIndex = Ubound(DirContent()) - For i = 0 to MaxFileIndex - FileName = DirContent(i) - FileNameList(n,0) = FileName - SystemPath = ConvertFromUrl(FileName) - FileNameList(n,1) = FileNameOutofPath(SystemPath, PathSeparator) - n = n + 1 - If n > Ubound(FileNameList(),1) Then - ReDim Preserve FileNameList(n + 10,1) as String - End If - If oUcbObject.IsFolder(FileName) Then - s = s + 1 - ReDim Preserve DirList(s) as String - DirList(s) = FileName - End If - Next i - End If - Loop Until m > Ubound(DirList() - ReDim Preserve FileNameList(n-1,1) as String - ReadSourceDirectory() = FileNameList() -End Function - - -Sub CloseDialog - DlgReadDir.EndExecute -End Sub - - -Sub AdjustPageHeight(lShapeHeight, FileCount) -Dim lNecHeight as Long -Dim lBorders as Long - oDocument.LockControllers - lBorders = oPage.BorderTop + oPage.BorderBottom - lNecHeight = SBPAGEY + (FileCount * SBRELDIST * lShapeHeight) - If lNecHeight > (oPage.Height - lBorders) Then - oPage.Height = lNecHeight + lBorders + 500 - End If - oDocument.UnlockControllers -End Sub - - -Sub SetNewLevels(FileName as String, BaseLevel as Integer) - iCurLevel= CountCharsInString(FileName, "/", 1) - BaseLevel - If iCurLevel <> 0 Then - nConnectLevel = iCurLevel- 1 - Else - nConnectLevel = iCurLevel - End If - If iCurLevel > Ubound(iLevelPos(),1) Then - ReDim Preserve iLevelPos(iCurLevel,9) as Long - End If -End Sub - - -Sub CheckPageWidth(TextWidth as Long) -Dim PageWidth as Long -Dim BaseX as Long - PageWidth = oPage.Width - BaseX = iLevelPos(iCurLevel,SBBASEX) - If BaseX + TextWidth > PageWidth - 1000 Then - oPage.Width = 1000 + BaseX + TextWidth - End If -End Sub - - -Sub ToggleDialogControls(bDoEnable as Boolean) - With DlgReadDir.Model - .cmdGoOn.Enabled = bDoEnable - .cmdGetDir.Enabled = bDoEnable - .Label1.Enabled = bDoEnable - .Label2.Enabled = bDoEnable - .TextField1.Enabled = bDoEnable - End With -End Sub</script:module>
\ No newline at end of file diff --git a/wizards/source/gimmicks/ReadFolderDlg.xdl b/wizards/source/gimmicks/ReadFolderDlg.xdl deleted file mode 100644 index e49127db2..000000000 --- a/wizards/source/gimmicks/ReadFolderDlg.xdl +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="ReadFolderDlg" dlg:left="161" dlg:top="81" dlg:width="180" dlg:height="136" dlg:closeable="true" dlg:moveable="true" dlg:title="Read and Design Recursively"> - <dlg:bulletinboard> - <dlg:button dlg:id="cmdGetDir" dlg:tab-index="0" dlg:left="161" dlg:top="49" dlg:width="14" dlg:height="14" dlg:value="..."> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.ReadDir.GetSourceDirectory?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:textfield dlg:id="TextField1" dlg:tab-index="1" dlg:left="6" dlg:top="50" dlg:width="147" dlg:height="12"/> - <dlg:button dlg:id="cmdCancel" dlg:tab-index="2" dlg:left="49" dlg:top="115" dlg:width="35" dlg:height="14" dlg:value="~Cancel"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.ReadDir.CloseDialog?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdGoOn" dlg:tab-index="3" dlg:left="95" dlg:top="115" dlg:width="35" dlg:height="14" dlg:value="~GoOn"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.ReadDir.TreeInfo?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:text dlg:id="Label1" dlg:tab-index="4" dlg:left="6" dlg:top="38" dlg:width="122" dlg:height="8" dlg:value="Top level path"/> - <dlg:text dlg:id="Label2" dlg:tab-index="5" dlg:left="6" dlg:top="4" dlg:width="168" dlg:height="26" dlg:value="This macro will create a drawing document and design a complete tree view of all subdirectories from a given path." dlg:multiline="true"/> - <dlg:progressmeter dlg:id="ProgressBar1" dlg:tab-index="6" dlg:left="6" dlg:top="101" dlg:width="170" dlg:height="10"/> - <dlg:text dlg:id="Label3" dlg:tab-index="7" dlg:disabled="true" dlg:left="6" dlg:top="69" dlg:width="170" dlg:height="8" dlg:value="Getting the files and subdirectories..."/> - <dlg:text dlg:id="Label4" dlg:tab-index="8" dlg:disabled="true" dlg:left="6" dlg:top="80" dlg:width="170" dlg:height="8" dlg:value="Sorting the files and subdirectories..."/> - <dlg:text dlg:id="Label5" dlg:tab-index="9" dlg:disabled="true" dlg:left="6" dlg:top="91" dlg:width="170" dlg:height="8" dlg:value="Drawing the filestructure..."/> - </dlg:bulletinboard> -</dlg:window>
\ No newline at end of file diff --git a/wizards/source/gimmicks/UserfieldDlg.xdl b/wizards/source/gimmicks/UserfieldDlg.xdl deleted file mode 100644 index 408f3c8be..000000000 --- a/wizards/source/gimmicks/UserfieldDlg.xdl +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="UserfieldDlg" dlg:left="161" dlg:top="57" dlg:width="281" dlg:height="214" dlg:closeable="true" dlg:moveable="true" dlg:title="Modify User Data"> - <dlg:bulletinboard> - <dlg:text dlg:id="Label1" dlg:tab-index="0" dlg:left="6" dlg:top="48" dlg:width="57" dlg:height="8" dlg:value="Label1"/> - <dlg:text dlg:id="Label2" dlg:tab-index="1" dlg:left="6" dlg:top="64" dlg:width="57" dlg:height="8" dlg:value="Label2"/> - <dlg:text dlg:id="Label3" dlg:tab-index="2" dlg:left="6" dlg:top="80" dlg:width="57" dlg:height="8" dlg:value="Label3"/> - <dlg:text dlg:id="Label4" dlg:tab-index="3" dlg:left="6" dlg:top="96" dlg:width="57" dlg:height="8" dlg:value="Label4"/> - <dlg:text dlg:id="Label5" dlg:tab-index="4" dlg:left="6" dlg:top="112" dlg:width="57" dlg:height="8" dlg:value="Label5"/> - <dlg:text dlg:id="Label6" dlg:tab-index="5" dlg:left="6" dlg:top="128" dlg:width="57" dlg:height="8" dlg:value="Label6"/> - <dlg:text dlg:id="Label7" dlg:tab-index="6" dlg:left="6" dlg:top="144" dlg:width="57" dlg:height="8" dlg:value="Label7"/> - <dlg:text dlg:id="Label8" dlg:tab-index="7" dlg:left="6" dlg:top="160" dlg:width="57" dlg:height="8" dlg:value="Label8"/> - <dlg:text dlg:id="Label9" dlg:tab-index="8" dlg:left="6" dlg:top="176" dlg:width="57" dlg:height="8" dlg:value="Label9"/> - <dlg:textfield dlg:id="TextField1" dlg:tab-index="9" dlg:left="65" dlg:top="46" dlg:width="193" dlg:height="12"/> - <dlg:textfield dlg:id="TextField2" dlg:tab-index="10" dlg:left="65" dlg:top="62" dlg:width="193" dlg:height="12"/> - <dlg:textfield dlg:id="TextField3" dlg:tab-index="11" dlg:left="65" dlg:top="78" dlg:width="193" dlg:height="12"/> - <dlg:textfield dlg:id="TextField4" dlg:tab-index="12" dlg:left="65" dlg:top="94" dlg:width="193" dlg:height="12"/> - <dlg:textfield dlg:id="TextField5" dlg:tab-index="13" dlg:left="65" dlg:top="110" dlg:width="193" dlg:height="12"/> - <dlg:textfield dlg:id="TextField6" dlg:tab-index="14" dlg:left="65" dlg:top="126" dlg:width="193" dlg:height="12"/> - <dlg:textfield dlg:id="TextField7" dlg:tab-index="15" dlg:left="65" dlg:top="142" dlg:width="193" dlg:height="12"/> - <dlg:textfield dlg:id="TextField8" dlg:tab-index="16" dlg:left="65" dlg:top="158" dlg:width="193" dlg:height="12"/> - <dlg:textfield dlg:id="TextField9" dlg:tab-index="17" dlg:left="65" dlg:top="174" dlg:width="193" dlg:height="12"/> - <dlg:scrollbar dlg:id="ScrollBar1" dlg:tab-index="18" dlg:left="263" dlg:top="46" dlg:width="12" dlg:height="140" dlg:align="vertical"> - <script:event script:event-name="on-adjustmentvaluechange" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.ScrollControls?language=Basic&location=application" script:language="Script"/> - </dlg:scrollbar> - <dlg:button dlg:id="cmdQuit" dlg:tab-index="19" dlg:left="6" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Exit Macro" dlg:value="Exit"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.StopMacro?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdSave" dlg:tab-index="20" dlg:left="45" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Save All Data of All Users to File" dlg:value="~Save"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.SaveSettings?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdSelect" dlg:tab-index="21" dlg:left="84" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Replace the User Data in <PRODUCTNAME> With the User Data Above" dlg:value="Se~lect"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.SelectCurrentFields?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdNextUser" dlg:tab-index="22" dlg:left="162" dlg:top="193" dlg:width="35" dlg:height="14" dlg:tag="1" dlg:help-text="Show Data of Next User" dlg:value="Next >>"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.StepToRecord?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdPrevUser" dlg:tab-index="23" dlg:left="123" dlg:top="193" dlg:width="35" dlg:height="14" dlg:tag="-1" dlg:help-text="Show Data of Previous User" dlg:value="<<Previous"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.StepToRecord?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="CommandButton1" dlg:tab-index="24" dlg:left="201" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Add Data for New User" dlg:value="~New"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.AddRecord?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:text dlg:id="Label10" dlg:tab-index="25" dlg:left="6" dlg:top="6" dlg:width="269" dlg:height="34" dlg:value="This macro lets you easily administrate several user profiles.
The user data of several users may be stored in a single file in the directory <ConfigDir>. From there, you can select a particular user whose data is then the current user data in <PRODUCTNAME>." dlg:multiline="true"/> - <dlg:button dlg:id="cmdDelete" dlg:tab-index="26" dlg:left="240" dlg:top="193" dlg:width="35" dlg:height="14" dlg:help-text="Delete Data of Current User" dlg:value="Delete"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Gimmicks.Userfields.DeleteCurrentSettings?language=Basic&location=application" script:language="Script"/> - </dlg:button> - </dlg:bulletinboard> -</dlg:window>
\ No newline at end of file diff --git a/wizards/source/gimmicks/Userfields.xba b/wizards/source/gimmicks/Userfields.xba deleted file mode 100644 index 391337c6a..000000000 --- a/wizards/source/gimmicks/Userfields.xba +++ /dev/null @@ -1,219 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Userfields" script:language="StarBasic">Option Explicit -'Todo: Controlling Scrollbar via Keyboard - -Public Const SBMAXFIELDINDEX = 14 - -Public DlgUserFields as Object -Public oDocument as Object -Public UserFieldDataType(SBMAXFIELDINDEX,1) as String -Public ScrollBarValue as Integer -Public UserFieldFamily(0, SBMAXfIELDINDEX) as String -Public Const SBTBCOUNT = 9 -Public oUserDataAccess as Object -Public CurFieldIndex as Integer -Public FilePath as String - -Sub StartChangesUserfields -Dim SystemPath as String - BasicLibraries.LoadLibrary("Tools") - UserFieldDatatype(0,0) = "COMPANY" - UserFieldDatatype(0,1) = "o" - UserFieldDatatype(1,0) = "FIRSTNAME" - UserFieldDatatype(1,1) = "givenname" - UserFieldDatatype(2,0) = "LASTNAME" - UserFieldDatatype(2,1) = "sn" - UserFieldDatatype(3,0) = "INITIALS" - UserFieldDatatype(3,1) = "initials" - UserFieldDatatype(4,0) = "STREET" - UserFieldDatatype(4,1) = "street" - UserFieldDatatype(5,0) = "COUNTRY" - UserFieldDatatype(5,1) = "c" - UserFieldDatatype(6,0) = "ZIP" - UserFieldDatatype(6,1) = "postalcode" - UserFieldDatatype(7,0) = "CITY" - UserFieldDatatype(7,1) = "l" - UserFieldDatatype(8,0) = "TITLE" - UserFieldDatatype(8,1) = "title" - UserFieldDatatype(9,0) = "POSITION" - UserFieldDatatype(9,1) = "position" - UserFieldDatatype(10,0) = "PHONE_HOME" - UserFieldDatatype(10,1) = "homephone" - UserFieldDatatype(11,0) = "PHONE_WORK" - UserFieldDatatype(11,1) = "telephonenumber" - UserFieldDatatype(12,0) = "FAX" - UserFieldDatatype(12,1) = "facsimiletelephonenumber" - UserFieldDatatype(13,0) = "E-MAIL" - UserFieldDatatype(13,1) = "mail" - UserFieldDatatype(14,0) = "STATE" - UserFieldDatatype(14,1) = "st" - FilePath = GetPathSettings("Config", False) & "/" & "UserData.dat" - DlgUserFields = LoadDialog("Gimmicks","UserfieldDlg") - SystemPath = ConvertFromUrl(FilePath) - DlgUserFields.Model.Label10.Label = ReplaceString(DlgUserFields.Model.Label10.Label, "'" & SystemPath & "'", "<ConfigDir>") - DlgUserFields.Model.Label10.Label = ReplaceString(DlgUserFields.Model.Label10.Label, GetProductName(), "<PRODUCTNAME>") - DlgUserFields.Model.cmdSelect.HelpText = ReplaceString(DlgUserFields.Model.cmdSelect.HelpText, GetProductName(), "<PRODUCTNAME>") - ScrollBarValue = 0 - oUserDataAccess = GetRegistryKeyContent("org.openoffice.UserProfile/Data", True) - InitializeUserFamily() - FillDialog() - DlgUserFields.Execute - DlgUserFields.Dispose() -End Sub - - -Sub FillDialog() -Dim a as Integer - With DlgUserFields - For a = 1 To SBTBCount - .GetControl("Label" & a).Model.Label = UserFieldDataType(a-1,0) - .GetControl("TextField" & a).Model.Text = UserFieldFamily(CurFieldIndex, a-1) - Next a - .Model.ScrollBar1.ScrollValueMax = (SBMAXFIELDINDEX+1) - SBTBCOUNT - .Model.ScrollBar1.BlockIncrement = SBTBCOUNT - .Model.ScrollBar1.LineIncrement = 1 - .Model.ScrollBar1.ScrollValue = ScrollBarValue - End With -End Sub - - -Sub ScrollControls() - ScrollTextFieldInfo(ScrollBarValue) - ScrollBarValue = DlgUserFields.Model.ScrollBar1.ScrollValue - If (ScrollBarValue + SBTBCOUNT) >= SBMAXFIELDINDEX + 1 Then - ScrollBarValue = (SBMAXFIELDINDEX + 1) - SBTBCOUNT - End If - FillupTextFields() -End Sub - - -Sub ScrollTextFieldInfo(ByVal iScrollValue as Integer) -Dim a as Integer -Dim CurIndex as Integer - For a = 1 To SBTBCOUNT - CurIndex = (a-1) + iScrollValue - UserFieldFamily(CurFieldIndex,CurIndex) = DlgUserFields.GetControl("TextField" & a).Model.Text - Next a -End Sub - - -Sub StopMacro() - DlgUserFields.EndExecute -End Sub - - -Sub SaveSettings() -Dim n as Integer -Dim m as Integer -Dim MaxIndex as Integer - ScrollTextFieldInfo(DlgUserFields.Model.ScrollBar1.ScrollValue) - MaxIndex = Ubound(UserFieldFamily(), 1) - Dim FileStrings(MaxIndex) as String - For n = 0 To MaxIndex - FileStrings(n) = "" - For m = 0 To SBMAXFIELDINDEX - FileStrings(n) = FileStrings(n) & UserFieldFamily(n,m) & ";" - Next m - Next n - SaveDataToFile(FilePath, FileStrings(), True) -End Sub - - -Sub ToggleButtons(ByVal Index as Integer) -Dim i as Integer - CurFieldIndex = Index - DlgUserFields.Model.cmdNextUser.Enabled = CurFieldIndex <> Ubound(UserFieldFamily(), 1) - DlgUserFields.Model.cmdPrevUser.Enabled = CurFieldIndex <> 0 -End Sub - - -Sub InitializeUserFamily() -Dim FirstIndex as Integer -Dim UserFieldstrings() as String -Dim LocStrings() as String -Dim bFileExists as Boolean -Dim n as Integer -Dim m as Integer - bFileExists = LoadDataFromFile(GetPathSettings("Config", False) & "/" & "UserData.dat", UserFieldStrings()) - If bFileExists Then - FirstIndex = Ubound(UserFieldStrings()) - ReDim Preserve UserFieldFamily(FirstIndex, SBMAXFIELDINDEX) as String - For n = 0 To FirstIndex - LocStrings() = ArrayOutofString(UserFieldStrings(n), ";") - For m = 0 To SBMAXFIELDINDEX - UserFieldFamily(n,m) = LocStrings(m) - Next m - Next n - Else - ReDim Preserve UserFieldFamily(0,SBMAXFIELDINDEX) as String - For m = 0 To SBMAXFIELDINDEX - UserFieldFamily(0,m) = oUserDataAccess.GetByName(UserFieldDataType(m,1)) - Next m - End If - ToggleButtons(0) -End Sub - - -Sub AddRecord() -Dim i as Integer -Dim MaxIndex as Integer - For i = 1 To SBTBCount - DlgUserFields.GetControl("TextField" & i).Model.Text = "" - Next i - MaxIndex = Ubound(UserFieldFamily(),1) - ReDim Preserve UserFieldFamily(MaxIndex + 1, SBMAXFIELDINDEX) as String - ToggleButtons(MaxIndex + 1, 1) -End Sub - - -Sub FillupTextFields() -Dim a as Integer -Dim CurIndex as Integer - For a = 1 To SBTBCOUNT - CurIndex = (a-1) + ScrollBarValue - DlgUserFields.GetControl("Label" & a).Model.Label = UserFieldDataType(CurIndex,0) - DlgUserFields.GetControl("TextField" & a).Model.Text = UserFieldFamily(CurFieldIndex, CurIndex) - Next a -End Sub - - -Sub StepToRecord(aEvent as Object) -Dim iStep as Integer - iStep = CInt(aEvent.Source.Model.Tag) - ScrollTextFieldInfo(ScrollBarValue) - ToggleButtons(CurFieldIndex + iStep) - FillUpTextFields() -End Sub - - -Sub SelectCurrentFields() -Dim MaxIndex as Integer -Dim i as Integer - ScrollTextFieldInfo(ScrollBarValue) - MaxIndex = Ubound(UserFieldFamily(),2) - For i = 0 To MaxIndex - oUserDataAccess.ReplaceByName(UserFieldDataType(i,1), UserFieldFamily(CurFieldIndex, i)) - Next i - oUserDataAccess.commitChanges() -End Sub - - -Sub DeleteCurrentSettings() -Dim n as Integer -Dim m as Integer -Dim MaxIndex as Integer - MaxIndex = Ubound(UserFieldFamily(),1) - If CurFieldIndex < MaxIndex Then - For n = CurFieldIndex To MaxIndex - 1 - For m = 0 To SBMAXFIELDINDEX - UserFieldFamily(n,m) = UserFieldFamily(n + 1,m) - Next m - Next n - Else - CurFieldIndex = MaxIndex - 1 - End If - ReDim Preserve UserFieldFamily(MaxIndex-1, SBMAXfIELDINDEX) as String - FillupTextFields() - ToggleButtons(CurFieldIndex) -End Sub</script:module>
\ No newline at end of file diff --git a/wizards/source/gimmicks/delzip b/wizards/source/gimmicks/delzip deleted file mode 100644 index e69de29bb..000000000 --- a/wizards/source/gimmicks/delzip +++ /dev/null diff --git a/wizards/source/gimmicks/dialog.xlb b/wizards/source/gimmicks/dialog.xlb deleted file mode 100644 index 22271dacb..000000000 --- a/wizards/source/gimmicks/dialog.xlb +++ /dev/null @@ -1,6 +0,0 @@ -<?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="Gimmicks" library:readonly="false" library:passwordprotected="false"> - <library:element library:name="UserfieldDlg"/> - <library:element library:name="ReadFolderDlg"/> -</library:library> diff --git a/wizards/source/gimmicks/readdirs.dlg b/wizards/source/gimmicks/readdirs.dlg Binary files differdeleted file mode 100644 index 20a89426d..000000000 --- a/wizards/source/gimmicks/readdirs.dlg +++ /dev/null diff --git a/wizards/source/gimmicks/script.xlb b/wizards/source/gimmicks/script.xlb deleted file mode 100644 index 5c820ba43..000000000 --- a/wizards/source/gimmicks/script.xlb +++ /dev/null @@ -1,9 +0,0 @@ -<?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="Gimmicks" library:readonly="false" library:passwordprotected="false"> - <library:element library:name="GetTexts"/> - <library:element library:name="Userfields"/> - <library:element library:name="ChangeAllChars"/> - <library:element library:name="AutoText"/> - <library:element library:name="ReadDir"/> -</library:library> diff --git a/wizards/source/imagelists/imagelists.src b/wizards/source/imagelists/imagelists.src deleted file mode 100644 index ceb14497b..000000000 --- a/wizards/source/imagelists/imagelists.src +++ /dev/null @@ -1,119 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#define REPORTWIZARD_BASE 1000 -#define FORMWIZARD_BASE 1100 -#define WEBWIZARD_BASE 1200 - -#define IMG_REPORT_ORIENTATION_PORTRAIT REPORTWIZARD_BASE + 0 -Image IMG_REPORT_ORIENTATION_PORTRAIT -{ - ImageBitmap = Bitmap { File = "portrait_32.png"; }; -}; - -#define IMG_REPORT_ORIENTATION_LANDSCAPE REPORTWIZARD_BASE + 2 -Image IMG_REPORT_ORIENTATION_LANDSCAPE -{ - ImageBitmap = Bitmap { File = "landscape_32.png"; }; -}; - -#define IMG_FORM_ARRANGELISTSIDE FORMWIZARD_BASE + 0 -Image IMG_FORM_ARRANGELISTSIDE -{ - ImageBitmap = Bitmap { File = "formarrangelistside_42.png"; }; -}; - -#define IMG_FORM_ARRANGELISTTOP FORMWIZARD_BASE + 2 -Image IMG_FORM_ARRANGELISTTOP -{ - ImageBitmap = Bitmap { File = "formarrangelisttop_42.png"; }; -}; - -#define IMG_FORM_ARRANGETABLE FORMWIZARD_BASE + 4 -Image IMG_FORM_ARRANGETABLE -{ - ImageBitmap = Bitmap { File = "formarrangetable_42.png"; }; -}; - -#define IMG_FORM_ARRANGEFREE FORMWIZARD_BASE + 6 -Image IMG_FORM_ARRANGEFREE -{ - ImageBitmap = Bitmap { File = "formarrangefree_42.png"; }; -}; - -#define IMG_WEB_LAYOUT_TABLE3 WEBWIZARD_BASE + 0 -Image IMG_WEB_LAYOUT_TABLE3 -{ - ImageBitmap = Bitmap { File = "table_3.png"; }; -}; - -#define IMG_WEB_LAYOUT_TABLE2 WEBWIZARD_BASE + 2 -Image IMG_WEB_LAYOUT_TABLE2 -{ - ImageBitmap = Bitmap { File = "table_2.png"; }; -}; - -#define IMG_WEB_LAYOUT_SIMPLE WEBWIZARD_BASE + 4 -Image IMG_WEB_LAYOUT_SIMPLE -{ - ImageBitmap = Bitmap { File = "simple.png"; }; -}; - -#define IMG_WEB_LAYOUT_DIAGONAL WEBWIZARD_BASE + 6 -Image IMG_WEB_LAYOUT_DIAGONAL -{ - ImageBitmap = Bitmap { File = "diagonal.png"; }; -}; - -#define IMG_WEB_LAYOUT_ZIGZAG WEBWIZARD_BASE + 8 -Image IMG_WEB_LAYOUT_ZIGZAG -{ - ImageBitmap = Bitmap { File = "zigzag.png"; }; -}; - -#define IMG_WEB_LAYOUT_FRAMELEFT WEBWIZARD_BASE + 10 -Image IMG_WEB_LAYOUT_FRAMELEFT -{ - ImageBitmap = Bitmap { File = "frame_left.png"; }; -}; - -#define IMG_WEB_LAYOUT_FRAMERIGHT WEBWIZARD_BASE + 12 -Image IMG_WEB_LAYOUT_FRAMERIGHT -{ - ImageBitmap = Bitmap { File = "frame_right.png"; }; -}; - -#define IMG_WEB_LAYOUT_FRAMETOP WEBWIZARD_BASE + 14 -Image IMG_WEB_LAYOUT_FRAMETOP -{ - ImageBitmap = Bitmap { File = "frame_top.png"; }; -}; - -#define IMG_WEB_LAYOUT_FRAMEBOTTOM WEBWIZARD_BASE + 16 -Image IMG_WEB_LAYOUT_FRAMEBOTTOM -{ - ImageBitmap = Bitmap { File = "frame_bottom.png"; }; -}; diff --git a/wizards/source/importwizard/API.xba b/wizards/source/importwizard/API.xba deleted file mode 100644 index d38ba68d8..000000000 --- a/wizards/source/importwizard/API.xba +++ /dev/null @@ -1,208 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="API" script:language="StarBasic">Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" _ - (ByVal hKey As Long, _ - ByVal lpSubKey As String, _ - ByVal ulOptions As Long, _ - ByVal samDesired As Long, _ - phkResult As Long) As Long - -Declare Function RegQueryValueExString Lib "advapi32.dll" Alias "RegQueryValueExA" _ - (ByVal hKey As Long, _ - ByVal lpValueName As String, _ - ByVal lpReserved As Long, _ - lpType As Long, _ - lpData As String, _ - lpcbData As Long) As Long - -Declare Function RegQueryValueExLong Lib "advapi32.dll" Alias "RegQueryValueExA" _ - (ByVal hKey As Long, _ - ByVal lpValueName As String, _ - ByVal lpReserved As Long, _ - lpType As Long, _ - lpData As Long, _ - lpcbData As Long) As Long - -Declare Function RegQueryValueExNULL Lib "advapi32.dll" Alias "RegQueryValueExA" _ - (ByVal hKey As Long, _ - ByVal lpValueName As String, _ - ByVal lpReserved As Long, _ - lpType As Long, _ - ByVal lpData As Long, _ - lpcbData As Long) As Long - -Declare Function RegCloseKeyA Lib "advapi32.dll" Alias "RegCloseKey" _ - (ByVal hKey As Long) As Long - - -Public Const HKEY_CLASSES_ROOT = &H80000000 -Public Const HKEY_CURRENT_USER = &H80000001 -Public Const HKEY_LOCAL_MACHINE = &H80000002 -Public Const HKEY_USERS = &H80000003 -Public Const KEY_ALL_ACCESS = &H3F -Public Const REG_OPTION_NON_VOLATILE = 0 -Public Const REG_SZ As Long = 1 -Public Const REG_DWORD As Long = 4 -Public Const ERROR_NONE = 0 -Public Const ERROR_BADDB = 1 -Public Const ERROR_BADKEY = 2 -Public Const ERROR_CANTOPEN = 3 -Public Const ERROR_CANTREAD = 4 -Public Const ERROR_CANTWRITE = 5 -Public Const ERROR_OUTOFMEMORY = 6 -Public Const ERROR_INVALID_PARAMETER = 7 -Public Const ERROR_ACCESS_DENIED = 8 -Public Const ERROR_INVALID_PARAMETERS = 87 -Public Const ERROR_NO_MORE_ITEMS = 259 -'Public Const KEY_READ = &H20019 - - -Function OpenRegKey(lBaseKey As Long, sKeyName As String) As Variant -Dim LocKeyValue -Dim hKey as Long -Dim lRetValue as Long - lRetValue = RegOpenKeyEx(lBaseKey, sKeyName, 0, KEY_ALL_ACCESS, hKey) -' lRetValue = QueryValue(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Outlook Express\5.0\Default Settings", "Revocation Checking") - If hKey <> 0 Then - RegCloseKeyA (hKey) - End If - OpenRegKey() = lRetValue -End Function - - -Function GetDefaultPath(CurOffice as Integer) As String -Dim sPath as String -Dim Index as Integer - Select Case Wizardmode - Case SBMICROSOFTMODE - Index = Applications(CurOffice,SBAPPLKEY) - If GetGUIType = 1 Then ' Windows - sPath = QueryValue(HKEY_LOCAL_MACHINE, sKeyName(Index), sValueName(Index)) - Else - sPath = "" - End If - If sPath = "" Then - sPath = SOWorkPath - End If - GetDefaultPath = sPath - Case SBXMLMODE - GetDefaultPath = SOWorkPath - End Select -End Function - - -Function GetTemplateDefaultPath(Index as Integer) As String -Dim sLocTemplatePath as String -Dim sLocProgrampath as String -Dim Progstring as String -Dim PathList()as String -Dim Maxindex as Integer -Dim OldsLocTemplatePath -Dim sTemplateKeyName as String -Dim sTemplateValueName as String - On Local Error Goto NOVAlIDSYSTEMPATH - Select Case WizardMode - Case SBMICROSOFTMODE - If GetGUIType = 1 Then ' Windows - ' Template directory of Office 97 - sTemplateKeyName = "Software\Microsoft\Office\8.0\Common\FileNew\LocalTemplates" - sTemplateValueName = "" - sLocTemplatePath = QueryValue(HKEY_LOCAL_MACHINE, sTemplateKeyName, sTemplateValueName) - - If sLocTemplatePath = "" Then - ' Retrieve the template directory of Office 2000 - ' Unfortunately there is no existing note about the template directory in - ' the whole registry. - - ' Programdirectory of Office 2000 - sTemplateKeyName = "Software\Microsoft\Office\9.0\Common\InstallRoot" - sTemplateValueName = "Path" - sLocProgrampath = QueryValue(HKEY_LOCAL_MACHINE, sTemplateKeyName, sTemplateValueName) - If sLocProgrampath <> "" Then - If Right(sLocProgrampath, 1) <> "\" Then - sLocProgrampath = sLocProgrampath & "\" - End If - PathList() = ArrayoutofString(sLocProgrampath,"\",Maxindex) - Progstring = "\" & PathList(Maxindex-1) & "\" - OldsLocTemplatePath = DeleteStr(sLocProgramPath,Progstring) - - sLocTemplatePath = OldsLocTemplatePath & "\" & "Templates" - - ' Does this subdirectory "templates" exist at all - If oUcb.Exists(sLocTemplatePath) Then - ' If Not the main directory of the office is the base - sLocTemplatePath = OldsLocTemplatePath - End If - Else - sLocTemplatePath = SOWorkPath - End If - End If - GetTemplateDefaultPath = ConvertToUrl(sLocTemplatePath) - Else - GetTemplateDefaultPath = SOWorkPath - End If - Case SBXMLMODE - If Index = 3 Then - ' Helper Application with no templates - GetTemplateDefaultPath = SOWorkPath - Else - GetTemplateDefaultPath = SOTemplatePath - End If - End Select -NOVALIDSYSTEMPATH: - If Err <> 0 Then - GetTemplateDefaultPath() = SOWorkPath - Resume ONITGOES - ONITGOES: - End If -End Function - - -Function QueryValueEx(ByVal lhKey, ByVal szValueName As String, vValue As String) As Long -Dim cch As Long -Dim lrc As Long -Dim lType As Long -Dim lValue As Long -Dim sValue As String -Dim Empty - - On Error GoTo QueryValueExError - - lrc = RegQueryValueExNULL(lhKey, szValueName, 0&, lType, 0&, cch) - If lrc <> ERROR_NONE Then Error 5 - Select Case lType - Case REG_SZ: - sValue = String(cch, 0) - lrc = RegQueryValueExString(lhKey, szValueName, 0&, lType, sValue, cch) - If lrc = ERROR_NONE Then - vValue = Left$(sValue, cch) - Else - vValue = Empty - End If - Case REG_DWORD: - lrc = RegQueryValueExLong(lhKey, szValueName, 0&, lType, lValue, cch) - If lrc = ERROR_NONE Then - vValue = lValue - End If - Case Else - lrc = -1 - End Select -QueryValueExExit: - QueryValueEx = lrc - Exit Function -QueryValueExError: - Resume QueryValueExExit -End Function - - -Function QueryValue(BaseKey As Long, sKeyName As String, sValueName As String) As Variant -Dim lRetVal As Long ' Returnvalue API-Call -Dim hKey As Long ' Onen key handle -Dim vValue As String ' Key value - - lRetVal = RegOpenKeyEx(BaseKey, sKeyName, 0, KEY_ALL_ACCESS, hKey) - lRetVal = QueryValueEx(hKey, sValueName, vValue) - RegCloseKeyA (hKey) - QueryValue = vValue -End Function -</script:module>
\ No newline at end of file diff --git a/wizards/source/importwizard/DialogModul.xba b/wizards/source/importwizard/DialogModul.xba deleted file mode 100644 index d323ba7ed..000000000 --- a/wizards/source/importwizard/DialogModul.xba +++ /dev/null @@ -1,657 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="DialogModul" script:language="StarBasic">Option Explicit - -Public Const bDebugWizard = True - -Public Const SBFIRSTAPPLCHECKED = 0 -Public Const SBSECONDAPPLCHECKED = 1 -Public Const SBTHIRDAPPLCHECKED = 2 -Public Const SBFOURTHAPPLCHECKED = 3 -Public bFilterTracingAvailable as Boolean -Public WizardMode as String -Public Const SBMICROSOFTMODE = "MS" -Public Const SBXMLMODE = "SO" -' The absolute maximal Number of possible Applications -Public Const Twip = 425 -Public Const SBMAXAPPLCOUNT = 4 -Public MaxApplCount as Integer -Public CurOffice As Integer -Public SOBitmapPath As String -Public SOWorkPath As String -Public SOTemplatePath as String -Public bCancelTask As Boolean -Public bDoKeepApplValues as Boolean -Public iApplSection as Integer -Public oUcb as Object -Public PathSeparator as String - -Public ApplCount as Integer -Public sKeyName(SBMAXAPPLCOUNT-1) as String -Public sValueName(SBMAXAPPLCOUNT-1) as String -Public sCRLF as String -Public MSFilterName(5,4) as String -Public XMLFilterName(7,3) as String 'Number of different formats -Public FilterTracingLogPath(2) as String -Public bMSApplFilterTracingAvailable(2) as String -Public bTakeOverTargetName(2) as Boolean -Public bTakeOverPathName(2) as Boolean - -' e.g.: -' XMLFilterName(x,0) = "sdw" ' in documents we take the extensions; in SO-templates the appropriate Filtername -' XMLFilterName(x,1) = "swriter: StarWriter 5.0" ' the filtername of the target-format -' XMLFilterName(x,2) = "sxw" ' the target extension - -Public Applications(SBMAXAPPLCOUNT-1,9) - -Public Const SBAPPLCONVERT = 0 -Public Const SBDOCCONVERT = 1 -Public Const SBDOCRECURSIVE = 2 -Public Const SBDOCSOURCE = 3 -Public Const SBDOCTARGET = 4 -Public Const SBTEMPLCONVERT = 5 -Public Const SBTEMPLRECURSIVE = 6 -Public Const SBTEMPLSOURCE = 7 -Public Const SBTEMPLTARGET = 8 -Public Const SBAPPLKEY = 9 -Public XMLTemplateList() - -' Application-relating Data are stored in this Array -' according to the following structure: -' Applications(X,0) = True/False (Application is to be converted) -' Applications(X,1) = True/False (Documents are to be converted) -' Applications(X,2) = True/False (Including Subdirectories) -' Applications(X,3) = "File:///..." (SourceUrl of the documents) -' Applications(X,4) = "File///:..." (TargetUrl of the documents) -' Applications(X,5) = True/False (Templates are to be converted) -' Applications(X,6) = True/False (Including Subdirectories) -' Applications(X,7) = "File:///..." (SourceUrl of the templates) -' Applications(X,8) = "File:///..." (TargetUrl of the templates) -' Applications(X,9) = 0 (Key to the original Index of the Applications) - -Public Const SBMAXEXTENSIONLENGTH = 15 - - -Sub FillStep_Welcome() -Dim i as Integer -' bDoKeepApplValues = False - ImportDialogArea.Title = sTitle - With ImportDialog - .cmdHelp.Label = sHelpButton - .cmdCancel.Label = sCancelButton - .cmdBack.Label = sBackButton - .cmdGoOn.Label = sNextButton - .WelcomeTextLabel.Label = sWelcomeTextLabel1 - .WelcomeTextLabel2.Label = sWelcomeTextLabel2 - .WelcomeTextLabel3.Label = sWelcomeTextLabel3 - - .optMSDocuments.Label = sContainerName(0) - .chkMSApplication1.Label = sMsDocumentCheckbox(0) - .chkMSApplication2.Label = sMsDocumentCheckbox(1) - .chkMSApplication3.Label = sMsDocumentCheckbox(2) - - .optSODocuments.Label = sContainerName(1) - .chkSOApplication1.Label = sSODocumentCheckbox(0) - .chkSOApplication2.Label = sSODocumentCheckbox(1) - .chkSOApplication3.Label = sSODocumentCheckbox(2) - .chkSOApplication4.Label = sSODocumentCheckbox(3) - .cmdBack.Enabled = False - .Step = 1 - - If Not oFactoryKey.hasbyName("com.sun.star.text.TextDocument") Then - .chkLogfile.State = 0 - .chkLogfile.Enabled = False - End If - End With - CheckModuleInstallation() - ToggleNextButton() -End Sub - - -Sub FillStep_InputPaths(OfficeIndex as Integer, bStartup as Boolean) -Dim Index as Integer -Dim oNullObject as Object - If bStartup And Not bDoKeepApplValues Then - If ImportDialog.optMSDocuments.State = 1 Then - SetupMSConfiguration() - Else - SetupXMLConfiguration() - End If - FillUpApplicationList() - End If - CurOffice = OfficeIndex - Index = Applications(CurOffice,SBAPPLKEY) - InitializePathsforCurrentApplication(Index) - With ImportDialog - .chkTemplatePath.Label = sTemplateCheckbox(Index) - .chkDocumentPath.State = Abs(Applications(CurOffice,SBDOCCONVERT)) - .chkDocumentSearchSubDir.State = Abs(Applications(CurOffice,SBDOCRECURSIVE)) - .txtDocumentImportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCSOURCE)) - .txtDocumentExportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCTARGET)) - .hlnDocuments.Label = sProgressMoreDocs - If WizardMode = SBXMLMODE Then - ImportDialogArea.Title = sTitle & " - " & sSODocumentCheckBox(Index) - Else - ImportDialogArea.Title = sTitle & " - " & sMSDocumentCheckBox(Index) - End If - If WizardMode = SBXMLMODE AND Index = 3 Then - ' Note: SO-Helper Applications are partly treated like templates although they only have documents - .hlnTemplates.Label = sProgressMoreDocs - .chkTemplatePath.Label = sSOHelperDocuments(0,0) - .chkTemplatePath.Enabled = oFactoryKey.HasByName(sSOHelperDocuments(0,1)) - .chkDocumentPath.Label = sSOHelperDocuments(1,0) - .chkDocumentPath.Enabled = oFactoryKey.HasByName(sSOHelperDocuments(1,1)) - Else - .chkTemplatePath.Enabled = True - .chkDocumentPath.Enabled = True - .chkTemplatePath.Label = sTemplateCheckbox(Index) - .chkDocumentPath.Label = sDocumentCheckbox(Index) - .hlnTemplates.Label = sProgressMoreTemplates - End If - .chkTemplatePath.State = Abs(Applications(CurOffice,SBTEMPLCONVERT)) - ToggleInputPaths(oNullObject,"Template") - ToggleInputPaths(oNullObject,"Document") - .chkTemplateSearchSubDir.State = Abs(Applications(CurOffice,SBTEMPLRECURSIVE)) - .txtTemplateImportPath.Text = ConvertFromUrl(Applications(CurOffice,SBTEMPLSOURCE)) - .txtTemplateExportPath.Text = ConvertFromUrl(Applications(CurOffice,SBTEMPLTARGET)) - .cmdGoOn.Label = sNextButton - .cmdBack.Enabled = True - ImportDialog.Step = 2 - End With - ImportDialogArea.GetControl("chkTemplatePath").SetFocus() - ToggleNextButton() -End Sub - - -Sub FillUpApplicationList() -Dim i as Integer -Dim a as Integer -Dim BoolValue as Boolean - If Not bDoKeepApplValues Then - a = 0 - For i = 1 To ApplCount - If ImportDialog.optMSDocuments.State = 1 Then - BoolValue = ImportDialogArea.GetControl("chkMSApplication" & i).Model.State = 1 - Else - BoolValue = ImportDialogArea.GetControl("chkSOApplication" & i).Model.State = 1 - End If - Applications(a,SBAPPLCONVERT) = BoolValue - Applications(a,SBDOCCONVERT) = BoolValue - Applications(a,SBDOCRECURSIVE) = BoolValue - Applications(a,SBDOCSOURCE) = "" ' GetDefaultPath(i) - Applications(a,SBDOCTARGET) = "" ' SOWorkPath - Applications(a,SBTEMPLCONVERT) = BoolValue - Applications(a,SBTEMPLRECURSIVE) = BoolValue - Applications(a,SBTEMPLSOURCE) = "" ' GetTemplateDefaultPath(i) - Applications(a,SBTEMPLTARGET) = "" ' GetTargetTemplatePath(i) - Applications(a,SBAPPLKEY) = i-1 - If BoolValue Then - a = a + 1 - End If - Next i - ApplCount = a - End If -End Sub - - -Sub InitializePathsforCurrentApplication(i as Integer) - AssignPathToCurrentApplication(SBDOCSOURCE, GetDefaultPath(i)) - AssignPathToCurrentApplication(SBDOCTARGET, SOWorkPath) - AssignPathToCurrentApplication(SBTEMPLSOURCE, GetTemplateDefaultPath(i)) - AssignPathToCurrentApplication(SBTEMPLTARGET, GetTargetTemplatePath(i)) -End Sub - - -Sub AssignPathToCurrentApplication(Index as Integer, NewPath as String) - If Applications(CurOffice,Index) = "" Then - If CurOffice > 0 Then - Applications(CurOffice,Index) = Applications(CurOffice-1,Index) - Else - Applications(CurOffice,Index) = NewPath - End If - End If -End Sub - - -Sub SaveStep_InputPath() - Applications(CurOffice,SBDOCCONVERT) = ImportDialog.chkDocumentPath.State = 1 - Applications(CurOffice,SBDOCRECURSIVE) = ImportDialog.chkDocumentSearchSubDir.State = 1 - Applications(CurOffice,SBDOCSOURCE) = ConvertToURL(ImportDialog.txtDocumentImportPath.Text) - Applications(CurOffice,SBDOCTARGET) = ConvertToUrl(ImportDialog.txtDocumentExportPath.Text) - Applications(CurOffice,SBTEMPLCONVERT) = ImportDialog.chkTemplatePath.State = 1 - Applications(CurOffice,SBTEMPLRECURSIVE) = ImportDialog.chkTemplateSearchSubDir.State = 1 - Applications(CurOffice,SBTEMPLSOURCE) = ConvertToURL(ImportDialog.txtTemplateImportPath.Text) - Applications(CurOffice,SBTEMPLTARGET) = ConvertToURL(ImportDialog.txtTemplateExportPath.Text) -End Sub - - -Sub ToggleInputPaths(aEvent as Object, Optional sDocType) -Dim bDoEnable as Boolean -Dim sLocDocType as String -Dim oCheckBox as Object - If Not IsNull(aEvent) Then - sLocDocType = aEvent.Source.Model.Tag - Else - sLocDocType = sDocType - End If - With ImportDialogArea - oCheckBox = .GetControl("chk" & sLocDocType & "Path").Model - bDoEnable = oCheckBox.State = 1 And oCheckBox.Enabled - .GetControl("lbl" & sLocDocType & "Import").Model.Enabled = bDoEnable - .GetControl("lbl" & sLocDocType & "Export").Model.Enabled = bDoEnable - .GetControl("txt" & sLocDocType & "ImportPath").Model.Enabled = bDoEnable - .GetControl("txt" & sLocDocType & "ExportPath").Model.Enabled = bDoEnable - .GetControl("chk" & sLocDocType & "SearchSubDir").Model.Enabled = bDoEnable - .GetControl("cmd" & sLocDocType & "Import").Model.Enabled = bDoEnable - .GetControl("cmd" & sLocDocType & "Export").Model.Enabled = bDoEnable - End With - ToggleNextButton() -End Sub - - -Function MakeSummaryString() -Dim sTmpText As String -Dim i as Integer -Dim Index as Integer -Dim sAddText as String - For i = 0 To ApplCount -1 - Index = Applications(i,SBAPPLKEY) - GetFilterTracingLogPath(i, Index) - If Applications(i,SBTEMPLCONVERT) Then - ' Templates are to be converted - sAddText = "" - If WizardMode = SBMICROSOFTMODE Then - sAddText = sSumMSTemplates(Index) & sCRLF - Else - sAddText = sSumSOTemplates(Index) & sCRLF - End If - sTmpText = sTmpText & sAddText & ConvertFromUrl(Applications(i,SBTEMPLSOURCE)) & sCRLF - If Applications(i,SBTEMPLRECURSIVE) Then - ' Including Subdirectories - sTmpText = sTmpText & sSumInclusiveSubDir & sCRLF - End If - sTmpText = sTmpText & sSumSaveDocuments & sCRLF - sTmpText = sTmpText & ConvertFromUrl(Applications(i,SBTEMPLTARGET)) & sCRLF - sTmpText = sTmpText & sCRLF - End If - - If Applications(i,SBDOCCONVERT) Then - ' Documents are to be converted - If WizardMode = SBMICROSOFTMODE Then - sAddText = sSumMSDocuments(Index) & sCRLF - Else - sAddText = sSumSODocuments(Index) & sCRLF - End If - sTmpText = sTmpText & sAddText & ConvertFromUrl(Applications(i,SBDOCSOURCE)) & sCRLF - - If Applications(i,SBDOCRECURSIVE) Then - ' Including Subdirectories - sTmpText = sTmpText & sSumInclusiveSubDir & sCRLF - End If - - sTmpText = sTmpText & sSumSaveDocuments & sCRLF - sTmpText = sTmpText & ConvertFromUrl(Applications(i,SBDOCTARGET)) & sCRLF - sTmpText = sTmpText & sCRLF - End If - Next i - MakeSummaryString = sTmpText -End Function - - -Sub FillStep_Summary() - ImportDialogArea.Title = sTitle - With ImportDialog - .SummaryTextbox.Text = MakeSummaryString() - .cmdGoOn.Enabled = .SummaryTextbox.Text <> "" - .cmdGoOn.Label = sBeginButton - .SummaryHeaderLabel.Label = sSummaryHeader - .Step = 3 - End With - ImportDialogArea.GetControl("SummaryHeaderLabel").SetFocus() -End Sub - - -Sub FillStep_Progress() - With ImportDialog - .cmdBack.Enabled = False - .cmdGoOn.Enabled = False - .hlnProgress.Label = sProgressPage_1 - .LabelRetrieval.FontWeight = com.sun.star.awt.FontWeight.BOLD - .LabelRetrieval.Label = sProgressPage_2 - .LabelCurProgress.Label = sProgressPage_3 - .LabelCurDocumentRetrieval.Label = "" - .LabelCurTemplateRetrieval.Label = "" - .LabelCurDocument.Label = "" - .Step = 4 - End With - ImportDialogArea.GetControl("LabelRetrieval").SetFocus() - If ImportDialog.chkLogfile.State = 1 Then - ImportDialog.cmdShowLogFile.DefaultButton = True - End If -End Sub - - -Sub GetFilterTracingLogPath(i as Integer, Index as Integer) -Dim aNodePath(0) as new com.sun.star.beans.PropertyValue -Dim oMasterKey -Dim oImportKey -Dim oWordKey -Dim oExcelkey -Dim oPowerpointKey -Dim oFilterService - aNodePath(0).Name = "nodepath" - aNodePath(0).Value = "org.openoffice.Office.Tracing" - oFilterService = createUnoService("com.sun.star.util.FilterTracer") - bFilterTracingAvailable = Not IsNull(oFilterService) - If bFilterTracingAvailable Then - oMasterkey = GetRegistryKeyContent("org.openoffice.Office.Tracing/") - If oMasterKey.hasbyName("Import") Then - oImportKey = GetRegistryKeyContent("org.openoffice.Office.Tracing/Import") - bMSApplFilterTracingAvailable(i) = CheckMSImportAvailability(oImportkey, MSFiltername(Index, 4), FilterTracingLogPath(i), bTakeOverTargetName(i), bTakeOverPathName(i)) - End If - End If -End Sub - - -Function CheckMSImportAvailability(oImportkey, MSApplName as String, MSLogPath as String, bTakeOverTargetname as String, bTakeOverpathName as String) as Boolean -Dim bApplIsAvailable as Boolean -Dim oApplKey -Dim LocApplName as String -Dim LocApplPath as String - bApplIsAvailable = oImportKey.hasbyName(MSApplName) - If bApplIsAvailable Then - oApplKey = oImportKey.getByName(MSApplName) - bApplIsAvailable = oApplKey.On - LocApplName = oApplKey.Name - LocApplPath = oApplKey.Path - bTakeOverTargetName = (LocApplName = "") - bTakeOverPathName = (LocApplPath = "") - MSLogPath = LocApplPath & "/" & LocApplName & ".log" - End If - CheckMSImportAvailability() = bApplIsAvailable -End Function - - - -Sub SetupMSConfiguration() - iApplSection = 0 - Wizardmode = SBMICROSOFTMODE - MaxApplCount = 3 - ApplCount = 3 - ' chkTemplatePath-Captions - GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox()) - ' DocumentCheckbox- Captions - GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox()) - - sKeyName(0) = "Software\Microsoft\Office\8.0\Word\Options" - sKeyName(1) = "Software\Microsoft\Office\8.0\Excel\Microsoft Excel" - sKeyName(2) = "Software\Microsoft\Office\8.0\PowerPoint\Recent Folder List\Default" - - sValueName(0) = "DOC-PATH" - sValueName(1) = "DefaultPath" - sValueName(2) = "" - -' See definition of Filtername-Array about meaning of fields - MSFilterName(0,0) = "doc" - MSFilterName(0,1) = "writer8" - MSFilterName(0,2) = "odt" - MSFilterName(0,3) = sMSDocumentCheckBox(0) - MSFilterName(0,4) = "Word" - - - MSFilterName(1,0) = "xls" - MSFilterName(1,1) = "calc8" - MSFilterName(1,2) = "ods" - MSFilterName(1,3) = sMSDocumentCheckBox(1) - MSFilterName(1,4) = "Excel" - - MSFilterName(2,0) = "ppt|pps" - MSFilterName(2,1) = "impress8|impress8" - MSFilterName(2,2) = "odp|odp" - MSFilterName(2,3) = sMSDocumentCheckBox(2) - MSFilterName(2,4) = "PowerPoint" - - MSFilterName(3,0) = "dot" - MSFilterName(3,1) = "writer8_template" - MSFilterName(3,2) = "ott" - MSFilterName(3,3) = sMSTemplateCheckBox(0) - MSFilterName(3,4) = "Word" - - MSFilterName(4,0) = "xlt" - MSFilterName(4,1) = "calc8_template" - MSFilterName(4,2) = "ots" - MSFilterName(4,3) = sMSTemplateCheckBox(1) - MSFilterName(4,4) = "Excel" - - MSFilterName(5,0) = "pot" - MSFilterName(5,1) = "impress8_template" - MSFilterName(5,2) = "otp" - MSFilterName(5,3) = sMSTemplateCheckBox(2) - MSFilterName(5,4) = "PowerPoint" -End Sub - - - -' This is an extract from "http://util.openoffice.org/source/browse/util/sot/source/base/exchange.cxx?rev=1.25&content-type=text/x-cvsweb-markup" -' about the listed defined mimetypes that are required to define binary StarOffice templates that have for all applications the same extension ".vor" - -' 26 SOT_FORMATSTR_ID_STARWRITER_30*/ { "application/x-openoffice-starwriter-30;windows_formatname=\"StarWriter 3.0\"", "StarWriter 3.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, -' 27 SOT_FORMATSTR_ID_STARWRITER_40*/ { "application/x-openoffice-starwriter-40;windows_formatname=\"StarWriter 4.0\"", "StarWriter 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, -' 28 SOT_FORMATSTR_ID_STARWRITER_50*/ { "application/x-openoffice-starwriter-50;windows_formatname=\"StarWriter 5.0\"", "StarWriter 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - -' 29 SOT_FORMATSTR_ID_STARWRITERWEB_40*/ { "application/x-openoffice-starwriterweb-40;windows_formatname=\"StarWriter/Web 4.0\"", "StarWriter/Web 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, -' 30 SOT_FORMATSTR_ID_STARWRITERWEB_50*/ { "application/x-openoffice-starwriterweb-50;windows_formatname=\"StarWriter/Web 5.0\"", "StarWriter/Web 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - -' 31 SOT_FORMATSTR_ID_STARWRITERGLOB_40*/ { "application/x-openoffice-starwriterglob-40;windows_formatname=\"StarWriter/Global 4.0\"", "StarWriter/Global 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, -' 32 SOT_FORMATSTR_ID_STARWRITERGLOB_50*/ { "application/x-openoffice-starwriterglob-50;windows_formatname=\"StarWriter/Global 5.0\"", "StarWriter/Global 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - -' 33 SOT_FORMATSTR_ID_STARDRAW*/ { "application/x-openoffice-stardraw;windows_formatname=\"StarDrawDocument\"", "StarDrawDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, -' 34 SOT_FORMATSTR_ID_STARDRAW_40*/ { "application/x-openoffice-stardraw-40;windows_formatname=\"StarDrawDocument 4.0\"", "StarDrawDocument 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, -' 36 SOT_FORMATSTR_ID_STARDRAW_50*/ { "application/x-openoffice-stardraw-50;windows_formatname=\"StarDraw 5.0\"", "StarDraw 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - -' 35 SOT_FORMATSTR_ID_STARIMPRESS_50*/ { "application/x-openoffice-starimpress-50;windows_formatname=\"StarImpress 5.0\"", "StarImpress 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - -' 37 SOT_FORMATSTR_ID_STARCALC*/ { "application/x-openoffice-starcalc;windows_formatname=\"StarCalcDocument\"", "StarCalcDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, -' 38 SOT_FORMATSTR_ID_STARCALC_40*/ { "application/x-openoffice-starcalc-40;windows_formatname=\"StarCalc 4.0\"", "StarCalc 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, -' 39 SOT_FORMATSTR_ID_STARCALC_50*/ { "application/x-openoffice-starcalc-50;windows_formatname=\"StarCalc 5.0\"", "StarCalc 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - -' 40 SOT_FORMATSTR_ID_STARCHART*/ { "application/x-openoffice-starchart;windows_formatname=\"StarChartDocument\"", "StarChartDocument", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, -' 41 SOT_FORMATSTR_ID_STARCHART_40*/ { "application/x-openoffice-starchart-40;windows_formatname=\"StarChartDocument 4.0\"", "StarChartDocument 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, -' 42 SOT_FORMATSTR_ID_STARCHART_50*/ { "application/x-openoffice-starchart-50;windows_formatname=\"StarChart 5.0\"", "StarChart 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - -' 46 SOT_FORMATSTR_ID_STARMATH*/ { "application/x-openoffice-starmath;windows_formatname=\"StarMath\"", "StarMath", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, -' 47 SOT_FORMATSTR_ID_STARMATH_40*/ { "application/x-openoffice-starmath-40;windows_formatname=\"StarMathDocument 4.0\"", "StarMathDocument 4.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, -' 48 SOT_FORMATSTR_ID_STARMATH_50*/ { "application/x-openoffice-starmath-50;windows_formatname=\"StarMath 5.0\"", "StarMath 5.0", &::getCppuType( (const Sequence< sal_Int8 >*) 0 ) }, - - -Sub SetupXMLConfiguration() - iApplSection = 1000 - Wizardmode = SBXMLMODE - ApplCount = 4 - MaxApplCount = 4 - XMLTemplateList = Array("vor", "sti", "stw" , "stc" , "std") - ' chkTemplatePath-Captions - GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox()) - ' DocumentCheckbox- Captions - GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox()) - - XMLFilterName(0,0) = "sdw|sxw" - XMLFilterName(0,1) = "writer8|writer8" - XMLFilterName(0,2) = "odt|odt" - XMLFilterName(0,3) = sDocumentCheckBox(0) - - XMLFilterName(1,0) = "sdc|sxc" - XMLFilterName(1,1) = "calc8|calc8" - XMLFilterName(1,2) = "ods|ods" - XMLFilterName(1,3) = sDocumentCheckBox(1) - - If oFactoryKey.HasByName("com.sun.star.drawing.DrawingDocument") and oFactoryKey.HasByName("com.sun.star.presentation.PresentationDocument") Then - XMLFilterName(2,0) = "sdd|sda|sxi|sxd" - XMLFilterName(2,1) = "impress8|draw8|impress8|draw8" - XMLFilterName(2,2) = "odp|odg|odp|odg" - Elseif oFactoryKey.HasByName("com.sun.star.drawing.DrawingDocument") Then - XMLFilterName(2,0) = "sda|sxd" - XMLFilterName(2,1) = "draw8|draw8" - XMLFilterName(2,2) = "odg|odg" - Elseif oFactoryKey.HasByName("com.sun.star.presentation.PresentationDocument") Then - XMLFilterName(2,0) = "sdd|sxi" - XMLFilterName(2,1) = "impress8|impress8" - XMLFilterName(2,2) = "odp|odp" - End If - XMLFilterName(2,3) = sDocumentCheckBox(2) - - - XMLFilterName(3,0) = "smf|sxm" - XMLFilterName(3,1) = "math8|math8" - XMLFilterName(3,2) = "odf|odf" - XMLFilterName(3,3) = sDocumentCheckBox(3) - - XMLFilterName(4,0) = "application/x-openoffice-starwriter|application/vnd.stardivision.writer/web|application/vnd.sun.xml.writer|application/vnd.sun.xml.writerweb" - XMLFilterName(4,1) = "writer8_template|writerweb8_writer_template|writer8_template|writerweb8_writer_template" - XMLFilterName(4,2) = "ott|oth|ott|oth" - XMLFilterName(4,3) = sTemplateCheckBox(0) - - - XMLFilterName(5,0) = "application/x-openoffice-starcalc|application/vnd.sun.xml.calc" - XMLFilterName(5,1) = "calc8_template|calc8_template" - XMLFilterName(5,2) = "ots|ots" - XMLFilterName(5,3) = sTemplateCheckBox(1) - - ' due to bug #108942# impress templates of the version 4.0 have to be handled in a special way because their mimetype - ' falsely points to the draw application. - If oFactoryKey.HasByName("com.sun.star.drawing.DrawingDocument") and oFactoryKey.HasByName("com.sun.star.presentation.PresentationDocument") Then - XMLFilterName(6,0) = "application/x-openoffice-starimpress|application/x-openoffice-stardraw-40|application/x-openoffice-stardraw|application/vnd.sun.xml.impress|application/vnd.sun.xml.draw" - XMLFilterName(6,1) = "impress8_template|impress8_template|draw8_template|impress8_template|draw8_template" - XMLFilterName(6,2) = "otp|otp|otg|otp|otg" - Elseif oFactoryKey.HasByName("com.sun.star.drawing.DrawingDocument") Then - XMLFilterName(6,0) = "application/x-openoffice-stardraw|application/vnd.sun.xml.draw" - XMLFilterName(6,1) = "draw8_template|draw8_template" - XMLFilterName(6,2) = "otg|otg" - Elseif oFactoryKey.HasByName("com.sun.star.presentation.PresentationDocument") Then - XMLFilterName(6,0) = "application/x-openoffice-starimpress|application/x-openoffice-stardraw-40|application/vnd.sun.xml.impress" - XMLFilterName(6,1) = "impress8_template|impress8_template|impress8_template" - XMLFilterName(6,2) = "otp|otp|otp" - End If - XMLFilterName(6,3) = sTemplateCheckBox(2) - - If oFactoryKey.HasByName("com.sun.star.text.GlobalDocument") Then - XMLFilterName(7,0) = "sgl|sxg" - XMLFilterName(7,1) = "writerglobal8|writerglobal8" - XMLFilterName(7,2) = "odm|odm" - XMLFilterName(7,3) = sTemplateCheckBox(3) - End If -End Sub - - -Function CheckControlPath(oCheckbox as Object, oTextBox as Object, ByVal bDoEnable as Boolean) -Dim sPath as String - If Not bDoEnable Then - CheckControlPath = False - ElseIf oCheckbox.State = 0 Then - CheckControlPath = True - Else - sPath = ConvertToUrl(Trim(oTextBox.Text) - CheckControlPath = oUcb.Exists(sPath) - End If -End Function - - -Function CheckInputPaths() as Boolean -Dim bChangePage as Boolean - bChangePage = CheckTextBoxPath(ImportDialog.txtTemplateImportPath, True, False, sTitle, False) - bChangePage = CheckTextBoxPath(ImportDialog.txtTemplateExportPath, bChangePage, True, sTitle, False) - bChangePage = CheckTextBoxPath(ImportDialog.txtDocumentImportPath, bChangePage, False, sTitle, False) - bChangePage = CheckTextBoxPath(ImportDialog.txtDocumentExportPath, bChangePage, True, sTitle, False) - CheckInputPaths = bChangePage -End Function - - -Function CheckTextBoxPath(oTextBox as Object, ByVal bCheck as Boolean, bCreateNew as Boolean, sTitle as String, bgetResources as Boolean) as Boolean -Dim iCreate as Integer -Dim sQueryMessage as String -Dim sUrlPath as String -Dim sMessageNoDir as String -Dim sShowPath as String -Dim oLocUcb as Object - oLocUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - If bGetResources Then - If InitResources("ImportWizard","imp") then - sNoDirCreation = GetResText(1050) - sMsgDirNotThere = GetResText(1051) - sQueryForNewCreation = GetResText(1052) - Else - CheckTextBoxPath() = False - Exit Function - End If - End If - If oTextBox.Enabled Then - If bCheck Then - sShowPath = oTextBox.Text - sUrlPath = ConvertToUrl(sShowPath) - If Not oLocUcb.Exists(sUrlPath) Then - If Not bCreateNew Then - ' Sourcedirectories must be existing, Targetdirectories may be created new - sQueryMessage = ReplaceString(sMsgDirNotThere, sShowPath,"%1") - Msgbox(sQueryMessage,16,sTitle) - CheckTextBoxPath() = False - Exit Function - Else - sQueryMessage = ReplaceString(sMsgDirNotThere, sShowPath,"%1") - sQueryMessage = sQueryMessage & Chr(13) & sQueryForNewCreation - iCreate = Msgbox (sQueryMessage, 36, sTitle) - If iCreate = 6 Then - On Local Error Goto NOVALIDPATH - CreateFolder(sUrlPath) - If Not oLocUcb.Exists(sUrlPath) Then - Goto NOVALIDPATH - End If - Else - CheckTextBoxPath() = False - Exit Function - End If - End If - End If - CheckTextBoxPath() = True - Else - CheckTextBoxPath() = False - End If - Else - CheckTextBoxPath() = True - End If - Exit Function -NOVALIDPATH: - sMessageNoDir = ReplaceString(sNoDirCreation, sShowPath, "%1") - Msgbox(sMessageNoDir, 16, sTitle) - CheckTextBoxPath() = False -End Function - - -Sub InitializeProgressPage(oDialog as Object) - oDialog.LabelRetrieval.FontWeight = com.sun.star.awt.FontWeight.NORMAL - oDialog.LabelCurProgress.FontWeight = com.sun.star.awt.FontWeight.BOLD -End Sub - - -Sub SetProgressDisplay(AbsFound as Integer) - ImportDialog.LabelRetrieval.Label = sProgressPage_2 & " " & ReplaceString(sProgressPage_5, Str(AbsFound) & " ", "%1") - ImportDialog.LabelCurDocumentRetrieval.Label = sProgressFound & " " & CStr(AbsDocuFound) & " " & sProgressMoreDocs - ImportDialog.LabelCurTemplateRetrieval.Label = sProgressFound & " " & CStr(AbsTemplateFound) & " " & sProgressMoreTemplates -End Sub - -Sub TakoverFolderName(aEvent as Object) -Dim RefControlName as String -Dim oRefControl - RefControlName = aEvent.Source.Model.Tag - oRefControl = ImportDialogArea.GetControl(RefControlName) - GetFolderName(oRefControl.Model) - ToggleNextButton() -End Sub - - -Sub FinalizeDialogButtons() - ImportDialog.cmdShowLogFile.Enabled = ((Isnull(oLogDocument) = False) And (ImportDialog.chkLogfile.State = 1)) - ImportDialog.cmdCancel.Enabled = False - ImportDialog.cmdGoOn.Label = sCloseButton - ImportDialog.cmdGoOn.Enabled = True -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/importwizard/FilesModul.xba b/wizards/source/importwizard/FilesModul.xba deleted file mode 100644 index e35e0b3a3..000000000 --- a/wizards/source/importwizard/FilesModul.xba +++ /dev/null @@ -1,825 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="FilesModul" script:language="StarBasic">Option Explicit - -Public AbsTemplateFound as Integer -Public AbsDocuFound as Integer -Public oLogDocument as Object -Public oLogTable as Object -Public bLogExists as Boolean -Public sComment as String -Public MaxCollectIndex as Integer -Public bInsertRow as Boolean -Public sLogUrl as String -Public sCurPassWord as String -Public FileCount as Integer -Public XMLTemplateCount as Integer -Public PathCollection(7,3) as String -Public bIsFirstLogTable as Boolean -Public bFilterTracerIsinsideTable as Boolean - - -Function ReadCollectionPaths(FilesList() as String, sFilterName() as String) -Dim FilterIndex as Integer -Dim bRecursive as Boolean -Dim SearchDir as String -Dim i as Integer -Dim n as Integer -Dim a as Integer -Dim s as Integer -Dim t as Integer -Dim sFileContent() as String -Dim NewList(0,1) as String -Dim Index as Integer -Dim CurFileName as String -Dim CurExtension as String -Dim CurFileContent as String -Dim XMLTemplateContentList() as String -Dim bIsTemplatePath as Boolean -Dim MaxIndex as Integer -Dim NewContentList() as String -Dim XMLTemplateContentString as String -Dim ApplIndex as Integer -Dim bAssignFileName as Boolean -Dim bInterruptSearch as Boolean - bInterruptSearch = False - For i = 0 To MaxCollectIndex - SearchDir = PathCollection(i,0) - bRecursive = PathCollection(i,1) - sFileContent() = ArrayoutofString(PathCollection(i,2), "|") - NewList() = ReadDirectories(SearchDir, bRecursive, False, False, sFileContent(), "") - If InterruptProcess Then - ReadCollectionPaths() = False - Exit Function - End If - If Ubound(NewList()) > -1 Then - bIsTemplatePath = FieldInList("vor", sFileContent) - If bIsTemplatePath Then - XMLTemplateContentString = PathCollection(i,3) - XMLTemplateContentList() = ArrayoutofString(XMLTemplateContentString, "|") - If Ubound(XMLTemplateContentList()) > -1 Then - MaxIndex = Ubound(NewList()) - ReDim Preserve NewList(MaxIndex, 1) as String - ReDim Preserve NewContentList(MaxIndex) as String - a = -1 - For n = 0 To MaxIndex - bAssignFileName = True - If InterruptProcess() Then - ReadCollectionPaths() = False - Exit Function - End If - CurFileContent = "" - CurFileName = NewList(n,0) - If (FieldInList(NewList(n,1), XMLTemplateList())) Then - CurFileContent = GetRealFileContent(CurFileName) - t = SearchArrayforPartString(CurFileContent, XMLTemplateContentList()) - bAssignFileName = (t > -1) - If bAssignFileName Then - CurFileContent = XMLTemplateContentList(t) - End If - NewList(n,1) = CurFileContent - End If - CurExtension = NewList(n,1) - If bAssignFileName Then - If a < n Then - a = a + 1 - NewList(a,0) = CurFileName - NewList(a,1) = CurExtension - If CurFileContent = "" Then - CurFileContent = CurExtension - End If - ApplIndex = GetApplicationIndex(CurFileContent, sFiltername()) - NewContentList(a) = ApplIndex - End If - End If - Next n - If a < MaxIndex And a > -1 Then - ReDim Preserve NewList(a, 1) as String - End If - If a > -1 Then - AddListtoFilesList(FilesList(), NewList(), NewContentList()) - End If - End If - Else - MaxIndex = Ubound(NewList()) - ReDim Preserve NewContentList(MaxIndex) as String - For s = 0 To MaxIndex - CurExtension = NewList(s,1) - NewContentList(s) = GetApplicationIndex(CurExtension, sFiltername()) - Next s - AddListtoFilesList(FilesList(), NewList(), NewContentList()) - End If - End If - Next i - ReadCollectionPaths() = Ubound(FilesList()) > -1 -End Function - - -Function GetApplicationIndex(CurFileContent as String, sFilterName() as String) as Integer -Dim Index as Integer -Dim i as Integer - Index = GetIndexForPartStringinMultiArray(sFilterName(), CurFileContent, 0) - If Index >= MaxApplCount Then - Index = Index - MaxApplCount - End If - For i = 0 To MaxApplCount - 1 - If Applications(i, SBAPPLKEY) = Index Then - GetApplicationIndex() = i - Exit Function - End If - Next i - GetApplicationIndex() = - 1 -End Function - - -Function InterruptProcess() as Boolean - If bCancelTask Or RetValue = 0 Then - bConversionIsRunning = False - InterruptProcess() = True - Exit Function - End if - InterruptProcess() = False -End Function - - -Sub AddCollectionPath(ApplIndex as Integer, DocIndex as Integer, RecursiveIndex as Integer, sFiltername() as String, DistIndex as Integer) - MaxCollectIndex = MaxCollectIndex + 1 - PathCollection(MaxCollectIndex, 0) = Applications(ApplIndex, DocIndex) - PathCollection(MaxCollectIndex, 1) = Applications(ApplIndex, RecursiveIndex) - AddFilterNameToPathItem(ApplIndex, MaxCollectIndex, sFiltername(), DistIndex) -End Sub - - -Function SetExtension(LocExtension) as String - if (Instr(LocExtension, "vnd.sun.xml.impress")) > 0 then - SetExtension() = "vor|sti|std" - elseif (Instr(LocExtension, "vnd.sun.xml.writer")) > 0 then - SetExtension() = "vor|stw" - elseif (Instr(LocExtension, "vnd.sun.xml.calc")) > 0 then - SetExtension() = "vor|stc" - elseif (Instr(LocExtension, "vnd.sun.xml.draw")) > 0 then - SetExtension() = "vor|std|sti" - endif -End Function - -Sub AddFilterNameToPathItem(ApplIndex as Integer, CollectIndex as Integer, sFiltername() as String, DistIndex as Integer) -Dim iKey as Integer -Dim CurListString as String -Dim LocExtension as String -Dim LocContentString as String -Dim LocXMLTemplateContent as String - iKey = Applications(ApplIndex, SBAPPLKEY) - CurListString = PathCollection(CollectIndex, 2) - LocExtension = sFilterName(iKey +DistIndex, 0) - If Len(LocExtension) > SBMAXEXTENSIONLENGTH Then ' 7 == Length of two extensions like 'sda|sdd - LocExtension = SetExtension(LocExtension) - LocContentString = sFilterName(iKey +DistIndex, 0) - LocContentString = ReplaceString(LocContentString, "|", ";") - LocXMLTemplateContent = PathCollection(CollectIndex, 3) - If LocXMLTemplateContent = "" Then - LocXMLTemplateContent = LocContentString - Else - LocXMLTemplateContent = LocXMLTemplateContent & "|" & LocContentString - End If - PathCollection(CollectIndex, 3) = LocXMLTemplateContent - End If - If CurListString = "" Then - PathCollection(CollectIndex, 2) = LocExtension - Else - If Instr(CurListString, LocExtension) = 0 Then - PathCollection(CollectIndex, 2) = CurListString & "|" & LocExtension - End If - End If -End Sub - - -Sub CheckIfToAddPathToCollection(ApplIndex as Integer, bDoConvertIndex as Integer, DocIndex as Integer, RecursiveIndex as Integer, sFiltername() as String, DistIndex as Integer) -Dim CollectIndex as Integer -Dim bCheckDocuType as Boolean - bCheckDocuType = Applications(ApplIndex, bDoConvertIndex) - If bCheckDocuType Then - CollectIndex = GetIndexInMultiArray(PathCollection(), Applications(ApplIndex,DocIndex), 0) - If (CollectIndex >-1) Then - If Applications(ApplIndex, RecursiveIndex) <> PathCollection(CollectIndex, 1) Then - AddCollectionPath(ApplIndex, DocIndex, RecursiveIndex, sFilterName(), DistIndex) - Else - AddFilterNameToPathItem(ApplIndex, CollectIndex, sFilterName(), DistIndex) - End If - Else - AddCollectionPath(ApplIndex, DocIndex, RecursiveIndex, sFilterName(), DistIndex) - End If - End If -End Sub - - -Sub CollectPaths(sFiltername() as String) -Dim i as Integer -Dim XMLTemplateContentString as String - MaxCollectIndex = -1 - For i = 0 To ApplCount-1 - CheckIfToAddPathToCollection(i, SBDOCCONVERT, SBDOCSOURCE, SBDOCRECURSIVE, sFilterName(), 0) - Next i - XMLTemplateCount = 0 - XMLTemplateContentString = "" - For i = 0 To ApplCount-1 - If WizardMode = SBXMLMODE Then - XMLTemplateCount = XMLTemplateCount + 1 - End If - CheckIfToAddPathToCollection(i, SBTEMPLCONVERT, SBTEMPLSOURCE, SBTEMPLRECURSIVE, sFilterName(), MaxApplCount) - Next i -End Sub - - -Sub ConvertAllDocuments(sFilterName() as String) -Dim FileProperties(1) as new com.sun.star.beans.PropertyValue -Dim PWFileProperties(2) as New com.sun.star.beans.PropertyValue -Dim WriterWebProperties(0) as new com.sun.star.beans.PropertyValue -Dim OpenProperties(4) as new com.sun.star.beans.PropertyValue -Dim oInteractionHandler as Object -Dim InteractionTypes(0) as Long -Dim FilesList(0,2) as String -Dim sViewPath as String -Dim i as Integer -Dim FilterIndex as Integer -Dim sSourceUrl as String -Dim CurFilename as String -Dim oDocument as Object -Dim sExtension as String -Dim OldExtension as String -Dim CurFound as Integer -Dim TotFound as Integer -Dim TargetStemDir as String -Dim SourceStemDir as String -Dim TargetDir as String -Dim sTargetUrl as String -Dim CurFilterName as String -Dim ApplIndex as Integer -Dim Index as Integer -Dim bIsDocument as Boolean -Dim bDoSave as Boolean -Dim sCurFileExists as String -Dim MaxFileIndex as Integer -Dim bContainsBasicMacro as Boolean -Dim bIsPassWordProtected as Boolean -Dim iOverwrite as Integer -Dim sMimeTypeorExtension as String -Dim sPrevMimeTypeorExtension as String - bConversionisrunning = True - InteractionTypes(0) = com.sun.star.task.PasswordRequestMode.PASSWORD_REENTER - oInteractionHandler = createUnoService("com.sun.star.task.InteractionHandler") - oInteractionHandler.initialize(InteractionTypes()) - iGeneralOverwrite = SBOVERWRITEUNDEFINED - bConversionIsRunning = True - bLogExists = false - AbsTemplateFound = 0 - AbsDocuFound = 0 - CollectPaths(sFiltername()) - If Not ReadCollectionPaths(FilesList(), sFilterName()) Then - TotFound = 0 - SetProgressDisplay(0) - bConversionisrunning = false - FinalizeDialogButtons() - Exit Sub - End If - TotFound = Ubound(FilesList()) + 1 - If FilesList(0,0) = "" Then ' Querying the number of fields in a multidimensionl Array is unsecure - TotFound = 0 ' because it will return the value 0 (and not -1) even when the Array is empty - SetProgressDisplay(0) - End If - BubbleSortList(FilesList(), true) - If TotFound > 0 Then - CreateLogDocument(OpenProperties()) - InitializeProgressPage(ImportDialog) - OpenProperties(0).Name = "Hidden" - OpenProperties(0).Value = True - OpenProperties(1).Name = "AsTemplate" - OpenProperties(1).Value = False - OpenProperties(2).Name = "MacroExecutionMode" - OpenProperties(2).Value = com.sun.star.document.MacroExecMode.NEVER_EXECUTE - OpenProperties(3).Name = "UpdateDocMode" - OpenProperties(3).Value = com.sun.star.document.UpdateDocMode.NO_UPDATE - OpenProperties(4).Name = "InteractionHandler" - OpenProperties(4).Value = oInteractionHandler - MaxFileIndex = Ubound(FilesList(),1) - FileCount = 0 - For i = 0 To MaxFileIndex - sComment = "" - If InterruptProcess() Then - Exit For - End If - bDoSave = True - sSourceUrl = FilesList(i,0) - sPrevMimeTypeorExtension = sMimeTypeorExtension - sMimeTypeorExtension = FilesList(i,1) - CurFiltername = GetFilterName(sMimeTypeorExtension, sFilterName(), sExtension, FilterIndex) - ApplIndex = FilesList(i,2) - If sMimeTypeorExtension <> sPrevMimeTypeorExtension Then - CreateLogTable(ApplIndex, sMimeTypeOrExtension, sFiltername() - End If - If ApplIndex > Ubound(Applications) or (ApplIndex < 0) Then - Msgbox "Applicationindex out of bounds:" & sSourcUrl - End If - sViewPath = ConvertFromUrl(sSourceUrl) ' CutPathView(sSourceUrl, 70) - ImportDialog.LabelCurDocument.Label = Str(i+1) & "/" & MaxFileIndex + 1 & " (" & sViewPath & ")" - Select Case lcase(sExtension) - Case "odt", "ods", "odp", "odg", "odm", "odf" - SourceStemDir = RTrimStr(Applications(ApplIndex,SBDOCSOURCE), "/") - TargetStemDir = RTrimStr(Applications(ApplIndex,SBDOCTARGET), "/") - Case Else ' Templates and Helper-Applications remain - SourceStemDir = RTrimStr(Applications(ApplIndex,SBTEMPLSOURCE), "/") - TargetStemDir = RTrimStr(Applications(ApplIndex,SBTEMPLTARGET), "/") - End Select - sTargetUrl = ReplaceString(sSourceUrl, TargetStemDir, SourceStemDir) - CurFilename = GetFileNameWithoutExtension(sTargetUrl, "/") - OldExtension = GetFileNameExtension(sTargetUrl) - sTargetUrl = RTrimStr(sTargetUrl, OldExtension) - sTargetUrl = sTargetUrl & sExtension - TargetDir = RTrimStr(sTargetUrl, CurFilename & "." & sExtension) - If (oUcb.Exists(sTargetUrl)) Then - If (iGeneralOverwrite <> SBOVERWRITEALWAYS) Then - If (iGeneralOverwrite = SBOVERWRITEUNDEFINED) Then - ShowOverwriteAllDialog(sTargetUrl, sTitle) - bDoSave = (iGeneralOverwrite = SBOVERWRITEQUERY) Or (iGeneralOverwrite = SBOVERWRITEALWAYS) - Elseif iGeneralOverwrite = SBOVERWRITENEVER Then - bDoSave = False - ElseIf ((iGeneralOverWrite = SBOVERWRITEQUERY) OR (iGeneralOverwrite = SBOVERWRITECANCEL)) Then - ' Todo: According to AS there might come a new feature that storeasUrl could possibly rise a UI dialog. - ' In this case my own UI becomes obsolete - sCurFileExists = ReplaceString(sFileExists, ConvertFromUrl(sTargetUrl), "<1>") - sCurFileExists = ReplaceString(sCurFileExists, chr(13), "<CR>") - iOverWrite = Msgbox (sCurFileExists, 32 + 3, sTitle) - Select Case iOverWrite - Case 1 ' OK - ' In the FileProperty-Bean this is already default - bDoSave = True - Case 2 ' Abort - CancelTask(False) - bDoSave = False - Case 7 ' No - bDoSave = False - End Select - End If - End If - End If - If bDoSave Then - If Not oUcb.Exists(TargetDir) Then - bDoSave = CreateFolder(TargetDir) - End If - If bDoSave Then - oDocument = StarDesktop.LoadComponentFromURL(sSourceUrl, "_default", 0, OpenProperties()) - If Not IsNull(oDocument) Then - InsertSourceUrlToLogDocument(sSourceUrl, "") - bIsPassWordProtected = CheckPassWordProtection(oDocument) - CheckIfMacroExists(oDocument.BasicLibraries, sComment) - On Local Error Goto NOSAVING - If bIsPassWordProtected Then - PWFileProperties(0).Name = "FilterName" - PWFileProperties(0).Value = CurFilterName - PWFileProperties(1).Name = "Overwrite" - PWFileProperties(1).Value = True - PWFileProperties(2).Name = "Password" - PWFileProperties(2).Value = sCurPassWord - oDocument.StoreAsUrl(sTargetUrl, PWFileProperties()) - Else - FileProperties(0).Name = "FilterName" - FileProperties(0).Value = CurFilterName - FileProperties(1).Name = "Overwrite" - FileProperties(1).Value = True - oDocument.StoreAsUrl(sTargetUrl,FileProperties()) - End If - ' Todo: Make sure that an errorbox pops up when saving fails - NOSAVING: - If Err <> 0 Then - sCurcouldnotsaveDocument = ReplaceString(scouldnotsaveDocument, ConvertFromUrl(sTargetUrl), "<1>") - sComment = ConcatComment(sComment, sCurCouldnotsaveDocument) - Resume LETSGO - LETSGO: - Else - FileCount = FileCount + 1 - End If - oDocument.Dispose() - InsertTargetUrlToLogDocument(sTargetUrl, sComment, ApplIndex) - Else - sCurcouldnotopenDocument = ReplaceString(scouldnotopenDocument, ConvertFromUrl(sSourceUrl), "<1>") - sComment = ConcatComment(sComment, sCurCouldnotopenDocument) - InsertSourceUrlToLogDocument(sSourceUrl, sComment) - End If - End If - End If - Next i - End If - AddLogStatistics() - FinalizeDialogButtons() - bConversionIsRunning = False - Exit Sub -RTError: - Msgbox sRTErrorDesc, 16, sRTErrorHeader -End Sub - - - -Sub AddListtoFilesList(FirstList(), SecList(), NewContentList() as String) -Dim sLocExtension as String -Dim FirstStart as Integer -Dim FirstEnd as Integer -Dim i as Integer -Dim s as Integer - If FirstList(0,0) = "" Then - FirstStart = Ubound(FirstList(),1) - Else - FirstStart = Ubound(FirstList(),1) + 1 - End If - FirstEnd = FirstStart + Ubound(SecList(),1) - ReDim Preserve FirstList(FirstEnd,2) - s = 0 - For i = FirstStart To FirstEnd - FirstList(i,0) = SecList(s,0) - FirstList(i,1) = SecList(s,1) - sLocExtension = lcase(FirstList(i,1)) - Select Case sLocExtension - Case "sdw", "sdc", "sda", "sdd", "smf", "sgl", "doc", "xls", "ppt", "sxi" , "sxw" , "sxd" , "sxg" , "sxm" , "sxc" , "pps" - AbsDocuFound = AbsDocuFound + 1 - Case else - AbsTemplateFound = AbsTemplateFound + 1 - End Select - FirstList(i,2) = CStr(NewContentList(s)) - s = s + 1 - Next i - SetProgressDisplay(Ubound(FirstList()) + 1) -End Sub - - - -Function GetTargetTemplatePath(Index as Integer) - Select Case WizardMode - Case SBMICROSOFTMODE - GetTargetTemplatePath() = SOTemplatePath & "/" & sTemplateGroupName - Case SBXMLMODE - If Index = 3 Then - ' Helper Application - GetTargetTemplatePath = SOWorkPath - Else - GetTargetTemplatePath = SOTemplatePath - End If - End Select -End Function - - -' Retrieves the second value for a next to 'SearchString' in -' a two-dimensional string-Array -Function GetFilterName(sMimetypeorExtension as String, sFilterName(), sExtension as string, FilterIndex as Integer) as String -Dim i as Integer -Dim MaxIndex as Integer -Dim sLocFilterlist() as String - For i = 0 To Ubound(sFiltername(),1) - If Instr(1,sFilterName(i,0),sMimeTypeOrExtension) <> 0 Then - sLocFilterList() = ArrayoutofString(sFiltername(i,0),"|", MaxIndex) - If MaxIndex = 0 Then - sExtension = sFiltername(i,2) - GetFilterName = sFilterName(i,1) - Else - Dim b as Integer - Dim sLocExtensionList() as String - b = SearchArrayForPartString(sMimetypeOrExtension, sLocFilterList()) - sLocFilterList() = ArrayoutofString(sFiltername(i,1),"|", MaxIndex) - GetFilterName = sLocFilterList(b) - sLocExtensionList() = ArrayoutofString(sFilterName(i,2), "|", MaxIndex) - sExtension = sLocExtensionList(b) - End If - Exit For - End If - Next - FilterIndex = i -End Function - - -Function SearchArrayforPartString(SearchString as String, LocList()) as Integer -Dim i as Integer -Dim a as Integer -Dim StringList() as String - For i = Lbound(LocList(),1) to Ubound(LocList(),1) - StringList() = ArrayoutofString(LocList(i), "|") - For a = 0 To Ubound(StringList()) - If (Instr(1, SearchString, StringList(a)) <> 0) Then - SearchArrayForPartString() = i - Exit Function - End If - Next a - Next i - SearchArrayForPartString() = -1 -End Function - - -Sub CreateLogTable(ApplIndex as Integer, CurFileContent as String, sFilterName() as String) -Dim oLogCursor as Object -Dim oLogRows as Object -Dim FilterIndex as Integer -Dim sDocumentType as String -Dim oTextCursor -Dim oCell - If Not bLogExists Then - Exit Sub - End If - bFilterTracerIsinsideTable = False - FilterIndex = GetIndexForPartStringinMultiArray(sFilterName(), CurFileContent, 0) - sDocumentType = sFiltername(FilterIndex,3) - oLogCursor = oLogDocument.Text.createTextCursor() - oLogCursor.GotoEnd(False) - If Not bIsFirstLogTable Then - oLogDocument.Text.insertControlCharacter(oLogCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False) - Else - bisFirstLogTable = False - End If - oLogCursor.HyperLinkURL = "" - oLogCursor.HyperLinkName = "" - oLogCursor.HyperLinkTarget = "" - oLogCursor.ParaStyleName = "Heading 1" - oLogCursor.setString(sDocumentType) - If WizardMode = SBMICROSOFTMODE Then - If bFilterTracingAvailable Then - If bMSApplFilterTracingAvailable(ApplIndex) Then - Dim CurFilterTracingPath as String - CurFilterTracingPath = FilterTracingLogPath(ApplIndex) - bFilterTracerIsinsideTable = (bTakeOverTargetName(ApplIndex) Or bTakeOverPathName(ApplIndex)) - If Not bFilterTracerIsinsideTable Then - oLogCursor.CollapseToEnd() - oLogDocument.Text.insertControlCharacter(oLogCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False) - InsertCommandButtonatViewCursor(oLogDocument, oLogCursor, CurFilterTracingPath) - End If - End If - End If - End If - oLogCursor.CollapsetoEnd() - oLogDocument.Text.insertControlCharacter(oLogCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False) - oLogTable = oLogDocument.CreateInstance("com.sun.star.text.TextTable") - oLogTable.RepeatHeadline = true - If bFilterTracerIsinsideTable Then - oLogTable.initialize(2,3) - End If - oLogCursor.Text.InsertTextContent(oLogCursor, oLogTable, True) - oTextCursor = oLogTable.GetCellbyPosition(0,0).createTextCursor() - oTextCursor.SetString(sSourceDocuments) - oTextCursor = oLogTable.GetCellbyPosition(1,0).createTextCursor() - oTextCursor.SetString(sTargetDocuments) - If bFilterTracerIsinsideTable Then - oTextCursor = oLogTable.GetCellbyPosition(2,0).createTextCursor() - oTextCursor.SetString("FilterTracer") - End If - bInsertRow = False -End Sub - - -Function GetSize(iWidth, iHeight) As New com.sun.star.awt.Size -Dim aSize As New com.sun.star.awt.Size - aSize.Width = iWidth - aSize.Height = iHeight - GetSize() = aSize -End Function - - -Sub InsertCommandButtonatViewCursor(oLocDocument, oLocCursor, TargetUrl as String, Optional aSize) -Dim oDocument -Dim oController -Dim oCommandButton -Dim oShape -Dim oDrawPage -Dim oCommandControl -Dim oEvent -Dim oCell - oCommandButton = oLocDocument.createInstance("com.sun.star.form.component.CommandButton") - oShape = oLocDocument.CreateInstance ("com.sun.star.drawing.ControlShape") - If IsMissing(aSize) Then - oShape.Size = GetSize(4000, 600) - End If - oCommandButton.Label = FileNameoutofPath(Targeturl) - oCommandButton.TargetFrame = "_default" - oCommandButton.ButtonType = com.sun.star.form.FormButtonType.URL - oCommandbutton.DispatchUrlInternal = True - oCommandButton.TargetURL = ConverttoUrl(TargetUrl) - oShape.Control = oCommandbutton - oLocCursor.Text.InsertTextContent(oLocCursor, oShape, True) -End Sub - - - -Sub CreateLogDocument(HiddenProperties()) -Dim OpenProperties(0) as new com.sun.star.beans.PropertyValue -Dim NoArgs() -Dim i as Integer -Dim bLogIsThere as Boolean - If ImportDialog.chkLogfile.State = 1 Then - i = 2 - OpenProperties(0).Name = "Hidden" - OpenProperties(0).Value = True - oLogDocument = StarDesktop.LoadComponentFromURL("private:factory/swriter", "_default", 4, OpenProperties()) - SOWorkPath = RTrimStr(SOWorkPath,"/") - sLogUrl = SOWorkPath & "/Logfile.odt" - Do - bLogIsThere = oUcb.Exists(sLogUrl) - If bLogIsThere Then - If i = 2 Then - sLogUrl = ReplaceString(sLogUrl, "/Logfile_2.odt", "/Logfile.odt") - Else - sLogUrl = ReplaceString(sLogUrl, "/Logfile_" & cStr(i) & ".odt", "/Logfile_" & cStr(i-1) & ".odt") - End If - i = i + 1 - End If - Loop Until Not bLogIsThere - bLogExists = True - oLogDocument.StoreAsUrl(sLogUrl, NoArgs()) - End If -End Sub - - -Function GetFilterTracingLogPath(sTargetUrl as String, ApplIndex) as String -Dim TargetFileName as String -Dim sTargetFolder as String -Dim CurFilterTracingPath as String -Dim CurFilterTracingname as String -Dim CurFilterFolder as String - CurFilterTracingPath = FilterTracingLogPath(ApplIndex) - If bTakeOverTargetName(ApplIndex) Then - TargetFilename = GetFileNameWithoutextension(sTargetUrl, "/") - CurFilterFolder = DirectoryNameoutofPath(FilterTracingLogPath(ApplIndex), "/") - CurFilterTracingpath = CurFilterFolder & "/" & TargetFilename & ".log" - End If - If bTakeOverPathName(ApplIndex) Then 'Replace the Folder in the FilterTracerpath by the Folder of the targetUrl - sTargetFolder = DirectoryNameoutofPath(sTargetUrl,"/") - CurFilterTracingPath = sTargetFolder & "/" & FileNameoutofPath(CurFilterTracingPath, "/") - End If - GetFilterTracingLogPath() = CurFilterTracingPath -End Function - - -Sub InsertTargetUrlToLogDocument(sTargetUrl as String, sComment as String, ApplIndex as Integer) -Dim oCell -Dim oTextCursor -Dim CurFilterTracingpath as String - If (bLogExists) And (sTargetUrl <> "") Then - If sTargetUrl <> "" Then - oCell = oLogTable.GetCellbyPosition(1,oLogTable.Rows.Count-1) - InsertCommentToLogCell(sComment, oCell) - InsertHyperLinkToLogCell(sTargetUrl, oCell) - If bFilterTracerIsinsideTable Then - oCell = oLogTable.getCellByPosition(2, oLogTable.Rows.Count-1) - oTextCursor = oCell.Text.CreateTextCursor() - CurFilterTracingpath = GetFilterTracingLogPath(sTargetUrl, ApplIndex) - InsertCommandButtonatViewCursor(oLogDocument, oTextCursor, CurFilterTracingPath) - End If - oLogDocument.Store() - End If - End If -End Sub - - -Sub InsertSourceUrlToLogDocument(SourceUrl as String, sComment) ' -Dim oCell as Object - If bLogExists Then - If bInsertRow Then - oLogTable.Rows.InsertByIndex(oLogTable.Rows.Count,1) - Else - bInsertRow = True - End If - oCell = oLogTable.GetCellbyPosition(0,oLogTable.Rows.Count-1) - InsertCommentToLogCell(sComment, oCell) - InsertHyperLinkToLogCell(SourceUrl, oCell) - oLogDocument.Store() - End If -End Sub - - -Sub InsertHyperLinkToLogCell(sUrl as String, oCell as Object) -Dim oLogCursor as Object -Dim LocFileName as String - oLogCursor = oCell.createTextCursor() - oLogCursor.CollapseToStart() - oLogCursor.HyperLinkURL = sUrl - oLogCursor.HyperLinkName = sUrl - oLogCursor.HyperLinkTarget = sUrl - LocFileName = FileNameOutOfPath(sUrl) - oCell.InsertString(oLogCursor, LocFileName,False) -End Sub - - -Sub InsertCommentToLogCell(sComment as string, oCell as Object) -Dim oCommentCursor as Object - If sComment <> "" Then - oCommentCursor = oCell.createTextCursor() - oCell.insertControlCharacter(oCommentCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False) - oCell.insertString(oCommentCursor, sComment, false) - End If -End Sub - - -Sub AddLogStatistics() -Dim oCell as Object -Dim oLogCursor as Object -Dim MaxRowIndex as Integer - If bLogExists Then - MaxRowIndex = oLogTable.Rows.Count - sLogSummary = ReplaceString(sLogSummary, FileCount, "<COUNT>") -' oLogTable.Rows.InsertByIndex(MaxRowIndex, 1) -' oCell = oLogTable.GetCellbyPosition(0, MaxRowIndex) -' oLogCursor = oCell.createTextCursor() -' oCell.InsertString(oLogCursor, sLogSummary,False) -' MergeRange(oLogTable, oCell, 1) - - oLogCursor = oLogDocument.Text.CreateTextCursor - oLogCursor.gotoEnd(False) - oLogCursor.HyperLinkURL = "" - oLogCursor.HyperLinkName = "" - oLogCursor.HyperLinkTarget = "" - oLogCursor.SetString(sLogSummary) - oLogDocument.Store() - oLogDocument.Dispose() - bLogExists = False - End If -End Sub - - - -Function CheckIfMacroExists(oBasicLibraries as Object, sComment as String) as Boolean -Dim ModuleNames() as String -Dim ModuleName as String -Dim MaxLibIndex as Integer -Dim MaxModuleIndex as Integer -Dim bMacroExists as Boolean -Dim n as Integer -Dim m as Integer -Dim LibName as String -Dim sBasicCode as String -Dim oLibrary as Object - bMacroExists = False - bMacroExists = oBasicLibraries.hasElements - If bMacroExists Then - MaxLibIndex = Ubound(oBasicLibraries.ElementNames()) - For n = 0 To MaxLibIndex - LibName = oBasicLibraries.ElementNames(n) - If oBasicLibraries.isLibraryLoaded(LibName) Then - oLibrary = oBasicLibraries.getbyName(LibName) - If oLibrary.hasElements() Then - MaxModuleIndex = Ubound(oLibrary.ElementNames()) - For m = 0 To MaxModuleIndex - ModuleName = oLibrary.ElementNames(m) - sBasicCode = oLibrary.getbyName(ModuleName) - If sBasicCode <> "" Then - ConcatComment(sComment, sReeditMacro) - CheckIfMacroExists() = True - Exit Function - End If - Next m - End If - End If - Next n - End If - CheckIfMacroExists() = False -End Function - - - -Function CheckPassWordProtection(oDocument as Object) -Dim bIsPassWordProtected as Boolean -Dim i as Integer -Dim oArgs() -Dim MaxIndex as Integer -Dim sblabla as String - bIsPassWordProtected = false - oArgs() = oDocument.getArgs() - MaxIndex = Ubound(oArgs()) - For i = 0 To MaxIndex - sblabla = oArgs(i).Name - If oArgs(i).Name = "Password" Then - bIsPassWordProtected = True - sCurPassWord = oArgs(i).Value - Exit For - End If - Next i - CheckPassWordProtection() = bIsPassWordProtected -End Function - - -Sub OpenLogDocument() - - bShowLogFile = True - ImportDialogArea.endexecute() - -End Sub - - -Sub MergeRange(oTable as Object, oCell as Object, MergeCount as Integer) -Dim oTableCursor as Object - oTableCursor = oTable.createCursorByCellName(oCell.CellName) - oTableCursor.goRight(MergeCount, True) - oTableCursor.mergeRange() -End Sub - - -Function ConcatComment(sComment as String, AdditionalComment as String) - If sComment = "" Then - sComment = AdditionalComment - Else - sComment = sComment & chr(13) + AdditionalComment - End If - ConcatComment = sComment -End Function -</script:module> diff --git a/wizards/source/importwizard/ImportDialog.xdl b/wizards/source/importwizard/ImportDialog.xdl deleted file mode 100644 index f28bc1192..000000000 --- a/wizards/source/importwizard/ImportDialog.xdl +++ /dev/null @@ -1,96 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="ImportDialog" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="4" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_DIALOG" dlg:closeable="true" dlg:moveable="true" dlg:title="ImportDialog"> - <dlg:bulletinboard> - <dlg:text dlg:id="lblTemplateExport" dlg:tab-index="0" dlg:left="12" dlg:top="94" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="lblTemplateExport"/> - <dlg:textfield dlg:id="txtTemplateImportPath" dlg:tab-index="1" dlg:left="73" dlg:top="76" dlg:width="170" dlg:height="12" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_LBTEMPLATEPATH"> - <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&location=application" script:language="Script"/> - </dlg:textfield> - <dlg:textfield dlg:id="txtTemplateExportPath" dlg:tab-index="2" dlg:left="73" dlg:top="92" dlg:width="170" dlg:height="12" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_EDTEMPLATEPATH"/> - <dlg:checkbox dlg:id="chkDocumentPath" dlg:tab-index="3" dlg:left="12" dlg:top="121" dlg:width="240" dlg:height="10" dlg:page="2" dlg:tag="Document" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENT" dlg:value="chkDocumentPath" dlg:checked="true"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.ToggleInputPaths?language=Basic&location=application" script:language="Script"/> - </dlg:checkbox> - <dlg:checkbox dlg:id="chkDocumentSearchSubDir" dlg:tab-index="4" dlg:left="12" dlg:top="134" dlg:width="240" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CBDOCUMENTRECURSE" dlg:value="chkDocumentSearchSubDir" dlg:checked="false"/> - <dlg:text dlg:id="lblDocumentImport" dlg:tab-index="5" dlg:left="10" dlg:top="151" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="lblDocumentImport"/> - <dlg:text dlg:id="lblDocumentExport" dlg:tab-index="6" dlg:left="10" dlg:top="167" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="lblDocumentExport"/> - <dlg:textfield dlg:id="txtDocumentImportPath" dlg:tab-index="7" dlg:left="73" dlg:top="149" dlg:width="170" dlg:height="12" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_LBDOCUMENTPATH"> - <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&location=application" script:language="Script"/> - </dlg:textfield> - <dlg:textfield dlg:id="txtDocumentExportPath" dlg:tab-index="8" dlg:left="73" dlg:top="165" dlg:width="170" dlg:height="12" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_EDDOCUMENTPATH"/> - <dlg:text dlg:id="SummaryHeaderLabel" dlg:tab-index="9" dlg:left="6" dlg:top="37" dlg:width="258" dlg:height="8" dlg:page="3" dlg:value="SummaryHeaderLabel"/> - <dlg:textfield dlg:id="SummaryTextbox" dlg:tab-index="10" dlg:left="5" dlg:top="48" dlg:width="259" dlg:height="125" dlg:page="3" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_3_TBSUMMARY" dlg:vscroll="true" dlg:multiline="true" dlg:readonly="true"/> - <dlg:text dlg:id="LabelRetrieval" dlg:tab-index="11" dlg:left="10" dlg:top="67" dlg:width="255" dlg:height="8" dlg:page="4" dlg:value="LabelRetrieval"/> - <dlg:text dlg:id="LabelCurTemplateRetrieval" dlg:tab-index="12" dlg:left="15" dlg:top="79" dlg:width="249" dlg:height="8" dlg:page="4" dlg:value="LabelCurTemplateRetrieval"/> - <dlg:text dlg:id="LabelCurDocumentRetrieval" dlg:tab-index="13" dlg:left="15" dlg:top="91" dlg:width="249" dlg:height="8" dlg:page="4" dlg:value="LabelCurDocumentRetrieval"/> - <dlg:text dlg:id="LabelCurProgress" dlg:tab-index="14" dlg:left="10" dlg:top="106" dlg:width="255" dlg:height="8" dlg:page="4" dlg:value="LabelCurProgress"/> - <dlg:text dlg:id="LabelCurDocument" dlg:tab-index="15" dlg:left="15" dlg:top="118" dlg:width="249" dlg:height="20" dlg:page="4" dlg:value="LabelCurDocument" dlg:multiline="true"/> - <dlg:img dlg:id="ImportPreview" dlg:tab-index="16" dlg:left="5" dlg:top="6" dlg:width="258" dlg:height="26" dlg:scale-image="false"/> - <dlg:button dlg:id="cmdBack" dlg:tab-index="17" dlg:left="155" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CMDPREV" dlg:value="cmdBack"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.PrevStep?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdCancel" dlg:tab-index="18" dlg:left="6" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CMDCANCEL" dlg:value="cmdCancel"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.CancelTask?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdHelp" dlg:tab-index="19" dlg:left="65" dlg:top="190" dlg:width="50" dlg:height="14" dlg:value="cmdHelp" dlg:button-type="help"/> - <dlg:button dlg:id="cmdGoOn" dlg:tab-index="20" dlg:left="214" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CMDNEXT" dlg:value="cmdGoOn"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.NextStep?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:text dlg:id="WelcomeTextLabel" dlg:tab-index="21" dlg:left="6" dlg:top="38" dlg:width="258" dlg:height="20" dlg:page="1" dlg:value="WelcomeTextLabel" dlg:multiline="true"/> - <dlg:text dlg:id="WelcomeTextLabel3" dlg:tab-index="22" dlg:left="6" dlg:top="58" dlg:width="258" dlg:height="12" dlg:page="1" dlg:value="WelcomeTextLabel3"/> - <dlg:button dlg:id="cmdTemplateImport" dlg:tab-index="23" dlg:left="248" dlg:top="75" dlg:width="14" dlg:height="14" dlg:page="2" dlg:tag="txtTemplateImportPath" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT" dlg:value="..."> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.TakoverFolderName?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdTemplateExport" dlg:tab-index="24" dlg:left="248" dlg:top="91" dlg:width="14" dlg:height="14" dlg:page="2" dlg:tag="txtTemplateExportPath" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CMDTEMPLATEPATHSELECT2" dlg:value="..."> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.TakoverFolderName?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdDocumentImport" dlg:tab-index="25" dlg:left="248" dlg:top="148" dlg:width="14" dlg:height="14" dlg:page="2" dlg:tag="txtDocumentImportPath" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT" dlg:value="..."> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.TakoverFolderName?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdDocumentExport" dlg:tab-index="26" dlg:left="248" dlg:top="164" dlg:width="14" dlg:height="14" dlg:page="2" dlg:tag="txtDocumentExportPath" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CMDDOCUMENTPATHSELECT2" dlg:value="..."> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.TakoverFolderName?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:radiogroup> - <dlg:radio dlg:id="optSODocuments" dlg:tab-index="27" dlg:left="6" dlg:top="72" dlg:width="258" dlg:height="9" dlg:page="1" dlg:tag="SO" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_OPTSODOCUMENTS" dlg:value="optSODocuments" dlg:checked="true"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleCheckboxes?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - <dlg:radio dlg:id="optMSDocuments" dlg:tab-index="28" dlg:left="6" dlg:top="113" dlg:width="258" dlg:height="9" dlg:page="1" dlg:tag="MS" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_OPTMSDOCUMENTS" dlg:value="optMSDocuments"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleCheckboxes?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - </dlg:radiogroup> - <dlg:checkbox dlg:id="chkSOApplication1" dlg:tab-index="29" dlg:left="12" dlg:top="85" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKWRITER" dlg:value="chkSOApplication1" dlg:checked="false"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&location=application" script:language="Script"/> - </dlg:checkbox> - <dlg:checkbox dlg:id="chkSOApplication2" dlg:tab-index="30" dlg:left="155" dlg:top="85" dlg:width="109" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKCALC" dlg:value="chkSOApplication2" dlg:checked="false"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&location=application" script:language="Script"/> - </dlg:checkbox> - <dlg:checkbox dlg:id="chkSOApplication3" dlg:tab-index="31" dlg:left="12" dlg:top="98" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKIMPRESS" dlg:value="chkSOApplication3" dlg:checked="false"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&location=application" script:language="Script"/> - </dlg:checkbox> - <dlg:checkbox dlg:id="chkSOApplication4" dlg:tab-index="32" dlg:left="155" dlg:top="98" dlg:width="109" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKMATHGLOBAL" dlg:value="chkSOApplication4" dlg:checked="false"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&location=application" script:language="Script"/> - </dlg:checkbox> - <dlg:checkbox dlg:id="chkMSApplication1" dlg:tab-index="33" dlg:disabled="true" dlg:left="12" dlg:top="126" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CHKWORD" dlg:value="chkMSApplication1" dlg:checked="false"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&location=application" script:language="Script"/> - </dlg:checkbox> - <dlg:checkbox dlg:id="chkMSApplication2" dlg:tab-index="34" dlg:disabled="true" dlg:left="155" dlg:top="126" dlg:width="109" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CHKEXCEL" dlg:value="chkMSApplication2" dlg:checked="false"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&location=application" script:language="Script"/> - </dlg:checkbox> - <dlg:checkbox dlg:id="chkMSApplication3" dlg:tab-index="35" dlg:disabled="true" dlg:left="12" dlg:top="139" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CHKPOWERPOINT" dlg:value="chkMSApplication3" dlg:checked="false"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&location=application" script:language="Script"/> - </dlg:checkbox> - <dlg:text dlg:id="WelcomeTextLabel2" dlg:tab-index="36" dlg:disabled="true" dlg:left="6" dlg:top="152" dlg:width="258" dlg:height="18" dlg:page="1" dlg:value="WelcomeTextLabel2" dlg:multiline="true"/> - <dlg:checkbox dlg:id="chkTemplatePath" dlg:tab-index="37" dlg:left="12" dlg:top="48" dlg:width="240" dlg:height="10" dlg:page="2" dlg:tag="Template" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATE" dlg:value="chkTemplatePath" dlg:checked="true"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.ToggleInputPaths?language=Basic&location=application" script:language="Script"/> - </dlg:checkbox> - <dlg:checkbox dlg:id="chkTemplateSearchSubDir" dlg:tab-index="38" dlg:left="12" dlg:top="61" dlg:width="240" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATERECURSE" dlg:value="chkTemplateSearchSubDir" dlg:checked="false"/> - <dlg:text dlg:id="lblTemplateImport" dlg:tab-index="39" dlg:left="12" dlg:top="78" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="lblTemplateImport"/> - <dlg:checkbox dlg:id="chkLogfile" dlg:tab-index="40" dlg:left="6" dlg:top="171" dlg:width="136" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKLOGFILE" dlg:value="chkLogfile" dlg:checked="true"/> - <dlg:fixedline dlg:id="hlnTemplates" dlg:tab-index="41" dlg:left="6" dlg:top="37" dlg:width="258" dlg:height="8" dlg:page="2" dlg:value="hlnTemplates"/> - <dlg:fixedline dlg:id="hlnDocuments" dlg:tab-index="42" dlg:left="6" dlg:top="110" dlg:width="258" dlg:height="8" dlg:page="2" dlg:value="hlnDocuments"/> - <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="43" dlg:left="6" dlg:top="181" dlg:width="258" dlg:height="6"/> - <dlg:fixedline dlg:id="hlnProgress" dlg:tab-index="44" dlg:left="6" dlg:top="55" dlg:width="258" dlg:height="8" dlg:page="4" dlg:value="hlnProgress"/> - <dlg:button dlg:id="cmdShowLogFile" dlg:tab-index="45" dlg:disabled="true" dlg:left="75" dlg:top="142" dlg:width="120" dlg:height="14" dlg:page="4" dlg:value="cmdShowLogFile"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.FilesModul.OpenLogDocument?language=Basic&location=application" script:language="Script"/> - </dlg:button> - </dlg:bulletinboard> -</dlg:window>
\ No newline at end of file diff --git a/wizards/source/importwizard/Language.xba b/wizards/source/importwizard/Language.xba deleted file mode 100644 index 32efcc242..000000000 --- a/wizards/source/importwizard/Language.xba +++ /dev/null @@ -1,157 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Language" script:language="StarBasic">Option Explicit - -Public sMSTemplateCheckbox(2) As String -Public sMSDocumentCheckbox(2) As String -Public sSODocumentCheckbox(4) As String -Public sSOHelperdocuments(1,1) As String -Public sTemplateCheckbox(SBMAXAPPLCOUNT-1) As String -Public sDocumentCheckbox(SBMAXAPPLCOUNT-1) As String -Public sTemplateGroupName As String -Public sSearchInSubDir as String -Public sPathErrorTemplates(SBMAXAPPLCOUNT-1) As String -Public sPathErrorDocument(SBMAXAPPLCOUNT-1) As String -Public sPathErrorStarDoc(SBMAXAPPLCOUNT-1) As String -Public sStarDocLabel(SBMAXAPPLCOUNT-1) As String -Public sImportLabel As String, sExportLabel As String -Public SOApplicationName(5) As String -Public sHelpButton As String, sCancelButton As String, sBackButton As String, sNextButton As String -Public sSumInclusiveSubDir As String, sSumSaveDocuments As String -Public sSummaryHeader As String -Public sWelcometextLabel1 As String, sWelcometextLabel2 As String, sWelcometextLabel3 As String -Public sBeginButton As String, sMsgDirNotThere As String -Public sQueryForNewCreation As String, sPathError3 As String -Public sNoDirCreation As String -Public sProgressMoreDocs As String, sProgressMoreTemplates as String -Public sFileExists As String, sMorePathsError3 As String -Public sConvertError1 As String, sConvertError2 As String, sPathDialogMessage As String -Public sRTErrorDesc As String, sRTErrorHeader As String -Public sProgressPage_1 As String, sProgressPage_2 As String, sProgressPage_3 as String -Public sProgressFound as String, sProgresspage_5 as String -Public sContainerName(1) as String -Public sReady as String, sTitle as String -Public sCloseButton as String -Public sSourceDocuments as String -Public sTargetDocuments as String -Public sSumSODocuments(4) as String -Public sSumSOTemplates(4) as String -Public sSumMSDocuments(3) as String -Public sSumMSTemplates(3) as String -Public ModuleList(3) as String -Public sLogSummary as String -Public sReeditMacro as String -Public sOverwriteallFiles as String -Public scouldnotopenDocument as String -Public sCurcouldnotopenDocument as String -Public scouldnotsaveDocument as String -Public sCurcouldnotsaveDocument as String - - -Sub LoadLanguage() - If InitResources("ImportWizard","imp") then - sHelpButton = GetResText(1000) - sCancelButton = GetResText(1001) - sBackButton = GetResText(1002) - sNextButton = GetResText(1003) - sBeginButton = GetResText(1004) - sCloseButton = GetResText(1005) - - sWelcometextLabel1 = ReplaceString(GetResText(1006), GetProductName(),"%PRODUCTNAME") - sWelcometextLabel2 = GetResText(1007) - sWelcometextLabel3 = GetResText(1008) - - ' Microsoft Documents - GetApplResourceArray(1009, 3, sMSTemplateCheckBox()) - - ' DocumentCheckbox- Captions - GetApplResourceArray(1012, 3, sMSDocumentCheckBox()) - - ' DocumentCheckbox- Captions - GetApplResourceArray(2013, 5, sSODocumentCheckBox()) - - 'StarOffice Applicationnames - - sSOHelperDocuments(0,0) = GetResText(2017) - sSOHelperDocuments(0,1) = "com.sun.star.text.GlobalDocument" - sSOHelperDocuments(1,0) = GetResText(2018) - sSOHelperDocuments(1,1) = "com.sun.star.formula.FormulaProperties" - - GetApplResourceArray(2017,2, sSOHelperDocuments()) - - sContainerName(0) = GetResText(1030) - ' Note: for the version 5.2 there was no Productname "StarSuite" - sContainerName(1) = "StarOffice" - - sSummaryHeader = GetResText(1031) - - sTemplateGroupName = GetResText(1036) - - sProgressMoreDocs = GetResText(1041) - sProgressMoreTemplates = GetResText(1042) - sNoDirCreation = GetResText(1050) - sMsgDirNotThere = GetResText(1051) - sQueryForNewCreation = GetResText(1052) - sFileExists = GetResText(1053) - sMorePathsError3 = GetResText(1054) - sConvertError1 = GetResText(1055) - sConvertError2 = GetResText(1056) - sRTErrorDesc = GetResText(1057) - sRTErrorHeader = GetResText(1058) - sOverwriteallFiles = GetResText(1070) - sReeditMacro = GetResText(1071) - scouldnotsaveDocument = GetResText(1072) - scouldnotopenDocument = GetResText(1073) - sPathDialogMessage = GetResText(1080) - sTitle = GetResText(1081) - - sProgressPage_1 = GetResText(1090) - sProgressPage_2 = GetResText(1091) - sProgressPage_3 = GetResText(1092) - sProgressFound = GetResText(1093) - sProgressPage_5 = GetResText(1094) - sReady = GetResText(1100) - sSourceDocuments = GetResText(2030) - sTargetDocuments = GetResText(2031) - sLogSummary = GetResText(2034) - sSumInclusiveSubDir = GetResText(3000) - sSumSaveDocuments = GetResText(3001) - 'StarOffice Applicationnames - GetApplResourceArray(3100, 4, sSumSODocuments()) - GetApplResourceArray(3110, 4, sSumSOTemplates()) - GetApplResourceArray(3200, 3, sSumMSDocuments()) - GetApplResourceArray(3210, 3, sSumMSTemplates()) - With ImportDialog - sImportLabel = GetResText(1033) - sExportLabel = GetResText(1034) - sSearchInSubDir = GetResText(1022) - .chkTemplateSearchSubDir.Label = sSearchInSubDir - .lblDocumentImport.Label = sImportLabel - .lblDocumentExport.Label = sExportLabel - .chkDocumentSearchSubDir.Label = sSearchInSubDir - .lblTemplateImport.Label = sImportLabel - .lblTemplateExport.Label = sExportLabel - .chkLogfile.Label = GetResText(2032) - .chkLogfile.Helptext = GetResText(2033) - Dim Blabla as String - blabla = GetResText(1072) - .cmdShowLogFile.Label = GetResText(2035) - End With - ModuleList(0) = "com.sun.star.text.TextDocument" - ModuleList(1) = "com.sun.star.sheet.SpreadsheetDocument" - ModuleList(2) = "com.sun.star.drawing.DrawingDocument/com.sun.star.presentation.PresentationDocument" - ModuleList(3) = "com.sun.star.formula.FormulaProperties/com.sun.star.text.GlobalDocument" - End If -End Sub - - -Sub GetApplResourceArray(StartResIndex as Integer, Count as Integer, BigArray()) -Dim i as Integer -Dim a as Integer - a = 0 - For i = StartResIndex To StartResIndex + Count-1 - BigArray(a) = GetResText(i) - a = a + 1 - Next -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/importwizard/Main.xba b/wizards/source/importwizard/Main.xba deleted file mode 100644 index 3415d0ee8..000000000 --- a/wizards/source/importwizard/Main.xba +++ /dev/null @@ -1,290 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Main" script:language="StarBasic">Option Explicit - -' ***** BASIC ***** -Public HeaderPreviews(4) as Object -Public ImportDialog as Object -Public ImportDialogArea as Object -Public oFactoryKey as Object -Public bShowLogFile as Boolean - -' If the ProgressPage ist already on Top The Dialog will be immediately closed when this flag is -' set to False -Public bConversionIsRunning as Boolean -Public RetValue as Integer - -Sub Main() - Dim NoArgs() as New com.sun.star.beans.PropertyValue - bShowLogFile=FALSE - If Not bDebugWizard Then - On Local Error Goto RTError - End If - BasicLibraries.LoadLibrary("Tools") - RetValue = 10 - bIsFirstLogTable = True - bConversionIsRunning = False - sCRLF = CHR(13) & CHR(10) - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - oFactoryKey = GetRegistryKeyContent("org.openoffice.Setup/Office/Factories") - If GetImportWizardPaths() = False Then - Exit Sub - End If - bCancelTask = False - bDoKeepApplValues = False - CurOffice = 0 - ImportDialogArea = LoadDialog("ImportWizard","ImportDialog") - ImportDialog = ImportDialogArea.Model - LoadLanguage() - WizardMode = SBXMLMODE - MaxApplCount = 4 - FillStep_Welcome() - RepaintHeaderPreview() - ImportDialog.ImportPreview.BackGroundColor = RGB(0,60,126) - ImportDialog.cmdGoOn.DefaultButton = True - ImportDialogArea.GetControl("optSODocuments").SetFocus() - ToggleCheckboxesWithBoolean(False) - RetValue = ImportDialogArea.Execute() - If bShowLogFile=TRUE Then - OpenDocument(sLogUrl, NoArgs()) - End if - If RetValue = 0 Then - CancelTask() - End If - ImportDialogArea.Dispose() - End - Exit Sub -RTError: - Msgbox sRTErrorDesc, 16, sRTErrorHeader -End Sub - - - -Sub NextStep() -Dim iCurStep as Integer - If Not bDebugWizard Then - On Error Goto RTError - End If - bConversionIsRunning = False - iCurStep = ImportDialog.Step - Select Case iCurStep - Case 1 - FillStep_InputPaths(0, True) - Case 2 - If CheckInputPaths Then - SaveStep_InputPath - If CurOffice < ApplCount - 1 Then - CurOffice = CurOffice + 1 - TakeOverPathSettings() - FillStep_InputPaths(CurOffice, False) - Else - FillStep_Summary() - End If - End If - Case 3 - FillStep_Progress() - Select Case WizardMode - Case SBMICROSOFTMODE - Call ConvertAllDocuments(MSFilterName()) - CASE SBXMLMODE - Call ConvertAllDocuments(XMLFilterName()) - End Select - Case 4 - CancelTask(True) - End Select - - If ((ImportDialog.chkLogfile.State <> 1) OR (iCurStep <> 3)) Then - ImportDialog.cmdGoOn.DefaultButton = True - End If - - RepaintHeaderPreview() - Exit Sub -RTError: - Msgbox sRTErrorDesc, 16, sRTErrorHeader -End Sub - - - -Sub PrevStep() -Dim iCurStep as Integer - If Not bDebugWizard Then - On Error Goto RTError - End If - bConversionIsRunning = False - iCurStep = ImportDialog.Step - Select Case iCurStep - Case 4 - ImportDialog.cmdCancel.Label = sCancelButton - FillStep_Summary() - Case 3 - FillStep_InputPaths(Applcount-1, False) - Case 2 - SaveStep_InputPath - If CurOffice > 0 Then - CurOffice = CurOffice - 1 - FillStep_InputPaths(CurOffice, False) - Else - FillStep_Welcome() - bDoKeepApplValues = True - End If - End Select - ImportDialog.cmdGoOn.DefaultButton = True - RepaintHeaderPreview() - Exit Sub -RTError: - Msgbox sRTErrorDesc, 16, sRTErrorHeader -End Sub - - - -Sub CancelTask() - If bConversionIsRunning Then - If Msgbox(sConvertError1, 36, sConvertError2) = 6 Then - bCancelTask = True - bInterruptSearch = True - Else - bCancelTask = False - ImportDialog.cmdCancel.Enabled = True - End If - Else - ImportDialogArea.EndExecute() - End If -End Sub - - -Sub TemplateDirSearchDialog() - CallDirSearchDialog(ImportDialog.TemplateImportPath) -End Sub - - -Sub RepaintHeaderPreview() -Dim Bitmap As Object -Dim CurStep as Integer -Dim sBitmapPath as String -Dim LocPrefix as String - CurStep = ImportDialog.Step - LocPrefix = WizardMode - LocPrefix = ReplaceString(LocPrefix,"XML", "SO") - If CurStep = 2 Then - sBitmapPath = SOBitmapPath & LocPrefix & "-Import_" & CurStep & "-" & Applications(CurOffice,SBAPPLKEY) + 1 & ".bmp" - Else - sBitmapPath = SOBitmapPath & "Import_" & CurStep & ".bmp" - End If - ImportDialog.ImportPreview.ImageURL = sBitmapPath -End Sub - - -Sub CheckModuleInstallation() -Dim i as Integer - For i = 1 To MaxApplCount - ImportDialogArea.GetControl("chk" & WizardMode & "Application" & i).Model.Enabled = Abs(CheckInstalledModule(i-1)) - Next i -End Sub - - -Function CheckInstalledModule(Index as Integer) as Boolean -Dim ModuleName as String -Dim NameList() as String -Dim MaxIndex as Integer -Dim i as Integer - ModuleName = ModuleList(Index) - If Instr(1,ModuleName,"/") <> 0 Then - CheckInstalledModule() = False - NameList() = ArrayoutOfString(ModuleName,"/", MaxIndex) - For i = 0 To MaxIndex - If oFactoryKey.HasByName(NameList(i)) Then - CheckInstalledModule() = True - End If - Next i - Else - CheckInstalledModule() = oFactoryKey.HasByName(ModuleName) - End If -End Function - - -Sub ToggleCheckboxes(oEvent as Object) -Dim bMSEnable as Boolean - WizardMode = oEvent.Source.Model.Tag - bMSEnable = WizardMode = "MS" - ToggleCheckBoxesWithBoolean(bMSEnable) -End Sub - - -Sub ToggleCheckboxesWithBoolean(bMSEnable as Boolean) - If bMSEnable = True Then - WizardMode = SBMICROSOFTMODE - MaxApplCount = 3 - Else - WizardMode = SBXMLMODE - MaxApplCount = 4 - End If - With ImportDialogArea - .GetControl("chkSOApplication1").Model.Enabled = Not bMSEnable - .GetControl("chkSOApplication2").Model.Enabled = Not bMSEnable - .GetControl("chkSOApplication3").Model.Enabled = Not bMSEnable - .GetControl("chkSOApplication4").Model.Enabled = Not bMSEnable - .GetControl("chkMSApplication1").Model.Enabled = bMSEnable - .GetControl("chkMSApplication2").Model.Enabled = bMSEnable - .GetControl("chkMSApplication3").Model.Enabled = bMSEnable - End With - CheckModuleInstallation() - ImportDialog.WelcomeTextLabel2.Enabled = bMSEnable - bDoKeepApplValues = False - ToggleNextButton() -End Sub - - -Sub ToggleNextButton() -Dim iCurStep as Integer -Dim bDoEnable as Boolean -Dim i as Integer - iCurStep = ImportDialog.Step - Select Case iCurStep - Case 1 - With ImportDialog - If .optMSDocuments.State = 1 Then - bDoEnable = .chkMSApplication1.State = 1 Or .chkMSApplication2.State = 1 Or .chkMSApplication3.State = 1 - Else - bDoEnable = .chkSOApplication1.State = 1 Or .chkSOApplication2.State = 1 Or .chkSOApplication3.State = 1 Or .chkSOApplication4.State = 1 - End If - End With - bDoKeepApplValues = False - Case 2 - bDoEnable = CheckControlPath(ImportDialog.chkTemplatePath, ImportDialog.txtTemplateImportPath, True) - bDoEnable = CheckControlPath(ImportDialog.chkDocumentPath, ImportDialog.txtDocumentImportPath, bDoEnable) - End Select - ImportDialog.cmdGoOn.Enabled = bDoEnable -End Sub - - -Sub TakeOverPathSettings() -'Takes over the Pathsettings from the first selected application to the next applications - If Applications(CurOffice,SBDOCSOURCE) = "" Then - Applications(CurOffice,SBDOCSOURCE) = Applications(0,SBDOCSOURCE) - Applications(CurOffice,SBDOCTARGET) = Applications(0,SBDOCTARGET) - If WizardMode = SBXMLMODE AND Applications(CurOffice,SBAPPLKEY) = 3 Then - Applications(CurOffice,SBTEMPLSOURCE) = Applications(CurOffice,SBDOCSOURCE) - Applications(CurOffice,SBTEMPLTARGET) = Applications(CurOffice,SBDOCTARGET) - Else - Applications(CurOffice,SBTEMPLSOURCE) = Applications(0,SBTEMPLSOURCE) - Applications(CurOffice,SBTEMPLTARGET) = Applications(0,SBTEMPLTARGET) - End If - End If -End Sub - - -Function GetImportWizardPaths() as Boolean - SOBitmapPath = GetOfficeSubPath("Template", "../wizard/bitmap") - If SOBitmapPath <> "" Then - SOWorkPath = GetPathSettings("Work", False) - If SOWorkPath <> "" Then - SOTemplatePath = GetPathSettings("Template_writable",False,0) - If SOTemplatePath <> "" Then - GetImportWizardPaths() = True - Exit Function - End If - End If - End If - GetImportWizardPaths() = False -End Function -</script:module>
\ No newline at end of file diff --git a/wizards/source/importwizard/delzip b/wizards/source/importwizard/delzip deleted file mode 100644 index e69de29bb..000000000 --- a/wizards/source/importwizard/delzip +++ /dev/null diff --git a/wizards/source/importwizard/dialog.xlb b/wizards/source/importwizard/dialog.xlb deleted file mode 100644 index f5cc021d5..000000000 --- a/wizards/source/importwizard/dialog.xlb +++ /dev/null @@ -1,5 +0,0 @@ -<?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="ImportWizard" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="ImportDialog"/> -</library:library> diff --git a/wizards/source/importwizard/importwi.src b/wizards/source/importwizard/importwi.src deleted file mode 100644 index d8cc20488..000000000 --- a/wizards/source/importwizard/importwi.src +++ /dev/null @@ -1,674 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/#define sHelpButton 1000 -#define sCancelButton 1001 -#define sBackButton 1002 -#define sNextButton 1003 -#define sBeginButton 1004 -#define sCloseButton 1005 -#define sWelcometextLabel1 1006 -#define sWelcometextLabel2 1007 -#define sWelcometextLabel3 1008 -#define sMSTemplateCheckbox_1_ 1009 -#define sMSTemplateCheckbox_2_ 1010 -#define sMSTemplateCheckbox_3_ 1011 -#define sMSDocumentCheckbox_1_ 1012 -#define sMSDocumentCheckbox_2_ 1013 -#define sMSDocumentCheckbox_3_ 1014 -#define sSearchInSubDir 1022 -#define sMSContainerName 1030 -#define sSummaryHeader 1031 -#define sSummaryFrame 1032 -#define sTextImportLabel 1033 -#define sTextExportLabel 1034 -#define sGroupnameDefault 1036 -#define sProgressDesc1 1039 -#define sProgressOneDoc 1040 -#define sProgressMoreDocs 1041 -#define sProgressMoreTemplates 1042 -#define sNoDirCreation 1050 -#define sMsgDirNotThere 1051 -#define sQueryfornewCreation 1052 -#define sFileExists 1053 -#define sMorePathsError3 1054 -#define sConvertError1 1055 -#define sConvertError2 1056 -#define sRTErrorDesc 1057 -#define sRTErrorHeader 1058 -#define sPathErrorTemplates_1_ 1059 -#define sPathErrorTemplates_2_ 1060 -#define sPathErrorTemplates_3_ 1061 -#define sPathErrorDocument_1_ 1062 -#define sPathErrorDocument_2_ 1063 -#define sPathErrorDocument_3_ 1064 -#define sPathErrorStarDoc_1_ 1065 -#define sPathErrorStarDoc_2_ 1066 -#define sPathErrorStarDoc_3_ 1067 -#define sOverwriteallFiles 1070 -#define sreeditMacro 1071 -#define scouldNotsaveDocument 1072 -#define scouldNotopenDocument 1073 -#define sPathDialogMessage 1080 -#define sDialogTitle 1081 -#define sProgressPage1 1090 -#define sProgressPage2 1091 -#define sProgressPage3 1092 -#define sProgressFound 1093 -#define sProgressPage5 1094 -#define sReady 1100 -#define sXMLTemplateCheckbox_1_ 2009 -#define sXMLTemplateCheckbox_2_ 2010 -#define sXMLTemplateCheckbox_3_ 2011 -#define sXMLTemplateCheckbox_4_ 2012 -#define sXMLDocumentCheckbox_1_ 2013 -#define sXMLDocumentCheckbox_2_ 2014 -#define sXMLDocumentCheckbox_3_ 2015 -#define sXMLDocumentCheckbox_4_ 2016 -#define sXMLHelperApplications_1 2017 -#define sXMLHelperApplications_2 2018 - -#define sSourceDocuments 2030 -#define sTargetDocuments 2031 -#define sCreateLogfile 2032 -#define sLogfileHelpText 2033 -#define sLogfileSummary 2034 -#define sshowLogfile 2035 - -#define sSumInclusiveSubDir 3000 -#define sSumSaveDokumente 3001 - -#define sSumSOTextDocuments 3100 -#define sSumSOTableDocuments 3101 -#define sSumSODrawDocuments 3102 -#define sSumSOMathDocuments 3103 - -#define sSumSOTextTemplates 3110 -#define sSumSOTableTemplates 3111 -#define sSumSODrawTemplates 3112 -#define sSumSOGlobalDocuments 3113 - -#define sSumMSTextDocuments 3200 -#define sSumMSTableDocuments 3201 -#define sSumMSDrawDocuments 3202 - -#define sSumMSTextTemplates 3210 -#define sSumMSTableTemplates 3211 -#define sSumMSDrawTemplates 3212 - - -// -------------------------------------------------------------------- -String sHelpButton -{ - Text [ en-US ] = "~Help"; -}; - -String sCancelButton -{ - Text [ en-US ] = "~Cancel"; -}; - -String sBackButton -{ - Text [ en-US ] = "<< ~Back"; -}; - -String sNextButton -{ - Text [ en-US ] = "Ne~xt >>"; -}; - -String sBeginButton -{ - Text [ en-US ] = "~Convert"; -}; - -String sCloseButton -{ - Text [ en-US ] = "~Close"; -}; - -String sWelcometextLabel1 -{ - Text [ en-US ] = "This wizard converts documents in %PRODUCTNAME format and Microsoft Office documents to the new OpenDocument format."; -}; - -String sWelcometextLabel2 -{ - Text [ en-US ] = "Please note that when converting Microsoft documents any attached VBA macros lose their functionality."; -}; - -String sWelcometextLabel3 -{ - Text [ en-US ] = "Select the document type for conversion:"; -}; - - - -String sMSTemplateCheckbox_1_ -{ - Text [ en-US ] = "Word templates"; -}; - -String sMSTemplateCheckbox_2_ -{ - Text [ en-US ] = "Excel templates"; -}; - -String sMSTemplateCheckbox_3_ -{ - Text [ en-US ] = "PowerPoint templates"; -}; - -String sMSDocumentCheckbox_1_ -{ - Text [ en-US ] = "Word documents"; -}; - -String sMSDocumentCheckbox_2_ -{ - Text [ en-US ] = "Excel documents"; -}; - -String sMSDocumentCheckbox_3_ -{ - Text [ en-US ] = "PowerPoint documents"; -}; - - -String sSearchInSubDir -{ - Text [ en-US ] = "Including subdirectories"; -}; - - - -String sMSContainerName -{ - Text [ en-US ] = "Microsoft Office"; -}; - - - -String sSummaryHeader -{ - Text [ en-US ] = "Summary:"; -}; - -String sTextImportLabel -{ - Text [ en-US ] = "Import from:"; -}; - - -String sTextExportLabel -{ - Text [ en-US ] = "Save to:"; -}; - - -String sGroupnameDefault -{ - Text [ en-US ] = "Imported_Templates"; -}; - - -String sProgressDesc1 -{ - Text [ en-US ] = "Progress: "; -}; - -String sProgressOneDoc -{ - Text [ en-US ] = "Document"; -}; - -String sProgressMoreDocs -{ - Text [ en-US ] = "Documents"; -}; - - -String sProgressMoreTemplates -{ - Text [ en-US ] = "Templates"; -}; - - -String sNoDirCreation -{ - Text [ en-US ] = "The '%1' directory cannot be created: "; -}; - - -String sMsgDirNotThere -{ - Text [ en-US ] = "The '%1' directory does not exist."; -}; - - -String sQueryfornewCreation -{ - Text [ en-US ] = "Do you want to create it now?"; -}; - - -String sFileExists -{ - Text [ en-US ] = "The '<1>' file already exists.<CR>Do you want to overwrite it?"; -}; - -String sMorePathsError3 -{ - Text [ en-US ] = "Directories do not exist"; -}; - - -String sOverwriteallFiles -{ - Text [ en-US ] = "Do you want to overwrite documents without being asked?"; -}; - - -String sreeditMacro -{ - Text [ en-US ] = "Document macro has to be revised."; -}; - -String scouldNotsaveDocument -{ - Text [ en-US ] = "Document '<1>' could not be saved."; -}; - - -String scouldNotopenDocument -{ - Text [ en-US ] = "Document '<1>' could not be opened."; -}; - - - -String sConvertError1 -{ - Text [ en-US ] = "Do you really want to terminate conversion at this point?"; -}; - -String sConvertError2 -{ - Text [ en-US ] = "Cancel Wizard"; -}; - -String sRTErrorDesc -{ - Text [ en-US ] = "An unexpected error has occurred in the wizard."; -}; - -String sRTErrorHeader -{ - Text [ en-US ] = "Error"; -}; - - -String sPathDialogMessage -{ - Text [ en-US ] = "Select a directory"; -}; - -String sDialogTitle -{ - Text [ en-US ] = "Document Converter"; -}; - -String sProgressPage1 -{ - Text [ en-US ] = "Progress"; -}; - -String sProgressPage2 -{ - Text [ en-US ] = "Retrieving the relevant documents:"; -}; - -String sProgressPage3 -{ - Text [ en-US ] = "Converting the documents"; -}; - - -String sProgressFound -{ - Text [ en-US ] = "Found:"; -}; - - -String sProgressPage5 -{ - Text [ en-US ] = "%1 found"; -}; - -String sReady -{ - Text [ en-US ] = "Finished"; -}; - - -String sXMLTemplateCheckbox_1_ -{ - Text [ en-US ] = "Text templates"; -}; - -String sXMLTemplateCheckbox_2_ -{ - Text [ en-US ] = "Spreadsheet templates"; -}; - -String sXMLTemplateCheckbox_3_ -{ - Text [ en-US ] = "Drawing/presentation templates"; -}; - -String sXMLTemplateCheckbox_4_ -{ - Text [ en-US ] = "Master documents"; -}; - - -String sXMLDocumentCheckbox_1_ -{ - Text [ en-US ] = "Text documents"; -}; - -String sXMLDocumentCheckbox_2_ -{ - Text [ en-US ] = "Spreadsheets"; -}; - -String sXMLDocumentCheckbox_3_ -{ - Text [ en-US ] = "Drawing/presentation documents"; -}; - - -String sXMLDocumentCheckbox_4_ -{ - Text [ en-US ] = "Master documents/formulas"; -}; - -String sXMLHelperApplications_1 -{ - Text [ en-US ] = "Master documents"; -}; - -String sXMLHelperApplications_2 -{ - Text [ en-US ] = "Formulas"; -}; - - -String sSourceDocuments -{ - Text [ en-US ] = "Source documents"; -}; - - -String sTargetDocuments -{ - Text [ en-US ] = "Target documents"; -}; - -String sCreateLogfile -{ - Text [ en-US ] = "Create log file"; -}; - - -String sLogfileSummary -{ - Text [ en-US ] = "<COUNT> documents converted"; -}; - - - -String sLogfileHelpText -{ - Text [ en-US ] = "A log file will be created in your work directory"; -}; - - -String sshowLogfile -{ - Text [ en-US ] = "Show log file"; -}; - - -String sSumInclusiveSubDir -{ - Text [ en-US ] = "All subdirectories will be taken into account"; -}; - -String sSumSaveDokumente -{ - Text [ en-US ] = "These will be exported to the following directory:"; -}; - - -String sSumSOTextDocuments -{ - Text [ en-US ] = "All %PRODUCTNAME text documents contained in the following directory will be imported:"; -}; - - -String sSumSOTableDocuments -{ - Text [ en-US ] = "All %PRODUCTNAME spreadsheets contained in the following directory will be imported:"; -}; - - -String sSumSODrawDocuments -{ - Text [ en-US ] = "All %PRODUCTNAME drawing and presentation documents contained in the following directory will be imported:"; -}; - - -String sSumSOMathDocuments -{ - Text [ en-US ] = "All %PRODUCTNAME formula documents contained in the following directory will be imported:"; -}; - - -String sSumSOTextTemplates -{ - Text [ en-US ] = "All %PRODUCTNAME text templates contained in the following directory will be imported:"; -}; - - -String sSumSOTableTemplates -{ - Text [ en-US ] = "All %PRODUCTNAME table templates contained in the following directory will be imported:"; -}; - - -String sSumSODrawTemplates -{ - Text [ en-US ] = "All %PRODUCTNAME drawing and presentation templates contained in the following directory will be imported:"; -}; - -String sSumSOGlobalDocuments -{ - Text [ en-US ] = "All %PRODUCTNAME master documents contained in the following directory will be imported:"; -}; - - -String sSumMSTextDocuments -{ - Text [ en-US ] = "All Word documents contained in the following directory will be imported:"; -}; - - -String sSumMSTableDocuments -{ - Text [ en-US ] = "All Excel documents contained in the following directory will be imported:"; -}; - - -String sSumMSDrawDocuments -{ - Text [ en-US ] = "All PowerPoint documents contained in the following directory will be imported:"; -}; - - -String sSumMSTextTemplates -{ - Text [ en-US ] = "All Word templates contained in the following directory will be imported:"; -}; - - -String sSumMSTableTemplates -{ - Text [ en-US ] = "All Excel templates contained in the following directory will be imported:"; -}; - - -String sSumMSDrawTemplates -{ - Text [ en-US ] = "All PowerPoint templates contained in the following directory will be imported:"; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wizards/source/importwizard/script.xlb b/wizards/source/importwizard/script.xlb deleted file mode 100644 index 2d10f65cb..000000000 --- a/wizards/source/importwizard/script.xlb +++ /dev/null @@ -1,9 +0,0 @@ -<?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="ImportWizard" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="Main"/> - <library:element library:name="DialogModul"/> - <library:element library:name="Language"/> - <library:element library:name="FilesModul"/> - <library:element library:name="API"/> -</library:library> diff --git a/wizards/source/launcher/DicOOo.xba b/wizards/source/launcher/DicOOo.xba deleted file mode 100644 index 474494e71..000000000 --- a/wizards/source/launcher/DicOOo.xba +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="DicOOo" script:language="StarBasic">Option Explicit - -Sub StartDicOOo - -Dim ThePath as string -Dim DefPath as string -Dim aService as object -Dim MyDicOOo as string -dim TheDoc as object -dim args(1) as new com.sun.star.beans.PropertyValue - -on error resume next - -' Find path -aService = CreateUnoService("com.sun.star.util.PathSubstitution") -ThePath =ConvertToURL(aService.substituteVariables("$(user)", true)) -ThePath=ThePath & "/wordbook" -DefPath =ConvertToURL(aService.substituteVariables("$(prog)", true)) -DefPath=DefPath & "/../share/dict/ooo" - -MyDicOOo="" - -if fileExists(ThePath & "/DicOOo.lst") then - 'read DicOOo.lst file in user directory - Open ThePath & "/DicOOo.lst" for input as #1 - line input #1, MyDicOOo - close #1 -else - if fileExists(DefPath & "/DicOOo.lst") then - 'read DicOOo.lst file in share directory - Open DefPath & "/DicOOo.lst" for input as #1 - line input #1, MyDicOOo - close #1 - else - 'creates default file in user directory - Open ThePath & "/DicOOo.lst" for output as #1 - print #1,convertFromURL(DefPath & "/DicOOo.sxw") - close #1 - endif -endif - -'security -if Not fileExists(MyDicOOo) then - MyDicOOo= DefPath & "/DicOOo.sxw" -endif - -MyDicOOo=ConvertToURL(MyDicOOo) - -'Opens DicOOo main file -args(0).name="InteractionHandler" -args(0).value="" -args(1).name="MacroExecutionMode" -args(1).value=com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN '4 -TheDoc=StarDesktop.loadComponentFromURL(MyDicOOo,"_blank",0,args()) - -End Sub -</script:module> diff --git a/wizards/source/launcher/delzip b/wizards/source/launcher/delzip deleted file mode 100644 index e69de29bb..000000000 --- a/wizards/source/launcher/delzip +++ /dev/null diff --git a/wizards/source/launcher/dialog.xlb b/wizards/source/launcher/dialog.xlb deleted file mode 100644 index a4c6d756c..000000000 --- a/wizards/source/launcher/dialog.xlb +++ /dev/null @@ -1,3 +0,0 @@ -<?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="Launcher" library:readonly="true" library:passwordprotected="false"/> diff --git a/wizards/source/launcher/script.xlb b/wizards/source/launcher/script.xlb deleted file mode 100644 index 55310d9fb..000000000 --- a/wizards/source/launcher/script.xlb +++ /dev/null @@ -1,5 +0,0 @@ -<?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="Launcher" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="DicOOo"/> -</library:library> diff --git a/wizards/source/schedule/BankHoliday.xba b/wizards/source/schedule/BankHoliday.xba deleted file mode 100644 index e9af180aa..000000000 --- a/wizards/source/schedule/BankHoliday.xba +++ /dev/null @@ -1,177 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="BankHoliday" script:language="StarBasic">Option Explicit - -Sub Main() - Call CalAutopilotTable() -End Sub - - -Function CalEasterTable&(byval Year%) -Dim B%,C%,D%,E%,F%,G%,H%,I%,K%,L%,M%,N%,O%, nMonth%, nDay% - N = Year% mod 19 - B = int(Year% / 100) - C = Year% mod 100 - D = int(B / 4) - E = B mod 4 - F = int((B + 8) / 25) - G = int((B - F + 1) / 3) - H =(19 * N + B - D - G + 15) mod 30 - I = int(C / 4) - K = C mod 4 - L =(32 + 2 * E + 2 * I - H - K) mod 7 - M = int((N + 11 * H + 22 * L) / 451) - O = H + L - 7 * M + 114 - nDay = O mod 31 + 1 - nMonth = int(O / 31) - CalEasterTable& = DateSerial(Year, nMonth,nDay) -End Function - - -' Note: the following algorithm is valid only till the Year 2100. -' but I have no Idea from which date in the paste it is valid -Function CalOrthodoxEasterTable(ByVal iYear as Integer) as Long -Dim R1%, R2%, R3%, RA%, R4%, RB%, R5%, RC% -Dim lDate as Long - R1 = iYear mod 19 - R2 = iYear mod 4 - R3 = iYear mod 7 - RA =19 * R1 + 16 - R4 = RA mod 30 - RB = 2 * R2 + 4 * R3 + 6 * R4 - R5 = RB mod 7 - RC = R4 + R5 - lDate = DateSerial(iYear, 4,4) - CalOrthodoxEasterTable() = lDate + RC -End Function - - -Sub CalInitGlobalVariablesDate() -Dim i as Integer - For i = 1 To 374 - CalBankholidayName$(i) = "" - CalTypeOfBankHoliday%(i) = cHolidayType_None - Next -End Sub - - -Sub CalInsertBankholiday(byval CurDate as Long, byval EventName as String, ByVal iLevel as Integer) -Dim iDay - iDay =(Month(CurDate)-1)*31 +Day(CurDate) - - If 0 <> CalTypeOfBankHoliday(iDay) Then - If iLevel < CalTypeOfBankHoliday(iDay) Then - CalTypeOfBankHoliday(iDay) = iLevel - End If - Else - CalTypeOfBankHoliday(iDay) = iLevel - End If - - If CalBankHolidayName(iDay) = "" Then - CalBankHolidayName(iDay) = EventName - Else - CalBankHolidayName(iDay) = CalBankHolidayName(iDay) & " / " & EventName - End If -End Sub - -Function CalMaxDayInMonth(ByVal iYear as Integer, ByVal iMonth as Integer) as Integer -' delivers the maximum Day of a month in a certain year - Dim TmpDate as Long - Dim MaxDay as Long - - MaxDay = 28 - TmpDate = DateSerial(iYear, iMonth, MaxDay) - - While Month(TmpDate) = iMonth - MaxDay = MaxDay + 1 - TmpDate = TmpDate + 1 - Wend - Maxday = MaxDay - 1 - CalMaxDayInMonth() = MaxDay -End Function - - -Function CalGetIntOfShortMonthName(ByVal MonthName as String) as Integer -Dim i as Integer -Dim nMonth as Integer - - nMonth = Val(MonthName) - - If (1 <= nMonth And 12 >= nMonth) Then - CalGetIntOfShortMonthName = nMonth - Exit Function - End If - - MonthName = UCase(Trim(Left(MonthName, 3))) - - For i = 0 To 11 - If (UCase(cCalShortMonthNames(i)) = MonthName) Then - CalGetIntOfShortMonthName = i+1 - Exit Function - End If - Next - - ' Not Found - CalGetIntOfShortMonthName = 0 -End Function - - -Sub CalInsertOwnDataInTables(ByVal iSelYear as Integer) - ' inserts the individual data from the table into the previously unsorted list -Dim CurEventName as String -Dim CurEvMonth as Integer -Dim CurEvDay as Integer -Dim LastIndex as Integer -Dim i as Integer -Dim DateStr as String - LastIndex = Ubound(DlgCalModel.lstOwnData.StringItemList()) - For i = 0 To LastIndex - If GetSelectedDateUnits(CurEvDay, CurEvMonth, i) <> SBDATEUNDEFINED Then - CurEventName = CalGetNameOfEvent(i) - CalInsertBankholiday(DateSerial(iSelYear, CurEvMonth, CurEvDay), CurEventName, cHolidayType_Own) - End If - Next -End Sub - - -' Finds eg the first,second Monday in a month -' Note: in This Function the week starts with the Sunday -Function GetMonthDate(YearInt as Integer, iMonth as Integer, iWeekDay as Integer, iOffset as Integer) -Dim bFound as Boolean -Dim lDate as Long - ' 1st Tue in Nov : Election Day, Half - bFound = False - lDate = DateSerial(YearInt, iMonth, 1) - Do - If iWeekDay = WeekDay(lDate) Then - bFound = True - Else - lDate = lDate + 1 - End If - Loop Until bFound - GetMonthDate = lDate + iOffset -End Function - - -' Finds the next weekday after a fixed date -' e.g. Midsummerfeast in Sweden: next Saturday after 20th June -Function GetNextWeekDay(iYear as Integer, iMonth as Integer, iDay as Integer, iWeekDay as Integer) -Dim lDate as Long -Dim iCurWeekDay as Integer - lDate = DateSerial(iYear, iMonth, iDay) - iCurWeekDay = WeekDay(lDate) - While iCurWeekDay <> iWeekDay - lDate = lDate + 1 - iCurWeekDay = WeekDay(lDate) - Wend - GetNextWeekDay() = lDate -End Function - - -Sub AddFollowUpHolidays(ByVal lStartDate as Long, iCount as Integer, HolidayName as String, iType as Integer) -Dim lDate as Long - For lDate = lStartDate + 1 To lStartDate + 4 - CalInsertBankholiday(lDate, HolidayName, iType) - Next lDate -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/schedule/CalendarMain.xba b/wizards/source/schedule/CalendarMain.xba deleted file mode 100644 index 2deb51cca..000000000 --- a/wizards/source/schedule/CalendarMain.xba +++ /dev/null @@ -1,302 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="CalendarMain" script:language="StarBasic">Option Explicit - -Const _DEBUG = 0 - -' CalenderMain -Public sCurLangLocale as String -Public sCurCountryLocale as String -' This flag serves as a query if the individual Data should be saved -Public bCalOwnDataChanged as Boolean - -'BankHoliday Functions -Public CalBankholidayName$ (1 To 374) -Public CalTypeOfBankHoliday% (1 To 374) - -Public Const cHolidayType_None = 0 -Public Const cHolidayType_Full = 1 -Public Const cHolidayType_Half = 2 -Public Const cHolidayType_Own = 4 - -Public cCalSubcmdDeleteSelect_DeleteSelEntry$ -Public cCalSubcmdDeleteSelect_DeleteSelEntryTitle$ -Public cCalSubcmdSwitchOwnDataOrGeneral_Back$ -Public cCalSubcmdSwitchOwnDataOrGeneral_OwnData$ - -'Language -Public cCalLongMonthNames(11) as String -Public cCalShortMonthNames(11) as String - -Public sBitmapFilename$ -Public sCalendarTitle$, sMonthTitle$, sWizardTitle$, sError$ -Public cCalStyleWorkday$, cCalStyleWeekend$ - -Public CalChoosenLand as Integer - -Public oDocument as Object -Public oSheets as Object -Public oSheet as Object -Public oStatusLine as Object -Public bCancelTask as Boolean -Public oNumberFormatter as Object - -' BL* means "BundesLand" (for german states only) -Public CONST CalBLBayern = 1 -Public CONST CalBLBadenWuert = 2 -Public CONST CalBLBerlin = 3 -Public CONST CalBLBremen = 4 -Public CONST CalBLBrandenburg = 5 -Public CONST CalBLHamburg = 6 -Public CONST CalBLHessen = 7 -Public CONST CalBLMeckPomm = 8 -Public CONST CalBLNiedersachsen = 9 -Public CONST CalBLNordrheinWest = 10 -Public CONST CalBLRheinlandPfalz = 11 -Public CONST CalBLSaarland = 12 -Public CONST CalBLSachsen = 13 -Public CONST CalBLSachsenAnhalt = 14 -Public CONST CalBLSchlHolstein = 15 -Public CONST CalBLThueringen = 16 - -Public DlgCalendar as Object -Public DlgCalModel as Object -Public lDateFormat as Long -Public lDateStandardFormat as Long - - - -Sub CalAutopilotTable() -Dim BitmapDir as String -Dim iThisMonth as Integer - -'On Error Goto ErrorHandler - BasicLibraries.LoadLibrary("Tools") - bSelectByMouseMove = True - oDocument = ThisComponent - oStatusline = oDocument.GetCurrentController.GetFrame.CreateStatusIndicator - ToggleWindow(False) - sCurLangLocale = oDocument.CharLocale.Language - sCurCountryLocale = oDocument.CharLocale.Country - DlgCalendar = LoadDialog("Schedule", "DlgCalendar") - DlgCalModel = DlgCalendar.Model - LoadLanguage(sCurLangLocale) - CalInitGlobalVariablesDate() - BitmapDir = GetOfficeSubPath("Template","../wizard/bitmap") - DlgCalModel.imgCountry.ImageURL = BitmapDir & sBitmapFilename - CalChoosenLand = -2 - CalLoadOwnData() - - With DlgCalModel - .cmdDelete.Enabled = False - .lstMonth.StringItemList() = cCalShortMonthNames() - Select Case sCurLangLocale - Case cLANGUAGE_JAPANESE - .lstOwnData.FontName = "HG MinochoL" - .txtEvent.FontName = "HG MinchoL" - Case cLANGUAGE_CHINESE - If oDocument.CharLocale.Country = "CN" Then - .lstOwnData.FontName = "FZ Song Ti" - .txtEvent.FontName = "FZ Song Ti" - Else - .lstOwnData.FontName = "FZ Ming Ti" - .txtEvent.FontName = "FZ Ming Ti" - End If - Case "ko" - .lstOwnData.FontName = "Sun Gulim" - .txtEvent.FontName = "Sun Gulim" - End Select - .lstOwnEventMonth.StringItemList() = cCalShortMonthNames() - .optYear.State = 1 - .txtYear.Value = Year(Now()) - .txtYear.Tag = .txtYear.Value - .Step = 1 - End With - SetupNumberFormatter(sCurLangLocale, sCurCountryLocale) - CalChooseCalendar() ' month - iThisMonth = Month(Now) - DlgCalendar.GetControl("lstMonth").SelectItemPos(iThisMonth-1, True) - DlgCalendar.GetControl("lstHolidays").SelectItemPos(0,True) - DlgCalModel.cmdGoOn.DefaultButton = True - ToggleWindow(True) - DlgCalendar.GetControl("lblHolidays").Visible = sCurLangLocale = cLANGUAGE_GERMAN - DlgCalendar.GetControl("lstHolidays").Visible = sCurLangLocale = cLANGUAGE_GERMAN - fHeightCorrFactor = DlgCalendar.GetControl("imgCountry").Size.Height/198 - fWidthCorrFactor = DlgCalendar.GetControl("imgCountry").Size.Width/166 - DlgCalendar.Execute() - DlgCalendar.Dispose() - Exit Sub -ErrorHandler: - MsgBox(sError$, 16, sWizardTitle$) -End Sub - - -Sub SetupNumberFormatter(sCurLangLocale as String, sCurCountryLocale as String) -Dim oFormats as Object -Dim DateFormatString as String - oFormats = oDocument.getNumberFormats() - Select Case sCurLangLocale - Case cLANGUAGE_GERMAN - DateFormatString = "TT.MMM" - Case cLANGUAGE_ENGLISH - DateFormatString = "MMM DD" - Case cLANGUAGE_FRENCH - DateFormatString = "JJ/MMM" - Case cLANGUAGE_ITALIAN - DateFormatString = "GG/MMM" - Case cLANGUAGE_SPANISH - DateFormatString = "DD/MMM" - Case cLANGUAGE_PORTUGUESE - If sCurCountryLocale = "BR" Then - DateFormatString = "DD/MMM" - Else - DateFormatString = "DD-MMM" - End If - Case cLANGUAGE_DUTCH - DateFormatString = "DD/MMM" - Case cLANGUAGE_SWEDISH - DateFormatString = "MMM DD" - Case cLANGUAGE_DANISH - DateFormatString = "DD-MMM" - Case cLANGUAGE_POLISH - DateFormatString = "MMM DD" - Case cLANGUAGE_RUSSIAN - DateFormatString = "MMM DD" - Case cLANGUAGE_JAPANESE - DateFormatString = "M月D日" - Case cLANGUAGE_CHINESE - If sCurCountryLocale = "TW" Then - DateFormatString = "MMMMD" &"""" & "日" & """" - Else - DateFormatString = "M" & """" & "月" & """" & "D" &"""" & "日" & """" - End If - Case cLANGUAGE_GREEK - DateFormatString = "DD/MMM" - Case cLANGUAGE_TURKISH - DateFormatString = "DD/MMM" - Case cLANGUAGE_POLISH - DateFormatString = "MMM DD" - Case cLANGUAGE_FINNISH - DateFormatString = "PP.KKK" - End Select - - lDateFormat = AddNumberFormat(oFormats, DateFormatString, oDocument.CharLocale) - lDateStandardFormat = oFormats.getStandardFormat(com.sun.star.util.NumberFormat.DATE, oDocument.CharLocale) - -' lDateStandardFormat = AddNumberFormat(oFormats, StandardDateFormatString, oDocument.CharLocale) - oNumberFormatter = createUNOService("com.sun.star.util.NumberFormatter") - oNumberFormatter.attachNumberFormatsSupplier(oDocument) -End Sub - - -Function AddNumberFormat(oNumberFormats as Object, FormatString as String, oLocale as Object) as Long -Dim lLocDateFormat as Long - lLocDateFormat = oNumberFormats.QueryKey(FormatString, oLocale, True) - If lLocDateFormat = -1 Then - lLocDateFormat = oNumberFormats.addNew(FormatString, oLocale) - End If - AddNumberFormat() = lLocDateFormat -End Function - - -Sub CalChooseCalendar() - With DlgCalModel - .lstMonth.Enabled = .optMonth.State = 1 - .lblMonth.Enabled = .optMonth.State = 1 - End With -End Sub - - -Sub CalcmdCancel() - Call CalSaveOwnData() - DlgCalendar.EndExecute -End Sub - - -Sub CalcmdOk() - ' cmdOk is called when the Button 'Read' is clicked on - ' It is either given out a month or a year -Dim i, iSelYear as Integer -Dim SelYear as String -' DlgCalendar.Visible = False - - oSheets = oDocument.sheets - Call CalSaveOwnData() - UnprotectSheets(oSheets) - oSheets.RemovebyName(oSheets.GetbyIndex(0).Name) - iSelYear = DlgCalModel.txtYear.Value - Select Case sCurLangLocale - Case cLANGUAGE_GERMAN - If Ubound(DlgCalModel.lstHolidays.SelectedItems()) > -1 Then - CalChoosenLand = DlgCalModel.lstHolidays.SelectedItems(0) - Else - CalChoosenLand = 0 - End If - Call CalFindWholeYearHolidays_GERMANY(iSelYear, CalChoosenLand) - Case cLANGUAGE_ENGLISH - Call FindWholeYearHolidays_US(iSelYear) - Case cLANGUAGE_FRENCH - Call FindWholeYearHolidays_FRANCE(iSelYear) - Case cLANGUAGE_ITALIAN - Call FindWholeYearHolidays_ITA(iSelYear) - Case cLANGUAGE_SPANISH - Call FindWholeYearHolidays_SPAIN(iSelYear) - Case cLANGUAGE_PORTUGUESE - Call FindWholeYearHolidays_PORT(iSelYear) - Case cLANGUAGE_DUTCH - Call FindWholeYearHolidays_NL(iSelYear) - Case cLANGUAGE_SWEDISH - Call FindWholeYearHolidays_SWED(iSelYear) - Case cLANGUAGE_DANISH - Call FindWholeYearHolidays_DK(iSelYear) - Case cLANGUAGE_POLISH - Call FindWholeYearHolidays_PL(iSelYear) - Case cLANGUAGE_RUSSIAN - Call FindWholeYearHolidays_RU(iSelYear) - Case cLANGUAGE_JAPANESE - Call FindWholeYearHolidays_JP(iSelYear) - Case cLANGUAGE_CHINESE - If sCurCountryLocale = "TW" Then - Call FindWholeYearHolidays_TW(iSelYear) - Else - Call FindWholeYearHolidays_CN(iSelYear) - End If - Case cLANGUAGE_GREEK - Call FindWholeYearHolidays_GREEK(iSelYear) - Case cLANGUAGE_TURKISH - Call FindWholeYearHolidays_TRK(iSelYear) - Case cLANGUAGE_POLISH - Call FindWholeYearHolidays_PL(iSelYear) - Case cLANGUAGE_FINNISH - Call FindWholeYearHolidays_FI(iSelYear) - End Select - - Call CalInsertOwnDataInTables(iSelYear) - - If DlgCalModel.optYear.State = 1 Then - oSheets.RemovebyName(oSheets.GetbyIndex(0).Name) - oSheet = oSheets.GetbyIndex(0) - oSheet.Name = sCalendarTitle$ + " " + iSelYear - oDocument.AddActionLock - Call CalCreateYearTable(iSelYear) - ElseIf DlgCalModel.optMonth.State = 1 Then - Dim iMonth - iMonth = DlgCalModel.lstMonth.SelectedItems(0) + 1 - oSheets.RemovebyName(oSheets.GetbyIndex(1).Name) - oSheet = oSheets.GetbyIndex(0) - If sMonthTitle = "" Then - oSheet.Name = cCalLongMonthNames(iMonth-1) - Else - oSheet.Name = sMonthTitle + " " + cCalLongMonthNames(iMonth-1) - End If - oDocument.AddActionLock - Call CalCreateMonthTable(iSelYear, iMonth) - End If - - oDocument.RemoveActionLock - oSheet.protect("") - oStatusLine.End - DlgCalendar.EndExecute() - bCancelTask = True -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/schedule/CreateTable.xba b/wizards/source/schedule/CreateTable.xba deleted file mode 100644 index 6d472a84b..000000000 --- a/wizards/source/schedule/CreateTable.xba +++ /dev/null @@ -1,133 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="CreateTable" script:language="StarBasic">Option Explicit - -Public Const FirstDayRow = 5 ' Row on month sheet for first day of month -Public Const DateColumn% = 3 ' Column on month sheet with days -Public Const NewYearRow = 4 ' Row on year sheet for January 1st -Public Const NewYearColumn = 2 ' Column on year sheet for January 1st - - -Sub CalCreateYearTable(ByVal iSelYear as Integer) -' Completes the overview for whole year - -' Needed by StarOffice Calc and StarOffice Schedule -Dim CalDay as Integer -Dim CalMonth as Integer -Dim i as Integer -Dim s as Integer -Dim oYearCell as object -Dim iDate -Dim ColPos, RowPos as Integer -Dim oNameCell, oDateCell as Object -Dim iCellValue as Long -Dim oRangeFebCell, oCellAddress, oFebcell as Object -Dim oRangeBlank as Object -Dim sBlankStyle as String -' On Error Goto ErrorHandling - oStatusLine.Start("",140) 'GetResText(sProgress) - iDate = DateSerial(iSelYear,1,1) - oYearCell = oSheet.GetCellRangeByName("Year") - oYearCell.Value = iSelYear - - CalMonth = 1 - CalDay = 0 - s = 10 - oStatusLine.SetValue(s) - For i = 1 To 374 - CalDay = CalDay+1 - If CalDay = 32 Then - CalDay = 1 - CalMonth = CalMonth+1 - s = s + 10 - oStatusLine.SetValue(s) - End If - ColPos = NewYearColumn+(2*CalMonth) - RowPos = NewYearRow + CalDay - FormatCalCells(ColPos,RowPos,i) - Next - If NOT CalIsLeapYear(iSelYear) Then - ' Delete 29th February if necessary - oRangeFebCell = oSheet.GetCellRangeByName("Feb29") - oCellAddress = oRangeFebCell.RangeAddress - oFebCell = oSheet.GetCellByPosition(oCellAddress.StartColumn,oCellAddress.StartRow) - oFebCell.String = "" - ' Change the CellStyle according to the Range "Blank" - oRangeBlank = oSheet.GetCellRangebyName("Blank") - sBlankStyle = oRangeBlank.CellStyle - oRangeFebCell.CellStyle = sBlankStyle - End If - oStatusLine.SetValue(150) - ErrorHandling: - If Err <> 0 Then - MsgBox sError$, 16, sWizardTitle$ - End If -End Sub - - - -Sub CalCreateMonthTable(ByVal iSelYear as Integer, iSelMonth as Integer) -Dim oMonthCell, oDateCell as Object -Dim iDate as Date -Dim oAddress -Dim i, s as Integer -Dim iStartDay as Integer - -' Completes the monthly calendar -'On Error Goto ErrorHandling - oStatusLine.Start("",40) 'GetResText(sProgess) - ' Set month - oMonthCell = oSheet.GetCellRangeByName("Month") - - iDate = DateSerial(iSelYear,iSelMonth,1) - oMonthCell.Value = iDate - ' Inserting holidays - iStartDay = (iSelMonth - 1) * 31 + 1 - s = 5 - For i = iStartDay To iStartDay + 30 - oStatusLine.SetValue(s) - s = s + 1 - FormatCalCells(DateColumn+1,FirstDayRow + i - iStartDay,i) - Next - oDateCell = oSheet.GetCellbyPosition(DateColumn,FirstDayRow+i-iStartDay - 1) - oAddress = oDateCell.RangeAddress - - Select Case iSelMonth - Case 2,4,6,9,11 - oSheet.RemoveRange(oAddress, com.sun.star.sheet.CellDeleteMode.ROWS) - If iSelMonth = 2 Then - oAddress.StartRow = oAddress.StartRow - 1 - oAddress.EndRow = oAddress.StartRow - oSheet.RemoveRange(oAddress, com.sun.star.sheet.CellDeleteMode.ROWS) - If Not CalIsLeapYear(iSelYear) Then - oAddress.StartRow = oAddress.StartRow - 1 - oAddress.EndRow = oAddress.StartRow - oSheet.RemoveRange(oAddress, com.sun.star.sheet.CellDeleteMode.ROWS) - End If - End If - End Select - oStatusLine.SetValue(45) -ErrorHandling: - If Err <> 0 Then - MsgBox sError$, 16, sWizardTitle$ - End If -End Sub - - - -Sub FormatCalCells(ColPos,RowPos,i as Integer) -Dim oNameCell, oDateCell as Object -Dim iCellValue as Long - oDateCell = oSheet.GetCellbyPosition(ColPos-1,RowPos) - If oDateCell.Value <> 0 Then - iCellValue = oDateCell.Value - oDateCell.Value = iCellValue - If CalBankHolidayName$(i) <> "" Then - oNameCell = oSheet.GetCellbyPosition(ColPos,RowPos) - oNameCell.String = CalBankHolidayName$(i) - If CalTypeOfBankHoliday%(i) = cHolidayType_Full Then - oDateCell.CellStyle = cCalStyleWeekend$ - End If - End If - End If -End Sub</script:module>
\ No newline at end of file diff --git a/wizards/source/schedule/DlgCalendar.xdl b/wizards/source/schedule/DlgCalendar.xdl deleted file mode 100644 index 2936a5ebe..000000000 --- a/wizards/source/schedule/DlgCalendar.xdl +++ /dev/null @@ -1,64 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="Dialog1" dlg:left="160" dlg:top="81" dlg:width="208" dlg:height="156" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_DIALOG" dlg:closeable="true" dlg:moveable="true"> - <dlg:styles> - <dlg:style dlg:style-id="0" dlg:border="none"/> - <dlg:style dlg:style-id="1" dlg:font-name="Cumberland" dlg:font-stylename="Standard" dlg:font-family="modern" dlg:font-charset="ansi"/> - <dlg:style dlg:style-id="2" dlg:font-name="Cumberland" dlg:font-stylename="Standard" dlg:font-family="modern" dlg:font-charset="ansi"/> - </dlg:styles> - <dlg:bulletinboard> - <dlg:menulist dlg:id="lstHolidays" dlg:tab-index="0" dlg:left="6" dlg:top="17" dlg:width="95" dlg:height="12" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_1_CMBSTATE" dlg:spin="true"/> - <dlg:fixedline dlg:id="hlnCalendar" dlg:tab-index="1" dlg:left="6" dlg:top="36" dlg:width="95" dlg:height="8" dlg:page="1" dlg:value="hlnCalendar"/> - <dlg:radiogroup> - <dlg:radio dlg:id="optYear" dlg:tab-index="2" dlg:left="12" dlg:top="47" dlg:width="81" dlg:height="10" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPYEAR" dlg:value="optYear"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Schedule.CalendarMain.CalChooseCalendar?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - <dlg:radio dlg:id="optMonth" dlg:tab-index="3" dlg:left="12" dlg:top="61" dlg:width="81" dlg:height="10" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_1_OPMONTH" dlg:value="optMonth"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Schedule.CalendarMain.CalChooseCalendar?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - </dlg:radiogroup> - <dlg:text dlg:id="lblHolidays" dlg:tab-index="4" dlg:left="6" dlg:top="6" dlg:width="96" dlg:height="8" dlg:page="1" dlg:value="lblHolidays"/> - <dlg:img dlg:style-id="0" dlg:id="imgCountry" dlg:tab-index="5" dlg:left="106" dlg:top="6" dlg:width="95" dlg:height="113" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_1_PREVIEW"> - <script:event script:event-name="on-mousedown" script:macro-name="vnd.sun.star.script:Schedule.DlgControl.SelectState?language=Basic&location=application" script:language="Script"/> - <script:event script:event-name="on-mouseout" script:macro-name="vnd.sun.star.script:Schedule.DlgControl.MouseLeavesImage?language=Basic&location=application" script:language="Script"/> - <script:event script:event-name="on-mousemove" script:macro-name="vnd.sun.star.script:Schedule.DlgControl.CalMouseMoved?language=Basic&location=application" script:language="Script"/> - </dlg:img> - <dlg:fixedline dlg:id="hlnTime" dlg:tab-index="6" dlg:left="5" dlg:top="78" dlg:width="95" dlg:height="8" dlg:page="1" dlg:value="hlnTime"/> - <dlg:menulist dlg:id="lstMonth" dlg:tab-index="7" dlg:left="62" dlg:top="106" dlg:width="38" dlg:height="12" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDMONTH" dlg:spin="true"/> - <dlg:text dlg:id="lblYear" dlg:tab-index="8" dlg:left="12" dlg:top="91" dlg:width="46" dlg:height="8" dlg:page="1" dlg:value="lblYear"/> - <dlg:text dlg:id="lblMonth" dlg:tab-index="9" dlg:left="12" dlg:top="108" dlg:width="46" dlg:height="8" dlg:page="1" dlg:value="lblMonth"/> - <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="10" dlg:left="6" dlg:top="125" dlg:width="196" dlg:height="4"/> - <dlg:button dlg:id="cmdCancel" dlg:tab-index="11" dlg:left="6" dlg:top="136" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDCANCEL" dlg:value="cmdCancel"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Schedule.CalendarMain.CalcmdCancel?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdOwnData" dlg:tab-index="12" dlg:left="99" dlg:top="136" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOWNDATA" dlg:value="cmdOwnData"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Schedule.DlgControl.CalmdSwitchOwnDataOrGeneral?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdGoOn" dlg:tab-index="13" dlg:left="152" dlg:top="136" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_0_CMDOK" dlg:value="cmdGoOn"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Schedule.CalendarMain.CalcmdOk?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:text dlg:id="lblEvent" dlg:tab-index="14" dlg:left="12" dlg:top="17" dlg:width="67" dlg:height="8" dlg:page="2" dlg:value="lblEvent"/> - <dlg:fixedline dlg:id="hlnNewEvent" dlg:tab-index="15" dlg:left="6" dlg:top="6" dlg:width="196" dlg:height="8" dlg:page="2" dlg:value="hlnNewEvent"/> - <dlg:textfield dlg:style-id="1" dlg:id="txtEvent" dlg:tab-index="16" dlg:left="12" dlg:top="28" dlg:width="107" dlg:height="12" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENT"> - <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Schedule.OwnEvents.CheckInsertedDates?language=Basic&location=application" script:language="Script"/> - </dlg:textfield> - <dlg:numericfield dlg:id="txtOwnEventDay" dlg:tab-index="17" dlg:left="13" dlg:top="55" dlg:width="30" dlg:height="12" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTDAY" dlg:decimal-accuracy="0" dlg:value-min="1" dlg:spin="true"> - <script:event script:event-name="on-textchange" script:macro-name="vnd.sun.star.script:Schedule.OwnEvents.CheckInsertedDates?language=Basic&location=application" script:language="Script"/> - </dlg:numericfield> - <dlg:menulist dlg:id="lstOwnEventMonth" dlg:tab-index="18" dlg:left="60" dlg:top="55" dlg:width="30" dlg:height="12" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_2_EDEVENTMONTH" dlg:spin="true"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Schedule.OwnEvents.GetOwnMonth?language=Basic&location=application" script:language="Script"/> - </dlg:menulist> - <dlg:button dlg:id="cmdInsert" dlg:tab-index="19" dlg:left="99" dlg:top="70" dlg:width="50" dlg:height="14" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDINSERT" dlg:value="cmdInsert"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Schedule.OwnEvents.CalcmdInsertData?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdDelete" dlg:tab-index="20" dlg:left="152" dlg:top="70" dlg:width="50" dlg:height="14" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_2_CMDDELETE" dlg:value="cmdDelete"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Schedule.DlgControl.CalcmdDeleteSelect?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:menulist dlg:style-id="2" dlg:id="lstOwnData" dlg:tab-index="21" dlg:left="12" dlg:top="86" dlg:width="190" dlg:height="34" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_2_LBOWNDATA"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Schedule.DlgControl.CalUpdateNewEventFrame?language=Basic&location=application" script:language="Script"/> - </dlg:menulist> - <dlg:text dlg:id="lblEventDay" dlg:tab-index="22" dlg:left="12" dlg:top="44" dlg:width="44" dlg:height="8" dlg:page="2" dlg:value="lblEventDay"/> - <dlg:text dlg:id="lblEventMonth" dlg:tab-index="23" dlg:left="60" dlg:top="44" dlg:width="44" dlg:height="8" dlg:page="2" dlg:value="lblEventMonth"/> - <dlg:numericfield dlg:id="txtYear" dlg:tab-index="24" dlg:left="62" dlg:top="89" dlg:width="38" dlg:height="12" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGHOLIDAYCAL_1_EDYEAR" dlg:decimal-accuracy="0" dlg:value-min="1582" dlg:value-max="9957" dlg:spin="true"/> - </dlg:bulletinboard> -</dlg:window>
\ No newline at end of file diff --git a/wizards/source/schedule/DlgControl.xba b/wizards/source/schedule/DlgControl.xba deleted file mode 100644 index b7a7c4c95..000000000 --- a/wizards/source/schedule/DlgControl.xba +++ /dev/null @@ -1,148 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="DlgControl" script:language="StarBasic">Option Explicit - -Dim CalBitmap As Object -Public bSelectByMouseMove as Boolean -Public fHeightCorrFactor as Double -Public fWidthCorrFactor as Double - - - -Sub Main() - Call CalAutopilotTable() -End Sub - - -Sub CalcmdDeleteSelect() -Dim MsgBoxResult as Integer -Dim bDoEnable as Boolean -Dim iSel as Integer -Dim MaxIndex as Integer - If Ubound(DlgCalModel.lstOwnData.SelectedItems()) > -1 Then - MsgBoxResult = MsgBox(cCalSubcmdDeleteSelect_DeleteSelEntry$, 4+32, cCalSubcmdDeleteSelect_DeleteSelEntryTitle$) - If MsgBoxResult = 6 Then - iSel = DlgCalModel.lstOwnData.SelectedItems(0) - DlgCalModel.lstOwnData.StringItemList() = RemoveSelected(DlgCalModel.lstOwnData) - ' Flag to store the new data - bCalOwnDataChanged = True - bDoEnable = Ubound(DlgCalModel.lstOwnData.StringItemList()) > -1 - DlgCalModel.cmdDelete.Enabled = bDoEnable - If bDoEnable Then - MaxIndex = Ubound(DlgCalModel.lstOwnData.StringItemList()) - If iSel > MaxIndex Then - iSel = MaxIndex - End If - DlgCalendar.GetControl("lstOwnData").SelectItemPos(iSel, True) - CalUpdateNewEventFrame() - Else - Call CalClearInputMask() - End If - End If - End If -End Sub - - -Sub CalSaveOwnEventControls() - With DlgCalModel - .txtOwnEventDay.Tag = .txtOwnEventDay.Value - .txtOwnEventMonth.Tag = .txtOwnEventMonth.Text - End With -End Sub - - -Sub CalMouseMoved(aEvent as object) -Dim ListIndex as Integer - Select Case sCurLangLocale - Case cLANGUAGE_GERMAN - If bSelectByMouseMove Then -' oStatusLine.SetText("Position: " & aEvent.X & " ; " & aEvent.Y) - ListIndex = CalGetGermanLandAtMousePos(CInt(aEvent.X/fWidthCorrFactor), CInt(aEvent.Y/fHeightCorrFactor)) - DlgCalendar.GetControl("lstHolidays").SelectItemPos(ListIndex, True) - End If - End Select -End Sub - - -Sub SelectState(aEvent as Object) -Dim ListIndex as Integer - Select Case sCurLangLocale - Case cLANGUAGE_GERMAN - If aEvent.ClickCount >= 1 Then - ListIndex = CalGetGermanLandAtMousePos(CInt(aEvent.X/fWidthCorrFactor), CInt(aEvent.Y/fHeightCorrFactor)) - DlgCalendar.GetControl("lstHolidays").SelectItemPos(ListIndex, True) - bSelectByMouseMove = False - End If - End Select -End Sub - - -Sub MouseLeavesImage - bSelectbyMouseMove = True -End Sub - - -Sub CalClearInputMask() -Dim NullList() as String - With DlgCalModel - .txtEvent.Text = "" - .txtOwnEventDay.SetPropertyToDefault("Value") - .cmdInsert.Enabled = False - End With - If Ubound(DlgCalModel.lstOwnData.StringItemList()) > -1 Then - If Ubound(DlgCalModel.lstOwnData.SelectedItems()) = -1 Then - DlgCalendar.GetControl("lstOwnData").SelectItemPos(0,True) - CalUpdateNewEventFrame() - End If - End If -End Sub - - -Sub CalmdSwitchOwnDataOrGeneral() - If DlgCalModel.Step = 1 Then - DlgCalModel.Step = 2 - DlgCalModel.cmdOwnData.Label = cCalSubcmdSwitchOwnDataOrGeneral_Back$ - DlgCalModel.cmdInsert.Enabled = DlgCalModel.txtEvent.Text <> "" -' ToggleYearBox() - Else - dim bla as boolean - DlgCalModel.Step = 1 - DlgCalendar.GetControl("lblHolidays").Visible = sCurLangLocale = cLANGUAGE_GERMAN - DlgCalendar.GetControl("lstHolidays").Visible = sCurLangLocale = cLANGUAGE_GERMAN - DlgCalModel.cmdOwnData.Label = cCalSubcmdSwitchOwnDataOrGeneral_OwnData$ - End If -End Sub - - -Sub ToggleInsertButton() - DlgCalModel.cmdInsert.Enabled = LTrim(DlgCalModel.txtEvent.Text) <> "" -End Sub - - -Sub CalUpdateNewEventFrame() -Dim bDoEnable as Boolean -Dim sSelectedItem -Dim ListIndex as Integer -Dim MaxSelIndex as Integer -Dim CurEvMonth as Integer -Dim CurEvDay as Integer -Dim DateStr as String - bDoEnable = False - With DlgCalModel - MaxSelIndex = Ubound(DlgCalModel.lstOwnData.SelectedItems()) - If MaxSelIndex > -1 Then - ListIndex = .lstOwnData.SelectedItems(MaxSelIndex) - .txtEvent.Text = CalGetNameofEvent(ListIndex) - If GetSelectedDateUnits(CurEvDay, CurEvMonth, ListIndex) <> SBDATEUNDEFINED Then - .txtOwnEventDay.Value = CurEvDay - DlgCalendar.GetControl("lstOwnEventMonth").SelectItemPos(CurEvMonth-1, True) - .cmdDelete.Enabled = True - .cmdInsert.Enabled = True - Else - Call CalClearInputMask() - .cmdDelete.Enabled = True - End If - End If - End With -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/schedule/GermanHolidays.xba b/wizards/source/schedule/GermanHolidays.xba deleted file mode 100644 index 7ce4357e9..000000000 --- a/wizards/source/schedule/GermanHolidays.xba +++ /dev/null @@ -1,132 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="GermanHolidays" script:language="StarBasic">Option Explicit - -Sub Main() - Call CalAutopilotTable() -End Sub - -Function CalGetGermanLandAtMousePos(byval X as single, byval Y as single) as Integer - CalChoosenLand = 0 - If (X>73)And(X<130)And(Y>=117)And(Y<181) Then - CalChoosenLand = CalBLBayern - - ElseIf (X>41)And(X<89)And(Y>=136)And(Y<183) Then - CalChoosenLand = CalBLBadenWuert - - ElseIf (X>18)And(X<35)And(Y>136)And(Y<147) Then - CalChoosenLand = CalBLSaarland - - ElseIf (X>13)And(X<42)And(Y>111)And(Y<146) Then - CalChoosenLand = CalBLRheinlandPfalz - - ElseIf (X>15)And(X<=60)And(Y>=69)And(Y<112) Then - CalChoosenLand = CalBLNordrheinWest - - ElseIf (X>=42)And(X<78)And(Y>=95)And(Y<136) Then - CalChoosenLand = CalBLHessen - - ElseIf (X>=78)And(X<112)And(Y>=95)And(Y<117) Then - CalChoosenLand = CalBLThueringen - - ElseIf (X>=112)And(X<158)And(Y>=88)And(Y<114) Then - CalChoosenLand = CalBLSachsen - - ElseIf (X>77)And(X<84)And(Y>35)And(Y<42) Then - CalChoosenLand = CalBLHamburg - - ElseIf (X>56)And(X<60)And(Y>36)And(Y<41) Then - CalChoosenLand = CalBLBremen - - ElseIf (X>58)And(X<63)And(Y>44)And(Y<52) Then - CalChoosenLand = CalBLBremen - - ElseIf (X>52)And(X<95)And(Y>8)And(Y<40) Then - CalChoosenLand = CalBLSchlHolstein - - ElseIf (X>90)And(X<149)And(Y>23)And(Y<48) Then - CalChoosenLand = CalBLMeckPomm - - ElseIf (X>28)And(X<90)And(Y>35)And(Y<69) Then - CalChoosenLand = CalBLNiedersachsen - - ElseIf (X>60)And(X<90)And(Y>=69)And(Y<95) Then - CalChoosenLand = CalBLNiedersachsen - - ElseIf (X>=90)And(X<=115)And(Y>47)And(Y<95) Then - CalChoosenLand = CalBLSachsenAnhalt - - ElseIf (X>129)And(X<139)And(Y>60)And(Y<66) Then - CalChoosenLand = CalBLBerlin - - ElseIf (X>115)And(X<151)And(Y>=48)And(Y<88) Then - CalChoosenLand = CalBLBrandenburg - End If - CalGetGermanLandAtMousePos = CalChoosenLand -End Function - - - -Sub CalFindWholeYearHolidays_GERMANY(ByVal iSelYear as Integer, ByVal iCountry as Integer) - Dim So as Integer - Dim OsternDate&, VierterAdvent& - - If (iCountry < 1) Or (iCountry > 16) Then - iCountry = CalBLHamburg - End If - OsternDate& = CalEasterTable&(iSelYear) - So = 1 - - CalInsertBankholiday(DateSerial(iSelYear, 1, 1), "Neujahr", cHolidayType_Full) - - If (iCountry = CalBLBayern) Or (iCountry = CalBLBadenWuert) Or (iCountry = CalBLSachsenAnhalt) Then - CalInsertBankholiday(DateSerial(iSelYear, 1, 6), "Hl. 3 Könige", cHolidayType_Full) - End If - - CalInsertBankholiday(OsternDate&-2, "Karfreitag", cHolidayType_Full) - CalInsertBankholiday(OsternDate&, "Ostersonntag", cHolidayType_Full) - CalInsertBankholiday(OsternDate&+1, "Ostermontag", cHolidayType_Full) - CalInsertBankholiday(DateSerial(iSelYear, 5, 1), "Maifeiertag", cHolidayType_Full) - CalInsertBankholiday(OsternDate&+39, "Christi Himmelfahrt", cHolidayType_Full) - CalInsertBankholiday(OsternDate&+49, "Pfingstsonntag", cHolidayType_Full) - CalInsertBankholiday(OsternDate&+50, "Pfingstmontag", cHolidayType_Full) - - If (iCountry = CalBLBadenWuert) Or (iCountry = CalBLBayern) Or (iCountry = CalBLHessen) Or (iCountry = CalBLNordRheinWest) Or (iCountry = CalBLRheinlandPfalz) Or (iCountry = CalBLSaarland) Or (iCountry = CalBLSachsen) Or (iCountry = CalBLThueringen) Then - CalInsertBankholiday(OsternDate&+60, "Fronleichnam", cHolidayType_Full) - End If - - If (iCountry = CalBLBayern) Or (iCountry = CalBLSaarland) Then - CalInsertBankholiday(DateSerial(iSelYear, 8, 15), "Mariä Himmelfahrt", cHolidayType_Full) - End If - - CalInsertBankholiday(DateSerial(iSelYear, 10, 3), "Tag der dt. Einheit", cHolidayType_Full) - - If (iCountry=CalBLBrandenburg) Or (iCountry=CalBLMeckPomm) Or (iCountry=CalBLSachsenAnhalt) Or (iCountry=CalBLSachsen) Or (iCountry=CalBLThueringen) Then - CalInsertBankholiday(DateSerial(iSelYear, 10, 31), "Reformationstag", cHolidayType_Full) - End If - - If (iCountry = CalBLBadenWuert) Or (iCountry = CalBLBayern) Or (iCountry = CalBLNordRheinWest) Or (iCountry = CalBLRheinlandPfalz) Or (iCountry = CalBLSaarland) Or (iCountry = CalBLSachsen) Or (iCountry = CalBLThueringen) Then - CalInsertBankholiday(DateSerial(iSelYear, 11, 1), "Allerheiligen", cHolidayType_Full) - End If - - vierterAdvent = DateSerial(iSelYear, 12, 24) - While WeekDay(vierterAdvent) <> So - vierterAdvent = vierterAdvent - 1 - Wend - - If iCountry = CalBLSachsen Then - CalInsertBankholiday(vierterAdvent-32, "Buß- und Bettag", cHolidayType_Full) - Else - CalInsertBankholiday(vierterAdvent-32, "Buß- und Bettag", cHolidayType_Half) - End If - CalInsertBankholiday(vierterAdvent-21, "1. Advent", cHolidayType_Full) - CalInsertBankholiday(vierterAdvent-14, "2. Advent", cHolidayType_Full) - CalInsertBankholiday(vierterAdvent-7, "3. Advent", cHolidayType_Full) - CalInsertBankholiday(vierterAdvent, "4. Advent", cHolidayType_Full) - - CalInsertBankholiday(Dateserial(iSelYear, 12, 24), "Heiligabend", cHolidayType_Half) - CalInsertBankholiday(Dateserial(iSelYear, 12, 25), "1. Weihnachtstag", cHolidayType_Full) - CalInsertBankholiday(Dateserial(iSelYear, 12, 26), "2. Weihnachtstag", cHolidayType_Full) - CalInsertBankholiday(Dateserial(iSelYear, 12, 31), "Sylvester", cHolidayType_Half) -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/schedule/Language.xba b/wizards/source/schedule/Language.xba deleted file mode 100644 index 9fbf0942e..000000000 --- a/wizards/source/schedule/Language.xba +++ /dev/null @@ -1,95 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Language" script:language="StarBasic">Option Explicit - - -Public Const cLANGUAGE_SYSTEM = "", cLANGUAGE_CHINESE = "zh", cLANGUAGE_DANISH = "da" -Public Const cLANGUAGE_DUTCH = "nl", cLANGUAGE_ENGLISH = "en", cLANGUAGE_FINNISH = "fi" -Public Const cLANGUAGE_FRENCH = "fr", cLANGUAGE_GERMAN = "de", cLANGUAGE_GREEK = "el" -Public Const cLANGUAGE_ITALIAN = "it", cLANGUAGE_JAPANESE = "ja", cLANGUAGE_NORWEGIAN = "no" -Public Const cLANGUAGE_POLISH = "pl", cLANGUAGE_PORTUGUESE = "pt", cLANGUAGE_RUSSIAN = "ru" -Public Const cLANGUAGE_SPANISH = "es", cLANGUAGE_SWEDISH = "sv", cLANGUAGE_TURKISH = "tr" - -Public BLNameList(0 To 16) as String - - -' R e s o u r c e s t r i n g c o n s t a n t s -' ------------------------------------------------- -' Dialog labels start at 1000 - -Sub LoadLanguage%(ByVal LangLocale) -Dim Dummy$ -Dim i as Integer -Const dlgMonth = 1200 -' Abreviated months start 1225 -Const dlgShortMonth = 1225 - If InitResources("schedule", "cal") Then - If LangLocale = cLANGUAGE_GERMAN Then - - ' Load all states - BLNameList(0) = GetResText(1100) - BLNameList(1) = "Bayern" - BLNameList(2) = "Baden-Württemberg" - BLNameList(3) = "Berlin" - BLNameList(4) = "Bremen" - BLNameList(5) = "Brandenburg" - BLNameList(6) = "Hamburg" - BLNameList(7) = "Hessen" - BLNameList(8) = "Mecklenburg-Vorpommern" - BLNameList(9) = "Niedersachsen" - BLNameList(10) = "Nordrhein-Westfalen" - BLNameList(11) = "Rheinland-Pfalz" - BLNameList(12) = "Saarland" - BLNameList(13) = "Sachsen" - BLNameList(14) = "Sachsen-Anhalt" - BLNameList(15) = "Schleswig Holstein" - BLNameList(16) = "Thüringen" - - DlgCalModel.lstHolidays.StringItemList() = BLNameList() - End If - sWizardTitle$ = GetResText(1300) - sError = GetResText(1301) - cCalSubcmdDeleteSelect_DeleteSelEntryTitle$ = GetResText(1302) - cCalSubcmdDeleteSelect_DeleteSelEntry$ = GetResText(1303) - DlgCalendar.Title = GetResText(1000) - - With DlgCalModel - cCalSubcmdSwitchOwnDataOrGeneral_OwnData$ = GetResText(1002) - cCalSubcmdSwitchOwnDataOrGeneral_Back$ = GetResText(1001) - .hlnTime.Label = GetResText(1011) - .lblYear.Label = GetResText(1012) - .cmdCancel.Label = GetResText(1005) - .cmdGoOn.Label = GetResText(1004) - .lblHolidays.Label = GetResText(1014) - sBitmapFilename = GetResText(1099) - sBitmapFilename = ReplaceString(sBitmapFileName, ".gif", ".bmp") - DlgCalModel.hlnCalendar.Label = GetResText(1006) - .optYear.Label = GetResText(1007) - .optMonth.Label = GetResText(1008) - .lblMonth.Label = GetResText(1013) - .cmdOwnData.Label = GetResText(1015) - .hlnNewEvent.Label = GetResText(1019) - .lblEvent.Label = GetResText(1019) - .lblEventDay.Label = GetResText(1021) - .lblEventMonth.Label = GetResText(1022) -' .lblEventYear.Label = GetResText(1023) -' .chkEventOnce.Label = GetResText(1020) - .cmdInsert.Label = GetResText(1016) - .cmdDelete.Label = GetResText(1017) - ' Load long month names - For i = 0 To 11 - cCalLongMonthNames(i) = GetResText(dlgMonth+i) - cCalShortMonthNames(i)= cCalLongMonthNames(i) - 'cCalShortMonthNames(i)= Left$(cCalLongMonthNames(i), 3) - cCalShortMonthNames(i)= RTrim(cCalShortMonthNames(i)) - Next - ' Load sheet names - sCalendarTitle = GetResText(1410) - sMonthTitle = GetResText(1411) - ' Load names of styles - cCalStyleWorkday$ = GetResText(1400) - cCalStyleWeekend$ = GetResText(1401) - End With - End If -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/schedule/LocalHolidays.xba b/wizards/source/schedule/LocalHolidays.xba deleted file mode 100644 index 0b347c03f..000000000 --- a/wizards/source/schedule/LocalHolidays.xba +++ /dev/null @@ -1,642 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="LocalHolidays" script:language="StarBasic">Option Explicit - -Sub Main - Call CalAutopilotTable() -End Sub - - -Sub FindWholeYearHolidays_FRANCE(ByVal YearInt as Integer) -Dim lEasterDate& -Dim lDate& - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Jour de l'an", cHolidayType_Full) - lEasterDate = CalEasterTable(YearInt) - CalInsertBankholiday(lEasterDate, "Pâques", cHolidayType_Full) - CalInsertBankholiday(lEasterDate + 1, "Lundi de Pâques", cHolidayType_Full) - CalInsertBankholiday(lEasterDate + 39, "Ascension", cHolidayType_Full) - CalInsertBankholiday(lEasterDate + 49, "Pentecôte", cHolidayType_Full) - CalInsertBankholiday(lEasterDate + 50, "Lundi de Pentecôte", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Fête du travail", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 5, 8), "Victoire 1945", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 7, 14), "Fête Nationale", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Assomption", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Toussaint", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Armistice ou Victoire 1918", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Noël", cHolidayType_Full) -End Sub - - -Sub FindWholeYearHolidays_SWED(ByVal YearInt as Integer) -Dim lDate& - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nyårsdagen", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Trettondagen", cHolidayType_Full) - lDate = CalEasterTable(YearInt) - CalInsertBankholiday(lDate - 2, "Långfredagen", cHolidayType_Full) - CalInsertBankholiday(lDate, "Påskdagen", cHolidayType_Full) - CalInsertBankholiday(lDate + 1, "Annandag påsk", cHolidayType_Full) - CalInsertBankholiday(lDate + 39, "Kristi himmelfärds dag", cHolidayType_Full) - CalInsertBankholiday(lDate + 49, "Pingstdagen", cHolidayType_Full) - CalInsertBankholiday(lDate + 50, "Annandag pingst", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 5, 1), "1:a maj", cHolidayType_Full) - ' MidSummerfeast (next Sunday after 20th June) - CalInsertBankholiday(GetNextWeekday(YearInt, 6, 20, 7), "Midsommardagen", cHolidayType_Full) - CalInsertBankholiday(GetNextWeekDay(YearInt, 10, 31, 7), "Alla helgons dag", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Juldagen", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Annandag jul", cHolidayType_Full) -End Sub - - - -Sub FindWholeYearHolidays_FI(ByVal YearInt as Integer) - Dim OsternDate& - ' New Year - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Uudenvuodenpäivä", cHolidayType_Full) - ' "the three Magi" - CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Loppiainen", cHolidayType_Half) - OsternDate = CalEasterTable(YearInt) - CalInsertBankholiday(OsternDate-2, "Pitkäperjantai", cHolidayType_Full) - CalInsertBankholiday(OsternDate, "Pääsiäispäivä", cHolidayType_Full) - CalInsertBankholiday(OsternDate+1, "2. pääsiäispäivä", cHolidayType_Full) - ' Ascension Day - CalInsertBankholiday(OsternDate+39, "Helatorstai", cHolidayType_Full) - ' First of May - CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Vappu, suomalaisen työn päivä", cHolidayType_Full) - ' Mothers Day : 2nd Sunday in May, Full - CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), "Äitienpäivä", cHolidayType_Full) - ' MidSummerfeast (next Sunday after 20th June) - CalInsertBankholiday(GetNextWeekday(YearInt, 6, 20, 7), "Juhannus, Suomen lipun päivä", cHolidayType_Full) - ' Independance day - CalInsertBankholiday(DateSerial(YearInt, 12, 6), "Itsenäisyyspäivä", cHolidayType_Full) - ' Christmas - CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Joulupäivä", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Tapaninpäivä", cHolidayType_Full) -End Sub - - - -Sub FindWholeYearHolidays_DK (ByVal YearInt as Integer) -Dim lDate&, VierterAdvent& - - 'New Year - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nytårsdag", cHolidayType_Full) - lDate = CalEasterTable (YearInt) - ' carnival - CalInsertBankholiday(lDate-49, "Fastelavn", cHolidayType_Half) - '"Maundy Tuesday - CalInsertBankholiday(lDate-3, "Skærtorsdag", cHolidayType_Full) - '"Good Friday " - CalInsertBankholiday(lDate-2, "Langfredag", cHolidayType_Full) - ' Easter Sunday - CalInsertBankholiday(lDate, "Påskesøndag", cHolidayType_Full) - ' Easter Monday - CalInsertBankholiday(lDate+1, "2. påskedag", cHolidayType_Full) - ' 4th Friday after Easter - CalInsertBankholiday(lDate+26, "Store bededag", cHolidayType_Full) - ' "Ascension Day - CalInsertBankholiday(lDate+39, "Kristi himmelfahrt", cHolidayType_Full) - ' "Whitsunday" - CalInsertBankholiday(lDate+49, "Pinsesøndag", cHolidayType_Full) - ' "Whitmonday" - CalInsertBankholiday(lDate+50, "2. pinsedag", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 6, 5), "Grundlovsdag", cHolidayType_Full) - 'Christmas Days - CalInsertBankholiday(DateSerial(YearInt, 12, 25), "1. juledag", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 26), "2. juledag", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Hellig 3 konger", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 3, 28), "Dr. Ingrid", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 4, 16), "Dr. Margrete", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 4, 16), "Palmesøndag", cHolidayType_Half) - ' "Liberation day" - CalInsertBankholiday(DateSerial(YearInt, 5, 5), "Befrielsesdag", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 5, 26), "Krpr. Frederik", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 6, 7), "Pr. Joachim", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 6, 11), "Pr. Henrik", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 6, 15), "Valdemarsdag", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 6, 24), "Skt. Hans", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 6, 30), "Prinsesse Alexandra", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 8, 28), "Pr. Nikolai", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 10, 24), "FN-dag", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Morten Bisp", cHolidayType_Half) - ' all half (Memorial Days) - '"adventdays - VierterAdvent = DateSerial(YearInt, 12, 24) - While (Weekday(VierterAdvent) <> 1) - vierterAdvent = vierterAdvent - 1 - Wend - CalInsertBankholiday(vierterAdvent-21, "1. søndag i advent", cHolidayType_Half) - CalInsertBankholiday(vierterAdvent-14, "2. søndag i advent", cHolidayType_Half) - CalInsertBankholiday(vierterAdvent-7, "3. søndag i advent", cHolidayType_Half) - CalInsertBankholiday(vierterAdvent, "4. søndag i advent", cHolidayType_Half) - 'Christmas eve - CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Juleaften", cHolidayType_Half) - '"New Year's eve" - CalInsertBankholiday(DateSerial(YearInt, 12, 31), "Nytårsaften", cHolidayType_Half) -End Sub - - -Sub FindWholeYearHolidays_ITA(ByVal YearInt as Integer) -Dim lDate& - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Capodanno", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Epifania", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 4, 25), "Festa della liberazione", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Ferragusto", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Tutti i Santi", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 8), "Immacolata concezione", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Natale", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Santo Stefano", cHolidayType_Full) - lDate = CalEasterTable(YearInt) - CalInsertBankholiday(lDate, "Pasqua", cHolidayType_Full) - CalInsertBankholiday(lDate+1, "Lunedì dell'Angelo", cHolidayType_Full) -End Sub - - - -Sub FindWholeYearHolidays_TRK(ByVal YearInt as Integer) -Dim lDate as Long - ' New Years' Day - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Yılbaşı", cHolidayType_Full) - ' National Sovereignty and Children's Day - CalInsertBankholiday(DateSerial(YearInt, 4, 23), "Ulusal Egemenlik ve Çocuk Bayramı", cHolidayType_Full) - ' Ataturk Commemoration and Youth & Sports Day - CalInsertBankholiday(DateSerial(YearInt, 5, 19), "Atatürk'ü Anma, Gençlik ve Spor Bayramı", cHolidayType_Full) - ' Mothers Day : 2nd Sunday in May, Full - CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), "Anneler günü", cHolidayType_Full) - ' Fathers Day: 3rd Sunday in May, Full - CalInsertBankholiday(GetMonthDate(YearInt, 6,1,14), "Babalar Günü", cHolidayType_Full) - ' Victory Day - CalInsertBankholiday(DateSerial(YearInt, 8, 30), "Zafer Bayramı", cHolidayType_Full) - ' Republic Day - CalInsertBankholiday(DateSerial(YearInt, 10, 28), "Cumhuriyet Bayramı", cHolidayType_Full) - ' Republic Day - CalInsertBankholiday(DateSerial(YearInt, 10, 29), "Cumhuriyet Bayramı", cHolidayType_Full) - ' Commemoration Of Ataturk-Anniversary of Ataturk's Death - CalInsertBankholiday(DateSerial(YearInt, 11, 10), "Atatürk'ün Ölüm Günü", cHolidayType_Full) - CalculateturkishReligousHolidays(YearInt) -End Sub - - -Sub CalculateturkishReligousHolidays(iSelYear as Integer) -Dim lKurbanBayRamStartDate as Long -Dim lRamazanBayRamStartDate as Long - - Select Case iSelYear - Case 2002 - lKurbanBayRamStartDate = DateSerial(iSelYear, 2, 21) - lRamazanBayRamStartDate = DateSerial(iSelYear, 12, 4) - Case 2003 - lKurbanBayRamStartDate = DateSerial(iSelYear, 2, 10) - lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 24) - Case 2004 - lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 31) - lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 13) - Case 2005 - lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 19) - lRamazanBayRamStartDate = DateSerial(iSelYear, 11, 2) - Case 2006 - lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 30) - CalInsertBankholiday(lKurbanBayRamStartDate, "Kurban Bayramı Arefesi", cHolidayType_Half) - CalInsertBankholiday(DateSerial(iSelYear, 12, 31), "Kurban Bayram", cHolidayType_Full) - - lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 9) - lRamazanBayRamStartDate = DateSerial(iSelYear, 10, 22) - Case 2007 - lKurbanBayRamStartDate = DateSerial(iSelYear, 1, 1) - ' Note: The first day has already been in 2006!!! - AddFollowUpHolidays(lKurbanBayRamStartDate-1, 3, "Kurban Bayram", cHolidayType_Full) - lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 19) - - lRamazanBayRamStartDate = DateSerial(iSelYear, 10, 11) - Case 2008 - lKurbanBayRamStartDate = DateSerial(iSelYear, 12, 7) - lRamazanBayRamStartDate = DateSerial(iSelYear, 9, 29) - Case Else - Exit Sub - End Select - 'Feast Of the Sacrifice Eve - CalInsertBankholiday(lKurbanBayRamStartDate, "Kurban Bayramı Arefesi", cHolidayType_Half) - 'Feast Of the Sacrifice - AddFollowUpHolidays(lKurbanBayRamStartDate, 4, "Kurban Bayram", cHolidayType_Full) - ' End of Ramadan Eve - CalInsertBankholiday(lRamazanBayRamStartDate, "Ramazan (Şeker) Bayramı Arefesi", cHolidayType_Half) - ' End of Ramadan - AddFollowUpHolidays(lRamazanBayRamStartDate, 3, "Ramazan (Şeker) Bayramı", cHolidayType_Full) -End Sub - - -Sub FindWholeYearHolidays_GREEK(ByVal YearInt as Integer) -Dim lDate as Long - ' New Year - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Πρωτοχρονιά", cHolidayType_Full) - 'Schol Holiday - CalInsertBankholiday(DateSerial(YearInt, 12, 30), "Τριών Ιεραρχών", cHolidayType_Full) - ' This is both a National Holiday and a religious holiday - CalInsertBankholiday(DateSerial(YearInt, 3, 25), "Εθνική Εορτή Ευαγγελισμός Θεοτόκου", cHolidayType_Full) - ' Labor Day - CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Πρωτομαγιά", cHolidayType_Full) - ' Assumption Day - CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Κοίμηση της Θεοτόκου", cHolidayType_Full) - ' National Resistance Day - CalInsertBankholiday(DateSerial(YearInt, 10, 28), "Εθνική Εορτή", cHolidayType_Full) - ' School Holiday - CalInsertBankholiday(DateSerial(YearInt, 11, 17), "Επέτειος του Πολυτεχνείου", cHolidayType_Full) - ' Christmas Eve - CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Παραμονή Χριστουγέννων", cHolidayType_Full) - ' Christmas Day - CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Χριστούγεννα", cHolidayType_Full) - ' Boxing Day - CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Δεύτερη μέρα Χριστουγέννων", cHolidayType_Full) - lDate = CalOrthodoxEasterTable(YearInt) - ' Triodon - CalInsertBankholiday(lDate-70, "Αρχή Τριωδίου", cHolidayType_Full) - ' Meat Fare - CalInsertBankholiday(lDate-56, "Τσικνοπέμπτη", cHolidayType_Full) - ' First Day of Lent - CalInsertBankholiday(lDate-48, "Καθαρή Δευτέρα", cHolidayType_Full) - ' Saturday of Lazarus - CalInsertBankholiday(lDate-8, "Σάββατο του Λαζάρου", cHolidayType_Full) - ' Palm Sunday - CalInsertBankholiday(lDate-7, "Κυριακή των Βαΐων", cHolidayType_Full) - ' Monday before Easter - CalInsertBankholiday(lDate-6, "Μεγάλη Δευτέρα", cHolidayType_Full) - ' Tuesday before Easter - CalInsertBankholiday(lDate-5, "Μεγάλη Τρίτη", cHolidayType_Full) - ' Wednesday before Easter - CalInsertBankholiday(lDate-4, "Μεγάλη Τετάρτη", cHolidayType_Full) - ' Thursday before Easter - CalInsertBankholiday(lDate-3, "Μεγάλη Πέμπτη", cHolidayType_Full) - ' Good Friday - CalInsertBankholiday(lDate-2, "Μεγάλη Παρασκευή", cHolidayType_Full) - ' Saturday before Easter - CalInsertBankholiday(lDate-1, "Μεγάλο Σάββατο", cHolidayType_Full) - ' Easter Monday - CalInsertBankholiday(lDate+1, "Δευτέρα του Πάσχα", cHolidayType_Full) - ' Pentecost - CalInsertBankholiday(lDate+49, "Κυριακή της Πεντηκοστής", cHolidayType_Full) - ' Ascension Day - CalInsertBankholiday(lDate+39, "Του Αγίου Πνεύματος", cHolidayType_Full) - ' All Saints Day - CalInsertBankholiday(lDate+56, "Των Αγίων Πάντων", cHolidayType_Full) -End Sub - - - -Sub FindWholeYearHolidays_SPAIN(ByVal YearInt as Integer) -Dim lDate& - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Año Nuevo", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Reyes", cHolidayType_Full) - lDate = CalEasterTable(YearInt) - CalInsertBankholiday(lDate-2, "Viernes Santo", cHolidayType_Full) - CalInsertBankholiday(lDate+1, "Lunes de Pascua Florida", cHolidayType_Full) - CalInsertBankholiday(lDate+39, "Día de la Ascensión", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Fiesta del Trabajo", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Día de la Asunción", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 10, 12), "Fiesta de la Hispanidad", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Todos los Santos", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 6), "Día de la Constitución", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 8), "La Inmaculada", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Navidad", cHolidayType_Full) -End Sub - - -Sub FindWholeYearHolidays_PORT(ByVal YearInt as Integer) -Dim lDate& - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Ano Novo", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Reis Magos", cHolidayType_Half) - lDate = CalEasterTable(YearInt) - CalInsertBankholiday(lDate-47, "Carnaval", cHolidayType_Full) - CalInsertBankholiday(lDate-7, "Domingo de Ramos", cHolidayType_Half) - CalInsertBankholiday(lDate-2, "Sexta-feira Santa", cHolidayType_Full) - CalInsertBankholiday(lDate, "Páscoa", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 4, 25), "25 de Abril", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Dia do Trabalhador", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 5, 29), "Corpo de Deus", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 6, 10), "Dia de Camões e das Comunidades Portuguesas", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 6, 24), "S. João", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 6, 29), "S. Pedro", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Assunção de Nossa Senhora", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 10, 5), "Implantação da República", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Dia de Todos os Santos", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 8), "Imaculada Conceição", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Natal", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 1), "Restauração da Independência", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 31), "Passagem de Ano", cHolidayType_Half) -End Sub - - -Sub FindWholeYearHolidays_NL(ByVal YearInt as Integer) -Dim lDate& - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nieuwjaarsdag", cHolidayType_Full) - lDate = CalEasterTable(YearInt) - CalInsertBankholiday(lDate, "1e Paasdag", cHolidayType_Full) - CalInsertBankholiday(lDate + 1, "2e Paasdag", cHolidayType_Full) - CalInsertBankholiday(lDate + 39, "Hemelvaartsdag", cHolidayType_Full) - CalInsertBankholiday(lDate + 49, "1e Pinksterdag", cHolidayType_Full) - CalInsertBankholiday(lDate + 50, "2e Pinksterdag", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 4, 30), "Koninginnedag", cHolidayType_Full) - ' Bevrijdingsdag is celebrated every 5th year - If YearInt Mod 5 = 0 then - CalInsertBankholiday(DateSerial(YearInt, 5, 5), "Bevrijdingsdag", cHolidayType_Full) - End if - CalInsertBankholiday(DateSerial(YearInt, 12, 6), "Sinterklaas", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 12, 25), "1e Kerstdag", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 26), "2e Kerstdag", cHolidayType_Full) -End Sub - - -Sub FindWholeYearHolidays_PL (ByVal YearInt as Integer) - Dim lDate&, OsternDate& - ' New Year - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Nowy Rok", cHolidayType_Full) - ' "the three Magi" - CalInsertBankholiday(DateSerial(YearInt, 1, 6), "Trzech Króli", cHolidayType_Half) - ' "Womens' Day" - CalInsertBankholiday(DateSerial(YearInt, 3, 8), "Dzień Kobiet", cHolidayType_Half) - OsternDate = CalEasterTable(YearInt) - CalInsertBankholiday(OsternDate-2, "Wielki Piątek", cHolidayType_Full) - CalInsertBankholiday(OsternDate, "Wielka Niedziela", cHolidayType_Full) - CalInsertBankholiday(OsternDate+1, "Lany Poniedziałek", cHolidayType_Full) - ' Ascension Day - CalInsertBankholiday(OsternDate+39, "Wniebowstąpienie", cHolidayType_Full) - ' Pentecost - CalInsertBankholiday(OsternDate+49, "Zielone Świątki", cHolidayType_Full) - ' Feast of Corpus Christi - CalInsertBankholiday(OsternDate+60, "Boże Ciało", cHolidayType_Full) - ' First of May - CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Święto pracy", cHolidayType_Full) - ' Memorial day of constitution - CalInsertBankholiday(DateSerial(YearInt, 5, 3), "Dzień konstytucji 3-go maja", cHolidayType_Full) - ' "Childrens' day" - CalInsertBankholiday(DateSerial(YearInt, 6, 1), "Dzień Dziecka", cHolidayType_Half) - ' "Ascension Day" - CalInsertBankholiday(DateSerial(YearInt, 8, 15), "Matki Boskiej Zielnej", cHolidayType_Half) - ' "All Saints' Day " - CalInsertBankholiday(DateSerial(YearInt, 11, 1), "Wszystkich Świętych", cHolidayType_Full) - ' National day" - CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Dzień Niepodległości", cHolidayType_Full) - ' Christmas Eve - CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Wigilia", cHolidayType_Half) - ' Christmas - CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Boże Narodzenie", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 26), "Boże Narodzenie", cHolidayType_Full) - ' "New Year's eve" - CalInsertBankholiday(DateSerial(YearInt, 12, 31), "Sylwester", cHolidayType_Half) -End Sub - - -Sub FindWholeYearHolidays_RU (ByVal YearInt as Integer) -Dim lDate& - ' New Year - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "Новый Год", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 1, 2), "Новый Год", cHolidayType_Full) - ' Russian Christmas" - CalInsertBankholiday(DateSerial(YearInt, 1, 7), "Рождество", cHolidayType_Full) - 'Day of Defender of Motherland - CalInsertBankholiday(DateSerial(YearInt, 2, 23), "День Защитника Отечества", cHolidayType_Full) - ' Woman Day - CalInsertBankholiday(DateSerial(YearInt, 3, 8), "Международный Женский День", cHolidayType_Full) - ' Spring and labor holiday - CalInsertBankholiday(DateSerial(YearInt, 5, 1), "Праздник Весны и Труда", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 5, 2), "Праздник Весны и Труда", cHolidayType_Full) - ' Victory of the second World War - CalInsertBankholiday(DateSerial(YearInt, 5, 9), "День Победы", cHolidayType_Full) - ' Independence Day - CalInsertBankholiday(DateSerial(YearInt, 6, 12), "День Независимости", cHolidayType_Full) - ' Day of Accord and Conciliation - CalInsertBankholiday(DateSerial(YearInt, 11, 7), "День Согласия и Примирения", cHolidayType_Full) - ' Constitution Day - CalInsertBankholiday(DateSerial(YearInt, 12, 12), "День Конституции", cHolidayType_Full) -End Sub - - -Sub FindWholeYearHolidays_US(ByVal YearInt as Integer) -Dim lDate as Long -Dim lFirstNov as Long -Dim lElectDate as Long - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "New Year's Day", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 2, 2), "Groundhog Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 2, 14), "Valentine's Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 3, 17), "St Patrick's Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 4, 1), "April Fools' Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 4, 22), "Earth Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 5, 6), "Nurses' Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 6, 14), "Flag Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 6, 14), "Army Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 6, 19), "Juneteenth(Liberation of Slaves)", cHolidayType_Half) - - CalInsertBankholiday(DateSerial(YearInt, 7, 4), "Independence Day", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 8, 1), "Air Force Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 8, 4), "Coast Guard Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 9, 17), "Citizenship Day or Constitution Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 10, 16), "Bosses' Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 10, 26 ), "Mother-in-Law's Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 10, 27), "Navy Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 10, 31), "Halloween", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 11, 10), "Marine Corps Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 11, 11), "Veteran's Day", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 7), "Pearl Harbor Remembrance Day", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 12, 24), "Christmas Eve", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 12, 25), "Christmas Day", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 31), "New Year's Eve", cHolidayType_Half) - - CalInsertBankholiday(CalEasterTable(YearInt), "Easter Sunday", cHolidayType_Half) - - ' Inauguration Day occurs every 4 years (1997, 2001) in the year following the presidential election - ' always on the 20th of January unless this is a Sunday in which case on Monday 21st January - If YearInt Mod 4 = 1 Then - lDate = DateSerial(YearInt, 1, 20) - If WeekDay(lDate) = 1 Then - CalInsertBankholiday(lDate + 1, "Inauguration Day", cHolidayType_Half) - Else - CalInsertBankholiday(lDate, "Inauguration Day", cHolidayType_Half) - End If - End If - ' First Tuesday in November, but only after the 1st of November and only on evenly numbered years - If YearInt Mod 2 = 0 Then - lFirstNov = DateSerial(YearInt, 11, 1) - lElectDate = GetMonthDate(YearInt, 11, 3, 0) - If lElectDate > lFirstNov Then - CalInsertBankholiday(lElectDate, "Election Day", cHolidayType_Half) - Else - CalInsertBankholiday(lElectDate + 7, "Election Day", cHolidayType_Half) - End If - End If - CalInsertBankholiday(GetMonthDate(YearInt, 1, 2, 14), "Martin Luther King Jr Day", cHolidayType_Full) - CalInsertBankholiday(GetMonthDate(YearInt, 2, 2, 14), "President's Day", cHolidayType_Full) - ' Mothers Day : 2nd Sunday in May, Full - CalInsertBankholiday(GetMonthDate(YearInt, 5,1,7), "Mother's Day", cHolidayType_Full) - - ' Wednesday of the last full week of April Administrative Professionals' Day (formerly Secretaries' Day) - CalInsertBankholiday(GetMonthDate(YearInt, 5, 7, -7)-3, "Administrative Professionals' Day", cHolidayType_Half) - - CalInsertBankholiday(GetMonthDate(YearInt, 5, 5, 0), "National Day of Prayer", cHolidayType_Half) - CalInsertBankholiday(GetMonthDate(YearInt, 5, 7, 14), "Armed Forces Day", cHolidayType_Half) - ' Fathers Day : 3rd Sunday in June - CalInsertBankholiday(GetMonthDate(YearInt, 6,1,14), "Father's Day", cHolidayType_Half) - - ' Last Monday in May: Menorial Day, Full - CalInsertBankholiday(GetMonthDate(YearInt, 6, 2, 0)-7, "Memorial Day", cHolidayType_Full) - CalInsertBankholiday(GetMonthDate(YearInt, 7, 1, 21), "Parents' Day", cHolidayType_Half) - CalInsertBankholiday(GetMonthDate(YearInt, 8, 1, 0), "Friendship Day", cHolidayType_Half) - - ' 1st Monday in Sep : Labor Day, Full - CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 0), "Labor Day", cHolidayType_Full) - ' Sunday after Labor Day Grandparents' Day - CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 0)+6, "Grandparents' Day", cHolidayType_Half) - - CalInsertBankholiday(GetMonthDate(YearInt, 10, 1, 0), "National Children's Day", cHolidayType_Half) - CalInsertBankholiday(GetMonthDate(YearInt, 10, 2, 7), "Columbus Day", cHolidayType_Full) - ' Sweetest Day: Third Saturday in October - CalInsertBankholiday(GetMonthDate(YearInt, 10, 7, 14), "Sweetest Day", cHolidayType_Half) - ' 4th Thu in Nov : Thanksgiving, Full - CalInsertBankholiday(GetMonthDate(YearInt, 11, 5, 21), "Thanksgiving", cHolidayType_Full) -End Sub - - -Sub FindWholeYearHolidays_JP(ByVal YearInt as Integer) -Dim lDate& - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "元日", cHolidayType_Full) - ' 2nd Monday in January - CalInsertBankholiday(GetMonthDate(YearInt, 1, 2, 7), "成人の日", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 2, 11), "建国記念の日", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 3, 20), "春分の日", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 4, 29), "みどりの日", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 5, 3), "憲法記念日", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 5, 4), "国民の休日", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 5, 5), "こどもの日", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 9, 23), "秋分の日", cHolidayType_Full) - CalInsertBankholiday(GetMonthDate(YearInt, 10, 2, 7), "体育の日", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 11, 3), "文化の日", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 11, 23), "勤労感謝の日", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 12, 23), "天皇誕生日", cHolidayType_Full) - If YearInt > 2002 Then - CalInsertBankholiday(GetMonthDate(YearInt, 7, 2, 14), "海の日", cHolidayType_Full) - CalInsertBankholiday(GetMonthDate(YearInt, 9, 2, 14), "敬老の日", cHolidayType_Full) - Else - CalInsertBankholiday(DateSerial(YearInt, 7, 20), "海の日", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 9, 15), "敬老の日", cHolidayType_Full) - End If -End Sub - - -Sub FindWholeYearHolidays_TW(YearInt as Integer) - CalculateChineseNewYear(YearInt) - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "元旦", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 2, 28), "和平紀念日", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 3, 8), "婦女節", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 3, 29), "革命先烈紀念日(青年節)", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 4, 4), "兒童節", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 4, 5), "民族掃墓節", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 5, 1), "勞動節", cHolidayType_Full) - CalInsertBankholiday(GetNextWeekDay(YearInt, 5, 19, 2), "佛陀誕辰紀念日", cHolidayType_Full) ' Just like Columbus Day - CalInsertBankholiday(DateSerial(YearInt, 6, 15), "端午節", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 9, 3), "軍人節", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 9, 21), "中秋節", cHolidayType_Full) - CalInsertBankholiday(GetNextWeekDay(YearInt, 9, 28, 2), "孔子誕辰紀念日(教師節)", cHolidayType_Full) ' Just like Columnbusday - CalInsertBankholiday(DateSerial(YearInt, 10, 10), "國慶日", cHolidayType_Full) - CalInsertBankholiday(DateSerial(YearInt, 10, 25), "臺灣光復節", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 10, 31), "先總統 蔣公誕辰紀念日", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 12, 11), "國父誕辰紀念日(中華文化復興節)", cHolidayType_Half) - CalInsertBankholiday(DateSerial(YearInt, 12, 25), "行憲紀念日", cHolidayType_Half) -End Sub - - -Sub FindWholeYearHolidays_CN(YearInt as Integer) - CalculateChineseNewYear(YearInt) - CalInsertBankholiday(DateSerial(YearInt, 1, 1), "元旦", cHolidayType_Full) ' New Year - CalInsertBankholiday(DateSerial(YearInt, 3, 8), "妇女节", cHolidayType_Half) ' Women's Day - CalInsertBankholiday(DateSerial(YearInt, 4, 5), "清明节", cHolidayType_Half) ' Day of the deads - CalInsertBankholiday(DateSerial(YearInt, 5, 1), "劳动节", cHolidayType_Full) ' International Labour Day - CalInsertBankholiday(DateSerial(YearInt, 6, 1), "儿童节", cHolidayType_Half) ' Children's Day - CalInsertBankholiday(DateSerial(YearInt, 8, 1), "建军节", cHolidayType_Half) ' Foundation of military - CalInsertBankholiday(DateSerial(YearInt, 10, 1), "国庆节", cHolidayType_Full) ' National festival day -End Sub - - -' Unfortunately I could not find a Routine to convert a 'Moon Date' into a gregorian date -Sub CalculateChineseNewYear(iSelYear as Integer) -Dim lDate as Long - Select Case iSelYear - Case 1995 - lDate = DateSerial(iSelYear, 1, 31) - Case 1996 - lDate = DateSerial(iSelYear, 2, 19) - Case 1997 - lDate = DateSerial(iSelYear, 2, 7) - Case 1998 - lDate = DateSerial(iSelYear, 1, 28) - Case 1999 - lDate = DateSerial(iSelYear,2, 16) - Case 2000 - lDate = DateSerial(iSelYear,2, 5) - Case 2001 - lDate = DateSerial(iSelYear, 1, 24) - Case 2002 - lDate = DateSerial(iSelYear,2, 12) - Case 2003 - lDate = DateSerial(iSelYear,2, 1) - Case 2004 - lDate = DateSerial(iSelYear, 1, 22) - Case 2005 - lDate = DateSerial(iSelYear,2, 9) - Case 2006 - lDate = DateSerial(iSelYear, 1, 29) - Case 2007 - lDate = DateSerial(iSelYear,2, 18) - Case 2008 - lDate = DateSerial(iSelYear,2, 7) - Case 2009 - lDate = DateSerial(iSelYear, 1, 26) - Case 2010 - lDate = DateSerial(iSelYear,2, 10) - Case 2011 - lDate = DateSerial(iSelYear,2, 3) - Case 2012 - lDate = DateSerial(iSelYear, 1, 23) - Case 2013 - lDate = DateSerial(iSelYear,2, 10) - Case 2014 - lDate = DateSerial(iSelYear, 1, 31) - Case 2015 - lDate = DateSerial(iSelYear,2, 19) - Case 2016 - lDate = DateSerial(iSelYear,2, 9) - Case 2017 - lDate = DateSerial(iSelYear, 1, 28) - Case 2018 - lDate = DateSerial(iSelYear,2, 16) - Case 2019 - lDate = DateSerial(iSelYear,2, 5) - Case 2020 - lDate = DateSerial(iSelYear, 1, 25) - Case Else - Exit Sub - End Select - Select Case sCurCountryLocale - Case "CN" - CalInsertBankholiday(lDate-1, "农历除夕", cHolidayType_Full) - CalInsertBankholiday(lDate, "春节初一", cHolidayType_Full) - CalInsertBankholiday(lDate+1, "春节初二", cHolidayType_Full) - CalInsertBankholiday(lDate+2, "春节初三", cHolidayType_Full) - - Case Else - CalInsertBankholiday(lDate-1, "農曆除夕", cHolidayType_Full) - CalInsertBankholiday(lDate, "春節初一", cHolidayType_Full) - CalInsertBankholiday(lDate+1, "春節初二", cHolidayType_Full) - CalInsertBankholiday(lDate+2, "春節初三", cHolidayType_Full) - End Select -End Sub - - -Function CalculateJapaneseSpringDay(iSelYear as Integer) - If (iSelYear > 1979) And (iSelYear < 2100) Then - CalculateJapaneseSpringDay() = Int(20.8431 + 0.242194)* (iSelYear-1980) - (Int((iSelYear-1980)/4)) - End If -End Function - - -Function CalculateJapaneseAutumnDay(iSelYear as Integer) - If (iSelYear > 1979) And (iSelYear < 2100) Then - CalculateJapaneseAutumnDay() = Int(23.8431 + 0.242194)* (iSelYear-1980) - (Int((iSelYear-1980)/4)) - End If -End Function</script:module>
\ No newline at end of file diff --git a/wizards/source/schedule/OwnEvents.xba b/wizards/source/schedule/OwnEvents.xba deleted file mode 100644 index f141c2ab0..000000000 --- a/wizards/source/schedule/OwnEvents.xba +++ /dev/null @@ -1,217 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="OwnEvents" script:language="StarBasic">Option Explicit - -Public Const SBDATEUNDEFINED as Double = -98765432.1 - -Sub Main - Call CalAutopilotTable() -End Sub - - -Sub CalSaveOwnData() -Dim FileName as String -Dim FileChannel as Integer -Dim i as Integer - If bCalOwnDataChanged Then - FileName = GetPathSettings("UserConfig", False) & "/" & "DATE.DAT" - SaveDataToFile(FileName, DlgCalModel.lstOwnData.StringItemList()) - End If -End Sub - - -Sub CalLoadOwnData() -Dim FileName as String -Dim LocList() as String - FileName = GetPathSettings("UserConfig", False) & "/DATE.DAT" - If LoadDataFromFile(FileName, LocList()) Then - DlgCalModel.lstOwnData.StringItemList() = LocList() - End If -End Sub - - -Function CalCreateDateStrOfInput() as String -Dim DateStr as String -Dim CurOwnMonth as Integer -Dim CurOwnDay as Integer -Dim FormatDateStr as String -Dim dblDate as Double -Dim iLen as Integer -Dim iDiff as Integer -Dim i as Integer - CurOwnDay = DlgCalModel.txtOwnEventDay.Value - CurOwnMonth = DlgCalendar.GetControl("lstOwnEventMonth").getselectedItemPos() + 1 - DateStr = DateSerial(0, CurOwnMonth, CurOwnDay) - dblDate = CDbl(DateValue(DateStr)) - FormatDateStr = oNumberFormatter.convertNumberToString(lDateFormat, dblDate) - iLen = Len(FormatDateStr) - iDiff = 16 - iLen - If iDiff > 0 Then - For i = 0 To iDiff - FormatDateStr = FormatDateStr + " " - Next i - Else - MsgBox("Invalid DateFormat: 'FormatDateStr'", 16, sWizardTitle) - CalCreateDateStrOfInput = "" - Exit Function - End If - DateStr = FormatDateStr & Trim(DlgCalModel.txtEvent.Text) - CalCreateDateStrOfInput = DateStr -End Function - - - -Sub CalcmdInsertData() -Dim MaxIndex as Integer -Dim UIDateStr as String -Dim DateStr as String -Dim NewDate as Double -Dim bInserted as Boolean -Dim i as Integer -Dim CurOwnDay as Integer -Dim CurOwnMonth as Integer -Dim CurOwnYear as Integer - CurOwnDay = DlgCalModel.txtOwnEventDay.Value - CurOwnMonth = DlgCalendar.GetControl("lstOwnEventMonth").getSelectedItemPos() + 1 - UIDateStr = CalCreateDateStrOfInput() - NewDate = GetDateUnits(CurOwnDay, CurOwnMonth, UIDateStr) - If UIDateStr = "" Then Exit Sub - MaxIndex = Ubound(DlgCalModel.lstOwnData.StringItemList()) - If MaxIndex = -1 Then - DlgCalendar.GetControl("lstOwnData").AddItem(UIDateStr, 0 + 1) - bInserted = True - Else - Dim CurEvMonth(MaxIndex) as Integer - Dim CurEvDay(MaxIndex) as Integer - Dim CurDate(MaxIndex) as Double - ' same Years("no years" are treated like same years) -> delete old entry and insert new one - i = 0 - Do - CurDate(i) = GetSelectedDateUnits(CurEvDay(i), CurEvMonth(i), i) - If CurDate(i) = NewDate Then - DlgCalendar.GetControl("lstOwnData").RemoveItems(i,1) - DlgCalendar.GetControl("lstOwnData").AddItem(UIDateStr, i) - bInserted = True - End If - i = i + 1 - Loop Until bInserted Or i > MaxIndex - - ' There exists already a date - If Not bInserted Then - i = 0 - Do - If (CurEvMonth(i) = CurOwnMonth) And (CurEvDay(i) = CurOwnDay) Then - bInserted = True - DlgCalendar.GetControl("lstOwnData").RemoveItems(i,1) - DlgCalendar.GetControl("lstOwnData").AddItem(UIDateStr, i) - End If - i = i + 1 - Loop Until bInserted Or i > MaxIndex - End If - - ' The date is not yet existing and will will be sorted in accordingly - If Not bInserted Then - i = 0 - Do - bInserted = NewDate < CurDate(i) - If bInserted Then - DlgCalendar.GetControl("lstOwnData").AddItem(UIDateStr, i) - End If - i = i + 1 - Loop Until bInserted Or i > MaxIndex - If Not bInserted Then - DlgCalendar.GetControl("lstOwnData").AddItem(UIDateStr, MaxIndex+1) - End If - End If - End If - bCalOwnDataChanged = True - Call CalClearInputMask() -End Sub - - -Function GetSelectedDateUnits(CurEvDay as Integer, CurEvMonth as Integer, i as Integer) as Double -Dim dblDate as Double -Dim DateStr as String - dblDate = SBDATEUNDEFINED - DateStr = DlgCalModel.lstOwnData.StringItemList(i) - If DateStr <> "" Then - dblDate = GetDateUnits(CurEvDay, CurEvMonth, DateStr) - End If - GetSelectedDateUnits() = dblDate -End Function - - -Function GetDateUnits(CurEvDay as Integer, CurEvMonth as Integer, DateStr) as Double -Dim bEventOnce as String -Dim LocDateStr as String -Dim dblDate as Double -Dim lDate as Long - LocDateStr = Mid(DateStr, 1, 15) - LocDateStr = Trim(LocDateStr) - - bEventOnce = True - On Local Error Goto NODATEFORMAT - dblDate = oNumberFormatter.convertStringToNumber(lDateFormat, LocDateStr) - lDate = Clng(dblDate) - CurEvMonth = Month(lDate) - CurEvDay = Day(lDate) - GetDateUnits() = dblDate - Exit Function - GetDateUnits() =SBDATEUNDEFINED -NODATEFORMAT: - If Err <> 0 Then - MsgBox("Error: Date : ' " & LocDateStr & "' is not a valid Format", 16, sWizardTitle) - Resume GETRETURNVALUE -GETRETURNVALUE: - GetDateUnits() = SBDATEUNDEFINED - End If -End Function - - -Function CalGetNameOfEvent(ByVal ListIndex as Integer) as String -Dim NameStr as String - NameStr = DlgCalModel.lstOwnData.StringItemList(ListIndex) - NameStr = Trim (Mid(NameStr, 16)) - CalGetNameOfEvent = NameStr -End Function - - - -Sub CheckInsertedDates(Optional ControlEnvironment, Optional CurOwnMonth as Integer) -Dim EvYear as Long -Dim EvDay as Long -Dim sEvMonth as String -Dim bDoEnable as Boolean -Dim ListboxName as String -Dim MaxValue as Integer - If Not IsMissing(ControlEnvironment) Then - CurOwnMonth = DlgCalendar.GetControl("lstOwnEventMonth").getSelectedItemPos()+1 - End If - EvYear = Year(Now()) - bDoEnable = CurOwnMonth <> 0 - If bDoEnable Then - MaxValue = CalMaxDayInMonth(EvYear, CurOwnMonth) - DlgCalModel.txtOwnEventDay.ValueMax = MaxValue - If DlgCalModel.txtOwnEventDay.Value > MaxValue Then - DlgCalModel.txtOwnEventDay.Value = MaxValue - End If - bDoEnable = DlgCalModel.txtOwnEventDay.Value <> 0 - If bDoEnable Then - bDoEnable = Ubound(DlgCalModel.lstOwnEventMonth.SelectedItems()) > -1 - If bDoEnable Then - bDoEnable = LTrim(DlgCalModel.txtEvent.Text) <> "" - End If - End If - End If - DlgCalModel.cmdInsert.Enabled = bDoEnable -End Sub - - -Sub GetOwnMonth() -Dim EvYear as Integer -Dim CurOwnMonth as Integer - EvYear = year(now()) - CurOwnMonth = DlgCalModel.lstOwnEventMonth.SelectedItems(0) + 1 - DlgCalModel.txtOwnEventDay.ValueMax = CalMaxDayInMonth(EvYear, CurOwnMonth) - CheckInsertedDates(,CurOwnMonth) -End Sub</script:module>
\ No newline at end of file diff --git a/wizards/source/schedule/delzip b/wizards/source/schedule/delzip deleted file mode 100644 index e69de29bb..000000000 --- a/wizards/source/schedule/delzip +++ /dev/null diff --git a/wizards/source/schedule/dialog.xlb b/wizards/source/schedule/dialog.xlb deleted file mode 100644 index b1afde681..000000000 --- a/wizards/source/schedule/dialog.xlb +++ /dev/null @@ -1,5 +0,0 @@ -<?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="Schedule" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="DlgCalendar"/> -</library:library> diff --git a/wizards/source/schedule/schedule.src b/wizards/source/schedule/schedule.src deleted file mode 100644 index 3116f0f41..000000000 --- a/wizards/source/schedule/schedule.src +++ /dev/null @@ -1,357 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/// Dialog labels start at 1000 -#define dlgCalTitle 1000 -#define dlgCalTitleBack 1001 -#define dlgCalTitleOwnData 1002 -#define dlgSchdlTitle 1003 -#define dlgOK 1004 -#define dlgCancel 1005 -#define dlgCalFrameOption 1006 -#define dlgCalOptionYear 1007 -#define dlgCalOptionMonth 1008 -#define dlgSchdlDescription 1009 -#define dlgSchdlCountry 1010 -#define dlgTime 1011 -#define dlgYear 1012 -#define dlgCalMonth 1013 -#define dlgSpecificBankholidays 1014 -#define dlgCalOwnData 1015 -#define dlgCalInsert 1016 -#define dlgCalDelete 1017 -#define dlgCalNewEvent 1018 -#define dlgCalEvent 1019 -#define dlgCalEventOnce 1020 -#define dlgCalEventDay 1021 -#define dlgCalEventMonth 1022 -#define dlgCalEventYear 1023 - -// Bitmap file is 1099 -#define dlgBitmapFile 1099 - -// Names of states start at 1100 -#define dlgState 1100 - -// Months start at 1200 -#define dlgMonth 1200 - -// Messages start at 1300 -#define msgCalErrorTitle 1300 -#define msgCalError 1301 -#define msgCalRemoveTitle 1302 -#define msgCalRemove 1303 - -// Styles start at 1400 -#define stlWorkday 1400 -#define stlWeekend 1401 - -// Sheet names start at 1410 -#define nameCalYear 1410 -#define nameCalMonth 1411 - -#define sProgress 1500 - -// -------------------------------------------------------------------- - -String dlgCalTitle -{ -Text [ en-US ] = "%PRODUCTNAME Calendar"; -}; - -String dlgCalTitleBack -{ -Text [ en-US ] = "Back"; -}; - -String dlgCalTitleOwnData -{ -Text [ en-US ] = "Personal Data"; -}; - -String dlgSchdlTitle -{ -Text [ en-US ] = "Add Holidays to Calendar"; -}; - -String dlgOK -{ -Text [ en-US ] = "Create"; -}; - -String dlgCancel -{ -Text [ en-US ] = "Cancel"; -}; - -String dlgCalFrameOption -{ -Text [ en-US ] = "Calendar"; -}; - -String dlgCalOptionYear -{ -Text [ en-US ] = "~Year Overview"; -}; - -String dlgCalOptionMonth -{ -Text [ en-US ] = "~Month"; -}; - -String dlgSchdlDescription -{ -Text [ en-US ] = "Add holidays for"; -}; - -String dlgSchdlCountry -{ -Text [ en-US ] = "USA"; -}; - -String dlgTime -{ -Text [ en-US ] = "Time Frame"; -}; - -String dlgYear -{ -Text [ en-US ] = "Year"; -}; - -String dlgCalMonth -{ -Text [ en-US ] = "Month"; -}; - -String dlgSpecificBankholidays -{ -Text [ en-US ] = "-"; -}; - -String dlgCalOwnData -{ -Text [ en-US ] = "Personal Data"; -}; - -String dlgCalInsert -{ -Text [ en-US ] = "~Insert"; -}; - -String dlgCalDelete -{ -Text [ en-US ] = "~Delete"; -}; - -String dlgCalNewEvent -{ -Text [ en-US ] = "New Event"; -}; - -String dlgCalEvent -{ -Text [ en-US ] = "Event"; -}; - -String dlgCalEventOnce -{ -Text [ en-US ] = "One-Time"; -}; - -String dlgCalEventDay -{ -Text [ en-US ] = "Day"; -}; - -String dlgCalEventMonth -{ -Text [ en-US ] = "Month"; -}; - -String dlgCalEventYear -{ -Text [ en-US ] = "Year"; -}; - -// -------------------------------------------------------------------- - -String dlgBitmapFile -{ -Text [ en-US ] = "usa.bmp"; - -}; - -// -------------------------------------------------------------------- - -String dlgState -{ -Text [ en-US ] = "Public holidays"; -}; - - -// -------------------------------------------------------------------- - -String dlgMonth -{ -Text [ en-US ] = "January"; -}; - -String dlgMonth+1 -{ -Text [ en-US ] = "February"; -}; - -String dlgMonth+2 -{ -Text [ en-US ] = "March"; -}; - -String dlgMonth+3 -{ -Text [ en-US ] = "April"; -}; - -String dlgMonth+4 -{ -Text [ en-US ] = "May"; -}; - -String dlgMonth+5 -{ -Text [ en-US ] = "June"; -}; - -String dlgMonth+6 -{ -Text [ en-US ] = "July"; -}; - -String dlgMonth+7 -{ -Text [ en-US ] = "August"; -}; - -String dlgMonth+8 -{ -Text [ en-US ] = "September"; -}; - -String dlgMonth+9 -{ -Text [ en-US ] = "October"; -}; - -String dlgMonth+10 -{ -Text [ en-US ] = "November"; -}; - -String dlgMonth+11 -{ -Text [ en-US ] = "December"; -}; - -// -------------------------------------------------------------------- - -String msgCalErrorTitle -{ -Text [ en-US ] = "Yearly / Monthly Calendar"; -}; - -String msgCalError -{ -Text [ en-US ] = "An error occurred while creating the calendar."; -}; - -String msgCalRemoveTitle -{ -Text [ en-US ] = "Delete event entries"; -}; - -String msgCalRemove -{ -Text [ en-US ] = "Delete the selected entries?"; -}; - -// -------------------------------------------------------------------- - -String stlWorkday -{ -Text [ en-US ] = "Workweek"; -}; - -String stlWeekend -{ -Text [ en-US ] = "Weekend"; -}; - -// -------------------------------------------------------------------- - -String nameCalYear -{ -Text [ en-US ] = "Calendar"; -}; - -String nameCalMonth -{ -Text [ en-US ] = "Month"; -}; - - - -String sProgress -{ -Text [ en-US ] = "Progress:"; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/wizards/source/schedule/script.xlb b/wizards/source/schedule/script.xlb deleted file mode 100644 index 96dd8da57..000000000 --- a/wizards/source/schedule/script.xlb +++ /dev/null @@ -1,12 +0,0 @@ -<?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="Schedule" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="OwnEvents"/> - <library:element library:name="CalendarMain"/> - <library:element library:name="BankHoliday"/> - <library:element library:name="DlgControl"/> - <library:element library:name="Language"/> - <library:element library:name="CreateTable"/> - <library:element library:name="GermanHolidays"/> - <library:element library:name="LocalHolidays"/> -</library:library> diff --git a/wizards/source/standard/Module1.xba b/wizards/source/standard/Module1.xba deleted file mode 100644 index d7e2398cc..000000000 --- a/wizards/source/standard/Module1.xba +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Module1" script:language="StarBasic">REM ***** BASIC ***** - -Sub Main - -End Sub</script:module>
\ No newline at end of file diff --git a/wizards/source/standard/delzip b/wizards/source/standard/delzip deleted file mode 100644 index e69de29bb..000000000 --- a/wizards/source/standard/delzip +++ /dev/null diff --git a/wizards/source/standard/dialog.xlb b/wizards/source/standard/dialog.xlb deleted file mode 100644 index 669529dbc..000000000 --- a/wizards/source/standard/dialog.xlb +++ /dev/null @@ -1,3 +0,0 @@ -<?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="Standard" library:readonly="false" library:passwordprotected="false"/> diff --git a/wizards/source/standard/script.xlb b/wizards/source/standard/script.xlb deleted file mode 100644 index 67c9503b7..000000000 --- a/wizards/source/standard/script.xlb +++ /dev/null @@ -1,5 +0,0 @@ -<?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="Standard" library:readonly="false" library:passwordprotected="false"> - <library:element library:name="Module1"/> -</library:library> diff --git a/wizards/source/template/Autotext.xba b/wizards/source/template/Autotext.xba deleted file mode 100644 index 27a7bca12..000000000 --- a/wizards/source/template/Autotext.xba +++ /dev/null @@ -1,173 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Autotext" script:language="StarBasic">Option Explicit - -Public UserfieldDataType(14) as String -Public oDocAuto as Object -Public BulletList(7) as Integer -Public sTextFieldNotDefined as String -Public sGeneralError as String - - -Sub Main() - Dim oCursor as Object - Dim oStyles as Object - Dim oSearchDesc as Object - Dim oFoundall as Object - Dim oFound as Object - Dim i as Integer - Dim sFoundString as String - Dim sFoundContent as String - Dim FieldStringThere as String - Dim ULStringThere as String - Dim PHStringThere as String - On Local Error Goto GENERALERROR - ' Initialization... - BasicLibraries.LoadLibrary("Tools") - If InitResources("'Template'", "tpl") Then - sGeneralError = GetResText(1302) - sTextFieldNotDefined = GetResText(1400) - End If - - UserfieldDatatype(0) = "COMPANY" - UserfieldDatatype(1) = "FIRSTNAME" - UserfieldDatatype(2) = "NAME" - UserfieldDatatype(3) = "SHORTCUT" - UserfieldDatatype(4) = "STREET" - UserfieldDatatype(5) = "COUNTRY" - UserfieldDatatype(6) = "ZIP" - UserfieldDatatype(7) = "CITY" - UserfieldDatatype(8) = "TITLE" - UserfieldDatatype(9) = "POSITION" - UserfieldDatatype(10) = "PHONE_PRIVATE" - UserfieldDatatype(11) = "PHONE_COMPANY" - UserfieldDatatype(12) = "FAX" - UserfieldDatatype(13) = "EMAIL" - UserfieldDatatype(14) = "STATE" - BulletList(0) = 149 - BulletList(1) = 34 - BulletList(2) = 65 - BulletList(3) = 61 - BulletList(4) = 49 - BulletList(5) = 47 - BulletList(6) = 79 - BulletList(7) = 58 - - oDocAuto = ThisComponent - oStyles = oDocAuto.Stylefamilies.GetByName("NumberingStyles") - - ' Prepare the Search-Descriptor - oSearchDesc = oDocAuto.createsearchDescriptor() - oSearchDesc.SearchRegularExpression = True - oSearchDesc.SearchWords = True - oSearchDesc.SearchString = "<[^>]+>" - oFoundall = oDocAuto.FindAll(oSearchDesc) - - 'Loop over the foundings - For i = 0 To oFoundAll.Count - 1 - oFound = oFoundAll.GetByIndex(i) - sFoundString = oFound.String - 'Extract the string inside the brackets - sFoundContent = FindPartString(sFoundString,"<",">",1) - sFoundContent = LTrim(sFoundContent) - - ' Define the Cursor and place it on the founding - oCursor = oFound.Text.CreateTextCursorbyRange(oFound) - - ' Find out, which object is to be created... - FieldStringThere = Instr(1,sFoundContent,"Field") - ULStringThere = Instr(1,sFoundContent,"UL") - PHStringThere = Instr(1,sFoundContent,"Placeholder") - If FieldStringThere = 1 Then - CreateUserDatafield(oCursor, sFoundContent) - ElseIf ULStringThere = 1 Then - CreateBullet(oCursor, oStyles) - ElseIf PHStringThere = 1 Then - CreatePlaceholder(oCursor, sFoundContent) - End If - Next i - - GENERALERROR: - If Err <> 0 Then - Msgbox(sGeneralError,16, GetProductName()) - Resume LETSGO - End If - LETSGO: -End Sub - - -' creates a User - datafield out of a string with the following structure -' "<field:Company>" -Sub CreateUserDatafield(oCursor, sFoundContent as String) - Dim MaxIndex as Integer - Dim sFoundList(3) - Dim oUserfield as Object - Dim UserInfo as String - Dim UserIndex as Integer - - oUserfield = oDocAuto.CreateInstance("com.sun.star.text.TextField.ExtendedUser") - sFoundList() = ArrayoutofString(sFoundContent,":",MaxIndex) - UserInfo = UCase(LTrim(sFoundList(1))) - UserIndex = IndexinArray(UserInfo, UserfieldDatatype()) - If UserIndex <> -1 Then - oUserField.UserDatatype = UserIndex - oCursor.Text.InsertTextContent(oCursor,oUserField,True) - oUserField.IsFixed = True - Else - Msgbox(UserInfo &": " & sTextFieldNotDefined,16, GetProductName()) - End If -End Sub - - -' Creates a Bullet by setting a soft Formatation on the first unsorted List-Templates with a defined -' Bullet Id -Sub CreateBullet(oCursor, oStyles as Object) - Dim n, m, s as Integer - Dim StyleSet as Boolean - Dim ostyle as Object - Dim StyleName as String - Dim alevel() - StyleSet = False - For s = 0 To Ubound(BulletList()) - For n = 0 To oStyles.Count - 1 - ostyle = oStyles.getbyindex(n) - StyleName = oStyle.Name - alevel() = ostyle.NumberingRules.getbyindex(0) - ' The properties of the style are stored in a Name-Value-Array() - For m = 0 to Ubound(alevel()) - ' Set the first Numbering template without a bulletID - If (aLevel(m).Name = "BulletId") Then - If alevel(m).Value = BulletList(s) Then - oCursor.NumberingStyle = StyleName - oCursor.SetString("") - exit Sub - End if - End If - Next m - Next n - Next s - If Not StyleSet Then - ' The Template with the demanded BulletID is not available, so take the first style in the sequence - ' that has a defined Bullet ID - oCursor.NumberingStyleName = oStyles.GetByIndex(5).Name - oCursor.SetString("") - End If -End Sub - - -' Creates a placeholder out of a string with the following structure: -'<placeholder:Showtext:Helptext> -Sub CreatePlaceholder(oCursor as Object, sFoundContent as String) - Dim oPlaceholder as Object - Dim MaxIndex as Integer - Dim sFoundList(3) - oPlaceholder = oDocAuto.CreateInstance("com.sun.star.text.TextField.JumpEdit") - sFoundList() = ArrayoutofString(sFoundContent, ":" & chr(34),MaxIndex) - ' Delete The Double-quotes - oPlaceholder.Hint = DeleteStr(sFoundList(2),chr(34)) - oPlaceholder.placeholder = DeleteStr(sFoundList(1),chr(34)) - oCursor.Text.InsertTextContent(oCursor,oPlaceholder,True) -End Sub - - -</script:module>
\ No newline at end of file diff --git a/wizards/source/template/Correspondence.xba b/wizards/source/template/Correspondence.xba deleted file mode 100644 index 03c7ef77f..000000000 --- a/wizards/source/template/Correspondence.xba +++ /dev/null @@ -1,286 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Correspondence" script:language="StarBasic">Option Explicit - -Public msgNoTextmark$, msgError$ -Public sAddressbook$ -Public Table -Public sCompany$, sFirstName$, sLastName$, sStreet$, sPostalCode$, sCity$, sState$, sInitials$, sPosition$ -Public DialogExited -Public oDocument, oText, oBookMarks, oBookMark, oBookMarkCursor, oBookText as Object -Public bTemplate, bDBFields as Boolean - -Sub Main - bTemplate = true - BasicLibraries.LoadLibrary("Tools") - TemplateDialog = LoadDialog("Template", "TemplateDialog") - DialogModel = TemplateDialog.Model - DialogModel.Step = 2 - DialogModel.Optmerge.State = True - LoadLanguageCorrespondence() - TemplateDialog.Execute - TemplateDialog.Dispose() -End Sub - - -Sub Placeholder - bTemplate = false - BasicLibraries.LoadLibrary("Tools") - LoadLanguageCorrespondence() - bDBFields = false - OK() -End Sub - - -Sub Database - bTemplate = false - BasicLibraries.LoadLibrary("Tools") - LoadLanguageCorrespondence() - bDBFields = true - OK() -End Sub - - -Function LoadLanguageCorrespondence() as Boolean - If InitResources("'Template'", "tpl") Then - msgNoTextmark$ = GetResText(1303) & Chr(13) & Chr(10) & GetResText(1301) - msgError$ = GetResText(1302) - If bTemplate Then - DialogModel.Title = GetResText(1303+3) - DialogModel.CmdCancel.Label = GetResText(1102) - DialogModel.CmdCorrGoOn.Label = GetResText(1103) - DialogModel.OptSingle.Label = GetResText(1303 + 1) - DialogModel.Optmerge.Label = GetResText(1303 + 2) - DialogModel.FrmLetter.Label = GetResText(1303) - End If - LoadLanguageCorrespondence() = True - Else - msgbox("Warning: Resource could not be loaded!") - End If -End Function - - -Function GetFieldName(oFieldKnot as Object, GeneralFieldName as String) - If oFieldKnot.HasByName(GeneralFieldName) Then - GetFieldName = oFieldKnot.GetByName(GeneralFieldName).AssignedFieldName - Else - GetFieldName = "" - End If -End Function - - -Sub OK -Dim ParaBreak -Dim sDocLang as String -Dim oSearchDesc as Object -Dim oFoundAll as Object -Dim oFound as Object -Dim sFoundContent as String -Dim sFoundString as String -Dim sDBField as String -Dim i as Integer -Dim oDBAccess as Object -Dim oAddressDialog as Object -Dim oAddressPilot as Object -Dim oFields as Object -Dim oDocSettings as Object -Dim oContext as Object -Dim bDBvalid as Boolean - 'On Local Error Goto GENERALERROR - - If bTemplate Then - bDBFields = DialogModel.Optmerge.State 'database or placeholder - TemplateDialog.EndExecute() - DialogExited = TRUE - End If - - If bDBFields Then - oDBAccess = GetRegistryKeyContent("org.openoffice.Office.DataAccess/AddressBook/") - sAddressbook = oDBAccess.DataSourceName - - bDBvalid = false - oContext = createUnoService( "com.sun.star.sdb.DatabaseContext" ) - - If (not isNull(oContext)) Then - 'Is the previously assigned address data source still valid? - bDBvalid = oContext.hasByName(sAddressbook) - end if - - If (bDBvalid = false) Then - oAddressPilot = createUnoService("com.sun.star.ui.dialogs.AddressBookSourcePilot") - oAddressPilot.execute - - oDBAccess = GetRegistryKeyContent("org.openoffice.Office.DataAccess/AddressBook/") - sAddressbook = oDBAccess.DataSourceName - If sAddressbook = "" Then - MsgBox(GetResText(1301)) - Exit Sub - End If - End If - oFields = oDBAccess.GetByName("Fields") - Table = oDBAccess.GetByName("Command") - End If - - ParaBreak = com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK - oDocument = ThisComponent - If bDBFields Then - 'set the address db as current db at the document - oDocSettings = oDocument.createInstance("com.sun.star.document.Settings") - oDocSettings.CurrentDatabaseDataSource = sAddressbook - oDocSettings.CurrentDatabaseCommand = Table - oDocSettings.CurrentDatabaseCommandType = 0 - End If - oBookmarks = oDocument.Bookmarks - oText = oDocument.Text - - oSearchDesc = oDocument.createsearchDescriptor() - oSearchDesc.SearchRegularExpression = True - oSearchDesc.SearchWords = True - oSearchDesc.SearchString = "<[^>]+>" - oFoundall = oDocument.FindAll(oSearchDesc) - - 'Loop over the foundings - For i = oFoundAll.Count -1 To 0 Step -1 - oFound = oFoundAll.GetByIndex(i) - sFoundString = oFound.String - 'Extract the string inside the brackets - sFoundContent = FindPartString(sFoundString,"<",">",1) - sFoundContent = LTrim(sFoundContent) - ' Define the Cursor and place it on the founding - oBookmarkCursor = oFound.Text.CreateTextCursorbyRange(oFound) - oBookText = oFound.Text - If bDBFields Then - sDBField = GetFieldname(oFields, sFoundContent) - If sDBField <> "" Then - InsertDBField(sAddressbook, Table, sDBField) - Else - InsertPlaceholder(sFoundContent) - End If - Else - InsertPlaceholder(sFoundContent) - End If - Next i - If bDBFields Then - 'Open the DB beamer with the right DB - Dim oDisp as Object - Dim oTransformer - Dim aURL as new com.sun.star.util.URL - aURL.complete = ".component:DB/DataSourceBrowser" - oTransformer = createUnoService("com.sun.star.util.URLTransformer") - oTransformer.parseStrict(aURL) - oDisp = oDocument.getCurrentController.getFrame.queryDispatch(aURL, "_beamer", com.sun.star.frame.FrameSearchFlag.CHILDREN + com.sun.star.frame.FrameSearchFlag.CREATE) - Dim aArgs(3) as new com.sun.star.beans.PropertyValue - aArgs(1).Name = "DataSourceName" - aArgs(1).Value = sAddressbook - aArgs(2).Name = "CommandType" - aArgs(2).Value = com.sun.star.sdb.CommandType.TABLE - aArgs(3).Name = "Command" - aArgs(3).Value = Table - oDisp.dispatch(aURL, aArgs()) - End If - - GENERALERROR: - If Err <> 0 Then - Msgbox(msgError$,16, GetProductName()) - Resume LETSGO - End If - LETSGO: - -End Sub - - -Sub InsertDBField(sDBName as String, sTableName as String, sColName as String) -Dim oFieldMaster, oField as Object - If sColname <> "" Then - oFieldMaster = oDocument.createInstance("com.sun.star.text.FieldMaster.Database") - oField = oDocument.createInstance("com.sun.star.text.TextField.Database") - oFieldMaster.DataBaseName = sDBName - oFieldMaster.DataBaseName = sDBName - oFieldMaster.DataTableName = sTableName - oFieldMaster.DataColumnName = sColName - oField.AttachTextfieldmaster (oFieldMaster) - oBookText.InsertTextContent(oBookMarkCursor, oField, True) - oField.Content = "<" & sColName & ">" - End If -End Sub - - -Sub InsertPlaceholder(sColName as String) -Dim oFieldMaster as Object -Dim bCorrectField as Boolean - If sColname <> "" Then - bCorrectField = True - oFieldMaster = oDocument.createInstance("com.sun.star.text.TextField.JumpEdit") - Select Case sColName - Case "Company" - oFieldMaster.PlaceHolder = getResText(1350+1) - Case "Department" - oFieldMaster.PlaceHolder = getResText(1350+2) - Case "FirstName" - oFieldMaster.PlaceHolder = getResText(1350+3) - Case "LastName" - oFieldMaster.PlaceHolder = getResText(1350+4) - Case "Street" - oFieldMaster.PlaceHolder = getResText(1350+5) - Case "Country" - oFieldMaster.PlaceHolder = getResText(1350+6) - Case "Zip" - oFieldMaster.PlaceHolder = getResText(1350+7) - Case "City" - oFieldMaster.PlaceHolder = getResText(1350+8) - Case "Title" - oFieldMaster.PlaceHolder = getResText(1350+9) - Case "Position" - oFieldMaster.PlaceHolder = getResText(1350+10) - Case "AddrForm" - oFieldMaster.PlaceHolder = getResText(1350+11) - Case "Code" - oFieldMaster.PlaceHolder = getResText(1350+12) - Case "AddrFormMail" - oFieldMaster.PlaceHolder = getResText(1350+13) - Case "PhonePriv" - oFieldMaster.PlaceHolder = getResText(1350+14) - Case "PhoneComp" - oFieldMaster.PlaceHolder = getResText(1350+15) - Case "Fax" - oFieldMaster.PlaceHolder = getResText(1350+16) - Case "EMail" - oFieldMaster.PlaceHolder = getResText(1350+17) - Case "URL" - oFieldMaster.PlaceHolder = getResText(1350+18) - Case "Note" - oFieldMaster.PlaceHolder = getResText(1350+19) - Case "Altfield1" - oFieldMaster.PlaceHolder = getResText(1350+20) - Case "Altfield2" - oFieldMaster.PlaceHolder = getResText(1350+21) - Case "Altfield3" - oFieldMaster.PlaceHolder = getResText(1350+22) - Case "Altfield4" - oFieldMaster.PlaceHolder = getResText(1350+23) - Case "Id" - oFieldMaster.PlaceHolder = getResText(1350+24) - Case "State" - oFieldMaster.PlaceHolder = getResText(1350+25) - Case "PhoneOffice" - oFieldMaster.PlaceHolder = getResText(1350+26) - Case "Pager" - oFieldMaster.PlaceHolder = getResText(1350+27) - Case "PhoneCell" - oFieldMaster.PlaceHolder = getResText(1350+28) - Case "PhoneOther" - oFieldMaster.PlaceHolder = getResText(1350+29) - Case "CalendarURL" - oFieldMaster.PlaceHolder = getResText(1350+30) - Case "InviteParticipant" - oFieldMaster.PlaceHolder = getResText(1350+31) - Case Else - bCorrectField = False - End Select - If bCorrectField Then - oFieldMaster.Hint = getResText(1350) - oBookText.InsertTextContent(oBookMarkCursor, oFieldMaster, True) - End If - End If -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/template/DialogStyles.xdl b/wizards/source/template/DialogStyles.xdl deleted file mode 100644 index 35042849c..000000000 --- a/wizards/source/template/DialogStyles.xdl +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DialogStyles" dlg:left="170" dlg:top="93" dlg:width="120" dlg:height="169" dlg:help-url="HID:WIZARDS_HID_DLGSTYLES_DIALOG" dlg:closeable="true" dlg:moveable="true"> - <dlg:bulletinboard> - <dlg:button dlg:id="cmdCancel" dlg:tab-index="0" dlg:left="5" dlg:top="150" dlg:width="50" dlg:height="13" dlg:help-url="HID:WIZARDS_HID_DLGSTYLES_CANCEL" dlg:value="cmdCancel"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Template.Samples.RestoreCurrentStyles?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdOk" dlg:tab-index="1" dlg:left="65" dlg:top="150" dlg:width="50" dlg:height="12" dlg:help-url="HID:WIZARDS_HID_DLGSTYLES_OKAY" dlg:value="cmdOk"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Template.Samples.CloseStyleDialog?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:menulist dlg:id="lbStyles" dlg:tab-index="2" dlg:left="5" dlg:top="5" dlg:width="110" dlg:height="133" dlg:help-url="HID:WIZARDS_HID_DLGSTYLES_LISTBOX"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Template.Samples.SelectStyle?language=Basic&location=application" script:language="Script"/> - </dlg:menulist> - </dlg:bulletinboard> -</dlg:window>
\ No newline at end of file diff --git a/wizards/source/template/ModuleAgenda.xba b/wizards/source/template/ModuleAgenda.xba deleted file mode 100644 index 73b0c6cfd..000000000 --- a/wizards/source/template/ModuleAgenda.xba +++ /dev/null @@ -1,203 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ModuleAgenda" script:language="StarBasic">' All variables must be declared before use -Option Explicit - -' Used for "disabling" the cancel button of the dialog -Public DialogExited As Boolean -Dim DlgAgenda_gMyName as String -Public TemplateDialog as Object -Public DialogModel as Object -Public sTrueContent as String -Public Bookmarkname as String - - - -Sub Initialize() -' User sets the type of minutes - BasicLibraries.LoadLibrary( "Tools" ) - TemplateDialog = LoadDialog("Template", "TemplateDialog") - DialogModel = TemplateDialog.Model - DialogModel.Step = 1 - LoadLanguageAgenda() - DialogModel.OptAgenda2.State = TRUE - GetOptionValues() - DialogExited = FALSE - TemplateDialog.Execute -End Sub - - -Sub LoadLanguageAgenda() - If InitResources("'Template'", "tpl") Then - DlgAgenda_gMyName = GetResText(1200) - DialogModel.CmdCancel.Label = GetResText(1102) - DialogModel.CmdAgdGoon.Label = GetResText(1103) -' DlgAgenda_gMsgNoCancel$ = GetResText(1201) - DialogModel.FrmAgenda.Label = GetResText(1202) - DialogModel.OptAgenda1.Label = GetResText(1203) - DialogModel.OptAgenda2.Label = GetResText(1204) -' DialogModel.OptAgenda1.State = 1 - End If -End Sub - - -Sub ModifyTemplate() -Dim oDocument, oBookmarks, oBookmark, oBookmarkCursor, oTextField as Object -Dim i as Integer - - oDocument = ThisComponent - oBookMarks = oDocument.Bookmarks - - On Local Error Goto NOBOOKMARK - TemplateDialog.EndExecute - DialogExited = TRUE - oBookmarkCursor = CreateBookmarkCursor(oDocument, BookmarkName) - oBookmarkCursor.Text.insertString(oBookmarkCursor,"",True) - ' Delete all the Bookmarks except for the one named "NextTopic" - For i = oBookmarks.Count-1 To 0 Step -1 - oBookMark = oBookMarks.GetByIndex(i) - If oBookMark.Name <> "NextTopic" Then - oBookMark.Dispose() - End If - Next i - oBookMarkCursor = CreateBookmarkCursor(oDocument, "NextTopic") - If Not IsNull(oBookMarkCursor) Then - oTextField = oBookMarkCursor.TextField -' oTextField.TrueContent = sTrueContent - oTextField.Content = sTrueContent - End If - - NOBOOKMARK: - If Err <> 0 Then - RESUME NEXT - End If -End Sub - - -Sub NewTopic -' Add a new topic to the agenda -Dim oDocument, oBookmarks, oBookmark, oBookmarkCursor, oTextField as Object -Dim oBaustein, oAutoText, oAutoGroup as Object -Dim i as Integer - - oDocument = ThisComponent - oBookMarkCursor = CreateBookMarkCursor(oDocument, "NextTopic") - oTextField = oBookMarkCursor.TextField - oAutoText = CreateUnoService("com.sun.star.text.AutoTextContainer") - If oAutoText.HasbyName("template") Then - oAutoGroup = oAutoText.GetbyName("template") - If oAutoGroup.HasbyName(oTextField.Content) Then - oBaustein = oAutoGroup.GetbyName(oTextField.Content) - oBaustein.ApplyTo(oBookMarkCursor) - Else - Msgbox("AutoText '" & oTextField.Content & "' is not existing. Cannot insert additional topic!") - End If - Else - Msgbox("AutoGroupField template is not existing. Cannot insert additional topic!", 16, DlgAgenda_gMyName ) - End If -End Sub - - - -' Add initials, date and time at bottom of agenda, disable and hide command buttons -Sub FinishAgenda -Dim BtnAddAgendaTopic As Object -Dim BtnFinishAgenda As Object -Dim oUserField, oDateTimeField as Object -Dim oBookmarkCursor as Object -Dim oFormats, oLocale as Object -Dim iDateTimeKey as Integer - - BasicLibraries.LoadLibrary( "Tools" ) - oDocument = ThisComponent - - oUserField = oDocument.CreateInstance("com.sun.star.text.TextField.ExtendedUser") - oUserField.UserDatatype = com.sun.star.text.UserDataPart.SHORTCUT - - oDateTimeField = oDocument.CreateInstance("com.sun.star.text.TextField.DateTime") - - ' Assign Standardformat to Datetime-Textfield - oFormats = oDocument.Numberformats - oLocale = oDocument.CharLocale - iDateTimeKey = oFormats.GetStandardFormat(com.sun.star.util.NumberFormat.DATETIME,oLocale) - oDateTimeField.NumberFormat = iDateTimeKey - - oBookmarkCursor = CreateBookmarkCursor(oDocument, "NextTopic") - oBookmarkCursor.Text.InsertTextContent(oBookmarkCursor,oUserField,False) - oBookmarkCursor.Text.InsertString(oBookmarkCursor," ",False) - oBookmarkCursor.Text.InsertTextContent(oBookmarkCursor,oDateTimeField,False) - BtnAddAgendaTopic = getControlModel(oDocument, "BtnAddAgendaTopic") - BtnFinishAgenda = getControlModel(oDocument, "BtnFinishAgenda") - If Not IsNull(BtnAddAgendaTopic) Then BtnAddAgendaTopic.Enabled = FALSE - If Not IsNull(BtnFinishAgenda) Then BtnFinishAgenda.Enabled = FALSE -End Sub - - -Function CreateBookMarkCursor(oDocument as Object,sBookmarkName as String) - oBookMarks = oDocument.Bookmarks - If oBookmarks.HasbyName(sBookmarkName) Then - oBookMark = oBookMarks.GetbyName(sBookmarkName) - CreateBookMarkCursor = oBookMark.Anchor.Text.CreateTextCursorByRange(oBookMark.Anchor) - Else - Msgbox "Bookmark " & sBookmarkName & " is not defined!" - End If -End Function - - - -Sub DeleteButtons -Dim AgendaFinished As Boolean -Dim BtnAddAgendaTopic As Object -Dim BtnFinishAgenda As Object - - oDocument = ThisComponent - - BtnAddAgendaTopic = getControlModel(oDocument, "BtnAddAgendaTopic") - BtnFinishAgenda = getControlModel(oDocument, "BtnFinishAgenda") - - ' If buttons could be accessed: If at least one button is disabled, then agenda is finished - AgendaFinished = FALSE - If Not IsNull(BtnAddAgendaTopic) Then - AgendaFinished = (AgendaFinished Or (BtnAddAgendaTopic.Enabled = FALSE)) - End If - - If Not IsNull(BtnFinishAgenda) Then - AgendaFinished = (AgendaFinished Or (BtnFinishAgenda.Enabled = FALSE)) - End If - - ' Delete Buttons, empty rows at end of document & macro bindings if agenda is finished - If AgendaFinished Then - DisposeControl(oDocument, "BtnAddAgendaTopic") - DisposeControl(oDocument, "BtnFinishAgenda") - - oBookmarkCursor = CreateBookMarkCursor(oDocument,"NextTopic") - oBookMarkCursor.GotoEnd(True) - oBookmarkCursor.Text.insertString(oBookmarkCursor,"",True) - - AttachBasicMacroToEvent(oDocument,"OnNew", "") - AttachBasicMacroToEvent(oDocument,"OnSave", "") - AttachBasicMacroToEvent(oDocument,"OnSaveAs", "") - AttachBasicMacroToEvent(oDocument,"OnPrint", "") - End If -End Sub - - - -Sub GetOptionValues(Optional aEvent as Object) -Dim CurTag as String -Dim Taglist() as String - If Not IsMissing(aEvent) Then - CurTag = aEvent.Source.Model.Tag - Else - If DialogModel.OptAgenda1.State = TRUE Then - CurTag = DialogModel.OptAgenda1.Tag - Else - CurTag = DialogModel.OptAgenda2.Tag - End If - End If - Taglist() = ArrayoutOfString(CurTag, ";") - Bookmarkname = TagList(0) - sTrueContent = TagList(1) -End Sub - -</script:module>
\ No newline at end of file diff --git a/wizards/source/template/Samples.xba b/wizards/source/template/Samples.xba deleted file mode 100644 index 118fb37d0..000000000 --- a/wizards/source/template/Samples.xba +++ /dev/null @@ -1,185 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Samples" script:language="StarBasic">Option Explicit - -Const SAMPLES = 1000 -Const STYLES = 1100 -Const aTempFileName = "Berend_Ilko_Tom_Stella_Volker.stc" -Public Const Twip = 425 -Dim oUcbObject as Object -Public StylesDir as String -Public StylesDialog as Object -Public PathSeparator as String -Public oFamilies as Object -Public aOptions(0) as New com.sun.star.beans.PropertyValue -Public sQueryPath as String -Public NoArgs()as New com.sun.star.beans.PropertyValue -Public aTempURL as String - -Public Files(100) as String - - -'-------------------------------------------------------------------------------------- -'Miscellaneous Section starts here - -Function PrepareForEditing(Optional ByVal oDocument) -'This sub is called when sample documents are loaded (load event). -'It checks whether the documents is read-only, in which case it -'offers the user to create a new (writable) document using the original -'as a template. -Dim DocPath as String -Dim MMessage as String -Dim MTitle as String -Dim RValue as Integer -Dim oNewDocument as Object -Dim mFileProperties(1) as New com.sun.star.beans.PropertyValue - PrepareForEditing = NULL - BasicLibraries.LoadLibrary( "Tools" ) - If InitResources("'Template'", "tpl") then - If IsMissing(oDocument) Then - oDocument = ThisComponent - End If - If oDocument.IsReadOnly then - MMessage = GetResText(SAMPLES) - MTitle = GetResText(SAMPLES + 1) - RValue = Msgbox(MMessage, (128+48+1), MTitle) - If RValue = 1 Then - DocPath = oDocument.URL - mFileProperties(0).Name = "AsTemplate" - mFileProperties(0).Value = True - mFileProperties(1).Name = "MacroExecutionMode" - mFileProperties(1).Value = com.sun.star.document.MacroExecMode.USE_CONFIG - - oNewDocument = StarDesktop.LoadComponentFromURL(DocPath,"_default",0, mFileProperties()) - PrepareForEditing() = oNewDocument - DisposeDocument(oDocument) - Else - PrepareForEditing() = NULL - End If - Else - PrepareForEditing() = oDocument - End If - End If -End Function - - - -'-------------------------------------------------------------------------------------- -'Calc Style Section starts here - -Sub ShowStyles -'This sub displays the style selection dialog if the current document is a calc document. -Dim TemplateDir, ActFileTitle, DisplayDummy as String -Dim sFilterName(0) as String -Dim StyleNames() as String -Dim t as Integer -Dim MaxIndex as Integer - BasicLibraries.LoadLibrary("Tools") - If InitResources("'Template'", "tpl") then - oDocument = ThisComponent - If oDocument.SupportsService("com.sun.star.sheet.SpreadsheetDocument") Then - ToggleWindow(False) - oUcbObject = createUnoService("com.sun.star.ucb.SimpleFileAccess") - oFamilies = oDocument.StyleFamilies - SaveCurrentStyles(oDocument) - StylesDialog = LoadDialog("Template", "DialogStyles") - DialogModel = StylesDialog.Model - TemplateDir = GetPathSettings("Template", False, 0) - StylesDir = GetOfficeSubPath("Template", "wizard/styles/") - sQueryPath = GetOfficeSubPath("Template", "../wizard/bitmap/") - DialogModel.Title = GetResText(STYLES) - DialogModel.cmdCancel.Label = GetResText(STYLES+2) - DialogModel.cmdOk.Label = GetResText(STYLES+3) - Stylenames() = ReadDirectories(StylesDir, False, False, True,) - MaxIndex = Ubound(Stylenames()) - BubbleSortList(Stylenames(),True) - Dim cStyles(MaxIndex) - For t = 0 to MaxIndex - Files(t) = StyleNames(t,0) - cStyles(t) = StyleNames(t,1) - Next t - On Local Error Resume Next - DialogModel.lbStyles.StringItemList() = cStyles() - ToggleWindow(True) - StylesDialog.Execute - End If - End If -End Sub - - -Sub SelectStyle -'This sub loads the specific styles from a style document and loads them into the -'current document. -Dim StylePath as String -Dim NewStyle as String -Dim Position as Integer - Position = DialogModel.lbStyles.SelectedItems(0) - If Position > -1 Then - ToggleWindow(False) - StylePath = Files(Position) - aOptions(0).Name = "OverwriteStyles" - aOptions(0).Value = true - oFamilies.loadStylesFromURL(StylePath, aOptions()) - ToggleWindow(True) - End If -End Sub - - -Sub SaveCurrentStyles(oDocument as Object) -'This sub stores the current document in the user work directory - On Error Goto ErrorOcurred - aTempURL = GetPathSettings("Work", False) - Dim aRightMost as String - aRightMost = Right(aTempURL, 1) - if aRightMost = "/" Then - aTempURL = aTempURL & aTempFileName - Else - aTempURL = aTempURL & "/" & aTempFileName - End If - - While FileExists(aTempURL) - aTempURL=Left(aTempURL,(Len(aTempURL)-4)) & "_1.stc" - Wend - oDocument.storeToURL(aTempURL, NoArgs()) - Exit Sub - -ErrorOcurred: - MsgBox(GetResText( STYLES+1 ), 16, GetResText( STYLES )) - On Local Error Goto 0 -End Sub - - -Sub RestoreCurrentStyles -'This sub retrieves the styles from the temporarily save document - ToggleWindow(False) - On Local Error Goto NoFile - If FileExists(aTempURL) Then - aOptions(0).Name = "OverwriteStyles" - aOptions(0).Value = true - oFamilies.LoadStylesFromURL(aTempURL, aOptions()) - KillTempFile() - End If - StylesDialog.EndExecute - ToggleWindow(True) -NOFILE: - If Err <> 0 Then - Msgbox("Cannot load Document from " & aTempUrl, 64, GetProductname()) - End If - On Local Error Goto 0 -End Sub - - -Sub CloseStyleDialog - KillTempFile() - DialogExited = True - StylesDialog.Endexecute -End Sub - - -Sub KillTempFile() - If oUcbObject.Exists(aTempUrl) Then - oUcbObject.Kill(aTempUrl) - End If -End Sub - -</script:module>
\ No newline at end of file diff --git a/wizards/source/template/TemplateDialog.xdl b/wizards/source/template/TemplateDialog.xdl deleted file mode 100644 index 4b8633f23..000000000 --- a/wizards/source/template/TemplateDialog.xdl +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="TemplateDialog" dlg:left="170" dlg:top="93" dlg:width="220" dlg:height="60" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGCORRESPONDENCE_DIALOG" dlg:closeable="true" dlg:moveable="true"> - <dlg:bulletinboard> - <dlg:radiogroup> - <dlg:radio dlg:id="OptAgenda1" dlg:tab-index="0" dlg:left="12" dlg:top="20" dlg:width="144" dlg:height="10" dlg:page="1" dlg:tag="TOP2;PT1" dlg:help-url="HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA1" dlg:value="OptAgenda1"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Template.ModuleAgenda.GetOptionValues?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - <dlg:radio dlg:id="OptAgenda2" dlg:tab-index="1" dlg:left="12" dlg:top="34" dlg:width="144" dlg:height="10" dlg:page="1" dlg:tag="TOP1;PT2" dlg:help-url="HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONAGENDA2" dlg:value="OptAgenda2"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:Template.ModuleAgenda.GetOptionValues?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - </dlg:radiogroup> - <dlg:button dlg:id="CmdCorrGoOn" dlg:tab-index="2" dlg:left="164" dlg:top="11" dlg:width="50" dlg:height="14" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGCORRESPONDENCE_LETTEROKAY" dlg:value="CmdCorrGoOn"> - <script:event script:event-name="on-performaction" script:macro-name="Template.Correspondence.OK" script:language="StarBasic"/> - </dlg:button> - <dlg:radiogroup> - <dlg:radio dlg:id="OptSingle" dlg:tab-index="3" dlg:left="12" dlg:top="20" dlg:width="144" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER1" dlg:value="OptSingle"/> - <dlg:radio dlg:id="Optmerge" dlg:tab-index="4" dlg:left="12" dlg:top="34" dlg:width="144" dlg:height="10" dlg:page="2" dlg:help-url="HID:WIZARDS_HID_DLGCORRESPONDENCE_OPTIONLETTER2" dlg:value="Optmerge"/> - </dlg:radiogroup> - <dlg:button dlg:id="CmdAgdGoon" dlg:tab-index="5" dlg:left="164" dlg:top="11" dlg:width="50" dlg:height="14" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGCORRESPONDENCE_AGENDAOKAY" dlg:value="CmdAgdGoOn"> - <script:event script:event-name="on-performaction" script:macro-name="Template.ModuleAgenda.ModifyTemplate" script:language="StarBasic"/> - </dlg:button> - <dlg:button dlg:id="CmdCancel" dlg:tab-index="6" dlg:left="164" dlg:top="28" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID_DLGCORRESPONDENCE_CANCEL" dlg:value="CmdCancel" dlg:button-type="cancel"> - <script:event script:event-name="on-performaction" script:macro-name="Template.ModuleAgenda.DisposeDocument" script:language="StarBasic"/> - </dlg:button> - <dlg:fixedline dlg:id="FrmLetter" dlg:tab-index="7" dlg:left="6" dlg:top="6" dlg:width="150" dlg:height="10" dlg:page="2" dlg:value="FrmLetter"/> - <dlg:fixedline dlg:id="FrmAgenda" dlg:tab-index="8" dlg:left="6" dlg:top="6" dlg:width="150" dlg:height="10" dlg:page="1" dlg:value="FrmAgenda"/> - </dlg:bulletinboard> -</dlg:window>
\ No newline at end of file diff --git a/wizards/source/template/delzip b/wizards/source/template/delzip deleted file mode 100644 index e69de29bb..000000000 --- a/wizards/source/template/delzip +++ /dev/null diff --git a/wizards/source/template/dialog.xlb b/wizards/source/template/dialog.xlb deleted file mode 100644 index c5eed37a2..000000000 --- a/wizards/source/template/dialog.xlb +++ /dev/null @@ -1,7 +0,0 @@ -<?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="Template" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="DialogStyles"/> - <library:element library:name="DlgGreeting"/> - <library:element library:name="TemplateDialog"/> -</library:library> diff --git a/wizards/source/template/script.xlb b/wizards/source/template/script.xlb deleted file mode 100644 index c89cc3788..000000000 --- a/wizards/source/template/script.xlb +++ /dev/null @@ -1,8 +0,0 @@ -<?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="Template" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="ModuleAgenda"/> - <library:element library:name="Correspondence"/> - <library:element library:name="Samples"/> - <library:element library:name="Autotext"/> - </library:library> diff --git a/wizards/source/template/template.src b/wizards/source/template/template.src deleted file mode 100644 index a063a3c30..000000000 --- a/wizards/source/template/template.src +++ /dev/null @@ -1,358 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/#define SAMPLES 1000 -#define STYLES 1100 -#define AgendaDlgName 1200 -#define AgendaDlgNoCancel 1201 -#define AgendaDlgFrame 1202 -#define AgendaDlgButton1 1203 -#define AgendaDlgButton2 1204 -#define CorrespondenceNoTextmark 1300 -#define CorrespondenceMsgError 1302 -#define CorrespondenceDialog 1303 -#define CorrespondenceFields 1350 -#define TextField 1400 -#define Newsletter 1450 - -// -------------------------------------------------------------------- -String SAMPLES -{ - Text [ en-US ] = "In order to use the full functionality of this sample, create a document that is based on this template."; -}; - -String SAMPLES + 1 -{ - Text [ en-US ] = "Remarks"; -}; - -// -------------------------------------------------------------------- -String STYLES -{ - Text [ en-US ] = "Theme Selection"; -}; - -String STYLES + 1 -{ - Text [ en-US ] = "Error while saving the document to the clipboard! The following action cannot be undone."; -}; - -String STYLES + 2 -{ - Text [ en-US ] = "~Cancel"; -}; - -String STYLES + 3 -{ - Text [ en-US ] = "~OK"; -}; - -// -------------------------------------------------------------------- -String AgendaDlgName -{ - Text [ en-US ] = "Minutes Template"; -}; - -String AgendaDlgNoCancel -{ - Text [ en-US ] = "An option must be confirmed."; -}; - -String AgendaDlgFrame -{ - Text [ en-US ] = "Minutes Type"; -}; - -String AgendaDlgButton1 -{ - Text [ en-US ] = "Results Minutes"; -}; - -String AgendaDlgButton2 -{ - Text [ en-US ] = "Evaluation Minutes"; -}; - -// -------------------------------------------------------------------- -String CorrespondenceNoTextmark -{ - Text [ en-US ] = "The bookmark 'Recipient' is missing."; -}; - -String CorrespondenceNoTextmark+1 -{ - Text [ en-US ] = "Form letter fields can not be included."; -}; - -String CorrespondenceMsgError -{ - Text [ en-US ] = "An error has occurred."; -}; - -String CorrespondenceDialog -{ - Text [ en-US ] = "Addressee"; -}; - -String CorrespondenceDialog+1 -{ - Text [ en-US ] = "One recipient"; -}; - -String CorrespondenceDialog+2 -{ - Text [ en-US ] = "Several recipients (address database)"; -}; - -String CorrespondenceDialog+3 -{ - Text [ en-US ] = "Use of This Template"; -}; - - -String CorrespondenceFields -{ - Text [ en-US ] = "Click placeholder and overwrite"; -}; - -String CorrespondenceFields+1 -{ - Text [ en-US ] = "Company"; -}; - -String CorrespondenceFields+2 -{ - Text [ en-US ] = "Department"; -}; - -String CorrespondenceFields+3 -{ - Text [ en-US ] = "First Name"; -}; - -String CorrespondenceFields+4 -{ - Text [ en-US ] = "Last Name"; -}; - -String CorrespondenceFields+5 -{ - Text [ en-US ] = "Street"; -}; - -String CorrespondenceFields+6 -{ - Text [ en-US ] = "Country"; -}; - - -String CorrespondenceFields+7 -{ - Text [ en-US ] = "ZIP/Postal Code"; -}; - -String CorrespondenceFields+8 -{ - Text [ en-US ] = "City"; -}; - -String CorrespondenceFields+9 -{ - Text [ en-US ] = "Title"; -}; - - -String CorrespondenceFields+10 -{ - Text [ en-US ] = "Position"; -}; - - -String CorrespondenceFields+11 -{ - Text [ en-US ] = "Form of Address"; -}; - - -String CorrespondenceFields+12 -{ - Text [ en-US ] = "Initials"; -}; - - -String CorrespondenceFields+13 -{ - Text [ en-US ] = "Salutation"; -}; - - -String CorrespondenceFields+14 -{ - Text [ en-US ] = "Home Phone"; -}; - - -String CorrespondenceFields+15 -{ - Text [ en-US ] = "Work Phone"; -}; - - -String CorrespondenceFields+16 -{ - Text [ en-US ] = "Fax"; -}; - - -String CorrespondenceFields+17 -{ - Text [ en-US ] = "E-Mail"; -}; - - -String CorrespondenceFields+18 -{ - Text [ en-US ] = "URL"; -}; - - -String CorrespondenceFields+19 -{ - Text [ en-US ] = "Notes"; -}; - - -String CorrespondenceFields+20 -{ - Text [ en-US ] = "Alt. Field 1"; -}; - - -String CorrespondenceFields+21 -{ - Text [ en-US ] = "Alt. Field 2"; -}; - - -String CorrespondenceFields+22 -{ - Text [ en-US ] = "Alt. Field 3"; -}; - - -String CorrespondenceFields+23 -{ - Text [ en-US ] = "Alt. Field 4"; -}; - - -String CorrespondenceFields+24 -{ - Text [ en-US ] = "ID"; -}; - - -String CorrespondenceFields+25 -{ - Text [ en-US ] = "State"; -}; - - -String CorrespondenceFields+26 -{ - Text [ en-US ] = "Office Phone"; -}; - - -String CorrespondenceFields+27 -{ - Text [ en-US ] = "Pager"; -}; - - -String CorrespondenceFields+28 -{ - Text [ en-US ] = "Mobile Phone"; -}; - - -String CorrespondenceFields+29 -{ - Text [ en-US ] = "Other Phone"; -}; - -String CorrespondenceFields+30 -{ - Text [ en-US ] = "Calendar URL"; -}; - -String CorrespondenceFields+31 -{ - Text [ en-US ] = "Invite"; -}; - - -String TextField -{ - Text [ en-US ] = "User data field is not defined!"; - -}; - -String Newsletter -{ - Text [ en-US ] = "General layout"; -}; - - -String Newsletter + 1 -{ - Text [ en-US ] = "Default layout"; -}; - -String Newsletter + 2 -{ - Text [ en-US ] = "Commemorative publication layout"; -}; - -String Newsletter + 3 -{ - Text [ en-US ] = "Brochure layout"; -}; - -String Newsletter + 10 -{ - Text [ en-US ] = "Format"; -}; - -String Newsletter + 11 -{ - Text [ en-US ] = "Single-sided"; -}; - -String Newsletter + 12 -{ - Text [ en-US ] = "Double-sided"; -}; - diff --git a/wizards/source/tools/Debug.xba b/wizards/source/tools/Debug.xba deleted file mode 100644 index 4ba60ffb8..000000000 --- a/wizards/source/tools/Debug.xba +++ /dev/null @@ -1,236 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Debug" script:language="StarBasic">REM ***** BASIC ***** - -Sub ActivateReadOnlyFlag() - SetBasicReadOnlyFlag(True) -End Sub - - -Sub DeactivateReadOnlyFlag() - SetBasicReadOnlyFlag(False) -End Sub - - -Sub SetBasicReadOnlyFlag(bReadOnly as Boolean) -Dim i as Integer -Dim LibName as String -Dim BasicLibNames() as String - BasicLibNames() = BasicLibraries.ElementNames() - For i = 0 To Ubound(BasicLibNames()) - LibName = BasicLibNames(i) - If LibName <> "Standard" Then - BasicLibraries.SetLibraryReadOnly(LibName, bReadOnly) - End If - Next i -End Sub - - -Sub WritedbgInfo(LocObject as Object) -Dim locUrl as String -Dim oLocDocument as Object -Dim oLocText as Object -Dim oLocCursor as Object -Dim NoArgs() -Dim sObjectStrings(2) as String -Dim sProperties() as String -Dim n as Integer -Dim m as Integer -Dim MaxIndex as Integer - sObjectStrings(0) = LocObject.dbg_Properties - sObjectStrings(1) = LocObject.dbg_Methods - sObjectStrings(2) = LocObject.dbg_SupportedInterfaces - LocUrl = "private:factory/swriter" - oLocDocument = StarDesktop.LoadComponentFromURL(LocUrl,"_default",0,NoArgs) - oLocText = oLocDocument.text - oLocCursor = oLocText.createTextCursor() - oLocCursor.gotoStart(False) - If Vartype(LocObject) = 9 then ' an Object Variable - For n = 0 To 2 - sProperties() = ArrayoutofString(sObjectStrings(n),";", MaxIndex) - For m = 0 To MaxIndex - oLocText.insertString(oLocCursor,sProperties(m),False) - oLocText.insertControlCharacter(oLocCursor,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False) - Next m - Next n - Elseif Vartype(LocObject) = 8 Then ' a String Variable - oLocText.insertString(oLocCursor,LocObject,False) - ElseIf Vartype(LocObject) = 1 Then - Msgbox("Variable is Null!", 16, GetProductName()) - End If -End Sub - - -Sub WriteDbgString(LocString as string) -Dim oLocDesktop as object -Dim LocUrl as String -Dim oLocDocument as Object -Dim oLocCursor as Object -Dim oLocText as Object - - LocUrl = "private:factory/swriter" - oLocDocument = StarDesktop.LoadComponentFromURL(LocUrl,"_default",0,NoArgs) - oLocText = oLocDocument.text - oLocCursor = oLocText.createTextCursor() - oLocCursor.gotoStart(False) - oLocText.insertString(oLocCursor,LocString,False) -End Sub - - -Sub printdbgInfo(LocObject) - If Vartype(LocObject) = 9 then - Msgbox LocObject.dbg_properties - Msgbox LocObject.dbg_methods - Msgbox LocObject.dbg_supportedinterfaces - Elseif Vartype(LocObject) = 8 Then ' a String Variable - Msgbox LocObject - ElseIf Vartype(LocObject) = 0 Then - Msgbox("Variable is Null!", 16, GetProductName()) - Else - Msgbox("Type of Variable: " & Typename(LocObject), 48, GetProductName()) - End If -End Sub - - -Sub ShowArray(LocArray()) -Dim i as integer -Dim msgstring - msgstring = "" - For i = Lbound(LocArray()) to Ubound(LocArray()) - msgstring = msgstring + LocArray(i) + chr(13) - Next - Msgbox msgstring -End Sub - - -Sub ShowPropertyValues(oLocObject as Object) -Dim PropName as String -Dim sValues as String - On Local Error Goto NOPROPERTYSETINFO: - sValues = "" - For i = 0 To Ubound(oLocObject.PropertySetInfo.Properties) - Propname = oLocObject.PropertySetInfo.Properties(i).Name - sValues = sValues & PropName & chr(13) & " = " & oLocObject.GetPropertyValue(PropName) & chr(13) - Next i - Msgbox(sValues , 64, GetProductName()) - Exit Sub - -NOPROPERTYSETINFO: - Msgbox("Sorry, No PropertySetInfo attached to the object", 16, GetProductName()) - Resume LEAVEPROC - LEAVEPROC: -End Sub - - -Sub ShowNameValuePair(Pair()) -Dim i as Integer -Dim ShowString as String - ShowString = "" - On Local Error Resume Next - For i = 0 To Ubound(Pair()) - ShowString = ShowString & Pair(i).Name & " = " - ShowString = ShowString & Pair(i).Value & chr(13) - Next i - Msgbox ShowString -End Sub - - -' Retrieves all the Elements of aSequence of an object, with the -' possibility to define a filter(sfilter <> "") -Sub ShowElementNames(oLocElements() as Object, Optional sFiltername as String) -Dim i as Integer -Dim NameString as String - NameString = "" - For i = 0 To Ubound(oLocElements()) - If Not IsMissIng(sFilterName) Then - If Instr(1, oLocElements(i), sFilterName) Then - NameString = NameString & oLocElements(i) & chr(13) - End If - Else - NameString = NameString & oLocElements(i) & chr(13) - End If - Next i - Msgbox(NameString, 64, GetProductName()) -End Sub - - -' Retrieves all the supported servicenames of an object, with the -' possibility to define a filter(sfilter <> "") -Sub ShowSupportedServiceNames(oLocObject as Object, Optional sFilterName as String) - On Local Error Goto NOSERVICENAMES - If IsMissing(sFilterName) Then - ShowElementNames(oLocobject.SupportedServiceNames()) - Else - ShowElementNames(oLocobject.SupportedServiceNames(), sFilterName) - End If - Exit Sub - - NOSERVICENAMES: - Msgbox("Sorry, No 'SupportedServiceNames' - Property attached to the object", 16, GetProductName()) - Resume LEAVEPROC - LEAVEPROC: -End Sub - - -' Retrieves all the available Servicenames of an object, with the -' possibility to define a filter(sfilter <> "") -Sub ShowAvailableServiceNames(oLocObject as Object, Optional sFilterName as String) - On Local Error Goto NOSERVICENAMES - If IsMissing(sFilterName) Then - ShowElementNames(oLocobject.AvailableServiceNames) - Else - ShowElementNames(oLocobject.AvailableServiceNames, sFilterName) - End If - Exit Sub - - NOSERVICENAMES: - Msgbox("Sorry, No 'AvailableServiceNames' - Property attached to the object", 16, GetProductName()) - Resume LEAVEPROC - LEAVEPROC: -End Sub - - -Sub ShowCommands(oLocObject as Object) - On Local Error Goto NOCOMMANDS - ShowElementNames(oLocObject.QueryCommands) - Exit Sub - NOCOMMANDS: - Msgbox("Sorry, No 'QueryCommands' - Property attached to the object", 16, GetProductName()) - Resume LEAVEPROC - LEAVEPROC: -End Sub - - -Sub ProtectCurrentSheets() -Dim oDocument as Object -Dim sDocType as String -Dim iResult as Integer -Dim oSheets as Object -Dim i as Integer -Dim bDoProtect as Boolean - oDocument = StarDesktop.ActiveFrame.Controller.Model - sDocType = GetDocumentType(oDocument) - If sDocType = "scalc" Then - oSheets = oDocument.Sheets - bDoProtect = False - For i = 0 To oSheets.Count-1 - If Not oSheets(i).IsProtected Then - bDoProtect = True - End If - Next i - If bDoProtect Then - iResult = Msgbox( "Do you want to protect all sheets of this document?",35, GetProductName()) - If iResult = 6 Then - ProtectSheets(oDocument.Sheets) - End If - End If - End If -End Sub - - -Sub FillDocument() - oMyReport = createUNOService("com.sun.star.wizards.report.CallReportWizard") - oMyReport.trigger("fill") -End Sub - -</script:module>
\ No newline at end of file diff --git a/wizards/source/tools/DlgOverwriteAll.xdl b/wizards/source/tools/DlgOverwriteAll.xdl deleted file mode 100644 index 5208ead79..000000000 --- a/wizards/source/tools/DlgOverwriteAll.xdl +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DlgOverwriteAll" dlg:left="138" dlg:top="75" dlg:width="230" dlg:height="64" dlg:closeable="true" dlg:moveable="true"> - <dlg:bulletinboard> - <dlg:text dlg:id="lblQueryforSave" dlg:tab-index="0" dlg:left="6" dlg:top="6" dlg:width="218" dlg:height="36" dlg:value="lblQueryforSave" dlg:multiline="true"/> - <dlg:button dlg:id="cmdYes" dlg:tab-index="1" dlg:left="6" dlg:top="43" dlg:width="50" dlg:height="14" dlg:value="cmdYes"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.ModuleControls.SetOVERWRITEToQuery?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdYesToAll" dlg:tab-index="2" dlg:left="62" dlg:top="43" dlg:width="50" dlg:height="14" dlg:value="cmdYesToAll"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.ModuleControls.SetOVERWRITEToAlways?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdNo" dlg:tab-index="3" dlg:left="118" dlg:top="43" dlg:width="50" dlg:height="14" dlg:default="true" dlg:value="cmdNo"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tools.ModuleControls.SetOVERWRITEToNever?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="cmdCancel" dlg:tab-index="4" dlg:left="174" dlg:top="43" dlg:width="50" dlg:height="14" dlg:value="cmdCancel" dlg:button-type="cancel"/> - </dlg:bulletinboard> -</dlg:window> diff --git a/wizards/source/tools/Listbox.xba b/wizards/source/tools/Listbox.xba deleted file mode 100644 index 01e62e7d6..000000000 --- a/wizards/source/tools/Listbox.xba +++ /dev/null @@ -1,353 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Listbox" script:language="StarBasic">Option Explicit -Dim OriginalList() -Dim oDialogModel as Object - - -Sub MergeList(SourceListBox() as Object, SecondList() as String) -Dim i as Integer -Dim MaxIndex as Integer - MaxIndex = Ubound(SecondList()) - OriginalList() = AddListToList(OriginalList(), SecondList()) - For i = 0 To MaxIndex - SourceListbox = AddSingleItemToListbox(SourceListbox, SecondList(i)) - Next i - Call FormSetMoveRights() -End Sub - - -Sub RemoveListItems(SourceListbox as Object, TargetListbox as Object, RemoveList() as String) -Dim i as Integer -Dim s as Integer -Dim MaxIndex as Integer -Dim CopyList() - MaxIndex = Ubound(RemoveList()) - For i = 0 To MaxIndex - RemoveListboxItemByName(SourceListbox, RemoveList(i)) - RemoveListboxItemByName(TargetListbox, RemoveList(i)) - Next i - CopyList() = OriginalList() - s = 0 - MaxIndex = Ubound(CopyList()) - For i = 0 To MaxIndex - If IndexInArray(CopyList(i),RemoveList())= -1 Then - OriginalList(s) = CopyList(i) - s = s + 1 - End If - Next i - ReDim Preserve OriginalList(s-1) - Call FormSetMoveRights() -End Sub - - -' Note Boolean Parameter -Sub InitializeListboxProcedures(oModel as Object, SourceListbox as Object, TargetListbox as Object) -Dim EmptyList() - Set oDialogModel = oModel - OriginalList()= SourceListbox.StringItemList() - TargetListbox.StringItemList() = EmptyList() -End Sub - - -Sub CopyListboxItems(SourceListbox as Object, TargetListbox As Object) -Dim NullArray() - TargetListbox.StringItemList() = OriginalList() - SourceListbox.StringItemList() = NullArray() -End Sub - - -Sub FormMoveSelected() - Call MoveSelectedListBox(oDialogModel.lstFields, oDialogModel.lstSelFields) - Call FormSetMoveRights() - oDialogModel.lstSelFields.Tag = True -End Sub - - -Sub FormMoveAll() - Call CopyListboxItems(oDialogModel.lstFields, oDialogModel.lstSelFields) - Call FormSetMoveRights() - oDialogModel.lstSelFields.Tag = True -End Sub - - -Sub FormRemoveSelected() - Call MoveOrderedSelectedListbox(oDialogModel.lstFields, oDialogModel.lstSelFields, False) - Call FormSetMoveRights() - oDialogModel.lstSelFields.Tag = True -End Sub - - -Sub FormRemoveAll() - Call MoveOrderedSelectedListbox(oDialogModel.lstFields, oDialogModel.lstSelFields, True) - Call FormSetMoveRights() - oDialogModel.lstSelFields.Tag = 1 -End Sub - - -Sub MoveSelectedListBox(SourceListbox as Object, TargetListbox as Object) -Dim MaxCurTarget as Integer -Dim MaxSourceSelected as Integer -Dim n as Integer -Dim m as Integer -Dim CurIndex -Dim iOldTargetSelect as Integer -Dim iOldSourceSelect as Integer - MaxCurTarget = Ubound(TargetListbox.StringItemList()) - MaxSourceSelected = Ubound(SourceListbox.SelectedItems()) - Dim TargetList(MaxCurTarget+MaxSourceSelected+1) - If MaxSourceSelected > -1 Then - iOldSourceSelect = SourceListbox.SelectedItems(0) - If Ubound(TargetListbox.SelectedItems()) > -1 Then - iOldTargetSelect = TargetListbox.SelectedItems(0) - Else - iOldTargetSelect = -1 - End If - For n = 0 To MaxCurTarget - TargetList(n) = TargetListbox.StringItemList(n) - Next n - For m = 0 To MaxSourceSelected - CurIndex = SourceListbox.SelectedItems(m) - TargetList(n) = SourceListbox.StringItemList(CurIndex) - n = n + 1 - Next m - TargetListBox.StringItemList() = TargetList() - SourceListbox.StringItemList() = RemoveSelected (SourceListbox) - SetNewSelection(SourceListbox, iOldSourceSelect) - SetNewSelection(TargetListbox, iOldTargetSelect) - End If -End Sub - - - -Sub MoveOrderedSelectedListbox(lstSource as Object, lstTarget as Object, bMoveAll as Boolean) -Dim NullArray() -Dim MaxSelected as Integer -Dim MaxSourceIndex as Integer -Dim MaxOriginalIndex as Integer -Dim MaxNewIndex as Integer -Dim n as Integer -Dim m as Integer -Dim CurIndex as Integer -Dim SearchString as String -Dim SourceList() as String -Dim iOldTargetSelect as Integer -Dim iOldSourceSelect as Integer - If bMoveAll Then - lstSource.StringItemList() = OriginalList() - lstTarget.StringItemList() = NullArray() - Else - MaxOriginalIndex = Ubound(OriginalList()) - MaxSelected = Ubound(lstTarget.SelectedItems()) - iOldTargetSelect = lstTarget.SelectedItems(0) - If Ubound(lstSource.SelectedItems()) > -1 Then - iOldSourceSelect = lstSource.SelectedItems(0) - End If - Dim SelList(MaxSelected) - For n = 0 To MaxSelected - CurIndex = lstTarget.SelectedItems(n) - SelList(n) = lstTarget.StringItemList(CurIndex) - Next n - SourceList() = lstSource.StringItemList() - MaxSourceIndex = Ubound(lstSource.StringItemList()) - MaxNewIndex = MaxSelected + MaxSourceIndex + 1 - Dim NewSourceList(MaxNewIndex) - m = 0 - For n = 0 To MaxOriginalIndex - SearchString = OriginalList(n) - If IndexinArray(SearchString, SelList()) <> -1 Then - NewSourceList(m) = SearchString - m = m + 1 - ElseIf IndexinArray(SearchString, SourceList()) <> -1 Then - NewSourceList(m) = SearchString - m = m + 1 - End If - Next n - lstSource.StringItemList() = NewSourceList() - lstTarget.StringItemList() = RemoveSelected(lstTarget) - End If - SetNewSelection(lstSource, iOldSourceSelect) - SetNewSelection(lstTarget, iOldTargetSelect) - -End Sub - - -Function RemoveSelected(oListbox as Object) -Dim MaxIndex as Integer -Dim MaxSelected as Integer -Dim n as Integer -Dim m as Integer -Dim CurIndex as Integer -Dim CurItem as String -Dim ResultArray() - MaxIndex = Ubound(oListbox.StringItemList()) - MaxSelected = Ubound(oListbox.SelectedItems()) - Dim LocItemList(MaxIndex) - LocItemList() = oListbox.StringItemList() - If MaxSelected > -1 Then - For n = 0 To MaxSelected - CurIndex = oListbox.SelectedItems(n) - LocItemList(CurIndex) = "" - Next n - If MaxIndex > 0 Then - ReDim ResultArray(MaxIndex - MaxSelected - 1) - m = 0 - For n = 0 To MaxIndex - CurItem = LocItemList(n) - If CurItem <> "" Then - ResultArray(m) = CurItem - m = m + 1 - End If - Next n - End If - RemoveSelected = ResultArray() - Else - RemoveSelected = oListbox.StringItemList() - End If -End Function - - -Sub SetNewSelection(oListBox as Object, iLastSelection as Integer) -Dim MaxIndex as Integer -Dim SelIndex as Integer -Dim SelList(0) as Integer - MaxIndex = Ubound(oListBox.StringItemList()) - If MaxIndex > -1 AND iLastSelection > -1 Then - If iLastSelection > MaxIndex Then - Selindex = MaxIndex - Else - SelIndex = iLastSelection - End If - Sellist(0) = SelIndex - oListBox.SelectedItems() = SelList() - End If -End Sub - - -Sub ToggleListboxControls(oDialogModel as Object, bDoEnable as Boolean) - With oDialogModel - .lblFields.Enabled = bDoEnable - .lblSelFields.Enabled = bDoEnable -' .lstTables.Enabled = bDoEnable - .lstFields.Enabled = bDoEnable - .lstSelFields.Enabled = bDoEnable - .cmdRemoveAll.Enabled = bDoEnable - .cmdRemoveSelected.Enabled = bDoEnable - .cmdMoveAll.Enabled = bDoEnable - .cmdMoveSelected.Enabled = bDoEnable - End With - If bDoEnable Then - FormSetMoveRights() - End If -End Sub - - -' Enable or disable the buttons used for moving the available -' fields between the two list boxes. -Sub FormSetMoveRights() -Dim bIsFieldSelected as Boolean -Dim bSelectSelected as Boolean -Dim FieldCount as Integer -Dim SelectCount as Integer - bIsFieldSelected = Ubound(oDialogModel.lstFields.SelectedItems()) <> -1 - FieldCount = Ubound(oDialogModel.lstFields.StringItemList()) + 1 - bSelectSelected = Ubound(oDialogModel.lstSelFields.SelectedItems()) > -1 - SelectCount = Ubound(oDialogModel.lstSelFields.StringItemList()) + 1 - oDialogModel.cmdRemoveAll.Enabled = SelectCount>=1 - oDialogModel.cmdRemoveSelected.Enabled = bSelectSelected - oDialogModel.cmdMoveAll.Enabled = FieldCount >=1 - oDialogModel.cmdMoveSelected.Enabled = bIsFieldSelected - oDialogModel.cmdGoOn.Enabled = SelectCount>=1 - ' This flag is set to '1' when the lstSelFields has been modified -End Sub - - -Function AddSingleItemToListbox(ByVal oListbox as Object, ListItem as String, Optional iSelIndex) as Object -Dim MaxIndex as Integer -Dim i as Integer - - MaxIndex = Ubound(oListbox.StringItemList()) -Dim LocList(MaxIndex + 1) -' Todo: This goes faster with the Redim LocList(MaxIndex + 1) Preserve function - For i = 0 To MaxIndex - LocList(i) = oListbox.StringItemList(i) - Next i - LocList(MaxIndex + 1) = ListItem - oListbox.StringItemList() = LocList() - If Not IsMissing(iSelIndex) Then - SelectListboxItem(oListbox, iSelIndex) - End If - AddSingleItemToListbox() = oListbox -End Function - - -Sub EmptyListbox(oListbox as Object) -Dim NullList() as String - oListbox.StringItemList() = NullList() -End Sub - - -Sub SelectListboxItem(oListbox as Object, iSelIndex as Integer) -Dim LocSelList(0) as Integer - If iSelIndex <> -1 Then - LocSelList(0) = iSelIndex - oListbox.SelectedItems() = LocSelList() - End If -End Sub - - -Function GetSelectedListboxItems(oListbox as Object) -Dim SelList(Ubound(oListBox.SelectedItems())) as String -Dim i as Integer -Dim CurIndex as Integer - For i = 0 To Ubound(oListbox.SelectedItems()) - CurIndex = oListbox.SelectedItems(i) - SelList(i) = oListbox.StringItemList(CurIndex) - Next i - GetSelectedListboxItems() = SelList() -End Function - - -' Note: When using this Sub it must be ensured that the -' 'RemoveItem' appears only only once in the Listbox -Sub RemoveListboxItemByName(oListbox as Object, RemoveItem as String) -Dim OldList() as String -Dim NullList() as String -Dim i as Integer -Dim a as Integer -Dim MaxIndex as Integer - OldList = oListbox.StringItemList() - MaxIndex = Ubound(OldList()) - If IndexInArray(RemoveItem, OldList()) <> -1 Then - If MaxIndex > 0 Then - a = 0 - Dim NewList(MaxIndex -1) - For i = 0 To MaxIndex - If RemoveItem <> OldList(i) Then - NewList(a) = OldList(i) - a = a + 1 - End If - Next i - oListbox.StringItemList() = NewList() - Else - oListBox.StringItemList() = NullList() - End If - End If -End Sub - - -Function GetItemPos(oListBox as Object, sItem as String) -Dim ItemList() -Dim MaxIndex as Integer -Dim i as Integer - ItemList() = oListBox.StringItemList() - MaxIndex = Ubound(ItemList()) - For i = 0 To MaxIndex - If sItem = ItemList(i) Then - GetItemPos() = i - Exit Function - End If - Next i - GetItemPos() = -1 -End Function -</script:module>
\ No newline at end of file diff --git a/wizards/source/tools/Misc.xba b/wizards/source/tools/Misc.xba deleted file mode 100644 index faa0f802f..000000000 --- a/wizards/source/tools/Misc.xba +++ /dev/null @@ -1,821 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Misc" script:language="StarBasic">REM ***** BASIC ***** - -Const SBSHARE = 0 -Const SBUSER = 1 -Dim Taskindex as Integer -Dim oResSrv as Object - -Sub Main() -Dim PropList(3,1)' as String - PropList(0,0) = "URL" - PropList(0,1) = "sdbc:odbc:Erica_Test_Unicode" - PropList(1,0) = "User" - PropList(1,1) = "extra" - PropList(2,0) = "Password" - PropList(2,1) = "extra" - PropList(3,0) = "IsPasswordRequired" - PropList(3,1) = True -End Sub - - -Function RegisterNewDataSource(DSName as String, PropertyList(), Optional DriverProperties() as New com.sun.star.beans.PropertyValue) -Dim oDataSource as Object -Dim oDBContext as Object -Dim oPropInfo as Object -Dim i as Integer - oDBContext = createUnoService("com.sun.star.sdb.DatabaseContext") - oDataSource = createUnoService("com.sun.star.sdb.DataSource") - For i = 0 To Ubound(PropertyList(), 1) - sPropName = PropertyList(i,0) - sPropValue = PropertyList(i,1) - oDataSource.SetPropertyValue(sPropName,sPropValue) - Next i - If Not IsMissing(DriverProperties()) Then - oDataSource.Info() = DriverProperties() - End If - oDBContext.RegisterObject(DSName, oDataSource) - RegisterNewDataSource () = oDataSource -End Function - - -' Connects to a registered Database -Function ConnecttoDatabase(DSName as String, UserID as String, Password as String, Optional Propertylist(), Optional DriverProperties() as New com.sun.star.beans.PropertyValue) -Dim oDBContext as Object -Dim oDBSource as Object -' On Local Error Goto NOCONNECTION - oDBContext = CreateUnoService("com.sun.star.sdb.DatabaseContext") - If oDBContext.HasbyName(DSName) Then - oDBSource = oDBContext.GetByName(DSName) - ConnectToDatabase = oDBSource.GetConnection(UserID, Password) - Else - If Not IsMissing(Namelist()) Then - If Not IsMissing(DriverProperties()) Then - RegisterNewDataSource(DSName, PropertyList(), DriverProperties()) - Else - RegisterNewDataSource(DSName, PropertyList()) - End If - oDBSource = oDBContext.GetByName(DSName) - ConnectToDatabase = oDBSource.GetConnection(UserID, Password) - Else - Msgbox("DataSource " & DSName & " is not registered" , 16, GetProductname()) - ConnectToDatabase() = NULL - End If - End If -NOCONNECTION: - If Err <> 0 Then - Msgbox(Error$, 16, GetProductName()) - Resume LEAVESUB - LEAVESUB: - End If -End Function - - -Function GetStarOfficeLocale() as New com.sun.star.lang.Locale -Dim aLocLocale As New com.sun.star.lang.Locale -Dim sLocale as String -Dim sLocaleList(1) -Dim oMasterKey - oMasterKey = GetRegistryKeyContent("org.openoffice.Setup/L10N/") - sLocale = oMasterKey.getByName("ooLocale") - sLocaleList() = ArrayoutofString(sLocale, "-") - aLocLocale.Language = sLocaleList(0) - If Ubound(sLocaleList()) > 0 Then - aLocLocale.Country = sLocaleList(1) - End If - GetStarOfficeLocale() = aLocLocale -End Function - - -Function GetRegistryKeyContent(sKeyName as string, Optional bforUpdate as Boolean) -Dim oConfigProvider as Object -Dim aNodePath(0) as new com.sun.star.beans.PropertyValue - oConfigProvider = createUnoService("com.sun.star.configuration.ConfigurationProvider") - aNodePath(0).Name = "nodepath" - aNodePath(0).Value = sKeyName - If IsMissing(bForUpdate) Then - GetRegistryKeyContent() = oConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", aNodePath()) - Else - If bForUpdate Then - GetRegistryKeyContent() = oConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationUpdateAccess", aNodePath()) - Else - GetRegistryKeyContent() = oConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", aNodePath()) - End If - End If -End Function - - -Function GetProductname() as String -Dim oProdNameAccess as Object -Dim sVersion as String -Dim sProdName as String - oProdNameAccess = GetRegistryKeyContent("org.openoffice.Setup/Product") - sProdName = oProdNameAccess.getByName("ooName") - sVersion = oProdNameAccess.getByName("ooSetupVersion") - GetProductName = sProdName & sVersion -End Function - - -' Opens a Document, checks beforehand, wether it has to be loaded -' or wether it is already on the desktop. -' If the parameter bDisposable is set to False then then returned document -' should not be disposed afterwards, because it is already opened. -Function OpenDocument(DocPath as String, Args(), Optional bDisposable as Boolean) -Dim oComponents as Object -Dim oComponent as Object - ' Search if one of the active Components ist the one that you search for - oComponents = StarDesktop.Components.CreateEnumeration - While oComponents.HasmoreElements - oComponent = oComponents.NextElement - If hasUnoInterfaces(oComponent,"com.sun.star.frame.XModel") then - If UCase(oComponent.URL) = UCase(DocPath) then - OpenDocument() = oComponent - If Not IsMissing(bDisposable) Then - bDisposable = False - End If - Exit Function - End If - End If - Wend - If Not IsMissing(bDisposable) Then - bDisposable = True - End If - OpenDocument() = StarDesktop.LoadComponentFromURL(DocPath,"_default",0,Args()) -End Function - - -Function TaskonDesktop(DocPath as String) as Boolean -Dim oComponents as Object -Dim oComponent as Object - ' Search if one of the active Components ist the one that you search for - oComponents = StarDesktop.Components.CreateEnumeration - While oComponents.HasmoreElements - oComponent = oComponents.NextElement - If hasUnoInterfaces(oComponent,"com.sun.star.frame.XModel") then - If UCase(oComponent.URL) = UCase(DocPath) then - TaskonDesktop = True - Exit Function - End If - End If - Wend - TaskonDesktop = False -End Function - - -' Retrieves a FileName out of a StarOffice-Document -Function RetrieveFileName(LocDoc as Object) -Dim LocURL as String -Dim LocURLArray() as String -Dim MaxArrIndex as integer - - LocURL = LocDoc.Url - LocURLArray() = ArrayoutofString(LocURL,"/",MaxArrIndex) - RetrieveFileName = LocURLArray(MaxArrIndex) -End Function - - -' Gets a special configured PathSetting -Function GetPathSettings(sPathType as String, Optional bshowall as Boolean, Optional ListIndex as integer) as String -Dim oSettings, oPathSettings as Object -Dim sPath as String -Dim PathList() as String -Dim MaxIndex as Integer -Dim oPS as Object - - oPS = createUnoService("com.sun.star.util.PathSettings") - - If Not IsMissing(bShowall) Then - If bShowAll Then - ShowPropertyValues(oPS) - Exit Function - End If - End If - sPath = oPS.getPropertyValue(sPathType) - If Not IsMissing(ListIndex) Then - ' Share and User-Directory - If Instr(1,sPath,";") <> 0 Then - PathList = ArrayoutofString(sPath,";", MaxIndex) - If ListIndex <= MaxIndex Then - sPath = PathList(ListIndex) - Else - Msgbox("String Cannot be analyzed!" & sPath , 16, GetProductName()) - End If - End If - End If - If Instr(1, sPath, ";") = 0 Then - GetPathSettings = ConvertToUrl(sPath) - Else - GetPathSettings = sPath - End If - -End Function - - - -' Gets the fully qualified path to a subdirectory of the -' Template Directory, e. g. with the parameter "wizard/bitmap" -' The parameter must be passed over in Url-scription -' The return-Value is in Urlscription -Function GetOfficeSubPath(sOfficePath as String, ByVal sSubDir as String) -Dim sOfficeString as String -Dim sOfficeList() as String -Dim sOfficeDir as String -Dim sBigDir as String -Dim i as Integer -Dim MaxIndex as Integer -Dim oUcb as Object - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - sOfficeString = GetPathSettings(sOfficePath) - If Right(sSubDir,1) <> "/" Then - sSubDir = sSubDir & "/" - End If - sOfficeList() = ArrayoutofString(sOfficeString,";", MaxIndex) - For i = 0 To MaxIndex - sOfficeDir = ConvertToUrl(sOfficeList(i)) - If Right(sOfficeDir,1) <> "/" Then - sOfficeDir = sOfficeDir & "/" - End If - sBigDir = sOfficeDir & sSubDir - If oUcb.Exists(sBigDir) Then - GetOfficeSubPath() = sBigDir - Exit Function - End If - Next i - ShowNoOfficePathError() - GetOfficeSubPath = "" -End Function - - -Sub ShowNoOfficePathError() -Dim ProductName as String -Dim sError as String -Dim bResObjectexists as Boolean -Dim oLocResSrv as Object - bResObjectexists = not IsNull(oResSrv) - If bResObjectexists Then - oLocResSrv = oResSrv - End If - If InitResources("Tools", "com") Then - ProductName = GetProductName() - sError = GetResText(1006) - sError = ReplaceString(sError, ProductName, "%PRODUCTNAME") - sError = ReplaceString(sError, chr(13), "<BR>") - MsgBox(sError, 16, ProductName) - End If - If bResObjectexists Then - oResSrv = oLocResSrv - End If - -End Sub - - -Function InitResources(Description, ShortDescription as String) as boolean -Dim xResource as Object -Dim aArgs(0) as String - On Error Goto ErrorOcurred - aArgs(0) = ShortDescription - oConfigProvider = createUnoService("com.sun.star.configuration.ConfigurationProvider") - xResource = getProcessServiceManager().createInstanceWithArguments( "org.libreoffice.resource.ResourceIndexAccess", aArgs() ) - If (IsNull(xResource)) then - InitResources = FALSE - MsgBox("could not initialize ResourceIndexAccess") - Else - InitResources = TRUE - oResSrv = xResource.getByName( "String" ) - End If - Exit Function -ErrorOcurred: - Dim nSolarVer - InitResources = FALSE - nSolarVer = GetSolarVersion() - MsgBox("Resource file missing (" & ShortDescription & trim(str(nSolarVer)) + "*.res)", 16, GetProductName()) - Resume CLERROR - CLERROR: -End Function - - -Function GetResText( nID as integer ) As string - On Error Goto ErrorOcurred - If Not IsNull(oResSrv) Then - GetResText = oResSrv.getByIndex( nID ) - Else - GetResText = "" - End If - Exit Function -ErrorOcurred: - GetResText = "" - MsgBox("Resource with ID =" + str( nID ) + " not found!", 16, GetProductName()) - Resume CLERROR - CLERROR: -End Function - - -Function CutPathView(sDocUrl as String, Optional PathLen as Integer) -Dim sViewPath as String -Dim FileName as String -Dim iFileLen as Integer - sViewPath = ConvertfromURL(sDocURL) - iViewPathLen = Len(sViewPath) - If iViewPathLen > 60 Then - FileName = FileNameoutofPath(sViewPath, "/") - iFileLen = Len(FileName) - If iFileLen < 44 Then - sViewPath = Left(sViewPath,57-iFileLen-10) & "..." & Right(sViewPath,iFileLen + 10) - Else - sViewPath = Left(sViewPath,27) & " ... " & Right(sViewPath,28) - End If - End If - CutPathView = sViewPath -End Function - - -' Deletes the content of all cells that are softformatted according -' to the 'InputStyleName' -Sub DeleteInputCells(oSheet as Object, InputStyleName as String) -Dim oRanges as Object -Dim oRange as Object - oRanges = oSheet.CellFormatRanges.createEnumeration - While oRanges.hasMoreElements - oRange = oRanges.NextElement - If Instr(1,oRange.CellStyle, InputStyleName) <> 0 Then - Call ReplaceRangeValues(oRange, "") - End If - Wend -End Sub - - -' Inserts a certain String to all cells of a Range that ist passed over -' either as an object or as the RangeName -Sub ChangeValueofRange(oSheet as Object, Range, ReplaceValue, Optional StyleName as String) -Dim oCellRange as Object - If Vartype(Range) = 8 Then - ' Get the Range out of the Rangename - oCellRange = oSheet.GetCellRangeByName(Range) - Else - ' The range is passed over as an object - Set oCellRange = Range - End If - If IsMissing(StyleName) Then - ReplaceRangeValues(oCellRange, ReplaceValue) - Else - If Instr(1,oCellRange.CellStyle,StyleName) Then - ReplaceRangeValues(oCellRange, ReplaceValue) - End If - End If -End Sub - - -Sub ReplaceRangeValues(oRange as Object, ReplaceValue) -Dim oRangeAddress as Object -Dim ColCount as Integer -Dim RowCount as Integer -Dim i as Integer - oRangeAddress = oRange.RangeAddress - ColCount = oRangeAddress.EndColumn - oRangeAddress.StartColumn - RowCount = oRangeAddress.EndRow - oRangeAddress.StartRow - Dim FillArray(RowCount) as Variant - Dim sLine(ColCount) as Variant - For i = 0 To ColCount - sLine(i) = ReplaceValue - Next i - For i = 0 To RowCount - FillArray(i) = sLine() - Next i - oRange.DataArray = FillArray() -End Sub - - -' Returns the Value of the first cell of a Range -Function GetValueofCellbyName(oSheet as Object, sCellName as String) -Dim oCell as Object - oCell = GetCellByName(oSheet, sCellName) - GetValueofCellbyName = oCell.Value -End Function - - -Function DuplicateRow(oSheet as Object, RangeName as String) -Dim oRange as Object -Dim oCell as Object -Dim oCellAddress as New com.sun.star.table.CellAddress -Dim oRangeAddress as New com.sun.star.table.CellRangeAddress - oRange = oSheet.GetCellRangeByName(RangeName) - oRangeAddress = oRange.RangeAddress - oCell = oSheet.GetCellByPosition(oRangeAddress.StartColumn,oRangeAddress.StartRow) - oCellAddress = oCell.CellAddress - oSheet.Rows.InsertByIndex(oCellAddress.Row,1) - oRangeAddress = oRange.RangeAddress - oSheet.CopyRange(oCellAddress, oRangeAddress) - DuplicateRow = oRangeAddress.StartRow-1 -End Function - - -' Returns the String of the first cell of a Range -Function GetStringofCellbyName(oSheet as Object, sCellName as String) -Dim oCell as Object - oCell = GetCellByName(oSheet, sCellName) - GetStringofCellbyName = oCell.String -End Function - - -' Returns a named Cell -Function GetCellByName(oSheet as Object, sCellName as String) as Object -Dim oCellRange as Object -Dim oCellAddress as Object - oCellRange = oSheet.GetCellRangeByName(sCellName) - oCellAddress = oCellRange.RangeAddress - GetCellByName = oSheet.GetCellByPosition(oCellAddress.StartColumn,oCellAddress.StartRow) -End Function - - -' Changes the numeric Value of a cell by transmitting the String of the numeric Value -Sub ChangeCellValue(oCell as Object, ValueString as String) -Dim CellValue - oCell.Formula = "=Value(" & """" & ValueString & """" & ")" - CellValue = oCell.Value - oCell.Formula = "" - oCell.Value = CellValue -End Sub - - -Function GetDocumentType(oDocument) - On Local Error GoTo NODOCUMENTTYPE -' ShowSupportedServiceNames(oDocument) - If oDocument.SupportsService("com.sun.star.sheet.SpreadsheetDocument") Then - GetDocumentType() = "scalc" - ElseIf oDocument.SupportsService("com.sun.star.text.TextDocument") Then - GetDocumentType() = "swriter" - ElseIf oDocument.SupportsService("com.sun.star.drawing.DrawingDocument") Then - GetDocumentType() = "sdraw" - ElseIf oDocument.SupportsService("com.sun.star.presentation.PresentationDocument") Then - GetDocumentType() = "simpress" - ElseIf oDocument.SupportsService("com.sun.star.formula.FormulaProperties") Then - GetDocumentType() = "smath" - End If - NODOCUMENTTYPE: - If Err <> 0 Then - GetDocumentType = "" - Resume GOON - GOON: - End If -End Function - - -Function GetNumberFormatType(oDocFormats, oFormatObject as Object) as Integer -Dim ThisFormatKey as Long -Dim oObjectFormat as Object - On Local Error Goto NOFORMAT - ThisFormatKey = oFormatObject.NumberFormat - oObjectFormat = oDocFormats.GetByKey(ThisFormatKey) - GetNumberFormatType = oObjectFormat.Type - NOFORMAT: - If Err <> 0 Then - Msgbox("Numberformat of Object is not available!", 16, GetProductName()) - GetNumberFormatType = 0 - GOTO NOERROR - End If - NOERROR: - On Local Error Goto 0 -End Function - - -Sub ProtectSheets(Optional oSheets as Object) -Dim i as Integer -Dim oDocSheets as Object - If IsMissing(oSheets) Then - oDocSheets = StarDesktop.CurrentFrame.Controller.Model.Sheets - Else - Set oDocSheets = oSheets - End If - - For i = 0 To oDocSheets.Count-1 - oDocSheets(i).Protect("") - Next i -End Sub - - -Sub UnprotectSheets(Optional oSheets as Object) -Dim i as Integer -Dim oDocSheets as Object - If IsMissing(oSheets) Then - oDocSheets = StarDesktop.CurrentFrame.Controller.Model.Sheets - Else - Set oDocSheets = oSheets - End If - - For i = 0 To oDocSheets.Count-1 - oDocSheets(i).Unprotect("") - 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 GetColumnIndex(oSheet as Object, ColName as String) -Dim oRange as Object - oRange = oSheet.GetCellRangeByName(ColName) - GetColumnIndex = oRange.RangeAddress.StartColumn -End Function - - -Function CopySheetbyName(oSheets as Object, OldName as String, NewName as String, DestPos as Integer) as Object -Dim oSheet as Object -Dim Count as Integer -Dim BasicSheetName as String - - BasicSheetName = NewName - ' Copy the last table. Assumption: The last table is the template - On Local Error Goto RENAMESHEET - oSheets.CopybyName(OldName, NewName, DestPos) - -RENAMESHEET: - oSheet = oSheets(DestPos) - If Err <> 0 Then - ' Test if renaming failed - Count = 2 - Do While oSheet.Name <> NewName - NewName = BasicSheetName & "_" & Count - oSheet.Name = NewName - Count = Count + 1 - Loop - Resume CL_ERROR -CL_ERROR: - End If - CopySheetbyName = oSheet -End Function - - -' Dis-or enables a Window and adjusts the mousepointer accordingly -Sub ToggleWindow(bDoEnable as Boolean) -Dim oWindow as Object - oWindow = StarDesktop.CurrentFrame.ComponentWindow - oWindow.Enable = bDoEnable -End Sub - - -Function CheckNewSheetname(oSheets as Object, Sheetname as String, Optional oLocale) as String -Dim nStartFlags as Long -Dim nContFlags as Long -Dim oCharService as Object -Dim iSheetNameLength as Integer -Dim iResultPos as Integer -Dim WrongChar as String -Dim oResult as Object - nStartFlags = com.sun.star.i18n.KParseTokens.ANY_LETTER_OR_NUMBER + com.sun.star.i18n.KParseTokens.ASC_UNDERSCORE - nContFlags = nStartFlags - oCharService = CreateUnoService("com.sun.star.i18n.CharacterClassification") - iSheetNameLength = Len(SheetName) - If IsMissing(oLocale) Then - oLocale = ThisComponent.CharLocale - End If - Do - oResult =oCharService.parsePredefinedToken(com.sun.star.i18n.KParseType.IDENTNAME, SheetName, 0, oLocale, nStartFlags, "", nContFlags, " ") - iResultPos = oResult.EndPos - If iResultPos < iSheetNameLength Then - WrongChar = Mid(SheetName, iResultPos+1,1) - SheetName = ReplaceString(SheetName,"_", WrongChar) - End If - Loop Until iResultPos = iSheetNameLength - CheckNewSheetname = SheetName -End Function - - -Sub AddNewSheetName(oSheets as Object, ByVal SheetName as String) -Dim Count as Integer -Dim bSheetIsThere as Boolean -Dim iSheetNameLength as Integer - iSheetNameLength = Len(SheetName) - Count = 2 - Do - bSheetIsThere = oSheets.HasByName(SheetName) - If bSheetIsThere Then - SheetName = Right(SheetName,iSheetNameLength) & "_" & Count - Count = Count + 1 - End If - Loop Until Not bSheetIsThere - AddNewSheetname = SheetName -End Sub - - -Function GetSheetIndex(oSheets, sName) as Integer -Dim i as Integer - For i = 0 To oSheets.Count-1 - If oSheets(i).Name = sName Then - GetSheetIndex = i - exit Function - End If - Next i - GetSheetIndex = -1 -End Function - - -Function GetLastUsedRow(oSheet as Object) as Integer -Dim oCell As Object -Dim oCursor As Object -Dim aAddress As Variant - oCell = oSheet.GetCellbyPosition(0, 0) - oCursor = oSheet.createCursorByRange(oCell) - oCursor.GotoEndOfUsedArea(True) - aAddress = oCursor.RangeAddress - GetLastUsedRow = aAddress.EndRow -End Function - - -' Note To set a one lined frame you have to set the inner width to 0 -' In the API all Units that refer to pt-Heights are "1/100mm" -' The convert factor from 1pt to 1/100 mm is approximately 35 -Function ModifyBorderLineWidth(ByVal oStyleBorder, iInnerLineWidth as Integer, iOuterLineWidth as Integer) -Dim aBorder as New com.sun.star.table.BorderLine - aBorder = oStyleBorder - aBorder.InnerLineWidth = iInnerLineWidth - aBorder.OuterLineWidth = iOuterLineWidth - ModifyBorderLineWidth = aBorder -End Function - - -Sub AttachBasicMacroToEvent(oDocument as Object, EventName as String, SubPath as String) -Dim PropValue(1) as new com.sun.star.beans.PropertyValue - PropValue(0).Name = "EventType" - PropValue(0).Value = "StarBasic" - PropValue(1).Name = "Script" - PropValue(1).Value = "macro:///" & SubPath - oDocument.Events.ReplaceByName(EventName, PropValue()) -End Sub - - - -Function ModifyPropertyValue(oContent() as New com.sun.star.beans.PropertyValue, TargetProperties() as New com.sun.star.beans.PropertyValue) -Dim MaxIndex as Integer -Dim i as Integer -Dim a as Integer - MaxIndex = Ubound(oContent()) - bDoReplace = False - For i = 0 To MaxIndex - a = GetPropertyValueIndex(oContent(i).Name, TargetProperties()) - If a <> -1 Then - If Vartype(TargetProperties(a).Value) <> 9 Then - If TargetProperties(a).Value <> oContent(i).Value Then - oContent(i).Value = TargetProperties(a).Value - bDoReplace = True - End If - Else - If Not EqualUnoObjects(TargetProperties(a).Value, oContent(i).Value) Then - oContent(i).Value = TargetProperties(a).Value - bDoReplace = True - End If - End If - End If - Next i - ModifyPropertyValue() = bDoReplace -End Function - - -Function GetPropertyValueIndex(SearchName as String, TargetProperties() as New com.sun.star.beans.PropertyValue ) as Integer -Dim i as Integer - For i = 0 To Ubound(TargetProperties()) - If Searchname = TargetProperties(i).Name Then - GetPropertyValueIndex = i - Exit Function - End If - Next i - GetPropertyValueIndex() = -1 -End Function - - -Sub DispatchSlot(SlotID as Integer) -Dim oArg() as new com.sun.star.beans.PropertyValue -Dim oUrl as new com.sun.star.util.URL -Dim oTrans as Object -Dim oDisp as Object - oTrans = createUNOService("com.sun.star.util.URLTransformer") - oUrl.Complete = "slot:" & CStr(SlotID) - oTrans.parsestrict(oUrl) - oDisp = StarDesktop.ActiveFrame.queryDispatch(oUrl, "_self", 0) - oDisp.dispatch(oUrl, oArg()) -End Sub - - -'returns the type of the office application -'FatOffice = 0, WebTop = 1 -'This routine has to be changed if the Product Name is being changed! -Function IsFatOffice() As Boolean - If sProductname = "" Then - sProductname = GetProductname() - End If - IsFatOffice = TRUE - 'The following line has to include the current productname - If Instr(1,sProductname,"WebTop",1) <> 0 Then - IsFatOffice = FALSE - End If -End Function - - -Function GetLocale(sLanguage as String, sCountry as String) -Dim oLocale as New com.sun.star.lang.Locale - oLocale.Language = sLanguage - oLocale.Country = sCountry - GetLocale = oLocale -End Function - - -Sub ToggleDesignMode(oDocument as Object) -Dim aSwitchMode as new com.sun.star.util.URL - aSwitchMode.Complete = ".uno:SwitchControlDesignMode" - aTransformer = createUnoService("com.sun.star.util.URLTransformer") - aTransformer.parseStrict(aSwitchMode) - oFrame = oDocument.currentController.Frame - oDispatch = oFrame.queryDispatch(aSwitchMode, oFrame.Name, 63) - Dim aEmptyArgs() as New com.sun.star.bean.PropertyValue - oDispatch.dispatch(aSwitchMode, aEmptyArgs()) - Erase aSwitchMode -End Sub - - -Function isHighContrast(oPeer as Object) - Dim UIColor as Long - Dim myRed as Integer - Dim myGreen as Integer - Dim myBlue as Integer - Dim myLuminance as Double - - UIColor = oPeer.getProperty( "DisplayBackgroundColor" ) - myRed = Red (UIColor) - myGreen = Green (UIColor) - myBlue = Blue (UIColor) - myLuminance = (( myBlue*28 + myGreen*151 + myRed*77 ) / 256 ) - isHighContrast = false - If myLuminance <= 25 Then isHighContrast = true -End Function - - -Function CreateNewDocument(sType as String, Optional sAddMsg as String) as Object -Dim NoArgs() as new com.sun.star.beans.PropertyValue -Dim oDocument as Object -Dim sUrl as String -Dim ErrMsg as String - On Local Error Goto NOMODULEINSTALLED - sUrl = "private:factory/" & sType - oDocument = StarDesktop.LoadComponentFromURL(sUrl,"_default",0, NoArgs()) -NOMODULEINSTALLED: - If (Err <> 0) OR IsNull(oDocument) Then - If InitResources("", "com") Then - Select Case sType - Case "swriter" - ErrMsg = GetResText(1001) - Case "scalc" - ErrMsg = GetResText(1002) - Case "simpress" - ErrMsg = GetResText(1003) - Case "sdraw" - ErrMsg = GetResText(1004) - Case "smath" - ErrMsg = GetResText(1005) - Case Else - ErrMsg = "Invalid Document Type!" - End Select - ErrMsg = ReplaceString(ErrMsg, chr(13), "<BR>") - If Not IsMissing(sAddMsg) Then - ErrMsg = ErrMsg & chr(13) & sAddMsg - End If - Msgbox(ErrMsg, 48, GetProductName()) - End If - If Err <> 0 Then - Resume GOON - End If - End If -GOON: - CreateNewDocument = oDocument -End Function - - -' This Sub has been used in order to ensure that after disposing a document -' from the backing window it is returned to the backing window, so the -' office won't be closed -Sub DisposeDocument(oDocument as Object) -Dim dispatcher as Object -Dim parser as Object -Dim disp as Object -Dim url as new com.sun.star.util.URL -Dim NoArgs() as New com.sun.star.beans.PropertyValue -Dim oFrame as Object - If Not IsNull(oDocument) Then - oDocument.setModified(false) - parser = createUnoService("com.sun.star.util.URLTransformer") - url.Complete = ".uno:CloseDoc" - parser.parseStrict(url) - oFrame = oDocument.CurrentController.Frame - disp = oFrame.queryDispatch(url,"_self", com.sun.star.util.SearchFlags.NORM_WORD_ONLY) - disp.dispatch(url, NoArgs()) - End If -End Sub - -'Function to calculate if the year is a leap year -Function CalIsLeapYear(ByVal iYear as Integer) as Boolean - CalIsLeapYear = ((iYear Mod 4 = 0) And ((iYear Mod 100 <> 0) Or (iYear Mod 400 = 0))) -End Function -</script:module> diff --git a/wizards/source/tools/ModuleControls.xba b/wizards/source/tools/ModuleControls.xba deleted file mode 100644 index dc5ef02a5..000000000 --- a/wizards/source/tools/ModuleControls.xba +++ /dev/null @@ -1,370 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ModuleControls" script:language="StarBasic">Option Explicit - -Public DlgOverwrite as Object -Public Const SBOVERWRITEUNDEFINED as Integer = 0 -Public Const SBOVERWRITECANCEL as Integer = 2 -Public Const SBOVERWRITEQUERY as Integer = 7 -Public Const SBOVERWRITEALWAYS as Integer = 6 -Public Const SBOVERWRITENEVER as Integer = 8 -Public iGeneralOverwrite as Integer - - - -' Accepts the name of a control and returns the respective control model as object -' The Container can either be a whole document or a specific sheet of a Calc-Document -' 'CName' is the name of the Control -Function getControlModel(oContainer as Object, CName as String) -Dim aForm, oForms as Object -Dim i as Integer - oForms = oContainer.Drawpage.GetForms - For i = 0 To oForms.Count-1 - aForm = oForms.GetbyIndex(i) - If aForm.HasByName(CName) Then - GetControlModel = aForm.GetbyName(CName) - Exit Function - End If - Next i - Msgbox("No Control with the name '" & CName & "' found" , 16, GetProductName()) -End Function - - - -' Gets the Shape of a Control( e. g. to reset the size or Position of the control -' Parameters: -' The 'oContainer' is the Document or a specific sheet of a Calc - Document -' 'CName' is the Name of the Control -Function GetControlShape(oContainer as Object,CName as String) -Dim i as integer -Dim aShape as Object - For i = 0 to oContainer.DrawPage.Count-1 - aShape = oContainer.DrawPage(i) - If HasUnoInterfaces(aShape, "com.sun.star.drawing.XControlShape") then - If ashape.Control.Name = CName then - GetControlShape = aShape - exit Function - End If - End If - Next -End Function - - -' Returns the View of a Control -' Parameters: -' The 'oContainer' is the Document or a specific sheet of a Calc - Document -' The 'oController' is always directly attached to the Document -' 'CName' is the Name of the Control -Function getControlView(oContainer , oController as Object, CName as String) as Object -Dim aForm, oForms, oControlModel as Object -Dim i as Integer - oForms = oContainer.DrawPage.Forms - For i = 0 To oForms.Count-1 - aForm = oforms.GetbyIndex(i) - If aForm.HasByName(CName) Then - oControlModel = aForm.GetbyName(CName) - GetControlView = oController.GetControl(oControlModel) - Exit Function - End If - Next i - Msgbox("No Control with the name '" & CName & "' found" , 16, GetProductName()) -End Function - - - -' Parameters: -' The 'oContainer' is the Document or a specific sheet of a Calc - Document -' 'CName' is the Name of the Control -Function DisposeControl(oContainer as Object, CName as String) as Boolean -Dim aControl as Object - - aControl = GetControlModel(oContainer,CName) - If not IsNull(aControl) Then - aControl.Dispose() - DisposeControl = True - Else - DisposeControl = False - End If -End Function - - -' Returns a sequence of a group of controls like option buttons or checkboxes -' The 'oContainer' is the Document or a specific sheet of a Calc - Document -' 'sGroupName' is the Name of the Controlgroup -Function GetControlGroupModel(oContainer as Object, sGroupName as String ) -Dim aForm, oForms As Object -Dim aControlModel() As Object -Dim i as integer - - oForms = oContainer.DrawPage.Forms - For i = 0 To oForms.Count-1 - aForm = oForms(i) - If aForm.HasbyName(sGroupName) Then - aForm.GetGroupbyName(sGroupName,aControlModel) - GetControlGroupModel = aControlModel - Exit Function - End If - Next i - Msgbox("No Controlgroup with the name '" & sGroupName & "' found" , 16, GetProductName()) -End Function - - -' Returns the Referencevalue of a group of e.g. option buttons or check boxes -' 'oControlGroup' is a sequence of the Control objects -Function GetRefValue(oControlGroup() as Object) -Dim i as Integer - For i = 0 To Ubound(oControlGroup()) -' oControlGroup(i).DefaultState = oControlGroup(i).State - If oControlGroup(i).State Then - GetRefValue = oControlGroup(i).RefValue - exit Function - End If - Next - GetRefValue() = -1 -End Function - - -Function GetRefValueOfControlGroup(oContainer as Object, GroupName as String) -Dim oOptGroup() as Object -Dim iRef as Integer - oOptGroup() = GetControlGroupModel(oContainer, GroupName) - iRef = GetRefValue(oOptGroup()) - GetRefValueofControlGroup = iRef -End Function - - -Function GetOptionGroupValue(oContainer as Object, OptGroupName as String) as Boolean -Dim oRulesOptions() as Object - oRulesOptions() = GetControlGroupModel(oContainer, OptGroupName) - GetOptionGroupValue = oRulesOptions(0).State -End Function - - - -Function WriteOptValueToCell(oSheet as Object, OptGroupName as String, iCol as Integer, iRow as Integer) as Boolean -Dim bOptValue as Boolean -Dim oCell as Object - bOptValue = GetOptionGroupValue(oSheet, OptGroupName) - oCell = oSheet.GetCellByPosition(iCol, iRow) - oCell.SetValue(ABS(CInt(bOptValue))) - WriteOptValueToCell() = bOptValue -End Function - - -Function LoadDialog(Libname as String, DialogName as String, Optional oLibContainer) -Dim oLib as Object -Dim oLibDialog as Object -Dim oRuntimeDialog as Object - If IsMissing(oLibContainer ) then - oLibContainer = DialogLibraries - End If - oLibContainer.LoadLibrary(LibName) - oLib = oLibContainer.GetByName(Libname) - oLibDialog = oLib.GetByName(DialogName) - oRuntimeDialog = CreateUnoDialog(oLibDialog) - LoadDialog() = oRuntimeDialog -End Function - - -Sub GetFolderName(oRefModel as Object) -Dim oFolderDialog as Object -Dim iAccept as Integer -Dim sPath as String -Dim InitPath as String -Dim RefControlName as String -Dim oUcb as object - 'Note: The following services have to be called in the following order - ' because otherwise Basic does not remove the FileDialog Service - oFolderDialog = CreateUnoService("com.sun.star.ui.dialogs.FolderPicker") - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - InitPath = ConvertToUrl(oRefModel.Text) - If InitPath = "" Then - InitPath = GetPathSettings("Work") - End If - If oUcb.Exists(InitPath) Then - oFolderDialog.SetDisplayDirectory(InitPath) - End If - iAccept = oFolderDialog.Execute() - If iAccept = 1 Then - sPath = oFolderDialog.GetDirectory() - If oUcb.Exists(sPath) Then - oRefModel.Text = ConvertFromUrl(sPath) - End If - End If -End Sub - - -Sub GetFileName(oRefModel as Object, Filternames()) -Dim oFileDialog as Object -Dim iAccept as Integer -Dim sPath as String -Dim InitPath as String -Dim RefControlName as String -Dim oUcb as object -'Dim ListAny(0) - 'Note: The following services have to be called in the following order - ' because otherwise Basic does not remove the FileDialog Service - oFileDialog = CreateUnoService("com.sun.star.ui.dialogs.FilePicker") - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - 'ListAny(0) = com.sun.star.ui.dialogs.TemplateDescription.FILEOPEN_SIMPLE - 'oFileDialog.initialize(ListAny()) - AddFiltersToDialog(FilterNames(), oFileDialog) - InitPath = ConvertToUrl(oRefModel.Text) - If InitPath = "" Then - InitPath = GetPathSettings("Work") - End If - If oUcb.Exists(InitPath) Then - oFileDialog.SetDisplayDirectory(InitPath) - End If - iAccept = oFileDialog.Execute() - If iAccept = 1 Then - sPath = oFileDialog.Files(0) - If oUcb.Exists(sPath) Then - oRefModel.Text = ConvertFromUrl(sPath) - End If - End If - oFileDialog.Dispose() -End Sub - - -Function StoreDocument(oDocument as Object, FilterNames() as String, DefaultName as String, DisplayDirectory as String, Optional iAddProcedure as Integer) as String -Dim NoArgs() as New com.sun.star.beans.PropertyValue -Dim oStoreProperties(0) as New com.sun.star.beans.PropertyValue -Dim oStoreDialog as Object -Dim iAccept as Integer -Dim sPath as String -Dim ListAny(0) as Long -Dim UIFilterName as String -Dim FilterName as String -Dim FilterIndex as Integer - ListAny(0) = com.sun.star.ui.dialogs.TemplateDescription.FILESAVE_AUTOEXTENSION_PASSWORD - oStoreDialog = CreateUnoService("com.sun.star.ui.dialogs.FilePicker") - oStoreDialog.Initialize(ListAny()) - AddFiltersToDialog(FilterNames(), oStoreDialog) - oStoreDialog.SetDisplayDirectory(DisplayDirectory) - oStoreDialog.SetDefaultName(DefaultName) - oStoreDialog.setValue(com.sun.star.ui.dialogs.ExtendedFilePickerElementIds.CHECKBOX_AUTOEXTENSION,0, true) - - iAccept = oStoreDialog.Execute() - If iAccept = 1 Then - sPath = oStoreDialog.Files(0) - UIFilterName = oStoreDialog.GetCurrentFilter() - FilterIndex = IndexInArray(UIFilterName, FilterNames()) - FilterName = FilterNames(FilterIndex,2) - If Not IsMissing(iAddProcedure) Then - Select Case iAddProcedure - Case 1 - CommitLastDocumentChanges(sPath) - End Select - End If - On Local Error Goto NOSAVING - If FilterName = "" Then - ' Todo: Catch the case that a document that has to be overwritten is writeportected (e.g. it is open) - oDocument.StoreAsUrl(sPath, NoArgs()) - Else - oStoreProperties(0).Name = "FilterName" - oStoreProperties(0).Value = FilterName - oDocument.StoreAsUrl(sPath, oStoreProperties()) - End If - End If - oStoreDialog.dispose() - StoreDocument() = sPath - Exit Function -NOSAVING: - If Err <> 0 Then -' Msgbox("Document cannot be saved under '" & ConvertFromUrl(sPath) & "'", 48, GetProductName()) - sPath = "" - oStoreDialog.dispose() - Resume NOERROR - NOERROR: - End If -End Function - - -Sub AddFiltersToDialog(FilterNames() as String, oDialog as Object) -Dim i as Integer -Dim MaxIndex as Integer -Dim ViewFiltername as String -Dim oProdNameAccess as Object -Dim sProdName as String - oProdNameAccess = GetRegistryKeyContent("org.openoffice.Setup/Product") - sProdName = oProdNameAccess.getByName("ooName") - MaxIndex = Ubound(FilterNames(), 1) - For i = 0 To MaxIndex - Filternames(i,0) = ReplaceString(Filternames(i,0), sProdName,"%productname%") - oDialog.AppendFilter(FilterNames(i,0), FilterNames(i,1)) - Next i - oDialog.SetCurrentFilter(FilterNames(0,0) -End Sub - - -Sub SwitchMousePointer(oWindowPeer as Object, bDoEnable as Boolean) -Dim oWindowPointer as Object - oWindowPointer = CreateUnoService("com.sun.star.awt.Pointer") - If bDoEnable Then - oWindowPointer.SetType(com.sun.star.awt.SystemPointer.ARROW) - Else - oWindowPointer.SetType(com.sun.star.awt.SystemPointer.WAIT) - End If - oWindowPeer.SetPointer(oWindowPointer) -End Sub - - -Sub ShowOverwriteAllDialog(FilePath as String, sTitle as String) -Dim QueryString as String -Dim LocRetValue as Integer -Dim lblYes as String -Dim lblNo as String -Dim lblYesToAll as String -Dim lblCancel as String -Dim OverwriteModel as Object - If InitResources(GetProductName(), "dbw") Then - QueryString = GetResText(507) - QueryString = ReplaceString(QueryString, ConvertFromUrl(FilePath), "<PATH>") - If Len(QueryString) > 190 Then - QueryString = DeleteStr(QueryString, ".<BR>") - End If - QueryString = ReplaceString(QueryString, chr(13), "<BR>") - lblYes = GetResText(508) - lblYesToAll = GetResText(509) - lblNo = GetResText(510) - lblCancel = GetResText(511) - DlgOverwrite = LoadDialog("Tools", "DlgOverwriteAll") - DlgOverwrite.Title = sTitle - OverwriteModel = DlgOverwrite.Model - OverwriteModel.cmdYes.Label = lblYes - OverwriteModel.cmdYesToAll.Label = lblYesToAll - OverwriteModel.cmdNo.Label = lblNo - OverwriteModel.cmdCancel.Label = lblCancel - OverwriteModel.lblQueryforSave.Label = QueryString - OverwriteModel.cmdNo.DefaultButton = True - DlgOverwrite.GetControl("cmdNo").SetFocus() - iGeneralOverwrite = 999 - LocRetValue = DlgOverwrite.execute() - If iGeneralOverwrite = 999 Then - iGeneralOverwrite = SBOVERWRITECANCEL - End If - DlgOverwrite.dispose() - Else - iGeneralOverwrite = SBOVERWRITECANCEL - End If -End Sub - - -Sub SetOVERWRITEToQuery() - iGeneralOverwrite = SBOVERWRITEQUERY - DlgOverwrite.EndExecute() -End Sub - - -Sub SetOVERWRITEToAlways() - iGeneralOverwrite = SBOVERWRITEALWAYS - DlgOverwrite.EndExecute() -End Sub - - -Sub SetOVERWRITEToNever() - iGeneralOverwrite = SBOVERWRITENEVER - DlgOverwrite.EndExecute() -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/tools/Strings.xba b/wizards/source/tools/Strings.xba deleted file mode 100644 index a2a8907e0..000000000 --- a/wizards/source/tools/Strings.xba +++ /dev/null @@ -1,452 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Strings" script:language="StarBasic">Option Explicit -Public sProductname as String - - -' Deletes out of a String 'BigString' all possible PartStrings, that are summed up -' in the Array 'ElimArray' -Function ElimChar(ByVal BigString as String, ElimArray() as String) -Dim i% ,n% - For i = 0 to Ubound(ElimArray) - BigString = DeleteStr(BigString,ElimArray(i) - Next - ElimChar = BigString -End Function - - -' Deletes out of a String 'BigString' a possible Partstring 'CompString' -Function DeleteStr(ByVal BigString,CompString as String) as String -Dim i%, CompLen%, BigLen% - CompLen = Len(CompString) - i = 1 - While i <> 0 - i = Instr(i, BigString,CompString) - If i <> 0 then - BigLen = Len(BigString) - BigString = Mid(BigString,1,i-1) + Mid(BigString,i+CompLen,BigLen-i+1-CompLen) - End If - Wend - DeleteStr = BigString -End Function - - -' Finds a PartString, that is framed by the Strings 'Prestring' and 'PostString' -Function FindPartString(BigString, PreString, PostString as String, SearchPos as Integer) as String -Dim StartPos%, EndPos% -Dim BigLen%, PreLen%, PostLen% - StartPos = Instr(SearchPos,BigString,PreString) - If StartPos <> 0 Then - PreLen = Len(PreString) - EndPos = Instr(StartPos + PreLen,BigString,PostString) - If EndPos <> 0 Then - BigLen = Len(BigString) - PostLen = Len(PostString) - FindPartString = Mid(BigString,StartPos + PreLen, EndPos - (StartPos + PreLen)) - SearchPos = EndPos + PostLen - Else - Msgbox("No final tag for '" & PreString & "' existing", 16, GetProductName()) - FindPartString = "" - End If - Else - FindPartString = "" - End If -End Function - - -' Note iCompare = 0 (Binary comparison) -' iCompare = 1 (Text comparison) -Function PartStringInArray(BigArray(), SearchString as String, iCompare as Integer) as Integer -Dim MaxIndex as Integer -Dim i as Integer - MaxIndex = Ubound(BigArray()) - For i = 0 To MaxIndex - If Instr(1, BigArray(i), SearchString, iCompare) <> 0 Then - PartStringInArray() = i - Exit Function - End If - Next i - PartStringInArray() = -1 -End Function - - -' Deletes the String 'SmallString' out of the String 'BigString' -' in case SmallString's Position in BigString is right at the end -Function RTrimStr(ByVal BigString, SmallString as String) as String -Dim SmallLen as Integer -Dim BigLen as Integer - SmallLen = Len(SmallString) - BigLen = Len(BigString) - If Instr(1,BigString, SmallString) <> 0 Then - If Mid(BigString,BigLen + 1 - SmallLen, SmallLen) = SmallString Then - RTrimStr = Mid(BigString,1,BigLen - SmallLen) - Else - RTrimStr = BigString - End If - Else - RTrimStr = BigString - End If -End Function - - -' Deletes the Char 'CompChar' out of the String 'BigString' -' in case CompChar's Position in BigString is right at the beginning -Function LTRimChar(ByVal BigString as String,CompChar as String) as String -Dim BigLen as integer - BigLen = Len(BigString) - If BigLen > 1 Then - If Left(BigString,1) = CompChar then - BigString = Mid(BigString,2,BigLen-1) - End If - ElseIf BigLen = 1 Then - BigString = "" - End If - LTrimChar = BigString -End Function - - -' Retrieves an Array out of a String. -' The fields of the Array are separated by the parameter 'Separator', that is contained -' in the Array -' The Array MaxIndex delivers the highest Index of this Array -Function ArrayOutOfString(BigString, Separator as String, Optional MaxIndex as Integer) -Dim LocList() as String - LocList=Split(BigString,Separator) - - If not isMissing(MaxIndex) then maxIndex=ubound(LocList()) - - ArrayOutOfString=LocList -End Function - - -' Deletes all fieldvalues in one-dimensional Array -Sub ClearArray(BigArray) -Dim i as integer - For i = Lbound(BigArray()) to Ubound(BigArray()) - BigArray(i) = "" - Next -End Sub - - -' Deletes all fieldvalues in a multidimensional Array -Sub ClearMultiDimArray(BigArray,DimCount as integer) -Dim n%, m% - For n = Lbound(BigArray(),1) to Ubound(BigArray(),1) - For m = 0 to Dimcount - 1 - BigArray(n,m) = "" - Next m - Next n -End Sub - - -' Checks if a Field (LocField) is already defined in an Array -' Returns 'True' or 'False' -Function FieldinArray(LocArray(), MaxIndex as integer, LocField as String) As Boolean -Dim i as integer - For i = Lbound(LocArray()) to MaxIndex - If Ucase(LocArray(i)) = Ucase(LocField) Then - FieldInArray = True - Exit Function - End if - Next - FieldInArray = False -End Function - - -' Checks if a Field (LocField) is already defined in an Array -' Returns 'True' or 'False' -Function FieldinList(LocField, BigList()) As Boolean -Dim i as integer - For i = Lbound(BigList()) to Ubound(BigList()) - If LocField = BigList(i) Then - FieldInList = True - Exit Function - End if - Next - FieldInList = False -End Function - - -' Retrieves the Index of the delivered String 'SearchString' in -' the Array LocList()' -Function IndexinArray(SearchString as String, LocList()) as Integer -Dim i as integer - For i = Lbound(LocList(),1) to Ubound(LocList(),1) - If Ucase(LocList(i,0)) = Ucase(SearchString) Then - IndexinArray = i - Exit Function - End if - Next - IndexinArray = -1 -End Function - - -Sub MultiArrayInListbox(oDialog as Object, ListboxName as String, ValList(), iDim as Integer) -Dim oListbox as Object -Dim i as integer -Dim a as Integer - a = 0 - oListbox = oDialog.GetControl(ListboxName) - oListbox.RemoveItems(0, oListbox.GetItemCount) - For i = 0 to Ubound(ValList(), 1) - If ValList(i) <> "" Then - oListbox.AddItem(ValList(i, iDim-1), a) - a = a + 1 - End If - Next -End Sub - - -' Searches for a String in a two-dimensional Array by querying all Searchindexex of the second dimension -' and delivers the specific String of the ReturnIndex in the second dimension of the Searchlist() -Function StringInMultiArray(SearchList(), SearchString as String, SearchIndex as Integer, ReturnIndex as Integer, Optional MaxIndex as Integer) as String -Dim i as integer -Dim CurFieldString as String - If IsMissing(MaxIndex) Then - MaxIndex = Ubound(SearchList(),1) - End If - For i = Lbound(SearchList()) to MaxIndex - CurFieldString = SearchList(i,SearchIndex) - If Ucase(CurFieldString) = Ucase(SearchString) Then - StringInMultiArray() = SearchList(i,ReturnIndex) - Exit Function - End if - Next - StringInMultiArray() = "" -End Function - - -' Searches for a Value in multidimensial Array by querying all Searchindices of the passed dimension -' and delivers the Index where it is found. -Function GetIndexInMultiArray(SearchList(), SearchValue, SearchIndex as Integer) as Integer -Dim i as integer -Dim MaxIndex as Integer -Dim CurFieldValue - MaxIndex = Ubound(SearchList(),1) - For i = Lbound(SearchList()) to MaxIndex - CurFieldValue = SearchList(i,SearchIndex) - If CurFieldValue = SearchValue Then - GetIndexInMultiArray() = i - Exit Function - End if - Next - GetIndexInMultiArray() = -1 -End Function - - -' Searches for a Value in multidimensial Array by querying all Searchindices of the passed dimension -' and delivers the Index where the Searchvalue is found as a part string -Function GetIndexForPartStringinMultiArray(SearchList(), SearchValue, SearchIndex as Integer) as Integer -Dim i as integer -Dim MaxIndex as Integer -Dim CurFieldValue - MaxIndex = Ubound(SearchList(),1) - For i = Lbound(SearchList()) to MaxIndex - CurFieldValue = SearchList(i,SearchIndex) - If Instr(CurFieldValue, SearchValue) > 0 Then - GetIndexForPartStringinMultiArray() = i - Exit Function - End if - Next - GetIndexForPartStringinMultiArray = -1 -End Function - - -Function ArrayfromMultiArray(MultiArray as String, iDim as Integer) -Dim MaxIndex as Integer -Dim i as Integer - MaxIndex = Ubound(MultiArray()) - Dim ResultArray(MaxIndex) as String - For i = 0 To MaxIndex - ResultArray(i) = MultiArray(i,iDim) - Next i - ArrayfromMultiArray() = ResultArray() -End Function - - -' Replaces the string "OldReplace" through the String "NewReplace" in the String -' 'BigString' -Function ReplaceString(ByVal Bigstring, NewReplace, OldReplace as String) as String - ReplaceString=join(split(BigString,OldReplace),NewReplace) -End Function - - -' Retrieves the second value for a next to 'SearchString' in -' a two-dimensional string-Array -Function FindSecondValue(SearchString as String, TwoDimList() as String ) as String -Dim i as Integer - For i = 0 To Ubound(TwoDimList,1) - If Ucase(SearchString) = Ucase(TwoDimList(i,0)) Then - FindSecondValue = TwoDimList(i,1) - Exit For - End If - Next -End Function - - -' raises a base to a certain power -Function Power(Basis as Double, Exponent as Double) as Double - Power = Exp(Exponent*Log(Basis)) -End Function - - -' rounds a Real to a given Number of Decimals -Function Round(BaseValue as Double, Decimals as Integer) as Double -Dim Multiplicator as Long -Dim DblValue#, RoundValue# - Multiplicator = Power(10,Decimals) - RoundValue = Int(BaseValue * Multiplicator) - Round = RoundValue/Multiplicator -End Function - - -'Retrieves the mere filename out of a whole path -Function FileNameoutofPath(ByVal Path as String, Optional Separator as String) as String -Dim i as Integer -Dim SepList() as String - If IsMissing(Separator) Then - Path = ConvertFromUrl(Path) - Separator = GetPathSeparator() - End If - SepList() = ArrayoutofString(Path, Separator,i) - FileNameoutofPath = SepList(i) -End Function - - -Function GetFileNameExtension(ByVal FileName as String) -Dim MaxIndex as Integer -Dim SepList() as String - SepList() = ArrayoutofString(FileName,".", MaxIndex) - GetFileNameExtension = SepList(MaxIndex) -End Function - - -Function GetFileNameWithoutExtension(ByVal FileName as String, Optional Separator as String) -Dim MaxIndex as Integer -Dim SepList() as String - If not IsMissing(Separator) Then - FileName = FileNameoutofPath(FileName, Separator) - End If - SepList() = ArrayoutofString(FileName,".", MaxIndex) - GetFileNameWithoutExtension = RTrimStr(FileName, "." & SepList(MaxIndex) -End Function - - -Function DirectoryNameoutofPath(sPath as String, Separator as String) as String -Dim LocFileName as String - LocFileName = FileNameoutofPath(sPath, Separator) - DirectoryNameoutofPath = RTrimStr(sPath, Separator & LocFileName) -End Function - - -Function CountCharsinString(BigString, LocChar as String, ByVal StartPos as Integer) as Integer -Dim LocCount%, LocPos% - LocCount = 0 - Do - LocPos = Instr(StartPos,BigString,LocChar) - If LocPos <> 0 Then - LocCount = LocCount + 1 - StartPos = LocPos+1 - End If - Loop until LocPos = 0 - CountCharsInString = LocCount -End Function - - -Function BubbleSortList(ByVal SortList(),optional sort2ndValue as Boolean) -'This function bubble sorts an array of maximum 2 dimensions. -'The default sorting order is the first dimension -'Only if sort2ndValue is True the second dimension is the relevant for the sorting order - Dim s as Integer - Dim t as Integer - Dim i as Integer - Dim k as Integer - Dim dimensions as Integer - Dim sortvalue as Integer - Dim DisplayDummy - dimensions = 2 - -On Local Error Goto No2ndDim - k = Ubound(SortList(),2) - No2ndDim: - If Err <> 0 Then dimensions = 1 - - i = Ubound(SortList(),1) - If ismissing(sort2ndValue) then - sortvalue = 0 - else - sortvalue = 1 - end if - - For s = 1 to i - 1 - For t = 0 to i-s - Select Case dimensions - Case 1 - If SortList(t) > SortList(t+1) Then - DisplayDummy = SortList(t) - SortList(t) = SortList(t+1) - SortList(t+1) = DisplayDummy - End If - Case 2 - If SortList(t,sortvalue) > SortList(t+1,sortvalue) Then - For k = 0 to UBound(SortList(),2) - DisplayDummy = SortList(t,k) - SortList(t,k) = SortList(t+1,k) - SortList(t+1,k) = DisplayDummy - Next k - End If - End Select - Next t - Next s - BubbleSortList = SortList() -End Function - - -Function GetValueoutofList(SearchValue, BigList(), iDim as Integer, Optional ValueIndex) -Dim i as Integer -Dim MaxIndex as Integer - MaxIndex = Ubound(BigList(),1) - For i = 0 To MaxIndex - If BigList(i,0) = SearchValue Then - If Not IsMissing(ValueIndex) Then - ValueIndex = i - End If - GetValueOutOfList() = BigList(i,iDim) - End If - Next i -End Function - - -Function AddListtoList(ByVal FirstArray(), ByVal SecondArray(), Optional StartIndex) -Dim n as Integer -Dim m as Integer -Dim MaxIndex as Integer - MaxIndex = Ubound(FirstArray()) + Ubound(SecondArray()) + 1 - If MaxIndex > -1 Then - Dim ResultArray(MaxIndex) - For m = 0 To Ubound(FirstArray()) - ResultArray(m) = FirstArray(m) - Next m - For n = 0 To Ubound(SecondArray()) - ResultArray(m) = SecondArray(n) - m = m + 1 - Next n - AddListToList() = ResultArray() - Else - Dim NullArray() - AddListToList() = NullArray() - End If -End Function - - -Function CheckDouble(DoubleString as String) -On Local Error Goto WRONGDATATYPE - CheckDouble() = CDbl(DoubleString) -WRONGDATATYPE: - If Err <> 0 Then - CheckDouble() = 0 - Resume NoErr: - End If -NOERR: -End Function -</script:module>
\ No newline at end of file diff --git a/wizards/source/tools/UCB.xba b/wizards/source/tools/UCB.xba deleted file mode 100644 index 524afe60c..000000000 --- a/wizards/source/tools/UCB.xba +++ /dev/null @@ -1,294 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="UCB" script:language="StarBasic">'Option explicit -Public oDocument -Public oDocInfo as object -Const SBMAXDIRCOUNT = 10 -Dim CurDirMaxCount as Integer -Dim sDirArray(SBMAXDIRCOUNT-1) as String -Dim DirIndex As Integer -Dim iDirCount as Integer -Public bInterruptSearch as Boolean -Public NoArgs()as New com.sun.star.beans.PropertyValue - -Sub Main() -Dim LocsfileContent(0) as String - LocsfileContent(0) = "*" - ReadDirectories("file:///space", LocsfileContent(), True, False, false) -End Sub - -' ReadDirectories( sSourceDir, bRecursive, bCheckRealType, False, sFileContent(), sLocExtension) - -Function ReadDirectories(ByVal AnchorDir As String, bRecursive as Boolean, bcheckFileType as Boolean, bGetByTitle as Boolean, Optional sFileContent(), Optional sExtension as String) -Dim i as integer -Dim Status as Object -Dim FileCountinDir as Integer -Dim RealFileContent as String -Dim FileName as string -Dim oUcbObject as Object -Dim DirContent() -Dim CurIndex as Integer -Dim MaxIndex as Integer -Dim StartUbound as Integer -Dim FileExtension as String - StartUbound = 5 - MaxIndex = StartUBound - CurDirMaxCount = SBMAXDIRCOUNT -Dim sFileArray(StartUbound,1) as String - On Local Error Goto FILESYSTEMPROBLEM: - CurIndex = -1 - ' Todo: Is the last separator valid? - DirIndex = 0 - sDirArray(iDirIndex) = AnchorDir - iDirCount = 1 - oDocInfo = CreateUnoService("com.sun.star.document.DocumentProperties") - oUcbObject = createUnoService("com.sun.star.ucb.SimpleFileAccess") - If oUcbObject.Exists(AnchorDir) Then - Do - AnchorDir = sDirArray(DirIndex) - On Local Error Resume Next - DirContent() = oUcbObject.GetFolderContents(AnchorDir,True) - DirIndex = DirIndex + 1 - On Local Error Goto 0 - On Local Error Goto FILESYSTEMPROBLEM: - If Ubound(DirContent()) <> -1 Then - FileCountinDir = Ubound(DirContent())+ 1 - For i = 0 to FilecountinDir -1 - If bInterruptSearch = True Then - Exit Do - End If - - Filename = DirContent(i) - If oUcbObject.IsFolder(FileName) Then - If brecursive Then - AddFoldertoList(FileName, DirIndex) - End If - Else - If bcheckFileType Then - RealFileContent = GetRealFileContent(FileName) - Else - RealFileContent = GetFileNameExtension(FileName) - End If - If RealFileContent <> "" Then - ' Retrieve the Index in the Array, where a Filename is positioned - If Not IsMissing(sFileContent()) Then - If (FieldinArray(sFileContent(), Ubound(sFileContent), RealFileContent)) Then - ' The extension of the current file passes the filter and is therefor admitted to the - ' fileList - If Not IsMissing(sExtension) Then - If sExtension <> "" Then - ' Consider that some Formats like old StarOffice Templates with the extension ".vor" can only be - ' precisely identified by their mimetype and their extension - FileExtension = GetFileNameExtension(FileName) - If FileExtension = sExtension Then - AddFileNameToList(sFileArray(), FileName, RealFileContent, bGetByTitle, CurIndex) - End If - Else - AddFileNameToList(sFileArray(), FileName, RealFileContent, bGetByTitle, CurIndex) - End If - Else - AddFileNameToList(sFileArray(), FileName, RealFileContent, bGetByTitle, CurIndex) - End If - End If - Else - AddFileNameToList(sFileArray(), FileName, RealFileContent, bGetByTitle, CurIndex) - End If - If CurIndex = MaxIndex Then - MaxIndex = MaxIndex + StartUbound - ReDim Preserve sFileArray(MaxIndex,1) as String - End If - End If - End If - Next i - End If - Loop Until DirIndex >= iDirCount - If CurIndex > -1 Then - ReDim Preserve sFileArray(CurIndex,1) as String - Else - ReDim sFileArray() as String - End If - Else - Msgbox("Directory '" & ConvertFromUrl(AnchorDir) & "' does not exist!", 16, GetProductName()) - End If - ReadDirectories() = sFileArray() - Exit Function - - FILESYSTEMPROBLEM: - Msgbox("Sorry, Filesystem Problem") - ReadDirectories() = sFileArray() - Resume LEAVEPROC - LEAVEPROC: -End Function - - -Sub AddFoldertoList(sDirURL as String, iDirIndex) - iDirCount = iDirCount + 1 - If iDirCount = CurDirMaxCount Then - CurDirMaxCount = CurDirMaxCount + SBMAXDIRCOUNT - ReDim Preserve sDirArray(CurDirMaxCount) as String - End If - sDirArray(iDirCount-1) = sDirURL -End Sub - - -Sub AddFileNameToList(sFileArray(), FileName as String, FileContent as String, bGetByTitle as Boolean, CurIndex) -Dim FileCount As Integer - CurIndex = CurIndex + 1 - sFileArray(CurIndex,0) = FileName - If bGetByTitle Then - sFileArray(CurIndex,1) = RetrieveDocTitle(oDocInfo, FileName) - ' Add the documenttitles to the Filearray - Else - sFileArray(CurIndex,1) = FileContent - End If -End Sub - - -Function RetrieveDocTitle(oDocProps as Object, sFileName as String) As String -Dim sDocTitle as String - On Local Error Goto NOFILE - oDocProps.loadFromMedium(sFileName, NoArgs()) - sDocTitle = oDocProps.Title - NOFILE: - If Err <> 0 Then - RetrieveDocTitle = "" - RESUME CLR_ERROR - End If - CLR_ERROR: - If sDocTitle = "" Then - sDocTitle = GetFileNameWithoutExtension(sFilename, "/") - End If - RetrieveDocTitle = sDocTitle -End Function - - -' Retrieves The Filecontent of a Document by extracting the content -' from the Header of the document -Function GetRealFileContent(FileName as String) As String - On Local Error Goto NOFILE - oTypeDetect = createUnoService("com.sun.star.document.TypeDetection") - GetRealFileContent = oTypeDetect.queryTypeByURL(FileName) - NOFILE: - If Err <> 0 Then - GetRealFileContent = "" - resume CLR_ERROR - End If - CLR_ERROR: -End Function - - -Function CopyRecursively(SourceFilePath as String, SourceStemDir as String, TargetStemDir as String) -Dim TargetDir as String -Dim TargetFile as String - - TargetFile= ReplaceString(SourceFilePath, TargetStemDir, SourceStemDir) - TargetFileName = FileNameoutofPath(TargetFile,"/") - TargetDir = DeleteStr(TargetFile, TargetFileName) - CreateFolder(TargetDir) - CopyRecursively() = TargetFile -End Function - - -' Opens a help url referenced by a Help ID that is retrieved from the calling button tag -Sub ShowHelperDialog(aEvent) -Dim oSystemNode as Object -Dim sSystem as String -Dim oLanguageNode as Object -Dim sLocale as String -Dim sLocaleList() as String -Dim sLanguage as String -Dim sHelpUrl as String -Dim sDocType as String - HelpID = aEvent.Source.Model.Tag - oLocDocument = StarDesktop.ActiveFrame.Controller.Model - sDocType = GetDocumentType(oLocDocument) - oSystemNode = GetRegistryKeyContent("org.openoffice.Office.Common/Help") - sSystem = oSystemNode.GetByName("System") - oLanguageNode = GetRegistryKeyContent("org.openoffice.Setup/L10N/") - sLocale = oLanguageNode.getByName("ooLocale") - sLocaleList() = ArrayoutofString(sLocale, "-") - sLanguage = sLocaleList(0) - sHelpUrl = "vnd.sun.star.help://" & sDocType & "/" & HelpID & "?Language=" & sLanguage & "&System=" & sSystem - StarDesktop.LoadComponentfromUrl(sHelpUrl, "OFFICE_HELP", 63, NoArgs()) -End Sub - - -Sub SaveDataToFile(FilePath as String, DataList()) -Dim FileChannel as Integer -Dim i as Integer -Dim oFile as Object -Dim oOutputStream as Object -Dim oStreamString as Object -Dim oUcb as Object -Dim sCRLF as String - - sCRLF = CHR(13) & CHR(10) - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - oOutputStream = createUnoService("com.sun.star.io.TextOutputStream") - If oUcb.Exists(FilePath) Then - oUcb.Kill(FilePath) - End If - oFile = oUcb.OpenFileReadWrite(FilePath) - oOutputStream.SetOutputStream(oFile.GetOutputStream) - For i = 0 To Ubound(DataList()) - oOutputStream.WriteString(DataList(i) & sCRLF) - Next i - oOutputStream.CloseOutput() -End Sub - - -Function LoadDataFromFile(FilePath as String, DataList()) as Boolean -Dim oInputStream as Object -Dim i as Integer -Dim oUcb as Object -Dim oFile as Object -Dim MaxIndex as Integer - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - If oUcb.Exists(FilePath) Then - MaxIndex = 10 - oInputStream = createUnoService("com.sun.star.io.TextInputStream") - oFile = oUcb.OpenFileReadWrite(FilePath) - oInputStream.SetInputStream(oFile.GetInputStream) - i = -1 - Redim Preserve DataList(MaxIndex) - While Not oInputStream.IsEOF - i = i + 1 - If i > MaxIndex Then - MaxIndex = MaxIndex + 10 - Redim Preserve DataList(MaxIndex) - End If - DataList(i) = oInputStream.ReadLine - Wend - If i > -1 And i <> MaxIndex Then - Redim Preserve DataList(i) - End If - LoadDataFromFile() = True - oInputStream.CloseInput() - Else - LoadDataFromFile() = False - End If -End Function - - -Function CreateFolder(sNewFolder) as Boolean -Dim oUcb as Object - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - On Local Error Goto NOSPACEONDRIVE - If Not oUcb.Exists(sNewFolder) Then - oUcb.CreateFolder(sNewFolder) - End If - CreateFolder = True -NOSPACEONDRIVE: - If Err <> 0 Then - If InitResources("", "dbw") Then - ErrMsg = GetResText(500) - ErrMsg = ReplaceString(ErrMsg, chr(13), "<BR>") - ErrMsg = ReplaceString(ErrMsg, sNewFolder, "%1") - Msgbox(ErrMsg, 48, GetProductName()) - End If - CreateFolder = False - Resume GOON - End If -GOON: -End Function -</script:module> diff --git a/wizards/source/tools/delzip b/wizards/source/tools/delzip deleted file mode 100644 index e69de29bb..000000000 --- a/wizards/source/tools/delzip +++ /dev/null diff --git a/wizards/source/tools/dialog.xlb b/wizards/source/tools/dialog.xlb deleted file mode 100644 index dc8dfbda2..000000000 --- a/wizards/source/tools/dialog.xlb +++ /dev/null @@ -1,5 +0,0 @@ -<?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="Tools" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="DlgOverwriteAll"/> -</library:library> diff --git a/wizards/source/tools/script.xlb b/wizards/source/tools/script.xlb deleted file mode 100644 index fe4d74d60..000000000 --- a/wizards/source/tools/script.xlb +++ /dev/null @@ -1,10 +0,0 @@ -<?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="Tools" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="ModuleControls"/> - <library:element library:name="Strings"/> - <library:element library:name="Misc"/> - <library:element library:name="UCB"/> - <library:element library:name="Listbox"/> - <library:element library:name="Debug"/> -</library:library>
\ No newline at end of file diff --git a/wizards/source/tutorials/Functions.xba b/wizards/source/tutorials/Functions.xba deleted file mode 100644 index c1b464aca..000000000 --- a/wizards/source/tutorials/Functions.xba +++ /dev/null @@ -1,368 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Functions" script:language="StarBasic">REM ***** BASIC ***** -Dim DialogVisible As Boolean -Dim TutorStep As Integer -Dim TutorLastStep As Integer -Dim myDialog As Object -Dim myTutorial As Object -Public TutorText() As String -Dim documentTitle As String -Dim exampleUse As Object -Dim properties() As Object -Dim docTYP As String -'public myWidth As Long -Dim myHeight As Long -Dim oTextField As Object -Dim stepTitle As String -Dim oOpenDialogFlag -Dim imageStatus As String - -Sub LoadTutorialDialog(exampleToUse, documentTYP) - Init() - exampleUse = exampleToUse - TutorText() = exampleUse.LoadText() - properties() = exampleUse.GetProperties() - If properties(3).Value = "True" Then - Dim localisation(0) As new com.sun.star.beans.NamedValue - localisation(0).Name = "Localisation" - localisation(0).Value = properties() - myTutorial.execute(localisation()) - Else - TutorStep = 0 - TutorLastStep = 0 - docTYP = documentTYP - InitAction() - ShowInfoMain() - DialogVisible = True - myDialog = LoadDialog("Tutorials","TutorialsDialog") - - SetTutorialDocumentPosSize() - - documentProps = ThisComponent.getDocumentProperties() - myDialog.Title = "Tutorials - " & documentProps.Title - oTextField = myDialog.GetControl("myTextField") - oTextField.setVisible(False) - - imageStatus = "MIN" - setMaxMinImage(imageStatus) - - 'myWidth = myDialog.Size.Width - myHeight = myDialog.Size.Height - - CheckForStepShowButtonStatus() - CheckForStepNextButtonStatus() - InitRoadMap() - SetVisibleTrue() - myDialog.model.myTextField.Label = stepTitle - myDialog.model.myText.Label = GetStepText()'TutorText(TutorStep) - - - Do - wait 1000 - Loop Until DialogVisible = False - If( oOpenDialogFlag = True) Then - Destroy() - TutorialOpen.TutorialOpenMain() - Else - Destroy() - End If - End If -End Sub - -Sub setMaxMinImage(param As String) - On Local Error Goto NOIMAGE - oCommandButton = myDialog.GetControl("CommandButton") - templatePath = GetPathSettings("Template",false, 0) - Dim bitmapPath As String - iPos = InStr(templatePath,"/") - If(iPos > 0) Then - If(param = "MAX") Then - bitmapPath = templatePath & "../wizard/bitmap/maximize.bmp" - ElseIf(param = "MIN") Then - bitmapPath = templatePath & "../wizard/bitmap/minimize.bmp" - End If - Else - If(param = "MAX") Then - bitmapPath = templatePath & "..\wizard\bitmap\maximize.bmp" - ElseIf(param = "MIN") Then - bitmapPath = templatePath & "..\wizard\bitmap\minimize.bmp" - End If - End If - 'printdbgInfo oCommandButton.Model - oCommandButton.Model.ImageUrl = bitmapPath - Exit Sub - NOIMAGE: -End Sub - -Sub SetTutorialDocumentPosSize() - activDesktopWindow = StarDesktop.activeFrame.ContainerWindow - If(activDesktopWindow.posSize.Height < 550) Then - activDesktopWindow.setPosSize(0,0,0,550,8) - End If - If (activDesktopWindow.posSize.Width < 750 ) Then - activDesktopWindow.setPosSize(0,0,750,0,4) - EndIf -End Sub - -Sub InitRoadMap() - RoadMapMain(Functions, myDialog) - SetControlModelPosSize(0, 0, 85, 176) - SetControlModelText("Steps") - - StepSize = Ubound(TutorText()) - Dim ItemsArray(StepSize) as String - For i = 0 To StepSize - stepcontent = TutorText(i) - iPos = InStr(stepcontent,CHR(13)) - ItemName = Left(stepcontent, iPos) - ItemsArray(i) = ItemName - Next i - InsertItemsLabels( ItemsArray()) - - For i = 1 To StepSize - SetItemEnabled( i, False) - Next i - SetItemEnabled( 0, True) -End Sub - -Sub Destroy() - 'myDialog.dispose - wait 1000 - ShowInfoDialog.DisposeIDialog() - - ' HIER WIRD DAS DOCUMENT GESCHLOSSEN!!!!!!!! GPF - thisComponent.CurrentController.Frame.close(True) - -End Sub - -Sub Init - GlobalScope.BasicLibraries.LoadLibrary("Tools") - myTutorial = createUNOService("com.sun.star.wizards.tutorial.executer.CallTutorialFramework") - documentTitle = ThisComponent.getCurrentController.getFrame.Title -End Sub - -Sub InitStep - udProps = ThisComponent.DocumentProperties.UserDefinedProperties - If udProps.PropertySetInfo.hasPropertyByName("CurrentStep") Then - TutorStep = udProps.CurrentStep - Else - udProps.addProperty("CurrentStep", 0, TutorStep) - End If -End Sub - -Sub setStep - ThisComponent.DocumentProperties.UserDefinedProperties.CurrentStep = TutorStep -End Sub - -Sub InitAction() - SetStepTitle() - - Dim property(6) As new com.sun.star.beans.PropertyValue - property(0).Name = "DocumentTYP" - property(0).Value = docTYP - property(1).Name = "MethodName" - property(1).Value = "setDelay" - property(2).Name = "Param" - property(2).Value = 0 'key insert speed (Millis) - property(3).Name = "Param" - property(3).Value = 4 'mouse animate speed (Millis) - property(4).Name = "Param" - property(4).Value = 2000 'after mouse animate sleep (Millis) - property(5).Name = "Param" - property(5).Value = 10 'mouse scroll speed (Millis) - property(6).Name = "Param" - property(6).Value = -1 'mouse speed (step) - myTutorial.setPropertyValues(property()) -End Sub - -Sub EndDialog - oOpenDialogFlag = False - If (myDialog.model.done.Label = "Close") Then - TutorialCloseMain() - Else - DialogVisible = False - End If -End Sub - -Sub NextStep - GotoStep(TutorStep + 1) -End Sub - -Sub GotoStep(StepIndex) - If(StepIndex <= Ubound(TutorText())) Then - TutorStep = StepIndex - If TutorStep > TutorLastStep Then - TutorLastStep = TutorStep - End If - If(TutorStep = Ubound(TutorText())) Then - myDialog.model.next.enabled = False - myDialog.model.done.Label = "Done" - myDialog.model.show.Label = "Tutorials" - Else - myDialog.model.next.enabled = True - End If - SetStepTitle() - myDialog.model.myText.Label = GetStepText() - CheckForStepShowButtonStatus() - SetItemEnabled( TutorStep, True) - 'setStep() - End If -End Sub - -Function GetStepText() - Dim tempText As String - tempText = TutorText(TutorStep) - iPos = InStr(tempText,CHR(13)) - ResultString = Right(tempText, Len(tempText) - iPos - 1) - GetStepText() = ResultString -End Function - -Sub ItemChange(CurrentItemID, SelectitemID) - GotoStep(SelectitemID) -End Sub - -Sub SetDisableShowMeButton() - myDialog.model.show.enabled = False - TutorLastStep = TutorLastStep + 1 -End Sub - -Sub Minimize(aEvent) - ActionItemsTextField = myDialog.GetControl("ActionItemsLabel") - FixedLineVertikal = myDialog.GetControl("FixedLineVertikal") - - If myDialog.Size.Height = 35 Then - myDialog.setPosSize(0,0,0,myHeight,8) - oTextField.setVisible(False) - ActionItemsTextField.setVisible(True) - FixedLineVertikal.setVisible(True) - RoadMap.SetVisibleRoadMap(True) - Else - myDialog.setPosSize(0,0,0,35,8) - rmSelectedIndex = RoadMap.GetSelectedIndex() + 1 - gsTitle = GetStepTitle() - oTextField.setText(rmSelectedIndex & ". " & gsTitle) - oTextField.setVisible(True) - ActionItemsTextField.setVisible(False) - FixedLineVertikal.setVisible(False) - RoadMap.SetVisibleRoadMap(False) - End If - If(imageStatus = "MAX") Then - imageStatus = "MIN" - ElseIf(imageStatus = "MIN") Then - imageStatus = "MAX" - End If - setMaxMinImage(imageStatus) - -End Sub - -Sub SetStepTitle() - stepcontent = TutorText(TutorStep) - iPos = InStr(stepcontent,CHR(13)) - stepTitle = Left(stepcontent, iPos) - SetStepTitle() = stepTitle -End Sub - -Function GetStepTitle() - GetStepTitle() = stepTitle -End Function - -Sub CheckForStepShowButtonStatus() - If ((exampleUse.ContainsStepAction() = True And TutorStep = TutorLastStep) Or myDialog.model.show.Label = "Tutorials") Then - myDialog.model.show.enabled = True - Else - myDialog.model.show.enabled = False - End If -End Sub - -Sub CheckForStepNextButtonStatus() - If(TutorStep = Ubound(TutorText())) Then - myDialog.model.next.enabled = False - myDialog.model.done.Label = "Done" - End If -End Sub - -Sub Show(aEvent) - 'ShowInfoMain() - If( myDialog.model.show.Label = "Tutorials") Then - oOpenDialogFlag = True - DialogVisible = False - Else - SetMousePosition(aEvent) - exampleUse.Action() - End If -End Sub - -Sub SetMousePosition(aEvent) - MyPoints() = MousePoints(aEvent) - - Dim mousePosition(3) as new com.sun.star.beans.PropertyValue - mousePosition(0).Name = "DocumentTYP" - mousePosition(0).Value = docTYP - mousePosition(1).Name = "MethodName" - mousePosition(1).Value = "setMousePosition" - mousePosition(2).Name = "Param" - mousePosition(2).Value = MyPoints(0) - mousePosition(3).Name = "Param" - mousePosition(3).Value = MyPoints(1) - - myTutorial.setPropertyValues(mousePosition()) -End Sub - -Function MousePoints(aEvent) - Dim position(1) As Integer - position(0) = myDialog.getControl("show").AccessibleContext.LocationOnScreen.X + aEvent.Source.Model.PositionX - position(1) = myDialog.getControl("show").AccessibleContext.LocationOnScreen.Y + aEvent.Source.Model.PositionY - MousePoints = position() -End Function - -Function CheckPath(path() As String) - 'documentTitle = ThisComponent.getCurrentController.getFrame.Title - sTitle = path(0) - ResultString = Right(sTitle, 3) - iPos = InStr(ResultString,"#") - ResultString = Right(ResultString, Len(ResultString) - iPos) - ResultFrameString = InStr (sTitle, "{D}FRAME#") - If ResultFrameString <> 0 Then - If Not (sTitle = ("{D}FRAME#" & documentTitle & "#" & ResultString)) Then - 'path(0) = "{D}FRAME#" & documentTitle & "#" & ResultString - path(0) = "FRAME#" & documentTitle & "#" & ResultString - sTitle = path(1) - ResultString = Right(sTitle, 3) - iPos = InStr(ResultString,"#") - ResultString = Right(ResultString, Len(ResultString) - iPos) - path(1) = "ROOT_PANE#" & documentTitle & "#" & ResultString - Else - 'path(0) = "{D}FRAME#" & documentTitle & "#" & ResultString - path(0) = "FRAME#" & documentTitle & "#" & ResultString - End If - End If -End Function - -Sub SetVisibleTutorialsDialog(param) - myDialog.setVisible(param) -End Sub - -Sub SetVisibleTrue() - myDialog.setVisible(True) -End Sub - -Sub SetVisibleFalse() - myDialog.setVisible(False) -End Sub - -Sub ExitTutorial() - Dim aUrl As new com.sun.star.util.URL - oDoc = ThisComponent - urlTransformer = createUNOService("com.sun.star.util.URLTransformer") - aUrl.Complete = "slot:5621" - urlTransformer.parseStrict(aUrl) - xController = oDoc.getCurrentController() - xDispatcher = xController.queryDispatch(aUrl, "", 0) - if NOT isNull(xDispatcher) then - xDispatcher.dispatch(aUrl, DimArray()) - else - msgBox "Error! Cannot close document." - End If -End Sub -</script:module> diff --git a/wizards/source/tutorials/RoadMap.xba b/wizards/source/tutorials/RoadMap.xba deleted file mode 100644 index fa992cb13..000000000 --- a/wizards/source/tutorials/RoadMap.xba +++ /dev/null @@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="RoadMap" script:language="StarBasic">REM ***** BASIC ***** -Dim oControlModel -Dim oDialogModel -Dim CurrentItem -Dim bLongString -Dim oControl -Dim oEvent -Dim oUseDialog As Object -Dim oModulName As Object - -Sub RoadMapMain(ModulNameforItemChange, dialogtoUse) - GlobalScope.BasicLibraries.LoadLibrary("Tools") - oUseDialog = dialogtoUse - oModulName = ModulNameforItemChange - oDialogModel = oUseDialog.Model - oControlModel = oUseDialog.Model.CreateInstance("com.sun.star.awt.UnoControlRoadmapModel") - - oDialogModel.insertByName("RoadMap", oControlModel) - oControl = oUseDialog.getControl("RoadMap") - oEvent = createUnoListener( "CallBack_", "com.sun.star.awt.XItemListener" ) - oControl.addItemListener(oEvent) - oControlModel.CurrentItemID = 0 - oControlModel.Complete = True - oControlModel.Activated = True -End Sub - -Sub SetVisibleRoadMap(param) - oControl.SetVisible(param) -End Sub - -Sub SetDialogModelSize(Width, Height) - oDialogModel.Width = Width - oDialogModel.Height = Height -End Sub - -Sub SetControlModelPosSize(X, Y, Width, Height) - oControlModel.PositionX = X - oControlModel.PositionY = Y - oControlModel.Width = Width - oControlModel.Height = Height -End Sub - -Sub SetControlModelText( ModelText As String) - oControlModel.Text = ModelText -End Sub - -Sub InsertItemsLabels( ItemLabelsArray() As String) - For i = 0 To Ubound(ItemLabelsArray()) - oRoadmapItem = oControlModel.createInstance() - oRoadmapItem.Label = ItemLabelsArray(i) - oRoadmapItem.ID = i - oControlModel.insertbyIndex(i, oRoadmapItem) - Next i -End Sub - -Sub SetItemEnabled( ItemIndex, param) - oControlModel.getByIndex(ItemIndex).Enabled = param - oControlModel.CurrentItemID = ItemIndex -End Sub - -Sub AddImagetoControlModel( Url As String) - oControlModel.ImageUrl = ConvertToUrl(Url) -End Sub - -Function GetSelectedIndex() - GetSelectedIndex() = oControlModel.CurrentItemID -End Function - -Function GetControlModel() - GetControlModel = oControlModel -End Function - -Function GetDialogModel() - GetDialogModel = oDialogModel -End Function - -Sub Callback_itemStateChanged(aEvent) - oModulName.ItemChange(oControlModel.CurrentItemID, aEvent.itemID) -End Sub - -Sub SetComplete(param) - oControlModel.Complete = param -End Sub - -Sub SetActivated(param) - oControlModel.Activated = param -End Sub - -Sub RemoveItem(ItemIndex) - If ItemIndex > -1 Then - oControlModel.removeByIndex(ItemIndex) - End If -End Sub - -Sub InsertItem(ItemLabel As String) - oRoadmapItem = oControlModel.createInstance() - oRoadmapItem.Label = ItemLabel - oControlModel.insertbyIndex(oControlModel.CurrentItemID, oRoadmapItem) -End Sub - -Sub ReplaceItem(ItemLabel As String) - oRoadmapItem = oControlModel.createInstance() - oRoadmapItem.Label = ItemLabel - oControlModel.replacebyIndex(oControlModel.CurrentItemID, oRoadmapItem) -End Sub - -Sub Callback_disposing(aEvent) -End Sub - -Sub Property_propertyChange(aEvent) -End Sub - -Sub Property_disposing(aEvent) -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/tutorials/ShowInfoDialog.xba b/wizards/source/tutorials/ShowInfoDialog.xba deleted file mode 100644 index 61c2ed967..000000000 --- a/wizards/source/tutorials/ShowInfoDialog.xba +++ /dev/null @@ -1,305 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ShowInfoDialog" script:language="StarBasic">REM ***** BASIC ***** -Dim oWnd As Object -Dim oWnd2 As Object -Dim oWnd3 As Object -Dim oDoc as Object - -Sub ShowInfoMain - prop() = GetShowInfoPropeties() - Init(prop(0).Value, prop(1).Value, prop(2).Value, prop(3).Value, prop(4).Value, prop(5).Value, prop(6).Value, prop(7).Value, prop(8).Value) -End Sub - -Sub Init(tFieldText As String, windowX, windowY, windowWidth, windowHeight, tFieldX, tFieldY, tFieldWidth, tFieldHeight) - toolkit = createUnoService("com.sun.star.awt.Toolkit") - Dim oWndDescr As new com.sun.star.awt.WindowDescriptor - Dim oBounds As new com.sun.star.awt.Rectangle - oWndDescr.Type = com.sun.star.awt.WindowClass.TOP - oWndDescr.WindowServiceName = "" - oWndDescr.ParentIndex = 0 - - 'officeX = StarDesktop.ActiveFrame.getContainerWindow().AccessibleContext.LocationOnScreen.X - 'officeY = StarDesktop.ActiveFrame.getContainerWindow().AccessibleContext.LocationOnScreen.Y - 'officeWidth = StarDesktop.ActiveFrame.getContainerWindow().getPosSize().Width - 'officeHeight = StarDesktop.ActiveFrame.getContainerWindow().getPosSize().Height - officeWidth = thisComponent.CurrentController.Frame.getContainerWindow().getPosSize().Width - officeHeight = thisComponent.CurrentController.Frame.getContainerWindow().getPosSize().Height - - 'dialogWidth = myTutoShowDialog.getPosSize().Width - 'dialogHeight = myTutoShowDialog.getPosSize().Height - X = officeWidth - windowWidth - windowX - Y = officeHeight - windowHeight - windowY - - oBounds.X = X : oBounds.Y = Y - oBounds.Width = windowWidth : oBounds.Height = windowHeight - oWndDescr.Bounds = oBounds - oWndDescr.Parent = thisComponent.CurrentController.Frame.ContainerWindow - with com.sun.star.awt.WindowAttribute - oWndDescr.WindowAttributes = .CLOSEABLE AND .MOVEABLE AND .SIZEABLE AND .BORDER AND .SHOW - end with - - oWnd = toolkit.createWindow(oWndDescr) - - Dim oWndDescr3 As new com.sun.star.awt.WindowDescriptor - Dim oBounds3 As new com.sun.star.awt.Rectangle - oWndDescr3.Type = com.sun.star.awt.WindowClass.TOP - oWndDescr3.WindowServiceName = "fixedimage" '"fixedtext" - oWndDescr3.ParentIndex = 0 - oBounds3.X = 0 : oBounds3.Y = 0 - oBounds3.Width = tFieldWidth : oBounds3.Height = tFieldHeight - oWndDescr3.Bounds = oBounds3 - oWndDescr3.Parent = oWnd - with com.sun.star.awt.WindowAttribute - oWndDescr3.WindowAttributes = .CLOSEABLE AND .MOVEABLE AND .SIZEABLE AND .BORDER AND .SHOW - end with - - oWnd3= toolkit.createWindow(oWndDescr3) - 'oWnd2.Text = tFieldText - 'printdbgInfo(oWnd3) - setImage(oWnd3) - 'oWnd3.Background = 16777215 -' oWnd2.SetBackGround(16776960) - oWnd.SetBackGround(16776960) -' oWnd.FontDescriptors(0).Name = "Albany" -' oWnd.FontDescriptors(0).StyleName = "BOLD" - - Dim oWndDescr2 As new com.sun.star.awt.WindowDescriptor - Dim oBounds2 As new com.sun.star.awt.Rectangle - oWndDescr2.Type = com.sun.star.awt.WindowClass.TOP - oWndDescr2.WindowServiceName = "fixedtext" - oWndDescr2.ParentIndex = 0 - oBounds2.X = tFieldX : oBounds2.Y = tFieldY - oBounds2.Width = tFieldWidth : oBounds2.Height = tFieldHeight - oWndDescr2.Bounds = oBounds2 - oWndDescr2.Parent = oWnd3 - with com.sun.star.awt.WindowAttribute - oWndDescr2.WindowAttributes = .CLOSEABLE AND .MOVEABLE AND .SIZEABLE AND .BORDER AND .SHOW - end with - - oWnd2= toolkit.createWindow(oWndDescr2) - oWnd2.Text = tFieldText - oWnd2.Background = 268435455 - 'printdbgInfo(oWnd2) - - 'printdbgInfo oWnd.getPosSize() - -End Sub - -Function GetShowInfoPropeties() - stepText = GetStepTitle() - Dim Properties(8) As new com.sun.star.beans.NamedValue - Properties(0).Name = "ShowInfoDialogText" - Properties(0).Value = stepText & "Press [Esc] to abort." - Properties(1).Name = "WindowX" - Properties(1).Value = 20 - Properties(2).Name = "WindowY" - Properties(2).Value = 40 - Properties(3).Name = "WindowWidth" - Properties(3).Value = 190 - Properties(4).Name = "WindowHeight" - Properties(4).Value = 50 - Properties(5).Name = "TFieldX" - Properties(5).Value = 7 - Properties(6).Name = "TFieldY" - Properties(6).Value = 8 - Properties(7).Name = "TFieldWidth" - Properties(7).Value = 190 - Properties(8).Name = "TFieldHeight" - Properties(8).Value = 50 - GetShowInfoPropeties = Properties() -End Function - -Sub setShowInfoText() - stepText = GetStepTitle() - oWnd2.Text = stepText & "Press [Esc] to abort." -End Sub - -Sub ShowON() - setShowInfoText() - oWnd.setVisible(True) - oWnd3.setVisible(True) - oWnd2.setVisible(True) -End Sub - -Sub ShowOFF() - 'On Local Error Goto NOPROPERTYSETINFO: - oWnd.setVisible(False) - oWnd2.setVisible(False) - oWnd3.setVisible(False) - 'oDoc.dispose() - Exit Sub - 'NOPROPERTYSETINFO: -End Sub - -Sub DisposeIDialog() - 'On Local Error Goto NOPROPERTYSETINFO: - oWnd3.dispose - oWnd2.dispose - oWnd.dispose - oDoc.dispose() - Exit Sub - 'NOPROPERTYSETINFO: -End Sub - -sub setImage(whatever as Object) - - templatePath = GetPathSettings("Template",false, 0) - Dim bitmapPath As String - iPos = InStr(templatePath,"/") - if(iPos > 0) Then - bitmapPath = templatePath & "../wizard/bitmap/tutorial_background.gif" - Else - bitmapPath = templatePath & "..\wizard\bitmap\tutorial_background.gif" - End If - - dim props(0) as new com.sun.star.beans.PropertyValue - props(0).Name = "Hidden" - props(0).Value = true - oDoc = StarDesktop.loadComponentFromUrl("private:factory/swriter","_blank",0,props()) - oShape = addControlToDefaultForm("ImageButton", 1000, 1000, 2000, 1000) - imgControl = oShape.getControl() - 'imgControl.ImageUrl="file:///D:/Program%20Files/src680_m11_qwizards1_49_TEST/share/gallery/tutoItem.gif" - imgControl.ImageUrl = bitmapPath - imgControl.addConsumer(whatever) - imgControl.startProduction() -end sub - -Function createControlShape(cKind As String) As Object - - Dim oControlShape As Object - Dim oControl As Object - - - oControlShape = oDoc.createInstance("com.sun.star.drawing.ControlShape") - oControl = oDoc.createInstance("com.sun.star.form.component." & cKind) - oControl.setPropertyValue("DefaultControl", "com.sun.star.form.control." & cKind) - oControlShape.setControl(oControl) - - - createControlShape() = oControlShape - -End Function - -Function createControlShapeWithDefaultControl(cKind As String) As Object - - Dim oControlShape As Object - Dim oControl As Object - - - oControlShape = oDoc.createInstance("com.sun.star.drawing.ControlShape") - oControl = oDoc.createInstance("com.sun.star.form.component." & cKind) - oControlShape.setControl(oControl) - - - createControlShapeWithDefaultControl() = oControlShape - -End Function - -Function createUNOControlShape(cKind As String, defControl As String) As Object - - Dim oControlShape As Object - Dim oControl As Object - - - oControlShape = oDoc.createInstance("com.sun.star.drawing.ControlShape") - oControl = oDoc.createInstance("com.sun.star.form.component." & cKind) - oControl.setPropertyValue("DefaultControl", "com.sun.star.awt." & defControl) - oControlShape.setControl(oControl) - - - createUNOControlShape() = oControlShape - -End Function - -Function addShape(oShape As Object) As Boolean - - Dim vSize As New com.sun.star.awt.Size - Dim oDrawPage As Object - Dim oForms As Object - Dim oForm As Object - - oDrawPage = oDoc.getDrawPage() - oForms = oDrawPage.getForms() - - if oForms.Count = 0 then - oForm = oDoc.createInstance("com.sun.star.form.component.Form") - oForms.insertByIndex(0, oForm) - end if - - vSize.Height = 2000 : vSize.Width = 2000 - oShape.Size = vSize - oDrawPage.add(oShape) - - addShape() = true - -End Function - -sub addControl(cKind as String) - - Dim oDrawPage As Object - Dim oForm As Object, oForms As Object - Dim oControl As Object, oControlShape As Object - Dim aSz As Variant - Dim oText As Object - - oDrawPage = oDoc.DrawPage - oControlShape = oDoc.createInstance("com.sun.star.drawing.ControlShape") - oControl = oDoc.createInstance("com.sun.star.form.component." + cKind) - oForm = oDoc.createInstance("com.sun.star.form.component.Form") - oforms = oDrawPage.Forms - if oforms.count = 0 then - oforms.insertbyindex(0,oForm) - end if - oControlShape.Control = oControl - oDrawPage.add(oControlShape) - -End sub - -Function addControlToDefaultForm(cKind as String, x As Integer, y As Integer, width As Integer, height As Integer) As Object - - Dim oDrawPage As Object - Dim oControl As Object, oControlShape As Object - Dim pos As New com.sun.star.awt.Point - Dim size As New com.sun.star.awt.Size - - pos.X = x - pos.Y = y - size.Width = width - size.Height = height - - oDrawPage = oDoc.DrawPage - oControlShape = oDoc.createInstance("com.sun.star.drawing.ControlShape") - oControl = oDoc.createInstance("com.sun.star.form.component." + cKind) - oControlShape.Control = oControl - oControlShape.Position = pos - oControlShape.Size = size - oDrawPage.add(oControlShape) - - addControlToDefaultForm() = oControlShape - -End Function - -Function addShapeToDrawDoc(oPage as Object, nPosX, nPosY as Integer, oType As String) As Object - Dim aPoint As New com.sun.star.awt.Point - Dim aSize As New com.sun.star.awt.Size - Dim oShape As Object - Dim servNames As Variant - - aPoint.x = nPosX - aPoint.y = nPosY - aSize.Width = 2000 - aSize.Height = 1000 - oShape = oDoc.createInstance("com.sun.star.drawing."+oType+"Shape") - oShape.Size = aSize - oShape.Position = aPoint - - if oShape.getPropertySetInfo().hasPropertyByName("FillColor") then - oShape.FillColor = RGB(128, 255, 0) - End If - - oPage.add(oShape) - - addShapeToDrawDoc() = oShape -End Function -</script:module>
\ No newline at end of file diff --git a/wizards/source/tutorials/TutorialClose.xba b/wizards/source/tutorials/TutorialClose.xba deleted file mode 100644 index 2438243b8..000000000 --- a/wizards/source/tutorials/TutorialClose.xba +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="TutorialClose" script:language="StarBasic">REM ***** BASIC ***** -Dim myCloseDialog As Object - -Sub TutorialCloseMain - myCloseDialog = LoadDialog("Tutorials","TutorialCloseDialog") - myCloseDialog.Execute() -End Sub - -Sub CloseYes(aEvent) - myCloseDialog.EndExecute() - DialogVisible = False -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/tutorials/TutorialCloseDialog.xdl b/wizards/source/tutorials/TutorialCloseDialog.xdl deleted file mode 100644 index edc1dae7e..000000000 --- a/wizards/source/tutorials/TutorialCloseDialog.xdl +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="TutorialCloseDialog" dlg:left="173" dlg:top="82" dlg:width="132" dlg:height="38" dlg:closeable="true" dlg:moveable="true"> - <dlg:styles> - <dlg:style dlg:style-id="0" dlg:font-weight="150"/> - </dlg:styles> - <dlg:bulletinboard> - <dlg:button dlg:id="yesButton" dlg:tab-index="1" dlg:left="24" dlg:top="20" dlg:width="50" dlg:height="14" dlg:value="Yes"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.TutorialClose.CloseYes?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="noButton" dlg:tab-index="0" dlg:left="76" dlg:top="20" dlg:width="50" dlg:height="14" dlg:value="No" dlg:button-type="cancel"/> - <dlg:text dlg:style-id="0" dlg:id="Label1" dlg:tab-index="2" dlg:left="6" dlg:top="6" dlg:width="120" dlg:height="8" dlg:value="Do you want to close this Tutorial?." dlg:align="center"/> - </dlg:bulletinboard> -</dlg:window>
\ No newline at end of file diff --git a/wizards/source/tutorials/TutorialCreator.xba b/wizards/source/tutorials/TutorialCreator.xba deleted file mode 100644 index 7169b4e2e..000000000 --- a/wizards/source/tutorials/TutorialCreator.xba +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="TutorialCreator" script:language="StarBasic">REM ***** BASIC ***** -Sub TutorialCreatorMain - GlobalScope.BasicLibraries.LoadLibrary("Tools") - myTutorial = createUNOService("com.sun.star.wizards.tutorial.executer.CallTutorialFramework") - myTutorial.trigger("StartTutorialCreator") -End Sub - -</script:module>
\ No newline at end of file diff --git a/wizards/source/tutorials/TutorialOpen.xba b/wizards/source/tutorials/TutorialOpen.xba deleted file mode 100644 index a64a72507..000000000 --- a/wizards/source/tutorials/TutorialOpen.xba +++ /dev/null @@ -1,96 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="TutorialOpen" script:language="StarBasic">REM ***** BASIC ***** -Dim myOpenDialog As Object -Dim oListBox As Object -Dim files As Object -Dim oUcb As Object -Dim oListener As Object - -Sub TutorialOpenMain - GlobalScope.BasicLibraries.LoadLibrary("Tools") - myOpenDialog = LoadDialog("Tutorials","TutorialOpenDialog") - init() - myOpenDialog.Execute() -End Sub - -Sub Init - On Local Error Goto NOFILE - myOpenDialog.Title = "Tutorials" - oListBox = myOpenDialog.GetControl("ListBox") - templatePath = GetPathSettings("Template",false, 0) - Dim tutorialPath As String - iPos = InStr(templatePath,"/") - if(iPos > 0) Then - tutorialPath = templatePath & "/tutorials" - Else - tutorialPath = templatePath & "\tutorials" - End If - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - files = oUcb.getFolderContents(tutorialPath,true) - size = Ubound( files() ) - Dim tempFiles(size) As String - tempCount = 0 - For iCount = 0 To size - completPath = files(iCount) - oDocInfo = CreateUnoService("com.sun.star.document.DocumentProperties") - oDocInfo.Read(completPath) - sDocTitle = oDocInfo.Title - if(not isNull(sDocTitle) And len(sDocTitle) > 0) Then - oListbox.additem(sDocTitle,0) - tempFiles(tempCount) = completPath - tempCount = tempCount + 1 - End If - Next iCount - 'printdbgInfo oListbox - size = oListbox.ItemCount - 1 - Dim tempFiles2(size) As String - For iCount = 0 To size - tempFiles2(iCount) = tempFiles(iCount) - Next iCount - files() = tempFiles2() - Exit Sub - NOFILE: - If Err <> 0 Then - Msgbox "No file found error!" & CHR(13) & "Path: ...\share\template\...\tutorials\" - myOpenDialog.model.Open.enabled = False - End If -End Sub - -Sub ItemSelected(oEvent) - On Local Error Goto NOFILE - completPath = files(Ubound(files()) - oEvent.Selected) - oTextField = myOpenDialog.GetControl("Label") 'TextField - oTextField.setText("") - Dim NoArgs() as new com.sun.star.beans.PropertyValue - oDocInfo = CreateUnoService("com.sun.star.document.DocumentProperties") - oDocInfo.Read(completPath) - sDocDescription = oDocInfo.Description - if(not isNull(sDocTitle) And len(sDocDescription) > 0) Then - oTextField.setText(sDocDescription) - Else - oTextField.setText("Not Description!!!.") - End If - Exit Sub - NOFILE: - If Err <> 0 Then - Msgbox "Open file error!" - End If -End Sub - -Sub OpenTutorial(aEvent) - completPath = files(Ubound(files()) - oListBox.getSelectedItemPos()) - Dim Args(2) as new com.sun.star.beans.PropertyValue - Args(1).Name = "MacroExecutionMode" - Args(1).Value = com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE - Args(2).Name = "AsTemplate" - Args(2).Value = true - - StarDesktop.LoadComponentFromURL(completPath,"_default",0, Args()) - myOpenDialog.endExecute() -End Sub - -Sub Cancel(aEvent) - myOpenDialog.endExecute() -End Sub -</script:module>
\ No newline at end of file diff --git a/wizards/source/tutorials/TutorialOpenDialog.xdl b/wizards/source/tutorials/TutorialOpenDialog.xdl deleted file mode 100644 index 6c9893306..000000000 --- a/wizards/source/tutorials/TutorialOpenDialog.xdl +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="TutorialOpenDialog" dlg:left="158" dlg:top="58" dlg:width="250" dlg:height="200" dlg:closeable="true" dlg:moveable="true"> - <dlg:bulletinboard> - <dlg:button dlg:id="Open" dlg:tab-index="1" dlg:left="141" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Open"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.TutorialOpen.OpenTutorial?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="Cancel" dlg:tab-index="2" dlg:left="194" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Cancel"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.TutorialOpen.Cancel?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:menulist dlg:id="ListBox" dlg:tab-index="0" dlg:left="8" dlg:top="17" dlg:width="98" dlg:height="155"> - <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Tutorials.TutorialOpen.OpenTutorial" script:language="StarBasic"/> - <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="Tutorials.TutorialOpen.ItemSelected" script:language="StarBasic"/> - </dlg:menulist> - <dlg:fixedline dlg:id="FixedLine" dlg:tab-index="3" dlg:left="6" dlg:top="6" dlg:width="100" dlg:height="8" dlg:value="Tutorials"/> - <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="4" dlg:left="6" dlg:top="176" dlg:width="238" dlg:height="1"/> - <dlg:fixedline dlg:id="FixedLine2" dlg:tab-index="5" dlg:left="110" dlg:top="6" dlg:width="134" dlg:height="8" dlg:value="Description"/> - <dlg:fixedline dlg:id="FixedLine3" dlg:tab-index="6" dlg:left="267" dlg:top="44" dlg:width="0" dlg:height="2"/> - <dlg:text dlg:id="Label" dlg:tab-index="7" dlg:left="112" dlg:top="17" dlg:width="132" dlg:height="155" dlg:multiline="true"/> - </dlg:bulletinboard> -</dlg:window>
\ No newline at end of file diff --git a/wizards/source/tutorials/TutorialsDialog.xdl b/wizards/source/tutorials/TutorialsDialog.xdl deleted file mode 100644 index 3a211f9f6..000000000 --- a/wizards/source/tutorials/TutorialsDialog.xdl +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="TutorialsDialog" dlg:left="149" dlg:top="54" dlg:width="250" dlg:height="200" dlg:closeable="true" dlg:moveable="true"> - <dlg:styles> - <dlg:style dlg:style-id="0" dlg:font-weight="150"/> - </dlg:styles> - <dlg:bulletinboard> - <dlg:button dlg:id="CommandButton" dlg:tab-index="3" dlg:left="232" dlg:top="4" dlg:width="13" dlg:height="13" dlg:value="C"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.Functions.Minimize?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:text dlg:id="myText" dlg:tab-index="4" dlg:left="91" dlg:top="26" dlg:width="153" dlg:height="145" dlg:value="This text explains all the action items that the user can do to follow the current step highlighted in the road map at the left side of the tutorial window.

1. Open the Format menu
2. Choose the Paragraph command
3. Click the Numbering tab

The first step will always explain what the current tutorial is about.

The last step - it is higjlighted currently in the road map - will summarize what the user now has seen or learned." dlg:multiline="true"/> - <dlg:button dlg:id="show" dlg:tab-index="1" dlg:left="142" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Show me"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.Functions.Show?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:button dlg:id="next" dlg:tab-index="0" dlg:left="89" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Next >>"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.Functions.NextStep?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:text dlg:style-id="0" dlg:id="myTextField" dlg:tab-index="5" dlg:left="6" dlg:top="6" dlg:width="192" dlg:height="8" dlg:value="Current Step (in Road Map)"/> - <dlg:button dlg:id="done" dlg:tab-index="2" dlg:left="195" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Close"> - <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.Functions.EndDialog?language=Basic&location=application" script:language="Script"/> - </dlg:button> - <dlg:text dlg:style-id="0" dlg:id="ActionItemsLabel" dlg:tab-index="8" dlg:left="91" dlg:top="8" dlg:width="45" dlg:height="8" dlg:value="Action Items"/> - <dlg:fixedline dlg:id="FixedLineHorizontal" dlg:tab-index="7" dlg:left="0" dlg:top="176" dlg:width="250" dlg:height="1"/> - <dlg:fixedline dlg:id="FixedLineVertikal" dlg:tab-index="6" dlg:left="85" dlg:top="0" dlg:width="1" dlg:height="176" dlg:align="vertical"/> - </dlg:bulletinboard> -</dlg:window>
\ No newline at end of file diff --git a/wizards/source/tutorials/delzip b/wizards/source/tutorials/delzip deleted file mode 100644 index e69de29bb..000000000 --- a/wizards/source/tutorials/delzip +++ /dev/null diff --git a/wizards/source/tutorials/dialog.xlb b/wizards/source/tutorials/dialog.xlb deleted file mode 100644 index e02b20688..000000000 --- a/wizards/source/tutorials/dialog.xlb +++ /dev/null @@ -1,7 +0,0 @@ -<?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="Tutorials" library:readonly="false" library:passwordprotected="false"> - <library:element library:name="TutorialsDialog"/> - <library:element library:name="TutorialOpenDialog"/> - <library:element library:name="TutorialCloseDialog"/> -</library:library>
\ No newline at end of file diff --git a/wizards/source/tutorials/script.xlb b/wizards/source/tutorials/script.xlb deleted file mode 100644 index 30280c6b1..000000000 --- a/wizards/source/tutorials/script.xlb +++ /dev/null @@ -1,10 +0,0 @@ -<?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="Tutorials" library:readonly="false" library:passwordprotected="false"> - <library:element library:name="Functions"/> - <library:element library:name="TutorialCreator"/> - <library:element library:name="TutorialOpen"/> - <library:element library:name="RoadMap"/> - <library:element library:name="ShowInfoDialog"/> - <library:element library:name="TutorialClose"/> -</library:library>
\ No newline at end of file diff --git a/wizards/source/webwizard/Bullets.xba b/wizards/source/webwizard/Bullets.xba deleted file mode 100644 index 78b8fa0b0..000000000 --- a/wizards/source/webwizard/Bullets.xba +++ /dev/null @@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Bullets" script:language="StarBasic">REM ***** BASIC ***** -Option Explicit - - -Sub SetBulletGraphics(sBulletUrl as String) -Dim i as Integer -Dim oBookMarkCursor as Object - oBookmarks = oBaseDocument.BookMarks - For i = 0 To oBookmarks.Count - 1 - oBookMark = oBookmarks.GetbyIndex(i) - oBookMarkCursor = oBookMark.Anchor.Text.CreateTextCursorByRange(oBookMark.Anchor) - If oBookMarkCursor.PropertySetInfo.HasPropertybyName("NumberingRules") Then - ChangeBulletURL(sBulletUrl, oBookMarkCursor) - End If - Next i -End Sub - - -Sub ChangeBulletURL(sBulletUrl as String, oBookMarkCursor as Object) -Dim n, m as Integer -Dim oLevel() -Dim oRules -Dim bDoReplace as Boolean -Dim oSize as New com.sun.star.awt.Size -Dim oNumberingBuffer(0) as New com.sun.star.beans.PropertyValue -Dim oNewBuffer(0) as New com.sun.star.beans.PropertyValue - oRules = oBookMarkCursor.NumberingRules - If Vartype(oRules()) = 9 Then - oNumberingBuffer(0).Name = "NumberingType" - oNumberingBuffer(0).Value = com.sun.star.style.NumberingType.BITMAP - For n = 0 To oRules.Count - 1 - oLevel() = oRules.GetByIndex(n) - bDoReplace = ModifyPropertyValue(oLevel(), oNumberingBuffer()) - If bDoReplace Then - oRules.ReplaceByIndex(n, oNumberingBuffer()) - End If - Next n - oBookmarkCursor.NumberingRules = oRules - oNewBuffer(0).Name = "GraphicURL" - oNewBuffer(0).Value = sBulletUrl - For n = 0 To oRules.Count - 1 - oLevel() = oRules.GetByIndex(0) - bDoReplace = ModifyPropertyValue(oLevel(), oNewBuffer()) - If bDoReplace Then - oRules.ReplaceByIndex(n, oNewBuffer()) - End If - Next n - oBookmarkCursor.NumberingRules = oRules - End If -End Sub - - -Sub BulletUrlsToSavePath(SavePath as String) -Dim n as Integer -Dim m as Integer -Dim i as Integer -Dim sNewBulletUrl as String -Dim oLevel() -Dim oRules -Dim bIsFirstRun as Boolean -Dim oNewBuffer()' as New com.sun.star.beans.PropertyValue -Dim bDoReplace as Boolean -Dim oBookmarkCursor as Object - bIsFirstRun = True - oBookmarks = oBaseDocument.BookMarks - For i = 0 To oBookmarks.Count - 1 - oBookMark = oBookmarks.GetbyIndex(i) - oBookMarkCursor = oBookMark.Anchor.Text.CreateTextCursorByRange(oBookMark.Anchor) - If oBookMarkCursor.PropertySetInfo.HasPropertybyName("NumberingRules") Then - oRules = oBookMarkCursor.NumberingRules - If Vartype(oRules()) = 9 Then - For n = 0 To oRules.Count - 1 - oLevel() = oRules.GetByIndex(n) - oNewBuffer() = ChangeBulletUrlToSavePath(SavePath, oLevel(), bIsFirstRun, bDoReplace) - If bDoReplace Then - bIsFirstRun = False - oRules.ReplaceByIndex(n, oNewBuffer()) - End If - Next n - oBookmarkCursor.NumberingRules = oRules - End If - End If - Next i -End Sub - - -Function ChangeBulletUrlToSavePath(SavePath as String, oLevel(), bIsFirstRun as Boolean, bDoReplace as Boolean) -Dim MaxIndex as Integer -Dim i as Integer -Dim BulletName as String -Dim oSize as New com.sun.star.awt.Size - MaxIndex = Ubound(oLevel()) - Dim oNewBuffer(MaxIndex) as New com.sun.star.beans.PropertyValue - For i = 0 To MaxIndex - oNewBuffer(i).Name = oLevel(i).Name - If oLevel(i).Name = "GraphicURL" Then - bDoReplace = True - BulletName = FileNameoutofPath(oLevel(i).Value) - If bIsFirstRun Then - If oUcb.exists(SavePath & Bulletname) Then - FileCopy(oLevel(i).Value, SavePath & BulletName) - End If - End If - oNewBuffer(i).Value = BulletName -' ElseIf oLevel(i).Name = "GraphicSize" Then -'' Todo: Get the original Size of the Bullet (see Bug #86196) -' oSize.Height = 300 -' oSize.Width = 300 -' oNewBuffer(i).Value = oSize - Else - oNewBuffer(i).Value = oLevel(i).Value - End If - Next i - ChangeBulletUrlToSavePath() = oNewBuffer() -End Function</script:module>
\ No newline at end of file diff --git a/wizards/source/webwizard/Common.xba b/wizards/source/webwizard/Common.xba deleted file mode 100644 index 806c49423..000000000 --- a/wizards/source/webwizard/Common.xba +++ /dev/null @@ -1,145 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Common" script:language="StarBasic">REM ***** BASIC ***** -Option Explicit - - -Function LoadNewStyles(oDocument as Object, oDialogModel as Object, CurIndex as Integer, SourceFile as String, Styles() as String, TextureDir as String) as Boolean -Dim BackGroundURL as String -Dim oBackGraph as Object -Dim i, BackColor as Long -Dim bLocWithBackGraphic as Boolean -Dim oFamilies as Object, oFamily as Object', oStyle as Object -Dim StylesOptions(0) as New com.sun.star.beans.PropertyValue - - If SourceFile <> "" Then - StylesOptions(0).Name = "OverwriteStyles" - StylesOptions(0).Value = True - oDocument.StyleFamilies.LoadStylesFromURL(SourceFile, StylesOptions()) - End If - - ' Read array fields for background, bullet & graphics - BackgroundURL = Styles(CurIndex, 7) - If Left(BackgroundURL, 1) <> "#" Then - BackgroundURL = TextureDir + BackgroundURL - bLocWithBackGraphic = True - Else - BackColor = clng("&H" & Right(BackgroundURL, Len(BackgroundURL)-1)) - bLocWithBackGraphic = False - End If - oFamilies = oDocument.StyleFamilies - oFamily = oFamilies.GetbyName("PageStyles") - For i = 0 To oFamily.Count - 1 - If oFamily.GetByIndex(i).IsInUse Then - oStyle = oFamily.GetbyIndex(i) - If oStyle.PropertySetInfo.HasPropertybyName("BackGraphicURL") Then - If Left(BackgroundURL, 1) = "#" Then - oStyle.BackGraphicURL = "" - oStyle.BackColor = BackColor - oStyle.BackTransparent = False - Else - oStyle.BackGraphicUrl = BackGroundURL - SetTileBackgroundorNot(oDialogModel, oStyle) - End If - Exit For - End If - End If - Next i - LoadNewStyles() = bLocWithBackGraphic -ErrorOcurred: - If Err <> 0 Then - MsgBox (WebWiz_gErrWhileLoadStyles$, 16, WebWiz_gWizardName$) - RESUME EXITSUB -EXITSUB: - End If -End Function - - - -Sub ChangeBackGraphicUrl(SavePath as String) -Dim oPageFamily as Object -Dim i as Integer - oPageFamily = oBaseDocument.StyleFamilies.GetbyName("PageStyles") - For i = 0 To oPageFamily.Count - 1 - If oPageFamily.GetByIndex(i).IsInUse Then - oStyle = oPageFamily.GetbyIndex(i) - If oStyle.PropertySetInfo.HasPropertybyName("BackGraphicURL") Then - If oStyle.BackGraphicUrl <> "" Then - oStyle.BackGraphicUrl = CopyFile(oStyle.BackGraphicUrl, SavePath) - Exit Sub - End If - End If - End If - Next i -End Sub - - -Sub SetBackGraphicStyle(oEvent as Object) -Dim oFamilies as Object -Dim oFamily as Object -Dim i as Integer -Dim oOptModel as Object -Dim iBackgroundValue as Integer -Dim oLocDocument as Object - ooptModel = oEvent.Source.Model - iBackgroundValue = Val(ooptModel.Tag) - oLocDocument = StarDesktop.ActiveFrame.Controller.Model - oLocDocument.LockControllers - oFamilies = oLocDocument.StyleFamilies - oFamily = oFamilies.GetbyName("PageStyles") - For i = 0 To oFamily.Count - 1 - If oFamily.GetByIndex(i).IsInUse Then - oStyle = oFamily.GetbyIndex(i) - If oStyle.PropertySetInfo.HasPropertybyName("BackGraphicURL") Then - oStyle.BackGraphicLocation = iBackgroundValue - End If - End If - Next i - oLocDocument.UnlockControllers -End Sub - - -Sub SetTileBackgroundorNot(DialogModel as Object, oStyle as Object) - If Not IsNull(DialogModel) Then - If DialogModel.optTiled.State = 1 Then - oStyle.BackGraphicLocation = com.sun.star.style.GraphicLocation.TILED - Else - oStyle.BackGraphicLocation = com.sun.star.style.GraphicLocation.AREA - End If - End If -End Sub - - -Sub ToggleOptionButtons(DialogModel as Object, bDoEnable as Integer) - If Not IsNull(DialogModel) Then - DialogModel.optTiled.Enabled = bDoEnable - DialogModel.optArea.Enabled = bDoEnable - DialogModel.hlnBackground.Enabled = bDoEnable - End If -End Sub - - -Function GetCurIndex(oListbox as Object, sList() as String, FileIndex as Integer) -Dim i as Integer -Dim n as Integer -Dim SelValue as String -Dim MaxIndex as Integer - If IsNull(oListBox) Then - ' Startup for WebWizard - SelValue = sList(0,1) - Else - n = oListbox.SelectedItems(0) - SelValue = oListbox.StringItemList(n) - End If - ' Find field index for chosen list entry - MaxIndex = Ubound(sList) - For i = 0 To MaxIndex - If sList(i,1) = SelValue Then - FileStr = sList(i, FileIndex) - Exit For - End If - Next - GetCurIndex = i -End Function - -</script:module>
\ No newline at end of file diff --git a/wizards/source/webwizard/HtmlAutoPilotBasic.xba b/wizards/source/webwizard/HtmlAutoPilotBasic.xba deleted file mode 100644 index 00675bbf0..000000000 --- a/wizards/source/webwizard/HtmlAutoPilotBasic.xba +++ /dev/null @@ -1,436 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="HtmlAutoPilotBasic" script:language="StarBasic">' Variables must be declared -Option Explicit - -Public CurDocIndex as Integer -Public CurWebPageIndex as Integer - - -Public bWithBackGraphic as Boolean -Public oStyle as Object -' Maximum number of content templates, style templates and bullets -Const MaxLayouts = 50 -Const MaxStyles = 100 -Const MaxBullets = 10 - -'Public NumberOfLayouts%, NumberOfStyles% - -' Filled with title, previous, next, home, top, bullet, background, file name -Public Style(MaxStyles, 8) as String - -Public Layout$(MaxLayouts, 2) - -Public TextureDir$, BulletDir$, GraphicsDir$, GalleryDir$, PhotosDir$ -Public SOBitmapPath as String -Public CurrentBullet$, CurrentPrev$, CurrentNext$, CurrentHome$, CurrentTop$ -Public FileStr as String - -Public WebWiz_gWizardName$, WebWiz_gErrContentNotFound$, WebWiz_gErrStyleNotFound$ -Public WebWiz_gErrMainTemplateError$, WebWiz_gErrWhileReloading$ -Public WebWiz_gErrWhileLoadStyles$, WebWiz_gErrMsg$, WebWiz_gErrMainDocumentError$ - -Public ProgressBar as Object -Public ProgressValue As Long -Public oBaseDocument as Object -Public oViewCursor as Object -Public oViewSettings as Object -Public NoArgs() as New com.sun.star.beans.PropertyValue - -Public oCursor as Object -Public oBookmarks as Object -Public oBookMark as Object - -Public oUcb as Object -Public MainDialog as Object -Public DialogModel as Object - - -Sub Main -Dim RetValue -On Local Error Goto GlobalErrorHandler - BasicLibraries.LoadLibrary("Tools") - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - oBaseDocument = StarDesktop.LoadComponentFromURL("private:factory/swriter/web", "_default", 0, NoArgs()) - oViewSettings = oBaseDocument.CurrentController.ViewSettings - oViewCursor = oBaseDocument.GetCurrentController.ViewCursor - CurWebPageIndex = -1 - ProgressBar = oBaseDocument.GetCurrentController.GetFrame.CreateStatusIndicator - ProgressBar.Start("", 100) - SetProgressValue(2) - oBaseDocument.LockControllers - oViewSettings.ShowTableBoundaries = False - If Not GetWebWizardPaths() Then - Exit Sub - End If - LoadLanguage - SetProgressValue(10) - Layout() = getListBoxArrays(oUcb, "/cnt") - GetCurIndex(DialogModel, Layout(),2) - SetProgressValue(30) - oCursor = oBasedocument.Text.CreateTextCursor - oCursor.InsertDocumentfromURL(FileStr, NoArgs()) - SetProgressValue(50) - Style() = getListBoxArrays(oUcb, "/stl") - SetProgressValue(70) - LoadWebPageStyles(oBaseDocument) - SetProgressValue(90) - oBaseDocument.UnlockControllers - OpenWebDialog() - SetProgressValue(98) - SetProgressValue(0) - MainDialog.Model.ImagePreview.BackGroundColor = RGB(0, 60,126) - RetValue = MainDialog.Execute - Select Case RetValue - Case 0 - MainDialog.Dispose() - DisposeDocument(oBaseDocument) - Case 1 - EndDialog() - MainDialog.Dispose() - End Select -GLOBALERRORHANDLER: - If Err <> 0 Then - MsgBox (WebWiz_gErrMsg$, 16, WebWiz_gWizardName$) - DisposeDocument(oBaseDocument) - RESUME EXITWIZARD -EXITWIZARD: - End If -End Sub - - -Function SetProgressValue(iValue as Integer) - If iValue = 0 Then - ProgressBar.End - End If - ProgressValue = iValue - ProgressBar.Value = iValue -End Function - - -Sub ReloadCurrentDocument() -Dim OldDocIndex as Integer -On Local Error Goto ErrorOcurred - OldDocIndex = CurDocIndex - CurDocIndex = GetCurIndex(DialogModel.lbTemplate, Layout(), 2) - If OldDocIndex <> CurDocIndex Then - oBaseDocument.LockControllers - ToggleDialogControls(False) - oCursor = oBaseDocument.Text.CreateTextCursor() - oCursor.GotoStart(False) - oCursor.GotoEnd(True) - oCursor.SetAllPropertiesToDefault() - oCursor.InsertDocumentfromURL(FileStr, NoArgs()) - SetBulletAndGraphics - CheckControls(oBaseDocument.DrawPage) - ErrorOcurred: - If Err <> 0 Then - MsgBox(WebWiz_gErrWhileReloading$, 16, WebWiz_gWizardName$) - End If - oBaseDocument.UnlockControllers - oViewCursor.GotoStart(False) - ToggleDialogControls(True, "lbTemplate") - End If -End Sub - - - - -Sub LoadWebPageStyles(aEvent as Object, Optional bStartUp as Boolean) -Dim OldWebPageIndex as Integer - OldWebPageIndex = CurWebPageIndex - If IsNull(DialogModel) Then - CurWebPageIndex = GetCurIndex(DialogModel, Style(), 8) - Else - CurWebPageIndex = GetCurIndex(DialogModel.lbStyles, Style(), 8) - End If - If OldWebPageIndex <> CurWebPageIndex Then - ToggleDialogControls(False) - oBaseDocument.LockControllers - bWithBackGraphic = LoadNewStyles(oBaseDocument, DialogModel, CurWebPageIndex, FileStr, Style(), TextureDir) - CurrentBullet$ = BulletDir + Style(CurWebPageIndex, 6) - CurrentPrev$ = GraphicsDir + Style(CurWebPageIndex, 2) - CurrentNext$ = GraphicsDir + Style(CurWebPageIndex, 3) - CurrentHome$ = GraphicsDir + Style(CurWebPageIndex, 4) - CurrentTop$ = GraphicsDir + Style(CurWebPageIndex, 5) - With oBaseDocument.DocumentProperties.UserDefinedProperties - .AutoPilotName1 = ExtractGraphicNames(CurWebPageIndex,2) - .AutoPilotName2 = ExtractGraphicNames(CurWebPageIndex, 4) - .AutoPilotBullet = Style(CurWebPageIndex, 6) - .AutoPilotBackground = Style(CurWebPageIndex, 7) - End With - SetBulletAndGraphics() - CheckControls(oBaseDocument.DrawPage) - oViewCursor.GotoStart(False) - oBaseDocument.UnlockControllers - ToggleDialogControls(True, "lbStyles") - End If -End Sub - - -Function ExtractGraphicNames(CurIndex as Integer, i as Integer) as String -Dim FieldValue as String - FieldValue = GetFileNameWithoutExtension(Style(CurIndex, i)) - FieldValue = FieldValue & " " & GetFileNameWithoutExtension(Style(CurIndex, i+1)) - ExtractGraphicNames = FieldValue -End Function - - -Sub SetBulletAndGraphics - SetGraphic("Prev", CurrentPrev) - SetGraphic("Next", CurrentNext) - SetGraphic("Home", CurrentHome) - SetGraphic("Top", CurrentTop) - SetBulletGraphics(CurrentBullet) - SetGraphicsToOriginalSize() -End Sub - - -Sub SetGraphicsToOriginalSize() -Dim oGraphics as Object -Dim oGraphic as Object -Dim i as Integer -Dim aActSize as New com.sun.star.awt.Size - oGraphics = oBaseDocument.GraphicObjects - For i = 0 To oGraphics.Count-1 - oGraphic = oGraphics.GetByIndex(i) - aActSize = oGraphic.ActualSize - If aActSize.Height > 0 And aActSize.Width > 0 Then - oGraphic.SetSize(aActSize) - End If - Next i -End Sub - - -Sub EndDialog() - If DialogModel.chkSaveasTemplate.State = 1 Then - ' Generating template? Set events later! - AttachBasicMacroToEvent(oBaseDocument,"OnNew", "WebWizard.HtmlAutoPilotBasic.SetEvent()") - ' Call the Store template dialog - DispatchSlot(5538) - AttachBasicMacroToEvent(oBaseDocument,"OnNew", "") - End If - SetEvent() -End Sub - - -Sub SetEvent() -Dim oDocument as Object -' This sub links the events OnSaveDone and OnSaveAsDone to the procedure -' CopyGraphics. It is invoked when a document is created, either directly -' from the AutoPilot or from a template. It is not possible to set these -' links for the template created by the AutoPilot because then it is not -' possible to modify the template. - BasicLibraries.LoadLibrary("Tools") - oDocument = ThisComponent - AttachBasicMacroToEvent(oDocument,"OnSaveDone", "WebWizard.HtmlAutoPilotBasic.CopyGraphics()") - AttachBasicMacroToEvent(oDocument,"OnSaveAsDone", "WebWizard.HtmlAutoPilotBasic.CopyGraphics()") -End Sub - - - -Sub CopyGraphics -' This sub copies all the graphics used in the document to the same directory the -' document has been copied into and changes the graphics links in the document. -Dim oGraphicObjects as Object -Dim oGraphic as Object -Dim i as Integer -Dim udProps as Object -Dim SavePath as String - BasicLibraries.LoadLibrary("Tools") - oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess") - GetWebWizardPaths() - oBaseDocument = ThisComponent -' oBaseDocument.LockControllers() - - ' Note: The sub DirectoryNameoutofPath should be change, so that the last character is a slash - SavePath = DirectoryNameoutofPath(oBaseDocument.Url, "/") & "/" - - oGraphicObjects = oBaseDocument.GraphicObjects - For i = 0 to oGraphicObjects.Count-1 - oGraphic = oGraphicObjects.GetbyIndex(i) - oGraphic.GraphicUrl = CopyFile(oGraphic.GraphicURL, SavePath) - Next i - - ChangeBackGraphicUrl(SavePath) - - BulletUrlsToSavePath(SavePath) - - udProps = oBaseDocument.DocumentProperties.UserDefinedProperties - udProps.addProperty("AutoPilotName1", 0, "") - udProps.addProperty("AutoPilotName2", 0, "") - udProps.addProperty("AutoPilotBullet", 0, "") - udProps.addProperty("AutoPilotBackground", 0, "") - - AttachBasicMacroToEvent(oBaseDocument,"OnSaveDone", "") - AttachBasicMacroToEvent(oBaseDocument,"OnSaveAsDone", "") - AttachBasicMacroToEvent(oBaseDocument,"OnNew", "") - oBaseDocument.Store -' oBaseDocument.UnlockControllers() -End Sub - - -Function CopyFile(ByVal SourceUrl as String, TargetDir as String) -Dim sFileName as String -Dim sNewFileUrl as String - If oUcb.Exists(TargetDir) Then - If Len(TargetDir) > 2 Then - sFileName = FileNameoutofPath(SourceUrl) - sNewFileUrl = TargetDir & sFileName - oUcb.Copy(SourceUrl, sNewFileUrl) - CopyFile() = sNewFileUrl - End If - End If -End Function - - -Function getListBoxArrays(oUcb as Object, sFileFilter as String) -Dim oDocProps as Object -Dim oListboxControl as Object -Dim Description as String -Dim sField as String -Dim sFieldList() as String -Dim bItemFound as Boolean -Dim MaxIndex as Integer -Dim DirContent() as String -Dim FileName as String -Dim TemplatePath as String -Dim FilterLen as Integer -Dim i as Integer -Dim m as Integer -Dim n as Integer -Dim s as Integer -Dim a as Integer -Dim LocMaxIndex as Integer -Dim Properties() -Dim DimCount as Integer -Dim sExtension as String - oDocProps = CreateUnoService("com.sun.star.document.DocumentProperties") - FilterLen = Len(sFileFilter) - bItemFound = False - ' It has to be made sure that the TemplatePath <> "" - TemplatePath = GetOfficeSubPath("Template", "wizard/web/") - If TemplatePath = "" Then - Dim NullList() - getListBoxArrays() = NullList() - Exit Function - End If - DirContent() = oUcb.GetFolderContents(TemplatePath,True) - If sFileFilter = "/cnt" Then - DimCount = 2 - Else - DimCount = 8 - End If - LocMaxIndex = Ubound(DirContent()) - Dim List(LocMaxIndex, DimCount) as String - Dim SortList(LocMaxIndex,1) - For i = 0 to LocMaxIndex - SortList(i,0) = DirContent(i) - SortList(i,1) = RetrieveDocTitle(oDocProps, DirContent(i)) - Next i - SortList() = BubbleSortList(SortList(),True) - For i = 0 to LocMaxIndex - DirContent(i) = SortList(i,0) - Next i - a = 0 - For i = 0 To LocMaxIndex - FileName = DirContent(i) - sExtension = Ucase(GetFileNameExtension(FileName)) - If Instr(1,Filename, sFileFilter) And sExtension = "STW" Then - bItemFound = True - Description = RetrieveDocTitle(oDocProps, FileName) - Properties = oDocProps.UserDefinedProperties.PropertyValues - List(a,1) = Description - If sFileFilter = "/cnt" Then - List(a,2) = Filename - Else - m = 2 - For n = 0 To 3 - sField = Properties(n).Value - sFieldList() = ArrayoutofString(sField, " ", MaxIndex) - For s = 0 To MaxIndex - If m < 6 Then - List(a,m) = sFieldList(s) & ".gif" - Else - List(a,m) = sFieldList(s) - End If - m = m + 1 - Next s - Next n - List(a,8) = FileName - End If - a = a + 1 - End If - Next i - If sFileFilter = "/cnt" Then - ReDim Preserve List(a-1,2) as String - Else - ReDim Preserve List(a-1,8) as String - End If - If Not bItemfound Then - MsgBox(WebWiz_gErrContentNotFound$, 16, WebWiz_gWizardName$) - DisposeDocument(oBaseDocument) - Stop - End If - getListBoxArrays = List() -End Function - - -Sub SetGraphic(sWhich, sGraphicText as String) -Dim oLocCursor as Object -Dim oGraphic as Object -Dim bGetGraphic as Boolean - oBookmarks = oBaseDocument.BookMarks - If oBookmarks.HasbyName(sWhich)Then - oBookMark = oBookmarks.GetbyName(sWhich) - oLocCursor = oBookMark.Anchor.Text.CreateTextCursorByRange(oBookMark.Anchor) - oGraphic = oBaseDocument.CreateInstance("com.sun.star.text.GraphicObject") - oLocCursor.GoRight(3,True) - oGraphic.AnchorType = 1 - oGraphic.GraphicURL = ConverttoURL(sGraphicText) - oLocCursor.Text.InsertTextContent(oLocCursor, oGraphic, True) - oGraphic.Name = sWhich - ElseIf oBaseDocument.GraphicObjects.HasbyName(sWhich) Then - oGraphic = oBaseDocument.GraphicObjects.GetByName(sWhich) - oGraphic.GraphicUrl = sGraphicText - End If -End Sub - - -Sub CheckControls(oDrawPage as Object) -Dim aForm as Object -Dim m,n as integer -Dim lColor as Long -Dim oControl as Object - lColor = oBaseDocument.StyleFamilies.GetbyName("ParagraphStyles").GetByName("Standard").CharColor - 'SearchFor all possible Controls - For n = 0 to oDrawPage.Forms.Count - 1 - aForm = oDrawPage.Forms(n) - For m = 0 to aForm.Count-1 - oControl = aForm.GetbyIndex(m) - oControl.TextColor = lColor - Next - Next -End Sub - - -Sub RepaintHeaderPreview() -Dim Bitmap As Object -Dim sBitmapPath as String - sBitmapPath = SOBitmapPath & "webwizard.bmp" - WebWzrd.ImagePreview.ImageURL = sBitmapPath -End Sub - - -Sub ToggleDialogControls(ByVal bDoEnable as Boolean, Optional FocusControlName as String) - If Not IsNull(DialogModel) Then - DialogModel.Enabled = bDoEnable - If bDoEnable Then - ' Enable Controls referring to Background graphic only when this Property is set - bDoEnable = bWithBackGraphic - ToggleOptionButtons(DialogModel, bDoEnable) - MainDialog.GetControl(FocusControlName).SetFocus() - End If - End If -End Sub -</script:module> diff --git a/wizards/source/webwizard/Language.xba b/wizards/source/webwizard/Language.xba deleted file mode 100644 index 1c6b8c194..000000000 --- a/wizards/source/webwizard/Language.xba +++ /dev/null @@ -1,84 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> -<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Language" script:language="StarBasic">Option Explicit - - - - -Sub LoadLanguage() - If InitResources("WebWizard","wwz") Then - WebWiz_gErrContentNotFound = GetResText(1101) - WebWiz_gErrStyleNotFound = GetResText(1102) - WebWiz_gErrMainTemplateError = GetResText(1103) - WebWiz_gErrWhileReloading = GetResText(1104) - WebWiz_gErrWhileLoadStyles = GetResText(1105) - WebWiz_gErrMainDocumentError = GetResText(1106) - WebWiz_gErrMsg = GetResText(1107) - End If -End Sub - - -Function GetWebWizardPaths() as Boolean -Dim TemplatePath as String - TextureDir = GetOfficeSubPath("Gallery","www-back") - If TextureDir <> "" Then - GraphicsDir = GetOfficeSubPath("Gallery","www-graf/") - If GraphicsDir <> "" Then - BulletDir = GetOfficeSubPath("Gallery", "bullets/") - If BulletDir <> "" Then - PhotosDir = GetPathSettings("Gallery", False, 1) - If PhotosDir <> "" Then - TemplatePath = GetOfficeSubPath("Template", "wizard/web/") - If TemplatePath <> "" Then - SOBitmapPath = GetOfficeSubPath("Template", "../wizard/bitmap") - If SOBitmapPath <> "" Then - GetWebwizardPaths() = True - Exit Function - End If - End If - End If - End If - End If - End If - DisposeDocument(oBaseDocument) - GetWebWizardPaths() = False -End Function - - - -Sub OpenWebDialog() - Dim sBitmapPath as String - Dim BufferNames() as String - Dim SelList(0) as Integer - SelList(0) = 0 - MainDialog = LoadDialog("WebWizard","WebWzrd") - DialogModel = MainDialog.Model - With DialogModel - .cbHelp.Label = GetResText(1000) - .Title = GetResText(1001) - .cbCancel.Label = GetResText(1002) - .cbGoOn.Label = GetResText(1003) - .lblTemplate.Label = GetResText(1004) - .lblStyle.Label = GetResText(1005) - .hlnBackground.Label = GetResText(1006) - .optTiled.Label = GetRestext(1007) - .optArea.Label = GetResText(1008) - .chkSaveasTemplate.Label = GetResText(1010) - End With - - BufferNames() = ArrayfromMultiArray(Layout, 1) - DialogModel.lbTemplate.StringItemList() = BufferNames() - DialogModel.lbTemplate.SelectedItems() = SelList() - - - BufferNames() = ArrayfromMultiArray(Style, 1) - DialogModel.lbStyles.StringItemList() = BufferNames() - DialogModel.lbStyles.SelectedItems() = SelList() - sBitmapPath = SOBitmapPath & "webwizard.bmp" - - DialogModel.ImagePreview.ImageURL = sBitmapPath - ToggleOptionButtons(DialogModel, bWithBackGraphic) - MainDialog.GetControl("lbTemplate").SetFocus() - DialogModel.cbGoOn.DefaultButton = True - DialogModel.ImagePreview.BackGroundColor = RGB(0,60,126) -End Sub</script:module>
\ No newline at end of file diff --git a/wizards/source/webwizard/WebWzrd.xdl b/wizards/source/webwizard/WebWzrd.xdl deleted file mode 100644 index ac826e242..000000000 --- a/wizards/source/webwizard/WebWzrd.xdl +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd"> -<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="WebWzrd" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:help-url="HID:WIZARDS_HID0_WEBWIZARD" dlg:closeable="true" dlg:moveable="true"> - <dlg:bulletinboard> - <dlg:button dlg:id="cbCancel" dlg:tab-index="0" dlg:left="6" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID0_STATUS_DIALOG" dlg:value="Cancel" dlg:button-type="cancel"/> - <dlg:button dlg:id="cbHelp" dlg:tab-index="1" dlg:left="66" dlg:top="190" dlg:width="50" dlg:height="14" dlg:tag="HID:WIZARDS_HID0_WEBWIZARD" dlg:value="cbHelp" dlg:button-type="help"/> - <dlg:button dlg:id="cbGoOn" dlg:tab-index="2" dlg:left="214" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:WIZARDS_HID0_CANCEL" dlg:default="true" dlg:value="cbGoOn" dlg:button-type="ok"/> - <dlg:img dlg:id="ImagePreview" dlg:tab-index="3" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="26" dlg:scale-image="false"/> - <dlg:menulist dlg:id="lbTemplate" dlg:tab-index="4" dlg:left="6" dlg:top="53" dlg:width="110" dlg:height="94" dlg:help-url="HID:WIZARDS_HID0_HELP"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:WebWizard.HtmlAutoPilotBasic.ReloadCurrentDocument?language=Basic&location=application" script:language="Script"/> - </dlg:menulist> - <dlg:menulist dlg:id="lbStyles" dlg:tab-index="5" dlg:left="154" dlg:top="53" dlg:width="110" dlg:height="94" dlg:help-url="HID:WIZARDS_HID0_NEXT"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:WebWizard.HtmlAutoPilotBasic.LoadWebPageStyles?language=Basic&location=application" script:language="Script"/> - </dlg:menulist> - <dlg:text dlg:id="lblTemplate" dlg:tab-index="6" dlg:left="6" dlg:top="42" dlg:width="110" dlg:height="10"/> - <dlg:text dlg:id="lblStyle" dlg:tab-index="7" dlg:left="154" dlg:top="42" dlg:width="110" dlg:height="10" dlg:value="lblStyle"/> - <dlg:checkbox dlg:id="chkSaveasTemplate" dlg:tab-index="8" dlg:left="6" dlg:top="164" dlg:width="110" dlg:height="12" dlg:help-url="HID:WIZARDS_HID1_LST_SESSIONS" dlg:value="chkSaveasTemplate" dlg:checked="false"/> - <dlg:radiogroup> - <dlg:radio dlg:id="optTiled" dlg:tab-index="9" dlg:left="161" dlg:top="164" dlg:width="96" dlg:height="10" dlg:tag="11" dlg:help-url="HID:34208" dlg:value="optTiled" dlg:checked="true"> - <script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:WebWizard.Common.SetBackGraphicStyle?language=Basic&location=application" script:language="Script"/> - </dlg:radio> - <dlg:radio dlg:id="optArea" dlg:tab-index="10" dlg:left="161" dlg:top="177" dlg:width="96" dlg:height="10" dlg:tag="10" dlg:help-url="HID:WIZARDS_HID1_BTN_DEL_SES" dlg:value="optArea"> - <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="WebWizard.HtmlAutoPilotBasic.SetBackGraphicStyle" script:language="StarBasic"/> - </dlg:radio> - </dlg:radiogroup> - <dlg:fixedline dlg:id="hlnBackground" dlg:tab-index="11" dlg:left="154" dlg:top="152" dlg:width="110" dlg:height="9" dlg:value="hlnBackground"/> - </dlg:bulletinboard> -</dlg:window>
\ No newline at end of file diff --git a/wizards/source/webwizard/delzip b/wizards/source/webwizard/delzip deleted file mode 100644 index e69de29bb..000000000 --- a/wizards/source/webwizard/delzip +++ /dev/null diff --git a/wizards/source/webwizard/dialog.xlb b/wizards/source/webwizard/dialog.xlb deleted file mode 100644 index d1b9cb066..000000000 --- a/wizards/source/webwizard/dialog.xlb +++ /dev/null @@ -1,5 +0,0 @@ -<?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="WebWizard" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="WebWzrd"/> -</library:library> diff --git a/wizards/source/webwizard/script.xlb b/wizards/source/webwizard/script.xlb deleted file mode 100644 index 1045820b7..000000000 --- a/wizards/source/webwizard/script.xlb +++ /dev/null @@ -1,8 +0,0 @@ -<?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="WebWizard" library:readonly="true" library:passwordprotected="false"> - <library:element library:name="HtmlAutoPilotBasic"/> - <library:element library:name="Language"/> - <library:element library:name="Bullets"/> - <library:element library:name="Common"/> -</library:library> diff --git a/wizards/source/webwizard/webwizar.src b/wizards/source/webwizard/webwizar.src deleted file mode 100644 index b7bb7dd3b..000000000 --- a/wizards/source/webwizard/webwizar.src +++ /dev/null @@ -1,167 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/#define WEBDIALOG 1000 -/* -#define WEBERROR 1100 -// -------------------------------------------------------------------- - -String WEBDIALOG -{ - Text [ en-US ] = "~Help"; -}; - - -String WEBDIALOG + 1 -{ - Text [ en-US ] = "AutoPilot Web Page"; -}; - - - - -String WEBDIALOG + 2 -{ - Text [ en-US ] = "~Cancel"; -}; - -String WEBDIALOG + 3 -{ - Text [ en-US ] = "C~reate"; -}; - - -String WEBDIALOG + 4 -{ - Text [ en-US ] = "Which template should be used?"; -}; - -String WEBDIALOG + 5 -{ - Text [ en-US ] = "Which layout should be used?"; -}; - - -String WEBDIALOG + 6 -{ - Text [ en-US ] = "Background Image"; -}; - - - -String WEBDIALOG + 7 -{ - Text [ en-US ] = "~Tiled"; -}; - - -String WEBDIALOG + 8 -{ - Text [ en-US ] = "~Scaled"; -}; - - -String WEBDIALOG + 9 -{ - Text [ en-US ] = "Edit document"; -}; - -String WEBDIALOG + 10 -{ - Text [ en-US ] = "Create template"; -}; - - -String WEBERROR + 1 -{ - Text [ en-US ] = "A template for the page setup could not be found."; -}; - -String WEBERROR + 2 -{ - Text [ en-US ] = "A Style for the Page Style could not be found."; -}; - -String WEBERROR + 3 -{ - Text [ en-US ] = "An error occurred as the templates were being interpreted."; -}; - -String WEBERROR + 4 -{ - Text [ en-US ] = "An error occurred as the template was being refreshed."; -}; - -String WEBERROR + 5 -{ - Text [ en-US ] = "An error occurred while applying the Styles."; -}; - -String WEBERROR + 6 -{ - Text [ en-US ] = "An error occurred while evaluating the documents."; -}; - -String WEBERROR + 7 -{ - Text [ en-US ] = "An error occurred while running the AutoPilot."; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/ |