summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-04-17 20:29:45 +0200
committerDavid Tardon <dtardon@redhat.com>2013-04-17 18:30:56 +0000
commit718cd9e46e47cc384758f0517d4e5b3b70d2a73d (patch)
tree2f4f71c9977c8325317d62f749555b55fa0790c6 /wizards
parent96adcf4b9f466e2bf26ec5aeb9e4202002376a61 (diff)
Remove unused web wizard
Change-Id: I76ed89c4a46e5a7b6a639e2c2717bc53d9b68bc9 Reviewed-on: https://gerrit.libreoffice.org/3438 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'wizards')
-rw-r--r--wizards/Module_wizards.mk1
-rw-r--r--wizards/Zip_web.mk41
-rw-r--r--wizards/source/webwizard/Bullets.xba134
-rw-r--r--wizards/source/webwizard/Common.xba162
-rw-r--r--wizards/source/webwizard/HtmlAutoPilotBasic.xba453
-rw-r--r--wizards/source/webwizard/Language.xba101
-rw-r--r--wizards/source/webwizard/WebWzrd.xdl45
-rw-r--r--wizards/source/webwizard/dialog.xlb5
-rw-r--r--wizards/source/webwizard/script.xlb8
9 files changed, 0 insertions, 950 deletions
diff --git a/wizards/Module_wizards.mk b/wizards/Module_wizards.mk
index d979ed0dd4b9..098433d3734d 100644
--- a/wizards/Module_wizards.mk
+++ b/wizards/Module_wizards.mk
@@ -49,7 +49,6 @@ $(eval $(call gb_Module_add_targets,wizards,\
Zip_tools \
Zip_tutorials \
Zip_usr \
- Zip_web \
))
ifeq ($(SOLAR_JAVA),TRUE)
diff --git a/wizards/Zip_web.mk b/wizards/Zip_web.mk
deleted file mode 100644
index c552440b5414..000000000000
--- a/wizards/Zip_web.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2011 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.
-#
-#*************************************************************************
-
-$(eval $(call gb_Zip_Zip,basicsrvweb,$(SRCDIR)/wizards/source/webwizard))
-
-$(eval $(call gb_Zip_add_files,basicsrvweb,\
- Bullets.xba \
- Common.xba \
- dialog.xlb \
- HtmlAutoPilotBasic.xba \
- Language.xba \
- script.xlb \
- WebWzrd.xdl \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/wizards/source/webwizard/Bullets.xba b/wizards/source/webwizard/Bullets.xba
deleted file mode 100644
index 76d825ac19dd..000000000000
--- a/wizards/source/webwizard/Bullets.xba
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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(&quot;NumberingRules&quot;) 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 = &quot;NumberingType&quot;
- 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 = &quot;GraphicURL&quot;
- 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()&apos; 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(&quot;NumberingRules&quot;) 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 = &quot;GraphicURL&quot; Then
- bDoReplace = True
- BulletName = FileNameoutofPath(oLevel(i).Value)
- If bIsFirstRun Then
- If oUcb.exists(SavePath &amp; Bulletname) Then
- FileCopy(oLevel(i).Value, SavePath &amp; BulletName)
- End If
- End If
- oNewBuffer(i).Value = BulletName
-&apos; ElseIf oLevel(i).Name = &quot;GraphicSize&quot; Then
-&apos;&apos; Todo: Get the original Size of the Bullet (see Bug #86196)
-&apos; oSize.Height = 300
-&apos; oSize.Width = 300
-&apos; 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 ea3fe5581387..000000000000
--- a/wizards/source/webwizard/Common.xba
+++ /dev/null
@@ -1,162 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="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&apos;, oStyle as Object
-Dim StylesOptions(0) as New com.sun.star.beans.PropertyValue
-
- If SourceFile &lt;&gt; &quot;&quot; Then
- StylesOptions(0).Name = &quot;OverwriteStyles&quot;
- StylesOptions(0).Value = True
- oDocument.StyleFamilies.LoadStylesFromURL(SourceFile, StylesOptions())
- End If
-
- &apos; Read array fields for background, bullet &amp; graphics
- BackgroundURL = Styles(CurIndex, 7)
- If Left(BackgroundURL, 1) &lt;&gt; &quot;#&quot; Then
- BackgroundURL = TextureDir + BackgroundURL
- bLocWithBackGraphic = True
- Else
- BackColor = clng(&quot;&amp;H&quot; &amp; Right(BackgroundURL, Len(BackgroundURL)-1))
- bLocWithBackGraphic = False
- End If
- oFamilies = oDocument.StyleFamilies
- oFamily = oFamilies.GetbyName(&quot;PageStyles&quot;)
- For i = 0 To oFamily.Count - 1
- If oFamily.GetByIndex(i).IsInUse Then
- oStyle = oFamily.GetbyIndex(i)
- If oStyle.PropertySetInfo.HasPropertybyName(&quot;BackGraphicURL&quot;) Then
- If Left(BackgroundURL, 1) = &quot;#&quot; Then
- oStyle.BackGraphicURL = &quot;&quot;
- 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 &lt;&gt; 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(&quot;PageStyles&quot;)
- For i = 0 To oPageFamily.Count - 1
- If oPageFamily.GetByIndex(i).IsInUse Then
- oStyle = oPageFamily.GetbyIndex(i)
- If oStyle.PropertySetInfo.HasPropertybyName(&quot;BackGraphicURL&quot;) Then
- If oStyle.BackGraphicUrl &lt;&gt; &quot;&quot; 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(&quot;PageStyles&quot;)
- For i = 0 To oFamily.Count - 1
- If oFamily.GetByIndex(i).IsInUse Then
- oStyle = oFamily.GetbyIndex(i)
- If oStyle.PropertySetInfo.HasPropertybyName(&quot;BackGraphicURL&quot;) 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
- &apos; Startup for WebWizard
- SelValue = sList(0,1)
- Else
- n = oListbox.SelectedItems(0)
- SelValue = oListbox.StringItemList(n)
- End If
- &apos; 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 7409954029c8..000000000000
--- a/wizards/source/webwizard/HtmlAutoPilotBasic.xba
+++ /dev/null
@@ -1,453 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="HtmlAutoPilotBasic" script:language="StarBasic">&apos; Variables must be declared
-Option Explicit
-
-Public CurDocIndex as Integer
-Public CurWebPageIndex as Integer
-
-
-Public bWithBackGraphic as Boolean
-Public oStyle as Object
-&apos; Maximum number of content templates, style templates and bullets
-Const MaxLayouts = 50
-Const MaxStyles = 100
-Const MaxBullets = 10
-
-&apos;Public NumberOfLayouts%, NumberOfStyles%
-
-&apos; 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(&quot;Tools&quot;)
- oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
- oBaseDocument = StarDesktop.LoadComponentFromURL(&quot;private:factory/swriter/web&quot;, &quot;_default&quot;, 0, NoArgs())
- oViewSettings = oBaseDocument.CurrentController.ViewSettings
- oViewCursor = oBaseDocument.GetCurrentController.ViewCursor
- CurWebPageIndex = -1
- ProgressBar = oBaseDocument.GetCurrentController.GetFrame.CreateStatusIndicator
- ProgressBar.Start(&quot;&quot;, 100)
- SetProgressValue(2)
- oBaseDocument.LockControllers
- oViewSettings.ShowTableBoundaries = False
- If Not GetWebWizardPaths() Then
- Exit Sub
- End If
- LoadLanguage
- SetProgressValue(10)
- Layout() = getListBoxArrays(oUcb, &quot;/cnt&quot;)
- GetCurIndex(DialogModel, Layout(),2)
- SetProgressValue(30)
- oCursor = oBasedocument.Text.CreateTextCursor
- oCursor.InsertDocumentfromURL(FileStr, NoArgs())
- SetProgressValue(50)
- Style() = getListBoxArrays(oUcb, &quot;/stl&quot;)
- 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 &lt;&gt; 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 &lt;&gt; 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 &lt;&gt; 0 Then
- MsgBox(WebWiz_gErrWhileReloading$, 16, WebWiz_gWizardName$)
- End If
- oBaseDocument.UnlockControllers
- oViewCursor.GotoStart(False)
- ToggleDialogControls(True, &quot;lbTemplate&quot;)
- 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 &lt;&gt; 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, &quot;lbStyles&quot;)
- 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 &amp; &quot; &quot; &amp; GetFileNameWithoutExtension(Style(CurIndex, i+1))
- ExtractGraphicNames = FieldValue
-End Function
-
-
-Sub SetBulletAndGraphics
- SetGraphic(&quot;Prev&quot;, CurrentPrev)
- SetGraphic(&quot;Next&quot;, CurrentNext)
- SetGraphic(&quot;Home&quot;, CurrentHome)
- SetGraphic(&quot;Top&quot;, 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 &gt; 0 And aActSize.Width &gt; 0 Then
- oGraphic.SetSize(aActSize)
- End If
- Next i
-End Sub
-
-
-Sub EndDialog()
- If DialogModel.chkSaveasTemplate.State = 1 Then
- &apos; Generating template? Set events later!
- AttachBasicMacroToEvent(oBaseDocument,&quot;OnNew&quot;, &quot;WebWizard.HtmlAutoPilotBasic.SetEvent()&quot;)
- &apos; Call the Store template dialog
- DispatchSlot(5538)
- AttachBasicMacroToEvent(oBaseDocument,&quot;OnNew&quot;, &quot;&quot;)
- End If
- SetEvent()
-End Sub
-
-
-Sub SetEvent()
-Dim oDocument as Object
-&apos; This sub links the events OnSaveDone and OnSaveAsDone to the procedure
-&apos; CopyGraphics. It is invoked when a document is created, either directly
-&apos; from the AutoPilot or from a template. It is not possible to set these
-&apos; links for the template created by the AutoPilot because then it is not
-&apos; possible to modify the template.
- BasicLibraries.LoadLibrary(&quot;Tools&quot;)
- oDocument = ThisComponent
- AttachBasicMacroToEvent(oDocument,&quot;OnSaveDone&quot;, &quot;WebWizard.HtmlAutoPilotBasic.CopyGraphics()&quot;)
- AttachBasicMacroToEvent(oDocument,&quot;OnSaveAsDone&quot;, &quot;WebWizard.HtmlAutoPilotBasic.CopyGraphics()&quot;)
-End Sub
-
-
-
-Sub CopyGraphics
-&apos; This sub copies all the graphics used in the document to the same directory the
-&apos; 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(&quot;Tools&quot;)
- oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
- GetWebWizardPaths()
- oBaseDocument = ThisComponent
-&apos; oBaseDocument.LockControllers()
-
- &apos; Note: The sub DirectoryNameoutofPath should be change, so that the last character is a slash
- SavePath = DirectoryNameoutofPath(oBaseDocument.Url, &quot;/&quot;) &amp; &quot;/&quot;
-
- 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(&quot;AutoPilotName1&quot;, 0, &quot;&quot;)
- udProps.addProperty(&quot;AutoPilotName2&quot;, 0, &quot;&quot;)
- udProps.addProperty(&quot;AutoPilotBullet&quot;, 0, &quot;&quot;)
- udProps.addProperty(&quot;AutoPilotBackground&quot;, 0, &quot;&quot;)
-
- AttachBasicMacroToEvent(oBaseDocument,&quot;OnSaveDone&quot;, &quot;&quot;)
- AttachBasicMacroToEvent(oBaseDocument,&quot;OnSaveAsDone&quot;, &quot;&quot;)
- AttachBasicMacroToEvent(oBaseDocument,&quot;OnNew&quot;, &quot;&quot;)
- oBaseDocument.Store
-&apos; 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) &gt; 2 Then
- sFileName = FileNameoutofPath(SourceUrl)
- sNewFileUrl = TargetDir &amp; 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(&quot;com.sun.star.document.DocumentProperties&quot;)
- FilterLen = Len(sFileFilter)
- bItemFound = False
- &apos; It has to be made sure that the TemplatePath &lt;&gt; &quot;&quot;
- TemplatePath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/web/&quot;)
- If TemplatePath = &quot;&quot; Then
- Dim NullList()
- getListBoxArrays() = NullList()
- Exit Function
- End If
- DirContent() = oUcb.GetFolderContents(TemplatePath,True)
- If sFileFilter = &quot;/cnt&quot; 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 = &quot;STW&quot; Then
- bItemFound = True
- Description = RetrieveDocTitle(oDocProps, FileName)
- Properties = oDocProps.UserDefinedProperties.PropertyValues
- List(a,1) = Description
- If sFileFilter = &quot;/cnt&quot; Then
- List(a,2) = Filename
- Else
- m = 2
- For n = 0 To 3
- sField = Properties(n).Value
- sFieldList() = ArrayoutofString(sField, &quot; &quot;, MaxIndex)
- For s = 0 To MaxIndex
- If m &lt; 6 Then
- List(a,m) = sFieldList(s) &amp; &quot;.gif&quot;
- 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 = &quot;/cnt&quot; 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(&quot;com.sun.star.text.GraphicObject&quot;)
- 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(&quot;ParagraphStyles&quot;).GetByName(&quot;Standard&quot;).CharColor
- &apos;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 &amp; &quot;webwizard.bmp&quot;
- 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
- &apos; 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 62701391cfbd..000000000000
--- a/wizards/source/webwizard/Language.xba
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Language" script:language="StarBasic">Option Explicit
-
-
-
-
-Sub LoadLanguage()
- If InitResources(&quot;WebWizard&quot;,&quot;wwz&quot;) 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(&quot;Gallery&quot;,&quot;www-back&quot;)
- If TextureDir &lt;&gt; &quot;&quot; Then
- GraphicsDir = GetOfficeSubPath(&quot;Gallery&quot;,&quot;www-graf/&quot;)
- If GraphicsDir &lt;&gt; &quot;&quot; Then
- BulletDir = GetOfficeSubPath(&quot;Gallery&quot;, &quot;bullets/&quot;)
- If BulletDir &lt;&gt; &quot;&quot; Then
- PhotosDir = GetPathSettings(&quot;Gallery&quot;, False, 1)
- If PhotosDir &lt;&gt; &quot;&quot; Then
- TemplatePath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/web/&quot;)
- If TemplatePath &lt;&gt; &quot;&quot; Then
- SOBitmapPath = GetOfficeSubPath(&quot;Template&quot;, &quot;../wizard/bitmap&quot;)
- If SOBitmapPath &lt;&gt; &quot;&quot; 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(&quot;WebWizard&quot;,&quot;WebWzrd&quot;)
- 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 &amp; &quot;webwizard.bmp&quot;
-
- DialogModel.ImagePreview.ImageURL = sBitmapPath
- ToggleOptionButtons(DialogModel, bWithBackGraphic)
- MainDialog.GetControl(&quot;lbTemplate&quot;).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 199119f4c649..000000000000
--- a/wizards/source/webwizard/WebWzrd.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">
-<!--
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
--->
-<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="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&amp;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&amp;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&amp;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/dialog.xlb b/wizards/source/webwizard/dialog.xlb
deleted file mode 100644
index d1b9cb066f0c..000000000000
--- 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 1045820b7002..000000000000
--- 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>