diff options
Diffstat (limited to 'wizards/source/template/Samples.xba')
-rw-r--r-- | wizards/source/template/Samples.xba | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/wizards/source/template/Samples.xba b/wizards/source/template/Samples.xba index 13fe11a09dd9..ac3431a2023b 100644 --- a/wizards/source/template/Samples.xba +++ b/wizards/source/template/Samples.xba @@ -19,9 +19,6 @@ --> <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Samples" script:language="StarBasic">Option Explicit -Const STYLES = 1100 -Const STYLENAME_DEF = 1120 -Const STYLENAME = 1150 Const NumStyles = 18 Const aTempFileName = "Berend_Ilko_Tom_Stella_Volker.stc" Dim oUcbObject as Object @@ -36,7 +33,6 @@ Public aTempURL as String Public Files(100) as String - '-------------------------------------------------------------------------------------- 'Calc Style Section starts here @@ -49,8 +45,9 @@ Dim LocalizedStyleNames(NumStyles,2) As String Dim LocalizedStyleName As String Dim t as Integer Dim MaxIndex as Integer +Dim StyleNameDef As Variant BasicLibraries.LoadLibrary("Tools") - If InitResources("'Template'", "tpl") then + If InitResources("'Template'") then oDocument = ThisComponent If oDocument.SupportsService("com.sun.star.sheet.SpreadsheetDocument") Then ToggleWindow(False) @@ -62,12 +59,13 @@ Dim MaxIndex as Integer 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) + DialogModel.Title = GetResText("STYLES_0") + DialogModel.cmdCancel.Label = GetResText("STYLES_2") + DialogModel.cmdOk.Label = GetResText("STYLES_3") + StyleNameDef = Array("(Standard)", "Autumn Leaves", "Be", "Black and White", "Blackberry Bush", "Blue Jeans", "Fifties Diner", "Glacier", "Green Grapes", "Marine", "Millennium", "Nature", "Neon", "Night", "PC Nostalgia", "Pastel", "Pool Party", "Pumpkin") For t = 0 to NumStyles - 1 - LocalizedStyleNames(t,0) = GetResText(STYLENAME_DEF+t) - LocalizedStyleNames(t,1) = GetResText(STYLENAME+t) + LocalizedStyleNames(t,0) = StyleNameDef(t) + LocalizedStyleNames(t,1) = GetResText("STYLENAME_" & Trim(Str(t))) Next t Stylenames() = ReadDirectories(StylesDir, False, False, True,) MaxIndex = Ubound(Stylenames()) @@ -129,7 +127,7 @@ Sub SaveCurrentStyles(oDocument as Object) Exit Sub ErrorOcurred: - MsgBox(GetResText( STYLES+1 ), 16, GetResText( STYLES )) + MsgBox(GetResText("STYLES_1"), 16, GetResText("STYLES_0")) On Local Error Goto 0 End Sub |