summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2012-12-19 19:38:07 +0100
committerXisco Fauli <anistenis@gmail.com>2012-12-19 19:38:07 +0100
commit041a2acebc1144d1a4550f07affbb7f463cafe7d (patch)
treea0101a183b51c54566a36f8b67a830641ca24bfa
parent8d340f4b15c530f3d8de8c2e7473eee2489a1654 (diff)
pywizards: More unused files in libreoffice-4-0
Change-Id: I78213f1834e22e2cbba314b20fbf3b74d05eee55
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGArgument.py21
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGContent.py38
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGDesign.py39
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGDocument.py286
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGExporter.py40
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGFilter.py23
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGGeneralInfo.py59
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGIconSet.py24
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGImage.py21
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGLayout.py50
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGPublish.py51
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGSession.py66
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGSessionName.py22
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGSettings.py147
-rw-r--r--wizards/com/sun/star/wizards/web/data/CGStyle.py32
-rw-r--r--wizards/com/sun/star/wizards/web/data/TypeDetection.py54
-rw-r--r--wizards/com/sun/star/wizards/web/data/__init__.py0
17 files changed, 0 insertions, 973 deletions
diff --git a/wizards/com/sun/star/wizards/web/data/CGArgument.py b/wizards/com/sun/star/wizards/web/data/CGArgument.py
deleted file mode 100644
index 220f424d70ec..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGArgument.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# 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 .
-#
-from common.ConfigGroup import ConfigGroup
-
-class CGArgument(ConfigGroup):
- cp_Value = str()
diff --git a/wizards/com/sun/star/wizards/web/data/CGContent.py b/wizards/com/sun/star/wizards/web/data/CGContent.py
deleted file mode 100644
index d2969d8a88f4..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGContent.py
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# 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 .
-#
-from common.ConfigGroup import ConfigGroup
-from common.ConfigSet import ConfigSet
-from CGDocument import CGDocument
-
-class CGContent(ConfigGroup):
-
- cp_Index = -1
- dirName = str()
- cp_Name = str()
- cp_Description = str()
- #COMMENTED
- #cp_Contents = ConfigSet(CGContent)
- cp_Documents = ConfigSet(CGDocument())
-
- def createDOM(self, parent):
- myElement = XMLHelper.addElement(
- parent, "content",
- ["name", "directory-name", "description", "directory"],
- [self.cp_Name, self.dirName, self.cp_Description, self.dirName])
- self.cp_Documents.createDOM(myElement)
- return myElement
diff --git a/wizards/com/sun/star/wizards/web/data/CGDesign.py b/wizards/com/sun/star/wizards/web/data/CGDesign.py
deleted file mode 100644
index 2d071d3b5be2..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGDesign.py
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# 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 .
-#
-from common.ConfigGroup import ConfigGroup
-
-class CGDesign(ConfigGroup):
-
- cp_Layout = str()
- cp_Style = str()
- cp_BackgroundImage = str()
- cp_IconSet = str()
- cp_DisplayTitle = bool()
- cp_DisplayDescription = bool()
- cp_DisplayAuthor = bool()
- cp_DisplayCreateDate = bool()
- cp_DisplayUpdateDate = bool()
- cp_DisplayFilename = bool()
- cp_DisplayFileFormat = bool()
- cp_DisplayFormatIcon = bool()
- cp_DisplayPages = bool()
- cp_DisplaySize = bool()
- cp_OptimizeDisplaySize = int()
-
- def createDOM(self, parent):
- return XMLHelper.addElement(parent, "design", (0,), (0,))
diff --git a/wizards/com/sun/star/wizards/web/data/CGDocument.py b/wizards/com/sun/star/wizards/web/data/CGDocument.py
deleted file mode 100644
index 6dd6aeae9b3e..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGDocument.py
+++ /dev/null
@@ -1,286 +0,0 @@
-#
-# 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 .
-#
-from os import sep as separator
-from common.ConfigGroup import ConfigGroup
-from document.OfficeDocument import OfficeDocument
-from common.Properties import Properties
-from common.PropertyNames import PropertyNames
-from common.FileAccess import FileAccess
-from TypeDetection import *
-from common.Desktop import Desktop
-
-from com.sun.star.document.MacroExecMode import NEVER_EXECUTE
-from com.sun.star.document.UpdateDocMode import NO_UPDATE
-
-'''
-About the member fields Title, Decription and Author:
-There is an ambiguicy in handling these fields.
-On the one hand, the user can set those fields to a custom value,
-relevant only for the web-wizard.
-On the other-hand, the web-wizard can read those fields automatically
-from SO documents.
-In order to avoid conflict by saving, I use two fields: "cp_title", which
-should be read from the configuratin (saved session), and "title" which is
-the value read from the document.
-The *cp_title* "overrides" *title*, if exists. if not, *title* is used.
-The same is valid for *description* and *author*.
-@author rpiterman
-'''
-
-class CGDocument(ConfigGroup):
- cp_Exporter = None
- cp_Index = -1
- PAGE_TYPE_PAGE = 1
- PAGE_TYPE_SLIDE = 2
- cp_Title = ""
- cp_Description = ""
- cp_Author = ""
- localFilename = ""
- urlFilename = ""
- title = ""
- description = ""
- author = ""
- sizeBytes = -1
- pages = -1
- valid = False
- appType = None
-
- '''
- the task will advance 5 times during validate.
- @param xmsf
- @param task
- @throws Exception
- '''
-
- def validate(self, xmsf, task):
- if not self.root.getFileAccess(xmsf).exists(self.cp_URL, False):
- raise FileNotFoundException (
- "The given URL does not point to a file");
-
- if self.root.getFileAccess(xmsf).isDirectory(self.cp_URL):
- raise IllegalArgumentException (
- "The given URL points to a directory");
- #create a TypeDetection service
-
- self.mediaDescriptor = OfficeDocument.getFileMediaDecriptor(
- xmsf, self.cp_URL)
- #task.advance(True)
- #1
- self.analyzeFileType(self.mediaDescriptor)
- #task.advance(True)
- #2
- path = self.root.getFileAccess(xmsf).getPath(self.cp_URL, "")
- localFilename = FileAccess.getFilename(path, separator)
- '''
- if the type is a star office convertable document
- We try to open the document to get some properties
- '''
- xProps = None
- #task.advance(True)
- #3
- if self.isSOOpenable:
- # for documents which are openable through SO,
- # use DocumentProperties service.
- desktop = Desktop.getDesktop(xmsf)
- props = range(3)
- props[0] = Properties.createProperty("Hidden", True)
- props[1] = Properties.createProperty(
- "MacroExecutionMode", NEVER_EXECUTE)
- props[2] = Properties.createProperty(
- "UpdateDocMode", NO_UPDATE)
- component = desktop.loadComponentFromURL(
- self.cp_URL, "_default", 0, tuple(props))
- xProps = component.DocumentProperties
-
- #task.advance(True)
- #4
- #now use the object to read some document properties.
- if xProps != None:
- title = xProps.Title
- description = xProps.Description
- author = xProps.Author
- createDate = xProps.CreationDate
- updateDate = xProps.ModificationDate
- else:
-
- #get some information from OS.
- title = self.localFilename
- updateDate = \
- getSettings().getFileAccess(xmsf).getLastModified(self.cp_URL)
-
- #task.advance(True)
- #5
- valid = True
- if self.cp_Title == "":
- cp_Title = self.title
-
- if self.cp_Title == "":
- cp_Title = self.localFilename
-
- if self.cp_Description == "":
- cp_Description = self.description
-
- if self.cp_Author == "":
- cp_Author = self.author
-
- if self.cp_Exporter == None or self.cp_Exporter == "":
- cp_Exporter = \
- self.root.cp_Exporters.getKey(self.root.getExporters(CGDocument.appType))
-
- '''
- Analyzes a type-detection string, returned from the TypeDetection service,
- and sets the appType, isSOOpenable and isSODocument members.
- '''
-
- def analyzeFileType(self, mediaDesc):
- if mediaDesc is None:
- media = ""
- else:
- media = Properties.getPropertyValue(
- self.mediaDescriptor, PropertyNames.PROPERTY_NAME)
- CGDocument.appType = self.getDocType(media)
- self.isSOOpenable = (CGDocument.appType == WRITER_DOC or CGDocument.appType == CALC_DOC or CGDocument.appType == IMPRESS_DOC or CGDocument.appType == DRAW_DOC) or CGDocument.appType == HTML_DOC
- parts = media.split("_")
- if len(parts) < 2:
- self.isSODocument = False
- else:
- self.isSODocument = self.isSOOpenable and (parts[1].startswith("Star"))
-
- '''
- @param media is the media description string returned by an UNO TypeDetection object.
- @return one of the constants in the interface
-
- '''
-
- def getDocType(self, media):
- if media == "":
- return NO_TYPE
- elif media.startswith("generic_HTML"):
- return HTML_DOC
- elif media.startswith("writer"):
- return WRITER_DOC
- elif media.startswith("calc"):
- return CALC_DOC
- elif media.startswith("draw"):
- return DRAW_DOC
- elif media.startswith("impress"):
- return IMPRESS_DOC
- elif media.startswith("pdf"):
- return PDF_DOC
- elif media.startswith("gif") or media.startswith("jpg"):
- return WEB_GRAPHICS
- elif media.startswith("wav"):
- return SOUND_FILE
- else:
- return NO_TYPE
-
- def createDOM(self, parent):
- d = getSettings().cp_DefaultSession.cp_Design
- exp = getSettings().cp_Exporters.getElement(self.cp_Exporter)
- '''return XMLHelper.addElement(parent, "document", ["title", "description", "author", "format", "filename", "create-date", "update-date", "pages", "size", "icon", "dir", "fn"], [d.cp_DisplayTitle ? self.cp_Title : "", d.cp_DisplayDescription ? self.cp_Description : "", d.cp_DisplayAuthor ? self.cp_Author : "", d.cp_DisplayFileFormat ? getTargetTypeName(exp) : "", d.cp_DisplayFilename ? self.localFilename : "", d.cp_DisplayCreateDate ? self.createDate() : "", d.cp_DisplayUpdateDate ? self.updateDate() : "", d.cp_DisplayPages and (self.pages > -1) ? "" + self.pages() : "", #TODO when do i calculate pages?
- d.cp_DisplaySize ? sizeKB() : "", #TODO when do i calculate size?
- d.cp_DisplayFormatIcon ? getIcon(exp) : "", self.dirName, self.urlFilename])'''
-
- def updateDate(self):
- if self.updateDate == None:
- return ""
-
- return getSettings().formatter.formatCreated(self.updateDate)
-
- def createDate(self):
- if self.createDate == None:
- return ""
-
- return getSettings().formatter.formatCreated(self.createDate)
-
- def sizeKB(self):
- if self.sizeBytes == -1:
- return ""
- else:
- return getSettings().formatter.formatFileSize(self.sizeBytes)
-
- def pages(self):
- if self.pages == -1:
- return ""
- else:
- return pagesTemplate().replace("%NUMBER", "" + self.pages)
-
- def pagesTemplate(self):
- pagesType = \
- getSettings().cp_Exporters.getElement(self.cp_Exporter).cp_PageType
- if pagesType == PAGE_TYPE_PAGE:
- return \
- getSettings().resources[CGSettings.RESOURCE_PAGES_TEMPLATE]
- elif pagesType == PAGE_TYPE_SLIDE:
- return \
- getSettings().resources[CGSettings.RESOURCE_SLIDES_TEMPLATE]
- else:
- return ""
-
- def getTargetTypeName(self, exp):
- if exp.targetTypeName == "":
- return Properties.getPropertyValue(self.mediaDescriptor, "UIName")
- else:
- return exp.targetTypeName
-
- def getIcon(self, exporter):
- if exporter.cp_Icon == "":
- return getIcon(CGDocument.appType)
- else:
- return exporter.cp_Icon
-
- def getIcon(self, appType):
- return appType + ".gif"
-
- '''
- This method is used by the DataAware model
- and returns the index of the exporter of
- this document, <b>in the list of the
- exporters available for this type of document</b>
- @return
- '''
-
- def getExporter(self):
- return [getExporterIndex()]
-
- '''
- @see getExporter()
- '''
-
- def setExporter(self, exporter_):
- exp = getSettings().getExporters(CGDocument.appType)[exporter_[0]]
- cp_Exporter = getSettings().cp_Exporters.getKey(exp)
-
- '''
- @see getExporter()
- @return
- '''
-
- def getExporterIndex(self):
- if self.cp_Exporter == None:
- return 0
-
- exporter = getSettings().cp_Exporters.getElement(self.cp_Exporter)
- exporters = getSettings().getExporters(CGDocument.appType)
- i = 0
- while i < exporters.length:
- if exporters[i] == exporter:
- return i
-
- i += 1
- return -1
diff --git a/wizards/com/sun/star/wizards/web/data/CGExporter.py b/wizards/com/sun/star/wizards/web/data/CGExporter.py
deleted file mode 100644
index ef4a9446705b..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGExporter.py
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# 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 .
-#
-from common.ConfigSet import ConfigSet
-from CGArgument import CGArgument
-from common.ConfigGroup import ConfigGroup
-
-class CGExporter(ConfigGroup):
- cp_Index = -1
- cp_Name = str()
- cp_ExporterClass = str()
- cp_OwnDirectory = bool()
- cp_SupportsFilename = bool()
- cp_DefaultFilename = str()
- cp_Extension = str()
- cp_SupportedMimeTypes = str()
- cp_Icon = str()
- cp_TargetType = str()
- cp_Binary = bool()
- cp_PageType = int()
- targetTypeName = ""
- cp_Arguments = ConfigSet(CGArgument())
-
- def supports(self, mime):
- return CGExporter.cp_SupportedMimeTypes == "" or \
- CGExporter.cp_SupportedMimeTypes.index(mime) > -1
diff --git a/wizards/com/sun/star/wizards/web/data/CGFilter.py b/wizards/com/sun/star/wizards/web/data/CGFilter.py
deleted file mode 100644
index 75a4adc5f8e9..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGFilter.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# 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 .
-#
-from common.ConfigGroup import ConfigGroup
-
-class CGFilter(ConfigGroup):
- cp_Index = -1
- cp_Name = str()
- cp_Filter = str()
diff --git a/wizards/com/sun/star/wizards/web/data/CGGeneralInfo.py b/wizards/com/sun/star/wizards/web/data/CGGeneralInfo.py
deleted file mode 100644
index 0928dda960c5..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGGeneralInfo.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# 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 .
-#
-from common.ConfigGroup import ConfigGroup
-
-class CGGeneralInfo(ConfigGroup):
-
- cp_Title = str()
- cp_Description = str()
- cp_Author = str()
- cp_CreationDate = int()
- cp_UpdateDate = int()
- cp_Email = str()
- cp_Copyright = str()
-
- def createDOM(self, parent):
- return XMLHelper.addElement(
- parent, "general-info",
- ["title", "author", "description", "creation-date",
- "update-date", "email", "copyright"],
- [self.cp_Title, self.cp_Author, self.cp_Description,
- str(self.cp_CreationDate), str(self.cp_UpdateDate),
- self.cp_Email, self.cp_Copyright])
-
- def getCreationDate(self):
- if self.cp_CreationDate == 0:
- self.cp_CreationDate = currentDate()
-
- return self.cp_CreationDate
-
- def getUpdateDate(self):
- if self.cp_UpdateDate == 0:
- self.cp_UpdateDate = currentDate()
-
- return self.cp_UpdateDate
-
- def setCreationDate(self, i):
- self.cp_CreationDate = i.intValue()
-
- def setUpdateDate(self, i):
- self.cp_UpdateDate = i.intValue()
-
- def currentDate(self):
- dt = JavaTools.getDateTime(System.currentTimeMillis())
- return dt.Day + dt.Month * 100 + dt.Year * 10000
diff --git a/wizards/com/sun/star/wizards/web/data/CGIconSet.py b/wizards/com/sun/star/wizards/web/data/CGIconSet.py
deleted file mode 100644
index fb540e4a8063..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGIconSet.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# 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 .
-#
-from common.ConfigGroup import ConfigGroup
-
-class CGIconSet(ConfigGroup):
- cp_Index = -1
- cp_FNPrefix = str()
- cp_FNPostfix = str()
- cp_Name = str()
diff --git a/wizards/com/sun/star/wizards/web/data/CGImage.py b/wizards/com/sun/star/wizards/web/data/CGImage.py
deleted file mode 100644
index 1f01ff9738c1..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGImage.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# 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 .
-#
-from common.ConfigGroup import ConfigGroup
-
-class CGImage(ConfigGroup):
- cp_Href = str()
diff --git a/wizards/com/sun/star/wizards/web/data/CGLayout.py b/wizards/com/sun/star/wizards/web/data/CGLayout.py
deleted file mode 100644
index a8b5bbb375b2..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGLayout.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# 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 .
-#
-from common.ConfigGroup import ConfigGroup
-from ui.UIConsts import RID_IMG_WEB
-
-class CGLayout(ConfigGroup):
-
- cp_Index = -1
- cp_Name = str()
- cp_FSName = str()
-
- def createTemplates(self, xmsf):
- self.templates = {}
- tf = TransformerFactory.newInstance()
- workPath = getSettings().workPath
- fa = FileAccess(xmsf)
- stylesheetPath = fa.getURL(
- getSettings().workPath, "layouts/" + self.cp_FSName)
- files = fa.listFiles(stylesheetPath, False)
- i = 0
- while i < files.length:
- if FileAccess.getExtension(files[i]).equals("xsl"):
- self.templates.put(
- FileAccess.getFilename(files[i]),
- tf.newTemplates(StreamSource (files[i])))
- i += 1
-
- def getImageUrls(self):
- sRetUrls = range(1)
- ResId = RID_IMG_WEB + (self.cp_Index * 2)
- return [ResId, ResId + 1]
-
- def getTemplates(self, xmsf):
- self.createTemplates(xmsf)
- return self.templates
diff --git a/wizards/com/sun/star/wizards/web/data/CGPublish.py b/wizards/com/sun/star/wizards/web/data/CGPublish.py
deleted file mode 100644
index 2a0619c26597..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGPublish.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# 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 .
-#
-from common.ConfigGroup import ConfigGroup
-
-'''
-A Class which describes the publishing arguments
-in a session.
-Each session can contain different publishers, which are configured
-through such a CGPublish object.
-'''
-
-class CGPublish(ConfigGroup):
-
- cp_Publish = bool()
- cp_URL = str()
- cp_Username = str()
- password = str()
-
- def setURL(self, path):
- try:
- self.cp_URL = (self.root).getFileAccess().getURL(path)
- self.overwriteApproved = False
- except Exception, ex:
- ex.printStackTrace()
-
- def getURL(self):
- try:
- return (self.root).getFileAccess().getPath(self.cp_URL, None)
- except Exception, e:
- e.printStackTrace()
- return ""
-
- def ftpURL(self):
- pass
- #COMMENTED
- #return "ftp://" + self.cp_Username + ((self.password != None and self.password.length() > 0) ? ":" + self.password : "") + "@" + self.cp_URL.substring(7)
diff --git a/wizards/com/sun/star/wizards/web/data/CGSession.py b/wizards/com/sun/star/wizards/web/data/CGSession.py
deleted file mode 100644
index dfa94db60f61..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGSession.py
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# 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 .
-#
-from common.ConfigGroup import ConfigGroup
-from common.ConfigSet import ConfigSet
-from CGContent import CGContent
-from CGDesign import CGDesign
-from CGGeneralInfo import CGGeneralInfo
-from CGPublish import CGPublish
-
-class CGSession(ConfigGroup):
-
- cp_Index = -1
- cp_InDirectory = str()
- cp_OutDirectory = str()
- cp_Name = str()
- cp_Content = CGContent()
- cp_Design = CGDesign()
- cp_GeneralInfo = CGGeneralInfo()
- cp_Publishing = ConfigSet(CGPublish())
- valid = False
-
- def createDOM(self, parent):
- root = XMLHelper.addElement(
- parent, "session", ["name", "screen-size"],
- [self.cp_Name, getScreenSize()])
- self.cp_GeneralInfo.createDOM(root)
- self.cp_Content.createDOM(root)
- return root
-
- def getScreenSize(self):
- tmp_switch_var1 = self.cp_Design.cp_OptimizeDisplaySize
- if tmp_switch_var1 == 0:
- return "640"
- elif tmp_switch_var1 == 1:
- return "800"
- elif tmp_switch_var1 == 2:
- return "1024"
- else:
- return "800"
-
- def getLayout(self):
- return self. root.cp_Layouts.getElement(self.cp_Design.cp_Layout)
-
- def getStyle(self):
- return self.root.cp_Styles.getElement(self.cp_Design.cp_Style)
-
- def createDOM(self):
- factory = DocumentBuilderFactory.newInstance()
- doc = factory.newDocumentBuilder().newDocument()
- createDOM(doc)
- return doc
diff --git a/wizards/com/sun/star/wizards/web/data/CGSessionName.py b/wizards/com/sun/star/wizards/web/data/CGSessionName.py
deleted file mode 100644
index d42b0d5f1125..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGSessionName.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# 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 .
-#
-from common.ConfigGroup import ConfigGroup
-
-class CGSessionName(ConfigGroup):
- cp_Index = -1
- cp_Name = str()
diff --git a/wizards/com/sun/star/wizards/web/data/CGSettings.py b/wizards/com/sun/star/wizards/web/data/CGSettings.py
deleted file mode 100644
index ff5bf55008e9..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGSettings.py
+++ /dev/null
@@ -1,147 +0,0 @@
-#
-# 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 .
-#
-import traceback
-from common.FileAccess import FileAccess
-from common.ConfigGroup import ConfigGroup
-from common.ConfigSet import ConfigSet
-from CGExporter import CGExporter
-from CGLayout import CGLayout
-from CGStyle import CGStyle
-from CGIconSet import CGIconSet
-from CGImage import CGImage
-from CGFilter import CGFilter
-from common.Helper import Helper
-from CGSessionName import CGSessionName
-from CGSession import CGSession
-from common.Properties import Properties
-
-from com.sun.star.i18n.NumberFormatIndex import DATE_SYS_DMMMYYYY
-from com.sun.star.i18n.NumberFormatIndex import NUMBER_1000DEC2
-
-class CGSettings(ConfigGroup):
-
- RESOURCE_PAGES_TEMPLATE = 0
- RESOURCE_SLIDES_TEMPLATE = 1
- RESOURCE_CREATED_TEMPLATE = 2
- RESOURCE_UPDATED_TEMPLATE = 3
- RESOURCE_SIZE_TEMPLATE = 4
-
- cp_WorkDir = str()
- cp_Exporters = ConfigSet(CGExporter())
- cp_Layouts = ConfigSet(CGLayout())
- cp_Styles = ConfigSet(CGStyle())
- cp_IconSets = ConfigSet(CGIconSet())
- cp_BackgroundImages = ConfigSet(CGImage())
- cp_SavedSessions = ConfigSet(CGSessionName())
- cp_Filters = ConfigSet(CGFilter())
- savedSessions = ConfigSet(CGSessionName())
- cp_DefaultSession = CGSession()
- cp_LastSavedSession = str()
- fileAccess = None
-
- def __init__(self, xmsf_, resources_, document):
- self.xmsf = xmsf_
- try:
- self.soTemplateDir = FileAccess.getOfficePath2(
- self.xmsf, "Config", "", "")
- self.soGalleryDir = FileAccess.getOfficePath2(
- self.xmsf, "Gallery", "share", "")
- ConfigGroup.root = self
- self.formatter = self.Formatter(self.xmsf, document)
- self.resources = resources_
- self.workPath = None
- self.exportersMap = {}
- except Exception:
- traceback.print_exc()
-
- def getExporters(self, mime):
- exps = self.exportersMap.get(mime)
- if exps is None:
- exps = self.createExporters(mime)
- self.exportersMap[mime] = exps
-
- return exps
-
- def createExporters(self, mime):
- exporters = self.cp_Exporters.childrenList
- v = []
- for i in exporters:
- if i is not None:
- if i.supports(mime):
- try:
- v.append(i)
- except Exception, ex:
- traceback.print_exc()
-
- return v
-
- '''
- call after read.
- @param xmsf
- @param document the background document. used for date/number formatting.
- '''
-
- def configure(self, xmsf):
- self.workPath = FileAccess.connectURLs(
- self.soTemplateDir, self.cp_WorkDir)
- #COMMENTED
- #self.calcExportersTargetTypeNames(xmsf)
-
- def calcExportersTargetTypeNames(self, xmsf):
- typeDetect = xmsf.createInstance(
- "com.sun.star.document.TypeDetection")
- for i in xrange(self.cp_Exporters.getSize()):
- self.calcExporterTargetTypeName(
- typeDetect, self.cp_Exporters.getElementAt(i))
-
- def calcExporterTargetTypeName(self, typeDetect, exporter):
- if not exporter.cp_TargetType == "":
- exporter.targetTypeName = Properties.getPropertyValue(
- typeDetect.getByName(exporter.cp_TargetType), "UIName")
-
- @classmethod
- def getFileAccess(self, xmsf = None):
- if xmsf is None:
- xmsf = self.xmsf
- if CGSettings.fileAccess is None:
- CGSettings.fileAccess = FileAccess(xmsf)
-
- return CGSettings.fileAccess
-
- class Formatter(object):
- def __init__(self, xmsf, document):
- self.dateUtils = Helper.DateUtils(xmsf, document)
- self.dateFormat = self.dateUtils.getFormat(DATE_SYS_DMMMYYYY)
- self.numberFormat = self.dateUtils.getFormat(NUMBER_1000DEC2)
-
- def formatCreated(self, date):
- sDate = self.dateUtils.format(dateFormat, date)
- return resources[CGSettings.RESOURCE_CREATED_TEMPLATE].replace(
- "%DATE", sDate)
-
- def formatUpdated(self, date):
- sDate = self.dateUtils.format(dateFormat, date);
- return resources[CGSettings.RESOURCE_UPDATED_TEMPLATE].replace(
- "%DATE", sDate)
-
- def formatFileSize(self, size):
- sizeInKB = size / float(1024)
- sSize = self.dateUtils.getFormatter().convertNumberToString(
- numberFormat, sizeInKB)
- return resources[CGSettings.RESOURCE_SIZE_TEMPLATE].replace(
- "%NUMBER", sSize)
diff --git a/wizards/com/sun/star/wizards/web/data/CGStyle.py b/wizards/com/sun/star/wizards/web/data/CGStyle.py
deleted file mode 100644
index bf90d514be38..000000000000
--- a/wizards/com/sun/star/wizards/web/data/CGStyle.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# 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 .
-#
-from common.ConfigGroup import ConfigGroup
-
-class CGStyle(ConfigGroup):
- cp_Index = -1
- cp_Name = str()
- cp_CssHref = str()
- cp_BackgroundImage = str()
- cp_IconSet = str()
-
- def getBackgroundUrl(self):
- if CGStyle.cp_BackgroundImage is None \
- or CGStyle.cp_BackgroundImage == "":
- return None
- else:
- return CGStyle.cp_BackgroundImage
diff --git a/wizards/com/sun/star/wizards/web/data/TypeDetection.py b/wizards/com/sun/star/wizards/web/data/TypeDetection.py
deleted file mode 100644
index 48957b65ca95..000000000000
--- a/wizards/com/sun/star/wizards/web/data/TypeDetection.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# 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 .
-#
-'''
-a document which will open in writer.
-'''
-WRITER_DOC = "writer"
-'''
-a document which will open in calc.
-'''
-CALC_DOC = "calc"
-'''
-a document which will open in impress.
-'''
-IMPRESS_DOC = "impress"
-'''
-a document which will open in draw.
-'''
-DRAW_DOC = "draw"
-'''
-an HTML document
-'''
-HTML_DOC = "html"
-'''
-a GIF or an JPG file.
-'''
-WEB_GRAPHICS = "graphics"
-'''
-a PDF document.
-'''
-PDF_DOC = "pdf"
-'''
-a Sound file (mp3/wav ect.)
-'''
-SOUND_FILE = "sound"
-'''
-a File which can not be handled by neither SO or a Web browser
-(exe, jar, zip ect.)
-'''
-NO_TYPE = "other"
diff --git a/wizards/com/sun/star/wizards/web/data/__init__.py b/wizards/com/sun/star/wizards/web/data/__init__.py
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/wizards/com/sun/star/wizards/web/data/__init__.py
+++ /dev/null