diff options
author | Tom Verbeek <tv@openoffice.org> | 2001-08-02 15:49:30 +0000 |
---|---|---|
committer | Tom Verbeek <tv@openoffice.org> | 2001-08-02 15:49:30 +0000 |
commit | 45675069767490469f80112cf7907158b18c3c19 (patch) | |
tree | 16415ba074066c23408ea8fb0b2abca8d972f131 /wizards/source/webwizard | |
parent | 5897a7044b67dfcbc5f1d2988c1be127dc59f739 (diff) |
#90532# fixed change to new file format with the templates
Diffstat (limited to 'wizards/source/webwizard')
-rw-r--r-- | wizards/source/webwizard/Common.xba | 5 | ||||
-rw-r--r-- | wizards/source/webwizard/HtmlAutoPilotBasic.xba | 32 |
2 files changed, 21 insertions, 16 deletions
diff --git a/wizards/source/webwizard/Common.xba b/wizards/source/webwizard/Common.xba index 906267d5b048..287d96526fb2 100644 --- a/wizards/source/webwizard/Common.xba +++ b/wizards/source/webwizard/Common.xba @@ -13,7 +13,7 @@ Dim StylesOptions(0) as New com.sun.star.beans.PropertyValue If SourceFile <> "" Then StylesOptions(0).Name = "OverwriteStyles" - StylesOptions(0).Value = true + StylesOptions(0).Value = True oDocument.StyleFamilies.LoadStylesFromURL(SourceFile, StylesOptions()) End If @@ -46,7 +46,8 @@ Dim StylesOptions(0) as New com.sun.star.beans.PropertyValue LoadNewStyles() = bLocWithBackGraphic ErrorOcurred: If Err <> 0 Then - MsgBox(WebWiz_gErrWhileLoadStyles$, 16, WebWiz_gWizardName$) + MsgBox + (WebWiz_gErrWhileLoadStyles$, 16, WebWiz_gWizardName$) CancelHTMLWizard() End If End Function diff --git a/wizards/source/webwizard/HtmlAutoPilotBasic.xba b/wizards/source/webwizard/HtmlAutoPilotBasic.xba index d74b16939c7a..7ecc43c02ee7 100644 --- a/wizards/source/webwizard/HtmlAutoPilotBasic.xba +++ b/wizards/source/webwizard/HtmlAutoPilotBasic.xba @@ -270,10 +270,11 @@ End Function Function FillupWebListbox(oUcb as Object, sFileFilter as String, oDialog as Object, ListboxName as String, List() as String) Dim oDocInfo as Object -Dim oAloneDocInfo as Object +Dim oComp as Object +Dim oRealDocInfo as Object Dim oListboxControl as Object -Dim Description as String Dim sField as String +Dim sDescription as String Dim sFieldList() as String Dim bItemFound as Boolean Dim MaxIndex as Integer @@ -288,9 +289,11 @@ Dim s as Integer Dim a as Integer Dim SelList(0) as Integer Dim LocMaxIndex as Integer +Dim FileProperties(0) as new com.sun.star.beans.PropertyValue + FileProperties(0).Name = "Hidden" + FileProperties(0).Value = True oListboxControl = oDialog.GetControl(ListboxName) oDocInfo = CreateUnoService("com.sun.star.document.DocumentProperties") - oAloneDocInfo = createUnoService( "com.sun.star.document.StandaloneDocumentInfo" ) FilterLen = Len(sFileFilter) bItemFound = False TemplatePath = GetOfficeSubPath("Template", "wizard/web/") @@ -298,32 +301,33 @@ Dim LocMaxIndex as Integer LocMaxIndex = Ubound(DirContent()) - Dim SortList(LocMaxIndex,1) + Dim SortList(LocMaxIndex,2) For i = 0 to LocMaxIndex SortList(i,0) = DirContent(i) - SortList(i,1) = RetrieveDocTitle(oDocInfo, DirContent(i)) + oComp = StarDesktop.LoadComponentFromURL(DirContent(i),"_blank",0,FileProperties()) + oRealDocInfo = oComp.getDocumentInfo() + oComp.dispose() + SortList(i,1) = oRealDocInfo.Title + SortList(i,2) = oRealDocInfo 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) + FileName = SortList(i,0) If Instr(1,Filename, sFileFilter) Then bItemFound = True - Description = RetrieveDocTitle(oDocInfo, FileName) - oAloneDocInfo.LoadFromUrl(FileName) - oListboxControl.AddItem(Description,a) + + sDescription = SortList(i,1) + oListboxControl.AddItem(sDescription,a) a = a + 1 - List(1,i) = Description + List(1,i) = sDescription If sFileFilter = "/cnt" Then List(2,i) = Filename Else m = 2 For n = 0 To 3 - sField = oAloneDocInfo.GetUserFieldValue(n) + sField = SortList(i,2).GetUserFieldValue(n) sFieldList() = ArrayoutofString(sField, " ", MaxIndex) For s = 0 To MaxIndex If m < 6 Then |